@rune-kit/rune 2.2.4 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/README.md +1 -1
  2. package/compiler/adapters/openclaw.js +63 -0
  3. package/compiler/emitter.js +10 -0
  4. package/docs/EXTENSION-TEMPLATE.md +18 -0
  5. package/docs/SKILL-TEMPLATE.md +46 -0
  6. package/docs/guides/index.html +84 -21
  7. package/docs/index.html +303 -37
  8. package/docs/script.js +236 -18
  9. package/docs/style.css +417 -59
  10. package/extensions/saas/PACK.md +13 -8
  11. package/extensions/saas/skills/billing-integration.md +82 -3
  12. package/package.json +7 -5
  13. package/skills/adversary/SKILL.md +12 -0
  14. package/skills/audit/SKILL.md +64 -1
  15. package/skills/autopsy/SKILL.md +12 -0
  16. package/skills/ba/SKILL.md +63 -1
  17. package/skills/brainstorm/SKILL.md +11 -0
  18. package/skills/completion-gate/SKILL.md +51 -2
  19. package/skills/context-engine/SKILL.md +83 -1
  20. package/skills/context-pack/SKILL.md +160 -0
  21. package/skills/cook/SKILL.md +657 -808
  22. package/skills/cook/references/deviation-rules.md +19 -0
  23. package/skills/cook/references/error-recovery.md +37 -0
  24. package/skills/cook/references/exit-conditions.md +31 -0
  25. package/skills/cook/references/loop-detection.md +39 -0
  26. package/skills/cook/references/mid-run-signals.md +31 -0
  27. package/skills/cook/references/output-format.md +40 -0
  28. package/skills/cook/references/pack-detection.md +82 -0
  29. package/skills/cook/references/pause-resume-template.md +38 -0
  30. package/skills/cook/references/rfc-template.md +52 -0
  31. package/skills/cook/references/sharp-edges.md +24 -0
  32. package/skills/cook/references/subagent-status.md +38 -0
  33. package/skills/db/SKILL.md +12 -0
  34. package/skills/debug/SKILL.md +81 -2
  35. package/skills/deploy/SKILL.md +56 -1
  36. package/skills/design/SKILL.md +9 -0
  37. package/skills/docs/SKILL.md +12 -0
  38. package/skills/docs-seeker/SKILL.md +11 -0
  39. package/skills/fix/SKILL.md +63 -3
  40. package/skills/git/SKILL.md +55 -1
  41. package/skills/incident/SKILL.md +10 -0
  42. package/skills/journal/SKILL.md +51 -3
  43. package/skills/launch/SKILL.md +12 -0
  44. package/skills/logic-guardian/SKILL.md +11 -0
  45. package/skills/marketing/SKILL.md +13 -0
  46. package/skills/mcp-builder/SKILL.md +13 -0
  47. package/skills/onboard/SKILL.md +54 -2
  48. package/skills/perf/SKILL.md +11 -0
  49. package/skills/plan/SKILL.md +342 -629
  50. package/skills/plan/references/completeness-scoring.md +37 -0
  51. package/skills/plan/references/outcome-block.md +41 -0
  52. package/skills/plan/references/plan-templates.md +193 -0
  53. package/skills/plan/references/wave-planning.md +44 -0
  54. package/skills/plan/references/workflow-registry.md +53 -0
  55. package/skills/preflight/SKILL.md +135 -1
  56. package/skills/rescue/SKILL.md +10 -0
  57. package/skills/research/SKILL.md +36 -8
  58. package/skills/retro/SKILL.md +325 -0
  59. package/skills/review/SKILL.md +100 -1
  60. package/skills/review-intake/SKILL.md +11 -0
  61. package/skills/safeguard/SKILL.md +12 -0
  62. package/skills/scaffold/SKILL.md +10 -0
  63. package/skills/scope-guard/SKILL.md +11 -0
  64. package/skills/scout/SKILL.md +9 -0
  65. package/skills/sentinel/SKILL.md +307 -320
  66. package/skills/sentinel/references/config-protection.md +52 -0
  67. package/skills/sentinel/references/destructive-commands.md +40 -0
  68. package/skills/sentinel/references/domain-hooks.md +73 -0
  69. package/skills/sentinel/references/framework-patterns.md +46 -0
  70. package/skills/sentinel/references/owasp-patterns.md +69 -0
  71. package/skills/sentinel/references/secret-patterns.md +40 -0
  72. package/skills/sentinel/references/skill-content-guard.md +55 -0
  73. package/skills/session-bridge/SKILL.md +60 -2
  74. package/skills/skill-forge/SKILL.md +131 -4
  75. package/skills/skill-router/SKILL.md +33 -1
  76. package/skills/surgeon/SKILL.md +12 -0
  77. package/skills/team/SKILL.md +35 -1
  78. package/skills/test/SKILL.md +211 -7
