Skip to content

Commit 4e31fa6

Browse files
chore: update context
Entire-Checkpoint: 2a6de2e59858
1 parent 7e084f1 commit 4e31fa6

18 files changed

Lines changed: 2083 additions & 1048 deletions
Lines changed: 44 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,70 @@
11
---
22
name: code-changes
33
description: >
4-
Orchestration workflow for any task that ends in code changes: issue analysis, pull request
5-
review, feature implementation, bug fixes, refactors, or fleshing out an idea. MUST be invoked
6-
at the start of such a task, before reading or writing any code. Defines how to analyze first,
7-
gate on user approval, plan, pick the right executor model, delegate and supervise subagents,
8-
verify, and deliver.
4+
Orchestration workflow for any task that ends in code changes: issue analysis, pull request review, feature
5+
implementation, bug fixes, refactors, or fleshing out an idea. MUST be invoked at the start of such a task, before
6+
reading or writing any code. Defines how to analyze first, gate on user approval, plan, pick the right executor model,
7+
delegate and supervise subagents, verify, and deliver.
98
---
109

1110
# Code Changes
1211

13-
The workflow for going from an issue, pull request, idea, or feature request to shipped code.
14-
Follow the phases in order. Analysis always comes first; code comes last.
12+
The workflow for going from an issue, pull request, idea, or feature request to shipped code. Follow the phases in
13+
order. Analysis always comes first; code comes last.
1514

16-
Each phase has a reference file with the full instructions. **Read the reference file when you
17-
enter the phase** — not before, and never skip it because the phase "looks obvious".
15+
Each phase has a reference file with the full instructions. **Read the reference file when you enter the phase** — not
16+
before, and never skip it because the phase "looks obvious".
1817

1918
## Roles
2019

21-
Assign work based on model capability. The coordinator is not the strongest model — it's the one
22-
that stays resident, owns every phase by default, and knows when it's out of its depth.
20+
Assign work based on model capability. The coordinator is not the strongest model — it's the one that stays resident,
21+
owns every phase by default, and knows when it's out of its depth.
2322

24-
| Role | Capability tier | Owns |
25-
| ----------- | -------------------------------------------------------------- | ------------------------------------------------------------------------------ |
26-
| Coordinator | Capable mid-tier, resident for the whole task | Analysis, plan, delegation, supervision, verification, delivery — by default |
27-
| Escalation | Strongest reasoning model available; invoked only on trigger | The specific judgment call the coordinator flagged, then control returns |
28-
| Implementer | Same tier as coordinator, or smaller for trivial edits | Executing one pinned, self-contained task |
23+
- **Role:** Coordinator
24+
- **Capability tier:** Capable mid-tier, resident for the whole task
25+
- **Owns:** Analysis, plan, delegation, supervision, verification, delivery — by default
2926

30-
Concrete model names per vendor (Anthropic, OpenAI, Google) and how to run the split in Claude
31-
Code, GitHub Copilot, Codex, or IDE agents: [references/model-tiers.md](references/model-tiers.md).
27+
- **Role:** Escalation
28+
- **Capability tier:** Strongest reasoning model available; invoked only on trigger
29+
- **Owns:** The specific judgment call the coordinator flagged, then control returns
3230

33-
When the current agent already runs at implementer tier, there's no separate delegation step for
34-
standard work: plan and execute directly, still following every phase. Escalate to the strongest
35-
model only when a trigger fires — see [references/escalate.md](references/escalate.md) — never by
36-
default and never for a routine judgment call the coordinator is equipped to make itself.
31+
- **Role:** Implementer
32+
- **Capability tier:** Same tier as coordinator, or smaller for trivial edits
33+
- **Owns:** Executing one pinned, self-contained task
34+
35+
Concrete model names per vendor (Anthropic, OpenAI, Google) and how to run the split in Claude Code, GitHub Copilot,
36+
Codex, or IDE agents: [references/model-tiers.md](references/model-tiers.md).
37+
38+
When the current agent already runs at implementer tier, there's no separate delegation step for standard work: plan and
39+
execute directly, still following every phase. Escalate to the strongest model only when a trigger fires — see
40+
[references/escalate.md](references/escalate.md) — never by default and never for a routine judgment call the
41+
coordinator is equipped to make itself.
3742

3843
## The flow
3944

