@rune-kit/rune 2.14.0 → 2.16.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 (74) hide show
  1. package/README.md +31 -11
  2. package/compiler/__tests__/adapter-model-mapping.test.js +152 -0
  3. package/compiler/__tests__/context-preview-signal.test.js +166 -0
  4. package/compiler/__tests__/oracle-bundle-format.test.js +210 -0
  5. package/compiler/__tests__/oracle-pending-schema.test.js +209 -0
  6. package/compiler/__tests__/skill-description-quality.test.js +149 -0
  7. package/compiler/adapters/antigravity.js +17 -1
  8. package/compiler/adapters/claude.js +4 -0
  9. package/compiler/adapters/codex.js +16 -1
  10. package/compiler/adapters/cursor.js +4 -0
  11. package/compiler/adapters/generic.js +14 -1
  12. package/compiler/adapters/openclaw.js +15 -1
  13. package/compiler/adapters/opencode.js +17 -1
  14. package/compiler/adapters/windsurf.js +4 -0
  15. package/package.json +2 -1
  16. package/skills/adversary/SKILL.md +61 -1
  17. package/skills/adversary/evals.md +79 -0
  18. package/skills/adversary/references/context-bundle-format.md +122 -0
  19. package/skills/adversary/references/oracle-mode.md +116 -0
  20. package/skills/asset-creator/SKILL.md +1 -1
  21. package/skills/audit/SKILL.md +2 -1
  22. package/skills/autopsy/SKILL.md +1 -1
  23. package/skills/ba/SKILL.md +73 -5
  24. package/skills/ba/references/synthesis-mode.md +105 -0
  25. package/skills/brainstorm/SKILL.md +1 -1
  26. package/skills/browser-pilot/SKILL.md +1 -1
  27. package/skills/completion-gate/SKILL.md +1 -1
  28. package/skills/constraint-check/SKILL.md +1 -1
  29. package/skills/context-engine/SKILL.md +119 -2
  30. package/skills/context-engine/references/caveman-mode.md +107 -0
  31. package/skills/context-engine/references/preview-gate.md +139 -0
  32. package/skills/context-pack/SKILL.md +22 -1
  33. package/skills/context-pack/references/agent-brief.md +194 -0
  34. package/skills/cook/SKILL.md +3 -2
  35. package/skills/db/SKILL.md +1 -1
  36. package/skills/debug/SKILL.md +22 -6
  37. package/skills/debug/references/feedback-loop-ladder.md +62 -0
  38. package/skills/dependency-doctor/SKILL.md +1 -1
  39. package/skills/design/SKILL.md +1 -1
  40. package/skills/doc-processor/SKILL.md +1 -1
  41. package/skills/docs/SKILL.md +1 -1
  42. package/skills/docs-seeker/SKILL.md +1 -1
  43. package/skills/fix/SKILL.md +4 -3
  44. package/skills/git/SKILL.md +1 -1
  45. package/skills/hallucination-guard/SKILL.md +1 -1
  46. package/skills/integrity-check/SKILL.md +1 -1
  47. package/skills/journal/SKILL.md +1 -1
  48. package/skills/logic-guardian/SKILL.md +1 -1
  49. package/skills/marketing/SKILL.md +1 -1
  50. package/skills/mcp-builder/SKILL.md +1 -1
  51. package/skills/onboard/SKILL.md +1 -1
  52. package/skills/perf/SKILL.md +1 -1
  53. package/skills/plan/SKILL.md +10 -5
  54. package/skills/plan/references/vertical-slice.md +79 -0
  55. package/skills/preflight/SKILL.md +1 -1
  56. package/skills/research/SKILL.md +1 -1
  57. package/skills/retro/SKILL.md +1 -1
  58. package/skills/review/SKILL.md +2 -2
  59. package/skills/review-intake/SKILL.md +27 -7
  60. package/skills/review-intake/references/issue-triage.md +202 -0
  61. package/skills/safeguard/SKILL.md +1 -1
  62. package/skills/scaffold/SKILL.md +1 -1
  63. package/skills/sentinel/SKILL.md +1 -1
  64. package/skills/sentinel-env/SKILL.md +1 -1
  65. package/skills/session-bridge/SKILL.md +91 -4
  66. package/skills/session-bridge/references/detach-protocol.md +111 -0
  67. package/skills/skill-forge/SKILL.md +1 -1
  68. package/skills/slides/SKILL.md +1 -1
  69. package/skills/surgeon/SKILL.md +3 -1
  70. package/skills/team/SKILL.md +5 -0
  71. package/skills/trend-scout/SKILL.md +1 -1
  72. package/skills/video-creator/SKILL.md +1 -1
  73. package/skills/watchdog/SKILL.md +1 -1
  74. package/skills/worktree/SKILL.md +1 -1
