opencode-orchestrator 0.9.33 → 0.9.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/dist/agents/prompts/commander/role.d.ts +1 -1
- package/dist/agents/prompts/common/core-philosophy.d.ts +9 -0
- package/dist/agents/prompts/common/index.d.ts +1 -0
- package/dist/agents/prompts/planner/role.d.ts +1 -1
- package/dist/agents/prompts/worker/role.d.ts +1 -1
- package/dist/index.js +50 -20
- package/dist/shared/prompt/constants/index.d.ts +1 -0
- package/dist/shared/prompt/constants/philosophy.d.ts +17 -0
- package/dist/shared/prompt/constants/tags.d.ts +4 -0
- package/package.json +1 -1
|
@@ -9,3 +9,4 @@ export { TODO_RULES } from "./todo-rules.js";
|
|
|
9
9
|
export { SHARED_WORKSPACE } from "./shared-workspace.js";
|
|
10
10
|
export { MISSION_SEAL_RULES } from "./mission-seal.js";
|
|
11
11
|
export { VERIFICATION_REQUIREMENTS } from "./verification.js";
|
|
12
|
+
export { CORE_PHILOSOPHY } from "./core-philosophy.js";
|
package/dist/index.js
CHANGED
|
@@ -403,6 +403,7 @@ var PROMPT_TAGS = {
|
|
|
403
403
|
TODO_RULES: { open: "<todo_rules>", close: "</todo_rules>" },
|
|
404
404
|
MISSION_SEAL: { open: "<mission_seal>", close: "</mission_seal>" },
|
|
405
405
|
SHARED_WORKSPACE: { open: "<shared_workspace>", close: "</shared_workspace>" },
|
|
406
|
+
CORE_PHILOSOPHY: { open: "<core_philosophy>", close: "</core_philosophy>" },
|
|
406
407
|
// === Commander ===
|
|
407
408
|
TOOLS: { open: "<tools>", close: "</tools>" },
|
|
408
409
|
AGENTS: { open: "<agents>", close: "</agents>" },
|
|
@@ -530,6 +531,17 @@ var WORK_STATUS = {
|
|
|
530
531
|
}
|
|
531
532
|
};
|
|
532
533
|
|
|
534
|
+
// src/shared/prompt/constants/philosophy.ts
|
|
535
|
+
var PHILOSOPHY_PHASES = {
|
|
536
|
+
EXPLORE: "EXPLORE",
|
|
537
|
+
LEARN: "LEARN",
|
|
538
|
+
ADAPT: "ADAPT",
|
|
539
|
+
ACT: "ACT"
|
|
540
|
+
};
|
|
541
|
+
var PHILOSOPHY_TAGLINE = "Explore \u2192 Learn \u2192 Adapt \u2192 Act";
|
|
542
|
+
var PHILOSOPHY_QUOTE = "Like an astronaut landing on unknown planets \u2014 never assume, always discover.";
|
|
543
|
+
var PHILOSOPHY_LEARN_PRINCIPLE = "LEARN = DOCUMENT: What you discover, you record. Your learnings become the team's knowledge.";
|
|
544
|
+
|
|
533
545
|
// src/core/agents/consts/task-status.const.ts
|
|
534
546
|
var TASK_STATUS = {
|
|
535
547
|
PENDING: "pending",
|
|
@@ -13302,19 +13314,39 @@ var VERIFICATION_REQUIREMENTS = `${PROMPT_TAGS.VERIFICATION.open}
|
|
|
13302
13314
|
ONLY mark complete after ALL checks pass!
|
|
13303
13315
|
${PROMPT_TAGS.VERIFICATION.close}`;
|
|
13304
13316
|
|
|
13317
|
+
// src/agents/prompts/common/core-philosophy.ts
|
|
13318
|
+
var CORE_PHILOSOPHY = `${PROMPT_TAGS.CORE_PHILOSOPHY.open}
|
|
13319
|
+
## \u{1F9E0} Core Philosophy: ${PHILOSOPHY_TAGLINE}
|
|
13320
|
+
|
|
13321
|
+
> ${PHILOSOPHY_QUOTE}
|
|
13322
|
+
|
|
13323
|
+
| Phase | Action | Key Behavior |
|
|
13324
|
+
|:-----:|:-------|:-------------|
|
|
13325
|
+
| \u{1F50D} **${PHILOSOPHY_PHASES.EXPLORE}** | Scan unknown territory | Detect environment, never assume |
|
|
13326
|
+
| \u{1F4DD} **${PHILOSOPHY_PHASES.LEARN}** | Document discoveries | Record patterns for future use |
|
|
13327
|
+
| \u{1F504} **${PHILOSOPHY_PHASES.ADAPT}** | Adjust to findings | Match project's style and context |
|
|
13328
|
+
| \u26A1 **${PHILOSOPHY_PHASES.ACT}** | Execute with confidence | Build, test, seal |
|
|
13329
|
+
|
|
13330
|
+
**${PHILOSOPHY_LEARN_PRINCIPLE}**
|
|
13331
|
+
|
|
13332
|
+
### Agent Focus:
|
|
13333
|
+
- \u{1F3AF} **${AGENT_NAMES.COMMANDER}**: All phases (orchestrate the full cycle)
|
|
13334
|
+
- \u{1F4CB} **${AGENT_NAMES.PLANNER}**: ${PHILOSOPHY_PHASES.EXPLORE} \u2192 ${PHILOSOPHY_PHASES.LEARN} (research and document)
|
|
13335
|
+
- \u{1F528} **${AGENT_NAMES.WORKER}**: ${PHILOSOPHY_PHASES.ADAPT} \u2192 ${PHILOSOPHY_PHASES.ACT} (implement with fit)
|
|
13336
|
+
- \u2705 **${AGENT_NAMES.REVIEWER}**: ${PHILOSOPHY_PHASES.EXPLORE} \u2192 ${PHILOSOPHY_PHASES.LEARN} \u2192 ${PHILOSOPHY_PHASES.ACT} (verify with evidence)
|
|
13337
|
+
${PROMPT_TAGS.CORE_PHILOSOPHY.close}`;
|
|
13338
|
+
|
|
13305
13339
|
// src/agents/prompts/commander/role.ts
|
|
13306
13340
|
var COMMANDER_ROLE = `${PROMPT_TAGS.ROLE.open}
|
|
13307
13341
|
You are ${AGENT_NAMES.COMMANDER}. Autonomous mission controller.
|
|
13308
13342
|
|
|
13309
|
-
## Core Philosophy:
|
|
13310
|
-
|
|
13311
|
-
2. **ADAPT** - Adjust strategy based on what you find
|
|
13312
|
-
3. **ACT** - Execute with parallel delegation
|
|
13343
|
+
## Core Philosophy: ${PHILOSOPHY_TAGLINE}
|
|
13344
|
+
(See CORE_PHILOSOPHY for full details - you orchestrate ALL phases)
|
|
13313
13345
|
|
|
13314
13346
|
## Your Identity
|
|
13315
|
-
- You ORCHESTRATE -
|
|
13347
|
+
- You ORCHESTRATE - explore, learn, delegate, verify
|
|
13316
13348
|
- You NEVER stop until the mission is SEALED
|
|
13317
|
-
- You READ ${PATHS.CONTEXT} to
|
|
13349
|
+
- You READ and WRITE ${PATHS.CONTEXT} to share learnings
|
|
13318
13350
|
- You ADAPT your approach to what the project requires
|
|
13319
13351
|
${PROMPT_TAGS.ROLE.close}`;
|
|
13320
13352
|
|
|
@@ -13725,15 +13757,13 @@ ${PROMPT_TAGS.SYNC_ISSUE_HANDLING.close}`;
|
|
|
13725
13757
|
var PLANNER_ROLE = `${PROMPT_TAGS.ROLE.open}
|
|
13726
13758
|
You are ${AGENT_NAMES.PLANNER}. Strategic planner and researcher.
|
|
13727
13759
|
|
|
13728
|
-
## Core Philosophy:
|
|
13729
|
-
|
|
13730
|
-
2. **PLAN** - Create TODO with parallel execution groups
|
|
13731
|
-
3. **DOCUMENT** - Cache research to ${PATHS.DOCS}/
|
|
13760
|
+
## Core Philosophy: ${PHILOSOPHY_TAGLINE}
|
|
13761
|
+
(Your focus: ${PHILOSOPHY_PHASES.EXPLORE} \u2192 ${PHILOSOPHY_PHASES.LEARN} \u2014 research and document)
|
|
13732
13762
|
|
|
13733
13763
|
## Your Identity
|
|
13734
13764
|
- You NEVER guess - you VERIFY with official documentation
|
|
13735
13765
|
- You READ ${PATHS.CONTEXT} to understand project's tech stack
|
|
13736
|
-
- You
|
|
13766
|
+
- You DOCUMENT findings to ${PATHS.DOCS}/ for future use
|
|
13737
13767
|
- You CREATE ${PATHS.TODO} with maximum parallelism
|
|
13738
13768
|
${PROMPT_TAGS.ROLE.close}`;
|
|
13739
13769
|
|
|
@@ -14011,10 +14041,8 @@ ${PROMPT_TAGS.TODO_SYNC.close}`;
|
|
|
14011
14041
|
var WORKER_ROLE = `${PROMPT_TAGS.ROLE.open}
|
|
14012
14042
|
You are ${AGENT_NAMES.WORKER}. Implementation specialist.
|
|
14013
14043
|
|
|
14014
|
-
## Core Philosophy:
|
|
14015
|
-
|
|
14016
|
-
2. **LEARN** - Understand project conventions and standards
|
|
14017
|
-
3. **IMPLEMENT** - Write code that fits naturally into the codebase
|
|
14044
|
+
## Core Philosophy: ${PHILOSOPHY_TAGLINE}
|
|
14045
|
+
(Your focus: ${PHILOSOPHY_PHASES.ADAPT} \u2192 ${PHILOSOPHY_PHASES.ACT} \u2014 implement with fit)
|
|
14018
14046
|
|
|
14019
14047
|
## Your Identity
|
|
14020
14048
|
- You READ ${PATHS.CONTEXT} to understand build/test commands
|
|
@@ -14400,15 +14428,13 @@ ${PROMPT_TAGS.FILE_ASSIGNMENT.close}`;
|
|
|
14400
14428
|
var REVIEWER_ROLE = `${PROMPT_TAGS.ROLE.open}
|
|
14401
14429
|
You are ${AGENT_NAMES.REVIEWER}. Verification specialist.
|
|
14402
14430
|
|
|
14403
|
-
## Core Philosophy:
|
|
14404
|
-
|
|
14405
|
-
2. **VERIFY** - Run actual build/test commands, compare with docs
|
|
14406
|
-
3. **APPROVE** - Mark [x] ONLY with concrete evidence
|
|
14431
|
+
## Core Philosophy: ${PHILOSOPHY_TAGLINE}
|
|
14432
|
+
(Your focus: ${PHILOSOPHY_PHASES.EXPLORE} \u2192 ${PHILOSOPHY_PHASES.LEARN} \u2192 ${PHILOSOPHY_PHASES.ACT} \u2014 verify with evidence)
|
|
14407
14433
|
|
|
14408
14434
|
## Your Identity
|
|
14409
14435
|
- You are the GATEKEEPER - nothing passes without evidence
|
|
14410
14436
|
- You READ ${PATHS.CONTEXT} to know correct build/test commands
|
|
14411
|
-
- You
|
|
14437
|
+
- You DOCUMENT findings to ${PATHS.SYNC_ISSUES} for fixes
|
|
14412
14438
|
- ONLY YOU can mark [x] in ${PATHS.TODO} after verification
|
|
14413
14439
|
${PROMPT_TAGS.ROLE.close}`;
|
|
14414
14440
|
|
|
@@ -14791,6 +14817,7 @@ ${PROMPT_TAGS.SYNC_VERIFICATION.close}`;
|
|
|
14791
14817
|
|
|
14792
14818
|
// src/agents/commander.ts
|
|
14793
14819
|
var systemPrompt = [
|
|
14820
|
+
CORE_PHILOSOPHY,
|
|
14794
14821
|
COMMANDER_ROLE,
|
|
14795
14822
|
COMMANDER_IDENTITY,
|
|
14796
14823
|
COMMANDER_FORBIDDEN,
|
|
@@ -14819,6 +14846,7 @@ var commander = {
|
|
|
14819
14846
|
|
|
14820
14847
|
// src/agents/subagents/planner.ts
|
|
14821
14848
|
var systemPrompt2 = [
|
|
14849
|
+
CORE_PHILOSOPHY,
|
|
14822
14850
|
PLANNER_ROLE,
|
|
14823
14851
|
PLANNER_FORBIDDEN,
|
|
14824
14852
|
PLANNER_REQUIRED,
|
|
@@ -14842,6 +14870,7 @@ var planner = {
|
|
|
14842
14870
|
|
|
14843
14871
|
// src/agents/subagents/worker.ts
|
|
14844
14872
|
var systemPrompt3 = [
|
|
14873
|
+
CORE_PHILOSOPHY,
|
|
14845
14874
|
WORKER_ROLE,
|
|
14846
14875
|
WORKER_FORBIDDEN,
|
|
14847
14876
|
WORKER_REQUIRED,
|
|
@@ -14866,6 +14895,7 @@ var worker = {
|
|
|
14866
14895
|
|
|
14867
14896
|
// src/agents/subagents/reviewer.ts
|
|
14868
14897
|
var systemPrompt4 = [
|
|
14898
|
+
CORE_PHILOSOPHY,
|
|
14869
14899
|
REVIEWER_ROLE,
|
|
14870
14900
|
REVIEWER_FORBIDDEN,
|
|
14871
14901
|
REVIEWER_REQUIRED,
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Core Philosophy Phases
|
|
3
|
+
*
|
|
4
|
+
* The 4-phase cycle: Explore → Learn → Adapt → Act
|
|
5
|
+
*/
|
|
6
|
+
export declare const PHILOSOPHY_PHASES: {
|
|
7
|
+
readonly EXPLORE: "EXPLORE";
|
|
8
|
+
readonly LEARN: "LEARN";
|
|
9
|
+
readonly ADAPT: "ADAPT";
|
|
10
|
+
readonly ACT: "ACT";
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Core philosophy tagline
|
|
14
|
+
*/
|
|
15
|
+
export declare const PHILOSOPHY_TAGLINE = "Explore \u2192 Learn \u2192 Adapt \u2192 Act";
|
|
16
|
+
export declare const PHILOSOPHY_QUOTE = "Like an astronaut landing on unknown planets \u2014 never assume, always discover.";
|
|
17
|
+
export declare const PHILOSOPHY_LEARN_PRINCIPLE = "LEARN = DOCUMENT: What you discover, you record. Your learnings become the team's knowledge.";
|
|
@@ -45,6 +45,10 @@ export declare const PROMPT_TAGS: {
|
|
|
45
45
|
readonly open: "<shared_workspace>";
|
|
46
46
|
readonly close: "</shared_workspace>";
|
|
47
47
|
};
|
|
48
|
+
readonly CORE_PHILOSOPHY: {
|
|
49
|
+
readonly open: "<core_philosophy>";
|
|
50
|
+
readonly close: "</core_philosophy>";
|
|
51
|
+
};
|
|
48
52
|
readonly TOOLS: {
|
|
49
53
|
readonly open: "<tools>";
|
|
50
54
|
readonly close: "</tools>";
|
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": "0.9.
|
|
5
|
+
"version": "0.9.35",
|
|
6
6
|
"author": "agnusdei1207",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"repository": {
|