oneie 3.5.0 → 3.6.3

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 (141) 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/deploy.md +77 -150
  6. package/.claude/commands/one.md +375 -5
  7. package/.claude/commands/release.md +64 -3
  8. package/.mcp.json +57 -0
  9. package/CLAUDE.md +55 -69
  10. package/CREATE-WEBSITE.md +442 -0
  11. package/SECURITY.md +31 -0
  12. package/TESTING-ONBOARDING.md +185 -0
  13. package/dist/commands/create-website.d.ts +19 -0
  14. package/dist/commands/create-website.d.ts.map +1 -0
  15. package/dist/commands/create-website.js +231 -0
  16. package/dist/commands/create-website.js.map +1 -0
  17. package/dist/commands/init.d.ts +5 -6
  18. package/dist/commands/init.d.ts.map +1 -1
  19. package/dist/commands/init.js +213 -103
  20. package/dist/commands/init.js.map +1 -1
  21. package/dist/index.js +7 -5
  22. package/dist/index.js.map +1 -1
  23. package/dist/utils/installation-setup.d.ts +24 -1
  24. package/dist/utils/installation-setup.d.ts.map +1 -1
  25. package/dist/utils/installation-setup.js +85 -1
  26. package/dist/utils/installation-setup.js.map +1 -1
  27. package/dist/utils/launch-claude.d.ts +6 -0
  28. package/dist/utils/launch-claude.d.ts.map +1 -0
  29. package/dist/utils/launch-claude.js +51 -0
  30. package/dist/utils/launch-claude.js.map +1 -0
  31. package/dist/utils/validation.d.ts +48 -0
  32. package/dist/utils/validation.d.ts.map +1 -0
  33. package/dist/utils/validation.js +73 -0
  34. package/dist/utils/validation.js.map +1 -0
  35. package/folders.yaml +1 -1
  36. package/one/.obsidian/core-plugins.json +33 -0
  37. package/one/.obsidian/workspace.json +20 -20
  38. package/one/connections/workflow-onboarding.md +683 -0
  39. package/one/events/CART-DRAWER-INTEGRATION-GUIDE.md +354 -0
  40. package/one/events/CRITICAL-FIXES-COMPLETE.md +504 -0
  41. package/one/events/DEPLOYMENT.md +178 -0
  42. package/one/events/ECOMMERCE-DEMO-PLAN.md +225 -0
  43. package/one/events/ECOMMERCE-LIVE-DEMO.md +363 -0
  44. package/one/events/ECOMMERCE-TEMPLATE-COMPLETE.md +735 -0
  45. package/one/events/ECOMMERCE-TEMPLATES-SUMMARY.md +923 -0
  46. package/one/events/GRADIENT-TEXT-PERMANENT-FIX.md +223 -0
  47. package/one/events/HANDOFF.md +313 -0
  48. package/one/events/IMPLEMENTATION-SUMMARY-FINAL.md +503 -0
  49. package/one/events/IMPLEMENTATION_SUMMARY.md +529 -0
  50. package/one/events/LANDING-PAGE-EXAMPLE-OUTPUT.md +666 -0
  51. package/one/events/LANDING-PAGE-IMPLEMENTATION.md +642 -0
  52. package/one/events/LANDING-PAGE-QUICKSTART.md +407 -0
  53. package/one/events/MULTI-ONTOLOGY-COMPLETE-GUIDE.md +1627 -0
  54. package/one/events/MULTI-ONTOLOGY-IMPLEMENTATION-COMPLETE.md +573 -0
  55. package/one/events/ONBOARDING-IMPLEMENTATION-COMPLETE copy.md +398 -0
  56. package/one/events/ONTOLOGY-TUTORIALS-SUMMARY.md +525 -0
  57. package/one/events/ONTOLOGY-TYPE-GENERATOR-SUMMARY.md +455 -0
  58. package/one/events/ONTOLOGY_DISCOVERY_IMPLEMENTATION.md +486 -0
  59. package/one/events/ONTOLOGY_DISCOVERY_QUICKSTART.md +203 -0
  60. package/one/events/SECURITY-AUDIT-FIXES.md +376 -0
  61. package/one/events/SECURITY-SCAN-COMPLETE.md +281 -0
  62. package/one/events/SHOP-BUILD-STATUS.md +114 -0
  63. package/one/events/SHOP-PREMIUM-UPDATE.md +149 -0
  64. package/one/events/SITE-WIDE-GRADIENT-FIX.md +299 -0
  65. package/one/events/STORE-PRODUCTION-READY-STATUS.md +359 -0
  66. package/one/events/STRIPE-PAYMENT-METHODS-GUIDE.md +429 -0
  67. package/one/events/agent-director-enhancement-summary.md +386 -0
  68. package/one/events/agent-onboard-implementation-summary.md +457 -0
  69. package/one/events/clean-agent-ontology-cleanup-report.md +353 -0
  70. package/one/events/landing-page-generator.md +458 -0
  71. package/one/events/onboarding-implementation-complete.md +505 -0
  72. package/one/events/release.md +254 -0
  73. package/one/events/separate-implementation-status.md +537 -0
  74. package/one/knowledge/100-inference-quick-reference.md +431 -0
  75. package/one/knowledge/agent-onboard-usage.md +612 -0
  76. package/one/knowledge/cli-claude-handoff.md +718 -0
  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/package.json +7 -2
  115. package/one/things/claude/hooks/agent-hook-manager.js +0 -525
  116. package/one/things/claude/hooks/agent-load-balancer.js +0 -271
  117. package/one/things/claude/hooks/agent-request-interceptor.js +0 -70
  118. package/one/things/claude/hooks/cascade-feedback.js +0 -297
  119. package/one/things/claude/hooks/cascade-integration-hooks.js +0 -648
  120. package/one/things/claude/hooks/continuous-improvement-monitor.js +0 -510
  121. package/one/things/claude/hooks/file-organization-engine.js +0 -427
  122. package/one/things/claude/hooks/file-organization-monitor.js +0 -269
  123. package/one/things/claude/hooks/hook-config-manager.js +0 -202
  124. package/one/things/claude/hooks/hook-orchestrator.js +0 -662
  125. package/one/things/claude/hooks/hook-performance-report.js +0 -120
  126. package/one/things/claude/hooks/mcp-cascade-integration.js +0 -816
  127. package/one/things/claude/hooks/memory-optimizer.js +0 -510
  128. package/one/things/claude/hooks/ontology-compliance.js +0 -394
  129. package/one/things/claude/hooks/ontology-hook-manager.js +0 -316
  130. package/one/things/claude/hooks/ontology-validation-engine.js +0 -317
  131. package/one/things/claude/hooks/performance-monitoring-hook.js +0 -422
  132. package/one/things/claude/hooks/quality-scoring-engine.js +0 -834
  133. package/one/things/claude/hooks/simple-load-balancer.js +0 -238
  134. package/one/things/claude/hooks/startup-optimizer.js +0 -625
  135. package/one/things/claude/hooks/story-scoring-system.js +0 -445
  136. package/one/things/claude/hooks/story-validation-engine.js +0 -473
  137. package/one/things/claude/hooks/structure-synchronizer.js +0 -194
  138. package/one/things/claude/hooks/sub-agent-output-validator.js +0 -647
  139. package/one/things/claude/hooks/sub-agent-validation-hook.js +0 -343
  140. package/one/things/claude/hooks/trinity-validation-system.js +0 -392
  141. package/one/things/plans/organizations-to-groups.md +0 -705
