arkaos 2.15.0 → 2.16.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 (156) hide show
  1. package/VERSION +1 -1
  2. package/arka/SKILL.md +13 -0
  3. package/arka/skills/comfyui/SKILL.md +82 -0
  4. package/arka/skills/comfyui/references/squads.md +80 -0
  5. package/arka/skills/comfyui/references/workflows.md +435 -0
  6. package/arka/skills/forge/SKILL.md +35 -599
  7. package/arka/skills/forge/references/complexity-engine.md +77 -0
  8. package/arka/skills/forge/references/critic-synthesis.md +154 -0
  9. package/arka/skills/forge/references/workflows.md +408 -0
  10. package/arka/skills/fovory/SKILL.md +91 -0
  11. package/arka/skills/fovory/references/integration.md +186 -0
  12. package/arka/skills/fovory/references/workflows.md +209 -0
  13. package/arka/skills/platform-arka/SKILL.md +121 -0
  14. package/arka/skills/platform-arka/references/workflows.md +202 -0
  15. package/arka/skills/rothbard100/SKILL.md +113 -0
  16. package/arka/skills/rothbard100/references/squad.md +111 -0
  17. package/arka/skills/rothbard100/references/workflows.md +175 -0
  18. package/config/constitution.yaml +8 -0
  19. package/config/hooks/pre-compact.sh +11 -5
  20. package/config/hooks/session-start.sh +4 -5
  21. package/config/hooks/token-hygiene.sh +120 -0
  22. package/config/hooks/user-prompt-submit.sh +28 -10
  23. package/core/agents/__pycache__/schema.cpython-313.pyc +0 -0
  24. package/core/agents/schema.py +20 -1
  25. package/core/synapse/__pycache__/layers.cpython-313.pyc +0 -0
  26. package/core/synapse/layers.py +7 -0
  27. package/core/workflow/__pycache__/schema.cpython-313.pyc +0 -0
  28. package/core/workflow/schema.py +4 -1
  29. package/departments/brand/SKILL.md +13 -0
  30. package/departments/brand/agents/brand-director.yaml +1 -0
  31. package/departments/brand/agents/brand-strategist.yaml +1 -0
  32. package/departments/brand/agents/ux-designer.yaml +1 -0
  33. package/departments/brand/agents/visual-designer.yaml +1 -0
  34. package/departments/brand/workflows/identity.yaml +1 -0
  35. package/departments/brand/workflows/naming.yaml +1 -0
  36. package/departments/community/SKILL.md +13 -0
  37. package/departments/community/agents/community-manager.yaml +1 -0
  38. package/departments/community/agents/community-strategist.yaml +1 -0
  39. package/departments/community/agents/engagement-designer.yaml +1 -0
  40. package/departments/community/workflows/setup.yaml +1 -0
  41. package/departments/content/SKILL.md +13 -0
  42. package/departments/content/agents/content-strategist.yaml +1 -0
  43. package/departments/content/agents/repurpose-distributor.yaml +1 -0
  44. package/departments/content/agents/scriptwriter.yaml +1 -0
  45. package/departments/content/agents/viral-engineer.yaml +1 -0
  46. package/departments/content/workflows/viral.yaml +1 -0
  47. package/departments/dev/SKILL.md +13 -0
  48. package/departments/dev/agents/architect.yaml +1 -0
  49. package/departments/dev/agents/backend-dev.yaml +1 -0
  50. package/departments/dev/agents/cto.yaml +1 -0
  51. package/departments/dev/agents/dba.yaml +1 -0
  52. package/departments/dev/agents/devops-eng.yaml +1 -0
  53. package/departments/dev/agents/frontend-dev.yaml +1 -0
  54. package/departments/dev/agents/qa-eng.yaml +1 -0
  55. package/departments/dev/agents/research-assistant.yaml +1 -0
  56. package/departments/dev/agents/security-eng.yaml +1 -0
  57. package/departments/dev/agents/tech-lead.yaml +1 -0
  58. package/departments/dev/skills/onboard/SKILL.md +21 -353
  59. package/departments/dev/skills/onboard/references/mcp-config.md +284 -0
  60. package/departments/dev/skills/onboard/references/stack-detection.md +83 -0
  61. package/departments/dev/workflows/debug.yaml +1 -0
  62. package/departments/dev/workflows/feature.yaml +3 -0
  63. package/departments/dev/workflows/refactor.yaml +1 -0
  64. package/departments/ecom/SKILL.md +13 -0
  65. package/departments/ecom/agents/commerce-engineer.yaml +1 -0
  66. package/departments/ecom/agents/cro-specialist.yaml +1 -0
  67. package/departments/ecom/agents/ecom-director.yaml +1 -0
  68. package/departments/ecom/agents/retention-manager.yaml +1 -0
  69. package/departments/ecom/skills/ecommerce/SKILL.md +66 -0
  70. package/departments/ecom/skills/ecommerce/references/audit-flow.md +109 -0
  71. package/departments/ecom/skills/ecommerce/references/playbooks.md +141 -0
  72. package/departments/ecom/workflows/product-page.yaml +1 -0
  73. package/departments/finance/SKILL.md +13 -0
  74. package/departments/finance/agents/cfo.yaml +1 -0
  75. package/departments/finance/agents/financial-analyst.yaml +1 -0
  76. package/departments/finance/agents/investment-strategist.yaml +1 -0
  77. package/departments/finance/workflows/cashflow.yaml +1 -0
  78. package/departments/finance/workflows/model.yaml +1 -0
  79. package/departments/kb/SKILL.md +13 -0
  80. package/departments/kb/agents/data-collector.yaml +1 -0
  81. package/departments/kb/agents/knowledge-curator.yaml +1 -0
  82. package/departments/kb/agents/knowledge-director.yaml +1 -0
  83. package/departments/kb/agents/research-analyst.yaml +1 -0
  84. package/departments/kb/skills/knowledge/SKILL.md +94 -0
  85. package/departments/kb/skills/knowledge/references/async-processing.md +89 -0
  86. package/departments/kb/skills/knowledge/references/ingestion-pipeline.md +308 -0
  87. package/departments/kb/skills/knowledge/scripts/kb-check-capabilities.sh +143 -0
  88. package/departments/kb/skills/knowledge/scripts/kb-cleanup.sh +135 -0
  89. package/departments/kb/skills/knowledge/scripts/kb-queue.sh +156 -0
  90. package/departments/kb/skills/knowledge/scripts/kb-status.sh +195 -0
  91. package/departments/kb/skills/knowledge/scripts/kb-worker.sh +217 -0
  92. package/departments/kb/workflows/learn.yaml +1 -0
  93. package/departments/landing/SKILL.md +13 -0
  94. package/departments/landing/agents/affiliate-manager.yaml +1 -0
  95. package/departments/landing/agents/conversion-strategist.yaml +1 -0
  96. package/departments/landing/agents/cro-specialist.yaml +1 -0
  97. package/departments/landing/agents/sales-copywriter.yaml +1 -0
  98. package/departments/landing/workflows/launch.yaml +1 -0
  99. package/departments/landing/workflows/offer.yaml +3 -0
  100. package/departments/leadership/SKILL.md +13 -0
  101. package/departments/leadership/agents/culture-coach.yaml +1 -0
  102. package/departments/leadership/agents/hr-specialist.yaml +1 -0
  103. package/departments/leadership/agents/leadership-director.yaml +1 -0
  104. package/departments/leadership/workflows/team-build.yaml +1 -0
  105. package/departments/marketing/SKILL.md +13 -0
  106. package/departments/marketing/agents/content-marketer.yaml +1 -0
  107. package/departments/marketing/agents/marketing-director.yaml +1 -0
  108. package/departments/marketing/agents/paid-specialist.yaml +1 -0
  109. package/departments/marketing/agents/seo-specialist.yaml +1 -0
  110. package/departments/marketing/workflows/campaign.yaml +1 -0
  111. package/departments/marketing/workflows/social.yaml +1 -0
  112. package/departments/ops/SKILL.md +13 -0
  113. package/departments/ops/agents/automation-engineer.yaml +1 -0
  114. package/departments/ops/agents/doc-writer.yaml +1 -0
  115. package/departments/ops/agents/ops-lead.yaml +1 -0
  116. package/departments/ops/skills/operations/SKILL.md +83 -0
  117. package/departments/ops/skills/operations/references/calendar-email.md +73 -0
  118. package/departments/ops/skills/operations/references/clickup-ops.md +224 -0
  119. package/departments/ops/skills/update/SKILL.md +19 -45
  120. package/departments/ops/skills/update/references/sync-engine.md +93 -0
  121. package/departments/ops/skills/update/references/workflows.md +84 -0
  122. package/departments/ops/workflows/lean-audit.yaml +1 -0
  123. package/departments/org/SKILL.md +13 -0
  124. package/departments/org/agents/coo.yaml +1 -0
  125. package/departments/org/agents/org-designer.yaml +1 -0
  126. package/departments/org/agents/people-ops.yaml +1 -0
  127. package/departments/org/workflows/design.yaml +2 -0
  128. package/departments/pm/SKILL.md +13 -0
  129. package/departments/pm/agents/pm-director.yaml +1 -0
  130. package/departments/pm/agents/product-owner.yaml +1 -0
  131. package/departments/pm/agents/scrum-master.yaml +1 -0
  132. package/departments/quality/SKILL.md +13 -0
  133. package/departments/quality/agents/copy-director.yaml +1 -0
  134. package/departments/quality/agents/cqo.yaml +1 -0
  135. package/departments/quality/agents/tech-director.yaml +1 -0
  136. package/departments/saas/SKILL.md +13 -0
  137. package/departments/saas/agents/cs-manager.yaml +1 -0
  138. package/departments/saas/agents/growth-engineer.yaml +1 -0
  139. package/departments/saas/agents/metrics-analyst.yaml +1 -0
  140. package/departments/saas/agents/saas-strategist.yaml +1 -0
  141. package/departments/saas/workflows/metrics.yaml +1 -0
  142. package/departments/saas/workflows/validate.yaml +1 -0
  143. package/departments/sales/SKILL.md +13 -0
  144. package/departments/sales/agents/sales-closer.yaml +1 -0
  145. package/departments/sales/agents/sales-director.yaml +1 -0
  146. package/departments/sales/agents/sales-ops.yaml +1 -0
  147. package/departments/sales/workflows/pipeline.yaml +1 -0
  148. package/departments/strategy/SKILL.md +13 -0
  149. package/departments/strategy/agents/business-model-designer.yaml +1 -0
  150. package/departments/strategy/agents/market-analyst.yaml +1 -0
  151. package/departments/strategy/agents/strategy-director.yaml +1 -0
  152. package/departments/strategy/workflows/analysis.yaml +1 -0
  153. package/departments/strategy/workflows/swot.yaml +1 -0
  154. package/installer/index.js +19 -0
  155. package/package.json +1 -1
  156. package/pyproject.toml +1 -1
