-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
Problem Statement
In the current OpenSpec workflow, once a proposal has been applied (via opsx-apply or similar), there is no built-in command to regenerate downstream artifacts (e.g., design.md, tasks.yaml, spec.yaml, or code) after modifying an upstream file like proposal.md or design.md.
For example:
- I run
opsx-new→ generateproposal.md - I run
opsx-continue→ generatesdesign.md→tasks.yaml→spec.yaml→ code - I realize the generated implementation is incorrect or incomplete
- I edit
proposal.md(ordesign.md) to refine requirements or design - There is no command like
opsx-rebuild --from=proposalto re-trigger the pipeline from that point onward
As a result, users are forced to:
- Manually craft prompts for their AI assistant to "reprocess from X file"
- Or delete downstream files and re-run
opsx-continue(which may not be reliable or idempotent) - Or write custom scripts to orchestrate regeneration
This breaks the promise of a declarative, spec-driven workflow, as the toolchain does not support iterative refinement of intermediate artifacts.
Expected Behavior
OpenSpec should provide a command (e.g., opsx-regen, opsx-rebuild, or opsx-ff) that allows users to:
# Regenerate everything starting from proposal.md
openspec regen --from proposal
# Or from design.md
openspec regen --from designThis command would:
- Re-parse the specified upstream file (
proposal.md,design.md, etc.) - Re-generate all dependent downstream artifacts in order
- Preserve user intent and avoid manual prompt engineering
- Integrate cleanly with the existing
opsxworkflow
Why This Matters
Iterative refinement of specs/designs is extremely common during real-world development. The inability to safely and automatically propagate changes from upstream documents undermines the core value proposition of Spec-Driven Development (SDD): “Edit the spec, not the code.”
Without this capability, teams are incentivized to either:
- Edit code directly (breaking SDD discipline), or
- Resort to error-prone manual AI prompting
Suggested Implementation
- Add a new subcommand (e.g.,
opsx-regenor enhanceopsx-ff) - Accept a
--fromflag indicating the starting artifact (proposal,design,tasks) - Re-execute the generation pipeline from that stage forward
- Optionally back up or diff overwritten files for safety
Related Context
- Current commands like
opsx-continueonly resume from the last unexecuted step, not from a modified earlier step. - Users currently work around this by hand-crafting AI prompts referencing specific files — which is fragile and non-scalable.
Thank you for considering this enhancement! This would significantly improve the usability and robustness of OpenSpec for iterative, AI-assisted development.