Skip to content

Slim agent docs and ADRs - #282

Merged
simpros merged 11 commits into
mainfrom
chore/lean-agent-docs
Oct 29, 2026
Merged

simpros merged 11 commits into
mainfrom
chore/lean-agent-docs

Conversation

@simpros

@simpros simpros commented Oct 29, 2026

Copy link
Copy Markdown
Owner

Why the change

The agent-facing docs had grown far past what agents need, so this cuts them down to a small AGENTS.md, one code-style file and only the hard-to-reverse ADRs.

Special things to note

  • Five ADRs are deleted (preview.env names, label ownership, agent-first docs, DB roles, none provider); the none provider decision is folded into the providers ADR. Detail is in git history, behaviour is documented in docs/previews.md.
  • The remaining ADRs are renumbered 0001–0008. Nothing in code referenced the old numbers except one test name, now fixed.
  • Other vendored skills still mention /setup-matt-pocock-skills and docs/agents/* on purpose; they were left unchanged.

Change outline

Docs layout, before and after:

 AGENTS.md                      80 -> 41 lines
+CODE-STYLE.md                  style + comment rules
 CONTEXT.md                     unchanged (one stale line removed)
-docs/agents/*                  5 files, folded into AGENTS.md / CODE-STYLE.md
-docs/adr/README.md
 docs/adr/
   0001 one-process-two-modules
   0002 shared-logical-databases
-  0003 seed-as-user-image
+  0003 ci-driven-lifecycle-no-webhooks   (was 0004)
+  0004 self-made-bearer-tokens           (was 0005)
+  0005 seed-as-user-image                (was 0003)
   0006 sprout-durable-identity           (trimmed)
+  0007 preview-db-providers              (was 0008, absorbs none)
+  0008 preview-access-gate               (was 0013, trimmed)
-  0007, 0009, 0010, 0011, 0012
-.agents/skills/setup-matt-pocock-skills

Fold docs/agents into AGENTS.md and a new CODE-STYLE.md, cut ADRs from
13 to 8 renumbered, drop the setup-matt-pocock-skills skill.
@simpros

simpros commented Oct 29, 2026

Copy link
Copy Markdown
Owner Author

🧊 Thermo-nuclear review (round 1) — REQUESTCHANGES · 878f766e

  • Findings
    1. Deleting docs/agents/issue-tracker.md and the setup-matt-pocock-skills skill dead-ends five vendored skills (blocker)
    1. ADR identifiers are being rotated and recycled (blocker)
    1. docs/adr/README.md was the index that AGENTS.md promises; deleting it leaves the decision log unnavigable
    1. The new CODE-STYLE.md states a comment rule that this codebase's own load-bearing comments violate
  • Residual risks
  • Unverifiable from here
Full report (click to expand)

VERDICT: REQUEST CHANGES

HEAD verified: 878f766e842184a95007dd46addfe975eb7154a2 — reviewed as-is. Docs-only MR (no source changes beyond a test title); bun run docs:check passes on the new tree. But the MR deletes agent-facing files that still-vendored skills point at, and it mutates the identity of the decision log itself.

Findings

1. Deleting docs/agents/issue-tracker.md and the setup-matt-pocock-skills skill dead-ends five vendored skills (blocker)

.agents/skills/code-review/SKILL.md:13 — "If docs/agents/issue-tracker.md is missing, tell the user to run /setup-matt-pocock-skills". This MR deletes both halves of that sentence: the file (docs/agents/issue-tracker.md) and the entire .agents/skills/setup-matt-pocock-skills/ tree plus its skills-lock.json entry. Same dead pointer at .agents/skills/code-review/SKILL.md:29 ("fetched via the workflow in docs/agents/issue-tracker.md") and the escape hatch at .agents/skills/to-spec/SKILL.md:9, .agents/skills/to-tickets/SKILL.md:11,60, .agents/skills/triage/SKILL.md:43, .agents/skills/wayfinder/SKILL.md:25. An agent following those skills is now told to consult a file that does not exist, and then told to run a command that no longer exists — a two-step dead end in the primary agent workflow of the repo.

The same MR also drops the "Vendored skills" routing from AGENTS.md (documentation-writer for every docs/prose task, emil-design-eng for UI work, review-animations as the default-flagging motion reviewer). Those three skills remain vendored and locked; only the repo policy that says when to invoke them is gone, and it is not recoverable from the skills themselves.

Remedy (one file, six lines): add .agents/README.md — or a compact "Agent tooling" section in AGENTS.md — that does both jobs at once: list the vendored skills with their trigger, and state that any vendored reference to docs/agents/* or /setup-matt-pocock-skills resolves to "GitHub issues/PRs on simpros/sprout via gh; labels: the list in Conventions". That is smaller than the deleted docs/agents/ tree and closes every pointer the MR opened. Do not resurrect the directory; give the skills one canonical redirect instead of five broken ones.

2. ADR identifiers are being rotated and recycled (blocker)

git diff -M --summary shows three 100%-identical renames: 0004-ci-driven-lifecycle… → 0003-…, 0005-self-made-bearer-tokens… → 0004-…, 0003-seed-as-user-image… → 0005-…. Zero content change, pure renumbering. Then docs/adr/0007-preview-db-providers.md:1 takes the number that previously meant preview.env injection names, and docs/adr/0008-preview-access-gate.md:1 takes the number that previously meant preview database providers (access gate used to be 0013).

The problem is not aesthetics: ADR numbers are the only citation handle this repo has for its decisions, and they are cited outside the working tree — commit messages (1f67653 … (ADR-0006), 5607653), the merged PRs that introduced these very decisions (#238, #265, #268), and any review thread. After this MR, a historical "ADR-0007" or "ADR-0008" silently resolves to a different decision, and git log -- docs/adr/0012-* no longer finds the roles rationale by number. You have rewritten the primary keys of an append-only log to save three files.

Remedy: treat ADR numbers as immutable. (a) Revert the 0003/0004/0005 rotation — it buys nothing and breaks every referrer. (b) Put the consolidated provider decision at the next free number (0009-preview-db-providers.md) and leave 0007/0008 as one-paragraph "Superseded by ADR-0009" stubs for one release, or keep the merged file at 0007 but keep its original subject line and mark the body as an amendment of 0008/0009 — never reuse 0008 for unrelated content. (c) If you truly want the file count down now, delete the low-value ADRs outright (0010/0011 are defensible deletions: the label-collision invariant survives at apps/server/src/app-deployment/label-collisions.ts:18-23, and the docs-site rules survive in docs/site/adr-policy.ts) — deletion is honest, renumbering is not.

3. docs/adr/README.md was the index that AGENTS.md promises; deleting it leaves the decision log unnavigable

AGENTS.md:44 says "Decisions: docs/adr/ (only hard-to-reverse, hard-to-understand ones)". After docs/adr/README.md is deleted, nothing states that inclusion bar, nothing lists the eight surviving decisions with one-liners, and — most importantly — nothing records that 0007–0013 were folded or dropped and where their content actually lives now (docs/adopting-a-repo.md for the preview.env/db.roles contract, CONTEXT.md for the vocabulary, code docstrings for the invariants). A reader arriving at docs/adr/ cannot distinguish "this decision was never written down" from "this decision was deliberately dropped from the log". The README is 6 lines and does work no other file does; it also absorbs the supersession note that finding 2 needs.

Remedy: re-add docs/adr/README.md with three parts: the inclusion bar (one sentence), a table of the current ADRs, and a one-line history note ("0007–0013 folded into 0007/0008 or dropped when docs were slimmed; contract lives in docs/adopting-a-repo.md, invariants in code docstrings"). If the history note feels too long, that is the signal to keep the supersession stubs from finding 2 instead.

4. The new CODE-STYLE.md states a comment rule that this codebase's own load-bearing comments violate

CODE-STYLE.md:18: "One line, not a paragraph. A paragraph is a decision: put it in CONTEXT.md or an ADR." The MR then deletes the ADRs that were the home for exactly those paragraphs (roles/name-budget, label ownership, nullable db_name), and the reasoning survives precisely where the style doc says it must not: packages/preview-env/src/db.ts:176-181 (why one derivation rule, shared by CLI and gateway), apps/server/src/app-deployment/label-collisions.ts:18-23 (reserved set derived from the emission seam so it cannot drift), apps/server/src/preview-db/names.ts:8-12 (asymmetric name budget). The style doc and the ADR set now point at each other for the same content and neither holds it. CODE-STYLE.md:6 ("Fail fast at config load for required env vars") has the same defect — it states an absolute that ADR-0007 deliberately breaks (postgres config is validated at deploy time, not boot, because repos onboard dynamically), so the next contributor will "fix" the design to match the style guide.

Remedy: make the rule describe reality instead of an aspiration, in two lines: "Inline comments: one line, no restating. Module/function docstrings: one invariant, ≤3 lines" and qualify the env rule ("fail fast at the boundary that owns the value — boot for gateway-scope config, the deploy route for per-repo provider config"). A style doc that the best-commented modules in the repo already violate trains readers to ignore it.

Residual risks

  1. Skills fall off the tracker contract. Probe: run /code-review on a small local branch and watch whether it stops with "run /setup-matt-pocock-skills" (broken) or silently drops the Spec axis; rg 'issue-tracker\.md is missing' over session transcripts.
  2. A future change hard-codes the reserved Traefik label set now that ADR-0010 is gone. Probe: bun test apps/server/src/app-deployment/label-collisions.test.ts — "tls policy widens the reserved set on both seams" fails the moment the reserved keys stop coming from appRouting/gatewayLabelKeys.
  3. An amendment lands on the wrong ADR-0007/0008. Probe: git log --all -S"ADR-0008" --oneline and confirm each hit still names the decision the current 0008-preview-access-gate.md describes.
  4. db.roles derivation or the dual-mode name budget drifts after its ADR is deleted. Probe: bun test packages/preview-env/src/db.test.ts apps/server/src/preview-db and assert a dbName of length PG_IDENT_MAX is rejected in dual but accepted in single.
  5. Docs work stops going through documentation-writer. Probe: open the next docs PR and check whether it follows the page-type structure the skill enforces; rg 'documentation-writer' over recent agent transcripts returns nothing (already true outside skills-lock.json).

Unverifiable from here

I could not run the workspace test suite — this worktree has no node_modules (bun test docs/site/ fails resolving @tanstack/markdown), so only bun run docs:check was verified green; and I cannot see PR bodies or issue threads, so the number of inbound ADR citations is inferred from git history alone.


Automated agent review (opencode) · worktree /home/sim/.herdr/worktrees/sprout/mr-282 · subsequent rounds will reply in this thread.

Restore immutable ADR numbers (revert 0003/0004/0005 rotation; providers
back at 0008 with 0009 fold note; access gate back at 0013; 0007/0009/0012
as pointer stubs; 0010/0011 stay deleted), re-add docs/adr/README index,
add .agents/README tracker redirect for vendored skill pointers, and scope
CODE-STYLE comment/env rules to match the codebase.
@simpros

simpros commented Oct 29, 2026

Copy link
Copy Markdown
Owner Author

🧊 Thermo-nuclear review (round 2) — REQUESTCHANGES · e0fc0b74

  • Findings status
  • New findings
    1. CODE-STYLE.md:18 ships a numeric docstring budget the codebase already breaks 23 times — delete the number, not the docstrings (blocking)
    1. .agents/README.md:11-14 overclaims coverage: the redirect covers issue CRUD, not the wayfinding/triage/to-tickets contract it says it resolves
    1. docs/adr/README.md:22-24 — the 0011 history pointer names a helper that does not hold that decision (minor)
    1. .agents/README.md:9 duplicates AGENTS.md:41 word-for-word in policy (minor)
  • Residual risks
  • Unverifiable from here
Full report (click to expand)

VERDICT: REQUEST CHANGES

HEAD verified: e0fc0b7 — delta is 878f766..HEAD, 12 files, docs-only, and it is a direct response to the four findings (no rebase, merge, feature, or unrelated file; the only source change in the MR, apps/cli/src/worktree-db/env-file.test.ts, predates the delta). bun run docs:check green; bun test docs/site/ 87 pass / 0 fail.

Findings status

  1. Partially addressed. The redirect exists and is a single canonical one: .agents/README.md:11-14 ("any vendored reference to docs/agents/* or /setup-matt-pocock-skills resolves to GitHub issues/PRs on simpros/sprout via gh; labels: …"), pointer added at AGENTS.md:42 (- Agent tooling (vendored skill index, tracker redirect): .agents/README.md.), and the three deleted routings restored at .agents/README.md:6-8. Vendored skill bytes are untouched (skills-lock.json diff in the delta is empty), which is the right call. But the redirect restores only issue CRUD: .agents/skills/wayfinder/SKILL.md:25 still says "Consult the tracker doc's 'Wayfinding operations' section" — no such section exists anywhere now, and the 4-line redirect has no map/sub-issue/blocking/frontier expression; .agents/skills/triage/SKILL.md:11 reads a "PRs as a request surface" config flag that the redirect does not state; .agents/skills/to-tickets/SKILL.md:60 needs a publish/blocking-edge recipe. So the class of dead end is narrowed, not closed, for the three skills whose whole job is tracker-shaped writes.
  2. Addressed. Rotation reverted: git diff origin/main...HEAD lists none of docs/adr/000{3,4,5}-*.md, and HEAD now carries 0003-seed-as-user-image.md / 0004-ci-driven-lifecycle-no-webhooks.md / 0005-self-made-bearer-tokens.md byte-identical to main. 0013-preview-access-gate.md is back at its original number (delta R100 docs/adr/0008-preview-access-gate.md → 0013-preview-access-gate.md), 0008-preview-db-providers.md back at 0008 with its own subject, and 0007/0009/0012 restored as stub files whose titles match origin/main exactly (0007-preview-env-injection-names.md:1, 0009-preview-db-provider-none.md:1, 0012-preview-db-roles-opt-in.md:1). 0010/0011 deleted outright and recorded. Every number now resolves to the decision it meant on main.
  3. Addressed. docs/adr/README.md:3-5 (inclusion bar), :7-19 (table, links all resolve, gaps explained on the stub rows), :21-24 (history note naming where 0010/0011 content lives). docs:check validates the links.
  4. Partially addressed. The env line is fixed verbatim: CODE-STYLE.md:6 "Fail fast at the boundary that owns the value…". The comment line was changed to CODE-STYLE.md:18 — "Inline comments: one line. Module/function docstrings: one invariant, ≤3 lines." — which legalises multi-line docstrings in principle but pins a line budget this tree violates 23 times, including the two sites the last round named (packages/preview-env/src/db.ts:176, inner 4; apps/server/src/app-deployment/label-collisions.ts:18, inner 4) and worse (apps/server/src/preview/admission.ts:18, inner 11; apps/server/src/telemetry/traces.ts:22, inner 10; apps/server/src/sweep/reconcile.ts:270, inner 9). The doc is still contradicted by its own repo, now with a number a reviewer can quote while deleting load-bearing rationale.

New findings

1. CODE-STYLE.md:18 ships a numeric docstring budget the codebase already breaks 23 times — delete the number, not the docstrings (blocking)

CODE-STYLE.md:18: "Module/function docstrings: one invariant, ≤3 lines." Counting block comments whose body exceeds 3 lines across apps/**/*.ts + packages/**/*.ts gives 23 hits, and the failures are exactly the comments that carry the whys the same file says to keep (CODE-STYLE.md:16-17: "invariants, ordering/locking, observed external behaviour, security tradeoffs"). apps/server/src/app-deployment/label-collisions.ts:18-24 is 5 body lines saying one thing — the reserved sets are derived from the emission seam so they cannot drift. It is not a paragraph, it is the invariant.