@@ -0,0 +1,325 @@
1
+ ---
2
+ name: retro
3
+ description: Engineering retrospective. Analyzes commit history, work patterns, and code quality metrics with trend tracking. Per-person breakdowns, shipping streaks, and actionable improvements. Use when asked for "retro", "weekly review", "what did we ship", or "engineering retrospective".
4
+ metadata:
5
+ author: runedev
6
+ version: "0.1.0"
7
+ layer: L2
8
+ model: sonnet
9
+ group: knowledge
10
+ tools: "Read, Bash, Glob, Grep"
11
+ ---
12
+
13
+ # retro
14
+
15
+ ## Purpose
16
+
17
+ Engineering retrospective engine. Analyzes git history, work patterns, and code quality signals to produce actionable retrospectives with per-person breakdowns, shipping streaks, and concrete improvement habits. Fills a gap in the Rune ecosystem — cook builds, review checks, but nothing reflects on HOW the team works.
18
+
19
+ <HARD-GATE>
20
+ Retro is READ-ONLY. It analyzes and reports — it does NOT modify code, create PRs, or change any files except its own output artifacts (.rune/retros/).
21
+ Retro is ENCOURAGING but CANDID. Every critique is anchored in specific commits, not vague impressions.
22
+ </HARD-GATE>
23
+
24
+ ## Triggers
25
+
26
+ - `/rune retro` — default 7-day retrospective
27
+ - `/rune retro 24h` — daily standup review
28
+ - `/rune retro 14d` — sprint retro (2 weeks)
29
+ - `/rune retro 30d` — monthly review
30
+ - `/rune retro compare` — current vs previous period side-by-side
31
+ - Called by `audit` (L2) for engineering health dimension
32
+ - Auto-suggest: end of work week (Friday sessions)
33
+
34
+ ## Calls (outbound)
35
+
36
+ - `scout` (L2): scan codebase for test file counts, project structure
37
+ - `neural-memory` (L3): recall past retro insights for trend comparison
38
+
39
+ ## Called By (inbound)
40
+
41
+ - `audit` (L2): engineering velocity and health dimension
42
+ - `cook` (L1): optional — after completing a multi-phase feature, suggest retro
43
+ - User: `/rune retro` direct invocation
44
+
45
+ ## Data Flow
46
+
47
+ ### Feeds Into →
48
+
49
+ - `plan` (L2): retro insights inform future sprint planning (e.g., "fix ratio too high → allocate debugging time")
50
+ - `journal` (L3): retro findings → ADR entries for team patterns
51
+ - `neural-memory` (external): retro insights → persistent cross-session memory
52
+
53
+ ### Fed By ←
54
+
55
+ - `git` history: commits, authors, timestamps, file changes
56
+ - `.rune/retros/` history: previous retro JSON for trend comparison
57
+ - `neural-memory` (external): past retro insights for pattern recognition
58
+
59
+ ### Feedback Loops ↻
60
+
61
+ - `retro` ↔ `plan`: retro identifies bottlenecks → plan adjusts estimation and phase sizing → next retro measures improvement
62
+
63
+ ## Execution
64
+
65
+ ### Step 1 — Gather Raw Data
66
+
67
+ Run these git commands to collect metrics for the specified time window:
68
+
69
+ ```bash
70
+ # Core metrics (run in parallel)
71
+ git log --since="<window-start>" --format="%H|%an|%ae|%aI|%s" --shortstat
72
+ git log --since="<window-start>" --format="%H" --numstat
73
+ git log --since="<window-start>" --format="%aI" # timestamps for session detection
74
+ git log --since="<window-start>" --format="%an" | sort | uniq -c | sort -rn # per-author
75
+ git shortlog --since="<window-start>" -sn # author leaderboard
76
+ ```
77
+
78
+ **Time window alignment**: For day/week units, align to midnight: `--since="YYYY-MM-DDT00:00:00"`. This prevents partial-day skew.
79
+
80
+ **Identify "You"**: `git config user.name` = current user. All others are teammates.
81
+
82
+ Also gather:
83
+ - Test file count: `find . -name "*.test.*" -o -name "*.spec.*" -o -name "*_test.*" | wc -l`
84
+ - `.rune/retros/` for prior retro history (if exists)
85
+ - TODOS.md for backlog health
86
+
87
+ ### Step 2 — Compute Summary Metrics
88
+
89
+ | Metric | How to compute |
90
+ |--------|---------------|
91
+ | Commits | Count from git log |
92
+ | Contributors | Unique authors |
93
+ | LOC added/removed | Sum from numstat |
94
+ | Test LOC ratio | test files LOC / total LOC changed |
95
+ | Active days | Unique dates with commits |
96
+ | Sessions | Detected via 45-min gap threshold (Step 4) |
97
+ | LOC/session-hour | Total LOC / total session hours |
98
+ | Fix ratio | `fix:` commits / total commits |
99
+
100
+ ### Step 3 — Hourly Activity Histogram
101
+
102
+ Build an ASCII bar chart showing commit distribution by hour (local timezone):
103
+
104
+ ```
105
+ Hour Commits
106
+ 06 ██ 3
107
+ 07 ████ 7
108
+ 08 ██████ 12
109
+ ...
110
+ ```
111
+
112
+ Identify: peak hours, dead zones, bimodal patterns (morning + evening coder).
113
+
114
+ ### Step 4 — Session Detection
115
+
116
+ Group commits into sessions using a **45-minute gap threshold**:
117
+
118
+ - Commits within 45 min of each other = same session
119
+ - Gap > 45 min = new session
120
+
121
+ Classify sessions:
122
+ - **Deep** (50+ min): focused work blocks
123
+ - **Medium** (20-50 min): moderate focus
124
+ - **Micro** (<20 min): quick fixes, drive-bys
125
+
126
+ ### Step 5 — Commit Type Breakdown
127
+
128
+ Parse conventional commit prefixes and show percentage bar:
129
+
130
+ ```
131
+ feat ████████████████ 45%
132
+ fix ████████ 22%
133
+ ref ████ 11%
134
+ test ████ 11%
135
+ docs ██ 5%
136
+ chore██ 6%
137
+ ```
138
+
139
+ **Flag**: if `fix` ratio > 50% → "High fix ratio suggests reactive mode. Consider investing in test coverage."
140
+
141
+ ### Step 6 — Hotspot Analysis
142
+
143
+ Top 10 most-changed files in the window:
144
+
145
+ | File | Changes | Test Coverage |
146
+ |------|---------|--------------|
147
+ | src/auth/login.ts | 8 | ✅ |
148
+ | src/api/users.ts | 6 | ❌ |
149
+
150
+ **Flag**: files with 5+ changes = **churn hotspot** — candidate for refactoring.
151
+ **Flag**: hotspot files without test coverage = **risk**.
152
+
153
+ ### Step 7 — Focus Score & Ship of the Week
154
+
155
+ - **Focus Score** = % of commits in top-changed directory. High focus (>60%) = deep work. Low focus (<30%) = context switching.
156
+ - **Ship of the Week** = highest-LOC commit/PR with feat: prefix. Celebrate it.
157
+
158
+ ### Step 8 — Per-Person Breakdown
159
+
160
+ For each contributor:
161
+
162
+ **Current user (deepest treatment):**
163
+ - Commits, LOC, areas of focus
164
+ - Commit type mix (builder vs fixer vs maintainer)
165
+ - Session patterns (deep vs micro ratio)
166
+ - Test discipline (% of feat commits with corresponding test commits)
167
+ - Biggest ship
168
+
169
+ **Teammates (2-3 sentences each):**
170
+ - Summary of work areas and volume
171
+ - **Specific praise** — anchored in actual commits (e.g., "Your auth refactor in 3 commits was surgically clean")
172
+ - **One growth opportunity** — constructive, based on patterns (e.g., "8 of 12 commits were fixes — consider adding tests alongside features")
173
+
174
+ ### Step 9 — Trend Tracking (if prior retros exist)
175
+
176
+ Read most recent `.rune/retros/*.json`. Compute deltas:
177
+
178
+ | Metric | Previous | Current | Delta |
179
+ |--------|----------|---------|-------|
180
+ | Commits | 45 | 52 | +15% ↑ |
181
+ | Test ratio | 0.18 | 0.24 | +33% ↑ |
182
+ | Fix ratio | 0.55 | 0.38 | -31% ↓ (improving) |
183
+ | Deep sessions | 8 | 12 | +50% ↑ |
184
+
185
+ ### Step 10 — Shipping Streak
186
+
187
+ Query full history for consecutive days with at least 1 commit:
188
+ - **Team streak**: any contributor committed
189
+ - **Personal streak**: current user committed
190
+
191
+ ### Step 11 — Save Retro History
192
+
193
+ Write JSON snapshot to `.rune/retros/{YYYY-MM-DD}.json`:
194
+
195
+ ```json
196
+ {
197
+ "date": "2026-03-20",
198
+ "window": "7d",
199
+ "metrics": {
200
+ "commits": 52, "contributors": 3, "loc_added": 1850,
201
+ "loc_removed": 620, "test_ratio": 0.24, "fix_ratio": 0.38,
202
+ "active_days": 5, "sessions": 14, "deep_sessions": 8
203
+ },
204
+ "authors": ["user1", "user2"],
205
+ "streak": { "team": 12, "personal": 5 },
206
+ "summary": "Shipped auth overhaul + 3 bug fixes. Test ratio improving."
207
+ }
208
+ ```
209
+
210
+ ### Step 12 — Write Narrative Report
211
+
212
+ Structure (~800-1500 words — concise, not a novel):
213
+
214
+ 1. **Tweetable summary** (1 sentence, <280 chars)
215
+ 2. **Summary table** (Step 2 metrics)
216
+ 3. **Time & session patterns** (Steps 3-4)
217
+ 4. **Shipping velocity** (Step 5 commit types)
218
+ 5. **Code quality signals** (Step 6 hotspots, test ratio)
219
+ 6. **Focus & highlights** (Step 7)
220
+ 7. **Your week** (current user deep dive from Step 8)
221
+ 8. **Team breakdown** (Step 8 teammates)
222
+ 9. **Top 3 wins** (specific, anchored in commits)
223
+ 10. **3 things to improve** (specific, actionable)
224
+ 11. **3 habits for next week** (concrete daily practices)
225
+ 12. **Trends** (Step 9, if available)
226
+
227
+ **Tone**: Encouraging but candid. Specific and concrete. Anchored in actual commits, not vague impressions. Every critique paired with a specific suggestion.
228
+
229
+ ## Compare Mode
230
+
231
+ When invoked as `/rune retro compare`:
232
+
233
+ 1. Compute current period metrics (same as above)
234
+ 2. Compute previous same-length period (e.g., if current = 7d, previous = 7d before that)
235
+ 3. Side-by-side delta table
236
+ 4. Highlight biggest improvements and regressions
237
+ 5. Save only current-period snapshot
238
+
239
+ ## Self-Validation
240
+
241
+ ```
242
+ SELF-VALIDATION (run before emitting report):
243
+ - [ ] All metrics computed from actual git data — no assumptions or estimates
244
+ - [ ] Per-person praise is anchored in specific commits (not generic "great work")
245
+ - [ ] Improvement suggestions are actionable (not "write more tests" but "add tests for the 3 hotspot files without coverage")
246
+ - [ ] Retro JSON saved to .rune/retros/ for trend tracking
247
+ - [ ] No code was modified — retro is read-only
248
+ ```
249
+
250
+ ## Constraints
251
+
252
+ 1. MUST NOT modify any code — retro is read-only analysis
253
+ 2. MUST anchor all observations in specific commits — no vague impressions
254
+ 3. MUST include per-person breakdown for teams with 2+ contributors
255
+ 4. MUST save JSON snapshot for trend tracking across retros
256
+ 5. MUST flag churn hotspots (5+ changes to same file)
257
+ 6. MUST flag high fix ratio (>50%) as reactive mode signal
258
+ 7. MUST include actionable habits — "test the hotspots" not "write more tests"
259
+
260
+ ## Sharp Edges
261
+
262
+ | Failure Mode | Severity | Mitigation |
263
+ |---|---|---|
264
+ | Generic praise not anchored in commits | HIGH | Every praise MUST reference a specific commit or PR — "great auth refactor in 3 commits" not "good job this week" |
265
+ | Vague improvement suggestions | HIGH | "Add tests for src/api/users.ts (6 changes, 0 tests)" not "consider writing more tests" |
266
+ | Counting merge commits as real work | MEDIUM | Use `--no-merges` flag to exclude merge commits from metrics |
267
+ | Timezone skew in hourly histogram | MEDIUM | Convert all timestamps to local timezone before bucketing |
268
+ | Retro on empty window (no commits) | LOW | Detect early and report: "No commits in the last {window}. Nothing to retro." |
269
+ | Discouraging tone for struggling weeks | HIGH | Even bad weeks have wins. Find the smallest positive signal and lead with it |
270
+
271
+ ## Output Format
272
+
273
+ ```
274
+ ## Engineering Retro: [date range]
275
+
276
+ > [tweetable summary]
277
+
278
+ ### Summary
279
+ | Metric | Value |
280
+ |--------|-------|
281
+ | Commits | N |
282
+ | ... | ... |
283
+
284
+ ### [remaining sections per Step 12]
285
+
286
+ ### Top 3 Wins
287
+ 1. [specific win anchored in commit]
288
+ 2. [specific win]
289
+ 3. [specific win]
290
+
291
+ ### 3 Things to Improve
292
+ 1. [specific, actionable]
293
+ 2. [specific, actionable]
294
+ 3. [specific, actionable]
295
+
296
+ ### 3 Habits for Next Week
297
+ 1. [concrete daily practice]
298
+ 2. [concrete daily practice]
299
+ 3. [concrete daily practice]
300
+ ```
301
+
302
+ ## Done When
303
+
304
+ - All git metrics gathered for specified time window
305
+ - Summary metrics computed (commits, LOC, test ratio, fix ratio, sessions)
306
+ - Per-person breakdown with specific praise and growth areas
307
+ - Top 3 wins and 3 improvements identified (commit-anchored)
308
+ - Retro JSON saved to `.rune/retros/` for trend tracking
309
+ - Narrative report emitted
310
+ - No code was modified
311
+
312
+ ## Returns
313
+
314
+ | Artifact | Format | Location |
315
+ |----------|--------|----------|
316
+ | Retrospective narrative report | Markdown (~800-1500 words) | inline |
317
+ | Retro JSON snapshot | JSON | `.rune/retros/{YYYY-MM-DD}.json` |
318
+ | Per-person breakdown | Markdown sections | inline |
319
+ | Action items + habits | Ordered lists | inline |
320
+
321
+ ## Cost Profile
322
+
323
+ ~3000-5000 tokens input (git history parsing), ~2000-4000 tokens output (narrative). Sonnet for analysis quality. Runs infrequently (weekly/sprint cadence).
324
+
325
+ **Scope guardrail:** retro is read-only — it analyzes and reports. It does NOT modify code, create PRs, or change any files except its own output artifacts in `.rune/retros/`.
@@ -3,7 +3,7 @@ name: review
3
3
  description: Code quality review — patterns, security, performance, correctness. Finds bugs, suggests improvements, triggers fix for issues found. Escalates to opus for security-critical code.
