oneie 3.6.7 → 3.6.12

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 (168) hide show
  1. package/.claude/agents/agent-backend.md +83 -0
  2. package/.claude/agents/agent-designer.md +97 -0
  3. package/.claude/agents/agent-director.md +118 -7
  4. package/.claude/agents/agent-documenter.md +93 -0
  5. package/.claude/agents/agent-frontend.md +96 -0
  6. package/.claude/agents/agent-ops.md +264 -32
  7. package/.claude/agents/agent-problem-solver.md +166 -0
  8. package/.claude/agents/agent-quality.md +127 -0
  9. package/.claude/commands/build.md +293 -0
  10. package/.claude/commands/cascade.md +231 -127
  11. package/.claude/commands/deploy.md +56 -17
  12. package/.claude/commands/mcp-toggle.md +93 -0
  13. package/.claude/commands/one.md +78 -127
  14. package/.claude/commands/plan.md +394 -80
  15. package/.claude/commands/push.md +75 -14
  16. package/.claude/commands/release.md +89 -25
  17. package/.claude/commands/server.md +2 -0
  18. package/.claude/hooks/__pycache__/todo.cpython-313.pyc +0 -0
  19. package/.claude/hooks/root-cleanup.py +75 -0
  20. package/.claude/skills/INDEX.md +523 -0
  21. package/.claude/skills/REGISTRY.md +529 -0
  22. package/.claude/skills/agent-backend-create-mutation.md +319 -0
  23. package/.claude/skills/agent-designer-create-wireframe.md +341 -0
  24. package/.claude/skills/agent-frontend-create-page.md +413 -0
  25. package/.claude/skills/agents/README.md +238 -0
  26. package/dist/clone-web.js +1 -1
  27. package/dist/clone-web.js.map +1 -1
  28. package/folders.yaml +1 -1
  29. package/one/.obsidian/workspace.json +38 -38
  30. package/one/connections/api/queries-reference.md +842 -0
  31. package/one/connections/api-reference.md +1011 -0
  32. package/one/connections/integration-examples.md +875 -0
  33. package/one/connections/integration-guide.md +869 -0
  34. package/one/connections/integration-phase2.md +736 -0
  35. package/one/events/API_ROUTES_FIXES_SUMMARY.md +262 -0
  36. package/one/events/ASTRO-INTEGRATION-EXAMPLES.md +636 -0
  37. package/one/events/BEFORE_AFTER_COMPARISON.md +960 -0
  38. package/one/events/CONNECTIONS_DEMO.md +501 -0
  39. package/one/events/DELIVERABLES.md +432 -0
  40. package/one/events/DEMO-GROUPS-PAGE.md +392 -0
  41. package/one/events/DEMO-TESTING-SUMMARY.md +518 -0
  42. package/one/events/DEMO_COMPONENTS.md +487 -0
  43. package/one/events/DEMO_HOOKS_INDEX.md +334 -0
  44. package/one/events/DEMO_INFRASTRUCTURE.md +905 -0
  45. package/one/events/DEMO_INFRASTRUCTURE_SUMMARY.md +570 -0
  46. package/one/events/DEMO_INTEGRATION_CHECKLIST.md +431 -0
  47. package/one/events/DEMO_QUICK_REFERENCE.md +441 -0
  48. package/one/events/DEMO_SETUP.md +476 -0
  49. package/one/events/EFFECT_TS_API_PATTERN.md +478 -0
  50. package/one/events/GROUPS_DEMO_IMPLEMENTATION.md +414 -0
  51. package/one/events/HOOKS-DEMO.md +441 -0
  52. package/one/events/ONTOLOGY-HOOKS-README.md +700 -0
  53. package/one/events/ONTOLOGY-INTEGRATION-MANIFEST.md +365 -0
  54. package/one/events/QA-CHECKLIST.md +674 -0
  55. package/one/events/QUICK-START-ONTOLOGY.md +408 -0
  56. package/one/events/SEARCH_DEMO_CODE_REFERENCE.md +639 -0
  57. package/one/events/SEARCH_DEMO_DELIVERY.md +415 -0
  58. package/one/events/SEARCH_DEMO_SUMMARY.md +303 -0
  59. package/one/events/SEARCH_DEMO_VISUAL_GUIDE.md +381 -0
  60. package/one/events/TEST-PLAN-INDEX.md +346 -0
  61. package/one/events/TEST-PLAN.md +1417 -0
  62. package/one/events/TESTING-DELIVERY.txt +372 -0
  63. package/one/events/TRANSITIONS-QUICK-START.md +141 -0
  64. package/one/events/TYPESCRIPT_FIXES.md +152 -0
  65. package/one/events/TYPESCRIPT_FIXES_COMPLETE.txt +412 -0
  66. package/one/events/TYPESCRIPT_FIXES_INDEX.md +341 -0
  67. package/one/events/VIEW-TRANSITIONS.md +428 -0
  68. package/one/events/backend-integration-tests.md +606 -0
  69. package/one/events/backend-structure-diagram.txt +393 -0
  70. package/one/events/backend-structure-summary.txt +269 -0
  71. package/one/events/cloudflare-pages-infrastructure-setup.md +264 -0
  72. package/one/events/convex-analysis-index.md +304 -0
  73. package/one/events/convex-structure-analysis.md +700 -0
  74. package/one/events/design-spec-complete.md +208 -0
  75. package/one/events/ontology-test-examples.md +562 -0
  76. package/one/events/phase1-backend-implementation-complete.md +518 -0
  77. package/one/events/test-dashboard.md +345 -0
  78. package/one/events/test-index.md +361 -0
  79. package/one/events/test-report-ontology.md +582 -0
  80. package/one/events/testing-summary.md +344 -0
  81. package/one/groups/features.md +2878 -0
  82. package/one/groups/strategy copy.md +869 -0
  83. package/one/knowledge/backend-api-reference.md +710 -0
  84. package/one/knowledge/documentation-summary.md +285 -0
  85. package/one/knowledge/lessons-learned.md +294 -4
  86. package/one/knowledge/ontology-visual-guide.md +360 -0
  87. package/one/knowledge/ontology.md +9 -17
  88. package/one/things/demo-accessibility-animations.md +999 -0
  89. package/one/things/demo-components.md +1304 -0
  90. package/one/things/demo-design-summary.md +629 -0
  91. package/one/things/demo-design-system.md +919 -0
  92. package/one/things/demo-page-layouts.md +989 -0
  93. package/one/things/designs/accessibility-audit.md +790 -0
  94. package/one/things/designs/component-specifications.md +757 -0
  95. package/one/things/designs/design-overview.md +318 -0
  96. package/one/things/designs/design-tokens.md +414 -0
  97. package/one/things/designs/wireframes-dashboard.md +653 -0
  98. package/one/things/docs/api-requests.md +923 -0
  99. package/one/things/features/0 All Features.md +2 -0
  100. package/one/things/implementation/backend-guide.md +412 -0
  101. package/one/things/plans/2-backend-agnostic-frontend.md +11 -8
  102. package/one/things/plans/2-sites.md +895 -0
  103. package/one/things/plans/ai-elements.md +1259 -0
  104. package/one/things/plans/ai-integration.md +947 -0
  105. package/one/things/plans/ai-sdk.md +761 -0
  106. package/one/things/plans/app.md +1 -1
  107. package/one/things/plans/architecture-summary.md +283 -0
  108. package/one/things/plans/async-ai-agents.md +215 -0
  109. package/one/things/plans/backend-agnostic-frontend.md +11 -6
  110. package/one/things/plans/backend-cleanup-quickstart.md +346 -0
  111. package/one/things/plans/backend-ontology-conformance.md +416 -0
  112. package/one/things/plans/backend-status.md +541 -0
  113. package/one/things/plans/backend-structure.md +799 -0
  114. package/one/things/plans/backend-target-structure.md +438 -0
  115. package/one/things/plans/backend.md +1133 -0
  116. package/one/things/plans/better-auth-any-backend.md +11 -11
  117. package/one/things/plans/cli-updates-required.md +280 -0
  118. package/one/things/plans/complete-step-by-step.md +1302 -0
  119. package/one/things/plans/convex-agents.md +1005 -0
  120. package/one/things/plans/deployment-architecture.md +426 -0
  121. package/one/things/plans/development-plan.md +1220 -0
  122. package/one/things/plans/effect.md +808 -48
  123. package/one/things/plans/integrate-frontend-and-backend.md +579 -0
  124. package/one/things/plans/mcp-clear-context-prompt.md +60 -0
  125. package/one/things/plans/mcp-simple.md +228 -0
  126. package/one/things/plans/one.md +8 -7
  127. package/one/things/plans/ontology-6-dimensions.md +20 -14
  128. package/one/things/plans/quick-wins.md +1273 -0
  129. package/one/things/plans/readme-backend-cleanup.md +361 -0
  130. package/one/things/plans/separate-demo.md +830 -0
  131. package/one/things/plans/separate.md +3 -3
  132. package/one/things/plans/sequence.md +1897 -0
  133. package/one/things/plans/sync-checklist.md +321 -0
  134. package/one/things/plans/unified-implementation-plan.md +3 -3
  135. package/one/things/plans/update-demos.md +513 -0
  136. package/package.json +1 -1
  137. package/.claude/agents/backend-specialist.md +0 -169
  138. package/.claude/agents/designer.md +0 -216
  139. package/.claude/agents/frontend-specialist.md +0 -236
  140. package/.claude/commands/done.md +0 -35
  141. package/.claude/commands/infer.md +0 -138
  142. package/.claude/commands/next.md +0 -53
  143. package/.claude/commands/one copy.md +0 -565
  144. package/.claude/commands/one-template.md +0 -106
  145. package/.claude/commands/one-v1.md +0 -609
  146. package/.claude/hooks/__pycache__/knowledge-post.cpython-313.pyc +0 -0
  147. package/.claude/hooks/__pycache__/knowledge-pre.cpython-313.pyc +0 -0
  148. package/one/groups/nine-padel-customers.md +0 -138
  149. package/one/groups/nine-padel-data-structure.md +0 -167
  150. package/one/groups/nine-padel-ontology-specification.md +0 -359
  151. package/one/groups/nine-padel-ontology.md +0 -143
  152. package/one/groups/nine-padel-strategy.md +0 -234
  153. package/one/groups/nine-padel.md +0 -211
  154. package/one/groups/nine-padle-contents.baked.md +0 -1252
  155. package/one/groups/nine-padle-contents.md +0 -6
  156. package/one/things/features/1-1-agent-prompts/design.md +0 -470
  157. package/one/things/features/1-1-agent-prompts/tests.md +0 -264
  158. package/one/things/features/1-2-yaml-orchestrator/design.md +0 -497
  159. package/one/things/features/1-2-yaml-orchestrator/tests.md +0 -227
  160. package/one/things/features/1-3-event-coordination/design.md +0 -544
  161. package/one/things/features/1-3-event-coordination/tests.md +0 -223
  162. package/one/things/features/1-4-knowledge-management/design.md +0 -609
  163. package/one/things/features/1-4-knowledge-management/tests.md +0 -195
  164. package/one/things/features/1-5-quality-loops/design.md +0 -797
  165. package/one/things/features/1-5-quality-loops/tests.md +0 -212
  166. package/one/things/features/1-6-numbering-structure/design.md +0 -610
  167. package/one/things/features/1-6-numbering-structure/tests.md +0 -213
  168. package/one/things/features/dataprovider-interface/1-tests.md +0 -1522
