opencode-orchestrator 0.9.1 → 0.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -77,7 +77,9 @@ var PATHS = {
|
|
|
77
77
|
WORK_LOG: ".opencode/work-log.md",
|
|
78
78
|
UNIT_TESTS: ".opencode/unit-tests",
|
|
79
79
|
SYNC_ISSUES: ".opencode/sync-issues.md",
|
|
80
|
-
INTEGRATION_STATUS: ".opencode/integration-status.md"
|
|
80
|
+
INTEGRATION_STATUS: ".opencode/integration-status.md",
|
|
81
|
+
// Progress tracking
|
|
82
|
+
STATUS: ".opencode/status.md"
|
|
81
83
|
};
|
|
82
84
|
|
|
83
85
|
// src/shared/core/constants/memory-limits.ts
|
|
@@ -417,6 +419,21 @@ var WORK_STATUS = {
|
|
|
417
419
|
FAIL: "FAIL",
|
|
418
420
|
SKIP: "SKIP"
|
|
419
421
|
},
|
|
422
|
+
// E2E integration test status
|
|
423
|
+
E2E_STATUS: {
|
|
424
|
+
NOT_STARTED: "NOT_STARTED",
|
|
425
|
+
RUNNING: "RUNNING",
|
|
426
|
+
PASS: "PASS",
|
|
427
|
+
FAIL: "FAIL"
|
|
428
|
+
},
|
|
429
|
+
// Mission phase
|
|
430
|
+
PHASE: {
|
|
431
|
+
PLANNING: "PLANNING",
|
|
432
|
+
IMPLEMENTATION: "IMPLEMENTATION",
|
|
433
|
+
E2E: "E2E",
|
|
434
|
+
FIXING: "FIXING",
|
|
435
|
+
SEALING: "SEALING"
|
|
436
|
+
},
|
|
420
437
|
// Issue severity
|
|
421
438
|
SEVERITY: {
|
|
422
439
|
HIGH: "HIGH",
|
|
@@ -13288,83 +13305,102 @@ var COMMANDER_LOOP_CONTINUATION = `${PROMPT_TAGS.LOOP_CONTINUATION.open}
|
|
|
13288
13305
|
|
|
13289
13306
|
At the START of each loop iteration, Commander MUST read shared state:
|
|
13290
13307
|
|
|
13291
|
-
### Step 1: Read
|
|
13308
|
+
### Step 1: Read Status Summary
|
|
13292
13309
|
\`\`\`bash
|
|
13293
|
-
cat ${PATHS.
|
|
13310
|
+
cat ${PATHS.STATUS} 2>/dev/null || echo "No status yet"
|
|
13294
13311
|
cat ${PATHS.TODO}
|
|
13312
|
+
cat ${PATHS.SYNC_ISSUES} 2>/dev/null || echo "No sync issues"
|
|
13295
13313
|
\`\`\`
|
|
13296
13314
|
|
|
13297
|
-
|
|
13298
|
-
|
|
13299
|
-
|
|
13315
|
+
---
|
|
13316
|
+
|
|
13317
|
+
## \u{1F4CA} STATUS TRACKING
|
|
13318
|
+
|
|
13319
|
+
Commander updates ${PATHS.STATUS} each loop:
|
|
13320
|
+
\`\`\`markdown
|
|
13321
|
+
# Mission Status
|
|
13322
|
+
|
|
13323
|
+
## Progress
|
|
13324
|
+
- TODO: 8/10 (80%)
|
|
13325
|
+
- Issues: 2 unresolved
|
|
13326
|
+
- Workers: 3 active
|
|
13327
|
+
- E2E: ${WORK_STATUS.E2E_STATUS.NOT_STARTED} | ${WORK_STATUS.E2E_STATUS.RUNNING} | ${WORK_STATUS.E2E_STATUS.PASS} | ${WORK_STATUS.E2E_STATUS.FAIL}
|
|
13328
|
+
|
|
13329
|
+
## Current Phase
|
|
13330
|
+
${WORK_STATUS.PHASE.PLANNING} | ${WORK_STATUS.PHASE.IMPLEMENTATION} | ${WORK_STATUS.PHASE.E2E} | ${WORK_STATUS.PHASE.FIXING} | ${WORK_STATUS.PHASE.SEALING}
|
|
13331
|
+
|
|
13332
|
+
## Next Action
|
|
13333
|
+
[Brief description]
|
|
13334
|
+
|
|
13335
|
+
## Blockers
|
|
13336
|
+
- [List or "None"]
|
|
13300
13337
|
\`\`\`
|
|
13301
13338
|
|
|
13339
|
+
### Status Rules:
|
|
13340
|
+
- Update EVERY loop iteration
|
|
13341
|
+
- Keep it minimal (just the numbers)
|
|
13342
|
+
- Planner reads this to stay synced
|
|
13343
|
+
- Delete old content, keep only current state
|
|
13344
|
+
|
|
13302
13345
|
---
|
|
13303
13346
|
|
|
13304
13347
|
## \u26A0\uFE0F SEALED CONDITIONS (CRITICAL!)
|
|
13305
13348
|
|
|
13306
13349
|
### SEALED = BOTH must be true:
|
|
13307
13350
|
\`\`\`
|
|
13308
|
-
\u2705 TODO: ALL items [x]
|
|
13309
|
-
\u2705 sync-issues: EMPTY (
|
|
13351
|
+
\u2705 TODO: ALL items [x] (100%)
|
|
13352
|
+
\u2705 sync-issues: EMPTY (0 issues)
|
|
13310
13353
|
\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
13311
13354
|
ONLY THEN \u2192 output <mission_seal>SEALED</mission_seal>
|
|
13312
13355
|
\`\`\`
|
|
13313
13356
|
|
|
13314
13357
|
### LOOP BACK = ANY of these:
|
|
13315
13358
|
\`\`\`
|
|
13316
|
-
\u274C TODO
|
|
13317
|
-
\u274C
|
|
13359
|
+
\u274C TODO < 100% \u2192 LOOP
|
|
13360
|
+
\u274C Issues > 0 \u2192 LOOP
|
|
13318
13361
|
\u274C Build fails \u2192 LOOP
|
|
13319
|
-
\u274C E2E
|
|
13362
|
+
\u274C E2E = ${WORK_STATUS.E2E_STATUS.FAIL} \u2192 LOOP
|
|
13320
13363
|
\`\`\`
|
|
13321
13364
|
|
|
13322
13365
|
### \u26D4 NEVER SEAL IF:
|
|
13323
|
-
- TODO is
|
|
13366
|
+
- TODO is 100% BUT issues > 0
|
|
13324
13367
|
- Workers are still active
|
|
13325
|
-
-
|
|
13368
|
+
- E2E = ${WORK_STATUS.E2E_STATUS.FAIL}
|
|
13326
13369
|
|
|
13327
13370
|
---
|
|
13328
13371
|
|
|
13329
13372
|
## \u{1F504} E2E Test Timing
|
|
13330
13373
|
|
|
13331
|
-
E2E
|
|
13332
|
-
-
|
|
13333
|
-
- E2E runs **parallel** with remaining
|
|
13334
|
-
- If E2E
|
|
13335
|
-
-
|
|
13374
|
+
E2E starts when **TODO \u2265 80%** (not at 100%):
|
|
13375
|
+
- Phase changes to ${WORK_STATUS.PHASE.E2E}
|
|
13376
|
+
- E2E runs **parallel** with remaining work
|
|
13377
|
+
- If E2E ${WORK_STATUS.E2E_STATUS.FAIL} \u2192 issues++ \u2192 continue TODO
|
|
13378
|
+
- Both TODO 100% AND issues 0 \u2192 ${WORK_STATUS.PHASE.SEALING}
|
|
13336
13379
|
|
|
13337
13380
|
\`\`\`
|
|
13338
|
-
|
|
13339
|
-
|
|
13340
|
-
|
|
13341
|
-
|
|
13342
|
-
|
|
13343
|
-
Both must complete cleanly \u2192 SEALED
|
|
13381
|
+
[---TODO progress---][E2E starts ~80%]
|
|
13382
|
+
\u2193
|
|
13383
|
+
TODO + E2E run parallel
|
|
13384
|
+
\u2193
|
|
13385
|
+
TODO 100% + Issues 0 \u2192 SEALED
|
|
13344
13386
|
\`\`\`
|
|
13345
13387
|
|
|
13346
13388
|
---
|
|
13347
13389
|
|
|
13348
13390
|
### Decision Matrix
|
|
13349
13391
|
|
|
13350
|
-
| TODO |
|
|
13351
|
-
|
|
13352
|
-
|
|
|
13353
|
-
|
|
|
13354
|
-
|
|
|
13355
|
-
|
|
13356
|
-
### File-Level Task Assignment
|
|
13357
|
-
Each ${AGENT_NAMES.WORKER} gets ONE file for isolation:
|
|
13358
|
-
\`\`\`
|
|
13359
|
-
delegate_task(file:src/auth/login.ts, ${AGENT_NAMES.WORKER}, background: true)
|
|
13360
|
-
delegate_task(file:src/auth/logout.ts, ${AGENT_NAMES.WORKER}, background: true)
|
|
13361
|
-
\`\`\`
|
|
13392
|
+
| TODO % | Issues | Phase |
|
|
13393
|
+
|--------|--------|-------|
|
|
13394
|
+
| < 100% | Any | ${WORK_STATUS.PHASE.IMPLEMENTATION} |
|
|
13395
|
+
| \u2265 80% | Any | ${WORK_STATUS.PHASE.E2E} (parallel) |
|
|
13396
|
+
| 100% | > 0 | ${WORK_STATUS.PHASE.FIXING} |
|
|
13397
|
+
| 100% | 0 | ${WORK_STATUS.PHASE.SEALING} \u2705 |
|
|
13362
13398
|
|
|
13363
13399
|
### CRITICAL RULES:
|
|
13364
|
-
-
|
|
13365
|
-
-
|
|
13366
|
-
- NEVER seal with
|
|
13367
|
-
- E2E starts
|
|
13400
|
+
- Update ${PATHS.STATUS} every loop
|
|
13401
|
+
- Planner keeps docs minimal
|
|
13402
|
+
- NEVER seal with issues > 0
|
|
13403
|
+
- E2E starts at ~80%, runs parallel
|
|
13368
13404
|
${PROMPT_TAGS.LOOP_CONTINUATION.close}`;
|
|
13369
13405
|
|
|
13370
13406
|
// src/agents/prompts/commander/sync-handling.ts
|
|
@@ -13629,47 +13665,59 @@ ${PROMPT_TAGS.FILE_LEVEL_PLANNING.close}`;
|
|
|
13629
13665
|
|
|
13630
13666
|
// src/agents/prompts/planner/todo-sync.ts
|
|
13631
13667
|
var PLANNER_TODO_SYNC = `${PROMPT_TAGS.TODO_SYNC.open}
|
|
13632
|
-
## TODO SYNC
|
|
13668
|
+
## TODO SYNC & DOCUMENT MAINTENANCE
|
|
13633
13669
|
|
|
13634
|
-
When ${AGENT_NAMES.COMMANDER} detects sync issues, you update
|
|
13670
|
+
When ${AGENT_NAMES.COMMANDER} detects sync issues, you update TODO and maintain docs.
|
|
13635
13671
|
|
|
13636
13672
|
### Step 1: Read Current State
|
|
13637
13673
|
\`\`\`bash
|
|
13638
|
-
cat ${PATHS.
|
|
13639
|
-
cat ${PATHS.
|
|
13640
|
-
cat ${PATHS.TODO}
|
|
13674
|
+
cat ${PATHS.STATUS} # Current progress %
|
|
13675
|
+
cat ${PATHS.SYNC_ISSUES} # Unresolved issues
|
|
13676
|
+
cat ${PATHS.TODO} # Task list
|
|
13641
13677
|
\`\`\`
|
|
13642
13678
|
|
|
13643
|
-
### Step 2:
|
|
13644
|
-
Commander will tell you:
|
|
13645
|
-
- Which files need rework
|
|
13646
|
-
- What sync issues to fix
|
|
13647
|
-
- New dependencies discovered
|
|
13648
|
-
|
|
13649
|
-
### Step 3: Update TODO
|
|
13679
|
+
### Step 2: Add Fix Tasks
|
|
13650
13680
|
Add NEW subtasks for sync fixes:
|
|
13651
|
-
|
|
13652
13681
|
\`\`\`markdown
|
|
13653
|
-
### T3: Sync Fixes | parallel-group:3
|
|
13654
|
-
- [ ] S3.1: ${WORK_STATUS.ACTION.FIX} \`src/auth/login.ts\` |
|
|
13655
|
-
- [ ] S3.2: ${WORK_STATUS.ACTION.FIX} \`src/api/users.ts\` |
|
|
13682
|
+
### T3: Sync Fixes | parallel-group:3
|
|
13683
|
+
- [ ] S3.1: ${WORK_STATUS.ACTION.FIX} \`src/auth/login.ts\` | issue:${ID_PREFIX.SYNC_ISSUE}1
|
|
13684
|
+
- [ ] S3.2: ${WORK_STATUS.ACTION.FIX} \`src/api/users.ts\` | issue:${ID_PREFIX.SYNC_ISSUE}1
|
|
13656
13685
|
\`\`\`
|
|
13657
13686
|
|
|
13658
|
-
|
|
13659
|
-
\`\`\`markdown
|
|
13660
|
-
| src/auth/login.ts | ${WORK_STATUS.ACTION.FIX} | ${WORK_STATUS.STATUS.PENDING} | - | - | - | ${ID_PREFIX.SYNC_ISSUE}1 |
|
|
13661
|
-
\`\`\`
|
|
13687
|
+
---
|
|
13662
13688
|
|
|
13663
|
-
|
|
13664
|
-
|
|
13665
|
-
|
|
13666
|
-
|
|
13689
|
+
## \u{1F4CB} DOCUMENT MAINTENANCE RULES
|
|
13690
|
+
|
|
13691
|
+
### Keep .opencode/ Minimal:
|
|
13692
|
+
| File | Rule |
|
|
13693
|
+
|------|------|
|
|
13694
|
+
| ${PATHS.STATUS} | Overwrite each loop (no history) |
|
|
13695
|
+
| ${PATHS.TODO} | Keep only uncompleted tasks |
|
|
13696
|
+
| ${PATHS.SYNC_ISSUES} | Delete resolved issues immediately |
|
|
13697
|
+
| ${PATHS.WORK_LOG} | Archive completed, keep active only |
|
|
13698
|
+
|
|
13699
|
+
### Summarize & Clean:
|
|
13700
|
+
- **Completed tasks**: Move to archive or delete
|
|
13701
|
+
- **Resolved issues**: DELETE from sync-issues.md
|
|
13702
|
+
- **Old status**: Overwrite with current (no append)
|
|
13703
|
+
- **Long descriptions**: Summarize to 1-2 lines
|
|
13704
|
+
|
|
13705
|
+
### What to DELETE:
|
|
13706
|
+
- Resolved sync issues
|
|
13707
|
+
- Completed TODO items (mark [x] first, then remove in next cycle)
|
|
13708
|
+
- Old status updates
|
|
13709
|
+
- Verbose explanations
|
|
13710
|
+
|
|
13711
|
+
### What to KEEP:
|
|
13712
|
+
- Active/pending tasks
|
|
13713
|
+
- Unresolved issues
|
|
13714
|
+
- Current phase info
|
|
13715
|
+
- Blockers
|
|
13667
13716
|
|
|
13668
13717
|
### CRITICAL:
|
|
13669
|
-
-
|
|
13670
|
-
-
|
|
13671
|
-
-
|
|
13672
|
-
- Commander reads your updates in next loop
|
|
13718
|
+
- Commander should NOT see old/resolved content
|
|
13719
|
+
- Only current state matters
|
|
13720
|
+
- Less context = faster decisions
|
|
13673
13721
|
${PROMPT_TAGS.TODO_SYNC.close}`;
|
|
13674
13722
|
|
|
13675
13723
|
// src/agents/prompts/worker/role.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Work Status Constants
|
|
3
3
|
*
|
|
4
|
-
* All status values used in work-log.md, todo.md, sync-issues.md.
|
|
4
|
+
* All status values used in work-log.md, todo.md, sync-issues.md, status.md.
|
|
5
5
|
*/
|
|
6
6
|
export declare const WORK_STATUS: {
|
|
7
7
|
readonly ACTION: {
|
|
@@ -21,6 +21,19 @@ export declare const WORK_STATUS: {
|
|
|
21
21
|
readonly FAIL: "FAIL";
|
|
22
22
|
readonly SKIP: "SKIP";
|
|
23
23
|
};
|
|
24
|
+
readonly E2E_STATUS: {
|
|
25
|
+
readonly NOT_STARTED: "NOT_STARTED";
|
|
26
|
+
readonly RUNNING: "RUNNING";
|
|
27
|
+
readonly PASS: "PASS";
|
|
28
|
+
readonly FAIL: "FAIL";
|
|
29
|
+
};
|
|
30
|
+
readonly PHASE: {
|
|
31
|
+
readonly PLANNING: "PLANNING";
|
|
32
|
+
readonly IMPLEMENTATION: "IMPLEMENTATION";
|
|
33
|
+
readonly E2E: "E2E";
|
|
34
|
+
readonly FIXING: "FIXING";
|
|
35
|
+
readonly SEALING: "SEALING";
|
|
36
|
+
};
|
|
24
37
|
readonly SEVERITY: {
|
|
25
38
|
readonly HIGH: "HIGH";
|
|
26
39
|
readonly MEDIUM: "MEDIUM";
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "opencode-orchestrator",
|
|
3
3
|
"displayName": "OpenCode Orchestrator",
|
|
4
4
|
"description": "Distributed Cognitive Architecture for OpenCode. Turns simple prompts into specialized multi-agent workflows (Planner, Coder, Reviewer).",
|
|
5
|
-
"version": "0.9.
|
|
5
|
+
"version": "0.9.3",
|
|
6
6
|
"author": "agnusdei1207",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"repository": {
|