requesting-code-review
Prepare code-review request bundle: per-file ownership, churn, connected
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Menú
Prepare code-review request bundle: per-file ownership, churn, connected
Instalar con Codex o Claude Copia este prompt, pégalo en Codex, Claude u otro asistente, y deja que revise la página de la skill y la instale por ti.
Basado en la clasificación ocupacional SOC
Decide HOW to write new code by inspecting git signals on neighbors — pulls strategy and templates from proven, low-churn nearby implementations rather than guessing from training data. Triggers on "implement function X", "add method to class Y", "write a helper for Z", "напиши функцию", "добавь метод". NOT for discovery or exploration — use tea-rags:explore for that. This skill activates ONCE the agent is about to write code.
Agentic-only enrichment skill — surface battle-tested reference code from project as templates for generation / modification. Three-level locality cascade (target subdomain → domain → project), quality gate by overlay labels + project-wide proven rerank preset. Returns ranked list of reference chunks + locality annotation (L1 / L2 / L3 / none). Invoked by `tea-rags:data-driven-generation` Step 2 (TEMPLATE), `dinopowers:writing-plans` (per code-gen Task), `dinopowers:executing-plans` (per Task during execute). Skipped when no `positiveIds` / `positiveCode` and no `behaviorQuery` available.
Run automated TeaRAGs install wizard from scratch — detects environment, installs deps (Node.js, tea-rags, Ollama/ONNX, Qdrant), tunes performance, configures MCP server. Progress saves to ~/.tea-rags/setup-progress.json for resumable install. Triggers on "install tea-rags", "set up TeaRAGs MCP", "configure tea-rags from scratch", "поставить tea-rags в проект". NOT for tuning an existing install — use tune for that.
Agent-only. Raise test coverage above a failed pre-commit threshold: locate the
Brainstorm code change seeing risk, ownership, tech-debt signals from tea-rags first — creative exploration grounded in actual state of affected area. Triggers on "brainstorm X", "design feature", "refactor Y", "let's discuss", "давай обсудим", "как перестроить", "что может сломаться". NOT for trivial edits or stylistic questions with no code area to enrich. Wraps superpowers:brainstorming with tea-rags risk-signal enrichment step.
Execute written implementation plan whose Tasks edit code, per-Task SAFE/CAUTION/UNSAFE git-signal verdict before edit AND code-style cascade for code-generation Tasks (style from silo authors, strategy+template from proven neighbors). Triggers on "execute the plan", "start Task N", "выполни план", "начни задачу", "run the plan", "implement the plan steps". NOT for one-off edits without a written plan. Wraps superpowers:executing-plans with tea-rags git-signal verdicts and tea-rags:data-driven-generation cascade.
| name | requesting-code-review |
| description | Prepare code-review request bundle: per-file ownership, churn, connected |
Wrapper over superpowers:requesting-code-review. Review request arrives at
reviewer with git-context bundle — who owns each file, churn levels, connected
tickets — reviewers pair-match by expertise, trace coordinated changes
immediately instead of re-excavating context.
tea-rags git-bundle query MUST run on git diff --name-only BEFORE composing
the review request — whenever ≥1 file changed.
Correct tool (semantic_search) + custom impact rerank
(imports: 0.5, churn: 0.3, ownership: 0.2) + parameters (brace-expanded
pathPattern over diff files, metaOnly: true) + bundle format (per-file
ownership/churn/taskIds, NOT blast-radius verdict) = core value.
Diff empty: skip wrapper, invoke superpowers:requesting-code-review directly.
Don't fabricate.
Chaining rule: see CHAINING.md — every dinopowers:X redirects superpowers:X. NEVER bypass wrapper.
Index freshness: see FRESHNESS.md and
tea-rags/rules/index-freshness.md. No background reindex hook — worktree-plan
freshness explicit (clone + per-task reindex in dinopowers:executing-plans);
run mcp__tea-rags__index_codebase manually to search code edited but not
committed, BEFORE first tea-rags call.
From git diff --name-only <base>...HEAD (branch diff) or git diff --staged
(pre-commit):
| Source | Example |
|---|---|
| Branch against base | git diff main...HEAD --name-only |
| Uncommitted + staged | git diff --name-only HEAD |
| Specific commit range | git diff <sha1>..<sha2> --name-only |
Output:
diffFiles: files changed in review scope (M/A, exclude pure D)intent: one-sentence description of what diff accomplishesPure deletions (D only): skip wrapper — reviewers need code-in-diff for context. Empty diff: skip.
Issue ONE mcp__tea-rags__semantic_search — SAME idiom as
dinopowers:writing-plans:
project: <alias from list_projects — RECOMMENDED, omit path when set>
path: <current project path — fallback when no alias is registered>
query: <intent from Step 1>
pathPattern: "{diffFile1,diffFile2,...}" ← brace expansion
rerank: { custom: { imports: 0.5, churn: 0.3, ownership: 0.2 } }
limit: <diffFiles.length * 3>
metaOnly: true
Do NOT substitute:
| Wrong tool | Why wrong |
|---|---|
mcp__tea-rags__hybrid_search | Custom rerank tied to semantic_search |
Named preset ("codeReview" / "ownership") | codeReview misses imports; ownership misses churn + taskIds in one call |
git blame / git log --format per-file | Manual git commands are slower and miss the indexed overlay |
mcp__tea-rags__find_similar | Finds code analogs, not diff metadata |
Do NOT pass:
metaOnly: false — bundle inputs are signals; content already in PR difffilter narrowing — pathPattern already scopesEmpty results (files too new to index): skip bundle, invoke
superpowers:requesting-code-review with note "diff files not yet indexed — no
git-context available". Don't fabricate.
When codegraph active (prime ## Enrichment lists codegraph.symbols), for
changed symbols diff touches run get_callers symbolId=<id> (resolve exact id
with find_symbol first). Callers = code depending on change — their
blameDominantAuthors are stakeholders to loop into review. Add "Affected
callers / suggested reviewers" line to bundle.
Skip when codegraph off (graph tools not registered) — ownership bundle from Step 2/3 still stands; note caller-impact not computed. Never invent caller lists.
Aggregate by relativePath. Per unique file extract:
blameDominantAuthor + blameDominantAuthorPct — live-line owner (must
approve based on current code state)recentDominantAuthor + recentDominantAuthorPct — recent committer
(mentally loaded, fastest turnaround)blameContributorCount (live owners), recentContributorCount (recent
committers)commitCount + ageDaystaskIds (connected tickets)bugFixRate (risk signal)Pick reviewers by blame* (authority); prioritize fast turnaround by recent*
(cache locality).
Compose bundle (goes INTO review request, not a verdict):
### Reviewer context bundle
**Files changed (per-file owners + history):**
| File | Owner | Contributors | Commits (age) | Related tickets |
|---|---|---|---|---|
| src/a.ts | Alice (92%) | 1 | 23 (142d) | #123, #145 |
| src/b.ts | shared (42%) | 5 | 8 (30d) | — |
**Suggested reviewers by expertise:**
- Alice — primary owner of `src/a.ts` (92% dominance)
- Bob — deep contributor to `src/b.ts` (last 3 commits)
**Coordinated change context:**
- Related ticket #123 also touched src/c.ts, src/d.ts in previous commits — reviewer should check consistency
**Risk flags for reviewer attention:**
- `src/a.ts` has bugFixRate=35% (high) — scrutinize new logic
- `src/e.ts` has been touched 47 times in 90 days — stability concern
If bundle exceeds 20 lines: truncate per-file table to top 10 by imports
score, note "N more files omitted".
Invoke Skill(tea-rags:tests-as-context) with:
recipe: "tests-at-risk"
affectedFiles: <diffFiles from Step 1>
intent: <intent from Step 1>
Recipe internally queries DSL leaf test chunks semantically bound to change. Output = ranked list of scenarios at risk.
Add to bundle one of:
If recipe returned SKIP (no DSL test chunks indexed):
**Scenarios under risk:** unavailable (no DSL test chunks indexed)
If recipe returned a non-empty list:
**Scenarios under risk:**
- <file>:<line> — <describe-it path>
- <file>:<line> — <describe-it path>
Cap at top 8 scenarios; note "N more omitted" if truncated. Reviewers see contract surface affected by diff, not just metadata.
If recipe returned empty result (preflight passed but no semantic match):
**Scenarios under risk:** no obvious test bindings found — reviewer should
verify whether new behavior needs new tests
Do NOT name specific test runners here. Phrasing stays generic; actual command left to reviewer / CI / pre-commit hook.
Invoke Skill tool with superpowers:requesting-code-review. Prepend bundle as
context. Phrase handoff as:
"Include this reviewer-context bundle in the review request: …… Reviewers can pair-match by ownership and see coordinated-change context without re-excavating history.
Chaining rule reminder: when your cycle would next invoke
superpowers:verification-before-completion(or any wrappedsuperpowers:Y), invokedinopowers:Yinstead — see the Chaining rule section above."
Let superpowers:requesting-code-review run its standard review-composition
cycle. Wrapper enriches request, doesn't replace review process.
superpowers:requesting-code-review chain into raw
superpowers:verification-before-completion without redirecting to
dinopowers:verification-before-completion → intercept, invoke wrapper
instead (see Chaining rule)| Mistake | Reality |
|---|---|
Use rerank: "ownership" alone | Returns ownership-dominant rank but misses imports, churn, taskIds in one call |
Use rerank: "codeReview" preset because "this is code review" | codeReview is for finding reviewable code, not building reviewer context |
| Paste full git log per file into bundle | Bundle is structured metadata, not raw history |
Skip taskIds in bundle | Connected tickets are the highest-value signal for reviewers — don't omit |
Include files with D status in bundle | Pure deletions don't need reviewer-context; show them in diff, not bundle |
| Fabricate dominant author when data is thin | Empty bundle > fake bundle; reviewers distrust fabricated ownership |