Skip to content

specs: normalise front matter and rename folders to number and shortname - #31

Merged
phipsae merged 3 commits into
mainfrom
specs/normalize-front-matter
Sep 17, 2026
Merged

phipsae merged 3 commits into
mainfrom
specs/normalize-front-matter

Conversation

@phipsae

@phipsae phipsae commented Sep 14, 2026 •

Copy link
Copy Markdown
Collaborator

Second of three pull requests implementing #29. Based on #30, so review that one first. The diff shown here is only this change.

Puts the five existing specs on the schema #30 defines, retires 1/COSS now that process/ replaces it, and renames their folders from a bare number to the number plus the spec's shortname in lowercase, specs/3-semaphore-v4/, so listings are readable. No spec text is rewritten, apart from spec 5's one-sentence pointer. The bare-number folders stay as one-line pointers so links made before the rename keep resolving.

Metadata assigned

# Spec role type status domains
1 COSS hosted process deprecated none
2 Anon Aadhaar v2 hosted protocol draft prove
3 Semaphore v4 hosted protocol draft read, write, prove
4 Excubiae hosted protocol draft prove, delegate
5 ZK Proof of Personhood indexed protocol draft prove

Editors, please correct your own row. Two I am least sure about:

  • Excubiae as protocol. It specifies contracts others build against, which could also read as interface, but the framework behaviour argues for protocol. 0xjei
  • Semaphore carrying three domains. This is the case Meyanis95 raised on 14 September, that Semaphore is write when an identity joins a group, read when a leaf position is looked up, and prove on membership. Tagging all three is the point of the field, so nothing has to be split. vplasencia

Specs 2, 3 and 4 do not list 1/COSS in depends_on. They declare themselves governed by it, which is a governance link, not something they cannot be used without. The governed-by line in each spec's prose already says it, and this pull request repoints those lines.

1/COSS is retired

#30 adds process/, which defines how this repository works. 1/COSS already defines that, differently, so without this change two process documents would govern one repository.

1/COSS goes to status: deprecated with replaced_by: process/, which is the case process/front-matter.md names for the path form of that field. role stays hosted and every word of the text stays in place, so old links keep resolving and the specs written under it can still be read against it. A short note at the top of the file says the current rules live in process/, so a reader arriving from an old link is not misled.

The two differ on the lifecycle stages, on the evidence required to reach stable, and on editorial control. They agree on incremental numbering and on a functional change getting a new number rather than an edit, both of which process/ inherited from COSS rather than replacing.

This was open as its own pull request, #33. It is folded in here because this branch already migrates every spec's front matter and rewrites the same three governed-by lines, so keeping it apart made a reviewer read those lines twice.

Spec 5