4
4
  metadata:
5
5
  author: runedev
6
- version: "0.3.0"
6
+ version: "0.5.0"
7
7
  layer: L2
8
8
  model: sonnet
9
9
  group: development
@@ -70,6 +70,28 @@ Determine what to review.
70
70
  - If context is unclear: use `rune:scout` to identify all files touched by the change
71
71
  - List every file in scope before proceeding — do not review files outside the stated scope
72
72
 
73
+ ### Step 1.5: Blast Radius Assessment
74
+
75
+ For each modified function/class, estimate its blast radius before reviewing.
76
+
77
+ ```
78
+ Use Grep to count direct callers/importers of each modified symbol:
79
+ blast_radius = count(files importing or calling this symbol)
80
+ ```
81
+
82
+ | Blast Radius | Risk | Review Depth |
83
+ |-------------|------|-------------|
84
+ | 1-5 callers | Low | Standard review |
85
+ | 6-20 callers | Medium | Check all callers for compatibility |
86
+ | 21-50 callers | High | Thorough review + regression test check |
87
+ | 50+ callers | Critical | MUST escalate to adversarial analysis (rune:adversary) even in quick triage |
88
+
89
+ <HARD-GATE>
90
+ Modifying a symbol with 50+ callers + HIGH severity change (logic, types, behavior) → adversarial analysis REQUIRED. Quick review is NOT sufficient for high-blast-radius changes.
91
+ </HARD-GATE>
92
+
93
+ > Source: trailofbits/skills (3.7k★) — quantitative blast radius as escalation threshold.
94
+
73
95
  ### Step 2: Logic Check (Production-Critical Focus)
