Skip to content

fix: Classic design deadlock after Spec Patch #324

Description

@poco0222

🔎 Existing issue check

  • I have searched the existing issues.

🎯 Affected area

CLI command / user interaction (app/)

📦 Comet version

0.4.0-beta.18

💥 Current behavior

After an initial design handoff is completed, a normal Spec Patch in the OpenSpec delta spec permanently blocks the Classic full workflow.

The design guard correctly detects that the OpenSpec artifacts changed and requires a new handoff:

[FAIL] design handoff context exists
OpenSpec artifacts changed after handoff was generated.
Expected handoff_hash: f5f52c6853efc95695aa1719632f0f6ea9dcadbbf09c4837acdddb3acafae5ee
Actual handoff_hash:   d470143eaed3a130ba46e91745ca7ea3831f827cdc997b2a52e1961396993e09
Next: run comet handoff training-course-time-lifecycle design --write

However, the required command fails:

ERROR: stale handoff detected:
source hash d470143eaed3a130ba46e91745ca7ea3831f827cdc997b2a52e1961396993e09
does not match completed hash
f5f52c6853efc95695aa1719632f0f6ea9dcadbbf09c4837acdddb3acafae5ee

The handoff cannot be refreshed, the design guard cannot pass, and the workflow cannot enter the Build phase.

✅ Expected behavior

After a normal Spec Patch, regenerating the design handoff should validate the current OpenSpec artifacts so the workflow can proceed from Design to Build.

🔁 Steps to reproduce

  1. Create a Classic full change with proposal.md, design.md, tasks.md, and a delta spec.
  2. Run: comet handoff design --write
  3. Make a normal Spec Patch in specs/*/spec.md.
  4. Run: comet handoff design --write
  5. Observe the stale handoff detected error.
  6. Run: comet guard design
  7. Observe that the guard requires the same handoff command, which still fails.

🖥️ Environment

- OS: macOS
- Shell: zsh
- Node: v24.18.0
- Package manager: npm
- Install scope: global (/Users/popoy/WorkSpace/DevTools/npm)
- Skill language: zh-CN
- Target AI platform(s): Codex desktop
- Workflow: Classic full
- context_compression: off

📋 Logs or output

See the exact guard and handoff output in Current behavior.

🧩 Additional context

The Classic design skill explicitly requires regenerating the handoff after a delta spec changes. In this state, the guard requires regeneration, but the handoff command rejects replacing the completed hash with the new source hash. No business-code changes had started; OpenSpec strict validation and git diff --check passed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    Status
    In progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions