Repository navigation
Description
Epic: graph-2026-10-fundamentals Tier: judgment Execution: sequant_run Blocked by: #1511, D-3 on #1501
Problem
F-11's table names which of the 76 prose-gate files test behaviour (execute), which guard a parsed contract (keep), and which only check that words are present (checksum). This node converts the execute class to run the command the row names and deletes the checksum class, subject to D-3. Tests live under src/, scripts/, __tests__/; no skill file is edited, so the plugin freeze is not touched. The CLAUDE.md rule still binds: a converted gate is a test that gates a claim and ships with its mutation record.
Acceptance Criteria
- AC-1: The prose-gate count falls to keep + execute. Evidence:
k=$(grep -oE '^\*\*Totals:\*\* execute ([0-9]+), checksum ([0-9]+), keep ([0-9]+)' docs/internal/graph-2026-10-fundamentals/prose-gates.md | grep -oE '[0-9]+' | awk 'NR==1{e=$1} NR==3{k=$1} END{print e+k}'); n=$(npx tsx scripts/qa/health-report.ts --json | jq .proseGate.files); [ "$n" -le "$k" ] && echo "ok $n<=$k"→ok N<=K - AC-2: Every execute-class file now spawns the command it names. Evidence:
grep -E '^\| (src|scripts|__tests__)/.*\| execute \|' docs/internal/graph-2026-10-fundamentals/prose-gates.md | awk -F'|' '{gsub(/ /,"",$2); print $2}' | xargs grep -LE 'execSync|spawnSync|execFileSync' | wc -l | tr -d ' '→0 - AC-3: No skill directory is touched (I-1). Evidence:
git diff --name-only $(git merge-base origin/main HEAD)..HEAD | grep -cE '^(plugin/|\.claude/skills/|templates/skills/)'→0 - AC-4: Every converted gate carries a mutation record. Evidence:
gh pr view --json body --jq .body | grep -c 'SEQUANT_MUTATION'→≥ <execute total> - AC-5: The suite is green. Evidence:
gh pr checks --json name,state --jq '[.[] | select(.name=="test") | .state] | unique'→["SUCCESS"] - AC-6: The baseline moves down with the PR. Evidence:
jq '.proseGate.lines < 30461' scripts/qa/health-baseline.json→true
Prior fixes / producers
Class tracked in #1511 and #1068. Producers of the gates: skill PRs under the mutation rule; this node changes tests only.
May touch
The test files F-11 lists (convert or delete), fixtures they need under __tests__/fixtures/, scripts/qa/health-baseline.json (I-4), CHANGELOG entry.
Non-Goals
- Any file under
plugin/,.claude/skills/,templates/skills/(I-1). - Deleting any keep-class gate.
- Changing the CLAUDE.md mutation rule (D-3 scopes which tests it binds; it does not edit the rule).
Done when
Every remaining prose gate either runs the skill's command or guards a parsed contract, and the suite is green.
Activity
admarble commentedon Oct 19, 2026
Runner context, 2026-10-19, before launch (fundamentals W2, beside #1504 and #1509; judgment tier, all phases on Opus; stop-at-PR). main = 23a60b3.
Inputs:
docs/internal/graph-2026-10-fundamentals/prose-gates.md(execute 12, checksum 11, keep 53). D-3 (owner): the mutation mandate binds gate tests only, and deleting a checksum gate needs no record.Watch AC-6:
proseGate.lineson main is 30,751 today, not the planning 30,461. The owner accepted rises from path-only files in feat(#1528): the issue form from the writing-issues guide becomes one template file that init writes to .github/ISSUE_TEMPLATE when the directory is absent; doctor reports its absence #1552 and refactor(#1472): one killProcessGroup(child, { graceMs }) with SIGKILL escalation; pushLines on RingBuffer (closes the AsyncSubprocess trigger) #1557.< 30461. If deleting the checksum gates does not get there, report the number honestly. Don't pad the deletions.For every phase, and the qa phase by name: run the full suite at most once, in the foreground, under
timeout, after a WIP commit. Each MCP-dispatched phase has a 30-minute wall. Prefer the targetednpx vitest run <files>for the ACs.CHANGELOG: add
[Unreleased]lines under the existing### Added/### Changedheadings, notchangelog.d/fragments, and never add a second heading of the same name.Lint: #1503 made
no-unused-vars,no-empty-object-typeandprefer-consterrors, and knip counts unused exports. Don't export what nothing imports.Health baseline: regenerate
scripts/qa/health-baseline.json(npx tsx scripts/qa/health-report.ts --write-baseline) only to record a metric that went down. Ifnpm run lint:healthreports a rise, restructure so it holds. Otherwise leave the baseline alone and name the rise in the PR body. Owner ruling: aproseGate.linesrise caused by tests in files that mentionSKILL.mdonly as a path may be absorbed, and must be said so.Freeze: nothing under
plugin/,.claude/skills/ortemplates/skills/.admarble commentedon Oct 19, 2026
Complexity: Standard (6 ACs, 5 directories)
AC Quality Check
I ran each Evidence command against
main(23a60b3):n=76,k=65).false, baseline 30,751).behavior-rule-qa-wiring,behavior-rule-spec-wiring,qa-markdown-only-ci-snippetandstacks.no-npm-fallback-gatealready containexecSync/execFileSync. They run a hand-copied snippet, not the skill's own text. The grep also accepts the token inside a comment. Tightening: each AC-4 mutation must edit the SKILL.md fence (not the test). That record is what proves the test runs the skill's own text, so AC-4 carries the real weight for these 4 files.≥ <execute total>. Read this as ≥ 12.Scope Assessment
Non-Goals: present (no skill dirs, no keep-class deletion, no CLAUDE.md rule change).
Verdict:⚠️ SCOPE_WARNING. The work is wide but mechanical, so the quality loop is on.
AC-6 projection: the 11 checksum files total 1,182 lines, so deleting them gives 30,751 − 1,182 = 29,569 < 30,461. That leaves ~890 lines of headroom for net growth in the 12 converted files. Keep the shared harness out of
*.test.tsfiles and the headroom holds.Acceptance Criteria
AC-1: prose-gate count ≤ keep + execute (65). Verification: Integration (health-report). Scenario: after deleting the 11 files →
proseGate.files= 65.AC-2: each of the 12 execute files spawns the command its row names. Verification: Integration. Assumptions: the spawn token is in the test file itself, because a helper-only spawn fails the grep (see Plan).
AC-3: zero files changed under
plugin/,.claude/skills/,templates/skills/. Verification: git diff. Mutations edit the skill and then restore it, so nothing reaches a commit.AC-4: ≥ 12
SEQUANT_MUTATIONmarkers, one per converted file.failedTeststarts with the file path. Each mutation edits the extracted fence in SKILL.md. Under D-3, deletions need no record.AC-5: the
testcheck is SUCCESS. Verification: CI.AC-6: baseline
proseGate.lines< 30461. Regenerate the baseline with--write-baselineonly once the metric has gone down. If it misses, report the number and do not pad the deletions.Implementation Plan
Phase 1: Delete the checksum class (11 files,
src/lib/__tests__/)adr-conventionalso checks docs/adr. Keep the non-skill ADR checks by moving them to a small test that has noSKILL.mdmention. Delete only the spec-skill span.Phase 2: Shared fence extractor
__tests__/helpers/skill-fence.ts(not a test file, so the metric does not count it). Its one export isskillFence(skill, headingOrAnchor, contains). It returns the fenced block's text from.claude/skills/<skill>/SKILL.mdand throws when no block or more than one block matches. A missing fence must fail loudly, not skip. Tests callspawnSync/execFileSyncthemselves on the text it returns. That keeps the spawn in the test file for AC-2, and the helper does no spawning.npx sequant→node <repo>/dist/bin/cli.js, matchinglocks-cli.integration.test.ts. Do not rewrite anything else, or the test runs a copy again.Phase 3: Convert the 12 execute files (three groups, per the F-11 findings)
SEQUANT_LOCKS_DIRset to a temp dir. Assert exit 0 and that the lock file appears and is then removed.tsx -e(behavior-rule-qa-wiring, behavior-rule-spec-wiring, qa-markdown-only-ci-snippet): replace the copied snippet constant withskillFence(...). Keep the existing fixtures and assertions.worktree verify <missing> --issue N→ exit 1.run <N> --dry-run(see OQ-2).[ -f ... ]chain in temp dirs, one per lockfile.perlalarm with1onsleep 5→ killed.jqselect on a sample comments JSON.grep -qEon a fixture SECURITY.md and package.json, run both positive and negative.Phase 4: Records and metrics
.claude/skills/<skill>/SKILL.md, runnpx vitest run <file>, confirm only that file fails, rungit checkout -- .claude/skills. Record the marker in the PR body.timeout. Runnpm run lint:health, regenerate the baseline (the metric went down), thennpm run lintand knip. Add a CHANGELOG[Unreleased]→### Changedline.Design Review
__tests__/helpers/, notsrc/lib, because nothing in production reads skill fences.spawnSync. Rejected: a helper that both extracts and spawns. It would fail AC-2's grep and hide each command behind a wrapper. Rejected: fixing the 4 vacuous files with only a grep tweak, which leaves the copy drift in place.in-place-checkout-skill(entryBlock),release-plugin-validate-skillandverify-skill-guardalready use. Each of those three has its own private extractor. This PR adds a shared one, and those three keep theirs (out of scope; follow-up candidate). Class tracked in investigation(test): classify the 76 prose-gate test files — execute, checksum or keep — with the command each execute-class gate should run #1511 and investigation(qa): section leave-one-out ablation of /qa SKILL.md — which of 3,754 lines are load-bearing, measured on the seeded-defect fixture #1068. No prior re-patches of this extraction.npx sequantrewritten = still a copy?" It is one documented token substitution, and the mutation record proves a SKILL.md edit fails the test. "Lock test touching the real checkout lock?" No:SEQUANT_LOCKS_DIRplus a temp repo.check-skill-sync). Consumed by the new tests, which read.claude/skillsonly.proseGatemetric: produced bycollectMetrics(scripts/qa/health-report.ts). Consumed bylint:health, the baseline, and AC-1/AC-6.No ADR needed: there is no design fork beyond the rejected alternatives above.
Feature Quality Planning
dist/. Fail with the same "Run npm run build" message aslocks-cli. Never skip.phase-executor.test.ts(a keep row, untouched here). improve(release): changelog fragments instead of a shared [Unreleased] block — 121/192 main commits touch CHANGELOG.md #1351 touches changelog tests. No file conflict.Open Questions
run --dry-run: if dry-run callsgh(CI has no auth for this), use a non-network form of the same extracted line, or report that the file cannot be converted. Recommendation: confirm first withnode dist/bin/cli.js run 1 --dry-runoffline. Do not reclassify silently, since AC-2 counts all 12..claude/skillsonly. Mirror parity ischeck-skill-sync's job.Recommended Workflow
Phases: exec → qa
Quality Loop: enabled
Reasoning: The work is tests only, so testgen has nothing to stub ahead of time. ~25 files and 12 mutation records justify the loop.
Label Review
Current: graph-2026-10-fundamentals. Recommended: add
planned. The quality loop is enabled through the marker, not a label.admarble commentedon Oct 19, 2026
QA Verdict: NEEDS_VERIFICATION
AC coverage: 5/6 met
Gaps:
Suggestions:
skill-fence.tssays in its header that "This module never spawns anything", butmakeDiffRepospawnsgit. The comment should say only the skill command is spawned in the test file.commitfield points at the WIP commit3fb2041, not HEAD. It gets regenerated during the conflict fix anyway.Pending ACs:
chore(#1512): merge main; baseline records proseGate 63 files / 29533…
test(#1512): the skill-fence header names the one git spawn in makeDi…
admarble commentedon Oct 19, 2026
Execution Verification (runner, 2026-10-19), PR #1565 @ f038400
After merging main (through #1558), the runner re-ran the ACs verbatim:
ok 63<=650012true(proseGate.lines29,533)AC-5 (CI) is pending.
Mutation repeated (one of the 12): dropping
--issue=<issue-number>from fullsolve's release fence at line 389 failsrelease site 1 frees both locks taken by the Phase 0.3 acquire fences. The skill edit was restored and never committed.QA's doc finding is fixed: the
skill-fence.tsheader names thegitspawn inmakeDiffRepo.chore(#1512): merge main (#1504); baseline keeps proseGate 63 / 29533
chore(#1509): merge main (#1504, #1512); baseline over200 7 / over400 2