@rune-kit/rune 2.2.4 → 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 (78) hide show
  1. package/README.md +1 -1
  2. package/compiler/adapters/openclaw.js +63 -0
  3. package/compiler/emitter.js +10 -0
  4. package/docs/EXTENSION-TEMPLATE.md +18 -0
  5. package/docs/SKILL-TEMPLATE.md +46 -0
  6. package/docs/guides/index.html +84 -21
  7. package/docs/index.html +303 -37
  8. package/docs/script.js +236 -18
  9. package/docs/style.css +417 -59
  10. package/extensions/saas/PACK.md +13 -8
  11. package/extensions/saas/skills/billing-integration.md +82 -3
  12. package/package.json +7 -5
  13. package/skills/adversary/SKILL.md +12 -0
  14. package/skills/audit/SKILL.md +64 -1
  15. package/skills/autopsy/SKILL.md +12 -0
  16. package/skills/ba/SKILL.md +63 -1
  17. package/skills/brainstorm/SKILL.md +11 -0
  18. package/skills/completion-gate/SKILL.md +51 -2
  19. package/skills/context-engine/SKILL.md +83 -1
  20. package/skills/context-pack/SKILL.md +160 -0
  21. package/skills/cook/SKILL.md +657 -808
  22. package/skills/cook/references/deviation-rules.md +19 -0
  23. package/skills/cook/references/error-recovery.md +37 -0
  24. package/skills/cook/references/exit-conditions.md +31 -0
  25. package/skills/cook/references/loop-detection.md +39 -0
  26. package/skills/cook/references/mid-run-signals.md +31 -0
  27. package/skills/cook/references/output-format.md +40 -0
  28. package/skills/cook/references/pack-detection.md +82 -0
  29. package/skills/cook/references/pause-resume-template.md +38 -0
  30. package/skills/cook/references/rfc-template.md +52 -0
  31. package/skills/cook/references/sharp-edges.md +24 -0
  32. package/skills/cook/references/subagent-status.md +38 -0
  33. package/skills/db/SKILL.md +12 -0
  34. package/skills/debug/SKILL.md +81 -2
  35. package/skills/deploy/SKILL.md +56 -1
  36. package/skills/design/SKILL.md +9 -0
  37. package/skills/docs/SKILL.md +12 -0
  38. package/skills/docs-seeker/SKILL.md +11 -0
  39. package/skills/fix/SKILL.md +63 -3
  40. package/skills/git/SKILL.md +55 -1
  41. package/skills/incident/SKILL.md +10 -0
  42. package/skills/journal/SKILL.md +51 -3
  43. package/skills/launch/SKILL.md +12 -0
  44. package/skills/logic-guardian/SKILL.md +11 -0
  45. package/skills/marketing/SKILL.md +13 -0
  46. package/skills/mcp-builder/SKILL.md +13 -0
  47. package/skills/onboard/SKILL.md +54 -2
  48. package/skills/perf/SKILL.md +11 -0
  49. package/skills/plan/SKILL.md +342 -629
  50. package/skills/plan/references/completeness-scoring.md +37 -0
  51. package/skills/plan/references/outcome-block.md +41 -0
  52. package/skills/plan/references/plan-templates.md +193 -0
  53. package/skills/plan/references/wave-planning.md +44 -0
  54. package/skills/plan/references/workflow-registry.md +53 -0
  55. package/skills/preflight/SKILL.md +135 -1
  56. package/skills/rescue/SKILL.md +10 -0
  57. package/skills/research/SKILL.md +36 -8
  58. package/skills/retro/SKILL.md +325 -0
  59. package/skills/review/SKILL.md +100 -1
  60. package/skills/review-intake/SKILL.md +11 -0
  61. package/skills/safeguard/SKILL.md +12 -0
  62. package/skills/scaffold/SKILL.md +10 -0
  63. package/skills/scope-guard/SKILL.md +11 -0
  64. package/skills/scout/SKILL.md +9 -0
  65. package/skills/sentinel/SKILL.md +307 -320
  66. package/skills/sentinel/references/config-protection.md +52 -0
  67. package/skills/sentinel/references/destructive-commands.md +40 -0
  68. package/skills/sentinel/references/domain-hooks.md +73 -0
  69. package/skills/sentinel/references/framework-patterns.md +46 -0
  70. package/skills/sentinel/references/owasp-patterns.md +69 -0
  71. package/skills/sentinel/references/secret-patterns.md +40 -0
  72. package/skills/sentinel/references/skill-content-guard.md +55 -0
  73. package/skills/session-bridge/SKILL.md +60 -2
  74. package/skills/skill-forge/SKILL.md +131 -4
  75. package/skills/skill-router/SKILL.md +33 -1
  76. package/skills/surgeon/SKILL.md +12 -0
  77. package/skills/team/SKILL.md +35 -1
  78. package/skills/test/SKILL.md +211 -7
