Story Review
Purpose
Reflect on the completed story to extract learnings, persist patterns, reinforce behavioral signals, and emit calibration telemetry.
Mastery Levels (ShuHaRi)
- Shu: Follow all steps, answer all checkpoint questions with specific examples
- Ha: Adapt depth to story complexity, batch small story reviews
- Ri: Custom review patterns, integrate with team retrospectives
Context
When to use: After implementation is complete and tests pass. Before /rai-story-close.
Inputs: Completed story, progress log, passing test suite.
Steps
Step 1: Verify Tests Pass
Determine which test command to run using this priority chain:
- Check
.raise/manifest.yamlforproject.test_command— if set, use it directly (configuration over convention) - Detect language from
project.project_typein manifest, or scan file extensions of changed files (git diff --name-only) - Map language to default using the table below
# .raise/manifest.yaml — example
project:
test_command: "cargo test --quiet" # explicit override, highest priority
project_type: rust
| Language | Extensions | Default Test Command |
|---|---|---|
| Python | .py, .pyi |
uv run pytest --tb=short |
| TypeScript | .ts, .tsx |
npx vitest run or npm test |
| JavaScript | .js, .jsx |
npx vitest run or npm test |
| C# | .cs |
dotnet test --verbosity quiet |
| Go | .go |
go test ./... |
| PHP | .php |
vendor/bin/phpunit |
| Dart | .dart |
flutter test |
| Unknown | — | Ask developer |
The table is a fallback — project.test_command always wins when present.
| Condition | Action |
|---|---|
| Tests green | Continue |
| Tests failing | Fix first — review requires green tests |
Step 2: Gather Data & Reflect
Review the story development: actual vs estimated time, blockers, plan deviations.
Heutagogical checkpoint — answer with specific examples:
- What did you learn?
- What would you change about the process?
- Are there improvements for the framework?
- What are you more capable of now?
Identify concrete improvements to skills, guardrails, or templates. Apply small improvements immediately; create issues for complex ones.
Step 3: Persist Patterns & Reinforce
Add new patterns worth preserving across sessions:
rai pattern add "Pattern description" -c "context,keywords" -t process --from S{N}.{M}
Types: process, technical, architecture, codebase.
Reinforce existing patterns — evaluate behavioral patterns loaded at session start:
rai pattern reinforce {pattern_id} --vote {1|0|-1} --from S{N}.{M}
| Vote | Meaning |
|---|---|
1 |
Implementation followed the pattern |
0 |
Pattern not relevant to this story (does NOT count toward evaluations) |
-1 |
Implementation contradicted the pattern |
Only evaluate patterns you consciously considered. 0 is correct for most patterns in any story.
Step 4: Document Retrospective
Create work/epics/e{N}-{name}/stories/s{N}.{M}-retrospective.md with:
- Summary (story ID, dates, estimated vs actual time)
- What went well / what to improve
- Heutagogical checkpoint answers
- Improvements applied
- Patterns added/reinforced
Step 5: Emit Calibration Telemetry
rai signal emit-calibration S{N}.{M} --size {XS|S|M|L} --estimated {minutes} --actual {minutes}
This feeds the velocity tracking system for future estimation accuracy.
Output
| Item | Destination |
|---|---|
| Retrospective | work/epics/e{N}-{name}/stories/s{N}.{M}-retrospective.md |
| Patterns | .raise/rai/memory/patterns.jsonl |
| Calibration | Via rai signal emit-calibration |
| Next | /rai-story-close |
Quality Checklist
- Project language detected before running tests
- Tests pass with language-appropriate runner (gate)
- Heutagogical checkpoint answered with specific examples
- New patterns persisted via
rai pattern add - Behavioral patterns reinforced via
rai pattern reinforce - Calibration telemetry emitted
- Retrospective document created
- NEVER skip pattern reinforce — scoring system depends on it (RAISE-170)
- NEVER give vague checkpoint answers — be specific with concrete examples
References
- Previous:
/rai-story-implement - Next:
/rai-story-close - Pattern scoring: RAISE-170 (temporal decay + Wilson scorer)