Cesium logo Cesium

Proposal P-0000: one documentation system

September 01, 2025

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 decision issues 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.

LayerHoldsWhereDecides anything?
CharterGoals, non-goals and design principles. Short and stable.docs/charter.md in cesiumlang/cesiumYes, through a proposal
ProposalsOne numbered document per design change.proposals/ in cesiumlang/cesiumYes: the only way something becomes decided
SpecificationThe normative rules, each with a stable ID.spec/ in cesiumlang/cesiumNo: it records what proposals decided
Conformance suiteValid and invalid programs, each citing the rules it checks.bootstrap/tests/ and later conformance/ in cesiumlang/cesiumNo
User documentation and compiler notesWhat is, for users and contributors.cesiumlang.orgNo

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:

StatusMeaning
draftBeing written. Not yet ready for a decision.
proposedReady. Waiting for emanspeaks.
acceptedDecided. The specification is updated to match.
rejectedDecided against. Kept for the record.
withdrawnDropped before a decision, by its author or by emanspeaks.
supersededReplaced 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:

StatusMeaning
draftWritten down, not yet accepted through a proposal. Guidance, not settled fact.
finalAccepted through a proposal.
deprecatedStill in force, and scheduled to go.
removedNo 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 decision issues (cesiumlang/cesium#4 to #11): each is rewritten as a proposal with the status proposed. 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, all draft.
  • The reference pages on cesiumlang.org: stay as user documentation. Where one states something that no rule states, that statement becomes a draft rule 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.

  1. 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.
  2. Rule categories: syntax, legality (what the compiler must reject), static (meaning fixed at compile time) and dynamic (behavior at run time), following the Ferrocene Language Specification.
  3. How skein is obtained. Not through the buildtools. Developers get it with the VS Code extension chasingdaylight.skein, which is to carry the skein program 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.
  4. Proposal numbers: four digits in order of filing; this proposal is P-0000, the bootstrap, P-0001 is the charter and the rest follow (emanspeaks, 2026-11-22).
  5. Who sets the status (emanspeaks, 2026-11-22): anyone, agents included, may set proposed; for now only emanspeaks sets accepted, rejected or superseded; the author or emanspeaks may set withdrawn. Skein can make it visible: the type proposal declares approval = ["accepted", "rejected"], so skein check reports a proposal with either status that has no approval of its current text, and skein approve --from-pull-request records 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.
  6. Later history of rules and proposals (accepted 2026-11-22): the link types changed-by (rule to the proposals that amended it) and superseded-by (proposal to its replacement), beside introduced-by, so a rule’s whole history is a trace.
  7. Examples in the specification (accepted 2026-11-22): tested examples (%example, categories accepts and rejects) are part of the conformance suite, as described above, and the langspec template of skein is the starting point of .skein/.

After acceptance

In this order, each as its own pull request:

  1. .skein/ in cesiumlang/cesium (from skein init --template langspec) with the item types proposal, rule, example and term, the rule statuses draft, final, deprecated and removed (removed the tombstone), the link types introduced-by, changed-by and superseded-by, and a citation set for the tests; skein check in CI.
  2. P-0001, the charter, from the goals on cesiumlang.org and the 2025 design.
  3. The decision issues as proposals P-0002 onward.
  4. The specification in spec/ with rule IDs, lexical structure and the S0 grammar first.
  5. Citations in the bootstrap tests, and the coverage report in CI.
  6. CLAUDE.md (the agent instructions of the process can come from skein 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.

Cesium 0.2.0, in development (dev at 53dc38a) · GitHub