@rune-kit/rune 2.2.4 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/README.md +1 -1
  2. package/compiler/adapters/openclaw.js +63 -0
  3. package/compiler/emitter.js +10 -0
  4. package/docs/EXTENSION-TEMPLATE.md +18 -0
  5. package/docs/SKILL-TEMPLATE.md +46 -0
  6. package/docs/guides/index.html +84 -21
  7. package/docs/index.html +303 -37
  8. package/docs/script.js +236 -18
  9. package/docs/style.css +417 -59
  10. package/extensions/saas/PACK.md +13 -8
  11. package/extensions/saas/skills/billing-integration.md +82 -3
  12. package/package.json +7 -5
  13. package/skills/adversary/SKILL.md +12 -0
  14. package/skills/audit/SKILL.md +64 -1
  15. package/skills/autopsy/SKILL.md +12 -0
  16. package/skills/ba/SKILL.md +63 -1
  17. package/skills/brainstorm/SKILL.md +11 -0
  18. package/skills/completion-gate/SKILL.md +51 -2
  19. package/skills/context-engine/SKILL.md +83 -1
  20. package/skills/context-pack/SKILL.md +160 -0
  21. package/skills/cook/SKILL.md +657 -808
  22. package/skills/cook/references/deviation-rules.md +19 -0
  23. package/skills/cook/references/error-recovery.md +37 -0
  24. package/skills/cook/references/exit-conditions.md +31 -0
  25. package/skills/cook/references/loop-detection.md +39 -0
  26. package/skills/cook/references/mid-run-signals.md +31 -0
  27. package/skills/cook/references/output-format.md +40 -0
  28. package/skills/cook/references/pack-detection.md +82 -0
  29. package/skills/cook/references/pause-resume-template.md +38 -0
  30. package/skills/cook/references/rfc-template.md +52 -0
  31. package/skills/cook/references/sharp-edges.md +24 -0
  32. package/skills/cook/references/subagent-status.md +38 -0
  33. package/skills/db/SKILL.md +12 -0
  34. package/skills/debug/SKILL.md +81 -2
  35. package/skills/deploy/SKILL.md +56 -1
  36. package/skills/design/SKILL.md +9 -0
  37. package/skills/docs/SKILL.md +12 -0
  38. package/skills/docs-seeker/SKILL.md +11 -0
  39. package/skills/fix/SKILL.md +63 -3
  40. package/skills/git/SKILL.md +55 -1
  41. package/skills/incident/SKILL.md +10 -0
  42. package/skills/journal/SKILL.md +51 -3
  43. package/skills/launch/SKILL.md +12 -0
  44. package/skills/logic-guardian/SKILL.md +11 -0
  45. package/skills/marketing/SKILL.md +13 -0
  46. package/skills/mcp-builder/SKILL.md +13 -0
  47. package/skills/onboard/SKILL.md +54 -2
  48. package/skills/perf/SKILL.md +11 -0
  49. package/skills/plan/SKILL.md +342 -629
  50. package/skills/plan/references/completeness-scoring.md +37 -0
  51. package/skills/plan/references/outcome-block.md +41 -0
  52. package/skills/plan/references/plan-templates.md +193 -0
  53. package/skills/plan/references/wave-planning.md +44 -0
  54. package/skills/plan/references/workflow-registry.md +53 -0
  55. package/skills/preflight/SKILL.md +135 -1
  56. package/skills/rescue/SKILL.md +10 -0
  57. package/skills/research/SKILL.md +36 -8
  58. package/skills/retro/SKILL.md +325 -0
  59. package/skills/review/SKILL.md +100 -1
  60. package/skills/review-intake/SKILL.md +11 -0
  61. package/skills/safeguard/SKILL.md +12 -0
  62. package/skills/scaffold/SKILL.md +10 -0
  63. package/skills/scope-guard/SKILL.md +11 -0
  64. package/skills/scout/SKILL.md +9 -0
  65. package/skills/sentinel/SKILL.md +307 -320
  66. package/skills/sentinel/references/config-protection.md +52 -0
  67. package/skills/sentinel/references/destructive-commands.md +40 -0
  68. package/skills/sentinel/references/domain-hooks.md +73 -0
  69. package/skills/sentinel/references/framework-patterns.md +46 -0
  70. package/skills/sentinel/references/owasp-patterns.md +69 -0
  71. package/skills/sentinel/references/secret-patterns.md +40 -0
  72. package/skills/sentinel/references/skill-content-guard.md +55 -0
  73. package/skills/session-bridge/SKILL.md +60 -2
  74. package/skills/skill-forge/SKILL.md +131 -4
  75. package/skills/skill-router/SKILL.md +33 -1
  76. package/skills/surgeon/SKILL.md +12 -0
  77. package/skills/team/SKILL.md +35 -1
  78. package/skills/test/SKILL.md +211 -7
