@rune-kit/rune 2.2.6 → 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 (69) hide show
  1. package/README.md +1 -1
  2. package/docs/SKILL-TEMPLATE.md +15 -0
  3. package/docs/index.html +76 -7
  4. package/docs/script.js +33 -6
  5. package/docs/style.css +62 -0
  6. package/package.json +7 -5
  7. package/skills/adversary/SKILL.md +12 -0
  8. package/skills/audit/SKILL.md +63 -1
  9. package/skills/autopsy/SKILL.md +12 -0
  10. package/skills/ba/SKILL.md +9 -0
  11. package/skills/brainstorm/SKILL.md +11 -0
  12. package/skills/completion-gate/SKILL.md +15 -1
  13. package/skills/context-engine/SKILL.md +83 -1
  14. package/skills/context-pack/SKILL.md +160 -0
  15. package/skills/cook/SKILL.md +657 -958
  16. package/skills/cook/references/deviation-rules.md +19 -0
  17. package/skills/cook/references/error-recovery.md +37 -0
  18. package/skills/cook/references/exit-conditions.md +31 -0
  19. package/skills/cook/references/loop-detection.md +39 -0
  20. package/skills/cook/references/mid-run-signals.md +31 -0
  21. package/skills/cook/references/output-format.md +40 -0
  22. package/skills/cook/references/pack-detection.md +82 -0
  23. package/skills/cook/references/pause-resume-template.md +38 -0
  24. package/skills/cook/references/rfc-template.md +52 -0
  25. package/skills/cook/references/sharp-edges.md +24 -0
  26. package/skills/cook/references/subagent-status.md +38 -0
  27. package/skills/db/SKILL.md +12 -0
  28. package/skills/debug/SKILL.md +34 -2
  29. package/skills/deploy/SKILL.md +10 -0
  30. package/skills/design/SKILL.md +9 -0
  31. package/skills/docs/SKILL.md +12 -0
  32. package/skills/docs-seeker/SKILL.md +11 -0
  33. package/skills/fix/SKILL.md +36 -3
  34. package/skills/incident/SKILL.md +10 -0
  35. package/skills/launch/SKILL.md +12 -0
  36. package/skills/logic-guardian/SKILL.md +11 -0
  37. package/skills/marketing/SKILL.md +13 -0
  38. package/skills/mcp-builder/SKILL.md +13 -0
  39. package/skills/onboard/SKILL.md +54 -2
  40. package/skills/perf/SKILL.md +11 -0
  41. package/skills/plan/SKILL.md +342 -688
  42. package/skills/plan/references/completeness-scoring.md +37 -0
  43. package/skills/plan/references/outcome-block.md +41 -0
  44. package/skills/plan/references/plan-templates.md +193 -0
  45. package/skills/plan/references/wave-planning.md +44 -0
  46. package/skills/plan/references/workflow-registry.md +53 -0
  47. package/skills/preflight/SKILL.md +86 -1
  48. package/skills/rescue/SKILL.md +10 -0
  49. package/skills/retro/SKILL.md +11 -0
  50. package/skills/review/SKILL.md +100 -1
  51. package/skills/review-intake/SKILL.md +11 -0
  52. package/skills/safeguard/SKILL.md +12 -0
  53. package/skills/scaffold/SKILL.md +10 -0
  54. package/skills/scope-guard/SKILL.md +11 -0
  55. package/skills/scout/SKILL.md +9 -0
  56. package/skills/sentinel/SKILL.md +307 -425
  57. package/skills/sentinel/references/config-protection.md +52 -0
  58. package/skills/sentinel/references/destructive-commands.md +40 -0
  59. package/skills/sentinel/references/domain-hooks.md +73 -0
  60. package/skills/sentinel/references/framework-patterns.md +46 -0
  61. package/skills/sentinel/references/owasp-patterns.md +69 -0
  62. package/skills/sentinel/references/secret-patterns.md +40 -0
  63. package/skills/sentinel/references/skill-content-guard.md +55 -0
  64. package/skills/session-bridge/SKILL.md +60 -2
  65. package/skills/skill-forge/SKILL.md +47 -2
  66. package/skills/skill-router/SKILL.md +33 -1
  67. package/skills/surgeon/SKILL.md +12 -0
  68. package/skills/team/SKILL.md +35 -1
  69. package/skills/test/SKILL.md +167 -1