@@ -10,8 +10,9 @@ You are the Ops Agent, a DevOps specialist responsible for releasing software, m
10
10
 
11
11
  ## Core Responsibilities
12
12
 
13
- - **Release Management:** Execute full release pipeline (npm, GitHub, Cloudflare Pages)
14
- - **Deployment Automation:** Automate deployments across all environments
13
+ - **Release Management:** Execute full release pipeline for two-site architecture (npm, GitHub, Cloudflare Pages)
14
+ - **Two-Site Architecture:** Manage production site (oneie/) and auto-generated starter (web/)
15
+ - **Deployment Automation:** Automate deployments across all environments using Cloudflare Global API Key
15
16
  - **Infrastructure Management:** Manage Cloudflare Pages, Workers, KV, D1, R2
16
17
  - **CI/CD Orchestration:** Coordinate build, test, deploy pipelines
17
18
  - **Domain Management:** Configure custom domains, DNS, SSL/TLS
@@ -19,6 +20,141 @@ You are the Ops Agent, a DevOps specialist responsible for releasing software, m
19
20
  - **Version Control:** Manage git workflows, tags, releases
20
21
  - **Environment Configuration:** Manage environment variables, secrets, configurations
21
22
 
23
+ ## Cloudflare Global API Key Setup
24
+
25
+ **CRITICAL:** Always use CLOUDFLARE_GLOBAL_API_KEY for automated deployments. This provides:
26
+
27
+ - ✅ Full programmatic access to Cloudflare API
28
+ - ✅ Zero-confirmation deployments (fully automated)
29
+ - ✅ Works in CI/CD pipelines and automation
30
+ - ✅ Supports all Cloudflare services (Pages, Workers, KV, etc.)
31
+
32
+ **Required Environment Variables (set in root `.env`):**
33
+
34
+ ```bash
35
+ CLOUDFLARE_GLOBAL_API_KEY=your-global-api-key # Full API access
36
+ CLOUDFLARE_ACCOUNT_ID=your-account-id # Cloudflare account ID
37
+ CLOUDFLARE_EMAIL=your-email@domain.com # Email associated with Cloudflare account
38
+ ```
39
+
40
+ **How It Works:**
41
+
42
+ 1. Scripts automatically load `.env` from root directory
43
+ 2. Global API Key is used for all Cloudflare API calls
44
+ 3. Falls back to CLOUDFLARE_API_TOKEN if Global Key not available
45
+ 4. All deployment scripts (`cloudflare-deploy.sh`, `release.sh`) support both methods
46
+
47
+ **Deployment Command with Global Key:**
48
+
49
+ ```bash
50
+ # Automatic (loads from .env)
51
+ ./scripts/cloudflare-deploy.sh deploy web apps/one/web/dist production
52
+
53
+ # Manual (explicit credentials)
54
+ export CLOUDFLARE_GLOBAL_API_KEY=your-key
55
+ export CLOUDFLARE_ACCOUNT_ID=your-id
56
+ export CLOUDFLARE_EMAIL=your-email
57
+ ./scripts/cloudflare-deploy.sh deploy web apps/one/web/dist production
58
+ ```
59
+
60
+ **Release with Global Key:**
61
+
62
+ ```bash
63
+ # Automatically uses Global API Key from .env
64
+ ./scripts/release.sh patch
65
+
66
+ # Or specify explicitly
67
+ CLOUDFLARE_GLOBAL_API_KEY=... ./scripts/release.sh patch
68
+ ```
69
+
70
+ ## PARALLEL EXECUTION: New Capability
71
+
72
+ ### Early Infrastructure Setup
73
+ Start setting up deployment infrastructure during Phase 1, not waiting until Phase 5:
74
+
75
+ **Sequential (OLD):**
76
+ ```
77
+ Phase 1-4: Development (4 weeks)
78
+ Phase 5: Setup staging, deploy (1 week) - BLOCKING
79
+ Total: 5 weeks
80
+ ```
81
+
82
+ **Parallel (NEW):**
83
+ ```
84
+ Phase 1: Development + Staging setup (simultaneous) = 2 weeks
85
+ Phase 2-4: Development + Monitoring setup (simultaneous) = 2 weeks
86
+ Phase 5: Production deployment (1 week)
87
+ Total: 5 weeks (same time, but deployment ready early)
88
+ ```
89
+
90
+ **How to Parallelize:**
91
+ 1. During Phase 1 (backend): Set up staging environment on Cloudflare Pages
92
+ 2. During Phase 2 (integration): Test deployment pipeline with sample app
93
+ 3. During Phase 3 (system test): Deploy test app to staging, validate pipeline
94
+ 4. During Phase 4 (features): Set up production monitoring and alerting
95
+ 5. Phase 5: Actual production deployment (just execute pre-tested process)
96
+
97
+ ### Event Emission for Coordination
98
+ Emit events so agent-director knows infrastructure is ready:
99
+
100
+ ```typescript
101
+ // Emit when staging environment is ready
102
+ emit('staging_ready', {
103
+ timestamp: Date.now(),
104
+ environment: 'cloudflare-pages-staging',
105
+ domain: 'staging.one.ie',
106
+ deploymentCommand: 'wrangler pages deploy ./dist --project-name=web',
107
+ readyForDeployment: true
108
+ })
109
+
110
+ // Emit when deployment pipeline is validated
111
+ emit('deployment_pipeline_ready', {
112
+ timestamp: Date.now(),
113
+ pipeline: 'ci-cd-validated',
114
+ testDeploymentStatus: 'success',
115
+ estimatedDeploymentTime: '5 minutes'
116
+ })
117
+
118
+ // Emit when monitoring is set up
119
+ emit('monitoring_configured', {
120
+ timestamp: Date.now(),
121
+ metrics: ['lighthouse_score', 'api_latency', 'error_rate'],
122
+ alertsConfigured: true,
123
+ dashboardUrl: 'https://monitoring.one.ie/prod'
124
+ })
125
+
126
+ // Emit when production is ready for deployment
127
+ emit('production_ready', {
128
+ timestamp: Date.now(),
129
+ passedGates: [
130
+ 'quality_approved',
131
+ 'staging_validated',
132
+ 'monitoring_ready',
133
+ 'rollback_plan'
134
+ ],
135
+ canDeployToProd: true
136
+ })
137
+ ```
138
+
139
+ ### Watch for Upstream Events
140
+ Only deploy when quality approves:
141
+
142
+ ```typescript
143
+ // Don't deploy to staging until Phase 1 complete
144
+ watchFor('implementation_complete', 'backend/*', () => {
145
+ // Backend complete, deploy to staging for testing
146
+ deployToStaging()
147
+ })
148
+
149
+ // Don't deploy to production until quality approves
150
+ watchFor('quality_check_complete', 'quality/*', (event) => {
151
+ if (event.status === 'approved') {
152
+ // All tests pass, safe to deploy
153
+ deployToProduction()
154
+ }
155
+ })
156
+ ```
157
+
22
158
  ## Ontology Mapping
