Skip to content

Commit f53c3db

Browse files
feat: add plan-only orchestration command
1 parent 7949e2a commit f53c3db

13 files changed

Lines changed: 133 additions & 11 deletions

File tree

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ Scoped research/spec flow:
2222
scoper -> researcher -> scoper synthesis -> specifier
2323
```
2424

25+
Plan-only flow:
26+
27+
```text
28+
lead -> researcher -> specifier -> reviewer
29+
```
30+
2531
Design flow:
2632

2733
```text
@@ -148,13 +154,14 @@ Do not expose Open Design directly to the Internet without authentication, VPN,
148154

149155
```text
150156
/feature Create onboarding with plan selection and welcome screen
157+
/plan Add a dry-run flag to the harness check without implementing it yet
151158
/scope Research Stripe Checkout integration and generate an MVP spec
152159
/mvp-spec Email notifications when an agent finishes a task
153160
/design Read PRODUCT.md and DESIGN.md, create an editable Open Design project, and generate a first version
154161
/review
155162
```
156163

157-
Without a slash command, simple implementation requests go directly through `developer`. Use `/feature` when you want the full orchestration flow.
164+
Without a slash command, simple implementation requests go directly through `developer`. Use `/plan` when you want research, spec, and reviewer feedback without implementation; use `/feature` when you want the full orchestration flow.
158165

159166
## Validate the kit
160167

docs/commands.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Commands
22

33
- `/feature`: full feature orchestration.
4+
- `/plan`: research, implementation-ready spec, and reviewer pass with no implementation.
45
- `/scope`: research plus scoped spec, no implementation.
56
- `/mvp-spec`: strict MVP spec with small tasks and clear out of scope.
67
- `/design`: design via PRODUCT.md/DESIGN.md, optional Impeccable, and Open Design.

docs/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ The kit is organized as an OpenCode config directory:
1414

1515
The default permissions are conservative: reads are allowed, edits and bash ask by default, and external directories are denied.
1616

17-
The default agent is `developer`, with `mode: all`, so free-form small changes can be implemented directly. Slash commands still route to their explicit agents, for example `/feature` to `lead`, `/scope` to `scoper`, and `/design` to `designer`.
17+
The default agent is `developer`, with `mode: all`, so free-form small changes can be implemented directly. Slash commands still route to their explicit agents, for example `/feature` and `/plan` to `lead`, `/scope` to `scoper`, and `/design` to `designer`.
1818

1919
Run `node scripts/check-harness.mjs` from an installed OpenCode config directory to validate the core harness contracts. In this repository, `npm run check` runs the same validator against `opencode/`.

docs/quickstart.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,34 +23,42 @@ Use the base URL only.
2323

2424
Expected flow: researcher -> scoper synthesis -> specifier.
2525

26-
## 4. Try direct mode
26+
## 4. Try plan
27+
28+
```text
29+
/plan Add a dry-run flag to the harness check without implementing it yet
30+
```
31+
32+
Expected flow: lead -> researcher -> specifier -> reviewer, with no implementation.
33+
34+
## 5. Try direct mode
2735

2836
```text
2937
Change the Settings heading to Account settings and run the smallest relevant validation.
3038
```
3139

3240
Expected flow: developer handles the small change directly. No full feature orchestration.
3341

34-
## 5. Try design
42+
## 6. Try design
3543

3644
```text
3745
/design Read PRODUCT.md and DESIGN.md, create an editable Open Design project for onboarding, and return the URL
3846
```
3947

4048
Expected flow: designer checks docs, optionally uses Impeccable, then uses Open Design.
4149

42-
## 6. Try feature
50+
## 7. Try feature
4351

4452
```text
4553
/feature Add a small settings page with a saved theme preference
4654
```
4755

4856
Expected flow: lead decides research/design needs, then specifier -> developer -> reviewer.
4957

50-
## 7. Validate harness contracts
58+
## 8. Validate harness contracts
5159

