opencode-orchestrator 0.9.31 → 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/README.md CHANGED
@@ -27,40 +27,53 @@ Then in OpenCode:
27
27
 
28
28
  ## 🧠 Core Philosophy
29
29
 
30
- > **Explore → Adapt → Act**
31
- > *Like a human exploring unknown space — never assume, always discover.*
32
-
33
- Behaves like an astronaut exploring the unknown.
34
- In unfamiliar environments: **detect without assuming**, **adapt to discoveries**, **act with confidence**.
30
+ > **Explore → Learn → Adapt → Act**
31
+ > *Like a human exploring unknown space — discover, document, adjust, execute.*
35
32
 
36
33
  ```
37
- ┌───────────────────────────────────────────────────────────┐
38
-
39
- 🔍 EXPLORE → 🔄 ADAPT → ⚡ ACT
40
-
41
- Scan the Adjust to Execute with
42
- unknown what you find confidence
43
-
44
- └───────────────────────────────────────────────────────────┘
34
+ ┌──────────────────────────────────────────────────────────────────────────────────────┐
35
+
36
+ 🔍 EXPLORE → 📝 LEARN → 🔄 ADAPT → ⚡ ACT
37
+
38
+ Scan unknown Document Adjust Execute with
39
+ territory discoveries behavior confidence
40
+
41
+ │ • Read context • Record patterns • Match style • Build it │
42
+ │ • Detect stack • Note conventions • Fit the project • Test it │
43
+ │ • Find commands • Log findings • Apply learnings • Seal it │
44
+ │ │
45
+ └──────────────────────────────────────────────────────────────────────────────────────┘
45
46
  ```
46
47
 
47
- ### Agents & Their Philosophy
48
+ ### 🛸 The Astronaut Principle
49
+
50
+ Agents behave like astronauts landing on unknown planets:
51
+
52
+ - **Never assume gravity** — Always detect the environment first
53
+ - **Document everything** — Record discoveries for future missions
54
+ - **Adapt to atmosphere** — Adjust behavior based on learnings
55
+ - **Act with confidence** — Execute precisely once the terrain is mapped
48
56
 
49
- | Agent | Role | Philosophy |
50
- |:-----:|:-----|:-----------|
51
- | 🎯 **Commander** | Orchestrator | Discover project → Delegate intelligently → Loop until sealed |
52
- | 📋 **Planner** | Strategist | Research docs → Plan with parallelism → Document findings |
53
- | 🔨 **Worker** | Implementer | Observe patterns → Learn conventions → Implement with fit |
54
- | ✅ **Reviewer** | Gatekeeper | Read standards → Run tests → Approve with evidence |
57
+ This is **real-time adaptation**. Not pre-programmed scripts, but **living intelligence that transforms based on context**.
58
+
59
+ ### 🎭 Agents & Their Adaptive Behavior
60
+
61
+ | Agent | Mission | Adaptive Behavior |
62
+ |:-----:|:--------|:------------------|
63
+ | 🎯 **Commander** | Orchestration | Discover project reality → Delegate dynamically → Loop until sealed |
64
+ | 📋 **Planner** | Strategy | Research actual docs → Plan parallel paths → Document findings |
65
+ | 🔨 **Worker** | Implementation | Observe patterns → Learn conventions → Implement with fit |
66
+ | ✅ **Reviewer** | Verification | Read real standards → Run actual tests → Approve with evidence |
55
67
 
56
68
  ### Guiding Principles
57
69
 
58
- | Principle | Practice |
59
- |:----------|:---------|
60
- | 🔍 **Discover, Don't Assume** | Read `context.md`, detect tech stack, find build/test commands |
61
- | 📚 **Evidence Over Memory** | Cite docs, run actual commands, complete only with proof |
62
- | 🔄 **Adapt to the Project** | Match existing patterns, follow discovered conventions |
63
- | 🤝 **Separation of Concerns** | Each agent does one thing excellently |
70
+ | Principle | Adaptive Practice |
71
+ |:----------|:------------------|
72
+ | 🔍 **Discover, Don't Assume** | Read `context.md`, detect stack, find actual commands |
73
+ | 📝 **Learn & Document** | Record patterns, conventions, and findings for reuse |
74
+ | 📚 **Evidence Over Memory** | Cite docs, run commands, complete only with proof |
75
+ | 🔄 **Transform with Context** | Behavior evolves based on documented learnings |
76
+ | 🤝 **Separation of Concerns** | Each agent masters one domain excellently |
64
77
 
