opencode-orchestrator 1.0.12 → 1.0.14
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
|
@@ -20,7 +20,7 @@ npm install -g opencode-orchestrator
|
|
|
20
20
|
|
|
21
21
|
Then in OpenCode, launch your mission:
|
|
22
22
|
```bash
|
|
23
|
-
/
|
|
23
|
+
/task "Architect and Build a Diablo-like Web Game"
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
### 🌌 **The End of Sequential Limits. The Era of Fractal Mastery.**
|
|
@@ -88,14 +88,22 @@ MSVP ensures continuous integration integrity by decoupling verification from th
|
|
|
88
88
|
* **Global Barrier-Sync Protocol**: Implements a synchronized verification gate. The system enforces a blocking "Barrier" that requires consistency across all distributed units before transitioning to the final Master Review (E2E Integration) and Mission Sealing.
|
|
89
89
|
|
|
90
90
|
```
|
|
91
|
-
/
|
|
91
|
+
/task "Build Diablo Game"
|
|
92
92
|
│
|
|
93
93
|
╔═══════════════════════════════════════╗
|
|
94
94
|
║ 🎯 COMMANDER — Orchestrator ║
|
|
95
95
|
║ (Main Session - Single) ║
|
|
96
96
|
╚═══════════════════╤═══════════════════╝
|
|
97
97
|
│
|
|
98
|
-
|
|
98
|
+
══════════════════════════▼══════════════════════════
|
|
99
|
+
║ 🚀 PHASE 0: DISCOVERY SWARM (Parallel) ║
|
|
100
|
+
══════════════════════════════════════════════════════
|
|
101
|
+
│ │ │ │
|
|
102
|
+
▼ Scout ▼ Scout ▼ Scout ▼ Scout
|
|
103
|
+
[Structure] [Stack] [Docs] [Infra]
|
|
104
|
+
└───────────────┬───────────────┬───────────────┘
|
|
105
|
+
│ Consolidate & Sync
|
|
106
|
+
┌────────▼───────────────────┐
|
|
99
107
|
│ 📋 PLANNER — Create Plan │
|
|
100
108
|
│ → Outputs: Architectural Grid │
|
|
101
109
|
└───────────────────┬───────────────────┘
|
package/dist/index.js
CHANGED
|
@@ -268,6 +268,52 @@ var WAL_ACTIONS = {
|
|
|
268
268
|
DELETE: "DELETE"
|
|
269
269
|
};
|
|
270
270
|
|
|
271
|
+
// src/shared/core/constants/phases.ts
|
|
272
|
+
var PHASES = {
|
|
273
|
+
PHASE_0: {
|
|
274
|
+
ID: "PHASE_0",
|
|
275
|
+
NAME: "DISCOVERY SWARM",
|
|
276
|
+
DESCRIPTION: "Parallel intelligence gathering and project mapping",
|
|
277
|
+
MANDATORY: true
|
|
278
|
+
},
|
|
279
|
+
PHASE_1: {
|
|
280
|
+
ID: "PHASE_1",
|
|
281
|
+
NAME: "THINK",
|
|
282
|
+
DESCRIPTION: "Analyze scope, decomposition, and delegation",
|
|
283
|
+
MANDATORY: true
|
|
284
|
+
},
|
|
285
|
+
PHASE_2: {
|
|
286
|
+
ID: "PHASE_2",
|
|
287
|
+
NAME: "TRIAGE",
|
|
288
|
+
DESCRIPTION: "Complexity assessment and execution path selection",
|
|
289
|
+
MANDATORY: true
|
|
290
|
+
},
|
|
291
|
+
PHASE_3: {
|
|
292
|
+
ID: "PHASE_3",
|
|
293
|
+
NAME: "PLAN",
|
|
294
|
+
DESCRIPTION: "Architectural roadmap and task grid creation",
|
|
295
|
+
MANDATORY: true
|
|
296
|
+
},
|
|
297
|
+
PHASE_4: {
|
|
298
|
+
ID: "PHASE_4",
|
|
299
|
+
NAME: "EXECUTE",
|
|
300
|
+
DESCRIPTION: "HPFA grid execution and worker coordination",
|
|
301
|
+
MANDATORY: true
|
|
302
|
+
},
|
|
303
|
+
PHASE_5: {
|
|
304
|
+
ID: "PHASE_5",
|
|
305
|
+
NAME: "VERIFY",
|
|
306
|
+
DESCRIPTION: "MSVP final gate and E2E system validation",
|
|
307
|
+
MANDATORY: true
|
|
308
|
+
},
|
|
309
|
+
PHASE_6: {
|
|
310
|
+
ID: "PHASE_6",
|
|
311
|
+
NAME: "SEAL",
|
|
312
|
+
DESCRIPTION: "Mission completion and deterministic output",
|
|
313
|
+
MANDATORY: true
|
|
314
|
+
}
|
|
315
|
+
};
|
|
316
|
+
|
|
271
317
|
// src/shared/core/constants/cli.ts
|
|
272
318
|
var CLI_NAME = {
|
|
273
319
|
NPX: "npx",
|
|
@@ -631,7 +677,7 @@ var PROMPTS = {
|
|
|
631
677
|
|
|
632
678
|
// src/shared/message/constants/slash-commands.ts
|
|
633
679
|
var COMMAND_NAMES = {
|
|
634
|
-
TASK: "
|
|
680
|
+
TASK: "task",
|
|
635
681
|
PLAN: "plan",
|
|
636
682
|
STATUS: "status",
|
|
637
683
|
STOP: "stop",
|
|
@@ -13312,6 +13358,12 @@ tool.schema = external_exports;
|
|
|
13312
13358
|
var ENVIRONMENT_DISCOVERY = `${PROMPT_TAGS.ENVIRONMENT_DISCOVERY.open}
|
|
13313
13359
|
**MANDATORY FIRST STEP** - Before any planning or coding:
|
|
13314
13360
|
|
|
13361
|
+
## \u26A1 Parallel Discovery Strategy
|
|
13362
|
+
To maximize cognitive velocity, execute Phase 0 as a **Parallel Discovery Swarm**:
|
|
13363
|
+
1. **Delegate** independent scouts (background=true) for Structure, Stack, and Infra discovery.
|
|
13364
|
+
2. **Consolidate** all empirical evidence once scouts complete their missions.
|
|
13365
|
+
3. **Verify** findings against existing codebase before sealing the initial context.
|
|
13366
|
+
|
|
13315
13367
|
## 1. Project Structure Discovery
|
|
13316
13368
|
Explore the project root to understand its organization:
|
|
13317
13369
|
\`\`\`bash
|
|
@@ -13853,18 +13905,21 @@ ${PROMPT_TAGS.TOOLS.close}`;
|
|
|
13853
13905
|
|
|
13854
13906
|
// src/agents/prompts/commander/execution.ts
|
|
13855
13907
|
var COMMANDER_EXECUTION = `${PROMPT_TAGS.EXECUTION_STRATEGY.open}
|
|
13856
|
-
##
|
|
13857
|
-
|
|
13858
|
-
|
|
13859
|
-
|
|
13860
|
-
-
|
|
13861
|
-
2.
|
|
13862
|
-
|
|
13863
|
-
|
|
13864
|
-
|
|
13865
|
-
|
|
13866
|
-
|
|
13867
|
-
**
|
|
13908
|
+
## ${PHASES.PHASE_0.ID}: ${PHASES.PHASE_0.NAME} (Cognitive Velocity Launch)
|
|
13909
|
+
**Mandatory High-Velocity Initialization**: Do not perform discovery sequentially. Launch a swarm of scouts immediately.
|
|
13910
|
+
|
|
13911
|
+
1. **Initialize \`${PATHS.OPENCODE}\` folder**:
|
|
13912
|
+
- Immediate setup for CONTEXT SHARING (DELETE existing if fresh start).
|
|
13913
|
+
2. **LAUNCH Parallel Discovery Tasks (background=true)**:
|
|
13914
|
+
- **[Scout: Structure]**: Analyze project tree (ls, find) at depth 2-3.
|
|
13915
|
+
- **[Scout: Stack]**: Parse package.json, Cargo.toml, or pyproject.toml for identity.
|
|
13916
|
+
- **[Scout: Docs]**: Analyze README.md, CONTRIBUTING.md, and core architecture docs.
|
|
13917
|
+
- **[Scout: Infra]**: Detect Docker, CI/CD pipelines, and environment variables.
|
|
13918
|
+
3. **BARRIER SYNC & RETRIEVE**: Monitor scouts. Once finished, **READ all scout results** and \`${PATHS.CONTEXT}\` to ingest all findings.
|
|
13919
|
+
4. **SET TARGET**: Use the unified context to proceed to Phase 1.
|
|
13920
|
+
|
|
13921
|
+
## ${PHASES.PHASE_1.ID}: ${PHASES.PHASE_1.NAME} (Mandatory - Never Skip!)
|
|
13922
|
+
**THINK FIRST**: As ${AGENT_NAMES.COMMANDER}, think about ORCHESTRATION and synthesis before action.
|
|
13868
13923
|
|
|
13869
13924
|
### 1.1 MISSION SCOPE
|
|
13870
13925
|
- What is the FULL scope of this mission?
|
|
@@ -13887,31 +13942,32 @@ var COMMANDER_EXECUTION = `${PROMPT_TAGS.EXECUTION_STRATEGY.open}
|
|
|
13887
13942
|
- How will I DETECT and RECOVER from issues?
|
|
13888
13943
|
- If agent fails \u2192 See ${PROMPT_TAGS.RECOVERY.open} section: DECOMPOSE and retry
|
|
13889
13944
|
|
|
13890
|
-
**ANTI-PATTERNS**: Sequential execution when parallel is possible. Doing work yourself instead of delegating. Starting without clear decomposition.
|
|
13945
|
+
**ANTI-PATTERNS**: Sequential execution when parallel is possible. Doing work yourself instead of delegating. Starting without clear decomposition or intellectual synthesis.
|
|
13891
13946
|
|
|
13892
|
-
##
|
|
13947
|
+
## ${PHASES.PHASE_2.ID}: ${PHASES.PHASE_2.NAME}
|
|
13893
13948
|
| Type | Signal | Approach |
|
|
13894
13949
|
|------|--------|----------|
|
|
13895
13950
|
| ${WORK_STATUS.TRIAGE.TYPE.SIMPLE} | ${WORK_STATUS.TRIAGE.SIGNAL.ONE_FILE} | ${WORK_STATUS.TRIAGE.APPROACH.DIRECT} |
|
|
13896
13951
|
| ${WORK_STATUS.TRIAGE.TYPE.MEDIUM} | ${WORK_STATUS.TRIAGE.SIGNAL.MULTI_FILE} | ${WORK_STATUS.TRIAGE.APPROACH.PLAN_EXECUTE_VERIFY} |
|
|
13897
13952
|
| ${WORK_STATUS.TRIAGE.TYPE.COMPLEX} | ${WORK_STATUS.TRIAGE.SIGNAL.LARGE_SCOPE} | ${WORK_STATUS.TRIAGE.APPROACH.RESEARCH_PLAN_PARALLEL} |
|
|
13898
13953
|
|
|
13899
|
-
##
|
|
13954
|
+
## ${PHASES.PHASE_3.ID}: ${PHASES.PHASE_3.NAME} (for ${WORK_STATUS.TRIAGE.TYPE.MEDIUM}/${WORK_STATUS.TRIAGE.TYPE.COMPLEX})
|
|
13900
13955
|
${AGENT_NAMES.PLANNER} creates ${PATHS.TODO} with parallel groups
|
|
13901
13956
|
|
|
13902
|
-
##
|
|
13957
|
+
## ${PHASES.PHASE_4.ID}: ${PHASES.PHASE_4.NAME}
|
|
13903
13958
|
1. LAUNCH all independent tasks simultaneously (background=true)
|
|
13904
13959
|
2. MONITOR with ${TOOL_NAMES.LIST_TASKS}
|
|
13905
13960
|
3. COLLECT results with ${TOOL_NAMES.GET_TASK_RESULT}
|
|
13906
13961
|
4. CONTINUE with dependent tasks
|
|
13907
13962
|
5. REPEAT until all [ ] become [x]
|
|
13908
13963
|
|
|
13909
|
-
##
|
|
13910
|
-
|
|
13911
|
-
${AGENT_NAMES.REVIEWER}
|
|
13912
|
-
|
|
13964
|
+
## ${PHASES.PHASE_5.ID}: ${PHASES.PHASE_5.NAME}
|
|
13965
|
+
1. **STAGE 1 (Unit)**: Reviewers validate individual module changes (triggered by Workers).
|
|
13966
|
+
2. **STAGE 2 (Integration)**: ${AGENT_NAMES.REVIEWER} validates cross-module consistency.
|
|
13967
|
+
3. **E2E VALIDATION**: Run full system tests and build pass check.
|
|
13968
|
+
4. Only proceed to SEAL if all criteria are met with zero regressions.
|
|
13913
13969
|
|
|
13914
|
-
##
|
|
13970
|
+
## ${PHASES.PHASE_6.ID}: ${PHASES.PHASE_6.NAME}
|
|
13915
13971
|
When ALL conditions met, output ${MISSION_SEAL.PATTERN}
|
|
13916
13972
|
${PROMPT_TAGS.EXECUTION_STRATEGY.close}`;
|
|
13917
13973
|
|
|
@@ -14611,14 +14667,15 @@ ADAPTIVE IMPLEMENTATION WORKFLOW
|
|
|
14611
14667
|
8. Handle edge cases like existing code does
|
|
14612
14668
|
9. Add tests matching project's test style
|
|
14613
14669
|
|
|
14614
|
-
## Phase 5: VERIFY
|
|
14670
|
+
## Phase 5: VERIFY & TRIGGER SHADOW REVIEW
|
|
14615
14671
|
10. Run ${TOOL_NAMES.LSP_DIAGNOSTICS} \u2192 Must be clean
|
|
14672
|
+
11. Run BUILD & TEST commands from ${PATHS.CONTEXT}
|
|
14673
|
+
12. **TRIGGER STAGE 1 REVIEW**:
|
|
14674
|
+
- Before finishing, ${TOOL_NAMES.DELEGATE_TASK} to **${AGENT_NAMES.REVIEWER}** for unit verification.
|
|
14675
|
+
- Prompt: "Verify unit changes in [your module] for mission [mission_id]. Run tests and check diagnostics."
|
|
14676
|
+
13. Report completion WITH evidence (test logs, review status).
|
|
14616
14677
|
|
|
14617
|
-
|
|
14618
|
-
12. Run TEST command from ${PATHS.CONTEXT}
|
|
14619
|
-
13. Report completion WITH evidence
|
|
14620
|
-
|
|
14621
|
-
**CRITICAL**: Do NOT mark [x] in ${PATHS.TODO} - that's ${AGENT_NAMES.REVIEWER}'s job!
|
|
14678
|
+
**CRITICAL**: Do NOT mark [x] in ${PATHS.TODO} - that's ${AGENT_NAMES.REVIEWER}'s job after Stage 2!
|
|
14622
14679
|
${PROMPT_TAGS.WORKFLOW.close}`;
|
|
14623
14680
|
|
|
14624
14681
|
// src/agents/prompts/worker/quality.ts
|
|
@@ -15532,7 +15589,7 @@ $ARGUMENTS
|
|
|
15532
15589
|
</execution_rules>
|
|
15533
15590
|
</mission>`;
|
|
15534
15591
|
var COMMANDS = {
|
|
15535
|
-
"
|
|
15592
|
+
"task": {
|
|
15536
15593
|
description: "MISSION MODE - Execute task autonomously until complete",
|
|
15537
15594
|
template: MISSION_MODE_TEMPLATE,
|
|
15538
15595
|
argumentHint: '"mission goal"'
|
|
@@ -15593,7 +15650,7 @@ THINK \u2192 PLAN \u2192 DELEGATE \u2192 EXECUTE \u2192 VERIFY \u2192 COMPLETE
|
|
|
15593
15650
|
|
|
15594
15651
|
## Usage
|
|
15595
15652
|
- Select **${AGENT_NAMES.COMMANDER}** and type your request
|
|
15596
|
-
- Or use \`/
|
|
15653
|
+
- Or use \`/task "your mission"\` explicitly
|
|
15597
15654
|
- ${AGENT_NAMES.COMMANDER} automatically coordinates all agents`
|
|
15598
15655
|
}
|
|
15599
15656
|
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mission Phase Constants
|
|
3
|
+
*/
|
|
4
|
+
export declare const PHASES: {
|
|
5
|
+
readonly PHASE_0: {
|
|
6
|
+
readonly ID: "PHASE_0";
|
|
7
|
+
readonly NAME: "DISCOVERY SWARM";
|
|
8
|
+
readonly DESCRIPTION: "Parallel intelligence gathering and project mapping";
|
|
9
|
+
readonly MANDATORY: true;
|
|
10
|
+
};
|
|
11
|
+
readonly PHASE_1: {
|
|
12
|
+
readonly ID: "PHASE_1";
|
|
13
|
+
readonly NAME: "THINK";
|
|
14
|
+
readonly DESCRIPTION: "Analyze scope, decomposition, and delegation";
|
|
15
|
+
readonly MANDATORY: true;
|
|
16
|
+
};
|
|
17
|
+
readonly PHASE_2: {
|
|
18
|
+
readonly ID: "PHASE_2";
|
|
19
|
+
readonly NAME: "TRIAGE";
|
|
20
|
+
readonly DESCRIPTION: "Complexity assessment and execution path selection";
|
|
21
|
+
readonly MANDATORY: true;
|
|
22
|
+
};
|
|
23
|
+
readonly PHASE_3: {
|
|
24
|
+
readonly ID: "PHASE_3";
|
|
25
|
+
readonly NAME: "PLAN";
|
|
26
|
+
readonly DESCRIPTION: "Architectural roadmap and task grid creation";
|
|
27
|
+
readonly MANDATORY: true;
|
|
28
|
+
};
|
|
29
|
+
readonly PHASE_4: {
|
|
30
|
+
readonly ID: "PHASE_4";
|
|
31
|
+
readonly NAME: "EXECUTE";
|
|
32
|
+
readonly DESCRIPTION: "HPFA grid execution and worker coordination";
|
|
33
|
+
readonly MANDATORY: true;
|
|
34
|
+
};
|
|
35
|
+
readonly PHASE_5: {
|
|
36
|
+
readonly ID: "PHASE_5";
|
|
37
|
+
readonly NAME: "VERIFY";
|
|
38
|
+
readonly DESCRIPTION: "MSVP final gate and E2E system validation";
|
|
39
|
+
readonly MANDATORY: true;
|
|
40
|
+
};
|
|
41
|
+
readonly PHASE_6: {
|
|
42
|
+
readonly ID: "PHASE_6";
|
|
43
|
+
readonly NAME: "SEAL";
|
|
44
|
+
readonly DESCRIPTION: "Mission completion and deterministic output";
|
|
45
|
+
readonly MANDATORY: true;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Slash Commands (with slash prefix)
|
|
3
3
|
*/
|
|
4
4
|
export declare const SLASH_COMMANDS: {
|
|
5
|
-
readonly TASK: "/
|
|
5
|
+
readonly TASK: "/task";
|
|
6
6
|
readonly PLAN: "/plan";
|
|
7
7
|
readonly STATUS: "/status";
|
|
8
8
|
readonly STOP: "/stop";
|
|
@@ -12,7 +12,7 @@ export declare const SLASH_COMMANDS: {
|
|
|
12
12
|
* Command Names (without slash prefix, for comparison after parsing)
|
|
13
13
|
*/
|
|
14
14
|
export declare const COMMAND_NAMES: {
|
|
15
|
-
readonly TASK: "
|
|
15
|
+
readonly TASK: "task";
|
|
16
16
|
readonly PLAN: "plan";
|
|
17
17
|
readonly STATUS: "status";
|
|
18
18
|
readonly STOP: "stop";
|
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.14",
|
|
6
6
|
"author": "agnusdei1207",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"repository": {
|