Independent cdd-dev orchestrator -- Node-anchored flow with digraph as single control-flow source of truth. Determines base via the engine artifact, dispatches the CDD implement / review / fix chain following the engine's next face, and runs the branch final review — the engine's next directive carries the pipeline continuation. Callable standalone; referenced by no other skill.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Cdd Dev?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/oscaner-cdd-dev)
---
name: cdd-dev
description: Independent cdd-dev orchestrator -- Node-anchored flow with digraph as single control-flow source of truth. Determines base via the engine artifact, dispatches the CDD implement / review / fix chain following the engine's next face, and runs the branch final review — the engine's next directive carries the pipeline continuation. Callable standalone; referenced by no other skill.
---
# Kairos CDD-Dev
Executes planned tasks through the engine's implement / review / fix chain — its own orchestrator decisions (mode chain, final review) following the engine's `next:` face, with no installed-engine precondition (npx pulls the engine on demand); on closure that face carries the pipeline continuation.
**Invocation discipline** — every engine command runs via `npx -y @oscaner-skills/cdd-engine@latest <subcommand>` as a background dispatch: launch it in the background and await the completion notification — never poll — then read the full output (stdout/stderr). Output filtering is forbidden — no piping to `tail`/`head`, no `2>&1 |`, no `EXIT=$?` capture. **Dispatch boundary** — the obligation runs both ways: a dispatched child carries every verification / build command to completion inside its own turn, never ending that turn to await a background task it launched itself — ending the turn terminates the child, so the awaited notification never arrives and the round dies half-finished while still looking successful; the launching side certifies success by the terminal contract (a clean working tree and the target action actually completed), never by exit code 0. **Round rhythm** — one review pass per dispatch; a fix round re-enters the review while the route is not done; the implement child commits its own work; ensure the working tree is clean before entering review (dirty → BLOCKED); the orchestrator writes no tree during dispatch. **Approval gate** — before the first implement / review / fix dispatch of a slug, submit the plan this dispatch implements together with the self-check conclusion that approved it to the author and stop; dispatch only after an explicit approval, and a dispatch without one is a violation — the submitted line declares the plan's authorship plainly: `this document was written by the orchestrator in this session`. **Write authority** — the spec's and the plan's creation stays the orchestrator's, written in this session and never handed wholesale to a subagent; the dispatched implement and fix rounds may amend their content face (facts, file lists, steps, acceptance detail, cited line numbers), never their structure face — the plan's Task id set and every task's `DependsOn` set — which the engine snapshots at dispatch and judges hard on a round-internal change. **Round logs** — every dispatch child's own output lands in `.kairos/cdd/<slug>/logs/<stem>.log`; the `CDD_BLOCKED` anchor on stderr belongs to the pre-dispatch refusal face and names no round's log, so a dispatched round's ending reaches the dispatcher through the stdout capsule instead: its `reason:` row carries the log coordinate the record's `end.logPath` holds, and that row together with the file it names is where a dispatched failure is read. **Output contract** — what announces that a dispatched round has ended is exactly this set and nothing beside it: the announcements the dispatcher may wait on or continue from, whose members are settled by the question "the round has ended, what does the dispatcher do now", never enumerated by count and never joined by a same-kind signal from elsewhere. The boundary comes first: the set is defined on dispatched rounds alone — the pre-dispatch refusal face sits outside it, because what that face announces is that no round ended at all. `CDD_BLOCKED:` is that face's anchor and that face prints it alone (`reportCapsule` prints not one byte of it), while a dispatched round whose carrier declares `BLOCKED` reaches the dispatcher as `status: BLOCKED` together with a `reason:` row. The excluded face is named row by row, because no generalisation over it holds and an "always" may follow this roster but never replace it: the gate rows under `CDD_BLOCKED_GATES` — `tree-clean` · `in-flight` · `doc-contract` · `no-host` · `carrier` · `dispatch-input` · `artifact` · `skill-ref` — carry the anchor; `graph` and `plan-ledger` print a bare `cdd <verb>: <body>`; the double-gap sentence takes that same bare `cdd <verb>:` anchor, and it is not a row refusing at all — it is what a `--recover` request reaches once the structure leg has passed and no takeover leg holds, so the gate-row roster has nothing to match and that sentence is the whole body, no row word in front of it; the row-leg refusal prints one stderr line carrying neither anchor nor a `reason:` row. Each of those families is pre-dispatch, so each sits outside the set — what they announce is that no round was dispatched at all, never that one ended. The distinction is between a line and a token: the capsule's `next:` is a line flush left on stdout, whereas the refusal face's `next:` is a suffix inside a single stderr line, so a dispatcher scanning for a line that begins with `next:` is asking the capsule's question and not the refusal's. **Failure face** — cross-node failure handling lives in the Failure Modes table below (the single source); node `Fail` entries keep only local behavior.
## Flow Digraph
```mermaid
flowchart TD
A[determine-base] --> B[set-base]
B --> C[implement-wave]
C --> L[NEXT-LOOP]
L -->|until next is terminal| L
L -->|no next| Z1((BLOCKED))
```
## Node Definitions
### `determine-base`
- **Do**: Resolve the base branch — inference sources in order: plan `base` field → branch upstream (`git rev-parse --abbrev-ref @{u}`) → conversation context; if none yields a definitive base, ask the user — do not guess. The base may already be present in the artifact (`npx -y @oscaner-skills/cdd-engine@latest base get --plan <path>`); skip inference when the artifact is present.
- **Read**: plan document + git upstream + conversation context + `npx -y @oscaner-skills/cdd-engine@latest base get --plan <path>`
- **Exit**: base resolved → `set-base`
- **Fail**: user refuses to confirm → BLOCKED: base-undecided
### `set-base`
- **Do**: Persist the base via the engine CLI — `npx -y @oscaner-skills/cdd-engine@latest base set --plan <path> --base <branch> --source <enum>`, where `source` is `plan-field` | `branch-upstream` | `conversation-context` | `user-confirmed`. The engine is the sole write/read path for the artifact — never hand-write it; `set` is idempotent, refusals and validation errors are engine-handled.
- **Read**: `npx -y @oscaner-skills/cdd-engine@latest base get --plan <path>` (the artifact on stdout)
- **Exit**: artifact written (or already present) → `implement-wave`
- **Fail**: engine refusal / validation error → report to user; user decides (no hand-written artifact)
### `implement-wave`
- **Do**: Dispatch `npx -y @oscaner-skills/cdd-engine@latest implement --tasks <n|n,n,…> --plan <path>` — one dispatch wave per iteration; dispatch each wave as the engine returns it, never a hand-picked subset. A pre-flight row reading `plan leads ledger by N tasks` is a hint, not an error — the plan legitimately runs ahead of the ledger, so dispatch the new wave as usual. A round cut short is recovered from the working tree: look at the working tree first, commit the changes that work, discard the ones that are broken.
- **Read**: the full stdout — its conclusion and the engine's `next:` face; a dispatched round's ending is stated there too, as the capsule's `reason:` row carrying the stop word and the log coordinate (the pre-dispatch `CDD_BLOCKED` anchor is not this channel)
- **Exit**: dispatch complete → `NEXT-LOOP`
- **Fail**: nested CLI exits with no output → BLOCKED: engine-error (report via the repository's issue forms — `.github/ISSUE_TEMPLATE`)
### `NEXT-LOOP`
- **Do**: Run the wave review-fix rhythm through the engine — one review pass per dispatch. Dispatch the wave review (`npx -y @oscaner-skills/cdd-engine@latest review --type wave --tasks <n|n,n,…> --plan <path>`); every later hop follows the engine's `next:` face — including the branch line, which the engine routes on its own. Fixes dispatch via the fix round — never an in-place edit as a substitute; a BLOCKED/TIMEOUT round's carried reason is reported, never overridden; a soft-cap suggestion is a user decision point — report it, never retry past it.
- **Read**: the full stdout — the review conclusion, the findings handoff path, and the engine's `next:` face
- **Exit**: each fix / next-wave pass re-enters this hub while that route keeps the loop alive (the `until next is terminal` self-loop); a route that leaves the loop ends this skill's flow
- **Fail**: review exits with no output → BLOCKED: engine-error
## Invariants
| # | Invariant |
|---|---|
| I1 | **Host Harness Autodetection** — the engine resolves the host harness itself; the orchestrator never passes a harness name down to the CLI |
| I2 | **Review Convergence** — a review closes by its conclusion (APPROVED / CHANGES_REQUESTED / REVIEW_FIX); the loop advances by the engine's `next:` face. A mid-backfill or a user adjudication that lands governs over the suggestion (current world state wins). Fixes always dispatch via the fix round; the orchestrator must not edit in place as a substitute; a fix commit makes the next review a new review |
| I3 | **Wave-Chain Completeness** — every dispatch wave (a singleton task or a merged wave) goes through the full implement → review → (fix if findings) chain; review is unskippable, and a fix dispatch requires a prior review handoff for that wave |
| I4 | **No Controller Bypass** — the orchestrator must not hand-write control-flow bypasses; all task execution / review / fix dispatch go through engine CLI calls, and the engine's `next:` face decides the order — never orchestrator guesswork |
| I5 | **Mid-Flight Backfill** — a user-raised backfill of overall/spec/plan docs surfaced while a dispatch is in flight lands through four ordered steps on the current call's return: (1) **land immediately** — hot context, no deferral; (2) **commit on its own** — a standalone change, never mixed with implementation commits; (3) **pause the loop until clean** — an uncommitted backfill trips the next review's entry gate (dirty → BLOCKED); (4) **audit in-band on resume** — the next review audits the backfill in-band; a backfill rewriting the current task's own plan/spec text routes through the orchestrator's plan write authority |
| I6 | **Ruling Landing** — when a fix dispatch needs a ruling on a finding, the ruling lands at the sidecar path the engine prints in `next:`; the orchestrator never derives that path itself |
| I7 | **Requirement lands in the documents first** — a requirement the user adds or adjusts, whether the phase is in flight or already closed, never enters the tree directly: it is written into the current phase's spec (the design face) and plan (a new task, or the acceptance of an existing one), and the tree changes only through the wave a `next:`-derived dispatch produces. A commit that changes shipped surface for a user-raised requirement before those two documents have said it violates this invariant: that change has no wave to judge it, and where the face is already closed no round reads it either — and a change no round judged is indistinguishable from one nobody wrote. |
## Failure Modes
Cross-node failure handling (complements node Fail fields):
| category | handling |
|---|---|
| TIMEOUT | a round that timed out; retry within the handoff's counters cap, then terminal per the output contract |
| BLOCKED | a round the engine refused to advance (no `next:` line); report the carried reason to the user and let them decide — never silently override the plan |
| HARD_ERROR | a completed round with no `next:` line that is not BLOCKED/TIMEOUT — report the carried reason; re-run the same command to continue |
| branch blockers persist | implicit fail-open — stop + report; the branch is preserved and the user decides (the branch line carries its own closure through the engine's next face) |
**Fail-open vs BLOCKED convention**:
- **BLOCKED**: explicit terminal state; requires user intervention to recover.
- **implicit fail-open**: node-level failure (not in digraph); flow stops + reports to user.