@doingdev/opencode-claude-manager-plugin 0.1.26 → 0.1.28

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.
@@ -1,14 +1,16 @@
1
1
  /**
2
- * Agent hierarchy configuration for the CTO Manager Engineer architecture.
2
+ * Agent hierarchy configuration for the CTO + Engineer Wrapper architecture.
3
3
  *
4
- * CTO (cto) direction-setting, orchestration, spawns managers
5
- * Manager (manager) operates Claude Code engineer via persistent session
6
- * Engineer the Claude Code session itself (prompt only, no OpenCode agent)
4
+ * CTO (cto) pure orchestrator, spawns engineers, reviews diffs, commits
5
+ * Engineer Plan (engineer_plan) manages a Claude Code session for read-only investigation
6
+ * Engineer Build (engineer_build) manages a Claude Code session for implementation
7
+ * Claude Code session — the underlying AI session (prompt only, no OpenCode agent)
7
8
  */
8
9
  import type { ManagerPromptRegistry } from '../types/contracts.js';
9
10
  export declare const AGENT_CTO = "cto";
10
- export declare const AGENT_MANAGER = "manager";
11
- /** All restricted tool IDs (union of engineer + git + approval) */
11
+ export declare const AGENT_ENGINEER_PLAN = "engineer_plan";
12
+ export declare const AGENT_ENGINEER_BUILD = "engineer_build";
13
+ /** All restricted tool IDs (union of all domain groups) */
12
14
  export declare const ALL_RESTRICTED_TOOL_IDS: readonly ["engineer_send", "engineer_compact", "engineer_clear", "engineer_status", "engineer_metadata", "engineer_sessions", "engineer_runs", "git_diff", "git_commit", "git_reset", "approval_policy", "approval_decisions", "approval_update"];
13
15
  type ToolPermission = 'allow' | 'ask' | 'deny';