74
96
 
75
97
  Read each changed file. Prioritize bugs that **pass CI but break production** — these are the highest-value findings because linters and type checkers already catch the rest.
@@ -156,6 +178,24 @@ Check for security-relevant issues.
156
178
  - If any security-sensitive code found (auth logic, input handling, crypto, payment): call `rune:sentinel` for deep scan
157
179
  - Sentinel escalation is mandatory — do not skip it for auth or crypto code
158
180
 
181
+ ### Step 4.5: API Pit-of-Success Check
182
+
183
+ For code that exposes APIs, shared utilities, or reusable interfaces, evaluate through 3 adversary personas:
184
+
185
+ | Adversary | Mindset | What They Reveal |
186
+ |-----------|---------|-----------------|
187
+ | **The Scoundrel** | Malicious — controls config, crafts inputs, exploits edge cases | Security holes, privilege escalation, injection surfaces |
188
+ | **The Lazy Developer** | Copy-pastes from docs, skips error handling, uses defaults | Unsafe defaults, missing validation, footgun APIs |
189
+ | **The Confused Developer** | Misunderstands API semantics, passes wrong types, ignores return values | Ambiguous interfaces, poor naming, missing type safety |
190
+
191
+ **Pit-of-Success principle**: Secure, correct usage should be the path of least resistance. If the API makes it EASIER to use it wrong than right → WARN.
192
+
193
+ Check: Does the API have sensible defaults? Does misuse fail loudly (not silently)? Is the happy path obvious from the signature?
194
+
195
+ **Skip if**: Code is internal-only (no external consumers), single-use utility, or test-only.
196
+
197
+ > Source: trailofbits/skills (3.7k★) — 3 adversary types for API review.
198
+
159
199
  ### Step 5: Test Coverage
