/gaia-fill-test-gaps
user-facingWhat it does
/gaia-fill-test-gaps reads the latest gap analysis report, triages each gap by severity and story status, proposes a remediation action for each, presents a triage table for your approval, and then dispatches approved actions to the appropriate sub-workflows (/gaia-add-stories, /gaia-triage-findings, or /gaia-test-automate).
When to use it
- A gap analysis report exists and you want to systematically fill the identified coverage gaps.
- You want GAIA to propose the right remediation action for each gap (add test, create story, expand automation) based on the story's current status.
Prerequisites
- A gap analysis report must exist at
.gaia/artifacts/test-artifacts/test-gap-analysis-*.md. Run/gaia-test-gap-analysisfirst.
How to invoke
/gaia-fill-test-gaps
/gaia-fill-test-gaps --severity critical
/gaia-fill-test-gaps --severity high
/gaia-fill-test-gaps --severity medium
/gaia-fill-test-gaps --severity all
What it does step by step
- Load gap report Finds the most recent gap analysis report by date and parses its gap table.
- Severity filter Applies the severity filter (default: critical+high). Prompts for your preference unless a
--severityargument was provided or YOLO mode is active. - Group by story Builds a triage map keyed by story key. Skips rows that succeeded in a prior remediation run (retry-only-failed semantics).
- Propose actions For each gap, resolves the story's current status and proposes an action: append AC (backlog stories), create new story (done stories), expand automation (any status), or skip (in-progress/review stories).
- Triage table Renders the triage map as a markdown table and saves it.
- Execute approved actions Dispatches each approved action to its sub-workflow. A single failure does not halt the remaining actions.
- Remediation report Writes a report with per-action results (succeeded, failed, skipped).
Inputs
| Input | Source | Description | Example |
|---|---|---|---|
--severity | Argument (optional, default: critical+high) | Filter gaps by severity level: critical, high, medium, or all. | /gaia-fill-test-gaps --severity critical |
| Gap report | .gaia/artifacts/test-artifacts/test-gap-analysis-*.md | The most recent gap analysis output. | -- |
| Story files | .gaia/artifacts/implementation-artifacts/ | Used to resolve story status for action proposals. | -- |
Outputs
| Output | Location | Description |
|---|---|---|
| Triage table | .gaia/artifacts/test-artifacts/fill-test-gaps-triage-{date}.md | Per-gap triage decisions with proposed actions. |
| Remediation report | .gaia/artifacts/test-artifacts/gap-remediation-report-{date}.md | Execution results for each dispatched action. |
Example session
> /gaia-fill-test-gaps --severity high
Loading gap report: test-gap-analysis-2026-05-07.md
Severity filter: critical+high (6 gaps match)
Triage Table:
E1-S3 2 gaps uncovered-ac append_ac /gaia-add-stories pending
E3-S1 3 gaps missing-test new_story /gaia-triage-findings pending
E3-S4 1 gap unexecuted expand_auto /gaia-test-automate pending
Triage saved to .gaia/artifacts/test-artifacts/fill-test-gaps-triage-2026-05-07.md
Executing 3 actions...
E1-S3: succeeded
E3-S1: succeeded
E3-S4: succeeded
3 succeeded, 0 failed, 0 skipped.
Report: .gaia/artifacts/test-artifacts/gap-remediation-report-2026-05-07.md
What to run next
/gaia-test-gap-analysis-- re-run gap analysis to verify gaps are closed./gaia-trace-- update the traceability matrix with new coverage.
Troubleshooting
"No gap analysis report found"
Run /gaia-test-gap-analysis first to produce a report.
"Parse error in gap report"
The report has malformed YAML frontmatter. Regenerate it with /gaia-test-gap-analysis.
A sub-workflow failed
The failed action is logged in the remediation report. Fix the underlying issue and re-run -- previously succeeded actions are skipped automatically.