@@ -27,363 +27,31 @@ The goal: run one command, and the project is fully registered with stack detect
27
27
  | `/dev ecosystem create <name>` | Create a new ecosystem |
28
28
  | `/dev ecosystem add <project> --to <ecosystem>` | Add existing project to ecosystem |
29
29
 
30
- ## Workflow: /dev onboard <path>
30
+ ## Orchestration Overview
31
31
 
32
- ### Step 1: Validate Path
32
+ The onboard flow is a 12-step pipeline, split across two reference files:
33
33
 
34
- ```python
35
- python3 "$ARKA_OS/../arka-onboard/scripts/detect-stack.py" "<path>" --json
36
- ```
34
+ **Detection phase** (stack-detection.md):
35
+ 1. Validate path — resolve relative, check if already onboarded
36
+ 2. Auto-detect stack — `detect-stack.py` returns framework, DB, auth, patterns, MCP profile
37
+ 3. Architecture analysis — glob models/controllers/components to classify monolith/api/monorepo/SPA
38
+ 4. Git analysis — remotes, branches, commits, contributors
37
39
 
38
- If the path doesn't exist, resolve relative to `$HOME` or common project directories (`~/Herd/`, `~/Projects/`, `~/Code/`).
40
+ **Configuration phase** (mcp-config.md):
41
+ 5. Determine MCP profile — map framework to `laravel|nuxt|vue|react|nextjs|full-stack|base`
42
+ 6. Ecosystem assignment — create/join/standalone
43
+ 7. User confirmation — present analysis summary
44
+ 8. Generate `PROJECT.md` in project root
45
+ 9. Register in `$ARKA_OS/projects/<name>/`
46
+ 10. Apply MCP profile — generate `.mcp.json` + `.claude/settings.local.json`
47
+ 11. Create Obsidian docs — Home, Architecture, Projects MOC, Ecosystem MOC
48
+ 12. Report — summary + next steps
39
49
 