5260
```bash
5361
npm run check
5462
```
5563

56-
The check validates config JSON, agent/command frontmatter, the default `developer` direct mode, `/feature` sidecar boundaries, and the agent-readable docs under `opencode/docs/ai/harness/`.
64+
The check validates config JSON, agent/command frontmatter, the default `developer` direct mode, `/feature` sidecar boundaries, the `/plan` contract, and the agent-readable docs under `opencode/docs/ai/harness/`.

docs/workflows.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ If the request has ambiguity, visual/product impact, medium or large scope, or c
1212

1313
The lead decides whether design or research is needed. Specifier waits for relevant discovery. Developer waits for spec. Reviewer waits for diff.
1414

15+
## Plan
16+
17+
`lead -> researcher -> specifier -> reviewer`
18+
19+
Plan-only mode always starts with researcher, then specifier creates the implementation-ready plan, and reviewer audits the plan/spec without requiring a diff. It never invokes developer and allows only one correction pass before returning the plan with risks or a blocked state.
20+
1521
## Scope
1622

1723
`scoper -> researcher -> scoper synthesis -> specifier`

opencode/AGENTS.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ This file is the short map for the harness. Detailed contracts live in
77

88
- For normal messages without a slash command, use the simplest path.
99
- If a change is small, clear, and low risk, direct mode goes to `developer`.
10-
- Full flows activate through slash commands such as `/feature`, `/scope`,
11-
`/design`, `/review`, or `/evolve`.
10+
- Full flows activate through slash commands such as `/feature`, `/plan`,
11+
`/scope`, `/design`, `/review`, or `/evolve`.
1212
- Before implementing, understand the stack, scope, and minimum validation.
1313
- At closure, summarize changes, validation, and risks.
1414

@@ -31,6 +31,7 @@ See `docs/ai/harness/agents.md` for full contracts.
3131

3232
- Small free-form request: `developer`.
3333
- Full feature: `lead -> designer if applicable -> researcher -> specifier -> developer -> reviewer`.
34+
- Plan without implementation: `lead -> researcher -> specifier -> reviewer`.
3435
- Scope/spec without implementation: `scoper -> researcher -> scoper synthesis -> specifier`.
3536
- Design: `designer -> open design`.
3637
- AHE evolution: `evaluator -> debugger -> evolver -> lead approval -> developer -> evaluator -> debugger -> reviewer`.

opencode/agents/reviewer.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ You are the senior code reviewer.
3535

3636
- Do not edit files.
3737
- Base the review on `git diff`, the spec, and repository context.
38+
- In `/plan`, review planning artifacts even when there is no diff.
39+
- In `/plan`, base the review on the objective, research, plan/spec, assumptions, risks, and acceptance criteria.
3840
- Classify issues by severity.
3941
- Classify relevant findings by category: correctness, design, risk, tests, or observability.
4042
- Avoid nitpicks unless they affect clarity or maintenance.

