opencode-orchestrator 1.0.33 → 1.0.35
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/README.md
CHANGED
|
@@ -23,50 +23,17 @@ In an OpenCode environment:
|
|
|
23
23
|
|
|
24
24
|
## Overview
|
|
25
25
|
|
|
26
|
-
OpenCode Orchestrator
|
|
27
|
-
|
|
28
|
-
### Key Characteristics
|
|
29
|
-
* **Parallel Execution**: Manages multiple concurrent agent sessions to accelerate development.
|
|
30
|
-
* **Hierarchical Delegation**: Supports recursive task decomposition (Fractal Spawning) for complex requirements.
|
|
31
|
-
* **Integrated Verification**: Employs a multi-stage pipeline (Unit & Integration) to ensure code quality.
|
|
32
|
-
* **Persistent State**: Uses structured logging to maintain state and recover from interruptions.
|
|
33
|
-
|
|
34
|
-
---
|
|
35
|
-
|
|
36
|
-
## Core Philosophy: Adaptive Engineering
|
|
37
|
-
|
|
38
|
-
The orchestrator follows an **Explore → Learn → Adapt → Act** cycle to ensure agents remain grounded in the project's specific context.
|
|
39
|
-
|
|
40
|
-
* **Explore**: Systematically discover the project structure, tech stack, and documentation.
|
|
41
|
-
* **Learn**: Extract existing patterns, naming conventions, and architectural decisions from the codebase.
|
|
42
|
-
* **Adapt**: Adjust implementation strategies and verification parameters based on learned context.
|
|
43
|
-
* **Act**: Execute tasks through parallel delegation with evidence-based verification.
|
|
44
|
-
|
|
45
|
-
---
|
|
46
|
-
|
|
47
|
-
## 🏗️ Architecture
|
|
48
|
-
|
|
49
|
-
The system is built upon two core mechanisms that handle scaling and quality control.
|
|
50
|
-
|
|
51
|
-
### HPFA (Hyper-Parallel Fractal Architecture)
|
|
52
|
-
HPFA is a parallel execution model that enables task decomposition at scale.
|
|
53
|
-
* **Managed Concurrency**: Orchestrates up to 50 parallel agent sessions simultaneously.
|
|
54
|
-
* **Recursive Scaling**: Allows "Worker" agents to spawn sub-workers for modular tasks, ensuring deep architectural coverage.
|
|
55
|
-
|
|
56
|
-
### MSVP (Multi-Stage Verification Pipeline)
|
|
57
|
-
MSVP is a structured verification process that decouples implementation from quality assurance.
|
|
58
|
-
* **Stage 1 (Unit Verification)**: Reviewers validate individual module changes and run local tests immediately after implementation.
|
|
59
|
-
* **Stage 2 (Integration Review)**: A master reviewer verifies cross-module consistency and system integrity after all individual units are completed.
|
|
26
|
+
OpenCode Orchestrator manages complex software tasks through **parallel multi-agent execution**. Commander orchestrates Workers and Reviewers to implement and verify code concurrently.
|
|
60
27
|
|
|
61
28
|
---
|
|
62
29
|
|
|
63
|
-
## 📊 Workflow
|
|
30
|
+
## 📊 Workflow
|
|
64
31
|
|
|
65
32
|
```text
|
|
66
33
|
[User Task Input]
|
|
67
34
|
│
|
|
68
35
|
┌─────────▼─────────┐
|
|
69
|
-
│ COMMANDER │ (Orchestration
|
|
36
|
+
│ COMMANDER │ (Orchestration)
|
|
70
37
|
└─────────┬─────────┘
|
|
71
38
|
│
|
|
72
39
|
┌─────────▼─────────┐
|
|
@@ -74,52 +41,51 @@ MSVP is a structured verification process that decouples implementation from qua
|
|
|
74
41
|
└─────────┬─────────┘
|
|
75
42
|
│
|
|
76
43
|
┌────────────────▼────────────────┐
|
|
77
|
-
│
|
|
44
|
+
│ COMMANDER: Parallel Workers │
|
|
78
45
|
└──────┬─────────┬─────────┬──────┘
|
|
79
46
|
│ │ │
|
|
80
47
|
┌──────▼──┐ ┌────▼───┐ ┌───▼────┐
|
|
81
|
-
│ WORKER
|
|
82
|
-
|
|
83
|
-
│
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
│
|
|
88
|
-
|
|
89
|
-
│
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
│
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
48
|
+
│ WORKER │ │ WORKER │ │ WORKER │
|
|
49
|
+
└──────┬──┘ └────┬───┘ └────┬────┘
|
|
50
|
+
│ │ │
|
|
51
|
+
╔══════▼═════════▼══════════▼══════╗
|
|
52
|
+
║ COMMANDER: Parallel Reviewers ║
|
|
53
|
+
╚══════╤═════════╤══════════╤══════╝
|
|
54
|
+
│ │ │
|
|
55
|
+
┌──────▼──┐ ┌────▼───┐ ┌────▼────┐
|
|
56
|
+
│REVIEWER │ │REVIEWER │ │REVIEWER │
|
|
57
|
+
└──────┬──┘ └────┬───┘ └────┬────┘
|
|
58
|
+
│ │ │
|
|
59
|
+
═▼═════════▼══════════▼═
|
|
60
|
+
│ SYNC BARRIER │
|
|
61
|
+
═══════════╤═══════════
|
|
62
|
+
│
|
|
63
|
+
┌─────────▼─────────┐
|
|
64
|
+
│ MASTER REVIEWER │ (E2E Verification)
|
|
65
|
+
└─────────┬─────────┘
|
|
66
|
+
│
|
|
67
|
+
[MISSION SEALED]
|
|
101
68
|
```
|
|
102
69
|
|
|
103
70
|
---
|
|
104
71
|
|
|
105
|
-
## 🚀
|
|
72
|
+
## 🚀 Agents
|
|
106
73
|
|
|
107
|
-
|
|
|
108
|
-
|
|
109
|
-
| **Commander** |
|
|
110
|
-
| **Planner** |
|
|
111
|
-
| **Worker** |
|
|
112
|
-
| **Reviewer** |
|
|
74
|
+
| Agent | Role |
|
|
75
|
+
|:------|:-----|
|
|
76
|
+
| **Commander** | Orchestrates all agents, manages task flow |
|
|
77
|
+
| **Planner** | Creates TODO.md with task breakdown |
|
|
78
|
+
| **Worker** | Implements features, writes tests |
|
|
79
|
+
| **Reviewer** | Validates code, runs verification |
|
|
113
80
|
|
|
114
81
|
---
|
|
115
82
|
|
|
116
|
-
##
|
|
83
|
+
## ✨ Key Features
|
|
117
84
|
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
* **Context Optimization**: Monitors context window limits and performs automated compaction for long sessions.
|
|
85
|
+
- **Parallel Execution**: Up to 50 concurrent agent sessions
|
|
86
|
+
- **Two-Stage Verification**: Unit review → Master review → Seal
|
|
87
|
+
- **Fault Tolerance**: Auto-recovery from failures
|
|
88
|
+
- **Context Optimization**: Manages token limits automatically
|
|
123
89
|
|
|
124
90
|
---
|
|
125
91
|
|
package/dist/index.js
CHANGED
|
@@ -951,15 +951,16 @@ var PHASE_1_THINK_ANALYSIS = `### 1.1 ANALYZE & SCOPE (INPUT)
|
|
|
951
951
|
### 1.4 RISK ASSESSMENT
|
|
952
952
|
- Identify high-risk parts and fallback plans.
|
|
953
953
|
- If agent fails \u2192 See RECOVERY section.`;
|
|
954
|
-
var PHASE_5_MSVP = `1. **STAGE 1 (Unit)**: Workers
|
|
955
|
-
2. **STAGE 2 (Integration Master)**:
|
|
956
|
-
3. **E2E VALIDATION**:
|
|
954
|
+
var PHASE_5_MSVP = `1. **STAGE 1 (Unit)**: As Workers complete, Commander spawns ${AGENT_NAMES.REVIEWER} for each to verify.
|
|
955
|
+
2. **STAGE 2 (Integration Master)**: Once all Units pass, Commander spawns Master ${AGENT_NAMES.REVIEWER} for cross-module validation.
|
|
956
|
+
3. **E2E VALIDATION**: Master Reviewer runs full system tests and build pass check.
|
|
957
957
|
4. **SEAL GATE**: No SEALED output until ${PATHS.TODO} is all [x] and zero issues remain.`;
|
|
958
|
-
var HPFA_RULES = `1. **
|
|
959
|
-
2. **
|
|
960
|
-
3. **
|
|
961
|
-
4. **
|
|
962
|
-
5. **
|
|
958
|
+
var HPFA_RULES = `1. **Commander Parallel Workers**: Commander spawns multiple Workers in parallel for independent modules.
|
|
959
|
+
2. **Commander Parallel Reviewers**: As Workers complete, Commander spawns Unit Reviewers for each.
|
|
960
|
+
3. **Speculative Racing**: Launch multiple strategies in parallel (mode: race) for uncertainty.
|
|
961
|
+
4. **Asynchronous Batching**: Group non-dependent tool calls to trigger host-side parallelism.
|
|
962
|
+
5. **Barrier-Sync Pipeline**: Commander waits at sync barrier before launching Master Reviewer.
|
|
963
|
+
6. **Terminal Nodes**: Workers and Reviewers are TERMINAL - they cannot spawn any sub-agents.`;
|
|
963
964
|
|
|
964
965
|
// src/shared/prompt/constants/scouts.ts
|
|
965
966
|
var SCOUT_LABEL = "Scout";
|
|
@@ -14294,12 +14295,15 @@ ${PROMPT_TAGS.ROLE.close}`;
|
|
|
14294
14295
|
var PLANNER_FORBIDDEN = `${PROMPT_TAGS.FORBIDDEN_ACTIONS.open}
|
|
14295
14296
|
**PLANNER FORBIDDEN ACTIONS**
|
|
14296
14297
|
|
|
14297
|
-
|
|
14298
|
+
## \u26D4 NEVER Spawn or Delegate (CRITICAL)
|
|
14299
|
+
- NEVER use \`${TOOL_NAMES.DELEGATE_TASK}\` to spawn agents
|
|
14300
|
+
- NEVER use \`${TOOL_NAMES.CALL_AGENT}\` to create sessions
|
|
14301
|
+
- You are a TERMINAL node - create plans, don't execute them
|
|
14302
|
+
- ${AGENT_NAMES.COMMANDER} is the ONLY agent who can spawn Workers/Reviewers
|
|
14298
14303
|
|
|
14299
14304
|
## Never Implement
|
|
14300
14305
|
- NEVER write actual code \u2192 Only plan and research
|
|
14301
14306
|
- NEVER execute build/test commands \u2192 That's ${AGENT_NAMES.WORKER}/${AGENT_NAMES.REVIEWER}'s job
|
|
14302
|
-
|
|
14303
14307
|
- NEVER modify source files \u2192 Only ${PATHS.TODO} and ${PATHS.DOCS}/
|
|
14304
14308
|
|
|
14305
14309
|
## Never Assume
|
|
@@ -17,9 +17,15 @@ export declare const PHASE_0_DIRECT_DISCOVERY: string;
|
|
|
17
17
|
export declare const PHASE_1_THINK_ANALYSIS: string;
|
|
18
18
|
/**
|
|
19
19
|
* Phase 5: MSVP (Multi-Stage Verification Pipeline)
|
|
20
|
+
*
|
|
21
|
+
* NOTE: Commander spawns both Workers AND Reviewers.
|
|
22
|
+
* Workers are terminal nodes and do not spawn Reviewers themselves.
|
|
20
23
|
*/
|
|
21
24
|
export declare const PHASE_5_MSVP: string;
|
|
22
25
|
/**
|
|
23
26
|
* HPFA (Hyper-Parallel Fractal Architecture) Rules
|
|
27
|
+
*
|
|
28
|
+
* All spawning happens at Commander level only.
|
|
29
|
+
* Workers and Reviewers are terminal nodes and cannot spawn sub-agents.
|
|
24
30
|
*/
|
|
25
|
-
export declare const HPFA_RULES = "1. **
|
|
31
|
+
export declare const HPFA_RULES = "1. **Commander Parallel Workers**: Commander spawns multiple Workers in parallel for independent modules.\n2. **Commander Parallel Reviewers**: As Workers complete, Commander spawns Unit Reviewers for each.\n3. **Speculative Racing**: Launch multiple strategies in parallel (mode: race) for uncertainty.\n4. **Asynchronous Batching**: Group non-dependent tool calls to trigger host-side parallelism.\n5. **Barrier-Sync Pipeline**: Commander waits at sync barrier before launching Master Reviewer.\n6. **Terminal Nodes**: Workers and Reviewers are TERMINAL - they cannot spawn any sub-agents.";
|
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": "1.0.
|
|
5
|
+
"version": "1.0.35",
|
|
6
6
|
"author": "agnusdei1207",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"repository": {
|