@rune-kit/rune 2.2.6 → 2.3.1

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 (91) hide show
  1. package/README.md +395 -389
  2. package/compiler/__tests__/tier-override.test.js +158 -0
  3. package/compiler/adapters/antigravity.js +3 -8
  4. package/compiler/adapters/codex.js +3 -8
  5. package/compiler/adapters/cursor.js +3 -8
  6. package/compiler/adapters/generic.js +3 -8
  7. package/compiler/adapters/openclaw.js +4 -9
  8. package/compiler/adapters/opencode.js +3 -8
  9. package/compiler/adapters/windsurf.js +3 -8
  10. package/compiler/bin/rune.js +34 -1
  11. package/compiler/emitter.js +94 -5
  12. package/compiler/transforms/branding.js +10 -3
  13. package/docs/ARCHITECTURE.md +3 -3
  14. package/docs/SKILL-TEMPLATE.md +15 -0
  15. package/docs/VISION.md +3 -3
  16. package/docs/guides/index.html +14 -14
  17. package/docs/index.html +82 -13
  18. package/docs/script.js +33 -6
  19. package/docs/skills/index.html +832 -832
  20. package/docs/style.css +62 -0
  21. package/extensions/ai-ml/PACK.md +7 -0
  22. package/extensions/content/PACK.md +7 -0
  23. package/extensions/mobile/PACK.md +9 -9
  24. package/extensions/zalo/PACK.md +9 -0
  25. package/package.json +8 -6
  26. package/skills/adversary/SKILL.md +12 -0
  27. package/skills/audit/SKILL.md +526 -467
  28. package/skills/autopsy/SKILL.md +12 -0
  29. package/skills/ba/SKILL.md +349 -342
  30. package/skills/brainstorm/SKILL.md +11 -0
  31. package/skills/completion-gate/SKILL.md +260 -249
  32. package/skills/context-engine/SKILL.md +77 -1
  33. package/skills/context-pack/SKILL.md +160 -0
  34. package/skills/cook/SKILL.md +648 -958
  35. package/skills/cook/references/deviation-rules.md +19 -0
  36. package/skills/cook/references/error-recovery.md +37 -0
  37. package/skills/cook/references/exit-conditions.md +31 -0
  38. package/skills/cook/references/loop-detection.md +39 -0
  39. package/skills/cook/references/mid-run-signals.md +31 -0
  40. package/skills/cook/references/output-format.md +40 -0
  41. package/skills/cook/references/pack-detection.md +82 -0
  42. package/skills/cook/references/pause-resume-template.md +38 -0
  43. package/skills/cook/references/rfc-template.md +52 -0
  44. package/skills/cook/references/sharp-edges.md +24 -0
  45. package/skills/cook/references/subagent-status.md +38 -0
  46. package/skills/db/SKILL.md +12 -0
  47. package/skills/debug/SKILL.md +392 -362
  48. package/skills/deploy/SKILL.md +10 -0
  49. package/skills/deploy/references/post-deploy-integration.md +192 -0
  50. package/skills/design/SKILL.md +9 -0
  51. package/skills/docs/SKILL.md +12 -0
  52. package/skills/docs-seeker/SKILL.md +11 -0
  53. package/skills/fix/SKILL.md +281 -249
  54. package/skills/incident/SKILL.md +10 -0
  55. package/skills/launch/SKILL.md +12 -0
  56. package/skills/logic-guardian/SKILL.md +11 -0
  57. package/skills/marketing/SKILL.md +13 -0
  58. package/skills/mcp-builder/SKILL.md +13 -0
  59. package/skills/onboard/SKILL.md +50 -2
  60. package/skills/perf/SKILL.md +11 -0
  61. package/skills/plan/SKILL.md +342 -688
  62. package/skills/plan/references/completeness-scoring.md +36 -0
  63. package/skills/plan/references/outcome-block.md +40 -0
  64. package/skills/plan/references/plan-templates.md +193 -0
  65. package/skills/plan/references/wave-planning.md +44 -0
  66. package/skills/plan/references/workflow-registry.md +52 -0
  67. package/skills/preflight/SKILL.md +360 -280
  68. package/skills/rescue/SKILL.md +11 -0
  69. package/skills/research/SKILL.md +149 -150
  70. package/skills/retro/SKILL.md +11 -0
  71. package/skills/review/SKILL.md +489 -396
  72. package/skills/review-intake/SKILL.md +11 -0
  73. package/skills/safeguard/SKILL.md +12 -0
  74. package/skills/scaffold/SKILL.md +10 -0
  75. package/skills/scope-guard/SKILL.md +11 -0
  76. package/skills/scout/SKILL.md +9 -0
  77. package/skills/sentinel/SKILL.md +296 -425
  78. package/skills/sentinel/references/config-protection.md +52 -0
  79. package/skills/sentinel/references/destructive-commands.md +39 -0
  80. package/skills/sentinel/references/domain-hooks.md +73 -0
  81. package/skills/sentinel/references/framework-patterns.md +46 -0
  82. package/skills/sentinel/references/owasp-patterns.md +69 -0
  83. package/skills/sentinel/references/secret-patterns.md +40 -0
  84. package/skills/sentinel/references/skill-content-guard.md +54 -0
  85. package/skills/session-bridge/SKILL.md +56 -2
  86. package/skills/skill-forge/SKILL.md +47 -2
  87. package/skills/skill-router/{SKILL.md → skill.md} +446 -365
  88. package/skills/surgeon/SKILL.md +12 -0
  89. package/skills/team/SKILL.md +34 -1
  90. package/skills/test/SKILL.md +585 -427
  91. package/skills/watchdog/references/webhook-health-checks.md +243 -0