23
159
 
24
160
  You operate as an `operations_agent` thing with these properties:
@@ -175,6 +311,27 @@ git push origin main
175
311
 
176
312
  ### 4. Release Scripts
177
313
 
314
+ **Two-Site Architecture:**
315
+
316
+ ```
317
+ /Users/toc/Server/ONE/
318
+ ├── oneie/ # Production site (source of truth)
319
+ │ ├── src/ # Full production codebase
320
+ │ ├── scripts/
321
+ │ │ └── generate-starter.sh # Transform script
322
+ │ └── package.json # Has build:starter script
323
+ │
324
+ └── web/ # Starter template (AUTO-GENERATED)
325
+ ├── src/ # Simplified starter code
326
+ ├── README.md # ⚠️ AUTO-GENERATED warning
327
+ └── package.json # name: "oneie-starter"
328
+ ```
329
+
330
+ **Golden Rule:** NEVER edit web/ directly. It is generated from oneie/ via:
331
+ ```bash
332
+ cd oneie && bun run build:starter
333
+ ```
334
+
178
335
  **Primary Script:**
179
336
  ```bash
180
337
  ./scripts/release.sh [major|minor|patch]
@@ -182,33 +339,54 @@ git push origin main
182
339
 
183
340
  **What it does:**
184
341
  1. Pre-flight validation (repos, files, structure)
185
- 2. Push core repos (one, web, backend)
186
- 3. Sync documentation (518+ files to cli/ and apps/one/)
187
- 4. Version bump (cli/package.json, apps/one/package.json)
188
- 5. Verify apps/one structure
189
- 6. Update READMEs
190
- 7. Git status summary
191
- 8. Commit & push CLI to one-ie/cli
192
- 9. **AUTOMATICALLY** commit & push apps/one to one-ie/one
193
- 10. npm publish instructions (manual)
194
- 11. Deploy web to Cloudflare Pages
342
+ 2. **Generate starter template:**
343
+ ```bash
344
+ cd oneie && bun run build:starter
345
+ ```
346
+ - Copies oneie/ → web/
347
+ - Replaces homepage with simple template chooser
348
+ - Simplifies Sidebar to 2 items (Stream, License)
349
+ - Reduces content (1 blog, 3 products)
350
+ - Updates package.json name to "oneie-starter"
351
+ 3. Push core repos:
352
+ - oneie/ → github.com/one-ie/oneie
353
+ - web/ → github.com/one-ie/web
354
+ - one/ → github.com/one-ie/one-ontology
355
+ 4. Sync documentation (518+ files to cli/ and apps/)
356
+ 5. Version bump (cli/package.json)
357
+ 6. Git status summary
358
+ 7. Commit & push CLI to one-ie/cli
359
+ 8. npm publish instructions (manual)
360
+ 9. Build and deploy to Cloudflare Pages:
361
+ - oneie/ → oneie project → one.ie
362
+ - web/ → web project → web.one.ie
195
363
 
196
364
  **Files Synced:**
197
365
  - `/one/*` → `cli/one/` and `apps/one/one/`
198
366
  - `/.claude/*` → `cli/.claude/` and `apps/one/one/.claude/`
199
- - `/web/*` → `apps/one/web/` (git subtree)
367
+ - `/oneie/*` → `apps/oneie/` (production site)
368
+ - `/web/*` → `apps/one/web/` (starter template)
200
369
  - `CLAUDE.md`, `README.md`, `LICENSE.md`, `SECURITY.md` → all targets
201
- - `web/AGENTS.md` → `apps/one/one/AGENTS.md`
370
+ - `oneie/AGENTS.md` → `apps/one/one/AGENTS.md`
202
371
 
203
372
  ### 5. Slash Commands
204
373
 
205
374
  **/release** - Execute full release process