160
200
 
161
201
  Identify gaps in test coverage.
@@ -324,6 +364,36 @@ className="focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500"
324
364
  - iOS target: solid-background cards (iOS 26 Liquid Glass deprecates this visual language) — should use translucent/blur surfaces
325
365
  - Android target: hardcoded hex colors instead of `MaterialTheme.colorScheme` tokens → not adaptive to dynamic color
326
366
 
367
+ ## Weighted Composite Scoring
368
+
369
+ When a review is part of a recurring quality-gate cycle (e.g., sprint review, pre-release gate), produce a **composite quality score** alongside the findings list. This makes review output numeric and comparable across runs.
370
+
371
+ ### Formula
372
+
373
+ ```
374
+ Quality Score = (Correctness × 0.35) + (Security × 0.30) + (Test Coverage × 0.20) + (Conventions × 0.15)
375
+ ```
376
+
377
+ Each dimension is scored 0–100 based on findings count and severity:
378
+ - 0 CRITICAL/HIGH findings → 100 for that dimension
379
+ - 1 CRITICAL → dimension capped at 40
380
+ - 1 HIGH → dimension capped at 70
381
+ - Each additional MEDIUM → subtract 5 (floor: 50)
382
+
383
+ ### Grade Thresholds
384
+
385
+ | Score | Grade | Verdict |
386
+ |-------|-------|---------|
387
+ | 90–100 | Excellent | APPROVE |
388
+ | 75–89 | Good | APPROVE with notes |
389
+ | 60–74 | Fair | REQUEST CHANGES (MEDIUM issues) |
390
+ | 40–59 | Poor | REQUEST CHANGES (HIGH issues present) |
391
+ | 0–39 | Critical | REQUEST CHANGES (CRITICAL present) |
392
+
393
+ **When to include**: Only when `mode: "scored"` is passed by the caller, or when invoked by `audit`. Default review output uses the standard severity-ranked report without the score.
394
+
395
+ > Source: zubair-trabzada/geo-seo-claude (2.7k★) — weighted composite formula, 5-tier grade thresholds.
396
+
327
397
  ## Severity Levels