@@ -4,7 +4,7 @@ description: "Deploy application to target platform. Use when user explicitly sa
4
4
  disable-model-invocation: true
5
5
  metadata:
6
6
  author: runedev
7
- version: "0.3.0"
7
+ version: "0.4.0"
8
8
  layer: L2
9
9
  model: sonnet
10
10
  group: delivery
@@ -64,6 +64,49 @@ If sentinel returns CRITICAL issues → STOP. Do NOT proceed. Report issues.
64
64
 
65
65
  Both gates MUST pass. No exceptions.
66
66
 
67
+ ### Step 1.5 — Release Checklist (Production Deploys Only)
68
+
69
+ **Skip for**: staging, preview, development deploys.
70
+
71
+ Before production deploy, verify ALL items:
72
+
73
+ | # | Check | How | Gate |
74
+ |---|-------|-----|------|
75
+ | 1 | Version bumped | `package.json`/`pyproject.toml` version matches release | BLOCK if unchanged |
76
+ | 2 | Changelog updated | `CHANGELOG.md` has entry for this version | WARN if missing |
77
+ | 3 | Breaking changes documented | RFC artifact exists for each breaking change | BLOCK if RFC missing |
78
+ | 4 | Migration scripts ready | DB migrations tested on staging first | BLOCK if untested migration |
79
+ | 5 | Rollback plan documented | `.rune/deploy/rollback-<version>.md` exists | WARN if missing |
80
+ | 6 | Release notes drafted | Customer-facing notes for release-comms | WARN if missing |
81
+ | 7 | Dependencies locked | Lock file committed, no floating versions | BLOCK if unlocked |
82
+
83
+ **Rollback Plan Template** (`.rune/deploy/rollback-<version>.md`):
84
+
85
+ ```markdown
86
+ # Rollback Plan: v<version>
87
+
88
+ ## Trigger Conditions
89
+ - [When to rollback — e.g., error rate >5%, P0 incident, data corruption]
90
+
91
+ ## Steps
92
+ 1. [Revert command — e.g., `vercel rollback`, `fly releases rollback`]
93
+ 2. [DB rollback — e.g., `npm run migrate:rollback` or "N/A — no migration"]
94
+ 3. [Cache invalidation if needed]
95
+ 4. [Notify stakeholders]
96
+
97
+ ## Verification
98
+ - [ ] Previous version serving traffic
99
+ - [ ] Health check passing
100
+ - [ ] No data loss confirmed
101
+
102
+ ## Post-Rollback
103
+ - [ ] Incident created for root cause analysis
104
+ - [ ] Fix branch created from rolled-back commit
105
+ ```
106
+
107
+ If any BLOCK item fails → STOP deploy. Fix before retrying.
108
+ If WARN items missing → proceed but flag in deploy report.
109
+
67
110
  ### Step 2 — Detect platform
68
111
 
69
112
  Use `Bash` to inspect the project root for platform config files:
@@ -147,6 +190,18 @@ Deploy Report with platform, status (success/failed/rollback), deployed URL, bui
147
190
  3. MUST verify deploy is live and responding before declaring success
148
191
  4. MUST NOT deploy with known CRITICAL security findings
149
192
  5. MUST log deploy metadata (version, timestamp, commit hash)
193
+ 6. MUST complete release checklist for production deploys — version bump, changelog, rollback plan
194
+ 7. MUST create rollback plan artifact before first production deploy of a version
195
+
196
+ ## Returns
197
+
198
+ | Artifact | Format | Location |
199
+ |----------|--------|----------|
200
+ | Deploy report | Markdown | inline (chat output) |
201
+ | Deploy status (success/failed/rollback) | Text | inline |
202
+ | Health check results (HTTP status, visual) | Markdown | inline |
203
+ | Rollback plan document | Markdown | `.rune/deploy/rollback-<version>.md` |
204
+ | Monitoring confirmation | Text | inline |
150
205
 
151
206
  ## Sharp Edges
152
207
 
@@ -443,6 +443,15 @@ Trading/Fintech — Data-Dense Dark — Web
443
443
  | Persistence Gate | .rune/design-system.md written before reporting done | Write file first |
444
444
  | Platform Gate | Platform detected before generating tokens | Default to web, note assumption |
445
445
 
446
+ ## Returns
447
+
448
+ | Artifact | Format | Location |
449
+ |----------|--------|----------|
450
+ | Design system file | Markdown | `.rune/design-system.md` |
451
+ | Design report | Markdown | inline (chat output) |
452
+ | Accessibility audit findings | Markdown list | inline + appended to design-system.md |
453
+ | UX writing guidelines | Markdown section | `.rune/design-system.md` § UX Writing |
454
+
446
455
  ## Sharp Edges
447
456
 
448
457
  Known failure modes for this skill. Check these before declaring done.
@@ -294,6 +294,18 @@ Docs Update Report:
294
294
  5. MUST NOT generate docs for code that doesn't exist yet (unless explicitly creating spec docs)
