oneie 3.5.0 → 3.6.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 (132) hide show
  1. package/.claude/agents/agent-director.md +902 -22
  2. package/.claude/agents/agent-onboard-example-output.md +600 -0
  3. package/.claude/agents/agent-onboard.md +576 -0
  4. package/.claude/commands/ONBOARDING_ENHANCEMENT_SUMMARY.md +266 -0
  5. package/.claude/commands/one.md +375 -5
  6. package/.claude/commands/release.md +64 -3
  7. package/CLAUDE.md +55 -69
  8. package/dist/commands/init.d.ts +5 -6
  9. package/dist/commands/init.d.ts.map +1 -1
  10. package/dist/commands/init.js +101 -101
  11. package/dist/commands/init.js.map +1 -1
  12. package/dist/index.js +6 -5
  13. package/dist/index.js.map +1 -1
  14. package/dist/utils/installation-setup.d.ts +24 -1
  15. package/dist/utils/installation-setup.d.ts.map +1 -1
  16. package/dist/utils/installation-setup.js +85 -1
  17. package/dist/utils/installation-setup.js.map +1 -1
  18. package/dist/utils/launch-claude.d.ts +6 -0
  19. package/dist/utils/launch-claude.d.ts.map +1 -0
  20. package/dist/utils/launch-claude.js +51 -0
  21. package/dist/utils/launch-claude.js.map +1 -0
  22. package/dist/utils/validation.d.ts +48 -0
  23. package/dist/utils/validation.d.ts.map +1 -0
  24. package/dist/utils/validation.js +73 -0
  25. package/dist/utils/validation.js.map +1 -0
  26. package/folders.yaml +1 -1
  27. package/one/.obsidian/core-plugins.json +33 -0
  28. package/one/.obsidian/workspace.json +20 -20
  29. package/one/connections/workflow-onboarding.md +683 -0
  30. package/one/events/CART-DRAWER-INTEGRATION-GUIDE.md +354 -0
  31. package/one/events/CRITICAL-FIXES-COMPLETE.md +504 -0
  32. package/one/events/DEPLOYMENT.md +178 -0
  33. package/one/events/ECOMMERCE-DEMO-PLAN.md +225 -0
  34. package/one/events/ECOMMERCE-LIVE-DEMO.md +363 -0
  35. package/one/events/ECOMMERCE-TEMPLATE-COMPLETE.md +735 -0
  36. package/one/events/ECOMMERCE-TEMPLATES-SUMMARY.md +923 -0
  37. package/one/events/GRADIENT-TEXT-PERMANENT-FIX.md +223 -0
  38. package/one/events/HANDOFF.md +313 -0
  39. package/one/events/IMPLEMENTATION-SUMMARY-FINAL.md +503 -0
  40. package/one/events/IMPLEMENTATION_SUMMARY.md +529 -0
  41. package/one/events/LANDING-PAGE-EXAMPLE-OUTPUT.md +666 -0
  42. package/one/events/LANDING-PAGE-IMPLEMENTATION.md +642 -0
  43. package/one/events/LANDING-PAGE-QUICKSTART.md +407 -0
  44. package/one/events/MULTI-ONTOLOGY-COMPLETE-GUIDE.md +1627 -0
  45. package/one/events/MULTI-ONTOLOGY-IMPLEMENTATION-COMPLETE.md +573 -0
  46. package/one/events/ONBOARDING-IMPLEMENTATION-COMPLETE copy.md +398 -0
  47. package/one/events/ONTOLOGY-TUTORIALS-SUMMARY.md +525 -0
  48. package/one/events/ONTOLOGY-TYPE-GENERATOR-SUMMARY.md +455 -0
  49. package/one/events/ONTOLOGY_DISCOVERY_IMPLEMENTATION.md +486 -0
  50. package/one/events/ONTOLOGY_DISCOVERY_QUICKSTART.md +203 -0
  51. package/one/events/SECURITY-AUDIT-FIXES.md +376 -0
  52. package/one/events/SECURITY-SCAN-COMPLETE.md +281 -0
  53. package/one/events/SHOP-BUILD-STATUS.md +114 -0
  54. package/one/events/SHOP-PREMIUM-UPDATE.md +149 -0
  55. package/one/events/SITE-WIDE-GRADIENT-FIX.md +299 -0
  56. package/one/events/STORE-PRODUCTION-READY-STATUS.md +359 -0
  57. package/one/events/STRIPE-PAYMENT-METHODS-GUIDE.md +429 -0
  58. package/one/events/agent-director-enhancement-summary.md +386 -0
  59. package/one/events/agent-onboard-implementation-summary.md +457 -0
  60. package/one/events/clean-agent-ontology-cleanup-report.md +353 -0
  61. package/one/events/landing-page-generator.md +458 -0
  62. package/one/events/onboarding-implementation-complete.md +505 -0
  63. package/one/events/release.md +254 -0
  64. package/one/events/separate-implementation-status.md +537 -0
  65. package/one/knowledge/100-inference-quick-reference.md +431 -0
  66. package/one/knowledge/agent-onboard-usage.md +612 -0
  67. package/one/knowledge/cli-claude-handoff.md +718 -0
  68. package/one/knowledge/ontology-blog.yaml +31 -0
  69. package/one/knowledge/ontology-cheatsheet.md +591 -0
  70. package/one/knowledge/ontology-community.yaml +42 -0
  71. package/one/knowledge/ontology-core-universal.md +722 -0
  72. package/one/knowledge/ontology-core.yaml +50 -0
  73. package/one/knowledge/ontology-courses.yaml +53 -0
  74. package/one/knowledge/ontology-creator.md +376 -0
  75. package/one/knowledge/ontology-developer-guide.md +789 -0
  76. package/one/knowledge/ontology-education.md +920 -0
  77. package/one/knowledge/ontology-index.md +354 -0
  78. package/one/knowledge/ontology-migration-guide.md +811 -0
  79. package/one/knowledge/ontology-minimal.yaml +1 -1
  80. package/one/knowledge/ontology-portfolio.yaml +31 -0
  81. package/one/knowledge/ontology-quickstart.md +576 -0
  82. package/one/knowledge/ontology-shop.yaml +121 -0
  83. package/one/knowledge/ontology-tokens.yaml +32 -0
  84. package/one/knowledge/ontology-tutorial.md +434 -0
  85. package/one/knowledge/ontology-video-script.md +890 -0
  86. package/one/things/docs/ecommerce/ARCHITECTURE-DIAGRAM.md +467 -0
  87. package/one/things/docs/ecommerce/CONVERSION-ELEMENTS-IMPLEMENTATION.md +408 -0
  88. package/one/things/docs/ecommerce/CONVERSION-ELEMENTS-SUMMARY.md +369 -0
  89. package/one/things/docs/ecommerce/CONVERSION-UX-IMPLEMENTATION-SUMMARY.md +396 -0
  90. package/one/things/docs/ecommerce/FEATURE-SUMMARY.md +468 -0
  91. package/one/things/docs/ecommerce/IMPLEMENTATION-NOTES.md +582 -0
  92. package/one/things/docs/ecommerce/INTEGRATION-EXAMPLE.md +449 -0
  93. package/one/things/docs/ecommerce/QUICK-START.md +368 -0
  94. package/one/things/docs/ecommerce/URGENCY-IMPLEMENTATION-SUMMARY.md +498 -0
  95. package/one/things/docs/ecommerce/URGENCY-QUICK-REFERENCE.md +237 -0
  96. package/one/things/docs/ecommerce/USAGE-EXAMPLE.astro +171 -0
  97. package/one/things/docs/ecommerce/demo.astro +309 -0
  98. package/one/things/plans/agent-director-100-inference-plans.md +410 -0
  99. package/one/things/plans/dual-website-strategy.md +612 -0
  100. package/one/things/plans/feature-based-sites.md +821 -0
  101. package/one/things/plans/multi-ontology-architecture.md +836 -0
  102. package/one/things/plans/onboarding.md +32 -0
  103. package/one/things/plans/separate.md +15 -17
  104. package/one/things/plans/start-new.md +738 -0
  105. package/package.json +2 -2
  106. package/one/things/claude/hooks/agent-hook-manager.js +0 -525
  107. package/one/things/claude/hooks/agent-load-balancer.js +0 -271
  108. package/one/things/claude/hooks/agent-request-interceptor.js +0 -70
  109. package/one/things/claude/hooks/cascade-feedback.js +0 -297
  110. package/one/things/claude/hooks/cascade-integration-hooks.js +0 -648
  111. package/one/things/claude/hooks/continuous-improvement-monitor.js +0 -510
  112. package/one/things/claude/hooks/file-organization-engine.js +0 -427
  113. package/one/things/claude/hooks/file-organization-monitor.js +0 -269
  114. package/one/things/claude/hooks/hook-config-manager.js +0 -202
  115. package/one/things/claude/hooks/hook-orchestrator.js +0 -662
  116. package/one/things/claude/hooks/hook-performance-report.js +0 -120
  117. package/one/things/claude/hooks/mcp-cascade-integration.js +0 -816
  118. package/one/things/claude/hooks/memory-optimizer.js +0 -510
  119. package/one/things/claude/hooks/ontology-compliance.js +0 -394
  120. package/one/things/claude/hooks/ontology-hook-manager.js +0 -316
  121. package/one/things/claude/hooks/ontology-validation-engine.js +0 -317
  122. package/one/things/claude/hooks/performance-monitoring-hook.js +0 -422
  123. package/one/things/claude/hooks/quality-scoring-engine.js +0 -834
  124. package/one/things/claude/hooks/simple-load-balancer.js +0 -238
  125. package/one/things/claude/hooks/startup-optimizer.js +0 -625
  126. package/one/things/claude/hooks/story-scoring-system.js +0 -445
  127. package/one/things/claude/hooks/story-validation-engine.js +0 -473
  128. package/one/things/claude/hooks/structure-synchronizer.js +0 -194
  129. package/one/things/claude/hooks/sub-agent-output-validator.js +0 -647
  130. package/one/things/claude/hooks/sub-agent-validation-hook.js +0 -343
  131. package/one/things/claude/hooks/trinity-validation-system.js +0 -392
  132. package/one/things/plans/organizations-to-groups.md +0 -705