328
398
 
329
399
  ```
@@ -339,8 +409,12 @@ LOW — style inconsistency, naming suggestion, minor refactor opportunity
339
409
  ## Code Review Report
340
410
  - **Files Reviewed**: [count]
341
411
  - **Findings**: [count by severity]
412
+ - **Review Commit**: [git hash at time of review]
342
413
  - **Overall**: APPROVE | REQUEST CHANGES | NEEDS DISCUSSION
343
414
 
415
+ ### Spec Compliance
416
+ - [PASS/FAIL]: [acceptance criteria coverage]
417
+
344
418
  ### CRITICAL
345
419
  - `path/to/file.ts:42` — [description of critical issue]
346
420
 
@@ -350,6 +424,9 @@ LOW — style inconsistency, naming suggestion, minor refactor opportunity
350
424
  ### MEDIUM
351
425
  - `path/to/file.ts:120` — [description of medium issue]
352
426
 
427
+ ### Blast Radius
428
+ - [High-impact symbols with caller counts]
429
+
353
430
  ### Positive Notes
354
431
  - [good patterns observed]
355
432
 
@@ -357,6 +434,18 @@ LOW — style inconsistency, naming suggestion, minor refactor opportunity
357
434
  [Summary and recommendation]
358
435
  ```
359
436
 
