opencode-orchestrator 0.9.1 → 0.9.2
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
|
|
@@ -13288,83 +13290,100 @@ var COMMANDER_LOOP_CONTINUATION = `${PROMPT_TAGS.LOOP_CONTINUATION.open}
|
|
|
13288
13290
|
|
|
13289
13291
|
At the START of each loop iteration, Commander MUST read shared state:
|
|
13290
13292
|
|
|
13291
|
-
### Step 1: Read
|
|
13293
|
+
### Step 1: Read Status Summary
|
|
13292
13294
|
\`\`\`bash
|
|
13293
|
-
cat ${PATHS.
|
|
13295
|
+
cat ${PATHS.STATUS} 2>/dev/null || echo "No status yet"
|
|
13294
13296
|
cat ${PATHS.TODO}
|
|
13297
|
+
cat ${PATHS.SYNC_ISSUES} 2>/dev/null || echo "No sync issues"
|
|
13295
13298
|
\`\`\`
|
|
13296
13299
|
|
|
13297
|
-
|
|
13298
|
-
|
|
13299
|
-
|
|
13300
|
+
---
|
|
13301
|
+
|
|
13302
|
+
## \u{1F4CA} STATUS TRACKING
|
|
13303
|
+
|
|
13304
|
+
Commander updates ${PATHS.STATUS} each loop:
|
|
13305
|
+
\`\`\`markdown
|
|
13306
|
+
# Mission Status
|
|
13307
|
+
|
|
13308
|
+
## Progress
|
|
13309
|
+
- TODO: 8/10 (80%)
|
|
13310
|
+
- Issues: 2 unresolved
|
|
13311
|
+
- Workers: 3 active
|
|
13312
|
+
- E2E: Not started / Running / PASS / FAIL
|
|
13313
|
+
|
|
13314
|
+
## Current Phase
|
|
13315
|
+
[PLANNING / IMPLEMENTATION / E2E / FIXING / SEALING]
|
|
13316
|
+
|
|
13317
|
+
## Next Action
|
|
13318
|
+
[Brief description of next step]
|
|
13319
|
+
|
|
13320
|
+
## Blockers
|
|
13321
|
+
- [List any blockers, or "None"]
|
|
13300
13322
|
\`\`\`
|
|
13301
13323
|
|
|
13324
|
+
### Status Rules:
|
|
13325
|
+
- Update EVERY loop iteration
|
|
13326
|
+
- Keep it minimal (just the numbers)
|
|
13327
|
+
- Planner reads this to stay synced
|
|
13328
|
+
- Delete old content, keep only current state
|
|
13329
|
+
|
|
13302
13330
|
---
|
|
13303
13331
|
|
|
13304
13332
|
## \u26A0\uFE0F SEALED CONDITIONS (CRITICAL!)
|
|
13305
13333
|
|
|
13306
13334
|
### SEALED = BOTH must be true:
|
|
13307
13335
|
\`\`\`
|
|
13308
|
-
\u2705 TODO: ALL items [x]
|
|
13309
|
-
\u2705 sync-issues: EMPTY (
|
|
13336
|
+
\u2705 TODO: ALL items [x] (100%)
|
|
13337
|
+
\u2705 sync-issues: EMPTY (0 issues)
|
|
13310
13338
|
\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
13339
|
ONLY THEN \u2192 output <mission_seal>SEALED</mission_seal>
|
|
13312
13340
|
\`\`\`
|
|
13313
13341
|
|
|
13314
13342
|
### LOOP BACK = ANY of these:
|
|
13315
13343
|
\`\`\`
|
|
13316
|
-
\u274C TODO
|
|
13317
|
-
\u274C
|
|
13344
|
+
\u274C TODO < 100% \u2192 LOOP
|
|
13345
|
+
\u274C Issues > 0 \u2192 LOOP
|
|
13318
13346
|
\u274C Build fails \u2192 LOOP
|
|
13319
|
-
\u274C E2E
|
|
13347
|
+
\u274C E2E fails \u2192 LOOP
|
|
13320
13348
|
\`\`\`
|
|
13321
13349
|
|
|
13322
13350
|
### \u26D4 NEVER SEAL IF:
|
|
13323
|
-
- TODO is
|
|
13351
|
+
- TODO is 100% BUT issues > 0
|
|
13324
13352
|
- Workers are still active
|
|
13325
|
-
- Build or E2E
|
|
13353
|
+
- Build or E2E failed
|
|
13326
13354
|
|
|
13327
13355
|
---
|
|
13328
13356
|
|
|
13329
13357
|
## \u{1F504} E2E Test Timing
|
|
13330
13358
|
|
|
13331
|
-
E2E
|
|
13332
|
-
-
|
|
13333
|
-
- E2E
|
|
13334
|
-
-
|
|
13335
|
-
- This allows catching integration issues early
|
|
13359
|
+
E2E starts when **TODO \u2265 80%** (not at 100%):
|
|
13360
|
+
- E2E runs **parallel** with remaining work
|
|
13361
|
+
- If E2E finds errors \u2192 issues++ \u2192 continue TODO
|
|
13362
|
+
- Both TODO 100% AND issues 0 \u2192 SEALED
|
|
13336
13363
|
|
|
13337
13364
|
\`\`\`
|
|
13338
|
-
|
|
13339
|
-
|
|
13340
|
-
|
|
13341
|
-
|
|
13342
|
-
|
|
13343
|
-
Both must complete cleanly \u2192 SEALED
|
|
13365
|
+
[---TODO progress---][E2E starts ~80%]
|
|
13366
|
+
\u2193
|
|
13367
|
+
TODO + E2E run parallel
|
|
13368
|
+
\u2193
|
|
13369
|
+
TODO 100% + Issues 0 \u2192 SEALED
|
|
13344
13370
|
\`\`\`
|
|
13345
13371
|
|
|
13346
13372
|
---
|
|
13347
13373
|
|
|
13348
13374
|
### Decision Matrix
|
|
13349
13375
|
|
|
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
|
-
\`\`\`
|
|
13376
|
+
| TODO % | Issues | Action |
|
|
13377
|
+
|--------|--------|--------|
|
|
13378
|
+
| < 100% | Any | Continue work |
|
|
13379
|
+
| 100% | > 0 | \u267B\uFE0F LOOP - fix issues |
|
|
13380
|
+
| 100% | 0 | \u2705 SEALED |
|
|
13362
13381
|
|
|
13363
13382
|
### CRITICAL RULES:
|
|
13364
|
-
-
|
|
13365
|
-
-
|
|
13366
|
-
- NEVER seal with
|
|
13367
|
-
- E2E starts
|
|
13383
|
+
- Update ${PATHS.STATUS} every loop
|
|
13384
|
+
- Planner keeps docs minimal (summarize, delete old)
|
|
13385
|
+
- NEVER seal with issues > 0 (even at TODO 100%!)
|
|
13386
|
+
- E2E starts at ~80%, runs parallel
|
|
13368
13387
|
${PROMPT_TAGS.LOOP_CONTINUATION.close}`;
|
|
13369
13388
|
|
|
13370
13389
|
// src/agents/prompts/commander/sync-handling.ts
|
|
@@ -13629,47 +13648,59 @@ ${PROMPT_TAGS.FILE_LEVEL_PLANNING.close}`;
|
|
|
13629
13648
|
|
|
13630
13649
|
// src/agents/prompts/planner/todo-sync.ts
|
|
13631
13650
|
var PLANNER_TODO_SYNC = `${PROMPT_TAGS.TODO_SYNC.open}
|
|
13632
|
-
## TODO SYNC
|
|
13651
|
+
## TODO SYNC & DOCUMENT MAINTENANCE
|
|
13633
13652
|
|
|
13634
|
-
When ${AGENT_NAMES.COMMANDER} detects sync issues, you update
|
|
13653
|
+
When ${AGENT_NAMES.COMMANDER} detects sync issues, you update TODO and maintain docs.
|
|
13635
13654
|
|
|
13636
13655
|
### Step 1: Read Current State
|
|
13637
13656
|
\`\`\`bash
|
|
13638
|
-
cat ${PATHS.
|
|
13639
|
-
cat ${PATHS.
|
|
13640
|
-
cat ${PATHS.TODO}
|
|
13657
|
+
cat ${PATHS.STATUS} # Current progress %
|
|
13658
|
+
cat ${PATHS.SYNC_ISSUES} # Unresolved issues
|
|
13659
|
+
cat ${PATHS.TODO} # Task list
|
|
13641
13660
|
\`\`\`
|
|
13642
13661
|
|
|
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
|
|
13662
|
+
### Step 2: Add Fix Tasks
|
|
13650
13663
|
Add NEW subtasks for sync fixes:
|
|
13651
|
-
|
|
13652
13664
|
\`\`\`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\` |
|
|
13665
|
+
### T3: Sync Fixes | parallel-group:3
|
|
13666
|
+
- [ ] S3.1: ${WORK_STATUS.ACTION.FIX} \`src/auth/login.ts\` | issue:${ID_PREFIX.SYNC_ISSUE}1
|
|
13667
|
+
- [ ] S3.2: ${WORK_STATUS.ACTION.FIX} \`src/api/users.ts\` | issue:${ID_PREFIX.SYNC_ISSUE}1
|
|
13656
13668
|
\`\`\`
|
|
13657
13669
|
|
|
13658
|
-
|
|
13659
|
-
\`\`\`markdown
|
|
13660
|
-
| src/auth/login.ts | ${WORK_STATUS.ACTION.FIX} | ${WORK_STATUS.STATUS.PENDING} | - | - | - | ${ID_PREFIX.SYNC_ISSUE}1 |
|
|
13661
|
-
\`\`\`
|
|
13670
|
+
---
|
|
13662
13671
|
|
|
13663
|
-
|
|
13664
|
-
|
|
13665
|
-
|
|
13666
|
-
|
|
13672
|
+
## \u{1F4CB} DOCUMENT MAINTENANCE RULES
|
|
13673
|
+
|
|
13674
|
+
### Keep .opencode/ Minimal:
|
|
13675
|
+
| File | Rule |
|
|
13676
|
+
|------|------|
|
|
13677
|
+
| ${PATHS.STATUS} | Overwrite each loop (no history) |
|
|
13678
|
+
| ${PATHS.TODO} | Keep only uncompleted tasks |
|
|
13679
|
+
| ${PATHS.SYNC_ISSUES} | Delete resolved issues immediately |
|
|
13680
|
+
| ${PATHS.WORK_LOG} | Archive completed, keep active only |
|
|
13681
|
+
|
|
13682
|
+
### Summarize & Clean:
|
|
13683
|
+
- **Completed tasks**: Move to archive or delete
|
|
13684
|
+
- **Resolved issues**: DELETE from sync-issues.md
|
|
13685
|
+
- **Old status**: Overwrite with current (no append)
|
|
13686
|
+
- **Long descriptions**: Summarize to 1-2 lines
|
|
13687
|
+
|
|
13688
|
+
### What to DELETE:
|
|
13689
|
+
- Resolved sync issues
|
|
13690
|
+
- Completed TODO items (mark [x] first, then remove in next cycle)
|
|
13691
|
+
- Old status updates
|
|
13692
|
+
- Verbose explanations
|
|
13693
|
+
|
|
13694
|
+
### What to KEEP:
|
|
13695
|
+
- Active/pending tasks
|
|
13696
|
+
- Unresolved issues
|
|
13697
|
+
- Current phase info
|
|
13698
|
+
- Blockers
|
|
13667
13699
|
|
|
13668
13700
|
### CRITICAL:
|
|
13669
|
-
-
|
|
13670
|
-
-
|
|
13671
|
-
-
|
|
13672
|
-
- Commander reads your updates in next loop
|
|
13701
|
+
- Commander should NOT see old/resolved content
|
|
13702
|
+
- Only current state matters
|
|
13703
|
+
- Less context = faster decisions
|
|
13673
13704
|
${PROMPT_TAGS.TODO_SYNC.close}`;
|
|
13674
13705
|
|
|
13675
13706
|
// src/agents/prompts/worker/role.ts
|
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.2",
|
|
6
6
|
"author": "agnusdei1207",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"repository": {
|