@rune-kit/rune 2.8.0 → 2.10.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.
- package/README.md +66 -34
- package/agents/adversary.md +27 -0
- package/agents/architect.md +19 -29
- package/agents/asset-creator.md +18 -4
- package/agents/audit.md +25 -4
- package/agents/autopsy.md +19 -4
- package/agents/ba.md +35 -0
- package/agents/brainstorm.md +31 -4
- package/agents/browser-pilot.md +21 -4
- package/agents/coder.md +21 -29
- package/agents/completion-gate.md +20 -4
- package/agents/constraint-check.md +18 -4
- package/agents/context-engine.md +22 -4
- package/agents/context-pack.md +32 -0
- package/agents/cook.md +41 -4
- package/agents/db.md +19 -4
- package/agents/debug.md +33 -4
- package/agents/dependency-doctor.md +20 -4
- package/agents/deploy.md +27 -4
- package/agents/design.md +22 -4
- package/agents/doc-processor.md +27 -0
- package/agents/docs-seeker.md +19 -4
- package/agents/docs.md +31 -0
- package/agents/fix.md +37 -4
- package/agents/git.md +29 -0
- package/agents/hallucination-guard.md +20 -4
- package/agents/incident.md +21 -4
- package/agents/integrity-check.md +18 -4
- package/agents/journal.md +19 -4
- package/agents/launch.md +32 -4
- package/agents/logic-guardian.md +26 -11
- package/agents/marketing.md +23 -4
- package/agents/mcp-builder.md +26 -0
- package/agents/neural-memory.md +30 -0
- package/agents/onboard.md +22 -4
- package/agents/perf.md +21 -4
- package/agents/plan.md +29 -4
- package/agents/preflight.md +22 -4
- package/agents/problem-solver.md +20 -4
- package/agents/rescue.md +23 -4
- package/agents/research.md +19 -4
- package/agents/researcher.md +19 -29
- package/agents/retro.md +32 -0
- package/agents/review-intake.md +20 -4
- package/agents/review.md +32 -4
- package/agents/reviewer.md +20 -28
- package/agents/safeguard.md +19 -4
- package/agents/sast.md +18 -4
- package/agents/scaffold.md +41 -0
- package/agents/scanner.md +19 -28
- package/agents/scope-guard.md +18 -4
- package/agents/scout.md +23 -4
- package/agents/sentinel-env.md +26 -0
- package/agents/sentinel.md +33 -4
- package/agents/sequential-thinking.md +20 -4
- package/agents/session-bridge.md +24 -4
- package/agents/skill-forge.md +22 -4
- package/agents/skill-router.md +26 -4
- package/agents/slides.md +24 -0
- package/agents/surgeon.md +19 -4
- package/agents/team.md +30 -4
- package/agents/test.md +36 -4
- package/agents/trend-scout.md +17 -4
- package/agents/verification.md +20 -4
- package/agents/video-creator.md +20 -4
- package/agents/watchdog.md +19 -4
- package/agents/worktree.md +17 -4
- package/compiler/__tests__/analytics.test.js +370 -0
- package/compiler/adapters/openclaw.js +2 -2
- package/compiler/analytics.js +385 -0
- package/compiler/bin/rune.js +68 -2
- package/compiler/dashboard.js +883 -0
- package/compiler/transforms/branding.js +1 -1
- package/extensions/ui/skills/animation-patterns.md +21 -0
- package/extensions/ui/skills/component-patterns.md +25 -0
- package/extensions/ui/skills/landing-patterns.md +1 -1
- package/hooks/context-watch/index.cjs +95 -68
- package/hooks/metrics-collector/index.cjs +86 -42
- package/hooks/post-session-reflect/index.cjs +41 -5
- package/hooks/session-start/index.cjs +8 -2
- package/package.json +2 -2
- package/skills/audit/SKILL.md +1 -0
- package/skills/autopsy/SKILL.md +78 -2
- package/skills/autopsy/references/repo-analysis-patterns.md +113 -0
- package/skills/ba/SKILL.md +72 -2
- package/skills/brainstorm/SKILL.md +1 -0
- package/skills/cook/SKILL.md +32 -3
- package/skills/cook/references/output-format.md +33 -0
- package/skills/db/SKILL.md +1 -0
- package/skills/debug/SKILL.md +23 -1
- package/skills/deploy/SKILL.md +1 -1
- package/skills/design/SKILL.md +110 -3
- package/skills/docs/SKILL.md +2 -1
- package/skills/fix/SKILL.md +23 -1
- package/skills/graft/SKILL.md +352 -0
- package/skills/graft/references/challenge-framework.md +98 -0
- package/skills/graft/references/mode-decision.md +44 -0
- package/skills/incident/SKILL.md +2 -0
- package/skills/journal/SKILL.md +2 -0
- package/skills/launch/SKILL.md +2 -0
- package/skills/marketing/SKILL.md +46 -2
- package/skills/mcp-builder/SKILL.md +3 -1
- package/skills/mcp-builder/references/auto-discovery-pattern.md +169 -0
- package/skills/plan/SKILL.md +60 -2
- package/skills/plan/references/feature-map.md +84 -0
- package/skills/preflight/SKILL.md +20 -1
- package/skills/rescue/SKILL.md +25 -1
- package/skills/retro/SKILL.md +2 -0
- package/skills/review/SKILL.md +55 -2
- package/skills/scaffold/SKILL.md +1 -0
- package/skills/scope-guard/SKILL.md +35 -17
- package/skills/sentinel/SKILL.md +29 -1
- package/skills/session-bridge/SKILL.md +155 -9
- package/skills/skill-forge/SKILL.md +43 -1
- package/skills/skill-router/{skill.md → SKILL.md} +27 -2
- package/skills/team/SKILL.md +24 -1
- package/skills/test/SKILL.md +29 -2
- package/skills/verification/SKILL.md +1 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: scope-guard
|
|
3
|
-
description: "Detects scope creep. Auto-triggered by L1 orchestrators when files exceed the original plan. Compares
|
|
3
|
+
description: "Detects scope creep by quantifying drift percentage. Auto-triggered by L1 orchestrators when files exceed the original plan. Compares git changes against plan, classifies drift into 4 tiers: ON_TRACK, MINOR_DRIFT, SIGNIFICANT_DRIFT, OUT_OF_CONTROL."
|
|
4
4
|
user-invocable: false
|
|
5
5
|
metadata:
|
|
6
6
|
author: runedev
|
|
7
|
-
version: "0.
|
|
7
|
+
version: "0.4.0"
|
|
8
8
|
layer: L3
|
|
9
9
|
model: haiku
|
|
10
10
|
group: monitoring
|
|
@@ -73,13 +73,28 @@ Rules for OUT_OF_SCOPE (counts as creep):
|
|
|
73
73
|
- New dependencies added without a planned feature requiring them
|
|
74
74
|
- Documentation files for unplanned features
|
|
75
75
|
|
|
76
|
-
### Step 4:
|
|
76
|
+
### Step 4: Quantify Drift
|
|
77
77
|
|
|
78
|
-
|
|
79
|
-
- List each out-of-scope file with the reason it is flagged
|
|
80
|
-
- Classify as: `MINOR CREEP` (1-2 unplanned files) or `SIGNIFICANT CREEP` (3+ unplanned files)
|
|
78
|
+
Compute **Drift Percentage** — the ratio of out-of-scope changes to total changes:
|
|
81
79
|
|
|
82
|
-
|
|
80
|
+
```
|
|
81
|
+
drift_pct = (out_of_scope_files / total_files_changed) × 100
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Classify drift into a 4-tier system:
|
|
85
|
+
|
|
86
|
+
| Drift % | Level | Status | Action |
|
|
87
|
+
|---------|-------|--------|--------|
|
|
88
|
+
| **< 10%** | ON TRACK | `ON_TRACK` | No action needed. Proceed normally. |
|
|
89
|
+
| **10-25%** | MINOR DRIFT | `MINOR_DRIFT` | Flag out-of-scope files. Suggest trim or acknowledge as intentional. Continue. |
|
|
90
|
+
| **25-50%** | SIGNIFICANT DRIFT | `SIGNIFICANT_DRIFT` | **Pause recommended.** Present drift report to user. Re-scope before continuing. |
|
|
91
|
+
| **> 50%** | OUT OF CONTROL | `OUT_OF_CONTROL` | **Block.** More unplanned work than planned. Escalate to orchestrator. Require re-alignment before ANY further work. |
|
|
92
|
+
|
|
93
|
+
**Edge case**: If total planned files = 0 (no plan loaded), use file count thresholds instead:
|
|
94
|
+
- 0 out-of-scope → ON_TRACK
|
|
95
|
+
- 1-2 out-of-scope → MINOR_DRIFT
|
|
96
|
+
- 3-5 out-of-scope → SIGNIFICANT_DRIFT
|
|
97
|
+
- 6+ out-of-scope → OUT_OF_CONTROL
|
|
83
98
|
|
|
84
99
|
### Step 5: Report
|
|
85
100
|
|
|
@@ -91,7 +106,8 @@ Output the following structure:
|
|
|
91
106
|
- **Planned files**: [count from plan]
|
|
92
107
|
- **Actual files changed**: [count from git diff]
|
|
93
108
|
- **Out-of-scope files**: [count]
|
|
94
|
-
- **
|
|
109
|
+
- **Drift**: [X]% ([level])
|
|
110
|
+
- **Status**: ON_TRACK | MINOR_DRIFT | SIGNIFICANT_DRIFT | OUT_OF_CONTROL
|
|
95
111
|
|
|
96
112
|
### In-Scope Changes
|
|
97
113
|
- [file] — [matches planned task]
|
|
@@ -100,9 +116,10 @@ Output the following structure:
|
|
|
100
116
|
- [file] — [reason: unplanned feature | unrelated refactor | unplanned dep]
|
|
101
117
|
|
|
102
118
|
### Recommendations
|
|
103
|
-
- [
|
|
104
|
-
- [
|
|
105
|
-
- [
|
|
119
|
+
- [ON_TRACK]: No action needed. Proceed.
|
|
120
|
+
- [MINOR_DRIFT]: Review [file] — consider reverting or acknowledging as intentional.
|
|
121
|
+
- [SIGNIFICANT_DRIFT]: PAUSE. Drift is [X]%. Re-align scope with original plan. Suggested cuts: [files to revert]
|
|
122
|
+
- [OUT_OF_CONTROL]: STOP. [X]% of changes are unplanned — more drift than planned work. Present full report to user/orchestrator. Do NOT continue until re-scoped.
|
|
106
123
|
```
|
|
107
124
|
|
|
108
125
|
## Output Format
|
|
@@ -110,14 +127,15 @@ Output the following structure:
|
|
|
110
127
|
```
|
|
111
128
|
## Scope Report
|
|
112
129
|
- Planned files: 3 | Actual: 5 | Out-of-scope: 2
|
|
113
|
-
-
|
|
130
|
+
- Drift: 40% (SIGNIFICANT_DRIFT)
|
|
114
131
|
|
|
115
132
|
### Out-of-Scope Changes
|
|
116
133
|
- src/components/NewWidget.tsx — unplanned feature
|
|
117
134
|
- docs/new-feature.md — documentation for unplanned feature
|
|
118
135
|
|
|
119
136
|
### Recommendations
|
|
120
|
-
-
|
|
137
|
+
- PAUSE. Drift is 40%. Re-align scope with original plan.
|
|
138
|
+
- Suggested cuts: revert src/components/NewWidget.tsx + docs/new-feature.md (reduces drift to 0%)
|
|
121
139
|
```
|
|
122
140
|
|
|
123
141
|
## Constraints
|
|
@@ -134,7 +152,7 @@ Known failure modes for this skill. Check these before declaring done.
|
|
|
134
152
|
|---|---|---|
|
|
135
153
|
| Classifying test files for planned code as out-of-scope | MEDIUM | Test files for planned source files are always IN_SCOPE — natural dependency |
|
|
136
154
|
| Classifying lock file changes as out-of-scope | LOW | package-lock.json, yarn.lock, Cargo.lock are always IN_SCOPE |
|
|
137
|
-
|
|
|
155
|
+
| Over-escalating drift (e.g., 1 extra file = OUT_OF_CONTROL) | LOW | Use drift percentage, not gut feeling. 1 extra file out of 10 = 10% = MINOR_DRIFT, not panic |
|
|
138
156
|
| Plan not loadable (no TodoWrite, no progress.md) | MEDIUM | Ask calling skill for plan as text description before proceeding |
|
|
139
157
|
| Scope check against plan but not against stated intent | MEDIUM | Plan-based scope guard catches file drift; review Step 6.6 (Scope Drift Detection) catches intent drift. Both should run for full coverage |
|
|
140
158
|
|
|
@@ -143,14 +161,14 @@ Known failure modes for this skill. Check these before declaring done.
|
|
|
143
161
|
- Plan loaded from TodoWrite active tasks or .rune/progress.md
|
|
144
162
|
- git diff --stat and --cached output parsed for all changed files
|
|
145
163
|
- Each changed file classified IN_SCOPE or OUT_OF_SCOPE with reasoning
|
|
146
|
-
-
|
|
147
|
-
- Scope Report emitted with recommendations
|
|
164
|
+
- Drift percentage computed and classified (ON_TRACK / MINOR_DRIFT / SIGNIFICANT_DRIFT / OUT_OF_CONTROL)
|
|
165
|
+
- Scope Report emitted with drift %, level, and actionable recommendations
|
|
148
166
|
|
|
149
167
|
## Returns
|
|
150
168
|
|
|
151
169
|
| Artifact | Format | Location |
|
|
152
170
|
|----------|--------|----------|
|
|
153
|
-
| Scope Report | Markdown (
|
|
171
|
+
| Scope Report | Markdown (drift %, 4-tier level, recommendations) | inline |
|
|
154
172
|
| In-scope file list | Classified list | inline |
|
|
155
173
|
| Out-of-scope drift report | File list with reasons | inline |
|
|
156
174
|
| Recommendations | Actionable list | inline |
|
package/skills/sentinel/SKILL.md
CHANGED
|
@@ -3,7 +3,7 @@ name: sentinel
|
|
|
3
3
|
description: Automated security gatekeeper. Blocks unsafe code before commit — secret scanning, OWASP top 10, dependency audit, permission checks. A GATE, not a suggestion.
|
|
4
4
|
metadata:
|
|
5
5
|
author: runedev
|
|
6
|
-
version: "0.
|
|
6
|
+
version: "1.0.0"
|
|
7
7
|
layer: L2
|
|
8
8
|
model: sonnet
|
|
9
9
|
group: quality
|
|
@@ -198,6 +198,34 @@ If `.rune/contract.md` exists, validate staged changes against project contract
|
|
|
198
198
|
|
|
199
199
|
If `.rune/contract.md` does not exist, skip and log INFO: "no project contract, contract validation skipped".
|
|
200
200
|
|
|
201
|
+
### Step 4.87 — Config Leak Threshold Detection
|
|
202
|
+
|
|
203
|
+
Detect when agent output or code changes accidentally expose internal configuration files, skill definitions, or sensitive project structure to end users.
|
|
204
|
+
|
|
205
|
+
**Why**: Agents processing SKILL.md, CLAUDE.md, `.rune/` files may copy-paste internal content into user-facing output (chat responses, generated docs, UI strings). This leaks architecture details, security rules, and proprietary skill content.
|
|
206
|
+
|
|
207
|
+
**Detection patterns** (scan agent output + staged files):
|
|
208
|
+
|
|
209
|
+
| Pattern | What to Detect | Severity |
|
|
210
|
+
|---------|---------------|----------|
|
|
211
|
+
| **Internal file exposure** | 3+ distinct internal file names mentioned in plain text (not code blocks): `CLAUDE.md`, `SKILL.md`, `PACK.md`, `.rune/contract.md`, `.rune/runbook.md` | WARN |
|
|
212
|
+
| **Skill content leak** | Verbatim SKILL.md content (>50 chars) appearing in user-facing strings, README, or generated docs | BLOCK |
|
|
213
|
+
| **Config path exposure** | Absolute paths containing user home directory (`/Users/`, `C:\Users\`) in committed code or output | WARN |
|
|
214
|
+
| **Environment variable dump** | `process.env` or `os.environ` iterated/serialized without filtering (exposes all env vars) | BLOCK |
|
|
215
|
+
| **Debug config in production** | `DEBUG=true`, `LOG_LEVEL=debug`, `NODE_ENV=development` in committed config files | WARN |
|
|
216
|
+
| **Connection string patterns** | Strings matching `://user:pass@host` or `mongodb+srv://` or `postgres://` in non-.env files | BLOCK |
|
|
217
|
+
|
|
218
|
+
**Threshold rules:**
|
|
219
|
+
- Single mention of an internal file name → PASS (could be legitimate reference)
|
|
220
|
+
- 3+ distinct internal file names in one output → WARN: "Agent may be leaking internal config"
|
|
221
|
+
- Any SKILL.md verbatim content in user-facing code → BLOCK: "Skill content leaked to output"
|
|
222
|
+
|
|
223
|
+
**Exclusions** (prevent false positives):
|
|
224
|
+
- Code blocks in architecture docs (legitimate documentation)
|
|
225
|
+
- References inside other SKILL.md files (internal cross-references)
|
|
226
|
+
- Test fixtures explicitly testing config handling
|
|
227
|
+
- `.env.example` files (intentionally public)
|
|
228
|
+
|
|
201
229
|
### Step 4.86 — Organization Policy Enforcement (Business)
|
|
202
230
|
|
|
203
231
|
If `.rune/org/org.md` exists, load organization security policies and enforce them as additional gates.
|
|
@@ -3,12 +3,12 @@ name: session-bridge
|
|
|
3
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
4
|
metadata:
|
|
5
5
|
author: runedev
|
|
6
|
-
version: "0.
|
|
6
|
+
version: "0.6.0"
|
|
7
7
|
layer: L3
|
|
8
8
|
model: haiku
|
|
9
9
|
group: state
|
|
10
10
|
tools: "Read, Write, Edit, Glob, Grep"
|
|
11
|
-
listen: phase.complete
|
|
11
|
+
listen: phase.complete, checkpoint.request
|
|
12
12
|
---
|
|
13
13
|
|
|
14
14
|
# session-bridge
|
|
@@ -23,6 +23,8 @@ Solve the #1 developer complaint: context loss across sessions. Session-bridge a
|
|
|
23
23
|
- Auto-trigger: when a convention/pattern is established
|
|
24
24
|
- Auto-trigger: before context compaction
|
|
25
25
|
- Auto-trigger: at session end (stop hook)
|
|
26
|
+
- Signal: `checkpoint.request` — explicit checkpoint from cook/team mid-phase
|
|
27
|
+
- `/checkpoint` — manual checkpoint (save exact resume point)
|
|
26
28
|
- `/rune status` — manual state check
|
|
27
29
|
|
|
28
30
|
## Calls (outbound)
|
|
@@ -40,12 +42,14 @@ Solve the #1 developer complaint: context loss across sessions. Session-bridge a
|
|
|
40
42
|
|
|
41
43
|
```
|
|
42
44
|
.rune/
|
|
43
|
-
├── decisions.md
|
|
44
|
-
├── conventions.md
|
|
45
|
-
├── progress.md
|
|
46
|
-
├── session-log.md
|
|
47
|
-
├── instincts.md
|
|
48
|
-
|
|
45
|
+
├── decisions.md — Architectural decisions log
|
|
46
|
+
├── conventions.md — Established patterns & style
|
|
47
|
+
├── progress.md — Task progress tracker
|
|
48
|
+
├── session-log.md — Brief log of each session
|
|
49
|
+
├── instincts.md — Learned project-specific patterns (trigger→action)
|
|
50
|
+
├── cumulative-notes.md — Living project understanding (profile, themes, relationships)
|
|
51
|
+
├── learnings.jsonl — Structured learning log (append-only, queryable)
|
|
52
|
+
└── checkpoint.md — Exact resume point for cross-session continuity
|
|
49
53
|
```
|
|
50
54
|
|
|
51
55
|
## Execution
|
|
@@ -199,6 +203,48 @@ Extract atomic "instincts" — learned trigger→action patterns — from this s
|
|
|
199
203
|
|
|
200
204
|
**Max instincts**: Keep `.rune/instincts.md` under 20 entries. When full, evict the lowest-confidence entry.
|
|
201
205
|
|
|
206
|
+
#### Step 5.8 — Learnings Log (Structured JSONL)
|
|
207
|
+
|
|
208
|
+
Append structured learning entries to `.rune/learnings.jsonl` — an append-only log that captures decisions, insights, and error resolutions in a machine-queryable format. Unlike markdown state files (which are for human reading), JSONL enables fast filtering and "latest winner" lookups.
|
|
209
|
+
|
|
210
|
+
**Entry schema** — one JSON object per line:
|
|
211
|
+
|
|
212
|
+
```json
|
|
213
|
+
{"ts":"2026-04-04T14:30:00Z","skill":"cook","type":"decision","key":"state-lib","insight":"Chose Zustand over Redux — fewer re-renders in dashboard with 50+ real-time widgets","confidence":0.8,"files":["src/store/index.ts"]}
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
| Field | Type | Description |
|
|
217
|
+
|-------|------|-------------|
|
|
218
|
+
| `ts` | ISO 8601 | When the learning was captured |
|
|
219
|
+
| `skill` | string | Which skill produced this learning |
|
|
220
|
+
| `type` | enum | `decision` · `error` · `insight` · `convention` · `performance` |
|
|
221
|
+
| `key` | string | Dedup key — latest entry per key+type wins on read |
|
|
222
|
+
| `insight` | string | 1-2 sentences, causal language ("Chose X because Y", "Root cause was X") |
|
|
223
|
+
| `confidence` | 0.1–1.0 | How certain this learning is (0.3=hunch, 0.7=validated, 0.9=battle-tested) |
|
|
224
|
+
| `files` | string[] | Optional — affected file paths |
|
|
225
|
+
|
|
226
|
+
**Write rules:**
|
|
227
|
+
- Append only — never edit or delete lines in the JSONL file
|
|
228
|
+
- Max 1-3 entries per session (only genuinely transferable learnings)
|
|
229
|
+
- Use causal/comparative language, not flat facts
|
|
230
|
+
- Key must be kebab-case, descriptive (e.g., `auth-lib`, `db-migration-strategy`, `react-hook-pitfall`)
|
|
231
|
+
|
|
232
|
+
**Read rules (latest-winner):**
|
|
233
|
+
- When loading learnings, group by `key+type` and take the entry with the latest `ts`
|
|
234
|
+
- This means updating a learning = just append a new entry with the same key+type
|
|
235
|
+
- No dedup needed on write — dedup happens on read
|
|
236
|
+
|
|
237
|
+
**Query patterns** (for other skills or session-start):
|
|
238
|
+
- All learnings: read `.rune/learnings.jsonl`, parse line-by-line
|
|
239
|
+
- By type: filter `type === "error"` to surface past mistakes before coding
|
|
240
|
+
- By skill: filter `skill === "cook"` to see cook-specific learnings
|
|
241
|
+
- By recency: sort by `ts` descending, take top N
|
|
242
|
+
- Surface top 5 learnings at session start if file has 10+ entries
|
|
243
|
+
|
|
244
|
+
**Pruning**: When file exceeds 100 entries, compact by keeping only the latest-winner per key+type. Write compacted entries to a new file, replace original.
|
|
245
|
+
|
|
246
|
+
**Why**: Markdown state files (decisions.md, conventions.md) are great for human reading but hard to query programmatically. JSONL enables structured recall — "show me all errors from last week" or "what did we decide about auth?" — without parsing markdown headers.
|
|
247
|
+
|
|
202
248
|
#### Step 5.9 — Cumulative Project Notes (Structured Memory)
|
|
203
249
|
|
|
204
250
|
Maintain a running **cumulative notes** file at `.rune/cumulative-notes.md` that evolves across sessions. Unlike `progress.md` (which tracks tasks) or `decisions.md` (which logs choices), cumulative notes capture the **living understanding** of the project — patterns learned, relationships discovered, recurring themes, and open threads.
|
|
@@ -336,6 +382,81 @@ Present the loaded context to the agent in a structured summary:
|
|
|
336
382
|
|
|
337
383
|
Identify the next concrete task from `progress.md` → "Next Session Should" section. Present it as the recommended starting point to the calling orchestrator.
|
|
338
384
|
|
|
385
|
+
### Checkpoint Mode (explicit save-and-resume point)
|
|
386
|
+
|
|
387
|
+
Unlike Save Mode (which captures session state broadly), Checkpoint Mode creates an **exact resume point** — a single file that tells the next session precisely where to pick up, what's in-flight, and what decisions are load-bearing.
|
|
388
|
+
|
|
389
|
+
**Trigger**: User says `/checkpoint`, or `cook`/`team` emits `checkpoint.request` signal when pausing mid-phase.
|
|
390
|
+
|
|
391
|
+
#### Step 1 — Capture resume state
|
|
392
|
+
|
|
393
|
+
Collect into a structured checkpoint:
|
|
394
|
+
|
|
395
|
+
```markdown
|
|
396
|
+
# Checkpoint — [YYYY-MM-DD HH:MM]
|
|
397
|
+
|
|
398
|
+
## What I Was Doing
|
|
399
|
+
[1-2 sentences: the exact task and sub-step in progress]
|
|
400
|
+
|
|
401
|
+
## Current Git State
|
|
402
|
+
- Branch: [branch name]
|
|
403
|
+
- Last commit: [short hash + message]
|
|
404
|
+
- Uncommitted changes: [list of modified/untracked files, or "clean"]
|
|
405
|
+
- Stashed: [yes/no — if yes, stash message]
|
|
406
|
+
|
|
407
|
+
## Decisions Made This Session (Load-Bearing)
|
|
408
|
+
[Only decisions that affect the remaining work — not all decisions]
|
|
409
|
+
- [Decision 1]: [choice + why]
|
|
410
|
+
- [Decision 2]: [choice + why]
|
|
411
|
+
|
|
412
|
+
## What's Left (Ordered)
|
|
413
|
+
1. [Next immediate step — be specific: file, function, what to change]
|
|
414
|
+
2. [Step after that]
|
|
415
|
+
3. [Remaining steps...]
|
|
416
|
+
|
|
417
|
+
## Context the Next Session Needs
|
|
418
|
+
[Critical info that's NOT in the code or git history — mental model, gotchas discovered, things tried and failed]
|
|
419
|
+
- [Item 1]
|
|
420
|
+
- [Item 2]
|
|
421
|
+
|
|
422
|
+
## Resume Command
|
|
423
|
+
[Exact instruction for the next session to pick up — e.g., "Continue Phase 2 Task 3: implement the retry logic in src/api/client.ts, the happy path is done, need error handling"]
|
|
424
|
+
```
|
|
425
|
+
|
|
426
|
+
#### Step 2 — Write checkpoint file
|
|
427
|
+
|
|
428
|
+
Write to `.rune/checkpoint.md` (overwrite — only one active checkpoint at a time).
|
|
429
|
+
|
|
430
|
+
#### Step 3 — Confirm to user
|
|
431
|
+
|
|
432
|
+
```
|
|
433
|
+
## Checkpoint Saved
|
|
434
|
+
- **Resume point**: [1-line summary of what to continue]
|
|
435
|
+
- **Git state**: [branch] @ [commit hash] — [clean/N uncommitted files]
|
|
436
|
+
- **Remaining tasks**: [count]
|
|
437
|
+
- Next session will auto-detect this checkpoint and offer to resume.
|
|
438
|
+
```
|
|
439
|
+
|
|
440
|
+
#### Checkpoint Resume (in Load Mode)
|
|
441
|
+
|
|
442
|
+
At Load Mode Step 1, after checking `.rune/*.md` existence, also check for `.rune/checkpoint.md`:
|
|
443
|
+
|
|
444
|
+
- If checkpoint exists, read it FIRST (before other state files)
|
|
445
|
+
- Present the resume point prominently:
|
|
446
|
+
```
|
|
447
|
+
## Checkpoint Detected — [date]
|
|
448
|
+
**Resume**: [Resume Command from checkpoint]
|
|
449
|
+
**Git state**: [branch] @ [commit] — [clean/dirty]
|
|
450
|
+
**Tasks remaining**: [count]
|
|
451
|
+
```
|
|
452
|
+
- After successful resume (user confirms they've picked up where they left off), rename checkpoint:
|
|
453
|
+
```bash
|
|
454
|
+
mv .rune/checkpoint.md .rune/checkpoint-[date].resolved.md
|
|
455
|
+
```
|
|
456
|
+
- Keep last 3 resolved checkpoints for history, delete older ones
|
|
457
|
+
|
|
458
|
+
**Why**: Save Mode captures everything broadly. Checkpoint captures the **exact needle position** — like a bookmark in a book vs. a summary of chapters read. The next session doesn't need to scan all state files to figure out what to do; the checkpoint tells it directly.
|
|
459
|
+
|
|
339
460
|
## Output Format
|
|
340
461
|
|
|
341
462
|
### Save Mode
|
|
@@ -352,11 +473,21 @@ Identify the next concrete task from `progress.md` → "Next Session Should" sec
|
|
|
352
473
|
```
|
|
353
474
|
## Session Bridge — Loaded
|
|
354
475
|
- **Last session**: [date and summary]
|
|
476
|
+
- **Checkpoint**: [detected — resume point] | [none]
|
|
355
477
|
- **Decisions on file**: [count]
|
|
356
478
|
- **Conventions on file**: [count]
|
|
479
|
+
- **Learnings on file**: [count] (top 5 surfaced if 10+)
|
|
357
480
|
- **Next task**: [task description]
|
|
358
481
|
```
|
|
359
482
|
|
|
483
|
+
### Checkpoint Mode
|
|
484
|
+
```
|
|
485
|
+
## Checkpoint Saved
|
|
486
|
+
- **Resume point**: [1-line summary]
|
|
487
|
+
- **Git state**: [branch] @ [hash] — [clean/N files]
|
|
488
|
+
- **Remaining tasks**: [count]
|
|
489
|
+
```
|
|
490
|
+
|
|
360
491
|
## Constraints
|
|
361
492
|
|
|
362
493
|
1. MUST save decisions, conventions, and progress — not just a status line
|
|
@@ -374,6 +505,9 @@ Known failure modes for this skill. Check these before declaring done.
|
|
|
374
505
|
| Load mode presenting stale context without age marker | MEDIUM | Mark each loaded entry with its session date — caller knows how fresh it is |
|
|
375
506
|
| Silent failure when git unavailable | MEDIUM | Note "no git available" in report — do not fail silently or skip without logging |
|
|
376
507
|
| Loading poisoned .rune/ files without verification | CRITICAL | Step 1.5 integrity-check MUST run before loading — TAINTED = block load |
|
|
508
|
+
| Learnings JSONL grows unbounded | MEDIUM | Auto-compact at 100 entries — keep only latest-winner per key+type |
|
|
509
|
+
| Checkpoint stale after code changes | MEDIUM | Checkpoint includes git state — if branch/commit differ at resume, warn user that checkpoint may be outdated |
|
|
510
|
+
| Multiple checkpoints overwrite each other | LOW | By design — only one active checkpoint. Resolved ones archived with date suffix |
|
|
377
511
|
|
|
378
512
|
## Done When (Save Mode)
|
|
379
513
|
|
|
@@ -381,17 +515,29 @@ Known failure modes for this skill. Check these before declaring done.
|
|
|
381
515
|
- conventions.md updated with all new patterns established
|
|
382
516
|
- progress.md updated with completed/in-progress/blocked task status
|
|
383
517
|
- session-log.md appended with one-line session summary
|
|
518
|
+
- learnings.jsonl appended with 1-3 structured entries (if transferable learnings exist)
|
|
384
519
|
- Git commit made (or "no git" noted in report)
|
|
385
520
|
- Session Bridge Saved report emitted
|
|
386
521
|
|
|
387
522
|
## Done When (Load Mode)
|
|
388
523
|
|
|
389
524
|
- .rune/*.md files found and read
|
|
525
|
+
- Checkpoint detected and presented (if exists)
|
|
526
|
+
- Learnings surfaced (top 5 if 10+ entries)
|
|
390
527
|
- Last session summary presented
|
|
391
528
|
- Current in-progress and blocked tasks identified
|
|
392
|
-
- Next task recommendation from progress.md
|
|
529
|
+
- Next task recommendation from progress.md (or checkpoint resume command)
|
|
393
530
|
- Session Bridge Loaded report emitted
|
|
394
531
|
|
|
532
|
+
## Done When (Checkpoint Mode)
|
|
533
|
+
|
|
534
|
+
- Git state captured (branch, commit, uncommitted files)
|
|
535
|
+
- Load-bearing decisions documented
|
|
536
|
+
- Remaining tasks listed in execution order
|
|
537
|
+
- Resume command written (specific enough for a fresh session to act on)
|
|
538
|
+
- checkpoint.md written to .rune/
|
|
539
|
+
- Checkpoint Saved report emitted
|
|
540
|
+
|
|
395
541
|
## Cost Profile
|
|
396
542
|
|
|
397
543
|
~100-300 tokens per save. ~500-1000 tokens per load. Always haiku. Negligible cost.
|
|
@@ -3,7 +3,7 @@ name: skill-forge
|
|
|
3
3
|
description: Use when creating new Rune skills, editing existing skills, or verifying skill quality before deployment. Applies TDD discipline to skill authoring — test before write, verify before ship.
|
|
4
4
|
metadata:
|
|
5
5
|
author: runedev
|
|
6
|
-
version: "1.
|
|
6
|
+
version: "1.7.0"
|
|
7
7
|
layer: L2
|
|
8
8
|
model: opus
|
|
9
9
|
group: creation
|
|
@@ -33,6 +33,7 @@ The skill that builds skills. Applies Test-Driven Development to skill authoring
|
|
|
33
33
|
## Called By (inbound)
|
|
34
34
|
|
|
35
35
|
- `cook` (L1): when the feature being built IS a new skill
|
|
36
|
+
- `scaffold` (L1): when scaffolded project includes custom skills
|
|
36
37
|
|
|
37
38
|
## References
|
|
38
39
|
|
|
@@ -276,6 +277,47 @@ Research (Meincke et al., 2025, 28,000 conversations) shows 33% → 72% complian
|
|
|
276
277
|
|
|
277
278
|
**Ethical test**: Would this serve the user's genuine interests if they fully understood the technique?
|
|
278
279
|
|
|
280
|
+
### Phase 5.5 — SECURITY MODEL
|
|
281
|
+
|
|
282
|
+
Every skill that touches external systems, user data, or destructive operations MUST define an explicit Security Model section. This is a contract — not aspirational, but testable.
|
|
283
|
+
|
|
284
|
+
**Add to SKILL.md after Sharp Edges:**
|
|
285
|
+
|
|
286
|
+
```markdown
|
|
287
|
+
## Security Model
|
|
288
|
+
|
|
289
|
+
### Trust Boundaries
|
|
290
|
+
- [What this skill reads] — e.g., "Reads .env files, user source code, git history"
|
|
291
|
+
- [What this skill writes] — e.g., "Writes to .rune/ only, never modifies source code"
|
|
292
|
+
- [What this skill executes] — e.g., "Runs npm test, never runs arbitrary shell commands"
|
|
293
|
+
|
|
294
|
+
### This Skill Will NEVER
|
|
295
|
+
- [Explicit denial 1] — e.g., "Execute user-provided strings as shell commands"
|
|
296
|
+
- [Explicit denial 2] — e.g., "Read or log credential files (.env, secrets.json)"
|
|
297
|
+
- [Explicit denial 3] — e.g., "Send data to external endpoints"
|
|
298
|
+
|
|
299
|
+
### Threat Surface
|
|
300
|
+
| Threat | Mitigated By |
|
|
301
|
+
|--------|-------------|
|
|
302
|
+
| Prompt injection via user input | Input validated before processing |
|
|
303
|
+
| Credential exposure in output | Secrets pattern detection before emit |
|
|
304
|
+
| Destructive operation on wrong target | Confirmation gate before delete/overwrite |
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
**When to require Security Model:**
|
|
308
|
+
- Skill uses `Bash` tool → REQUIRED (can execute arbitrary commands)
|
|
309
|
+
- Skill reads `.env` or credentials → REQUIRED
|
|
310
|
+
- Skill writes/deletes files outside `.rune/` → REQUIRED
|
|
311
|
+
- Skill calls external APIs or MCP tools → REQUIRED
|
|
312
|
+
- Skill is read-only analysis (review, audit, scout) → OPTIONAL but recommended
|
|
313
|
+
|
|
314
|
+
**Eval integration**: Phase 7 evals for skills with Security Model MUST include:
|
|
315
|
+
- E05: Attempt to make skill execute unintended command
|
|
316
|
+
- E06: Attempt to make skill expose credentials in output
|
|
317
|
+
- E07: Attempt to make skill write outside its declared boundary
|
|
318
|
+
|
|
319
|
+
If Security Model is required but missing → Phase 7 EVAL HARD-GATE blocks ship.
|
|
320
|
+
|
|
279
321
|
### Phase 6 — INTEGRATE
|
|
280
322
|
|
|
281
323
|
Wire the skill into the mesh:
|
|
@@ -4,7 +4,7 @@ description: "Meta-enforcement layer that routes EVERY agent action through the
|
|
|
4
4
|
user-invocable: false
|
|
5
5
|
metadata:
|
|
6
6
|
author: runedev
|
|
7
|
-
version: "1.
|
|
7
|
+
version: "1.4.0"
|
|
8
8
|
layer: L0
|
|
9
9
|
model: haiku
|
|
10
10
|
group: orchestrator
|
|
@@ -328,9 +328,34 @@ These DO NOT need skill routing:
|
|
|
328
328
|
|
|
329
329
|
At the end of a skill's workflow, skill-router MAY suggest a **complementary skill** — limited to ONE recommendation to prevent infinite referral chains.
|
|
330
330
|
|
|
331
|
+
### Chain Metadata Awareness (Priority Source)
|
|
332
|
+
|
|
333
|
+
When a previous skill's output contains a `chain_metadata` block in the conversation context, skill-router MUST use it as the PRIMARY source for next-skill suggestions:
|
|
334
|
+
|
|
335
|
+
1. **Read `chain_metadata.suggested_next`** — these are data-driven recommendations from the skill that just ran. They have MORE context than the hardcoded table below.
|
|
336
|
+
2. **Read `chain_metadata.status`** — override suggestion logic based on outcome:
|
|
337
|
+
- `BLOCKED` → suggest `debug` or `fix` regardless of what the hardcoded table says
|
|
338
|
+
- `NEEDS_CONTEXT` → suggest `scout` or `research`
|
|
339
|
+
- `DONE_WITH_CONCERNS` → suggest `review` or `sentinel`
|
|
340
|
+
3. **Read `chain_metadata.domain`** — trigger L4 pack auto-suggest (see below)
|
|
341
|
+
4. **Forward `chain_metadata.exports`** — when announcing the suggestion, mention what data is available: "Review can use the 5 changed files and test results from cook."
|
|
342
|
+
|
|
343
|
+
**Conflict resolution:** If `chain_metadata.suggested_next` recommends skill A but the hardcoded table below recommends skill B, **prefer chain_metadata** — it was generated from actual output data, not generic rules.
|
|
344
|
+
|
|
345
|
+
**Announcement format with chain_metadata:**
|
|
346
|
+
```
|
|
347
|
+
Suggested next: `rune:<skill>` — <chain_metadata.suggested_next.reason>
|
|
348
|
+
Available data: <list of export keys the suggested skill would consume>
|
|
349
|
+
Run it? (skip to continue)
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
### Hardcoded Fallback Table
|
|
353
|
+
|
|
354
|
+
When NO chain_metadata is present (skill didn't emit one, or legacy invocation), fall back to this static table:
|
|
355
|
+
|
|
331
356
|
| After This Skill | Suggest | Rationale |
|
|
332
357
|
|-----------------|---------|-----------|
|
|
333
|
-
| `debug` | `
|
|
358
|
+
| `debug` | `fix` | Root cause found — apply the fix |
|
|
334
359
|
| `fix` | `test` | Code changed — verify with tests |
|
|
335
360
|
| `plan` | `adversary` | Plan created — stress-test before implementation |
|
|
336
361
|
| `test` (GREEN) | `preflight` | Tests pass — check for edge cases and completeness |
|
package/skills/team/SKILL.md
CHANGED
|
@@ -5,7 +5,7 @@ context: fork
|
|
|
5
5
|
agent: general-purpose
|
|
6
6
|
metadata:
|
|
7
7
|
author: runedev
|
|
8
|
-
version: "0.
|
|
8
|
+
version: "0.8.0"
|
|
9
9
|
layer: L1
|
|
10
10
|
model: opus
|
|
11
11
|
group: orchestrator
|
|
@@ -477,6 +477,29 @@ All streams done → MERGE sequentially (avoid conflicts)
|
|
|
477
477
|
| Integration test results | Inline stdout | Captured in Phase 5 verify |
|
|
478
478
|
| Team Report | Markdown (inline) | Emitted at end of session |
|
|
479
479
|
|
|
480
|
+
## Document Ownership
|
|
481
|
+
|
|
482
|
+
| Scope | Access | Files |
|
|
483
|
+
|-------|--------|-------|
|
|
484
|
+
| **Owns** (read + write) | `.rune/team-report-*.md`, worktree branches, merge commits |
|
|
485
|
+
| **Reads** (never writes) | `.rune/plan-*.md`, `.rune/contract.md`, `CLAUDE.md`, cook reports from sub-agents |
|
|
486
|
+
| **Never modifies** | Source files directly (delegates to cook instances), `SKILL.md` files, `compiler/**` |
|
|
487
|
+
|
|
488
|
+
Each cook instance owns its declared file set (disjoint). Team owns coordination artifacts only — never touches source code directly.
|
|
489
|
+
|
|
490
|
+
## Anti-Patterns
|
|
491
|
+
|
|
492
|
+
Common multi-agent orchestration failures. These cause the most expensive rework in team workflows.
|
|
493
|
+
|
|
494
|
+
| Anti-Pattern | Why It Fails | Correct Approach |
|
|
495
|
+
|---|---|---|
|
|
496
|
+
| **Overlapping file ownership** — two agents write to the same file | Merge conflicts, lost work, non-deterministic output | Enforce disjoint `touches[]` per stream. Move shared files to a single owner |
|
|
497
|
+
| **Blind merge** — merging cook reports without reviewing them | Poisoned output propagates. One bad stream corrupts the whole feature | `integrity-check` + `completion-gate` on every cook report before merge |
|
|
498
|
+
| **Over-parallelization** — launching 5+ agents for a 3-file task | Context fragmentation, coordination overhead > implementation time | Auto-detect: ≤5 files → lite mode (max 2 agents). Full mode caps at 3 |
|
|
499
|
+
| **Cross-domain implementation** — one agent implements both frontend and backend | Domain expertise diluted. Agent makes shallow choices in unfamiliar territory | Split by domain. Frontend agent ≠ backend agent. Each gets domain context |
|
|
500
|
+
| **Missing handoff context** — bare prompt to cook instance without scope/conventions | Agent guesses project conventions, uses wrong patterns, produces inconsistent code | NEXUS Handoff Template: always include metadata, deliverables, conventions, quality expectations |
|
|
501
|
+
| **Sequential when parallel is safe** — running independent streams one by one | Wastes time. 3 independent streams × 5min = 15min sequential vs 5min parallel | Check dependency graph. Independent streams → parallel. Dependent → sequential |
|
|
502
|
+
|
|
480
503
|
## Sharp Edges
|
|
481
504
|
|
|
482
505
|
Known failure modes for this skill. Check these before declaring done.
|
package/skills/test/SKILL.md
CHANGED
|
@@ -3,13 +3,13 @@ name: test
|
|
|
3
3
|
description: "TDD test writer. Writes failing tests FIRST (red), then verifies they pass after implementation (green). Covers unit, integration, and e2e tests."
|
|
4
4
|
metadata:
|
|
5
5
|
author: runedev
|
|
6
|
-
version: "1.
|
|
6
|
+
version: "1.2.0"
|
|
7
7
|
layer: L2
|
|
8
8
|
model: sonnet
|
|
9
9
|
group: development
|
|
10
10
|
tools: "Read, Write, Edit, Bash, Glob, Grep"
|
|
11
11
|
emit: tests.passed, tests.failed
|
|
12
|
-
listen: code.changed
|
|
12
|
+
listen: code.changed, db.migrated
|
|
13
13
|
---
|
|
14
14
|
|
|
15
15
|
# test
|
|
@@ -542,6 +542,33 @@ Examples of test slop:
|
|
|
542
542
|
| Coverage report | Inline stdout | Shown in Test Report |
|
|
543
543
|
| Test Report | Markdown (inline) | Emitted to calling skill (cook, fix, review) |
|
|
544
544
|
|
|
545
|
+
## Chain Metadata
|
|
546
|
+
|
|
547
|
+
Append to Test Report when invoked standalone. Suppress when called as sub-skill inside an L1 orchestrator (cook, team, etc.) — the orchestrator emits a consolidated block. See `docs/references/chain-metadata.md`.
|
|
548
|
+
|
|
549
|
+
```yaml
|
|
550
|
+
chain_metadata:
|
|
551
|
+
skill: "rune:test"
|
|
552
|
+
version: "1.2.0"
|
|
553
|
+
status: "[DONE]"
|
|
554
|
+
domain: "[area tested]"
|
|
555
|
+
files_changed:
|
|
556
|
+
- "[test files created/modified]"
|
|
557
|
+
exports:
|
|
558
|
+
test_results: { passed: [N], failed: [N], coverage: [N] }
|
|
559
|
+
test_files: ["[paths to test files]"]
|
|
560
|
+
status: "[RED | GREEN]" # RED = TDD failing (expected), GREEN = all pass
|
|
561
|
+
suggested_next: # status-aware — pick based on RED or GREEN
|
|
562
|
+
# When GREEN:
|
|
563
|
+
- skill: "rune:preflight"
|
|
564
|
+
reason: "[grounded in results — e.g., 'All 15 tests GREEN, check edge case completeness']"
|
|
565
|
+
consumes: ["test_results", "test_files"]
|
|
566
|
+
# When RED (TDD expected):
|
|
567
|
+
- skill: "rune:fix"
|
|
568
|
+
reason: "[grounded in failures — e.g., '3 tests RED as expected, implement to make them pass']"
|
|
569
|
+
consumes: ["test_results", "test_files"]
|
|
570
|
+
```
|
|
571
|
+
|
|
545
572
|
## Sharp Edges
|
|
546
573
|
|
|
547
574
|
Known failure modes for this skill. Check these before declaring done.
|