/gaia-fix-story
user-facingWhat it does
/gaia-fix-story applies validation findings to a story file and re-validates to transition it from validating back to ready-for-dev. It reads the findings, fixes affected sections (frontmatter, acceptance criteria, test scenarios, Definition of Done), and confirms the story is clean.
When to use it
- A story is in
validatingstatus because/gaia-create-storyor/gaia-validate-storyfound issues that could not be auto-fixed.
Prerequisites
- Story must be in
validatingstatus. Stories in other statuses are rejected. - Validation findings must exist. Either in the story file's Validation Findings section or in the validator memory.
How to invoke
/gaia-fix-story E3-S7What it does step by step
- Resolve story file Locates the story file by key.
- Status gate Confirms the story is in
validatingstatus. - Load findings Reads validation findings from the story file and validator memory.
- Apply fixes Fixes frontmatter drift, missing sections, unclear ACs, empty test scenarios, and other issues. Preserves all existing valid content.
- Re-validate Runs validation again. If clean, transitions to
ready-for-dev. If findings remain, exits with a summary.
Inputs
| Input | Source | Description |
|---|---|---|
story-key | Command argument (required) | The story to fix. |
Outputs
| Output | Location | Description |
|---|---|---|
| Fixed story file | .gaia/artifacts/implementation-artifacts/{key}-*.md | Updated sections, status transitioned to ready-for-dev on success. |
Example session
> /gaia-fix-story E3-S7
Story E3-S7: validating status confirmed.
3 findings loaded (1 WARNING, 2 INFO).
Fixing:
- WARNING: AC2 not in Given/When/Then format. Rewriting...
- INFO: Missing test scenario for AC3. Adding...
- INFO: DoD item "No lint warnings" missing. Adding...
Re-validating... 0 critical, 0 warning.
Story E3-S7 fixed and transitioned to ready-for-dev.What to run next
/gaia-dev-story-- implement the now-ready story./gaia-sprint-plan-- include it in the next sprint.
Troubleshooting
"Story not in validating state"
Run /gaia-validate-story first to produce findings.
Findings remain after fixes
The command exits with a summary of unresolved findings. Review them manually and re-run.