Where: plugins/spec-flow/skills/implement/implement.workflow.js (GUARDRAILS block + fix loop)
Problem: The GUARDRAILS block forbids outward actions (pushing to main, creating issues, etc.) but says nothing about openspec/changes/<slug>/specs/** being immutable. A tdd-developer cornered by a spec-conformance blocker in the fix loop could edit the approved spec to match the code instead of fixing the code — laundering the owner's Seam-1 approval, since the spec lens diffs code against the spec as committed in the worktree. Separately, when the spec is genuinely defective or ambiguous, the only outcome today is 3 rounds of churn ending in generic residual findings, with no signal that the spec itself is the problem rather than the implementation.
Proposed fix: Add to GUARDRAILS: "the approved spec under openspec/changes/<change>/ is read-only — never edit it to resolve a finding." Have the spec lens treat any post-approval edit to the spec as a blocker. Add an explicit residual category ("spec defect — return to owner / re-run activate") distinct from generic loop exhaustion.
Found during a review of the spec-flow plugin, ahead of dogfooding it in this repo.
Where:
plugins/spec-flow/skills/implement/implement.workflow.js(GUARDRAILS block + fix loop)Problem: The GUARDRAILS block forbids outward actions (pushing to main, creating issues, etc.) but says nothing about
openspec/changes/<slug>/specs/**being immutable. A tdd-developer cornered by a spec-conformance blocker in the fix loop could edit the approved spec to match the code instead of fixing the code — laundering the owner's Seam-1 approval, since the spec lens diffs code against the spec as committed in the worktree. Separately, when the spec is genuinely defective or ambiguous, the only outcome today is 3 rounds of churn ending in generic residual findings, with no signal that the spec itself is the problem rather than the implementation.Proposed fix: Add to GUARDRAILS: "the approved spec under
openspec/changes/<change>/is read-only — never edit it to resolve a finding." Have the spec lens treat any post-approval edit to the spec as ablocker. Add an explicit residual category ("spec defect — return to owner / re-run activate") distinct from generic loop exhaustion.Found during a review of the spec-flow plugin, ahead of dogfooding it in this repo.