@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
@@ -198,6 +198,18 @@ Known failure modes for this skill. Check these before declaring done.
198
198
  - Surgery committed with message format `refactor(<module>): <pattern> — <description>`
199
199
  - journal updated with module health delta and remaining work
200
200
 
201
+ ## Returns
202
+
203
+ | Artifact | Format | Location |
204
+ |----------|--------|----------|
205
+ | Refactored module | Edited source files (max 5) | in-place |
206
+ | Before/after diff | Git diff | via `git diff` |
207
+ | Surgery Report | Markdown | inline |
208
+ | Git commit(s) | Conventional commits | git history |
209
+ | Journal entry | Text | via `journal` L3 |
210
+
201
211
  ## Cost Profile
202
212
 
203
213
  ~3000-6000 tokens input, ~1000-2000 tokens output. Sonnet. One module per session.
214
+
215
+ **Scope guardrail:** surgeon operates on ONE module per session (max 5 files). Any work beyond that scope must be deferred to a separate surgeon session.
@@ -5,7 +5,7 @@ context: fork
5
5
  agent: general-purpose
6
6
  metadata:
7
7
  author: runedev
8
- version: "0.5.0"
8
+ version: "0.6.0"
9
9
  layer: L1
10
10
  model: opus
11
11
  group: orchestrator
@@ -66,6 +66,26 @@ Lite Mode Phases:
66
66
 
67
67
  Standard team workflow with worktree isolation (Phases 1-5 as documented below).
68
68
 
69
+ ### Complexity Tiers (DAG Stage Selection)
70
+
71
+ Before decomposing, classify the task into a complexity tier. Each tier defines a different DAG (directed acyclic graph) of stages, ensuring the right amount of process for the task's complexity.
72
+
73
+ | Tier | Signals | DAG Stages | Context Windows |
74
+ |------|---------|------------|-----------------|
75
+ | **Trivial** | ≤3 files, single module, no shared contracts | impl → test | 1 (single cook) |
76
+ | **Medium** | 4-10 files, 2-3 modules, shared interfaces | research → plan → impl → test → review → fix | 3 (plan, impl+test, review+fix) |
77
+ | **Large** | 10+ files, 3+ modules, breaking changes or RFC | research → plan → impl → test → review₁ → fix → review₂ → final merge | 4+ (plan, impl+test, review₁+fix, review₂+merge) |
78
+
79
+ **Key principle — reviewer isolation**: The agent that writes code MUST NOT review its own code. Each review stage uses a **separate context window** (separate Task invocation) that has never seen the implementation reasoning. This prevents author bias from contaminating the review.
80
+
81
+ **Stage → Context Window mapping**:
82
+ - `research + plan` = Context Window 1 (opus — architectural reasoning)
83
+ - `impl + test` = Context Window 2 (sonnet — code writing)
84
+ - `review₁ + fix` = Context Window 3 (sonnet — fresh eyes, no impl context)
85
+ - `review₂ + merge` = Context Window 4 (sonnet — final verification, Large tier only)
86
+
87
+ **Merge queue**: When multiple streams complete at different times, use dependency order for merging. If a later stream's merge creates conflicts with an already-merged stream, provide the conflicting stream's cook report as **conflict context** to the resolution agent — never resolve blindly.
88
+
69
89
  ## Calls (outbound)
70
90
 
71
91
  - `plan` (L2): high-level task decomposition into independent workstreams
@@ -78,6 +98,7 @@ Standard team workflow with worktree isolation (Phases 1-5 as documented below).
78
98
  - `completion-gate` (L3): validate workstream completion claims against evidence
79
99
  - `constraint-check` (L3): audit HARD-GATE compliance across parallel streams
80
100
  - `worktree` (L3): create isolated worktrees for parallel cook instances
101
+ - `context-pack` (L3): create structured handoff briefings before spawning subagents
81
102
  - L4 extension packs: domain-specific patterns when context matches (e.g., @rune/mobile when porting web to mobile)
82
103
 
83
104
  ## Called By (inbound)
@@ -433,6 +454,16 @@ Dependent streams → SEQUENTIAL (respecting dependency order)
433
454
  All streams done → MERGE sequentially (avoid conflicts)
434
455
  ```
435
456
 
457
+ ## Returns
458
+
459
+ | Artifact | Format | Location |
460
+ |----------|--------|----------|
461
+ | Workstream assignments | Markdown (inline) | NEXUS Handoff Templates emitted per stream |
462
+ | Cook Reports (per stream) | Markdown (inline) | Collected from each parallel cook instance |
463
+ | Merged implementation | Source files | `main` branch after Phase 4 merge |
464
+ | Integration test results | Inline stdout | Captured in Phase 5 verify |
465
+ | Team Report | Markdown (inline) | Emitted at end of session |
466
+
436
467
  ## Sharp Edges
437
468
 
438
469
  Known failure modes for this skill. Check these before declaring done.
@@ -464,3 +495,5 @@ Known failure modes for this skill. Check these before declaring done.
464
495
  ## Cost Profile
465
496
 
466
497
  ~$0.20-0.50 per session. Opus for coordination. Most expensive orchestrator but handles largest tasks.
498
+
499
+ **Scope guardrail**: Do not invoke launch, rescue, or scaffold autonomously unless explicitly delegated by the parent agent.