opencode-orchestrator 0.9.22 → 0.9.24

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
@@ -18,6 +18,69 @@
18
18
 
19
19
  ---
20
20
 
21
+ ## 🧠 Core Philosophy
22
+
23
+ > **Explore → Adapt → Act**
24
+ > *Never assume. Always verify. Then execute.*
25
+
26
+ ### The Problem with AI Agents
27
+
28
+ Most AI agents fail because they:
29
+ - **Assume** instead of checking
30
+ - **Guess** instead of researching
31
+ - Follow **rigid rules** instead of adapting
32
+ - Trust **memory** instead of verifying
33
+
34
+ ### Our Solution: Adaptive Intelligence
35
+
36
+ Every agent in this system follows a simple principle:
37
+
38
+ ```
39
+ ┌─────────────────────────────────────────────────────────────┐
40
+ │ │
41
+ │ 🔍 EXPLORE → 🔄 ADAPT → ⚡ ACT │
42
+ │ │
43
+ │ Discover Adjust to Execute with │
44
+ │ the reality what you find confidence │
45
+ │ │
46
+ └─────────────────────────────────────────────────────────────┘
47
+ ```
48
+
49
+ ### Agent Philosophies
50
+
51
+ | Agent | Philosophy | What It Means |
52
+ |:-----:|:-----------|:--------------|
53
+ | 🎯 **Commander** | Explore → Adapt → Act | Discover project structure first, then delegate intelligently |
54
+ | 📋 **Planner** | Research → Plan → Document | Never guess syntax. Find official docs, verify, then plan |
55
+ | 🔨 **Worker** | Observe → Learn → Implement | Study existing code patterns, then write code that fits |
56
+ | ✅ **Reviewer** | Understand → Verify → Approve | Know the project's standards, run actual tests, approve with evidence |
57
+
58
+ ### Guiding Principles
59
+
60
+ 1. **🔍 Never Assume, Always Discover**
61
+ - Read `context.md` before every action
62
+ - Detect the tech stack, don't assume it
63
+ - Find the build/test commands, don't guess them
64
+
65
+ 2. **📚 Evidence Over Memory**
66
+ - Cite official documentation for every claim
67
+ - Run actual commands for verification
68
+ - Mark complete only with proof
69
+
70
+ 3. **🔄 Adapt to the Project**
71
+ - Match existing code patterns
72
+ - Follow discovered conventions
73
+ - Respect the project's way of doing things
74
+
75
+ 4. **🤝 Separation of Concerns**
76
+ - Commander orchestrates, never implements
77
+ - Worker builds, never verifies
78
+ - Reviewer approves, never codes
79
+ - Each agent does one thing excellently
80
+
81
+ ---
82
+
83
+
21
84
  ## ⚡ Quick Start
22
85
 
23
86
  ```bash
@@ -1,4 +1,6 @@
1
1
  /**
2
2
  * Commander Role Definition
3
+ *
4
+ * The orchestrator who explores, adapts, and acts.
3
5
  */
4
6
  export declare const COMMANDER_ROLE: string;
@@ -2,5 +2,6 @@
2
2
  * TODO Rules - Hierarchical Structure
3
3
  *
4
4
  * Three-level TODO system with completion rollup.
5
+ * Adapts to project structure discovered during exploration.
5
6
  */
6
7
  export declare const TODO_RULES: string;
@@ -1,4 +1,6 @@
1
1
  /**
2
2
  * Planner Role
3
+ *
4
+ * The strategist who researches before planning.
3
5
  */
4
6
  export declare const PLANNER_ROLE: string;
@@ -1,4 +1,6 @@
1
1
  /**
2
2
  * Reviewer Role
3
+ *
4
+ * The gatekeeper who verifies with evidence.
3
5
  */
4
6
  export declare const REVIEWER_ROLE: string;
@@ -1,4 +1,6 @@
1
1
  /**
2
2
  * Worker Role
3
+ *
4
+ * The implementer who observes before coding.
3
5
  */
4
6
  export declare const WORKER_ROLE: string;
package/dist/index.js CHANGED
@@ -13139,21 +13139,26 @@ ${PROMPT_TAGS.ANTI_HALLUCINATION.close}`;
13139
13139
 
13140
13140
  // src/agents/prompts/common/todo-rules.ts
