Skip to content

Commit 612742a

Browse files
Make lead the default routing agent
1 parent b53cb24 commit 612742a

14 files changed

Lines changed: 59 additions & 27 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This repository is not affiliated with OpenCode, Open Design, Impeccable, or Sup
88

99
## Architecture
1010

11-
By default, free-form messages open with `developer` for small, clear, low-risk changes. Use slash commands when you want an explicit workflow.
11+
By default, free-form messages open with `lead` as a bounded router. Lead quickly chooses `developer`, `researcher`, `designer`, or `specifier`, and asks the user when ambiguity changes the correct flow. Small, clear, low-risk changes are usually delegated straight to `developer`.
1212

1313
Core feature flow:
1414

docs/agents.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
## Core agents
44

5-
- `lead`: orchestrates feature work and enforces phase barriers.
5+
- `lead`: default free-form router, feature orchestrator, and phase-barrier owner.
66
- `scoper`: lightweight research -> spec orchestrator.
77
- `designer`: uses PRODUCT.md/DESIGN.md, optional Impeccable, and Open Design.
88
- `researcher`: verifies code, docs, APIs, alternatives, and risks.
99
- `specifier`: produces specs, tasks, acceptance criteria, and validation plans.
10-
- `developer`: implements approved tasks and validates changes.
10+
- `developer`: implements approved tasks, including direct-mode work delegated by lead, and validates changes.
1111
- `reviewer`: reviews diffs against spec and returns verdicts.
1212