@@ -0,0 +1,194 @@
1
+ # Agent Brief (Durable Handoff Variant)
2
+
3
+ A context-pack variant designed for **async handoff to AFK agents** — one-shot agents that pick up work hours or days later, without the live conversation context. The standard context-pack is for immediate sub-agent dispatch; the agent brief is for the handoff that may sit in a queue (issue tracker, task board, scheduled run).
4
+
5
+ > The standard packet is a system prompt. The agent brief is a contract. Both must survive without the originating conversation; the brief must also survive code drift.
6
+
7
+ ## When to use agent-brief vs standard packet
8
+
9
+ | Variant | Use when |
10
+ |---------|----------|
11
+ | **Standard packet** (`Output Format` in SKILL.md) | Immediate dispatch — sub-agent runs in the same session, < 1 hour delay, codebase will not drift |
12
+ | **Agent brief** (this file) | Async dispatch — task posted to issue tracker, scheduled run, or external worker. May sit for days. Codebase may rename/move files in the meantime. |
13
+
14
+ Both share the same compression discipline. Agent brief adds **durability rules** to survive drift.
15
+
16
+ ## The two extra principles
17
+
18
+ ### 1. Durability over precision
19
+
20
+ The brief may execute days later. Files renamed, moved, refactored. Write so the brief stays useful.
21
+
22
+ | Do | Don't |
23
+ |----|-------|
24
+ | Describe interfaces, types, behavioral contracts | Reference file paths in narrative ("change `src/auth/login.ts`") |
25
+ | Name specific types, function signatures, config shapes the agent should look for | Reference line numbers ("on line 42") |
26
+ | Describe what to find ("the function that validates JWT tokens") | Assume current implementation structure stays the same |
27
+
28
+ File paths can appear in `### Files Touched` (locator-only, may rename). They cannot appear in narrative.
29
+
30
+ ### 2. Behavioral, not procedural
31
+
32
+ Describe **what** the system should do, not **how** to implement it. The agent will explore the codebase fresh and make implementation decisions.
33
+
34
+ | Behavioral (good) | Procedural (bad) |
35
+ |-------------------|------------------|
36
+ | `SkillConfig` should accept an optional `schedule: CronExpression` field | Open `src/types/skill.ts` and add a `schedule` field on line 42 |
37
+ | When user runs `/triage` with no args, show a summary of issues needing attention | Add a switch statement in the main handler |
38
+ | Truncated descriptions end at last word boundary before 1024 chars and append `...` | Modify the `truncate()` function to check word boundaries |
39
+
40
+ ## Template
41
+
42
+ ```markdown
43
+ ## Agent Brief
44
+
45
+ **Category:** bug | enhancement | refactor
46
+ **Summary:** one-line description of what needs to happen
47
+
48
+ **Current behavior:**
49
+ What happens now. For bugs: the broken behavior. For enhancements: the status quo.
50
+
51
+ **Desired behavior:**
52
+ What should happen after the work is complete. Be specific about edge cases and error conditions.
53
+
54
+ **Key interfaces:**
55
+ - `TypeName` — what needs to change and why
56
+ - `functionName(input: T): Result<O, E>` — current contract vs desired contract
57
+ - Config shape — any new options needed
58
+
59
+ **Acceptance criteria:**
60
+ - [ ] Specific, independently testable criterion 1
61
+ - [ ] Specific, independently testable criterion 2
62
+ - [ ] Specific, independently testable criterion 3
63
+
64
+ **Out of scope:**
65
+ - Thing that should NOT be changed
66
+ - Adjacent feature that might seem related but is separate
67
+ - (or "(none)" if explicitly empty)
68
+
69
+ **Files Touched (locator hints, may rename):**
70
+ - `path/to/file.ts` (`TypeName`, `functionName`) — behavioral hint
71
+ ```
72
+
73
+ ## Worked example — bug
74
+
75
+ ```markdown
76
+ ## Agent Brief
77
+
78
+ **Category:** bug
79
+ **Summary:** Skill description truncation drops mid-word, producing broken output
80
+
81
+ **Current behavior:**
82
+ When a skill description exceeds 1024 characters, it is truncated at exactly 1024
83
+ characters regardless of word boundaries. Output ends mid-word
84
+ (e.g. "Use when the user wants to confi").
85
+
86
+ **Desired behavior:**
87
+ Truncation should break at the last word boundary before 1024 characters and
88
+ append "..." to indicate truncation. Total length including "..." must not
89
+ exceed 1024 chars.
90
+
91
+ **Key interfaces:**
92
+ - The `SkillMetadata` type's `description` field — no type change, but the
93
+ validation/processing logic that populates it needs to respect word boundaries
94
+ - Any function that reads SKILL.md frontmatter and extracts the description
95
+
96
+ **Acceptance criteria:**
97
+ - [ ] Descriptions under 1024 chars are unchanged
98
+ - [ ] Descriptions over 1024 chars are truncated at the last word boundary before 1024 chars
99
+ - [ ] Truncated descriptions end with "..."
100
+ - [ ] Total length including "..." does not exceed 1024 chars
101
+
102
+ **Out of scope:**
103
+ - Changing the 1024 char limit itself
104
+ - Multi-line description support
105
+
106
+ **Files Touched:**
107
+ - `compiler/parser.js` (`extractDescription`) — likely truncation site
108
+ - `compiler/__tests__/skill-description-quality.test.js` — add coverage
109
+ ```
110
+
111
+ ## Worked example — enhancement
112
+
113
+ ```markdown
114
+ ## Agent Brief
115
+
116
+ **Category:** enhancement
117
+ **Summary:** Add `.out-of-scope/` directory support for tracking rejected feature requests
118
+
119
+ **Current behavior:**
120
+ Rejected feature requests are closed with a `wontfix` label and a comment.
121
+ No persistent record of decision or reasoning. Future similar requests require
122
+ the maintainer to recall or search prior discussion.
123
+
124
+ **Desired behavior:**
125
+ Rejected feature requests are documented in `.out-of-scope/<concept>.md` files
126
+ capturing decision, reasoning, and links to all issues that requested the
127
+ feature. New issues are matched against these files during triage.
128
+
129
+ **Key interfaces:**
130
+ - Markdown file format in `.out-of-scope/` — each file has a `# Concept Name`
131
+ heading, `**Decision:**` line, `**Reason:**` line, `**Prior requests:**` list
132
+ - The triage workflow reads all `.out-of-scope/*.md` files early and matches
133
+ incoming issues by concept similarity
134
+
135
+ **Acceptance criteria:**
136
+ - [ ] Closing a feature as wontfix creates/updates a file in `.out-of-scope/`
137
+ - [ ] File includes the decision, reasoning, link to the closed issue
138
+ - [ ] If a matching `.out-of-scope/` file already exists, the new issue is appended
139
+ to its "Prior requests" list rather than creating a duplicate
140
+ - [ ] During triage, existing `.out-of-scope/` files are checked and surfaced
141
+ when a new issue matches a prior rejection
142
+
143
+ **Out of scope:**
144
+ - Automated matching (human confirms the match)
145
+ - Reopening previously rejected features
146
+ - Bug reports (only enhancement rejections go to `.out-of-scope/`)
147
+ ```
148
+
149
+ ## Anti-pattern (what makes a brief rot)
150
+
151
+ ```markdown
152
+ ## Agent Brief
153
+
154
+ **Summary:** Fix the triage bug
155
+
156
+ **What to do:**
157
+ The triage thing is broken. Look at the main file and fix it.
158
+ The function around line 150 has the issue.
159
+
160
+ **Files to change:**
161
+ - src/triage/handler.ts (line 150)
162
+ - src/types.ts (line 42)
163
+ ```
164
+
165
+ Rots because:
166
+ - No category
167
+ - Vague summary ("the triage thing")
168
+ - Line numbers in narrative — go stale on first edit
169
+ - File paths in narrative without behavioral hint
170
+ - No acceptance criteria
171
+ - No scope boundaries
172
+ - No current vs desired behavior split
173
+
174
+ ## Smell test additions for agent-brief
175
+
176
+ In addition to the BLOCK-tier smell tests in `context-pack/SKILL.md`, agent briefs MUST also pass:
177
+
178
+ | Check | Tier | Reason |
179
+ |-------|------|--------|
180
+ | Has `**Category:**` line with `bug`, `enhancement`, or `refactor` | BLOCK | Agent uses category for routing decisions |
181
+ | Has `**Current behavior:**` AND `**Desired behavior:**` sections | BLOCK | Without both, agent can't verify the delta |
182
+ | Acceptance criteria are independently testable (each can pass/fail alone) | BLOCK | Bundled criteria hide partial completion |
183
+ | `**Key interfaces:**` names actual types/functions, not file paths | BLOCK | The whole point of the brief — drift survival |
184
+ | `**Out of scope:**` present (even `(none)`) | BLOCK | Prevents gold-plating |
185
+
186
+ ## Integration
187
+
188
+ Use agent-brief when delegating to:
189
+ - An issue tracker (GitHub issue, Linear, Jira) for an AFK agent to pick up
190
+ - `rune:autopilot` (Pro) for autonomous multi-session work
191
+ - A scheduled cron agent (`/schedule` for one-time follow-up)
192
+ - Any handoff where the receiver may not see the originating conversation
193
+
194
+ Use the standard packet for in-session subagent dispatch (cook → fix, team → workstream).
@@ -217,7 +217,7 @@ Auto-trigger: no `.rune/` dir (first run) OR build just failed with env-looking
217
217
 
218
218
  1. Create TodoWrite with all applicable phases for this task
219
219
  2. Mark Phase 1 as `in_progress`
220
- 3. **BA gate**: Feature Request / Integration / Greenfield → invoke `rune:ba`. Task > 50 words or business terms (users, revenue, workflow) → invoke `rune:ba`. Bug Fix / simple Refactor → skip. BA produces `.rune/features/<name>/requirements.md` for Phase 2.
220
+ 3. **BA gate**: Feature Request / Integration / Greenfield → invoke `rune:ba`. Task > 50 words or business terms (users, revenue, workflow) → invoke `rune:ba`. Bug Fix / simple Refactor → skip. BA produces `.rune/features/<name>/requirements.md` for Phase 2. **Synthesis-mode auto-trigger**: if user pasted a spec > 200 words, conversation has > 1000 words on this feature, `.rune/features/<name>/requirements.md` already exists (continuation), or user said "synthesize"/"just write the spec" → BA Step 1.4 activates Synthesis Mode (extract + cite sources + confirm), skipping the 5-question elicitation. Cook does NOT need to choose mode — BA detects automatically.
221
221
  4. **Decision enforcement**: `Glob` for `.rune/decisions.md`; if exists, `Read` + extract constraints for Phase 2. Plan MUST NOT contradict active decisions without explicit user override.
222
222
  4b. **Contract enforcement**: If `.rune/contract.md` was loaded in Phase 0.6, list applicable contract sections for this task (e.g., `contract.security` for auth work, `contract.data` for database changes). These rules constrain Phase 2 planning and Phase 4 implementation.
223
223
 
@@ -384,6 +384,7 @@ If the coder model needs info from other phases, it's in the Cross-Phase Context
384
384
  4. Run tests after each significant change — if fail → debug and fix
385
385
  - **Python async** (if async-first flagged): no blocking calls in async functions — `time.sleep` → `asyncio.sleep`, `requests` → `httpx.AsyncClient`, use `asyncio.gather()` for parallel I/O
386
386
  5. If stuck → invoke `rune:debug` (max 3 debug↔fix loops). Fixes outside plan scope require user approval (R4).
387
+ - **Oracle reattach check** — between tasks, glob `.rune/oracle-pending/*.json`. For any record with `status=pending`, invoke `session-bridge --reattach <sessionId>`. If `complete` → consume the response (route to debug/fix per `sourceSkill`). If `pending` → continue with next independent task. If `failed` → continue without second opinion.
387
388
  6. **Re-plan check** — evaluate before Phase 5: max debug loops hit? out-of-scope files changed? new dep changes approach? user scope change? If any fire → invoke `rune:plan` with delta context, get user approval before resuming.
388
389
  7. **Approach Pivot Gate** — if re-plan ALSO fails:
389
390
 
@@ -765,7 +766,7 @@ Mentally track tool call fingerprints. 3 identical calls → WARN. 5 identical c
765
766
  | 5 | `scope-guard` | L3 | Verify changed files match approved plan scope (flag out-of-scope files before commit) |
766
767
  | 5 | `perf` | L2 | Performance regression check (optional) |
767
768
  | 5 | `audit` | L2 | Project health audit when scope warrants |
768
- | 5 | `review-intake` | L2 | Structured review intake for complex PRs |
769
+ | 5 | `review-intake` | L2 | Structured review intake for complex PRs OR Issue Triage Mode for issue tracker items (state machine: needs-triage / needs-info / ready-for-agent / ready-for-human / wontfix). When external feedback source is an issue (not PR comment), review-intake auto-detects and runs Issue Triage Mode — emits `triage.classified` + `agent.brief.ready` (for AFK pickup) |
769
770
  | 5 | `sast` | L3 | Static analysis security testing |
770
771
  | 5d | `completion-gate` | L3 | Validate agent claims against evidence trail |
771
772
  | 5 | `constraint-check` | L3 | Audit HARD-GATE compliance across workflow |
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: db
3
- description: Database workflow specialist. Generates migration files with rollback scripts, detects breaking schema changes, and validates query parameterization.
3
+ description: "Database workflow specialist. Generates migration files with rollback scripts, detects breaking schema changes, and validates query parameterization."
4
4
  metadata:
5
5
  author: runedev
6
6
  version: "0.2.0"
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  name: debug
3
- description: Root cause analysis for bugs and unexpected behavior. Traces errors through code, uses structured reasoning, and hands off to fix when cause is found. Core of the debug↔fix mesh.
3
+ description: "Root cause analysis for bugs and unexpected behavior. Traces errors through code, uses structured reasoning, and hands off to fix when cause is found. Core of the debug↔fix mesh."
4
4
  metadata:
5
5
  author: runedev
6
- version: "1.1.0"
6
+ version: "1.2.0"
7
7
  layer: L2
8
8
  model: sonnet
9
9
  group: development
10
10
  tools: "Read, Bash, Glob, Grep"
11
11
  emit: bug.diagnosed, agent.stuck
12
- listen: tests.failed
12
+ listen: tests.failed, oracle.response
13
13
  ---
14
14
 
15
15
  # debug
@@ -21,8 +21,9 @@ Root cause analysis ONLY. Debug investigates — it does NOT fix. It traces erro
21
21
  <HARD-GATE>
22
22
  Do NOT fix the code. Debug investigates only. Any code change is out of scope.
23
23
  If root cause cannot be identified after 3 hypothesis cycles:
24
- - Emit `agent.stuck` signal — `scout` zoom-out mode may surface the broader module map that's hiding the root cause
25
- - Escalate to `rune:problem-solver` for structured 5-Whys or Fishbone analysis
24
+ - Emit `agent.stuck` signal — `scout` zoom-out mode surfaces broader module map (structural pivot); `adversary` oracle-mode dispatches a stateless second-model pass (semantic pivot); both fire in parallel
25
+ - If `oracle.response` arrives with confidence=high and cites file:line, treat as new hypothesis H_oracle and test directly (skip 3-cycle gate it's externally validated)
26
+ - Otherwise, escalate to `rune:problem-solver` for structured 5-Whys or Fishbone analysis
26
27
  - Or escalate to `rune:sequential-thinking` for multi-variable analysis
27
28
  - Report escalation in the Debug Report with all evidence gathered so far
28
29
  </HARD-GATE>
@@ -46,6 +47,7 @@ If root cause cannot be identified after 3 hypothesis cycles:
46
47
  - `browser-pilot` (L3): capture browser console errors, network failures, visual bugs
47
48
  - `sequential-thinking` (L3): multi-variable root cause analysis
48
49
  - `neural-memory` (L3): after root cause found — capture error pattern for future recognition
50
+ - `adversary` (L2): on `agent.stuck` — oracle-mode dispatches stateless second-model pass to break confirmation-bias loop (parallel with scout zoom-out)
49
51
 
50
52
  ## Called By (inbound)
51
53
 
@@ -61,6 +63,17 @@ If root cause cannot be identified after 3 hypothesis cycles:
61
63
 
62
64
  ## Execution
63
65
 
66
+ ### Step 0: Build a Feedback Loop (the actual skill)
67
+ <MUST-READ path="references/feedback-loop-ladder.md" trigger="when current repro is not a single command returning pass/fail in <5s, or when bug is intermittent/multi-component"/>
68
+
69
+ **The loop is the speed limit.** A fast, deterministic, agent-runnable pass/fail signal turns debugging into mechanical bisection. Without one, hypotheses just consume noise.
70
+
71
+ Skip Step 0 only if the existing repro is already one command, deterministic, and runs in < 5s.
72
+
73
+ Otherwise, before Step 1: pick the highest viable rung from `references/feedback-loop-ladder.md` (10-rank ladder: failing test → curl → CLI snapshot → headless browser → trace replay → throwaway harness → fuzz → bisection → differential → HITL script). Construct it. Verify it currently FAILS (proves it measures the bug, not noise). Only then proceed.
74
+
75
+ If loop construction takes > 10 minutes, that itself is the diagnosis: the bug surface is too large or the system too coupled. Trigger the 3-Fix Escalation Rule (Step 6) — architecture is the problem, not the bug.
76
+
64
77
  ### Step 1: Reproduce
65
78
 
66
79
  Understand and confirm the error described in the request.
@@ -347,6 +360,7 @@ ALL of these mean: STOP. Return to Step 2 (Gather Evidence).
347
360
  7. MUST NOT say "I know what's wrong" without citing file:line evidence
348
361
  8. For deep stack errors: MUST use backward tracing (Step 2) — never fix at the crash site
349
362
  9. For multi-component systems: MUST instrument boundaries before hypothesizing
363
+ 10. MUST run Step 0 (Build Feedback Loop) before forming hypotheses on non-trivial bugs — skipping the loop = guessing
350
364
 
351
365
  ## Output Format
352
366
 
@@ -413,7 +427,7 @@ Append to Debug Report when invoked standalone. Suppress when called as sub-skil
413
427
  ```yaml
414
428
  chain_metadata:
415
429
  skill: "rune:debug"
416
- version: "1.1.0"
430
+ version: "1.2.0"
417
431
  status: "[DONE | DONE_WITH_CONCERNS | NEEDS_CONTEXT | BLOCKED]"
418
432
  domain: "[area debugged]"
419
433
  files_changed: [] # debug never changes files
@@ -447,6 +461,8 @@ chain_metadata:
447
461
  | Debug report recommends touching 5+ unrelated files | HIGH | Symptom of fixing at crash sites instead of source. Backward trace (Step 2) to find origin. If truly 5+ files → likely architectural issue → escalate via 3-Fix Rule |
448
462
  | Re-investigating known error patterns from scratch | MEDIUM | Step 2d: match error against Known Error Pattern Catalog first — skip hypothesis cycling for recognized patterns |
449
463
  | Same error fingerprint across cycles treated as different errors | MEDIUM | Step 2d: normalize line numbers, paths, variable names before comparison — same fingerprint = same error |
464
+ | Forming hypotheses with a slow / non-deterministic / manual repro | CRITICAL | Step 0: build a fast deterministic pass/fail signal first — see `references/feedback-loop-ladder.md` 10-rank ladder. Hypothesis testing on a slow loop wastes 10x the cycles |
465
+ | Skipping loop construction "to save time" on non-trivial bugs | HIGH | The loop IS the time-saver. 10 min on the loop saves hours of cycling. If construction takes > 10 min, escalate via 3-Fix Rule — bug is architectural |
450
466
 
451
467
  ## Done When
452
468
 
@@ -0,0 +1,62 @@
1
+ # Feedback Loop Ladder
2
+
3
+ **The loop is the skill.** A fast, deterministic, agent-runnable pass/fail signal converts debugging into a mechanical bisection problem. Without one, no amount of file-reading will save you.
4
+
5
+ > "The rate of feedback is your speed limit." Spend disproportionate effort on the loop itself — bisection, hypothesis testing, and instrumentation all just consume that signal.
6
+
7
+ ## When to invest in a better loop
8
+
9
+ Run the ladder before Step 3 (Form Hypotheses) when ANY of these are true:
10
+
11
+ | Signal | Threshold |
12
+ |--------|-----------|
13
+ | Repro is "click around in browser, then check" | Always — slowest possible loop |
14
+ | Cycle 1 hypotheses ruled out, no faster signal exists | Required before cycle 2 |
15
+ | Reproduction is intermittent (flaky) | Required — non-deterministic loop wastes cycles |
16
+ | Bug spans 3+ components and you can't isolate where it fails | Build component-boundary instrumentation FIRST |
17
+ | Manual repro takes > 30 seconds | Auto-script it before forming hypotheses |
18
+
19
+ **Skip if:** repro is already a single command returning exit code 0/1 in < 5s. The loop is already optimal.
20
+
21
+ ## The ladder (try in order — stop at first viable rung)
22
+
23
+ | # | Loop | Speed | Determinism | When |
24
+ |---|------|-------|-------------|------|
25
+ | 1 | **Failing test at the bug's seam** (unit, integration, e2e) | Fast | Hard pass/fail | Default — bug already has a test infrastructure |
26
+ | 2 | **curl / HTTP script** against running dev server | Fast | Snapshot-diffable | API or backend bugs |
27
+ | 3 | **CLI invocation with fixture input**, diff stdout vs known-good snapshot | Fast | Snapshot-diffable | CLI tools, parsers, formatters |
28
+ | 4 | **Headless browser script** (Playwright / `rune:browser-pilot`) — drives UI, asserts on DOM/console/network | Medium | Reliable | UI bugs, JS errors, network failures |
29
+ | 5 | **Replay a captured trace** — save real network request / payload / event log to disk; replay through code path in isolation | Fast | Deterministic | Bugs reproducible only with specific data |
30
+ | 6 | **Throwaway harness** — minimal subset of system (one service, mocked deps), exercise bug code path with single function call | Fast | Isolated | Bug deep inside framework or service stack |
31
+ | 7 | **Property / fuzz loop** — 1000 random inputs, look for failure mode | Slow | Probabilistic | "Sometimes wrong output", race conditions, edge cases |
32
+ | 8 | **Bisection harness** — automate "boot at state X, check, repeat" so `git bisect run` works | Medium | Hard pass/fail | Bug appeared between two known commits / dataset versions |
33
+ | 9 | **Differential loop** — same input through old vs new (or two configs), diff outputs | Medium | Diff-based | Regression vs reference implementation |
34
+ | 10 | **HITL bash script** — last resort. Drive the human with a structured script | Slow | Human-error-prone | All else fails — at least the loop has structure |
35
+
36
+ ## What "good loop" looks like
37
+
38
+ - One command, one second to run, one bit of output (pass / fail)
39
+ - Deterministic — same input → same output, every time
40
+ - Captures the bug, not a proxy ("test passes when bug present" is a broken loop)
41
+ - Cleanup-safe — re-runnable without manual reset
42
+
43
+ ## Anti-patterns
44
+
45
+ | Anti-pattern | Why it fails |
46
+ |--------------|--------------|
47
+ | "I'll just print and check the console" | Stateless, manual, slow — degrades to staring at logs |
48
+ | "Let me read the code one more time" | Reading is not a loop. Loop = pass/fail signal. |
49
+ | "It works on my machine, not in CI" | Build a loop in the CI environment FIRST |
50
+ | Skipping loop construction because "it's complicated" | The loop is the skill. Skipping it = guessing for the next 5 cycles |
51
+
52
+ ## Integration with Step 0
53
+
54
+ Add Step 0 (before Reproduce) when invoked on a non-trivial bug:
55
+
56
+ ```
57
+ 0. Build feedback loop — pick the highest rung from the ladder that you can construct
58
+ in < 10 minutes. Make it deterministic. Verify it currently FAILS (proves it's
59
+ measuring the bug, not noise). Only then proceed to Step 1.
60
+ ```
61
+
62
+ If loop construction takes > 10 minutes, that itself is the diagnosis: the bug surface is too large or the system is too coupled. Escalate via 3-Fix Rule (architecture is the problem, not the bug).
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: dependency-doctor
3
- description: Dependency health management. Detects package manager, checks outdated packages and vulnerabilities, and produces a prioritized update plan.
3
+ description: "Dependency health management. Detects package manager, checks outdated packages and vulnerabilities, and produces a prioritized update plan."
4
4
  metadata:
5
5
  author: runedev
6
6
  version: "0.2.0"
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: design
3
- description: Design system reasoning. Maps product domain to style, palette, typography, and platform-specific patterns. Generates .rune/design-system.md as the shared design contract for all UI-generating skills.
3
+ description: "Design system reasoning. Maps product domain to style, palette, typography, and platform-specific patterns. Generates .rune/design-system.md as the shared design contract for all UI-generating skills."
4
4
  metadata:
5
5
  author: runedev
6
6
  version: "0.5.0"
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: doc-processor
3
- description: Generate and parse office documents — PDF, DOCX, XLSX, PPTX, CSV. Pure format utility for creating reports, exporting data, and processing uploaded documents.
3
+ description: "Generate and parse office documents — PDF, DOCX, XLSX, PPTX, CSV. Use when creating reports, exporting tabular data, or processing uploaded office files. NOT for project documentation (use docs)."
4
4
  metadata:
5
5
  author: runedev
6
6
  version: "0.2.0"
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: docs
3
- description: Auto-generate and maintain project documentation. Creates README, API docs, architecture docs, changelogs, and keeps them in sync with code changes. The "docs are never outdated" skill.
3
+ description: "Auto-generate and maintain project documentation. Creates README, API docs, architecture docs, changelogs, and keeps them in sync with code changes. The \"docs are never outdated\" skill."
4
4
  metadata:
5
5
  author: runedev
6
6
  version: "0.3.0"
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: docs-seeker
3
- description: Find documentation for APIs, libraries, and error messages. Looks up official docs, changelog entries, and migration guides.
3
+ description: "Find documentation for APIs, libraries, and error messages. Looks up official docs, changelog entries, and migration guides."
4
4
  metadata:
5
5
  author: runedev
6
6
  version: "0.2.0"
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: fix
3
- description: Apply code changes and fixes. Writes implementation code, applies bug fixes, and verifies changes with tests. Core action hub in the development mesh.
3
+ description: "Apply code changes and fixes. Writes implementation code, applies bug fixes, and verifies changes with tests. Core action hub in the development mesh."
4
4
  metadata:
5
5
  author: runedev
6
6
  version: "1.0.0"
@@ -9,7 +9,7 @@ metadata:
9
9
  group: development
10
10
  tools: "Read, Write, Edit, Bash, Glob, Grep"
11
11
  emit: code.changed, agent.stuck
12
- listen: bug.diagnosed, review.issues, preflight.blocked, security.blocked
12
+ listen: bug.diagnosed, review.issues, preflight.blocked, security.blocked, oracle.response
13
13
  ---
14
14
 
15
15
  # fix
@@ -41,6 +41,7 @@ If unsure whether the test is wrong or the implementation is wrong → call `run
41
41
  - `hallucination-guard` (L3): verify imports after code changes
42
42
  - `scout` (L2): find related code before applying changes
43
43
  - `neural-memory` (L3): after fix verified — capture fix pattern (cause → solution)
44
+ - `adversary` (L2): on `agent.stuck` after 2+ failed attempts — oracle-mode dispatches stateless second-model pass to break confirmation-bias loop
44
45
 
45
46
  ## Called By (inbound)
46
47
 
@@ -142,7 +143,7 @@ When fix is called repeatedly (e.g., by cook Phase 4, or iterative fix loops), t
142
143
  **Thresholds:**
143
144
  - **>20% WTF-likelihood**: STOP fixing. Report current state to cook/user with: "Quality decay detected — continued fixes risk introducing more bugs than they resolve. {N} fixes applied, {score}% risk. Recommend: commit current progress, re-assess remaining issues."
144
145
  - **Hard cap: 30 fixes per session** — regardless of score. After 30, STOP and report.
145
- - **2+ consecutive fixes on the same file all failed**: emit `agent.stuck` signal (listened by `scout` zoom-out mode). Receiving agents may zoom out to the surrounding module map to recover bigger-picture context.
146
+ - **2+ consecutive fixes on the same file all failed**: emit `agent.stuck` signal. `scout` zoom-out mode (structural pivot) and `adversary` oracle-mode (semantic pivot via stateless second-model dispatch) both listen and fire in parallel. If `oracle.response` arrives with confidence=high, apply its recommended edit (still routes through normal validation gates).
146
147
 
147
148
  **Reset conditions:** WTF-likelihood resets to 0% when:
148
149
  - User explicitly says "continue fixing"
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: git
3
- description: Specialized git operations — semantic commits, PR descriptions, branch management, conflict resolution guidance. Replaces ad-hoc git commands with a dedicated, convention-aware utility.
3
+ description: "Specialized git operations — semantic commits, PR descriptions, branch management, conflict resolution guidance. Replaces ad-hoc git commands with a dedicated, convention-aware utility."
4
4
  metadata:
5
5
  author: runedev
6
6
  version: "0.3.0"
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: hallucination-guard
3
- description: Verify AI-generated imports, API calls, and packages actually exist. Catches phantom functions, non-existent packages, and slopsquatting attacks.
3
+ description: "Verify AI-generated imports, API calls, and packages actually exist. Use when finishing AI-generated code that introduces new imports or external API calls — auto-fires after fix/cook to catch phantom functions, non-existent packages, and slopsquatting attacks."
4
4
  metadata:
5
5
  author: runedev
6
6
  version: "0.3.0"
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: integrity-check
3
- description: "Verify integrity of persisted state, skill outputs, and context bus data. Detects prompt injection, memory poisoning, identity spoofing, and adversarial payloads in .rune/ files and agent outputs. Called by sentinel, team, and session-bridge."
3
+ description: "Verify integrity of persisted state, skill outputs, and context bus data. Use when validating .rune/ files or sub-agent outputs against prompt injection, memory poisoning, identity spoofing, or adversarial payloads. Called by sentinel, team, session-bridge."
4
4
  user-invocable: false
5
5
  metadata:
6
6
  author: runedev
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: journal
3
- description: Persistent state tracking and Architecture Decision Records across sessions. Use when recording a decision, ADR, or progress that must survive session boundaries. Manages progress state, module health, dependency graphs, and ADRs for any workflow.
3
+ description: "Persistent state tracking and Architecture Decision Records across sessions. Use when recording a decision, ADR, or progress that must survive session boundaries. Manages progress state, module health, dependency graphs, and ADRs for any workflow."
4
4
  metadata:
5
5
  author: runedev
6
6
  version: "0.4.0"
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: logic-guardian
3
- description: Protects complex business logic from accidental deletion or overwrite. Maintains a logic manifest, enforces pre-edit gates, and validates post-edit diffs.
3
+ description: "Protects complex business logic from accidental deletion or overwrite. Use when editing payment, trading, state-machine, or other load-bearing business logic where a single deleted line can cause silent data corruption. Maintains a logic manifest, enforces pre-edit gates, validates post-edit diffs."
4
4
  metadata:
5
5
  author: runedev
6
6
  version: "0.3.0"
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: marketing
3
- description: Create marketing assets and execute launch strategy. Generates landing copy, social banners, SEO meta, blog posts, and video scripts.
3
+ description: "Create marketing assets and execute launch strategy. Generates landing copy, social banners, SEO meta, blog posts, and video scripts."
4
4
  metadata:
5
5
  author: runedev
6
6
  version: "0.6.0"
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: mcp-builder
3
- description: Build Model Context Protocol servers from specifications. Generates tool definitions, resource handlers, and test suites for MCP servers in TypeScript or Python (FastMCP).
3
+ description: "Build Model Context Protocol servers from specifications. Use when creating an MCP server for a tool, resource, or service that AI agents should access. Generates tool definitions, resource handlers, and test suites in TypeScript or Python (FastMCP)."
4
4
  metadata:
5
5
  author: runedev
6
6
  version: "0.5.0"
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: onboard
3
- description: Auto-generate project context for AI sessions. Scans codebase, creates CLAUDE.md and .rune/ setup so every future session starts with full context.
3
+ description: "Auto-generate project context for AI sessions. Use when starting on a new repo for the first time, or when CLAUDE.md / .rune/ context is missing or stale. Scans codebase and creates the setup so every future session starts with full context."
4
4
  metadata:
5
5
  author: runedev
6
6
  version: "0.4.0"
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: perf
3
- description: Performance regression gate. Detects N+1 queries, sync-in-async, missing indexes, memory leaks, and bundle bloat before they reach production.
3
+ description: "Performance regression gate. Detects N+1 queries, sync-in-async, missing indexes, memory leaks, and bundle bloat before they reach production."
4
4
  metadata:
5
5
  author: runedev
6
6
  version: "0.3.0"
@@ -1,9 +1,9 @@
1
1
  ---
2
2
  name: plan
3
- description: Create structured implementation plans from requirements. Produces master plan + phase files for enterprise-scale project management. Master plan = overview (<80 lines). Phase files = execution detail (<150 lines each). Each session handles 1 phase. Uses opus for deep reasoning.
3
+ description: "Create structured implementation plans from requirements. Produces master plan + phase files for enterprise-scale project management. Master plan = overview (<80 lines). Phase files = execution detail (<150 lines each). Each session handles 1 phase. Uses opus for deep reasoning."
4
4
  metadata:
5
5
  author: runedev
6
- version: "1.5.0"
6
+ version: "1.6.0"
7
7
  layer: L2
8
8
  model: opus
9
9
  group: creation
@@ -149,9 +149,12 @@ If ANY "Master + Phase Files" criterion is true → produce master plan + phase
149
149
 
150
150
  ### Step 3 — Decompose into Phases
151
151
  <MUST-READ path="references/wave-planning.md" trigger="when writing wave-structured task lists inside any phase"/>
152
+ <MUST-READ path="references/vertical-slice.md" trigger="when decomposing a feature into tasks/issues — ALWAYS prefer vertical (end-to-end) slices over horizontal (single-layer) ones"/>
152
153
 
153
154
  Group work into phases. Each phase: completable in one session, clear "done when", produces testable output, independent enough to run without other phases loaded.
154
155
 
156
+ **Vertical slices over horizontal layers**: each task within a phase MUST be a tracer-bullet slice (schema + API + UI + test, end-to-end), NOT a single-layer chunk. Horizontal slicing ("all models → all APIs → all UI") looks organized but blocks on the slowest layer. See `references/vertical-slice.md` for slice rules, AFK vs HITL classification, and the per-task slice template.
157
+
155
158
  <HARD-GATE>
156
159
  Each phase MUST be completable by ANY coder model (including Haiku) with ONLY the phase file loaded.
157
160
  If the coder would need to read the master plan or other phase files to execute → the phase file is missing detail.
@@ -163,7 +166,7 @@ Phase decomposition rules:
163
166
  - **Dependencies before consumers**: create what's imported before the importer
164
167
  - **Test alongside**: each phase includes its own test tasks
165
168
  - **Max 5-7 tasks per phase**: if more, split the phase
166
- - **Vertical slices over horizontal layers**: prefer "auth end-to-end" over "all models → all APIs → all UI"
169
+ - **Vertical slices over horizontal layers**: prefer "auth end-to-end" over "all models → all APIs → all UI" (see `references/vertical-slice.md` for tracer-bullet template, AFK/HITL labels, granularity rules)
167
170
 
168
171
  Tasks within each phase MUST be organized into waves (parallel-safe groupings). See `references/wave-planning.md`.
169
172
 
@@ -346,7 +349,7 @@ Append to plan output when invoked standalone. Suppress when called as sub-skill
346
349
  ```yaml
347
350
  chain_metadata:
348
351
  skill: "rune:plan"
349
- version: "1.5.0"
352
+ version: "1.6.0"
350
353
  status: "[DONE | DONE_WITH_CONCERNS | NEEDS_CONTEXT | BLOCKED]"
351
354
  domain: "[area planned]"
352
355
  files_changed:
@@ -385,7 +388,9 @@ chain_metadata:
385
388
  | Phase with zero test tasks | CRITICAL | HARD-GATE rejects it |
386
389
  | 10+ phases overwhelming the master plan | MEDIUM | Max 8 phases — split into sub-projects if more |
387
390
  | Task without File path or Verify command | HIGH | Every task MUST have File + Test + Verify + Commit fields — no vague "implement the feature" tasks |
388
- | Horizontal layer planning (all models → all APIs → all UI) | HIGH | Vertical slices parallelize better. Use wave-based grouping: independent tasks in same wave, dependent tasks in later waves |
391
+ | Horizontal layer planning (all models → all APIs → all UI) | HIGH | Vertical slices parallelize better. Use wave-based grouping AND vertical-slice template (`references/vertical-slice.md`): each task = end-to-end path through schema/API/UI/test, demoable on its own |
392
+ | Slice not demoable on its own ("just the migration", "just the UI shell") | HIGH | Per `references/vertical-slice.md` — every slice produces a verifiable outcome. Layer-only fragments block downstream slices and hide partial completion |
393
+ | HITL slices marked liberally to enable "review" friction | MEDIUM | HITL is for hard blockers (OAuth setup, design decision, paid third-party access), not soft preferences. Default to AFK; use post-merge review for soft signals |
389
394
  | Tasks without `depends_on` in Wave 2+ | MEDIUM | Implicit dependencies break parallel dispatch. Every Wave 2+ task MUST declare `depends_on` |
390
395
  | Plan ignores locked Decisions from BA | CRITICAL | Decision Compliance section cross-checks requirements.md — locked decisions are non-negotiable |
391
396
  | Complex feature missing Workflow Registry — components planned but never wired | HIGH | Step 4.5: 4-view registry catches orphaned components, unphased workflows, and missing state transitions before phase files are written |