opencode-orchestrator 1.0.13 → 1.0.15
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
|
@@ -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",
|
|
@@ -13859,65 +13905,69 @@ ${PROMPT_TAGS.TOOLS.close}`;
|
|
|
13859
13905
|
|
|
13860
13906
|
// src/agents/prompts/commander/execution.ts
|
|
13861
13907
|
var COMMANDER_EXECUTION = `${PROMPT_TAGS.EXECUTION_STRATEGY.open}
|
|
13862
|
-
##
|
|
13863
|
-
**
|
|
13864
|
-
|
|
13865
|
-
1. **Initialize \`${PATHS.OPENCODE}
|
|
13866
|
-
|
|
13867
|
-
|
|
13868
|
-
- **[Scout:
|
|
13869
|
-
- **[Scout:
|
|
13870
|
-
- **[Scout:
|
|
13871
|
-
|
|
13872
|
-
|
|
13873
|
-
|
|
13874
|
-
|
|
13875
|
-
|
|
13876
|
-
|
|
13877
|
-
|
|
13878
|
-
|
|
13879
|
-
-
|
|
13880
|
-
|
|
13881
|
-
|
|
13882
|
-
|
|
13883
|
-
|
|
13884
|
-
-
|
|
13885
|
-
|
|
13886
|
-
|
|
13887
|
-
|
|
13888
|
-
|
|
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.
|
|
13923
|
+
|
|
13924
|
+
### 1.1 MISSION SCOPE
|
|
13925
|
+
- What is the FULL scope of this mission?
|
|
13926
|
+
- What are the deliverables and success criteria?
|
|
13927
|
+
- What does the user REALLY want (not just what they said)?
|
|
13928
|
+
|
|
13929
|
+
### 1.2 DECOMPOSITION
|
|
13930
|
+
- How can I break this into INDEPENDENT sub-tasks?
|
|
13931
|
+
- Which tasks MUST be sequential (dependencies)?
|
|
13932
|
+
- What is the MAXIMUM parallelism I can achieve?
|
|
13933
|
+
|
|
13934
|
+
### 1.3 DELEGATION
|
|
13935
|
+
- Which agent is BEST for each task? (${AGENT_NAMES.PLANNER}/${AGENT_NAMES.WORKER}/${AGENT_NAMES.REVIEWER})
|
|
13936
|
+
- What context does each agent NEED to succeed?
|
|
13937
|
+
- What could cause an agent to FAIL or get stuck?
|
|
13889
13938
|
|
|
13890
13939
|
### 1.4 RISK ASSESSMENT
|
|
13891
13940
|
- What are the HIGH-RISK parts of this mission?
|
|
13892
13941
|
- What is my FALLBACK if a task fails?
|
|
13942
|
+
- How will I DETECT and RECOVER from issues?
|
|
13893
13943
|
- If agent fails \u2192 See ${PROMPT_TAGS.RECOVERY.open} section: DECOMPOSE and retry
|
|
13894
13944
|
|
|
13895
|
-
**ANTI-PATTERNS**:
|
|
13945
|
+
**ANTI-PATTERNS**: Sequential execution when parallel is possible. Doing work yourself instead of delegating. Starting without clear decomposition or intellectual synthesis.
|
|
13896
13946
|
|
|
13897
|
-
##
|
|
13947
|
+
## ${PHASES.PHASE_2.ID}: ${PHASES.PHASE_2.NAME}
|
|
13898
13948
|
| Type | Signal | Approach |
|
|
13899
13949
|
|------|--------|----------|
|
|
13900
13950
|
| ${WORK_STATUS.TRIAGE.TYPE.SIMPLE} | ${WORK_STATUS.TRIAGE.SIGNAL.ONE_FILE} | ${WORK_STATUS.TRIAGE.APPROACH.DIRECT} |
|
|
13901
13951
|
| ${WORK_STATUS.TRIAGE.TYPE.MEDIUM} | ${WORK_STATUS.TRIAGE.SIGNAL.MULTI_FILE} | ${WORK_STATUS.TRIAGE.APPROACH.PLAN_EXECUTE_VERIFY} |
|
|
13902
13952
|
| ${WORK_STATUS.TRIAGE.TYPE.COMPLEX} | ${WORK_STATUS.TRIAGE.SIGNAL.LARGE_SCOPE} | ${WORK_STATUS.TRIAGE.APPROACH.RESEARCH_PLAN_PARALLEL} |
|
|
13903
13953
|
|
|
13904
|
-
##
|
|
13954
|
+
## ${PHASES.PHASE_3.ID}: ${PHASES.PHASE_3.NAME} (for ${WORK_STATUS.TRIAGE.TYPE.MEDIUM}/${WORK_STATUS.TRIAGE.TYPE.COMPLEX})
|
|
13905
13955
|
${AGENT_NAMES.PLANNER} creates ${PATHS.TODO} with parallel groups
|
|
13906
13956
|
|
|
13907
|
-
##
|
|
13957
|
+
## ${PHASES.PHASE_4.ID}: ${PHASES.PHASE_4.NAME}
|
|
13908
13958
|
1. LAUNCH all independent tasks simultaneously (background=true)
|
|
13909
13959
|
2. MONITOR with ${TOOL_NAMES.LIST_TASKS}
|
|
13910
13960
|
3. COLLECT results with ${TOOL_NAMES.GET_TASK_RESULT}
|
|
13911
13961
|
4. CONTINUE with dependent tasks
|
|
13912
13962
|
5. REPEAT until all [ ] become [x]
|
|
13913
13963
|
|
|
13914
|
-
##
|
|
13915
|
-
1. **
|
|
13916
|
-
2. **
|
|
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.
|
|
13917
13967
|
3. **E2E VALIDATION**: Run full system tests and build pass check.
|
|
13918
13968
|
4. Only proceed to SEAL if all criteria are met with zero regressions.
|
|
13919
13969
|
|
|
13920
|
-
##
|
|
13970
|
+
## ${PHASES.PHASE_6.ID}: ${PHASES.PHASE_6.NAME}
|
|
13921
13971
|
When ALL conditions met, output ${MISSION_SEAL.PATTERN}
|
|
13922
13972
|
${PROMPT_TAGS.EXECUTION_STRATEGY.close}`;
|
|
13923
13973
|
|
|
@@ -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
|
+
};
|
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.15",
|
|
6
6
|
"author": "agnusdei1207",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"repository": {
|