@rune-kit/rune 2.1.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.
- package/LICENSE +21 -0
- package/README.md +357 -0
- package/agents/.gitkeep +0 -0
- package/agents/architect.md +29 -0
- package/agents/asset-creator.md +11 -0
- package/agents/audit.md +11 -0
- package/agents/autopsy.md +11 -0
- package/agents/brainstorm.md +11 -0
- package/agents/browser-pilot.md +11 -0
- package/agents/coder.md +29 -0
- package/agents/completion-gate.md +11 -0
- package/agents/constraint-check.md +11 -0
- package/agents/context-engine.md +11 -0
- package/agents/cook.md +11 -0
- package/agents/db.md +11 -0
- package/agents/debug.md +11 -0
- package/agents/dependency-doctor.md +11 -0
- package/agents/deploy.md +11 -0
- package/agents/design.md +11 -0
- package/agents/docs-seeker.md +11 -0
- package/agents/fix.md +11 -0
- package/agents/hallucination-guard.md +11 -0
- package/agents/incident.md +11 -0
- package/agents/integrity-check.md +11 -0
- package/agents/journal.md +11 -0
- package/agents/launch.md +11 -0
- package/agents/logic-guardian.md +11 -0
- package/agents/marketing.md +11 -0
- package/agents/onboard.md +11 -0
- package/agents/perf.md +11 -0
- package/agents/plan.md +11 -0
- package/agents/preflight.md +11 -0
- package/agents/problem-solver.md +11 -0
- package/agents/rescue.md +11 -0
- package/agents/research.md +11 -0
- package/agents/researcher.md +29 -0
- package/agents/review-intake.md +11 -0
- package/agents/review.md +11 -0
- package/agents/reviewer.md +28 -0
- package/agents/safeguard.md +11 -0
- package/agents/sast.md +11 -0
- package/agents/scanner.md +28 -0
- package/agents/scope-guard.md +11 -0
- package/agents/scout.md +11 -0
- package/agents/sentinel.md +11 -0
- package/agents/sequential-thinking.md +11 -0
- package/agents/session-bridge.md +11 -0
- package/agents/skill-forge.md +11 -0
- package/agents/skill-router.md +11 -0
- package/agents/surgeon.md +11 -0
- package/agents/team.md +11 -0
- package/agents/test.md +11 -0
- package/agents/trend-scout.md +11 -0
- package/agents/verification.md +11 -0
- package/agents/video-creator.md +11 -0
- package/agents/watchdog.md +11 -0
- package/agents/worktree.md +11 -0
- package/commands/.gitkeep +0 -0
- package/commands/rune.md +168 -0
- package/compiler/__tests__/openclaw-adapter.test.js +140 -0
- package/compiler/__tests__/parser.test.js +55 -0
- package/compiler/adapters/antigravity.js +59 -0
- package/compiler/adapters/claude.js +37 -0
- package/compiler/adapters/cursor.js +67 -0
- package/compiler/adapters/generic.js +60 -0
- package/compiler/adapters/index.js +45 -0
- package/compiler/adapters/openclaw.js +150 -0
- package/compiler/adapters/windsurf.js +60 -0
- package/compiler/bin/rune.js +288 -0
- package/compiler/doctor.js +153 -0
- package/compiler/emitter.js +240 -0
- package/compiler/parser.js +208 -0
- package/compiler/transformer.js +69 -0
- package/compiler/transforms/branding.js +27 -0
- package/compiler/transforms/cross-references.js +29 -0
- package/compiler/transforms/frontmatter.js +38 -0
- package/compiler/transforms/hooks.js +68 -0
- package/compiler/transforms/subagents.js +36 -0
- package/compiler/transforms/tool-names.js +60 -0
- package/contexts/dev.md +34 -0
- package/contexts/research.md +43 -0
- package/contexts/review.md +55 -0
- package/extensions/ai-ml/PACK.md +517 -0
- package/extensions/analytics/PACK.md +557 -0
- package/extensions/backend/PACK.md +678 -0
- package/extensions/chrome-ext/PACK.md +995 -0
- package/extensions/content/PACK.md +381 -0
- package/extensions/devops/PACK.md +520 -0
- package/extensions/ecommerce/PACK.md +280 -0
- package/extensions/gamedev/PACK.md +393 -0
- package/extensions/mobile/PACK.md +273 -0
- package/extensions/saas/PACK.md +805 -0
- package/extensions/security/PACK.md +536 -0
- package/extensions/trading/PACK.md +597 -0
- package/extensions/ui/PACK.md +947 -0
- package/package.json +47 -0
- package/skills/.gitkeep +0 -0
- package/skills/adversary/SKILL.md +271 -0
- package/skills/asset-creator/SKILL.md +157 -0
- package/skills/audit/SKILL.md +466 -0
- package/skills/autopsy/SKILL.md +200 -0
- package/skills/ba/SKILL.md +279 -0
- package/skills/brainstorm/SKILL.md +266 -0
- package/skills/browser-pilot/SKILL.md +168 -0
- package/skills/completion-gate/SKILL.md +151 -0
- package/skills/constraint-check/SKILL.md +165 -0
- package/skills/context-engine/SKILL.md +176 -0
- package/skills/cook/SKILL.md +636 -0
- package/skills/db/SKILL.md +256 -0
- package/skills/debug/SKILL.md +240 -0
- package/skills/dependency-doctor/SKILL.md +235 -0
- package/skills/deploy/SKILL.md +174 -0
- package/skills/design/DESIGN-REFERENCE.md +365 -0
- package/skills/design/SKILL.md +462 -0
- package/skills/doc-processor/SKILL.md +254 -0
- package/skills/docs/SKILL.md +336 -0
- package/skills/docs-seeker/SKILL.md +166 -0
- package/skills/fix/SKILL.md +192 -0
- package/skills/git/SKILL.md +285 -0
- package/skills/hallucination-guard/SKILL.md +204 -0
- package/skills/incident/SKILL.md +241 -0
- package/skills/integrity-check/SKILL.md +169 -0
- package/skills/journal/SKILL.md +190 -0
- package/skills/launch/SKILL.md +330 -0
- package/skills/logic-guardian/SKILL.md +240 -0
- package/skills/marketing/SKILL.md +229 -0
- package/skills/mcp-builder/SKILL.md +311 -0
- package/skills/onboard/SKILL.md +298 -0
- package/skills/perf/SKILL.md +297 -0
- package/skills/plan/SKILL.md +520 -0
- package/skills/preflight/SKILL.md +231 -0
- package/skills/problem-solver/SKILL.md +284 -0
- package/skills/rescue/SKILL.md +434 -0
- package/skills/research/SKILL.md +122 -0
- package/skills/review/SKILL.md +354 -0
- package/skills/review-intake/SKILL.md +222 -0
- package/skills/safeguard/SKILL.md +188 -0
- package/skills/sast/SKILL.md +190 -0
- package/skills/scaffold/SKILL.md +276 -0
- package/skills/scope-guard/SKILL.md +150 -0
- package/skills/scout/SKILL.md +232 -0
- package/skills/sentinel/SKILL.md +320 -0
- package/skills/sentinel-env/SKILL.md +226 -0
- package/skills/sequential-thinking/SKILL.md +234 -0
- package/skills/session-bridge/SKILL.md +287 -0
- package/skills/skill-forge/SKILL.md +317 -0
- package/skills/skill-router/SKILL.md +267 -0
- package/skills/surgeon/SKILL.md +203 -0
- package/skills/team/SKILL.md +397 -0
- package/skills/test/SKILL.md +271 -0
- package/skills/trend-scout/SKILL.md +145 -0
- package/skills/verification/SKILL.md +201 -0
- package/skills/video-creator/SKILL.md +201 -0
- package/skills/watchdog/SKILL.md +166 -0
- package/skills/worktree/SKILL.md +140 -0
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: sequential-thinking
|
|
3
|
+
description: "Step-by-step complex reasoning for multi-variable problems. Breaks interconnected decisions into ordered logical steps with bias detection, reversibility classification, and second-order effect tracking."
|
|
4
|
+
metadata:
|
|
5
|
+
author: runedev
|
|
6
|
+
version: "0.3.0"
|
|
7
|
+
layer: L3
|
|
8
|
+
model: sonnet
|
|
9
|
+
group: reasoning
|
|
10
|
+
tools: "Read, Glob, Grep"
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# sequential-thinking
|
|
14
|
+
|
|
15
|
+
## Purpose
|
|
16
|
+
|
|
17
|
+
Multi-variable analysis utility for decisions where factors are interdependent and order of reasoning matters. Receives a decision problem, classifies reversibility, detects cognitive biases, maps variable dependencies, processes them in dependency order, checks for second-order effects, and returns a structured decision tree with final recommendation. Stateless — no memory between calls.
|
|
18
|
+
|
|
19
|
+
## Calls (outbound)
|
|
20
|
+
|
|
21
|
+
None — pure L3 reasoning utility.
|
|
22
|
+
|
|
23
|
+
## Called By (inbound)
|
|
24
|
+
|
|
25
|
+
- `debug` (L2): multi-factor bugs with interacting causes
|
|
26
|
+
- `plan` (L2): complex architecture with many trade-offs
|
|
27
|
+
- `brainstorm` (L2): evaluating approaches with many variables
|
|
28
|
+
|
|
29
|
+
## When to Use
|
|
30
|
+
|
|
31
|
+
Invoke this skill when:
|
|
32
|
+
- The decision has more than 3 interacting variables
|
|
33
|
+
- Choosing option A changes what options are valid for B and C
|
|
34
|
+
- Architecture decisions have cascading downstream effects
|
|
35
|
+
- Trade-off analysis where constraints eliminate entire solution branches
|
|
36
|
+
|
|
37
|
+
Do NOT use for simple linear analysis — `problem-solver` is more efficient for single-dimension reasoning.
|
|
38
|
+
|
|
39
|
+
## Execution
|
|
40
|
+
|
|
41
|
+
### Input
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
decision: string — the decision or problem to analyze
|
|
45
|
+
variables: string[] — (optional) pre-identified factors; if omitted, skill identifies them
|
|
46
|
+
constraints: string[] — (optional) hard limits that eliminate options
|
|
47
|
+
goal: string — (optional) success criteria or desired outcome
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
### Step 0 — Reversibility Classification
|
|
51
|
+
|
|
52
|
+
Before investing analytical effort, classify the decision:
|
|
53
|
+
|
|
54
|
+
| Type | Definition | Analytical Effort |
|
|
55
|
+
|------|-----------|-------------------|
|
|
56
|
+
| **Two-way door** | Reversible, can iterate, low switching cost | Decide quickly, set review date. Light analysis. |
|
|
57
|
+
| **One-way door** | Irreversible, high stakes, costly to reverse | Full sequential analysis. Deep reasoning. |
|
|
58
|
+
| **Partially reversible** | Some aspects reversible, some not | Full analysis on irreversible aspects, light on reversible. |
|
|
59
|
+
|
|
60
|
+
If two-way door → streamline: skip Step 4 (second-order) and Step 5 (bias cross-check). State reasoning.
|
|
61
|
+
|
|
62
|
+
### Step 1 — Identify All Variables
|
|
63
|
+
|
|
64
|
+
List every factor that affects the decision. For each variable, record:
|
|
65
|
+
- Name and description
|
|
66
|
+
- Possible values or range
|
|
67
|
+
- Whether it is controllable (we can choose) or fixed (constraint from environment)
|
|
68
|
+
|
|
69
|
+
If the caller provided `variables`, validate and expand the list. If omitted, derive from the decision statement.
|
|
70
|
+
|
|
71
|
+
### Step 2 — Map Dependencies
|
|
72
|
+
|
|
73
|
+
For each pair of variables, determine if a dependency exists:
|
|
74
|
+
- `[A] constrains [B]`: choosing a value for A limits valid values for B
|
|
75
|
+
- `[A] influences [B]`: A affects the cost/benefit calculation for B but does not eliminate options
|
|
76
|
+
- `[A] independent of [B]`: no relationship
|
|
77
|
+
|
|
78
|
+
Document dependencies as: `[Variable A] → [Variable B]: [type and reason]`
|
|
79
|
+
|
|
80
|
+
Identify which variables have the most outbound dependencies — those must be resolved first.
|
|
81
|
+
|
|
82
|
+
### Step 3 — Evaluate in Dependency Order
|
|
83
|
+
|
|
84
|
+
Sort variables from most-constrained (fixed / most depended upon) to least-constrained (free / most flexible). Process in that order:
|
|
85
|
+
|
|
86
|
+
For each variable in sequence:
|
|
87
|
+
- State current known state of all previously resolved variables
|
|
88
|
+
- Evaluate valid options given those constraints
|
|
89
|
+
- Select the best option with explicit reasoning
|
|
90
|
+
- Record the conclusion and how it affects downstream variables
|
|
91
|
+
|
|
92
|
+
Do not jump ahead — each step must reference the conclusions of prior steps.
|
|
93
|
+
|
|
94
|
+
**Running state block** at each step:
|
|
95
|
+
|
|
96
|
+
```
|
|
97
|
+
State after Step N:
|
|
98
|
+
- [Variable A]: resolved to [value] because [reason]
|
|
99
|
+
- [Variable B]: resolved to [value] because [reason]
|
|
100
|
+
- Remaining: [Variable C], [Variable D]
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### Step 4 — Second-Order Effects Check
|
|
104
|
+
|
|
105
|
+
After all variables are resolved, apply second-order thinking:
|
|
106
|
+
|
|
107
|
+
For each resolved variable, ask: **"And then what?"**
|
|
108
|
+
|
|
109
|
+
| Variable | First-Order Effect | Second-Order Effect | Risk Level |
|
|
110
|
+
|----------|-------------------|--------------------|-|
|
|
111
|
+
| [A = value] | [immediate consequence] | [consequence of consequence] | low/medium/high |
|
|
112
|
+
|
|
113
|
+
Flag any second-order effect that:
|
|
114
|
+
- Contradicts the goal stated in the input
|
|
115
|
+
- Creates a feedback loop (reinforcing or balancing)
|
|
116
|
+
- Affects stakeholders not considered in the analysis
|
|
117
|
+
- Would flip a previous variable's optimal value
|
|
118
|
+
|
|
119
|
+
If a dangerous second-order effect is found → revisit the affected variable with this new information.
|
|
120
|
+
|
|
121
|
+
### Step 5 — Bias Cross-Check
|
|
122
|
+
|
|
123
|
+
Check the analysis for the 3 biases most dangerous to multi-variable decisions:
|
|
124
|
+
|
|
125
|
+
| Bias | Detection Question | If Detected |
|
|
126
|
+
|------|-------------------|-------------|
|
|
127
|
+
| **Anchoring** | Did the first variable we resolved disproportionately constrain all others? Would the result differ if we started from a different variable? | Re-evaluate with a different starting variable. Compare results. |
|
|
128
|
+
| **Status Quo** | Did we give an unfair advantage to "keep current approach" for any variable? Would we choose this if starting from scratch? | Evaluate current state with same rigor as alternatives. |
|
|
129
|
+
| **Overconfidence** | How confident are we in each variable's resolution? Are confidence intervals wide enough? | Assign explicit confidence % to each resolution. Flag any > 90% without strong evidence. |
|
|
130
|
+
|
|
131
|
+
If bias is detected → note it in the report and state whether it changes the recommendation.
|
|
132
|
+
|
|
133
|
+
### Step 6 — Synthesize
|
|
134
|
+
|
|
135
|
+
After all variables are resolved and cross-checked:
|
|
136
|
+
- Combine all per-step conclusions into a coherent final recommendation
|
|
137
|
+
- Identify any variables that remained ambiguous — state what additional information would resolve them
|
|
138
|
+
- Assess overall confidence: `high` (all variables resolved cleanly), `medium` (1-2 ambiguous), `low` (major uncertainty remains)
|
|
139
|
+
- Note the reversibility classification from Step 0 — if two-way door, include a review date
|
|
140
|
+
|
|
141
|
+
### Step 7 — Report
|
|
142
|
+
|
|
143
|
+
Return the full decision tree and recommendation in the output format below.
|
|
144
|
+
|
|
145
|
+
## Constraints
|
|
146
|
+
|
|
147
|
+
- Never evaluate variable B before all variables that constrain B are resolved
|
|
148
|
+
- If a dependency cycle is detected, flag it explicitly and break the cycle by treating one variable as a fixed assumption
|
|
149
|
+
- Use Sonnet — reasoning depth and coherence across many steps matters
|
|
150
|
+
- If more than 8 variables are identified, group related ones into composite variables to keep analysis tractable
|
|
151
|
+
- MUST classify reversibility (Step 0) before investing analytical effort
|
|
152
|
+
- MUST check for second-order effects on one-way door decisions
|
|
153
|
+
- MUST run bias cross-check on one-way door decisions
|
|
154
|
+
|
|
155
|
+
## Output Format
|
|
156
|
+
|
|
157
|
+
```
|
|
158
|
+
## Sequential Analysis: [Decision]
|
|
159
|
+
|
|
160
|
+
### Reversibility: [two-way door / one-way door / partially reversible]
|
|
161
|
+
[One sentence reasoning. If two-way: "Light analysis — decide quickly, review in [timeframe]."]
|
|
162
|
+
|
|
163
|
+
### Variables Identified
|
|
164
|
+
| Variable | Possible Values | Type |
|
|
165
|
+
|----------|----------------|------|
|
|
166
|
+
| [A] | [options] | controllable / fixed |
|
|
167
|
+
| [B] | [options] | controllable / fixed |
|
|
168
|
+
|
|
169
|
+
### Dependency Map
|
|
170
|
+
- [A] → [B]: [type] — [reason]
|
|
171
|
+
- [C] → [A]: [type] — [reason]
|
|
172
|
+
|
|
173
|
+
### Step-by-Step Evaluation
|
|
174
|
+
1. **[Variable A]** (no dependencies — evaluate first)
|
|
175
|
+
- Options: [x, y, z]
|
|
176
|
+
- Reasoning: [why one is better given constraints]
|
|
177
|
+
- Conclusion: **[chosen value]** (confidence: X%)
|
|
178
|
+
- State: { A: [value] }
|
|
179
|
+
|
|
180
|
+
2. **[Variable B]** (depends on A = [value])
|
|
181
|
+
- Options remaining: [filtered list]
|
|
182
|
+
- Reasoning: [updated analysis given A's value]
|
|
183
|
+
- Conclusion: **[chosen value]** (confidence: X%)
|
|
184
|
+
- State: { A: [value], B: [value] }
|
|
185
|
+
|
|
186
|
+
...
|
|
187
|
+
|
|
188
|
+
### Second-Order Effects (one-way door only)
|
|
189
|
+
| Variable | First-Order | Second-Order | Risk |
|
|
190
|
+
|----------|------------|-------------|------|
|
|
191
|
+
| [A] | [effect] | [and then what?] | low/medium/high |
|
|
192
|
+
|
|
193
|
+
### Bias Check
|
|
194
|
+
- ⚠️ [Bias]: [detection result] → [action taken or "not detected"]
|
|
195
|
+
|
|
196
|
+
### Ambiguities
|
|
197
|
+
- [variable or factor that could not be fully resolved, and what information would resolve it]
|
|
198
|
+
|
|
199
|
+
### Final Recommendation
|
|
200
|
+
[synthesized conclusion incorporating all resolved variables, with confidence level]
|
|
201
|
+
|
|
202
|
+
- **Confidence**: high | medium | low
|
|
203
|
+
- **Key assumption**: [the most critical assumption this recommendation depends on]
|
|
204
|
+
- **Review date**: [when to revisit this decision, especially for two-way doors]
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
## Sharp Edges
|
|
208
|
+
|
|
209
|
+
| Failure Mode | Severity | Mitigation |
|
|
210
|
+
|---|---|---|
|
|
211
|
+
| Evaluating variable B before all variables constraining B are resolved | CRITICAL | Dependency order is mandatory — sort by constraint depth first |
|
|
212
|
+
| Dependency cycle detected but not flagged | HIGH | Break cycle by treating one variable as a fixed assumption — flag explicitly |
|
|
213
|
+
| More than 8 variables without grouping | MEDIUM | Group related variables — keep tractable, not exhaustive |
|
|
214
|
+
| Final recommendation missing confidence level | MEDIUM | Confidence (high/medium/low) is required — ambiguities drive confidence down |
|
|
215
|
+
| Full analysis on a two-way door decision | MEDIUM | Step 0 classifies reversibility — two-way doors get light analysis |
|
|
216
|
+
| Ignoring second-order effects on irreversible decisions | HIGH | Step 4 is mandatory for one-way doors — "and then what?" |
|
|
217
|
+
| Anchoring on first variable resolved | MEDIUM | Bias cross-check Step 5 — test if different starting variable changes result |
|
|
218
|
+
| No review date on reversible decisions | LOW | Two-way doors MUST include a review date — iterate, don't commit |
|
|
219
|
+
|
|
220
|
+
## Done When
|
|
221
|
+
|
|
222
|
+
- Reversibility classified (two-way / one-way / partial)
|
|
223
|
+
- All variables identified and typed (controllable vs. fixed)
|
|
224
|
+
- Dependency map documented (A constrains B, C influences D)
|
|
225
|
+
- Variables evaluated in dependency order with running state block and confidence % at each step
|
|
226
|
+
- Second-order effects checked (one-way door decisions)
|
|
227
|
+
- Bias cross-check completed (anchoring, status quo, overconfidence)
|
|
228
|
+
- Ambiguities listed with what information would resolve them
|
|
229
|
+
- Final recommendation emitted with confidence level and review date
|
|
230
|
+
- Sequential Analysis report in output format
|
|
231
|
+
|
|
232
|
+
## Cost Profile
|
|
233
|
+
|
|
234
|
+
~500-1500 tokens input, ~500-1200 tokens output. Sonnet for reasoning depth.
|
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: session-bridge
|
|
3
|
+
description: Universal context persistence across sessions. Auto-saves decisions, conventions, and progress to .rune/ files. Loads state at session start. Use when any skill makes architectural decisions or establishes patterns that must survive session boundaries.
|
|
4
|
+
metadata:
|
|
5
|
+
author: runedev
|
|
6
|
+
version: "0.2.0"
|
|
7
|
+
layer: L3
|
|
8
|
+
model: haiku
|
|
9
|
+
group: state
|
|
10
|
+
tools: "Read, Write, Edit, Glob, Grep"
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# session-bridge
|
|
14
|
+
|
|
15
|
+
## Purpose
|
|
16
|
+
|
|
17
|
+
Solve the #1 developer complaint: context loss across sessions. Session-bridge auto-saves critical context to `.rune/` files in the project directory, and loads them at session start. Every new session knows exactly where the last one left off.
|
|
18
|
+
|
|
19
|
+
## Triggers
|
|
20
|
+
|
|
21
|
+
- Auto-trigger: when an architectural decision is made
|
|
22
|
+
- Auto-trigger: when a convention/pattern is established
|
|
23
|
+
- Auto-trigger: before context compaction
|
|
24
|
+
- Auto-trigger: at session end (stop hook)
|
|
25
|
+
- `/rune status` — manual state check
|
|
26
|
+
|
|
27
|
+
## Calls (outbound)
|
|
28
|
+
|
|
29
|
+
# Exception: L3→L3 coordination (same pattern as hallucination-guard → research)
|
|
30
|
+
- `integrity-check` (L3): verify .rune/ file integrity before loading state
|
|
31
|
+
|
|
32
|
+
## Called By (inbound)
|
|
33
|
+
|
|
34
|
+
- `cook` (L1): auto-save decisions during feature implementation
|
|
35
|
+
- `rescue` (L1): state management throughout refactoring
|
|
36
|
+
- `context-engine` (L3): save state before compaction
|
|
37
|
+
|
|
38
|
+
## State Files Managed
|
|
39
|
+
|
|
40
|
+
```
|
|
41
|
+
.rune/
|
|
42
|
+
├── decisions.md — Architectural decisions log
|
|
43
|
+
├── conventions.md — Established patterns & style
|
|
44
|
+
├── progress.md — Task progress tracker
|
|
45
|
+
└── session-log.md — Brief log of each session
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Execution
|
|
49
|
+
|
|
50
|
+
### Save Mode (end of session or pre-compaction)
|
|
51
|
+
|
|
52
|
+
#### Step 1 — Gather state
|
|
53
|
+
|
|
54
|
+
Collect from the current session:
|
|
55
|
+
- All architectural or technology choices made (language, library, approach)
|
|
56
|
+
- Conventions established (naming patterns, file structure, coding style)
|
|
57
|
+
- Tasks completed, in-progress, and blocked
|
|
58
|
+
- A one-paragraph summary of what this session accomplished
|
|
59
|
+
|
|
60
|
+
**Python project context** (if `pyproject.toml` or `setup.py` detected):
|
|
61
|
+
- Python version (from `.python-version`, `pyproject.toml` `requires-python`, or `python --version`)
|
|
62
|
+
- Virtual environment path and type (venv, poetry, uv, conda)
|
|
63
|
+
- Installed optional dependency groups (e.g., `[dev]`, `[test]`, `[embeddings]`)
|
|
64
|
+
- Last mypy error count (from most recent verification run, if available)
|
|
65
|
+
- Last test coverage percentage (from most recent test run, if available)
|
|
66
|
+
- DB migration version (if alembic, django migrations, or similar detected)
|
|
67
|
+
|
|
68
|
+
#### Step 2 — Update .rune/decisions.md
|
|
69
|
+
|
|
70
|
+
Use `Glob` to check if `.rune/decisions.md` exists. If not, use `Write` to create it with a `# Decisions Log` header.
|
|
71
|
+
|
|
72
|
+
For each architectural decision from this session, use `Edit` to append to `.rune/decisions.md`:
|
|
73
|
+
|
|
74
|
+
```markdown
|
|
75
|
+
## [YYYY-MM-DD HH:MM] Decision: <title>
|
|
76
|
+
|
|
77
|
+
**Context:** Why this decision was needed
|
|
78
|
+
**Decision:** What was decided
|
|
79
|
+
**Rationale:** Why this approach over alternatives
|
|
80
|
+
**Impact:** What files/modules are affected
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
#### Step 3 — Update .rune/conventions.md
|
|
84
|
+
|
|
85
|
+
Use `Glob` to check if `.rune/conventions.md` exists. If not, use `Write` to create it with a `# Conventions` header.
|
|
86
|
+
|
|
87
|
+
For each pattern or convention established, use `Edit` to append to `.rune/conventions.md`:
|
|
88
|
+
|
|
89
|
+
```markdown
|
|
90
|
+
## [YYYY-MM-DD] Convention: <title>
|
|
91
|
+
|
|
92
|
+
**Pattern:** Description of the convention
|
|
93
|
+
**Example:** Code example showing the pattern
|
|
94
|
+
**Applies to:** Where this convention should be followed
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Python example:
|
|
98
|
+
```markdown
|
|
99
|
+
## [YYYY-MM-DD] Convention: Async-First I/O
|
|
100
|
+
|
|
101
|
+
**Pattern:** All I/O functions use `async def`; blocking calls (`requests`, `open`, `time.sleep`) are forbidden in async modules
|
|
102
|
+
**Example:** `async def fetch_data(): async with httpx.AsyncClient() as client: ...`
|
|
103
|
+
**Applies to:** All modules in `src/` — sync wrappers only in CLI entry points
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
#### Step 4 — Update .rune/progress.md
|
|
107
|
+
|
|
108
|
+
Use `Glob` to check if `.rune/progress.md` exists. If not, use `Write` to create it with a `# Progress` header.
|
|
109
|
+
|
|
110
|
+
Use `Edit` to append the current task status to `.rune/progress.md`:
|
|
111
|
+
|
|
112
|
+
```markdown
|
|
113
|
+
## [YYYY-MM-DD HH:MM] Session Summary
|
|
114
|
+
|
|
115
|
+
**Completed:**
|
|
116
|
+
- [x] Task description
|
|
117
|
+
|
|
118
|
+
**In Progress:**
|
|
119
|
+
- [ ] Task description (step X/Y)
|
|
120
|
+
|
|
121
|
+
**Blocked:**
|
|
122
|
+
- [ ] Task description — reason
|
|
123
|
+
|
|
124
|
+
**Next Session Should:**
|
|
125
|
+
- Start with X
|
|
126
|
+
- Continue Y from step Z
|
|
127
|
+
|
|
128
|
+
**Python Context** (if Python project):
|
|
129
|
+
- Python: [version] ([venv type])
|
|
130
|
+
- Installed extras: [list of optional dependency groups]
|
|
131
|
+
- mypy: [error count] ([strict/normal])
|
|
132
|
+
- Coverage: [percentage]%
|
|
133
|
+
- Migration: [version or N/A]
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
#### Step 5 — Update .rune/session-log.md
|
|
137
|
+
|
|
138
|
+
Use `Glob` to check if `.rune/session-log.md` exists. If not, use `Write` to create it with a `# Session Log` header.
|
|
139
|
+
|
|
140
|
+
Use `Edit` to append a one-line entry to `.rune/session-log.md`:
|
|
141
|
+
|
|
142
|
+
```
|
|
143
|
+
[YYYY-MM-DD HH:MM] — [brief description of session accomplishments]
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
#### Step 6 — Cross-Project Knowledge Extraction (Neural Memory Bridge)
|
|
147
|
+
|
|
148
|
+
Before committing, extract generalizable patterns from this session for cross-project reuse:
|
|
149
|
+
|
|
150
|
+
1. Review the session's decisions, conventions, and completed tasks
|
|
151
|
+
2. Identify 1-3 patterns that are NOT project-specific but would help in OTHER projects:
|
|
152
|
+
- Technology choices with reasoning ("Chose Redis over Memcached because X")
|
|
153
|
+
- Architecture patterns ("Fan-out queue pattern solved Y")
|
|
154
|
+
- Failure modes discovered ("React 19 useEffect cleanup breaks when Z")
|
|
155
|
+
- Performance insights ("N+1 query pattern in Prisma solved by include")
|
|
156
|
+
3. For each generalizable pattern, save to Neural Memory:
|
|
157
|
+
- Use `nmem_remember` with rich cognitive language (causal, comparative, decisional)
|
|
158
|
+
- Tags: `[cross-project, <technology>, <pattern-type>]`
|
|
159
|
+
- Priority: 6-7 (important enough to surface in other projects)
|
|
160
|
+
4. Skip if session was purely project-specific (config changes, bug fixes with no transferable insight)
|
|
161
|
+
|
|
162
|
+
**Why**: This turns every project session into learning that compounds across ALL projects. A pattern discovered in Project A auto-surfaces when Project B faces a similar problem.
|
|
163
|
+
|
|
164
|
+
#### Step 7 — Commit
|
|
165
|
+
|
|
166
|
+
Stage and commit all updated state files:
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
git add .rune/ && git commit -m "chore: update rune session state"
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
If git is not available or the directory is not a repo, skip the commit and emit a warning.
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
### Load Mode (start of session)
|
|
177
|
+
|
|
178
|
+
#### Step 1 — Check existence
|
|
179
|
+
|
|
180
|
+
Use `Glob` to check for `.rune/` directory:
|
|
181
|
+
|
|
182
|
+
```
|
|
183
|
+
Glob pattern: .rune/*.md
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
If no files found: suggest running `/rune onboard` to initialize the project. Exit load mode.
|
|
187
|
+
|
|
188
|
+
#### Step 1.5 — Integrity verification
|
|
189
|
+
|
|
190
|
+
Before loading state files, invoke `integrity-check` (L3) to verify `.rune/` files haven't been tampered:
|
|
191
|
+
|
|
192
|
+
```
|
|
193
|
+
REQUIRED SUB-SKILL: rune:integrity-check
|
|
194
|
+
→ Invoke integrity-check on all .rune/*.md files found in Step 1.
|
|
195
|
+
→ Capture: status (CLEAN | SUSPICIOUS | TAINTED), findings list.
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
Handle results:
|
|
199
|
+
- `CLEAN` → proceed to Step 2 (load files)
|
|
200
|
+
- `SUSPICIOUS` → present warning to user with specific findings. Ask: "Suspicious patterns detected in .rune/ files. Load anyway?" If user approves → proceed. If not → exit load mode.
|
|
201
|
+
- `TAINTED` → **BLOCK load**. Report: ".rune/ integrity check FAILED — possible poisoning detected. Run `/rune integrity` for details."
|
|
202
|
+
|
|
203
|
+
#### Step 2 — Load files
|
|
204
|
+
|
|
205
|
+
Use `Read` on all four state files in parallel:
|
|
206
|
+
|
|
207
|
+
```
|
|
208
|
+
Read: .rune/decisions.md
|
|
209
|
+
Read: .rune/conventions.md
|
|
210
|
+
Read: .rune/progress.md
|
|
211
|
+
Read: .rune/session-log.md
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
#### Step 3 — Summarize
|
|
215
|
+
|
|
216
|
+
Present the loaded context to the agent in a structured summary:
|
|
217
|
+
|
|
218
|
+
> "Here's what happened in previous sessions:"
|
|
219
|
+
> - Last session: [last line from session-log.md]
|
|
220
|
+
> - Key decisions: [last 3 entries from decisions.md]
|
|
221
|
+
> - Active conventions: [count from conventions.md]
|
|
222
|
+
> - Current progress: [in-progress and blocked items from progress.md]
|
|
223
|
+
> - Next task: [first item under "Next Session Should" from progress.md]
|
|
224
|
+
|
|
225
|
+
#### Step 4 — Resume
|
|
226
|
+
|
|
227
|
+
Identify the next concrete task from `progress.md` → "Next Session Should" section. Present it as the recommended starting point to the calling orchestrator.
|
|
228
|
+
|
|
229
|
+
## Output Format
|
|
230
|
+
|
|
231
|
+
### Save Mode
|
|
232
|
+
```
|
|
233
|
+
## Session Bridge — Saved
|
|
234
|
+
- **decisions.md**: [N] decisions appended
|
|
235
|
+
- **conventions.md**: [N] conventions appended
|
|
236
|
+
- **progress.md**: updated (completed/in-progress/blocked counts)
|
|
237
|
+
- **session-log.md**: 1 entry appended
|
|
238
|
+
- **Git commit**: [hash] | skipped (no git)
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
### Load Mode
|
|
242
|
+
```
|
|
243
|
+
## Session Bridge — Loaded
|
|
244
|
+
- **Last session**: [date and summary]
|
|
245
|
+
- **Decisions on file**: [count]
|
|
246
|
+
- **Conventions on file**: [count]
|
|
247
|
+
- **Next task**: [task description]
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
## Constraints
|
|
251
|
+
|
|
252
|
+
1. MUST save decisions, conventions, and progress — not just a status line
|
|
253
|
+
2. MUST verify saved context can be loaded in a fresh session — test the round-trip
|
|
254
|
+
3. MUST NOT overwrite existing bridge data without merging
|
|
255
|
+
|
|
256
|
+
## Sharp Edges
|
|
257
|
+
|
|
258
|
+
Known failure modes for this skill. Check these before declaring done.
|
|
259
|
+
|
|
260
|
+
| Failure Mode | Severity | Mitigation |
|
|
261
|
+
|---|---|---|
|
|
262
|
+
| Overwriting existing .rune/ files instead of appending | HIGH | Constraint 3: use Edit to append entries — never Write to overwrite existing state |
|
|
263
|
+
| Saving only a status line, missing decisions/conventions | HIGH | Constraint 1: all three files (decisions, conventions, progress) must be updated |
|
|
264
|
+
| Load mode presenting stale context without age marker | MEDIUM | Mark each loaded entry with its session date — caller knows how fresh it is |
|
|
265
|
+
| Silent failure when git unavailable | MEDIUM | Note "no git available" in report — do not fail silently or skip without logging |
|
|
266
|
+
| Loading poisoned .rune/ files without verification | CRITICAL | Step 1.5 integrity-check MUST run before loading — TAINTED = block load |
|
|
267
|
+
|
|
268
|
+
## Done When (Save Mode)
|
|
269
|
+
|
|
270
|
+
- decisions.md updated with all architectural decisions made this session
|
|
271
|
+
- conventions.md updated with all new patterns established
|
|
272
|
+
- progress.md updated with completed/in-progress/blocked task status
|
|
273
|
+
- session-log.md appended with one-line session summary
|
|
274
|
+
- Git commit made (or "no git" noted in report)
|
|
275
|
+
- Session Bridge Saved report emitted
|
|
276
|
+
|
|
277
|
+
## Done When (Load Mode)
|
|
278
|
+
|
|
279
|
+
- .rune/*.md files found and read
|
|
280
|
+
- Last session summary presented
|
|
281
|
+
- Current in-progress and blocked tasks identified
|
|
282
|
+
- Next task recommendation from progress.md
|
|
283
|
+
- Session Bridge Loaded report emitted
|
|
284
|
+
|
|
285
|
+
## Cost Profile
|
|
286
|
+
|
|
287
|
+
~100-300 tokens per save. ~500-1000 tokens per load. Always haiku. Negligible cost.
|