295
295
  6. API docs MUST match actual route signatures — wrong API docs are worse than no docs
296
296
 
297
+ ## Returns
298
+
299
+ | Artifact | Format | Location |
300
+ |----------|--------|----------|
301
+ | README.md | Markdown | project root |
302
+ | ARCHITECTURE.md | Markdown | project root (if 10+ files) |
303
+ | API reference | Markdown | `docs/API.md` |
304
+ | Changelog entry | Markdown (Keep a Changelog) | `CHANGELOG.md` |
305
+ | Docs update report | Markdown | inline (chat output) |
306
+
307
+ **Scope guardrail:** Documents only what exists in the codebase — never invents features, endpoints, or APIs.
308
+
297
309
  ## Sharp Edges
298
310
 
299
311
  | Failure Mode | Severity | Mitigation |
@@ -161,6 +161,17 @@ Known failure modes for this skill. Check these before declaring done.
161
161
  - Source URL provided
162
162
  - Documentation emitted in output format
163
163
 
164
+ ## Returns
165
+
166
+ | Artifact | Format | Location |
167
+ |----------|--------|----------|
168
+ | API reference (signature + params) | Markdown | inline |
169
+ | Minimal working code example | Code block | inline |
170
+ | Deprecation / version notes | Markdown | inline |
171
+ | Source URL | Plain text | inline |
172
+
164
173
  ## Cost Profile
165
174
 
166
175
  ~300-600 tokens input, ~200-400 tokens output. Haiku. Fast lookup.
176
+
177
+ **Scope guardrail:** docs-seeker looks up documentation only — it does not apply changes, write code, or interpret whether the API fits the caller's use case.
@@ -3,7 +3,7 @@ name: fix
3
3
  description: Apply code changes and fixes. Writes implementation code, applies bug fixes, and verifies changes with tests. Core action hub in the development mesh.
4
4
  metadata:
5
5
  author: runedev
6
- version: "0.4.0"
6
+ version: "0.6.0"
7
7
  layer: L2
8
8
  model: sonnet
9
9
  group: development
@@ -97,6 +97,32 @@ Confirm the change works and nothing is broken.
97
97
  - If project has a type-check command, run it via `Bash`
98
98
  - If project has a lint command, run it via `Bash`
99
99
 
100
+ ### Step 4.5: Quality Decay Check (Self-Regulation)
101
+
102
+ When fix is called repeatedly (e.g., by cook Phase 4, or iterative fix loops), track a **WTF-likelihood score** — the probability that continued fixing is making things worse.
103
+
104
+ **Compute every 3 fix attempts** (or when called 5+ times in a single cook session):
105
+
106
+ | Signal | Score Adjustment |
107
+ |--------|-----------------|
108
+ | A fix was reverted (any test that passed now fails) | +15% |
109
+ | Fix touched >3 files (blast radius expanding) | +5% per extra file beyond 3 |
110
+ | 15+ fixes already applied in this session | +1% per fix beyond 15 |
111
+ | All remaining issues are LOW severity | +10% |
112
+ | Fix touched files outside the original diagnosis scope | +20% |
113
+ | Consecutive fixes without running tests between them | +10% |
114
+
115
+ **Thresholds:**
116
+ - **>20% WTF-likelihood**: STOP fixing. Report current state to cook/user with: "Quality decay detected — continued fixes risk introducing more bugs than they resolve. {N} fixes applied, {score}% risk. Recommend: commit current progress, re-assess remaining issues."
117
+ - **Hard cap: 30 fixes per session** — regardless of score. After 30, STOP and report.
118
+
119
+ **Reset conditions:** WTF-likelihood resets to 0% when:
120
+ - User explicitly says "continue fixing"
121
+ - A full test suite run shows zero regressions
122
+ - Scope is narrowed to a single file
123
+
124
+ > Source: garrytan/gstack v0.9.0 (qa skill) — prevents runaway fix loops where each fix introduces new risk.
125
+
100
126
  ### Step 5: Post-Fix Hardening (Defense-in-Depth)
101
127
 
102
128
  After the fix works, make the bug **structurally impossible** — not just "fixed this time."
@@ -178,7 +204,7 @@ If fix requires touching >3 files not in the diagnosis → re-diagnose. You're p
178
204
  ```
179
205
  ## Fix Report
180
206
  - **Task**: [what was fixed/implemented]
181
- - **Status**: complete | partial | blocked
207
+ - **Status**: DONE | DONE_WITH_CONCERNS | NEEDS_CONTEXT | BLOCKED
182
208
 
183
209
  ### Changes
184
210
  - `path/to/file.ts` — [description of change]
@@ -189,10 +215,38 @@ If fix requires touching >3 files not in the diagnosis → re-diagnose. You're p
189
215
  - Types: PASS | FAIL
190
216
  - Tests: PASS | FAIL ([n] passed, [m] failed)
191
217
 
218
+ ### Concerns (if DONE_WITH_CONCERNS)
219
+ - [concern]: [impact assessment] — [suggested remediation]
220
+
221
+ ### Context Needed (if NEEDS_CONTEXT)
222
+ - [what is unknown]: [why it blocks] — [two most likely answers]
223
+
224
+ ### Blocker (if BLOCKED)
225
+ - [specific blocker]: [what was attempted]
226
+
192
227
  ### Notes
193
228
  - [any caveats or follow-up needed]
194
229
  ```