1313
## Optional AHE sidecars

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` and `/plan` to `lead`, `/scope` to `scoper`, and `/design` to `designer`.
17+
The default agent is `lead`, acting as a bounded router for free-form messages. For small, clear, low-risk work, lead delegates direct mode to `developer`; for technical uncertainty it delegates to `researcher`; for visual or interaction work it delegates to `designer`; and for planning gaps it delegates to `specifier`. 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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ Expected flow: researcher -> scoper synthesis -> specifier.
3131

3232
Expected flow: lead -> researcher -> specifier -> reviewer, with no implementation.
3333

34-
## 5. Try direct mode
34+
## 5. Try bounded direct routing
3535

3636
```text
3737
Change the Settings heading to Account settings and run the smallest relevant validation.
3838
```
3939

40-
Expected flow: developer handles the small change directly. No full feature orchestration.
40+
Expected flow: lead chooses the direct path and delegates the small change to developer. No full feature orchestration.
4141

4242
## 6. Try design
4343

@@ -61,4 +61,4 @@ Expected flow: lead decides research/design needs, then specifier -> developer -
6161
npm run check
6262
```
6363

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/`.
64+
The check validates config JSON, agent/command frontmatter, the default `lead` router contract, `/feature` sidecar boundaries, the `/plan` contract, and the agent-readable docs under `opencode/docs/ai/harness/`.

docs/workflows.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
## Direct mode
44

5-
Free-form messages without a slash command use `developer` by default. This is intended for small, clear, low-risk changes where a full product-development pipeline would be unnecessary.
5+
Free-form messages without a slash command use `lead` by default as a bounded router. This keeps the simplest path for small, clear, low-risk changes while avoiding silent guesses when the right flow is unclear.
66

7-
If the request has ambiguity, visual/product impact, medium or large scope, or critical missing context, switch to `/feature`, `/scope`, `/design`, or `/spec`.
7+
Lead decides quickly between `developer`, `researcher`, `designer`, or `specifier`. It delegates small direct work to `developer`, routes uncertainty to `researcher`, visual/product work to `designer`, planning gaps to `specifier`, and asks the user when ambiguity changes the right path.
88

99
## Feature
1010

opencode/AGENTS.md

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

88
- For normal messages without a slash command, use the simplest path.
9-
- If a change is small, clear, and low risk, direct mode goes to `developer`.
9+
- If a change is small, clear, and low risk, `lead` decides quickly and usually delegates direct mode to `developer`.
1010
- Full flows activate through slash commands such as `/feature`, `/plan`,
1111
`/scope`, `/design`, `/review`, or `/evolve`.
1212
- Before implementing, understand the stack, scope, and minimum validation.
@@ -29,7 +29,7 @@ See `docs/ai/harness/agents.md` for full contracts.
2929

3030
## Base flows
3131

32-
- Small free-form request: `developer`.
32+
- Small free-form request: `lead` decides and usually delegates to `developer`.
3333
- Full feature: `lead -> designer if applicable -> researcher -> specifier -> developer -> reviewer`.
3434
- Plan without implementation: `lead -> researcher -> specifier -> reviewer`.
3535
- Scope/spec without implementation: `scoper -> researcher -> scoper synthesis -> specifier`.

opencode/agents/developer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ You are the senior developer.
3434

3535
## Direct mode without slash commands
3636

37-
When you are the default agent and the user asks for a small, clear, low-risk change without using a slash command, treat it as an approved implementation task.
37+
When `lead` delegates direct mode for a small, clear, low-risk change without using a slash command, treat it as an approved implementation task.
3838

3939
Before editing, identify:
4040

opencode/agents/lead.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,19 @@ Your job is not to do every task yourself. Your job is to choose the correct ord
3737

3838
## Default behavior without slash commands
3939

40-
Do not force the full orchestration flow when the user did not invoke an explicit command such as `/feature`, `/scope`, `/design`, `/spec`, `/implement`, `/review`, or `/evolve`.
40+
When the user did not invoke an explicit command such as `/feature`, `/scope`, `/design`, `/spec`, `/implement`, `/review`, or `/evolve`, act as a fast router. Your job is to choose the next appropriate agent, not to automatically run the full orchestration flow.
4141

42-
For small, clear, low-risk requests, invoke `developer` directly with:
42+
Use lightweight inspection if you need to check the repo or context. Decide quickly. If a doubt changes the correct flow, ask the user instead of thinking for a long time or choosing silently.
43+
44+
Routing decision:
45+
46+
- `developer`: small, clear, localized, verifiable change.
47+
- `researcher`: technical/product uncertainty, APIs, libraries, architecture, risks, or need for real evidence before deciding.
48+
- `designer`: UX/UI, visual design, layout, brand, interaction, or visual criteria.
49+
- `specifier`: enough context exists, but the work still needs tasks, acceptance criteria, or a validation plan.
50+
- Ask the user: real ambiguity changes whether research, design, spec, or direct implementation is appropriate.
51+
52+
If you choose direct mode, invoke `developer` with:
4353

4454
- concrete objective;
4555
- minimum acceptance criteria;
@@ -67,7 +77,7 @@ Use explicit phase barriers:
6777
6. Review.
6878
7. Closure.
6979

70-
Do not skip phases unless the work is genuinely trivial or the user made a small free-form request without a slash command.
80+
Do not skip phases unless the work is genuinely trivial or you explicitly routed a small free-form request without a slash command.
7181

7282
## Dependency rules
7383

opencode/docs/ai/harness/agents.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
| Agent | Use when | Do not use when | Expected evidence |
66
| --- | --- | --- | --- |
7-
| `developer` | Change is small, clear, approved, or direct without slash command | Critical decision, design, or research is missing | Validation run or explicit reason |
8-
| `lead` | Slash workflow, coordination, or phase dependencies are needed | Free-form request is small and localized | Assumptions, criteria, and barriers respected |
7+
| `developer` | Change is small, clear, approved, or delegated by lead | Critical decision, design, or research is missing | Validation run or explicit reason |
8+
| `lead` | Free-form message without slash command, slash workflow, coordination, or phase dependencies | The task was already delegated to another agent | Routing decision, assumptions, criteria, and barriers respected |
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 |
@@ -17,8 +17,9 @@
1717

1818
## Invariants
1919

20-
- `developer` is the harness `default_agent`.
20+
- `lead` is the harness `default_agent` and acts as a bounded router for free-form messages.
2121
- `lead` must not force the full flow for small free-form messages.
22+
- `developer` executes direct mode when `lead` delegates a small, clear, verifiable task.
2223
- `specifier` waits for research/design when those results affect requirements.
2324
- `reviewer` waits for a diff, reviewable implementation, or `/plan` artifact.
2425
- `evaluator`, `debugger`, and `evolver` are optional sidecars.

opencode/docs/ai/harness/checks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ npm run check
1717
The harness check validates:
1818

1919
- `opencode.json`;
20-
- `default_agent: developer`;
20+
- `default_agent: lead`;
2121
- minimum frontmatter in `agents/*.md` and `commands/*.md`;
2222
- local `/feature` contract;
2323
- local `/plan` contract;

0 commit comments

Comments
 (0)