oneie 3.6.7 → 3.6.11
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 +83 -0
- package/.claude/agents/agent-designer.md +97 -0
- package/.claude/agents/agent-director.md +118 -7
- package/.claude/agents/agent-documenter.md +93 -0
- package/.claude/agents/agent-frontend.md +96 -0
- package/.claude/agents/agent-ops.md +182 -25
- package/.claude/agents/agent-problem-solver.md +166 -0
- package/.claude/agents/agent-quality.md +127 -0
- package/.claude/commands/build.md +293 -0
- package/.claude/commands/cascade.md +231 -127
- package/.claude/commands/mcp-toggle.md +93 -0
- package/.claude/commands/one.md +198 -116
- package/.claude/commands/plan.md +394 -80
- package/.claude/commands/release.md +41 -19
- package/.claude/commands/server.md +2 -0
- package/.claude/hooks/root-cleanup.py +75 -0
- package/.claude/skills/INDEX.md +523 -0
- package/.claude/skills/REGISTRY.md +529 -0
- package/.claude/skills/agent-backend-create-mutation.md +319 -0
- package/.claude/skills/agent-designer-create-wireframe.md +341 -0
- package/.claude/skills/agent-frontend-create-page.md +413 -0
- package/.claude/skills/agents/README.md +238 -0
- package/dist/clone-web.js +1 -1
- package/dist/clone-web.js.map +1 -1
- package/folders.yaml +1 -1
- package/one/.obsidian/workspace.json +38 -38
- package/one/connections/api/queries-reference.md +842 -0
- package/one/connections/api-reference.md +1011 -0
- package/one/connections/integration-examples.md +875 -0
- package/one/connections/integration-guide.md +869 -0
- package/one/connections/integration-phase2.md +736 -0
- package/one/events/API_ROUTES_FIXES_SUMMARY.md +262 -0
- package/one/events/ASTRO-INTEGRATION-EXAMPLES.md +636 -0
- package/one/events/BEFORE_AFTER_COMPARISON.md +960 -0
- package/one/events/CONNECTIONS_DEMO.md +501 -0
- package/one/events/DELIVERABLES.md +432 -0
- package/one/events/DEMO-GROUPS-PAGE.md +392 -0
- package/one/events/DEMO-TESTING-SUMMARY.md +518 -0
- package/one/events/DEMO_COMPONENTS.md +487 -0
- package/one/events/DEMO_HOOKS_INDEX.md +334 -0
- package/one/events/DEMO_INFRASTRUCTURE.md +905 -0
- package/one/events/DEMO_INFRASTRUCTURE_SUMMARY.md +570 -0
- package/one/events/DEMO_INTEGRATION_CHECKLIST.md +431 -0
- package/one/events/DEMO_QUICK_REFERENCE.md +441 -0
- package/one/events/DEMO_SETUP.md +476 -0
- package/one/events/EFFECT_TS_API_PATTERN.md +478 -0
- package/one/events/GROUPS_DEMO_IMPLEMENTATION.md +414 -0
- package/one/events/HOOKS-DEMO.md +441 -0
- package/one/events/ONTOLOGY-HOOKS-README.md +700 -0
- package/one/events/ONTOLOGY-INTEGRATION-MANIFEST.md +365 -0
- package/one/events/QA-CHECKLIST.md +674 -0
- package/one/events/QUICK-START-ONTOLOGY.md +408 -0
- package/one/events/SEARCH_DEMO_CODE_REFERENCE.md +639 -0
- package/one/events/SEARCH_DEMO_DELIVERY.md +415 -0
- package/one/events/SEARCH_DEMO_SUMMARY.md +303 -0
- package/one/events/SEARCH_DEMO_VISUAL_GUIDE.md +381 -0
- package/one/events/TEST-PLAN-INDEX.md +346 -0
- package/one/events/TEST-PLAN.md +1417 -0
- package/one/events/TESTING-DELIVERY.txt +372 -0
- package/one/events/TRANSITIONS-QUICK-START.md +141 -0
- package/one/events/TYPESCRIPT_FIXES.md +152 -0
- package/one/events/TYPESCRIPT_FIXES_COMPLETE.txt +412 -0
- package/one/events/TYPESCRIPT_FIXES_INDEX.md +341 -0
- package/one/events/VIEW-TRANSITIONS.md +428 -0
- package/one/events/backend-integration-tests.md +606 -0
- package/one/events/backend-structure-diagram.txt +393 -0
- package/one/events/backend-structure-summary.txt +269 -0
- package/one/events/cloudflare-pages-infrastructure-setup.md +264 -0
- package/one/events/convex-analysis-index.md +304 -0
- package/one/events/convex-structure-analysis.md +700 -0
- package/one/events/design-spec-complete.md +208 -0
- package/one/events/ontology-test-examples.md +562 -0
- package/one/events/phase1-backend-implementation-complete.md +518 -0
- package/one/events/test-dashboard.md +345 -0
- package/one/events/test-index.md +361 -0
- package/one/events/test-report-ontology.md +582 -0
- package/one/events/testing-summary.md +344 -0
- package/one/groups/features.md +2878 -0
- package/one/groups/strategy copy.md +869 -0
- package/one/knowledge/backend-api-reference.md +710 -0
- package/one/knowledge/documentation-summary.md +285 -0
- package/one/knowledge/lessons-learned.md +294 -4
- package/one/knowledge/ontology-visual-guide.md +360 -0
- package/one/knowledge/ontology.md +9 -17
- package/one/things/demo-accessibility-animations.md +999 -0
- package/one/things/demo-components.md +1304 -0
- package/one/things/demo-design-summary.md +629 -0
- package/one/things/demo-design-system.md +919 -0
- package/one/things/demo-page-layouts.md +989 -0
- package/one/things/designs/accessibility-audit.md +790 -0
- package/one/things/designs/component-specifications.md +757 -0
- package/one/things/designs/design-overview.md +318 -0
- package/one/things/designs/design-tokens.md +414 -0
- package/one/things/designs/wireframes-dashboard.md +653 -0
- package/one/things/docs/api-requests.md +923 -0
- package/one/things/features/0 All Features.md +2 -0
- package/one/things/implementation/backend-guide.md +412 -0
- package/one/things/plans/2-backend-agnostic-frontend.md +11 -8
- package/one/things/plans/ai-elements.md +1259 -0
- package/one/things/plans/ai-integration.md +947 -0
- package/one/things/plans/ai-sdk.md +761 -0
- package/one/things/plans/app.md +1 -1
- package/one/things/plans/architecture-summary.md +283 -0
- package/one/things/plans/async-ai-agents.md +215 -0
- package/one/things/plans/backend-agnostic-frontend.md +11 -6
- package/one/things/plans/backend-cleanup-quickstart.md +346 -0
- package/one/things/plans/backend-ontology-conformance.md +416 -0
- package/one/things/plans/backend-status.md +541 -0
- package/one/things/plans/backend-structure.md +799 -0
- package/one/things/plans/backend-target-structure.md +438 -0
- package/one/things/plans/backend.md +1133 -0
- package/one/things/plans/better-auth-any-backend.md +11 -11
- package/one/things/plans/cli-updates-required.md +280 -0
- package/one/things/plans/complete-step-by-step.md +1302 -0
- package/one/things/plans/convex-agents.md +1005 -0
- package/one/things/plans/deployment-architecture.md +426 -0
- package/one/things/plans/development-plan.md +1220 -0
- package/one/things/plans/effect.md +808 -48
- package/one/things/plans/integrate-frontend-and-backend.md +579 -0
- package/one/things/plans/mcp-clear-context-prompt.md +60 -0
- package/one/things/plans/mcp-simple.md +228 -0
- package/one/things/plans/one.md +8 -7
- package/one/things/plans/ontology-6-dimensions.md +20 -14
- package/one/things/plans/quick-wins.md +1273 -0
- package/one/things/plans/readme-backend-cleanup.md +361 -0
- package/one/things/plans/separate-demo.md +830 -0
- package/one/things/plans/separate.md +3 -3
- package/one/things/plans/sequence.md +1897 -0
- package/one/things/plans/sync-checklist.md +321 -0
- package/one/things/plans/unified-implementation-plan.md +3 -3
- package/one/things/plans/update-demos.md +513 -0
- package/package.json +1 -1
- package/.claude/agents/backend-specialist.md +0 -169
- package/.claude/agents/designer.md +0 -216
- package/.claude/agents/frontend-specialist.md +0 -236
- package/.claude/commands/done.md +0 -35
- package/.claude/commands/infer.md +0 -138
- package/.claude/commands/next.md +0 -53
- package/.claude/commands/one copy.md +0 -565
- package/.claude/commands/one-template.md +0 -106
- package/.claude/commands/one-v1.md +0 -609
- package/.claude/hooks/__pycache__/knowledge-post.cpython-313.pyc +0 -0
- package/.claude/hooks/__pycache__/knowledge-pre.cpython-313.pyc +0 -0
- package/.claude/hooks/__pycache__/todo.cpython-313.pyc +0 -0
- package/one/groups/nine-padel-customers.md +0 -138
- package/one/groups/nine-padel-data-structure.md +0 -167
- package/one/groups/nine-padel-ontology-specification.md +0 -359
- package/one/groups/nine-padel-ontology.md +0 -143
- package/one/groups/nine-padel-strategy.md +0 -234
- package/one/groups/nine-padel.md +0 -211
- package/one/groups/nine-padle-contents.baked.md +0 -1252
- package/one/groups/nine-padle-contents.md +0 -6
- package/one/things/features/1-1-agent-prompts/design.md +0 -470
- package/one/things/features/1-1-agent-prompts/tests.md +0 -264
- package/one/things/features/1-2-yaml-orchestrator/design.md +0 -497
- package/one/things/features/1-2-yaml-orchestrator/tests.md +0 -227
- package/one/things/features/1-3-event-coordination/design.md +0 -544
- package/one/things/features/1-3-event-coordination/tests.md +0 -223
- package/one/things/features/1-4-knowledge-management/design.md +0 -609
- package/one/things/features/1-4-knowledge-management/tests.md +0 -195
- package/one/things/features/1-5-quality-loops/design.md +0 -797
- package/one/things/features/1-5-quality-loops/tests.md +0 -212
- package/one/things/features/1-6-numbering-structure/design.md +0 -610
- package/one/things/features/1-6-numbering-structure/tests.md +0 -213
- package/one/things/features/dataprovider-interface/1-tests.md +0 -1522
|
@@ -19,6 +19,94 @@ You are the Ops Agent, a DevOps specialist responsible for releasing software, m
|
|
|
19
19
|
- **Version Control:** Manage git workflows, tags, releases
|
|
20
20
|
- **Environment Configuration:** Manage environment variables, secrets, configurations
|
|
21
21
|
|
|
22
|
+
## PARALLEL EXECUTION: New Capability
|
|
23
|
+
|
|
24
|
+
### Early Infrastructure Setup
|
|
25
|
+
Start setting up deployment infrastructure during Phase 1, not waiting until Phase 5:
|
|
26
|
+
|
|
27
|
+
**Sequential (OLD):**
|
|
28
|
+
```
|
|
29
|
+
Phase 1-4: Development (4 weeks)
|
|
30
|
+
Phase 5: Setup staging, deploy (1 week) - BLOCKING
|
|
31
|
+
Total: 5 weeks
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
**Parallel (NEW):**
|
|
35
|
+
```
|
|
36
|
+
Phase 1: Development + Staging setup (simultaneous) = 2 weeks
|
|
37
|
+
Phase 2-4: Development + Monitoring setup (simultaneous) = 2 weeks
|
|
38
|
+
Phase 5: Production deployment (1 week)
|
|
39
|
+
Total: 5 weeks (same time, but deployment ready early)
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
**How to Parallelize:**
|
|
43
|
+
1. During Phase 1 (backend): Set up staging environment on Cloudflare Pages
|
|
44
|
+
2. During Phase 2 (integration): Test deployment pipeline with sample app
|
|
45
|
+
3. During Phase 3 (system test): Deploy test app to staging, validate pipeline
|
|
46
|
+
4. During Phase 4 (features): Set up production monitoring and alerting
|
|
47
|
+
5. Phase 5: Actual production deployment (just execute pre-tested process)
|
|
48
|
+
|
|
49
|
+
### Event Emission for Coordination
|
|
50
|
+
Emit events so agent-director knows infrastructure is ready:
|
|
51
|
+
|
|
52
|
+
```typescript
|
|
53
|
+
// Emit when staging environment is ready
|
|
54
|
+
emit('staging_ready', {
|
|
55
|
+
timestamp: Date.now(),
|
|
56
|
+
environment: 'cloudflare-pages-staging',
|
|
57
|
+
domain: 'staging.one.ie',
|
|
58
|
+
deploymentCommand: 'wrangler pages deploy ./dist --project-name=web',
|
|
59
|
+
readyForDeployment: true
|
|
60
|
+
})
|
|
61
|
+
|
|
62
|
+
// Emit when deployment pipeline is validated
|
|
63
|
+
emit('deployment_pipeline_ready', {
|
|
64
|
+
timestamp: Date.now(),
|
|
65
|
+
pipeline: 'ci-cd-validated',
|
|
66
|
+
testDeploymentStatus: 'success',
|
|
67
|
+
estimatedDeploymentTime: '5 minutes'
|
|
68
|
+
})
|
|
69
|
+
|
|
70
|
+
// Emit when monitoring is set up
|
|
71
|
+
emit('monitoring_configured', {
|
|
72
|
+
timestamp: Date.now(),
|
|
73
|
+
metrics: ['lighthouse_score', 'api_latency', 'error_rate'],
|
|
74
|
+
alertsConfigured: true,
|
|
75
|
+
dashboardUrl: 'https://monitoring.one.ie/prod'
|
|
76
|
+
})
|
|
77
|
+
|
|
78
|
+
// Emit when production is ready for deployment
|
|
79
|
+
emit('production_ready', {
|
|
80
|
+
timestamp: Date.now(),
|
|
81
|
+
passedGates: [
|
|
82
|
+
'quality_approved',
|
|
83
|
+
'staging_validated',
|
|
84
|
+
'monitoring_ready',
|
|
85
|
+
'rollback_plan'
|
|
86
|
+
],
|
|
87
|
+
canDeployToProd: true
|
|
88
|
+
})
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Watch for Upstream Events
|
|
92
|
+
Only deploy when quality approves:
|
|
93
|
+
|
|
94
|
+
```typescript
|
|
95
|
+
// Don't deploy to staging until Phase 1 complete
|
|
96
|
+
watchFor('implementation_complete', 'backend/*', () => {
|
|
97
|
+
// Backend complete, deploy to staging for testing
|
|
98
|
+
deployToStaging()
|
|
99
|
+
})
|
|
100
|
+
|
|
101
|
+
// Don't deploy to production until quality approves
|
|
102
|
+
watchFor('quality_check_complete', 'quality/*', (event) => {
|
|
103
|
+
if (event.status === 'approved') {
|
|
104
|
+
// All tests pass, safe to deploy
|
|
105
|
+
deployToProduction()
|
|
106
|
+
}
|
|
107
|
+
})
|
|
108
|
+
```
|
|
109
|
+
|
|
22
110
|
## Ontology Mapping
|
|
23
111
|
|
|
24
112
|
You operate as an `operations_agent` thing with these properties:
|
|
@@ -177,38 +265,70 @@ git push origin main
|
|
|
177
265
|
|
|
178
266
|
**Primary Script:**
|
|
179
267
|
```bash
|
|
180
|
-
./scripts/release.sh [major|minor|patch]
|
|
268
|
+
./scripts/release.sh [major|minor|patch] [target]
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
**Target Options:**
|
|
272
|
+
- `main` - Deploy to one.ie only (main site)
|
|
273
|
+
- `demo` - Deploy to demo.one.ie only (demo/starter)
|
|
274
|
+
- `both` - Deploy to both (default)
|
|
275
|
+
|
|
276
|
+
**Examples:**
|
|
277
|
+
```bash
|
|
278
|
+
./scripts/release.sh patch main # Deploy main site only
|
|
279
|
+
./scripts/release.sh patch demo # Deploy demo site only
|
|
280
|
+
./scripts/release.sh patch # Deploy both sites
|
|
181
281
|
```
|
|
182
282
|
|
|
183
283
|
**What it does:**
|
|
184
284
|
1. Pre-flight validation (repos, files, structure)
|
|
185
285
|
2. Push core repos (one, web, backend)
|
|
186
|
-
3. Sync documentation (518+ files to cli/ and
|
|
187
|
-
4. Version bump (cli/package.json
|
|
188
|
-
5.
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
286
|
+
3. Sync documentation (518+ files to cli/ and target repos)
|
|
287
|
+
4. Version bump (cli/package.json)
|
|
288
|
+
5. Sync to deployment targets based on TARGET parameter:
|
|
289
|
+
- **main:** `/web` + `/one` + `/.claude` → `apps/oneie/`
|
|
290
|
+
- **demo:** `/web` + `/one` + `/.claude` → `apps/one/`
|
|
291
|
+
- **both:** Sync to both targets
|
|
292
|
+
6. Copy environment files:
|
|
293
|
+
- `web/.env.main` → `apps/oneie/web/.env.local`
|
|
294
|
+
- `web/.env.demo` → `apps/one/web/.env.local`
|
|
295
|
+
7. Update READMEs
|
|
296
|
+
8. Git status summary
|
|
297
|
+
9. Commit & push CLI to one-ie/cli
|
|
298
|
+
10. **AUTOMATICALLY** commit & push targets:
|
|
299
|
+
- `apps/oneie/` → `one-ie/oneie`
|
|
300
|
+
- `apps/one/` → `one-ie/one`
|
|
301
|
+
11. npm publish instructions (manual)
|
|
302
|
+
12. Build and deploy to Cloudflare Pages:
|
|
303
|
+
- oneie project → one.ie
|
|
304
|
+
- one project → demo.one.ie
|
|
195
305
|
|
|
196
306
|
**Files Synced:**
|
|
197
|
-
- `/one/*` → `cli/one/` and `apps/
|
|
198
|
-
- `/.claude/*` → `cli/.claude/` and `apps/
|
|
199
|
-
- `/web/*` → `apps/
|
|
307
|
+
- `/one/*` → `cli/one/` and `apps/{target}/one/`
|
|
308
|
+
- `/.claude/*` → `cli/.claude/` and `apps/{target}/one/.claude/`
|
|
309
|
+
- `/web/*` → `apps/{target}/web/` (rsync)
|
|
200
310
|
- `CLAUDE.md`, `README.md`, `LICENSE.md`, `SECURITY.md` → all targets
|
|
201
|
-
- `web/AGENTS.md` → `apps/
|
|
311
|
+
- `web/AGENTS.md` → `apps/{target}/one/AGENTS.md`
|
|
312
|
+
- `web/.env.{target}` → `apps/{target}/web/.env.local`
|
|
202
313
|
|
|
203
314
|
### 5. Slash Commands
|
|
204
315
|
|
|
205
316
|
**/release** - Execute full release process
|
|
206
317
|
```bash
|
|
207
|
-
/release major #
|
|
208
|
-
/release minor #
|
|
209
|
-
/release patch
|
|
318
|
+
/release major main # Main site only (2.0.10 → 3.0.0)
|
|
319
|
+
/release minor demo # Demo site only (2.0.10 → 2.1.0)
|
|
320
|
+
/release patch # Both sites (2.0.10 → 2.0.11)
|
|
210
321
|
```
|
|
211
322
|
|
|
323
|
+
**Multi-Site Deployment:**
|
|
324
|
+
- **Main Site (oneie):** https://one.ie - Full platform with backend
|
|
325
|
+
- **Demo Site (one):** https://demo.one.ie - Starter template (frontend-only)
|
|
326
|
+
- **Repos:**
|
|
327
|
+
- `one-ie/oneie` → one.ie (main site)
|
|
328
|
+
- `one-ie/one` → demo.one.ie + npx oneie (demo/starter)
|
|
329
|
+
- `one-ie/web` → single source of truth (website code)
|
|
330
|
+
- `one-ie/cli` → npm package
|
|
331
|
+
|
|
212
332
|
## Decision Framework
|
|
213
333
|
|
|
214
334
|
### Release Readiness
|
|
@@ -284,27 +404,64 @@ npx oneie@latest --version
|
|
|
284
404
|
|
|
285
405
|
### 2. Domain Management
|
|
286
406
|
|
|
407
|
+
**Current Architecture:**
|
|
408
|
+
- **oneie project** → one.ie (main site)
|
|
409
|
+
- **one project** → demo.one.ie (demo/starter)
|
|
410
|
+
|
|
287
411
|
**Add Custom Domain:**
|
|
288
412
|
```bash
|
|
289
413
|
# Using Cloudflare API
|
|
290
|
-
ACCOUNT_ID=
|
|
291
|
-
|
|
292
|
-
|
|
414
|
+
ACCOUNT_ID=$(grep CLOUDFLARE_ACCOUNT_ID .env | cut -d'=' -f2)
|
|
415
|
+
API_KEY=$(grep CLOUDFLARE_GLOBAL_API_KEY .env | cut -d'=' -f2)
|
|
416
|
+
EMAIL=$(grep CLOUDFLARE_EMAIL .env | cut -d'=' -f2)
|
|
293
417
|
|
|
418
|
+
# Add domain to oneie project (one.ie)
|
|
294
419
|
curl -X POST \
|
|
295
|
-
"https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/pages/projects
|
|
296
|
-
-H "
|
|
420
|
+
"https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/pages/projects/oneie/domains" \
|
|
421
|
+
-H "X-Auth-Email: $EMAIL" \
|
|
422
|
+
-H "X-Auth-Key: $API_KEY" \
|
|
423
|
+
-H "Content-Type: application/json" \
|
|
424
|
+
--data '{"name":"one.ie"}'
|
|
425
|
+
|
|
426
|
+
# Add domain to one project (demo.one.ie)
|
|
427
|
+
curl -X POST \
|
|
428
|
+
"https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/pages/projects/one/domains" \
|
|
429
|
+
-H "X-Auth-Email: $EMAIL" \
|
|
430
|
+
-H "X-Auth-Key: $API_KEY" \
|
|
297
431
|
-H "Content-Type: application/json" \
|
|
298
|
-
--data
|
|
432
|
+
--data '{"name":"demo.one.ie"}'
|
|
299
433
|
```
|
|
300
434
|
|
|
301
435
|
**Remove Domain:**
|
|
302
436
|
```bash
|
|
303
437
|
curl -X DELETE \
|
|
304
|
-
"https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/pages/projects
|
|
305
|
-
-H "
|
|
438
|
+
"https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/pages/projects/oneie/domains/one.ie" \
|
|
439
|
+
-H "X-Auth-Email: $EMAIL" \
|
|
440
|
+
-H "X-Auth-Key: $API_KEY"
|
|
306
441
|
```
|
|
307
442
|
|
|
443
|
+
**Setup Cloudflare Pages Projects:**
|
|
444
|
+
|
|
445
|
+
Use agent-ops to create both projects and configure domains:
|
|
446
|
+
|
|
447
|
+
1. **Create oneie project** (main site):
|
|
448
|
+
```bash
|
|
449
|
+
wrangler pages project create oneie
|
|
450
|
+
```
|
|
451
|
+
|
|
452
|
+
2. **Create one project** (demo):
|
|
453
|
+
```bash
|
|
454
|
+
wrangler pages project create one
|
|
455
|
+
```
|
|
456
|
+
|
|
457
|
+
3. **Add custom domains via Cloudflare API** (as shown above)
|
|
458
|
+
|
|
459
|
+
4. **Verify DNS propagation:**
|
|
460
|
+
```bash
|
|
461
|
+
dig one.ie +short
|
|
462
|
+
dig demo.one.ie +short
|
|
463
|
+
```
|
|
464
|
+
|
|
308
465
|
### 3. Environment Configuration
|
|
309
466
|
|
|
310
467
|
**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)
|