package/README.md CHANGED
@@ -26,7 +26,7 @@ Mesh: A ↔ B ↔ C (B fails = A reaches C via D→E)
26
26
  D ↔ E ↔ F
27
27
  ```
28
28
 
29
- ## What's New (v2.2.2)
29
+ ## What's New (v2.3.0)
30
30
 
31
31
  - **UI/UX Pro Max Integration** — 161 palettes, 84 styles, 73 font pairings, 161 reasoning rules from [UI/UX Pro Max](https://github.com/nextlevelbuilder/ui-ux-pro-max-skill) (MIT, 42.8k★) meshed into `design` skill + `@rune/ui` pack
32
32
  - **11 Core Skill Enrichments** — deviation rules, repair operators, evidence quality gate, decision classification, debug knowledge base, CSO discipline, YAGNI pushback, formal pause/resume
@@ -100,6 +100,69 @@ export default {
100
100
  };
101
101
  },
102
102
 
103
+ /**
104
+ * Generate README.md for ClawHub listing page
105
+ *
106
+ * @param {object[]} skills - parsed skill objects
107
+ * @param {object} pluginJson - Rune's .claude-plugin/plugin.json
108
+ * @returns {string} markdown content
109
+ */
110
+ generateReadme(skills, pluginJson) {
111
+ const version = pluginJson.version || '0.0.0';
112
+ const l1 = skills.filter((s) => s.layer === 'L1').map((s) => s.name);
113
+ const l2 = skills.filter((s) => s.layer === 'L2').map((s) => s.name);
114
+ const l3 = skills.filter((s) => s.layer === 'L3').map((s) => s.name);
115
+
116
+ return `# Rune
117
+
118
+ > Less skills. Deeper connections.
119
+
120
+ **${skills.length}-skill mesh** for AI coding assistants — 5-layer architecture, 200+ connections, 14 extension packs.
121
+
122
+ ## Install
123
+
124
+ \`\`\`
125
+ clawhub install rune-kit
126
+ \`\`\`
127
+
128
+ Or via npm:
129
+
130
+ \`\`\`
131
+ npx @rune-kit/rune init
132
+ \`\`\`
133
+
134
+ ## What is Rune?
135
+
136
+ Rune is a **mesh** — skills call each other bidirectionally, forming resilient workflows. If one skill fails, the mesh routes around it.
137
+
138
+ Use \`rune:cook\` for any code task, \`rune:team\` for parallel work, \`rune:launch\` for deploy, \`rune:rescue\` for legacy code.
139
+
140
+ ## Architecture
141
+
142
+ | Layer | Role | Skills |
143
+ |-------|------|--------|
144
+ | L0 | Router | skill-router |
145
+ | L1 | Orchestrators | ${l1.join(', ')} |
146
+ | L2 | Workflow Hubs | ${l2.join(', ')} |
147
+ | L3 | Utilities | ${l3.join(', ')} |
148
+ | L4 | Extensions | 14 domain packs |
149
+
150
+ ## Extension Packs (L4)
151
+
152
+ ui · backend · devops · mobile · security · trading · saas · ecommerce · ai-ml · gamedev · content · analytics · chrome-ext · zalo
153
+
154
+ ## Links
155
+
156
+ - **Source**: [github.com/rune-kit/rune](https://github.com/rune-kit/rune)
157
+ - **Docs**: [rune-kit.github.io/rune](https://rune-kit.github.io/rune)
158
+ - **Guides**: [rune-kit.github.io/rune/guides](https://rune-kit.github.io/rune/guides)
159
+
160
+ ## License
161
+
162
+ MIT — v${version}
163
+ `;
164
+ },
165
+
103
166
  /**
104
167
  * Generate src/index.ts entry point with register(api) pattern
105
168
  *
@@ -256,6 +256,16 @@ export async function buildAll({ runeRoot, outputRoot, adapter, disabledSkills =
256
256
  const entryPoint = adapter.generateEntryPoint(parsedSkills, routerContent);
257
257
  await writeFile(path.join(srcDir, 'index.ts'), entryPoint, 'utf-8');
258
258
  stats.files.push('src/index.ts');
259
+
260
+ // Write README.md + SKILL.md for ClawHub listing page
261
+ if (adapter.generateReadme) {
262
+ const readme = adapter.generateReadme(parsedSkills, pluginJson);
263
+ await writeFile(path.join(openclawRoot, 'README.md'), readme, 'utf-8');
264
+ stats.files.push('README.md');
265
+ // SKILL.md required by clawhub publish
266
+ await writeFile(path.join(openclawRoot, 'SKILL.md'), readme, 'utf-8');
267
+ stats.files.push('SKILL.md');
268
+ }
259
269
  }
260
270
 
261
271
  return stats;
@@ -77,6 +77,9 @@ Brief description.
77
77
  Calls → [L3 utility]: [when/why]
78
78
  Called By ← [L2 hub]: [when/why]
79
79
  Called By ← [L1 orchestrator]: [when auto-detected]
80
+ Feeds Into → [skill]: [what artifact] → [how consumed]
81
+ Fed By ← [skill]: [what artifact] ← [what this pack needs]
82
+ Feedback Loop ↻ [skill-a] ↔ [skill-b]: [what gets refined bidirectionally]
80
83
  ```
81
84
 
82
85
  ## Tech Stack Support (if applicable)
@@ -97,11 +100,26 @@ Called By ← [L1 orchestrator]: [when auto-detected]
97
100
  |---|---|---|
98
101
  | [domain-specific failure] | HIGH/MEDIUM | [how to avoid] |
99
102
 
103
+ ## Self-Validation
104
+
105
+ Per-skill quality checks that run before reporting "done". Domain-specific — not covered by centralized completion-gate.
106
+
107
+ ```
108
+ SELF-VALIDATION (per skill):
109
+ skill-1:
110
+ - [ ] [domain-specific quality check]
111
+ - [ ] [output format compliance]
112
+ skill-2:
113
+ - [ ] [domain-specific quality check]
114
+ - [ ] [completeness check]
115
+ ```
116
+
100
117
  ## Done When
101
118
 
102
119
  - [Verifiable condition 1]
103
120
  - [Verifiable condition 2]
104
121
  - [Structured output emitted]
122
+ - Self-Validation: all per-skill checks passed
105
123
 
106
124
  ## Cost Profile
107
125
 
@@ -28,6 +28,22 @@ One paragraph describing the skill's role in the Rune ecosystem.
28
28
 
29
29
  - `skill-name` (L1|L2): condition when called
30
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
+
31
47
  ## Workflow
32
48
 
33
49
  Step-by-step execution flow.
@@ -38,6 +54,17 @@ Step-by-step execution flow.
38
54
  Structured output that calling skills can consume.
39
55
  ```
40
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
+
41
68
  ## Constraints
42
69
 
43
70
  3-7 MUST/MUST NOT rules specific to this skill.
@@ -61,12 +88,31 @@ Known failure modes for this skill. Check these before declaring done.
61
88
  |---|---|---|
62
89
  | [what goes wrong] | CRITICAL/HIGH/MEDIUM/LOW | [how to avoid it] |
63
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
+
64
105
  ## Done When
65
106
 
66
107
  - [condition 1 — specific, verifiable]
67
108
  - [condition 2]
68
109
  - [condition 3 — structured report emitted]
110
+ - Self-Validation checklist: all checks passed
69
111
 
70
112
  ## Cost Profile
71
113
 
72
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.
@@ -379,18 +379,38 @@
379
379
  cursor: pointer; display: flex; align-items: center; justify-content: center;
380
380
  font-size: 16px; transition: all var(--transition); flex-shrink: 0;
381
381
  }
382
- .theme-toggle:hover { border-color: var(--accent); color: var(--text-primary); }
382
+ .theme-toggle:hover, .lang-toggle:hover { border-color: var(--accent); color: var(--text-primary); }
383
+ .lang-toggle {
384
+ background: none; border: 1px solid var(--border); color: var(--text-secondary);
385
+ width: 34px; height: 34px; border-radius: var(--radius-sm);
386
+ cursor: pointer; display: flex; align-items: center; justify-content: center;
387
+ font-size: 16px; transition: all var(--transition); flex-shrink: 0;
388
+ }
389
+ /* Google Translate — hide ALL injected elements */
383
390
  .goog-te-banner-frame { display: none !important; }