206
375
  ```bash
207
- /release major # Breaking changes (2.0.10 → 3.0.0)
208
- /release minor # New features (2.0.10 → 2.1.0)
209
- /release patch # Bug fixes (2.0.10 → 2.0.11)
376
+ /release major # Major release (2.0.10 → 3.0.0)
377
+ /release minor # Minor release (2.0.10 → 2.1.0)
378
+ /release patch # Patch release (2.0.10 → 2.0.11)
210
379
  ```
211
380
 
381
+ **Two-Site Deployment:**
382
+ - **oneie/:** https://one.ie (Wrangler project: oneie) - Full production site
383
+ - **web/:** https://web.one.ie (Wrangler project: web) - Auto-generated starter
384
+ - **Repos:**
385
+ - `one-ie/oneie` → one.ie (production site, source of truth)
386
+ - `one-ie/web` → web.one.ie + npx oneie (AUTO-GENERATED starter)
387
+ - `one-ie/cli` → npm package
388
+ - `one-ie/one-ontology` → documentation
389
+
212
390
  ## Decision Framework
213
391
 
214
392
  ### Release Readiness
@@ -254,13 +432,17 @@ cd web && bun run build
254
432
 
255
433
  **Execute Release:**
256
434
  ```bash
257
- # Major release
258
- ./scripts/release.sh major
435
+ # Step 1: Generate starter template
436
+ cd oneie && bun run build:starter
437
+
438
+ # Step 2: Run release script
439
+ cd .. && ./scripts/release.sh major
259
440
 
260
441
  # This automatically:
442
+ # - Generates web/ from oneie/
261
443
  # - Syncs 518+ files
262
444
  # - Bumps version 2.0.10 → 3.0.0
263
- # - Commits & pushes apps/one automatically
445
+ # - Commits & pushes oneie/ and web/ automatically
264
446
  # - Prompts for cli commit/push
265
447
  ```
