opencode-orchestrator 1.0.30 → 1.0.31
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
|
@@ -69,10 +69,6 @@ MSVP is a structured verification process that decouples implementation from qua
|
|
|
69
69
|
│ COMMANDER │ (Orchestration context)
|
|
70
70
|
└─────────┬─────────┘
|
|
71
71
|
│
|
|
72
|
-
┌────────────────▼────────────────┐
|
|
73
|
-
│ Phase 0: Parallel Discovery │ (Structure, Tech Stack, Docs, Infra)
|
|
74
|
-
└────────────────┬────────────────┘
|
|
75
|
-
│
|
|
76
72
|
┌─────────▼─────────┐
|
|
77
73
|
│ PLANNER │ (Create Hierarchical Plan)
|
|
78
74
|
└─────────┬─────────┘
|
package/dist/index.js
CHANGED
|
@@ -907,46 +907,16 @@ var PHILOSOPHY_TAGLINE = "Explore \u2192 Learn \u2192 Adapt \u2192 Act";
|
|
|
907
907
|
var PHILOSOPHY_QUOTE = "Like an astronaut landing on unknown planets \u2014 never assume, always discover.";
|
|
908
908
|
var PHILOSOPHY_LEARN_PRINCIPLE = "LEARN = DOCUMENT: What you discover, you record. Your learnings become the team's knowledge.";
|
|
909
909
|
|
|
910
|
-
// src/shared/prompt/constants/scouts.ts
|
|
911
|
-
var SCOUT_LABEL = "Scout";
|
|
912
|
-
var SCOUT_STRUCTURE = {
|
|
913
|
-
ID: "STRUCTURE",
|
|
914
|
-
NAME: `${SCOUT_LABEL}: Structure`,
|
|
915
|
-
PROMPT: "Analyze the project folder structure. Locate source code (src, lib), tests, and documentation directories. Map out the tree at depth 2-3."
|
|
916
|
-
};
|
|
917
|
-
var SCOUT_STACK = {
|
|
918
|
-
ID: "STACK",
|
|
919
|
-
NAME: `${SCOUT_LABEL}: Stack`,
|
|
920
|
-
PROMPT: "Identify the technology stack. Parse package.json, Cargo.toml, go.mod, or pyproject.toml. Determine build and test commands."
|
|
921
|
-
};
|
|
922
|
-
var SCOUT_DOCS = {
|
|
923
|
-
ID: "DOCS",
|
|
924
|
-
NAME: `${SCOUT_LABEL}: Docs`,
|
|
925
|
-
PROMPT: "Digest the project documentation. Read README.md, CONTRIBUTING.md, and any files in docs/ to understand the core architecture and mission."
|
|
926
|
-
};
|
|
927
|
-
var SCOUT_INFRA = {
|
|
928
|
-
ID: "INFRA",
|
|
929
|
-
NAME: `${SCOUT_LABEL}: Infra`,
|
|
930
|
-
PROMPT: "Detect infrastructure and environment configs. Search for Dockerfiles, CI/CD workflows (.github, .gitlab), and environment variable templates."
|
|
931
|
-
};
|
|
932
|
-
var SCOUT_INTEGRATION = {
|
|
933
|
-
ID: "INTEGRATION",
|
|
934
|
-
NAME: `${SCOUT_LABEL}: Integration`,
|
|
935
|
-
PROMPT: "Read all modified files and their cross-module dependencies in parallel. Map the actual integration surface and identify potential consistency issues."
|
|
936
|
-
};
|
|
937
|
-
|
|
938
910
|
// src/shared/prompt/constants/mandates.ts
|
|
939
|
-
var
|
|
911
|
+
var PHASE_0_DIRECT_DISCOVERY = `**Direct Project Discovery**: Read the project directly to understand it.
|
|
940
912
|
|
|
941
|
-
1. **
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
2. **PARALLEL SYNC**: Use \`${TOOL_NAMES.LIST_TASKS}\` to monitor progress.
|
|
947
|
-
3. **ONE-PASS INGESTION**: Once all scouts show DONE, use \`${TOOL_NAMES.GET_TASK_RESULT}\` for ALL scouts in a single turn to consolidate findings into \`${PATHS.CONTEXT}\`.
|
|
913
|
+
1. **STRUCTURE**: Run \`ls -la\` and \`find . -maxdepth 2 -type d | head -30\` to map the project layout.
|
|
914
|
+
2. **STACK**: Read config files (package.json, Cargo.toml, go.mod, etc.) to identify build/test commands.
|
|
915
|
+
3. **DOCS**: Read README.md and key documentation to understand the architecture.
|
|
916
|
+
4. **INFRA**: Check for Dockerfile, CI/CD configs, and infrastructure files.
|
|
917
|
+
5. **CONSOLIDATE**: Save findings to \`${PATHS.CONTEXT}\`.
|
|
948
918
|
|
|
949
|
-
[
|
|
919
|
+
[EFFICIENT]: Direct reading is faster and cheaper than delegating to parallel scouts.`;
|
|
950
920
|
var PHASE_1_THINK_ANALYSIS = `### 1.1 ANALYZE & SCOPE (INPUT)
|
|
951
921
|
- **Review consolidated ${PATHS.CONTEXT} from Phase 0.**
|
|
952
922
|
- Map discovered files to the user's request.
|
|
@@ -966,16 +936,43 @@ var PHASE_1_THINK_ANALYSIS = `### 1.1 ANALYZE & SCOPE (INPUT)
|
|
|
966
936
|
- Identify high-risk parts and fallback plans.
|
|
967
937
|
- If agent fails \u2192 See RECOVERY section.`;
|
|
968
938
|
var PHASE_5_MSVP = `1. **STAGE 1 (Unit)**: Workers MUST trigger ${AGENT_NAMES.REVIEWER} for unit verification immediately upon completion.
|
|
969
|
-
2. **
|
|
970
|
-
3. **
|
|
971
|
-
4. **
|
|
972
|
-
5. **SEAL GATE**: No SEALED output until ${PATHS.TODO} is all [x] and zero issues remain.`;
|
|
939
|
+
2. **STAGE 2 (Integration Master)**: The Master ${AGENT_NAMES.REVIEWER} directly reads all modified files and validates cross-module consistency.
|
|
940
|
+
3. **E2E VALIDATION**: Run full system tests and build pass check.
|
|
941
|
+
4. **SEAL GATE**: No SEALED output until ${PATHS.TODO} is all [x] and zero issues remain.`;
|
|
973
942
|
var HPFA_RULES = `1. **Fractal Spawning**: Workers spawn sub-workers for complex files/modules.
|
|
974
943
|
2. **Speculative Racing**: Launch multiple strategies in parallel (mode: race) for uncertainty.
|
|
975
944
|
3. **Asynchronous Batching**: Group non-dependent tool calls to trigger host-side parallelism.
|
|
976
945
|
4. **Barrier-Sync Pipeline**: Reviewers start Unit Review (Stage 1) while other workers still run.
|
|
977
946
|
5. **Real-time Brain Sync**: Parallel sessions share public interfaces via shared task logs.`;
|
|
978
947
|
|
|
948
|
+
// src/shared/prompt/constants/scouts.ts
|
|
949
|
+
var SCOUT_LABEL = "Scout";
|
|
950
|
+
var SCOUT_STRUCTURE = {
|
|
951
|
+
ID: "STRUCTURE",
|
|
952
|
+
NAME: `${SCOUT_LABEL}: Structure`,
|
|
953
|
+
PROMPT: "Analyze the project folder structure. Locate source code (src, lib), tests, and documentation directories. Map out the tree at depth 2-3."
|
|
954
|
+
};
|
|
955
|
+
var SCOUT_STACK = {
|
|
956
|
+
ID: "STACK",
|
|
957
|
+
NAME: `${SCOUT_LABEL}: Stack`,
|
|
958
|
+
PROMPT: "Identify the technology stack. Parse package.json, Cargo.toml, go.mod, or pyproject.toml. Determine build and test commands."
|
|
959
|
+
};
|
|
960
|
+
var SCOUT_DOCS = {
|
|
961
|
+
ID: "DOCS",
|
|
962
|
+
NAME: `${SCOUT_LABEL}: Docs`,
|
|
963
|
+
PROMPT: "Digest the project documentation. Read README.md, CONTRIBUTING.md, and any files in docs/ to understand the core architecture and mission."
|
|
964
|
+
};
|
|
965
|
+
var SCOUT_INFRA = {
|
|
966
|
+
ID: "INFRA",
|
|
967
|
+
NAME: `${SCOUT_LABEL}: Infra`,
|
|
968
|
+
PROMPT: "Detect infrastructure and environment configs. Search for Dockerfiles, CI/CD workflows (.github, .gitlab), and environment variable templates."
|
|
969
|
+
};
|
|
970
|
+
var SCOUT_INTEGRATION = {
|
|
971
|
+
ID: "INTEGRATION",
|
|
972
|
+
NAME: `${SCOUT_LABEL}: Integration`,
|
|
973
|
+
PROMPT: "Read all modified files and their cross-module dependencies in parallel. Map the actual integration surface and identify potential consistency issues."
|
|
974
|
+
};
|
|
975
|
+
|
|
979
976
|
// src/core/agents/consts/task-status.const.ts
|
|
980
977
|
var TASK_STATUS = {
|
|
981
978
|
PENDING: STATUS_LABEL.PENDING,
|
|
@@ -13427,11 +13424,13 @@ tool.schema = external_exports;
|
|
|
13427
13424
|
var ENVIRONMENT_DISCOVERY = `${PROMPT_TAGS.ENVIRONMENT_DISCOVERY.open}
|
|
13428
13425
|
**MANDATORY FIRST STEP** - Before any planning or coding:
|
|
13429
13426
|
|
|
13430
|
-
## \u26A1
|
|
13431
|
-
|
|
13432
|
-
1. **
|
|
13433
|
-
2. **
|
|
13434
|
-
3. **Verify** findings against existing codebase
|
|
13427
|
+
## \u26A1 Direct Discovery (Efficient)
|
|
13428
|
+
Read the project directly - this is faster and cheaper than delegating to parallel scouts:
|
|
13429
|
+
1. **Read** project structure, config files, and documentation directly.
|
|
13430
|
+
2. **Document** all findings to \`${PATHS.CONTEXT}\`.
|
|
13431
|
+
3. **Verify** findings against existing codebase.
|
|
13432
|
+
|
|
13433
|
+
[NOTE]: Direct reading saves tokens and avoids parallel wait overhead.
|
|
13435
13434
|
|
|
13436
13435
|
## 1. Project Structure Discovery
|
|
13437
13436
|
Explore the project root to understand its organization:
|
|
@@ -13949,8 +13948,8 @@ ${PROMPT_TAGS.TOOLS.close}`;
|
|
|
13949
13948
|
|
|
13950
13949
|
// src/agents/prompts/commander/execution.ts
|
|
13951
13950
|
var COMMANDER_EXECUTION = `${PROMPT_TAGS.EXECUTION_STRATEGY.open}
|
|
13952
|
-
## ${PHASES.PHASE_0.ID}: ${PHASES.PHASE_0.NAME} (
|
|
13953
|
-
${
|
|
13951
|
+
## ${PHASES.PHASE_0.ID}: ${PHASES.PHASE_0.NAME} (Direct Discovery)
|
|
13952
|
+
${PHASE_0_DIRECT_DISCOVERY}
|
|
13954
13953
|
|
|
13955
13954
|
## ${PHASES.PHASE_1.ID}: ${PHASES.PHASE_1.NAME} (Mandatory - Never Skip!)
|
|
13956
13955
|
**THINK FIRST**: As ${AGENT_NAMES.COMMANDER}, think about ORCHESTRATION and synthesis before action.
|
|
@@ -15001,9 +15000,9 @@ ${PHASE_5_MSVP}
|
|
|
15001
15000
|
|
|
15002
15001
|
### Role Specialization
|
|
15003
15002
|
1. **UNIT REVIEW (Stage 1)**: Triggered by Workers. Focus on local file correctness and unit tests.
|
|
15004
|
-
2. **MASTER REVIEW (Stage 2)**: Triggered by Commander in Phase 5.
|
|
15003
|
+
2. **MASTER REVIEW (Stage 2)**: Triggered by Commander in Phase 5. Read modified files directly and focus on cross-module consistency and system-wide integration.
|
|
15005
15004
|
|
|
15006
|
-
[CRITICAL]: As Master Reviewer,
|
|
15005
|
+
[CRITICAL]: As Master Reviewer, read all modified files directly from ${PATHS.WORK_LOG} before making a verdict.
|
|
15007
15006
|
${PROMPT_TAGS.ROLE.close}`;
|
|
15008
15007
|
|
|
15009
15008
|
// src/agents/prompts/reviewer/forbidden.ts
|
|
@@ -15235,12 +15234,14 @@ Before running integration tests, all merged files must:
|
|
|
15235
15234
|
|
|
15236
15235
|
### Integration Workflow (Master Mode)
|
|
15237
15236
|
|
|
15238
|
-
#### Step 0:
|
|
15239
|
-
Read
|
|
15237
|
+
#### Step 0: Direct File Reading
|
|
15238
|
+
Read all modified files directly from ${PATHS.WORK_LOG}. Identify:
|
|
15240
15239
|
- Cross-module interface changes
|
|
15241
15240
|
- Shared constant modifications
|
|
15242
15241
|
- Potential synchronization bottlenecks
|
|
15243
15242
|
|
|
15243
|
+
[NOTE]: Read directly - no parallel scout overhead, saves tokens.
|
|
15244
|
+
|
|
15244
15245
|
#### Step 1: Check ${PATHS.TODO} Status
|
|
15245
15246
|
\`\`\`bash
|
|
15246
15247
|
cat ${PATHS.TODO}
|
|
@@ -15302,7 +15303,7 @@ Write to ${PATHS.INTEGRATION_STATUS}:
|
|
|
15302
15303
|
|
|
15303
15304
|
**CRITICAL**:
|
|
15304
15305
|
- E2E only at ${PATHS.TODO} completion time!
|
|
15305
|
-
-
|
|
15306
|
+
- Read modified files directly for maximum efficiency.
|
|
15306
15307
|
- All ${PATHS.TODO} [x] + no issues = SEALED!
|
|
15307
15308
|
${PROMPT_TAGS.INTEGRATION_TESTING.close}`;
|
|
15308
15309
|
|
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
export { PROMPT_TAGS, wrapTag } from "./tags.js";
|
|
5
5
|
export { WORK_STATUS } from "./status.js";
|
|
6
6
|
export { PHILOSOPHY_PHASES, PHILOSOPHY_TAGLINE, PHILOSOPHY_QUOTE, PHILOSOPHY_LEARN_PRINCIPLE, EXECUTION_CYCLE, EXECUTION_CYCLE_STEPS, } from "./philosophy.js";
|
|
7
|
-
export {
|
|
7
|
+
export { PHASE_0_DIRECT_DISCOVERY, PHASE_1_THINK_ANALYSIS, PHASE_5_MSVP, HPFA_RULES } from "./mandates.js";
|
|
8
8
|
export { SCOUT_LABEL, SCOUT_STRUCTURE, SCOUT_STACK, SCOUT_DOCS, SCOUT_INFRA, SCOUT_INTEGRATION } from "./scouts.js";
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Architectural Mandates - Immutable Core Logic
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
4
|
* These constants define the non-negotiable architectural requirements
|
|
6
5
|
* that ensure the orchestrator operates according to the verified diagram.
|
|
6
|
+
*
|
|
7
|
+
* NOTE: Direct reading is preferred over parallel scouts to reduce token costs.
|
|
7
8
|
*/
|
|
8
9
|
/**
|
|
9
|
-
* Phase 0: Discovery
|
|
10
|
-
*
|
|
10
|
+
* Phase 0: Direct Discovery
|
|
11
|
+
* Read directly - no parallel scout overhead, saves tokens and time.
|
|
11
12
|
*/
|
|
12
|
-
export declare const
|
|
13
|
+
export declare const PHASE_0_DIRECT_DISCOVERY: string;
|
|
13
14
|
/**
|
|
14
15
|
* Phase 1: THINK (Strategic Mandate)
|
|
15
16
|
*/
|
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.31",
|
|
6
6
|
"author": "agnusdei1207",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"repository": {
|