384
- body { top: 0 !important; }
385
- .goog-te-gadget > span { display: none !important; }
386
- .goog-te-gadget { font-size: 0; line-height: 0; }
387
- .goog-te-combo {
388
- background: var(--bg-card); color: var(--text-secondary);
389
- border: 1px solid var(--border); border-radius: var(--radius-sm);
390
- padding: 5px 8px; font-family: var(--font-body); font-size: 12px;
391
- cursor: pointer; outline: none;
391
+ body { top: 0 !important; position: static !important; }
392
+ .skiptranslate { display: none !important; height: 0 !important; overflow: hidden !important; }
393
+ .goog-te-spinner-pos, .goog-te-balloon-frame, #goog-gt-tt, .goog-te-ftab-frame { display: none !important; }
394
+ .goog-text-highlight { background: none !important; box-shadow: none !important; }
395
+ font[style] > font { vertical-align: unset !important; }
396
+ #_gt_dummy { display: none !important; visibility: hidden !important; height: 0 !important; overflow: hidden !important; }
397
+ /* Language dropdown */
398
+ .lang-dropdown { position: relative; }
399
+ .lang-menu {
400
+ position: absolute; top: calc(100% + 6px); right: 0; z-index: 100;
401
+ background: var(--bg-card); border: 1px solid var(--border);
402
+ border-radius: var(--radius-md); padding: 4px; min-width: 140px;
403
+ box-shadow: 0 8px 24px rgba(0,0,0,0.15);
404
+ display: flex; flex-direction: column;
405
+ }
406
+ .lang-menu[hidden] { display: none; }
407
+ .lang-menu button {
408
+ background: none; border: none; color: var(--text-secondary);
409
+ padding: 7px 12px; font-family: var(--font-body); font-size: 13px;
410
+ text-align: left; cursor: pointer; border-radius: var(--radius-sm);
411
+ transition: all var(--transition);
392
412
  }
393
- .goog-te-combo:hover { border-color: var(--accent); }
413
+ .lang-menu button:hover { background: var(--bg-elevated); color: var(--text-primary); }
394
414
 
395
415
  /* ─── RESPONSIVE ─── */
396
416
  @media (max-width: 900px) {
@@ -431,9 +451,28 @@
431
451
  <a href="../">Home</a>
432
452
  <a href="./" class="active">Guides</a>
433
453
  <a href="../#pricing">Pricing</a>
434
- <div class="nav-controls">
454
+ <div class="nav-controls notranslate" translate="no">
435
455
  <button class="theme-toggle" id="theme-toggle" aria-label="Toggle light/dark mode" title="Toggle theme">&#9790;</button>
436
- <div id="google_translate_element"></div>
456
+ <div class="lang-dropdown" id="lang-dropdown">
457
+ <button class="lang-toggle" id="lang-btn" aria-label="Translate page" title="Translate page">
458
+ <svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="M2 12h20"/><path d="M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10A15.3 15.3 0 0 1 12 2z"/></svg>
459
+ </button>
460
+ <div class="lang-menu notranslate" id="lang-menu" translate="no" hidden>
461
+ <button data-lang="">English</button>
462
+ <button data-lang="vi">Tiếng Việt</button>
463
+ <button data-lang="ja">日本語</button>
464
+ <button data-lang="ko">한국어</button>
465
+ <button data-lang="zh-CN">中文(简)</button>
466
+ <button data-lang="zh-TW">中文(繁)</button>
467
+ <button data-lang="fr">Français</button>
468
+ <button data-lang="de">Deutsch</button>
469
+ <button data-lang="es">Español</button>
470
+ <button data-lang="pt">Português</button>
471
+ <button data-lang="ru">Русский</button>
472
+ <button data-lang="th">ไทย</button>
473
+ <button data-lang="id">Bahasa</button>
474
+ </div>
475
+ </div>
437
476
  </div>
438
477
  <a href="https://github.com/rune-kit/rune" class="btn btn-ghost btn-sm" target="_blank" rel="noopener">GitHub</a>
439
478
  </div>
@@ -1370,18 +1409,42 @@
1370
1409
  })();
