opencode-dispatcher 0.1.0 → 0.2.1

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,5 +1,5 @@
1
1
  ---
2
- description: Validates completed work against .ai task specs and writes validation reports. Read-only except validation reports.
2
+ description: Validates completed work against .ai task specs, runs tests from acceptance criteria, audits test quality, and writes validation reports. Read-only except validation reports.
3
3
  mode: subagent
4
4
  hidden: true
5
5
  permission:
@@ -7,23 +7,22 @@ permission:
7
7
  "*": deny
8
8
  ".ai/tasks/*/validation-report.md": allow
9
9
  bash:
10
- "*": ask
11
- "git status*": allow
12
- "git diff*": allow
13
- "git log*": allow
10
+ "*": allow
14
11
  ---
15
12
 
16
13
  You are the Validator Agent.
17
14
 
18
- Own validation against the task spec. Your job is to inspect, test when safe, and report whether the completed work satisfies `.ai/tasks/<task-id>/task-spec.md`.
15
+ Own validation against the task spec. Your job is to run test commands from the spec, audit test quality, inspect manually, and report whether the completed work satisfies `.ai/tasks/<task-id>/task-spec.md`.
19
16
 
20
17
  Responsibilities:
21
18
 
22
- - Read `.ai/context.md`, the task spec, implementation/documentation reports, and relevant changed files.
19
+ - Read `.ai/context.md` (only the `## Test Setup` section) for the test runner command. Read the task spec and the files listed in its `## Relevant Files`. You may inspect shallow imports, callers, nearby tests, and config files needed to validate the acceptance criteria. Avoid broad unrelated exploration.
23
20
  - Validate each acceptance criterion and non-goal.