40-
1. **Analyze** ([references/analyze.md](references/analyze.md)) — root cause and scope,
41-
validated against the code, never against the report alone.
42-
2. **Plan** ([references/plan.md](references/plan.md)) — pinned spec, task split, parallel vs
43-
sequential, workspace per task.
44-
3. **Delegate** ([references/delegate.md](references/delegate.md)) — match each task to the
45-
right executor, coordinator-tier by default.
46-
4. **Supervise** ([references/supervise.md](references/supervise.md)) — monitor, unblock, and
47-
critically review implementer output.
48-
5. **Verify** ([references/verify.md](references/verify.md)) — quality gates plus functional
49-
proof, never delegated downward.
50-
6. **Deliver** ([references/deliver.md](references/deliver.md)) — conventional commits and an
51-
outcome-first report.
45+
1. **Analyze** ([references/analyze.md](references/analyze.md)) — root cause and scope, validated against the code,
46+
never against the report alone.
47+
2. **Plan** ([references/plan.md](references/plan.md)) — pinned spec, task split, parallel vs sequential, workspace per
48+
task.
49+
3. **Delegate** ([references/delegate.md](references/delegate.md)) — match each task to the right executor,
50+
coordinator-tier by default.
51+
4. **Supervise** ([references/supervise.md](references/supervise.md)) — monitor, unblock, and critically review
52+
implementer output.
53+
5. **Verify** ([references/verify.md](references/verify.md)) — quality gates plus functional proof, never delegated
54+
downward.
55+
6. **Deliver** ([references/deliver.md](references/deliver.md)) — conventional commits and an outcome-first report.
5256

5357
Analyze, Supervise, and Verify each carry an escalation checkpoint — see
54-
[references/escalate.md](references/escalate.md) — for handing one specific judgment call to the
55-
strongest available model without giving up ownership of the phase.
58+
[references/escalate.md](references/escalate.md) — for handing one specific judgment call to the strongest available
59+
model without giving up ownership of the phase.
5660

