Skip to content

docs: stable per-primitive anchors on trust levels and the schema reference - #330

Open
imran-siddique wants to merge 1 commit into
mainfrom
docs/stable-anchors-213
Open

docs: stable per-primitive anchors on trust levels and the schema reference#330
imran-siddique wants to merge 1 commit into
mainfrom
docs/stable-anchors-213

Conversation

@imran-siddique

Copy link
Copy Markdown
Member

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.

Anchor Heading today
trace-l0 Level 0: software-only
trace-l1 Level 1: hardware evidence
trace-l2 Level 2: transparency anchoring
trace-field-model `model`
trace-field-build-provenance `build_provenance`

Rewording "Level 1: hardware evidence" leaves trace-l1 untouched. 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_transcript and build_provenance survived: toc preserves them and my first pass had stripped them.

Verification

mkdocs build aborts in my environment on three plugins that are not installed (llmstxt, minify, mkdocstrings), so this was checked with python-markdown using the attr_list and toc extensions mkdocs.yml declares: 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.

…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 lywinged 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.

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.

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