Skip to content

feat(#1250): spec Design Review stops on recurrence and lists producers; spec can halt before exec - #1253

Merged
admarble merged 4 commits into
mainfrom
feature/1250-feat-spec-design-review-stops-on-recurrence-and-li
Oct 1, 2026
Merged

admarble merged 4 commits into
mainfrom
feature/1250-feat-spec-design-review-stops-on-recurrence-and-li

Conversation

@admarble

@admarble admarble commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Design Review (all three spec SKILL.md copies, kept byte-identical): Q3 now asks how often the pattern has been re-patched (git log -S plus an issue search). ≥2 prior fix issues is a stop, not a precedent, and the plan either fixes the class or records deliberately local, reason: …, class tracked in #N. A new Q5 lists every producer and consumer of the artifact (whole-repo grep). With ≥2 producers, the plan collapses them or adds a parity test on every field. A short "Halt on divergence" note says spec emits SPEC_DIVERGENCE in its SEQUANT_PHASE marker when Q3 or Q5 contradicts the prescribed lever.
  • Runtime halt (batch-executor.ts): the spec path in runIssueWithLogging now reads specResult.specDivergence. It prints the feat(run): SPEC_DIVERGENCE escape hatch, ladder halts with evidence bundles, docs, rigged real run (#971 part B) #995 evidence bundle and returns before exec. The check sits outside the success split, so a spec that declares divergence and still emits a valid SEQUANT_SPEC halts too. It reuses the existing bundle builder, which is now hoisted above the spec block (the arrays are empty at spec time). No new parser and no new field: parseSpecDivergence was already phase-agnostic, and a new test now covers the spec-phase case.
  • Constitution: the one-producer principle went into §3 Boundaries as a table row, with /spec Design Review Q5 as its enforcer. memory/constitution.md has no section called "principles", and §3 requires every rule to name an enforcer.
  • ADR-0004 (docs/adr/0004-spec-can-halt-before-exec.md) records the rejected options and the Simple-tier deviation.

Deviation from AC-5's parenthetical

Simple-tier issues keep the Q3 recurrence count. Only Q5 is limited to Standard/Complex. The audited re-patches were mostly small bug issues with ≤2 ACs, which is exactly the Simple tier, so skipping the count there would miss most of what this issue targets. It costs no extra lines because the count is part of Q3. The Simple row still reads "Design Review Q1/Q3 only", and the gate test asserts that.

Pre-PR AC Verification

AC Status Evidence
AC-1 ✅ Q3 in ## Design Review (all 3 copies); src/lib/__tests__/spec-design-review-skill.test.ts AC-1 case ×3
AC-2 ✅ Q5 line; same test file, AC-2 case ×3
AC-3 ✅ batch-executor.ts spec-path check; batch-executor.test.ts #1250 describe: success+divergence and failure+divergence fixtures both assert exec never runs and that the bundle is printed; a third case checks a spec without divergence still reaches exec; a fourth runs parseSpecDivergence on a "phase":"spec" marker
AC-4 ✅ memory/constitution.md §3 Boundaries row; AC-4 case, scoped to ## 3. Boundaries … ## 4.
AC-5 ✅ (with the deviation above) wc -l: base 435 → 437, cap 450; npm run lint:skill-sync: 47 synced, 0 diverged; tier row and tier comment asserted in the AC-5 case ×3

Mutation verification

Mutation-verified: AC-1 — reverted Q3 to "[Named pattern, confirm it fits]" in .claude/skills/spec/SKILL.md; only that copy's AC-1 case failed; restored.
Mutation-verified: AC-2 — deleted the Q5 line in skills/spec/SKILL.md; only that copy's AC-2 case failed; restored.
After merging main (#1252), I re-ran the union of both PRs' literal-test sets plus the docs/adr tests: 62 files, 2,842 passed. CI's first test failure on d8c3dd5 was a timeout in #533 … runs spec → exec → qa for 'bug' label (6,001 ms against a 5 s limit). That case takes ~1 s locally on both main and this branch, and the failed-job re-run passed.

Mutation-verified: AC-3 — removed the spec-path divergence check (condition back to !specResult.success, bundle log deleted); both #1250 divergence fixtures failed; restored.
Mutation-verified: AC-4 — deleted the §3 row; only the AC-4 case failed; restored.

Test plan

  • npm run build, npm run lint, lint:skill-sync, lint:skill-calls, lint:skill-gates, lint:constitution-dod: all pass
  • Targeted suites (per the runner's no-full-suite instruction): every *.test.ts matching specDivergence|SPEC_DIVERGENCE|Design Review|constitution (13 files, 1043 tests), plus every test naming spec/SKILL.md|skills/spec|docs/adr|CHANGELOG (20 files, 1137 tests): all green
  • scripts/qa/tautology-detector-cli.ts: all tests call production code
  • Full npm test was not run in exec, per the runner's instruction.

Runner verification (head 48988ca, after merging main with #1252)

QA returned NEEDS_VERIFICATION. I did the following myself:

Mutation-verified: AC-3 — reverted the halt note's channel to "end the comment" in templates/skills/spec/SKILL.md; src/lib/__tests__/spec-design-review-skill.test.ts > templates/skills/spec/SKILL.md Design Review > AC-3: the halt-on-divergence note names the SPEC_DIVERGENCE marker fields failed; restored.

Follow-up ledger

Closes #1250

🤖 Generated with Claude Code

…rs; spec can halt before exec

Q3 treats >=2 prior fix issues as a stop; Q5 lists every producer and consumer. The spec path in runIssueWithLogging now reads specDivergence and halts before exec with the #995 evidence bundle. Constitution section 3 adds one producer per artifact. ADR-0004.

Entire-Checkpoint: d6e64e9605b4
…c-design-review-stops-on-recurrence-and-li

# Conflicts:
#	docs/adr/README.md
@admarble
admarble merged commit d3e1177 into main Oct 1, 2026
10 checks passed
@admarble
admarble deleted the feature/1250-feat-spec-design-review-stops-on-recurrence-and-li branch October 1, 2026 04:29
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.

feat(spec): Design Review stops on recurrence and lists producers; spec can halt before exec when the AC's lever is wrong

1 participant