Skip to content

Fix documentation drift across the three sources of truth - #57

Merged
dmccoystephenson merged 3 commits into
mainfrom
fix/doc-accuracy-sweep
Jul 25, 2026
Merged

dmccoystephenson merged 3 commits into
mainfrom
fix/doc-accuracy-sweep

Conversation

@dmccoystephenson

@dmccoystephenson dmccoystephenson commented Jul 25, 2026 •

Copy link
Copy Markdown
Member

What

A Stage A — documentation accuracy sweep cycle. The open-issue backlog was empty at triage, so this cycle swept all three documentation sources of truth against actual source. Four drifts found and fixed; a fifth deferred as #56.

1. create-dev-loop.md Phase 1 — hardcoded anchor name

create-dev-loop.md:159 (inside the embedded template) read:

If the PR is still valid (tests green, no conflicts) … perform the Phase 4 self-review now (CI must be green first)

PR #28 replaced the hardcoded CI anchor with {{EXTERNAL_SIGNAL_LABEL}} throughout the template, and its test plan verified that every remaining "CI" mention was a use of CI as a source of repo info rather than as the universal anchor name. This line was added afterwards by PR #54 (issue #40's Phase 1 self-review backfill), reintroducing the hardcoded form. Now uses {{EXTERNAL_SIGNAL_LABEL}} on both mentions, matching the idiom already used at Phase 4 step 1 ("Wait for {{EXTERNAL_SIGNAL_LABEL}} to be green") and in the same bullet list three lines below.

Observable effect of the drift: the existing create-dev-loop-dev-loop skill renders this line as "manual validation must be confirmed first" — the generator had to improvise a substitution the template never asked for.

2. RESEARCH.md — two shipped PRs missing Implementations entries

CLAUDE.md requires that a PR implementing a RESEARCH.md finding record an Implementations entry under it. Two merged PRs cite findings in their bodies and have no entry:

Both entries follow the documented format (PR number, one-line summary, ship date from gh pr list, observed-effect placeholder) and are inserted in PR-number order within their lists.

3. RESEARCH.md — literal \" escaping artifacts