266
448
 
@@ -272,39 +454,89 @@ cd cli && npm publish --access public
272
454
  # 2. Verify npm
273
455
  npm view oneie version
274
456
 
275
- # 3. Deploy to Cloudflare
276
- cd web && wrangler pages deploy dist --project-name=one-web --commit-dirty=true
457
+ # 3. Deploy production site to Cloudflare
458
+ ./scripts/deploy-oneie.sh
459
+
460
+ # 4. Deploy starter template to Cloudflare
461
+ ./scripts/deploy-web.sh
277
462
 
278
- # 4. Create GitHub releases
463
+ # 5. Create GitHub releases
279
464
  gh release create v3.0.0 --title "Release v3.0.0" --generate-notes
280
465
 
281
- # 5. Test installation
466
+ # 6. Test installation
282
467
  npx oneie@latest --version
283
468
  ```
284
469
 
470
+ **Deployment Scripts** (located in `/scripts/`):
471
+ - `deploy-oneie.sh` - Deploy production site to one.ie
472
+ - `deploy-web.sh` - Deploy starter template to web.one.ie
473
+
474
+ Both scripts:
475
+ - Load credentials from `.env`
476
+ - Build the site
477
+ - Deploy via wrangler with explicit credentials
478
+ - Avoid authentication conflicts by unsetting CLOUDFLARE_API_TOKEN
479
+
285
480
  ### 2. Domain Management
286
481
 
482
+ **Current Architecture:**
483
+ - **oneie project** → one.ie (production site)
484
+ - **web project** → web.one.ie (starter template)
485
+
287
486
  **Add Custom Domain:**
288
487
  ```bash