@@ -40,6 +40,7 @@ Legacy refactoring orchestrator for safely modernizing messy codebases. Rescue r
40
40
  - `session-bridge` (L3): save rescue state between sessions
41
41
  - `onboard` (L2): generate context for unfamiliar legacy project
42
42
  - `dependency-doctor` (L3): audit dependencies in legacy project
43
+ - `context-pack` (L3): create structured handoff briefings before spawning subagents
43
44
  - `neural-memory` | Phase start + phase end | Recall past refactoring patterns, capture new ones
44
45
 
45
46
  ## Called By (inbound)
@@ -413,6 +414,16 @@ Rollback point: git tag rune-rescue-baseline (set in Phase 0)
413
414
  - **Rollback Tag**: [git tag name]
414
415
  ```
415
416
 
417
+ ## Returns
418
+
419
+ | Artifact | Format | Location |
420
+ |----------|--------|----------|
421
+ | Rescue state | Markdown | `RESCUE-STATE.md` (updated each session) |
422
+ | Characterization tests | Source files | Written by `rune:safeguard` per module |
423
+ | Refactored modules | Source files | Modified in-place, committed per surgery session |
424
+ | Health score comparison | Inline (Rescue Report) | Baseline vs final autopsy scores |
425
+ | Rescue Report | Markdown (inline) | Emitted at session end (per module and final) |
426
+
416
427
  ## Sharp Edges
417
428
 
418
429
  Known failure modes for this skill. Check these before declaring done.
@@ -1,150 +1,149 @@
1
- ---
2
- name: research
3
- description: Web search and external knowledge lookup. Gathers data on technologies, libraries, best practices, and competitor solutions.
4
- metadata:
5
- author: runedev
6
- version: "0.3.0"
7
- layer: L3
8
- model: haiku
9
- group: knowledge
10
- tools: "Read, Glob, Grep, WebFetch, WebSearch"
11
- ---
12
-
13
- # research
14
-
15
- ## Purpose
16
-
17
- Web research utility. Receives a research question, executes targeted searches, deep-dives into top results, and returns structured findings with sources. Stateless — no memory between calls.
18
-
19
- ## Calls (outbound)
20
-
21
- None — pure L3 utility using `WebSearch` and `WebFetch` tools directly.
22
-
23
- ## Called By (inbound)
24
-
25
- - `plan` (L2): external knowledge for architecture decisions
26
- - `brainstorm` (L2): data for informed ideation
27
- - `marketing` (L2): competitor analysis, SEO data
28
- - `hallucination-guard` (L3): verify package existence on npm/pypi
29
- - `autopsy` (L2): research best practices for legacy patterns
30
-
31
- ## Execution
32
-
33
- ### Input
34
-
35
- ```
36
- research_question: string — what to research
37
- focus: string (optional) — narrow the scope (e.g., "security", "performance")
38
- ```
39
-
40
- ### Step 1 — Formulate Queries
41
-
42
- Generate 2-3 targeted search queries from the research question. Vary phrasing to cover different angles:
43
- - Primary: direct question as search terms
44
- - Secondary: "[topic] best practices 2026" or "[topic] vs alternatives"
45
- - Tertiary: "[topic] example" or "[topic] tutorial" if implementation detail needed
46
-
47
- ### Step 2 — Search (Minimum 3 Complementary Sources)
48
-
49
- <HARD-GATE>
50
- Every research conclusion MUST be backed by at minimum 3 complementary sources from DIFFERENT source types.
51
- Single-source conclusions are flagged as `low` confidence regardless of source authority.
52
- </HARD-GATE>
53
-
54
- Call `WebSearch` for each query. Collect result titles, URLs, and snippets. Identify the top 3-5 most relevant URLs prioritizing **source diversity**:
55
-
56
- | Source Type | Examples | Why |
57
- |-------------|----------|-----|
58
- | **Official docs** | Framework docs, API reference, RFC | Authoritative but may lag behind reality |
59
- | **Community** | Stack Overflow, GitHub Issues, Reddit | Real-world pain points, edge cases |
60
- | **Technical blogs** | Dev.to, Medium engineering blogs, personal blogs | Practical experience, tutorials |
61
- | **Repositories** | GitHub repos, npm packages, example code | Working implementations |
62
-
63
- **Selection rules:**
64
- - Source authority (official docs > major blogs > personal blogs)
65
- - Recency (prefer 2025-2026)
66
- - Relevance to the query
67
- - **Diversity: never select 3+ URLs from the same domain** — spread across source types
68
-
69
- > Source: K-Dense claude-scientific-skills (literature-review "minimum 3 complementary databases" pattern), adapted for software research.
70
-
71
- ### Step 3 — Deep Dive
72
-
73
- Call `WebFetch` on the top 3-5 URLs identified in Step 2. Hard limit: **max 5 WebFetch calls** per research invocation. For each fetched page:
74
- - Extract key facts, API signatures, code examples
75
- - Note the source URL and publication date if visible
76
- - Tag the source type (official/community/blog/repo) for Step 4 triangulation
77
-
78
- ### Step 4 — Synthesize (Triangulation)
79
-
80
- Across all fetched content, **triangulate** don't just aggregate:
81
- - Identify points of consensus across sources (≥3 sources = strong signal)
82
- - Flag any conflicting information explicitly (e.g., "Source A says X, Source B says Y")
83
- - Check if conflicts are temporal (old vs new info) or genuine disagreement
84
- - Assign confidence using source diversity:
85
-
86
- | Confidence | Criteria |
87
- |------------|----------|
88
- | `high` | 3+ sources from different types agree |
89
- | `medium` | 2 sources agree, or 3+ from same type |
90
- | `low` | Single source, or sources conflict without resolution |
91
- | `unverified` | No sources found — report this explicitly, NEVER fabricate |
92
-
93
- ### Step 5 — Report
94
-
95
- Return structured findings in the output format below.
96
-
97
- ## Constraints
98
-
99
- - Always cite source URL for every finding
100
- - Flag conflicting information never silently pick one side
101
- - Max 5 WebFetch calls per invocation
102
- - If no useful results found, report that explicitly rather than fabricating
103
-
104
- ## Output Format
105
-
106
- ```
107
- ## Research Results: [Query]
108
- - **Sources fetched**: [n]
109
- - **Confidence**: high | medium | low
110
-
111
- ### Key Findings
112
- - [finding] — [source URL]
113
- - [finding] — [source URL]
114
-
115
- ### Conflicts / Caveats
116
- - [Source A] says X. [Source B] says Y. Recommend verifying against [authority].
117
-
118
- ### Code Examples
119
- ```[lang]
120
- [relevant snippet]
121
- ```
122
-
123
- ### Recommendations
124
- - [actionable suggestion based on findings]
125
- ```
126
-
127
- ## Sharp Edges
128
-
129
- Known failure modes for this skill. Check these before declaring done.
130
-
131
- | Failure Mode | Severity | Mitigation |
132
- |---|---|---|
133
- | Fabricating findings when no useful results found | CRITICAL | Constraint: report "no useful results found" explicitly never invent citations |
134
- | Reporting conflicting sources without flagging the conflict | HIGH | Constraint: flag conflicting information explicitly, never silently pick one side |
135
- | Assigning "high" confidence from a single source | MEDIUM | High = 3+ sources agree; 1-2 sources = medium confidence |
136
- | Exceeding 5 WebFetch calls per invocation | MEDIUM | Hard limit: prioritize top 3-5 URLs from search, fetch only the most relevant |
137
- | Single-source conclusions presented as fact | HIGH | HARD-GATE: minimum 3 complementary sources from different source types. Single source = `low` confidence |
138
- | All sources from same domain (e.g., 3 Stack Overflow links) | MEDIUM | Source diversity rule: never 3+ URLs from the same domain. Spread across official/community/blog/repo |
139
-
140
- ## Done When
141
-
142
- - 2-3 search queries formulated and executed
143
- - Top 3-5 URLs identified and fetched (max 5 WebFetch calls)
144
- - Conflicting information between sources explicitly flagged
145
- - Confidence level assigned (high/medium/low) with rationale
146
- - Research Results emitted with source URLs for every key finding
147
-
148
- ## Cost Profile
149
-
150
- ~300-800 tokens input, ~200-500 tokens output. Haiku. Fast and cheap.
1
+ ---
2
+ name: research
3
+ description: Web search and external knowledge lookup. Gathers data on technologies, libraries, best practices, and competitor solutions.
4
+ metadata:
5
+ author: runedev
6
+ version: "0.3.0"
7
+ layer: L3
8
+ model: haiku
9
+ group: knowledge
10
+ tools: "Read, Glob, Grep, WebFetch, WebSearch"
11
+ ---
12
+
13
+ # research
14
+
15
+ ## Purpose
16
+
17
+ Web research utility. Receives a research question, executes targeted searches, deep-dives into top results, and returns structured findings with sources. Stateless — no memory between calls.
18
+
19
+ ## Calls (outbound)
20
+
21
+ None — pure L3 utility using `WebSearch` and `WebFetch` tools directly.
22
+
23
+ ## Called By (inbound)
24
+
25
+ - `plan` (L2): external knowledge for architecture decisions
26
+ - `brainstorm` (L2): data for informed ideation
27
+ - `marketing` (L2): competitor analysis, SEO data
28
+ - `hallucination-guard` (L3): verify package existence on npm/pypi
29
+ - `autopsy` (L2): research best practices for legacy patterns
30
+
31
+ ## Execution
32
+
33
+ ### Input
34
+
35
+ ```
36
+ research_question: string — what to research
37
+ focus: string (optional) — narrow the scope (e.g., "security", "performance")
38
+ ```
39
+
40
+ ### Step 1 — Formulate Queries
41
+
42
+ Generate 2-3 targeted search queries from the research question. Vary phrasing to cover different angles:
43
+ - Primary: direct question as search terms
44
+ - Secondary: "[topic] best practices 2026" or "[topic] vs alternatives"
45
+ - Tertiary: "[topic] example" or "[topic] tutorial" if implementation detail needed
46
+
47
+ ### Step 2 — Search (Minimum 3 Complementary Sources)
48
+
49
+ <HARD-GATE>
50
+ Every research conclusion MUST be backed by at minimum 3 complementary sources from DIFFERENT source types.
51
+ Single-source conclusions are flagged as `low` confidence regardless of source authority.
52
+ </HARD-GATE>
53
+
54
+ Call `WebSearch` for each query. Collect result titles, URLs, and snippets. Identify the top 3-5 most relevant URLs prioritizing **source diversity**:
55
+
56
+ | Source Type | Examples | Why |
57
+ |-------------|----------|-----|
58
+ | **Official docs** | Framework docs, API reference, RFC | Authoritative but may lag behind reality |
59
+ | **Community** | Stack Overflow, GitHub Issues, Reddit | Real-world pain points, edge cases |
60
+ | **Technical blogs** | Dev.to, Medium engineering blogs, personal blogs | Practical experience, tutorials |
61
+ | **Repositories** | GitHub repos, npm packages, example code | Working implementations |
62
+
63
+ **Selection rules:**
64
+ - Source authority (official docs > major blogs > personal blogs)
65
+ - Recency (prefer 2025-2026)
66
+ - Relevance to the query
67
+ - **Diversity: never select 3+ URLs from the same domain** — spread across source types
68
+
69
+
70
+ ### Step 3 — Deep Dive
71
+
72
+ Call `WebFetch` on the top 3-5 URLs identified in Step 2. Hard limit: **max 5 WebFetch calls** per research invocation. For each fetched page:
73
+ - Extract key facts, API signatures, code examples
74
+ - Note the source URL and publication date if visible
75
+ - Tag the source type (official/community/blog/repo) for Step 4 triangulation
76
+
77
+ ### Step 4 — Synthesize (Triangulation)
78
+
79
+ Across all fetched content, **triangulate** — don't just aggregate:
80
+ - Identify points of consensus across sources (≥3 sources = strong signal)
81
+ - Flag any conflicting information explicitly (e.g., "Source A says X, Source B says Y")
82
+ - Check if conflicts are temporal (old vs new info) or genuine disagreement
83
+ - Assign confidence using source diversity:
84
+
85
+ | Confidence | Criteria |
86
+ |------------|----------|
87
+ | `high` | 3+ sources from different types agree |
88
+ | `medium` | 2 sources agree, or 3+ from same type |
89
+ | `low` | Single source, or sources conflict without resolution |
90
+ | `unverified` | No sources found report this explicitly, NEVER fabricate |
91
+
92
+ ### Step 5 — Report
93
+
94
+ Return structured findings in the output format below.
95
+
96
+ ## Constraints
97
+
98
+ - Always cite source URL for every finding
99
+ - Flag conflicting information never silently pick one side
100
+ - Max 5 WebFetch calls per invocation
101
+ - If no useful results found, report that explicitly rather than fabricating
102
+
103
+ ## Output Format
104
+
105
+ ```
106
+ ## Research Results: [Query]
107
+ - **Sources fetched**: [n]
108
+ - **Confidence**: high | medium | low
109
+
110
+ ### Key Findings
111
+ - [finding] — [source URL]
112
+ - [finding] — [source URL]
113
+
114
+ ### Conflicts / Caveats
115
+ - [Source A] says X. [Source B] says Y. Recommend verifying against [authority].
116
+
117
+ ### Code Examples
118
+ ```[lang]
119
+ [relevant snippet]
120
+ ```
121
+
122
+ ### Recommendations
123
+ - [actionable suggestion based on findings]
124
+ ```
125
+
126
+ ## Sharp Edges
127
+
128
+ Known failure modes for this skill. Check these before declaring done.
129
+
130
+ | Failure Mode | Severity | Mitigation |
131
+ |---|---|---|
132
+ | Fabricating findings when no useful results found | CRITICAL | Constraint: report "no useful results found" explicitly — never invent citations |
133
+ | Reporting conflicting sources without flagging the conflict | HIGH | Constraint: flag conflicting information explicitly, never silently pick one side |
134
+ | Assigning "high" confidence from a single source | MEDIUM | High = 3+ sources agree; 1-2 sources = medium confidence |
135
+ | Exceeding 5 WebFetch calls per invocation | MEDIUM | Hard limit: prioritize top 3-5 URLs from search, fetch only the most relevant |
136
+ | Single-source conclusions presented as fact | HIGH | HARD-GATE: minimum 3 complementary sources from different source types. Single source = `low` confidence |
137
+ | All sources from same domain (e.g., 3 Stack Overflow links) | MEDIUM | Source diversity rule: never 3+ URLs from the same domain. Spread across official/community/blog/repo |
138
+
139
+ ## Done When
140
+
141
+ - 2-3 search queries formulated and executed
142
+ - Top 3-5 URLs identified and fetched (max 5 WebFetch calls)
143
+ - Conflicting information between sources explicitly flagged
144
+ - Confidence level assigned (high/medium/low) with rationale
145
+ - Research Results emitted with source URLs for every key finding
146
+
147
+ ## Cost Profile
148
+
149
+ ~300-800 tokens input, ~200-500 tokens output. Haiku. Fast and cheap.
@@ -309,6 +309,17 @@ SELF-VALIDATION (run before emitting report):
309
309
  - Narrative report emitted
310
310
  - No code was modified
311
311
 
312
+ ## Returns
313
+
314
+ | Artifact | Format | Location |
315
+ |----------|--------|----------|
316
+ | Retrospective narrative report | Markdown (~800-1500 words) | inline |
317
+ | Retro JSON snapshot | JSON | `.rune/retros/{YYYY-MM-DD}.json` |
318
+ | Per-person breakdown | Markdown sections | inline |
319
+ | Action items + habits | Ordered lists | inline |
320
+
312
321
  ## Cost Profile
313
322
 
314
323
  ~3000-5000 tokens input (git history parsing), ~2000-4000 tokens output (narrative). Sonnet for analysis quality. Runs infrequently (weekly/sprint cadence).
324
+
325
+ **Scope guardrail:** retro is read-only — it analyzes and reports. It does NOT modify code, create PRs, or change any files except its own output artifacts in `.rune/retros/`.