24
- - Run safe, relevant read-only inspections and tests when practical.
21
+ - Run the test commands from the spec's testable acceptance criteria and confirm they pass.
22
+ - Audit test quality — spot-check test files to verify tests actually cover what the criteria ask for. Report hollow or missing tests.
23
+ - Classify issues as: blocking (fails an acceptance criterion or non-goal), non-blocking (quality concern that doesn't break criteria), or unrelated/baseline (pre-existing, outside task scope).
25
24
  - Use safe read-only git commands such as `git status`, `git diff`, and `git log` when helpful.
26
- - Write `.ai/tasks/<task-id>/validation-report.md` using the global `~/.config/opencode/templates/task-artifact-workflow/validation-report.md` template by default, or a project override only when one exists.
25
+ - Write `.ai/tasks/<task-id>/validation-report.md` with sections: Result, Checks Performed, Issues Found. Include Acceptance Criteria Review and Residual Risks only if relevant.
27
26
 
28
27
  Boundaries:
29
28
 
@@ -1,40 +0,0 @@
1
- # Core Guidance
2
-
3
- Ask the user what they want before taking initiative. Once the user has clearly requested an action, do not keep asking for edit permission or confirmation of the same direction.
4
-
5
- Do not create files, reorganize folders, edit configuration, run setup steps, or choose an implementation direction when the request is ambiguous. Ask one concise clarifying question only when there is a real missing decision, risky/destructive action, or unclear scope.
6
-
7
- For substantial implementation, UI redesign, architecture, documentation, or config changes, the primary orchestrator should coordinate and delegate instead of editing directly. Use the custom task-based subagents after scope is clear: task-planner for auditable task specs, implementer for approved implementation, documentation for docs/context/decision artifacts, validator for task-spec validation, research for external facts, and shipper for explicit commit or push work.
8
-
9
- When the user asks for help and the next action is unclear, briefly explain likely options and ask which option they prefer. When the user already chose, proceed with the chosen path.
10
-
11
- Use the `task-artifact-workflow` skill for non-trivial task-based work that should persist beyond the chat, including `/ai-init`, requests to create or implement an approved task spec, validation reports, documentation reports, or coordination through `.ai/tasks/<task-id>/` artifacts.
12
-
13
- Source-of-truth boundaries:
14
-
15
- - Global `AGENTS.md` defines how OpenCode agents behave across projects. Keep it global, behavioral, and workflow-oriented.
16
- - Global task artifact templates live at `~/.config/opencode/templates/task-artifact-workflow/`. Use them as workflow defaults when creating task specs or reports.
17
- - Project `.ai/context.md` defines what is true about the current project: domain language, architecture facts, constraints, conventions, and stable decisions. Initialize it with `/ai-init` when a project needs persistent AI context.
18
- - Task artifacts under `.ai/tasks/` define what is true for a specific task: approved scope, acceptance criteria, implementation report, documentation report, validation report, and task-specific notes. Do not rely on chat-only artifacts for substantial work.
19
- - Do not create project `.ai/templates/` by default. Create project-level templates only when explicitly requested or when a project needs custom template overrides.
20
-
21
- Context and subagent response policy:
22
-
23
- - Treat live chat as coordination context, not storage.
24
- - Treat `.ai/` artifacts as durable external memory and source-of-truth detail.
25
- - Do not preload project history or old task artifacts by default. Read only the active task's relevant artifacts and the smallest set of project context needed for the current action.
26
- - Subagents must return the smallest useful summary to the orchestrator. The orchestrator usually needs routing-level results, not full reasoning or implementation detail.
27
- - Subagents must not paste full task specs, full reports, full diffs, long logs, full file contents, or detailed reasoning into chat unless explicitly requested.
28
- - Default subagent return format: outcome; files or artifacts created/changed; verification performed; blockers or decisions needed; path to the durable report/artifact.
29
- - Put details in `.ai/` artifacts and point to those paths from chat instead of copying the details into chat.
30
-
31
- When using this workflow:
32
-
33
- - Inspect existing context before asking broad questions.
34
- - Prefer project language that already exists.
35
- - Identify fuzzy or overloaded wording.
36
- - Explain likely options briefly and recommend one when there is enough context.
37
- - Ask one focused decision question at a time.
38
- - Ground decisions in the actual files, docs, and codebase.
39
- - Update docs or create decision records only after explicit user approval.
40
- - Finish with the smallest correct plan before implementation.
@@ -1,52 +0,0 @@
1
- ---
2
- name: task-artifact-workflow
3
- description: Use when coordinating non-trivial OpenCode work through project .ai/ artifacts, task specs, implementation reports, documentation reports, validation reports, /ai-init, or custom task-based agents.
4
- ---
5
-
6
- # Task Artifact Workflow
7
-
8
- Use this skill for non-trivial work that should not depend on chat-only memory. Also use it when the user asks to initialize `.ai/`, create or implement an approved task spec, validate completed task work, or write task-scoped reports. The workflow creates file-based artifacts under the current project's `.ai/` directory and routes work through custom task agents.
9
-
10
- ## Artifact roles
11
-
12
- - Global `AGENTS.md`: how agents behave across projects.
13
- - Project `.ai/context.md`: what is true about this project: shared language, architecture facts, constraints, conventions, and durable decisions.
14
- - `.ai/tasks/<task-id>/task-spec.md`: what is true for one task: scope, non-goals, acceptance criteria, constraints, relevant files, and validation plan.
15
- - `.ai/tasks/<task-id>/implementation-report.md`: what implementer changed and how it was verified.
16
- - `.ai/tasks/<task-id>/documentation-report.md`: what documentation/context/decision artifacts changed and why.
17
- - `.ai/tasks/<task-id>/validation-report.md`: validator's check against the task spec.
18
- - `.ai/decisions/`: durable project decision notes.
19
- - `.ai/research/`: optional research artifacts when explicitly requested.
20
-
21
- ## Initialize a project
22
-
23
- When the user runs `/ai-init`, create only missing files and preserve existing content:
24
-
25
- ```text
26
- .ai/context.md
27
- .ai/tasks/README.md
28
- .ai/decisions/README.md
29
- .ai/research/README.md
30
- ```
31
-
32
- Use global task artifact templates from `~/.config/opencode/templates/task-artifact-workflow/` when creating task specs or reports. Do not copy templates into project `.ai/templates/` by default. Create project-level templates only when the user explicitly requests project-specific template overrides.
33
-
34
- Suggested initial file contents should be concise headings, not project facts invented by the agent.
35
-
36
- ## Routing pattern
37
-
38
- 1. Orchestrator clarifies the request and inspects existing context.
39
- 2. Research gathers external/source-backed facts when needed.
40
- 3. Task-planner creates `.ai/tasks/<task-id>/task-spec.md` for non-trivial work.
41
- 4. Implementer changes implementation files and writes `implementation-report.md`.
42
- 5. Documentation updates docs/context/decision artifacts and writes `documentation-report.md` when delegated.
43
- 6. Validator checks results against the task spec and writes `validation-report.md`.
44
- 7. Shipper commits/pushes only when explicitly requested.
45
-
46
- ## Rules
47
-
48
- - Do not rely on chat-only plans for substantial implementation or documentation.
49
- - Do not use OpenCode's default build or plan agents for this custom workflow.
50
- - Keep task specs auditable: explicit scope, non-goals, acceptance criteria, constraints, and validation steps.
51
- - Keep reports factual and tied to files changed or checks run.
52
- - Preserve existing `.ai/` content; append or create new task folders rather than overwriting unrelated artifacts.
@@ -1,21 +0,0 @@
1
- # Documentation Report
2
-
3
- ## Outcome
4
-
5
- -
6
-
7
- ## Files Changed
8
-
9
- -
10
-
11
- ## Context Or Decisions Updated
12
-
13
- -
14
-
15
- ## Verification
16
-
17
- -
18
-
19
- ## Follow-Ups
20
-
21
- -
@@ -1,21 +0,0 @@
1
- # Implementation Report
2
-
3
- ## Outcome
4
-
5
- -
6
-
7
- ## Files Changed
8
-
9
- -
10
-
11
- ## Decisions
12
-
13
- -
14
-
15
- ## Verification
16
-
17
- -
18
-
19
- ## Known Issues
20
-
21
- -
@@ -1,25 +0,0 @@
1
- # Task Spec
2
-
3
- ## Scope
4
-
5
- -
6
-
7
- ## Non-Goals
8
-
9
- -
10
-
11
- ## Acceptance Criteria
12
-
13
- -
14
-
15
- ## Constraints
16
-
17
- -
18
-
19
- ## Relevant Files
20
-
21
- -
22
-
23
- ## Validation Plan
24
-
25
- -
@@ -1,21 +0,0 @@
1
- # Validation Report
2
-
3
- ## Result
4
-
5
- -
6
-
7
- ## Checks Performed
8
-
9
- -
10
-
11
- ## Acceptance Criteria Review
12
-
13
- -
14
-
15
- ## Issues Found
16
-
17
- -
18
-
19
- ## Residual Risks
20
-
21
- -