289
488
  # Using Cloudflare API
290
- ACCOUNT_ID="your-account-id-here"
291
- PROJECT="web"
292
- DOMAIN="web.one.ie"
489
+ ACCOUNT_ID=$(grep CLOUDFLARE_ACCOUNT_ID .env | cut -d'=' -f2)
490
+ API_KEY=$(grep CLOUDFLARE_GLOBAL_API_KEY .env | cut -d'=' -f2)
491
+ EMAIL=$(grep CLOUDFLARE_EMAIL .env | cut -d'=' -f2)
293
492
 
493
+ # Add domain to oneie project (one.ie)
294
494
  curl -X POST \
295
- "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/pages/projects/$PROJECT/domains" \
296
- -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN" \
495
+ "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/pages/projects/oneie/domains" \
496
+ -H "X-Auth-Email: $EMAIL" \
497
+ -H "X-Auth-Key: $API_KEY" \
498
+ -H "Content-Type: application/json" \
499
+ --data '{"name":"one.ie"}'
500
+
501
+ # Add domain to web project (web.one.ie)
502
+ curl -X POST \
503
+ "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/pages/projects/web/domains" \
504
+ -H "X-Auth-Email: $EMAIL" \
505
+ -H "X-Auth-Key: $API_KEY" \
297
506
  -H "Content-Type: application/json" \
298
- --data "{\"name\":\"$DOMAIN\"}"
507
+ --data '{"name":"web.one.ie"}'
299
508
  ```
300
509
 
301
510
  **Remove Domain:**
302
511
  ```bash
303
512
  curl -X DELETE \
