/kairos:cdd-closefrom kairos
Orchestrates development branch close-out: backfills closeout docs, presents a Git finish menu (merge/PR/keep/discard), gates on the outcome, then closes related issues. Invoke as /skill:cdd-close.
Ships in kairos. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Development branch close-out: the closeout backfill — the shipped-state docs — lands and commits FIRST, in whichever of its two branches this branch carries (a registered phase row: the closeout version rows and the parent overall's Phase inventory → Done; a standalone single-spec with no phase row: only the spec's own version row and ## Change history); then this skill's own finish menu decides merge / PR / keep / discard, the finish gate routes the outcome, then related issues are closed — a human-decision surface, not next-driven, with no review self-loop. The backfill-before-finish ordering keeps the finish menu from running over an un-backfilled branch, so a merge decision ships the closeout with the branch.
Invocation discipline — every command runs 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. Finish is the terminal gate — the finish decision is a human-decision surface: it ends the flow at the gate + terminal (no review self-loop); a blocked round carries its reason on stderr with no next: line consumed here. Failure face — cross-node failure handling lives in the Failure Modes table below (the single source); node Fail entries keep only local behavior.
flowchart TD
A[run-cdd-close-session] --> B[closeout-backfill]
B --> F{finish?}
F -->|decided| C[close-issues]
F -->|menu exhausted| Z2((BLOCKED: menu exhausted))
C --> K((APPROVED))
run-cdd-close-sessionfinish? — AFTER the closeout backfill has landed, so the closeout state is part of whatever the menu ships..kairos/cdd/<slug>/base.json, or inferred per the cdd-dev base resolution)closeout-backfillcloseout-backfill## Change history row, and touch no overall's Phase inventory. Either branch commits as its own conventional docs(kairos) commit and leaves the tree clean. The finish menu then ships the branch with the closeout in it; a failure at this node stops before the menu, never runs the finish over an uncommitted closeoutissues: line — plus git statusfinish?finish?close-issues; an unrecognized outcome that exhausted the menu routes the BLOCKED terminal. The strict typed-discard gate: the literal discard only (case-sensitive, no leading/trailing whitespace); any other input falls back to the menu without resetting its presentation counter — 3 attempts max → BLOCKED (menu exhausted). This gate is not next-driven — the human decision is the terminal authority, and the flow ends here: no review self-loop, no engine route to consume. The menu follows the closeout backfill, and each of its four options carries its own action:
/mattpocock-skills:pr(pi:/skill:pr) and following that template — ## Summary · ## Evidence · ## Merge Danger, whose door in this repository is real (feat → develop a two-way door, develop → main a one-way one). What this option does when that plugin is missing lives in the Failure Modes table's row for it — cross-node failure handling has one home; PR not selected leaves the whole close-out untouched by that referenceclose-issues; menu exhausted → the BLOCKED terminal (menu exhausted)close-issues#NNN in the finished work's scope, gh issue close NNN with the shipped state. The scope read follows the same two branches the closeout took: a registered phase reads the parent overall's item row for the phase, a standalone single-spec reads its own issues: lineissues: front-matter line — plus the finished branchgh unavailable → report + fail-open (do not block the finish)| # | Invariant |
|---|---|
| I1 | No Worktrees — work finishes in a normal repository, never in a worktree; worktree state is a pre-development violation (not cdd-close's scope), so the menu carries one form |
| I2 | Conventional Commits + No Attribution — merge commit / PR title follows conventional commits; no trailers / footers / inline attribution |
| I3 | Finish is the terminal gate — the finish decision is a human-decision surface: it ends the flow at the gate + terminal (no review self-loop); a blocked round carries its reason on stderr, with no next: line consumed here |
| I4 | Closeout before finish — the closeout backfill lands before the finish menu runs, in full for whichever branch shape the work carries: with a phase row, the closeout version rows + Phase inventory → Done; without one (a standalone single-spec), only the spec's own version row + change-history row and no Phase inventory touched. Committed, tree clean, before the menu — the finish decision never ships an un-backfilled branch |
| failure | behavior | reason |
|---|---|---|
| Tests red before merge | BLOCKED (fix tests) | Do not merge/PR a red branch |
| Menu unrecognized input reaches the 3-attempt limit | BLOCKED (menu exhausted) | Cannot obtain user decision |
| Merge conflict / push rejected / PR open failure | implicit fail-open (stop + report; branch and base retained; user recovers then re-runs cdd-close) | Do not auto-resolve |
mattpocock-skills missing while the menu selected PR | report the readable missing the reference names, open the PR with a plainly authored body, and keep close-issues reachable | The reference owns the body's shape, never this merge's value |
| Closeout backfill fails (dirty tree / write error) | stop + report + fail-open | Do not enter the finish menu with an uncommitted closeout |
What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub oscaner/skills --plugin kairos6 skills in this plugin
/cdd-designIndependent brainstorm orchestrator -- Node-anchored flow with digraph as single control-flow source of truth. Explores the request's design context in this session, judges which program owns the change and gates on phase registration, runs grilling, and dispatches the parameterized spec-writer(/kairos:cdd-spec-writer) under one template (single-spec / phase-spec / overall charter). Callable standalone; invoke as kairos:cdd-design(pi:/skill:cdd-design)./cdd-devIndependent 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./cdd-Other plugins' skills for the same job