57-
**Stop gate:** Phase 1 ends with reporting the analysis and proposed approach to the user and
58-
waiting for a go. Skip the gate only when the user already gave the go in the request itself
59-
("do it", "fix it and commit", "implement with Sonnet").
61+
**Stop gate:** Phase 1 ends with reporting the analysis and proposed approach to the user and waiting for a go. Skip the
62+
gate only when the user already gave the go in the request itself ("do it", "fix it and commit", "implement with
63+
Sonnet").
6064

6165
## Special cases
6266

6367
These entry points replace or extend Phase 1; the rest of the flow applies unchanged.
6468

65-
- Pull request review comments →
66-
[references/pr-review-comments.md](references/pr-review-comments.md)
69+
- Pull request review comments → [references/pr-review-comments.md](references/pr-review-comments.md)
6770
- Issue triage → [references/issue-triage.md](references/issue-triage.md)
Lines changed: 20 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,41 @@
11
# Phase 3 — Delegate
22

3-
Match the executor to the task, not the other way around. The point is cost and speed without
4-
losing quality — the coordinator stays accountable for the result.
3+
Match the executor to the task, not the other way around. The point is cost and speed without losing quality — the
4+
coordinator stays accountable for the result.
55

66
## Executor matrix
77

88
Tier definitions and per-vendor model examples: [model-tiers.md](model-tiers.md).
99

10-
| Task profile | Executor |
11-
| ---------------------------------------------------------- | ------------------------------------------------------------ |
12-
| Trivial: mechanical edit, config tweak, typo, doc update | Do it directly, or batch on a trivial-tier model |
13-
| Standard, well-specified implementation | Coordinator itself, or a same-tier subagent for parallelism |
14-
| Hits an escalation trigger (see [escalate.md](escalate.md)) | Escalation-tier subagent, for that one specific question |
10+
- **Task profile:** Trivial: mechanical edit, config tweak, typo, doc update
11+
- **Executor:** Do it directly, or batch on a trivial-tier model
1512

16-
- The coordinator typically runs at implementer tier itself, so standard tasks are usually
17-
executed directly rather than delegated. Delegate anyway when there's real parallelism —
18-
independent tasks, each in its own worktree — or to shed trivial mechanical work onto a
19-
cheaper model.
20-
- Escalation is never the default path for "ambiguous" or "architectural" — it fires only on the
21-
concrete triggers in [escalate.md](escalate.md), and only for the specific question, not the
22-
whole task.
13+
- **Task profile:** Standard, well-specified implementation
14+
- **Executor:** Coordinator itself, or a same-tier subagent for parallelism
15+
16+
- **Task profile:** Hits an escalation trigger (see [escalate.md](escalate.md))
17+
- **Executor:** Escalation-tier subagent, for that one specific question
18+
19+
- The coordinator typically runs at implementer tier itself, so standard tasks are usually executed directly rather than
20+
delegated. Delegate anyway when there's real parallelism — independent tasks, each in its own worktree — or to shed
21+
trivial mechanical work onto a cheaper model.
22+
- Escalation is never the default path for "ambiguous" or "architectural" — it fires only on the concrete triggers in
23+
[escalate.md](escalate.md), and only for the specific question, not the whole task.
2324

2425
## What a delegation carries
2526

2627
Hand the subagent its full pinned spec from Phase 2, plus:
2728

2829
- The verification commands it must run and pass before reporting done.
2930
- The instruction to report what it changed and what it verified — not just "done".
30-
- The instruction to stop and report when it hits something the spec does not cover, instead of
31-
improvising scope.
31+
- The instruction to stop and report when it hits something the spec does not cover, instead of improvising scope.
3232

3333
## What is never delegated downward
3434

35-
Analysis, final verification, and delivery never go to an implementer — they stay with the
36-
coordinator or go up to Escalation tier for a specific question:
35+
Analysis, final verification, and delivery never go to an implementer — they stay with the coordinator or go up to
36+
Escalation tier for a specific question:
3737

3838
- Analysis and root-cause work (Phase 1).
3939
- Final verification (Phase 5) — an implementer's green run is a claim, not a result.
40-
- Commits, history rewrites, pushes, and user-facing reporting (Phase 6) — these stay with the
41-
coordinator regardless of tier; they're about accountability, not capability, so they never go
42-
to Escalation tier either.
40+
- Commits, history rewrites, pushes, and user-facing reporting (Phase 6) — these stay with the coordinator regardless of
41+
tier; they're about accountability, not capability, so they never go to Escalation tier either.
Lines changed: 55 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,65 @@
11
# Model tiers and agent tooling
22

3-
The workflow talks about capability tiers, not vendor names. Map whatever stack is in use onto
4-
these four tiers. The model names below are a mid-2026 snapshot — they go stale; when a name no
5-
longer exists, map its replacement by tier, not by nostalgia.
3+
The workflow talks about capability tiers, not vendor names. Map whatever stack is in use onto these four tiers. The
4+
model names below are a mid-2026 snapshot — they go stale; when a name no longer exists, map its replacement by tier,
5+
not by nostalgia.
66

77
## The four tiers
88

9-
| Tier | Role | Anthropic | OpenAI | Google |
10-
| ----------- | ------------------------------------------- | ----------------- | ----------------- | ----------------- |
11-
| Escalation | Judgment calls the coordinator flags | Fable 5, Opus 4.8 | Sol, GPT-5 (high) | Gemini 2.5 Pro |
12-
| Coordinator | Resident; owns every phase by default | Sonnet 5 | GPT-5, GPT-4.1 | Gemini 2.5 Flash |
13-
| Implementer | Pinned-spec work, often same tier as coordinator | Sonnet 5 | GPT-5, GPT-4.1 | Gemini 2.5 Flash |
14-
| Trivial | Mechanical edits | Haiku 4.5 | GPT-4.1 mini | Gemini Flash-Lite |
15-
16-
- **Escalation** — the strongest reasoning model available, called only when a trigger in
17-
[escalate.md](escalate.md) fires: unclear root cause, architectural risk, security sensitivity,
18-
an irreversible operation, repeated spec gaps, or low confidence in a review. Answers one
19-
specific question, then hands control back to the coordinator.
20-
- **Coordinator** — a capable mid-tier model, resident for the whole task. Owns analysis,
21-
planning, supervision, and verification by default. It's capable enough for the large majority
22-
of work, and cheap enough relative to Escalation tier that most tasks never need to call up at
23-
all — that's the point of the split.
24-
- **Implementer** — often literally the same model as the coordinator; the distinction is
25-
parallelism and workspace isolation, not capability. Falls back to a smaller model for batches
26-
of mechanical, unambiguous edits.
27-
- **Trivial** — small, very fast models for mechanical, unambiguous edits: renames, config
28-
tweaks, typo fixes, doc touch-ups. Batch several to amortize the dispatch overhead. When in
29-
doubt between trivial and implementer, pick implementer — a wrong cheap edit costs more than
30-
the price difference.
9+
- **Tier:** Escalation
10+
- **Role:** Judgment calls the coordinator flags
11+
- **Anthropic:** Fable 5, Opus 4.8
12+
- **OpenAI:** Sol, GPT-5 (high)
13+
- **Google:** Gemini 2.5 Pro
14+
15+
- **Tier:** Coordinator
16+
- **Role:** Resident; owns every phase by default
17+
- **Anthropic:** Sonnet 5
18+
- **OpenAI:** GPT-5, GPT-4.1
19+
- **Google:** Gemini 2.5 Flash
20+
21+
- **Tier:** Implementer
22+
- **Role:** Pinned-spec work, often same tier as coordinator
23+
- **Anthropic:** Sonnet 5
24+
- **OpenAI:** GPT-5, GPT-4.1
25+
- **Google:** Gemini 2.5 Flash
26+
27+
- **Tier:** Trivial
28+
- **Role:** Mechanical edits
29+
- **Anthropic:** Haiku 4.5
30+
- **OpenAI:** GPT-4.1 mini
31+
- **Google:** Gemini Flash-Lite
32+
33+
- **Escalation** — the strongest reasoning model available, called only when a trigger in [escalate.md](escalate.md)
34+
fires: unclear root cause, architectural risk, security sensitivity, an irreversible operation, repeated spec gaps, or
35+
low confidence in a review. Answers one specific question, then hands control back to the coordinator.
36+
- **Coordinator** — a capable mid-tier model, resident for the whole task. Owns analysis, planning, supervision, and
37+
verification by default. It's capable enough for the large majority of work, and cheap enough relative to Escalation
38+
tier that most tasks never need to call up at all — that's the point of the split.
39+
- **Implementer** — often literally the same model as the coordinator; the distinction is parallelism and workspace
40+
isolation, not capability. Falls back to a smaller model for batches of mechanical, unambiguous edits.
41+
- **Trivial** — small, very fast models for mechanical, unambiguous edits: renames, config tweaks, typo fixes, doc
42+
touch-ups. Batch several to amortize the dispatch overhead. When in doubt between trivial and implementer, pick
43+
implementer — a wrong cheap edit costs more than the price difference.
3144

3245
## Tooling mappings
3346

3447
How to run the coordinator/escalation/implementer split in common agent tooling:
3548

36-
- **Claude Code** — run the session itself on a coordinator-tier model (e.g. Sonnet 5). Call
37-
`Agent` with `model: opus` (or `fable`) only at an escalation checkpoint, scoped to the one
38-
question that triggered it. Use worktree isolation for parallel implementer-tier tasks, and
39-
`model: haiku` for batched trivial edits.
40-
- **GitHub Copilot** — run Copilot Chat on a coordinator-tier model for the whole flow; switch the
41-
model picker to the strongest reasoning model only for the specific question an escalation
42-
trigger flagged, then switch back. Standalone, well-specified tasks can still be assigned to the
43-
Copilot coding agent (assign the issue or PR to Copilot), which works on its own branch — the
44-
pinned spec becomes the issue body.
45-
- **Codex** — orchestrate locally (CLI or chat) on a coordinator-tier model; dispatch each pinned
46-
spec as a Codex cloud task, one task per independent unit, and review the resulting diffs
47-
yourself, escalating to the frontier model only when a trigger fires.
48-
- **Cursor and similar IDE agents** — one composer/agent session per task on a coordinator-tier
49-
model; background agents for the parallel implementer-tier ones; switch to the strongest model
50-
in-session only for an escalation checkpoint, then switch back.
51-
52-
**No subagent support at all?** Keep the phases, drop the parallelism: run the whole flow on a
53-
coordinator-tier model, and switch the session model up to the strongest one only for the specific
54-
question an escalation trigger flagged, then switch back down. The discipline transfers even when
55-
the delegation mechanism does not.
49+
- **Claude Code** — run the session itself on a coordinator-tier model (e.g. Sonnet 5). Call `Agent` with `model: opus`
50+
(or `fable`) only at an escalation checkpoint, scoped to the one question that triggered it. Use worktree isolation
51+
for parallel implementer-tier tasks, and `model: haiku` for batched trivial edits.
52+
- **GitHub Copilot** — run Copilot Chat on a coordinator-tier model for the whole flow; switch the model picker to the
53+
strongest reasoning model only for the specific question an escalation trigger flagged, then switch back. Standalone,
54+
well-specified tasks can still be assigned to the Copilot coding agent (assign the issue or PR to Copilot), which
55+
works on its own branch — the pinned spec becomes the issue body.
56+
- **Codex** — orchestrate locally (CLI or chat) on a coordinator-tier model; dispatch each pinned spec as a Codex cloud
57+
task, one task per independent unit, and review the resulting diffs yourself, escalating to the frontier model only
58+
when a trigger fires.
59+
- **Cursor and similar IDE agents** — one composer/agent session per task on a coordinator-tier model; background agents
60+
for the parallel implementer-tier ones; switch to the strongest model in-session only for an escalation checkpoint,
61+
then switch back.
62+
63+
**No subagent support at all?** Keep the phases, drop the parallelism: run the whole flow on a coordinator-tier model,
64+
and switch the session model up to the strongest one only for the specific question an escalation trigger flagged, then
65+
switch back down. The discipline transfers even when the delegation mechanism does not.

0 commit comments

Comments
 (0)