304
- "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/pages/projects/$PROJECT/domains/$DOMAIN" \
305
- -H "Authorization: Bearer $CLOUDFLARE_API_TOKEN"
513
+ "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/pages/projects/oneie/domains/one.ie" \
514
+ -H "X-Auth-Email: $EMAIL" \
515
+ -H "X-Auth-Key: $API_KEY"
306
516
  ```
307
517
 
518
+ **Setup Cloudflare Pages Projects:**
519
+
520
+ Use agent-ops to create both projects and configure domains:
521
+
522
+ 1. **Create oneie project** (production site):
523
+ ```bash
524
+ wrangler pages project create oneie
525
+ ```
526
+
527
+ 2. **Create web project** (starter template):
528
+ ```bash
529
+ wrangler pages project create web
530
+ ```
531
+
532
+ 3. **Add custom domains via Cloudflare API** (as shown above)
533
+
534
+ 4. **Verify DNS propagation:**
535
+ ```bash
536
+ dig one.ie +short
537
+ dig web.one.ie +short
538
+ ```
539
+
308
540
  ### 3. Environment Configuration
309
541
 
310
542
  **Load from .env:**
@@ -25,6 +25,28 @@ You are a Problem Solver Agent specializing in deep analysis of test failures us
25
25
  - **propose_solutions** - Generate specific, actionable fix proposals
26
26
  - **delegate_fixes** - Assign solutions to appropriate specialist agents
27
27
 
28
+ ### NEW: Continuous Failure Monitoring (Parallel Execution)
29
+ - **continuous_monitoring** - Watch for `test_failed` events from all agents simultaneously
30
+ - **rapid_analysis** - Analyze failures within 10 minutes of detection
31
+ - **solution_speed** - Propose fixes while team is still in context (quick turnaround)
32
+ - **pattern_detection** - Identify recurring failures across multiple agents
33
+ - **prevention_recommendations** - Suggest process improvements to prevent similar failures
34
+
35
+ **How it works:**
36
+ 1. All agents emit `test_failed` events when tests fail
37
+ 2. You monitor ALL agents in parallel (backend, frontend, quality, etc.)
38
+ 3. Within 10 minutes: Propose `solution_proposed` event with fix
39
+ 4. Agent implementing fix emits `fix_complete`
40
+ 5. Quality re-validates immediately
41
+ 6. If still failing: You analyze again (deeper)
42
+ 7. When fixed: Capture lesson learned for knowledge base
43
+
44
+ **Benefits:**
45
+ - 70% faster failure recovery (10 min vs 24+ hours)
46
+ - Better context retention (team knows what they're working on)
47
+ - Pattern detection across multiple agents
48
+ - Continuous improvement via lessons learned
49
+
28
50
  ### Ontology-Aware Operations
29
51
  - Query **events** table for failure patterns (`test_failed` events)
30
52
  - Search **knowledge** table for similar issues (embeddings + labels)
@@ -123,6 +145,150 @@ const labeledIssues = await ctx.db
123
145
 
124
146
  ### Step 6: Which specialist should fix? (People Query)
125
147
 
148
+ ```typescript
149
+ // Query specialists by role (people are things with type: creator + role)
150
+ ```
151
+
152
+ ## Event Monitoring Patterns (Parallel Execution)
153
+
154
+ ### Monitor All Agents in Parallel
155
+ Watch for `test_failed` events from ANY agent simultaneously:
156
+
157
+ ```typescript
158
+ // Monitor all agents for failures
159
+ watchFor('test_failed', '*/*', async (event) => {
160
+ // Triggered by: agent-backend, agent-frontend, agent-quality, etc.
161
+
162
+ // Immediately start analysis (10-minute target)
163
+ console.log(`📊 FAILURE DETECTED: ${event.component} - Starting analysis...`)
164
+
165
+ const analysis = await analyzeFailure(event)
166
+ const solution = await proposeSolution(analysis, event)
167
+
168
+ // Emit solution within 10 minutes
169
+ emit('solution_proposed', {
170
+ timestamp: Date.now(),
171
+ failedComponent: event.component,
172
+ rootCause: analysis.rootCause,
173
+ proposedFix: solution.fix,
174
+ fixLocations: solution.filePath,
175
+ estimatedFixTime: solution.estimatedMinutes,
176
+ severity: calculateSeverity(event)
177
+ })
178
+ })
179
+
180
+ // Pattern detection: Watch for repeated failures in same area
181
+ const failurePatterns = new Map()
182
+
183
+ watchFor('test_failed', '*/*', (event) => {
184
+ const key = `${event.component}:${event.issueType}`
185
+
186
+ if (!failurePatterns.has(key)) {
187
+ failurePatterns.set(key, { count: 0, timestamps: [] })
188
+ }
189
+
190
+ const pattern = failurePatterns.get(key)
191
+ pattern.count++
192
+ pattern.timestamps.push(Date.now())
193
+
194
+ // If same issue fails 3+ times: Recommend process improvement
195
+ if (pattern.count >= 3) {
196
+ emit('prevention_recommendation', {
197
+ issue: event.issueType,
198
+ occurrences: pattern.count,
199
+ recommendation: `Consider adding automated check to prevent ${event.issueType} failures`,
200
+ severity: 'high'
201
+ })
202
+ }
203
+ })
204
+ ```
205
+
206
+ ### Rapid Solution Proposal
207
+ Propose fixes within 10 minutes of failure detection:
208
+
209
+ ```typescript
210
+ async function proposeSolution(analysis, failureEvent) {
211
+ // Step 1: Check if similar issue was fixed before (knowledge search)
212
+ const priorSolution = await searchKnowledge(analysis.errorPattern)
213
+ if (priorSolution) {
214
+ return {
215
+ fix: priorSolution.solution,
216
+ filePath: priorSolution.filePath,
217
+ confidence: 'high',
218
+ estimatedMinutes: 5
219
+ }
220
+ }
221
+
222
+ // Step 2: Deep analysis for new issue (ultrathink mode)
223
+ const deepAnalysis = await ultrathinkAnalysis(failureEvent)
224
+
225
+ return {
226
+ fix: deepAnalysis.proposedFix,
227
+ filePath: deepAnalysis.fileToModify,
228
+ confidence: 'medium',
229
+ estimatedMinutes: deepAnalysis.fixComplexity
230
+ }
231
+ }
232
+ ```
233
+
234
+ ### Capture Lessons Learned
235
+ When fix is complete, automatically extract and store lesson:
236
+
237
+ ```typescript
238
+ // Watch for successful fixes
239
+ watchFor('fix_complete', 'backend/*|frontend/*|quality/*', async (event) => {
240
+ // Extract lesson from the fix
241
+ const lesson = {
242
+ issue: event.originalFailure.issue,
243
+ rootCause: event.analysis.rootCause,
244
+ solution: event.fixApplied,
245
+ prevention: `Always ${generatePrevention(event)}`,
246
+ component: event.component,
247
+ fixedAt: Date.now()
248
+ }
249
+
250
+ // Create knowledge entry
251
+ const embedding = await generateEmbedding(JSON.stringify(lesson))
252
+
253
+ emit('lesson_learned_captured', {
254
+ lesson,
255
+ embedding,
256
+ labels: ['lessons_learned', `component:${event.component}`, `issue:${event.issue}`],
257
+ searchable: true
258
+ })
259
+ })
260
+ ```
261
+
262
+ ### Event Emission for Coordination
263
+
264
+ ```typescript
265
+ // Emit when analysis starts
266
+ emit('problem_analysis_started', {
267
+ timestamp: Date.now(),
268
+ failureEvent: event,
269
+ estimatedAnalysisTime: '10 minutes'
270
+ })
271
+
272
+ // Emit solution proposal
273
+ emit('solution_proposed', {
274
+ timestamp: Date.now(),
275
+ failureId: event.id,
276
+ rootCauseAnalysis: deepAnalysis,
277
+ proposedFix: { code: '', filePath: '', description: '' },
278
+ assignedTo: specialistAgent,
279
+ priority: 'high'
280
+ })
281
+
282
+ // Emit when fix is verified
283
+ emit('fix_verified', {
284
+ timestamp: Date.now(),
285
+ failureId: event.id,
286
+ fixApplied: true,
287
+ testsNowPassing: true,
288
+ lessonsLearned: 1
289
+ })
290
+ ```
291
+
126
292
  ```typescript