195
230
 
231
+ ### Status Protocol (Subagent Contract)
232
+
233
+ Fix returns one of four statuses to its caller (cook, debug, review, surgeon). The caller uses this to route next actions.
234
+
235
+ | Status | When | Example |
236
+ |--------|------|---------|
237
+ | `DONE` | Fix applied, tests pass, no issues | Clean bug fix, all green |
238
+ | `DONE_WITH_CONCERNS` | Fix works but has side effects or caveats worth noting | "Tests pass but performance regressed 15% — consider optimizing in follow-up" |
239
+ | `NEEDS_CONTEXT` | Cannot apply fix without clarification — ambiguous spec or missing info | "Two valid interpretations of the expected behavior — need user input" |
240
+ | `BLOCKED` | Hard blocker — exhausted fix attempts, broken dependency, fundamental incompatibility | "3 fix attempts failed — triggering debug escalation" |
241
+
242
+ ## Returns
243
+
244
+ | Artifact | Format | Location |
245
+ |----------|--------|----------|
246
+ | Code changes | Source files | Per debug report / plan file paths |
247
+ | Fix Report | Markdown (inline) | Emitted to calling skill (cook, debug, review, surgeon) |
248
+ | Verification output | Inline (Fix Report) | Lint + types + test results |
249
+
196
250
  ## Sharp Edges
197
251
 
198
252
  Known failure modes for this skill. Check these before declaring done.
@@ -207,6 +261,7 @@ Known failure modes for this skill. Check these before declaring done.
207
261
  | Fixing at crash site without tracing data origin | HIGH | Defense-in-depth: trace where bad data ORIGINATES, add validation at every layer it passes through |
208
262
  | Single-point validation (fix one spot, hope it holds) | MEDIUM | Step 5: add entry + business logic + environment + debug layers for data-flow bugs |
209
263
  | Removing debug instrumentation before fix is verified | MEDIUM | Step 5b: preserve `#region agent-debug` markers until all tests pass — premature cleanup erases failure history |
264
+ | Runaway fix loop — 20+ fixes without checking quality decay | HIGH | Step 4.5: WTF-likelihood self-regulation. >20% risk = STOP. Hard cap 30 fixes/session. Each fix adds risk — diminishing returns after ~15 |
210
265
 
211
266
  ## Done When
212
267
 
@@ -215,8 +270,13 @@ Known failure modes for this skill. Check these before declaring done.
215
270
  - Tests pass for the fixed functionality (actual output shown)
216
271
  - Lint and type check pass
217
272
  - hallucination-guard verified any new imports
218
- - Fix Report emitted with changed files and verification results
273
+ - Fix Report emitted with 4-state status, changed files, and verification results
274
+ - If `DONE_WITH_CONCERNS`: concerns listed with impact + remediation
275
+ - If `NEEDS_CONTEXT`: specific questions stated with two likely answers
276
+ - If `BLOCKED`: blocker + all attempted approaches documented
219
277
 
220
278
  ## Cost Profile
221
279
 
222
280
  ~2000-5000 tokens input, ~1000-3000 tokens output. Sonnet for code writing quality. Most active skill during implementation.
281
+
282
+ **Scope guardrail**: Do not refactor unrelated code or create new features beyond the diagnosed fix target unless explicitly delegated by the parent agent.
@@ -3,7 +3,7 @@ name: git
3
3
  description: Specialized git operations — semantic commits, PR descriptions, branch management, conflict resolution guidance. Replaces ad-hoc git commands with a dedicated, convention-aware utility.
4
4
  metadata:
5
5
  author: runedev
6
- version: "0.2.0"
6
+ version: "0.3.0"
7
7
  layer: L3
8
8
  model: haiku
9
9
  group: utility
@@ -27,6 +27,7 @@ Specialized git operations utility. Handles semantic commits, PR descriptions, b
27
27
  - `/rune git pr` — manual PR generation
28
28
  - `/rune git branch <description>` — generate branch name
29
29
  - `/rune git changelog` — generate changelog from commits
30
+ - `/rune git release <version>` — create tagged release with changelog
30
31
 
31
32
  ## Calls (outbound)
32
33
 
