Engineering Orchestrator
Decides what happens, in what order, and when to stop. Every other dev skill
is a specialist; this one is the lead engineer who assigns them.
Two failure modes are equally bad: activating everything for a typo, and
skipping a security gate to save tokens. The orchestrator optimises for the
smallest plan that still contains every mandatory gate.
1. Protocol
- Read the request literally. Extract the requested outcome, not the
supposed intent behind it. Record what was explicitly asked and what was
not.
- Classify the task into one or more categories from section 2.
- Locate the surface: which application, which layer, which files. When
this cannot be answered, exploration is the first step by definition.
- Establish the stack through
project-exploration, at the depth from
its section 2.
- Compose the plan from section 3, then apply the mandatory gates in
section 4 and the exclusion rules in section 5.
- Announce the plan in one block, at most one line per step.
- Execute step by step. After each step, check its exit condition before
moving on.
- Re-plan when a step invalidates an assumption. A discovery that changes
the category restarts planning from step 2, and the change is stated.
- Close with the completion verdict of section 7.
2. Classification
A request receives one primary category and any number of secondary ones. The
first twenty are the general categories; the remainder name a surface with its
own failure modes and its own plan.
| Category |
Recognised by |
| EXPLORATION |
unfamiliar codebase, how does X work, where is Y |
| ARCHITECTURE |
new subsystem, boundary change, data ownership, scaling shape |
| FRONTEND |
component, page, client state, form, rendering |
| BACKEND |
endpoint, handler, service, job, queue, business rule |
| FULLSTACK |
a feature crossing client and server |
| DATABASE |
schema, migration, query, index, transaction |
| API |
contract, versioning, payload shape, status codes |
| AUTHENTICATION |
login, session, token, provider, password, MFA |
| SECURITY |
vulnerability, audit, hardening, incident, dependency alert |
| VALIDATION |
untrusted input, schema, sanitisation, boundary |
| DEBUGGING |
reported defect, unexpected behaviour, failing test, crash |
| PERFORMANCE |
slow, timeout, memory, bundle size, query cost |
| UI_UX |
layout, visual design, interaction, accessibility, responsive |
| TESTING |
coverage, missing tests, flaky test, test strategy |
| BROWSER_AUTOMATION |
end to end flow, screenshot, visual check, journey |
| DOCUMENTATION |
readme, api docs, setup, decision record |
| GIT |
branch, commit, pull request, history, conflict |
| RELEASE |
ship, deploy readiness, changelog, version |
| REFACTORING |
restructure without behaviour change |
| DEPENDENCY |
add, remove, replace or upgrade a library |
| QUALITY_CAMPAIGN |
validate a whole product, QA campaign, release validation |
| ACCESSIBILITY |
keyboard, screen reader, contrast, WCAG, audit |
| REGRESSION |
after a fix or a merge, what still works |
| MIGRATION |
framework, provider, database or architecture change |
| LEGACY |
inherited codebase, no tests, nobody knows how it works |
| INCIDENT |
production degraded, outage, data at risk, postmortem |
| INFRASTRUCTURE |
provisioning, terraform, cloud resources, environments |
| PAYMENTS |
checkout, subscription, invoice, refund, webhook from a provider |
| JOBS |
queue, worker, cron, scheduled task, webhook consumer |
| REALTIME |
websocket, live updates, presence, collaboration |
| FILES |
upload, download, attachment, media, export, import |
| I18N |
translation, locale, timezone, currency format, right to left |
| SEO |
metadata, sitemap, canonical, indexing, structured data |
| DESIGN_SYSTEM |
tokens, component library, theme, visual consistency |
| PRIVACY |
personal data, retention, erasure, consent, export |
| CACHING |
cache, invalidation, CDN, stale data |
| ANALYTICS |
events, funnels, conversion, product measurement |
| FEATURE_FLAGS |
toggle, gradual rollout, kill switch, experiment |
Misclassification is cheap to fix and expensive to ignore. When two categories
compete, take the one with the stricter gates.
3. Plan composition
Canonical plans live in resources/execution-plans.md, one per category, in a
machine checkable format. The orchestrator starts from the canonical plan and
adapts it to the project.
Adaptation rules:
- A step whose skill has no purchase on this project is dropped, with the
reason stated. Example:
playwright-automation on a repository with no
browser surface.
- A step is added when the surface demands it. Example: adding
input-validation to a FRONTEND task because the page introduces a server
action.
- Steps are never reordered across a gate boundary from section 4.
Composition for multi category requests: merge the plans, deduplicate, and
keep the earliest position of each step.
4. Mandatory gates
These are never dropped to save time. Dropping one is a defect in the plan,
not an optimisation.
| Gate |
Applies when |
Enforced by |
| Exploration before decision |
any unread code is touched |
project-exploration |
| Validation before persistence |
any new external input reaches storage or a side effect |
input-validation |
| Authorization before exposure |
any new route, action or query returning user scoped data |
security-audit |
| Security review before merge |
auth, payments, uploads, user content, permissions, secrets, dependencies |
security-audit |
| Test before done |
any behaviour change |
testing-quality |
| Review before delivery |
any code written by the agent |
code-review-protocol |
| Continuity before handoff |
any session that changed the repository |
project-continuity |
| Author check before commit |
every commit |
git-workflow |
A gate can be satisfied by evidence rather than by a full skill run. Example:
the test gate is satisfied when the change is covered by an existing test that
was executed and observed to fail before and pass after.
5. Exclusion rules
The orchestrator does not activate:
architecture-design for a change confined to one existing module;
ui-ux-engineering for a change with no visual output;
playwright-automation when no browser tooling exists and the task does not
justify introducing it;
performance-engineering without a measurement or a concrete symptom;
dependency-selection unless a library is actually being added, replaced or
removed;
release-readiness outside an explicit ship or release request;
- itself, recursively. One orchestration per request, re-planned in place.
6. Anti-loop rules
- A skill runs at most twice per task. The second run must state what changed
since the first.
- A finding rejected once is not re-raised in the same form.
- When two skills disagree, the stricter one wins for security and
correctness, the project convention wins for style.
- Verification is not repeated when its inputs are unchanged.
- When a plan produces no progress twice in a row, the orchestrator stops and
reports the exact blocker rather than cycling.
7. Completion verdict
The task is complete when all of the following are true, each with evidence:
- Every step of the plan ran or was dropped with a stated reason.
- Every mandatory gate that applies was satisfied.
- The definition of done from
engineering-core section 8 passes.
- The user visible outcome matches the literal request.
- What remains is named, or nothing remains.
The verdict is one of Complete, Partial with the named remainder, or
Blocked with the exact external blocker. There is no fourth value, and
Complete is never used to mean almost complete.
8. Plan announcement format
Category: BACKEND, secondary SECURITY
Surface: apps/api, payments module
Plan:
1 project-exploration L2, payments slice
2 architecture-design, transaction boundary only
3 backend-engineering, the endpoint
4 input-validation, request body and idempotency key
5 security-audit, authorization and amount handling
6 testing-quality, unit plus integration
7 code-review-protocol
8 technical-documentation, api reference
9 project-continuity
10 git-workflow
Dropped: ui-ux-engineering, no visual surface.
Nine lines of plan for a day of work is correct. Nine paragraphs is not.
9. Auto-critique
Score from 0 to 5: classification accuracy, minimality of the plan, presence
of every applicable gate, correctness of the ordering, quality of the dropped
step reasons, honesty of the completion verdict.
Threshold: no axis below 3, average at least 4. A plan missing an applicable
gate scores 0 on that axis regardless of the rest, and is recomposed.
10. Auto-critique of the orchestrator itself
Every fifth task, verify that plans are not drifting toward a fixed maximal
sequence. Symptom: the same twelve steps for tasks of very different size.
Cause: classification collapsed into one category. Correction: re-read
section 2 and re-derive the surface.
11. Interfaces
- Upstream:
engineering-core.
- Downstream: every skill in
dev-skills.
- Reference data:
resources/execution-plans.md,
resources/routing-table.md.
- Validated by:
tests/validate-orchestration.sh.
1---2name: engineering-orchestrator3description: Engineering Orchestrator4---56# Engineering Orchestrator78Decides what happens, in what order, and when to stop. Every other dev skill9is a specialist; this one is the lead engineer who assigns them.1011Two failure modes are equally bad: activating everything for a typo, and12skipping a security gate to save tokens. The orchestrator optimises for the13smallest plan that still contains every mandatory gate.1415## 1. Protocol16171. **Read the request literally.** Extract the requested outcome, not the18 supposed intent behind it. Record what was explicitly asked and what was19 not.202. **Classify** the task into one or more categories from section 2.213. **Locate the surface**: which application, which layer, which files. When22 this cannot be answered, exploration is the first step by definition.234. **Establish the stack** through `project-exploration`, at the depth from24 its section 2.255. **Compose the plan** from section 3, then apply the mandatory gates in26 section 4 and the exclusion rules in section 5.276. **Announce the plan in one block**, at most one line per step.287. **Execute step by step.** After each step, check its exit condition before29 moving on.308. **Re-plan when a step invalidates an assumption.** A discovery that changes31 the category restarts planning from step 2, and the change is stated.329. **Close** with the completion verdict of section 7.3334## 2. Classification3536A request receives one primary category and any number of secondary ones. The37first twenty are the general categories; the remainder name a surface with its38own failure modes and its own plan.3940| Category | Recognised by |41|---|---|42| EXPLORATION | unfamiliar codebase, how does X work, where is Y |43| ARCHITECTURE | new subsystem, boundary change, data ownership, scaling shape |44| FRONTEND | component, page, client state, form, rendering |45| BACKEND | endpoint, handler, service, job, queue, business rule |46| FULLSTACK | a feature crossing client and server |47| DATABASE | schema, migration, query, index, transaction |48| API | contract, versioning, payload shape, status codes |49| AUTHENTICATION | login, session, token, provider, password, MFA |50| SECURITY | vulnerability, audit, hardening, incident, dependency alert |51| VALIDATION | untrusted input, schema, sanitisation, boundary |52| DEBUGGING | reported defect, unexpected behaviour, failing test, crash |53| PERFORMANCE | slow, timeout, memory, bundle size, query cost |54| UI_UX | layout, visual design, interaction, accessibility, responsive |55| TESTING | coverage, missing tests, flaky test, test strategy |56| BROWSER_AUTOMATION | end to end flow, screenshot, visual check, journey |57| DOCUMENTATION | readme, api docs, setup, decision record |58| GIT | branch, commit, pull request, history, conflict |59| RELEASE | ship, deploy readiness, changelog, version |60| REFACTORING | restructure without behaviour change |61| DEPENDENCY | add, remove, replace or upgrade a library |62| QUALITY_CAMPAIGN | validate a whole product, QA campaign, release validation |63| ACCESSIBILITY | keyboard, screen reader, contrast, WCAG, audit |64| REGRESSION | after a fix or a merge, what still works |65| MIGRATION | framework, provider, database or architecture change |66| LEGACY | inherited codebase, no tests, nobody knows how it works |67| INCIDENT | production degraded, outage, data at risk, postmortem |68| INFRASTRUCTURE | provisioning, terraform, cloud resources, environments |69| PAYMENTS | checkout, subscription, invoice, refund, webhook from a provider |70| JOBS | queue, worker, cron, scheduled task, webhook consumer |71| REALTIME | websocket, live updates, presence, collaboration |72| FILES | upload, download, attachment, media, export, import |73| I18N | translation, locale, timezone, currency format, right to left |74| SEO | metadata, sitemap, canonical, indexing, structured data |75| DESIGN_SYSTEM | tokens, component library, theme, visual consistency |76| PRIVACY | personal data, retention, erasure, consent, export |77| CACHING | cache, invalidation, CDN, stale data |78| ANALYTICS | events, funnels, conversion, product measurement |79| FEATURE_FLAGS | toggle, gradual rollout, kill switch, experiment |8081Misclassification is cheap to fix and expensive to ignore. When two categories82compete, take the one with the stricter gates.8384## 3. Plan composition8586Canonical plans live in `resources/execution-plans.md`, one per category, in a87machine checkable format. The orchestrator starts from the canonical plan and88adapts it to the project.8990Adaptation rules:9192- A step whose skill has no purchase on this project is dropped, with the93 reason stated. Example: `playwright-automation` on a repository with no94 browser surface.95- A step is added when the surface demands it. Example: adding96 `input-validation` to a FRONTEND task because the page introduces a server97 action.98- Steps are never reordered across a gate boundary from section 4.99100Composition for multi category requests: merge the plans, deduplicate, and101keep the earliest position of each step.102103## 4. Mandatory gates104105These are never dropped to save time. Dropping one is a defect in the plan,106not an optimisation.107108| Gate | Applies when | Enforced by |109|---|---|---|110| Exploration before decision | any unread code is touched | `project-exploration` |111| Validation before persistence | any new external input reaches storage or a side effect | `input-validation` |112| Authorization before exposure | any new route, action or query returning user scoped data | `security-audit` |113| Security review before merge | auth, payments, uploads, user content, permissions, secrets, dependencies | `security-audit` |114| Test before done | any behaviour change | `testing-quality` |115| Review before delivery | any code written by the agent | `code-review-protocol` |116| Continuity before handoff | any session that changed the repository | `project-continuity` |117| Author check before commit | every commit | `git-workflow` |118119A gate can be satisfied by evidence rather than by a full skill run. Example:120the test gate is satisfied when the change is covered by an existing test that121was executed and observed to fail before and pass after.122123## 5. Exclusion rules124125The orchestrator does not activate:126127- `architecture-design` for a change confined to one existing module;128- `ui-ux-engineering` for a change with no visual output;129- `playwright-automation` when no browser tooling exists and the task does not130 justify introducing it;131- `performance-engineering` without a measurement or a concrete symptom;132- `dependency-selection` unless a library is actually being added, replaced or133 removed;134- `release-readiness` outside an explicit ship or release request;135- itself, recursively. One orchestration per request, re-planned in place.136137## 6. Anti-loop rules1381391. A skill runs at most twice per task. The second run must state what changed140 since the first.1412. A finding rejected once is not re-raised in the same form.1423. When two skills disagree, the stricter one wins for security and143 correctness, the project convention wins for style.1444. Verification is not repeated when its inputs are unchanged.1455. When a plan produces no progress twice in a row, the orchestrator stops and146 reports the exact blocker rather than cycling.147148## 7. Completion verdict149150The task is complete when all of the following are true, each with evidence:1511521. Every step of the plan ran or was dropped with a stated reason.1532. Every mandatory gate that applies was satisfied.1543. The definition of done from `engineering-core` section 8 passes.1554. The user visible outcome matches the literal request.1565. What remains is named, or nothing remains.157158The verdict is one of `Complete`, `Partial` with the named remainder, or159`Blocked` with the exact external blocker. There is no fourth value, and160`Complete` is never used to mean almost complete.161162## 8. Plan announcement format163164```165Category: BACKEND, secondary SECURITY166Surface: apps/api, payments module167Plan:168 1 project-exploration L2, payments slice169 2 architecture-design, transaction boundary only170 3 backend-engineering, the endpoint171 4 input-validation, request body and idempotency key172 5 security-audit, authorization and amount handling173 6 testing-quality, unit plus integration174 7 code-review-protocol175 8 technical-documentation, api reference176 9 project-continuity177 10 git-workflow178Dropped: ui-ux-engineering, no visual surface.179```180181Nine lines of plan for a day of work is correct. Nine paragraphs is not.182183## 9. Auto-critique184185Score from 0 to 5: classification accuracy, minimality of the plan, presence186of every applicable gate, correctness of the ordering, quality of the dropped187step reasons, honesty of the completion verdict.188189Threshold: no axis below 3, average at least 4. A plan missing an applicable190gate scores 0 on that axis regardless of the rest, and is recomposed.191192## 10. Auto-critique of the orchestrator itself193194Every fifth task, verify that plans are not drifting toward a fixed maximal195sequence. Symptom: the same twelve steps for tasks of very different size.196Cause: classification collapsed into one category. Correction: re-read197section 2 and re-derive the surface.198199## 11. Interfaces200201- Upstream: `engineering-core`.202- Downstream: every skill in `dev-skills`.203- Reference data: `resources/execution-plans.md`,204 `resources/routing-table.md`.205- Validated by: `tests/validate-orchestration.sh`.