Repository navigation
ultraplan: a data-first tech tree of Mathesis, with ten advisors - #123
Merged
hyperpolymath merged 43 commits intoNov 25, 2026
Merged
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The owner asked for an ultraplan shaped like a civilisation tech tree ("writing enables this"), steered by advisors, with light graphics. These choices were made through the selector on 2026-11-24:
just check.meadvisor, on which the privacy claim rests.MPSCI and GELO: an owner clarification and naming of 2026-11-25.
maths-panelnode, now "Visual proof space", is open.maths-panel; 682d6f4 applies the naming. The estate coordinator, the feed-panel contract thread and the decision desk were told of the clarification the same day.Owner rulings of 2026-11-25, through the selector, and where each landed.
:status: ACCEPTED. The reader lives inscripts/decisions/adr-status.mjs, andjust adr-checkkeeps every record in step.tree
The tree at head 0d20d1a: 52 nodes.
What the tree holds:
maths-panel) joined the frontier when the owner settled its host.The council's picks, derived from the data, never typed:
Changes
docs/ultraplan/: the source data and its guide.tree.jsonlholds the nodes. Their needs are the edges.advisors.jsonlholds the council.expeditions.jsonlholds the return tickets.All three are JCS JSON Lines.
README.adocexplains how to read the tree and how to grow it. It states:Its "estate panel" section records the MPSCI and GELO clarification.
The generated views are
generated/ultraplan.adocandgenerated/tree.svg.scripts/ultraplan/ultraplan.mjs(Bun, plain JS), withbuildandcheck.It derives the eras, the frontier, free active slots, unlocks, forks, confluences, picks, and the owner's tagged frontier (unranked).
Its checks are data. A rule is
[holds, message], kept in three tables (advisors, nodes, return tickets) and exported asRULES.Every text is plain (8f1b761).
text()writes each ASCII punctuation mark in a data text as a numeric character reference, which Asciidoctor shows as the mark and never reads as markup. Every data text on the page goes through it, in headings, table cells, link texts and list items alike. It replaces three earlier guards: the{empty}prefix, the description-list-marker refusal, and the link-text escape. Links to nodes are thexref:id[text]macro.It reads only files git tracks (682d6f4, replacing the containment of 2538608):
scripts/repo/files.mjs: a file git tracks, at its own path, with no link along it; nothing untracked, nothing in.git. That covers evidence, the ADR, the registry view, refs and the three sources. A clone and a linked worktree read the same. A tracked link, even one that stays inside the repository, is refused.staleViewsandwriteViews, which the command line uses, never read or write through a link: not to a file outside, not to one inside, not to nothing yet, and not under a directory that leads outside.Refs are checked (7eac1c2). Each ref is an object, and none types a line number:
{"at","path"}: a passage of one line that must occur exactly once in a file of this repository, overlaps counted. A reworded, moved or repeated passage failsjust check;{"path"}: a file here, or a directory holding one, which git must track;{"at","commit","path","repo"}: a file of another repository at a full commit, whose content cannot drift (not checked here);{"issue"}: a GitHub issue or pull request.Every OWNER/REPO, in a ref, an issue or a
where, is a GitHub repository by GitHub's own naming rule (6d96935):../..and the like are refused.It refuses all of the following:
isDocPath.:status: ACCEPTEDand its Status section agrees (cb15753). The refusal names which part fails: no header status, out of step, or a status other than ACCEPTED.isClaimId, exported fromscripts/registry/claims-registry.mjs. Evidence accepts every id the registry accepts (o/r#N-7.1ando/r#THY-1-Aincluded), and only those.NNNN-template.adocis set aside.min_pwgis accepted on claim evidence only.me;meadvisor, ameadvisor that is not private, and private on any other advisor;wherethat is notestate:orupstream:and a GitHub repository by GitHub's rule;scripts/decisions/adr-status.mjs(new, cb15753): the status of a decision record, read soundly.headerStatusreads the header strictly:status, in any letter case, inside the header (fa1c8d4: Asciidoctor reads:Status:as:status:);{set:...},{counter:...},{counter2:...}), appears anywhere. A counter turns ACCEPTED into ACCEPTEE (6d96935);sectionStatusis the over-counting Status-section reader (7eac1c2, f8fa199), moved here; it returns the section's opening word.adrAcceptedneeds both to say ACCEPTED.checkfails when a record's header and section disagree, or only one states a status, and lists a record that states neither. It reads the records git tracks, each at its own path, and fails whendocs/decisionsis a link (6d96935). Only a record that states no status at all (no entry, no{set:}/{counter:}naming status, no directive, no heading that could read Status) is listed as unset; any other record the readers refuse fails (76963ba).docs/decisions/::status: ACCEPTED, and 0005 holds:status: PROPOSED, each as its Status section already said.0000-template.adocholds:status: PROPOSED.README.adocsets out the rules.scripts/repo/files.mjs(new, 682d6f4): what a generator may read. A file git tracks, at its own path, with no link along it; and, for the views, a plain file inside the checkout. The ultraplan, the site andadr-checkread through it.scripts/repo/github.mjs(new, 6d96935): one OWNER/REPO rule, GitHub's own: a login of single hyphens (8688510), then a repository name that is not dots alone. The census, the claims registry, engineering receipts and the ultraplan each had a pattern that let../..through. A github.com link made from it resolves to another page, and the registry also clones by that name. All of them use the rule now, and every name in the current data passes it.scripts/registry/claims-registry.mjsexportsCLAIM_REPO(now the GitHub rule),CLAIM_NAME,isClaimIdandisDocPath. Everything the view puts in a link survives the view:],|,#and white space cannot occur.status_docis a relative path of the same characters with/between its parts, none.or...validate()checks both, folded into its existing lines, so its complexity stays as on main. All 54 claims and all three status paths already fit, so the registry view is unchanged.tests/ultraplan/ultraplan.test.mjs: 33 tests;tests/decisions/adr-status.test.mjs: 10 tests;tests/site/site.test.mjs: 11 tests (3 new);tests/repo/: 8 tests, new;assets, which the site copies to the same path. The tree's image therefore stays relative and is link-checked./, a view could include any file on the system; a probe with a marker file confirmed it. Now aninclude::becomes a link, which the link check refuses. With-a linkcss!the site is otherwise byte-identical (diff -rof both builds).ultraplan,ultraplan-check,adr-checkandrepo-files-testrecipes.ultraplan-checkdepends onregistry-check, because claim evidence is read from the registry view.check-viewsincludes all four and runsregistry-checkonce.site-checknow depends onsite-test. Before, no CI job ran the site tests.Found while building the tree; recorded as nodes, not fixed here:
Departures, labelled.
\|. That escape is gone: since 8f1b761 a|in a text is a character reference, like every other punctuation mark.ACCEPTED), while the Status sections keep their prose ("Accepted (ratified …)"). The in-step check compares the first word, ignoring case.Beyond this repository.
scripts/ijson-jcs-cli.jsruns its command when imported, so its I-JSON checks cannot be reused, and the generator keeps a matching check. Exporting the checks, with the command guarded byimport.meta.main, would be a change to the template (rsr-template-repo).:status:in its 0001 template. Its 0000 template, the in-step rule andadr-status.mjscould be adopted there, so every repository's ADRs are read the same way.just adr-checklists it. Setting it is the owner's.RSR Quality Checklist
Required
bun test tests/: 194 pass across 13 files;just check-viewsandjust site-check(which runssite-test, then builds 9 pages), each exit 0;check-proofswas not run here, because no proof file changed.scripts/check-ijson-jcs.sh --enforcereports 26 of 26 files canonical at fa1c8d4.scripts/check-adoc-renders.shpasses at fa1c8d4: all 182 tracked.adocfiles render clean under Asciidoctor--failure-level WARN.xmllint --noout, earlier head; no later commit changes its form).eslint-plugin-sonarjs1.x (cognitive complexity ≤ 15, no nested template literals) reports nothing at fa1c8d4 on the code this PR adds or changes: the generator, the three new modules, the site builder's changes and their tests. Its one finding ischeckLinksinscripts/site/site.mjs, at 18, which is unchanged from main.validate()at 54 and one other function at 16.unsafeblocks. Not applicable.As Applicable
docs/status/ROADMAP.adocupdated.docs/ultraplan/README.adocanddocs/decisions/README.adoc.CHANGELOG.adocupdated.Testing
Fixture tests. One case each for derivation, determinism, and every refusal above.
Every rule has a witness. For each of the 33 rules in the three tables, a test breaks the fixture so that it violates the rule, and expects that table's refusal with the rule's message. Messages are unique within each table, so (table, message) identifies a rule. If any rule has no witness, the test fails.
Mutation controls.
scripts/decisions/adr-status.mjs, and 2 ofisDocPathin the registry, run against both suites.files.mjs, 8 of 8 ingithub.mjs, 4 of 5 in the site, 20 of 20 in the generator, and 7 of 7 in the ADR reader. The sweeps overfiles.mjsand the generator were re-run after fa1c8d4's refactors, with the same result. The two survivors are equivalent. Without.filter(Boolean)the empty entry is never observable, becauseat('')is null. The other drops PATH filtering thatfindProgramalready does andtests/repocovers.files.mjsreported 22 of 22. That was wrong:ASCIIDOCTORwas unset, so a site test failed on every mutant. The sweeps above ran from a passing baseline.What the mutants cover:
Two notes:
include::in the body now tests it on its own, since an included file could set the status.Plain text against Asciidoctor 2.0.26 (8f1b761).
The ADR header reader against Asciidoctor 2.0.26 (cb15753).
docs/decisionsit reads exactly what Asciidoctor reads.The ADR section reader against Asciidoctor 2.0.26.
Differential fuzz for the refactor. The old and new code ran on 4000 mutated copies of the real data. 3840 gave identical output, views or refusals. Each of the other 160 had a list field that was not a list, or a
wherethat was not a string. The new code refuses each with its message.Probes before fixes. Each was checked before the code changed:
o/r#A]B;/dev/null, an overlapping quote and an evidence path holding a backtick (2538608);include::of an outside file through the site build in safe mode (682d6f4);{counter:status}and{counter2:status}in an accepted ADR, through Asciidoctor's Ruby API (6d96935).Rendering. I rendered the SVG, arrowheads included, and the built site page in Chromium and checked them by eye, at an earlier head.
Reviews. Every Codex, CodeRabbit and SonarCloud finding was checked against the code, and each was fixed or answered.
../..as OWNER/REPO, counter references) are fixed in 6d96935.adr-checkas unset) is fixed in 76963ba...path read outside the checkout throughlocal, and leverage counted nodes below a dropped node) are fixed in 9d4b1e8.\b, so "Acceptedé" read as Accepted) is fixed in 0d20d1a.CI.
gate-pr, and the proven suite's verdict at fa1c8d4) failed for that reason only. ba016e7: every check passed, the Guix proof run (Agda, Rocq and Lean) andgate-princluded;CI/gateis success. 0d20d1a: every check passed, the Guix proof run (Agda, Rocq and Lean) and the proven suite included, andCI/gateis success (all 13 required checks).gate-prneeded its one re-run: on the first attempt a GitHub API poll came back empty while it waited ("unexpected end of JSON input"), so it gave no verdict. The re-run passed. Codex could not review 0d20d1a because its usage limit was reached.Not done: the feed.
https://claude.ai/code/session_01J4QvDfdGcZ6qgY7JabLsEi
Generated by Claude Code