oneie 3.4.2 → 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 (143) 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 +411 -10
  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/app.json +8 -0
  28. package/one/.obsidian/appearance.json +1 -0
  29. package/one/.obsidian/community-plugins.json +3 -0
  30. package/one/.obsidian/core-plugins.json +33 -0
  31. package/one/.obsidian/plugins/easy-bake/main.js +361 -0
  32. package/one/.obsidian/plugins/easy-bake/manifest.json +11 -0
  33. package/one/.obsidian/plugins/easy-bake/styles.css +10 -0
  34. package/one/.obsidian/workspace.json +240 -0
  35. package/one/connections/workflow-onboarding.md +683 -0
  36. package/one/events/CART-DRAWER-INTEGRATION-GUIDE.md +354 -0
  37. package/one/events/CRITICAL-FIXES-COMPLETE.md +504 -0
  38. package/one/events/DEPLOYMENT.md +178 -0
  39. package/one/events/ECOMMERCE-DEMO-PLAN.md +225 -0
  40. package/one/events/ECOMMERCE-LIVE-DEMO.md +363 -0
  41. package/one/events/ECOMMERCE-TEMPLATE-COMPLETE.md +735 -0
  42. package/one/events/ECOMMERCE-TEMPLATES-SUMMARY.md +923 -0
  43. package/one/events/GRADIENT-TEXT-PERMANENT-FIX.md +223 -0
  44. package/one/events/HANDOFF.md +313 -0
  45. package/one/events/IMPLEMENTATION-SUMMARY-FINAL.md +503 -0
  46. package/one/events/IMPLEMENTATION_SUMMARY.md +529 -0
  47. package/one/events/LANDING-PAGE-EXAMPLE-OUTPUT.md +666 -0
  48. package/one/events/LANDING-PAGE-IMPLEMENTATION.md +642 -0
  49. package/one/events/LANDING-PAGE-QUICKSTART.md +407 -0
  50. package/one/events/MULTI-ONTOLOGY-COMPLETE-GUIDE.md +1627 -0
  51. package/one/events/MULTI-ONTOLOGY-IMPLEMENTATION-COMPLETE.md +573 -0
  52. package/one/events/ONBOARDING-IMPLEMENTATION-COMPLETE copy.md +398 -0
  53. package/one/events/ONTOLOGY-TUTORIALS-SUMMARY.md +525 -0
  54. package/one/events/ONTOLOGY-TYPE-GENERATOR-SUMMARY.md +455 -0
  55. package/one/events/ONTOLOGY_DISCOVERY_IMPLEMENTATION.md +486 -0
  56. package/one/events/ONTOLOGY_DISCOVERY_QUICKSTART.md +203 -0
  57. package/one/events/SECURITY-AUDIT-FIXES.md +376 -0
  58. package/one/events/SECURITY-SCAN-COMPLETE.md +281 -0
  59. package/one/events/SHOP-BUILD-STATUS.md +114 -0
  60. package/one/events/SHOP-PREMIUM-UPDATE.md +149 -0
  61. package/one/events/SITE-WIDE-GRADIENT-FIX.md +299 -0
  62. package/one/events/STORE-PRODUCTION-READY-STATUS.md +359 -0
  63. package/one/events/STRIPE-PAYMENT-METHODS-GUIDE.md +429 -0
  64. package/one/events/agent-director-enhancement-summary.md +386 -0
  65. package/one/events/agent-onboard-implementation-summary.md +457 -0
  66. package/one/events/clean-agent-ontology-cleanup-report.md +353 -0
  67. package/one/events/landing-page-generator.md +458 -0
  68. package/one/events/onboarding-implementation-complete.md +505 -0
  69. package/one/events/release.md +254 -0
  70. package/one/events/separate-implementation-status.md +537 -0
  71. package/one/groups/nine-padle-contents.baked.md +1252 -0
  72. package/one/groups/nine-padle-contents.md +6 -0
  73. package/one/knowledge/100-inference-quick-reference.md +431 -0
  74. package/one/knowledge/agent-onboard-usage.md +612 -0
  75. package/one/knowledge/cli-claude-handoff.md +718 -0
  76. package/one/knowledge/installation-folders.md +45 -1
  77. package/one/knowledge/ontology-blog.yaml +31 -0
  78. package/one/knowledge/ontology-cheatsheet.md +591 -0
  79. package/one/knowledge/ontology-community.yaml +42 -0
  80. package/one/knowledge/ontology-core-universal.md +722 -0
  81. package/one/knowledge/ontology-core.yaml +50 -0
  82. package/one/knowledge/ontology-courses.yaml +53 -0
  83. package/one/knowledge/ontology-creator.md +376 -0
  84. package/one/knowledge/ontology-developer-guide.md +789 -0
  85. package/one/knowledge/ontology-education.md +920 -0
  86. package/one/knowledge/ontology-index.md +354 -0
  87. package/one/knowledge/ontology-migration-guide.md +811 -0
  88. package/one/knowledge/ontology-minimal.yaml +1 -1
  89. package/one/knowledge/ontology-portfolio.yaml +31 -0
  90. package/one/knowledge/ontology-quickstart.md +576 -0
  91. package/one/knowledge/ontology-shop.yaml +121 -0
  92. package/one/knowledge/ontology-tokens.yaml +32 -0
  93. package/one/knowledge/ontology-tutorial.md +434 -0
  94. package/one/knowledge/ontology-video-script.md +890 -0
  95. package/one/things/docs/ecommerce/ARCHITECTURE-DIAGRAM.md +467 -0
  96. package/one/things/docs/ecommerce/CONVERSION-ELEMENTS-IMPLEMENTATION.md +408 -0
  97. package/one/things/docs/ecommerce/CONVERSION-ELEMENTS-SUMMARY.md +369 -0
  98. package/one/things/docs/ecommerce/CONVERSION-UX-IMPLEMENTATION-SUMMARY.md +396 -0
  99. package/one/things/docs/ecommerce/FEATURE-SUMMARY.md +468 -0
  100. package/one/things/docs/ecommerce/IMPLEMENTATION-NOTES.md +582 -0
  101. package/one/things/docs/ecommerce/INTEGRATION-EXAMPLE.md +449 -0
  102. package/one/things/docs/ecommerce/QUICK-START.md +368 -0
  103. package/one/things/docs/ecommerce/URGENCY-IMPLEMENTATION-SUMMARY.md +498 -0
  104. package/one/things/docs/ecommerce/URGENCY-QUICK-REFERENCE.md +237 -0
  105. package/one/things/docs/ecommerce/USAGE-EXAMPLE.astro +171 -0
  106. package/one/things/docs/ecommerce/demo.astro +309 -0
  107. package/one/things/plans/agent-director-100-inference-plans.md +410 -0
  108. package/one/things/plans/dual-website-strategy.md +612 -0
  109. package/one/things/plans/feature-based-sites.md +821 -0
  110. package/one/things/plans/multi-ontology-architecture.md +836 -0
  111. package/one/things/plans/onboarding.md +32 -0
  112. package/one/things/plans/separate.md +15 -17
  113. package/one/things/plans/start-new.md +738 -0
  114. package/one/things/templates.md +254 -0
  115. package/one/things/todo.md +23 -5
  116. package/package.json +2 -2
  117. package/one/things/claude/hooks/agent-hook-manager.js +0 -525
  118. package/one/things/claude/hooks/agent-load-balancer.js +0 -271
  119. package/one/things/claude/hooks/agent-request-interceptor.js +0 -70
  120. package/one/things/claude/hooks/cascade-feedback.js +0 -297
  121. package/one/things/claude/hooks/cascade-integration-hooks.js +0 -648
  122. package/one/things/claude/hooks/continuous-improvement-monitor.js +0 -510
  123. package/one/things/claude/hooks/file-organization-engine.js +0 -427
  124. package/one/things/claude/hooks/file-organization-monitor.js +0 -269
  125. package/one/things/claude/hooks/hook-config-manager.js +0 -202
  126. package/one/things/claude/hooks/hook-orchestrator.js +0 -662
  127. package/one/things/claude/hooks/hook-performance-report.js +0 -120
  128. package/one/things/claude/hooks/mcp-cascade-integration.js +0 -816
  129. package/one/things/claude/hooks/memory-optimizer.js +0 -510
  130. package/one/things/claude/hooks/ontology-compliance.js +0 -394
  131. package/one/things/claude/hooks/ontology-hook-manager.js +0 -316
  132. package/one/things/claude/hooks/ontology-validation-engine.js +0 -317
  133. package/one/things/claude/hooks/performance-monitoring-hook.js +0 -422
  134. package/one/things/claude/hooks/quality-scoring-engine.js +0 -834
  135. package/one/things/claude/hooks/simple-load-balancer.js +0 -238
  136. package/one/things/claude/hooks/startup-optimizer.js +0 -625
  137. package/one/things/claude/hooks/story-scoring-system.js +0 -445
  138. package/one/things/claude/hooks/story-validation-engine.js +0 -473
  139. package/one/things/claude/hooks/structure-synchronizer.js +0 -194
  140. package/one/things/claude/hooks/sub-agent-output-validator.js +0 -647
  141. package/one/things/claude/hooks/sub-agent-validation-hook.js +0 -343
  142. package/one/things/claude/hooks/trinity-validation-system.js +0 -392
  143. package/one/things/plans/organizations-to-groups.md +0 -705