Spec 5 is indexed rather than mirrored, because the file holds no copy of the spec, only a pointer. It carries index_reason: moved with upstream pointing at zkID, where the text was imported in May 2026, and status: draft, which is what the upstream calls itself in its own front matter (COSS raw, and #30 has no raw). Being a stub it has no contributors, and its editor is whoever keeps the link correct here rather than the people who wrote the text upstream. The text stays in zkID, where its authors and the implementation are.

Bugs found and fixed on the way

These are pre-existing and unrelated to #29, but they sit in the lines being touched anyway.

  • Spec 2's front matter never parsed. It sat below a ## Anon-Aadhaar spec raw heading, so GitHub rendered the YAML as body text and no tool could read it. It now starts the file, and the heading became a normal H1 carrying the spec's name.
  • Specs 2 and 4 declared slug: CS-02 and slug: CS-04 while their folders and titles said 2 and 4. Three different identifiers for two specs.
  • Specs 2, 3 and 4 nested - tags: inside contributors, which made every tag a contributor. Tags are now a top-level field.
  • Specs 3 and 4 wrote multi-word tags with spaces where the others used hyphens. All tags are now lower case with hyphens, as process: add repo process docs and rewrite README #30 states.
  • Spec 4 listed a literal ... as a contributor.
  • Two broken links to 1/COSS. Spec 3 pointed at github.com/zkspecs/zkspecs, which only resolves via redirect since the move to the ethereum org. Spec 1 pointed at itself as spec/1, a path that has never existed.

Checked

  • Every spec's front matter parses as YAML and carries every required field with an allowed value.
  • Every relative link in the repository resolves after the renames, images included, verified by crawling all of README.md, process/ and specs/.
  • Each spec body is byte-identical to before apart from the link fixes, the two added headings, the governed-by line in specs 2, 3 and 4, and the note added at the top of 1/COSS.

Folder renames are git mv, so history follows the files.

🤖 Generated with Claude Code

@phipsae
phipsae force-pushed the specs/normalize-front-matter branch 2 times, most recently from 3269bdd to 1c2d51f Compare September 14, 2026 22:43
@phipsae
phipsae force-pushed the specs/normalize-front-matter branch 2 times, most recently from 18aa59c to 9725ae7 Compare September 16, 2026 20:40
@phipsae phipsae changed the title specs: normalise front matter and rename folders to number-slug specs: normalise front matter and rename folders to number and shortname Sep 16, 2026
phipsae added a commit that referenced this pull request Sep 16, 2026
Front matter becomes the only place spec metadata is written down.
scripts/build_registry.py writes registry.yaml and splices the README
table between markers, and --check fails if the committed output is
stale. CI runs the check on every pull request touching specs/, the
script or either generated file.

The same pass validates front matter. It rejects a folder that is not
number-slug, missing or unparseable front matter, a missing required
field, an id disagreeing with the folder or duplicated, a value outside
the allowed roles, types, statuses or domains, a mirrored or indexed
entry with no upstream, a depends_on or replaces naming a spec that does
not exist, a numeric replaced_by naming a spec that does not exist, and
an indexed entry whose index_reason is absent, not one of the two
allowed values, or not backed by the condition that value promises.

Run against the specs as #31 leaves them it reproduces the README table
byte for byte.
phipsae added a commit that referenced this pull request Sep 16, 2026
Front matter becomes the only place spec metadata is written down.
scripts/build_registry.py writes registry.yaml and splices the README
table between markers, and --check fails if the committed output is
stale. CI runs the check on every pull request touching specs/, the
script or either generated file.

The same pass validates front matter. It rejects a folder that is not
number-slug, missing or unparseable front matter, a missing required
field, an id disagreeing with the folder or duplicated, a value outside
the allowed roles, types, statuses or domains, a mirrored or indexed
entry with no upstream, a depends_on or replaces naming a spec that does
not exist, a numeric replaced_by naming a spec that does not exist, and
an indexed entry whose index_reason is absent, not one of the two
allowed values, or not backed by the condition that value promises.

Run against the specs as #31 leaves them it reproduces the README table
byte for byte.
phipsae added a commit that referenced this pull request Sep 16, 2026
Picks up the retirement folded into #31. The generated file now matches the specs again, so --check passes.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@phipsae
phipsae requested a review from Meyanis95 September 17, 2026 14:06

@Meyanis95 Meyanis95 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

phipsae and others added 3 commits September 17, 2026 13:49
The five existing specs go onto the schema #30 defines, and their folders
are renamed from a bare number to the number plus the spec's shortname in
lowercase. No spec text is rewritten, apart from spec 5's one-sentence
pointer.

Spec 5 is indexed rather than mirrored, because the file holds no copy of
the spec, only a pointer. It carries index_reason: moved with upstream
pointing at zkID, and status: draft, which is what the upstream calls
itself in its own front matter (COSS status: raw, and #30 has no raw).
Being a stub it has no contributors, and its editor is whoever keeps the
link correct here rather than the people who wrote the text upstream.

Specs 2, 3 and 4 do not list 1/COSS in depends_on. They declare
themselves governed by it, which is a governance link, not something
they cannot be used without. The governed-by line in each spec's prose
already says it, and #33 repoints those lines to process/.

The bare-number folders stay as one-line pointers so links made before
the rename keep resolving.

Pre-existing bugs fixed on the way, all in lines being touched anyway.
Spec 2's front matter sat below a heading so it never parsed. Specs 2 and
4 declared slug CS-02 and CS-04 against folders and titles saying 2 and 4.
Specs 2, 3 and 4 nested tags inside contributors, and specs 3 and 4
wrote multi-word tags with spaces where the others used hyphens. Spec 4 listed a literal
... as a contributor. Spec 3 linked to 1/COSS at the old zkspecs org and
spec 1 linked to itself at spec/1, a path that never existed.
#30 adds process/, which defines how this repository works. 1/COSS already defines that, differently, so two process documents govern one repository. This settles which one wins.

1/COSS goes to status: deprecated with replaced_by: process/ and gets a note at the top pointing at the current rules. Every word of the text stays in place, so links keep resolving and the specs written under it can still be read against it. Specs 2, 3 and 4 declared themselves governed by 1/COSS, so they now point at process/ while still naming COSS as what came before.

The two differ on the lifecycle stages, on the evidence required to reach stable, and on editorial control. They agree on incremental numbering and on a functional change getting a new number rather than an edit, both of which process/ inherited from COSS rather than replacing.

Folded in here rather than kept as its own pull request, because this branch already migrates every spec's front matter and rewrites the same three governed-by lines.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Same change as the previous commit, in the hand-kept index table that #32 later replaces with a generated one.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@phipsae
phipsae force-pushed the specs/normalize-front-matter branch from 3953b5e to c93ee42 Compare September 17, 2026 18:50
@phipsae
phipsae changed the base branch from process/repo-shell to main September 17, 2026 18:50
@phipsae
phipsae merged commit f2a1595 into main Sep 17, 2026
1 check passed
phipsae added a commit that referenced this pull request Sep 17, 2026
Front matter becomes the only place spec metadata is written down.
scripts/build_registry.py writes registry.yaml and splices the README
table between markers, and --check fails if the committed output is
stale. CI runs the check on every pull request touching specs/, the
script or either generated file.

The same pass validates front matter. It rejects a folder that is not
number-slug, missing or unparseable front matter, a missing required
field, an id disagreeing with the folder or duplicated, a value outside
the allowed roles, types, statuses or domains, a mirrored or indexed
entry with no upstream, a depends_on or replaces naming a spec that does
not exist, a numeric replaced_by naming a spec that does not exist, and
an indexed entry whose index_reason is absent, not one of the two
allowed values, or not backed by the condition that value promises.

Run against the specs as #31 leaves them it reproduces the README table
byte for byte.
phipsae added a commit that referenced this pull request Sep 17, 2026
Picks up the retirement folded into #31. The generated file now matches the specs again, so --check passes.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
phipsae added a commit that referenced this pull request Sep 17, 2026
* ci: generate registry.yaml and the README table from front matter

Front matter becomes the only place spec metadata is written down.
scripts/build_registry.py writes registry.yaml and splices the README
table between markers, and --check fails if the committed output is
stale. CI runs the check on every pull request touching specs/, the
script or either generated file.

The same pass validates front matter. It rejects a folder that is not
number-slug, missing or unparseable front matter, a missing required
field, an id disagreeing with the folder or duplicated, a value outside
the allowed roles, types, statuses or domains, a mirrored or indexed
entry with no upstream, a depends_on or replaces naming a spec that does
not exist, a numeric replaced_by naming a spec that does not exist, and
an indexed entry whose index_reason is absent, not one of the two
allowed values, or not backed by the condition that value promises.

Run against the specs as #31 leaves them it reproduces the README table
byte for byte.

* ci: regenerate registry.yaml with COSS deprecated

Picks up the retirement folded into #31. The generated file now matches the specs again, so --check passes.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants