---
name: chatondearu-cda-plan
description: "Create or update implementation plans under plans/ from an approved PRD and GitHub Kanban issue. Links ADR constraints from foam, produces a task checklist before coding. Use when a PRD is approved, picking up Ready work, or when the user asks for an implementation plan."
metadata:
  decimalai-skill-id: "d6958e0d-166d-4f96-90e0-885fe11c2226"
  decimalai-version-id: "60ab736a-e5e8-4a16-adf2-92f17deb364e"
  decimalai-version: "4"
  decimalai-body-sha256: "c516011e3cc104409e6727bb3ad7233ff9ee2a39dc28c80f7b6b80a249a4050b"
  decimalai-name: "chatondearu/cda-plan"
  decimalai-format: "1"
  decimalai-invocation: "model"
  decimalai-category: "productivity"
  decimalai-source: "https://app.decimal.ai/s/chatondearu-cda-plan@4/SKILL.md"
---
# Foam plan authoring

## Role

Turn an **approved PRD** + **Kanban issue** into an implementation **plan**
(`plans/PLAN-NNN-slug.md`) with ADR constraints and a verifiable task checklist.

| Step | Skill |
| ---- | ----- |
| Issue on board | `cda-kanban` |
| PRD | `cda-prd` (required before plan) |
| Plan | **this skill** |
| Claim + branch + PR | `cda-kanban` workflow B |
| Commit / review | `cda-commit`, `cda-review` |

## Before writing

1. Confirm PRD exists and status is `approved` (or user waived for small scope).
2. Read the PRD and linked ADRs in `foam/decisions/`.
3. Search open PRs for the same issue: `gh pr list --search "#NNN"`.
4. Do not start coding until the plan checklist reflects real scope.
5. When `CDA_GRAPHIFY=1` and `graphify-out/graph.json` exists, read `graphify-out/GRAPH_REPORT.md` (or query the graph) before grepping or reading files.

## Create plan from issue

```bash
SKILL=~/.cursor/skills/cda-plan

bash "$SKILL/scripts/new-plan.sh" 42
bash "$SKILL/scripts/new-plan.sh" --status in-progress 42
bash "$SKILL/scripts/new-plan.sh" --dry-run 42
```

Requires `prd/PRD-42-*.md` (create with `cda-prd/scripts/new-prd.sh` first).

## End-to-end feature pipeline

```
Issue (Backlog)                         cda-kanban
  → PRD draft → review → approved       cda-prd/scripts/new-prd.sh <issue#>
  → Board: Ready
  → PLAN-NNN                            cda-plan/scripts/new-plan.sh <issue#>
  → claim → In progress → branch → PR   cda-kanban B (PR body: Closes #NNN)
  → verify plan checklist + merge
  → PRD shipped, plan done, import-kanban.sh, ADR if new technical choice
```

### Batch from chat (several subjects)

When the user lists multiple subjects to analyze and implement in one run, use
**`cda-dev`** instead of repeating this pipeline manually:

```
Chat list → intake Q&A → GO on epic breakdown
  → epic issue + approved PRD
  → N child issues (Ready) + N plans (this skill per child)
  → parallel workers → PRs open
```

## Plan quality bar

- **Constraints** table lists accepted ADRs — violations need a new ADR.
- **Tasks** are checkboxes an agent can tick during implementation. Write them
  **behaviorally** (a contract that survives refactors): describe *what* each task
  must achieve and its acceptance signal, name the types / signatures / config
  shapes involved, and let the implementer discover the files. **Avoid file paths
  and line numbers** in tasks — they go stale between planning and implementation.
- **Vertical slices.** Order tasks as **tracer bullets** — one thin end-to-end
  slice at a time (interface → implementation → test), not all of layer A then all
  of layer B. See the `cda-tdd` skill.
- **Test plan** declares the **seams under test** up front: the public boundaries
  where behavior is observed (not internals). Use the `cda-codebase` /`cda-tdd`
  vocabulary (seam, interface, depth) and confirm the seams before coding. **Unattended (cda-dev worker):** ask nothing; the seams are those listed in the plan's Test plan. Match
  project conventions (nix develop, CI, etc.).
- **Verification** section completed before merge.
- English for all plan content.

## During implementation

- Tick tasks in the plan as you go.
- Set plan status: `draft` → `in-progress` → `verify` → `done`.
- New architecture choice mid-flight → pause, record ADR, update plan constraints.

## After merge

- Plan status → `done`.
- PRD status → `shipped`.
- Run `cda-foam/scripts/import-kanban.sh`.
- Sync `doc/` when the change touched public behavior, API, config/env,
  deployment, or architecture (`cda-docs`); record an ADR via
  `cda-foam` if it was an architectural decision.

See [conventions.md](conventions.md).