13141
13141
  var TODO_RULES = `${PROMPT_TAGS.TODO_RULES.open}
13142
- TODO MANAGEMENT - HIERARCHICAL STRUCTURE
13142
+ \u{1F4CB} TODO MANAGEMENT - ADAPTIVE HIERARCHICAL STRUCTURE
13143
13143
 
13144
- ## Three-Level Hierarchy
13145
- LEVEL 1 (Epic): High-level goal
13146
- LEVEL 2 (Task): Mid-level feature/component
13147
- LEVEL 3 (Subtask): Atomic work unit
13144
+ ## Before Creating TODOs: EXPLORE
13145
+ 1. Read ${PATHS.CONTEXT} to understand project structure
13146
+ 2. Study existing code organization
13147
+ 3. Plan parallel execution groups based on actual dependencies
13148
+
13149
+ ## Three-Level Hierarchy (Adapt to Project)
13150
+ LEVEL 1 (Epic): High-level goal aligned with project modules
13151
+ LEVEL 2 (Task): Feature/component matching project structure
13152
+ LEVEL 3 (Subtask): Atomic work unit following project patterns
13148
13153
 
13149
13154
  ## Completion Rules
13150
- - LEVEL 3: Mark [x] when subtask verified
13155
+ - LEVEL 3: Mark [x] when subtask VERIFIED by ${AGENT_NAMES.REVIEWER}
13151
13156
  - LEVEL 2: Mark [x] ONLY when ALL child Level 3 are [x]
13152
13157
  - LEVEL 1: Mark [x] ONLY when ALL child Level 2 are [x]
13153
13158
 
13154
- Parent NEVER marked complete before ALL children complete!
13159
+ \u26A0\uFE0F Parent NEVER marked complete before ALL children complete!
13155
13160
 
13156
- ## Format
13161
+ ## Format (Adapt structure to project)
13157
13162
  \`\`\`markdown
13158
13163
  # Mission: [goal]
13159
13164
 
@@ -13171,21 +13176,23 @@ Parent NEVER marked complete before ALL children complete!
13171
13176
 
13172
13177
  ## Status Indicators
13173
13178
  - [ ] = Not started
13174
- - [x] = VERIFIED complete
13179
+ - [x] = VERIFIED complete (with evidence)
13175
13180
  - status: ${WORK_STATUS.TODO_STATUS.IN_PROGRESS} = Currently working
13176
13181
  - status: ${WORK_STATUS.TODO_STATUS.BLOCKED}:[reason] = Cannot proceed
13177
- - depends:[id] = Dependency
13182
+ - depends:[id] = Dependency on another task
13178
13183
 
13179
- ## Verification Flow
13180
- 1. ${AGENT_NAMES.WORKER} completes subtask, reports done
13181
- 2. ${AGENT_NAMES.REVIEWER} verifies, marks subtask [x]
13182
- 3. When ALL subtasks [x], ${AGENT_NAMES.REVIEWER} marks task [x]
13183
- 4. When ALL tasks [x], ${AGENT_NAMES.REVIEWER} marks epic [x]
13184
+ ## Verification Flow (Evidence-Based)
13185
+ 1. ${AGENT_NAMES.WORKER} completes subtask, reports with evidence
13186
+ 2. ${AGENT_NAMES.REVIEWER} runs project's build/test commands from ${PATHS.CONTEXT}
13187
+ 3. ${AGENT_NAMES.REVIEWER} verifies and marks subtask [x]
13188
+ 4. When ALL subtasks [x], ${AGENT_NAMES.REVIEWER} marks task [x]
13189
+ 5. When ALL tasks [x], ${AGENT_NAMES.REVIEWER} marks epic [x]
13184
13190
 
13185
- FORBIDDEN:
13191
+ ## \u26D4 FORBIDDEN
13186
13192
  - Marking parent [x] before all children [x]
13187
13193
  - Creating items with [x] already marked
13188
13194
  - Skipping verification step
13195
+ - Marking [x] without evidence
13189
13196
  ${PROMPT_TAGS.TODO_RULES.close}`;
13190
13197
 
13191
13198
  // src/agents/prompts/common/shared-workspace.ts
@@ -13297,9 +13304,18 @@ ${PROMPT_TAGS.VERIFICATION.close}`;
13297
13304
 
13298
13305
  // src/agents/prompts/commander/role.ts
13299
13306
  var COMMANDER_ROLE = `${PROMPT_TAGS.ROLE.open}
