{"id":"c1e3824e-dbc2-40e8-a335-7666f42e4c27","slug":"cdbc","kind":"skill","name":"cdbc","summary":"Skills for AI coding agents (Claude Code, Codex) — Bertrand Meyer's Design by Contract applied to multi-agent orchestration. Install via npx github:mwaddip/claude-dbc.","owner":"mwaddip","repoUrl":"https://github.com/mwaddip/cdbc","license":"MIT","licenseTier":"permissive","trust":"community","stars":3,"match":null,"fewStars":true,"format":"skill","createdAt":"2026-05-04T01:09:46.000Z","addedAt":"2026-10-21T23:05:06.163Z","logoUrl":"https://avatars.githubusercontent.com/u/12030507?u=5ac866b6117840dd316cf2eb0b38149a201b9388&v=4","linkOnly":false,"collection":null,"skillPath":null,"categories":["developer-tools","design-media"],"tags":[],"runtime":"binary","local":true,"cloudCapable":false,"cloudCapability":"unknown","cloudReadyOnPlatform":false,"needsApiKey":false,"reviewed":false,"syncedAt":"2026-10-22T13:36:09.882Z","sample":false,"url":"https://conduits.dev/tools/cdbc","language":"Shell","transports":["stdio"],"install":{},"requirements":{"env":[],"upstreamMayCharge":false},"tools":null,"readme":"# cdbc\n\nA Claude Code plugin (`cdbc`) for multi-agent orchestration applying Bertrand Meyer's **Design by Contract** at the architecture level: a shared-contracts directory holds the source of truth, the main session writes contracts and prompts (never component code), and per-component sessions implement against the contracts within their boundaries.\n\nThe plugin includes original skills for the DBC pattern itself plus workflow skills forked from [superpowers](https://github.com/obra/superpowers) (MIT, Jesse Vincent), renamed and adapted for the cdbc multi-window dispatch model. See `NOTICE` for attributions.\n\n## Observed Autonomy\n\nThe defining idea of this plugin: autonomous multi-session work with the operator watching. The main session designs and dispatches; executor sessions in kitty windows implement; the operator sees every step happen in real time and can interrupt, course-correct, or ask questions about the resulting code afterward.\n\nThis is the visibility win over `superpowers:subagent-driven-development`, which runs implementation in ephemeral in-session subagents you can't watch mid-flight and can't talk to about their output after they finish. Subagents are fast and clean; windows are observable and persistent. The cdbc dispatch model picks observability — `dispatching-plans` opens N kitty windows in DAG order, each running its own Claude session on its own per-module plan, with the main session retaining context for review and discussion when the work comes back.\n\nConcretely:\n\n- **Watch.** Every executor session lives in a visible window; you see its output as it happens, not after the fact.\n- **Interrupt.** Notice drift, stop the window, send corrective instruction, or `/clear` and re-dispatch.\n- **Course-correct.** The wrapper prompt can be rewritten mid-flight if you spot a bad framing.\n- **Ask later.** After the executor reports done, you can keep talking to it about decisions it made — the session stays alive.\n- **No detection layer.** The operator IS the failure detection. No timeouts, no auto-retry, no t-of-n recovery — that's by design.\n\nThe auto/gate distinction in `design-by-contract-for-ai-agents` is the operator's opt-in to this model. Gate mode preserves per-dispatch confirmation (for one-off prompts you want to inspect before submit). Auto mode lets `dispatching-plans` orchestrate a whole DAG without per-call interruption — the visibility through the windows is what keeps you in the loop instead.\n\n## Canonical Workflow\n\nFor multi-module feature work in a project where `design-by-contract-for-ai-agents` has already established contracts:\n\n```\ncdbc:brainstorming                      →  design doc (with Module Decomposition table)\ncdbc:writing-multi-module-plans         →  N plans + DAG file\ncdbc:dispatching-plans                  →  N windows in DAG order, autonomous dispatch\ncdbc:requesting-code-review             →  per-module review on main session\ncdbc:finishing-a-development-branch     →  merge / PR / discard\n```\n\nFor single-task work, use `cdbc:dispatching-prompts` (gated per dispatch) to send one prompt to one component session.\n\n## Skills\n\n### Architecture\n- **`design-by-contract-for-ai-agents`** — first skill to invoke in any multi-component project. Architecture, roles, contract format, anti-patterns, and Bootstrap Discovery for greenfield projects.\n\n### Bootstrap\n- **`using-cdbc`** — session-start orientation: skill inventory, the cdbc workflow shape, when to invoke which skill.\n\n### Dispatch\n- **`dispatching-prompts`** — main-session skill for sending a single prompt to one component session via kitty + `ac`. Operator gate per dispatch by default.\n- **`dispatching-plans`** — main-session orchestrator for multi-module work. Reads a DAG produced by `writing-multi-module-plans`, opens N kitty windows in dependency order, dispatches per-module wrapper prompts, tracks completion via the coordination back-channel. Requires DBC bootstrap with `auto` mode.\n- **`receiving-prompts`** — executor side. Establishes EXECUTOR identity at load time, prevents recursive dispatch. Loads automatically when a dispatch message names it (`use the cdbc:receiving-prompts skill to execute the work in <file>`).\n\n### Workflow (forked from superpowers)\n- **`brainstorming`** — design exploration. Includes an optional Module Decomposition step that emits a table consumed by `writing-multi-module-plans`.\n- **`writing-multi-module-plans`** — splits a design doc with module pointers into N per-module plans + a DAG. For single-plan flows, use upstream `superpowers:writing-plans` instead.\n- **`executing-plans`** — implements a plan task-by-task with batch checkpoints. Used on the window side by `dispatching-plans`, or directly for a single-plan flow.\n- **`test-driven-development`** — TDD discipline.\n- **`requesting-code-review`** — dispatch a code reviewer subagent to catch issues before they cascade.\n- **`finishing-a-development-branch`** — completion guidance: verify tests, present merge / PR / discard options, execute choice.\n\n## Install\n\ncdbc ships as a Claude Code plugin. Add the marketplace and install:\n\n```\n/plugin marketplace add mwaddip/cdbc\n/plugin install cdbc@cdbc-marketplace\n```\n\nSkills become available under the `cdbc:` namespace (e.g., `cdbc:dispatching-prompts`). Restart Claude Code if skills don't appear after install.\n\n## Updating\n\n```\n/plugin update cdbc@cdbc-marketplace\n```\n\n## Optional: example global config\n\n`extras/CLAUDE.md` and `extras/OVERRIDES.md` are sanitized versions of the author's own Claude Code global config — 20 cross-project working rules (communication style, brainstorming discipline, verification standards, project boundaries, observability) and 8 mechanical overrides (dead-code-first refactoring, phased execution, context-decay awareness, edit integrity, exhaustive rename search, truncation suspicion). They're starting points you can copy and customize:\n\n```\ncp extras/CLAUDE.md ~/.claude/CLAUDE.md         # Claude Code's global instructions\ncp extras/OVERRIDES.md ~/projects/OVERRIDES.md  # referenced from CLAUDE.md\n```\n\nBoth files have a placeholder for your own domain-specific additions (a Background section in CLAUDE.md, a Domain-Specific section in OVERRIDES.md).\n\n## Recommended: `rtk` (token-saving proxy)\n\nFor long-running multi-session work, [`rtk`](https://github.com/rtk-ai/rtk) (Rust Token Killer) is essential for keeping token usage manageable. It transparently filters and summarizes CLI output (60–90% savings on common operations like `git status`, `ls`, `grep`, `find`, etc.) via a Claude Code hook — so commands you type unchanged get rewritten to `rtk <cmd>` behind the scenes.\n\ncdbc skills do not depend on `rtk`, but if you're running multi-window dispatch flows (`cdbc:dispatching-plans`) where N sessions each consume tool output, the savings compound quickly across the windows. The author considers it essential for the workflow this plugin enables.\n\nInstall from: <https://github.com/rtk-ai/rtk>\n\n## Optional: `ac` (kitty session launcher)\n\nThe `dispatching-prompts` and `dispatching-plans` skills assume you can launch agent sessions in named terminal windows that other sessions can find. The author uses kitty + a small bash script called `ac` (Auto Claude), shipped at the top of this repo. `ac` runs `claude` in the current kitty tab and writes a row to a flat session-registry file — so a parent Claude session can `grep <component> ${XDG_RUNTIME_DIR:-/tmp}/ac/sessions` instead of parsing the kilobytes of JSON `kitty @ ls` returns. Token savings add up across a long session.\n\n### Requirements\n\n- [kitty](https://sw.kovidgoyal.net/kitty/) with remote control enabled (`allow_remote_control yes` in `~/.config/kitty/kitty.conf`)\n- [Claude Code](https://claude.com/claude-code) CLI on `PATH` as `claude`\n- bash, python3 (one inline `kitty @ ls` JSON parse), GNU coreutils\n\n### Install\n\nClone this repo once and symlink `ac` from somewhere on your `PATH`:\n\n```\ngit clone https://github.com/mwaddip/cdbc.git ~/projects/cdbc\nln -s ~/projects/cdbc/ac ~/.local/bin/ac     # or anywhere on PATH\n```\n\nTo update: `cd ~/projects/cdbc && git pull`. The symlink follows.\n\n### Usage\n\nIn any kitty tab:\n\n```\nac                # start a new Claude Code session in this tab\nac -r             # resume the previous Claude Code session\nac -o \"<opts>\"    # pass extra flags to claude (must be the last argument)\n```\n\n`ac` registers `(window_id, tab_id, pwd)` in the sessions file before launching, and removes its row on Claude Code exit.\n\n### Sessions file\n\n```\n${XDG_RUNTIME_DIR:-/tmp}/ac/sessions\n```\n\nPer-user tmpfs path. Tab-separated, no headers: `<window_id>\\t<tab_id>\\t<pwd>`. Cleared on reboot — the kitty windows the entries refer to are also gone after a reboot, so persisting them would only produce broken references.\n\n### Caveats\n\n- Kitty-only. Won't work in tmux, screen, or vanilla terminals (relies on `KITTY_WINDOW_ID`).\n- Multi-user safety in the `/tmp` fallback: if `XDG_RUNTIME_DIR` is unset on your system (rare on modern Linux desktops, possible on macOS or minimal containers), two users on the same machine collide on `/tmp/ac/sessions`. Set `XDG_RUNTIME_DIR` per-user, or don't use the fallback.\n\nIf you're not on kitty, the `dispatching-prompts` and `dispatching-plans` skills still apply as *concepts* (file-path prompt injection and DAG-driven multi-window orchestration in any terminal multiplexer that supports cross-window text injection) but the kitty-specific commands won't work as-is.\n\n## Skill format\n\nSkills follow the [agentskills.io specification](https://agentskills.io/specification): YAML frontmatter (`name`, `description`, optional `metadata`) followed by a markdown body, in `skills/<skill-name>/SKILL.md`. This is the format Claude Code and other compliant harnesses load.\n\n## License\n\nMIT for the original content (see `LICENSE`). See `NOTICE` for the forked content's MIT attribution (Copyright © 2025 Jesse Vincent / superpowers).\n"}