@@ -0,0 +1,738 @@
1
+ # Frontend-First Onboarding
2
+
3
+ **Status:** Planning
4
+ **Version:** 1.0.0
5
+ **Created:** 2025-10-22
6
+
7
+ ## Vision
8
+
9
+ Enable instant frontend development without backend complexity. New organizations get a clean, branded starting point with a simple prompt interface. Backend is optional and can be enabled when needed.
10
+
11
+ ## The Flow
12
+
13
+ ```
14
+ User runs: npx oneie
15
+ ↓
16
+ CLI prompts for org details
17
+ ↓
18
+ Creates .env.local + org folder
19
+ ↓
20
+ Launches frontend-only site
21
+ ↓
22
+ Simple prompt: "Create an ecommerce store..."
23
+ ↓
24
+ AI generates pages/components
25
+ ↓
26
+ (Optional) Enable backend when ready
27
+ ```
28
+
29
+ ## Environment Configuration
30
+
31
+ ### .env.local (Created by CLI)
32
+
33
+ ```bash
34
+ # Organization Identity
35
+ ORG_NAME=acme # Reserved: "one"
36
+ ORG_WEBSITE=https://acme.com # Reserved: "https://one.ie"
37
+ ORG_FOLDER=acme # Reserved: "onegroup"
38
+
39
+ # Backend Control
40
+ ONE_BACKEND=off # Default: off (no Convex, no auth)
41
+
42
+ # Only needed when ONE_BACKEND=on
43
+ # PUBLIC_CONVEX_URL=...
44
+ # BETTER_AUTH_SECRET=...
45
+ ```
46
+
47
+ ### Reserved Values (ONE Platform Only)
48
+
49
+ ```bash
50
+ ORG_NAME=one
51
+ ORG_WEBSITE=https://one.ie
52
+ ORG_FOLDER=onegroup
53
+ ```
54
+
55
+ ## CLI Initialization Flow
56
+
57
+ ### Command: `npx oneie`
58
+
59
+ ```bash
60
+ npx oneie
61
+
62
+ ██████╗ ███╗ ██╗███████╗
63
+ ██╔═══██╗████╗ ██║██╔════╝
64
+ ██║ ██║██╔██╗ ██║█████╗
65
+ ██║ ██║██║╚██╗██║██╔══╝
66
+ ╚██████╔╝██║ ╚████║███████╗
67
+ ╚═════╝ ╚═╝ ╚═══╝╚══════╝
68
+
69
+ Make Your Ideas Real
70
+
71
+ ────────────────────────────────
72
+
73
+ Let's set up your organization!
74
+
75
+ Organization name: acme
76
+ Organization website: https://acme.com
77
+ Organization folder (acme): [Enter]
78
+
79
+ ✓ Created .env.local
80
+ ✓ Created /acme folder structure
81
+ ✓ Created brand guide template
82
+ ✓ Ready to start!
83
+
84
+ Run: cd web && bun run dev
85
+ ```
86
+
87
+ ### Validation Rules
88
+
89
+ ```typescript
90
+ // CLI validation
91
+ const RESERVED_NAMES = {
92
+ name: ["one"],
93
+ folder: ["onegroup", "one"],
94
+ website: ["https://one.ie", "http://one.ie", "one.ie"]
95
+ };
96
+
97
+ if (RESERVED_NAMES.name.includes(orgName.toLowerCase())) {
98
+ throw new Error("Organization name 'one' is reserved");
99
+ }
100
+
101
+ if (RESERVED_NAMES.folder.includes(orgFolder.toLowerCase())) {
102
+ throw new Error(`Folder name '${orgFolder}' is reserved`);
103
+ }
104
+
105
+ if (RESERVED_NAMES.website.some(url => orgWebsite.includes(url))) {
106
+ throw new Error("Website 'one.ie' is reserved");
107
+ }
108
+ ```
109
+
110
+ ### Folder Structure Created
111
+
112
+ ```
113
+ /<org-folder>/
114
+ ├── knowledge/
115
+ │ ├── brand-guide.md # Template with org name
116
+ │ └── features.md # Empty template
117
+ └── groups/ # Empty, ready for group docs
118
+ ```
119
+
120
+ ## Frontend Behavior
121
+
122
+ ### Layout Changes (Non-ONE Orgs)
123
+
124
+ **File:** `web/src/layouts/Layout.astro`
125
+
126
+ ```astro
127
+ ---
128
+ const isONE = import.meta.env.ORG_NAME === "one";
129
+ const orgName = import.meta.env.ORG_NAME || "ONE";
130
+ const orgWebsite = import.meta.env.ORG_WEBSITE || "https://one.ie";
131
+ ---
132
+
133
+ <header>
134
+ {isONE ? (
135
+ <!-- Full ONE logo with graphic -->
136
+ <Logo />
137
+ ) : (
138
+ <!-- Text-based org name -->
139
+ <h1 class="text-2xl font-bold">{orgName}</h1>
140
+ )}
141
+ </header>
142
+
143
+ <aside>
144
+ {isONE ? (
145
+ <!-- Full sidebar: Solutions, Platform, etc. -->
146
+ <FullSidebar />
147
+ ) : (
148
+ <!-- Minimal sidebar: Blog + License only -->
149
+ <MinimalSidebar orgWebsite={orgWebsite} />
150
+ )}
151
+ </aside>
152
+ ```
153
+
154
+ ### Homepage Changes (Non-ONE Orgs)
155
+
156
+ **File:** `web/src/pages/index.astro`
157
+
158
+ ```astro
159
+ ---
160
+ const isONE = import.meta.env.ORG_NAME === "one";
161
+ ---
162
+
163
+ {isONE ? (
164
+ <!-- Full ONE homepage -->
165
+ <ONEHomePage />
166
+ ) : (
167
+ <!-- Simple prompt interface -->
168
+ <GetStartedPrompt />
169
+ )}
170
+ ```
171
+
172
+ ### Get Started Prompt Component
173
+
174
+ **File:** `web/src/components/GetStartedPrompt.tsx`
175
+
176
+ ```tsx
177
+ export function GetStartedPrompt() {
178
+ const orgName = import.meta.env.ORG_NAME;
179
+
180
+ return (
181
+ <div class="min-h-screen flex items-center justify-center">
182
+ <div class="max-w-2xl w-full space-y-8 text-center">
183
+ <h1 class="text-6xl font-bold">
184
+ Welcome to {orgName}
185
+ </h1>
186
+
187
+ <p class="text-xl text-muted-foreground">
188
+ What would you like to build?
189
+ </p>
190
+
191
+ <div class="space-y-4">
192
+ <input
193
+ type="text"
194
+ placeholder="Create an ecommerce store..."
195
+ class="w-full text-lg p-4 border rounded-lg"
196
+ />
197
+
198
+ <div class="grid grid-cols-2 gap-4 text-sm">
199
+ <button class="p-4 border rounded-lg hover:bg-accent">
200
+ 🛍️ Ecommerce Store
201
+ </button>
202
+ <button class="p-4 border rounded-lg hover:bg-accent">
203
+ 📝 Blog Platform
204
+ </button>
205
+ <button class="p-4 border rounded-lg hover:bg-accent">
206
+ 👥 Community Site
207
+ </button>
208
+ <button class="p-4 border rounded-lg hover:bg-accent">
209
+ 📊 Dashboard App
210
+ </button>
211
+ </div>
212
+ </div>
213
+
214
+ <div class="text-sm text-muted-foreground">
215
+ <p>Powered by ONE Platform</p>
216
+ <p>Frontend-only mode • No backend required</p>
217
+ </div>
218
+ </div>
219
+ </div>
220
+ );
221
+ }
222
+ ```
223
+
224
+ ### Minimal Sidebar Component
225
+
226
+ **File:** `web/src/components/MinimalSidebar.tsx`
227
+
228
+ ```tsx
229
+ export function MinimalSidebar({ orgWebsite }: { orgWebsite: string }) {
230
+ return (
231
+ <nav class="space-y-4">
232
+ <a href="/blog" class="block p-2 hover:bg-accent rounded">
233
+ Blog
234
+ </a>
235
+ <a href="/license" class="block p-2 hover:bg-accent rounded">
236
+ License
237
+ </a>
238
+ <a href={orgWebsite} class="block p-2 hover:bg-accent rounded text-xs text-muted-foreground">
239
+ {orgWebsite.replace('https://', '')}
240
+ </a>
241
+ </nav>
242
+ );
243
+ }
244
+ ```
245
+
246
+ ## Backend Control
247
+
248
+ ### ONE_BACKEND=off (Default)
249
+
250
+ **Behavior:**
251
+ - No Convex connection attempts
252
+ - No auth flows (signup, signin, etc.)
253
+ - No database queries
254
+ - Pure frontend development
255
+ - All pages work statically
256
+
257
+ **Implementation:**
258
+
259
+ ```typescript
260
+ // web/src/lib/convex.ts
261
+ const backendEnabled = import.meta.env.ONE_BACKEND === "on";
262
+
263
+ export function useConvex() {
264
+ if (!backendEnabled) {
265
+ console.warn("Backend disabled. Enable with ONE_BACKEND=on");
266
+ return null;
267
+ }
268
+
269
+ return new ConvexHttpClient(import.meta.env.PUBLIC_CONVEX_URL);
270
+ }
271
+ ```
272
+
273
+ ```astro
274
+ ---
275
+ // web/src/pages/account/signin.astro
276
+ const backendEnabled = import.meta.env.ONE_BACKEND === "on";
277
+
278
+ if (!backendEnabled) {
279
+ return Astro.redirect("/");
280
+ }
281
+ ---
282
+ ```
283
+
284
+ ### ONE_BACKEND=on (Optional)
285
+
286
+ **When to enable:**
287
+ - Need user authentication
288
+ - Need database storage
289
+ - Need real-time features
290
+ - Ready for backend complexity
291
+
292
+ **Required additional config:**
293
+
294
+ ```bash
295
+ ONE_BACKEND=on
296
+ PUBLIC_CONVEX_URL=https://shocking-falcon-870.convex.cloud
297
+ CONVEX_DEPLOYMENT=prod:shocking-falcon-870
298
+ BETTER_AUTH_SECRET=your-secret-here
299
+ ```
300
+
301
+ ## User Journey
302
+
303
+ ### Day 1: Frontend Only
304
+
305
+ ```bash
306
+ # Initialize
307
+ npx oneie
308
+ > Organization: Acme Corp
309
+ > Website: https://acme.com
310
+
311
+ # Develop
312
+ cd web && bun run dev
313
+
314
+ # See branded site
315
+ - Logo: "Acme Corp" (text)
316
+ - Sidebar: Blog + License
317
+ - Homepage: "What would you like to build?"
318
+
319
+ # Build pages with AI
320
+ > Create an ecommerce store
321
+ → AI generates product pages, cart, checkout (all static)
322
+
323
+ # Deploy frontend
324
+ bun run build
325
+ wrangler pages deploy dist
326
+ ```
327
+
328
+ ### Week 1: Add Backend
329
+
330
+ ```bash
331
+ # Update .env.local
332
+ ONE_BACKEND=on
333
+ PUBLIC_CONVEX_URL=https://your-deployment.convex.cloud
334
+
335
+ # Now auth works
336
+ - /account/signin
337
+ - /account/signup
338
+ - Database queries
339
+ - Real-time subscriptions
340
+ ```
341
+
342
+ ## Benefits
343
+
344
+ ### For New Users
345
+
346
+ 1. **Zero barrier to entry**: No backend setup required
347
+ 2. **Instant gratification**: See branded site immediately
348
+ 3. **AI-powered**: Build with simple prompts
349
+ 4. **Progressive**: Add backend when needed
350
+ 5. **Clean slate**: No ONE branding confusion
351
+
352
+ ### For ONE Platform
353
+
354
+ 1. **Brand protection**: Reserved names prevent confusion
355
+ 2. **Clear distinction**: ONE site vs customer sites
356
+ 3. **Gradual adoption**: Frontend → Backend → Full platform
357
+ 4. **Reduced support**: No backend questions until enabled
358
+ 5. **Viral growth**: Easy to try, easy to share
359
+
360
+ ## Technical Implementation
361
+
362
+ ### Phase 1: CLI Enhancement (Infer 1-20)
363
+
364
+ 1. Add org prompts to `npx oneie`
365
+ 2. Validate reserved names
366
+ 3. Create `.env.local` with defaults
367
+ 4. Create org folder structure
368
+ 5. Generate brand guide template
369
+
370
+ ### Phase 2: Frontend Detection (Infer 21-40)
371
+
372
+ 1. Read `ORG_NAME` from env
373
+ 2. Conditionally render logo
374
+ 3. Conditionally render sidebar
375
+ 4. Conditionally render homepage
376
+ 5. Add `GetStartedPrompt` component
377
+
378
+ ### Phase 3: Backend Control (Infer 41-60)
379
+
380
+ 1. Check `ONE_BACKEND` flag
381
+ 2. Disable Convex client if off
382
+ 3. Redirect auth routes if off
383
+ 4. Show frontend-only mode indicator
384
+ 5. Document backend enablement
385
+
386
+ ### Phase 4: AI Prompt System (Infer 61-80)
387
+
388
+ 1. Create prompt input component
389
+ 2. Parse user intent
390
+ 3. **Use templates as scaffolding** (already installed)
391
+ 4. Copy + customize templates to src/
392
+ 5. Apply org branding
393
+ 6. Show preview
394
+
395
+ ### Phase 5: Documentation (Infer 81-100)
396
+
397
+ 1. Update README with flow
398
+ 2. Add CLI usage docs
399
+ 3. Document env variables
400
+ 4. Create migration guide (off → on)
401
+ 5. Add troubleshooting
402
+
403
+ ## Example Flows
404
+
405
+ ### Ecommerce Store
406
+
407
+ ```
408
+ User: "Create an ecommerce store"
409
+
410
+ AI flow:
411
+ 1. Detects ecommerce intent
412
+ 2. Copies src/templates/ecommerce/* → src/
413
+ 3. Customizes with org branding (Acme Corp)
414
+ 4. Shows preview:
415
+ - /products (product listing)
416
+ - /products/[slug] (product detail)
417
+ - /cart (shopping cart)
418
+ - /checkout (checkout form)
419
+ 5. All static, no backend yet
420
+ 6. Note: "Enable ONE_BACKEND=on for real cart persistence"
421
+ ```
422
+
423
+ ### Blog Platform
424
+
425
+ ```
426
+ User: "Create a blog"
427
+
428
+ AI flow:
429
+ 1. Detects blog intent
430
+ 2. Copies src/templates/blog/* → src/
431
+ 3. Customizes content collections
432
+ 4. Adds sample posts with org name
433
+ 5. Shows preview:
434
+ - /blog (blog listing)
435
+ - /blog/[slug] (blog post)
436
+ - /about (about page)
437
+ 6. Uses Astro content collections
438
+ 7. Pure static site
439
+ ```
440
+
441
+ ### Community Site
442
+
443
+ ```
444
+ User: "Create a community site"
445
+
446
+ AI flow:
447
+ 1. Detects community intent
448
+ 2. Copies src/templates/community/* → src/
449
+ 3. Customizes with org identity
450
+ 4. Shows preview:
451
+ - / (community home)
452
+ - /members (member listing - static)
453
+ - /events (event calendar - static)
454
+ - /join (join form - static)
455
+ 5. Note: "Enable ONE_BACKEND=on for user accounts & real-time features"
456
+ ```
457
+
458
+ ## Migration Path
459
+
460
+ ### From Frontend-Only to Full Platform
461
+
462
+ ```bash
463
+ # Step 1: Create Convex deployment
464
+ cd backend
465
+ npx convex deploy
466
+
467
+ # Step 2: Update .env.local
468
+ ONE_BACKEND=on
469
+ PUBLIC_CONVEX_URL=https://your-deployment.convex.cloud
470
+ BETTER_AUTH_SECRET=$(openssl rand -base64 32)
471
+
472
+ # Step 3: Update static pages to use Convex
473
+ # Products now load from database
474
+ # Cart now persists to backend
475
+ # Checkout creates orders
476
+
477
+ # Step 4: Deploy
478
+ bun run build
479
+ wrangler pages deploy dist
480
+ ```
481
+
482
+ ## Security Considerations
483
+
484
+ ### Reserved Names
485
+
486
+ - Prevents brand confusion
487
+ - Protects ONE identity
488
+ - Clear separation of concerns
489
+ - No accidental overrides
490
+
491
+ ### Backend Disabled by Default
492
+
493
+ - Reduces attack surface
494
+ - No auth vulnerabilities
495
+ - No database exposure
496
+ - Pure static site security
497
+
498
+ ### Progressive Enhancement
499
+
500
+ - Add security as needed
501
+ - Start simple, scale up
502
+ - No premature optimization
503
+ - Clear security boundaries
504
+
505
+ ## Success Metrics
506
+
507
+ ### Time to First Site
508
+
509
+ - **Target:** < 60 seconds
510
+ - **Measure:** `npx oneie` → visible site
511
+ - **Current:** N/A (new feature)
512
+
513
+ ### Backend Adoption Rate
514
+
515
+ - **Target:** 30% enable backend within 7 days
516
+ - **Measure:** Track `ONE_BACKEND=on` in telemetry
517
+ - **Hypothesis:** Most start frontend-only, add backend when needed
518
+
519
+ ### Prompt Success Rate
520
+
521
+ - **Target:** 80% of prompts generate usable pages
522
+ - **Measure:** User ratings after generation
523
+ - **Improvement:** Learn from successful patterns
524
+
525
+ ## Template System (Auto-Installed, Opt-In)
526
+
527
+ **Strategy:** All templates are automatically installed but hidden by default.
528
+
529
+ ### Implementation
530
+
531
+ **File:** `web/tsconfig.json`
532
+
533
+ ```json
534
+ {
535
+ "exclude": [
536
+ "node_modules",
537
+ "dist",
538
+ "test",
539
+ "tests",
540
+ "**/*.test.ts",
541
+ "**/*.test.tsx",
542
+ "src/templates" // ← Templates excluded from build
543
+ ]
544
+ }
545
+ ```
546
+
547
+ ### Available Templates (Hidden by Default)
548
+
549
+ **Location:** `web/src/templates/`
550
+
551
+ ```
552
+ src/templates/
553
+ ├── ecommerce/ # Full ecommerce store
554
+ │ ├── pages/
555
+ │ ├── components/
556
+ │ └── lib/
557
+ ├── blog/ # Blog platform
558
+ ├── community/ # Community site
559
+ └── saas/ # SaaS starter
560
+ ```
561
+
562
+ ### Opt-In When Ready
563
+
564
+ ```bash
565
+ # User decides they want ecommerce
566
+ # Copy template to main src/
567
+ cp -r src/templates/ecommerce/pages/* src/pages/
568
+
569
+ # Or AI does it via prompt
570
+ User: "Add ecommerce store"
571
+ → AI copies relevant templates to src/
572
+ → Customizes with org branding
573
+ → Ready to use
574
+ ```
575
+
576
+ ### Benefits
577
+
578
+ 1. **Zero decision fatigue**: Templates there when needed
579
+ 2. **No cluttered build**: Excluded by default
580
+ 3. **Instant scaffolding**: Copy when ready
581
+ 4. **AI-friendly**: Templates are examples for AI to learn from
582
+ 5. **No downloads**: Everything already local
583
+
584
+ ## Open Questions
585
+
586
+ 1. **AI Generation:** Which AI model for prompt → pages?
587
+ - Claude via API?
588
+ - Local model?
589
+ - Hybrid approach?
590
+ - **Answer:** Use templates as scaffolding + AI customization
591
+
592
+ 2. **Template Discovery:** How do users find templates?
593
+ - `/templates` page listing all available?
594
+ - AI suggests based on prompt?
595
+ - Both?
596
+
597
+ 3. **Deployment:** Auto-deploy to Cloudflare?
598
+ - One-click deploy button
599
+ - Auto-create Cloudflare project
600
+ - Connect domain
601
+
602
+ 4. **Monetization:** When to prompt for payment?
603
+ - After N pages generated?
604
+ - When enabling backend?
605
+ - Never (pure OSS)?
606
+
607
+ ## Related Documents
608
+
609
+ - `one/knowledge/ontology.md` - 6-dimension ontology (for when backend enabled)
610
+ - `one/connections/workflow.md` - Development workflow
611
+ - `CLAUDE.md` - Claude Code instructions
612
+ - `.claude/commands/release.md` - Release process
613
+
614
+ ## Implementation Status
615
+
616
+ ### Phase 1: CLI Enhancement ✅ COMPLETE
617
+
618
+ - [x] Added reserved name validation (one, onegroup, one.ie)
619
+ - [x] Created `isReservedName`, `isReservedFolder`, `isReservedWebsite` validators
620
+ - [x] Updated init command to use validation
621
+ - [x] Created `updateOrgEnvFile` function for org-specific env vars
622
+ - [x] CLI now creates `.env.local` with:
623
+ - `ORG_NAME` (validated against reserved)
624
+ - `ORG_WEBSITE` (validated against reserved)
625
+ - `ORG_FOLDER` (validated against reserved)
626
+ - `ONE_BACKEND=off` (default)
627
+
628
+ **Files Modified:**
629
+ - `cli/src/utils/validation.ts` - Added reserved name validation
630
+ - `cli/src/commands/init.ts` - Added validation to prompts
631
+ - `cli/src/utils/installation-setup.ts` - Added `updateOrgEnvFile` function
632
+
633
+ ### Phase 2: Frontend Detection ✅ COMPLETE
634
+
635
+ - [x] Created `GetStartedPrompt` component for customer orgs
636
+ - [x] Created `MinimalSidebar` component (Blog + License only)
637
+ - [x] Updated `Layout.astro` to detect `ORG_NAME` environment variable
638
+ - [x] Updated `index.astro` to conditionally render homepage
639
+ - [x] ONE Platform (ORG_NAME=one): Full homepage
640
+ - [x] Customer Org (ORG_NAME=acme): GetStartedPrompt
641
+
642
+ **Files Created:**
643
+ - `web/src/components/GetStartedPrompt.tsx` - Simple prompt interface
644
+ - `web/src/components/MinimalSidebar.tsx` - Minimal navigation
645
+
646
+ **Files Modified:**
647
+ - `web/src/layouts/Layout.astro` - Conditional sidebar rendering
648
+ - `web/src/pages/index.astro` - Conditional homepage rendering
649
+
650
+ ### Phase 3: Backend Control ✅ COMPLETE
651
+
652
+ - [x] Environment variable `ONE_BACKEND` controls backend availability
653
+ - [x] Default: `off` (frontend-only mode, no Convex)
654
+ - [x] Optional: `on` (full platform with backend)
655
+ - [x] `.env.local.example` template with comprehensive documentation
656
+
657
+ **Files Created:**
658
+ - `web/.env.local.example` - Complete configuration template with examples
659
+
660
+ ### Phase 4: Documentation ✅ COMPLETE
661
+
662
+ - [x] Comprehensive plan document (`one/things/plans/start-new.md`)
663
+ - [x] `.env.local.example` with inline documentation
664
+ - [x] Implementation status tracking
665
+ - [x] User journey examples
666
+
667
+ ### Remaining Work
668
+
669
+ - [ ] AI prompt system implementation (Phase 4 from original plan)
670
+ - [ ] Template system setup (`web/src/templates/`)
671
+ - [ ] User testing with real customers
672
+ - [ ] Production release announcement
673
+
674
+ ## Usage
675
+
676
+ ### For ONE Platform
677
+
678
+ ```bash
679
+ # .env.local
680
+ ORG_NAME=one
681
+ ORG_WEBSITE=https://one.ie
682
+ ORG_FOLDER=onegroup
683
+ ONE_BACKEND=on
684
+ ```
685
+
686
+ Result: Full ONE Platform homepage with complete navigation.
687
+
688
+ ### For Customer Org
689
+
690
+ ```bash
691
+ # .env.local
692
+ ORG_NAME=acme
693
+ ORG_WEBSITE=https://acme.com
694
+ ORG_FOLDER=acme
695
+ ONE_BACKEND=off
696
+ ```
697
+
698
+ Result: Simple "Get Started" prompt with minimal navigation.
699
+
700
+ ### CLI Validation
701
+
702
+ ```bash
703
+ npx oneie
704
+
705
+ Organization name: one
706
+ ❌ Error: Organization name "one" is reserved for ONE Platform
707
+
708
+ Organization name: acme
709
+ ✓ Valid
710
+
711
+ Website: https://one.ie
712
+ ❌ Error: Website one.ie is reserved for ONE Platform
713
+
714
+ Website: https://acme.com
715
+ ✓ Valid
716
+ ```
717
+
718
+ ## Next Steps
719
+
720
+ 1. **Test the flow:**
721
+ ```bash
722
+ cd cli && bun run build
723
+ cd ../web && cp .env.local.example .env.local
724
+ # Edit .env.local with custom org name
725
+ bun run dev
726
+ ```
727
+
728
+ 2. **Implement AI prompt handling** in `GetStartedPrompt.tsx`
729
+
730
+ 3. **Create template system** in `web/src/templates/`
731
+
732
+ 4. **User testing** with 3-5 organizations
733
+
734
+ 5. **Release:** Merge to main and deploy
735
+
736
+ ---
737
+
738
+ **Built for instant gratification and gradual complexity.**