Two lines above it, the guideline itself points the wrong way: CODE-STYLE.md:18 also says "Longer reasoning is a decision: put it in CONTEXT.md or an ADR", and this MR just deleted 0010/0011 and stubbed 0007/0009/0012 — so the docstring is the only remaining home. A reader who follows the doc literally will strip the rationale from the three modules the last round held up as best-in-class.

Remedy: drop the count and keep the shape — Module/function docstrings: one invariant, no headings or bullet lists. If you want a hard bound, use the one the tree already satisfies in spirit (state the invariant in ≤5 lines and move anything longer into CONTEXT.md), and fix the three or four genuinely over-long ones (apps/server/src/preview/admission.ts:18, apps/server/src/telemetry/traces.ts:22, apps/server/src/sweep/reconcile.ts:270) instead of declaring them all non-conforming. Do not "fix" db.ts/label-collisions.ts/names.ts.

2. .agents/README.md:11-14 overclaims coverage: the redirect covers issue CRUD, not the wayfinding/triage/to-tickets contract it says it resolves

"any vendored reference to docs/agents/* or /setup-matt-pocock-skills resolves to GitHub issues/PRs … via gh; labels: …" reads as total. The deleted issue-tracker-github.md carried three things this does not: the "PRs as a request surface: no" flag (read by .agents/skills/triage/SKILL.md:11), the publish recipe with blocking edges (.agents/skills/to-tickets/SKILL.md:60), and the "Wayfinding operations" section (map issue + sub-issues, blocked_by dependencies, frontier query, claim/resolve) explicitly demanded by .agents/skills/wayfinder/SKILL.md:25. The skills stay byte-identical by design, so the doc is the only place these can live.

Remedy — pick one, both are small:

  • Keep the skills: three added lines in .agents/README.md after line 14 — PRs as a request surface: no; Tickets: gh issue create, parent map = issue labelled wayfinder:map, child = sub-issue with "Part of #<map>", blocking = "Blocked by: #<n>" (or native dependencies), frontier = open unassigned unblocked children; Read/fetch/comment/close via gh issue view|comment|close.
  • Or delete the load: if that content is not worth carrying, drop wayfinder, to-tickets, and triage from .agents/skills/ and from skills-lock.json, leaving the redirect true by scoping it to docs/agents/issue-tracker.md only. A redirect that claims more than it delivers reproduces the original finding in a smaller font.

3. docs/adr/README.md:22-24 — the 0011 history pointer names a helper that does not hold that decision (minor)

docs/adr/README.md:22-24: "the docs-site rules in docs/site/adr-policy.ts". adr-policy.ts:1-28 is only isAdrPath / findAdrMention / isAdrHref — the "no ADRs on the consumer surface" filter. The decision that ADR-0011 recorded was the page set + one-source-of-truth render + the onboarding prompt, whose load-bearing home is docs/site/assemble.ts:46 (onboarding prompt as entry: true) and docs/site/assemble.ts:181 (publishFiles). A reader following the note gets a filter, not the decision.

Remedy: replace that clause with "the page set and onboarding prompt live in docs/site/assemble.ts (publishFiles) and docs/onboarding-prompt.md; the ADR-hygiene rules in docs/site/adr-policy.ts" — or delete the clause and say 0011 was dropped with no surviving home, which is honest and shorter.

4. .agents/README.md:9 duplicates AGENTS.md:41 word-for-word in policy (minor)

AGENTS.md:41 — "PRs: always describe with the visual-pr skill (.agents/skills/visual-pr/), even though it is explicit-invoke by default. show-me goes in a comment, never the body."; .agents/README.md:9 — "visual-pr — every PR body; show-me goes in a comment, never the body." Two homes for one normative sentence, created one commit after the round-1 finding about exactly that failure mode.

Remedy: keep the rule in AGENTS.md (every agent reads it) and reduce the README bullet to - \visual-pr` — PR bodies (policy in `AGENTS.md`).`, or drop the bullet; the README's list is a trigger index, not the rule text.

Residual risks

  1. An agent still hits the dead instruction before the redirect. Probe: run /code-review in a fresh session on a scratch branch and check the first thing it says after docs/agents/issue-tracker.md resolves missing — "run /setup-matt-pocock-skills" or the GitHub mapping; rg 'setup-matt-pocock-skills' <session transcripts> should return nothing new.
  2. A future contributor deletes load-bearing docstrings to satisfy ≤3 lines. Probe: git log -p -L 176,181:packages/preview-env/src/db.ts and -L 18,24:apps/server/src/app-deployment/label-collisions.ts after the next "style cleanup" PR; the why-comments must survive intact.
  3. A new ADR lands on a stub number. Probe: ls docs/adr | sort after the next ADR PR — new entries must start at 0014, and 0007/0009/0012 must still be one-paragraph stubs.
  4. Stub targets drift away from the stubs. 0007/0012 point at docs/adopting-a-repo.md; if the preview.env/db.roles sections move, both ADRs silently dead-end again. Probe: rg -c 'db.roles' docs/adopting-a-repo.md (non-zero) plus bun run docs:check in the same PR that edits that page.
  5. Folded detail is only in git history. 0009 now claims its content "folds into ADR-0008"; docs/adr/0008-preview-db-providers.md:12-19 keeps the bullets but not the operational detail (forCreate("none") throws, migration table rebuild). Probe: rg 'forCreate|migration rebuilds' docs/adr/ → zero hits means the next reader has to git show origin/main:docs/adr/0009-….

Unverifiable from here

I cannot see MR bodies, issue threads, or inbound ADR citations made outside the working tree, so I can only judge number→decision identity from git history; and I did not run the workspace-wide bun test / turbo typecheck (the delta touches no source; bun run docs:check and bun test docs/site/ are green).

Round-2 remedies: drop numeric docstring budget in CODE-STYLE.md,
extend tracker redirect with PR/ticket/gh recipes, fix ADR-0011
history pointer, dedupe visual-pr policy to AGENTS.md
@simpros

simpros commented Oct 29, 2026

Copy link
Copy Markdown
Owner Author