1371
1410
  </script>
1372
1411
 
1373
- <!-- Google Translate (free, no API key) -->
1412
+ <!-- Language Switcher (Google Translate via cookie) -->
1374
1413
  <script>
1375
- function googleTranslateElementInit() {
1376
- new google.translate.TranslateElement({
1377
- pageLanguage: 'en',
1378
- includedLanguages: 'vi,ja,ko,zh-CN,zh-TW,fr,de,es,pt,ru,ar,hi,th,id',
1379
- layout: google.translate.TranslateElement.InlineLayout.SIMPLE,
1380
- autoDisplay: false
1381
- }, 'google_translate_element');
1382
- }
1414
+ (() => {
1415
+ const btn = document.getElementById('lang-btn');
1416
+ const menu = document.getElementById('lang-menu');
1417
+ const wrap = document.getElementById('lang-dropdown');
1418
+
1419
+ btn.addEventListener('click', () => {
1420
+ const open = !menu.hidden;
1421
+ menu.hidden = open;
1422
+ btn.setAttribute('aria-expanded', String(!open));
1423
+ });
1424
+
1425
+ document.addEventListener('click', (e) => {
1426
+ if (!wrap.contains(e.target)) menu.hidden = true;
1427
+ });
1428
+
1429
+ menu.addEventListener('click', (e) => {
1430
+ const lang = e.target.dataset.lang;
1431
+ if (lang === undefined) return;
1432
+ menu.hidden = true;
1433
+ if (!lang) {
1434
+ document.cookie = 'googtrans=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/';
1435
+ document.cookie = 'googtrans=; expires=Thu, 01 Jan 1970 00:00:00 UTC; path=/; domain=.' + location.hostname;
1436
+ location.reload();
1437
+ return;
1438
+ }
1439
+ document.cookie = 'googtrans=/en/' + lang + '; path=/';
1440
+ document.cookie = 'googtrans=/en/' + lang + '; path=/; domain=.' + location.hostname;
1441
+ location.reload();
1442
+ });
1443
+ })();
1383
1444
  </script>
1384
1445
  <script src="//translate.google.com/translate_a/element.js?cb=googleTranslateElementInit"></script>
1446
+ <script>function googleTranslateElementInit() { new google.translate.TranslateElement({ pageLanguage: 'en', autoDisplay: false }, '_gt_dummy'); }</script>
1447
+ <div id="_gt_dummy" style="display:none"></div>
1385
1448
 
1386
1449
  </body>
1387
1450
  </html>