40
- Check if already onboarded: look for `projects/<name>/PROJECT.md` in `$ARKA_OS`.
50
+ The `ecosystem` subcommands (list/create/add) and error handling also live in mcp-config.md.
41
51
 
42
- ### Step 2: Auto-Detect Stack
52
+ ## References
43
53
 
44
- Run the bundled detection script:
54
+ Load on demand during execution:
45
55
 
46
- ```bash
47
- python3 "$(dirname "$0")/scripts/detect-stack.py" "<resolved-path>" --json
48
- ```
49
-
50
- This returns a JSON report with:
51
- - **Framework** — Laravel, Nuxt, Vue, React, Next.js, Django, FastAPI, etc.
52
- - **Language** — PHP, TypeScript, Python, etc.
53
- - **Stack** — full list of detected technologies
54
- - **Database** — PostgreSQL, MySQL, SQLite, Supabase
55
- - **Cache/Queue** — Redis, Horizon
56
- - **Auth** — Sanctum, Passport, NextAuth, Supabase Auth
57
- - **Payments** — Stripe, Paddle
58
- - **CSS** — Tailwind, Sass, Nuxt UI, shadcn/ui
59
- - **Testing** — Pest, PHPUnit, Vitest, Jest, Playwright
60
- - **Architecture** — monolith, api-only, monorepo, frontend-spa
61
- - **Patterns** — Services, Repositories, Actions, DTOs
62
- - **Conventions** — TypeScript, ESLint, Prettier, PHPStan, Docker
63
- - **Metrics** — models, controllers, migrations, components, pages, tests
64
- - **MCP Profile** — recommended profile (laravel/nuxt/vue/react/nextjs/full-stack/base)
65
-
66
- If the script is not available, detect manually by reading:
67
- - `composer.json` — PHP/Laravel dependencies
68
- - `package.json` — Node.js/frontend dependencies
69
- - `nuxt.config.ts` / `next.config.ts` — framework config
70
- - `.env.example` or `.env` — database, cache, queue, payment keys
71
- - `docker-compose.yml` — infrastructure setup
72
-
73
- ### Step 3: Architecture Analysis
74
-
75
- Glob the project directory to understand its structure:
76
-
77
- ```
78
- # Laravel
79
- app/Models/*.php → count models
80
- app/Http/Controllers/ → count controllers
81
- database/migrations/ → count migrations
82
- routes/*.php → count route files
83
- app/Services/ → Services pattern?
84
- app/Repositories/ → Repository pattern?
85
- tests/ → count tests
86
-
87
- # Frontend
88
- components/**/*.vue|tsx → count components
89
- pages/**/*.vue|tsx → count pages
90
- composables/ → composables pattern?
91
- stores/ → state management?
92
- ```
93
-
94
- Determine:
95
- - **Monolith** — backend + frontend views in one repo
96
- - **API-only** — backend without frontend views
97
- - **Monorepo** — `api/` + `frontend/` or `apps/` + `packages/`
98
- - **Frontend SPA** — no backend, just frontend
99
-
100
- ### Step 4: Git Analysis
101
-
102
- Read-only git commands to understand project history:
103
-
104
- ```bash
105
- git -C "<path>" remote -v # remotes
106
- git -C "<path>" branch -a # branches
107
- git -C "<path>" log --oneline -10 # recent commits
108
- git -C "<path>" shortlog -sn --no-merges | head -5 # top contributors
109
- git -C "<path>" rev-list --count HEAD # total commits
110
- ```
111
-
112
- ### Step 5: Determine MCP Profile
113
-
114
- Map detected stack to MCP profile using the same mapping as scaffold:
115
-
116
- | Detected Framework | MCP Profile |
117
- |-------------------|-------------|
118
- | Laravel | `laravel` |
119
- | Laravel + ecommerce indicators | `ecommerce` |
120
- | Nuxt | `nuxt` |
121
- | Vue (without Nuxt) | `vue` |
122
- | React (without Next) | `react` |
123
- | Next.js | `nextjs` |
124
- | Monorepo (Laravel + frontend) | `full-stack` |
125
- | Other / Unknown | `base` |
126
-
127
- ### Step 6: Ecosystem Assignment
128
-
129
- If `--ecosystem <name>` was provided:
130
- 1. Read `knowledge/ecosystems.json`
131
- 2. If ecosystem exists, add this project to it
132
- 3. If not, create the ecosystem and add this project
133
-
134
- If no ecosystem flag, ask the user:
135
- - "Create new ecosystem" → ask for name, then create
136
- - "Join existing ecosystem" → show list, let user pick
137
- - "Standalone (no ecosystem)" → skip
138
-
139
- Ecosystem entry format:
140
- ```json
141
- {
142
- "name": "project-name",
143
- "role": "api|frontend|admin|worker|docs|landing",
144
- "stack": "Laravel 11",
145
- "path": "/absolute/path/to/project"
146
- }
147
- ```
148
-
149
- ### Step 7: User Confirmation
150
-
151
- Present the analysis summary and ask to proceed:
152
-
153
- ```
154
- ═══ ARKA OS — Project Analysis ═══
155
- Name: <name>
156
- Path: <path>
157
- Framework: <framework> <version>
158
- Language: <language>
159
- Architecture: <type>
160
- Stack: <technologies>
161
- Database: <db>
162
- Auth: <auth>
163
- Testing: <testing>
164
- Metrics: <X> models, <Y> components, <Z> migrations, <W> tests
165
- MCP Profile: <profile> (<N> MCPs)
166
- Ecosystem: <ecosystem or "standalone">
167
- Git: <total commits>, <branches> branches, <contributors> contributors
168
- ═══════════════════════════════════
169
-
170
- Proceed with onboarding? (Y/n)
171
- ```
172
-
173
- ### Step 8: Generate PROJECT.md
174
-
175
- Create `PROJECT.md` in the project root with all detected context:
176
-
177
- ```markdown
178
- # <name> — WizardingCode Project
179
-
180
- ## Stack
181
- - **Framework:** <framework> <version>
182
- - **Language:** <language>
183
- - **Database:** <database>
184
- - **Cache:** <cache>
185
- - **Queue:** <queue>
186
- - **Auth:** <auth>
187
- - **Payments:** <payments>
188
- - **CSS:** <css>
189
- - **Testing:** <testing>
190
-
191
- ## Architecture
192
- - **Type:** <monolith|api-only|monorepo|frontend-spa>
193
- - **Patterns:** <Services, Repositories, etc.>
194
-
195
- ## Key Paths
196
- - Models: `app/Models/`
197
- - Controllers: `app/Http/Controllers/`
198
- - Routes: `routes/`
199
- - Migrations: `database/migrations/`
200
- - Tests: `tests/`
201
- - Components: `components/` or `src/components/`
202
-
203
- ## Conventions
204
- - TypeScript: <yes/no>
205
- - Linting: <ESLint/PHPStan/none>
206
- - Formatting: <Prettier/none>
207
- - Docker: <yes/no>
208
-
209
- ## Ecosystem
210
- - **Ecosystem:** <name or "standalone">
211
- - **Role:** <api/frontend/admin/worker>
212
-
213
- ## Current State
214
- - Total commits: <N>
215
- - Active branches: <list>
216
- - Top contributors: <list>
217
- - Last commit: <date and message>
218
-
219
- ## MCPs Active
220
- - <list from applied profile>
221
-
222
- ## Decisions
223
- - **Onboarded:** <date> via ARKA OS v<version>
224
- - **MCP Profile:** <profile>
225
- ```
226
-
227
- ### Step 9: Register in ARKA OS
228
-
229
- ```bash
230
- mkdir -p "$ARKA_OS/projects/<name>"
231
- cp "<path>/PROJECT.md" "$ARKA_OS/projects/<name>/PROJECT.md"
232
- echo "<absolute-path>" > "$ARKA_OS/projects/<name>/.project-path"
233
- ```
234
-
235
- The `.project-path` file stores the absolute path so system commands like `/arka standup` can find and reference the actual project.
236
-
237
- ### Step 10: Apply MCP Profile
238
-
239
- ```bash
240
- bash "$ARKA_OS/mcps/scripts/apply-mcps.sh" <profile> --project "<path>"
241
- ```
242
-
243
- This generates `.mcp.json` and `.claude/settings.local.json` in the project.
244
-
245
- ### Step 11: Create Obsidian Documentation
246
-
247
- Create pages in the Obsidian vault at `{{OBSIDIAN_VAULT}}`:
248
-
249
- **Home page:** `Projects/<name>/Home.md`
250
- ```markdown
251
- ---
252
- type: project
253
- name: <name>
254
- stack:
255
- - <framework>
256
- - <language>
257
- status: active
258
- date_created: <YYYY-MM-DD>
259
- ecosystem: <ecosystem or null>
260
- tags:
261
- - project
262
- - <framework-kebab-case>
263
- ---
264
-
265
- # <name>
266
-
267
- > Onboarded into ARKA OS on <date>
268
-
269
- ## Overview
270
- - **Framework:** <framework>
271
- - **Architecture:** <type>
272
- - **Stack:** <technologies>
273
-
274
- ## Architecture
275
- - [[<name> - Architecture]]
276
-
277
- ## Links
278
- - Local: `<path>`
279
- - ARKA OS: `projects/<name>/PROJECT.md`
280
-
281
- ---
282
- *Part of the [[Projects MOC]]*
283
- ```
284
-
285
- **Architecture overview:** `Projects/<name>/Architecture/Overview.md`
286
- ```markdown
287
- ---
288
- type: adr-log
289
- project: <name>
290
- date_created: <YYYY-MM-DD>
291
- tags:
292
- - architecture
293
- - adr
294
- ---
295
-
296
- # Architecture — <name>
297
-
298
- ## ADR-000: Project Onboarded
299
- - **Date:** <today>
300
- - **Decision:** Onboarded existing project into ARKA OS
301
- - **Stack:** <full stack details>
302
- - **Architecture:** <type> with <patterns>
303
- - **MCP Profile:** <profile>
304
- ```
305
-
306
- **Update Projects MOC:** Append `- [[<name>]]` to the Active Projects section.
307
-
308
- **Ecosystem MOC** (if ecosystem assigned): Create or update `Projects/Ecosystems/<ecosystem>.md`:
309
- ```markdown
310
- ---
311
- type: ecosystem
312
- name: <ecosystem>
313
- date_updated: <YYYY-MM-DD>
314
- tags:
315
- - ecosystem
316
- - project
317
- ---
318
-
319
- # <ecosystem> Ecosystem
320
-
321
- ## Projects
322
- | Project | Role | Stack | Path |
323
- |---------|------|-------|------|
324
- | [[<name>]] | <role> | <stack> | `<path>` |
325
-
326
- ---
327
- *Part of the [[Projects MOC]]*
328
- ```
329
-
330
- ### Step 12: Report
331
-
332
- ```
333
- ═══ ARKA OS — Project Onboarded ═══
334
- Name: <name>
335
- Framework: <framework>
336
- Architecture: <type>
337
- MCPs: <count> active (<profile> profile)
338
- Ecosystem: <ecosystem or "standalone">
339
- PROJECT.md: <path>/PROJECT.md
340
- Obsidian: Projects/<name>/Home.md
341
- ════════════════════════════════════
342
-
343
- Next steps:
344
- cd <path>
345
- /dev feature "describe your first feature"
346
- /dev review (review current code)
347
- ```
348
-
349
- ## Workflow: /dev ecosystem list
350
-
351
- 1. Read `knowledge/ecosystems.json`
352
- 2. Display all ecosystems with their projects:
353
-
354
- ```
355
- ═══ ARKA OS — Ecosystems ═══
356
- <ecosystem-name>
357
- • <project> (<role>) — <stack> — <path>
358
- • <project> (<role>) — <stack> — <path>
359
-
360
- <ecosystem-name>
361
- • <project> (<role>) — <stack> — <path>
362
- ═════════════════════════════
363
- ```
364
-
365
- ## Workflow: /dev ecosystem create <name>
366
-
367
- 1. Read `knowledge/ecosystems.json`
368
- 2. Create new ecosystem entry: `"<name>": { "projects": [] }`
369
- 3. Write back
370
- 4. Confirm creation
371
-
372
- ## Workflow: /dev ecosystem add <project> --to <ecosystem>
373
-
374
- 1. Read `knowledge/ecosystems.json`
375
- 2. Read `projects/<project>/PROJECT.md` to get stack info
376
- 3. Read `projects/<project>/.project-path` to get path
377
- 4. Ask user for role (api/frontend/admin/worker/docs/landing)
378
- 5. Add to ecosystem
379
- 6. Write back
380
- 7. Update Ecosystem MOC in Obsidian
381
-
382
- ## Error Handling
383
-
384
- - If path doesn't exist: suggest common directories, ask for correct path
385
- - If already onboarded: show existing PROJECT.md, ask if re-onboard
386
- - If no git repo: skip git analysis steps, warn user
387
- - If detection script fails: fall back to manual file inspection
388
- - If MCP apply fails: warn but continue (MCPs can be applied later)
389
- - If Obsidian vault not configured: skip Obsidian steps, warn user
56
+ - `references/stack-detection.md` — Steps 1-4: path validation, `detect-stack.py` output schema, manual detection fallbacks, architecture classification, git analysis commands
57
+ - `references/mcp-config.md` — Steps 5-12: MCP profile mapping, ecosystem assignment, PROJECT.md template, Obsidian page templates, ecosystem subcommand flows, error handling
@@ -0,0 +1,284 @@
1
+ # arka-onboard — MCP Configuration & Registration
2
+
3
+ Referenced from SKILL.md. Read only when needed.
4
+
5
+ ## Step 5: Determine MCP Profile
6
+
7
+ Map detected stack to MCP profile using the same mapping as scaffold:
8
+
9
+ | Detected Framework | MCP Profile |
10
+ |-------------------|-------------|
11
+ | Laravel | `laravel` |
12
+ | Laravel + ecommerce indicators | `ecommerce` |
13
+ | Nuxt | `nuxt` |
14
+ | Vue (without Nuxt) | `vue` |
15
+ | React (without Next) | `react` |
16
+ | Next.js | `nextjs` |
17
+ | Monorepo (Laravel + frontend) | `full-stack` |
18
+ | Other / Unknown | `base` |
19
+
20
+ ## Step 6: Ecosystem Assignment
21
+
22
+ If `--ecosystem <name>` was provided:
23
+ 1. Read `knowledge/ecosystems.json`
24
+ 2. If ecosystem exists, add this project to it
25
+ 3. If not, create the ecosystem and add this project
26
+
27
+ If no ecosystem flag, ask the user:
28
+ - "Create new ecosystem" → ask for name, then create
29
+ - "Join existing ecosystem" → show list, let user pick
30
+ - "Standalone (no ecosystem)" → skip
31
+
32
+ Ecosystem entry format:
33
+ ```json
34
+ {
35
+ "name": "project-name",
36
+ "role": "api|frontend|admin|worker|docs|landing",
37
+ "stack": "Laravel 11",
38
+ "path": "/absolute/path/to/project"
39
+ }
40
+ ```
41
+
42
+ ## Step 7: User Confirmation
43
+
44
+ Present the analysis summary and ask to proceed:
45
+
46
+ ```
47
+ ═══ ARKA OS — Project Analysis ═══
48
+ Name: <name>
49
+ Path: <path>
50
+ Framework: <framework> <version>
51
+ Language: <language>
52
+ Architecture: <type>
53
+ Stack: <technologies>
54
+ Database: <db>
55
+ Auth: <auth>
56
+ Testing: <testing>
57
+ Metrics: <X> models, <Y> components, <Z> migrations, <W> tests
58
+ MCP Profile: <profile> (<N> MCPs)
59
+ Ecosystem: <ecosystem or "standalone">
60
+ Git: <total commits>, <branches> branches, <contributors> contributors
61
+ ═══════════════════════════════════
62
+
63
+ Proceed with onboarding? (Y/n)
64
+ ```
65
+
66
+ ## Step 8: Generate PROJECT.md
67
+
68
+ Create `PROJECT.md` in the project root with all detected context:
69
+
70
+ ```markdown
71
+ # <name> — WizardingCode Project
72
+
73
+ ## Stack
74
+ - **Framework:** <framework> <version>
75
+ - **Language:** <language>
76
+ - **Database:** <database>
77
+ - **Cache:** <cache>
78
+ - **Queue:** <queue>
79
+ - **Auth:** <auth>
80
+ - **Payments:** <payments>
81
+ - **CSS:** <css>
82
+ - **Testing:** <testing>
83
+
84
+ ## Architecture
85
+ - **Type:** <monolith|api-only|monorepo|frontend-spa>
86
+ - **Patterns:** <Services, Repositories, etc.>
87
+
88
+ ## Key Paths
89
+ - Models: `app/Models/`
90
+ - Controllers: `app/Http/Controllers/`
91
+ - Routes: `routes/`
92
+ - Migrations: `database/migrations/`
93
+ - Tests: `tests/`
94
+ - Components: `components/` or `src/components/`
95
+
96
+ ## Conventions
97
+ - TypeScript: <yes/no>
98
+ - Linting: <ESLint/PHPStan/none>
99
+ - Formatting: <Prettier/none>
100
+ - Docker: <yes/no>
101
+
102
+ ## Ecosystem
103
+ - **Ecosystem:** <name or "standalone">
104
+ - **Role:** <api/frontend/admin/worker>
105
+
106
+ ## Current State
107
+ - Total commits: <N>
108
+ - Active branches: <list>
109
+ - Top contributors: <list>
110
+ - Last commit: <date and message>
111
+
112
+ ## MCPs Active
113
+ - <list from applied profile>
114
+
115
+ ## Decisions
116
+ - **Onboarded:** <date> via ARKA OS v<version>
117
+ - **MCP Profile:** <profile>
118
+ ```
119
+
120
+ ## Step 9: Register in ARKA OS
121
+
122
+ ```bash
123
+ mkdir -p "$ARKA_OS/projects/<name>"
124
+ cp "<path>/PROJECT.md" "$ARKA_OS/projects/<name>/PROJECT.md"
125
+ echo "<absolute-path>" > "$ARKA_OS/projects/<name>/.project-path"
126
+ ```
127
+
128
+ The `.project-path` file stores the absolute path so system commands like `/arka standup` can find and reference the actual project.
129
+
130
+ ## Step 10: Apply MCP Profile
131
+
132
+ ```bash
133
+ bash "$ARKA_OS/mcps/scripts/apply-mcps.sh" <profile> --project "<path>"
134
+ ```
135
+
136
+ This generates `.mcp.json` and `.claude/settings.local.json` in the project.
137
+
138
+ ## Step 11: Create Obsidian Documentation
139
+
140
+ Create pages in the Obsidian vault at `{{OBSIDIAN_VAULT}}`:
141
+
142
+ **Home page:** `Projects/<name>/Home.md`
143
+ ```markdown
144
+ ---
145
+ type: project
146
+ name: <name>
147
+ stack:
148
+ - <framework>
149
+ - <language>
150
+ status: active
151
+ date_created: <YYYY-MM-DD>
152
+ ecosystem: <ecosystem or null>
153
+ tags:
154
+ - project
155
+ - <framework-kebab-case>
156
+ ---
157
+
158
+ # <name>
159
+
160
+ > Onboarded into ARKA OS on <date>
161
+
162
+ ## Overview
163
+ - **Framework:** <framework>
164
+ - **Architecture:** <type>
165
+ - **Stack:** <technologies>
166
+
167
+ ## Architecture
168
+ - [[<name> - Architecture]]
169
+
170
+ ## Links
171
+ - Local: `<path>`
172
+ - ARKA OS: `projects/<name>/PROJECT.md`
173
+
174
+ ---
175
+ *Part of the [[Projects MOC]]*
176
+ ```
177
+
178
+ **Architecture overview:** `Projects/<name>/Architecture/Overview.md`
179
+ ```markdown
180
+ ---
181
+ type: adr-log
182
+ project: <name>
183
+ date_created: <YYYY-MM-DD>
184
+ tags:
185
+ - architecture
186
+ - adr
187
+ ---
188
+
189
+ # Architecture — <name>
190
+
191
+ ## ADR-000: Project Onboarded
192
+ - **Date:** <today>
193
+ - **Decision:** Onboarded existing project into ARKA OS
194
+ - **Stack:** <full stack details>
195
+ - **Architecture:** <type> with <patterns>
196
+ - **MCP Profile:** <profile>
197
+ ```
198
+
199
+ **Update Projects MOC:** Append `- [[<name>]]` to the Active Projects section.
200
+
201
+ **Ecosystem MOC** (if ecosystem assigned): Create or update `Projects/Ecosystems/<ecosystem>.md`:
202
+ ```markdown
203
+ ---
204
+ type: ecosystem
205
+ name: <ecosystem>
206
+ date_updated: <YYYY-MM-DD>
207
+ tags:
208
+ - ecosystem
209
+ - project
210
+ ---
211
+
212
+ # <ecosystem> Ecosystem
213
+
214
+ ## Projects
215
+ | Project | Role | Stack | Path |
216
+ |---------|------|-------|------|
217
+ | [[<name>]] | <role> | <stack> | `<path>` |
218
+
219
+ ---
220
+ *Part of the [[Projects MOC]]*
221
+ ```
222
+
223
+ ## Step 12: Report
224
+
225
+ ```
226
+ ═══ ARKA OS — Project Onboarded ═══
227
+ Name: <name>
228
+ Framework: <framework>
229
+ Architecture: <type>
230
+ MCPs: <count> active (<profile> profile)
231
+ Ecosystem: <ecosystem or "standalone">
232
+ PROJECT.md: <path>/PROJECT.md
233
+ Obsidian: Projects/<name>/Home.md
234
+ ════════════════════════════════════
235
+
236
+ Next steps:
237
+ cd <path>
238
+ /dev feature "describe your first feature"
239
+ /dev review (review current code)
240
+ ```
241
+
242
+ ## Ecosystem Subcommand Workflows
243
+
244
+ ### /dev ecosystem list
245
+
246
+ 1. Read `knowledge/ecosystems.json`
247
+ 2. Display all ecosystems with their projects:
248
+
249
+ ```
250
+ ═══ ARKA OS — Ecosystems ═══
251
+ <ecosystem-name>
252
+ • <project> (<role>) — <stack> — <path>
253
+ • <project> (<role>) — <stack> — <path>
254
+
255
+ <ecosystem-name>
256
+ • <project> (<role>) — <stack> — <path>
257
+ ═════════════════════════════
258
+ ```
259
+
260
+ ### /dev ecosystem create <name>
261
+
262
+ 1. Read `knowledge/ecosystems.json`
263
+ 2. Create new ecosystem entry: `"<name>": { "projects": [] }`
264
+ 3. Write back
265
+ 4. Confirm creation
266
+
267
+ ### /dev ecosystem add <project> --to <ecosystem>
268
+
269
+ 1. Read `knowledge/ecosystems.json`
270
+ 2. Read `projects/<project>/PROJECT.md` to get stack info
271
+ 3. Read `projects/<project>/.project-path` to get path
272
+ 4. Ask user for role (api/frontend/admin/worker/docs/landing)
273
+ 5. Add to ecosystem
274
+ 6. Write back
275
+ 7. Update Ecosystem MOC in Obsidian
276
+
277
+ ## Error Handling
278
+
279
+ - If path doesn't exist: suggest common directories, ask for correct path
280
+ - If already onboarded: show existing PROJECT.md, ask if re-onboard
281
+ - If no git repo: skip git analysis steps, warn user
282
+ - If detection script fails: fall back to manual file inspection
283
+ - If MCP apply fails: warn but continue (MCPs can be applied later)
284
+ - If Obsidian vault not configured: skip Obsidian steps, warn user