65
78
  ---
66
79
 
@@ -106,6 +119,7 @@ In unfamiliar environments: **detect without assuming**, **adapt to discoveries*
106
119
  | 🔗 **Real-Time Sync** | Shared `.opencode/` state across all agents |
107
120
  | 🛡️ **Auto Verification** | E2E tests, import checks, integration validation |
108
121
  | 🩹 **Self-Healing** | Auto-recovery with 3 retries per session |
122
+ | 🧬 **Adaptive Intelligence** | Agents evolve behavior based on discoveries |
109
123
 
110
124
  ### Self-Healing Details
111
125
 
@@ -141,14 +155,6 @@ In unfamiliar environments: **detect without assuming**, **adapt to discoveries*
141
155
 
142
156
  ---
143
157
 
144
- ## 🗑️ Uninstall
145
-
146
- ```bash
147
- npm uninstall -g opencode-orchestrator
148
- ```
149
-
150
- ---
151
-
152
158
  ## 🎹 Developer's Words
153
159
 
154
160
  <div align="center">
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Commander Role Definition
3
3
  *
4
- * The orchestrator who explores, adapts, and acts.
4
+ * The orchestrator who explores, learns, adapts, and acts.
5
5
  */
6
6
  export declare const COMMANDER_ROLE: string;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Core Philosophy
3
+ *
4
+ * The fundamental principle all agents share:
5
+ * Explore → Learn → Adapt → Act
6
+ *
7
+ * Learn = Document. What you discover, you record for future use.
8
+ */
9
+ export declare const CORE_PHILOSOPHY: string;
@@ -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";
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Planner Role
3
3
  *
4
- * The strategist who researches before planning.
4
+ * The strategist who explores and learns before planning.
5
5
  */
6
6
  export declare const PLANNER_ROLE: string;
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Worker Role
3
3
  *
4
- * The implementer who observes before coding.
4
+ * The implementer who adapts and acts.
5
5
  */
6
6
  export declare const WORKER_ROLE: string;
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: EXPLORE \u2192 ADAPT \u2192 ACT
13310
- 1. **EXPLORE** - Discover project structure, environment, and context
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 - delegate, coordinate, and verify
13347
+ - You ORCHESTRATE - explore, learn, delegate, verify
13316
13348
  - You NEVER stop until the mission is SEALED
13317
- - You READ ${PATHS.CONTEXT} to understand each project's unique needs
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: RESEARCH \u2192 PLAN \u2192 DOCUMENT
13729
- 1. **RESEARCH** - Find official docs, verify syntax, check versions
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 ADAPT plans to match project's existing patterns
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: OBSERVE \u2192 LEARN \u2192 IMPLEMENT
14015
- 1. **OBSERVE** - Study existing code patterns before writing
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: UNDERSTAND \u2192 VERIFY \u2192 APPROVE
14404
- 1. **UNDERSTAND** - Read ${PATHS.CONTEXT} to know project's standards
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 COMPARE code with ${PATHS.DOCS}/ for correctness
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,
@@ -3,3 +3,4 @@
3
3
  */
4
4
  export { PROMPT_TAGS, wrapTag } from "./tags.js";
5
5
  export { WORK_STATUS } from "./status.js";
6
+ export { PHILOSOPHY_PHASES, PHILOSOPHY_TAGLINE, PHILOSOPHY_QUOTE, PHILOSOPHY_LEARN_PRINCIPLE } from "./philosophy.js";
@@ -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.31",
5
+ "version": "0.9.35",
6
6
  "author": "agnusdei1207",
7
7
  "license": "MIT",
8
8
  "repository": {