437
+ ### Review Staleness Detection
438
+
439
+ Track the git commit hash at review time. If code changes after review → review is STALE.
440
+
441
+ ```
442
+ Review commit: abc123 → Code changed to def456 → Review is STALE, re-review required
443
+ ```
444
+
445
+ When `cook` or `ship` checks review status: compare review commit hash with current HEAD. If different → WARN: "Review is stale — code changed since last review."
446
+
447
+ > Source: garrytan/gstack v0.9.4 (50.9k★) — commit hash staleness tracking for reviews.
448
+
360
449
  ## Constraints
361
450
 
362
451
  1. MUST read the full diff — not just the files the user pointed at
@@ -367,6 +456,16 @@ LOW — style inconsistency, naming suggestion, minor refactor opportunity
367
456
  6. MUST escalate to sentinel if auth/crypto/secrets code is touched
368
457
  7. MUST flag untested code paths and recommend tests via rune:test
369
458
 
459
+ ## Returns
460
+
461
+ | Artifact | Format | Location |
462
+ |----------|--------|----------|
463
+ | Code review report | Markdown | inline (chat output) |
464
+ | Severity-ranked findings | Markdown table | inline |
465
+ | Spec compliance verdict | Markdown | inline |
466
+ | Composite quality score | Markdown table | inline (when `mode: "scored"`) |
467
+ | Blast radius assessment | Markdown table | inline |
468
+
370
469
  ## Sharp Edges
371
470
 
372
471
  | Failure Mode | Severity | Mitigation |
@@ -233,6 +233,17 @@ How to push back:
233
233
  - Tests pass after each individual fix
234
234
  - Review Intake Report emitted
235
235
 
236
+ ## Returns
237
+
238
+ | Artifact | Format | Location |
239
+ |----------|--------|----------|
240
+ | Review Intake Report | Markdown table | inline |
241
+ | Categorized feedback (P0–P4) | Classified list | inline |
242
+ | Verdict per item (CORRECT/PUSHBACK/YAGNI/DEFER) | Table | inline |
243
+ | Action plan (changes applied) | File list with descriptions | inline |
244
+
236
245
  ## Cost Profile
237
246
 
238
247
  ~2000-5000 tokens depending on feedback volume. Sonnet for evaluation logic, haiku for scout/grep verification.