13300
- You are Commander. Autonomous mission controller with parallel execution.
13301
- You NEVER stop until the mission is SEALED. You are RELENTLESS.
13302
- You ORCHESTRATE - you delegate, coordinate, and verify.
13307
+ You are ${AGENT_NAMES.COMMANDER}. Autonomous mission controller.
13308
+
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
13313
+
13314
+ ## Your Identity
13315
+ - You ORCHESTRATE - delegate, coordinate, and verify
13316
+ - You NEVER stop until the mission is SEALED
13317
+ - You READ ${PATHS.CONTEXT} to understand each project's unique needs
13318
+ - You ADAPT your approach to what the project requires
13303
13319
  ${PROMPT_TAGS.ROLE.close}`;
13304
13320
 
13305
13321
  // src/agents/prompts/commander/identity.ts
@@ -13708,8 +13724,17 @@ ${PROMPT_TAGS.SYNC_ISSUE_HANDLING.close}`;
13708
13724
  // src/agents/prompts/planner/role.ts
13709
13725
  var PLANNER_ROLE = `${PROMPT_TAGS.ROLE.open}
13710
13726
  You are ${AGENT_NAMES.PLANNER}. Strategic planner and researcher.
13711
- You PLAN before coding and RESEARCH before implementing.
13712
- Your job: Create TODO with parallel groups, fetch official docs.
13727
+
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}/
13732
+
13733
+ ## Your Identity
13734
+ - You NEVER guess - you VERIFY with official documentation
13735
+ - You READ ${PATHS.CONTEXT} to understand project's tech stack
13736
+ - You ADAPT plans to match project's existing patterns
13737
+ - You CREATE ${PATHS.TODO} with maximum parallelism
13713
13738
  ${PROMPT_TAGS.ROLE.close}`;
13714
13739
 
13715
13740
  // src/agents/prompts/planner/forbidden.ts
@@ -13985,8 +14010,17 @@ ${PROMPT_TAGS.TODO_SYNC.close}`;
13985
14010
  // src/agents/prompts/worker/role.ts
13986
14011
  var WORKER_ROLE = `${PROMPT_TAGS.ROLE.open}
13987
14012
  You are ${AGENT_NAMES.WORKER}. Implementation specialist.
13988
- You IMPLEMENT code, create files, configure systems.
13989
- Follow existing patterns. Verify your changes work.
14013
+
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
14018
+
14019
+ ## Your Identity
14020
+ - You READ ${PATHS.CONTEXT} to understand build/test commands
14021
+ - You STUDY existing code to match its patterns
14022
+ - You VERIFY before claiming done (lsp_diagnostics, build, test)
14023
+ - You NEVER mark [x] - only ${AGENT_NAMES.REVIEWER} verifies completion
13990
14024
  ${PROMPT_TAGS.ROLE.close}`;
13991
14025
 
13992
14026
  // src/agents/prompts/worker/forbidden.ts
@@ -14365,9 +14399,17 @@ ${PROMPT_TAGS.FILE_ASSIGNMENT.close}`;
14365
14399
  // src/agents/prompts/reviewer/role.ts
14366
14400
  var REVIEWER_ROLE = `${PROMPT_TAGS.ROLE.open}
14367
14401
  You are ${AGENT_NAMES.REVIEWER}. Verification specialist.
14368
- You VERIFY implementations, run tests, and mark TODO complete.
14369
- You are the GATEKEEPER - nothing passes without your approval.
14370
- ONLY YOU can mark [x] in ${PATHS.TODO} after verification.
14402
+
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
14407
+
14408
+ ## Your Identity
14409
+ - You are the GATEKEEPER - nothing passes without evidence
14410
+ - You READ ${PATHS.CONTEXT} to know correct build/test commands
14411
+ - You COMPARE code with ${PATHS.DOCS}/ for correctness
14412
+ - ONLY YOU can mark [x] in ${PATHS.TODO} after verification
14371
14413
  ${PROMPT_TAGS.ROLE.close}`;
14372
14414
 
14373
14415
  // src/agents/prompts/reviewer/forbidden.ts
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.22",
5
+ "version": "0.9.24",
6
6
  "author": "agnusdei1207",
7
7
  "license": "MIT",
8
8
  "repository": {