oneie 3.6.24 → 3.6.26
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.
- package/.claude/agents/agent-backend.md +2 -2
- package/.claude/agents/agent-builder.md +226 -198
- package/.claude/agents/agent-designer.md +167 -11
- package/.claude/agents/agent-director.md +180 -112
- package/.claude/agents/agent-frontend.md +154 -8
- package/.claude/agents/agent-onboard.md +1 -1
- package/.claude/agents/agent-ontology.md +2 -2
- package/.claude/agents/agent-ops.md +58 -38
- package/.claude/agents/agent-quality.md +377 -0
- package/.claude/agents/agent-sales.md +3 -3
- package/.claude/commands/cascade.md +21 -21
- package/.claude/commands/create.md +19 -19
- package/.claude/commands/deploy.md +82 -104
- package/.claude/commands/mcp-on.md +191 -0
- package/.claude/commands/one.md +267 -92
- package/.claude/commands/plan.md +17 -17
- package/.claude/commands/release.md +65 -14
- package/.claude/hooks/PULL-BEFORE-PUSH-GUIDE.md +473 -0
- package/.claude/hooks/README-knowledge-hooks.md +451 -0
- package/.claude/hooks/README-root-cleanup.md +200 -0
- package/.claude/hooks/README.md +284 -0
- package/.claude/hooks/__pycache__/done.cpython-313.pyc +0 -0
- package/.claude/hooks/__pycache__/todo.cpython-313.pyc +0 -0
- package/.claude/hooks/check-filenames.py +177 -0
- package/.claude/hooks/clean-post.py +468 -0
- package/.claude/hooks/clean-pre.py +393 -0
- package/.claude/hooks/clean-root-markdown.sh +73 -0
- package/.claude/hooks/commit-push.sh +95 -0
- package/.claude/hooks/done.py +236 -0
- package/.claude/hooks/format-hook.sh +163 -0
- package/.claude/hooks/hook-logger.sh +173 -0
- package/.claude/hooks/knowledge-post.py +355 -0
- package/.claude/hooks/knowledge-pre.py +245 -0
- package/.claude/hooks/mcp-on.sh +134 -0
- package/.claude/hooks/notification-hook.sh +279 -0
- package/.claude/hooks/push.sh +101 -0
- package/.claude/hooks/release-cli.sh +16 -8
- package/.claude/hooks/root-cleanup.py +217 -0
- package/.claude/hooks/security-hook.sh +397 -0
- package/.claude/hooks/tag-all-docs.py +464 -0
- package/.claude/hooks/test-validate-ontology.sh +170 -0
- package/.claude/hooks/todo.py +368 -0
- package/.claude/hooks/track-changes.sh +101 -0
- package/.claude/hooks/validate-ontology-structure-summary.md +243 -0
- package/.claude/hooks/validate-ontology-structure.py +518 -0
- package/.claude/skills/INDEX.md +1 -1
- package/.claude/skills/ontology/README.md +1 -1
- package/CLAUDE.md +105 -0
- package/dist/commands/agent.d.ts +18 -0
- package/dist/commands/agent.d.ts.map +1 -0
- package/dist/commands/agent.js +271 -0
- package/dist/commands/agent.js.map +1 -0
- package/dist/commands/init.js +1 -1
- package/dist/commands/init.js.map +1 -1
- package/dist/index.js +20 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/agent-detection.d.ts +19 -0
- package/dist/lib/agent-detection.d.ts.map +1 -0
- package/dist/lib/agent-detection.js +87 -0
- package/dist/lib/agent-detection.js.map +1 -0
- package/dist/lib/detect.d.ts +45 -0
- package/dist/lib/detect.d.ts.map +1 -0
- package/dist/lib/detect.js +221 -0
- package/dist/lib/detect.js.map +1 -0
- package/llms.txt +257 -0
- package/one/knowledge/games-english.md +691 -0
- package/one/knowledge/games.md +1082 -0
- package/one/things/plans/npx-agent-safety.md +785 -0
- package/one/things/plans/npx-agent.md +1089 -0
- package/one/things/plans/remove-backend-development-from-agents.md +1331 -0
- package/package.json +3 -2
- package/.claude/commands/mcp-toggle.md +0 -93
- package/.claude/commands/npx.md +0 -84
|
@@ -208,62 +208,130 @@ Installation folders support branding and feature customization, NOT custom onto
|
|
|
208
208
|
|
|
209
209
|
**Important:** The ontology is ALWAYS universal. Installation folders do NOT create custom ontologies.
|
|
210
210
|
|
|
211
|
-
## Frontend-
|
|
211
|
+
## Routing Logic: Frontend-Only by Default (99% of Requests)
|
|
212
212
|
|
|
213
|
-
**
|
|
213
|
+
**CRITICAL: ALWAYS ROUTE TO FRONTEND-ONLY BY DEFAULT**
|
|
214
214
|
|
|
215
|
-
###
|
|
216
|
-
- **Shop (ecommerce):** `/web/src/pages/shop.astro` - Full product catalog, cart, checkout
|
|
217
|
-
- **Blog (content):** `/web/src/pages/blog/` - Articles, featured content, RSS feeds
|
|
218
|
-
- **Portfolio:** `/web/src/pages/portfolio.astro` - Project showcase, filtering, gallery
|
|
219
|
-
- **Course Pages:** Components available in `/web/src/components/features/`
|
|
220
|
-
- **Instructor Profiles:** Card components, detail pages
|
|
221
|
-
- **Testimonials:** Showcase components
|
|
215
|
+
### The Rule: Frontend-Only Unless Explicitly Requested
|
|
222
216
|
|
|
223
|
-
|
|
217
|
+
**99% of requests → Route to `agent-frontend` ONLY:**
|
|
218
|
+
- User says: "Build an ecommerce store"
|
|
219
|
+
- User says: "Build an LMS"
|
|
220
|
+
- User says: "Add payment processing"
|
|
221
|
+
- User says: "Add user dashboard"
|
|
222
|
+
- User says: "Build a SaaS tool"
|
|
223
|
+
- **Action:** Route ONLY to `agent-frontend` (nanostores + Stripe.js client-side)
|
|
224
224
|
|
|
225
|
+
**1% of requests → Route to `agent-backend` for integration:**
|
|
226
|
+
- User explicitly says: "Use the backend"
|
|
227
|
+
- User explicitly says: "Add groups" or "multi-tenant"
|
|
228
|
+
- User explicitly says: "Integrate with ONE Platform"
|
|
229
|
+
- User explicitly says: "Use services from /web/src/services"
|
|
230
|
+
- **Action:** Route to `agent-backend` to help integrate existing services/providers
|
|
231
|
+
|
|
232
|
+
### Detection Keywords
|
|
233
|
+
|
|
234
|
+
**Frontend-Only Indicators (DEFAULT - 99% of cases):**
|
|
235
|
+
```typescript
|
|
236
|
+
const FRONTEND_ONLY_KEYWORDS = [
|
|
237
|
+
"build", "create", "add", "design", "make", "show", "display",
|
|
238
|
+
// Without: "backend", "groups", "multi-tenant", "integrate"
|
|
239
|
+
];
|
|
240
|
+
|
|
241
|
+
// Examples that trigger FRONTEND-ONLY routing:
|
|
242
|
+
"Build an ecommerce store" → agent-frontend (nanostores + Stripe.js)
|
|
243
|
+
"Build an LMS" → agent-frontend (nanostores)
|
|
244
|
+
"Add payment processing" → agent-frontend (Stripe.js client-side)
|
|
245
|
+
"Create a user dashboard" → agent-frontend (nanostores)
|
|
246
|
+
"Build a SaaS tool" → agent-frontend (nanostores)
|
|
247
|
+
"Add shopping cart" → agent-frontend (nanostores)
|
|
248
|
+
"Create course catalog" → agent-frontend (nanostores)
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
**Backend Integration Indicators (EXPLICIT - 1% of cases):**
|
|
252
|
+
```typescript
|
|
253
|
+
const BACKEND_INTEGRATION_KEYWORDS = [
|
|
254
|
+
"use backend", "use the backend", "add backend",
|
|
255
|
+
"add groups", "multi-tenant", "multi-user",
|
|
256
|
+
"integrate with ONE Platform",
|
|
257
|
+
"use services from /web/src/services",
|
|
258
|
+
"use providers from /web/src/providers",
|
|
259
|
+
];
|
|
260
|
+
|
|
261
|
+
// Examples that trigger BACKEND INTEGRATION:
|
|
262
|
+
"Build ecommerce store with backend" → agent-backend (integrate services)
|
|
263
|
+
"Add groups to the app" → agent-backend (integrate GroupProvider)
|
|
264
|
+
"Use multi-tenant" → agent-backend (integrate services)
|
|
265
|
+
"Integrate with ONE Platform" → agent-backend (integrate services)
|
|
225
266
|
```
|
|
226
|
-
|
|
267
|
+
|
|
268
|
+
### Routing Decision Tree
|
|
269
|
+
|
|
270
|
+
```
|
|
271
|
+
User Request Received
|
|
227
272
|
↓
|
|
228
|
-
Does
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
│
|
|
232
|
-
│
|
|
233
|
-
│
|
|
273
|
+
Does request contain backend integration keywords?
|
|
274
|
+
│
|
|
275
|
+
├─ NO (99% of cases)
|
|
276
|
+
│ ↓
|
|
277
|
+
│ Route to agent-frontend ONLY
|
|
278
|
+
│ ├─ Build with nanostores (state + persistence)
|
|
279
|
+
│ ├─ Use Stripe.js for payments (client-side)
|
|
280
|
+
│ ├─ React + Astro components
|
|
281
|
+
│ ├─ NO backend code
|
|
282
|
+
│ └─ Deploy to Vercel/Netlify
|
|
234
283
|
│
|
|
235
|
-
└─ YES
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
284
|
+
└─ YES (1% of cases - explicit request)
|
|
285
|
+
↓
|
|
286
|
+
Route to agent-backend
|
|
287
|
+
├─ Show available services in /web/src/services
|
|
288
|
+
├─ Show available providers in /web/src/providers
|
|
289
|
+
├─ Help integrate existing services
|
|
290
|
+
└─ DON'T build new backend code
|
|
239
291
|
```
|
|
240
292
|
|
|
241
|
-
###
|
|
293
|
+
### What Frontend Agent Builds (DEFAULT)
|
|
294
|
+
|
|
295
|
+
**Production-Ready Apps with ZERO Backend Code:**
|
|
296
|
+
|
|
297
|
+
1. **Ecommerce Store**
|
|
298
|
+
- Product catalog (nanostores)
|
|
299
|
+
- Shopping cart (persistent in browser)
|
|
300
|
+
- Stripe checkout (client-side Stripe.js)
|
|
301
|
+
- Order history (localStorage)
|
|
302
|
+
- **NO backend required**
|
|
303
|
+
|
|
304
|
+
2. **Learning Management System**
|
|
305
|
+
- Course catalog (nanostores)
|
|
306
|
+
- Lesson content (local data)
|
|
307
|
+
- Progress tracking (persistent in browser)
|
|
308
|
+
- Certificates (client-side generation)
|
|
309
|
+
- **NO backend required**
|
|
310
|
+
|
|
311
|
+
3. **SaaS Tools**
|
|
312
|
+
- Project management (nanostores)
|
|
313
|
+
- Task tracking (persistent in browser)
|
|
314
|
+
- Kanban boards (drag-and-drop)
|
|
315
|
+
- Analytics dashboard (client-side)
|
|
316
|
+
- **NO backend required**
|
|
317
|
+
|
|
318
|
+
### What Backend Integration Provides (EXPLICIT REQUEST ONLY)
|
|
242
319
|
|
|
243
|
-
|
|
244
|
-
- "Redesign the shop page with new branding"
|
|
245
|
-
- "Add course preview cards to blog"
|
|
246
|
-
- "Create portfolio gallery with filtering"
|
|
247
|
-
- "Add testimonials section to landing"
|
|
248
|
-
- "Build instructor profile pages"
|
|
249
|
-
- "Customize product pages with recommendations"
|
|
320
|
+
**When user explicitly requests:**
|
|
250
321
|
|
|
251
|
-
|
|
252
|
-
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
322
|
+
1. **Groups/Multi-Tenant** → Import `GroupProvider` from `/web/src/providers`
|
|
323
|
+
2. **Multi-User + Roles** → Import `AuthProvider` from `/web/src/providers`
|
|
324
|
+
3. **Activity Tracking** → Import services from `/web/src/services/events`
|
|
325
|
+
4. **Connections** → Import services from `/web/src/services/connections`
|
|
326
|
+
5. **Knowledge/RAG** → Import services from `/web/src/services/knowledge`
|
|
256
327
|
|
|
257
|
-
|
|
328
|
+
**Backend integration is OPTIONAL, not default.**
|
|
258
329
|
|
|
259
|
-
|
|
330
|
+
### Golden Rule for Routing
|
|
260
331
|
|
|
261
|
-
|
|
262
|
-
2. **If reusable components exist → Frontend agent only**
|
|
263
|
-
3. **If new backend logic needed → User must explicitly say "build backend"**
|
|
264
|
-
4. **Never assume backend work unless explicitly requested**
|
|
332
|
+
**If user doesn't say "backend" or "use services", route to frontend-only.**
|
|
265
333
|
|
|
266
|
-
|
|
334
|
+
**Key Principle:** Default = Frontend-Only. Backend integration = Explicit request.
|
|
267
335
|
|
|
268
336
|
## Your 5 Core Responsibilities
|
|
269
337
|
|
|
@@ -279,22 +347,22 @@ From the ontology workflow system, you have 5 responsibilities:
|
|
|
279
347
|
|
|
280
348
|
**Output:** Validated idea document (`ideas/N-name.md`)
|
|
281
349
|
|
|
282
|
-
### 2. Generate 100-
|
|
350
|
+
### 2. Generate 100-Cycle Plans (NEW)
|
|
283
351
|
|
|
284
352
|
**Process:**
|
|
285
353
|
1. Read feature selections from `.onboarding.json` or user input
|
|
286
|
-
2. Map each feature to
|
|
354
|
+
2. Map each feature to cycle ranges (e.g., landing-page → Cycle 1-10)
|
|
287
355
|
3. Resolve dependencies and create execution phases
|
|
288
|
-
4. Calculate total
|
|
289
|
-
5. Generate complete 100-
|
|
356
|
+
4. Calculate total cycles, duration, and cost estimates
|
|
357
|
+
5. Generate complete 100-cycle plan with specialist assignments
|
|
290
358
|
6. Write plan back to `.onboarding.json` for tracking
|
|
291
359
|
|
|
292
360
|
**Output:**
|
|
293
|
-
- Complete
|
|
361
|
+
- Complete cycle plan in `.onboarding.json`
|
|
294
362
|
- Execution roadmap with phases and specialists
|
|
295
|
-
- Progress tracking structure (
|
|
363
|
+
- Progress tracking structure (currentCycle, completedCycles)
|
|
296
364
|
|
|
297
|
-
**Key Innovation:** Plans are
|
|
365
|
+
**Key Innovation:** Plans are cycle-based (not time-based), enabling precise execution and transparent progress tracking.
|
|
298
366
|
|
|
299
367
|
### 3. Create Plans (Feature Collections)
|
|
300
368
|
|
|
@@ -351,10 +419,10 @@ From the ontology workflow system, you have 5 responsibilities:
|
|
|
351
419
|
- Dependency resolution allowing safe parallelization
|
|
352
420
|
- 30-50% faster delivery through parallel execution
|
|
353
421
|
|
|
354
|
-
## Feature Library (100-
|
|
422
|
+
## Feature Library (100-Cycle Mapping)
|
|
355
423
|
|
|
356
|
-
The feature library maps every possible feature to specific
|
|
357
|
-
- **
|
|
424
|
+
The feature library maps every possible feature to specific cycle ranges. Each feature includes:
|
|
425
|
+
- **Cycle range**: Where it fits in the 100-cycle sequence
|
|
358
426
|
- **Specialist**: Which agent executes it
|
|
359
427
|
- **Duration**: Estimated time to complete
|
|
360
428
|
- **Dependencies**: Required features that must complete first
|
|
@@ -367,7 +435,7 @@ const FOUNDATION_FEATURES = {
|
|
|
367
435
|
"landing-page": {
|
|
368
436
|
name: "Landing Page",
|
|
369
437
|
description: "Beautiful landing page with hero, features, CTA",
|
|
370
|
-
|
|
438
|
+
cycles: [1, 10],
|
|
371
439
|
specialist: "agent-frontend",
|
|
372
440
|
duration: "~5 min",
|
|
373
441
|
cost: "$0",
|
|
@@ -385,7 +453,7 @@ const FOUNDATION_FEATURES = {
|
|
|
385
453
|
"authentication": {
|
|
386
454
|
name: "Authentication System",
|
|
387
455
|
description: "Email/password + OAuth + Magic Links (6 methods)",
|
|
388
|
-
|
|
456
|
+
cycles: [11, 20],
|
|
389
457
|
specialist: "existing", // Already implemented
|
|
390
458
|
duration: "~0 min",
|
|
391
459
|
cost: "$0",
|
|
@@ -403,7 +471,7 @@ const FOUNDATION_FEATURES = {
|
|
|
403
471
|
"multi-tenant-groups": {
|
|
404
472
|
name: "Multi-Tenant Groups",
|
|
405
473
|
description: "Hierarchical groups with data scoping (organizations → teams → projects)",
|
|
406
|
-
|
|
474
|
+
cycles: [21, 30],
|
|
407
475
|
specialist: "agent-backend",
|
|
408
476
|
duration: "~10 min",
|
|
409
477
|
cost: "$0",
|
|
@@ -427,7 +495,7 @@ const CREATOR_FEATURES = {
|
|
|
427
495
|
"content-publishing": {
|
|
428
496
|
name: "Content Publishing",
|
|
429
497
|
description: "Blog posts, articles, courses, lessons",
|
|
430
|
-
|
|
498
|
+
cycles: [31, 40],
|
|
431
499
|
specialist: "agent-frontend",
|
|
432
500
|
duration: "~15 min",
|
|
433
501
|
cost: "$0",
|
|
@@ -444,7 +512,7 @@ const CREATOR_FEATURES = {
|
|
|
444
512
|
"membership-tiers": {
|
|
445
513
|
name: "Membership Tiers",
|
|
446
514
|
description: "Subscription plans with tiered access",
|
|
447
|
-
|
|
515
|
+
cycles: [41, 50],
|
|
448
516
|
specialist: "agent-backend",
|
|
449
517
|
duration: "~15 min",
|
|
450
518
|
cost: "$0",
|
|
@@ -461,7 +529,7 @@ const CREATOR_FEATURES = {
|
|
|
461
529
|
"revenue-tracking": {
|
|
462
530
|
name: "Revenue Tracking",
|
|
463
531
|
description: "Track payments, subscriptions, and revenue metrics",
|
|
464
|
-
|
|
532
|
+
cycles: [51, 60],
|
|
465
533
|
specialist: "agent-backend",
|
|
466
534
|
duration: "~10 min",
|
|
467
535
|
cost: "$0",
|
|
@@ -484,7 +552,7 @@ const DEVELOPER_FEATURES = {
|
|
|
484
552
|
"project-management": {
|
|
485
553
|
name: "Project Management",
|
|
486
554
|
description: "Projects, tasks, milestones, kanban boards",
|
|
487
|
-
|
|
555
|
+
cycles: [31, 40],
|
|
488
556
|
specialist: "agent-builder", // Full-stack
|
|
489
557
|
duration: "~15 min",
|
|
490
558
|
cost: "$0",
|
|
@@ -501,7 +569,7 @@ const DEVELOPER_FEATURES = {
|
|
|
501
569
|
"code-repositories": {
|
|
502
570
|
name: "Code Repositories",
|
|
503
571
|
description: "Git repository integration and management",
|
|
504
|
-
|
|
572
|
+
cycles: [41, 50],
|
|
505
573
|
specialist: "agent-integrator",
|
|
506
574
|
duration: "~15 min",
|
|
507
575
|
cost: "$0",
|
|
@@ -518,7 +586,7 @@ const DEVELOPER_FEATURES = {
|
|
|
518
586
|
"deployment-pipeline": {
|
|
519
587
|
name: "Deployment Pipeline",
|
|
520
588
|
description: "CI/CD automation with Cloudflare Pages + Convex",
|
|
521
|
-
|
|
589
|
+
cycles: [51, 60],
|
|
522
590
|
specialist: "agent-ops",
|
|
523
591
|
duration: "~20 min",
|
|
524
592
|
cost: "$0",
|
|
@@ -541,7 +609,7 @@ const AI_FEATURES = {
|
|
|
541
609
|
"ai-agents": {
|
|
542
610
|
name: "AI Agent Framework",
|
|
543
611
|
description: "9 specialist agents for development, design, quality",
|
|
544
|
-
|
|
612
|
+
cycles: [61, 70],
|
|
545
613
|
specialist: "agent-builder",
|
|
546
614
|
duration: "~20 min",
|
|
547
615
|
cost: "$0",
|
|
@@ -561,7 +629,7 @@ const AI_FEATURES = {
|
|
|
561
629
|
"rag-knowledge": {
|
|
562
630
|
name: "RAG Knowledge Base",
|
|
563
631
|
description: "Vector embeddings + semantic search + retrieval",
|
|
564
|
-
|
|
632
|
+
cycles: [71, 80],
|
|
565
633
|
specialist: "agent-backend",
|
|
566
634
|
duration: "~15 min",
|
|
567
635
|
cost: "$0.10 - $1.00", // Embedding costs
|
|
@@ -578,7 +646,7 @@ const AI_FEATURES = {
|
|
|
578
646
|
"semantic-search": {
|
|
579
647
|
name: "Semantic Search",
|
|
580
648
|
description: "Natural language search across all content",
|
|
581
|
-
|
|
649
|
+
cycles: [81, 90],
|
|
582
650
|
specialist: "agent-backend",
|
|
583
651
|
duration: "~10 min",
|
|
584
652
|
cost: "$0",
|
|
@@ -601,7 +669,7 @@ const INTEGRATION_FEATURES = {
|
|
|
601
669
|
"stripe-payments": {
|
|
602
670
|
name: "Stripe Payments",
|
|
603
671
|
description: "Stripe integration for payments and subscriptions",
|
|
604
|
-
|
|
672
|
+
cycles: [31, 40],
|
|
605
673
|
specialist: "agent-integrator",
|
|
606
674
|
duration: "~15 min",
|
|
607
675
|
cost: "$0",
|
|
@@ -618,7 +686,7 @@ const INTEGRATION_FEATURES = {
|
|
|
618
686
|
"email-marketing": {
|
|
619
687
|
name: "Email Marketing",
|
|
620
688
|
description: "Resend integration for transactional + marketing emails",
|
|
621
|
-
|
|
689
|
+
cycles: [41, 50],
|
|
622
690
|
specialist: "agent-integrator",
|
|
623
691
|
duration: "~10 min",
|
|
624
692
|
cost: "$0",
|
|
@@ -635,7 +703,7 @@ const INTEGRATION_FEATURES = {
|
|
|
635
703
|
"discord-community": {
|
|
636
704
|
name: "Discord Community",
|
|
637
705
|
description: "Discord bot integration for community engagement",
|
|
638
|
-
|
|
706
|
+
cycles: [51, 60],
|
|
639
707
|
specialist: "agent-integrator",
|
|
640
708
|
duration: "~15 min",
|
|
641
709
|
cost: "$0",
|
|
@@ -658,7 +726,7 @@ const DESIGN_FEATURES = {
|
|
|
658
726
|
"design-system": {
|
|
659
727
|
name: "Design System",
|
|
660
728
|
description: "Component library with brand tokens and Tailwind config",
|
|
661
|
-
|
|
729
|
+
cycles: [71, 80],
|
|
662
730
|
specialist: "agent-designer",
|
|
663
731
|
duration: "~15 min",
|
|
664
732
|
cost: "$0",
|
|
@@ -675,7 +743,7 @@ const DESIGN_FEATURES = {
|
|
|
675
743
|
"wireframes": {
|
|
676
744
|
name: "Wireframes & Mockups",
|
|
677
745
|
description: "Auto-generated wireframes from feature specs",
|
|
678
|
-
|
|
746
|
+
cycles: [71, 75],
|
|
679
747
|
specialist: "agent-designer",
|
|
680
748
|
duration: "~10 min",
|
|
681
749
|
cost: "$0",
|
|
@@ -698,7 +766,7 @@ const PERFORMANCE_FEATURES = {
|
|
|
698
766
|
"performance-monitoring": {
|
|
699
767
|
name: "Performance Monitoring",
|
|
700
768
|
description: "Real-time performance metrics and Lighthouse scores",
|
|
701
|
-
|
|
769
|
+
cycles: [81, 90],
|
|
702
770
|
specialist: "agent-ops",
|
|
703
771
|
duration: "~10 min",
|
|
704
772
|
cost: "$0",
|
|
@@ -715,7 +783,7 @@ const PERFORMANCE_FEATURES = {
|
|
|
715
783
|
"analytics-dashboard": {
|
|
716
784
|
name: "Analytics Dashboard",
|
|
717
785
|
description: "User analytics, revenue metrics, engagement tracking",
|
|
718
|
-
|
|
786
|
+
cycles: [81, 90],
|
|
719
787
|
specialist: "agent-frontend",
|
|
720
788
|
duration: "~15 min",
|
|
721
789
|
cost: "$0",
|
|
@@ -1102,7 +1170,7 @@ The Director enforces consistent numbering:
|
|
|
1102
1170
|
|
|
1103
1171
|
## Plan Generation Algorithm
|
|
1104
1172
|
|
|
1105
|
-
When generating a 100-
|
|
1173
|
+
When generating a 100-cycle plan from feature selections, follow this algorithm:
|
|
1106
1174
|
|
|
1107
1175
|
### Step 1: Read Feature Selections
|
|
1108
1176
|
|
|
@@ -1157,21 +1225,21 @@ function resolveDependencies(selectedFeatures: string[]): string[] {
|
|
|
1157
1225
|
// Output: ["landing-page", "authentication", "multi-tenant-groups", "project-management", "ai-agents"]
|
|
1158
1226
|
```
|
|
1159
1227
|
|
|
1160
|
-
### Step 3: Map to
|
|
1228
|
+
### Step 3: Map to Cycle Ranges
|
|
1161
1229
|
|
|
1162
1230
|
```typescript
|
|
1163
|
-
function
|
|
1231
|
+
function mapToCycles(features: string[]): CyclePlan {
|
|
1164
1232
|
const phases: Phase[] = [];
|
|
1165
|
-
const
|
|
1233
|
+
const allCycles = [];
|
|
1166
1234
|
|
|
1167
1235
|
for (const featureKey of features) {
|
|
1168
1236
|
const feature = ALL_FEATURES[featureKey];
|
|
1169
|
-
const [start, end] = feature.
|
|
1237
|
+
const [start, end] = feature.cycles;
|
|
1170
1238
|
|
|
1171
1239
|
phases.push({
|
|
1172
1240
|
name: feature.name,
|
|
1173
1241
|
featureKey: featureKey,
|
|
1174
|
-
|
|
1242
|
+
cycles: { start, end },
|
|
1175
1243
|
specialist: feature.specialist,
|
|
1176
1244
|
duration: feature.duration,
|
|
1177
1245
|
cost: feature.cost,
|
|
@@ -1179,14 +1247,14 @@ function mapToInferences(features: string[]): InferencePlan {
|
|
|
1179
1247
|
ontology: feature.ontology
|
|
1180
1248
|
});
|
|
1181
1249
|
|
|
1182
|
-
|
|
1250
|
+
allCycles.push(...range(start, end));
|
|
1183
1251
|
}
|
|
1184
1252
|
|
|
1185
1253
|
// Always add deployment phase (Cycle 91-100)
|
|
1186
1254
|
phases.push({
|
|
1187
1255
|
name: "Deployment & Documentation",
|
|
1188
1256
|
featureKey: "deployment",
|
|
1189
|
-
|
|
1257
|
+
cycles: { start: 91, end: 100 },
|
|
1190
1258
|
specialist: "agent-ops",
|
|
1191
1259
|
duration: "~10 min",
|
|
1192
1260
|
cost: "$0",
|
|
@@ -1198,9 +1266,9 @@ function mapToInferences(features: string[]): InferencePlan {
|
|
|
1198
1266
|
|
|
1199
1267
|
return {
|
|
1200
1268
|
phases,
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1269
|
+
totalCycles: allCycles.length + 10, // Include deployment
|
|
1270
|
+
currentCycle: 1,
|
|
1271
|
+
completedCycles: []
|
|
1204
1272
|
};
|
|
1205
1273
|
}
|
|
1206
1274
|
```
|
|
@@ -1208,7 +1276,7 @@ function mapToInferences(features: string[]): InferencePlan {
|
|
|
1208
1276
|
### Step 4: Calculate Estimates
|
|
1209
1277
|
|
|
1210
1278
|
```typescript
|
|
1211
|
-
function calculateEstimates(plan:
|
|
1279
|
+
function calculateEstimates(plan: CyclePlan) {
|
|
1212
1280
|
let totalMinutes = 0;
|
|
1213
1281
|
let totalCost = 0;
|
|
1214
1282
|
|
|
@@ -1228,7 +1296,7 @@ function calculateEstimates(plan: InferencePlan) {
|
|
|
1228
1296
|
return {
|
|
1229
1297
|
estimatedDuration: `${totalMinutes} minutes (~${Math.ceil(totalMinutes / 60)} hours)`,
|
|
1230
1298
|
estimatedCost: `$${totalCost.toFixed(2)}`,
|
|
1231
|
-
|
|
1299
|
+
cycleCount: plan.totalCycles
|
|
1232
1300
|
};
|
|
1233
1301
|
}
|
|
1234
1302
|
```
|
|
@@ -1242,13 +1310,13 @@ interface ExecutionPlan {
|
|
|
1242
1310
|
createdAt: number;
|
|
1243
1311
|
plan: {
|
|
1244
1312
|
phases: Phase[];
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1313
|
+
totalCycles: number;
|
|
1314
|
+
currentCycle: number;
|
|
1315
|
+
completedCycles: number[];
|
|
1248
1316
|
estimates: {
|
|
1249
1317
|
duration: string;
|
|
1250
1318
|
cost: string;
|
|
1251
|
-
|
|
1319
|
+
cycles: number;
|
|
1252
1320
|
};
|
|
1253
1321
|
};
|
|
1254
1322
|
progress: {
|
|
@@ -1269,7 +1337,7 @@ const executionPlan: ExecutionPlan = {
|
|
|
1269
1337
|
{
|
|
1270
1338
|
name: "Landing Page",
|
|
1271
1339
|
featureKey: "landing-page",
|
|
1272
|
-
|
|
1340
|
+
cycles: { start: 1, end: 10 },
|
|
1273
1341
|
specialist: "agent-frontend",
|
|
1274
1342
|
duration: "~5 min",
|
|
1275
1343
|
cost: "$0",
|
|
@@ -1278,13 +1346,13 @@ const executionPlan: ExecutionPlan = {
|
|
|
1278
1346
|
},
|
|
1279
1347
|
// ... more phases
|
|
1280
1348
|
],
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1349
|
+
totalCycles: 70,
|
|
1350
|
+
currentCycle: 1,
|
|
1351
|
+
completedCycles: [],
|
|
1284
1352
|
estimates: {
|
|
1285
1353
|
duration: "60 minutes (~1 hours)",
|
|
1286
1354
|
cost: "$0.10",
|
|
1287
|
-
|
|
1355
|
+
cycles: 70
|
|
1288
1356
|
}
|
|
1289
1357
|
},
|
|
1290
1358
|
progress: {
|
|
@@ -1315,14 +1383,14 @@ function generateMarkdownSummary(plan: ExecutionPlan): string {
|
|
|
1315
1383
|
|
|
1316
1384
|
## Overview
|
|
1317
1385
|
|
|
1318
|
-
- **Total
|
|
1386
|
+
- **Total Cycles:** ${plan.plan.totalCycles}/100
|
|
1319
1387
|
- **Estimated Duration:** ${plan.plan.estimates.duration}
|
|
1320
1388
|
- **Estimated Cost:** ${plan.plan.estimates.cost}
|
|
1321
1389
|
|
|
1322
1390
|
## Execution Phases
|
|
1323
1391
|
|
|
1324
1392
|
${plan.plan.phases.map((phase, i) => `
|
|
1325
|
-
### Phase ${i + 1}: ${phase.name} (Cycle ${phase.
|
|
1393
|
+
### Phase ${i + 1}: ${phase.name} (Cycle ${phase.cycles.start}-${phase.cycles.end})
|
|
1326
1394
|
|
|
1327
1395
|
- **Specialist:** ${phase.specialist}
|
|
1328
1396
|
- **Duration:** ${phase.duration}
|
|
@@ -1335,8 +1403,8 @@ ${JSON.stringify(phase.ontology, null, 2)}
|
|
|
1335
1403
|
|
|
1336
1404
|
## Progress Tracking
|
|
1337
1405
|
|
|
1338
|
-
Current
|
|
1339
|
-
Completed: ${plan.plan.
|
|
1406
|
+
Current Cycle: ${plan.plan.currentCycle}/${plan.plan.totalCycles}
|
|
1407
|
+
Completed: ${plan.plan.completedCycles.length} cycles
|
|
1340
1408
|
`;
|
|
1341
1409
|
}
|
|
1342
1410
|
```
|
|
@@ -1355,7 +1423,7 @@ async function executePhase(phase: Phase): Promise<void> {
|
|
|
1355
1423
|
targetId: phase.featureKey,
|
|
1356
1424
|
metadata: {
|
|
1357
1425
|
phaseName: phase.name,
|
|
1358
|
-
|
|
1426
|
+
cycles: phase.cycles,
|
|
1359
1427
|
specialist: phase.specialist
|
|
1360
1428
|
}
|
|
1361
1429
|
});
|
|
@@ -1364,7 +1432,7 @@ async function executePhase(phase: Phase): Promise<void> {
|
|
|
1364
1432
|
const specialist = getSpecialistAgent(phase.specialist);
|
|
1365
1433
|
await specialist.execute({
|
|
1366
1434
|
featureKey: phase.featureKey,
|
|
1367
|
-
|
|
1435
|
+
cycleRange: phase.cycles,
|
|
1368
1436
|
ontology: phase.ontology
|
|
1369
1437
|
});
|
|
1370
1438
|
|
|
@@ -1377,8 +1445,8 @@ async function executePhase(phase: Phase): Promise<void> {
|
|
|
1377
1445
|
|
|
1378
1446
|
// 4. Update .onboarding.json progress
|
|
1379
1447
|
updateProgress({
|
|
1380
|
-
|
|
1381
|
-
|
|
1448
|
+
currentCycle: phase.cycles.end,
|
|
1449
|
+
completedCycles: range(phase.cycles.start, phase.cycles.end),
|
|
1382
1450
|
currentPhase: phase.name,
|
|
1383
1451
|
status: "in_progress"
|
|
1384
1452
|
});
|
|
@@ -1401,8 +1469,8 @@ async function executePhase(phase: Phase): Promise<void> {
|
|
|
1401
1469
|
|
|
1402
1470
|
```typescript
|
|
1403
1471
|
interface ProgressUpdate {
|
|
1404
|
-
|
|
1405
|
-
|
|
1472
|
+
currentCycle: number;
|
|
1473
|
+
completedCycles: number[];
|
|
1406
1474
|
currentPhase: string;
|
|
1407
1475
|
status: "pending" | "in_progress" | "completed" | "failed";
|
|
1408
1476
|
startedAt?: number;
|
|
@@ -1421,7 +1489,7 @@ function updateProgress(update: Partial<ProgressUpdate>): void {
|
|
|
1421
1489
|
};
|
|
1422
1490
|
|
|
1423
1491
|
// Calculate completion percentage
|
|
1424
|
-
const percentage = (plan.plan.
|
|
1492
|
+
const percentage = (plan.plan.completedCycles.length / plan.plan.totalCycles) * 100;
|
|
1425
1493
|
|
|
1426
1494
|
// Write back to file
|
|
1427
1495
|
writeOnboardingJson(plan);
|
|
@@ -1431,8 +1499,8 @@ function updateProgress(update: Partial<ProgressUpdate>): void {
|
|
|
1431
1499
|
type: "progress_updated",
|
|
1432
1500
|
metadata: {
|
|
1433
1501
|
percentage,
|
|
1434
|
-
|
|
1435
|
-
|
|
1502
|
+
currentCycle: plan.plan.currentCycle,
|
|
1503
|
+
totalCycles: plan.plan.totalCycles,
|
|
1436
1504
|
currentPhase: plan.progress.currentPhase
|
|
1437
1505
|
}
|
|
1438
1506
|
});
|
|
@@ -1463,20 +1531,20 @@ async function executeAllPhases(plan: ExecutionPlan): Promise<void> {
|
|
|
1463
1531
|
updateProgress({
|
|
1464
1532
|
status: "completed",
|
|
1465
1533
|
completedAt: Date.now(),
|
|
1466
|
-
|
|
1534
|
+
currentCycle: 100
|
|
1467
1535
|
});
|
|
1468
1536
|
}
|
|
1469
1537
|
|
|
1470
1538
|
function findParallelPhases(phase: Phase, allPhases: Phase[]): Phase[] {
|
|
1471
1539
|
// Phases can run in parallel if:
|
|
1472
1540
|
// 1. They have no shared dependencies
|
|
1473
|
-
// 2. They don't overlap in
|
|
1541
|
+
// 2. They don't overlap in cycle ranges
|
|
1474
1542
|
// 3. They use different specialists (optional optimization)
|
|
1475
1543
|
|
|
1476
1544
|
return allPhases.filter(p =>
|
|
1477
1545
|
p !== phase &&
|
|
1478
1546
|
!hasSharedDependencies(p, phase) &&
|
|
1479
|
-
!
|
|
1547
|
+
!overlapsCycles(p.cycles, phase.cycles)
|
|
1480
1548
|
);
|
|
1481
1549
|
}
|
|
1482
1550
|
```
|
|
@@ -1535,21 +1603,21 @@ async function executePhaseWithRetry(phase: Phase, maxRetries = 3): Promise<void
|
|
|
1535
1603
|
|
|
1536
1604
|
```typescript
|
|
1537
1605
|
function displayProgress(plan: ExecutionPlan): void {
|
|
1538
|
-
const percentage = (plan.plan.
|
|
1606
|
+
const percentage = (plan.plan.completedCycles.length / plan.plan.totalCycles) * 100;
|
|
1539
1607
|
|
|
1540
1608
|
console.log(`
|
|
1541
1609
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
1542
1610
|
🤖 BUILDING ${plan.organizationName}
|
|
1543
1611
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
1544
1612
|
|
|
1545
|
-
Progress: ${percentage.toFixed(1)}% (${plan.plan.
|
|
1613
|
+
Progress: ${percentage.toFixed(1)}% (${plan.plan.completedCycles.length}/${plan.plan.totalCycles} cycles)
|
|
1546
1614
|
|
|
1547
1615
|
Current Phase: ${plan.progress.currentPhase || 'Starting...'}
|
|
1548
|
-
Current
|
|
1616
|
+
Current Cycle: ${plan.plan.currentCycle}
|
|
1549
1617
|
|
|
1550
1618
|
Phases:
|
|
1551
1619
|
${plan.plan.phases.map(phase => `
|
|
1552
|
-
${getStatusIcon(phase.status)} ${phase.name} (Cycle ${phase.
|
|
1620
|
+
${getStatusIcon(phase.status)} ${phase.name} (Cycle ${phase.cycles.start}-${phase.cycles.end})
|
|
1553
1621
|
${phase.specialist} • ${phase.duration}
|
|
1554
1622
|
`).join('')}
|
|
1555
1623
|
|