🧊 Thermo-nuclear review (round 3) — REQUESTCHANGES · a216fde8

  • Findings status
  • New findings
    1. .agents/README.md:15-16 instructs agents to use a label that does not exist on the repo — the redirect's first recipe fails (blocking)
    1. .agents/README.md:11-14 duplicates the tracker identity and label list that AGENTS.md:40 already owns (structural)
    1. .agents/README.md:15 — the new block has no heading, so wayfinder's literal section pointer still finds nothing (minor)
  • Residual risks
  • Unverifiable from here
Full report (click to expand)

VERDICT: REQUEST CHANGES

HEAD verified: a216fde (matches the brief). Delta e0fc0b7..HEAD is 3 files, docs/agent-policy only, and it is a direct response to the round-2 findings — no rebase, merge, feature, or unrelated file. bun run docs:check green.

Findings status

  1. Addressed (substance). .agents/README.md:15-19 now carries the three items the round-2 finding named: PRs as a request surface: no (read by .agents/skills/triage/SKILL.md:11), the publish recipe with Part of #<map> / Blocked by: #<n> / native dependencies (.agents/skills/to-tickets/SKILL.md:60-63), and the map/child/blocking/frontier expressions (.agents/skills/wayfinder/SKILL.md:21,113). The vendored bytes are still untouched, which is the right call. The one remaining literal mismatch — wayfinder:map not existing on the repo — is a new finding below, not a re-open of this one.
  2. Addressed. CODE-STYLE.md:18 is now "Module/function docstrings: one invariant, no headings or bullet lists." The numeric budget is gone. The replacement is satisfied by the tree: a scan of every multi-line block comment in apps/**, packages/**, docs/**, scripts/** finds zero bodies containing a markdown heading or bullet (// - , * - , * #). The five over-long docstrings the round-2 review flagged (packages/preview-env/src/db.ts:176, apps/server/src/app-deployment/label-collisions.ts:18, apps/server/src/preview/admission.ts:18, apps/server/src/telemetry/traces.ts:22, apps/server/src/sweep/reconcile.ts:270) are no longer non-conforming, and none were touched.
  3. Addressed. docs/adr/README.md:23-26 now points at docs/site/assemble.ts (publishFiles, line 181, which does hold the page set via ...docsPages.map((p) => p.file) at line 183) plus docs/onboarding-prompt.md (present, 3.4K) for the onboarding prompt, and keeps docs/site/adr-policy.ts for the ADR-hygiene rules only — the three distinct homes are now named separately and each link/symbol resolves.
  4. Addressed. .agents/README.md:9 is now - visual-pr— PR bodies (policy inAGENTS.md).; the normative sentence lives only at AGENTS.md:41.

New findings

1. .agents/README.md:15-16 instructs agents to use a label that does not exist on the repo — the redirect's first recipe fails (blocking)

gh label list -R simpros/sprout --limit 100 | grep -ci wayfinder returns 0. The redirect now says "parent map = issue labelled wayfinder:map", but that label was never created, and it is not in the label list two lines above (:13-14) or in AGENTS.md:40. gh issue create --label wayfinder:map (and gh issue edit --add-label) fails with "could not add label: 'wayfinder:map' not found", so the single command /wayfinder runs first — creating the map — dead-ends. This is the same failure class as the original round-1 finding, surviving inside the file that exists to close it: the doc is now the only tracker spec, so it has to be executable.

Remedy: make the label list and the recipes agree, in one place. Create the label (gh label create wayfinder:map --description "Wayfinder map issue", plus the wayfinder:<type> set if you keep that language) and add wayfinder:map to the enumerations at AGENTS.md:40 and .agents/README.md:13-14 — or drop the label from the map recipe ("parent map = one open issue titled Map: <destination> whose children are its sub-issues") and delete the label dependency entirely. The second is cheaper and has no setup step.

2. .agents/README.md:11-14 duplicates the tracker identity and label list that AGENTS.md:40 already owns (structural)

Two files now state "GitHub issues on simpros/sprout via gh; labels: needs-triage, needs-info, ready-for-agent, ready-for-human, wontfix" word-for-word, and this delta demonstrates the cost: the new paragraph needed a sixth label and only one of the two homes got it (finding 1). Every future label change now has to be made twice, and the second copy is the one a vendored skill reads.

Remedy (code judo — delete, don't sync): keep the normative list once in AGENTS.md:40 (every agent reads it, and it is the file with the ownership claim), and reduce the README block to operations only: "Tracker: the one AGENTS.md names. Operations: gh issue view|comment|close|edit; tickets = gh issue create; wayfinding …". The README is a redirect for skill pointers, not a second policy home.

3. .agents/README.md:15 — the new block has no heading, so wayfinder's literal section pointer still finds nothing (minor)

.agents/skills/wayfinder/SKILL.md:25 says "Consult the tracker doc's 'Wayfinding operations' section for how this repo expresses them." The redirect's new paragraph has the content but no such section, and the file has no headings at all below the title, so an agent that greps for the named section gets zero hits and falls through to the skill's next line ("default to the local-markdown tracker"), which is wrong for this repo.

Remedy: one line — put ### Wayfinding operations above :15 (and ### Tracker above :11), matching the name the vendored skill uses. No vendored bytes change.

Residual risks

  1. First /wayfinder map creation fails on the missing label. Probe: gh label list -R simpros/sprout | grep wayfinder before and after the next wayfinder session; empty on both sides means the map was created without the label and the frontier query at README:17-18 will miss it.
  2. A future label change lands in one home. Probe: after the next label edit, rg -c 'ready-for-agent' AGENTS.md .agents/README.md — if the counts diverge, the redirect is stale again.
  3. The docstring rule is still a judgment call, not a bound. one invariant is untestable, so the next "style cleanup" can still argue the two-line invariant at packages/preview-env/src/db.ts:176 should be one line. Probe: git log -p -L 176,181:packages/preview-env/src/db.ts and -L 18,24:apps/server/src/app-deployment/label-collisions.ts after that PR; the why must survive.
  4. The Part of #<map> wording now implies every child carries the marker. The deleted doc used it only where sub-issues were unavailable; children created as native sub-issues will get a redundant body line. Probe: inspect the next map's children — either sub-issue link or Part of, not both.

Unverifiable from here

I cannot tell whether the author intends to create wayfinder:map out-of-band via gh (the repo has no label-definition file, so nothing in the tree can make it exist), and I did not run the workspace-wide bun test / turbo typecheck — the delta touches no source; bun run docs:check is green.

Round-3: drop nonexistent wayfinder:map label for title-based map
identity, dedupe tracker label list into AGENTS.md, add Wayfinding
operations heading matching the vendored skill pointer
@simpros

simpros commented Oct 29, 2026

Copy link
Copy Markdown
Owner Author

🧊 Thermo-nuclear review (round 4) — REQUESTCHANGES · 49e55549

  • Round-3 status
  • Findings
    1. .agents/README.md:20 contradicts the frozen skill it redirects: wayfinder still creates the map with a label that does not exist (blocking)
    1. The tracker spec lives behind a two-hop rule while four vendored references name the exact path it used to have (structural, worth settling now)
    1. .agents/README.md:3-9 presents a partial skill list as the vendored-skill index (minor)
  • Residual risks
  • Unverifiable from here
Full report (click to expand)

VERDICT: REQUEST CHANGES

HEAD verified: 49e55549f6787ebea15e1a789155b5f2012990b5. Round-4 delta is a216fde..HEAD, one file, .agents/README.md (+13/−9), docs-only, and it is a direct response to the three round-3 findings — no rebase, feature, or unrelated file. Checks I could run: bun run docs:check green; bun test docs/site/ 87 pass / 0 fail. The MR touches no source except a test title (apps/cli/src/worktree-db/env-file.test.ts:73).

Round-3 status

  1. Addressed. .agents/README.md:20 no longer names a label; map identity is title-based, so the nonexistent wayfinder:map command is gone from the redirect (see finding 1 for what is still left).
  2. Addressed. The tracker identity and label list now exist once, at AGENTS.md:40; .agents/README.md:13 is Tracker: the one AGENTS.md names, an operations-only restatement.
  3. Addressed. ### Tracker and ### Wayfinding operations (.agents/README.md:11,18) match the literal section name .agents/skills/wayfinder/SKILL.md:25 greps for.

Findings

1. .agents/README.md:20 contradicts the frozen skill it redirects: wayfinder still creates the map with a label that does not exist (blocking)

The redirect now says "Parent map = one open issue titled Map: <destination>", but the vendored skill makes the label the canonical artifact twice, one of them an executable step:

  • .agents/skills/wayfinder/SKILL.md:21 — "The map is a single issue …, labelled wayfinder:map, the canonical artifact."
  • .agents/skills/wayfinder/SKILL.md:113 — "Create the map (label wayfinder:map)".

The redirect's umbrella (README:13-14) covers only the tokens docs/agents/* and /setup-matt-pocock-skills; it says nothing about wayfinder:map, so the first write of the workflow still runs gh issue create --label wayfinder:map and fails. This is the round-3 defect resurfacing one layer down: the doc is executable, the skill it governs is not, and the doc is silent about which wins. Because vendored bytes are hash-locked (skills-lock.json) and were correctly left untouched, the override has to be stated here.

Same class in the same paragraph: "child = native sub-issue" and "blocking = Blocked by: #<n> (or native dependencies)" name shapes, not commands. gh has no top-level sub-issue or dependency verb — the deleted issue-tracker-github.md carried the gh api …/sub_issues and …/dependencies/blocked_by -F issue_id=<db-id> calls, and "native dependencies" needs the numeric database id, which is exactly the non-obvious part. An agent following README:20-23 will either guess wrong or fall back to body lines the line above forbids ("only where sub-issues are unavailable").

Remedy (code judo — one rule set, zero API archaeology): make the body-line forms canonical and say so explicitly:
Parent map = one open issue titled Map: <destination> (the skill's wayfinder:map label does not exist in this repo). Child = issue with Part of #<map> in the body. Blocking = Blocked by: #<n>. Frontier = open child with no assignee and no open issue in its Blocked by line.
That is shorter than what is there now, needs no gh api, and makes the skill's two label instructions a documented no-op rather than a live failure. If you would rather keep native sub-issues/dependencies, carry the two exact gh api invocations instead — but then the doc has to own them, since nothing else does.

2. The tracker spec lives behind a two-hop rule while four vendored references name the exact path it used to have (structural, worth settling now)

.agents/README.md:13-16 establishes an indirection: vendored pointer → AGENTS.md:40 labels → "any reference resolves to it". Four vendored references name docs/agents/issue-tracker.md verbatim (.agents/skills/code-review/SKILL.md:13,29) or its "Wayfinding operations" heading (.agents/skills/wayfinder/SKILL.md:25). That layer exists only because the path was deleted; it is not earning its keep — it has now cost four review rounds, each one patching a different gap in the translation (missing recipes, missing label, wrong label, wrong heading).

Remedy: put the ten lines of Tracker + Wayfinding operations in docs/agents/issue-tracker.md, where the skills already point and where the section heading already matches, and leave .agents/README.md as what AGENTS.md:42 calls it — a vendored-skill index. The MR's real win (deleting 150 lines of GitLab/local/setup boilerplate) survives intact; what disappears is the "any reference resolves to it" rule and the AGENTS.md hop. Not resurrecting the old tree — one file, ~12 lines, exact path.

3. .agents/README.md:3-9 presents a partial skill list as the vendored-skill index (minor)

AGENTS.md:42 calls this file the "vendored skill index"; it names 9 of the 20 directories in .agents/skills/. The omissions include the four explicit-invoke skills whose frontmatter means an agent cannot discover them by description alone at all (grill-with-docs, handoff, implement, improve-codebase-architecture) plus tdd, prototype, diagnosing-bugs, domain-modeling, grilling, codebase-design, resolving-merge-conflicts. Same failure mode as the previous rounds: a doc that reads total and is not.

Remedy: one line after the list — "everything else in .agents/skills/ is generic; invoke from its own description (or explicitly, where its frontmatter disables model invocation)". Or list all 20 by name; either is cheaper than the next round of someone trusting the list.

Residual risks

  1. First /wayfinder map creation still fails (or silently omits the marker). Probe: gh label list -R simpros/sprout | grep -c wayfinder before the next wayfinder session (expect 0), then gh issue list --state open --search 'Map: in:title' after it (expect 1) and rg 'wayfinder:map' <session transcript> (expect 0).
  2. Parentage gets double-marked or skipped. Probe: inspect the next map's children — each should be either a native sub-issue or a body-line Part of #<map>, not both; a child with neither is invisible to the frontier query.
  3. Blocking edges that the frontier query cannot see. Probe: gh issue list --state open --json number,body,assignees and check every ticket the map treats as blocked actually carries a Blocked by: line or a native dependency; a Blocked by: in a comment rather than the body is undetectable.
  4. A new ADR lands on a dropped number. docs/adr/README.md:21 declares numbers immutable, but 0010/0011 were deleted with no stub (0007/0009/0012 did get one). Probe: ls docs/adr | sort after the next ADR PR — the new entry must be 0014, and the history note must still name 0010/0011.
  5. Stub targets drift. 0007/0012 point at docs/adopting-a-repo.md. Probe: in the PR that edits that page, rg -c 'preview.env|db.roles' docs/adopting-a-repo.md (non-zero) plus bun run docs:check.

Unverifiable from here

I cannot see the MR body, issue threads, remote label state, or any out-of-tree citations of ADR-0010/0011, and I did not run the workspace-wide turbo build / bun test (the MR changes no source; docs:check and the docs-site suite are green).

Round-4: restore docs/agents/issue-tracker.md as the canonical tracker
spec (body-line map/child/blocking forms; wayfinder:* labels documented
as nonexistent), reduce .agents/README.md to a skill index with a pointer,
note generic skills, point AGENTS.md at both files.
@simpros

simpros commented Oct 29, 2026

Copy link
Copy Markdown
Owner Author

🧊 Thermo-nuclear review (round 5) — REQUESTCHANGES · 8c348ac6

  • Round-4 status
  • Findings
    1. The triage-label vocabulary now has two owners, one commit after round 4 consolidated it to one (structural, blocking)
    1. .agents/README.md:13-15 keeps a redirect layer that has no referent and claims a resolution it cannot make (stale de-facto contract, blocking)
    1. ADR-0010 and ADR-0011 are deleted outright while 0007/0009/0012 get stubs, and the same paragraph declares numbers immutable (consistency, blocking)
    1. docs/adr/README.md:25-26 and :14 describe files more generously than those files do (factual pointer, minor)
  • Residual risks
  • Unverifiable from here
Full report (click to expand)

VERDICT: REQUEST CHANGES

HEAD verified as 8c348ac6c3531dc00c725f5647789938a1498222; round-5 delta is 49e5554..HEAD, three files (AGENTS.md, .agents/README.md, docs/agents/issue-tracker.md), docs-only. Checks I could run: bun run docs:check green, bun test docs/site/ 87 pass / 0 fail. Whole-MR shape is good and the right direction: −889 lines, the canonical docs/agents/issue-tracker.md path is restored, and the ADR stubs I spot-checked point at files that exist and say what the stubs claim (resolveDbRoles in packages/preview-env/src/db.ts:182, the dual/single budget in apps/server/src/preview-db/names.ts:8-12, label-collisions.ts, docs/site/adr-policy.ts, and the preview.env / db.roles grammar in docs/adopting-a-repo.md:28,43-44). The new CODE-STYLE.md fail-fast rule is also true of the code (parsePostgresConfig throws on a partial set, apps/server/src/http/deploy.ts:208 returns postgres_not_configured).

What is left is this MR's own internal inconsistency, not code quality in the source.

Round-4 status

  1. Addressed. docs/agents/issue-tracker.md:11 now names the nonexistent wayfinder:map / wayfinder:<type> labels outright and forbids --label, and the map identity is title/body-based, so the skill's executable step 3 is neutralised.
  2. Mostly addressed — the spec moved back to the exact path the vendored bytes name. What survived is a redirect rule that is now redundant and half untrue (finding 2).
  3. Addressed. .agents/README.md:11 closes the "list that reads total and is not" gap.

Findings

1. The triage-label vocabulary now has two owners, one commit after round 4 consolidated it to one (structural, blocking)

docs/agents/issue-tracker.md:5 and AGENTS.md:40 carry the same five label strings, and AGENTS.md:42 in the same breath declares docs/agents/issue-tracker.md canonical for tracker operations. So the canonical file and its index both own the vocabulary, and the index's copy is the one a maintainer will edit first. This is exactly the drift the previous round's "the tracker identity and label list now exist once, at AGENTS.md:40" fix removed, re-created one layer over. to-spec / to-tickets / code-review tell the agent the label vocabulary comes via the tracker doc, so the tracker doc is the right owner, not AGENTS.md.

Remedy: AGENTS.md:40 keeps identity only — "Issues: GitHub issues on simpros/sprout via gh; tracker spec and triage labels: docs/agents/issue-tracker.md." Delete the label list from AGENTS.md. One owner, one edit site, and AGENTS.md gets shorter.

2. .agents/README.md:13-15 keeps a redirect layer that has no referent and claims a resolution it cannot make (stale de-facto contract, blocking)

Two problems in three lines:

  • The ### Tracker section only repeats line 5's pointer ("see docs/agents/issue-tracker.md"). It buys nothing.
  • The parenthetical — "any vendored reference to docs/agents/* or /setup-matt-pocock-skills resolves to it" — is now false in both halves. docs/agents/issue-tracker.md exists at the exact path the vendored bytes name, so no redirect is needed for docs/agents/*. And /setup-matt-pocock-skills is not a reference, it is an executable fallback instruction for a skill this MR deleted: .agents/skills/code-review/SKILL.md:13, .agents/skills/to-spec/SKILL.md:9, .agents/skills/to-tickets/SKILL.md:11 all say "tell the user to run /setup-matt-pocock-skills". A doc asserting that a token "resolves" is not the same as neutralising the instruction, and this is the sentence that has burned four review rounds.

Remedy: delete ### Tracker entirely (line 5 already points at the doc) and drop the parenthetical. If you want the dead fallback defused at all, the one place it lands is the file the skills name — add to docs/agents/issue-tracker.md: "A skill's /setup-matt-pocock-skills fallback means this file; that skill no longer exists here." Same line count, no claim about vendored bytes.

3. ADR-0010 and ADR-0011 are deleted outright while 0007/0009/0012 get stubs, and the same paragraph declares numbers immutable (consistency, blocking)

docs/adr/README.md:21 reads "ADR numbers are immutable. 0010 (label ownership) and 0011 (agent-first docs) were dropped outright". The MR's own stub files (0007, 0009, 0012) exist for the stated reason that "historical citations still resolve" — so the diff applies two policies to the same class of document, and the surviving one contradicts its own sentence. Any issue, PR, or session that cites ADR-0010 (preview.labels label ownership, which is a fail-fast contract adopters can trip) now gets a 404.

Remedy: add the same three-line stubs — 0010-preview-label-ownership.md → the collision invariant in apps/server/src/app-deployment/label-collisions.ts; 0011-agent-first-docs.md → publishFiles in docs/site/assemble.ts and docs/onboarding-prompt.md. Then the immutability sentence is true, the History paragraph collapses to one line pointing at the timeline, and the diff still deletes ~115 lines.

4. docs/adr/README.md:25-26 and :14 describe files more generously than those files do (factual pointer, minor)

  • Line 25-26 calls docs/site/adr-policy.ts the home of "ADR-hygiene rules". That file implements three leak predicates (isAdrPath / findAdrMention / isAdrHref) and its header says "ADRs are maintainer internals and must never reach the consumer surface"; it holds no hygiene policy. It preserves ADR-0011's consequence, not a rule set. Reword to "ADRs never reach published pages (docs/site/adr-policy.ts enforces it on sources and rendered HTML)".
  • Line 14 still tags 0006 "(accepted, implemented)" while every ADR lost its **Status:** line and 0006's file has none. Either drop the parenthetical or keep a status convention; don't keep exactly one.

Not worth another round on their own; they belong in the same edit as finding 3.

Residual risks

  1. Label drift after the duplicate is edited in one place. Probe: rg -n 'needs-triage|ready-for-agent' AGENTS.md docs/agents/issue-tracker.md .agents/ must show one site; gh label list -R simpros/sprout must match it.
  2. The /setup-matt-pocock-skills fallback fires where docs/ is not present (a harness given only .agents/skills), sending an agent after a deleted skill. Probe: rg 'setup-matt-pocock-skills' over the next to-spec / to-tickets session transcript — expect 0 hits outside the vendored skills' own bytes.
  3. Wayfinder's first write still passes --label wayfinder:map, because the override lives in a different file from the skill that executes it. Probe: gh label list -R simpros/sprout | grep -c wayfinder (expect 0) before, then gh issue list --state open --search 'Map: in:title' after the next wayfinder session (expect 1) and rg 'wayfinder:' in that transcript (expect 0).
  4. Blocking edges invisible to the frontier rule. docs/agents/issue-tracker.md:11 puts Blocked by: in the body and not a comment, but nothing enforces it. Probe: gh issue list --state open --json number,body,comments and assert every ticket the map treats as blocked carries the line in the body.
  5. A stub target drifts while the stub still claims it. Probe: in the PR that next edits docs/adopting-a-repo.md, rg -c 'preview.env|db.roles' docs/adopting-a-repo.md (non-zero) plus bun run docs:check; separately ls docs/adr | sort after the next ADR — the new entry must be 0014.

Unverifiable from here

I cannot see the MR body, the review thread on #282, remote label state, or out-of-tree citations of ADR-0010/0011, and I did not run the workspace-wide turbo build / full bun test (the only source-file change in the MR is one test title, apps/cli/src/worktree-db/env-file.test.ts:73); docs:check and the docs/site/ suite are green at HEAD.

Round-5 findings: single owner for triage labels (AGENTS.md points at
tracker spec); drop redundant Tracker redirect in .agents/README.md and
defuse /setup-matt-pocock-skills fallback in the tracker doc; restore
0010/0011 as stubs so ADR numbers stay immutable; fix ADR README
pointers (0006 status, 0011 homes).
@simpros

simpros commented Oct 29, 2026

Copy link
Copy Markdown
Owner Author

🧊 Thermo-nuclear review (round 6) — REQUESTCHANGES · ab5a381c

    1. The deleted skill is still the bootstrap five vendored skills depend on (structural, introduced here)
    1. Missed code-judo: the ADR redirect is written three times for citations that do not exist
    1. New canonical index asserts invocation policy it does not own, and gets it inverted
    1. AGENTS.md:41 and .agents/README.md:9 keep a false fact about visual-pr
    1. docs/agents/issue-tracker.md:11 — six operations collapsed into one 90-word paragraph
    1. CODE-STYLE.md:9-19 dropped the only rule governing ADR citations in code
    1. docs/adr/0013-preview-access-gate.md:3 — enum drift against the contract page
  • Residual risks
  • Unverifiable from here
Full report (click to expand)

VERDICT: REQUEST CHANGES

Envelope: git diff origin/main...HEAD at ab5a381 is docs/tooling only — 27 files, one test-name string. No production code changed, so the file-size, cast/optionality, and orchestration parts of the rubric have no surface here; the review is therefore about the documentation-as-code structure this MR rewrites, which is the code agents load before any source file.

1. The deleted skill is still the bootstrap five vendored skills depend on (structural, introduced here)

.agents/skills/triage/SKILL.md:43, .agents/skills/code-review/SKILL.md:13, .agents/skills/to-spec/SKILL.md:9, .agents/skills/to-tickets/SKILL.md:11 and :60, .agents/skills/wayfinder/SKILL.md:25 all end with "tell the user to run /setup-matt-pocock-skills". This MR deletes that skill (.agents/skills/setup-matt-pocock-skills/, skills-lock.json) and compensates with one apologetic line at docs/agents/issue-tracker.md:13.

That is the redirect in the wrong layer. The failure path is: agent loads to-tickets → told to send the user to a command that no longer resolves → the only correction lives at the bottom of a file the agent has not been told to open yet. Five dangling call sites plus one prose apology is not a simplification, it is the deletion being absorbed as debt.

Pick one clean shape:

  • Keep a stub skill. Ten lines at .agents/skills/setup-matt-pocock-skills/SKILL.md: "this repo is already configured — read docs/agents/issue-tracker.md and CODE-STYLE.md; nothing to scaffold." The vendored call sites then resolve, no vendor body is edited (important: .agents/skills/* are hash-pinned copies and editing their prose would silently diverge from skills-lock.json), and docs/agents/issue-tracker.md:13 disappears.
  • Or move the redirect to the routing surface this MR adds — .agents/README.md — and drop line 13 entirely.

Either way, the archaeology sentence "that skill no longer exists here" must not survive; the new CODE-STYLE.md bans exactly this kind of history narration in prose.

2. Missed code-judo: the ADR redirect is written three times for citations that do not exist

docs/adr/README.md:15-25 plus the five stub bodies (0007:3-5, 0009:3-5, 0010:4-6, 0011:3-7, 0012:3-7) each say the same thing in three places: the table row, the stub file, and the "History" paragraph at README:23-25.

The stubs' stated rationale — "keeps the number so historical ADR-NNNN citations still resolve" — does not hold in this tree. I grepped every number across the repo: the only citations to 0007/0009/0010/0011/0012 outside docs/adr/ are an arbitrary sample string used to test the link gate (docs/site/check.test.ts:301-302, :351) and a generic example in .agents/skills/improve-codebase-architecture/SKILL.md:56. Nothing else cites them. After this diff the stubs only hold each other's hands.

Cost: docs/adr/ no longer answers "what was decided" by listing files — 5 of 13 files now contain no decision, contradicting README:3's own rule ("record a decision here only when…"). And each stub carries file-path pointers (apps/server/src/app-deployment/label-collisions.ts, docs/site/assemble.ts, packages/preview-env/src/db.ts) as plain prose that no gate validates — docs:check only checks href links in published pages and ADRs are excluded from the published surface, so every rename rots them silently.

Code-judo: make docs/adr/README.md the single redirect surface (table row = retired number → destination), delete the five stub bodies and the History paragraph. Out-of-repo citations (see Unverifiable) still land on the table, which is the only surface that can be tested; the extra files buy nothing but rot surface. If you keep the stubs, at least delete README:23-25 and give each stub one consistent status word (superseded / folded / dropped are currently three vocabularies in five files).

3. New canonical index asserts invocation policy it does not own, and gets it inverted

.agents/README.md:3 says "invoke by trigger"; :5 puts to-spec, to-tickets, triage, wayfinder in that bucket; :8 puts review-animations there too. All five declare disable-model-invocation: true in their frontmatter (.agents/skills/{to-spec,to-tickets,triage,wayfinder,review-animations}/SKILL.md:3-4) — the exact opposite: the model may not invoke them, only the user may. Only code-review, documentation-writer, emil-design-eng, visual-pr are actually trigger-invokable.

A brand-new index whose only job is routing, wrong on 5 of 9 entries, is worse than no index: an agent will try to self-invoke triage, be refused, and stall. The fact already lives in each skill's frontmatter — do not copy metadata into prose. Either split the list into "trigger-invokable" / "user-invoked only" and get the buckets right, or state the rule once ("invoke as each skill's frontmatter allows") and list skills without a mode claim.

4. AGENTS.md:41 and .agents/README.md:9 keep a false fact about visual-pr

"even though it is explicit-invoke by default" — visual-pr/SKILL.md:1-4 has no disable-model-invocation. The diff rewrote this sentence instead of deleting the expired clause, and the new CODE-STYLE.md ("a comment that contradicts the code is a bug") applies to prose the same way. Fix: drop the clause. If user-only invocation is genuinely intended, add the frontmatter flag to the vendored skill (and its lock hash) rather than explaining a flag that isn't there.

5. docs/agents/issue-tracker.md:11 — six operations collapsed into one 90-word paragraph

The deleted file had one bullet per operation; the replacement is a single run-on sentence carrying map, child, blocking edge, frontier, claim, and resolve, plus a normative negative ("wayfinder:map … labels do not exist in this repo — omit --label") buried mid-paragraph. This file is consumed as a spec, and the diet's target was ceremony, not the one-line-per-operation index. Restore six short bullets (they are shorter than the paragraph) and keep the "no wayfinder labels here" rule as its own line. As written an agent scanning for "frontier" has to parse prose to find it.

6. CODE-STYLE.md:9-19 dropped the only rule governing ADR citations in code

The retired docs/agents/comment-style.md item 5 was the sole statement that an ADR reference is allowed only to mark a deliberate deviation. The new Comments section replaces it with nothing, at exactly the moment the ADR set stops being the decision log — and the diff already applies a stricter, undocumented rule by stripping (ADR-0007) from the test name at apps/cli/src/worktree-db/env-file.test.ts:73. Add one line, e.g. "no ADR numbers in comments or test names; if the deviation matters, name the deviation", so the rule the diff enforced is the rule the repo states.

7. docs/adr/0013-preview-access-gate.md:3 — enum drift against the contract page

preview.auth (basic | link) omits the default value name: docs/adopting-a-repo.md:40 documents none (open) | basic | link, and the code has a none mode. The ADR is the record of the axis; write none default | basic | link.

Non-blocking: AGENTS.md:40 and :42 both point at docs/agents/issue-tracker.md two lines apart ("tracker spec and triage labels" / "Issue tracker operations"). Collapse to one.

Residual risks

  • Deleted bootstrap skill breaks the tracker workflow. Probe: run /to-tickets in a fresh session and grep the transcript for setup-matt-pocock; any hit means the model is still chasing a command that no longer exists.
  • PR-description mechanics silently lost with docs/agents/pull-requests.md (where to save the body, gh pr edit --body-file, the show-me path). Probe: on the next PR, confirm the body still has Why / notes / Change outline and that gh pr view <n> --json body matches the file under .humanlayer/tasks/.
  • ADR stub pointers rot undetected. Probe: rg -o '(apps|packages|docs)/[A-Za-z0-9_./-]+\.(ts|md)' docs/adr/*.md | while read …; do test -e … || echo BROKEN; done — run it in CI if the stubs stay.
  • The vendored-skill deletion is reverted by reinstall, re-adding setup-matt-pocock-skills while docs/agents/issue-tracker.md:13 still claims it does not exist. Probe: after npx skills add mattpocock/skills …, diff skills-lock.json and re-grep for setup-matt-pocock.
  • Index-driven misrouting: an agent tries implicit invocation of triage/wayfinder per .agents/README.md:5 and gets refused. Probe: prompt "triage these issues" and see whether the harness resolves the skill or reports it unavailable.

Unverifiable from here

Out-of-repo citations (GitHub issues, PR bodies, the normative spec issue, external links) may still reference ADR-0007/0009/0010/0011/0012 — only in-repo citations are visible in a checkout; likewise whether the Map: <destination> wayfinder convention matches the actual map issue on GitHub, and whether docs:check passes in CI (it passes against this working tree).

- .agents/README.md: split skill index into trigger-invokable vs
  user-invoked-only per frontmatter; redirect /setup-matt-pocock-skills
  fallback to the tracker doc
- docs/agents/issue-tracker.md: wayfinding ops as one-line bullets,
  drop history narration
- docs/adr: README table is the single redirect surface, delete the
  five retired-number stubs, keep numbers immutable
- CODE-STYLE.md: no ADR numbers in comments or test names
- 0013: record the none default; AGENTS.md: fix visual-pr clause,
  collapse duplicate tracker pointer
@simpros

simpros commented Oct 29, 2026

Copy link
Copy Markdown
Owner Author

🧊 Thermo-nuclear review (round 7) — REQUESTCHANGES · b38e7a01

  • Findings status
  • New findings
  • Residual risks
  • Unverifiable from here
Full report (click to expand)

VERDICT: REQUEST CHANGES

Envelope: HEAD is b38e7a0 as required. ab5a381..HEAD is 12 files, +28/−52, docs/tooling only, and every hunk maps to a round-6 finding — no rebase, merge, new feature, or unrelated file. bun run test:guards and bun run docs:check both pass on this tree (135 tests, 0 fail), so the delta is not breaking a gate.

Findings status

  1. Addressed. The redirect moved to the routing surface: .agents/README.md:17 — A skill's /setup-matt-pocock-skills fallback means docs/agents/issue-tracker.md. The archaeology sentence is gone from docs/agents/issue-tracker.md (file now ends at the Resolve bullet, :17), and .agents/skills/* was not edited, so no vendored body diverges from skills-lock.json.
  2. Addressed. Five stub files deleted (docs/adr/ now holds 8 ADR files + README); docs/adr/README.md:15-20 is the single redirect surface (| 0007 | Retired → … | … | 0012 | … |); the "History" paragraph is gone; :5 adds the immutability rule.
  3. Addressed. .agents/README.md:3 now defers to frontmatter, :5-8 lists the four trigger-invokable skills, :10-13 lists five user-invoked ones. Verified against frontmatter: the nine entries are now in the correct bucket (code-review, documentation-writer, emil-design-eng, visual-pr unset; to-spec, to-tickets, triage, wayfinder, review-animations = disable-model-invocation: true).
  4. Addressed. False clause dropped at AGENTS.md:41 and not restated at .agents/README.md:8.
  5. Addressed. docs/agents/issue-tracker.md:11-17 is one bullet per operation (map, labels rule, child, blocking, frontier, claim, resolve), the label caveat is its own line.
  6. Addressed. CODE-STYLE.md:15 — No ADR numbers in comments or test names; if the deviation matters, name the deviation. The tree now obeys it: no ADR-number reference survives in apps//packages/, and apps/cli/src/worktree-db/env-file.test.ts:73 is "rejects target collisions".
  7. Addressed. docs/adr/0013-preview-access-gate.md:3 — Previews are open by default (preview.auth: none); basic | link gates one preview…, matching docs/adopting-a-repo.md:40 (default none) and the code fallback at apps/cli/src/commands/ci-preview.ts:35.
  8. (non-blocking, prior round) Addressed — AGENTS.md carries one tracker pointer (:40), the duplicate "Issue tracker operations" line is gone.

New findings

  1. .agents/README.md:10-13 — the new "User-invoked only (frontmatter disables model invocation)" list is 5 members of 9. Four more skills declare the same flag and are not listed: .agents/skills/grill-with-docs/SKILL.md:4, .agents/skills/handoff/SKILL.md:5, .agents/skills/implement/SKILL.md:4, .agents/skills/improve-codebase-architecture/SKILL.md:4. They therefore fall under :15 — "Everything else in .agents/skills/ is generic; invoke from its own description" — which tells an agent to self-invoke skills the harness will refuse. That is the same failure round 6 blocked on (an agent tries, is refused, stalls), just narrowed from 5-of-9 wrong to 4-of-13 omitted, and it will silently widen with every vendored skill added.
    Remedy (delete the class of bug, not the instance): drop the mode enumeration entirely. Keep the routing list (:5-8, :12-13) and state the rule once — already at :3, "invoke as each skill's frontmatter allows" — so no line in this file restates a fact owned by frontmatter. If you prefer to keep buckets, put all nine flag-setting skills in the user-invoked section; anything less keeps this file a hand-synced mirror of nine files' metadata.
    Secondary: :17 is an unheaded trailing sentence; fold it into the tracker bullet at :12 so it sits where an agent looking for tracker operations actually reads.

Residual risks

  • Vendored reinstall re-creates /setup-matt-pocock-skills while .agents/README.md:17 asserts the fallback maps to docs/agents/issue-tracker.md. Probe: npx skills add mattpocock/skills … then ls .agents/skills/setup-matt-pocock-skills; if the directory returns, delete line 17 rather than describing a mapping to a command that now resolves on its own.
  • Retired-row pointers rot silently. docs/adr/README.md:15-20 names four file paths that no gate validates (docs:check excludes docs/adr, and the paths are code spans, not hrefs). Probe: rg -o '(apps|packages|docs)/[A-Za-z0-9_./-]+.(ts|md)' docs/adr/README.md | tr -d '' | while read p; do test -e "$p" || echo "BROKEN $p"; done` — run it in CI if the table stays the sole redirect.
  • Agent misroutes to an omitted user-only skill. Probe: prompt "improve the architecture of this module" in a fresh session and check whether the harness invokes improve-codebase-architecture and is refused.
  • The 0007–0012 history now exists only as table rows, so a reader arriving from an out-of-repo ADR-0009 citation gets "Retired → ADR-0008" with no body. Probe: git log --oneline -- docs/adr/0009-preview-db-provider-none.md (hits on main, nothing on HEAD) and confirm the README row is enough for the next reader who follows it.
  • Enum drift has one fewer home. With 0013's two-line enum now the only in-repo statement of preview.auth (plus docs/adopting-a-repo.md:40), a code change adding a fourth mode leaves it stale. Probe: rg -n "auth.*mode|previewAuthMode" packages/preview-env/src apps/server/src/preview | head and diff the accepted values against docs/adr/0013-preview-access-gate.md:3,11-15.

Unverifiable from here

Out-of-repo citations (commit messages, merged PRs, GitHub issues) that still reference ADR-0007/0009/0010/0011/0012 — only in-repo citations are visible in a checkout; likewise whether the Map: <destination> convention still matches the live GitHub map issue, and whether bun run test:e2e (Docker) is green, which this docs-only delta cannot affect.

Round-7 finding 1: drop the hand-synced invocation-mode enumeration
from .agents/README.md (it listed 5 of 9 disable-model-invocation
skills, misrouting the 4 omitted ones under the generic line). Mode
is now stated once at :3 ('invoke as each skill's frontmatter
allows'); routing list carries no mode claim. Fold the unheaded
/setup-matt-pocock-skills trailing sentence into the tracker bullet.
@simpros

simpros commented Oct 29, 2026

Copy link
Copy Markdown
Owner Author

🧊 Thermo-nuclear review (round 8) — REQUESTCHANGES · 6ebcf410

  • Findings
  • Residual risks
  • Unverifiable from here
Full report (click to expand)

VERDICT: REQUEST CHANGES

Envelope: HEAD is 6ebcf410ba4a21ee37abad044b338b13eb4a5303 as required. Full diff vs origin/main is 27 files, +94/−896, docs/tooling only (one test-name edit, no source behavior change). The round-8 delta itself (b38e7a0..HEAD) is one file, .agents/README.md, +2/−7. Gates on this tree: bun run docs:check OK, bun run test:guards 135 pass / 0 fail. So the delta is not breaking a gate; the finding below is a design regression inside that delta.

Findings

  1. .agents/README.md:12 — the delta deleted the only clause that made this file's invocation advice true, and left the sentence that contradicts frontmatter. Blocker.
    The round-7 remedy was "drop the mode enumeration, let frontmatter own invocation." The delta dropped the bucket heading but kept Everything else in .agents/skills/ is generic; invoke from its own description. and deleted the parenthetical (or explicitly, where its frontmatter disables model invocation). Result: four vendored skills that set disable-model-invocation: true — grill-with-docs, handoff, implement, improve-codebase-architecture (verified in their frontmatter) — are classified as "generic" and explicitly invited for self-invocation at exactly the moment a model would try (handoff at end of session, improve-codebase-architecture on "improve this module"). Line 3 ("invoke as each skill's frontmatter allows") already carries the true rule, so line 12 is a second, false statement of a fact owned elsewhere. This is the same class that has now fired in three consecutive rounds; the delta narrowed it instead of deleting it.
    Remedy: delete line 12 outright. The file becomes intro + six routing bullets and contains no invocation-policy statement at all — no future vendored skill can make it wrong. Do not "fix" it by re-listing the four missing skills; that restores the hand-synced mirror that broke in rounds 6 and 7.

  2. CODE-STYLE.md:18 — Inline comments: one line is a rule the tree already violates 44 times across 27 files; the rulebook is wrong on the day it lands. Medium.
    Concrete counterexamples: apps/server/src/index.ts:40-41 and :56-58, packages/preview-env/src/mail.ts:99-101 (one sentence wrapped over three lines), apps/cli/src/yaml.ts:390-391, apps/server/src/config.ts:216-217, :437-439. These are exactly the comments rule 17 asks for ("keep real whys"), so the two rules fight each other. A rule that every reviewer must ignore to review existing code is worse than no rule: it teaches that CODE-STYLE.md is aspirational prose, and the next agent doing a "style cleanup" will collapse 44 readable comments into unreadable long lines.
    Remedy: state the unit as a claim, not a physical line — e.g. Inline comments: one claim; wrap as needed. More than a sentence becomes a docstring, CONTEXT.md, or an ADR. Same intent, matches the tree, zero churn.

No other structural findings on the full diff: AGENTS.md lost nothing load-bearing (all pointers resolve — CODE-STYLE.md, CONTEXT.md, docs/adr/, docs/agents/issue-tracker.md, .agents/skills/visual-pr/, .agents/README.md), the retired-ADR rows point at paths that exist (docs/adopting-a-repo.md, apps/server/src/app-deployment/label-collisions.ts, docs/site/assemble.ts, packages/preview-env/src/db.ts, docs/onboarding-prompt.md), docs/adopting-a-repo.md:28,44,72-79 really does carry the folded preview.env / db.roles contract, apps/server/src/http/deploy.ts:208 really does carry the postgres_not_configured boundary claim in CODE-STYLE.md:6, and no ADR number survives in apps//packages/ comments or test names, so CODE-STYLE.md:15 is true today.

Residual risks

  • A model self-invokes a user-only skill and is refused, stalling the turn (handoff, implement, improve-codebase-architecture, grill-with-docs). Probe: prompt "hand off this session" in a fresh session and check whether the harness attempts handoff and errors.
  • Vendored reinstall re-creates /setup-matt-pocock-skills, making .agents/README.md:9's fallback claim describe a command that now resolves on its own. Probe: npx skills add mattpocock/skills … then ls .agents/skills/setup-matt-pocock-skills; if present, drop the parenthetical instead of keeping a mapping for a live command.
  • Retired-ADR pointers rot silently — docs:check excludes docs/adr and the pointers are code spans, not hrefs. Probe: rg -o '\(apps|packages|docs)/[A-Za-z0-9_./-]+.(ts|md)`' docs/adr/README.md | tr -d '`' | while read p; do test -e "$p" || echo "BROKEN $p"; done`.
  • The five tracker labels drift from GitHub, since docs/agents/issue-tracker.md:5 is now the only statement of them. Probe: gh label list --json name --jq .[].name and diff against that line.
  • Comment-style enforcement churns code it should not touch if someone applies CODE-STYLE.md:18 literally. Probe: git diff <next PR> -- '*.ts' | rg '^\+\s*//' and check for comments collapsed onto one line.

