Repository navigation
Description
Relocated from dezren39/darwin-nix#151 on 2026-10-28 (placement audit): mcpx's single source lives in developing-today/code (pkgs/mcpx); re-home tracked at #309. Original body below; issue references inside it are historical (dezren39/nix numbering).
Parent: #98
Summary
Build what #150 decides:
- the metadata format;
- migration of the existing
docs/story.mdkey blocks; - a preprocessor that renders release markers and nested, closed-by-default
<details>histories; - the release-workflow step that stamps versions;
- the CI check that a changed section has an entry;
- updates to
docs/release-runbook.md.
The steps below assume #150's recommended Approach C (explicit section IDs + since/changed metadata + one change fragment per PR + release stamping + git as a check). If #150 lands differently, re-cut this issue.
Original notes
- documentation
- make a book using whatever is the most common and simple modern choice
- 3 main things, not book sections jsut like levels of detail-
- the compendium
- new sections marked with release version during release.yaml?
- edits start a 'history' openable that is just a sideways triangle out of the way, basically hierarchical updates, md para new version/date->bubbles up through h5 h3 h2 root document version history
Current state
- Metadata that exists. Key blocks in fenced code blocks directly under h2 entries: 59 in
docs/story.md, format indocs/release-runbook.md("Entry format"). Trailing RFC 3339 timestamp per top-level entry. Some h3 sub-sections carry their own trailing timestamp. Document-level key blocks under the h1 in five other docs, and 34 status-only blocks inproposals.md(🎨 Palette: Add ARIA labels and live regions to search panel #150). - Missing pieces.
- No version appears anywhere in the docs.
- Headings have no explicit IDs.
- There is no release pipeline: no tags, no releases, no
release.yaml, and the version is hard-coded0.1.0(package.nix:19,:61). - There is no docs build (chore(deps): update rust crate actix-files to v0.6.10 - autoclosed #117, fix(deps): update github.com/charmbracelet/ssh digest to ebfa259 - autoclosed #118).
- Existing constraints.
README.mdmust stay a symlink todocs/story.md(runbook "Checks":test -L README.md && readlink README.md), so any markup added tostory.mdmust also read well on GitHub.internal/settings/docs_test.go:20and:53read../../docs/configuration.mddirectly.- A workflow already commits back to a branch:
.github/workflows/mcpx.ymlrepairsvendorHashand pushes. That is the precedent for a workflow that edits files and commits.
- Build.
package.nixbuilds onlysubPackages = [ "cmd/mcpx" ](package.nix:56). A new Go main elsewhere underpkgs/mcpxwould not ship in the mcpx binary unless it is added there.
Steps
-
Freeze section IDs. For every heading in the documents docs(id): design plan, research, and n0 relay default #152 puts in scope, record today's slug as the explicit ID, so no existing link breaks. Use heading-attribute syntax if chore(deps): update rust crate actix-files to v0.6.10 - autoclosed #117's generator supports it; otherwise an
id:key in the key block or<a id>before the heading. GitHub renders{#id}literally, so forstory.md(shown as the README) theid:key or<a id>form may be the better choice. Decide in step 2. -
Write down the metadata format. It goes in
release-runbook.mdnext to "Entry format":- key-block additions
id,since,changed; - the compact comment form for headings without a key block (
<!-- id: pools-lifetime since: 0.2.0 -->); - the fragment file format (
docs/changes/<slug>.md:sections,kindfrom Keep a Changelog,summary); - the trivial-edit marker (
docs:triviallabel orDocs-Trivial: yes).
- key-block additions
-
Migrate
story.md. A one-off script, reviewed as a normal diff:- add
idandsinceto all 59 key blocks, using0.1.0or the sentinel 🎨 Palette: Add ARIA labels and live regions to search panel #150 picks; - add compact markers to h3 sub-sections that have trailing timestamps;
- leave
created,last-updatedand trailing timestamps as they are; - resolve
incrementper 🎨 Palette: Add ARIA labels and live regions to search panel #150 (keep, derive or retire).
Other docs: some have no key blocks (
exec.md,consumer.md,configuration.md, ...), but five open with a document-level block (protocol.md,elicitation.md,plugin-discovery.md,opencode-plugin.md,container.md; the last three lack the requiredincrement/description) andproposals.mdhas 34 status-only blocks. Several of these statuses are outside the runbook's list (🎨 Palette: Add ARIA labels and live regions to search panel #150, "Key blocks outsidestory.md"). The migration normalises those per 🎨 Palette: Add ARIA labels and live regions to search panel #150's open question 10. All other docs get IDs at migration andsincemetadata the first time they are touched, or all at once. See the open questions. - add
-
The preprocessor. A small Go program. The repository's code is Go, it runs under
go test, and it can serve as an mdBook-style external preprocessor (book JSON on stdin, book on stdout) or be wrapped by whatever hook chore(deps): update rust crate actix-files to v0.6.10 - autoclosed #117 chooses. Responsibilities:- Parse headings and skip fenced code. The key blocks are themselves unlabelled fenced blocks, so recognise "a fence directly under a heading (or under the h1 and its lede, for document-level blocks) whose first line is
created:orstatus:" as metadata, not as a code sample.proposals.md's blocks start withstatus:. - Build the heading tree per page, attach
sinceandchanged, and compute the bubble-up per 🎨 Palette: Add ARIA labels and live regions to search panel #150's summarisation rule. - Emit the release marker (a badge or a line under the heading) and one
<details><summary>History -- N changes, latest X (date)</summary>per heading that has history. Leave a blank line after<summary>so the contents parse as markdown. Omit the disclosure where there is no history (note 86: edits start the history). - Emit the page-root document history, and the book-root history if 🎨 Palette: Add ARIA labels and live regions to search panel #150 decides on one.
- Decide how the key block itself renders. Today it is a raw code block in the published output. Options: leave it, reduce it to a status/since line, or hide it.
- Render the agent twin per Update module github.com/jackc/pgx/v5 to v5.9.2 [SECURITY] #120: no disclosures, one
since/statusline per section, a link to the history page.
- Parse headings and skip fenced code. The key blocks are themselves unlabelled fenced blocks, so recognise "a fence directly under a heading (or under the h1 and its lede, for document-level blocks) whose first line is
-
stampsubcommand. Run by the release workflow:- replace
since: unreleasedwith the version; - fold fragments into each named section's
changed:list with version and date, then delete the fragments; - write the root/changelog section.
It is idempotent and fails if a fragment names an unknown section ID.
- replace
-
checksubcommand. Run in CI on PRs. It maps the PR's diff hunks onto section ranges and fails when a section's prose changed with no fragment naming it and no trivial marker. It also fails on a duplicate ID, a fragment naming an unknown ID, or asincethat is neitherunreleasednor a known version. Docs checks run in CI; see the testing trackers under Bump github/codeql-action from 2 to 3 #91 (CI pipeline Bump golang.org/x/crypto from 0.16.0 to 0.17.0 in /sources/launcher #95, integration/environments Bump golang.org/x/crypto from 0.14.0 to 0.17.0 in /sources/chat #97). -
Release step in amd host fails at evaluation: no outputHashes for p2panda-core-0.7.1 #158.
- Order: stamp -> commit -> tag that commit -> build -> publish, so the tagged tree contains the stamped docs.
- amd host fails at evaluation: no outputHashes for p2panda-core-0.7.1 #158 recommends GoReleaser run by
release.yamlon a tag push. If stamping ran inside that tag-triggered job, the tag would point at an unstamped tree. The fix is to split the release in two:- a small "cut release"
workflow_dispatchjob with aversioninput runsstamp, commits, and pushes the tag; - the tag push then triggers
release.yaml/ GoReleaser unchanged.
- a small "cut release"
- The stamping commit goes to
mainthe waymcpx.yml's vendorHash repair already pushes, or through a PR if branch protection forbids direct pushes.
-
Update
docs/release-runbook.md.- Per-commit: add "add a change fragment naming the section IDs you changed, or mark the PR trivial".
- Per-release: step 1 ("Confirm every entry touched since the last release has a current
last-updatedand a bumpedincrement") is replaced by thecheckstep; step 4 also setssince; add "runstamp" before tagging. - Entry format: document
id,since,changedand the compact form. - Checks: add the
checkcommand.
Approaches (where the tool lives)
The design choice belongs to #150. The one implementation choice left is where the renderer lives.
- A -- inline script in the workflow (least recommended). awk or shell over the markdown inside
release.yamland the Pages workflow. Nothing to package, but it is untestable, it duplicates the parser between render, stamp and check, and it cannot run locally before a push. - B -- a generator-native plugin. A Rust mdBook preprocessor crate, or a Python MkDocs plugin. It integrates tightly and uses the generator's own markdown parser. But it ties the history to one generator: if chore(deps): update rust crate actix-files to v0.6.10 - autoclosed #117 changes, the history is rewritten. It also adds a second language to a Go repository, and the stamp and check commands would still be needed outside the generator.
- C -- one standalone Go program with
render,stampandcheck(recommended). It lives beside mcpx (for example underpkgs/mcpx/tools/docs-history/) with its owngo testsuite. It is exposed to the generator through the generator's external-command hook. A single parser serves all three jobs, so render, stamp and check cannot disagree. It is independent of the generator choice and runs locally. It stays out of the shipped binary unless added tosubPackages, which it should not be.
Open questions
- Heading-ID syntax that works both in the generator and on GitHub (
story.mdis the README). Is it{#id}or<a id>? - Do docs without key blocks get
sincemetadata all at once at migration, or lazily on first edit? - How should the key block render in the published book?
- Does the stamping commit push to
maindirectly or open a PR? - Does the
checkrun on every PR touchingpkgs/mcpx/docs/**only, or on every file in docs(id): design plan, research, and n0 relay default #152's scope, including root-levelASSESSMENT.md,OPENCODE-V2.mdandAGENTS.md?
Ease · Impact · Related
Ease L · Impact med · Depends on / related: #150 (design), #117 (generator hook), #158 (release workflow), #118 (build and deploy), #120 (agent twin), #152 (scope of documents), #49 (CI for every package).
Security/auth deferred; see tracker.
Activity
developing-today commentedon Oct 28, 2026
CODE-792
dezren39 commentedon Oct 28, 2026
History carried over from dezren39/darwin-nix#151 (verbatim, oldest first):
@dezren39 · 2026-09-30T07:20:39Z
Integration pass. Placed in the DAG rooted at #181.
@dezren39 · 2026-09-30T11:49:17Z
Issues pass (2026-09-30, at 05c78b2).
protocol.md,exec.md,elicitation.md, ...) have no key blocks".protocol.mdandelicitation.mddo, as doplugin-discovery.md,opencode-plugin.mdandcontainer.md, andproposals.mdhas 34 status-only blocks (see 🎨 Palette: Add ARIA labels and live regions to search panel #150). The migration now normalises them.status:. Otherwiseproposals.md's blocks would render as code samples.dezren39 commentedon Oct 29, 2026
🤖 Agent note · cross-reference from #1863 triage (queue task 2751, 2026-10-29)
since:keys;docs/changes/does not exist; version still hard-coded0.1.0. The release-stamping half is gated on mcpx: release.yaml, release artifacts and the install channels the docs will promise #1881 (release.yaml); the metadata/fragment/CI-check half is not. First job: settle mcpx docs: release-version markers and a hierarchical, collapsible section history #1863's open questions 4–6 and 10 with the design's stated preferences as defaults.dezren39 commentedon Oct 29, 2026
🤖 Agent note · picked up
dezren39 commentedon Oct 29, 2026
🤖 Agent note · done — triage verdict: scope CONFIRMED; design #1863's forwarded questions SETTLED below with reasons; ungated core routed as queue task 3081, release wiring recorded as SET-REMAINDER gated on #1881
82b019a0): as the issue states, with one number updated — story.md key blocks are 64, not 59 (counted in task 2751's pass); still zerosince:keys, nodocs/changes/, version hard-coded0.1.0. The issue's constraints all verified as still true (README symlink,subPackages = [cmd/mcpx], mcpx.yml commit-back precedent).docs/changes/<slug>.mdper PR (sections / kind / summary), per the design's recommendation; the concurrent-lanes argument has only strengthened since.increment: RETIRED. The migration already touches every key block to addid/since; keeping a counter the runbook itself calls inexact beside an exactchanged:list preserves exactly the drift pattern this design exists to kill. The runbook update removes it and its per-release step.since: pre-release. No release has ever shipped or been tagged; stamping0.1.0would assert a release that never happened. The first real release's stamp pass foldspre-releaseentries.shipped/implemented/rejected(real closed-proposal states the docs already use) to the runbook list; free-text statuses (e.g.audited 2026-09-29, …) normalise to a listed status plus anote:key at migration.id:key / compact comment form, per step 1's own reasoning — GitHub renders{#id}literally and story.md is the README.hidden_files/packet-1865-fix.json).renderinto the site generator's hook once mcpx docs: choose the site generator (mdBook, MkDocs Material, Docusaurus, Starlight, Hugo) #1939 settles the generator.130 remaining items
dezren39 commentedon Nov 4, 2026
🤖 Agent note · handed off
dezren39 commentedon Nov 4, 2026
🤖 Agent note · bound
dezren39 commentedon Nov 4, 2026
agent-note:v1
state: picked-up (resume)
queue: repo-health-code-pilot
task: 7938 (small_fix, worker repo-worker-code, lane 262eb403-3347-4a7c-ba6b-e7bc263ca853)
by: openchamber-scheduled-lane
at: 2026-11-04T04:18Z
Resumed task 7938 from the CI-wait handoff. Fresh issue state: #1865 OPEN; PR #5208 is the linked implementation for this task and remains OPEN. Checks are green on head
fdf2498; the PR author isdezren39(repo owner), so I will not modify, respond on, or merge this PR under the no-touch rule for owner-owned PRs. I’m routing the remaining review/merge decision to the owner rather than duplicating the implementation.dezren39 commentedon Nov 4, 2026
agent-note:v1
state: blocked (escalated to owner)
queue: repo-health-code-pilot
task: 7938 (small_fix, worker repo-worker-code, lane 262eb403-3347-4a7c-ba6b-e7bc263ca853)
by: openchamber-scheduled-lane
at: 2026-11-04T04:19Z
The implementation PR #5208 is already open on head
fdf249866cff0fa4baf23f844278f2a1ece59d45; fresh checks are green and the PR still has one unresolved review item. The PR is authored bydezren39(repo owner). Per the no-touch rule for Drew-owned PRs, this lane will not inspect or modify its diff/review threads, reply, or merge. Escalating the remaining review disposition and merge decision to the owner; task is blocked until the owner handles the PR. Resume by revalidating PR #5208 and completing the queue task after the owner’s disposition. Existing branch:queue/7938-1865-docs-history-render; no worktree was created in this resume.