@rune-kit/rune 2.3.3 → 2.6.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 (77) hide show
  1. package/README.md +86 -17
  2. package/compiler/__tests__/pack-split.test.js +141 -1
  3. package/compiler/__tests__/parser.test.js +147 -55
  4. package/compiler/__tests__/scripts-bundling.test.js +283 -0
  5. package/compiler/__tests__/skill-index.test.js +218 -0
  6. package/compiler/__tests__/tier-override.test.js +41 -0
  7. package/compiler/adapters/antigravity.js +71 -53
  8. package/compiler/adapters/codex.js +4 -0
  9. package/compiler/adapters/cursor.js +4 -0
  10. package/compiler/adapters/generic.js +4 -0
  11. package/compiler/adapters/openclaw.js +4 -0
  12. package/compiler/adapters/opencode.js +4 -0
  13. package/compiler/adapters/windsurf.js +4 -0
  14. package/compiler/bin/rune.js +355 -355
  15. package/compiler/doctor.js +11 -1
  16. package/compiler/emitter.js +678 -386
  17. package/compiler/parser.js +267 -247
  18. package/compiler/transforms/scripts-path.js +18 -0
  19. package/extensions/zalo/PACK.md +20 -1
  20. package/extensions/zalo/references/conversation-management.md +214 -0
  21. package/extensions/zalo/references/eval-scenarios.md +157 -0
  22. package/extensions/zalo/references/listen-mode.md +237 -0
  23. package/extensions/zalo/references/mcp-production.md +274 -0
  24. package/extensions/zalo/references/multi-account-proxy.md +224 -0
  25. package/extensions/zalo/references/vietqr-banking.md +160 -0
  26. package/hooks/hooks.json +12 -0
  27. package/hooks/intent-router/index.cjs +108 -0
  28. package/hooks/pre-tool-guard/index.cjs +177 -68
  29. package/package.json +63 -64
  30. package/skills/brainstorm/SKILL.md +2 -0
  31. package/skills/cook/SKILL.md +661 -648
  32. package/skills/debug/SKILL.md +394 -392
  33. package/skills/deploy/SKILL.md +2 -0
  34. package/skills/fix/SKILL.md +283 -281
  35. package/skills/marketing/SKILL.md +3 -0
  36. package/skills/onboard/SKILL.md +7 -0
  37. package/skills/plan/SKILL.md +344 -342
  38. package/skills/preflight/SKILL.md +362 -360
  39. package/skills/review/SKILL.md +491 -489
  40. package/skills/scout/SKILL.md +1 -0
  41. package/skills/sentinel/SKILL.md +319 -296
  42. package/skills/sentinel/references/auth-crypto-reference.md +192 -0
  43. package/skills/sentinel/references/desktop-security.md +201 -0
  44. package/skills/sentinel/references/supply-chain.md +160 -0
  45. package/skills/session-bridge/SKILL.md +1 -0
  46. package/skills/slides/SKILL.md +142 -0
  47. package/skills/slides/scripts/build-deck.js +158 -0
  48. package/skills/team/SKILL.md +1 -0
  49. package/skills/test/SKILL.md +587 -585
  50. package/skills/verification/SKILL.md +1 -0
  51. package/skills/watchdog/SKILL.md +2 -0
  52. package/docs/ANTIGRAVITY-GAP-ANALYSIS.md +0 -369
  53. package/docs/ARCHITECTURE.md +0 -332
  54. package/docs/COMMUNITY-PACKS.md +0 -109
  55. package/docs/CONTRIBUTING-L4.md +0 -215
  56. package/docs/CROSS-IDE-ANALYSIS.md +0 -164
  57. package/docs/EXTENSION-TEMPLATE.md +0 -126
  58. package/docs/MESH-RULES.md +0 -34
  59. package/docs/MULTI-PLATFORM.md +0 -804
  60. package/docs/SKILL-DEPTH-AUDIT.md +0 -191
  61. package/docs/SKILL-TEMPLATE.md +0 -118
  62. package/docs/TRADE-MATRIX.md +0 -327
  63. package/docs/VERSIONING.md +0 -91
  64. package/docs/VISION.md +0 -263
  65. package/docs/assets/demo-subtitles.srt +0 -215
  66. package/docs/assets/end-card.html +0 -276
  67. package/docs/assets/mesh-diagram.html +0 -654
  68. package/docs/assets/thumbnail.html +0 -295
  69. package/docs/guides/cli.md +0 -403
  70. package/docs/guides/index.html +0 -1450
  71. package/docs/index.html +0 -1005
  72. package/docs/references/claudekit-analysis.md +0 -414
  73. package/docs/references/voltagent-analysis.md +0 -189
  74. package/docs/script.js +0 -495
  75. package/docs/skills/index.html +0 -832
  76. package/docs/style.css +0 -958
  77. package/docs/video-demo-plan.md +0 -172
