opencode-orchestrator 0.9.0 → 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.
@@ -2,5 +2,6 @@
2
2
  * Planner TODO Sync
3
3
  *
4
4
  * Syncs TODO list based on Commander instructions after sync issues.
5
+ * Also maintains .opencode/ documents minimal.
5
6
  */
6
7
  export declare const PLANNER_TODO_SYNC: string;
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,67 +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 Work Status
13293
+ ### Step 1: Read Status Summary
13292
13294
  \`\`\`bash
13293
- # Check current work status
13294
- cat ${PATHS.WORK_LOG}
13295
- \`\`\`
13296
-
13297
- ### Step 2: Check for Sync Issues
13298
- \`\`\`bash
13299
- # Check if Reviewer reported sync issues
13295
+ cat ${PATHS.STATUS} 2>/dev/null || echo "No status yet"
13296
+ cat ${PATHS.TODO}
13300
13297
  cat ${PATHS.SYNC_ISSUES} 2>/dev/null || echo "No sync issues"
13301
13298
  \`\`\`
13302
13299
 
13303
- ### Step 3: Check Integration Status
13304
- \`\`\`bash
13305
- # Check integration test results
13306
- cat ${PATHS.INTEGRATION_STATUS} 2>/dev/null || echo "No integration yet"
13307
- \`\`\`
13308
-
13309
- ### Step 4: Decision Matrix
13300
+ ---
13310
13301
 
13311
- | work-log.md | sync-issues.md | Action |
13312
- |-------------|----------------|--------|
13313
- | Active workers | Any | Wait, monitor progress |
13314
- | All [x] | Empty | Proceed to SEAL check |
13315
- | All [x] | Has issues | Dispatch ${AGENT_NAMES.WORKER} to fix |
13316
- | Has unchecked | Any | Continue execution |
13302
+ ## \u{1F4CA} STATUS TRACKING
13317
13303
 
13318
- ### Step 5: File-Level Task Assignment
13319
- When dispatching work, assign at FILE LEVEL:
13304
+ Commander updates ${PATHS.STATUS} each loop:
13320
13305
  \`\`\`markdown
13321
- ## TODO Format for Parallel Workers:
13322
- - [ ] S1.1: Implement \`src/auth/login.ts\` | agent:${AGENT_NAMES.WORKER} | file:src/auth/login.ts
13323
- - [ ] S1.2: Implement \`src/auth/logout.ts\` | agent:${AGENT_NAMES.WORKER} | file:src/auth/logout.ts
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"]
13324
13322
  \`\`\`
13325
13323
 
13326
- Each ${AGENT_NAMES.WORKER} gets ONE file:
13327
- - Isolation guaranteed
13328
- - TDD happens per file
13329
- - Unit test created & deleted per file
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
+
13330
+ ---
13331
+
13332
+ ## \u26A0\uFE0F SEALED CONDITIONS (CRITICAL!)
13333
+
13334
+ ### SEALED = BOTH must be true:
13335
+ \`\`\`
13336
+ \u2705 TODO: ALL items [x] (100%)
13337
+ \u2705 sync-issues: EMPTY (0 issues)
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
13339
+ ONLY THEN \u2192 output <mission_seal>SEALED</mission_seal>
13340
+ \`\`\`
13330
13341
 
13331
- ### Step 6: Parallel Dispatch
13342
+ ### LOOP BACK = ANY of these:
13332
13343
  \`\`\`
13333
- delegate_task(S1.1, ${AGENT_NAMES.WORKER}, background: true)
13334
- delegate_task(S1.2, ${AGENT_NAMES.WORKER}, background: true)
13335
- delegate_task(S1.3, ${AGENT_NAMES.WORKER}, background: true)
13336
- // All run in PARALLEL
13344
+ \u274C TODO < 100% \u2192 LOOP
13345
+ \u274C Issues > 0 \u2192 LOOP
13346
+ \u274C Build fails \u2192 LOOP
13347
+ \u274C E2E fails \u2192 LOOP
13337
13348
  \`\`\`
13338
13349
 
13339
- ### Step 7: After Workers Complete
13350
+ ### \u26D4 NEVER SEAL IF:
13351
+ - TODO is 100% BUT issues > 0
13352
+ - Workers are still active
13353
+ - Build or E2E failed
13354
+
13355
+ ---
13356
+
13357
+ ## \u{1F504} E2E Test Timing
13358
+
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
13363
+
13340
13364
  \`\`\`
13341
- delegate_task(VERIFY_ALL, ${AGENT_NAMES.REVIEWER}, background: false)
13342
- // Reviewer checks all completed units
13343
- // Reviewer runs integration test
13344
- // Reviewer updates TODO or reports sync issues
13365
+ [---TODO progress---][E2E starts ~80%]
13366
+ \u2193
13367
+ TODO + E2E run parallel
13368
+ \u2193
13369
+ TODO 100% + Issues 0 \u2192 SEALED
13345
13370
  \`\`\`
13346
13371
 
13347
- ### CRITICAL LOOP RULES:
13348
- - ALWAYS read ${PATHS.WORK_LOG} at loop start
13349
- - NEVER seal with active workers
13350
- - NEVER seal with unresolved sync issues
13351
- - File-level assignment = proper isolation
13372
+ ---
13373
+
13374
+ ### Decision Matrix
13375
+
13376
+ | TODO % | Issues | Action |
13377
+ |--------|--------|--------|
13378
+ | < 100% | Any | Continue work |
13379
+ | 100% | > 0 | \u267B\uFE0F LOOP - fix issues |
13380
+ | 100% | 0 | \u2705 SEALED |
13381
+
13382
+ ### CRITICAL RULES:
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
13352
13387
  ${PROMPT_TAGS.LOOP_CONTINUATION.close}`;