@@ -0,0 +1,160 @@
1
+ ---
2
+ name: context-pack
3
+ description: "Creates structured handoff briefings between agents. Packages task context, constraints, and progress into a compact packet that subagents can consume without re-reading the full conversation. Prevents the 'lost context' problem in multi-agent delegation."
4
+ user-invocable: false
5
+ metadata:
6
+ author: runedev
7
+ version: "0.1.0"
8
+ layer: L3
9
+ model: haiku
10
+ group: state
11
+ tools: "Read, Glob, Grep"
12
+ ---
13
+
14
+ # context-pack
15
+
16
+ ## Purpose
17
+
18
+ When a parent agent delegates work to a subagent, critical context gets lost — the subagent starts fresh without knowing what was tried, what failed, what constraints apply, or what the parent already decided. Context-pack solves this by creating structured handoff briefings (context packets) that compress the essential information into a compact, parseable format. The packet is small enough to fit in a subagent's system prompt but complete enough to prevent redundant work and constraint violations.
19
+
20
+ ## Triggers
21
+
22
+ - Called by `cook`, `team`, `rescue` before spawning subagents
23
+ - Called by any L1/L2 skill that delegates work to another skill
24
+ - Manual: when user says "hand off", "delegate", "split this task"
25
+
26
+ ## Calls (outbound)
27
+
28
+ - `session-bridge` (L3): read persisted state for inclusion in packet
29
+ - `context-engine` (L3): check current context budget before deciding packet size
30
+
31
+ ## Called By (inbound)
32
+
33
+ - `cook` (L1): before Phase 2-5 subagent spawning
34
+ - `team` (L1): before dispatching parallel workstreams
35
+ - `rescue` (L1): before delegating module-level refactoring
36
+ - `scaffold` (L1): before delegating component generation
37
+ - Any L2 skill that spawns subagents
38
+
39
+ ## Data Flow
40
+
41
+ ### Feeds Into →
42
+
43
+ - All subagent invocations: context packet → subagent system prompt
44
+ - `completion-gate` (L3): packet's success criteria → claim validation baseline
45
+
46
+ ### Fed By ←
47
+
48
+ - Parent agent conversation: decisions, constraints, failed attempts
49
+ - `session-bridge` (L3): persisted state from prior sessions
50
+ - `plan` (L2): phase files with task breakdowns
51
+
52
+ ## Workflow
53
+
54
+ 1. **COLLECT** — Gather context from the current conversation:
55
+ - Task description and user intent
56
+ - Decisions already made (and WHY)
57
+ - Constraints and hard-stops
58
+ - Failed attempts (what NOT to do)
59
+ - Files already read or modified
60
+ - Current progress state
61
+
62
+ 2. **COMPRESS** — Reduce to essential information:
63
+ - Strip conversational noise
64
+ - Deduplicate repeated context
65
+ - Prioritize by relevance to the delegated task
66
+ - Target: <500 tokens for simple tasks, <1500 tokens for complex
67
+
68
+ 3. **STRUCTURE** — Format as a context packet (see Output Format)
69
+
70
+ 4. **VALIDATE** — Check packet completeness:
71
+ - Does it include the task goal?
72
+ - Does it include constraints that could cause failure?
73
+ - Does it include what was already tried?
74
+ - Is it small enough for the target agent's context budget?
75
+
76
+ ## Output Format
77
+
78
+ ```markdown
79
+ ## Context Packet
80
+
81
+ **Task**: [One-line description of what the subagent must do]
82
+ **Parent**: [Which skill/agent is delegating]
83
+ **Scope**: [Specific files, modules, or boundaries]
84
+
85
+ ### Decisions Made
86
+ - [Decision 1]: [choice] — because [reason]
87
+ - [Decision 2]: [choice] — because [reason]
88
+
89
+ ### Constraints
90
+ - MUST: [requirement 1]
91
+ - MUST NOT: [prohibition 1]
92
+ - BLOCKED BY: [dependency, if any]
93
+
94
+ ### Already Tried
95
+ - [Approach that failed] — [why it failed]
96
+
97
+ ### Files Touched
98
+ - `path/to/file.ts` — [what was done / what needs doing]
99
+
100
+ ### Success Criteria
101
+ - [ ] [Verifiable criterion 1]
102
+ - [ ] [Verifiable criterion 2]
103
+
104
+ ### Progress
105
+ - [What's done so far, if partial handoff]
106
+ ```
107
+
108
+ ## Returns
109
+
110
+ | Field | Type | Description |
111
+ |-------|------|-------------|
112
+ | `packet` | markdown | Structured context packet ready for subagent injection |
113
+ | `token_estimate` | number | Estimated token count of the packet |
114
+ | `completeness` | enum | `full` / `partial` / `minimal` — how much context was captured |
115
+ | `warnings` | string[] | Missing context that could cause subagent failure |
116
+
117
+ ## Constraints
118
+
119
+ 1. MUST include task goal and success criteria — subagent needs to know when it's done
120
+ 2. MUST include failed attempts — prevents subagent from repeating mistakes
121
+ 3. MUST include hard-stop constraints — prevents constraint violations in delegated work
122
+ 4. MUST NOT exceed 2000 tokens — context packets that are too large defeat the purpose
123
+ 5. MUST NOT include full file contents — use file paths and summaries instead
124
+ 6. MUST NOT fabricate context — only include information from the actual conversation
125
+
126
+ ## Sharp Edges
127
+
128
+ | Failure Mode | Severity | Mitigation |
129
+ |---|---|---|
130
+ | Packet too large (>2000 tokens) | HIGH | Compress aggressively — file paths not contents, decisions not discussions |
131
+ | Missing constraint causes subagent violation | CRITICAL | Always scan for MUST/MUST NOT in parent conversation |
132
+ | Stale context from prior session included | MEDIUM | Cross-check session-bridge state with current files |
133
+ | Over-constraining subagent with parent's approach | MEDIUM | Include constraints and goals, not implementation approach (unless approach is the constraint) |
134
+
135
+ ## Self-Validation
136
+
137
+ ```
138
+ SELF-VALIDATION (run before emitting output):
139
+ - [ ] Packet includes a clear task goal
140
+ - [ ] Packet includes success criteria (verifiable, not vague)
141
+ - [ ] All MUST/MUST NOT constraints from parent are present
142
+ - [ ] Failed attempts are listed (if any exist)
143
+ - [ ] Token estimate is under 2000
144
+ - [ ] No full file contents embedded (paths only)
145
+ IF ANY check fails → fix before reporting done. Do NOT defer to completion-gate.
146
+ ```
147
+
148
+ ## Done When
149
+
150
+ - Context packet emitted in structured format
151
+ - Token estimate calculated and within budget
152
+ - All constraints from parent conversation captured
153
+ - Completeness level assessed honestly
154
+ - Self-Validation checklist: all checks passed
155
+
156
+ ## Cost Profile
157
+
158
+ ~200-500 input tokens (scanning conversation) + ~300-800 output tokens (generating packet). Haiku model — minimal cost per invocation.
159
+
160
+ **Scope guardrail**: Do not implement code changes, run tests, or modify files. Only produce context packets for handoff. If asked to do more, defer to the delegated skill.