@rune-kit/rune 2.10.0 → 2.11.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 (205) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +8 -6
  3. package/commands/rune.md +168 -168
  4. package/contexts/dev.md +34 -34
  5. package/contexts/research.md +43 -43
  6. package/contexts/review.md +55 -55
  7. package/extensions/ai-ml/PACK.md +88 -88
  8. package/extensions/ai-ml/skills/ai-agents.md +172 -172
  9. package/extensions/ai-ml/skills/code-sandbox.md +187 -187
  10. package/extensions/ai-ml/skills/deep-research.md +146 -146
  11. package/extensions/ai-ml/skills/embedding-search.md +66 -66
  12. package/extensions/ai-ml/skills/fine-tuning-guide.md +74 -74
  13. package/extensions/ai-ml/skills/llm-architect.md +125 -125
  14. package/extensions/ai-ml/skills/llm-integration.md +64 -64
  15. package/extensions/ai-ml/skills/prompt-patterns.md +72 -72
  16. package/extensions/ai-ml/skills/rag-patterns.md +66 -66
  17. package/extensions/ai-ml/skills/web-extraction.md +114 -114
  18. package/extensions/analytics/PACK.md +92 -92
  19. package/extensions/analytics/skills/ab-testing.md +72 -72
  20. package/extensions/analytics/skills/dashboard-patterns.md +83 -83
  21. package/extensions/analytics/skills/data-validation.md +68 -68
  22. package/extensions/analytics/skills/funnel-analysis.md +81 -81
  23. package/extensions/analytics/skills/sql-patterns.md +57 -57
  24. package/extensions/analytics/skills/statistical-analysis.md +79 -79
  25. package/extensions/analytics/skills/tracking-setup.md +71 -71
  26. package/extensions/backend/PACK.md +104 -104
  27. package/extensions/backend/skills/api-patterns.md +84 -84
  28. package/extensions/backend/skills/async-pipeline.md +193 -193
  29. package/extensions/backend/skills/auth-patterns.md +97 -97
  30. package/extensions/backend/skills/background-jobs.md +133 -133
  31. package/extensions/backend/skills/caching-patterns.md +108 -108
  32. package/extensions/backend/skills/cli-generation.md +133 -133
  33. package/extensions/backend/skills/database-patterns.md +87 -87
  34. package/extensions/backend/skills/middleware-patterns.md +104 -104
  35. package/extensions/chrome-ext/PACK.md +93 -93
  36. package/extensions/chrome-ext/skills/cws-preflight.md +143 -143
  37. package/extensions/chrome-ext/skills/cws-publish.md +104 -104
  38. package/extensions/chrome-ext/skills/ext-ai-integration.md +251 -251
  39. package/extensions/chrome-ext/skills/ext-messaging.md +139 -139
  40. package/extensions/chrome-ext/skills/ext-storage.md +133 -133
  41. package/extensions/chrome-ext/skills/mv3-scaffold.md +164 -164
  42. package/extensions/content/PACK.md +96 -96
  43. package/extensions/content/skills/blog-patterns.md +88 -88
  44. package/extensions/content/skills/cms-integration.md +131 -131
  45. package/extensions/content/skills/content-scoring.md +107 -107
  46. package/extensions/content/skills/i18n.md +83 -83
  47. package/extensions/content/skills/mdx-authoring.md +137 -137
  48. package/extensions/content/skills/reference.md +1014 -1014
  49. package/extensions/content/skills/seo-patterns.md +67 -67
  50. package/extensions/content/skills/video-repurpose.md +153 -153
  51. package/extensions/devops/PACK.md +101 -101
  52. package/extensions/devops/skills/chaos-testing.md +67 -67
  53. package/extensions/devops/skills/ci-cd.md +75 -75
  54. package/extensions/devops/skills/docker.md +58 -58
  55. package/extensions/devops/skills/edge-serverless.md +163 -163
  56. package/extensions/devops/skills/infra-as-code.md +158 -158
  57. package/extensions/devops/skills/kubernetes.md +110 -110
  58. package/extensions/devops/skills/monitoring.md +57 -57
  59. package/extensions/devops/skills/server-setup.md +64 -64
  60. package/extensions/devops/skills/ssl-domain.md +42 -42
  61. package/extensions/ecommerce/PACK.md +116 -116
  62. package/extensions/ecommerce/skills/cart-system.md +79 -79
  63. package/extensions/ecommerce/skills/inventory-mgmt.md +102 -102
  64. package/extensions/ecommerce/skills/order-management.md +126 -126
  65. package/extensions/ecommerce/skills/payment-integration.md +472 -472
  66. package/extensions/ecommerce/skills/shopify-dev.md +69 -69
  67. package/extensions/ecommerce/skills/subscription-billing.md +93 -93
  68. package/extensions/ecommerce/skills/tax-compliance.md +117 -117
  69. package/extensions/gamedev/PACK.md +142 -142
  70. package/extensions/gamedev/skills/asset-pipeline.md +74 -74
  71. package/extensions/gamedev/skills/audio-system.md +129 -129
  72. package/extensions/gamedev/skills/camera-system.md +87 -87
  73. package/extensions/gamedev/skills/ecs.md +98 -98
  74. package/extensions/gamedev/skills/game-loops.md +72 -72
  75. package/extensions/gamedev/skills/input-system.md +199 -199
  76. package/extensions/gamedev/skills/multiplayer.md +180 -180
  77. package/extensions/gamedev/skills/particles.md +105 -105
  78. package/extensions/gamedev/skills/physics-engine.md +89 -89
  79. package/extensions/gamedev/skills/scene-management.md +146 -146
  80. package/extensions/gamedev/skills/threejs-patterns.md +90 -90
  81. package/extensions/gamedev/skills/webgl.md +71 -71
  82. package/extensions/mobile/PACK.md +106 -106
  83. package/extensions/mobile/skills/app-store-connect.md +152 -152
  84. package/extensions/mobile/skills/app-store-prep.md +66 -66
  85. package/extensions/mobile/skills/deep-linking.md +109 -109
  86. package/extensions/mobile/skills/flutter.md +60 -60
  87. package/extensions/mobile/skills/ios-build-pipeline.md +142 -142
  88. package/extensions/mobile/skills/native-bridge.md +66 -66
  89. package/extensions/mobile/skills/ota-updates.md +97 -97
  90. package/extensions/mobile/skills/push-notifications.md +111 -111
  91. package/extensions/mobile/skills/react-native.md +82 -82
  92. package/extensions/saas/PACK.md +116 -116
  93. package/extensions/saas/skills/billing-integration.md +200 -200
  94. package/extensions/saas/skills/feature-flags.md +130 -130
  95. package/extensions/saas/skills/multi-tenant.md +103 -103
  96. package/extensions/saas/skills/onboarding-flow.md +139 -139
  97. package/extensions/saas/skills/subscription-flow.md +95 -95
  98. package/extensions/saas/skills/team-management.md +144 -144
  99. package/extensions/security/PACK.md +99 -99
  100. package/extensions/security/skills/api-security.md +140 -140
  101. package/extensions/security/skills/compliance.md +68 -68
  102. package/extensions/security/skills/owasp-audit.md +64 -64
  103. package/extensions/security/skills/pentest-patterns.md +77 -77
  104. package/extensions/security/skills/secret-mgmt.md +65 -65
  105. package/extensions/security/skills/supply-chain.md +65 -65
  106. package/extensions/trading/PACK.md +80 -80
  107. package/extensions/trading/skills/chart-components.md +55 -55
  108. package/extensions/trading/skills/experiment-loop.md +125 -125
  109. package/extensions/trading/skills/fintech-patterns.md +47 -47
  110. package/extensions/trading/skills/indicator-library.md +58 -58
  111. package/extensions/trading/skills/quant-analysis.md +111 -111
  112. package/extensions/trading/skills/realtime-data.md +58 -58
  113. package/extensions/trading/skills/trade-logic.md +104 -104
  114. package/extensions/ui/PACK.md +130 -130
  115. package/extensions/ui/skills/a11y-audit.md +91 -91
  116. package/extensions/ui/skills/animation-patterns.md +127 -127
  117. package/extensions/ui/skills/component-patterns.md +100 -100
  118. package/extensions/ui/skills/design-decision.md +108 -108
  119. package/extensions/ui/skills/design-system.md +68 -68
  120. package/extensions/ui/skills/landing-patterns.md +155 -155
  121. package/extensions/ui/skills/palette-picker.md +173 -173
  122. package/extensions/ui/skills/react-health.md +90 -90
  123. package/extensions/ui/skills/type-system.md +125 -125
  124. package/extensions/ui/skills/web-vitals.md +153 -153
  125. package/extensions/zalo/PACK.md +145 -145
  126. package/extensions/zalo/skills/zalo-oa-mcp.md +317 -317
  127. package/extensions/zalo/skills/zalo-oa-messaging.md +429 -429
  128. package/extensions/zalo/skills/zalo-oa-setup.md +236 -236
  129. package/extensions/zalo/skills/zalo-oa-webhook.md +189 -189
  130. package/extensions/zalo/skills/zalo-personal-messaging.md +194 -194
  131. package/extensions/zalo/skills/zalo-personal-setup.md +153 -153
  132. package/extensions/zalo/skills/zalo-rate-guard.md +219 -219
  133. package/hooks/auto-format/index.cjs +48 -48
  134. package/hooks/hooks.json +111 -111
  135. package/hooks/post-session-reflect/index.cjs +189 -189
  136. package/hooks/pre-compact/index.cjs +95 -95
  137. package/hooks/run-hook.cmd +1 -1
  138. package/hooks/secrets-scan/index.cjs +100 -100
  139. package/hooks/session-start/index.cjs +71 -71
  140. package/hooks/typecheck/index.cjs +65 -65
  141. package/package.json +63 -63
  142. package/references/ui-pro-max-data/LICENSE-UI-PRO-MAX +21 -21
  143. package/references/ui-pro-max-data/charts.csv +26 -26
  144. package/references/ui-pro-max-data/colors.csv +161 -161
  145. package/references/ui-pro-max-data/styles.csv +68 -68
  146. package/references/ui-pro-max-data/typography.csv +74 -74
  147. package/references/ui-pro-max-data/ui-reasoning.csv +162 -162
  148. package/references/ui-pro-max-data/ux-guidelines.csv +99 -99
  149. package/skills/adversary/SKILL.md +283 -283
  150. package/skills/asset-creator/SKILL.md +157 -157
  151. package/skills/audit/SKILL.md +147 -2
  152. package/skills/autopsy/SKILL.md +335 -335
  153. package/skills/brainstorm/SKILL.md +342 -342
  154. package/skills/browser-pilot/SKILL.md +168 -168
  155. package/skills/constraint-check/SKILL.md +165 -165
  156. package/skills/context-engine/SKILL.md +404 -404
  157. package/skills/cook/SKILL.md +917 -863
  158. package/skills/db/SKILL.md +273 -273
  159. package/skills/debug/SKILL.md +465 -465
  160. package/skills/dependency-doctor/SKILL.md +265 -235
  161. package/skills/deploy/SKILL.md +274 -231
  162. package/skills/design/DESIGN-REFERENCE.md +365 -365
  163. package/skills/design/SKILL.md +589 -589
  164. package/skills/doc-processor/SKILL.md +254 -254
  165. package/skills/docs/SKILL.md +374 -374
  166. package/skills/docs-seeker/SKILL.md +177 -177
  167. package/skills/fix/SKILL.md +330 -330
  168. package/skills/git/SKILL.md +339 -339
  169. package/skills/hallucination-guard/SKILL.md +219 -219
  170. package/skills/incident/SKILL.md +254 -253
  171. package/skills/integrity-check/SKILL.md +169 -169
  172. package/skills/journal/SKILL.md +240 -240
  173. package/skills/launch/SKILL.md +344 -344
  174. package/skills/logic-guardian/SKILL.md +251 -251
  175. package/skills/marketing/SKILL.md +290 -289
  176. package/skills/mcp-builder/SKILL.md +425 -425
  177. package/skills/neural-memory/SKILL.md +362 -362
  178. package/skills/onboard/SKILL.md +404 -403
  179. package/skills/perf/SKILL.md +346 -346
  180. package/skills/plan/SKILL.md +433 -428
  181. package/skills/preflight/SKILL.md +415 -415
  182. package/skills/problem-solver/SKILL.md +380 -284
  183. package/skills/rescue/SKILL.md +474 -474
  184. package/skills/retro/SKILL.md +3 -1
  185. package/skills/review/SKILL.md +612 -588
  186. package/skills/review-intake/SKILL.md +249 -249
  187. package/skills/safeguard/SKILL.md +200 -200
  188. package/skills/sast/SKILL.md +190 -190
  189. package/skills/scaffold/SKILL.md +328 -287
  190. package/skills/scope-guard/SKILL.md +180 -180
  191. package/skills/scout/SKILL.md +263 -263
  192. package/skills/sentinel/SKILL.md +382 -381
  193. package/skills/sentinel-env/SKILL.md +254 -254
  194. package/skills/sequential-thinking/SKILL.md +234 -234
  195. package/skills/session-bridge/SKILL.md +543 -543
  196. package/skills/skill-forge/SKILL.md +581 -581
  197. package/skills/skill-router/SKILL.md +3 -0
  198. package/skills/surgeon/SKILL.md +215 -215
  199. package/skills/team/SKILL.md +556 -537
  200. package/skills/test/SKILL.md +614 -614
  201. package/skills/trend-scout/SKILL.md +145 -145
  202. package/skills/verification/SKILL.md +326 -326
  203. package/skills/video-creator/SKILL.md +201 -201
  204. package/skills/watchdog/SKILL.md +168 -168
  205. package/skills/worktree/SKILL.md +140 -140
