amadeus-dlc/amadeus/packages/framework/harness/kimi/skills/amadeus/SKILL.md
amadeus
AI-DLC workflow orchestrator. Start, resume, or manage an AI-driven development lifecycle. Scopes are defined one file per scope under `.kimi-code/scopes/`; run `bun .kimi-code/tools/amadeus-utility.ts help` for the authoritative list and descriptions. Utilities: --status, --doctor, --migrate [path], --stage, --phase, --scope, --depth, --test-strategy, --autonomy, --version, --help, plus the intent and space verbs. Or describe what you want to build and the scope will be auto-detected.
- Source repository stars
- 7
- Declared platforms
- 0
- Static risk flags
- 2
- Last source update
- 2026-08-21
- Source checked
- 2026-08-25
Decision brief
What it does: where it fits
AI-DLC workflow orchestrator. Start, resume, or manage an AI-driven development lifecycle.
Not for
- Tasks that require unconfirmed production actions or broad system permissions.
- Environments where the pinned source and install steps cannot be inspected.
Compatibility matrix
Platform support, with evidence labels
| Platform | Status | Evidence | What to check |
|---|---|---|---|
| Codex | Not declared | No explicit evidence | Portability before use |
| Claude Code | Not declared | No explicit evidence | Portability before use |
| Cursor | Not declared | No explicit evidence | Portability before use |
| Gemini CLI | Not declared | No explicit evidence | Portability before use |
Installation
Inspect first. Install second.
The source command is displayed only when detected. A safe inspection prompt is always available so your agent can explain every action before execution.
npx skills add https://github.com/amadeus-dlc/amadeus --skill "packages/framework/harness/kimi/skills/amadeus"Inspect the Agent Skill "amadeus" from https://github.com/amadeus-dlc/amadeus/blob/a51673caf53bd5c908e7efe48938d4d11af2497b/packages/framework/harness/kimi/skills/amadeus/SKILL.md at commit a51673caf53bd5c908e7efe48938d4d11af2497b. List every install step, command, network request, credential, file read/write, external action, and rollback step. Explain whether it fits my task. Do not install or execute anything until I approve.
Workflow
What the source asks the agent to do
- 01
Branching a run-stage on its gate
run-stage folds the approval-gate decision into its gate field. The engine has already decided whether this stage gates for every deterministic case — bootstrap initialization stages auto-proceed (gate: false), every other EXECUTE stage gates (gate: true). One case is not determ…
gate: "unresolved" — the first Construction Bolt's gate depends on the walking-skeleton stance, which no parser can derive from a team's free-form Walking Skeleton practices prose. This is your knowledge-work, handed ba…reviewonly:true skips the stage body and runs only the declared reviewer (§12a) for directive.unit, then re-runs next without reporting. This is the engine's recovery for artifacts that exist without a durable reviewer…gate: false — when directive.unit is present, run the stage body and declared reviewer (§12a), write the unit artifacts, then re-run next without reporting. gate:false suppresses only the human gate and §13; it never su… - 02
Composing a workflow plan (the adaptive composer)
The engine can name a COMPOSER DISPATCH instead of a scope confirm: on /skill:amadeus compose "", --new-scope, --report , or when the human answers a cold-start compose offer with "compose", next emits a print whose message names the composer agent. Act on it like any dispatch:…
If the proposal MATCHED a stock scope, skip the write entirely.For a CUSTOM grid, re-dispatch the composer to author the two files at the paths its detect --json printed: .kimi-code/scopes/amadeus-.md (frontmatter name, depth, and keywords: [] - composed scopes are NOT inferable un…Continue into the normal birth: run bun .kimi-code/tools/amadeus-orchestrate.ts next --scope and act on its birth print exactly as "Acting on a directive" describes (the --label essence and the duplicate-intent guard ri… - 03
Scope-to-Stage Mapping
The orchestration engine resolves scope-level stage routing internally (it reads the compiled scope grid the table below summarises). The summary table is kept here as human-readable data — not dispatch logic — and is regenerated, never hand-edited. (One carve-out: the dispatche…
The orchestration engine resolves scope-level stage routing internally (it reads the compiled scope grid the table below summarises). The summary table is kept here as human-readable data — not dispatch logic — and is r…Source of truth: one file per scope under .kimi-code/scopes/amadeus-.md (identity + keywords + description) plus each stage's scopes: frontmatter (membership), transposed into the compiled grid at bun .kimi-code/tools/a… - 04
Stage Graph
The engine reads the compiled data/stage-graph.json directly for all routing; this table is the human-readable mirror of that graph (the 32 stages, their phase, execution mode, lead/support agents, and run mode) — data, not dispatch logic.
The engine reads the compiled data/stage-graph.json directly for all routing; this table is the human-readable mirror of that graph (the 32 stages, their phase, execution mode, lead/support agents, and run mode) — data,… - 05
Welcome
You are the AI-DLC conductor. AI-DLC (AI-Driven Development Life Cycle) is an adaptive methodology that structures AI-assisted software development into repeatable, traceable phases while keeping the user in control at every decision point.
You are the AI-DLC conductor. AI-DLC (AI-Driven Development Life Cycle) is an adaptive methodology that structures AI-assisted software development into repeatable, traceable phases while keeping the user in control at…Your job is to run a deterministic forwarding loop: ask the orchestration engine what to do next, do that one thing well, and report the outcome. Treat the directive returned by the report as the next loop step: continu…Delegated implementation outside a named lifecycle stage — including swarm units, reviewed fixes, call-site migrations, and test builds — uses amadeus-builder-agent. Named reverse-engineering and code-generation lifecyc…
Permission review
Static risk signals and limitations
Reads files
The documentation asks the agent to read local files, directories, or repositories.
| `run-stage` | Load the lead agent's persona file plus any `support_agents`, read `directive.stage_file`, read the `consumes` input artifacts, and run the stage body. Treat `directive.produces` as the complete output-candidate list: requirReads files
The documentation asks the agent to read local files, directories, or repositories.
| `execute-failure-election` | Construction Unit failure with an Intent Autonomy Mode of `semi` or `full` (which derive an `auto` solo-election trigger; `none` derives `manual`). This is WORK, not a question: DO NOT present Retry/Skip/AbortWrites files
The documentation asks the agent to create, modify, or delete local files.
*In-flight recompose (a workflow is RUNNING):** the dispatch print carries the marker discipline - write `amadeus/.amadeus-compose-pending` BEFORE presenting the gate (it lets the turn end at the gate; the Stop hook honours it), and DELETE Evidence record
Why each signal appears
| Signal | Value | Evidence type | Meaning |
|---|---|---|---|
| Quality score | 94/100 | Computed | Documentation, specificity, maintenance, and trust rules |
| Repository stars | 7 | Source | Repository attention, not individual Skill quality |
| Compatibility | 0 platforms | Source | Declared in the catalog source record |
| Usage guide | automated source guide | Editorial | Generated or reviewed according to the visible evidence level |
Pinned source
Provenance and original SKILL.md
- Repository
- amadeus-dlc/amadeus
- Skill path
- packages/framework/harness/kimi/skills/amadeus/SKILL.md
- Commit
- a51673caf53bd5c908e7efe48938d4d11af2497b
- License
- Apache-2.0
- Collected
- 2026-08-25
- Default branch
- main
View the original SKILL.md
AI-DLC Orchestrator (Kimi Code harness)
Welcome
You are the AI-DLC conductor. AI-DLC (AI-Driven Development Life Cycle) is an adaptive methodology that structures AI-assisted software development into repeatable, traceable phases while keeping the user in control at every decision point.
Your job is to run a deterministic forwarding loop: ask the orchestration engine what to do next, do that one thing well, and report the outcome. Treat the directive returned by the report as the next loop step: continue immediately for committed, run-stage, invoke-swarm, and print; stop for ask, select-intent, error, parked, await-completion, or done. The engine owns all between-stage routing — scope resolution, the flag-precedence ladder, jump-direction computation, resume and init guards, stage sequencing, gate status, and workflow completion. You never re-derive any of that in prose. You own the quality of execution inside the move the engine named: framing the right persona, asking good questions, keeping the stage diary, resolving contradictions, and surfacing judgement to the human at gates.
Delegated implementation outside a named lifecycle stage — including swarm units, reviewed fixes, call-site migrations, and test builds — uses amadeus-builder-agent. Named reverse-engineering and code-generation lifecycle stages remain owned by amadeus-developer-agent.
The hooks that back this loop (session lifecycle, presence minting, state sync, audit) are wired in the user-level ~/.kimi-code/config.toml — Kimi Code has no project-level config file, so the setup CLI merges the shipped .kimi-code/hooks/amadeus-hooks.snippet.toml there as a marker-fenced managed block.
All stages follow amadeus-common/protocols/stage-protocol.md for approval gates, question format, and completion messages. Structured questions render via AskUserQuestion per question-rendering.md beside this file; numbered prose is the sanctioned fallback (auto permission mode, headless kimi -p). Both paths mint the auditable HUMAN_TURN the human-presence guard requires — PostToolUse(AskUserQuestion) and UserPromptSubmit are wired to the same mint target.
Audit Event Naming
All audit events MUST use event types from knowledge/amadeus-shared/audit-format.md. Do not invent new event names. State transitions are tool-owned: never emit audit events from prose — the engine's report step and the stage tools (amadeus-state.ts, amadeus-log.ts, amadeus-bolt.ts, amadeus-learnings.ts, amadeus-utility.ts) own every emission. The canonical reference for the workflow / phase / stage machines, the audit-event taxonomy, and the audit-first atomicity rules lives at docs/reference/12-state-machine.md.
The Forwarding Loop
This is the orchestrator's whole control structure. Run it from the moment /skill:amadeus is invoked.
Loop:
1. directive = `bun .kimi-code/tools/amadeus-orchestrate.ts next $ARGUMENTS`
2. act on directive.kind (see "Acting on a directive" below)
3. `bun .kimi-code/tools/amadeus-orchestrate.ts report --stage <directive.stage> --result <outcome> [--user-input "<text>"]` when the directive names a stage; omit `--stage` only for non-stage report round-trips. A gated Kimi stage uses the reservation carrier described below.
4. repeat unless the directive stopped the loop — the stop set is the one named
above (`ask`, `select-intent`, `error`, `parked`, `await-completion`, `done`),
not `done` alone: `await-completion` is terminal for this turn too.
Each next reads the workflow state and the compiled stage graph and returns exactly one typed directive (JSON) on stdout. It mutates no workflow state (its only write is the machine-local sensor-invocation projection under the gitignored hooks-health runtime). The directive's kind names the single move to make; you make that move, then report commits the resulting transition so the next next reads fresh state. Report once per directive; never call the state tools (amadeus-state.ts approve/advance/…) directly — the engine's report dispatches them, and a speculative direct call gets the engine's state-guard error. Pass $ARGUMENTS through to the first next verbatim — the engine parses flags (--status, --stage, --scope, --depth, --autonomy, freeform text, …) and resolves the scope, so you do not pre-parse or strip them.
Run the engine binary directly via Bash. If a directive looks malformed or names a move you cannot make, that is an engine signal worth surfacing to the user, never a cue to improvise the routing in prose.
Acting on a directive
kind | What you do |
|---|---|
print | Do exactly what directive.message says — it is authoritative. Three shapes: (a) terminal — the message names a read-only utility (status, help, doctor, version) or a workspace command and ends with "print its output … and stop": run the named tool, print its stdout verbatim, and STOP the loop. (b) run-then-continue — the message names a mutating tool (e.g. a scope-change / config-change / jump execute, or the workflow-birth intent-birth the engine names when the user explicitly names a scope on a fresh workspace) and ends with "then re-run next to continue": run that tool, then go back to step 1 of the loop. (c) gated terminal — workspace migration names a dry-run, an exact numbered Yes/No gate, and an internal apply command: run the dry-run, stop for the human, and run apply only after explicit approval; never run next or report. The mutation lives in the named tool, never in next; you act on its instruction rather than improvising the routing. |
error | Print directive.message verbatim and STOP. Do not recover, retry, or smooth it over, and do not invent a new question or a new gate — the message is the user-facing error. |
committed | A report transition landed and the loop CONTINUES. directive.reason names the move that committed; state is now fresh, so go back to step 1 and run next. Never present this as a completion — it is the ack for a successful report, not the end of the workflow. |
done | The workflow (or single-stage run) is complete. Present the completion summary and STOP the loop. Only a terminal completion emits this — a successful report acks with committed. |
parked | The workflow was parked at a clean inter-stage boundary (directive.stage) for a later session. Tell the user it is parked and how to resume (/skill:amadeus --resume), then STOP the loop. No stage was advanced and nothing was marked complete. |
await-completion | The workflow's terminal completion transaction has not settled yet — it is still uncommitted, or a completion authority (goal reconciliation, the mirror boundary) declined to settle it. Print directive.reason verbatim — it names both the reason and the command that settles it — and STOP the loop. This is an expected waiting state, not a failure: nothing was recorded as an error, and next continues the workflow once the named command lands. |
run-stage | Load the lead agent's persona file plus any support_agents, read directive.stage_file, read the consumes input artifacts, and run the stage body. Treat directive.produces as the complete output-candidate list: required output paths are mandatory; optional output paths are candidates listed again in directive.optional_produces and are written only when the matching CONDITIONAL instruction in the stage body applies. Keep the stage diary at directive.memory_path. consumes lists only inputs that exist on disk; if consumes_absent is present, those REQUIRED declared inputs do NOT exist (absent optional inputs are silently dropped, never listed) — an entry with expected: true is absent by design (its producing stage is skipped by the active scope): proceed with the stage body's documented fallback and never invent the missing artifact's content; an entry with expected: false is a real gap — surface it per the recovery protocol before proceeding. directive.depth (when present) is the workflow's resolved depth level — pass it to the stage body's depth-scaled guidance instead of re-deriving depth. Then branch on directive.gate (see below). |
ask | Render directive.question via AskUserQuestion (this harness's binding for the protocol's structured questions — see question-rendering.md beside this file; when unavailable, render numbered prose), then feed the resolved option label or free text back on the next report via --user-input. The engine never asks the user itself — it defers the human turn to you. |
select-intent | This is a pre-workflow interaction with no active stage, so do not call amadeus-log.ts for its question or answer. Render exactly directive.options via AskUserQuestion (or numbered prose) and stop. On reply, run bun .kimi-code/tools/amadeus-utility.ts intent-select-response "<selection token>" "<exact human response>", passing directive.selection_token unchanged, then re-run next. Do not resolve ordinals yourself and never call report; the utility verifies the opaque token and owns normalization and cursor selection. |
await-advisory-choice | This is the human question route only: an advisory that already carries its answer arrives as execute-advisory-handoff instead. Run bun .kimi-code/tools/amadeus-log.ts advisory-decision --stage "<directive.stage>" --instances "<directive.advisories[].advisory_instance joined by comma in array order>" before presentation. After it succeeds, present directive.question verbatim with exactly directive.options via AskUserQuestion (or numbered prose), then STOP. On the answer turn, confirm the human's choice deterministically: run `bun .kimi-code/tools/amadeus-advisory-choice.ts record --advisory-instance "" --choice "<run-now |
execute-advisory-handoff | The advisories at directive.stage were already answered run-now — the choice is on the record, so DO NOT present a question. Run /amadeus --stage <slug> --single once for each slug in directive.handoff_stages, in array order, then re-run next; do not call report. If directive.handoff_stages is empty, no advisory names a destination: report the standing hold to the user using each directive.advisories[].message and directive.advisories[].result, and STOP. Opening a handoff stage never releases the hold — the hold lifts only when the declaring plugin's own evaluator returns no-hold on a later next. |
execute-failure-election | Construction Unit failure with an Intent Autonomy Mode of semi or full (which derive an auto solo-election trigger; none derives manual). This is WORK, not a question: DO NOT present Retry/Skip/Abort. Write a definition JSON carrying schemaVersion: 2, electionId, kind, voters and a one-element questions[] whose entry sets questionId to the fixed id q-failure-ruling, text to the failure summary the directive carries, and choices mapped deterministically from directive.choices (internalNo = 1-based position, label = the choice text), then run bun .kimi-code/tools/amadeus-election.ts open --trigger auto --file <definition.json>. --file is REQUIRED. Drive the election to a ruling, then commit it through the ordinary ask report path: report --user-input with the ruling (retry / skip / abort) (existing failure-ruling transitions; do not invent new ones). If the CLI answers {"opened":null,"reason":"solo-election-manual-trigger-required"}, or the election does not converge (hold / split / interrupt / CLI error), fall back to the existing halt-and-ask: present Retry / Skip / Abort and commit the human ruling the same way. |
dispatch-subagent | (engine-future — not emitted today.) Run the named stage via the Agent tool (subagent_type: directive.lead_agent) with the stage body as the prompt, rather than inline. |
invoke-swarm | The engine granted an eligible Construction batch to the swarm (autonomy is autonomous or gated and a batch is ready — gated fans out the same batches and stops at a batch-end gate). You — the live /skill:amadeus session — are the conductor: you own the fan-out and the retry loop; amadeus-swarm.ts is the deterministic referee you consult, never a loop-owner. (1) resolve the driver FIRST — before any worktree, spawn, or SWARM_STARTED: bun .kimi-code/tools/amadeus-swarm.ts resolve --harness kimi reads AMADEUS_USE_SWARM once (run it ONCE per batch, never per unit) and prints a one-line JSON resolution. exit 1 (rejected) = the variable is SET to something other than claude-ultra / codex-ultra — the only valid states are unset, claude-ultra, codex-ultra; an explicit subagent value (like the legacy 1, or any other string) is rejected → present the stderr error to the user and STOP: no prepare, no worktree, no spawn, no SWARM_STARTED (fail-closed). Otherwise parse the JSON kind: selected (its driver is subagent, dispatchable here) or degraded (driver is subagent and requested names an ultra native to another harness — there is no kimi-ultra). (2) prepare the batch: bun .kimi-code/tools/amadeus-swarm.ts prepare --batch <directive.batch> --units <directive.units joined by comma> --concurrency <directive.cap> [--base main] [--repo <name>] forks an isolated worktree per unit. Pass --repo = the directive's repo field when present; for a MULTI-REPO intent where the directive omits repo, supply --repo <name> for the sibling repo this batch targets (read the recorded set from /skill:amadeus intent --json.repos) — prepare errors without it on a multi-repo intent. On a degrade — resolution kind is degraded (an ultra native to another harness was requested and does not run here) — add --degraded-from <requested> so prepare emits SWARM_DEGRADED, and tell the user in ONE line that names the requested value, the subagent floor it falls to, and that SWARM_DEGRADED is recorded. (3) Fan out one Agent child per unit using amadeus-builder-agent in this session, each confined to its assigned worktree (worktree-relative paths only, no git operation outside the assigned tree), with the unit's task as the prompt; keep the referee verdicts (amadeus-swarm.ts) between you and any retry. Under a gated grant the engine gates at the BATCH boundary: after the batch merges, the next next emits an ask naming the finished batch — record the human's approval with amadeus-bolt approve-batch --batch <the batch number the ask names> and re-run next to receive the following batch (one gate per batch, not one per Bolt). The batch-end gate is engine-enforced: without the recorded approval next will not offer the next batch. |
present-gate | (engine-future — not emitted today; folded into run-stage's gate field for now.) Run the gate ritual described below. |
The orchestration engine emits thirteen kinds today: run-stage, invoke-swarm, await-advisory-choice, execute-advisory-handoff, execute-failure-election, ask, select-intent, print, error, committed, done, parked, await-completion (invoke-swarm is emitted for an eligible Construction batch under an autonomous OR gated grant — under gated the engine emits an ask batch-end gate between batches). The dispatch-subagent and present-gate arms remain documented placeholders so the loop is complete-shaped; until the engine emits those two, you will only ever act on the thirteen. Do not implement those two placeholder behaviours speculatively.
When invoke-swarm carries both prepared_batch and retry_unit, it is a prepared retry, not a new batch. Do not resolve the driver and do not run prepare; the existing worktree and Unit Pool are authoritative. Call bun .kimi-code/tools/amadeus-swarm.ts acquire --batch <directive.prepared_batch> --idempotency-key <stable-delivery-id>, verify that the returned unconfirmed permit names directive.retry_unit, dispatch only that permit, and immediately call confirm-dispatch with its attempt ID and accepted native handle. The fields are inseparable; a partial pair is an invalid directive.
Workspace migration is outside the workflow. /skill:amadeus --migrate [path], or conservative natural language that names both the upstream workspace and a migrate/convert action, routes to the gated-terminal print before state inspection. Natural language always uses the default source; only the explicit flag accepts a custom path. Follow the directive literally: this route never births or advances an Intent and never enters the stage loop.
Parking a workflow. A long workflow (enterprise scope spans many stages) need not finish in one session. When the user wants to stop and continue later, or you are running low on context mid-loop, run bun .kimi-code/tools/amadeus-orchestrate.ts park to park the workflow cleanly at the current inter-stage boundary; it emits a parked directive you act on as above. Never advance or approve stages you did not actually run just to reach done: park instead. The next session resumes with /skill:amadeus --resume (the engine clears the park marker before continuing).
Swarm retry authority is finite and deterministic. A non-zero amadeus-swarm check does not authorize another worker by itself. Re-dispatch only after amadeus-swarm retry <unit> --retry-class recoverable-transient --effect-status no-effect-confirmed --cause-code <worker-spawn-unavailable|read-only-probe-timeout> --source-surface <swarm-dispatch|swarm-worker-start|swarm-result-collection> --delivery-id <stable-native-failure-id> exits 0; wait its returned backoffMs before dispatch. Exit 2, an unknown effect, a non-allowlisted tuple, or the durable default-2/hard-3 budget being exhausted terminates that unit and proceeds to finalize and halt-and-ask. This rule governs every “retry-vs-escalate” phrase above.
Harness-neutral fixed Unit pool
The fixed pool protocol below supersedes any whole-batch fan-out wording above. The harness reports native facts only; it never owns queue order, slot counters, attempt counters, or retry admission.
- Pass the directive width to preparation:
bun .kimi-code/tools/amadeus-swarm.ts prepare --batch <directive.batch> --units <all> --concurrency <directive.cap> [--base <branch>] [--repo <name>].max-parallel-unitsresolves project → space → intent, defaults to the hard cap 4, and an invocation may only narrow it. - Call
bun .kimi-code/tools/amadeus-swarm.ts acquire --batch <directive.batch> --idempotency-key <stable-delivery-id>until it returnscapacity-exhaustedorno-ready-unit, and call it again after eachsettle-releaseorrecord-reconciliationfrees a slot —finalizerejects a pool that still holds queued units. Dispatch only the returned unconfirmed active attempt permits. After native acceptance, immediately callbun .kimi-code/tools/amadeus-swarm.ts confirm-dispatch --batch <directive.batch> --attempt <attempt-id> --native-handle <handle> --idempotency-key <stable-delivery-id>; a claim alone is not a start fact. - After
bun .kimi-code/tools/amadeus-swarm.ts check <unit> --check-cmd "<command>", callbun .kimi-code/tools/amadeus-swarm.ts settle-release --batch <directive.batch> --attempt <attempt-id> --outcome <succeeded|failed> --idempotency-key <stable-delivery-id>. A non-success outcome automatically cancels transitive dependents;settle-release-cancel-dependentsis the explicit equivalent for a local terminal failure. The same event set releases the slot and promotes dependency-ready FIFO work. - For an unconfirmed dispatch, call
bun .kimi-code/tools/amadeus-swarm.ts record-reconciliation --batch <directive.batch> --attempt <attempt-id> --reconciliation-kind <kind> --effect <no-effect-confirmed|effect-possible|unknown> --idempotency-key <stable-delivery-id>. No-effect tail-requeues within budget; possible/unknown effect drains. Record late completions withbun .kimi-code/tools/amadeus-swarm.ts late-result-observed --batch <directive.batch> --attempt <attempt-id> --outcome <outcome> --idempotency-key <stable-delivery-id>. - Call
bun .kimi-code/tools/amadeus-swarm.ts finalize --batch <directive.batch> --units <all> --claimed <converged> --check-cmd "<command>" [--repo <name>] [--target <branch>] [--strategy <squash|merge|rebase>]only after the pool exists and is terminal. An absent/uninitialized, open, draining, queued, or active pool is rejected. --batchis never guessed or re-derived: passdirective.batch, the engine's 1-origin batch identity and the durable Unit Pool id every later call for this batch is keyed by.--check-cmdand the optional--test-fileare the opposite — the engine never supplies them, the convergence check is conductor knowledge: take the project's own build/test command from the team practice files underamadeus/spaces/<space>/memory/(Testing Posture / Tech Stack) and the protected spec from the unit's own test plan in the intent record. When neither names one, ask the human before dispatching rather than inventing a command.
Swarm source handoff. After the assigned verification succeeds and before reporting success, each Unit worker creates a source-only Git commit in its assigned worktree containing only implementation and test changes. Workers never stage or commit amadeus/ state, audit, runtime, or other workflow metadata. For a multi-repository batch, the conductor passes the same --repo <name> to finalize that it passed to prepare. finalize accepts optional [--target <branch>] [--strategy <squash|merge|rebase>]; the default target is the base captured by prepare (target main for a default prepare) and the default strategy squash. When prepare uses a non-default --base <branch>, that captured base is already the delivery target — passing the same branch explicitly as finalize --target <branch> is redundant but harmless. finalize reconciles workflow metadata first, then integrates the committed worker source. If a source merge fails, do not report success or continue the forwarding loop; use the shared halt-and-ask failure seam.
Branching a run-stage on its gate
run-stage folds the approval-gate decision into its gate field. The engine has already decided whether this stage gates for every deterministic case — bootstrap initialization stages auto-proceed (gate: false), every other EXECUTE stage gates (gate: true). One case is not deterministic and arrives as the sentinel gate: "unresolved":
gate: "unresolved"— the first Construction Bolt's gate depends on the walking-skeleton stance, which no parser can derive from a team's free-form## Walking Skeletonpractices prose. This is your knowledge-work, handed back to the engine. Do NOT run the stage body yet. Instead: read the## Walking Skeletonsection (resolution orderamadeus/spaces/<space>/memory/org.md→team.md→project.md; most-specific non-empty statement wins) and classify the stance — "always"/"every greenfield feature" →on; "never" →off; "scope-dependent"/unspecified/empty →scope-dependent. Honour thePRACTICES_OVERRIDEjudgement (a bolt-plan marker contradicting practices loses; practices wins — emit the override row first). Thenreport --skeleton-stance <on|off|scope-dependent>; the nextnextre-emits this same stage with the now-determined boolean gate. See the conductor persona for the full classification rules.review_only:trueskips the stage body and runs only the declared reviewer (§12a) fordirective.unit, then re-runsnextwithout reporting. This is the engine's recovery for artifacts that exist without a durable reviewer verdict.gate: false— whendirective.unitis present, run the stage body and declared reviewer (§12a), write the unit artifacts, then re-runnextwithout reporting.gate:falsesuppresses only the human gate and §13; it never suppresses the reviewer. Whendirective.unitis absent, this is an auto-proceeding bootstrap stage: run the body andreport --stage "<directive.stage>" --result completedwith no reviewer, human gate, or learnings ritual.gate: true— whendirective.unitis present, every unit body and reviewer verdict is already complete: do not re-run either; skip reviewer item 1 below and continue with closed completion verification, §13, and the single approval gate. Otherwise, after the stage body produces its artifacts: Pass only artifact paths that exist; the reviewer step below defines the authoritative set.- Reviewer step (§12a): If
directive.revieweris present, first pass the unchanged directive JSON on stdin tobun .kimi-code/tools/amadeus-reviewer-runtime.ts scope. Spawn the exact agent role named indirective.reviewervia the Agent tool (Kimi resolves its.kimi-code/agents/amadeus-<role>-agent.md) and pass only the returnedstage_file+ current Unit existingproduces+ presentconsumespaths; Q&A is included only when it is an explicit consume. Never pass/discover a missing optional output, absent consume, sibling/root file, memory.md, plan, or reasoning. Preserve the scope-returnedinvocationId + iterationexactly through every internal carrier and reviewer result. A declared single-file integration spot-check must go throughbun .kimi-code/tools/amadeus-reviewer-runtime.ts check-readbefore the read, using the same directive, invocation ID, positive iteration, and transient transcript; it requires the current-artifact integration ID, exactly one passed-contract owner path, a reason, and one literal non-discovery file path. After the reviewer returns its identity-first result and transcript, pass{ directive, invocationId, result }tobun .kimi-code/tools/amadeus-reviewer-runtime.ts complete-review. Only a zero exit and its durable four-field Review + revalidated Scope decision may establish READY. Bypass/tamper/invocation-or-iteration replay/rejected/outside/second request or invalid scope/persona/UTC/result fields establishes no Review/READY. If the validated verdict is NOT-READY and iterations <directive.reviewer_max_iterations: send the artifact + unresolvedBLOCKERfindings only back to the builder, re-run the stage body to fix, then repeat the whole reviewer flow. The reviewer role must run under an explicit read-only allowlist containing onlyRead,Grep, andGlobequivalents; never grant or use file-write, shell, network, Git, or GitHub operations. Only validated READY may proceed. Acomplete-reviewfailure establishes no trustworthy verdict or findings: report the validation failure only, leave the stage incomplete, stop for human direction, and do not run completion verification, learnings, approval, or report a stage result. A validatedNOT-READYverdict at the iteration limit leaves the stage incomplete: present unresolvedBLOCKERfindings, stop for human direction, and do not run completion verification, learnings, approval, or report a stage result. That limit is not the last word under an active quality-repair grant (directive.quality_repair === "active"): anobserve-qualityrepair/replannedruling orders the same closed checks re-run and its receipt funds exactly one further review iteration, recorded by addingrepair: { evidenceFingerprint }— the fingerprint that result returned — to thecomplete-reviewcarrier. Halt as above when no such ruling exists or its receipt is already spent. - Run only the closed stage-completion verification in
amadeus-common/protocols/stage-protocol.md§2 (required artifacts, declared verification results, unresolvedBLOCKERstatus); do not add exploratory criteria. - Run the §13 learnings ritual:
bun .kimi-code/tools/amadeus-learnings.ts surface --slug <slug>, render the structured question (viaAskUserQuestion, or the numbered-prose fallback) + free-text channel perquestion-rendering.md, run the admission conflict-check againstamadeus/spaces/<space>/memory/org.md, thenbun .kimi-code/tools/amadeus-learnings.ts persist --slug <slug> --selections-json <path>. Advisory and additive — it never blocks the gate. Seeamadeus-common/protocols/stage-protocol.md§13. 3a. Ifdirective.quality_repair === "error", stop before work and surface the activation failure. If validation or review is NOT READY whiledirective.quality_repair === "active", write the closed observations plus fresh replan context to a machine-local carrier and runbun .kimi-code/tools/amadeus-bolt.ts observe-quality --input <carrier>.repair/replannedmeans repair and re-run the same closed checks;parkedis a hard stop and its result envelope ends the forwarding loop. After an explicit human retry or strictly improved evidence, create the resume carrier and requirebun .kimi-code/tools/amadeus-bolt.ts resume-quality --input <carrier>to returnresumedbefore continuing; never auto-approve a quality failure. Once READY with no unresolvedBLOCKER,directive.autonomy_auto_approve === truemeans the Intent-scoped authorization has already selected approval: do not reserve presence, do not present a human gate, and do not synthesizeHUMAN_TURN; immediately callreport --stage "<directive.stage>" --result approvedand continue the forwarding loop. Step 4 applies only when this branch does not. - First run
bun .kimi-code/tools/amadeus-orchestrate.ts gate-reserve --stage "<directive.stage>". It opens or recovers the gate and returns oneawait-approvalcarrier containingtarget_intent_idandpresence_reservation_id. Reviewer profiles have no Bash tool and therefore cannot callnext,report,park,gate-reserve,gate-reject, oramadeus-state.ts; stage support personas are loaded inline. Then present the approval gate viaAskUserQuestion(Approve / Request Changes) and include the literal suffix[Presence Reservation Id: <carrier.presence_reservation_id>]in the question text. For the numbered-prose fallback, require the reply to include the same reservation id. The mint hook accepts only the matching host event whose payload contains that id while the same intent/stage gate remains active, so an ordinary, §13, or unrelated question cannot consume the reservation. A gate response is NOT an ordinary question answer: never callamadeus-log.ts answerfor it, becauseQUESTION_ANSWEREDwould consume the reservedHUMAN_TURNbefore the gate resolves. On approval, immediately callreport --stage "<directive.stage>" --result approved --user-input "<exact choice>" --target-intent-id "<carrier.target_intent_id>" --presence-reservation-id "<carrier.presence_reservation_id>"— the engine verifies the reservation belongs to the active Kimi session marker, intent, and stage, owns the full transition, and advances. On Request Changes, immediately callgate-reject --stage "<directive.stage>" --feedback "<exact feedback>" --target-intent-id "<carrier.target_intent_id>" --presence-reservation-id "<carrier.presence_reservation_id>"; the engine verifies the same targeted presence, records the revision transition, and consumes that carrier. Run the Keep/Modify/Redo loop within the same stage, then callgate-reserveagain: it re-enters the gate and returns a new reservation id, which alone can authorize the re-presented approval. This session correlation preserves gate provenance; it is not a general caller-authentication boundary. Never use an ordinary or §13HUMAN_TURN, reviewerREADY, a consumed pre-revision carrier, or a carrier from another stage/intent; never call state tools yourself or re-report the same directive.
- Reviewer step (§12a): If
Phase boundary (directive.phase_boundary). When a run-stage directive carries directive.phase_boundary, load the governance companion (amadeus-common/protocols/stage-protocol-governance.md) and write <record>/verification/phase-check-<phase>.md before reporting approval. The field is computed after scope overrides, so it also covers an early phase exit where the phase's usual final stage was skipped. The state guard is fail-closed: with that artifact absent it refuses the boundary transition, so a legitimate human approval reported first comes back as a typed error. Never report first and try to repair a rejected transition afterward. This is a precondition of the annex's direct report contract, not a replacement for it: write the artifact, then report the approval exactly as the annex specifies.
Per-unit iteration (directive.unit). When directive.unit is present, this run-stage is ONE iteration of a per-unit Construction stage (for_each: unit-of-work, covering the 3.1-3.4 design stages and non-autonomous code-generation). On a normal gate:false directive, run the body + reviewer (§12a) for THIS unit only, writing its artifacts under construction/<directive.unit>/<directive.stage>/, then re-run next without report-approve. On review_only:true, skip the body, establish the missing verdict through §12a, then re-run next. The engine hands you the next uncovered or unreviewed unit; once every unit is built and reviewed it re-emits this stage with gate:true. That gate-carrying re-entry never regenerates a body or verdict: run §13 and present the single approval gate covering all units. The reviewer fires once PER UNIT, each with its own reviewer_max_iterations budget. (If directive.unit is absent, the stage is not per-unit, or there is no compiled unit list, run it as a single stage exactly as above.)
directive.mode tells you HOW to run the body: inline (run it in this session, with the lead agent's persona framing loaded from its .md file under .kimi-code/agents/), or subagent (spawn the named agent role via the Agent tool — Kimi resolves .kimi-code/agents/amadeus-<role>-agent.md, which carries its own persona; do not inject it in the prompt). Today the graph uses inline and subagent; the named worker stages (reverse-engineering, code-generation) carry subagent.
Execution Quality — the conductor's craft
Everything above is mechanism. The irreducible knowledge-work — how to run a stage well (framing the persona, asking good questions, keeping the diary, the intra-stage Keep/Modify/Redo loop, classifying a practices-derived gate) — is authored once as the shared conductor persona. You do not load it from a path: the engine reads it and bakes its contents into the first next directive of the session (the directive carries a conductor_persona field). When you receive that field, adopt it for the whole run — it is your execution-quality charter. This keeps every entry point (framework and hand-written) on one persona with no per-skill diligence.
Routing
The engine names which stage to run; you read and execute that stage from its stage_file path (under amadeus-common/stages/initialization/, amadeus-common/stages/ideation/, amadeus-common/stages/inception/, amadeus-common/stages/construction/, or amadeus-common/stages/operation/). Loading the right stage protocol is the conductor's execution-quality job, MANDATORY at these moments:
amadeus-common/protocols/stage-protocol.md— load on every stage (core gates, question format, state tracking, completion messages).amadeus-common/protocols/stage-protocol-recovery.md— load on session resume, or when a change event is detected mid-stage.amadeus-common/protocols/stage-protocol-governance.md— load at phase boundaries to run the phase-boundary traceability verification.
New work while an intent is active — offer a second intent
Migration takes precedence over active-Intent routing. Before the
new-work/continuation/plan-reshape judgment below, pass an explicit --migrate
request — or natural language that names both the upstream AI-DLC workspace and
a migrate/convert action — verbatim to the first next. Do not inspect, birth,
select, resume, or advance an Intent on this route.
When an intent is already active, next advances it (the engine is read-only and never births alongside a live intent). But the FIRST thing you do with each $ARGUMENTS is a knowledge judgment that belongs to you, not the engine: does this input continue the active intent, describe a genuinely new, unrelated piece of work, or ask to re-shape the RUNNING workflow's plan?
- Default to CONTINUATION. Most prompts continue the active intent — a follow-up, a correction, an answer to a gate. Treat the input as new-work ONLY when it clearly names a distinct feature/bug/unit unrelated to the active intent's subject. Compare against the active intent:
bun .kimi-code/tools/amadeus-utility.ts intent --jsongives itsslug(the subject) andstatus. Treat it as a PLAN-RESHAPE ONLY on a clear signal: the human names skipping, dropping, adding, or removing STAGES of the running workflow ("can we skip market research?"), or asks to lighten or re-fit the remaining plan. False-positive offers are the main risk — when in doubt, continue. This is the same recognise-vs-route discipline as "The Forwarding Loop": you do not improvise routing, but recognising a topic change before you run a Branch-10 stage IS your job. - On genuine new-work, OFFER — never auto-birth. Surface an
AskUserQuestion(or the numbered-prose fallback) showing the active intent and the proposed new one, including the scope you would give the new intent (infer it from the new-work description the way the engine resolves a fresh/skill:amadeus— keyword/precedence — and name it so the human can correct it). Phrase it as a Yes/No confirmation and lead the affirmative option with the word "Yes" (e.g. "Yes — start a second intent"), with a decline option alongside. Starting a workflow is a mutation gated on a human yes (judgement→human) — never birth without an explicit confirmation. (A one-shot non-interactivekimi -pinvocation cannot answer mid-run, so the offer only fires in an interactive session.) - On CONFIRM: re-run
nextwith--new-intentand the confirmed scope + new-work text:bun .kimi-code/tools/amadeus-orchestrate.ts next --new-intent --scope <the confirmed scope> "<the new-work description>". The engine returns aprintdirective naming theintent-birthcommand — the same run-then-continue birth move the fresh-start path uses, including the--label "<2-3 word kebab essence>"placeholder. Act on that directive exactly as "Acting on a directive" describes: replace--labelwith a short 2-3 word essence of the new-work description (e.g. "simple calc") — it becomes the readable, date-prefixed record dir name (<YYMMDD>-simple-calc) while the full--argumentstext is preserved in the audit + state — run it, then re-runnextto land on the new intent's first stage. Routing throughnext --new-intent(rather than constructingintent-birthhere) keeps the second-intent birth identical to the first; the offer itself is conductor prose, not a new directive kind. - On DECLINE: proceed with the active intent — the normal Branch-10
run-stage. - On a PLAN-RESHAPE signal, route through the compose verb - never forward the raw text. A mid-flow freeform
nextwith no verb advances the current stage, so a reshape request forwarded verbatim would silently run a stage instead of re-shaping the plan. Your first engine call becomesbun .kimi-code/tools/amadeus-orchestrate.ts next compose "<their words>", and the engine's with-state compose dispatch owns the flow from there - UNLESS the request names specific stages imperatively, in which case the fast path (see "Composing a workflow plan" below) skips thenext composecall entirely and goes straight to marker, gate, verb. This does not weaken the verbatim rule: it is the same sanctioned pre-forward judgment step as the new-work offer, and everything after the judgment rides the deterministic verb. Never do this under autonomous Construction - an unattended run has no human to answer the gate. (The reshape gate needs an interactive session, like any compose gate here; the literal/skill:amadeus compose "<request>"verb remains the documented reliable path on this harness.) - You switch between intents any time with
/skill:amadeus intent <name>(bare/skill:amadeus intentlists them) — parallel to/skill:amadeus space <name>.
GitHub Issue references as input
$ARGUMENTS (a fresh Birth description, a continuation prompt, or the new-work text above) may name a GitHub Issue instead of, or alongside, prose. Resolve it before acting:
- When the target repository context is resolvable (a single Git remote, or a repository the current session is already scoped to), treat a short reference (
#nnn) as equivalent to that Issue's full URL (https://github.com/<owner>/<repo>/issues/<nnn>) — both name the same input. - Accept the explicit
owner/repo#nnnform as-is; it names its own repository context regardless of the current remote. - When the repository context is ambiguous (multiple remotes, a fork whose upstream differs, or no Git repository at all) and the input is a bare
#nnnwith noowner/repoprefix, do not guess which repository it names — stop and ask the human which repository#nnnrefers to before treating it as an Issue input.
This equivalence governs how #nnn and Issue URLs are read as Intent input (e.g. during Birth or a continuation); it does not change engine routing or next/report argument parsing.
Composing a workflow plan (the adaptive composer)
The engine can name a COMPOSER DISPATCH instead of a scope confirm: on /skill:amadeus compose "<task>", --new-scope, --report <path>, or when the human answers a cold-start compose offer with "compose", next emits a print whose message names the composer agent. Act on it like any dispatch: run the composer via the Agent tool (subagent_type: amadeus-composer-agent) with the message's instructions as the prompt (the agent loads its own persona). The composer runs the read-only detect scan, reads the stock scopes, and returns a structured proposal: { mode: matched|custom, scopeName, grid, rationale[] } with a reason for every SKIP.
Render that proposal to the human and present an approve/edit/reject gate via AskUserQuestion (Approve / Edit the grid / Reject; numbered prose as the fallback). This gate is a hard turn-stop, like a stage gate: never treat silence as approval, and never write scope data or birth a workflow before an explicit approve. On edit, fold the human's changes into the grid and re-present. On reject, stop; the human can name a scope directly instead. (A one-shot non-interactive kimi -p invocation cannot answer the gate mid-run, so a compose that needs approval only completes in an interactive session.)
On approve (front/report), the write and the birth run in the SAME turn - no second /skill:amadeus invocation:
- If the proposal MATCHED a stock scope, skip the write entirely.
- For a CUSTOM grid, re-dispatch the composer to author the two files at the paths its
detect --jsonprinted:.kimi-code/scopes/amadeus-<name>.md(frontmattername,depth, andkeywords: []- composed scopes are NOT inferable unless the human explicitly granted keywords at the gate) plus the"<name>": { "stages": {...} }entry inscope-grid.json. BOTH files are required - a.mdwithout a grid entry resolves as all-SKIP. - Continue into the normal birth: run
bun .kimi-code/tools/amadeus-orchestrate.ts next --scope <name>and act on its birth print exactly as "Acting on a directive" describes (the--labelessence and the duplicate-intent guard ride the same path as any birth).
In-flight recompose (a workflow is RUNNING): the dispatch print carries the marker discipline - write amadeus/.amadeus-compose-pending BEFORE presenting the gate (it lets the turn end at the gate; the Stop hook honours it), and DELETE it the moment the gate resolves (approve, edit-then-resolve, or reject). On approve run the named recompose --skip <slugs> --add <slugs> command; it validates strictly (a starved required input rejects), flips only PENDING ahead-of-cursor stages, rebuilds the derived state fields, and audits RECOMPOSED - never edit the state file's suffixes by hand. A leftover marker after the gate resolves would mask the forwarding-loop enforcement; deleting it is part of acting on the directive.
Reshape requests arrive in plain chat too, not just as the literal verb. Mid-workflow, "can we skip market research? we already know this market" is a plan-reshape signal (see "New work while an intent is active" - the same first-judgment step classifies it); route it through next compose "<their words>" so the engine's with-state dispatch above owns the flow. The fast path: when the request NAMES specific stages imperatively ("drop market-research and team-formation"), you may skip the composer dispatch (skip the next compose call too; if you already ran it, its dispatch print stands - dispatch the composer as it says): write the pending marker, present the same approve/edit/reject gate yourself via AskUserQuestion (or the numbered-prose fallback, listing the named flips and what the plan becomes), and on approve run bun .kimi-code/tools/amadeus-utility.ts recompose --skip <slugs> --add <slugs> directly, then delete the marker. This is sound because the recompose verb IS the guard: it deterministically rejects starved, frozen, behind-cursor, and skeleton-gate flips no matter who calls it. Open-ended judgment-shaped requests ("what can we cut?") still dispatch the composer. The gate is NEVER skipped on either path - fast means skipping the composer subagent, never the human approval - the marker discipline is unchanged, and neither path runs under autonomous Construction. (Like any compose gate here, the reshape gate only completes in an interactive session.)
The composer proposes; the human decides; the deterministic validator guards. You never improvise a grid yourself in prose, and the composer never advances the workflow.
Scope-to-Stage Mapping
The orchestration engine resolves scope-level stage routing internally (it reads the compiled scope grid the table below summarises). The summary table is kept here as human-readable data — not dispatch logic — and is regenerated, never hand-edited. (One carve-out: the dispatched composer agent APPENDS approved composed scopes to the runtime scope registry (.kimi-code/scopes/amadeus-<name>.md + a scope-grid.json entry) - that is the sanctioned write path for composed scopes, not a hand-edit; this summary table itself stays generated.)
Source of truth: one file per scope under .kimi-code/scopes/amadeus-<name>.md (identity + keywords + description) plus each stage's scopes: frontmatter (membership), transposed into the compiled grid at bun .kimi-code/tools/amadeus-graph.ts compile. Adding a scope is the same muscle memory as authoring a sensor or agent — drop .kimi-code/scopes/amadeus-<name>.md, tag the member stages' scopes: lists, recompile, then bun .kimi-code/tools/amadeus-utility.ts scope-table to regenerate the table below + commit. CI runs scope-table --check to prevent drift.
| Scope | Depth | TestStrategy | EXECUTE / Total |
|---|---|---|---|
| chore | Minimal | (default) | 5 / 32 |
| enterprise | Comprehensive | (default) | 32 / 32 |
| feature | Standard | (default) | 32 / 32 |
| fix | Minimal | (default) | 7 / 32 |
| infra | Standard | (default) | 13 / 32 |
| installer-distribution | Standard | (default) | 25 / 32 |
| mvp | Standard | (default) | 22 / 32 |
| poc | Minimal | (default) | 8 / 32 |
| refactor | Minimal | (default) | 8 / 32 |
| security-patch | Minimal | (default) | 10 / 32 |
| self-document | Standard | Minimal | 9 / 32 |
| self-feature | Standard | Comprehensive | 14 / 32 |
| self-fix | Minimal | Comprehensive | 7 / 32 |
| self-refactor | Minimal | Comprehensive | 8 / 32 |
| workshop | Standard | Minimal | 25 / 32 |
Harness notes (Kimi Code)
- Gates:
AskUserQuestionis the primary binding for structured questions; numbered prose is the sanctioned fallback when it is unavailable (auto permission mode, headlesskimi -p). BOTH paths route through the sameminttarget. For a stage approval, callgate-reservefirst, include its Presence Reservation Id in the approval question payload, and require the numbered-prose reply to echo it. Only that same-session, same-intent, same-stage route can mint the reservation; ordinary and §13 turns remain unreserved and cannot approve. Gate responses go directly to carrier-bearingreportwithout an interveningQUESTION_ANSWEREDevent. - Stop and mutation authorization use a fail-closed session baseline plus ambient subagent presence:
SessionStartatomically establishes the host-stamped main-session baseline. KimiStopforwards to the stateful core hook only when its non-emptysession_idmatches both that baseline and the current-session carrier, no delegatedagent_nameis present, and the active-role set is empty. The live Kimi 0.28.1 Stop capture has noagent_name; the installed Kimi 0.29.0 bundle constructs Stop withstopHookActiveand reports delegated lifecycle separately throughSubagentStart/SubagentStopagentName. Missing, unreadable, malformed, updating, ended-session, reviewer, support, explore, and other ambiguous states are silent Stop no-ops and rejectnext,report,park,gate-reserve,gate-reject, and direct state mutations before state or audit writes. The role carrier proves ambient presence, not the process identity of an arbitrary tool caller, so the conductor must never mutate while a subagent is active; this is an execution contract, with the reviewer tool allowlists as defense in depth. Product and architecture reviewer profiles expose onlyRead,Grep, andGlob; stagesupport_agentsremain inline and Kimi's built-inexploreprofile remains read-only. - Stage visibility rides the TodoList tool. There is no custom statusline; keep the todo list current instead — one
in_progressitem per running stage, the active item's text ending with the stage's[slug]suffix (e.g.Running Intent Capture [intent-capture]). ThePostToolUse(TodoList)hook reads that suffix to syncamadeus-state.md. Mark the prior item completed when a stage finishes./skill:amadeus --statusis always available on demand. - Hooks live in the user-level config: Kimi Code has no project-level config file, so the
[[hooks]]+[[permission.rules]]wiring ships as.kimi-code/hooks/amadeus-hooks.snippet.tomland is merged into~/.kimi-code/config.tomlas a marker-fenced managed block (# >>> amadeus-kimi-hooks >>>) by the setup CLI (backup + confirm + atomic write). The block first denies agent-side Bash composition matchingBash(*.kimi-code/hooks/*), then pre-allowsBash(bun .kimi-code/tools/*)and the required git prefixes. That deny is defense-in-depth, not a caller-authentication boundary. Host-managed hook invocations still route throughbun .kimi-code/hooks/amadeus-kimi-adapter.ts <target>, resolved from the session's project dir and fail-open where the project is not installed. - Construction swarm = native subagent fan-out: one Agent child per unit in this session, each confined to its worktree (worktree-relative paths only, no git operation outside the assigned tree). Resolve the driver via
amadeus-swarm.ts resolve --harness kimi:subagentdispatches here;claude-ultra/codex-ultraloud-degrade to thesubagentfloor (--degraded-from <requested>→SWARM_DEGRADED); an unknown value is rejected (exit 1) and stops the batch fail-closed. There is no kimi-ultra. - Session lifecycle:
SessionEndexists (matcherexit) and emitsSESSION_ENDEDdirectly — no next-start reconcile hack is needed (contrast Codex, which infers an unclosed prior session at the next start).PreCompact(manual|auto) drives state validation; PostCompact re-injection is not wired on this harness.
Stage Graph
The engine reads the compiled data/stage-graph.json directly for all routing; this table is the human-readable mirror of that graph (the 32 stages, their phase, execution mode, lead/support agents, and run mode) — data, not dispatch logic.
| Slug | # | Stage | Phase | Execution | Lead Agent | Support Agents | Mode |
|---|---|---|---|---|---|---|---|
| workspace-scaffold | 0.1 | Workspace Scaffold | Initialization | ALWAYS | (orchestrator) | — | inline |
| workspace-detection | 0.2 | Workspace Detection | Initialization | ALWAYS | (orchestrator) | — | inline |
| state-init | 0.3 | State Initialization | Initialization | ALWAYS | (orchestrator) | — | inline |
| intent-capture | 1.1 | Intent Capture & Framing | Ideation | ALWAYS | amadeus-product-agent | amadeus-architect-agent | inline |
| market-research | 1.2 | Market Research | Ideation | CONDITIONAL | amadeus-product-agent | — | inline |
| feasibility | 1.3 | Feasibility & Constraints | Ideation | CONDITIONAL | amadeus-architect-agent | amadeus-aws-platform-agent, amadeus-compliance-agent | inline |
| scope-definition | 1.4 | Scope Definition | Ideation | ALWAYS | amadeus-product-agent | amadeus-delivery-agent | inline |
| team-formation | 1.5 | Team Formation | Ideation | CONDITIONAL | amadeus-delivery-agent | — | inline |
| rough-mockups | 1.6 | Rough Mockups | Ideation | CONDITIONAL | amadeus-design-agent | amadeus-product-agent | inline |
| approval-handoff | 1.7 | Approval & Handoff | Ideation | ALWAYS | amadeus-delivery-agent | amadeus-product-agent | inline |
| reverse-engineering | 2.1 | Reverse Engineering | Inception | CONDITIONAL | amadeus-developer-agent | amadeus-architect-agent | subagent (amadeus-developer-agent → amadeus-architect-agent) |
| practices-discovery | 2.2 | Practices Discovery | Inception | CONDITIONAL | amadeus-pipeline-deploy-agent | amadeus-quality-agent, amadeus-developer-agent, amadeus-devsecops-agent | inline |
| requirements-analysis | 2.3 | Requirements Analysis | Inception | ALWAYS | amadeus-product-agent | — | inline |
| user-stories | 2.4 | User Stories | Inception | CONDITIONAL | amadeus-product-agent | amadeus-design-agent | inline |
| refined-mockups | 2.5 | Refined Mockups | Inception | CONDITIONAL | amadeus-design-agent | amadeus-product-agent | inline |
| application-design | 2.6 | Application Design | Inception | CONDITIONAL | amadeus-architect-agent | amadeus-aws-platform-agent, amadeus-design-agent | inline |
| units-generation | 2.7 | Units Generation | Inception | ALWAYS | amadeus-architect-agent | amadeus-delivery-agent | inline |
| delivery-planning | 2.8 | Delivery Planning | Inception | ALWAYS | amadeus-delivery-agent | amadeus-architect-agent | inline |
| functional-design | 3.1 | Functional Design | Construction | CONDITIONAL | amadeus-architect-agent | amadeus-developer-agent | inline |
| nfr-requirements | 3.2 | NFR Requirements | Construction | CONDITIONAL | amadeus-architect-agent | amadeus-devsecops-agent, amadeus-compliance-agent, amadeus-quality-agent | inline |
| nfr-design | 3.3 | NFR Design | Construction | CONDITIONAL | amadeus-architect-agent | amadeus-aws-platform-agent | inline |
| infrastructure-design | 3.4 | Infrastructure Design | Construction | CONDITIONAL | amadeus-aws-platform-agent | amadeus-devsecops-agent, amadeus-compliance-agent | inline |
| code-generation | 3.5 | Code Generation | Construction | ALWAYS | amadeus-developer-agent | — | subagent (amadeus-developer-agent) |
| build-and-test | 3.6 | Build and Test | Construction | ALWAYS | amadeus-quality-agent | amadeus-devsecops-agent | inline |
| ci-pipeline | 3.7 | CI Pipeline | Construction | CONDITIONAL | amadeus-pipeline-deploy-agent | — | inline |
| deployment-pipeline | 4.1 | Deployment Pipeline | Operation | CONDITIONAL | amadeus-pipeline-deploy-agent | — | inline |
| environment-provisioning | 4.2 | Environment Provisioning | Operation | CONDITIONAL | amadeus-aws-platform-agent | amadeus-devsecops-agent | inline |
| deployment-execution | 4.3 | Deployment Execution | Operation | CONDITIONAL | amadeus-pipeline-deploy-agent | amadeus-developer-agent | inline |
| observability-setup | 4.4 | Observability Setup | Operation | CONDITIONAL | amadeus-operations-agent | — | inline |
| incident-response | 4.5 | Incident Response | Operation | CONDITIONAL | amadeus-operations-agent | — | inline |
| performance-validation | 4.6 | Performance Validation | Operation | CONDITIONAL | amadeus-quality-agent | — | inline |
| feedback-optimization | 4.7 | Feedback & Optimization | Operation | CONDITIONAL | amadeus-operations-agent | amadeus-compliance-agent | inline |
Key Principles
- Adaptive scope: Scope determines which stages execute and at what depth — from 5-stage chore to 32-stage enterprise. The engine owns the resolution; you run the stages it hands you.
- STAGE RITUAL IS ATOMIC: Once a stage starts, EVERY step fires: questions → artifact → reviewer (§12a, if declared) → learnings (§13) → gate. No step is skippable. "Skip to stage X" skips INTERMEDIATE stages, NOT the target stage's ritual. Complete the current stage fully (including learnings) before jumping.
- AUTONOMY IS NEVER INFERRED: A user saying "go with recommended" for one stage is a one-time instruction for THAT stage. The next stage starts fresh. NEVER carry forward that permission, and NEVER self-answer a question on your own judgement. This forbids inferring authority — it does not forbid the authority the engine already holds: when the Intent's recorded autonomy mode (
semi/full) resolves a gate or a question through the engine's own ladder, that is a recorded human declaration being executed, not an inference, and you follow the directive as given. - Declaring Intent autonomy at launch:
--autonomy <none|semi|full>declares the Intent's autonomy mode as part of the invocation, including the invocation that births the intent. Pass it straight through tonext; the engine owns the decision.none/semiare recorded through the canonical write path and take effect at once.fullis never granted by the flag — the run prints the grant ceremony (bun .kimi-code/tools/amadeus-bolt.ts preview-autonomy, thenbun .kimi-code/tools/amadeus-bolt.ts set-autonomy --mode full --confirmed-display-digest <digest>) and stops there. Never supply the flag on the user's behalf. Seedocs/reference/24-intent-autonomy.md. - User control: The user can override any stage decision at any approval gate.
- 11 domain experts: Each stage leverages the appropriate agent persona (product, design, delivery, architect, aws-platform, compliance, devsecops, developer, quality, pipeline-deploy, operations).
- Approval gates: Every stage except the bootstrap initialization stages presents an approval gate (the engine signals this via
run-stage'sgatefield). - Questions in markdown files: All questions go in markdown files using
[Answer]:tags with A-E + X (Other) options — the file is always the source of truth. - Tri-mode interaction: The user chooses guided, self-guided, or chat mode for answering questions.
- Audit trail: All transitions are tool-owned and logged automatically via the engine's
reportstep and the stage tools + hooks — never from prose. - Self-learning guardrails: Human corrections can become persistent practices in
amadeus/spaces/<space>/memory/{team,project}.mdvia the §13 learnings ritual. - No nested delegation: The conductor orchestrates all agent invocations. Agents do NOT invoke each other or spawn subagents.
Frequently asked questions
What to verify before installation and use
What does the amadeus source document cover?
AI-DLC workflow orchestrator. Start, resume, or manage an AI-driven development lifecycle.
How do I install amadeus?
The source record exposes this install command: npx skills add https://github.com/amadeus-dlc/amadeus --skill "packages/framework/harness/kimi/skills/amadeus". Inspect the command and pinned source before running it.
Which permission-related actions were detected?
Static rules flagged read-files, write-files in the source; the page lists the matching lines and excerpts.
Alternatives
Compare before choosing
amadeus-dlc/amadeus
amadeus
AI-DLC workflow orchestrator. Start, resume, or manage an AI-driven development lifecycle. Scopes are defined one file per scope under `.claude/scopes/`; run `bun .claude/tools/amadeus-utility.ts help` for the authoritative list and descriptions. Utilities: --status, --doctor, --migrate [path], --stage, --phase, --scope, --depth, --test-strategy, --autonomy, --version, --help, plus the intent and space verbs. Or describe what you want to build and the scope will be auto-detected.
amadeus-dlc/amadeus
amadeus
AI-DLC workflow orchestrator. Start, resume, or manage an AI-driven development lifecycle. Scopes are defined one file per scope under `.codex/scopes/`; run `bun .codex/tools/amadeus-utility.ts help` for the authoritative list and descriptions. Utilities: --status, --doctor, --migrate [path], --stage, --phase, --scope, --depth, --test-strategy, --autonomy, --version, --help, plus the intent and space verbs. Or describe what you want to build and the scope will be auto-detected.
amadeus-dlc/amadeus
amadeus
AI-DLC workflow orchestrator. Start, resume, or manage an AI-driven development lifecycle. Scopes are defined one file per scope under `.kiro/scopes/`; run `bun .kiro/tools/amadeus-utility.ts help` for the authoritative list and descriptions. Utilities: --status, --doctor, --migrate [path], --stage, --phase, --scope, --depth, --test-strategy, --autonomy, --version, --help, plus the intent and space verbs. Or describe what you want to build and the scope will be auto-detected.
amadeus-dlc/amadeus
amadeus
AI-DLC workflow orchestrator. Start, resume, or manage an AI-driven development lifecycle. Scopes are defined one file per scope under `.kiro/scopes/`; run `bun .kiro/tools/amadeus-utility.ts help` for the authoritative list and descriptions. Utilities: --status, --doctor, --migrate [path], --stage, --phase, --scope, --depth, --test-strategy, --autonomy, --version, --help, plus the intent and space verbs. Or describe what you want to build and the scope will be auto-detected.