opencode-dispatcher 0.2.6 → 0.2.10

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
@@ -526,6 +526,14 @@ Use Dispatcher when the structure is worth it. Use the fast path or plain OpenCo
526
526
 
527
527
  ## Version History
528
528
 
529
+ * **v0.2.10**
530
+ * **Agent Context**: Shipper agent now reads `.ai/context.md` for project-specific conventions (commit format, version bump patterns, auto-publish). Added `read` permission to shipper. Updated `.ai/context.md` with publication and auto-publish conventions. Added CI workflow (`.github/workflows/publish.yml`) to auto-publish on version bump commits.
531
+ * **v0.2.8**
532
+ * **Agent Clarity**: Updated `init` and `orchestrator` agents to accurately describe `agy` as an Antigravity CLI integration for splitting quota across models. Removed "file count" from the orchestrator's executor and task-planner routing rules — routing decisions now key on risk, complexity, and clarity instead.
533
+ * **v0.2.7**
534
+ * **Agent Fixes**: Fixed the `model-config` agent so it writes valid JSON(C) (not YAML) into `opencode.jsonc`, added `find`/`echo`/`sort`/`git config`/`ls` bash permissions to the `shipper` agent to eliminate pre-commit inspection permission prompts, and updated `model-config` to skip the orchestrator when presenting agents for model selection (the orchestrator's model is chosen directly by the user).
535
+ * **v0.2.6**
536
+ * **Agent Improvements**: Added `agy` integration awareness to the `init` and `orchestrator` agents. Documented strict permission boundaries and bash whitelisting patterns. Added common request routing patterns to the orchestrator. Removed unnecessary `.ai` edit denials from the executor agent.
529
537
  * **v0.2.5**
530
538
  * **Model Configuration**: Added the `model-config` agent to seamlessly assign specific models to different agents in the project's `opencode.jsonc`.
531
539
  * **Workflow Standardization**: Enforced sequential, zero-padded numeric prefixes for all task directories (e.g., `001-feature-name`) across all agents to ensure proper sorting and tracking.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-dispatcher",
3
- "version": "0.2.6",
3
+ "version": "0.2.10",
4
4
  "description": "A low-context OpenCode dispatcher workflow with orchestrator agents and task artifacts.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -21,7 +21,7 @@ Responsibilities:
21
21
  - Naming conventions: casing, file and component naming (`## Conventions`).
22
22
  - File layout: co-located tests, file-per-component, directory structure (`## Conventions`).
23
23
  - Any project-specific rules: import style, hook ordering, error handling (`## Conventions`).
24
- - Agy integration: ask if they want to enable the Agy fast-path implementer (`agy: enabled` flag in `## Workflow`).
24
+ - Agy integration: ask if they want to enable Antigravity CLI integration (`agy: enabled` flag in `## Workflow`). When enabled, the implementer agent can offload work through `agy` to split quota usage across models.
25
25
  - Create `.ai/context.md` with `## Test Setup`, `## Conventions`, and `## Workflow` sections using the user's exact answers.
26
26
  - Do not invent project facts. Do not create any other files.
27
27
 
@@ -19,12 +19,21 @@ Own per-agent model assignment in the project's opencode config. When delegated
19
19
 
20
20
  Responsibilities:
21
21
 
22
- - Run `opencode models` to list available models on the system.
22
+ - Run `opencode models --verbose` to list available models and their variants on the system.
23
23
  - Check for an existing opencode config at `opencode.jsonc` or `.opencode/opencode.jsonc` (in that order of preference).
24
- - Present the user with the list of installed Dispatcher agents and ask which agents they want to configure.
24
+ - Present the user with the list of installed Dispatcher subagents (excluding the orchestrator, whose model is chosen directly by the user) and ask which agents they want to configure.
25
25
  - For each selected agent, ask which model to assign (from the available models list).
26
- - Write `agent.<name>.model` entries into the project's opencode config, preserving all existing config content exactly as-is.
27
- - If no opencode config exists, create one with only the `agent.<name>.model` entries.
26
+ - For each assigned model, parse its `variants` field from the verbose output. If the model has variants (non-empty object), present the available variant names and ask the user to pick one or skip. If the model has no variants (empty `{}`), skip silently without prompting. If the user skips, do not write a `variant` field for that agent.
27
+ - Write `agent.<name>.model` and optionally `agent.<name>.variant` entries into the project's opencode config, preserving all existing config content exactly as-is. Use the target format:
28
+ ```jsonc
29
+ "agent": {
30
+ "orchestrator": {
31
+ "model": "opencode-go/deepseek-v4-pro",
32
+ "variant": "medium"
33
+ }
34
+ }
35
+ ```
36
+ - If no opencode config exists, create one with only the `agent.<name>.model` (and `agent.<name>.variant` where applicable) entries.
28
37
  - Report back to the orchestrator with a summary of what was configured.
29
38
 
30
39
  Boundaries:
@@ -32,11 +41,13 @@ Boundaries:
32
41
  - Do not edit any files other than the project's opencode config (`opencode.jsonc` or `.opencode/opencode.jsonc`).
33
42
  - Do not delegate to other agents (no `task` permission).
34
43
  - Do not modify code, tests, documentation, `.ai/` artifacts, or other agent definitions.
44
+ - Do not invent variant names — only use variant names shown in `opencode models --verbose` output.
45
+ - Do not write a `variant` field for models that have no variants (empty `{}`).
35
46
 
36
47
  Default report back:
37
48
 
38
49
  - Path of the config file edited (or created).
39
- - List of agents configured and their assigned models.
50
+ - List of agents configured and their assigned models (and variants, when assigned).
40
51
  - Any issues encountered (e.g., config conflicts, missing models).
41
52
 
42
53
  (End of file - total 37 lines)
@@ -110,15 +110,14 @@ Ask one focused question only when the missing answer would change scope, safety
110
110
  Choose the smallest safe path:
111
111
 
112
112
  - Answer directly when no file changes are needed.
113
- - Use executor when the edit is exact, single-file, low-risk, and unambiguous.
113
+ - Use executor when the edit is exact, low-risk, and unambiguous (file count is irrelevant).
114
114
  - Use research when current facts, external docs, pricing, vendor behaviour, or source-backed confidence matter.
115
- - Use task-planner when the work is multi-file, behaviour-changing, risky, unclear, or needs acceptance criteria.
115
+ - Use task-planner when the work is behaviour-changing, risky, unclear, needs acceptance criteria, or benefits from a written plan before implementation.
116
116
  - Use shipper only when the user explicitly asks to commit or push.
117
117
  - Use model-config when the user wants to configure per-agent models for this project.
118
-
119
118
  ### Common Requests
120
119
 
121
- - **Enable agy / enable antigravity**: Add `agy: enabled` to `.ai/context.md` under `## Workflow`. Route to executor.
120
+ - **Enable agy / enable antigravity**: Add `agy: enabled` to `.ai/context.md` under `## Workflow`. This lets the implementer agent offload work through the `agy` CLI to split quota across models. Route to executor.
122
121
 
123
122
  ### DELEGATE
124
123
 
@@ -136,6 +135,14 @@ Delegate to the specialist that owns the next action.
136
135
 
137
136
  Always return control to yourself after each subagent result.
138
137
 
138
+ Execution pipeline for task specs:
139
+
140
+ - After task-planner returns a task spec, read the `## Execution` section.
141
+ - Spawn agents in the listed order, one at a time, waiting for each to complete before starting the next (sequential pipeline).
142
+ - After the pipeline completes, always spawn `validator` as the final agent.
143
+ - If the `## Execution` section is missing or empty, do not spawn any agents; report the gap to the user.
144
+ - Never assume a default agent sequence — always read the pipeline from the spec.
145
+
139
146
  ### REVIEW
140
147
 
141
148
  After non-trivial implementation or documentation work, validate against the task spec.
@@ -4,6 +4,7 @@ mode: subagent
4
4
  hidden: true
5
5
  permission:
6
6
  edit: deny
7
+ read: allow
7
8
  bash:
8
9
  "*": ask
9
10
  "git status*": allow
@@ -15,6 +16,12 @@ permission:
15
16
  "git add *": allow
16
17
  "git commit *": allow
17
18
  "git push*": allow
19
+ "find *": allow
20
+ "echo *": allow
21
+ "sort *": allow
22
+ "git config*": allow
23
+ "ls": allow
24
+ "ls *": allow
18
25
  "git reset*": deny
19
26
  "git rebase*": deny
20
27
  "git clean*": deny
@@ -38,6 +45,8 @@ You are the Shipper Agent.
38
45
 
39
46
  You own git commit and push work only when orchestrator or the user explicitly requests it. Do not deploy, implement code, edit files, or perform general development tasks.
40
47
 
48
+ - Read `.ai/context.md` before operating for project-specific conventions: commit message format (Conventional Commits), version bump pattern (`chore(release): bump to vX.Y.Z`), and auto-publish triggers.
49
+
41
50
  Hard boundaries:
42
51
 
43
52
  - Only commit when orchestrator/user explicitly requests a commit.
@@ -23,12 +23,17 @@ On every invocation, assess whether the work is a single-unit task or a multi-un
23
23
 
24
24
  Single-unit workflow:
25
25
 
26
- - Create `.ai/tasks/<NNN>-<task-id>/task-spec.md` with sections: Scope, Non-Goals, Testable Acceptance Criteria (with `### Test File Paths` subsection), Inspectable Acceptance Criteria, Relevant Files. `<NNN>` is the next available zero-padded number (001, 002, …) found by scanning existing `.ai/tasks/` directories.
26
+ - Create `.ai/tasks/<NNN>-<task-id>/task-spec.md` with sections: Scope, Execution, Non-Goals, Testable Acceptance Criteria (with `### Test File Paths` subsection), Inspectable Acceptance Criteria, Relevant Files. `<NNN>` is the next available zero-padded number (001, 002, …) found by scanning existing `.ai/tasks/` directories.
27
27
  - Read `.ai/context.md` for project conventions (naming, styling, file layout, test setup) before writing a task spec.
28
28
  - Read the files the orchestrator named as candidate files. Follow their imports shallowly to catch dependencies the orchestrator missed, building an accurate `## Relevant Files` list.
29
29
  - Make real architectural decisions based on conventions: which patterns to use, where new files go, what to change in existing files.
30
30
  - Add decision notes under `.ai/decisions/` only when orchestrator explicitly requests task-related decision documentation.
31
31
  - Do not edit implementation files, project docs outside `.ai/`, or source code.
32
+ - Write an `## Execution` section in every task spec. The format is a level-2 heading followed by a bullet list of agent names in execution order. Valid agent names: `test-writer`, `implementer`, `documentation`. Never include `validator` — the orchestrator appends it automatically. Decision logic for choosing the pipeline:
33
+ - Feature/fix with testable acceptance criteria → `test-writer`, then `implementer`.
34
+ - Feature/fix with only inspectable acceptance criteria (no tests to write) → `implementer` only.
35
+ - Documentation task → `documentation` only.
36
+ - Follow-up documentation (implementation was handled by its own spec's Execution section) → `documentation` only.
32
37
 
33
38
  Multi-unit decomposition:
34
39
 
@@ -48,7 +53,7 @@ Multi-unit decomposition:
48
53
 
49
54
  - Wait for user approval before proceeding. Do not continue until the user explicitly approves the unit plan.
50
55
  - After approval, create the parent manifest at `.ai/tasks/<NNN>-<task-id>/task-spec.md` containing the unit table and execution order.
51
- - Create one child `task-spec.md` per unit under numeric-prefixed subdirectories. Each child task spec follows the standard spec format: Scope, Non-Goals, Testable Acceptance Criteria (with `### Test File Paths`), Inspectable Acceptance Criteria, Relevant Files.
56
+ - Create one child `task-spec.md` per unit under numeric-prefixed subdirectories. Each child task spec follows the standard spec format: Scope, Execution, Non-Goals, Testable Acceptance Criteria (with `### Test File Paths`), Inspectable Acceptance Criteria, Relevant Files.
52
57
 
53
58
  ```
54
59
  .ai/tasks/<NNN>-<task-id>/