Proposal P-0000: one documentation system
proposed
This proposal sets how Cesium’s design is written down, decided and checked. It is the first proposal and describes the process that every later one follows. It is accepted when emanspeaks merges the pull request that carries it; until then nothing in it is decided.
This carries out cesiumlang/cesium-workspace#23.
Motivation
The design is spread over several places: issues labeled decision (cesiumlang/cesium#4 to #11), long threads on design issues, reference pages and a draft specification on cesiumlang.org, and a draft S0 grammar. Three things follow from that:
- It is unclear which points emanspeaks has actually accepted. The
decisionissues are summaries written by an agent. - The threads are expensive to read, for people and for agents.
- Nothing connects the specification to the tests, so nobody can say which rules are tested.
The system
Five layers, each with one job.
| Layer | Holds | Where | Decides anything? |
|---|---|---|---|
| Charter | Goals, non-goals and design principles. Short and stable. | docs/charter.md in cesiumlang/cesium | Yes, through a proposal |
| Proposals | One numbered document per design change. | proposals/ in cesiumlang/cesium | Yes: the only way something becomes decided |
| Specification | The normative rules, each with a stable ID. | spec/ in cesiumlang/cesium | No: it records what proposals decided |
| Conformance suite | Valid and invalid programs, each citing the rules it checks. | bootstrap/tests/ and later conformance/ in cesiumlang/cesium | No |
| User documentation and compiler notes | What is, for users and contributors. | cesiumlang.org | No |
Issues stay for tasks, bugs and the order of work in the Cesium Roadmap project. An open design issue becomes a proposal when it is worked, and the issue then only tracks the proposal.
Why the specification moves into the compiler repository
The specification is on cesiumlang.org today. The tests are in cesiumlang/cesium. A rule and the test that checks it have to be in one tree to be checked against each other in one CI run, so the specification moves next to the tests. The website already builds from a checkout of the compiler repository (build.js finds ../cesium-src), so it renders the specification from there, and readers see no difference.
Proposals
A proposal is a Markdown file proposals/NNNN-short-name.md with these sections: motivation, design, alternatives, drawbacks, open questions. Its status is one of:
| Status | Meaning |
|---|---|
draft | Being written. Not yet ready for a decision. |
proposed | Ready. Waiting for emanspeaks. |
accepted | Decided. The specification is updated to match. |
rejected | Decided against. Kept for the record. |
withdrawn | Dropped before a decision, by its author or by emanspeaks. |
superseded | Replaced by a later proposal, which it names. Only emanspeaks sets it. |
A proposal is discussed on its pull request. Merging that pull request with the status accepted is the decision, and only emanspeaks does that; only he sets rejected or superseded too. The author or emanspeaks may set withdrawn. An agent may write a proposal and recommend an answer; it never sets accepted.
The specification
The specification is Markdown, one chapter per file, read by skein. A rule is a paragraph or list entry with a marker:
%rule[lex.comment.line syntax final introduced-by=P-0012] A line comment starts with `//` and ends at the end of the line.
%rule[lex.keywords syntax] The keywords are:
- %rule[.as] `as`
- %rule[.fn] `fn`
- Every rule has an ID that says what it is about and never changes. A rule that is dropped keeps its ID, with the status
removed. - Every rule links to the proposal that introduced it (
introduced-by). - Text without a marker is narrative: it explains and decides nothing.
- A rule refers to another rule or to a defined term with
%[id].
The statuses of a rule:
| Status | Meaning |
|---|---|
draft | Written down, not yet accepted through a proposal. Guidance, not settled fact. |
final | Accepted through a proposal. |
deprecated | Still in force, and scheduled to go. |
removed | No longer a rule. The ID stays reserved. |
Everything in today’s draft specification and S0 grammar starts as draft. A rule becomes final only through an accepted proposal.
Tests cite rules
A test names the rules it checks in a comment, and skein reads those citations:
// spec: lex.comment.line, lex.comment.block
skein check fails CI when a citation or a reference names a rule that does not exist. skein coverage reports which rules have no test. It reports and does not fail, so coverage can grow chapter by chapter (cesiumlang/cesium#57, step 3). A test cites a rule by its text at the time: when a rule changes, skein does not yet flag the tests that cite it (chasingdaylight/skein#212); until it does, a change to a rule is reviewed with its tests by hand.
Rules that have a later history link to it: changed-by names the proposals that amended a rule after introduced-by, and a proposal that replaces another names it with superseded-by (Question 6).
Examples in the specification are tested
A worked example in the specification is an item of its own, %example[.open rejects] (a category says whether the compiler must accept or reject it), and it is part of the conformance suite: skein examples compiles each with the bootstrap compilers and fails when the result is not the one the category says. An example is linked to the rule it shows, and skein coverage reports rules without one where examples are expected (Question 7).
What happens to the existing material
- The
decisionissues (cesiumlang/cesium#4 to #11): each is rewritten as a proposal with the statusproposed. emanspeaks reviews each point by point: accept, change, or mark open. Until then, they are guidance. The “ADR” naming goes. - The draft specification and the S0 grammar: moved to
spec/with rule IDs, alldraft. - The reference pages on cesiumlang.org: stay as user documentation. Where one states something that no rule states, that statement becomes a
draftrule or an open question in a proposal. - Open design issues (label
design): unchanged until worked. None is closed or decided by this proposal.
Alternatives
- Keep deciding in issues. No tooling to add. Rejected here because it is the current state, with the three problems above.
- A separate repository for proposals and the specification. Cleaner history per kind of document. Skein can now cite across repositories (a qualified reference such as
%[compiler:lex.token], checked against the other repository’s recorded state), so this is possible. Rejected here because one repository keeps the rules, the tests and the pipelines that check them in one tree and one CI run (Question 1). - Keep the specification on cesiumlang.org. No move needed. Rejected here because the tests are not in that repository, so rules and tests could not be checked against each other in one CI run.
- Sphinx with sphinx-needs, or Doorstop. Mature tools. Both need Python, which no Cesium repository may depend on (cesiumlang/cesium#90), and neither reads rules written as plain paragraphs in a Markdown document.
Drawbacks
- Skein is new and has one maintainer. It renders the specification itself, as Markdown with anchors and links for a site generator, as a static HTML site, or as one self-contained file per document (chasingdaylight/skein#51 to #54, in v0.1.0, a pre-release), so the website does not depend on how skein is built.
- CI in cesiumlang/cesium depends on a released skein, which it downloads.
- Moving the specification changes the paths that existing links to the website’s sources point at. The published URLs can stay the same.
Questions and their answers
Questions 1 to 3 were answered by emanspeaks on 2026-11-21, and 4 to 7 (recommendations, 6 and 7 added when the proposal was checked against what skein does today) on 2026-11-22, with the changes noted in 4 and 5. Merging this proposal accepts them as written.
- Location: this repository. The charter, the proposals and the specification live in cesiumlang/cesium. It is the hub of everything else, and all the documentation and the specification of the language stay with the compiler’s source; the workspace repository is for developers’ tooling only. Everything is driven by the pipelines of this repository. If another repository ever needs items of its own, it gets a
.skein/directory too, and skein links the two (planned there as links across repositories); nothing needs that now. - Rule categories:
syntax,legality(what the compiler must reject),static(meaning fixed at compile time) anddynamic(behavior at run time), following the Ferrocene Language Specification. - How skein is obtained. Not through the buildtools. Developers get it with the VS Code extension
chasingdaylight.skein, which is to carry theskeinprogram for the platform (chasingdaylight/skein#74). CI downloads the archive of a pinned skein release for the runner and checks it against the release’s checksums. - Proposal numbers: four digits in order of filing; this proposal is
P-0000, the bootstrap,P-0001is the charter and the rest follow (emanspeaks, 2026-11-22). - Who sets the status (emanspeaks, 2026-11-22): anyone, agents included, may set
proposed; for now only emanspeaks setsaccepted,rejectedorsuperseded; the author or emanspeaks may setwithdrawn. Skein can make it visible: the typeproposaldeclaresapproval = ["accepted", "rejected"], soskein checkreports a proposal with either status that has no approval of its current text, andskein approve --from-pull-requestrecords the approval from the review of the merged pull request. Skein does not yet check who approved (chasingdaylight/skein#213), so until it does this rule is held by review of the pull request, as above. - Later history of rules and proposals (accepted 2026-11-22): the link types
changed-by(rule to the proposals that amended it) andsuperseded-by(proposal to its replacement), besideintroduced-by, so a rule’s whole history is a trace. - Examples in the specification (accepted 2026-11-22): tested examples (
%example, categoriesacceptsandrejects) are part of the conformance suite, as described above, and thelangspectemplate of skein is the starting point of.skein/.
After acceptance
In this order, each as its own pull request:
.skein/in cesiumlang/cesium (fromskein init --template langspec) with the item typesproposal,rule,exampleandterm, the rule statusesdraft,final,deprecatedandremoved(removedthe tombstone), the link typesintroduced-by,changed-byandsuperseded-by, and a citation set for the tests;skein checkin CI.P-0001, the charter, from the goals on cesiumlang.org and the 2025 design.- The
decisionissues as proposalsP-0002onward. - The specification in
spec/with rule IDs, lexical structure and the S0 grammar first. - Citations in the bootstrap tests, and the coverage report in CI.
CLAUDE.md(the agent instructions of the process can come fromskein agents), the workspace skills, the Roadmap project’s readme and the agent plugin’s skill describe the process.
The website is not part of these steps. How cesiumlang.org takes the specification from skein render is settled with whoever is rebuilding the site, in cesiumlang/cesium-workspace#34, before step 4 moves the specification.