@@ -1,403 +1,404 @@
1
- ---
2
- name: onboard
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
- metadata:
5
- author: runedev
6
- version: "0.4.0"
7
- layer: L2
8
- model: sonnet
9
- group: quality
10
- tools: "Read, Write, Edit, Glob, Grep"
11
- emit: project.onboarded
12
- ---
13
-
14
- # onboard
15
-
16
- ## Purpose
17
-
18
- Auto-generate project context for AI sessions. Scans the codebase and creates a CLAUDE.md project config plus .rune/ state directory so every future session starts with full context. Saves 10-20 minutes of re-explaining per session on undocumented projects.
19
-
20
- ## Triggers
21
-
22
- - `/rune onboard` — manual invocation on any project
23
- - Called by `rescue` as Phase 0 (understand before refactoring)
24
- - Auto-trigger: when no CLAUDE.md exists in project root
25
-
26
- ## Calls (outbound)
27
-
28
- - `scout` (L2): deep codebase scan — structure, frameworks, patterns, dependencies
29
- - `autopsy` (L2): when project appears messy or undocumented health assessment
30
-
31
- ## Called By (inbound)
32
-
33
- - User: `/rune onboard` manual invocation
34
- - `rescue` (L1): Phase 0 understand legacy project before refactoring
35
- - `cook` (L1): if no CLAUDE.md found, onboard first
36
-
37
- ## Output Files
38
-
39
- ```
40
- project/
41
- ├── CLAUDE.md # Project config for AI sessions
42
- └── .rune/
43
- ├── conventions.md # Detected patterns & style
44
- ├── decisions.md # Empty, ready for session-bridge
45
- ├── progress.md # Empty, ready for session-bridge
46
- ├── session-log.md # Empty, ready for session-bridge
47
- ├── instincts.md # Empty, ready for session-bridge instinct learning
48
- ├── contract.md # Project invariants enforced by cook/sentinel
49
- └── DEVELOPER-GUIDE.md # Human-readable onboarding for new developers
50
- ```
51
-
52
- ## Executable Steps
53
-
54
- ### Step 1 — Full Scan
55
- Invoke `rune:scout` on the project root. Collect:
56
- - Top-level directory structure (depth 2)
57
- - All config files: `package.json`, `pyproject.toml`, `Cargo.toml`, `go.mod`, `composer.json`, `.nvmrc`, `.python-version`, `Pipfile.lock`, `poetry.lock`, `uv.lock`
58
- - Python environment markers: `.venv/`, `venv/`, `conda-meta/`, `.python-version`
59
- - Entry point files: `main.*`, `index.*`, `app.*`, `server.*`
60
- - Test directory names and test file patterns
61
- - CI/CD config files: `.github/workflows/`, `Makefile`, `Dockerfile`
62
- - README.md if present
63
-
64
- Do not read every source file — scout gives the skeleton. Use `Read` only on config files and entry points.
65
-
66
- ### Step 2 — Detect Tech Stack
67
- From the scan output, determine with confidence:
68
- - **Language**: TypeScript | JavaScript | Python | Rust | Go | other
69
- - **Framework**: Next.js | Vite+React | SvelteKit | Express | FastAPI | Django | none | other
70
- - **Package manager**: npm | pnpm | yarn | pip | poetry | cargo | go modules
71
- - **Test framework**: Vitest | Jest | pytest | cargo test | go test | none
72
- - **Build tool**: tsc | vite | webpack | esbuild | cargo | none
73
- - **Linter/formatter**: ESLint | Biome | Ruff | Black | Clippy | none
74
- - **Python environment** (if Python project): detect from project markers:
75
- - `.venv/` or `venv/` directory venv
76
- - `poetry.lock`poetry
77
- - `uv.lock` → uv
78
- - `.python-version` → pyenv
79
- - `conda-meta/` or `environment.yml`conda
80
- - `Pipfile.lock` → pipenv
81
- - None found none (note: recommend setting up a virtual environment)
82
-
83
- If a field cannot be determined with confidence, write "unknown" — do not guess.
84
-
85
- ### Step 3 — Extract Conventions
86
- Read 3–5 representative source files (pick files with the most connections in the project typically the main module, a route/controller file, and a utility file). Extract:
87
- - **Naming patterns**: camelCase | snake_case | PascalCase for files, functions, variables
88
- - **Import style**: named imports | default imports | barrel files (index.ts)
89
- - **Error handling pattern**: try/catch | Result type | error boundary | unhandled
90
- - **State management**: React Context | Zustand | Redux | Svelte stores | none
91
- - **API pattern**: REST | tRPC | GraphQL | SDK | none
92
- - **Test structure**: co-located (`file.test.ts`) | separate directory (`tests/`) | none
93
-
94
- Write extracted conventions as bullet points — be specific, not generic.
95
-
96
- ### Step 4 — Generate CLAUDE.md
97
- Use `Write` to create `CLAUDE.md` at the project root. Populate every section using data from Steps 2–3. Do not leave template placeholders — if data is unknown, write "unknown" or omit the section. Use the template below as the exact structure.
98
-
99
- If a `CLAUDE.md` already exists, use `Read` to load it first, then merge — preserve any human-written sections (comments starting with `<!-- manual -->`) and update auto-detected sections only.
100
-
101
- ### Step 5 — Initialize .rune/ Directory
102
- Use `Bash` to create the directory: `mkdir -p .rune`
103
-
104
- Use `Write` to create each file:
105
- - `.rune/conventions.md` paste the extracted conventions from Step 3 in full detail
106
- - `.rune/decisions.md` — create with header `# Architecture Decisions` and one placeholder row in a markdown table (Date | Decision | Rationale | Status)
107
- - `.rune/progress.md` — create with header `# Progress Log` and one placeholder entry
108
- - `.rune/session-log.md` — create with header `# Session Log` and current date as first entry
109
- - `.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."
110
- - `.rune/contract.md` — generate a starter contract based on the detected tech stack:
111
- - Copy structure from `docs/CONTRACT-TEMPLATE.md`
112
- - Customize rules based on Step 2 findings (e.g., Python → add `no bare except`, Node.js → add `no console.log`, SQL database → add parameterized queries rule)
113
- - Remove sections that don't apply (e.g., `contract.operations` for a library with no deployed service)
114
- - The contract is a starting point tell the user to review and customize it
115
-
116
- ### Step 5.5 — Load Existing Instincts
117
-
118
- 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.
119
-
120
- For each instinct with confidence ≥0.6, include in the report:
121
- - Trigger and action (one line)
122
- - Confidence level
123
-
124
- Instincts with confidence <0.6 are still learning — mention count but don't list individually.
125
-
126
- **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.
127
-
128
- ### Step 6b — Generate DEVELOPER-GUIDE.md
129
-
130
- Use the data from Steps 2–3 to generate `.rune/DEVELOPER-GUIDE.md` — a human-readable onboarding guide for new team members joining the project. This is NOT AI context. This is plain English for humans.
131
-
132
- Use `Write` to create `.rune/DEVELOPER-GUIDE.md` with this template:
133
-
134
- ```markdown
135
- # Developer Guide: [Project Name]
136
-
137
- ## What This Does
138
- [2 sentences max. What problem does this project solve? Who uses it?]
139
-
140
- ## Quick Setup
141
- [Copy-paste commands to get from zero to running locally]
142
- ```bash
143
- # [Python projects] Activate virtual environment
144
- [detected activation command e.g., source .venv/bin/activate | poetry shell | uv venv && source .venv/bin/activate]
145
-
146
- # Install dependencies
147
- [detected command — e.g., pip install -e ".[dev]" | poetry install | npm install]
148
-
149
- # Run development server
150
- [detected command]
151
-
152
- # Run tests
153
- [detected command]
154
- ```
155
-
156
- ## Key Files
157
- [5–10 most important files with one-line description each]
158
- - `[path]` [what it does]
159
-
160
- ## How to Contribute
161
- 1. Fork or branch from main
162
- 2. Make changes, run tests: `[test command]`
163
- 3. Open a PR describe what and why
164
-
165
- ## Common Issues
166
- [Top 3 "it doesn't work" situations with fixes. Only include issues you can infer from the codebase — e.g., missing .env, wrong Node version, database not running]
167
-
168
- [Python projects — always include these if applicable:]
169
- - **ModuleNotFoundError** Virtual environment not activated. Run: `[activation command]`
170
- - **ImportError: cannot import name X** → Dependencies outdated. Run: `[install command]`
171
- - **PYTHONPATH issues** If using src layout, install in editable mode: `pip install -e .`
172
-
173
- ## Who to Ask
174
- [If git log reveals consistent contributors, list them. Otherwise omit this section.]
175
- ```
176
-
177
- If `.rune/DEVELOPER-GUIDE.md` already exists, skip and log **INFO**: "Skipped existing .rune/DEVELOPER-GUIDE.md — manual content preserved."
178
-
179
- ### Step 6c — Suggest L4 Extension Packs
180
-
181
- Based on the detected tech stack from Step 2, recommend relevant L4 extension packs. Use the mapping table below to find applicable packs. Only suggest packs that match the detected stack — do not suggest all packs.
182
-
183
- | Detected Stack | Suggest Pack | Why |
184
- |----------------|-------------|-----|
185
- | React, Next.js, Vue, Svelte, SvelteKit | `@rune/ui` | Frontend component patterns, design system, accessibility audit |
186
- | Express, Fastify, FastAPI, Django, NestJS, Go HTTP | `@rune/backend` | API patterns, auth flows, middleware, rate limiting |
187
- | Docker, GitHub Actions, Kubernetes, Terraform, CI/CD config | `@rune/devops` | Container patterns, deployment pipelines, infrastructure as code |
188
- | React Native, Expo, Flutter, SwiftUI | `@rune/mobile` | Mobile architecture, navigation patterns, offline sync |
189
- | Security-focused codebase (auth, payments, HIPAA/PCI markers) | `@rune/security` | Threat modeling, OWASP flows, compliance patterns |
190
- | Trading, finance, pricing, portfolio, market data | `@rune/trading` | Market data validation, risk calculation, backtesting patterns |
191
- | Subscription billing, tenant isolation, feature flags | `@rune/saas` | Multi-tenancy, billing integration, feature flag patterns |
192
- | Cart, checkout, product catalog, inventory, payments | `@rune/ecommerce` | Cart patterns, payment flows, inventory management |
193
- | ML models, training pipelines, embeddings, LLM integration | `@rune/ai-ml` | Model evaluation, prompt patterns, inference optimization |
194
- | Game loop, physics, entity systems, multiplayer | `@rune/gamedev` | Game architecture, ECS patterns, netcode |
195
- | CMS, blog, newsletter, SEO, content workflows | `@rune/content` | Content modeling, SEO patterns, editorial workflows |
196
- | Analytics, dashboards, metrics, data pipelines, BI | `@rune/analytics` | Data modeling, visualization patterns, pipeline architecture |
197
-
198
- If 0 packs match: omit this section from the report (no suggestions is correct for a generic project).
199
-
200
- **Community pack discovery**: Also check if `.rune/community-packs/registry.json` exists. If it does, list installed community packs alongside core pack suggestions. If community packs are installed, include them under a `### Installed Community Packs` subsection.
201
-
202
- If ≥1 packs match: include in the Onboard Report under a `### Suggested L4 Packs` section:
203
-
204
- ```
205
- ### Suggested L4 Packs
206
- Based on your detected stack ([detected frameworks]), these extension packs may be useful:
207
-
208
- - **@rune/[pack]** — [one-line reason based on detected stack]
209
- Install: [link or command when available]
210
- ```
211
-
212
- ### Step 6d — Context Budget Check
213
-
214
- 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.
215
-
216
- 1. Count MCP tools available (from session start messages or `settings.json`)
217
- 2. Check CLAUDE.md line count
218
- 3. If total MCP tools >80 or CLAUDE.md >150 lines, include a **Context Budget Advisory** in the Onboard Report:
219
-
220
- ```
221
- ### Context Budget Advisory
222
- - **MCP tools loaded**: [count] across [N] servers
223
- - **CLAUDE.md size**: [N] lines
224
- - **Estimated baseline**: ~[N]k tokens before any work begins
225
- - **Recommendation**: [specific advice disable unused MCP servers, move CLAUDE.md details to .rune/]
226
- ```
227
-
228
- **Skip if**: Total MCP tools ≤80 AND CLAUDE.md ≤150 lines (healthy baseline).
229
-
230
- ### Step 6e — AI-Driven Interview (Optional, User-Initiated)
231
-
232
- When invoked as `/rune onboard --interview` or when the project is too ambiguous for automated detection (e.g., no package.json, no clear entry point, mixed languages), switch to **conversational onboarding** — the AI asks targeted questions instead of relying solely on file scanning.
233
-
234
- #### Interview Flow
235
-
236
- Ask 5-8 questions in sequence, adapting based on answers. Start broad, narrow based on responses:
237
-
238
- ```
239
- Q1: "What does this project do in one sentence?"
240
- Captures purpose (README may be missing or outdated)
241
-
242
- Q2: "Who uses this — internal team, external users, or both?"
243
- Determines audience, affects DEVELOPER-GUIDE.md tone
244
-
245
- Q3: "What's the main entry point — where does execution start?"
246
- Bypasses file scanning for complex monorepos
247
-
248
- Q4: "What commands do you use daily? (dev server, tests, build)"
249
- Gets verified commands instead of guessing from config files
250
-
251
- Q5: "Any areas of the codebase you'd warn a new developer about?"
252
- Captures tribal knowledge that no scan can detect
253
-
254
- Q6: "Are there external services this depends on? (databases, APIs, queues)"
255
- Maps integration points for Architecture Map
256
-
257
- Q7: "What's the deployment story — how does code get to production?"
258
- Captures CI/CD context
259
-
260
- Q8 (conditional): "Anything else a new session should know that's not in the code?"
261
- Catches edge cases, workarounds, known issues
262
- ```
263
-
264
- #### Interview Rules
265
-
266
- - **Adapt**: Skip questions that were already answered by earlier responses. If Q1 reveals "it's a Next.js app", don't ask about the framework.
267
- - **Validate**: Cross-reference answers with actual file scan results. If user says "we use Jest" but `vitest.config.ts` exists, ask to clarify.
268
- - **Merge**: Interview answers supplement (not replace) automated scan. Scan provides facts, interview provides context and intent.
269
- - **Store**: Save interview responses as high-confidence entries in `.rune/conventions.md` and `.rune/cumulative-notes.md` (tagged `[from-interview]`)
270
-
271
- #### When to Auto-Suggest Interview
272
-
273
- Suggest switching to interview mode (but don't force it) when:
274
- - Step 2 produces 3+ "unknown" fields in tech stack detection
275
- - Project has no README.md and no package.json/pyproject.toml/Cargo.toml
276
- - Project appears to be a monorepo with 3+ distinct sub-projects
277
-
278
- Output: `"ℹ️ This project is hard to auto-detect. Run /rune onboard --interview for guided setup."`
279
-
280
- ### Step 7 — Commit
281
- Use `Bash` to stage and commit the generated files:
282
- ```bash
283
- git add CLAUDE.md .rune/ && git commit -m "chore: initialize rune project context"
284
- ```
285
-
286
- If `git` is not available or the directory is not a git repo, skip this step and add an INFO note to the report: "Not a git repository — files written but not committed."
287
-
288
- If any of the `.rune/` files already exist, do not overwrite them (they may contain human-written decisions). Log **INFO**: "Skipped existing .rune/[file] — manual content preserved."
289
-
290
- ## CLAUDE.md Template
291
-
292
- ```markdown
293
- # [Project Name] — Project Configuration
294
-
295
- ## Overview
296
- [Auto-detected description from README or entry point comments]
297
-
298
- ## Tech Stack
299
- - Framework: [detected]
300
- - Language: [detected]
301
- - Package Manager: [detected]
302
- - Test Framework: [detected]
303
- - Build Tool: [detected]
304
- - Linter: [detected]
305
- - Python Environment: [detected — venv/poetry/uv/conda/pyenv/pipenv/none] (only if Python project)
306
-
307
- ## Directory Structure
308
- [Generated tree with one-line annotations per directory]
309
-
310
- ## Conventions
311
- - Naming: [detected patterns — specific, not generic]
312
- - Error handling: [detected pattern]
313
- - State management: [detected pattern]
314
- - API pattern: [detected pattern]
315
- - Test structure: [detected pattern]
316
-
317
- ## Commands
318
- - Install: [detected command]
319
- - Dev: [detected command]
320
- - Build: [detected command]
321
- - Test: [detected command]
322
- - Lint: [detected command]
323
-
324
- ## Key Files
325
- - Entry point: [absolute path]
326
- - Config: [absolute paths]
327
- - Routes/API: [absolute paths]
328
- ```
329
-
330
- ## Output Format
331
-
332
- ```
333
- ## Onboard Report
334
- - **Project**: [name] | **Framework**: [detected] | **Language**: [detected]
335
- - **Files**: [count] | **LOC**: [estimate] | **Modules**: [count]
336
-
337
- ### Generated
338
- - CLAUDE.md (project configuration)
339
- - .rune/conventions.md (detected patterns)
340
- - .rune/decisions.md (initialized)
341
- - .rune/progress.md (initialized)
342
- - .rune/session-log.md (initialized)
343
- - .rune/DEVELOPER-GUIDE.md (human onboarding guide)
344
-
345
- ### Skipped (already exist)
346
- - [list of files not overwritten]
347
-
348
- ### Learned Instincts (if any)
349
- - [trigger] [action] (confidence: [0.6-0.9]) — for each high-confidence instinct
350
- - [N] low-confidence instincts still learning
351
-
352
- ### Observations
353
- - [notable patterns or anomalies found]
354
- - [potential issues detected]
355
- - [recommendations for the developer]
356
-
357
- ### Suggested L4 Packs
358
- - **@rune/[pack]** [reason] (only shown if applicable packs detected)
359
- ```
360
-
361
- ## Constraints
362
-
363
- 1. MUST scan actual project files — never generate CLAUDE.md from assumptions
364
- 2. MUST detect and respect existing CLAUDE.md content — merge, don't overwrite
365
- 3. MUST include: build commands, test commands, lint commands, project structure
366
- 4. MUST NOT include obvious/generic advice ("write clean code", "use meaningful names")
367
- 5. MUST verify generated commands actually work by running them
368
- 6. MUST NOT overwrite existing .rune/ files always preserve human-written content
369
-
370
- ## Sharp Edges
371
-
372
- Known failure modes for this skill. Check these before declaring done.
373
-
374
- | Failure Mode | Severity | Mitigation |
375
- |---|---|---|
376
- | CLAUDE.md generated from README alone (no file scan) | CRITICAL | Step 1 MUST invoke scout — never skip actual file scanning |
377
- | DEVELOPER-GUIDE.md contains generic placeholder text not derived from project | HIGH | Every section must reference actual detected commands, files, and patterns no generic advice |
378
- | Overwriting existing .rune/ files with manual content | CRITICAL | Check file existence before every Write skip and log INFO if exists |
379
- | Common Issues section fabricated (no actual issues detected) | MEDIUM | Only list issues inferable from codebase (missing .env, Node version, etc.) — omit section if none found |
380
-
381
- ## Done When
382
-
383
- - CLAUDE.md written (or merged) with all detected tech stack fields populated
384
- - .rune/ directory initialized with conventions, decisions, progress, session-log, instincts
385
- - .rune/DEVELOPER-GUIDE.md written with setup commands from actual scan
386
- - All generated commands verified to exist in package.json/Makefile/etc.
387
- - Onboard Report emitted with Generated + Skipped + Observations sections
388
-
389
- ## Returns
390
-
391
- | Artifact | Format | Location |
392
- |----------|--------|----------|
393
- | Project AI config | Markdown | `CLAUDE.md` (project root) |
394
- | Detected conventions | Markdown | `.rune/conventions.md` |
395
- | Decision log (initialized) | Markdown | `.rune/decisions.md` |
396
- | Developer onboarding guide | Markdown | `.rune/DEVELOPER-GUIDE.md` |
397
- | Session/progress files | Markdown | `.rune/progress.md`, `.rune/session-log.md` |
398
-
399
- ## Cost Profile
400
-
401
- ~2000-5000 tokens input, ~1000-2000 tokens output. Sonnet for analysis quality.
402
-
403
- **Scope guardrail:** onboard generates project context files — it does not modify source code, install dependencies, or change project configuration.
1
+ ---
2
+ name: onboard
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
+ metadata:
5
+ author: runedev
6
+ version: "0.4.0"
7
+ layer: L2
8
+ model: sonnet
9
+ group: quality
10
+ tools: "Read, Write, Edit, Glob, Grep"
11
+ emit: project.onboarded
12
+ ---
13
+
14
+ # onboard
15
+
16
+ ## Purpose
17
+
18
+ Auto-generate project context for AI sessions. Scans the codebase and creates a CLAUDE.md project config plus .rune/ state directory so every future session starts with full context. Saves 10-20 minutes of re-explaining per session on undocumented projects.
19
+
20
+ ## Triggers
21
+
22
+ - `/rune onboard` — manual invocation on any project
23
+ - Called by `rescue` as Phase 0 (understand before refactoring)
24
+ - Auto-trigger: when no CLAUDE.md exists in project root
25
+
26
+ ## Calls (outbound)
27
+
28
+ - `scout` (L2): deep codebase scan — structure, frameworks, patterns, dependencies
29
+ - `sentinel-env` (L3): validate developer environment (runtime versions, required tools, env vars) so the onboarded project is actually runnable
30
+ - `autopsy` (L2): when project appears messy or undocumented — health assessment
31
+
32
+ ## Called By (inbound)
33
+
34
+ - User: `/rune onboard` manual invocation
35
+ - `rescue` (L1): Phase 0 understand legacy project before refactoring
36
+ - `cook` (L1): if no CLAUDE.md found, onboard first
37
+
38
+ ## Output Files
39
+
40
+ ```
41
+ project/
42
+ ├── CLAUDE.md # Project config for AI sessions
43
+ └── .rune/
44
+ ├── conventions.md # Detected patterns & style
45
+ ├── decisions.md # Empty, ready for session-bridge
46
+ ├── progress.md # Empty, ready for session-bridge
47
+ ├── session-log.md # Empty, ready for session-bridge
48
+ ├── instincts.md # Empty, ready for session-bridge instinct learning
49
+ ├── contract.md # Project invariants enforced by cook/sentinel
50
+ └── DEVELOPER-GUIDE.md # Human-readable onboarding for new developers
51
+ ```
52
+
53
+ ## Executable Steps
54
+
55
+ ### Step 1 Full Scan
56
+ Invoke `rune:scout` on the project root. Collect:
57
+ - Top-level directory structure (depth 2)
58
+ - All config files: `package.json`, `pyproject.toml`, `Cargo.toml`, `go.mod`, `composer.json`, `.nvmrc`, `.python-version`, `Pipfile.lock`, `poetry.lock`, `uv.lock`
59
+ - Python environment markers: `.venv/`, `venv/`, `conda-meta/`, `.python-version`
60
+ - Entry point files: `main.*`, `index.*`, `app.*`, `server.*`
61
+ - Test directory names and test file patterns
62
+ - CI/CD config files: `.github/workflows/`, `Makefile`, `Dockerfile`
63
+ - README.md if present
64
+
65
+ Do not read every source file — scout gives the skeleton. Use `Read` only on config files and entry points.
66
+
67
+ ### Step 2 Detect Tech Stack
68
+ From the scan output, determine with confidence:
69
+ - **Language**: TypeScript | JavaScript | Python | Rust | Go | other
70
+ - **Framework**: Next.js | Vite+React | SvelteKit | Express | FastAPI | Django | none | other
71
+ - **Package manager**: npm | pnpm | yarn | pip | poetry | cargo | go modules
72
+ - **Test framework**: Vitest | Jest | pytest | cargo test | go test | none
73
+ - **Build tool**: tsc | vite | webpack | esbuild | cargo | none
74
+ - **Linter/formatter**: ESLint | Biome | Ruff | Black | Clippy | none
75
+ - **Python environment** (if Python project): detect from project markers:
76
+ - `.venv/` or `venv/` directory venv
77
+ - `poetry.lock` → poetry
78
+ - `uv.lock`uv
79
+ - `.python-version` → pyenv
80
+ - `conda-meta/` or `environment.yml` → conda
81
+ - `Pipfile.lock`pipenv
82
+ - None found → none (note: recommend setting up a virtual environment)
83
+
84
+ If a field cannot be determined with confidence, write "unknown" — do not guess.
85
+
86
+ ### Step 3 — Extract Conventions
87
+ Read 3–5 representative source files (pick files with the most connections in the project — typically the main module, a route/controller file, and a utility file). Extract:
88
+ - **Naming patterns**: camelCase | snake_case | PascalCase for files, functions, variables
89
+ - **Import style**: named imports | default imports | barrel files (index.ts)
90
+ - **Error handling pattern**: try/catch | Result type | error boundary | unhandled
91
+ - **State management**: React Context | Zustand | Redux | Svelte stores | none
92
+ - **API pattern**: REST | tRPC | GraphQL | SDK | none
93
+ - **Test structure**: co-located (`file.test.ts`) | separate directory (`tests/`) | none
94
+
95
+ Write extracted conventions as bullet points — be specific, not generic.
96
+
97
+ ### Step 4 Generate CLAUDE.md
98
+ Use `Write` to create `CLAUDE.md` at the project root. Populate every section using data from Steps 2–3. Do not leave template placeholders — if data is unknown, write "unknown" or omit the section. Use the template below as the exact structure.
99
+
100
+ If a `CLAUDE.md` already exists, use `Read` to load it first, then merge — preserve any human-written sections (comments starting with `<!-- manual -->`) and update auto-detected sections only.
101
+
102
+ ### Step 5 Initialize .rune/ Directory
103
+ Use `Bash` to create the directory: `mkdir -p .rune`
104
+
105
+ Use `Write` to create each file:
106
+ - `.rune/conventions.md` — paste the extracted conventions from Step 3 in full detail
107
+ - `.rune/decisions.md` — create with header `# Architecture Decisions` and one placeholder row in a markdown table (Date | Decision | Rationale | Status)
108
+ - `.rune/progress.md` — create with header `# Progress Log` and one placeholder entry
109
+ - `.rune/session-log.md` — create with header `# Session Log` and current date as first entry
110
+ - `.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."
111
+ - `.rune/contract.md` — generate a starter contract based on the detected tech stack:
112
+ - Copy structure from `docs/CONTRACT-TEMPLATE.md`
113
+ - Customize rules based on Step 2 findings (e.g., Python → add `no bare except`, Node.js → add `no console.log`, SQL database add parameterized queries rule)
114
+ - Remove sections that don't apply (e.g., `contract.operations` for a library with no deployed service)
115
+ - The contract is a starting point — tell the user to review and customize it
116
+
117
+ ### Step 5.5 — Load Existing Instincts
118
+
119
+ 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.
120
+
121
+ For each instinct with confidence ≥0.6, include in the report:
122
+ - Trigger and action (one line)
123
+ - Confidence level
124
+
125
+ Instincts with confidence <0.6 are still learning — mention count but don't list individually.
126
+
127
+ **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.
128
+
129
+ ### Step 6b — Generate DEVELOPER-GUIDE.md
130
+
131
+ Use the data from Steps 2–3 to generate `.rune/DEVELOPER-GUIDE.md` — a human-readable onboarding guide for new team members joining the project. This is NOT AI context. This is plain English for humans.
132
+
133
+ Use `Write` to create `.rune/DEVELOPER-GUIDE.md` with this template:
134
+
135
+ ```markdown
136
+ # Developer Guide: [Project Name]
137
+
138
+ ## What This Does
139
+ [2 sentences max. What problem does this project solve? Who uses it?]
140
+
141
+ ## Quick Setup
142
+ [Copy-paste commands to get from zero to running locally]
143
+ ```bash
144
+ # [Python projects] Activate virtual environment
145
+ [detected activation command — e.g., source .venv/bin/activate | poetry shell | uv venv && source .venv/bin/activate]
146
+
147
+ # Install dependencies
148
+ [detected command — e.g., pip install -e ".[dev]" | poetry install | npm install]
149
+
150
+ # Run development server
151
+ [detected command]
152
+
153
+ # Run tests
154
+ [detected command]
155
+ ```
156
+
157
+ ## Key Files
158
+ [5–10 most important files with one-line description each]
159
+ - `[path]` — [what it does]
160
+
161
+ ## How to Contribute
162
+ 1. Fork or branch from main
163
+ 2. Make changes, run tests: `[test command]`
164
+ 3. Open a PR — describe what and why
165
+
166
+ ## Common Issues
167
+ [Top 3 "it doesn't work" situations with fixes. Only include issues you can infer from the codebase — e.g., missing .env, wrong Node version, database not running]
168
+
169
+ [Python projects always include these if applicable:]
170
+ - **ModuleNotFoundError** Virtual environment not activated. Run: `[activation command]`
171
+ - **ImportError: cannot import name X** Dependencies outdated. Run: `[install command]`
172
+ - **PYTHONPATH issues** → If using src layout, install in editable mode: `pip install -e .`
173
+
174
+ ## Who to Ask
175
+ [If git log reveals consistent contributors, list them. Otherwise omit this section.]
176
+ ```
177
+
178
+ If `.rune/DEVELOPER-GUIDE.md` already exists, skip and log **INFO**: "Skipped existing .rune/DEVELOPER-GUIDE.md — manual content preserved."
179
+
180
+ ### Step 6c — Suggest L4 Extension Packs
181
+
182
+ Based on the detected tech stack from Step 2, recommend relevant L4 extension packs. Use the mapping table below to find applicable packs. Only suggest packs that match the detected stack — do not suggest all packs.
183
+
184
+ | Detected Stack | Suggest Pack | Why |
185
+ |----------------|-------------|-----|
186
+ | React, Next.js, Vue, Svelte, SvelteKit | `@rune/ui` | Frontend component patterns, design system, accessibility audit |
187
+ | Express, Fastify, FastAPI, Django, NestJS, Go HTTP | `@rune/backend` | API patterns, auth flows, middleware, rate limiting |
188
+ | Docker, GitHub Actions, Kubernetes, Terraform, CI/CD config | `@rune/devops` | Container patterns, deployment pipelines, infrastructure as code |
189
+ | React Native, Expo, Flutter, SwiftUI | `@rune/mobile` | Mobile architecture, navigation patterns, offline sync |
190
+ | Security-focused codebase (auth, payments, HIPAA/PCI markers) | `@rune/security` | Threat modeling, OWASP flows, compliance patterns |
191
+ | Trading, finance, pricing, portfolio, market data | `@rune/trading` | Market data validation, risk calculation, backtesting patterns |
192
+ | Subscription billing, tenant isolation, feature flags | `@rune/saas` | Multi-tenancy, billing integration, feature flag patterns |
193
+ | Cart, checkout, product catalog, inventory, payments | `@rune/ecommerce` | Cart patterns, payment flows, inventory management |
194
+ | ML models, training pipelines, embeddings, LLM integration | `@rune/ai-ml` | Model evaluation, prompt patterns, inference optimization |
195
+ | Game loop, physics, entity systems, multiplayer | `@rune/gamedev` | Game architecture, ECS patterns, netcode |
196
+ | CMS, blog, newsletter, SEO, content workflows | `@rune/content` | Content modeling, SEO patterns, editorial workflows |
197
+ | Analytics, dashboards, metrics, data pipelines, BI | `@rune/analytics` | Data modeling, visualization patterns, pipeline architecture |
198
+
199
+ If 0 packs match: omit this section from the report (no suggestions is correct for a generic project).
200
+
201
+ **Community pack discovery**: Also check if `.rune/community-packs/registry.json` exists. If it does, list installed community packs alongside core pack suggestions. If community packs are installed, include them under a `### Installed Community Packs` subsection.
202
+
203
+ If ≥1 packs match: include in the Onboard Report under a `### Suggested L4 Packs` section:
204
+
205
+ ```
206
+ ### Suggested L4 Packs
207
+ Based on your detected stack ([detected frameworks]), these extension packs may be useful:
208
+
209
+ - **@rune/[pack]** [one-line reason based on detected stack]
210
+ Install: [link or command when available]
211
+ ```
212
+
213
+ ### Step 6d — Context Budget Check
214
+
215
+ 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.
216
+
217
+ 1. Count MCP tools available (from session start messages or `settings.json`)
218
+ 2. Check CLAUDE.md line count
219
+ 3. If total MCP tools >80 or CLAUDE.md >150 lines, include a **Context Budget Advisory** in the Onboard Report:
220
+
221
+ ```
222
+ ### Context Budget Advisory
223
+ - **MCP tools loaded**: [count] across [N] servers
224
+ - **CLAUDE.md size**: [N] lines
225
+ - **Estimated baseline**: ~[N]k tokens before any work begins
226
+ - **Recommendation**: [specific advice — disable unused MCP servers, move CLAUDE.md details to .rune/]
227
+ ```
228
+
229
+ **Skip if**: Total MCP tools ≤80 AND CLAUDE.md ≤150 lines (healthy baseline).
230
+
231
+ ### Step 6e — AI-Driven Interview (Optional, User-Initiated)
232
+
233
+ When invoked as `/rune onboard --interview` or when the project is too ambiguous for automated detection (e.g., no package.json, no clear entry point, mixed languages), switch to **conversational onboarding** — the AI asks targeted questions instead of relying solely on file scanning.
234
+
235
+ #### Interview Flow
236
+
237
+ Ask 5-8 questions in sequence, adapting based on answers. Start broad, narrow based on responses:
238
+
239
+ ```
240
+ Q1: "What does this project do in one sentence?"
241
+ → Captures purpose (README may be missing or outdated)
242
+
243
+ Q2: "Who uses this — internal team, external users, or both?"
244
+ → Determines audience, affects DEVELOPER-GUIDE.md tone
245
+
246
+ Q3: "What's the main entry point — where does execution start?"
247
+ → Bypasses file scanning for complex monorepos
248
+
249
+ Q4: "What commands do you use daily? (dev server, tests, build)"
250
+ → Gets verified commands instead of guessing from config files
251
+
252
+ Q5: "Any areas of the codebase you'd warn a new developer about?"
253
+ → Captures tribal knowledge that no scan can detect
254
+
255
+ Q6: "Are there external services this depends on? (databases, APIs, queues)"
256
+ → Maps integration points for Architecture Map
257
+
258
+ Q7: "What's the deployment story — how does code get to production?"
259
+ → Captures CI/CD context
260
+
261
+ Q8 (conditional): "Anything else a new session should know that's not in the code?"
262
+ → Catches edge cases, workarounds, known issues
263
+ ```
264
+
265
+ #### Interview Rules
266
+
267
+ - **Adapt**: Skip questions that were already answered by earlier responses. If Q1 reveals "it's a Next.js app", don't ask about the framework.
268
+ - **Validate**: Cross-reference answers with actual file scan results. If user says "we use Jest" but `vitest.config.ts` exists, ask to clarify.
269
+ - **Merge**: Interview answers supplement (not replace) automated scan. Scan provides facts, interview provides context and intent.
270
+ - **Store**: Save interview responses as high-confidence entries in `.rune/conventions.md` and `.rune/cumulative-notes.md` (tagged `[from-interview]`)
271
+
272
+ #### When to Auto-Suggest Interview
273
+
274
+ Suggest switching to interview mode (but don't force it) when:
275
+ - Step 2 produces 3+ "unknown" fields in tech stack detection
276
+ - Project has no README.md and no package.json/pyproject.toml/Cargo.toml
277
+ - Project appears to be a monorepo with 3+ distinct sub-projects
278
+
279
+ Output: `"ℹ️ This project is hard to auto-detect. Run /rune onboard --interview for guided setup."`
280
+
281
+ ### Step 7 Commit
282
+ Use `Bash` to stage and commit the generated files:
283
+ ```bash
284
+ git add CLAUDE.md .rune/ && git commit -m "chore: initialize rune project context"
285
+ ```
286
+
287
+ If `git` is not available or the directory is not a git repo, skip this step and add an INFO note to the report: "Not a git repository — files written but not committed."
288
+
289
+ If any of the `.rune/` files already exist, do not overwrite them (they may contain human-written decisions). Log **INFO**: "Skipped existing .rune/[file] — manual content preserved."
290
+
291
+ ## CLAUDE.md Template
292
+
293
+ ```markdown
294
+ # [Project Name] — Project Configuration
295
+
296
+ ## Overview
297
+ [Auto-detected description from README or entry point comments]
298
+
299
+ ## Tech Stack
300
+ - Framework: [detected]
301
+ - Language: [detected]
302
+ - Package Manager: [detected]
303
+ - Test Framework: [detected]
304
+ - Build Tool: [detected]
305
+ - Linter: [detected]
306
+ - Python Environment: [detected — venv/poetry/uv/conda/pyenv/pipenv/none] (only if Python project)
307
+
308
+ ## Directory Structure
309
+ [Generated tree with one-line annotations per directory]
310
+
311
+ ## Conventions
312
+ - Naming: [detected patterns — specific, not generic]
313
+ - Error handling: [detected pattern]
314
+ - State management: [detected pattern]
315
+ - API pattern: [detected pattern]
316
+ - Test structure: [detected pattern]
317
+
318
+ ## Commands
319
+ - Install: [detected command]
320
+ - Dev: [detected command]
321
+ - Build: [detected command]
322
+ - Test: [detected command]
323
+ - Lint: [detected command]
324
+
325
+ ## Key Files
326
+ - Entry point: [absolute path]
327
+ - Config: [absolute paths]
328
+ - Routes/API: [absolute paths]
329
+ ```
330
+
331
+ ## Output Format
332
+
333
+ ```
334
+ ## Onboard Report
335
+ - **Project**: [name] | **Framework**: [detected] | **Language**: [detected]
336
+ - **Files**: [count] | **LOC**: [estimate] | **Modules**: [count]
337
+
338
+ ### Generated
339
+ - CLAUDE.md (project configuration)
340
+ - .rune/conventions.md (detected patterns)
341
+ - .rune/decisions.md (initialized)
342
+ - .rune/progress.md (initialized)
343
+ - .rune/session-log.md (initialized)
344
+ - .rune/DEVELOPER-GUIDE.md (human onboarding guide)
345
+
346
+ ### Skipped (already exist)
347
+ - [list of files not overwritten]
348
+
349
+ ### Learned Instincts (if any)
350
+ - [trigger] → [action] (confidence: [0.6-0.9]) for each high-confidence instinct
351
+ - [N] low-confidence instincts still learning
352
+
353
+ ### Observations
354
+ - [notable patterns or anomalies found]
355
+ - [potential issues detected]
356
+ - [recommendations for the developer]
357
+
358
+ ### Suggested L4 Packs
359
+ - **@rune/[pack]** — [reason] (only shown if applicable packs detected)
360
+ ```
361
+
362
+ ## Constraints
363
+
364
+ 1. MUST scan actual project files — never generate CLAUDE.md from assumptions
365
+ 2. MUST detect and respect existing CLAUDE.md content — merge, don't overwrite
366
+ 3. MUST include: build commands, test commands, lint commands, project structure
367
+ 4. MUST NOT include obvious/generic advice ("write clean code", "use meaningful names")
368
+ 5. MUST verify generated commands actually work by running them
369
+ 6. MUST NOT overwrite existing .rune/ files — always preserve human-written content
370
+
371
+ ## Sharp Edges
372
+
373
+ Known failure modes for this skill. Check these before declaring done.
374
+
375
+ | Failure Mode | Severity | Mitigation |
376
+ |---|---|---|
377
+ | CLAUDE.md generated from README alone (no file scan) | CRITICAL | Step 1 MUST invoke scout never skip actual file scanning |
378
+ | DEVELOPER-GUIDE.md contains generic placeholder text not derived from project | HIGH | Every section must reference actual detected commands, files, and patterns no generic advice |
379
+ | Overwriting existing .rune/ files with manual content | CRITICAL | Check file existence before every Write skip and log INFO if exists |
380
+ | Common Issues section fabricated (no actual issues detected) | MEDIUM | Only list issues inferable from codebase (missing .env, Node version, etc.) — omit section if none found |
381
+
382
+ ## Done When
383
+
384
+ - CLAUDE.md written (or merged) with all detected tech stack fields populated
385
+ - .rune/ directory initialized with conventions, decisions, progress, session-log, instincts
386
+ - .rune/DEVELOPER-GUIDE.md written with setup commands from actual scan
387
+ - All generated commands verified to exist in package.json/Makefile/etc.
388
+ - Onboard Report emitted with Generated + Skipped + Observations sections
389
+
390
+ ## Returns
391
+
392
+ | Artifact | Format | Location |
393
+ |----------|--------|----------|
394
+ | Project AI config | Markdown | `CLAUDE.md` (project root) |
395
+ | Detected conventions | Markdown | `.rune/conventions.md` |
396
+ | Decision log (initialized) | Markdown | `.rune/decisions.md` |
397
+ | Developer onboarding guide | Markdown | `.rune/DEVELOPER-GUIDE.md` |
398
+ | Session/progress files | Markdown | `.rune/progress.md`, `.rune/session-log.md` |
399
+
400
+ ## Cost Profile
401
+
402
+ ~2000-5000 tokens input, ~1000-2000 tokens output. Sonnet for analysis quality.
403
+
404
+ **Scope guardrail:** onboard generates project context files — it does not modify source code, install dependencies, or change project configuration.