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 is a framework designed to manage complex software engineering tasks through parallel multi-agent execution. It extends the capabilities of standard AI agents by introducing a hierarchical delegation model and a multi-stage verification pipeline.
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 Diagram
30
+ ## 📊 Workflow
64
31
 
65
32
  ```text
66
33
  [User Task Input]
67
34
 
68
35
  ┌─────────▼─────────┐
69
- │ COMMANDER │ (Orchestration & Discovery)
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
- COMMANDER: Parallel Launch
44
+ COMMANDER: Parallel Workers
78
45
  └──────┬─────────┬─────────┬──────┘
79
46
  │ │ │
80
47
  ┌──────▼──┐ ┌────▼───┐ ┌───▼────┐
81
- │ WORKER A│ │ WORKER B│ │ WORKER C (Implementation)
82
- └────┬────┘ └────┬───┘ └────┬────┘
83
-
84
- ┌────▼────┐ ┌────▼───┐ ┌────▼────┐
85
- │REVIEWER │REVIEWER │ │REVIEWER │ (Unit Verification)
86
- └────┬────┘ └────┬───┘ └────┬────┘
87
-
88
- ═════▼═══════════▼══════════▼══════
89
- SYNC BARRIER
90
- ════════════════╤══════════════════
91
-
92
- ┌─────────▼─────────┐
93
- MASTER REVIEWER (E2E Verification)
94
- └─────────┬─────────┘
95
-
96
- ┌─────────▼─────────┐
97
- Mission Sealed?
98
- └─────────┬─────────┘
99
- No ↙ ↘ Yes
100
- [Loop] [Complete]
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
- ## 🚀 System Roles
72
+ ## 🚀 Agents
106
73
 
107
- | Role | Responsibility | Key Actions |
108
- |:-----|:---------------|:------------|
109
- | **Commander** | Mission Control | Task assignment, conflict resolution, global synchronization |
110
- | **Planner** | Architecture | Environment analysis, dependency mapping, TODO generation |
111
- | **Worker** | Implementation | Code writing, file modification, unit test creation |
112
- | **Reviewer** | Quality Control| Static analysis, build verification, integration testing |
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
- ## 🛠️ Features
83
+ ## Key Features
117
84
 
118
- * **Concurrent Task Management**: Efficiently handles up to 50 background agent sessions.
119
- * **Automated Context Synthesis**: Parallel scouters gather environment intelligence (Structure, Stack, Docs) instantly.
120
- * **Synchronized Verification**: Ensures all distributed tasks pass Stage 1 review before final integration.
121
- * **Fault Tolerance**: Automatically resumes progress from checkpoints in case of tool or session failure.
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
 
@@ -2,5 +2,6 @@
2
2
  * Planner Forbidden Actions
3
3
  *
4
4
  * Stay in your lane - research and plan, never implement.
5
+ * Planner is a TERMINAL node and cannot spawn other agents.
5
6
  */
6
7
  export declare const PLANNER_FORBIDDEN: string;
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 MUST trigger ${AGENT_NAMES.REVIEWER} for unit verification immediately upon completion.
955
- 2. **STAGE 2 (Integration Master)**: The Master ${AGENT_NAMES.REVIEWER} directly reads all modified files and validates cross-module consistency.
956
- 3. **E2E VALIDATION**: Run full system tests and build pass check.
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. **Fractal Spawning**: Workers spawn sub-workers for complex files/modules.
959
- 2. **Speculative Racing**: Launch multiple strategies in parallel (mode: race) for uncertainty.
960
- 3. **Asynchronous Batching**: Group non-dependent tool calls to trigger host-side parallelism.
961
- 4. **Barrier-Sync Pipeline**: Reviewers start Unit Review (Stage 1) while other workers still run.
962
- 5. **Real-time Brain Sync**: Parallel sessions share public interfaces via shared task logs.`;
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. **Fractal Spawning**: Workers spawn sub-workers for complex files/modules.\n2. **Speculative Racing**: Launch multiple strategies in parallel (mode: race) for uncertainty.\n3. **Asynchronous Batching**: Group non-dependent tool calls to trigger host-side parallelism.\n4. **Barrier-Sync Pipeline**: Reviewers start Unit Review (Stage 1) while other workers still run.\n5. **Real-time Brain Sync**: Parallel sessions share public interfaces via shared task logs.";
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.33",
5
+ "version": "1.0.35",
6
6
  "author": "agnusdei1207",
7
7
  "license": "MIT",
8
8
  "repository": {