ワンクリックで
rai-story-review
Extract learnings and persist patterns from completed story. Use after implementation.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Extract learnings and persist patterns from completed story. Use after implementation.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Interactive adapter setup for Jira and Confluence. Detects available backends, discovers projects/spaces, generates validated YAML config. 3-4 questions max.
Evaluate design proportionality using Beck's four rules. Use after implementation.
Root cause analysis using the method best suited to the bug. Phase 3 of bugfix pipeline.
Push branch, create MR, verify artifacts complete. Phase 7 of bugfix pipeline.
Execute fix tasks with TDD and all validation gates. Phase 5 of bugfix pipeline.
Decompose fix into atomic TDD tasks. Phase 4 of bugfix pipeline.
| name | rai-story-review |
| description | Extract learnings and persist patterns from completed story. Use after implementation. |
| allowed-tools | ["Read","Grep","Glob","Bash(rai:*)"] |
| license | MIT |
| metadata | {"raise.work_cycle":"story","raise.frequency":"per-story","raise.fase":"7","raise.prerequisites":"story-implement","raise.next":"story-close","raise.gate":"","raise.adaptable":"true","raise.version":"2.5.0","raise.visibility":"public","raise.inputs":"- tests_passing: boolean, required, cli\n","raise.outputs":"- retrospective_md: file_path, next_skill\n- patterns: list, cli\n","raise.aspects":"introspection","raise.introspection":{"phase":"story.review","context_source":"all story artifacts","affected_modules":[],"max_tier1_queries":2,"max_jit_queries":3,"tier1_queries":["evaluation patterns for {affected_modules}","process patterns from recent stories"]}} |
Reflect on the completed story to extract learnings, persist patterns, reinforce behavioral signals, and emit calibration telemetry.
When to use: After implementation is complete and tests pass. Before /rai-story-close.
Inputs: Completed story, progress log, passing test suite.
Before starting Step 1, you MUST execute the PRIME protocol:
rai graph query. If graph is unavailable, note and continue.Determine which test command to run using this priority chain:
.raise/manifest.yaml for project.test_command — if set, use it directly (configuration over convention)project.project_type in manifest, or scan file extensions of changed files (git diff --name-only)# .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 |
JIT: Before reflecting on development process, query graph for evaluation patterns →
aspects/introspection.md § JIT Protocol
Review the story development: actual vs estimated time, blockers, plan deviations.
Heutagogical checkpoint — answer with specific examples:
Identify concrete improvements to skills, guardrails, or templates. Apply small improvements immediately; create issues for complex ones.
All four questions answered. Improvements identified (or celebrated that none needed).Read learning records produced during this story's lifecycle:
.raise/rai/learnings/rai-story-design/{work_id}/record.yaml.raise/rai/learnings/rai-story-plan/{work_id}/record.yaml.raise/rai/learnings/rai-story-implement/{work_id}/record.yamlIf any record is missing (silent node or execution gap), note it and continue — missing records are valid signal.
Produce aggregate summary with these metrics:
| Metric | Calculation | What it tells us |
|---|---|---|
| Acceptance rate | Patterns voted +1 / total patterns primed | Are PRIME queries returning useful context? |
| Gap rate | Total gaps / total JIT queries | Is the graph missing knowledge we need? |
| Pattern utility | Patterns +1 / (patterns +1 + patterns -1) | Are stored patterns helping or misleading? |
Include the aggregate in the retrospective (Step 5).
Learning records read (or missing noted). Metrics calculated. Aggregate ready for retrospective.JIT: Before persisting patterns, query graph for existing patterns to avoid duplicates →
aspects/introspection.md § JIT Protocol
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.
Create work/epics/e{N}-{name}/stories/s{N}.{M}-retrospective.md with:
| Item | Destination |
|---|---|
| Retrospective | work/epics/e{N}-{name}/stories/s{N}.{M}-retrospective.md |
| Patterns | .raise/rai/memory/patterns.jsonl |
| Next | /rai-story-close |
rai pattern addrai pattern reinforce/rai-story-implement/rai-story-close