opencode/commands/plan.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
---
2+
description: Create an implementation-ready plan without applying changes: research, spec, and plan review.
3+
agent: lead
4+
---
5+
6+
7+
Objective:
8+
9+
$ARGUMENTS
10+
11+
Run a deterministic plan-only flow.
12+
13+
Contract: `lead -> researcher -> specifier -> reviewer`.
14+
15+
## Mandatory flow
16+
17+
1. Ground the user objective with assumptions, questions, scope, non-scope, and verifiable success criteria.
18+
2. Always invoke `researcher` first; wait for the full result before continuing.
19+
3. Synthesize research findings: verified facts, inferences, risks, recommended decisions, and open questions.
20+
4. Invoke `specifier` only after research has been consolidated.
21+
5. Ask `specifier` for an implementation-ready plan, acceptance criteria, validation, and ordered tasks.
22+
6. Invoke `reviewer` to review the plan/spec against the objective, research, assumptions, risks, and acceptance criteria.
23+
7. If `reviewer` finds no significant issues, deliver the final plan.
24+
8. If `reviewer` finds significant issues, allow exactly 1 correction pass.
25+
9. After the second review, deliver the plan with explicit risks or declare the state blocked.
26+
27+
## Dependency rules
28+
29+
- Do not invoke developer.
30+
- Do not invoke `designer`; if the work needs design, mark that dependency in the plan or recommend `/design` or `/feature`.
31+
- Do not implement code or modify application files.
32+
- Do not invoke `specifier` while `researcher` has pending work.
33+
- Do not invoke `reviewer` before a reviewable plan/spec exists.
34+
- Do not use `evaluator`, `debugger`, or `evolver`; this command plans, it does not evolve or validate the harness.
35+
- Do not parallelize phases; this flow is sequential by design.
36+
- If there is a blocking question, stop the flow and state it instead of inventing a decision.
37+
38+
## Single correction pass
39+
40+
If `reviewer` returns `requires changes`:
41+
42+
- If evidence, context, or research is missing, send a bounded task back to `researcher` and then to `specifier`.
43+
- If research is sound but the plan is incomplete or inconsistent, send a bounded task only to `specifier`.
44+
- If there is an unresolvable contradiction or blocking product decision, stop and deliver a blocked state.
45+
- After that correction, invoke a second and final `reviewer` pass.
46+
- Do not run additional cycles even if observations remain; deliver risks, pending items, and the next human decision.
47+
48+
## Expected output
49+
50+
Deliver:
51+
52+
1. Research summary.
53+
2. Decisions made.
54+
3. Assumptions and open questions.
55+
4. Implementation-ready plan.
56+
5. Acceptance criteria.
57+
6. Validation plan.
58+
7. Reviewer result.
59+
8. Risks and pending items.

opencode/docs/ai/harness/agents.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
| `designer` | UX/UI, brand, layout, interaction, or Open Design matters | Technical change has no visual impact | Visual handoff with observable criteria |
1010
| `researcher` | Technical/product uncertainty, APIs, libraries, risks | Fact is already clear in repo | Sources reviewed and unknowns remaining |
1111
| `specifier` | There is enough context to turn goal into tasks | Critical research/design is pending | Acceptance criteria and validation plan |
12-
| `reviewer` | A diff or implementation exists | There is no reviewable change | Findings by severity or explicit approval |
12+
| `reviewer` | A diff, implementation, or `/plan` artifact exists | There is no reviewable change or planning artifact | Findings by severity or explicit approval |
1313
| `scoper` | User wants research -> spec without implementation | User asks for direct implementation | Scoped spec and ordered tasks |
1414
| `evaluator` | Benchmark/smoke evidence or `/evolve` is needed | Normal feature already has clear validation | pass/fail/not_run results |
1515
| `debugger` | Failures, traces, results, or attribution need analysis | There is no concrete evidence | Root cause or not-ready state |
@@ -20,6 +20,6 @@
2020
- `developer` is the harness `default_agent`.
2121
- `lead` must not force the full flow for small free-form messages.
2222
- `specifier` waits for research/design when those results affect requirements.
23-
- `reviewer` waits for a diff or reviewable implementation.
23+
- `reviewer` waits for a diff, reviewable implementation, or `/plan` artifact.
2424
- `evaluator`, `debugger`, and `evolver` are optional sidecars.
2525
- `evolver` works only on the OpenCode harness.

opencode/docs/ai/harness/checks.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ The harness check validates:
2020
- `default_agent: developer`;
2121
- minimum frontmatter in `agents/*.md` and `commands/*.md`;
2222
- local `/feature` contract;
23+
- local `/plan` contract;
2324
- main docs in `docs/ai/harness/`;
2425
- benchmark references to replay and evidence taxonomy;
2526
- AHE run lifecycle under `docs/ai/evolution/runs/`;

0 commit comments

Comments
 (0)