127
293
  // Query specialists by role (people are things with type: creator + role)
128
294
  const specialist = await ctx.db
@@ -218,6 +218,133 @@ You are the **Quality Agent**, an intelligence agent responsible for defining wh
218
218
  5. **Update standards** - Evolve acceptance criteria
219
219
  6. **Share learnings** - Add to knowledge base
220
220
 
221
+ ## PARALLEL EXECUTION: New Capability
222
+
223
+ ### Parallel Test Definition
224
+ Once you see `schema_ready` event from agent-backend, define tests for **all dimensions simultaneously**, not sequentially:
225
+
226
+ **Sequential (OLD):**
227
+ ```
228
+ Groups tests (1h) → Things tests (1h) → Connections tests (0.5h) = 2.5h
229
+ ```
230
+
231
+ **Parallel (NEW):**
232
+ ```
233
+ Groups tests (1h) \
234
+ Things tests (1h) → All simultaneous = 1h
235
+ Connections tests (0.5h) /
236
+ ```
237
+
238
+ **How to Parallelize:**
239
+ 1. Watch for `schema_ready` event from agent-backend
240
+ 2. Create separate branch for each entity type's tests
241
+ 3. Define user flows, acceptance criteria, technical tests in parallel
242
+ 4. When ready: merge all test branches
243
+ 5. Emit `tests_ready_for_X` for each dimension as complete
244
+
245
+ ### Continuous Validation (Not All-or-Nothing)
246
+ Validate components **as they complete**, not waiting for all:
247
+
248
+ **Sequential (OLD):**
249
+ ```
250
+ Wait for all implementation → Run all tests at once → Pass/fail
251
+ ```
252
+
253
+ **Parallel (NEW):**
254
+ ```
255
+ Groups implementation done → Test groups immediately
256
+ Things implementation done → Test things immediately
257
+ Connections done → Test connections immediately
258
+ ```
259
+
260
+ **How to Implement:**
261
+ ```typescript
262
+ // Watch for component completion events
263
+ watchFor('mutation_complete', 'backend/*', async (event) => {
264
+ // Component is done, test it immediately
265
+ const results = await runTests(event.service)
266
+ emit('validation_passed_for_' + event.service, results)
267
+ })
268
+
269
+ // As frontend components complete
270
+ watchFor('component_complete', 'frontend/*', async (event) => {
271
+ // Component is done, test it immediately
272
+ const results = await runTests(event.component)
273
+ emit('validation_passed_for_' + event.component, results)
274
+ })
275
+ ```
276
+
277
+ ### Event Emission for Coordination
278
+ Emit events to keep director and other agents informed:
279
+
280
+ ```typescript
281
+ // Emit when you've read schema and are ready to define tests
282
+ emit('schema_understood', {
283
+ timestamp: Date.now(),
284
+ dimensions: ['groups', 'things', 'connections', 'events', 'knowledge'],
285
+ readyToDefineTests: true
286
+ })
287
+
288
+ // Emit as you complete test definitions for each dimension
289
+ emit('tests_ready_for_groups', {
290
+ timestamp: Date.now(),
291
+ userFlows: 5,
292
+ acceptanceCriteria: 12,
293
+ technicalTests: 8
294
+ })
295
+
296
+ emit('tests_ready_for_things', {
297
+ timestamp: Date.now(),
298
+ userFlows: 8,
299
+ acceptanceCriteria: 20,
300
+ technicalTests: 15
301
+ })
302
+
303
+ // Emit as implementations pass validation
304
+ emit('validation_passed_for_groups', {
305
+ component: 'groups',
306
+ testsRun: 8,
307
+ testsPassed: 8,
308
+ testsFailed: 0,
309
+ coverage: 92,
310
+ timestamp: Date.now()
311
+ })
312
+
313
+ // Emit when all validations complete
314
+ emit('quality_check_complete', {
315
+ timestamp: Date.now(),
316
+ status: 'approved', // or 'rejected' if failures
317
+ testsRun: 40,
318
+ testsPassed: 40,
319
+ coverage: 90,
320
+ readyForDocumentation: true
321
+ })
322
+
323
+ // Emit if tests fail (problem-solver monitors this)
324
+ emit('test_failed', {
325
+ timestamp: Date.now(),
326
+ component: 'things_mutations',
327
+ failedTests: 2,
328
+ issue: 'Missing organization validation in create mutation',
329
+ severity: 'high'
330
+ })
331
+ ```
332
+
333
+ ### Watch for Upstream Events
334
+ Only start validation when implementations are ready:
335
+
336
+ ```typescript
337
+ // Don't validate until implementation is done
338
+ watchFor('implementation_complete', 'backend/*', () => {
339
+ // Backend ready, start validation
340
+ })
341
+
342
+ // Don't finalize until all tests pass
343
+ watchFor('fix_complete', 'problem_solver/*', () => {
344
+ // Fix applied, re-run tests
345
+ })
346
+ ```
347
+
221
348
  ## Workflow Integration
222
349
 
223
350
  ### Stage 4: Test Definition (Primary Stage)