Skip to content

fix(#1213): spec self-skip on a re-run emits a SEQUANT_SPEC marker restating the prior plan - #1219

Merged
admarble merged 2 commits into
mainfrom
feature/1213-fix-spec-self-skip-on-a-re-run-must-emit-a-sequant
Sep 29, 2026
Merged

admarble merged 2 commits into
mainfrom
feature/1213-fix-spec-self-skip-on-a-re-run-must-emit-a-sequant

Conversation

@admarble

Copy link
Copy Markdown
Contributor

Summary

  • fix(run): spec runs in the main checkout, which the skills pre-flight never checks — a stale checkout silently degrades spec (#933 regression) #1193's guard fails a spec phase that produces no fresh SEQUANT_SPEC marker, but /spec's phase-detection self-skip (when spec:completed is already found) wrote only a skip message and no marker — latent today because the detection grep never matches escaped JSON, live the day that grep is fixed.
  • The self-skip branch in all 3 mirrored SKILL.md copies now instructs the agent to fetch the latest SEQUANT_SPEC marker comment and restate it verbatim before exiting, prefixed with a one-line skip note. If no valid prior marker exists, it falls through to normal execution instead of skipping.
  • No production-code change needed: mapAgentSuccessCore's guard (phase-executor.ts) already accepts a marker found anywhere in the agent's output — the gap was purely that /spec never told the agent to emit one on self-skip.

Pre-PR AC Verification

AC Description Status Evidence
AC-1 Self-skip branch documents emitting a restated SEQUANT_SPEC marker ✅ Implemented .claude/skills/spec/SKILL.md (+2 mirrors), § Phase Detection; gate test src/lib/__tests__/spec-skill-self-skip-marker.test.ts
AC-2 Self-skip-with-marker maps to success; self-skip-without-marker still fails ✅ Implemented src/lib/workflow/phase-executor.test.ts — 2 new cases in describe("spec phase (#1193)")

Mutation records

Test plan

  • npx vitest run src/lib/__tests__/spec-skill-self-skip-marker.test.ts — 9 passed
  • npx vitest run src/lib/workflow/phase-executor.test.ts — all passed (12 in the spec phase (#1193) block)
  • npm run build — passed
  • npm run lint — passed
  • npm test (full suite) — exit code 0
  • Mutation-verified both ACs (see markers above)

Closes #1213
Refs #1203

🤖 Generated with Claude Code

@admarble
admarble merged commit 6140213 into main Sep 29, 2026
10 checks passed
@admarble
admarble deleted the feature/1213-fix-spec-self-skip-on-a-re-run-must-emit-a-sequant branch September 29, 2026 19:03
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.

fix(spec): self-skip on a re-run must emit a SEQUANT_SPEC marker restating the prior plan — else the #1193 guard fails spec

1 participant