@@ -187,6 +188,49 @@ Group commits by conventional commit type. Format as [Keep a Changelog](https://
187
188
 
188
189
  Link to PRs/issues when references found in commit messages.
189
190
 
191
+ ### Release Mode
192
+
193
+ Create a version tag with release artifacts.
194
+
195
+ **Triggers:**
196
+ - `/rune git release <version>` — create release for specified version
197
+ - Called by `launch` (L1) during release pipeline
198
+ - Called by `deploy` (L2) after successful production deploy
199
+
200
+ #### Step 1 — Validate Version
201
+
202
+ Parse version string. Must follow semver (`major.minor.patch`):
203
+ - Breaking changes → major bump
204
+ - New features → minor bump
205
+ - Bug fixes → patch bump
206
+
207
+ Check `git tag -l` to ensure version doesn't already exist.
208
+
209
+ #### Step 2 — Generate Release Artifacts
210
+
211
+ 1. **Changelog**: Run Changelog Mode to generate entries since last tag
212
+ 2. **Version bump**: Update version in `package.json`, `pyproject.toml`, `Cargo.toml`, or equivalent
213
+ 3. **Release notes**: Summarize changes for GitHub Release body
214
+
215
+ #### Step 3 — Tag and Push
216
+
217
+ ```bash
218
+ git add <version-files>
219
+ git commit -m "chore: bump version to v<version>"
220
+ git tag -a v<version> -m "Release v<version>"
221
+ git push origin master --tags
222
+ ```
223
+
224
+ #### Step 4 — Create GitHub Release
225
+
226
+ ```bash
227
+ gh release create v<version> --title "v<version>" --notes "<release-notes>"
228
+ ```
229
+
230
+ #### Step 5 — Notify
231
+
232
+ If deploy reports customer email list available (via rune-pay `/admin/emails`), flag for notification.
233
+
190
234
  ## Output Format
191
235
 
192
236
  ### Commit Mode
@@ -235,6 +279,16 @@ Examples: `feat/jwt-refresh`, `fix/123-login-crash`, `refactor/auth-module`
235
279
  - Change description (#PR)
236
280
  ```
237
281
 
282
+ ### Release Mode
283
+ ```
284
+ ## Release: v<version>
285
+ - **Tag**: v<version>
286
+ - **Commits**: [count] since last release
287
+ - **Changelog**: [path to CHANGELOG.md]
288
+ - **GitHub Release**: [URL]
289
+ - **Artifacts**: version bump, changelog, tag, release
290
+ ```
291
+
238
292
  ## Constraints
239
293
 
240
294
  1. MUST use conventional commit format — no freeform messages
@@ -214,6 +214,16 @@ File: src/middleware/auth.ts:47
214
214
  | Security Gate | sentinel ran before closing incident | Run sentinel — do not skip |
215
215
  | Postmortem Gate | All sections populated (Timeline, RCA, Prevention Actions) before status = Resolved | Complete or note as DRAFT |
216
216
 
217
+ ## Returns
218
+
219
+ | Artifact | Format | Location |
220
+ |----------|--------|----------|
221
+ | Incident response report | Markdown | inline (chat output) |
222
+ | Incident timeline | Text (HH:MM format) | inline + postmortem |
223
+ | Postmortem document | Markdown | `.rune/incidents/INCIDENT-<date>-<slug>.md` |
224
+ | Prevention actions table | Markdown table | postmortem |
225
+ | Journal entry (incident ADR) | Text | `.rune/adr/` (via `rune:journal`) |
226
+
217
227
  ## Sharp Edges
218
228
 
219
229
  Known failure modes for this skill. Check these before declaring done.
@@ -3,7 +3,7 @@ name: journal
3
3
  description: Persistent state tracking and Architecture Decision Records across sessions. Manages progress state, module health, dependency graphs, and ADRs for any workflow.
4
4
  metadata:
5
5
  author: runedev
6
- version: "0.2.0"
6
+ version: "0.3.0"
7
7
  layer: L3
8
8
  model: haiku
9
9
  group: state
@@ -43,6 +43,7 @@ None — pure L3 state management utility.
43
43
  .rune/module-status.json — Machine-readable module states
44
44
  .rune/dependency-graph.mmd — Mermaid diagram, color-coded by health
45
45
  .rune/adr/ — Architecture Decision Records (one per decision)
46
+ .rune/risks/ — Risk Register entries (one per identified risk)
46
47
  ```
47
48
 
48
49
  ## Execution
@@ -111,6 +112,50 @@ For each architectural decision or trade-off made during this session (applies t
111
112
  - **[Alternative B]**: Rejected because [specific reason]. May reconsider if [condition changes].
112
113
  ```
113
114
 
115
+ ### Step 3.5 — Record risks
116
+
117
+ For each risk identified during the session (technical, schedule, dependency, security):
118
+
119
+ 1. Generate a risk filename: `.rune/risks/RISK-[NNN]-[slug].md` where NNN is next sequential number
120
+ 2. Use `Write` to create the risk file:
121
+
122
+ ```markdown
123
+ # RISK-[NNN]: [Risk Title]
124
+
125
+ **Date Identified**: [YYYY-MM-DD]
126
+ **Identified By**: [workflow — cook | plan | deploy | audit | adversary]
127
+ **Severity**: Critical | High | Medium | Low
128
+ **Likelihood**: High | Medium | Low
129
+ **Status**: Open | Mitigated | Accepted | Closed
130
+
131
+ ## Description
132
+ [What could go wrong — specific scenario, not vague "things might break"]
133
+
134
+ ## Impact
135
+ [What happens if this risk materializes — quantify if possible]
136
+
137
+ ## Mitigation
138
+ [Actions to reduce likelihood or impact]
139
+ - [ ] [Action 1 — owner, deadline]
140
+ - [ ] [Action 2]
141
+
142
+ ## Trigger Conditions
143
+ [How to detect this risk is materializing — monitoring, alerts, symptoms]
144
+
145
+ ## Contingency
146
+ [What to do if risk materializes despite mitigation — the Plan B]
147
+ ```
148
+
149
+ 3. **Risk classification matrix**:
150
+
151
+ | Likelihood \ Severity | Critical | High | Medium | Low |
152
+ |----------------------|----------|------|--------|-----|
153
+ | **High** | 🔴 Immediate action | 🔴 This sprint | 🟡 This quarter | ⚪ Backlog |
154
+ | **Medium** | 🔴 This sprint | 🟡 This quarter | ⚪ Backlog | ⚪ Accept |
155
+ | **Low** | 🟡 This quarter | ⚪ Backlog | ⚪ Accept | ⚪ Accept |
156
+
157
+ 4. Risks marked 🔴 MUST have mitigation actions with deadlines. ⚪ Accept = documented acknowledgment, no action required.
158
+
114
159
  ### Step 4 — Update dependency graph
115
160
 
116
161
  If any module dependencies changed during this session (new imports, removed dependencies, refactored interfaces):
@@ -145,6 +190,7 @@ Emit the journal update summary to the calling skill.
145
190
  - **Module**: [current module]
146
191
  - **Health**: [before] → [after]
147
192
  - **ADRs Written**: [count]
193
+ - **Risks Logged**: [count] ([severity breakdown])
148
194
  - **Files Updated**: [list of .rune/ files modified]
149
195
  - **Next Module**: [next in queue, or "rescue complete"]
150
196
  ```
@@ -154,8 +200,9 @@ Emit the journal update summary to the calling skill.
154
200
  ```
155
201
  1. Read .rune/RESCUE-STATE.md → full rescue history
156
202
  2. Read .rune/module-status.json → module states and health scores
157
- 3. Read git log latest changes since last session
158
- 4. Read CLAUDE.md project conventions
203
+ 3. Read .rune/risks/ open risks and their status
204
+ 4. Read git log latest changes since last session
205
+ 5. Read CLAUDE.md → project conventions
159
206
  → Result: Zero context loss across rescue sessions
160
207
  ```
161
208
 
@@ -180,6 +227,7 @@ Known failure modes for this skill. Check these before declaring done.
180
227
  ## Done When
181
228
 
182
229
  - All decisions from the session recorded as ADR files with rationale
230
+ - All identified risks recorded as RISK files with severity, mitigation, and trigger conditions
183
231
  - Progress state updated (module status, phase, or deploy event as appropriate)
184
232
  - Dependency graph updated if module relationships changed
185
233
  - Journal Update summary emitted to calling skill
@@ -303,6 +303,16 @@ Mark todo[4] `completed`.
303
303
  - Launch video: [ready | skipped]
304
304
  ```
305
305
 
306
+ ## Returns
307
+
308
+ | Artifact | Format | Location |
309
+ |----------|--------|----------|
310
+ | Deploy status + live URL | Inline (Launch Report) | Emitted at session end |
311
+ | Marketing assets (copy, social, SEO) | Markdown (inline) | Generated by `rune:marketing`, presented in Phase 5 |
312
+ | Release checklist | Markdown (inline) | Shown in Announce phase |
313
+ | Monitoring confirmation | Inline | Watchdog setup output |
314
+ | Launch Report | Markdown (inline) | Emitted at end of session |
315
+
306
316
  ## Sharp Edges
307
317
 
308
318
  Known failure modes for this skill. Check these before declaring done.
@@ -328,3 +338,5 @@ Known failure modes for this skill. Check these before declaring done.
328
338
  ## Cost Profile
329
339
 
330
340
  ~$0.08-0.15 per launch. Sonnet for coordination, delegates to haiku for scanning.
341
+
342
+ **Scope guardrail**: Do not publish marketing assets or trigger external announcements unless explicitly delegated by the parent agent.
@@ -235,6 +235,17 @@ Ensure the next session can pick up where this one left off:
235
235
  - Manifest summary saved to journal + neural memory for cross-session handoff
236
236
  - Tests pass after any logic edit
237
237
 
238
+ ## Returns
239
+
240
+ | Artifact | Format | Location |
241
+ |----------|--------|----------|
242
+ | Logic manifest | JSON | `.rune/logic-manifest.json` |
243
+ | Validation report (SYNCED / DRIFT) | Markdown | inline |
244
+ | Pre-edit gate summary | Structured text | inline |
245
+ | ADR entries for logic changes | Markdown | via `journal` L3 |
246
+
238
247
  ## Cost Profile
239
248
 
240
249
  ~1,000-2,000 tokens for manifest load + pre-edit gate. ~3,000-5,000 tokens for full project scan (Phase 3). Sonnet for code analysis; haiku for file scanning via scout.
250
+
251
+ **Scope guardrail:** logic-guardian protects existing logic — it does not implement new features or refactor code.
@@ -224,6 +224,19 @@ Known failure modes for this skill. Check these before declaring done.
224
224
  - Files saved to marketing/ directory
225
225
  - Marketing Assets report emitted with file list
226
226
 
227
+ ## Returns
228
+
229
+ | Artifact | Format | Location |
230
+ |----------|--------|----------|
231
+ | Brand voice contract | Markdown | `marketing/brand-voice.md` |
232
+ | Landing page copy | Markdown | `marketing/landing-copy.md` |
233
+ | Social media posts | Markdown | `marketing/social-posts.md` |
234
+ | SEO metadata | JSON | `marketing/seo-meta.json` |
235
+ | SEO audit report | Markdown | `marketing/seo-audit.md` |
236
+ | Video demo script | Markdown | `marketing/video-script.md` |
237
+
227
238
  ## Cost Profile
228
239
 
229
240
  ~2000-5000 tokens input, ~1000-3000 tokens output. Sonnet for copywriting quality.
241
+
242
+ **Scope guardrail:** marketing generates assets based on actual product capabilities only — no aspirational copy, no fabricated stats.
@@ -353,6 +353,19 @@ mcp-server-<name>/
353
353
  - Verification passed (types + tests)
354
354
  - Ready to install in Claude Code / Cursor / other IDEs
355
355
 
356
+ ## Returns
357
+
358
+ | Artifact | Format | Location |
359
+ |----------|--------|----------|
360
+ | MCP server source code | TypeScript or Python | `mcp-server-<name>/src/` |
361
+ | Tool definitions (one per tool) | TS/Python files | `src/tools/<name>.ts` or `.py` |
362
+ | Resource handlers | TS/Python files | `src/resources/<name>.ts` or `.py` |
363
+ | Test suite | TS/Python test files | `tests/` |
364
+ | README with tool catalog | Markdown | `mcp-server-<name>/README.md` |
365
+ | Environment config template | `.env.example` | project root |
366
+
356
367
  ## Cost Profile
357
368
 
358
369
  ~3000-6000 tokens input, ~2000-5000 tokens output. Sonnet — MCP server generation is a structured code task, not architectural reasoning.
370
+
371
+ **Scope guardrail:** mcp-builder generates the server and tests — it does not deploy, register with MCP registries, or configure the host IDE beyond providing the installation snippet.
@@ -3,7 +3,7 @@ name: onboard
3
3
  description: Auto-generate project context for AI sessions. Scans codebase, creates CLAUDE.md and .rune/ setup so every future session starts with full context.
4
4
  metadata:
5
5
  author: runedev
6
- version: "0.2.0"
6
+ version: "0.3.0"
7
7
  layer: L2
8
8
  model: sonnet
9
9
  group: quality
@@ -43,6 +43,7 @@ project/
43
43
  ├── decisions.md # Empty, ready for session-bridge
44
44
  ├── progress.md # Empty, ready for session-bridge
45
45
  ├── session-log.md # Empty, ready for session-bridge
46
+ ├── instincts.md # Empty, ready for session-bridge instinct learning
46
47
  └── DEVELOPER-GUIDE.md # Human-readable onboarding for new developers
47
48
  ```
48
49
 
@@ -103,6 +104,21 @@ Use `Write` to create each file:
103
104
  - `.rune/decisions.md` — create with header `# Architecture Decisions` and one placeholder row in a markdown table (Date | Decision | Rationale | Status)
104
105
  - `.rune/progress.md` — create with header `# Progress Log` and one placeholder entry
105
106
  - `.rune/session-log.md` — create with header `# Session Log` and current date as first entry
107
+ - `.rune/instincts.md` — create with header `# Project Instincts` and a description: "Learned trigger→action patterns. Managed by session-bridge. See session-bridge SKILL.md Step 5.7 for format."
108
+
109
+ ### Step 5.5 — Load Existing Instincts
110
+
111
+ If `.rune/instincts.md` already exists and contains instinct entries, read it and include a summary in the Onboard Report under `### Learned Instincts`. This tells the agent what project-specific behaviors have been learned from previous sessions.
112
+
113
+ For each instinct with confidence ≥0.6, include in the report:
114
+ - Trigger and action (one line)
115
+ - Confidence level
116
+
117
+ Instincts with confidence <0.6 are still learning — mention count but don't list individually.
118
+
119
+ **Why**: Onboard is the first skill that runs in a new session. Surfacing instincts here ensures the agent starts with project-specific learned behaviors, not just static conventions.
120
+
121
+ > Source: affaan-m/everything-claude-code (91.9k★) — instinct-based learning with project isolation.
106
122
 
107
123
  ### Step 6b — Generate DEVELOPER-GUIDE.md
108
124
 
@@ -188,6 +204,26 @@ Based on your detected stack ([detected frameworks]), these extension packs may
188
204
  Install: [link or command when available]
189
205
  ```
190
206
 
207
+ ### Step 6d — Context Budget Check
208
+
209
+ Audit the project's baseline context cost from MCP servers and agent configurations. This helps developers understand why their context window fills up faster than expected.
210
+
211
+ 1. Count MCP tools available (from session start messages or `settings.json`)
212
+ 2. Check CLAUDE.md line count
213
+ 3. If total MCP tools >80 or CLAUDE.md >150 lines, include a **Context Budget Advisory** in the Onboard Report:
214
+
215
+ ```
216
+ ### Context Budget Advisory
217
+ - **MCP tools loaded**: [count] across [N] servers
218
+ - **CLAUDE.md size**: [N] lines
219
+ - **Estimated baseline**: ~[N]k tokens before any work begins
220
+ - **Recommendation**: [specific advice — disable unused MCP servers, move CLAUDE.md details to .rune/]
221
+ ```
222
+
223
+ **Skip if**: Total MCP tools ≤80 AND CLAUDE.md ≤150 lines (healthy baseline).
224
+
225
+ > Source: affaan-m/everything-claude-code (91.9k★) — MCP token cost awareness.
226
+
191
227
  ### Step 7 — Commit
192
228
  Use `Bash` to stage and commit the generated files:
193
229
  ```bash
@@ -256,6 +292,10 @@ If any of the `.rune/` files already exist, do not overwrite them (they may cont
256
292
  ### Skipped (already exist)
257
293
  - [list of files not overwritten]
258
294
 
295
+ ### Learned Instincts (if any)
296
+ - [trigger] → [action] (confidence: [0.6-0.9]) — for each high-confidence instinct
297
+ - [N] low-confidence instincts still learning
298
+
259
299
  ### Observations
260
300
  - [notable patterns or anomalies found]
261
301
  - [potential issues detected]
@@ -288,11 +328,23 @@ Known failure modes for this skill. Check these before declaring done.
288
328
  ## Done When
289
329
 
290
330
  - CLAUDE.md written (or merged) with all detected tech stack fields populated
291
- - .rune/ directory initialized with conventions, decisions, progress, session-log
331
+ - .rune/ directory initialized with conventions, decisions, progress, session-log, instincts
292
332
  - .rune/DEVELOPER-GUIDE.md written with setup commands from actual scan
293
333
  - All generated commands verified to exist in package.json/Makefile/etc.
294
334
  - Onboard Report emitted with Generated + Skipped + Observations sections
295
335
 
336
+ ## Returns
337
+
338
+ | Artifact | Format | Location |
339
+ |----------|--------|----------|
340
+ | Project AI config | Markdown | `CLAUDE.md` (project root) |
341
+ | Detected conventions | Markdown | `.rune/conventions.md` |
342
+ | Decision log (initialized) | Markdown | `.rune/decisions.md` |
343
+ | Developer onboarding guide | Markdown | `.rune/DEVELOPER-GUIDE.md` |
344
+ | Session/progress files | Markdown | `.rune/progress.md`, `.rune/session-log.md` |
345
+
296
346
  ## Cost Profile
297
347
 
298
348
  ~2000-5000 tokens input, ~1000-2000 tokens output. Sonnet for analysis quality.
349
+
350
+ **Scope guardrail:** onboard generates project context files — it does not modify source code, install dependencies, or change project configuration.
@@ -292,6 +292,17 @@ Known failure modes for this skill. Check these before declaring done.
292
292
  - Benchmark scripts ran (if configured) or INFO: skipped
293
293
  - Perf Report emitted with PASS/WARN/BLOCK verdict
294
294
 
295
+ ## Returns
296
+
297
+ | Artifact | Format | Location |
298
+ |----------|--------|----------|
299
+ | Perf Report with verdict | Markdown (PASS/WARN/BLOCK) | inline |
300
+ | Per-finding details | Structured list (file:line + impact) | inline |
301
+ | Lighthouse scores (if ran) | Score table | inline |
302
+ | Framework-specific findings | Categorized list | inline |
303
+
295
304
  ## Cost Profile
296
305
 
297
306
  ~3000-8000 tokens input, ~500-1500 tokens output. Sonnet for pattern recognition.
307
+
308
+ **Scope guardrail:** perf investigates and reports only — it does not fix code. All fixes are delegated to `fix` (L2) after the report is reviewed.