Best for
- Reflect on the completed story to extract learnings, persist patterns, reinforce behavioral signals, and emit calibration telemetry.
humansys/raise/packages/raise-cli/src/raise_cli/skills_base/rai-story-review/SKILL.md
Extract learnings and persist patterns from completed story. Use after implementation.
Decision brief
Extract learnings and persist patterns from completed story. Use after implementation.
Compatibility matrix
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/humansys/raise --skill "packages/raise-cli/src/raise_cli/skills_base/rai-story-review"Inspect the Agent Skill "rai-story-review" from https://github.com/humansys/raise/blob/88a77d6e4065e3c8bdbae9be4aff5b84e6a7a5eb/packages/raise-cli/src/raise_cli/skills_base/rai-story-review/SKILL.md at commit 88a77d6e4065e3c8bdbae9be4aff5b84e6a7a5eb. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
Trust the end-of-story scoped gate from /rai-story-implement Step 5 — do not re-run the full suite here. Review requires that the scoped gates passed; the full suite runs once at push time via /rai-mr-create.
Run the AR checklist and write the attestation marker that /rai-story-close's gate-ar-story gate verifies. This is the only place the checklist runs — story-close does not re-run it, it only checks that this marker exists (RAISE-14277 / ADR-130: attestation and verification must…
Skip entirely for non-frontend stories. Gate condition: isfrontend=true. If the story touched no rendered UI, proceed directly to Step 2.
JIT: Before reflecting on development process, query graph for evaluation patterns → aspects/introspection.md § JIT Protocol
JIT: Before persisting patterns, query graph for existing patterns to avoid duplicates → aspects/introspection.md § JIT Protocol
Permission review
No configured static risk pattern was detected
This is not proof of safety. Runtime behavior, indirect dependencies, and hidden external systems are outside the static scan.
Evidence record
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 94/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 71 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Reflect on the completed story to extract learnings, persist patterns, reinforce behavioral signals, and emit calibration telemetry.
See raise.mastery in frontmatter.
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:
raise_graph_query MCP tool with cwd="{project_or_worktree_path}". If MCP tools are not available, fall back to:
rai graph query
0 results is valid.Trust the end-of-story scoped gate from /rai-story-implement Step 5 — do not re-run
the full suite here. Review requires that the scoped gates passed; the full suite runs once
at push time via /rai-mr-create.
# Confirm the implement-complete signal was emitted for the current HEAD
rai signal query story "{story_id}" --event complete --phase implement \
--session-id "${RAISE_CC_SESSION_ID}" --latest --fields commit 2>/dev/null
| Condition | Action |
|---|---|
| Signal found for current HEAD | ✓ Tests already verified — continue |
| Signal missing or stale commit | Run scoped package gate: rai gate check gate-tests --scope packages/<pkg>/ |
| Scoped gate fails | Fix before reviewing — review requires green tests |
Run the AR checklist and write the attestation marker that /rai-story-close's
gate-ar-story gate verifies. This is the only place the checklist runs —
story-close does not re-run it, it only checks that this marker exists
(RAISE-14277 / ADR-130: attestation and verification must not be the same
actor at the same instant — the gate was previously self-attestable because
close both created and checked the marker in one command).
rai drift check packages/<changed-module>/
Review output: orphaned symbols? dead public APIs?After confirming all three, write the branch-and-session-scoped attestation marker via the centralized writer (D1 — never hand-roll this path in bash):
rai gate ar-attest --gate gate-ar-story
Do not run the gate-ar-story gate here, and do not remove the
marker afterward — verification happens later, in /rai-story-close, against
this same marker. Touching and removing it in the same step would recreate
the self-attestation bypass this fixes.
Skip entirely for non-frontend stories. Gate condition:
is_frontend=true. If the story touched no rendered UI, proceed directly to Step 2.
After confirming tests pass, open the implemented UI in a real browser and verify fidelity against the prototype/living-design-system. This closes the gap ADR-125 identified: jsdom unit tests cannot catch layout overflow, active-class mismatches, or missing ARIA attributes on real DOM.
Tooling: Chrome DevTools MCP (browser_navigate, browser_snapshot, browser_evaluate) or Playwright MCP (browser_navigate, browser_snapshot). Both are registered per project. Use whichever is available in session.
browser_navigate)browser_snapshot or DevTools inspector)role="dialog" and aria-labelledby pointing to its headingaria-live="polite" (or aria-live="assertive" for errors)aria-label)On failure: Treat as a blocking defect. Fix in the current story branch before continuing to Step 2. Do not defer to a follow-up issue unless the defect is explicitly out of scope for this story (document why).
Reference: ADR-125 (frontend fidelity gate — E11478 post-mortem: drawer overflow and segment active-class missed by jsdom, caught only in browser walk).
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.
JIT: Before persisting patterns, query graph for existing patterns to avoid duplicates →
aspects/introspection.md § JIT Protocol
Pattern writing guidelines — before composing pattern content:
Add new patterns worth preserving across sessions. Use raise_pattern_add MCP tool with cwd="{project_or_worktree_path}", content="Pattern description", context="context,keywords", pattern_type="process", from_story="S{N}.{M}".
If MCP tools are not available, fall back to:
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. Use raise_pattern_reinforce MCP tool with pattern_id={pattern_id}, vote={1|0|-1}, from_story="S{N}.{M}", cwd="{project_or_worktree_path}".
If MCP tools are not available, fall back to:
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.
Publish retrospective to local path and docs adapter via:
Use raise_docs_write MCP tool with doc_type="story", title="S{N}.{M}: {story-name} — Retrospective", content="# Retrospective: S{N}.{M} — {story-name}\n\nDates: {start-date} → {end-date}\n...\n\n## Summary\n...\n\n## What went well\n...\n\n## What to improve\n...\n\n## Heutagogical Checkpoint\n...\n\n## Improvements applied\n...\n\n## Patterns added / reinforced\n...", output_path="work/epics/e{N}-{name}/stories/s{N}.{M}-retrospective.md", cwd="{project_or_worktree_path}".
If MCP tools are not available, fall back to:
rai docs write story \
--title "S{N}.{M}: {story-name} — Retrospective" \
--stdin \
--output-path work/epics/e{N}-{name}/stories/s{N}.{M}-retrospective.md << 'EOF'
# Retrospective: S{N}.{M} — {story-name}
**Dates:** {start-date} → {end-date}
**Estimated:** {estimated} | **Actual:** {actual}
## Summary
{summary}
## What went well
{went-well}
## What to improve
{to-improve}
## Heutagogical Checkpoint
1. **What did I learn?** {answer}
2. **What would I change about the process?** {answer}
3. **Framework improvements?** {answer}
4. **More capable of now?** {answer}
## Improvements applied
{improvements}
## Patterns added / reinforced
{patterns}
EOF
Emit the retrospective as a structured artifact so story.yaml's close.validates (RAISE-11088) can prove — in SQLite, issue-scoped by construction — that a retrospective exists for THIS story before /rai-story-close is allowed to complete. A repo-wide file glob would be satisfied by ANY story's retrospective already in the repo; this sqlite record cannot be.
raise_artifact_emit(
artifact_type="retro",
story_id="{story_key}",
content=<JSON with fields: patterns_learned (list[str]), reinforcements (list[str]), velocity_ratio (optional float), notes (optional str)>,
cwd="{project_or_worktree_path}"
)
CRITICAL — identifier mismatch risk (same hazard as RAISE-11147's implement fix): story_id here MUST be {story_key} — the pipeline's issue key (the same value passed to pipeline_start, e.g. "RAISE-1281"), NOT the S{N}.{M} convention used by this step's raise_docs_write output_path above. story.yaml's sqlite validate branch looks up artifact_store.exists(run["issue_id"], "retro"), and run["issue_id"] is always the Jira key. Emitting with S{N}.{M} instead would make the sqlite lookup never find the artifact, turning close into a permanent artifact_missing deadlock.
Note: The CLI fallback for artifact emission was removed in v3.0.0. MCP tool raise_artifact_emit is required. If MCP tools are not available, skip structured artifact emission — the pipeline will require it before close can complete.
| Item | Destination |
|---|---|
| Retrospective | work/epics/e{N}-{name}/stories/s{N}.{M}-retrospective.md (local) + docs adapter (type: story) |
| Retro artifact | SQLite (artifact_type=retro, keyed by issue key) |
| Patterns | .raise/rai/memory/patterns.jsonl |
| Signal | WorkLifecycle event emitted (start on entry, complete here) |
Backlog transition to review status is engine-owned (RAISE-15034):
Engine performs the transition via apply_phase_transition at phase completion.
No skill-initiated transition call required or allowed.
STOP HERE. Return your summary to the orchestrator. Do NOT invoke any further skill.
/rai-story-implement/rai-story-closeFrequently asked questions
Extract learnings and persist patterns from completed story. Use after implementation.
The source record exposes this install command: npx skills add https://github.com/humansys/raise --skill "packages/raise-cli/src/raise_cli/skills_base/rai-story-review". Inspect the command and pinned source before running it.
Alternatives
coreyhaines31/marketingskills
When the user wants to plan, design, or implement an A/B test or experiment, or build a growth experimentation program. Also use when the user mentions "A/B test," "split test," "experiment," "test this change," "variant copy," "multivariate test," "hypothesis," "should I test this," "which version is better," "test two versions," "statistical significance," "how long should I run this test," "growth experiments," "experiment velocity," "experiment backlog," "ICE score," "experimentation program
oaustegard/claude-skills
Generate hierarchical _FEATURES.md files that describe what a codebase DOES from a user/consumer perspective, anchored to source symbols via tree-sitting. Supports large complex codebases through feature-driven decomposition into sub-feature files. Uses a multi-pass synthesis: orientation → detail → overview rewrite. Use when someone says "what does this do", "document features", "feature inventory", "_FEATURES.md", or needs to understand a codebase's purpose before modifying it. Complements tre
event4u-app/agent-config
Use BEFORE writing or editing any non-trivial UI — inventories components, design tokens, shadcn primitives, and reusable patterns into state.ui_audit. Hard gate for the ui directive set.
event4u-app/agent-config
Frontend design heuristics — and, outside the ticket engine, the loop that applies them: audit, brief, inventory, build, review. Use when building or changing any UI, not only when planning one.