Unverifiable from here

Out-of-repo citations to ADR-0007/0009/0010/0011/0012 (commit messages, merged PRs, issues) that now 404; whether each harness in use actually enforces disable-model-invocation; and bun run test:e2e (needs Docker), which this docs-only delta cannot affect.

@simpros

simpros commented Oct 29, 2026

Copy link
Copy Markdown
Owner Author

⚠️ round 8 on this MR without converging — the auto-fix loop keeps kicking (by rule); a human should read the findings trail.

Round-8: drop the generic-invocation sentence in .agents/README.md so
frontmatter owns invocation policy; restate the inline-comment rule as
one claim (wrap as needed) to match the tree.
@simpros

simpros commented Oct 29, 2026

Copy link
Copy Markdown
Owner Author

🧊 Thermo-nuclear review (round 9) — REQUESTCHANGES · a7206299

  • Findings
  • Residual risks
  • Unverifiable from here
Full report (click to expand)

VERDICT: REQUEST CHANGES

Envelope: HEAD is a7206299c54a65910e51e896892560828425a31e exactly as required (did not move). Diff vs origin/main is 27 files, +92/−896, docs/tooling only (one test-name edit, no runtime code). Gates on this tree: bun run docs:check → OK; bun run test:guards → 135 pass / 0 fail. Round-8's two findings are genuinely fixed at HEAD (.agents/README.md no longer carries a second, false invocation-policy sentence; CODE-STYLE.md now says "one claim; wrap as needed"). Deleting ~900 lines of hand-synced agent docs is the right direction. What blocks approval is that this MR deletes the only record of one silent-failure invariant, and replaces a deleted setup skill with a name-drop that five vendored skills still point at.

Findings

  1. docs/adr/README.md:20 (+ deleted docs/adr/0012-preview-db-roles-opt-in.md) — the retirement has no canonical home, and the invariant it deletes fails silently. Medium-high — blocker.
    The row points at docs/adopting-a-repo.md (db.roles contract) and packages/preview-env/src/db.ts. Verified: adopting-a-repo.md:44,72-79 carries the contract (derivation, conflict error), and preview-env/src/db.ts:182 carries the resolver. Neither carries the thing ADR-0012 existed to record: validation is mode-scoped (apps/server/src/preview-db/names.ts:46) while the catalog read path is deliberately permissive at the full identifier budget (names.ts:56, names.ts:71) so flipping a repo to single never makes existing previews unlistable or undeletable; and dropRestrictedRole drops the companion role unconditionally (packages/preview-db/src/restricted-role.ts:56-66) for previews created while dual. names.ts:11 comments the single-mode side only; nothing explains why reads use PREVIEW_DB_NAME_MAX_SINGLE regardless of the row's roles. Tightening those two comparisons to PREVIEW_DB_NAME_MAX reads like an obvious consistency cleanup and would orphan long-named previews with no error. This is exactly what the new docs/adr/README.md:3-5 criterion ("hard to reverse and hard to understand") exists to keep.
    Remedy: keep the rationale but not the file — fold the roles/invariant bullets into docs/adr/0008-preview-db-providers.md (same DB axis, already folds 0009) and put the why where the constant lives, as a one-line docstring on isPreviewDbName/parsePreviewDatabaseName (names.ts:53,66) stating that reads are permissive at PG_IDENT_MAX on purpose so a mode flip cannot strand historical rows. Then the 0012 row's pointers are true.

  2. .agents/README.md:9 — the MR deletes /setup-matt-pocock-skills but keeps its name alive as a shim in the one file an agent reads after it has already been told the wrong thing. Medium — blocker.
    Five vendored skills still emit the instruction: .agents/skills/to-spec/SKILL.md:9, to-tickets/SKILL.md:11, triage/SKILL.md:43, wayfinder/SKILL.md:25, code-review/SKILL.md:13 ("tell the user to run /setup-matt-pocock-skills"). Those texts are hash-locked (skills-lock.json), so they legitimately cannot be edited — but that means the mapping must live at the point of use, not in an index the failing agent may never open. As written, a triage run tells the user to run a command that no longer exists, and the explanation is one README bullet away.
    Remedy: one line at the top of docs/agents/issue-tracker.md — "This file is what /setup-matt-pocock-skills would have generated; when a skill asks for that setup, read this file instead" — then delete the parenthetical from .agents/README.md:9. The dead name appears exactly once, in the file the dead instruction resolves to, and the README goes back to being a pure index. (Also satisfies triage/SKILL.md:43's "the mapping should have been provided to you": the label list at issue-tracker.md:5 is that mapping here.)

  3. docs/adr/README.md:18 — retirement pointer goes to implementation instead of the page that already owns the contract. Low-medium.
    docs/previews.md § Preview labels already states the whole 0010 decision in consumer terms: reserved_preview_label quoting the manifest path (previews.md:227), literal values with no {pr_id} interpolation, and the seed container carrying no adopter labels. The row instead sends the reader to apps/server/src/app-deployment/label-collisions.ts, a file that can be renamed or split without anyone thinking about ADR-0010. Same class applies to :19 (assemble.ts publishFiles).
    Remedy: point retired rows at stable documents (docs/previews.md#preview-labels-adopter-supplied-container-labels, docs/onboarding-prompt.md) and keep the code seam as a trailing note only where it is the actual decision ("reserved set derived from the emission seam"). Retired rows are now a hand-maintained ledger outside the link gate (docs:check excludes docs/adr/), so every path in it is unreferenced, unchecked prose that rots on the next move.

  4. docs/adr/0002-shared-logical-databases.md:4 — the pruning stopped one file short of its own claim. Low.
    This MR rewrites ADR-0006 to assert every durable name carries sprout (sprout_<slug>_pr<id>, 0006:4-6), while ADR-0002 — three rows up the same index — still says prev_<slug>_pr<id>. A docs-truth pass that leaves the ADR set contradicting itself on the one fact it just restated is not finished.
    Remedy: one-word edit in 0002 (sprout_<slug>_pr<id>), or a "names superseded by 0006" clause if 0002 is meant to be historical.

No other structural findings. Everything else checks out: no dangling references to the deleted docs/agents/{domain,triage-labels,pull-requests,comment-style}.md anywhere in .agents/, scripts/, .github/ or the site corpus (only issue-tracker.md is read by vendored skills, and it survives); all confirmed pointer targets exist (docs/adopting-a-repo.md, apps/server/src/app-deployment/label-collisions.ts, packages/preview-env/src/db.ts, docs/site/assemble.ts, docs/onboarding-prompt.md); postgres_not_configured and SPROUT_PREVIEW_AUTH_* still live in docs/previews.md / docs/operator-deploy.md / .env.example, so dropping them from ADR-0008/0013 loses only restatement; the label vocabulary folded into issue-tracker.md:5 was already an identity table before deletion, so nothing was lost.

Residual risks

  • Long-named previews become unlistable/undeletable after a single→dual flip if someone "simplifies" the read path now that ADR-0012 is gone. Probe: create a single preview with a 63-char db name, flip the repo to dual, run sprout list and sprout teardown — the row must still appear and drop.
  • Companion role leaks on teardown for a preview created while dual after the repo flips to single. Probe: after teardown, psql -c "\du" | rg '_app' on the preview cluster — no <dbName>_app LOGIN may survive.
  • A triage/to-spec/wayfinder run dead-ends on /setup-matt-pocock-skills in a harness that does not read .agents/README.md first. Probe: fresh session, ask "triage the open issues"; check whether the agent reads docs/agents/issue-tracker.md or asks the user to run a nonexistent command.
  • Retired-ADR pointers rot silently — they are code spans in a tree docs:check excludes. Probe: rg -o '\(apps|packages|docs)/[A-Za-z0-9_./-]+.(ts|md)`' docs/adr/README.md | tr -d '`' | while read p; do test -e "$p" || echo "BROKEN $p"; done`.
  • Tracker labels drift from GitHub, now that docs/agents/issue-tracker.md:5 is the sole statement of them. Probe: gh label list --json name --jq .[].name and diff against that line.

Unverifiable from here

Out-of-repo citations to ADR-0007/0009/0010/0011/0012 (commit messages, merged PRs, issue threads) that now resolve to nothing, whether the wayfinder title convention in docs/agents/issue-tracker.md:11 matches the issues actually on simpros/sprout (needs gh + network), and whether each harness in use honours disable-model-invocation for the four user-only skills.

round-9: fold db.roles read-permissive invariant into ADR-0008 plus
names.ts docstrings; move setup-skill shim to issue-tracker.md; point
retired ADR rows at stable docs; fix 0002 sprout_ prefix
@simpros

simpros commented Oct 29, 2026

Copy link
Copy Markdown
Owner Author

🧊 Thermo-nuclear review (round 10) — REQUESTCHANGES · 710e8247

  • Findings status
  • New findings
  • Residual risks
  • Unverifiable from here
Full report (click to expand)

VERDICT: REQUEST CHANGES

Envelope: HEAD is 710e824710b11cece45ebbfca841e59e6253a22e exactly as required. Delta vs a720629 is 6 files, +16/−5 — one comment pair in apps/server/src/preview-db/names.ts, five doc edits; no rebase, no merge, no file unrelated to round-9's findings. So this is a pure findings-response delta (step 3 satisfied) and I reviewed it as such. Gates on this tree: bun run docs:check → links OK; bun run test:guards → 135 pass / 0 fail; bun test apps/server/src/preview-db/ → 31 pass / 0 fail. Round-9 findings 2, 3 and 4 are genuinely gone. Finding 1 is half fixed, and the half that landed records the invariant backwards.

Findings status

  1. docs/adr/README.md:20 / deleted ADR-0012 — PARTIALLY ADDRESSED. The rationale now exists in both places round 9 asked for: docs/adr/0008-preview-db-providers.md:20-25 ("db.roles selects the Postgres credential axis … Name validation is mode-scoped … while catalog reads stay permissive at the full identifier budget …") and two docstrings at apps/server/src/preview-db/names.ts:53 and :67. But the direction of the flip is inverted in both the ADR clause and the first docstring (see New finding 1); the invariant that ADR-0012 existed to protect is therefore recorded as a claim about the flip that cannot strand rows, and the flip that can is not mentioned.
  2. .agents/README.md:9 — ADDRESSED. The parenthetical is gone; the index line now reads - \to-spec`, `to-tickets`, `triage`, `wayfinder` — tracker-backed workflow (see `docs/agents/issue-tracker.md`)., and the mapping lives at the point of use: docs/agents/issue-tracker.md:3"This file is what/setup-matt-pocock-skills would have generated; when a skill asks for that setup, read this file instead." Verified repo-wide: outside review reports, the dead command now appears only on that one line, and all five vendored skills still resolve to a real file (code-review/SKILL.md:13names the path itself;to-spec:9, to-tickets:11, triage:43, wayfinder:25all land on the file that now explains itself). Also satisfiestriage/SKILL.md:43's "mapping should have been provided" via issue-tracker.md:7`.
  3. docs/adr/README.md:18 — ADDRESSED. Rows now point at stable documents, not implementation: :18 → docs/previews.md, whose § Preview labels (docs/previews.md:197) does state the whole 0010 decision in consumer terms, including the exact claim quoted in the row ("The reserved set is derived from the gateway's label emission", previews.md:230); :19 → docs/onboarding-prompt.md with docs/site/assemble.ts publishFiles demoted to a trailing parenthetical (verified real: docs/site/assemble.ts:181); :20 → ADR-0008 + docs/adopting-a-repo.md. The 0011 target is thinner than 0010's, but the parenthetical names the page set's actual owner and the prompt is the surviving deliverable, so I'm not re-litigating what round 9 itself proposed.
  4. docs/adr/0002-shared-logical-databases.md:4 — ADDRESSED. Now sprout_<slug>_pr<id>, consistent with ADR-0006:5 and with PREVIEW_DB_NAME_RE/previewDbName (names.ts:6,53). The only remaining prev_ strings in docs/ are explicitly labelled legacy (0006:5, docs/operator-deploy.md:815), which is correct.

New findings

  1. apps/server/src/preview-db/names.ts:53 and docs/adr/0008-preview-db-providers.md:23-24 — the restored invariant is documented in the wrong direction, which is the exact failure it was written to prevent. High — blocker.
    names.ts:53 says "a repo flipped to single must still list and drop previews created while dual". ADR-0008 says "so flipping a repo to single never makes existing previews unlistable or undeletable". Both are false as causes:
    • dual reserves less budget (PREVIEW_DB_NAME_MAX = PG_IDENT_MAX - 4, names.ts:9), so every name created while dual is comfortably inside the single budget. Flipping to single strands nothing, whether reads are permissive or not.
    • The only row that can exceed the tighter budget is one created while single (up to PG_IDENT_MAX, names.ts:12,46). It strands if the repo later flips to dual and someone tightens the two read comparisons (names.ts:57, :73) to PREVIEW_DB_NAME_MAX, because the read path takes no mode and cannot know the row's creation mode.
      The one test that pins this behaviour is direction-agnostic in its name ("catalog read stays permissive at PG_IDENT_MAX across a mode flip", names.test.ts:47) and constructs exactly a single-budget-length name that dual validation rejects (names.test.ts:41-53) — i.e. the code proves the flip is single→dual, and the prose says dual→single. This is not a wording quibble: the paragraph's only job is to stop a future "consistency cleanup" (round 9's finding 1), and its current wording licenses that cleanup ("permissive reads exist for a flip to single; a flip to single is directionally looser; therefore the permissiveness is unnecessary"). Additionally it violates the repo's own rule CODE-STYLE.md:19,20 — "one invariant … a comment that contradicts the code is a bug; fix one of them." The invariant also now appears three times (0008:20-25, names.ts:53, names.ts:67) and the three do not agree.
      Remedy: state it once, direction-correct, where the constant is — one docstring on the pair of read functions: "Reads take no mode: a row created while single may run to PG_IDENT_MAX, so list/teardown must accept the full budget or a later flip to dual strands it." Then have ADR-0008 carry the same single clause (or drop the restatement and point at isPreviewDbName/parsePreviewDatabaseName), and split off the teardown claim, which is the dual→single direction and currently gets smeared into the same sentence: "teardown drops the companion role unconditionally, so a preview created while dual still cleans up after the repo flips to single." While in 0008:21, name the owning package (@sprout/preview-env resolveDbRoles) — a bare symbol in a tree docs:check excludes is greppable but not anchored.

No other structural findings. The delta adds no runtime behaviour (names.ts change is comment-only), no new branching, no new abstraction, and no file-size movement.

Residual risks

  • The inverted docstring is the only thing guarding a deliberate asymmetry, and no test asserts the direction. Probe: temporarily rewrite names.ts:57 and :73 to PREVIEW_DB_NAME_MAX — bun test apps/server/src/preview-db/ still tells you a flip matters, never which one, so the prose bug survives any test run.
  • Long-named previews become unlistable/undeletable after a single→dual flip if a reader acts on the new wording. Probe: create a single preview whose db name is 63 chars, flip the repo to dual (preview.env remap for PGAPPUSER), then sprout list and sprout teardown — the row must still appear and drop.
  • Companion role survives teardown for a preview created while dual after the repo flips to single; the ADR now asserts this, and it holds only because postgres.ts:62-65 drops unconditionally. Probe: after teardown, psql -c "\du" | rg '_app' on the preview cluster — no <dbName>_app LOGIN may remain.
  • A to-spec/to-tickets/triage run dead-ends on /setup-matt-pocock-skills in a harness that never opens docs/agents/issue-tracker.md (only code-review/SKILL.md:13 names the path; the other four say "should have been provided"). Probe: fresh session, "triage the open issues", and watch whether the agent reads issue-tracker.md:3 or asks for a command that no longer exists.
  • Retired-ADR pointers still rot silently — docs/adr/ is outside the link gate. Probe: rg -o '\(apps|packages|docs)/[A-Za-z0-9_./-]+.(ts|md)`' docs/adr/README.md | tr -d '`' | while read p; do test -e "$p" || echo "BROKEN $p"; done`.

Unverifiable from here

Out-of-repo citations to ADR-0007/0009/0010/0011/0012 (commit messages, merged PRs, issue threads) that now resolve to nothing, whether the label list at docs/agents/issue-tracker.md:7 still matches the labels on simpros/sprout, and whether each harness in use honours disable-model-invocation for the user-only skills.

Correct the db.roles read-budget invariant direction (round 10): reads
are permissive so a single-era row survives a later flip to dual, not
the reverse. Teardown direction split into its own sentence; name the
owning package for resolveDbRoles.
@simpros

simpros commented Oct 29, 2026

Copy link
Copy Markdown
Owner Author

🧊 Thermo-nuclear review (round 11) — APPROVE · 1429aa30

  • Findings
  • Residual risks
  • Unverifiable from here
Full report (click to expand)

VERDICT: APPROVE

Envelope: HEAD is 1429aa3088603fa7f459513233e0b1d535c7b8c9, exactly the commit the brief requires. Whole-MR diff vs origin/main (merge-base 738c5f1) is 29 files, +104/−895: 26 doc/skill files, one comment-only names.ts change, one test-name change. Delta since round 10 (710e824..HEAD) is 2 files, +9/−7 — the direction fix in names.ts and ADR-0008, nothing else. Gates on this tree: bun run typecheck green (turbo 5/5, docs:check links OK, both tsc projects clean), bun run test:guards 135 pass / 0 fail, bun test apps/server/src/preview-db/ 31 pass / 0 fail.

Round 10's single blocker is fixed correctly and completely. The invariant now reads in the direction the code actually behaves: single validates up to PG_IDENT_MAX (names.ts:12,46), dual to PG_IDENT_MAX - 4 (:9), and the read path takes no mode and uses PREVIEW_DB_NAME_MAX_SINGLE (:57, :73) — so the only stranding flip is single → dual, which is what names.ts:53 and docs/adr/0008-preview-db-providers.md:24-25 now say. The teardown clause is correctly split out as the opposite direction and is true in code (apps/server/src/preview-db/postgres.ts:62-66 calls dropRestrictedRole unconditionally, and packages/preview-db/src/restricted-role.ts:65 is DROP ROLE IF EXISTS). The @sprout/preview-env owner is named for resolveDbRoles (packages/preview-env/src/db.ts:182), so the bare-symbol gap is closed. Everything else I could re-verify independently holds: all backticked paths in docs/adr/ resolve (0 broken of the apps|packages|docs/*.{ts,md} set), docs:check passes, no ADR number survives in apps//packages/ comments or test names, CODE-STYLE.md's fail-fast claim matches apps/server/src/http/deploy.ts:208, and every fact ADR-0013 and ADR-0008 dropped from their bodies survives on the consumer side (docs/previews.md:546 § Preview access with /__sprout/auth?t= at :569 and the X-Forwarded-Host rationale at :595, docs/operator-deploy.md:596-597 for the SPROUT_PREVIEW_AUTH_* pair, docs/adopting-a-repo.md:43-44 for db.provider/db.roles).

Findings

No structural findings. The MR is a removal-only refactor: it deletes ~790 lines of vendored setup boilerplate, retired ADRs and duplicate agent docs, re-points every surviving reference at a file that exists, and replaces the deleted comment-style page with one canonical CODE-STYLE.md. No file grows, no control flow is added, no new abstraction or wrapper is introduced, and the only code change is two docstrings plus one test name. The right file sizes all fell rather than grew (names.ts 75 lines; AGENTS.md 42; CODE-STYLE.md 20).

One non-blocking observation, not a blocker and not worth another round:

  • apps/server/src/preview-db/names.ts:67 — /** Same permissive budget as isPreviewDbName (see above): reads take no mode. */ is a third copy of an invariant already stated at :53 and docs/adr/0008-preview-db-providers.md:22-25. It adds a drift site and a "see above" hop for a function 13 lines below its sibling; the rubric's rule against thin restatements and CODE-STYLE.md:16 ("one invariant") both point the same way. Remedy: delete the docstring on parsePreviewDatabaseName — the name, the shared constant and the docstring on isPreviewDbName already carry it. This is a two-line deletion if the file is touched again, not a reason to hold the MR.

Residual risks

  • The single → dual asymmetry is documented, not asserted. Probe: temporarily rewrite names.ts:57 and :73 to PREVIEW_DB_NAME_MAX and run bun test apps/server/src/preview-db/ — if it stays green, prose is the only thing guarding the deliberate permissiveness.
  • The invariant now lives in three places and can drift again. Probe: rg -n 'PG_IDENT_MAX|full identifier budget|full budget' apps/server/src/preview-db/names.ts docs/adr/0008-preview-db-providers.md and confirm the clauses still agree after any future edit.
  • Retired ADR numbers dangle outside the repo. Probe: gh search issues 'ADR-0012' -R simpros/sprout and git log --oneline | rg 'ADR-000[79]|ADR-001[012]' — commit messages and issue threads still cite files that no longer exist; docs/adr/README.md:15-20 is the only in-repo tombstone.
  • A tracker-driven skill run dead-ends on /setup-matt-pocock-skills in a harness that never opens docs/agents/issue-tracker.md (only .agents/skills/code-review/SKILL.md:13 names the path; to-spec:9, to-tickets:11, triage:43, wayfinder:25 say "should have been provided"). Probe: fresh session, "triage the open issues", watch whether the agent reads issue-tracker.md:3 or asks for a command that no longer exists.
  • A vendored-skill reinstall resurrects what the MR deleted. Probe: npx skills add mattpocock/skills then git status — .agents/skills/setup-matt-pocock-skills/ and its skills-lock.json entry returning would make docs/agents/issue-tracker.md:3 stale, and the reinstall can re-add the docs/agents/* pages this MR retired.

Unverifiable from here

Out-of-repo citations to retired ADR-0007/0009/0010/0011/0012 (commit messages, merged PRs, issue threads), whether the label list at docs/agents/issue-tracker.md:7 still matches the labels actually present on simpros/sprout (needs gh + network), and whether each harness in use honours disable-model-invocation for the user-only skills.

@simpros
simpros merged commit 0edfd53 into main Oct 29, 2026
2 checks passed
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.

1 participant