@@ -0,0 +1,718 @@
1
+ # CLI → Claude Code Handoff
2
+
3
+ **Version:** 1.0.0
4
+ **Purpose:** Define how `npx oneie` CLI coordinates with Claude Code for onboarding and building
5
+
6
+ ---
7
+
8
+ ## The Handoff Flow
9
+
10
+ ```
11
+ ┌─────────────────┐
12
+ │ npx oneie init │ ← User runs CLI
13
+ └────────┬────────┘
14
+ │
15
+ ▼
16
+ ┌─────────────────────────────┐
17
+ │ 1. Collect User Info │
18
+ │ - Name │
19
+ │ - Organization │
20
+ │ - Website URL │
21
+ │ - Email │
22
+ └────────┬────────────────────┘
23
+ │
24
+ ▼
25
+ ┌─────────────────────────────┐
26
+ │ 2. Create Installation │
27
+ │ - /[org-slug]/ │
28
+ │ - .env.local │
29
+ │ - onboarding.json │
30
+ └────────┬────────────────────┘
31
+ │
32
+ ▼
33
+ ┌─────────────────────────────┐
34
+ │ 3. Launch Claude Code │
35
+ │ $ claude │
36
+ └────────┬────────────────────┘
37
+ │
38
+ ▼
39
+ ┌─────────────────────────────┐
40
+ │ 4. User Runs /one │ ← Existing command
41
+ │ (reads onboarding.json) │
42
+ └────────┬────────────────────┘
43
+ │
44
+ ▼
45
+ ┌─────────────────────────────┐
46
+ │ 5. Claude Analyzes Website │
47
+ │ - agent-onboard │
48
+ │ - WebFetch website │
49
+ │ - Extract brand │
50
+ │ - Generate ontology │
51
+ └────────┬────────────────────┘
52
+ │
53
+ ▼
54
+ ┌─────────────────────────────┐
55
+ │ 6. Claude Presents Features │
56
+ │ - Shows recommendations │
57
+ │ - User selects │
58
+ └────────┬────────────────────┘
59
+ │
60
+ ▼
61
+ ┌─────────────────────────────┐
62
+ │ 7. Claude Builds Platform │
63
+ │ - 100-inference plan │
64
+ │ - Specialized agents │
65
+ │ - Deploy iteratively │
66
+ └─────────────────────────────┘
67
+ ```
68
+
69
+ ---
70
+
71
+ ## Phase 1: CLI Collects Information
72
+
73
+ ### User Experience
74
+
75
+ ```bash
76
+ $ npx oneie init
77
+
78
+ ██████╗ ███╗ ██╗███████╗
79
+ ██╔═══██╗████╗ ██║██╔════╝
80
+ ██║ ██║██╔██╗ ██║█████╗
81
+ ██║ ██║██║╚██╗██║██╔══╝
82
+ ╚██████╔╝██║ ╚████║███████╗
83
+ ╚═════╝ ╚═╝ ╚═══╝╚══════╝
84
+
85
+ Make Your Ideas Real
86
+
87
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
88
+ Welcome! Let's build your platform.
89
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
90
+
91
+ ? What's your name? › Tom O'Connor
92
+ ? Organization name? › ONE Platform
93
+ ? What's your current website? › https://one.ie
94
+ ? What email should we use? › tom@one.ie
95
+
96
+ ✅ Information collected!
97
+ ```
98
+
99
+ ### CLI Actions
100
+
101
+ ```typescript
102
+ // cli/src/commands/init.ts
103
+ export async function init() {
104
+ const answers = await prompts([
105
+ {
106
+ type: 'text',
107
+ name: 'name',
108
+ message: "What's your name?",
109
+ },
110
+ {
111
+ type: 'text',
112
+ name: 'organizationName',
113
+ message: 'Organization name?',
114
+ },
115
+ {
116
+ type: 'text',
117
+ name: 'websiteUrl',
118
+ message: "What's your current website?",
119
+ validate: (url) => isValidUrl(url) || 'Please enter a valid URL',
120
+ },
121
+ {
122
+ type: 'text',
123
+ name: 'email',
124
+ message: 'What email should we use?',
125
+ validate: (email) => isValidEmail(email) || 'Please enter a valid email',
126
+ },
127
+ ]);
128
+
129
+ // Generate org slug
130
+ const orgSlug = slugify(answers.organizationName);
131
+
132
+ // Create installation folder
133
+ await createInstallationFolder(orgSlug, answers);
134
+
135
+ // Launch Claude Code
136
+ await launchClaude(orgSlug);
137
+ }
138
+ ```
139
+
140
+ ---
141
+
142
+ ## Phase 2: CLI Creates Installation Folder
143
+
144
+ ### Folder Structure Created
145
+
146
+ ```
147
+ /one-platform/ # Installation root
148
+ ├── .onboarding.json # Handoff data for Claude
149
+ ├── .env.local # Initial config
150
+ └── knowledge/
151
+ └── .gitkeep
152
+ ```
153
+
154
+ ### `.onboarding.json` (Handoff File)
155
+
156
+ This is the **key handoff mechanism** - CLI writes it, Claude reads it:
157
+
158
+ ```json
159
+ {
160
+ "version": "1.0.0",
161
+ "status": "pending_analysis",
162
+ "timestamp": 1729468800000,
163
+
164
+ "user": {
165
+ "name": "Tom O'Connor",
166
+ "email": "tom@one.ie"
167
+ },
168
+
169
+ "organization": {
170
+ "name": "ONE Platform",
171
+ "slug": "one-platform"
172
+ },
173
+
174
+ "website": {
175
+ "url": "https://one.ie",
176
+ "analyzed": false,
177
+ "brandExtracted": false,
178
+ "ontologyGenerated": false
179
+ },
180
+
181
+ "features": {
182
+ "selected": [],
183
+ "recommended": []
184
+ },
185
+
186
+ "plan": {
187
+ "inferences": [],
188
+ "status": "not_started"
189
+ }
190
+ }
191
+ ```
192
+
193
+ ### `.env.local` (Initial Config)
194
+
195
+ ```bash
196
+ # Organization
197
+ INSTALLATION_NAME="one-platform"
198
+ ORG_NAME="ONE Platform"
199
+ ORG_SLUG="one-platform"
200
+ ORG_OWNER_EMAIL="tom@one.ie"
201
+ ORG_OWNER_NAME="Tom O'Connor"
202
+
203
+ # Website to analyze
204
+ ONBOARDING_WEBSITE_URL="https://one.ie"
205
+
206
+ # Status
207
+ ONBOARDING_STATUS="pending_analysis"
208
+ ```
209
+
210
+ ---
211
+
212
+ ## Phase 3: CLI Launches Claude
213
+
214
+ ### CLI Output
215
+
216
+ ```bash
217
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
218
+ ✅ Setup Complete!
219
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
220
+
221
+ Created: /one-platform/
222
+ Saved: Website URL (https://one.ie)
223
+
224
+ Next: Let's analyze your website and build your platform!
225
+
226
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
227
+ 🤖 Launching Claude Code
228
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
229
+
230
+ When Claude starts, run:
231
+ /one
232
+
233
+ This will analyze your website and recommend features.
234
+
235
+ Launching Claude...
236
+ ```
237
+
238
+ ### CLI Implementation
239
+
240
+ ```typescript
241
+ async function launchClaude(orgSlug: string) {
242
+ console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
243
+ console.log('✅ Setup Complete!');
244
+ console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n');
245
+
246
+ console.log(`Created: /${orgSlug}/`);
247
+
248
+ const onboarding = await readJSON(`/${orgSlug}/.onboarding.json`);
249
+ console.log(`Saved: Website URL (${onboarding.website.url})\n`);
250
+
251
+ console.log('Next: Let\'s analyze your website and build your platform!\n');
252
+
253
+ console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━');
254
+ console.log('🤖 Launching Claude Code');
255
+ console.log('━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n');
256
+
257
+ console.log('When Claude starts, run:');
258
+ console.log(' /one\n');
259
+ console.log('This will analyze your website and recommend features.\n');
260
+
261
+ console.log('Launching Claude...\n');
262
+
263
+ // Launch Claude Code
264
+ const claude = spawn('claude', [], {
265
+ stdio: 'inherit',
266
+ cwd: process.cwd(),
267
+ });
268
+
269
+ claude.on('close', (code) => {
270
+ if (code !== 0) {
271
+ console.error('Claude Code exited with error');
272
+ }
273
+ });
274
+ }
275
+ ```
276
+
277
+ ---
278
+
279
+ ## Phase 4: Claude Reads Onboarding Context
280
+
281
+ ### When User Runs `/one`
282
+
283
+ The existing `.claude/commands/one.md` should be updated to:
284
+
285
+ 1. **Check for `.onboarding.json`** in installation folders
286
+ 2. **Read onboarding data** if status is `pending_analysis`
287
+ 3. **Invoke agent-onboard** to analyze website
288
+ 4. **Update `.onboarding.json`** with results
289
+ 5. **Present features** for user selection
290
+
291
+ ### Expected `/one` Behavior
292
+
293
+ ```bash
294
+ $ /one
295
+
296
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
297
+ 🚀 ONE PLATFORM ONBOARDING
298
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
299
+
300
+ ✅ Found onboarding context:
301
+ • Organization: ONE Platform
302
+ • Website: https://one.ie
303
+ • Status: Pending analysis
304
+
305
+ Starting website analysis...
306
+
307
+ [agent-onboard activates]
308
+
309
+ [WebFetch] Fetching https://one.ie
310
+ [WebFetch] Analyzing content, extracting brand identity
311
+
312
+ ✅ Brand extracted:
313
+ • Primary color: #FF6B6B (Coral)
314
+ • Secondary color: #4ECDC4 (Teal)
315
+ • Logo: /logo.svg
316
+ • Tone: Technical, friendly, empowering
317
+
318
+ ✅ Custom ontology generated:
319
+ • Groups: organizations, teams, projects
320
+ • Things: projects, features, deployments, agents
321
+ • Events: project_created, feature_deployed
322
+
323
+ [Write] Saving to /one-platform/knowledge/ontology.md
324
+ [Edit] Updating .onboarding.json
325
+
326
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
327
+ ✨ RECOMMENDED FEATURES
328
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
329
+
330
+ Based on https://one.ie analysis:
331
+
332
+ FOUNDATION (Always recommended)
333
+ [x] Landing page (Infer 1-10, ~5 min)
334
+ [x] Authentication (Infer 11-20, ~10 min)
335
+ [x] Multi-tenant groups (Infer 21-30, ~10 min)
336
+
337
+ DETECTED FROM YOUR SITE
338
+ [ ] Real-time sync (Infer 31-40, ~15 min)
339
+ [ ] Project management (Infer 41-50, ~15 min)
340
+ [ ] AI agents (Infer 61-70, ~20 min)
341
+
342
+ Which features would you like to build?
343
+ ```
344
+
345
+ ---
346
+
347
+ ## Phase 5: Onboarding JSON State Transitions
348
+
349
+ ### State Flow
350
+
351
+ ```
352
+ pending_analysis
353
+ ↓ (after /one reads website)
354
+ analyzing
355
+ ↓ (after agent-onboard completes)
356
+ features_presented
357
+ ↓ (after user selects features)
358
+ plan_generated
359
+ ↓ (after agent-director creates 100-inference plan)
360
+ building
361
+ ↓ (during iterative builds)
362
+ completed
363
+ ```
364
+
365
+ ### Updated `.onboarding.json` After Analysis
366
+
367
+ ```json
368
+ {
369
+ "version": "1.0.0",
370
+ "status": "features_presented",
371
+ "timestamp": 1729468800000,
372
+
373
+ "user": {
374
+ "name": "Tom O'Connor",
375
+ "email": "tom@one.ie"
376
+ },
377
+
378
+ "organization": {
379
+ "name": "ONE Platform",
380
+ "slug": "one-platform"
381
+ },
382
+
383
+ "website": {
384
+ "url": "https://one.ie",
385
+ "analyzed": true,
386
+ "analyzedAt": 1729468830000,
387
+ "brandExtracted": true,
388
+ "ontologyGenerated": true
389
+ },
390
+
391
+ "brand": {
392
+ "colors": {
393
+ "primary": "#FF6B6B",
394
+ "secondary": "#4ECDC4",
395
+ "accent": "#95E1D3"
396
+ },
397
+ "logo": "/logo.svg",
398
+ "fonts": {
399
+ "heading": "Inter",
400
+ "body": "Inter"
401
+ },
402
+ "voice": "Technical, friendly, empowering",
403
+ "audience": "Developers, creators, entrepreneurs"
404
+ },
405
+
406
+ "ontology": {
407
+ "path": "/one-platform/knowledge/ontology.md",
408
+ "groups": ["organization", "team", "project"],
409
+ "people": ["platform_owner", "developer", "creator"],
410
+ "things": ["project", "feature", "deployment", "agent"],
411
+ "connections": ["owns", "collaborates_on", "deployed_to"],
412
+ "events": ["project_created", "feature_deployed", "agent_executed"],
413
+ "knowledge": ["documentation", "pattern", "lesson"]
414
+ },
415
+
416
+ "features": {
417
+ "recommended": [
418
+ {
419
+ "id": "landing-page",
420
+ "name": "Landing Page",
421
+ "inferences": [1, 10],
422
+ "duration": "~5 min",
423
+ "required": true
424
+ },
425
+ {
426
+ "id": "authentication",
427
+ "name": "Authentication",
428
+ "inferences": [11, 20],
429
+ "duration": "~10 min",
430
+ "required": true
431
+ },
432
+ {
433
+ "id": "multi-tenant",
434
+ "name": "Multi-Tenant Groups",
435
+ "inferences": [21, 30],
436
+ "duration": "~10 min",
437
+ "required": true
438
+ },
439
+ {
440
+ "id": "real-time-sync",
441
+ "name": "Real-Time Sync",
442
+ "inferences": [31, 40],
443
+ "duration": "~15 min",
444
+ "detected": true,
445
+ "reason": "Detected Convex backend"
446
+ },
447
+ {
448
+ "id": "project-management",
449
+ "name": "Project Management",
450
+ "inferences": [41, 50],
451
+ "duration": "~15 min",
452
+ "detected": true,
453
+ "reason": "Detected project-focused content"
454
+ },
455
+ {
456
+ "id": "ai-agents",
457
+ "name": "AI Agents",
458
+ "inferences": [61, 70],
459
+ "duration": "~20 min",
460
+ "detected": true,
461
+ "reason": "Detected AI/agent mentions"
462
+ }
463
+ ],
464
+ "selected": []
465
+ },
466
+
467
+ "plan": {
468
+ "inferences": [],
469
+ "status": "not_started"
470
+ }
471
+ }
472
+ ```
473
+
474
+ ---
475
+
476
+ ## Phase 6: User Selects Features
477
+
478
+ ### Interactive Selection (In Claude)
479
+
480
+ User can respond with feature selections:
481
+
482
+ ```
483
+ I want: landing page, authentication, multi-tenant, and ai-agents
484
+ ```
485
+
486
+ ### Claude Updates `.onboarding.json`
487
+
488
+ ```json
489
+ {
490
+ "status": "plan_generated",
491
+
492
+ "features": {
493
+ "selected": [
494
+ "landing-page",
495
+ "authentication",
496
+ "multi-tenant",
497
+ "ai-agents"
498
+ ]
499
+ },
500
+
501
+ "plan": {
502
+ "status": "ready",
503
+ "totalInferences": 70,
504
+ "estimatedDuration": "~50 min",
505
+ "phases": [
506
+ {
507
+ "name": "Landing Page",
508
+ "inferences": [1, 10],
509
+ "specialist": "agent-frontend",
510
+ "status": "pending"
511
+ },
512
+ {
513
+ "name": "Authentication",
514
+ "inferences": [11, 20],
515
+ "specialist": "agent-backend",
516
+ "status": "pending"
517
+ },
518
+ {
519
+ "name": "Multi-Tenant Groups",
520
+ "inferences": [21, 30],
521
+ "specialist": "agent-backend",
522
+ "status": "pending"
523
+ },
524
+ {
525
+ "name": "AI Agents",
526
+ "inferences": [61, 70],
527
+ "specialist": "agent-builder",
528
+ "status": "pending"
529
+ },
530
+ {
531
+ "name": "Deploy & Document",
532
+ "inferences": [91, 100],
533
+ "specialist": "agent-ops",
534
+ "status": "pending"
535
+ }
536
+ ]
537
+ }
538
+ }
539
+ ```
540
+
541
+ ---
542
+
543
+ ## Phase 7: Claude Builds Platform
544
+
545
+ ### agent-director Coordinates
546
+
547
+ 1. **Reads plan** from `.onboarding.json`
548
+ 2. **Invokes specialists** for each phase
549
+ 3. **Updates status** after each inference
550
+ 4. **Deploys iteratively** (landing page first, then features)
551
+ 5. **Notifies user** after each milestone
552
+
553
+ ### Status Updates in `.onboarding.json`
554
+
555
+ ```json
556
+ {
557
+ "status": "building",
558
+
559
+ "plan": {
560
+ "status": "in_progress",
561
+ "currentInference": 23,
562
+ "totalInferences": 70,
563
+ "progress": 32.8,
564
+
565
+ "phases": [
566
+ {
567
+ "name": "Landing Page",
568
+ "status": "completed",
569
+ "completedAt": 1729468900000,
570
+ "url": "https://one-platform.pages.dev"
571
+ },
572
+ {
573
+ "name": "Authentication",
574
+ "status": "completed",
575
+ "completedAt": 1729469500000
576
+ },
577
+ {
578
+ "name": "Multi-Tenant Groups",
579
+ "status": "in_progress",
580
+ "startedAt": 1729469600000
581
+ },
582
+ {
583
+ "name": "AI Agents",
584
+ "status": "pending"
585
+ },
586
+ {
587
+ "name": "Deploy & Document",
588
+ "status": "pending"
589
+ }
590
+ ]
591
+ }
592
+ }
593
+ ```
594
+
595
+ ---
596
+
597
+ ## Key Design Decisions
598
+
599
+ ### 1. `.onboarding.json` is the Source of Truth
600
+ - CLI writes initial data
601
+ - Claude reads and updates it
602
+ - Tracks state throughout entire process
603
+ - Enables resumption if interrupted
604
+
605
+ ### 2. Separation of Concerns
606
+ - **CLI**: User interaction, folder setup, launch Claude
607
+ - **Claude + /one**: Analysis, feature selection, building
608
+ - **agent-onboard**: Website analysis
609
+ - **agent-director**: Build coordination
610
+ - **Specialized agents**: Feature implementation
611
+
612
+ ### 3. Existing `/one` Command Enhanced
613
+ - Check for `.onboarding.json`
614
+ - If found and status is `pending_analysis`, start onboarding flow
615
+ - If not found, normal `/one` behavior
616
+ - Backwards compatible
617
+
618
+ ### 4. Transparent Progress
619
+ - User sees inference progress (23/70)
620
+ - Status updates in `.onboarding.json`
621
+ - URLs appear as features go live
622
+ - Can check progress anytime
623
+
624
+ ---
625
+
626
+ ## Implementation Checklist
627
+
628
+ ### CLI Side (`npx oneie`)
629
+ - [ ] Implement `init` command with prompts
630
+ - [ ] Create installation folder structure
631
+ - [ ] Generate `.onboarding.json` handoff file
632
+ - [ ] Write initial `.env.local`
633
+ - [ ] Launch `claude` command
634
+ - [ ] Display instructions for user
635
+
636
+ ### Claude Side (`/one` command)
637
+ - [ ] Read `.onboarding.json` if exists
638
+ - [ ] Check onboarding status
639
+ - [ ] Invoke agent-onboard for website analysis
640
+ - [ ] Extract brand identity (colors, logo, fonts)
641
+ - [ ] Generate custom ontology
642
+ - [ ] Write ontology to installation folder
643
+ - [ ] Update `.onboarding.json` with results
644
+ - [ ] Present recommended features
645
+ - [ ] Accept user feature selection
646
+ - [ ] Generate 100-inference plan
647
+ - [ ] Invoke agent-director to execute plan
648
+
649
+ ### Agent Side
650
+ - [ ] agent-onboard: Website analysis logic
651
+ - [ ] agent-director: Plan generation and coordination
652
+ - [ ] agent-frontend: Landing page, UI features
653
+ - [ ] agent-backend: Auth, multi-tenancy, data
654
+ - [ ] agent-ops: Deployment automation
655
+ - [ ] agent-documenter: Knowledge capture
656
+
657
+ ---
658
+
659
+ ## Example Complete Flow
660
+
661
+ ```bash
662
+ # Terminal 1: User runs CLI
663
+ $ npx oneie init
664
+
665
+ ? Name: Tom O'Connor
666
+ ? Org: ONE Platform
667
+ ? Website: https://one.ie
668
+ ? Email: tom@one.ie
669
+
670
+ ✅ Setup complete!
671
+ Created: /one-platform/
672
+ Saved: Website URL
673
+
674
+ 🤖 Launching Claude Code...
675
+
676
+ # Claude starts automatically
677
+ # User sees Claude Code interface
678
+
679
+ # Terminal 2: Claude Code
680
+ $ /one
681
+
682
+ 🚀 ONE PLATFORM ONBOARDING
683
+
684
+ ✅ Found onboarding context
685
+ Starting analysis...
686
+
687
+ [5 seconds later]
688
+
689
+ ✅ Analysis complete!
690
+
691
+ Recommended features:
692
+ [x] Landing page (Infer 1-10)
693
+ [x] Authentication (Infer 11-20)
694
+ [x] Multi-tenant (Infer 21-30)
695
+ [ ] Real-time sync (Infer 31-40)
696
+ [ ] AI agents (Infer 61-70)
697
+
698
+ Which features? › landing page, authentication, multi-tenant, ai-agents
699
+
700
+ ✅ Plan generated: 70 inferences, ~50 min
701
+
702
+ Ready to build? › Yes
703
+
704
+ 🚀 Starting build...
705
+
706
+ [Infer 1/70] Validate ontology
707
+ [Infer 2/70] Map landing page
708
+ ...
709
+ [Infer 10/70] Deploy landing page
710
+
711
+ ✨ Landing page LIVE: https://one-platform.pages.dev
712
+
713
+ [Continues building...]
714
+ ```
715
+
716
+ ---
717
+
718
+ **This handoff design is clean, stateful, and enables seamless CLI → Claude collaboration!** 🚀