13353
13388
 
13354
13389
  // src/agents/prompts/commander/sync-handling.ts
@@ -13613,47 +13648,59 @@ ${PROMPT_TAGS.FILE_LEVEL_PLANNING.close}`;
13613
13648
 
13614
13649
  // src/agents/prompts/planner/todo-sync.ts
13615
13650
  var PLANNER_TODO_SYNC = `${PROMPT_TAGS.TODO_SYNC.open}
13616
- ## TODO SYNC (After Sync Issues)
13651
+ ## TODO SYNC & DOCUMENT MAINTENANCE
13617
13652
 
13618
- When ${AGENT_NAMES.COMMANDER} detects sync issues, you update the TODO.
13653
+ When ${AGENT_NAMES.COMMANDER} detects sync issues, you update TODO and maintain docs.
13619
13654
 
13620
13655
  ### Step 1: Read Current State
13621
13656
  \`\`\`bash
13622
- cat ${PATHS.SYNC_ISSUES}
13623
- cat ${PATHS.WORK_LOG}
13624
- cat ${PATHS.TODO}
13657
+ cat ${PATHS.STATUS} # Current progress %
13658
+ cat ${PATHS.SYNC_ISSUES} # Unresolved issues
13659
+ cat ${PATHS.TODO} # Task list
13625
13660
  \`\`\`
13626
13661
 
13627
- ### Step 2: Understand Commander's Instructions
13628
- Commander will tell you:
13629
- - Which files need rework
13630
- - What sync issues to fix
13631
- - New dependencies discovered
13632
-
13633
- ### Step 3: Update TODO
13662
+ ### Step 2: Add Fix Tasks
13634
13663
  Add NEW subtasks for sync fixes:
13635
-
13636
13664
  \`\`\`markdown
13637
- ### T3: Sync Fixes | parallel-group:3 | depends:T2
13638
- - [ ] S3.1: ${WORK_STATUS.ACTION.FIX} \`src/auth/login.ts\` | agent:${AGENT_NAMES.WORKER} | file:src/auth/login.ts | issue:${ID_PREFIX.SYNC_ISSUE}1
13639
- - [ ] S3.2: ${WORK_STATUS.ACTION.FIX} \`src/api/users.ts\` | agent:${AGENT_NAMES.WORKER} | file:src/api/users.ts | issue:${ID_PREFIX.SYNC_ISSUE}1
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
13640
13668
  \`\`\`
13641
13669
 
13642
- ### Step 4: Update Work Log File Status
13643
- \`\`\`markdown
13644
- | src/auth/login.ts | ${WORK_STATUS.ACTION.FIX} | ${WORK_STATUS.STATUS.PENDING} | - | - | - | ${ID_PREFIX.SYNC_ISSUE}1 |
13645
- \`\`\`
13670
+ ---
13646
13671
 
13647
- ### Sync Issue Reference Format
13648
- Always reference the sync issue ID:
13649
- - \`issue:${ID_PREFIX.SYNC_ISSUE}N\` in TODO subtask (e.g., ${ID_PREFIX.SYNC_ISSUE}1, ${ID_PREFIX.SYNC_ISSUE}42)
13650
- - Links back to ${PATHS.SYNC_ISSUES} for context
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
13651
13699
 
13652
13700
  ### CRITICAL:
13653
- - DO NOT remove completed tasks (keep for history)
13654
- - ADD new fix tasks, don't overwrite
13655
- - Keep file manifest updated
13656
- - 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
13657
13704
  ${PROMPT_TAGS.TODO_SYNC.close}`;
13658
13705
 
13659
13706
  // src/agents/prompts/worker/role.ts
@@ -15,4 +15,5 @@ export declare const PATHS: {
15
15
  readonly UNIT_TESTS: ".opencode/unit-tests";
16
16
  readonly SYNC_ISSUES: ".opencode/sync-issues.md";
17
17
  readonly INTEGRATION_STATUS: ".opencode/integration-status.md";
18
+ readonly STATUS: ".opencode/status.md";
18
19
  };
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.0",
5
+ "version": "0.9.2",
6
6
  "author": "agnusdei1207",
7
7
  "license": "MIT",
8
8
  "repository": {