You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Moved from issue #821, originally opened by @jiangjiang01 on 2026-03-10. Continuing the conversation here in Discussions — the original issue thread (including any comments) stays available at #821 for the record.
Background
In a typical OpenSpec workflow, development usually follows this sequence:
/opsx:apply
→ generate implementation code from tasks
local testing
/opsx:archive
→ archive the change into the system spec
However, during real-world development, bugs or inconsistencies are often discovered during local testing after /opsx:apply.
Current Problem
When an issue is found during testing, developers currently need to manually instruct the AI agent to:
Fix the implementation code
Update spec.md if the specification is incomplete or incorrect
Update design.md if the architecture changes
Update tasks.md to reflect the updated implementation steps
This creates several problems:
repetitive manual instructions
risk of spec and code becoming inconsistent
additional cognitive overhead for developers
slower iteration loops during debugging
Proposed Solution
Introduce a new command:
/opsx:repair
Issue discovered during testing:
Expected Behavior
The command should guide the AI agent to perform a spec-consistency repair cycle:
Analyze the root cause of the issue
Determine whether the problem is caused by:
incorrect implementation
incomplete or incorrect specification
If the implementation is incorrect:
update the code implementation
keep the spec unchanged
If the specification is incomplete or incorrect:
update spec.md
update design.md if needed
update tasks.md
update the implementation accordingly
Ensure the implementation satisfies the specification
Keep the change ready for /opsx:archive
Example Workflow
Current workflow
/opsx:propose
/opsx:apply
test
(manually instruct AI to fix code and update spec/design/tasks)
/opsx:archive
Proposed workflow
/opsx:propose
/opsx:apply
test
/opsx:repair
/opsx:archive
Benefits
Reduces repetitive instructions to AI agents
Keeps spec, tasks, and code consistent
Improves developer experience during iterative debugging
Makes OpenSpec workflows smoother in real-world development
Context
This would be particularly useful when OpenSpec is used with AI coding tools such as:
Cursor
Claude Code
Codex CLI
GitHub Copilot
where iterative testing and debugging after code generation is very common.
Summary
Adding /opsx:repair would formalize the Spec Consistency Repair Loop in OpenSpec workflows and significantly improve the developer experience when iterating on generated implementations.
Happy to help test or refine the command behavior if needed.
This command could internally reuse the existing change context and simply trigger a repair loop across spec/design/tasks/implementation.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Note
Moved from issue #821, originally opened by @jiangjiang01 on 2026-03-10. Continuing the conversation here in Discussions — the original issue thread (including any comments) stays available at #821 for the record.
Background
In a typical OpenSpec workflow, development usually follows this sequence:
/opsx:propose
→ generate proposal/spec/design/tasks
/opsx:apply
→ generate implementation code from tasks
local testing
/opsx:archive
→ archive the change into the system spec
However, during real-world development, bugs or inconsistencies are often discovered during local testing after
/opsx:apply.Current Problem
When an issue is found during testing, developers currently need to manually instruct the AI agent to:
spec.mdif the specification is incomplete or incorrectdesign.mdif the architecture changestasks.mdto reflect the updated implementation stepsThis creates several problems:
Proposed Solution
Introduce a new command:
/opsx:repair
Issue discovered during testing:
Expected Behavior
The command should guide the AI agent to perform a spec-consistency repair cycle:
Analyze the root cause of the issue
Determine whether the problem is caused by:
If the implementation is incorrect:
If the specification is incomplete or incorrect:
spec.mddesign.mdif neededtasks.mdEnsure the implementation satisfies the specification
Keep the change ready for
/opsx:archiveExample Workflow
Current workflow
/opsx:propose
/opsx:apply
test
(manually instruct AI to fix code and update spec/design/tasks)
/opsx:archive
Proposed workflow
/opsx:propose
/opsx:apply
test
/opsx:repair
/opsx:archive
Benefits
Context
This would be particularly useful when OpenSpec is used with AI coding tools such as:
where iterative testing and debugging after code generation is very common.
Summary
Adding
/opsx:repairwould formalize the Spec Consistency Repair Loop in OpenSpec workflows and significantly improve the developer experience when iterating on generated implementations.Happy to help test or refine the command behavior if needed.
This command could internally reuse the existing change context and simply trigger a repair loop across spec/design/tasks/implementation.
All reactions