The §3 (PR #31) and §7 (PR #29) Implementations entries contained \"Localization verification\" and \"Record skip reasons\" — heredoc-escaping leftovers that render as visible backslashes. Unescaped.

4. README.md — three Step-description inaccuracies

  • Step 3 named only <!-- template-version: <sha> -->; create-dev-loop.md Step 3 and CLAUDE.md both require <!-- generated-at: <iso8601> --> alongside it.
  • Step 6 omitted the gap-issue label seeding that Step 6 actually performs (the five-label gh label create loop).
  • "Generated skill structure" omitted the external signal anchor, which PR Generalize Phase 4 external-signal step to support no-CI repos #28 made a per-repo encoded choice and is the thing the whole self-review rubric hangs off.

Step count is unchanged (still seven, 1:1 with Steps 1–7), so no README enumeration restructuring was needed.

Deferred

  • COMPILE_CMD/TEST_CMD assume a runnable test suite exists #56 — COMPILE_CMD/TEST_CMD assume a runnable test suite exists. Found in the same sweep. Deferred because fixing it properly is a template design change (a new conditional or placeholder), not doc drift — and Stage A explicitly says to fix the highest-value subset and file an issue for the rest.

No other issues were open at triage, so there is no other backlog to record skip reasons for.

Research grounding

  • §2 (agent PR failure modes) — documentation fixes sit at the top of the Phase 2 tiebreaker's merge-rate gradient; this is the work-mode that gradient recommends for an empty backlog. Diff is 3 files / 16 net lines, far inside the ~400 LOC / ~10 file ceiling.
  • §1 (self-critique needs an external signal) — finding 1 grounds why the Phase 1 fix matters rather than being cosmetic: an anchor named "CI" in a repo with no CI is an anchor the loop cannot actually check, which degrades to the unanchored self-critique this finding shows is neutral-to-harmful.
  • §8 (prompt/model drift) — the missing Implementations entries are exactly the "close the loop between research-grounded predictions and what we actually see" mechanism; entries silently absent make later observed-effect review impossible.

Test plan / validation

  • grep -oE '\{\{...\}\}' create-dev-loop.md | sort -u — token set unchanged from main; no new placeholder introduced, so no new Step 4 table row needed. {{EXTERNAL_SIGNAL_LABEL}} already has a row.
  • Fence-escaping invariant intact — the only fence lines in the template region (109–549) are the outer \``markdown/```pair; every internal fence still opens with the escaped\```. The create-dev-loop.md` change is one prose line and touches no fence.
  • Phase numbers unchanged (1–10), so edge-case cross-references by number still resolve.
  • README "What it does" still enumerates exactly Steps 1–7, 1:1 with create-dev-loop.md.
  • template-version / generated-at comments still sit directly below the # <slug>-dev-loop H1 in the template (lines 110–113), unchanged.
  • Every claim above verified against source or gh pr view, not from memory — PR Generalize Phase 4 external-signal step to support no-CI repos #28 and Add documentation-accuracy and unit-test-expansion work-mode stages to Phase 2 #52 bodies were read to confirm they cite findings; ship dates taken from gh pr list.
  • External anchor: UNVERIFIED. See below.

Anchor status: UNVERIFIED — human validation required

This PR modifies the embedded template, so per the template's own Phase 4 rule the manual-validation anchor is required, not optional. It could not run in this session: the anchor is /create-dev-loop against a real target repo, which writes to ~/local-skills/, symlinks into ~/.claude/commands/, and (in fresh mode) creates a GitHub repo — side effects outside this repo that a headless run should not perform unasked.

create-dev-loop.md is also on this repo's do-not-auto-merge list per CLAUDE.md ("this file is the product"). So this PR is deliberately left open for human review on two independent grounds.

What a human should do to clear the anchor: run /create-dev-loop in MODE=update against a repo whose EXTERNAL_SIGNAL_LABEL is not CI (e.g. this repo itself, or another docs-only repo) and confirm the Phase 1 bullet now renders the repo's own anchor label instead of a hand-improvised substitution.

The README.md and RESEARCH.md changes are docs-only and anchor-not-applicable; only the one-line create-dev-loop.md change carries the gate.


This PR description was drafted during a Gardener session (Stephenson-Software/gardener).

dmccoystephenson and others added 2 commits July 25, 2026 10:44
Stage A documentation-accuracy sweep findings:

- create-dev-loop.md Phase 1 hardcoded "tests green" / "CI must be green
  first" where the rest of the template uses {{EXTERNAL_SIGNAL_LABEL}};
  drift introduced after PR #28 generalized the anchor
- RESEARCH.md was missing Implementations entries for PR #28 (cites §1)
  and PR #52 (cites §2 and §3), which CLAUDE.md requires
- RESEARCH.md carried literal \" heredoc-escaping artifacts in the §3 and
  §7 Implementations entries
- README Step 3 named only template-version, omitting generated-at;
  Step 6 omitted the gap-issue label seeding; the generated-skill
  structure list omitted the external signal anchor

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Self-review rubric caught the omission: a PR whose purpose is to backfill
missing Implementations entries must not itself omit one.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@dmccoystephenson

dmccoystephenson commented Jul 25, 2026 •

Copy link
Copy Markdown
Member Author

Self-review rubric

Scored adversarially against the diff and command output, not judgment.

Item Score Evidence
Scope PASS gh pr diff 57 --name-only → exactly README.md, RESEARCH.md, create-dev-loop.md — the three documentation sources of truth this Stage A cycle swept. No unrelated formatting, renames, or comment churn. A scratch file used to build this PR body was written into the working tree and removed via git clean -f -x before it could be staged; git status --short is empty.
Tests-new N/A No script or tool with testable behavior added. This repo has no automated test suite (CLAUDE.md, "Testing changes").
Tests-fix (empirical) PASS The before/after analog of stash-and-run, done with git grep against both refs rather than reasoning. All four drift markers present on main, absent on HEAD; both backfilled entries absent on main, present on HEAD. Output below.
Sibling structure N/A No new files created.
Sibling renames PASS The two hardcoded anchor mentions on create-dev-loop.md:159 are a parallel pair inside one bullet; both were changed in the same commit, not one of them.
Docs PASS All three rows of the Phase 7 table are the files this PR edits, and each was re-verified against the other two after editing. CLAUDE.md (the 4th source) is unaffected — no Step, phase number, placeholder, or convention it describes changed.
Issue resolution N/A No Closes #N by design; noted in the PR body under "Tracking issues". #56 is filed, not claimed as resolved.
Placeholder table completeness PASS Token set from grep -oE '\{\{#?/?if ?[A-Za-z_]+\}\}|\{\{[A-Za-z_/]+\}\}' | sort -u is byte-identical to main. No placeholder added; {{EXTERNAL_SIGNAL_LABEL}} already has its Step 4 row (line 569).
Fence escaping intact PASS ^\s*\\?```` inside the template region (109–549) matches only the outer ```markdownat 109 and its close at 549 — same asmain`. Every internal fence keeps its leading-backslash escape. The one-line change touches no fence.
README/Step 1:1 PASS No Step added, removed, or renumbered. README still enumerates exactly 7, matching Steps 1–7.
RESEARCH.md citation PASS PR body cites §1, §2, and §8, and the deferred issue #56 explicitly states no finding speaks directly to build-command modeling rather than reaching for one.
manual validation UNVERIFIED Not green, and not claimed green. See below.

Empirical before/after evidence

git grep on origin/main — all four drifts present:

origin/main:create-dev-loop.md:159:  ... (tests green, no conflicts) ... (CI must be green first) ...
origin/main:RESEARCH.md:91:         ... Adds a Phase 3 \"Localization verification\" step ...
origin/main:RESEARCH.md:175:        ... Adds a Phase 1 \"Record skip reasons\" instruction ...

Neither PR #28 (Generalize nor PR #52 (Add documentation matched anywhere on main.

Same patterns on HEAD — the three drift markers return no matches, and the backfilled entries appear at RESEARCH.md:46 (§1, PR #28), :70 (§2, PR #52), :94 (§3, PR #52), plus :48 (§1, PR #57).

One FAIL found and fixed during this pass

Missing Implementations entry for this PR. The first commit backfilled Implementations entries for two PRs that had omitted them — while itself omitting one, which CLAUDE.md requires of any PR implementing a RESEARCH.md finding. This PR's §1 grounding is substantive (the Phase 1 anchor-label fix is a refinement of finding 1's external-signal requirement), so an entry was owed. Fixed in 5f7a166 and re-scored; items that already passed were not re-scored.

Anchor: UNVERIFIED — not merged, handed to a human

The manual-validation anchor is required here, not waivable, because the diff touches the embedded template. It could not run in this session: the anchor is /create-dev-loop against a real target repo, which writes outside this repo (~/local-skills/, ~/.claude/commands/, and a GitHub repo in fresh mode) — side effects a headless run should not take unasked. Per the Phase 4 UNVERIFIED rule this is marked, not papered over.

create-dev-loop.md is independently on this repo's do-not-auto-merge list (CLAUDE.md: "this file is the product"). Two independent grounds for a human gate, so the PR is left open by design rather than as a failed cycle.

To clear the anchor: run /create-dev-loop in MODE=update against a repo whose EXTERNAL_SIGNAL_LABEL is not CI, and confirm the Phase 1 carried-over-PR bullet renders that repo's own anchor label rather than a hand-improvised substitution.

Per the one-intrinsic-pass cap, this rubric will not be re-run internally — only a reviewer comment or a failing anchor should reopen iteration.


drafted by Claude on behalf of Daniel Stephenson

The Step 4 EXTERNAL_SIGNAL_LABEL row allows a third case (a
project-specific phrase such as "snapshot regression suite"), which the
README bullet's two-way phrasing excluded.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@dmccoystephenson
dmccoystephenson merged commit 43cdcdd into main Jul 25, 2026
@dmccoystephenson
dmccoystephenson deleted the fix/doc-accuracy-sweep branch August 3, 2026 06:01
dmccoystephenson added a commit that referenced this pull request Aug 3, 2026
* Fix documentation drift across the three sources of truth

Stage A documentation-accuracy sweep findings:

- create-dev-loop.md Phase 1 hardcoded "tests green" / "CI must be green
  first" where the rest of the template uses {{EXTERNAL_SIGNAL_LABEL}};
  drift introduced after PR #28 generalized the anchor
- RESEARCH.md was missing Implementations entries for PR #28 (cites §1)
  and PR #52 (cites §2 and §3), which CLAUDE.md requires
- RESEARCH.md carried literal \" heredoc-escaping artifacts in the §3 and
  §7 Implementations entries
- README Step 3 named only template-version, omitting generated-at;
  Step 6 omitted the gap-issue label seeding; the generated-skill
  structure list omitted the external signal anchor

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Record this PR's own Implementations entry under RESEARCH.md finding 1

Self-review rubric caught the omission: a PR whose purpose is to backfill
missing Implementations entries must not itself omit one.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* Avoid implying the external signal anchor is a CI-or-manual binary

The Step 4 EXTERNAL_SIGNAL_LABEL row allows a third case (a
project-specific phrase such as "snapshot regression suite"), which the
README bullet's two-way phrasing excluded.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
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