@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,332 +0,0 @@
1
- # Rune Architecture
2
-
3
- ## 5-Layer Model
4
-
5
- | Layer | Name | Count | Can Call | Called By | State |
6
- |-------|------|-------|----------|----------|-------|
7
- | **L0** | **Router** | **1** | **L1-L3 (routing)** | **Every message** | **Stateless (rule-based)** |
8
- | L1 | Orchestrators | 5 | L2, L3 | L0, User | Stateful (workflow) |
9
- | L2 | Workflow Hubs | 28 | L2 (cross-hub), L3 | L1, L2 | Stateful (task) |
10
- | L3 | Utilities | 26 | Nothing (pure)* | L1, L2 | Stateless |
11
- | L4 | Extension Packs | 14 free + 4 pro + 4 business | L3 | L2 (domain match) | Config-based |
12
-
13
- ### L0 — The Enforcement Layer
14
-
15
- `skill-router` is the only L0 skill. It enforces a single discipline: **check the routing table before every response**. It doesn't do work — it ensures the right skill does the work.
16
-
17
- - Loaded via plugin description, always active
18
- - Routes user intent to the correct L1-L3 skill
19
- - Prevents agents from bypassing skills ("I'll just do it manually")
20
- - See `skills/skill-router/SKILL.md` for the full routing table and anti-rationalization gate
21
-
22
- ### L4 — Extension Packs (Activation Protocol)
23
-
24
- L4 packs are domain-specific instruction sets stored as `extensions/*/PACK.md` files. They are activated (read) in two ways:
25
-
26
- **1. Explicit invocation** — User runs `/rune <pack-skill>` (e.g., `/rune rag-patterns`)
27
- - `skill-router` detects the L4 trigger in Tier 4 routing table
28
- - Agent reads `extensions/<pack>/PACK.md`
29
- - Agent follows the matching skill's Workflow steps
30
-
31
- **2. Implicit detection** — `cook` detects domain context in Phase 1.5
32
- - Scout output reveals domain signals (e.g., `three.js` in dependencies)
33
- - Cook matches against L4 pack mapping table
34
- - Agent reads matching PACK.md and applies its constraints/patterns
35
- - Domain patterns supplement cook's standard phases
36
-
37
- **L4 calling rules:**
38
- - L4 CAN call L3 utilities (scout, verification, hallucination-guard)
39
- - L4 CANNOT call L1 or L2 skills
40
- - L4 CANNOT call other L4 packs (no cross-pack dependencies)
41
- - If L4 pack file not found on disk, skip silently (graceful degradation)
42
-
43
- ### Exceptions
44
-
45
- - `team` (L1) can call other L1 orchestrators — meta-orchestration pattern.
46
- - *L3→L3 coordination: `context-engine` → `session-bridge`, `hallucination-guard` → `research`, `session-bridge` → `integrity-check` (documented in SKILL.md).
47
-
48
- ## Mesh Protocol
49
-
50
- ### Loop Prevention
51
-
52
- ```
53
- Rule 1: No self-calls (history[-1] !== target)
54
- Rule 2: Max 2 visits to same skill per chain
55
- Rule 3: Max chain depth: 8
56
- Rule 4: If blocked → escalate to L1 orchestrator
57
- ```
58
-
59
- ### Model Auto-Selection
60
-
61
- ```
62
- Read-only / scan? → haiku (cheapest)
63
- Write / edit / generate? → sonnet (default)
64
- Architecture / security? → opus (deep reasoning)
65
-
66
- Override: priority=critical → always opus
67
- Override: budget constraint → downgrade
68
- Override: user preference → manual in config
69
- ```
70
-
71
- ### Parallel Execution
72
-
73
- | Context | Max Parallel | Reason |
74
- |---------|-------------|--------|
75
- | L3 utilities (haiku) | 5 | Cheap, fast, independent |
76
- | L2 hubs (sonnet) | 3 | Moderate cost, may share context |
77
- | L1 orchestrators | 1 | Only one orchestrator at a time |
78
-
79
- ### Error Handling & Resilience
80
-
81
- | If this fails... | Try this instead... |
82
- |-------------------|---------------------|
83
- | debug can't find cause | problem-solver (different reasoning) |
84
- | docs-seeker can't find | research (broader web search) |
85
- | browser-pilot can't capture | verification (CLI checks) |
86
- | scout can't find files | research + docs-seeker |
87
- | test can't run (env broken) | deploy fix env → test again |
88
- | review finds too many issues | plan re-scope → fix priorities |
89
-
90
- ## Skill Groups
91
-
92
- ### L1 Orchestrators
93
-
94
- | Skill | Model | Role |
95
- |-------|-------|------|
96
- | cook | sonnet | Feature implementation orchestrator (v0.5.0 — phase-aware execution) |
97
- | team | opus | Multi-agent parallel orchestrator |
98
- | launch | sonnet | Deploy + marketing orchestrator |
99
- | rescue | sonnet | Legacy refactoring orchestrator |
100
- | scaffold | sonnet | Project bootstrap orchestrator (BA-powered, 9-phase pipeline) |
101
-
102
- ### L2 Workflow Hubs
103
-
104
- | Group | Skills |
105
- |-------|--------|
106
- | CREATION | plan, scout, brainstorm, design, skill-forge, ba, mcp-builder |
107
- | DEVELOPMENT | debug, fix, test, review, db |
108
- | QUALITY | sentinel, preflight, onboard, audit, perf, review-intake, logic-guardian |
109
- | DELIVERY | deploy, marketing, incident, docs |
110
- | RESCUE | autopsy, safeguard, surgeon |
111
-
112
- ### L3 Utilities
113
-
114
- | Group | Skills |
115
- |-------|--------|
116
- | KNOWLEDGE | research, docs-seeker, trend-scout |
117
- | REASONING | problem-solver, sequential-thinking |
118
- | VALIDATION | verification, hallucination-guard, integrity-check, completion-gate, constraint-check, sast |
119
- | STATE | context-engine, journal, session-bridge |
120
- | MONITORING | watchdog, scope-guard |
121
- | MEDIA | browser-pilot, asset-creator, video-creator |
122
- | DEPS | dependency-doctor |
123
- | WORKSPACE | worktree |
124
- | GIT | git |
125
- | DOCUMENTS | doc-processor |
126
-
127
- ## Cross-Hub Mesh (L2 ↔ L2)
128
-
129
- ```
130
- plan ↔ brainstorm (creative ↔ structure)
131
- fix ↔ debug (fix ↔ root cause)
132
- test → debug (unexpected failure)
133
- review → test (untested edge case found)
134
- review → fix (bug found during review)
135
- review → review-intake (external feedback received on reviewed code)
136
- review-intake → fix (verified feedback → apply changes)
137
- review-intake → test (reviewer found untested edge case)
138
- review-intake → sentinel (reviewer flagged security concern)
139
- fix → test (verify after fix)
140
- deploy → test (pre-deploy verification)
141
- debug → scout (find related code)
142
- marketing → scout (analyze assets)
143
- plan → scout (scan before planning)
144
- fix → review (self-review complex fix)
145
- review → scout (more context needed)
146
- surgeon → safeguard (untested module found)
147
- preflight → sentinel (security sub-check)
148
- audit → sentinel (security phase delegation)
149
- audit → autopsy (complexity/health phase)
150
- audit → dependency-doctor (deps phase delegation)
151
- audit → scout (discovery phase)
152
- audit → journal (save audit report)
153
-
154
- # perf
155
- perf ← cook (Phase 5 quality gate)
156
- perf ← audit (performance dimension delegation)
157
- perf ← review (performance patterns detected in diff)
158
- perf ← deploy (pre-deploy perf regression check)
159
- perf → scout (find hotpath files)
160
- perf → browser-pilot (Lighthouse / Core Web Vitals)
161
- perf → verification (run benchmark scripts if configured)
162
-
163
- # db
164
- db ← cook (schema change detected in diff)
165
- db ← deploy (pre-deploy migration safety check)
166
- db ← audit (database health dimension)
167
- db → scout (find schema/migration files)
168
- db → verification (run migration in test env)
169
- db → hallucination-guard (verify SQL syntax and ORM methods)
170
-
171
- # incident
172
- incident ← launch (watchdog alerts during Phase 3 VERIFY)
173
- incident ← deploy (health check fails post-deploy)
174
- incident → watchdog (current system state — what's down)
175
- incident → autopsy (root cause after containment)
176
- incident → journal (record incident timeline)
177
- incident → sentinel (check for security dimension)
178
-
179
- # design
180
- design ← cook (frontend task detected, no design-system.md)
181
- design ← review (AI anti-pattern detected in diff)
182
- design ← perf (Lighthouse Accessibility BLOCK)
183
- design → scout (detect platform, tokens, component library)
184
- design → asset-creator (generate base visual assets from design system)
185
-
186
- # skill-forge
187
- skill-forge ← cook (feature being built IS a new skill)
188
- skill-forge ← plan (plan identifies need for reusable skill)
189
- skill-forge → scout (scan existing skills for overlap)
190
- skill-forge → plan (structure complex multi-phase skills)
191
- skill-forge → hallucination-guard (verify referenced skills exist)
192
- skill-forge → verification (validate SKILL.md format)
193
- skill-forge → journal (record skill creation ADR)
194
-
195
- # review-intake
196
- review-intake ← cook (Phase 5: external review arrives)
197
- review-intake ← review (self-review surfaces issues to address)
198
- review-intake → scout (verify reviewer claims against codebase)
199
- review-intake → fix (apply verified changes)
200
- review-intake → test (add tests for reviewer-found edge cases)
201
- review-intake → hallucination-guard (verify suggested APIs exist)
202
- review-intake → sentinel (re-check security if reviewer flagged)
203
-
204
- # completion-gate
205
- completion-gate ← cook (Phase 5d: validate agent claims)
206
- completion-gate ← team (validate cook reports from streams)
207
-
208
- # worktree
209
- worktree ← team (Phase 2: create worktrees for streams)
210
- worktree ← cook (optional isolation for complex features)
211
-
212
- # sast
213
- sast ← sentinel (deep analysis beyond regex patterns)
214
- sast ← audit (security dimension in full audit)
215
- sast ← cook (security-sensitive code paths)
216
- sast ← review (security patterns detected in diff)
217
-
218
- # constraint-check
219
- constraint-check ← cook (end-of-workflow discipline audit)
220
- constraint-check ← team (verify stream agent compliance)
221
- constraint-check ← audit (quality dimension assessment)
222
-
223
- # logic-guardian
224
- logic-guardian ← cook (Phase 1.5: complex logic project detected)
225
- logic-guardian ← fix (pre-edit gate on manifested files)
226
- logic-guardian ← surgeon (pre-refactor on logic modules)
227
- logic-guardian ← team (validate logic integrity across streams)
228
- logic-guardian ← review (check if diff removes manifested logic)
229
- logic-guardian → scout (scan project for logic files)
230
- logic-guardian → verification (run tests after logic edits)
231
- logic-guardian → hallucination-guard (verify references after edit)
232
- logic-guardian → journal (record logic changes as ADRs)
233
- logic-guardian → session-bridge (save manifest for cross-session)
234
-
235
- # ba (Business Analyst)
236
- ba ← cook (Phase 1 BA gate — feature requests, integrations, greenfield)
237
- ba ← scaffold (Phase 1 requirement elicitation)
238
- ba → plan (hand-off: requirements.md → implementation planning)
239
- ba → brainstorm (explore approaches when requirements are ambiguous)
240
- ba → research (domain research for hidden requirements)
241
-
242
- # scaffold (Project Bootstrap)
243
- scaffold → ba (Phase 1: requirement elicitation)
244
- scaffold → research (Phase 2: tech stack research)
245
- scaffold → plan (Phase 3: architecture planning)
246
- scaffold → design (Phase 4: design system generation)
247
- scaffold → fix (Phase 5: code generation)
248
- scaffold → test (Phase 6: test generation)
249
- scaffold → docs (Phase 7: documentation)
250
- scaffold → git (Phase 8: initial commit)
251
- scaffold → verification (Phase 9: build + test verification)
252
- scaffold → sentinel (Phase 9: security scan)
253
-
254
- # docs (Documentation Lifecycle)
255
- docs ← cook (Phase 8: auto-update docs after feature)
256
- docs ← scaffold (Phase 7: generate initial docs)
257
- docs → scout (scan codebase for doc-worthy exports)
258
- docs → doc-processor (generate PDF/DOCX from markdown)
259
- docs → git (commit doc changes)
260
-
261
- # git (Semantic Git Operations)
262
- git ← cook (Phase 7: semantic commit generation)
263
- git ← scaffold (Phase 8: initial commit)
264
- git ← docs (commit doc changes)
265
- git ← launch (tag and release)
266
-
267
- # mcp-builder (MCP Server Builder)
268
- mcp-builder ← cook (building an MCP server)
269
- mcp-builder → scout (scan for existing MCP patterns)
270
- mcp-builder → test (generate MCP server tests)
271
- mcp-builder → docs (generate MCP server documentation)
272
- mcp-builder → hallucination-guard (verify SDK imports exist)
273
-
274
- # doc-processor (Document Format Utility)
275
- doc-processor ← docs (PDF/DOCX generation)
276
- doc-processor ← marketing (generate branded PDFs)
277
- ```
278
-
279
- ## Master Plan + Phase Files (Amateur-Proof Architecture)
280
-
281
- The `plan` skill (v0.4.0) produces structured plans designed for **any model to execute with high accuracy**.
282
-
283
- ### Design Principle
284
-
285
- > Plan for the weakest coder. If Haiku (Amateur) can execute the phase file, every model benefits.
286
-
287
- ### Structure
288
-
289
- ```
290
- .rune/
291
- plan-<feature>.md ← Master plan: overview (<80 lines)
292
- plan-<feature>-phase1.md ← Phase 1: self-contained execution detail (<200 lines)
293
- plan-<feature>-phase2.md ← Phase 2: self-contained execution detail
294
- ...
295
- ```
296
-
297
- ### Phase File Template (Amateur-Proof)
298
-
299
- Every phase file MUST include these 7 mandatory sections:
300
-
301
- | Section | Purpose | Why Amateur Needs It |
302
- |---------|---------|---------------------|
303
- | Data Flow | ASCII diagram of data movement | Prevents wrong function call order |
304
- | Code Contracts | Function signatures, interfaces | Prevents wrong return types |
305
- | Tasks | File paths, logic, edge cases | Prevents missed files |
306
- | Failure Scenarios | When/Then/Error table | Prevents missing error handling |
307
- | Rejection Criteria | Explicit DO NOTs | Prevents common anti-patterns |
308
- | Cross-Phase Context | Imports from prior, exports for future | Prevents broken dependencies |
309
- | Acceptance Criteria | Testable conditions | Prevents "done" without proof |
310
-
311
- ### Execution Flow
312
-
313
- ```
314
- 1. cook Phase 0: check for existing master plan → resume from current phase
315
- 2. cook Phase 2: plan produces master + phase files → user approves
316
- 3. cook Phase 3-7: load ONLY current phase file → test → implement → quality → commit
317
- 4. cook Phase 7: mark phase ✅ in master plan → announce next phase
318
- 5. Next session: Phase 0 detects master plan → loads next phase → executes
319
- ```
320
-
321
- **One phase per session = small context = better code from any model.**
322
-
323
- ## Context Bus
324
-
325
- Each workflow maintains a shared context managed by L1:
326
-
327
- ```
328
- L1: full bus (complete picture)
329
- L2: relevant subset (only what they need)
330
- L3: minimal query (stateless, no history)
331
- L4: domain-filtered subset
332
- ```
@@ -1,109 +0,0 @@
1
- # Community Extension Packs
2
-
3
- ## What Are Community Packs?
4
-
5
- Community L4 extension packs extend Rune's core mesh with domain-specific skills. They follow the same PACK.md format as core extensions but are maintained by the community.
6
-
7
- Community packs are **SKILL.md markdown files** — they contain instructions, not executable code. This makes them inherently safe: Claude reads them and follows the patterns, but packs cannot execute arbitrary code.
8
-
9
- ## Creating a Community Pack
10
-
11
- ### 1. Scaffold
12
-
13
- ```bash
14
- # Use skill-forge to generate the structure
15
- /rune pack create my-pack-name
16
- ```
17
-
18
- Or manually create:
19
- ```
20
- my-pack-name/
21
- ├── PACK.md # Required — follows docs/EXTENSION-TEMPLATE.md
22
- ├── LICENSE # Recommended — MIT preferred
23
- └── README.md # Optional — for GitHub display
24
- ```
25
-
26
- ### 2. Write PACK.md
27
-
28
- Follow `docs/EXTENSION-TEMPLATE.md` exactly. Required sections:
29
- - YAML frontmatter (name, description, layer: L4)
30
- - Purpose
31
- - Triggers
32
- - Skills Included (with ### headers, workflow steps, examples)
33
- - Connections
34
- - Constraints
35
- - Sharp Edges
36
- - Done When
37
- - Cost Profile
38
-
39
- ### 3. Validate
40
-
41
- ```bash
42
- node scripts/validate-pack.js ./my-pack-name
43
- ```
44
-
45
- ### 4. Publish
46
-
47
- 1. Push your pack to a public Git repository
48
- 2. Submit a PR to [rune-kit/rune-community-index](https://github.com/rune-kit/rune-community-index) adding your pack to `index.json`:
49
-
50
- ```json
51
- {
52
- "name": "@community/my-pack-name",
53
- "repo": "github:username/rune-pack-name",
54
- "description": "One-line description",
55
- "version": "0.1.0",
56
- "tags": ["domain", "framework"]
57
- }
58
- ```
59
-
60
- ## Installing Community Packs
61
-
62
- ```bash
63
- /rune pack install github:username/rune-pack-name
64
- ```
65
-
66
- This clones the repo to `.rune/community-packs/<name>/` and registers it in `.rune/community-packs/registry.json`.
67
-
68
- ## Managing Packs
69
-
70
- ```bash
71
- /rune pack list # List all installed packs (core + community)
72
- /rune pack remove <name> # Remove a community pack
73
- /rune pack install <git-url> # Install from Git
74
- /rune pack create <name> # Scaffold a new pack
75
- ```
76
-
77
- ## Security
78
-
79
- - Community packs are validated by `integrity-check` (L3) on load
80
- - Packs cannot modify core L1-L3 skills
81
- - Packs are sandboxed to their `.rune/community-packs/<name>/` directory
82
- - All pack files are markdown — no executable code
83
-
84
- ## Quality Guidelines
85
-
86
- A good community pack:
87
- - Solves a real domain-specific problem (not covered by core L1-L3)
88
- - Has concrete workflow steps (not vague advice)
89
- - Includes code examples for every skill
90
- - Declares connections to the core mesh (which L2 skills call it, which L3 it uses)
91
- - Has constraints that prevent common mistakes in the domain
92
- - Lists sharp edges specific to the domain
93
-
94
- ## Pack Registry Format
95
-
96
- `.rune/community-packs/registry.json`:
97
- ```json
98
- {
99
- "version": 1,
100
- "packs": {
101
- "my-pack-name": {
102
- "repo": "github:username/rune-pack-name",
103
- "installed": "2026-02-28",
104
- "version": "0.1.0",
105
- "path": ".rune/community-packs/my-pack-name"
106
- }
107
- }
108
- }
109
- ```
@@ -1,215 +0,0 @@
1
- # Contributing L4 Extension Packs
2
-
3
- > **H2 Document** — How to create and submit community L4 extension packs for the Rune mesh.
4
-
5
- ---
6
-
7
- ## What is an L4 Extension Pack?
8
-
9
- L4 packs add domain-specific skills on top of Rune's language-agnostic L1-L3 core. A pack is a directory containing a `PACK.md` file that defines 3-6 skills for a specific domain (React patterns, trading algorithms, mobile development, etc.).
10
-
11
- **The core mesh (L1-L3) is frozen at 40 skills.** All growth in Rune happens through L4.
12
-
13
- ---
14
-
15
- ## The 2-Gate L4 Filter
16
-
17
- L4 packs have a lighter filter than L1-L3 skills. A proposed pack must pass both gates:
18
-
19
- ### Gate 1 — Domain Coherence
20
- > Do all skills in this pack serve the same domain?
21
-
22
- The pack's skills must form a coherent unit. A pack mixing React patterns with mobile deployment has no identity. Each skill in the pack should be something a developer in this domain would invoke together.
23
-
24
- ❌ **Fail:** Pack with `react-hooks`, `django-models`, `kubernetes-deploy` — no coherent domain
25
- ✅ **Pass:** Pack with `react-hooks`, `component-patterns`, `performance-audit`, `a11y-audit` — frontend domain
26
-
27
- ### Gate 2 — Core Mesh Integration
28
- > Does the pack connect to at least 2 existing L1-L3 skills?
29
-
30
- L4 packs must integrate with the existing mesh — not operate as isolated utilities. Connections must be meaningful (actual data flow, not ceremonial mentions).
31
-
32
- Typical connection patterns:
33
- - Pack skill is called by `cook` (L1) when domain detected
34
- - Pack skill calls `scout` (L2) for codebase scan
35
- - Pack skill calls `verification` (L3) after changes
36
- - Pack skill calls `sentinel` (L2) for domain-specific security
37
-
38
- ❌ **Fail:** Pack with 0 inbound connections from L1-L3 (no orchestrator calls it)
39
- ✅ **Pass:** Pack called by `cook` on stack detection, calls `scout` + `verification`
40
-
41
- ---
42
-
43
- ## Pack Structure
44
-
45
- ```
46
- extensions/
47
- └── your-pack-name/
48
- └── PACK.md
49
- ```
50
-
51
- `PACK.md` must follow `docs/EXTENSION-TEMPLATE.md` exactly. Required sections:
52
-
53
- ```markdown
54
- ---
55
- name: "@rune/pack-name"
56
- description: One-line description.
57
- metadata:
58
- author: your-github-username
59
- version: "0.1.0"
60
- layer: L4
61
- price: "$9|$12|$15"
62
- target: Target developer audience
63
- ---
64
-
65
- # @rune/pack-name
66
-
67
- ## Skills Included
68
- [3-6 skills with brief description each]
69
-
70
- ## Connections
71
- [Explicit list of L1-L3 skills this pack calls or is called by]
72
-
73
- ## Tech Stack Support (if applicable)
74
- [Framework/library table]
75
- ```
76
-
77
- ---
78
-
79
- ## Naming Conventions
80
-
81
- - Pack name: `@rune/domain-name` (lowercase kebab-case)
82
- - Pack directory: `extensions/domain-name/` (without `@rune/` prefix)
83
- - Skill names within pack: `verb-noun` or `domain-pattern` (lowercase kebab-case)
84
- - Max pack name length: 48 characters
85
-
86
- **Good names:** `@rune/ui`, `@rune/trading`, `@rune/ai-ml`, `@rune/ecommerce`
87
- **Bad names:** `@rune/my-awesome-react-hooks-pack-v2`, `@rune/FRONTEND`, `@rune/things`
88
-
89
- ---
90
-
91
- ## Connection Patterns by Pack Type
92
-
93
- ### Frontend Packs (`@rune/ui`, `@rune/mobile`)
94
- ```
95
- cook (L1) ← detects React/Vue/Svelte/SwiftUI → calls pack skill
96
- pack skill → scout (L2): scan component library
97
- pack skill → verification (L3): run component tests
98
- pack skill → sentinel (L2): check for XSS/CSRF patterns
99
- ```
100
-
101
- ### Backend Packs (`@rune/backend`, `@rune/saas`)
102
- ```
103
- cook (L1) ← detects Express/FastAPI/Django → calls pack skill
104
- pack skill → scout (L2): scan API routes and models
105
- pack skill → db (L2): schema and migration check
106
- pack skill → sentinel (L2): security audit
107
- ```
108
-
109
- ### Data/AI Packs (`@rune/ai-ml`, `@rune/analytics`)
110
- ```
111
- cook (L1) ← detects ML framework → calls pack skill
112
- pack skill → scout (L2): find model files and data pipelines
113
- pack skill → perf (L2): inference performance check
114
- pack skill → verification (L3): run model tests
115
- ```
116
-
117
- ### DevOps Packs (`@rune/devops`)
118
- ```
119
- deploy (L2) ← calls pack skill for platform-specific deploy
120
- launch (L1) ← calls pack skill for infrastructure setup
121
- pack skill → watchdog (L3): setup platform monitoring
122
- pack skill → sentinel (L2): infrastructure security scan
123
- ```
124
-
125
- ---
126
-
127
- ## Submission Process
128
-
129
- 1. **Fork** `github.com/rune-kit/rune`
130
- 2. **Create** `extensions/your-pack-name/PACK.md`
131
- 3. **Validate** your pack passes both gates (self-check below)
132
- 4. **Run** structural validator: `node scripts/validate-skills.js`
133
- 5. **Open PR** with title: `feat(l4): add @rune/pack-name — [one-line description]`
134
-
135
- ### PR Description Template
136
-
137
- ```markdown
138
- ## New L4 Pack: @rune/pack-name
139
-
140
- ### Gate 1 — Domain Coherence
141
- [Explain: what domain does this serve? Why are these skills cohesive?]
142
-
143
- ### Gate 2 — Core Mesh Integration
144
- Inbound: [which L1-L3 skills call this pack, and when?]
145
- Outbound: [which L1-L3 skills does this pack call?]
146
-
147
- ### Skills
148
- - `skill-1`: [what it does]
149
- - `skill-2`: [what it does]
150
-
151
- ### Who needs this?
152
- [Describe the developer audience — job title, stack, use case]
153
- ```
154
-
155
- ---
156
-
157
- ## Review Criteria
158
-
159
- Pack PRs are reviewed against these criteria:
160
-
161
- | Criterion | Pass | Fail |
162
- |-----------|------|------|
163
- | Gate 1: Domain coherence | All skills serve same domain | Mixed domains or generic skills |
164
- | Gate 2: Mesh integration | ≥2 connections to L1-L3 | 0 or 1 connections |
165
- | PACK.md completeness | All required sections present | Missing Skills, Connections, or metadata |
166
- | Connection accuracy | Stated connections verified in L1-L3 SKILL.md files | Claimed connections not in L1-L3 files |
167
- | Skill count | 3-6 skills | <3 (too thin) or >6 (too broad) |
168
- | Naming | Lowercase kebab-case, ≤48 chars | CamelCase, numbers, or overly specific names |
169
- | No bloat | Skills would fail Rune's core 5-gate filter | Skills duplicate existing L1-L3 functionality |
170
-
171
- ---
172
-
173
- ## What Makes a Good L4 Skill?
174
-
175
- **Good L4 skill:**
176
- - Domain-specific knowledge that belongs in L4 (not generic enough for L1-L3)
177
- - Clear integration points with the core mesh
178
- - Would be used together with other skills in the same pack
179
-
180
- **Bad L4 skill:**
181
- - Wraps an existing L1-L3 skill with minor variation (The Bloat)
182
- - Generic enough to belong in the core mesh (should be a core PR instead)
183
- - 0 mesh connections (dead node)
184
-
185
- ---
186
-
187
- ## Example: Good vs Bad Pack
188
-
189
- ```markdown
190
- # GOOD: @rune/trading
191
-
192
- Skills: market-data-validator, risk-calculator, backtest-runner, portfolio-analyzer
193
- Domain: Algorithmic trading — financial data validation, risk management, backtesting
194
- Connections: called by cook (L1), calls scout (L2) + sentinel (L2) + perf (L2)
195
- Why L4 not L3: Trading domain knowledge is not language-agnostic — belongs in L4
196
-
197
- # BAD: @rune/code-helpers
198
-
199
- Skills: code-formatter, variable-renamer, comment-generator, snippet-library
200
- Domain: Generic utilities with no domain coherence
201
- Connections: 0 inbound, 0 outbound
202
- Why rejected: These are Claude's base capabilities wrapped in skills. Zero mesh value.
203
- ```
204
-
205
- ---
206
-
207
- ## Version Policy
208
-
209
- L4 packs use semver independently of the Rune core. See `docs/VERSIONING.md`.
210
-
211
- - `0.x.y` — experimental, API may change
212
- - `1.0.0` — stable, API contract locked
213
- - Patch (`x.x.N`) — bug fixes, content improvements
214
- - Minor (`x.N.0`) — new skills added to pack
215
- - Major (`N.0.0`) — breaking change to skill interface or connection contract