opencode-orchestrator 1.0.18 → 1.0.21
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
|
@@ -96,8 +96,8 @@ MSVP ensures continuous integration integrity by decoupling verification from th
|
|
|
96
96
|
╚═══════════════════╤═══════════════════╝
|
|
97
97
|
│
|
|
98
98
|
══════════════════════════▼══════════════════════════
|
|
99
|
-
║ 🚀 PHASE 0: DISCOVERY SWARM (Parallel)
|
|
100
|
-
|
|
99
|
+
║ 🚀 PHASE 0: DISCOVERY SWARM (Parallel) ║
|
|
100
|
+
═════════════════════════════════════════════════════
|
|
101
101
|
│ │ │ │
|
|
102
102
|
▼ Scout ▼ Scout ▼ Scout ▼ Scout
|
|
103
103
|
[Structure] [Stack] [Docs] [Infra]
|
package/dist/index.js
CHANGED
|
@@ -911,10 +911,10 @@ var PHILOSOPHY_LEARN_PRINCIPLE = "LEARN = DOCUMENT: What you discover, you recor
|
|
|
911
911
|
var PHASE_0_SCOUT_SWARM = `**Mandatory Parallel Initialization**: DO NOT run discovery tools (ls, grep, find) yourself. Your job is to ORCHESTRATE and synthesize results.
|
|
912
912
|
|
|
913
913
|
1. **LAUNCH Parallel Scouts**: In your VERY FIRST response, you must output ALL of the following \`${TOOL_NAMES.DELEGATE_TASK}\` calls simultaneously (background: true) for:
|
|
914
|
-
- **[
|
|
915
|
-
- **[
|
|
916
|
-
- **[
|
|
917
|
-
- **[
|
|
914
|
+
- **[${SCOUT_STRUCTURE.NAME}]**: ${SCOUT_STRUCTURE.PROMPT} (To ${AGENT_NAMES.PLANNER})
|
|
915
|
+
- **[${SCOUT_STACK.NAME}]**: ${SCOUT_STACK.PROMPT} (To ${AGENT_NAMES.PLANNER})
|
|
916
|
+
- **[${SCOUT_DOCS.NAME}]**: ${SCOUT_DOCS.PROMPT} (To ${AGENT_NAMES.PLANNER})
|
|
917
|
+
- **[${SCOUT_INFRA.NAME}]**: ${SCOUT_INFRA.PROMPT} (To ${AGENT_NAMES.PLANNER})
|
|
918
918
|
2. **PARALLEL SYNC**: Use \`${TOOL_NAMES.LIST_TASKS}\` to monitor progress.
|
|
919
919
|
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}\`.
|
|
920
920
|
|
|
@@ -935,15 +935,44 @@ var PHASE_1_THINK_ANALYSIS = `### 1.1 MISSION SCOPE
|
|
|
935
935
|
- Identify high-risk parts and fallback plans.
|
|
936
936
|
- If agent fails \u2192 See RECOVERY section.`;
|
|
937
937
|
var PHASE_5_MSVP = `1. **STAGE 1 (Unit)**: Workers MUST trigger ${AGENT_NAMES.REVIEWER} for unit verification immediately upon completion.
|
|
938
|
-
2. **
|
|
939
|
-
3. **
|
|
940
|
-
4. **
|
|
938
|
+
2. **PARALLEL DISCOVERY**: Before Stage 2, launch a swarm of scouts (background: true) using **[${SCOUT_INTEGRATION.NAME}]**: ${SCOUT_INTEGRATION.PROMPT} (To ${AGENT_NAMES.PLANNER}).
|
|
939
|
+
3. **STAGE 2 (Integration Master)**: The Master ${AGENT_NAMES.REVIEWER} ingests all scout findings to validate cross-module consistency.
|
|
940
|
+
4. **E2E VALIDATION**: Run full system tests and build pass check.
|
|
941
|
+
5. **SEAL GATE**: No SEALED output until ${PATHS.TODO} is all [x] and zero issues remain.`;
|
|
941
942
|
var HPFA_RULES = `1. **Fractal Spawning**: Workers spawn sub-workers for complex files/modules.
|
|
942
943
|
2. **Speculative Racing**: Launch multiple strategies in parallel (mode: race) for uncertainty.
|
|
943
944
|
3. **Asynchronous Batching**: Group non-dependent tool calls to trigger host-side parallelism.
|
|
944
945
|
4. **Barrier-Sync Pipeline**: Reviewers start Unit Review (Stage 1) while other workers still run.
|
|
945
946
|
5. **Real-time Brain Sync**: Parallel sessions share public interfaces via shared task logs.`;
|
|
946
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
|
+
|
|
947
976
|
// src/core/agents/consts/task-status.const.ts
|
|
948
977
|
var TASK_STATUS = {
|
|
949
978
|
PENDING: STATUS_LABEL.PENDING,
|
|
@@ -5,3 +5,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
7
|
export { PHASE_0_SCOUT_SWARM, PHASE_1_THINK_ANALYSIS, PHASE_5_MSVP, HPFA_RULES } from "./mandates.js";
|
|
8
|
+
export { SCOUT_LABEL, SCOUT_STRUCTURE, SCOUT_STACK, SCOUT_DOCS, SCOUT_INFRA, SCOUT_INTEGRATION } from "./scouts.js";
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Discovery Scouters - Phase 0 Specialized Roles
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Basic identifier for discovery agents
|
|
6
|
+
*/
|
|
7
|
+
export declare const SCOUT_LABEL = "Scout";
|
|
8
|
+
export declare const SCOUT_STRUCTURE: {
|
|
9
|
+
readonly ID: "STRUCTURE";
|
|
10
|
+
readonly NAME: "Scout: Structure";
|
|
11
|
+
readonly PROMPT: "Analyze the project folder structure. Locate source code (src, lib), tests, and documentation directories. Map out the tree at depth 2-3.";
|
|
12
|
+
};
|
|
13
|
+
export declare const SCOUT_STACK: {
|
|
14
|
+
readonly ID: "STACK";
|
|
15
|
+
readonly NAME: "Scout: Stack";
|
|
16
|
+
readonly PROMPT: "Identify the technology stack. Parse package.json, Cargo.toml, go.mod, or pyproject.toml. Determine build and test commands.";
|
|
17
|
+
};
|
|
18
|
+
export declare const SCOUT_DOCS: {
|
|
19
|
+
readonly ID: "DOCS";
|
|
20
|
+
readonly NAME: "Scout: Docs";
|
|
21
|
+
readonly PROMPT: "Digest the project documentation. Read README.md, CONTRIBUTING.md, and any files in docs/ to understand the core architecture and mission.";
|
|
22
|
+
};
|
|
23
|
+
export declare const SCOUT_INFRA: {
|
|
24
|
+
readonly ID: "INFRA";
|
|
25
|
+
readonly NAME: "Scout: Infra";
|
|
26
|
+
readonly PROMPT: "Detect infrastructure and environment configs. Search for Dockerfiles, CI/CD workflows (.github, .gitlab), and environment variable templates.";
|
|
27
|
+
};
|
|
28
|
+
export declare const SCOUT_INTEGRATION: {
|
|
29
|
+
readonly ID: "INTEGRATION";
|
|
30
|
+
readonly NAME: "Scout: Integration";
|
|
31
|
+
readonly PROMPT: "Read all modified files and their cross-module dependencies in parallel. Map the actual integration surface and identify potential consistency issues.";
|
|
32
|
+
};
|
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.21",
|
|
6
6
|
"author": "agnusdei1207",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"repository": {
|