248
+
249
+ **Scope guardrail:** review-intake processes the feedback items provided — it does not pull new reviews, open PRs, or change architectural decisions without owner confirmation.
@@ -183,6 +183,18 @@ Known failure modes for this skill. Check these before declaring done.
183
183
  - Git tag `rune-safeguard-<module>` created
184
184
  - Safeguard Report emitted with test count, coverage, and rollback tag
185
185
 
186
+ ## Returns
187
+
188
+ | Artifact | Format | Location |
189
+ |----------|--------|----------|
190
+ | Characterization test file | TypeScript/JS/Python test | `tests/char/<module>.test.*` |
191
+ | Boundary markers | Code comments (@legacy, @bridge) | in-source |
192
+ | Frozen config snapshot | Copies of config files | `.rune/*.frozen.*` |
193
+ | Git rollback tag | Git tag | `rune-safeguard-<module>` |
194
+ | Safeguard Report | Markdown | inline |
195
+
186
196
  ## Cost Profile
187
197
 
188
198
  ~2000-5000 tokens input, ~1000-2000 tokens output. Sonnet for test writing quality.
199
+
200
+ **Scope guardrail:** safeguard builds safety nets only — it does not refactor code. All surgery is delegated to `surgeon` after the safeguard HARD-GATE passes.
@@ -247,6 +247,16 @@ Max 3 fix-verify loops. If still failing after 3 → report failures to user wit
247
247
  9. MUST respect user's existing project if scaffolding into non-empty directory — warn and ask before overwriting
248
248
  10. Generated files MUST be < 500 LOC each — split large files
249
249
 
250
+ ## Returns
251
+
252
+ | Artifact | Format | Location |
253
+ |----------|--------|----------|
254
+ | Project directory structure | Directories + files | Project root (per plan) |
255
+ | Source code | Source files | Per plan file list |
256
+ | Test suite | Source files | Co-located or `tests/` per framework convention |
257
+ | Documentation | Markdown | `README.md`, `ARCHITECTURE.md`, `docs/API.md` as applicable |
258
+ | Scaffold Report | Markdown (inline) | Emitted at session end |
259
+
250
260
  ## Sharp Edges
251
261
 
252
262
  | Failure Mode | Severity | Mitigation |
@@ -145,6 +145,17 @@ Known failure modes for this skill. Check these before declaring done.
145
145
  - Creep severity classified (IN_SCOPE / MINOR CREEP / SIGNIFICANT CREEP)
146
146
  - Scope Report emitted with recommendations
147
147
 
148
+ ## Returns
149
+
150
+ | Artifact | Format | Location |
151
+ |----------|--------|----------|
152
+ | Scope Report | Markdown (IN_SCOPE / MINOR CREEP / SIGNIFICANT CREEP) | inline |
153
+ | In-scope file list | Classified list | inline |
154
+ | Out-of-scope drift report | File list with reasons | inline |
155
+ | Recommendations | Actionable list | inline |
156
+
148
157
  ## Cost Profile
149
158
 
150
159
  ~200-500 tokens input, ~100-300 tokens output. Haiku. Lightweight monitor.
160
+
161
+ **Scope guardrail:** scope-guard reports drift and advises — it does not revert files, block commits, or modify code. Override decisions belong to the calling orchestrator or the user.
@@ -206,6 +206,13 @@ None — pure scanner using Glob, Grep, Read, and Bash tools directly. Does not
206
206
  - [pattern or potential issue noticed]
207
207
  ```
208
208
 
209
+ ## Returns
210
+
211
+ | Artifact | Format | Location |
212
+ |----------|--------|----------|
213
+ | Scout Report | Markdown (inline) | Emitted to calling skill |
214
+ | Codebase map | Markdown | `.rune/codebase-map.md` (when called by cook, team, onboard, autopsy) |
215
+
209
216
  ## Sharp Edges
210
217
 
211
218
  Known failure modes for this skill. Check these before declaring done.
@@ -230,3 +237,5 @@ Known failure modes for this skill. Check these before declaring done.
230
237
  ## Cost Profile
231
238
 
232
239
  ~500-2000 tokens input, ~200-500 tokens output. Always haiku. Cheapest skill in the mesh.
240
+
241
+ **Scope guardrail**: Do not expand the scan to unrelated modules or write files beyond `.rune/codebase-map.md` unless explicitly delegated by the parent agent.