14
16
  type AgentPermission = {
@@ -35,7 +37,14 @@ export declare function buildCtoAgentConfig(prompts: ManagerPromptRegistry): {
35
37
  permission: AgentPermission;
36
38
  prompt: string;
37
39
  };
38
- export declare function buildManagerAgentConfig(prompts: ManagerPromptRegistry): {
40
+ export declare function buildEngineerPlanAgentConfig(prompts: ManagerPromptRegistry): {
41
+ description: string;
42
+ mode: "subagent";
43
+ color: string;
44
+ permission: AgentPermission;
45
+ prompt: string;
46
+ };
47
+ export declare function buildEngineerBuildAgentConfig(prompts: ManagerPromptRegistry): {
39
48
  description: string;
40
49
  mode: "subagent";
41
50
  color: string;
@@ -1,19 +1,21 @@
1
1
  /**
2
- * Agent hierarchy configuration for the CTO Manager Engineer architecture.
2
+ * Agent hierarchy configuration for the CTO + Engineer Wrapper architecture.
3
3
  *
4
- * CTO (cto) direction-setting, orchestration, spawns managers
5
- * Manager (manager) operates Claude Code engineer via persistent session
6
- * Engineer the Claude Code session itself (prompt only, no OpenCode agent)
4
+ * CTO (cto) pure orchestrator, spawns engineers, reviews diffs, commits
5
+ * Engineer Plan (engineer_plan) manages a Claude Code session for read-only investigation
6
+ * Engineer Build (engineer_build) manages a Claude Code session for implementation
7
+ * Claude Code session — the underlying AI session (prompt only, no OpenCode agent)
7
8
  */
8
9
  // ---------------------------------------------------------------------------
9
10
  // Agent names
10
11
  // ---------------------------------------------------------------------------
11
12
  export const AGENT_CTO = 'cto';
12
- export const AGENT_MANAGER = 'manager';
13
+ export const AGENT_ENGINEER_PLAN = 'engineer_plan';
14
+ export const AGENT_ENGINEER_BUILD = 'engineer_build';
13
15
  // ---------------------------------------------------------------------------
14
16
  // Tool IDs — grouped by domain
15
17
  // ---------------------------------------------------------------------------
16
- /** Engineer-facing session tools */
18
+ /** All engineer tools — session interaction + diagnostics. Owned by wrappers. */
17
19
  const ENGINEER_TOOL_IDS = [
18
20
  'engineer_send',
19
21
  'engineer_compact',
@@ -23,20 +25,22 @@ const ENGINEER_TOOL_IDS = [
23
25
  'engineer_sessions',
24
26
  'engineer_runs',
25
27
  ];
26
- /** Git tools */
28
+ /** Git tools — owned by CTO */
27
29
  const GIT_TOOL_IDS = ['git_diff', 'git_commit', 'git_reset'];
28
- /** Approval tools */
30
+ /** Approval tools — owned by CTO */
29
31
  const APPROVAL_TOOL_IDS = [
30
32
  'approval_policy',
31
33
  'approval_decisions',
32
34
  'approval_update',
33
35
  ];
34
- /** All restricted tool IDs (union of engineer + git + approval) */
36
+ /** All restricted tool IDs (union of all domain groups) */
35
37
  export const ALL_RESTRICTED_TOOL_IDS = [
36
38
  ...ENGINEER_TOOL_IDS,
37
39
  ...GIT_TOOL_IDS,
38
40
  ...APPROVAL_TOOL_IDS,
39
41
  ];
42
+ /** Tools the CTO can use directly (git + approval only, NO engineer tools) */
43
+ const CTO_TOOL_IDS = [...GIT_TOOL_IDS, ...APPROVAL_TOOL_IDS];
40
44
  // ---------------------------------------------------------------------------
41
45
  // Shared read-only tool permissions
42
46
  // ---------------------------------------------------------------------------
@@ -54,27 +58,36 @@ const READONLY_TOOLS = {
54
58
  // ---------------------------------------------------------------------------
55
59
  // Permission builders
56
60
  // ---------------------------------------------------------------------------
57
- /** CTO: orchestration onlyexplicitly denies every restricted tool, no edit, no bash. */
61
+ /** CTO: pure orchestratorread-only + git + approval + diagnostics. No session tools. */
58
62
  function buildCtoPermissions() {
59
63
  const denied = {};
60
64
  for (const toolId of ALL_RESTRICTED_TOOL_IDS) {
61
65
  denied[toolId] = 'deny';
62
66
  }
67
+ const allowed = {};
68
+ for (const toolId of CTO_TOOL_IDS) {
69
+ allowed[toolId] = 'allow';
70
+ }
63
71
  return {
64
72
  '*': 'deny',
65
73
  ...READONLY_TOOLS,
66
74
  ...denied,
75
+ ...allowed,
67
76
  };
68
77
  }
69
- /** Manager: full restricted tool surface + read-only codebase tools. No edit, no bash. */
70
- function buildManagerPermissions() {
71
- const allowed = {};
78
+ /** Engineer wrapper: all engineer tools. No read-only, git, or approval tools. */
79
+ function buildEngineerWrapperPermissions() {
80
+ const denied = {};
72
81
  for (const toolId of ALL_RESTRICTED_TOOL_IDS) {
82
+ denied[toolId] = 'deny';
83
+ }
84
+ const allowed = {};
85
+ for (const toolId of ENGINEER_TOOL_IDS) {
73
86
  allowed[toolId] = 'allow';
74
87
  }
75
88
  return {
76
89
  '*': 'deny',
77
- ...READONLY_TOOLS,
90
+ ...denied,
78
91
  ...allowed,
79
92
  };
80
93
  }
@@ -83,20 +96,29 @@ function buildManagerPermissions() {
83
96
  // ---------------------------------------------------------------------------
84
97
  export function buildCtoAgentConfig(prompts) {
85
98
  return {
86
- description: 'CTO agent that sets direction and orchestrates work by spawning manager subagents. Does not operate Claude Code directly.',
99
+ description: 'Pure orchestrator that investigates, spawns engineers for planning and building, reviews diffs, and commits.',
87
100
  mode: 'primary',
88
101
  color: '#D97757',
89
102
  permission: buildCtoPermissions(),
90
103
  prompt: prompts.ctoSystemPrompt,
91
104
  };
92
105
  }
93
- export function buildManagerAgentConfig(prompts) {
106
+ export function buildEngineerPlanAgentConfig(prompts) {
107
+ return {
108
+ description: 'Engineer that manages a Claude Code session in plan mode for read-only investigation and analysis.',
109
+ mode: 'subagent',
110
+ color: '#D97757',
111
+ permission: buildEngineerWrapperPermissions(),
112
+ prompt: prompts.engineerPlanPrompt,
113
+ };
114
+ }
115
+ export function buildEngineerBuildAgentConfig(prompts) {
94
116
  return {
95
- description: 'Manager agent that operates Claude Code through a persistent session, reviews work via git diff, and commits/resets changes.',
117
+ description: 'Engineer that manages a Claude Code session in free mode for implementation and execution.',
96
118
  mode: 'subagent',
97
119
  color: '#D97757',
98
- permission: buildManagerPermissions(),
99
- prompt: prompts.managerSystemPrompt,
120
+ permission: buildEngineerWrapperPermissions(),
121
+ prompt: prompts.engineerBuildPrompt,
100
122
  };
101
123
  }
102
124
  // ---------------------------------------------------------------------------
@@ -1,6 +1,6 @@
1
1
  import { tool } from '@opencode-ai/plugin';
2
2
  import { managerPromptRegistry } from '../prompts/registry.js';
3
- import { AGENT_CTO, AGENT_MANAGER, buildCtoAgentConfig, buildManagerAgentConfig, denyRestrictedToolsGlobally, } from './agent-hierarchy.js';
3
+ import { AGENT_CTO, AGENT_ENGINEER_BUILD, AGENT_ENGINEER_PLAN, buildCtoAgentConfig, buildEngineerBuildAgentConfig, buildEngineerPlanAgentConfig, denyRestrictedToolsGlobally, } from './agent-hierarchy.js';
4
4
  import { getOrCreatePluginServices } from './service-factory.js';
5
5
  export const ClaudeManagerPlugin = async ({ worktree }) => {
6
6
  const services = getOrCreatePluginServices(worktree);
@@ -10,7 +10,8 @@ export const ClaudeManagerPlugin = async ({ worktree }) => {
10
10
  config.permission ??= {};
11
11
  denyRestrictedToolsGlobally(config.permission);
12
12
  config.agent[AGENT_CTO] ??= buildCtoAgentConfig(managerPromptRegistry);
13
- config.agent[AGENT_MANAGER] ??= buildManagerAgentConfig(managerPromptRegistry);
13
+ config.agent[AGENT_ENGINEER_PLAN] ??= buildEngineerPlanAgentConfig(managerPromptRegistry);
14
+ config.agent[AGENT_ENGINEER_BUILD] ??= buildEngineerBuildAgentConfig(managerPromptRegistry);
14
15
  },
15
16
  tool: {
16
17
  engineer_send: tool({
@@ -1,70 +1,34 @@
1
1
  export const managerPromptRegistry = {
2
2
  ctoSystemPrompt: [
3
- 'You are the CTO — you set direction and orchestrate, but you never execute directly.',
3
+ 'You are the CTO — a top 0.001% technical leader.',
4
+ 'You orchestrate engineers to build the right thing with high quality.',
5
+ 'You investigate, clarify requirements, plan, delegate to engineers,',
6
+ 'review their work, and commit when satisfied.',
4
7
  '',
5
8
  '## Your role',
6
- "- Analyze the user's request and break it into focused slices of work.",
7
- '- Spawn one or more `manager` subagents, each with a clear, scoped objective.',
8
- '- Each `manager` has its own Claude Code persistent session and can investigate,',
9
- ' delegate to the engineer, review diffs, and commit.',
10
- '- Review subagent results and synthesize them for the user.',
11
- '',
12
- '## What you can do',
13
- '- Read files, grep, and search the codebase to understand the problem.',
14
- '- Use webfetch / websearch for external context.',
15
- '- Use todowrite / todoread to track high-level progress.',
16
- '- Ask the user structured questions when decisions require their input.',
17
- '',
18
- '## What you must NOT do',
19
- '- Do NOT call any engineer_*, git_*, or approval_* tools. You do not operate Claude Code directly.',
20
- '- Do NOT edit files, run bash commands, or make code changes yourself.',
21
- '- Do NOT micro-manage subagents — give them clear objectives and let them execute.',
22
- '',
23
- '## Spawning subagents',
24
- '- Spawn a `manager` subagent for each independent slice of work.',
25
- '- If slices are independent, spawn them in parallel.',
26
- '- Provide each subagent with:',
27
- ' 1. A clear, scoped objective.',
28
- ' 2. Relevant file paths, function names, and context you gathered.',
29
- ' 3. Success criteria so the subagent knows when it is done.',
30
- '- For sequential work, wait for one subagent to finish before spawning the next.',
31
- '',
32
- '## After subagents complete',
33
- '- Review what each subagent accomplished.',
34
- '- If something is wrong, spawn a new subagent with a targeted correction.',
35
- '- Synthesize results and report to the user.',
36
- '',
37
- '## Handling ambiguity',
38
- 'When requirements are unclear:',
39
- '1. First, try to resolve it yourself — read code, check tests, grep for usage.',
40
- '2. If ambiguity remains, ask the user ONE specific question.',
41
- ' Prefer the question tool when discrete options exist.',
42
- '3. Never block on multiple questions at once.',
43
- ].join('\n'),
44
- managerSystemPrompt: [
45
- 'You are a manager operating a Claude Code engineer through a persistent session.',
46
- 'Your job is to make the engineer do the work — not to write code yourself.',
47
- 'Think like a staff engineer: correctness, maintainability, tests, rollback safety,',
48
- 'and clear communication to the user.',
9
+ '- Gather requirements thoroughly before acting. Clarify ambiguity early.',
10
+ '- Think like a staff+ engineer: correctness, maintainability, tests, rollback safety.',
11
+ '- Plan thoughtfully, delegate with precision, review rigorously.',
12
+ '- You have two types of engineers: `engineer_plan` (investigation) and `engineer_build` (implementation).',
49
13
  '',
50
14
  '## Decision loop',
51
15
  'On every turn, choose exactly one action:',
52
16
  ' investigate — read files, grep, search the codebase to build context',
53
- ' delegate send a focused instruction to the engineer via engineer_send',
54
- ' review run git_diff to inspect what changed',
55
- ' validate tell the engineer to run tests, lint, or typecheck',
17
+ ' plan spawn `engineer_plan` to analyze code, map dependencies, or draft a plan',
18
+ ' delegate spawn `engineer_build` with a focused implementation task',
19
+ ' review run git_diff to inspect what the engineer changed',
20
+ ' validate — spawn `engineer_build` to run tests, lint, or typecheck',
56
21
  ' commit — checkpoint good work with git_commit',
57
- ' correct — send a targeted fix instruction (never "try again")',
22
+ ' correct — spawn `engineer_build` with a targeted fix (never "try again")',
58
23
  ' reset — discard bad work with git_reset',
59
24
  ' ask — use the question tool for structured choices, or one narrow text question',
60
25
  '',
61
- 'Default order: investigate → delegate → review → validate → commit.',
26
+ 'Default order: investigate → plan → delegate → review → validate → commit.',
62
27
  'Skip steps only when you have strong evidence they are unnecessary.',
63
28
  '',
64
29
  '## Before you delegate',
65
- '1. Read the relevant files yourself (you have read, grep, glob).',
66
- ' For broad investigations, scope them narrowly or use subagents to avoid',
67
- ' polluting your own context with excessive file contents.',
30
+ '1. Read the relevant files yourself (you have read, grep, glob, webfetch, websearch).',
31
+ ' For broad investigations, spawn `engineer_plan`.',
68
32
  '2. Identify the exact files, functions, line numbers, and patterns involved.',
69
33
  '3. Check existing conventions: naming, test style, error handling patterns.',
70
34
  '4. Craft an instruction that a senior engineer would find unambiguous.',
@@ -80,76 +44,47 @@ export const managerPromptRegistry = {
80
44
  ' - Unintended changes or regressions',
81
45
  ' - Missing test updates',
82
46
  ' - Style violations against repo conventions',
83
- '3. If changes look correct, tell the engineer to run tests/lint/typecheck.',
47
+ '3. If changes look correct, spawn `engineer_build` to run tests/lint/typecheck.',
84
48
  '4. Only commit after verification passes.',
85
- '5. If the diff is wrong: send a specific correction or reset.',
49
+ '5. If the diff is wrong: spawn a targeted correction or reset.',
50
+ '',
51
+ '## Spawning engineers',
52
+ '- `engineer_plan` — read-only investigation and analysis.',
53
+ ' Use for: exploring unfamiliar code, analyzing dependencies, generating plans.',
54
+ '- `engineer_build` — implementation and execution.',
55
+ ' Use for: all code changes, test runs, validation, and fixes.',
56
+ '- Provide each engineer with a clear, scoped objective and relevant context.',
57
+ '- Engineers manage their own sessions. They handle context, compaction, model selection.',
58
+ ' You do NOT need to manage these details.',
59
+ '- If slices are independent, spawn them in parallel.',
60
+ '',
61
+ '## What you must NOT do',
62
+ '- Do NOT call any engineer_* tools directly. Spawn engineer subagents instead.',
63
+ '- Do NOT edit files or run bash commands yourself.',
86
64
  '',
87
65
  '## Handling ambiguity',
88
66
  'When requirements are unclear:',
89
67
  '1. First, try to resolve it yourself — read code, check tests, grep for usage.',
90
68
  '2. If ambiguity remains, ask the user ONE specific question.',
91
- ' Prefer the question tool when discrete options exist (OpenCode shows choices in the UI).',
92
- ' Bad: "What should I do?"',
93
- ' Good: "The `UserService` has both `deactivate()` and `softDelete()` —',
94
- ' should the new endpoint use deactivation (reversible) or',
95
- ' soft-delete (audit-logged)?"',
69
+ ' Prefer the question tool when discrete options exist.',
96
70
  '3. Never block on multiple questions at once.',
97
71
  '',
98
72
  '## Correction and recovery',
99
73
  'If the engineer produces wrong output:',
100
- '1. First correction: send a specific, targeted fix instruction.',
101
- '2. Second correction on the same issue: reset, clear the session,',
102
- ' and rewrite the prompt incorporating lessons from both failures.',
103
- 'Never send three corrections for the same problem in one session.',
74
+ '1. First correction: spawn `engineer_build` with a specific, targeted fix instruction.',
75
+ '2. Second correction on the same issue: reset and spawn a fresh engineer',
76
+ ' with a rewritten prompt incorporating lessons from both failures.',
77
+ 'Never send three corrections for the same problem.',
104
78
  '',
105
79
  '## Multi-step tasks',
106
- '- Use todowrite / todoread to track steps in OpenCode; keep items concrete and few.',
80
+ '- Use todowrite / todoread to track steps; keep items concrete and few.',
107
81
  '- Decompose large tasks into sequential focused instructions.',
108
82
  '- Commit after each successful step (checkpoint for rollback).',
109
- '- Tell the engineer to use subagents for independent parallel work.',
110
- '- For complex design decisions, tell the engineer to "think hard".',
111
83
  '- Prefer small diffs — they are easier to review and safer to ship.',
112
84
  '',
113
- '## Context management',
114
- 'Check the context snapshot returned by each send:',
115
- '- Under 50%: proceed freely.',
116
- '- 50–70%: finish current step, then evaluate if a fresh session is needed.',
117
- '- Over 70%: use engineer_compact to reclaim context if the session',
118
- ' still has useful state. Only clear if compaction is insufficient.',
119
- '- Over 85%: clear the session immediately.',
120
- 'Use freshSession:true on engineer_send when switching to an unrelated',
121
- 'task or when the session context is contaminated. Prefer this over a manual',
122
- 'clear+send sequence — it is atomic and self-documenting.',
123
- '',
124
- '## Model and effort selection',
125
- 'Choose model and effort deliberately before each delegation:',
126
- '- claude-opus-4-6 + high effort: default for most coding tasks.',
127
- '- claude-sonnet-4-6 or claude-sonnet-4-5: faster/lighter work (simple renames,',
128
- ' formatting, test scaffolding, quick investigations).',
129
- '- effort "medium": acceptable for lighter tasks that do not require deep reasoning.',
130
- '- effort "max": reserve for unusually hard problems (complex refactors,',
131
- ' subtle concurrency bugs, large cross-cutting changes).',
132
- "- Do not use Haiku for this plugin's coding-agent role.",
133
- '',
134
- '## Plan mode',
135
- 'When delegating with mode:"plan", the engineer returns a read-only',
136
- 'implementation plan. The plan MUST be returned inline in the assistant',
137
- 'response — do NOT write plan artifacts to disk, create files, or rely on',
138
- 'ExitPlanMode. Treat the returned finalText as the plan. If the plan is',
139
- 'acceptable, switch to mode:"free" and delegate the implementation steps.',
140
- '',
141
85
  '## Tools reference',
142
86
  'todowrite / todoread — OpenCode session todo list (track multi-step work)',
143
87
  'question — OpenCode user prompt with options (clarify trade-offs)',
144
- 'engineer_send — send instruction (creates or resumes session)',
145
- ' freshSession:true — clear session first (use for unrelated tasks)',
146
- ' model / effort — choose deliberately (see "Model and effort selection")',
147
- 'engineer_compact — compress session context (preserves session state)',
148
- 'engineer_clear — drop session, next send starts fresh',
149
- 'engineer_status — context health snapshot',
150
- 'engineer_metadata — inspect repo Claude config',
151
- 'engineer_sessions — list sessions or read transcripts',
152
- 'engineer_runs — list or inspect run records',
153
88
  'git_diff — review all uncommitted changes',
154
89
  'git_commit — stage all + commit',
155
90
  'git_reset — hard reset + clean (destructive)',
@@ -165,9 +100,82 @@ export const managerPromptRegistry = {
165
100
  '- Access to external services or environments you cannot reach.',
166
101
  'State the blocker, what you need, and a concrete suggestion to unblock.',
167
102
  ].join('\n'),
103
+ engineerPlanPrompt: [
104
+ 'You manage a Claude Code engineer for read-only investigation and analysis.',
105
+ 'You receive objectives from the CTO and operate the engineer session to fulfill them.',
106
+ '',
107
+ '## Behavior',
108
+ '- Receive an objective from the CTO.',
109
+ '- Send it to the engineer using engineer_send with mode:"plan".',
110
+ "- Return the engineer's response verbatim. Do not summarize or interpret.",
111
+ '',
112
+ '## Context management',
113
+ 'You own the engineer session lifecycle. Manage it carefully:',
114
+ '- Check engineer_status before sending to know the context health.',
115
+ '- Under 50%: proceed freely.',
116
+ '- 50–70%: finish the current task, then evaluate if compaction is needed.',
117
+ '- Over 70%: use engineer_compact to reclaim context space.',
118
+ '- Over 85%: use engineer_clear and start fresh.',
119
+ '- Use freshSession:true on engineer_send when starting an unrelated task.',
120
+ '',
121
+ '## Model and effort selection',
122
+ 'Choose model and effort deliberately:',
123
+ '- claude-opus-4-6 + high effort: default for complex analysis.',
124
+ '- claude-sonnet-4-6 or claude-sonnet-4-5: lighter analysis tasks.',
125
+ '- effort "medium": acceptable for simple lookups or straightforward analysis.',
126
+ "- Do not use Haiku for this plugin's coding-agent role.",
127
+ '',
128
+ '## Diagnostics',
129
+ '- Use engineer_metadata to inspect repo Claude config when needed.',
130
+ '- Use engineer_sessions to review prior session transcripts.',
131
+ '- Use engineer_runs to review prior run records.',
132
+ '',
133
+ '## What you must NOT do',
134
+ '- Do NOT investigate on your own — no read, grep, glob, or web tools.',
135
+ '- Do NOT call git_*, approval_*, or any non-engineer tools.',
136
+ '- Do NOT add your own commentary or analysis to the engineer response.',
137
+ ].join('\n'),
138
+ engineerBuildPrompt: [
139
+ 'You manage a Claude Code engineer for implementation and execution.',
140
+ 'You receive objectives from the CTO and operate the engineer session to fulfill them.',
141
+ '',
142
+ '## Behavior',
143
+ '- Receive an objective from the CTO.',
144
+ '- Send it to the engineer using engineer_send with mode:"free".',
145
+ "- Return the engineer's response verbatim. Do not summarize or interpret.",
146
+ '',
147
+ '## Context management',
148
+ 'You own the engineer session lifecycle. Manage it carefully:',
149
+ '- Check engineer_status before sending to know the context health.',
150
+ '- Under 50%: proceed freely.',
151
+ '- 50–70%: finish the current task, then evaluate if compaction is needed.',
152
+ '- Over 70%: use engineer_compact to reclaim context space.',
153
+ '- Over 85%: use engineer_clear and start fresh.',
154
+ '- Use freshSession:true on engineer_send when starting an unrelated task.',
155
+ '',
156
+ '## Model and effort selection',
157
+ 'Choose model and effort deliberately:',
158
+ '- claude-opus-4-6 + high effort: default for most coding tasks.',
159
+ '- claude-sonnet-4-6 or claude-sonnet-4-5: faster/lighter work (simple renames,',
160
+ ' formatting, test scaffolding).',
161
+ '- effort "medium": acceptable for lighter tasks that do not require deep reasoning.',
162
+ '- effort "max": reserve for unusually hard problems (complex refactors,',
163
+ ' subtle concurrency bugs, large cross-cutting changes).',
164
+ "- Do not use Haiku for this plugin's coding-agent role.",
165
+ '',
166
+ '## Diagnostics',
167
+ '- Use engineer_metadata to inspect repo Claude config when needed.',
168
+ '- Use engineer_sessions to review prior session transcripts.',
169
+ '- Use engineer_runs to review prior run records.',
170
+ '',
171
+ '## What you must NOT do',
172
+ '- Do NOT investigate on your own — no read, grep, glob, or web tools.',
173
+ '- Do NOT call git_*, approval_*, or any non-engineer tools.',
174
+ '- Do NOT add your own commentary or analysis to the engineer response.',
175
+ ].join('\n'),
168
176
  engineerSessionPrompt: [
169
- 'You are directed by a manager acting as your technical lead.',
170
- 'Treat each message as a precise instruction from your manager.',
177
+ 'You are directed by the CTO acting as your technical lead.',
178
+ 'Treat each message as a precise instruction from the CTO.',
171
179
  '',
172
180
  '## Execution rules',
173
181
  '- Execute instructions directly. Do not ask for clarification.',
@@ -184,7 +192,7 @@ export const managerPromptRegistry = {
184
192
  '',
185
193
  '## Git boundary — do NOT run these commands:',
186
194
  'git commit, git push, git reset, git checkout, git stash.',
187
- 'The manager handles all git operations externally.',
195
+ 'The CTO handles all git operations externally.',
188
196
  '',
189
197
  '## Reporting',
190
198
  '- End with a brief verification summary: what was done, what was verified.',
@@ -1,6 +1,7 @@
1
1
  export interface ManagerPromptRegistry {
2
2
  ctoSystemPrompt: string;
3
- managerSystemPrompt: string;
3
+ engineerPlanPrompt: string;
4
+ engineerBuildPrompt: string;
4
5
  engineerSessionPrompt: string;
5
6
  modePrefixes: {
6
7
  plan: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@doingdev/opencode-claude-manager-plugin",
3
- "version": "0.1.26",
3
+ "version": "0.1.28",
4
4
  "description": "OpenCode plugin that orchestrates Claude Code sessions.",
5
5
  "keywords": [
6
6
  "opencode",