# Learn From Sage

Detection-gap (miss) analysis for Code Review Sage.

- Repository: https://github.com/kirodotdev/KiroCrew (4711 stars)
- Category: Design
- License: Apache-2.0
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add kirodotdev/KiroCrew --skill learn-from-sage -g -a claude-code -y`
Codex: `npx skills add kirodotdev/KiroCrew --skill learn-from-sage -g -a codex -y`
Cursor: `npx skills add kirodotdev/KiroCrew --skill learn-from-sage -g -a cursor -y`
Gemini CLI: `npx skills add kirodotdev/KiroCrew --skill learn-from-sage -g -a gemini-cli -y`

## Description

Detection-gap (miss) analysis for Code Review Sage. Learn from shipped fixes, acted-on human comments, and design outcomes to close reviewer blind spots. Inline during review stages a candidate; a human triggers a one-shot AI consolidation into the live ruleset.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Learn from Sage, detection-gap (miss) analysis (V2, file-centric)

Learning is **not** summarizing what Sage found. It is finding issues that
**leaked past review and shipped**, then working backwards to close the gap so
the reviewer catches the next one.

Two files, one rule each:
- **`learned-patterns.md`**, the canonical, consolidated ruleset. The **only**
  file a review loads as heuristics. Human-editable.
- **`learned-patterns.candidate.md`**, **staging** for new learnings. Staging an
  exact equivalent (same title, scope, impact and guidance) adds
  `<!-- seen:N -->` and `<!-- last:<date> -->` to the existing entry instead of
  appending; anything else is appended. Reviews do NOT read it. It is merged into `learned-patterns.md` only when a
  human triggers **consolidation** (a one-shot AI merge), after which it's cleared.

## The interpreter in every command below

Commands here are written as `<python> …`. Replace `<python>` with the absolute
interpreter path the task prompt names, it is the one the app itself runs, and
it is the only interpreter guaranteed to exist on this host. Never substitute a
bare `python3`: Windows has no such interpreter (the name resolves to a
Microsoft Store app-execution alias that runs nothing), so the command would
stage nothing and the learning would be silently lost. Outside a review
session, use the interpreter running the app.

## Where every path below is rooted

The rest: https://github.com/kirodotdev/KiroCrew/blob/HEAD/src/kiro_crew/apps/builtins/code_review_sage/skills/learn-from-sage/SKILL.md