@@ -0,0 +1,431 @@
1
+ # 100-Inference Plan Generation - Quick Reference
2
+
3
+ **For:** Developers extending agent-director
4
+ **Version:** 2.0.0
5
+
6
+ ---
7
+
8
+ ## Feature Library Structure
9
+
10
+ ```typescript
11
+ const FEATURE_DEFINITION = {
12
+ "feature-key": {
13
+ name: "Display Name",
14
+ description: "What this feature does",
15
+ inferences: [start, end], // Where in 1-100
16
+ specialist: "agent-name", // Which agent builds it
17
+ duration: "~X min", // Time estimate
18
+ cost: "$X", // Cost estimate
19
+ required: true|false, // Must be included?
20
+ dependencies: ["other-feature"], // What it needs
21
+ status: "available"|"existing", // Implementation status
22
+ ontology: {
23
+ things: ["entity_types"],
24
+ connections: ["relationship_types"],
25
+ events: ["event_types"],
26
+ knowledge: ["knowledge_types"]
27
+ }
28
+ }
29
+ };
30
+ ```
31
+
32
+ ---
33
+
34
+ ## Inference Ranges
35
+
36
+ **Foundation (Required):**
37
+ - 1-10: Landing page
38
+ - 11-20: Authentication
39
+ - 21-30: Multi-tenant groups
40
+
41
+ **User Features:**
42
+ - 31-40: Content/Projects/Integrations
43
+ - 41-50: Memberships/Repos/Email
44
+ - 51-60: Revenue/Pipelines/Community
45
+
46
+ **AI & Advanced:**
47
+ - 61-70: AI agents
48
+ - 71-80: RAG/Knowledge/Design
49
+ - 81-90: Search/Performance/Analytics
50
+
51
+ **Always Included:**
52
+ - 91-100: Deployment & Documentation
53
+
54
+ ---
55
+
56
+ ## Adding a New Feature
57
+
58
+ ### Step 1: Define Feature
59
+
60
+ ```typescript
61
+ // Add to appropriate category (CREATOR_FEATURES, DEVELOPER_FEATURES, etc.)
62
+ const NEW_FEATURES = {
63
+ "my-feature": {
64
+ name: "My Feature",
65
+ description: "What it does",
66
+ inferences: [31, 40], // Find available range
67
+ specialist: "agent-builder",
68
+ duration: "~15 min",
69
+ cost: "$0",
70
+ dependencies: ["multi-tenant-groups"], // What it needs
71
+ status: "available",
72
+ ontology: {
73
+ things: ["my_entity"],
74
+ connections: ["my_relationship"],
75
+ events: ["my_event"],
76
+ knowledge: ["my_pattern"]
77
+ }
78
+ }
79
+ };
80
+ ```
81
+
82
+ ### Step 2: Map Ontology
83
+
84
+ **Always include:**
85
+ - **things**: What entities are created?
86
+ - **connections**: How do they relate?
87
+ - **events**: What actions are logged?
88
+ - **knowledge**: What's learned/searched?
89
+
90
+ ### Step 3: Test
91
+
92
+ ```bash
93
+ # Test feature individually
94
+ agent-director generate-plan --features "my-feature"
95
+
96
+ # Test with dependencies
97
+ agent-director generate-plan --features "my-feature,ai-agents"
98
+
99
+ # Verify output
100
+ cat .onboarding.json
101
+ ```
102
+
103
+ ---
104
+
105
+ ## Dependency Resolution
106
+
107
+ **Rules:**
108
+ 1. Foundation features (landing-page, auth, groups) have no dependencies
109
+ 2. All other features must depend on at least one foundation feature
110
+ 3. Circular dependencies are invalid
111
+ 4. Missing dependencies auto-resolved
112
+
113
+ **Example:**
114
+ ```typescript
115
+ // User selects: ["ai-agents"]
116
+ // Auto-resolves to: ["landing-page", "authentication", "multi-tenant-groups", "ai-agents"]
117
+ ```
118
+
119
+ ---
120
+
121
+ ## Specialist Agent Mapping
122
+
123
+ | Specialist | Responsibilities | Inference Ranges |
124
+ |-----------|-----------------|------------------|
125
+ | agent-frontend | Astro pages, React components, UI/UX | 1-10, 21-30, 71-80 |
126
+ | agent-backend | Convex queries/mutations, schemas | 11-20, 41-60, 71-90 |
127
+ | agent-builder | Full-stack features (backend + frontend) | 31-40, 61-70 |
128
+ | agent-integrator | External APIs, protocols, webhooks | 31-60 |
129
+ | agent-designer | Wireframes, design systems, components | 71-80 |
130
+ | agent-ops | Deployment, monitoring, performance | 51-60, 81-100 |
131
+ | existing | Already implemented, no build needed | 11-20 (auth) |
132
+
133
+ ---
134
+
135
+ ## Execution Plan Structure
136
+
137
+ ```typescript
138
+ interface ExecutionPlan {
139
+ version: "1.0.0",
140
+ organizationName: string,
141
+ createdAt: number,
142
+ plan: {
143
+ phases: Phase[],
144
+ totalInferences: number,
145
+ currentInference: number,
146
+ completedInferences: number[],
147
+ estimates: {
148
+ duration: string, // "60 minutes (~1 hours)"
149
+ cost: string, // "$0.00"
150
+ inferences: number // 60
151
+ }
152
+ },
153
+ progress: {
154
+ status: "pending" | "in_progress" | "completed",
155
+ startedAt?: number,
156
+ completedAt?: number,
157
+ currentPhase?: string,
158
+ errors?: Error[]
159
+ }
160
+ }
161
+ ```
162
+
163
+ ---
164
+
165
+ ## Progress Tracking
166
+
167
+ ### Update Progress
168
+
169
+ ```typescript
170
+ function updateProgress(update: Partial<ProgressUpdate>): void {
171
+ const plan = readOnboardingJson();
172
+ plan.progress = { ...plan.progress, ...update };
173
+
174
+ // Calculate percentage
175
+ const pct = (plan.plan.completedInferences.length / plan.plan.totalInferences) * 100;
176
+
177
+ writeOnboardingJson(plan);
178
+
179
+ // Emit event
180
+ emitEvent({
181
+ type: "progress_updated",
182
+ metadata: { percentage: pct, currentInference: plan.plan.currentInference }
183
+ });
184
+ }
185
+ ```
186
+
187
+ ### Mark Phase Complete
188
+
189
+ ```typescript
190
+ function markPhaseComplete(phase: Phase): void {
191
+ updateProgress({
192
+ currentInference: phase.inferences.end,
193
+ completedInferences: range(phase.inferences.start, phase.inferences.end),
194
+ currentPhase: null // Clear current phase
195
+ });
196
+
197
+ emitEvent({
198
+ type: "phase_complete",
199
+ targetId: phase.featureKey,
200
+ metadata: { phaseName: phase.name, duration: "actual time" }
201
+ });
202
+ }
203
+ ```
204
+
205
+ ---
206
+
207
+ ## Event-Driven Coordination
208
+
209
+ ### Events Emitted
210
+
211
+ | Event | When | Metadata |
212
+ |-------|------|----------|
213
+ | `plan_generated` | Plan created | totalInferences, estimates |
214
+ | `phase_started` | Phase begins | phaseName, inferences, specialist |
215
+ | `progress_updated` | Inference completes | percentage, currentInference |
216
+ | `phase_complete` | Phase finishes | phaseName, duration, quality |
217
+ | `phase_failed` | Phase errors | phaseName, error, attempts |
218
+ | `plan_complete` | All done | totalDuration, qualityScore |
219
+
220
+ ### Events Watched
221
+
222
+ | Event | Action |
223
+ |-------|--------|
224
+ | `implementation_complete` | Trigger quality check |
225
+ | `quality_check_complete` | Mark phase complete or retry |
226
+ | `solution_proposed` | Retry failed phase |
227
+
228
+ ---
229
+
230
+ ## Error Handling
231
+
232
+ ### Retry Pattern
233
+
234
+ ```typescript
235
+ async function executePhaseWithRetry(phase: Phase): Promise<void> {
236
+ let attempt = 0;
237
+
238
+ while (attempt < 3) {
239
+ try {
240
+ await executePhase(phase);
241
+ return; // Success
242
+ } catch (error) {
243
+ attempt++;
244
+
245
+ if (attempt >= 3) {
246
+ // Delegate to problem solver
247
+ await emitEvent({ type: "phase_failed", ... });
248
+ await waitForEvent("solution_proposed");
249
+ attempt = 0; // Reset after manual fix
250
+ } else {
251
+ // Exponential backoff
252
+ await sleep(Math.pow(2, attempt) * 1000);
253
+ }
254
+ }
255
+ }
256
+ }
257
+ ```
258
+
259
+ ---
260
+
261
+ ## Parallel Execution
262
+
263
+ ### Detection Rules
264
+
265
+ Phases can run in parallel if:
266
+ 1. No shared dependencies
267
+ 2. No overlapping inference ranges
268
+ 3. Different specialists (optional optimization)
269
+
270
+ ### Example
271
+
272
+ ```typescript
273
+ // These can run in parallel:
274
+ Phase A: "content-publishing" (Infer 31-40, agent-frontend)
275
+ Phase B: "membership-tiers" (Infer 41-50, agent-backend)
276
+
277
+ // These CANNOT (overlap):
278
+ Phase A: "ai-agents" (Infer 61-70)
279
+ Phase B: "rag-knowledge" (Infer 71-80, depends on content)
280
+ ```
281
+
282
+ ---
283
+
284
+ ## Cost Estimation
285
+
286
+ ### Parse Cost String
287
+
288
+ ```typescript
289
+ function parseCost(costString: string): number {
290
+ // "$0" → 0
291
+ // "$0.10 - $1.00" → 0.55 (average)
292
+ const matches = costString.match(/\$(\d+\.?\d*)/g);
293
+ if (!matches) return 0;
294
+
295
+ const costs = matches.map(m => parseFloat(m.replace('$', '')));
296
+ return costs.reduce((a, b) => a + b, 0) / costs.length;
297
+ }
298
+ ```
299
+
300
+ ---
301
+
302
+ ## Common Patterns
303
+
304
+ ### Read Feature Selections
305
+
306
+ ```typescript
307
+ const selections = JSON.parse(fs.readFileSync('.onboarding.json'));
308
+ const selectedFeatures = selections.selectedFeatures;
309
+ ```
310
+
311
+ ### Resolve Dependencies
312
+
313
+ ```typescript
314
+ const resolved = new Set<string>();
315
+ const queue = [...selectedFeatures];
316
+
317
+ while (queue.length > 0) {
318
+ const feature = queue.shift()!;
319
+ if (resolved.has(feature)) continue;
320
+
321
+ resolved.add(feature);
322
+ queue.push(...ALL_FEATURES[feature].dependencies);
323
+ }
324
+ ```
325
+
326
+ ### Generate Plan
327
+
328
+ ```typescript
329
+ const plan = {
330
+ phases: resolved.map(key => ({
331
+ name: ALL_FEATURES[key].name,
332
+ featureKey: key,
333
+ inferences: {
334
+ start: ALL_FEATURES[key].inferences[0],
335
+ end: ALL_FEATURES[key].inferences[1]
336
+ },
337
+ specialist: ALL_FEATURES[key].specialist,
338
+ duration: ALL_FEATURES[key].duration,
339
+ cost: ALL_FEATURES[key].cost,
340
+ status: "pending",
341
+ ontology: ALL_FEATURES[key].ontology
342
+ })),
343
+ totalInferences: calculateTotal(resolved),
344
+ currentInference: 1,
345
+ completedInferences: [],
346
+ estimates: calculateEstimates(resolved)
347
+ };
348
+ ```
349
+
350
+ ---
351
+
352
+ ## Testing Checklist
353
+
354
+ - [ ] Feature has unique key
355
+ - [ ] Inference range doesn't overlap with others
356
+ - [ ] Dependencies are valid (exist in library)
357
+ - [ ] Ontology mapping is complete (all 6 dimensions)
358
+ - [ ] Duration estimate is realistic
359
+ - [ ] Cost estimate includes all resources
360
+ - [ ] Specialist agent can handle the work
361
+ - [ ] Plan generates without errors
362
+ - [ ] Execution completes successfully
363
+ - [ ] Progress tracking updates correctly
364
+
365
+ ---
366
+
367
+ ## Debugging
368
+
369
+ ### View Current Plan
370
+
371
+ ```bash
372
+ cat .onboarding.json | jq '.plan'
373
+ ```
374
+
375
+ ### Check Progress
376
+
377
+ ```bash
378
+ cat .onboarding.json | jq '.progress'
379
+ ```
380
+
381
+ ### List All Features
382
+
383
+ ```typescript
384
+ Object.keys(ALL_FEATURES).forEach(key => {
385
+ const f = ALL_FEATURES[key];
386
+ console.log(`${key}: Infer ${f.inferences[0]}-${f.inferences[1]} (${f.specialist})`);
387
+ });
388
+ ```
389
+
390
+ ### Validate Dependencies
391
+
392
+ ```typescript
393
+ Object.entries(ALL_FEATURES).forEach(([key, feature]) => {
394
+ feature.dependencies.forEach(dep => {
395
+ if (!ALL_FEATURES[dep]) {
396
+ console.error(`ERROR: ${key} depends on missing feature: ${dep}`);
397
+ }
398
+ });
399
+ });
400
+ ```
401
+
402
+ ---
403
+
404
+ ## Quick Commands
405
+
406
+ ```bash
407
+ # Generate plan from selections
408
+ agent-director generate-plan --features "landing-page,ai-agents"
409
+
410
+ # Execute plan
411
+ agent-director execute-plan
412
+
413
+ # Show progress
414
+ agent-director show-progress
415
+
416
+ # Resume from inference N
417
+ agent-director resume --from 50
418
+
419
+ # Add feature to running plan
420
+ agent-director add-feature "semantic-search"
421
+
422
+ # Mark phase complete
423
+ agent-director mark-complete "ai-agents"
424
+ ```
425
+
426
+ ---
427
+
428
+ **Need Help?**
429
+ - Read: `/.claude/agents/agent-director.md`
430
+ - See: `/one/things/plans/agent-director-100-inference-plans.md`
431
+ - Example: `/.onboarding-plan.json.example`