docs: stable per-primitive anchors on trust levels and the schema reference - #330
docs: stable per-primitive anchors on trust levels and the schema reference#330imran-siddique wants to merge 1 commit into
Conversation
…erence Closes the prerequisite in #213. OpenCRE links into a stable anchor for one specific requirement and regenerates those links from its API in CI, so an anchor that shifts when a heading is reworded defeats the purpose. Convention: `trace-` prefix, then the primitive's own name, never the heading prose. Trust levels become `trace-l0`, `trace-l1`, `trace-l2`; schema fields become `trace-field-<name>`. Rewording a heading leaves the anchor untouched. The prefix leaves room for `cmcp-`, `ca2a-`, `am-`, `auc-` and `wcm-` in a cross-linked catalog without collisions. Every existing anchor is preserved as an explicit alias above its heading, so all 22 current deep links still resolve. The legacy slugs were measured by rendering the files before the change rather than derived, which is how the underscores in `data_class`, `tool_transcript` and `build_provenance` were kept. Verified with python-markdown using the `attr_list` and `toc` extensions the site config declares: 21 new ids render and every original anchor still resolves. Signed-off-by: Imran Siddique <45405841+imran-siddique@users.noreply.github.com> Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01X27MBo6tGVw1UmmchuGFnW
lywinged
left a comment
There was a problem hiding this comment.
Approved. Reviewed baac9b6. The anchor changes look good to merge.
I completed full MkDocs builds of the base and head locally using the documentation workflow’s assembly and configuration, with the documentation dependencies installed from the hash-pinned lockfile. The focused render comparison preserves all 22 existing IDs and adds 21 new IDs, with no duplicates or changes to the visible prose. The built pages also preserve the existing heading targets.
A near-miss check confirms the underscore caveat already described in the PR: a simple slugifier matches 19 of the 22 legacy heading IDs and breaks #data_class, #tool_transcript and #build_provenance. Please retain those exact aliases during future cleanup.
One non-blocking correction to the verification paragraph: “CI is the real check” does not describe a pre-merge check on this PR. The Docs workflow runs on a push to main or a manual dispatch, not on pull_request; the current 6 checks contain 5 successes and 1 skipped result, with no documentation build. The full local builds above supply that verification for this commit. Please distinguish that local evidence from the documentation CI that runs after merge.
Closes the prerequisite in #213, and proposes the convention there for the other five repos.
The scheme
trace-prefix, then the primitive's own name, never the heading prose.trace-l0trace-l1trace-l2trace-field-model`model`trace-field-build-provenance`build_provenance`Rewording "Level 1: hardware evidence" leaves
trace-l1untouched. That is the property OpenCRE's pitch rests on: it regenerates its links from its API in CI, so an anchor that tracks prose is an anchor that rots.Existing links are preserved
Every heading gets an explicit
<a id="old-slug"></a>above it, so all 22 current deep links still resolve.The old slugs were measured by rendering the files before the change rather than derived from a slugify function. That is how the underscores in
data_class,tool_transcriptandbuild_provenancesurvived:tocpreserves them and my first pass had stripped them.Verification
mkdocs buildaborts in my environment on three plugins that are not installed (llmstxt,minify,mkdocstrings), so this was checked withpython-markdownusing theattr_listandtocextensionsmkdocs.ymldeclares: 21 new ids render, and every original anchor still resolves in both files. CI is the real check.Scope
Two files, both named in #213. No prose changes, no heading text changes, no nav changes.