@@ -1,191 +0,0 @@
1
- # Skill Depth Audit
2
-
3
- > Living document. Updated each cycle when skills are enriched.
4
- > Last audit: 2026-03-08 | Audited by: Claude Opus 4.6
5
-
6
- ## Depth Scale
7
-
8
- | Score | Definition | Characteristics |
9
- |-------|-----------|-----------------|
10
- | **5** | Exemplary | Embedded frameworks, multiple mental models, edge cases explicit, anti-patterns enumerated, worked examples, error recovery deep |
11
- | **4** | Comprehensive | Clear workflow, good error handling, frameworks present but <3 worked examples, all gates enforced |
12
- | **3** | Solid | Single workflow flow, frameworks named but not demonstrated, happy path covered, gaps on edge cases |
13
- | **2** | Thin | Instructions present but generic, minimal framework depth, no examples |
14
- | **1** | Skeleton | Placeholder, just routing instructions |
15
-
16
- ## Context Cost Comparison
17
-
18
- Understanding why skill depth matters — comparing execution with vs without skill knowledge:
19
-
20
- | Scenario | Without Skill (Research Mode) | With Deep Skill (Inject Mode) |
21
- |----------|-------------------------------|-------------------------------|
22
- | **Debug a bug** | ~8-15 tool calls: grep → read → hypothesize → grep → read → test → fix → test | ~4-6 tool calls: hypothesis cycle (max 3), evidence-first, escalate at fix #3 |
23
- | **Write tests** | Writes tests after code, misses edge cases, no coverage gate | TDD Iron Law: test first → red → green → refactor, anti-rationalization table blocks shortcuts |
24
- | **Security review** | Generic OWASP checklist from training data, misses framework-specific patterns | Framework-specific regex patterns, config drift detection, 3-layer defense model |
25
- | **Plan a feature** | Vague steps like "implement auth", no function signatures | Bite-sized phases, function signatures required, dependency ordering, risk per phase |
26
- | **Refactor legacy** | Big bang rewrite attempt, breaks everything | Strangler Fig / Branch by Abstraction, 1 module/session, characterization tests first |
27
-
28
- **Key insight**: A deep skill doesn't just tell Claude WHAT to do — it gives Claude the MENTAL MODEL of an expert. Research mode gives answers; skill mode gives judgment.
29
-
30
- ### Token Economics
31
-
32
- | | Research Mode | Skill Inject Mode |
33
- |--|---------------|-------------------|
34
- | **Context cost** | 0 tokens upfront, but 2000-8000 tokens per research cycle (WebSearch, WebFetch, Read docs) | 150-400 tokens upfront (SKILL.md loaded), 0 research tokens |
35
- | **Tool calls** | 8-20 per task (search, read, verify, retry) | 3-8 per task (direct execution) |
36
- | **Accuracy** | Variable — depends on search quality, training data freshness | High — curated knowledge, verified patterns |
37
- | **Speed** | Slow — research → synthesize → attempt → verify → retry | Fast — framework → execute → verify |
38
- | **Consistency** | Low — different approach each session | High — same framework, same quality bar |
39
-
40
- **Bottom line**: A 200-line SKILL.md (~300 tokens) saves 5000-15000 tokens of research per invocation. ROI is massive for frequently-used skills.
41
-
42
- ## Enrichment Sources Registry
43
-
44
- External repos analyzed for knowledge extraction. Track what was extracted and where it went.
45
-
46
- | Source | URL | Analyzed | Skills Extracted To |
47
- |--------|-----|----------|---------------------|
48
- | CloudAI-X/threejs-skills | github.com/CloudAI-X/threejs-skills | 2026-03-08 | (no extraction — domain-specific 3D skills, not applicable to core workflow skills) |
49
- | mrgoonie/claudekit-skills | github.com/mrgoonie/claudekit-skills | 2026-03-08 | debug, fix, brainstorm, problem-solver, docs-seeker (5 skills enriched) |
50
-
51
- ## Enrichment Framework
52
-
53
- ### Extraction Process (per external source)
54
-
55
- ```
56
- 1. SCAN — Read source skill, identify unique knowledge
57
- 2. FILTER — Remove: verbose filler, obvious instructions, things Claude already knows
58
- 3. EXTRACT — Pull: frameworks, mental models, decision trees, anti-patterns, gotchas
59
- 4. MAP — Match extracted knowledge → target Rune skill(s)
60
- 5. INJECT — Add to Rune skill preserving: mesh contracts, progressive disclosure, context budget
61
- 6. VERIFY — Skill still works in mesh, SKILL.md stays under ~350 lines
62
- ```
63
-
64
- ### What to Extract (High Value)
65
-
66
- - **Decision trees**: "When X, choose Y because Z" — not just "do Y"
67
- - **Anti-patterns with WHY**: "Don't do X because it causes Y in production"
68
- - **Framework sequences**: Step 1 → Step 2 → Step 3 with clear entry/exit criteria
69
- - **Gotchas**: Things that look right but break subtly
70
- - **Domain heuristics**: Expert shortcuts that skip unnecessary work
71
-
72
- ### What NOT to Extract (Low Value / Harmful)
73
-
74
- - Generic instructions Claude already knows ("use git", "write tests")
75
- - Verbose explanations that inflate context without adding judgment
76
- - Framework-specific API docs (use docs-seeker/context7 at runtime instead)
77
- - Patterns that conflict with Rune's mesh delegation model
78
-
79
- ### Context Budget Rule
80
-
81
- Each SKILL.md should stay **150-350 lines** (~200-500 tokens when loaded).
82
- If enrichment pushes beyond 350 lines → use progressive disclosure:
83
- - Core instructions: always loaded (~150 lines)
84
- - Deep reference: in `references/` subfolder, loaded on demand
85
-
86
- ---
87
-
88
- ## L0 Router (1 skill)
89
-
90
- | Skill | Lines | Depth | Has | Missing | Enrich From |
91
- |-------|-------|-------|-----|---------|-------------|
92
- | skill-router | — | 4 | Routing table, adaptive overrides, model selection | Decision examples for ambiguous routing | — |
93
-
94
- ## L1 Orchestrators (4 skills)
95
-
96
- | Skill | Lines | Depth | Has | Missing | Enrich From |
97
- |-------|-------|-------|-----|---------|-------------|
98
- | **cook** | 504 | ⭐5 | 8-phase TDD, fast-mode detection, phase skip, re-plan, autonomous loop, HARD-GATEs | — (exemplary) | — |
99
- | **team** | 397 | ⭐5 | Lite/full mode auto-detect, dependency ordering, merge conflict resolution, integrity check | — | — |
100
- | **launch** | 330 | 4.5 | Artifact readiness, 5-phase pipeline, platform auto-detect, watchdog integration | Rollback strategy detail | — |
101
- | **rescue** | 434 | 4.5 | Multi-session state, surgery queue, Strangler Fig/Branch by Abstraction, 3-fix escalation | Coupled module detection heuristics | — |
102
-
103
- ## L2 Workflow Hubs (23 skills)
104
-
105
- | Skill | Lines | Depth | Has | Missing | Enrich From |
106
- |-------|-------|-------|-----|---------|-------------|
107
- | **plan** | 238 | ⭐5 | HARD-GATE vague steps, bite-sized decomposition, function signatures, risk assessment | — | — |
108
- | **debug** | ~220 | ⭐5+ | 2-3 hypothesis cycle, evidence-first, backward tracing (5-step), multi-component instrumentation, red flags thinking patterns, 3-fix escalation | — (enriched 2026-03-08) | — |
109
- | **test** | 271 | ⭐5 | RED/GREEN/REFACTOR, TDD Iron Law, anti-rationalization table (6 excuses), async fixtures | Language-specific test patterns beyond Python | CK: verification-before-completion |
110
- | **review** | 354 | ⭐5 | Framework-specific checks (React/Node/Python/Go/Rust), AI UI detection, WCAG 2.2 | — | CK: code-review checklist |
111
- | **skill-forge** | 317 | ⭐5 | Baseline test before writing, anti-rationalization, pressure scenarios | — | — |
112
- | **scout** | 232 | 4.5 | ADOPT/EXTEND/COMPOSE/BUILD matrix, codebase map, convention detection | Read vs Grep prioritization heuristics | — |
113
- | **brainstorm** | ~210 | 4.5 | 2-3 approaches, 7 frameworks (SCAMPER/First Principles/6 Hats/Crazy 8s + Collision-Zone/Inversion/Scale Game) | Worked examples | — |
114
- | **fix** | ~200 | 4.5 | Evidence gate, 3-fix limit, YAGNI, immutability, post-fix hardening (4-layer defense-in-depth) | — (enriched 2026-03-08) | — |
115
- | **sentinel** | 320 | 4 | Secret regex patterns, OWASP patterns, framework checks, config protection | CVE severity scoring algorithm | — |
116
- | **preflight** | 231 | 4 | Spec compliance, logic review (null-deref/missing-await/off-by-one), regression risk | Impact estimation methodology | — |
117
- | **design** | 420 | 4 | 10 product categories, typography/color tokens, platform overrides (iOS/Android), anti-patterns | More CSS implementation examples | TJS: dense example format |
118
- | **db** | 256 | 4 | Breaking change detection, migration per ORM, index analysis, parameterization scan | Data migration strategies (not just schema) | — |
119
- | **onboard** | 295 | 4 | CLAUDE.md template, .rune/ init, DEVELOPER-GUIDE.md, L4 pack suggestions | Merge algorithm for existing CLAUDE.md | — |
120
- | **deploy** | 174 | 4 | Platform auto-detect (Vercel/Netlify/Fly/Docker), pre-deploy gates, watchdog setup | Rollback playbook | — |
121
- | **perf** | 297 | 4 | N+1, sync-in-async, memory leaks, bundle bloat, Lighthouse gates, Core Web Vitals | More framework-specific perf patterns | — |
122
- | **autopsy** | 200 | 4 | 6-dimension health scoring, git archaeology, hotspots, dead code detection | Worked example of health score calculation | — |
123
- | **safeguard** | 188 | 4 | Characterization tests, boundary markers, config freeze, git tag rollback | Characterization test writing patterns | — |
124
- | **surgeon** | 203 | 4 | Strangler Fig/Branch by Abstraction/Expand-Migrate-Contract/Extract & Simplify, blast radius | Pattern selection decision tree | — |
125
- | **audit** | 466 | 3.5 | 8-phase structure, framework checks, health score table, mesh analytics | Worked examples, mesh analytics specifics | — |
126
- | **incident** | 234 | 3.5 | P1/P2/P3 severity, containment strategies, watchdog verification, timeline | Containment strategy decision rules | — |
127
- | **review-intake** | 222 | 3.5 | ABSORB/COMPREHEND/VERIFY/EVALUATE/RESPOND, trust levels, pushback framework | "Restate in own words" template | — |
128
- | **logic-guardian** | 240 | 3.5 | Logic manifest schema, pre-edit gate, post-edit validation, co-change groups | Auto-detection of logic-heavy files | — |
129
- | **marketing** | 178 | 3 | Scout integration, trend-scout context, asset generation, video planning | Copy templates (hero, CTA, testimonial) | — |
130
-
131
- ## L3 Utilities (21 skills)
132
-
133
- | Skill | Lines | Depth | Has | Missing | Enrich From |
134
- |-------|-------|-------|-----|---------|-------------|
135
- | **problem-solver** | ~230 | ⭐5+ | 10 frameworks: 5 Whys, Fishbone, First Principles, SCAMPER, Impact Matrix + Collision-Zone, Inversion, Meta-Pattern, Simplification Cascades, Scale Game | — (enriched 2026-03-08) | — |
136
- | **sequential-thinking** | 175 | ⭐5 | Dependency mapping, constraint resolution, ordered evaluation, running state | — | — |
137
- | **hallucination-guard** | 204 | ⭐5 | Import extraction, registry check, edit distance for typosquatting, slopsquatting | — | — |
138
- | **completion-gate** | 151 | ⭐5 | Claim extraction, evidence matching, verdict table, stale evidence detection | — | — |
139
- | **constraint-check** | 165 | ⭐5 | HARD-GATE audit, temporal checks, violation classification | — | — |
140
- | **integrity-check** | 169 | ⭐5 | Zero-width Unicode, HTML comments, base64, prompt injection patterns | — | — |
141
- | **session-bridge** | 269 | ⭐5 | Save/Load dual mode, integrity verification, adversarial defense | — | — |
142
- | **research** | 122 | 4 | Query→Search→DeepDive→Synthesize→Report, confidence scoring | Source authority weighting algorithm | — |
143
- | **docs-seeker** | ~175 | 4.5 | Context7 MCP → llms.txt discovery (URL patterns, topic params) → WebSearch → repomix fallback, parallel agent distribution | — (enriched 2026-03-08) | — |
144
- | **trend-scout** | 145 | 4 | Scope→Search→Competitor→Sentiment→Report, query patterns | — | — |
145
- | **verification** | 201 | 4 | 5-language support, Evidence-Before-Claims HARD-GATE, TodoWrite integration | — | — |
146
- | **sast** | 190 | 4 | 6-language tool commands, semgrep integration, severity normalization | — | — |
147
- | **context-engine** | 176 | 4 | GREEN/YELLOW/ORANGE/RED thresholds, large-file adjustment | Worked example of compaction decision | — |
148
- | **journal** | 185 | 4 | ADR template, RESCUE-STATE, module-status, dependency graph | Session lifecycle example | — |
149
- | **worktree** | 140 | 4 | Git worktree lifecycle, rune/* branch naming, safety rules | — | — |
150
- | **watchdog** | 166 | 4 | HTTP checks, response time analysis, error detection, smoke test | Baseline comparison methodology | — |
151
- | **scope-guard** | 150 | 4 | Plan→Diff→Classify, IN_SCOPE/OUT_OF_SCOPE rules, test exception | — | — |
152
- | **browser-pilot** | 165 | 4 | Playwright MCP, 20-interaction limit, try-finally cleanup | — | — |
153
- | **asset-creator** | 157 | 4 | SVG/HTML/CSS output, dark/light variants, design token integration | — | — |
154
- | **video-creator** | 201 | 4 | Script structure, storyboard, shot list, platform constraints | — | — |
155
- | **dependency-doctor** | 235 | 4 | 6 package managers, health score formula, breaking change awareness | — | — |
156
-
157
- ## Enrichment Backlog
158
-
159
- Priority ordered by: frequency of use × gap size × available source quality.
160
-
161
- | # | Target Skill | Gap | Source | Expected Impact | Status |
162
- |---|-------------|-----|--------|-----------------|--------|
163
- | 1 | debug | Backward tracing, multi-component instrumentation, red flags | CK: root-cause-tracing, systematic-debugging | High — most used skill | ✅ Done 2026-03-08 |
164
- | 2 | brainstorm | 3 breakthrough frameworks (Collision-Zone, Inversion, Scale Game) | CK: collision-zone-thinking, inversion-exercise, scale-game | High — ideation quality | ✅ Done 2026-03-08 |
165
- | 3 | problem-solver | 5 additional reasoning frameworks | CK: all 5 problem-solving sub-skills | Medium — already depth 5 | ✅ Done 2026-03-08 |
166
- | 4 | fix | Post-fix hardening (4-layer defense-in-depth) | CK: defense-in-depth | Medium — common confusion point | ✅ Done 2026-03-08 |
167
- | 5 | docs-seeker | llms.txt discovery, repomix, parallel agents | CK: docs-seeker | Medium — modern docs pattern | ✅ Done 2026-03-08 |
168
- | 6 | marketing | Copy templates (hero, features, CTA) | CK: aesthetic, general copywriting | Medium — currently most shallow L2 |
169
- | 7 | surgeon | Pattern selection decision tree | CK: (none — Rune-original) | Medium — needs internal development |
170
- | 8 | design | Dense CSS implementation examples | TJS: example density format | Low — already 420 lines |
171
- | 9 | incident | Containment strategy decision rules | CK: (none) | Low — less frequent use |
172
- | 10 | launch | Rollback playbook | CK: (none) | Low — less frequent use |
173
-
174
- Legend: CK = claudekit-skills, TJS = threejs-skills
175
-
176
- ## Cycle Log
177
-
178
- Track enrichment history per skill.
179
-
180
- | Date | Skill | Source | What Added | Depth Before → After |
181
- |------|-------|--------|------------|---------------------|
182
- | 2026-03-08 | debug | CK: root-cause-tracing, systematic-debugging | Backward tracing technique (5-step), multi-component boundary instrumentation, red flags thinking patterns, 2 new constraints | ⭐5 → ⭐5+ |
183
- | 2026-03-08 | fix | CK: defense-in-depth | Post-fix hardening step (4-layer validation: Entry→Business→Environment→Debug), 2 new sharp edges | 4 → 4.5 |
184
- | 2026-03-08 | brainstorm | CK: collision-zone, inversion, scale-game | 3 breakthrough frameworks added to framework section + evaluation step | 4 → 4.5 |
185
- | 2026-03-08 | problem-solver | CK: collision-zone, inversion, meta-pattern, simplification-cascades, scale-game | 5 new frameworks in selection table + Step 3 execution details + 3 new sharp edges | ⭐5 → ⭐5+ |
186
- | 2026-03-08 | docs-seeker | CK: docs-seeker (llms.txt) | llms.txt discovery (context7 URL patterns, topic params), repomix fallback, parallel agent distribution, new sharp edge | 4 → 4.5 |
187
- | 2026-03-08 | test | — | Assessed — already depth 5, CK verification-before-completion covered by completion-gate | ⭐5 (no change) |
188
-
189
- ---
190
-
191
- *This document is the single source of truth for skill depth tracking across sessions.*
@@ -1,118 +0,0 @@
1
- ---
2
- name: skill-name
3
- description: One-line description of what this skill does and when to use it.
4
- metadata:
5
- author: runedev
6
- version: "0.1.0"
7
- layer: L1|L2|L3
8
- model: haiku|sonnet|opus
9
- group: orchestrator|creation|development|quality|delivery|rescue|knowledge|reasoning|validation|state|monitoring|media|deps
10
- ---
11
-
12
- # skill-name
13
-
14
- ## Purpose
15
-
16
- One paragraph describing the skill's role in the Rune ecosystem.
17
-
18
- ## Triggers
19
-
20
- - `/rune <command>` — manual invocation
21
- - Auto-trigger conditions (file patterns, error types, etc.)
22
-
23
- ## Calls (outbound connections)
24
-
25
- - `skill-name` (L2|L3): condition when this skill calls it
26
-
27
- ## Called By (inbound connections)
28
-
29
- - `skill-name` (L1|L2): condition when called
30
-
31
- ## Data Flow
32
-
33
- Data relationships capture how skill outputs become inputs for other skills — without direct invocation. Unlike Calls/Called By (control flow), data flow tracks artifacts that persist and get consumed asynchronously.
34
-
35
- ### Feeds Into →
36
-
37
- - `skill-name` (L2): [what artifact] → [how it's consumed]
38
-
39
- ### Fed By ←
40
-
41
- - `skill-name` (L2): [what artifact] ← [what this skill needs from it]
42
-
43
- ### Feedback Loops ↻
44
-
45
- - `skill-a` ↔ `skill-b`: [what gets refined bidirectionally and why]
46
-
47
- ## Workflow
48
-
49
- Step-by-step execution flow.
50
-
51
- ## Output Format
52
-
53
- ```
54
- Structured output that calling skills can consume.
55
- ```
56
-
57
- ## Returns
58
-
59
- Explicit output contract so calling skills know exactly what to expect.
60
-
61
- | Field | Type | Description |
62
- |-------|------|-------------|
63
- | `field_name` | type | What this field contains and when it's populated |
64
- | `status` | enum | e.g., `DONE` / `DONE_WITH_CONCERNS` / `BLOCKED` |
65
-
66
- Why: Without explicit return schemas, calling skills guess at output structure. This causes silent failures when output format changes. Every L1/L2 skill MUST have a Returns section.
67
-
68
- ## Constraints
69
-
70
- 3-7 MUST/MUST NOT rules specific to this skill.
71
- Every constraint should block a specific failure mode or rationalization.
72
-
73
- Format:
74
- 1. MUST [required behavior] — [why]
75
- 2. MUST NOT [forbidden behavior] — [consequence]
76
-
77
- ## Mesh Gates (L1/L2 only)
78
-
79
- | Gate | Requires | If Missing |
80
- |------|----------|------------|
81
- | [Gate Name] | [What must exist before proceeding] | [Action to take] |
82
-
83
- ## Sharp Edges
84
-
85
- Known failure modes for this skill. Check these before declaring done.
86
-
87
- | Failure Mode | Severity | Mitigation |
88
- |---|---|---|
89
- | [what goes wrong] | CRITICAL/HIGH/MEDIUM/LOW | [how to avoid it] |
90
-
91
- ## Self-Validation
92
-
93
- Domain-specific quality checks that run BEFORE this skill reports "done". These are embedded in the skill itself — not centralized like completion-gate. Each check is specific to what THIS skill produces.
94
-
95
- ```
96
- SELF-VALIDATION (run before emitting output):
97
- - [ ] [check 1 — what to verify about this skill's output]
98
- - [ ] [check 2 — domain-specific quality criterion]
99
- - [ ] [check 3 — format/completeness check]
100
- IF ANY check fails → fix before reporting done. Do NOT defer to completion-gate.
101
- ```
102
-
103
- Why: Completion-gate validates claims generically. Self-Validation catches domain-specific quality issues that only THIS skill understands (e.g., test skill checks assertion count, plan skill checks dependency ordering, review skill checks all files were read).
104
-
105
- ## Done When
106
-
107
- - [condition 1 — specific, verifiable]
108
- - [condition 2]
109
- - [condition 3 — structured report emitted]
110
- - Self-Validation checklist: all checks passed
111
-
112
- ## Cost Profile
113
-
114
- Estimated token usage per invocation.
115
-
116
- **Scope guardrail**: [Terminal boundary statement — what this skill must NOT do even if asked. Examples: "Do not write code — only produce plans.", "Do not modify files outside the target module.", "Do not execute fixes — only diagnose and hand off to fix."]
117
-
118
- Why: Without terminal guardrails, agents drift into adjacent responsibilities. A review skill starts fixing code, a plan skill starts implementing, a debug skill starts deploying. The guardrail is the last line in the skill file — a final reminder of scope boundaries before the agent acts.
@@ -1,327 +0,0 @@
1
- # Trade Logic Matrix
2
-
3
- > Complete skill-to-skill delegation map for Rune's 49-skill mesh.
4
- > Generated from all SKILL.md `Calls` / `Called By` sections + ARCHITECTURE.md cross-hub mesh.
5
-
6
- ## Legend
7
-
8
- | Symbol | Meaning |
9
- |--------|---------|
10
- | `->` | Calls (outbound) |
11
- | `<-` | Called by (inbound) |
12
- | `<>` | Bidirectional |
13
- | `-` | No connection |
14
- | `*` | Conditional (only in specific phases/contexts) |
15
-
16
- ---
17
-
18
- ## Matrix 1: L1 Orchestrators -> L2 Hubs
19
-
20
- Which L2 hubs each L1 orchestrator delegates to.
21
-
22
- | L2 Hub | cook | team | launch | rescue |
23
- |--------|------|------|--------|--------|
24
- | plan | -> | -> | - | -> |
25
- | scout | -> | -> | - | - |
26
- | brainstorm | -> | - | - | - |
27
- | design | ->* | - | - | - |
28
- | skill-forge | ->* | - | - | - |
29
- | debug | -> | - | - | - |
30
- | fix | -> | - | - | - |
31
- | test | -> | - | -> | - |
32
- | review | -> | - | - | -> |
33
- | review-intake | ->* | - | - | - |
34
- | sentinel | -> | - | - | - |
35
- | preflight | -> | - | - | - |
36
- | onboard | ->* | - | - | -> |
37
- | db | ->* | - | - | - |
38
- | perf | ->* | - | - | - |
39
- | logic-guardian | ->* | -> | - | - |
40
- | incident | - | - | -> | - |
41
- | audit | ->* | - | -> | - |
42
- | deploy | - | - | -> | - |
43
- | marketing | - | - | -> | - |
44
- | autopsy | - | - | - | -> |
45
- | safeguard | - | - | - | -> |
46
- | surgeon | - | - | - | -> |
47
-
48
- **Notes:**
49
- - `cook` touches 17/22 L2 hubs (broadest reach)
50
- - `team` only calls plan + scout directly; delegates real work to cook/launch/rescue instances
51
- - `launch` focuses on delivery chain: test -> audit -> deploy -> marketing -> incident
52
- - `rescue` focuses on recovery chain: autopsy -> safeguard -> surgeon
53
-
54
- ### L1 -> L1 (Meta-Orchestration)
55
-
56
- Only `team` can call other L1s:
57
-
58
- | Target | team |
59
- |--------|------|
60
- | cook | -> (parallel instances) |
61
- | launch | -> (deployment phase) |
62
- | rescue | -> (legacy modules) |
63
-
64
- ---
65
-
66
- ## Matrix 2: L2 <-> L2 Cross-Hub Mesh
67
-
68
- Skill-to-skill connections between L2 hubs. Read as ROW calls COLUMN.
69
-
70
- ### Creation Group
71
-
72
- | | plan | scout | brainstorm | design | skill-forge |
73
- |---|---|---|---|---|---|
74
- | **plan** | - | -> | <> | - | <- |
75
- | **scout** | - | - | - | - | - |
76
- | **brainstorm** | <> | - | - | - | - |
77
- | **design** | - | -> | - | - | - |
78
- | **skill-forge** | -> | -> | - | - | - |
79
-
80
- ### Development Group
81
-
82
- | | debug | fix | test | review | db |
83
- |---|---|---|---|---|---|
84
- | **debug** | - | -> | - | - | - |
85
- | **fix** | <> | - | -> | -> | - |
86
- | **test** | -> | - | - | - | - |
87
- | **review** | - | -> | -> | - | - |
88
- | **db** | - | - | - | - | - |
89
-
90
- ### Quality Group
91
-
92
- | | sentinel | preflight | onboard | audit | perf | review-intake | logic-guardian |
93
- |---|---|---|---|---|---|---|---|
94
- | **sentinel** | - | - | - | - | - | - | - |
95
- | **preflight** | -> | - | - | - | - | - | - |
96
- | **onboard** | - | - | - | - | - | - | - |
97
- | **audit** | -> | - | - | - | -> | - | - |
98
- | **perf** | - | - | - | - | - | - | - |
99
- | **review-intake** | -> | - | - | - | - | - | - |
100
- | **logic-guardian** | - | - | - | - | - | - | - |
101
-
102
- ### Delivery Group
103
-
104
- | | deploy | marketing | incident |
105
- |---|---|---|---|
106
- | **deploy** | - | - | -> |
107
- | **marketing** | - | - | - |
108
- | **incident** | - | - | - |
109
-
110
- ### Rescue Group
111
-
112
- | | autopsy | safeguard | surgeon |
113
- |---|---|---|---|
114
- | **autopsy** | - | - | - |
115
- | **safeguard** | - | - | <- |
116
- | **surgeon** | - | -> | - |
117
-
118
- ### Cross-Group Connections
119
-
120
- These connections span across L2 groups:
121
-
122
- | From | To | Direction | Context |
123
- |------|-----|-----------|---------|
124
- | plan | scout | -> | Scan before planning |
125
- | debug | scout | -> | Find related code |
126
- | review | scout | -> | More context needed |
127
- | review | sentinel | -> | Security patterns in diff |
128
- | review | design | -> | UI anti-pattern detected |
129
- | review | perf | -> | Performance patterns in diff |
130
- | review | review-intake | -> | External feedback received |
131
- | review | sast | -> | Security deep analysis |
132
- | review-intake | fix | -> | Apply verified changes |
133
- | review-intake | test | -> | Reviewer-found edge cases |
134
- | review-intake | sentinel | -> | Reviewer flagged security |
135
- | deploy | test | -> | Pre-deploy verification |
136
- | deploy | db | -> | Migration safety check |
137
- | deploy | perf | -> | Pre-deploy perf check |
138
- | deploy | sentinel | -> | Security gate |
139
- | audit | scout | -> | Discovery phase |
140
- | audit | db | -> | Database health dimension |
141
- | audit | autopsy | -> | Complexity/health phase |
142
- | incident | autopsy | -> | Root cause after containment |
143
- | incident | sentinel | -> | Security dimension check |
144
- | perf | design | -> | Accessibility BLOCK |
145
- | design | scout | -> | Detect platform/tokens |
146
- | marketing | scout | -> | Analyze assets |
147
- | onboard | autopsy | -> | Codebase health scan |
148
- | surgeon | debug | -> | Diagnose before surgery |
149
- | surgeon | fix | -> | Apply surgical changes |
150
- | surgeon | test | -> | Verify after surgery |
151
- | surgeon | review | -> | Self-review complex refactor |
152
- | safeguard | test | -> | Create safety net tests |
153
- | test | debug | -> | Unexpected failure triage |
154
- | logic-guardian | scout | -> | Scan project for logic files |
155
- | fix | logic-guardian | -> | Pre-edit gate on manifested files |
156
- | surgeon | logic-guardian | -> | Pre-refactor on logic modules |
157
- | review | logic-guardian | -> | Check if diff removes manifested logic |
158
-
159
- ---
160
-
161
- ## Matrix 3: L1/L2 -> L3 Utility Usage
162
-
163
- Which L3 utilities each L1/L2 skill consumes. Read as: ROW uses COLUMN.
164
-
165
- ### Validation Utilities
166
-
167
- | Caller | verification | hallucination-guard | completion-gate | constraint-check | sast | integrity-check |
168
- |--------|---|---|---|---|---|---|
169
- | **cook** (L1) | x | x | x | x | x* | - |
170
- | **team** (L1) | - | - | x | x | - | x |
171
- | **launch** (L1) | - | - | - | - | - | - |
172
- | **rescue** (L1) | - | - | - | - | - | - |
173
- | fix | x | x | - | - | - | - |
174
- | test | x | - | - | - | - | - |
175
- | deploy | x | - | - | - | - | - |
176
- | sentinel | x | - | - | - | x | x |
177
- | preflight | - | x | - | - | - | - |
178
- | review | - | x | - | - | x | - |
179
- | review-intake | - | x | - | - | - | - |
180
- | db | x | x | - | - | - | - |
181
- | perf | x | - | - | - | - | - |
182
- | safeguard | x | - | - | - | - | - |
183
- | skill-forge | x | x | - | - | - | - |
184
- | audit | - | - | - | x | x | - |
185
- | logic-guardian | x | x | - | - | - | - |
186
-
187
- ### Knowledge Utilities
188
-
189
- | Caller | research | docs-seeker | trend-scout |
190
- |--------|----------|-------------|-------------|
191
- | plan | x | - | - |
192
- | brainstorm | x | - | x |
193
- | debug | - | x | - |
194
- | fix | - | x | - |
195
- | review | - | x | - |
196
- | marketing | x | - | x |
197
- | autopsy | x | - | x |
198
-
199
- ### Reasoning Utilities
200
-
201
- | Caller | problem-solver | sequential-thinking |
202
- |--------|----------------|---------------------|
203
- | plan | - | x |
204
- | brainstorm | x | x |
205
- | debug | x | x |
206
-
207
- ### State Utilities
208
-
209
- | Caller | journal | session-bridge | context-engine | worktree |
210
- |--------|---------|----------------|----------------|----------|
211
- | **cook** (L1) | x | x | - | x* |
212
- | **team** (L1) | - | - | - | x |
213
- | **rescue** (L1) | - | x | - | - |
214
- | surgeon | x | - | - | - |
215
- | autopsy | x | - | - | - |
216
- | deploy | x | - | - | - |
217
- | audit | x | - | - | - |
218
- | incident | x | - | - | - |
219
- | skill-forge | x | - | - | - |
220
- | logic-guardian | x | x | - | - |
221
-
222
- ### Monitoring & Media Utilities
223
-
224
- | Caller | watchdog | scope-guard | browser-pilot | asset-creator | video-creator | dependency-doctor |
225
- |--------|----------|-------------|---------------|---------------|---------------|-------------------|
226
- | **launch** (L1) | x | - | x | - | x | - |
227
- | **rescue** (L1) | - | - | - | - | - | x |
228
- | deploy | x | - | x | - | - | - |
229
- | incident | x | - | - | - | - | - |
230
- | test | - | - | x | - | - | - |
231
- | debug | - | - | x | - | - | - |
232
- | marketing | - | - | x | x | x | - |
233
- | perf | - | - | x | - | - | - |
234
- | design | - | - | - | x | - | - |
235
- | audit | - | - | - | - | - | x |
236
-
237
- ---
238
-
239
- ## Matrix 4: L3 -> L3 Exceptions
240
-
241
- Documented L3-to-L3 coordination (exceptions to "L3 calls nothing" rule):
242
-
243
- | From | To | Reason |
244
- |------|-----|--------|
245
- | hallucination-guard | research | Verify package existence on npm/pypi |
246
- | context-engine | session-bridge | Save state before context compaction |
247
- | session-bridge | integrity-check | Verify .rune/ file integrity before loading |
248
-
249
- ---
250
-
251
- ## Connectivity Stats
252
-
253
- ### Most Connected Skills (Total In + Out)
254
-
255
- | Rank | Skill | Layer | Outbound | Inbound | Total | Role |
256
- |------|-------|-------|----------|---------|-------|------|
257
- | 1 | cook | L1 | 22 | 2 | 24 | Universal orchestrator |
258
- | 2 | scout | L2 | 0 | 18 | 18 | Universal scanner (read-only) |
259
- | 3 | review | L2 | 11 | 5 | 16 | Quality hub |
260
- | 4 | deploy | L2 | 10 | 2 | 12 | Delivery orchestrator |
261
- | 5 | verification | L3 | 0 | 9 | 9 | Build/test runner |
262
- | 6 | audit | L2 | 9 | 3 | 12 | Health assessor |
263
- | 7 | journal | L3 | 0 | 8 | 8 | State recorder |
264
- | 8 | sentinel | L2 | 4 | 5 | 9 | Security gate |
265
- | 9 | fix | L2 | 7 | 5 | 12 | Code changer |
266
- | 10 | logic-guardian | L2 | 5 | 5 | 10 | Logic preservation gate |
267
- | 11 | surgeon | L2 | 7 | 1 | 8 | Refactoring specialist |
268
-
269
- ### Isolated Skills (0 outbound L2 connections)
270
-
271
- | Skill | Layer | Note |
272
- |-------|-------|------|
273
- | scout | L2 | Pure scanner — only uses Glob/Grep/Read |
274
- | db | L2 | Only calls L3 utilities |
275
- | perf | L2 | Calls L3 + design (cross-group) |
276
- | incident | L2 | Calls L3 + autopsy/sentinel |
277
- | marketing | L2 | Calls L3 + scout |
278
- | onboard | L2 | Calls scout + autopsy |
279
-
280
- ### Critical Chains
281
-
282
- ```
283
- Feature: cook -> plan -> scout -> (codebase)
284
- -> test -> fix -> verification
285
- -> review -> sentinel -> sast
286
- -> preflight -> sentinel
287
- -> completion-gate
288
-
289
- Launch: launch -> test -> verification
290
- -> audit -> sentinel + autopsy + perf
291
- -> deploy -> watchdog
292
- -> marketing -> asset-creator
293
-
294
- Rescue: rescue -> autopsy -> scout -> (codebase)
295
- -> safeguard -> test
296
- -> surgeon -> fix -> verification
297
-
298
- Incident: incident -> watchdog -> (health check)
299
- -> autopsy -> journal
300
- -> sentinel -> sast
301
-
302
- Debug-Fix: debug <> fix -> test -> verification
303
- -> review -> sentinel
304
- ```
305
-
306
- ---
307
-
308
- ## L4 Extension Pack Routing
309
-
310
- L4 packs are activated contextually, not via direct skill calls. They supplement L1/L2 workflows.
311
-
312
- | Pack | Activated By | Can Call (L3) |
313
- |------|-------------|---------------|
314
- | @rune/ui | cook (Phase 1.5), design | scout, verification, asset-creator |
315
- | @rune/backend | cook (Phase 1.5) | scout, verification |
316
- | @rune/devops | cook, deploy | scout, verification |
317
- | @rune/mobile | cook (Phase 1.5) | scout, verification |
318
- | @rune/security | cook, sentinel, review | scout, verification, sast |
319
- | @rune/trading | cook (Phase 1.5) | scout, verification |
320
- | @rune/saas | cook (Phase 1.5) | scout, verification |
321
- | @rune/ecommerce | cook (Phase 1.5) | scout, verification |
322
- | @rune/ai-ml | cook (Phase 1.5) | scout, verification |
323
- | @rune/gamedev | cook (Phase 1.5) | scout, verification |
324
- | @rune/content | cook (Phase 1.5) | scout, verification |
325
- | @rune/analytics | cook (Phase 1.5) | scout, verification |
326
-
327
- **L4 constraints:** Cannot call L1 or L2. Cannot call other L4 packs.