skills/plan/SKILL.md
Usage `rdc:plan <topic>` — No epic exists and you need architecture + task breakdown. Produces design decisions, tradeoffs, and Supabase epics/tasks with DoD checklists that feed rdc:build. Use after rdc:preplan or when given clear architectural direction.
npx skillsauth add LIFEAI/rdc-skills rdc:planInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
⚠️ OUTPUT CONTRACT (READ FIRST):
guides/output-contract.mdChecklist-only output. No tool-call narration. No raw MCP/JSON/log dumps. One checklist upfront, updated in place, shown again at end with a 1-line verdict.
If dispatching subagents or running as a subagent: read
{PROJECT_ROOT}/.rdc/guides/agent-bootstrap.mdfirst (fallback:{PROJECT_ROOT}/.rdc/guides/agent-bootstrap.md).
Sandbox contract: This skill honors
RDC_TEST=1perguides/agent-bootstrap.md§ RDC_TEST Sandbox Contract. Destructive external calls short-circuit under the flag. Supabase epic/task writes and git push are skipped underRDC_TEST=1.
/rdc:preplan produced research findingsrdc:overnight when an epic has no child tasksrdc:plan <topic> — interactive planning sessionrdc:plan <epic-id> --unattended — silent mode for overnight buildsGather inputs:
.rdc/research/<topic>.md (fallback: .rdc/research/<topic>.md)SELECT get_open_epics()Read the codebase — understand current state:
Make design decisions — for each major choice:
Define work packages — break into agent-dispatchable units:
.rdc/guides/, fallback .rdc/guides/) in each work package description.4b. Build the checklist decomposition matrix (MANDATORY PRE-BUILD GATE):
Before writing Supabase work items, create a ## Checklist Decomposition Matrix
in the plan doc. This matrix is the source of truth for task checklists and
build verification.
Required columns:
screen, state, action, api, db, migration, component, asset, tool, test, docAtomicity rubric:
Required decomposition by surface:
Minimum row-count heuristics:
Reject these checklist items as too coarse:
Replace them with rows like:
decomp-ui-theme-manager-loaded: /brands/[id]/theme shows owned theme rows with status, project usage, and actions; evidence: Playwright screenshotdecomp-action-duplicate-theme: duplicate submits source brand_theme_id and creates a new editable brand-owned copy; evidence: vitest + DB querydecomp-api-import-validation: POST /api/tools/theme-import rejects missing source URL with 400 JSON error; evidence: route probeAdd a ## Checklist Quality Gate section with:
verdict: PASS only when every row passes the rubric.failures: list any coarse, missing, duplicate, or unverifiable rows.deferred: list any explicit out-of-scope rows.Do not create build-ready work items unless this gate is PASS.
Write a test plan for each work package (MANDATORY):
Every work package MUST have a test_plan section with specific, concrete test items. Each item has a type:
| Type | What it proves | How agent verifies | Example |
|------|---------------|-------------------|---------|
| assert | Logic is correct | Write a vitest test — input → expected output | extractCode("```tsx\nfoo\n```") returns "foo" |
| smoke | It runs without crashing | Run command, check exit code / HTTP status | tsc --noEmit passes, GET /api/layout/scan returns 200 |
| visual | It looks right | Delegate to UI audit tool with specific checkpoints | "/layout page renders container tree, not login screen" |
| contract | Interface matches spec | Check exports, prop types, response shape | ScanResult has { roots: ContainerNode[] } |
Rules for writing test plan items:
assert itemsmoke itemvisual itemcontract itemassert and smoke are mandatory for every work package. visual and contract when applicable.Example test plan in a plan doc:
### WP-2: AST Scanner
**Test plan:**
- assert: `scanFile` returns only Window/Frame/Pane/SubPane nodes, not Badge/Button
- assert: SubPane nested directly in root produces a warning
- assert: Valid Window > Frame > Pane > SubPane nesting produces no warnings
- smoke: `GET /api/layout/scan?dir=apps/studio/src` returns 200 with JSON body
- smoke: `npx tsc --noEmit` exits 0
- contract: `ScanResult` has shape `{ filePath: string, roots: ContainerNode[], warnings: ScanWarning[] }`
Write plan doc to .rdc/plans/<topic-slug>.md (fallback: .rdc/plans/<topic-slug>.md if .rdc/ does not exist):
# Plan: <Topic>
> Generated: <date> | Epic: <id if exists>
## Goal
## Design Decisions
## Work Packages (each with test plan)
## Checklist Decomposition Matrix
## Checklist Quality Gate
## Sequencing (what can parallelize, what depends on what)
## Risks & Mitigations
Create Supabase epic + child tasks:
insert_work_item(p_item_type := 'epic', p_definition_of_done := '[...]'::jsonb, ...){"id":"test-plan-verified","text":"All test plan items implemented and passing","required":true,"checked":false}p_definition_of_done on the epic — child tasks inserted under it will auto-inherit it as their checklistinsert_work_item(p_parent_id := <epic_id>, ...) — checklist auto-hydrated from epic's DoDdecomp-<surface>-<slug>.
The task checklist MUST include both the atomic decomp-* rows and the test-* verification rows.
The decomp-* row text must include the route/file, action, expected result, and evidence artifact.test-<type>-<slug>:
SELECT insert_work_item(
p_parent_id := '<epic_id>',
p_title := 'WP-2: AST Scanner',
p_checklist := '[
{"id":"decomp-api-scan-success","text":"api: GET /api/layout/scan?dir=apps/studio/src returns 200 JSON with roots[] and warnings[]; evidence: route probe output","required":true,"checked":false},
{"id":"test-assert-scanner-filters","text":"assert: scanFile returns only container components","required":true,"checked":false},
{"id":"test-assert-nesting-warn","text":"assert: invalid nesting produces warnings","required":true,"checked":false},
{"id":"test-smoke-scan-api","text":"smoke: GET /api/layout/scan returns 200","required":true,"checked":false},
{"id":"test-contract-scanresult","text":"contract: ScanResult shape matches spec","required":true,"checked":false},
{"id":"tsc-clean","text":"npx tsc --noEmit passes","required":true,"checked":false}
]'::jsonb
);
decomp-* and test-* checklist item as they implement/verify it via update_checklist_item(..., p_actor_session_id := '<agent-session-id>', p_actor_role := 'agent')implementation_report.codeflow_post, then move work to review; validators close doneupdate_work_item_status('done', ..., p_actor_role := 'validator') rejects missing reports, unchecked required items, and supervisor/validator re-ticksReport results:
PLAN_STATUS: { epic_id, task_count, doc_path, waves }
When --unattended and genuine architectural ambiguity is detected — meaning multiple
valid approaches exist with significantly different tradeoffs (not just minor style choices)
— escalate via the advisor tool. Provide: the decision point, the options with tradeoffs,
and the project context. Resume with advisor's recommendation. If advisor is unavailable,
choose the most conservative/reversible approach and document the decision.
.rdc/plans/ (fallback: .rdc/plans/ if .rdc/ does not exist) — not .planning/.rdc/guides/ (fallback: .rdc/guides/) for agent contextrdc:deploy new <slug> — do NOT create the Coolify app manually. Read docs/runbooks/coolify-app-templates.json first." Assign it to an infra agent. This is a hard rule — manually created apps have consistently been misconfigured.If the plan includes deploying a new app, these questions MUST be answered — in interactive mode, ask the user; in unattended mode, escalate via advisor. Do NOT write the infra task until all answers are locked in. Record answers in the plan doc and embed them directly in the task description.
Never guess. Wrong project = delete and recreate. There is no move operation in Coolify.
Q1. Which Coolify project does this app belong to?
→ Read docs/runbooks/coolify-app-templates.json → _infrastructure.projects
→ Match by area: design-system / prt / rdc / rdc-marketing / zoen / lifeai / place-fund / infrastructure / ai-platform
→ If unsure: ASK. Do not infer from app name alone.
→ Record: project_uuid + environment_uuid (staging or production)
Q2. What is the domain?
→ staging wildcard subdomain? (staging / internal tools)
→ Custom subdomain on an existing zone? (e.g. app.regendevcorp.com)
→ Apex domain? (e.g. place.fund itself)
→ Domain on a different zone entirely? (e.g. skymesasouth.com)
Q3. Is this domain already in our Cloudflare account?
→ Yes, zone exists → which zone?
→ No → who controls the nameservers? Does the registrar point NS to Cloudflare?
→ If NS not delegated to Cloudflare: A record in Cloudflare does nothing — must go to registrar
Q4. Does this app need Cloudflare proxy (orange cloud)?
→ Traefik/Let's Encrypt HTTP-01 staging wildcards are often safest unproxied; verify your platform's DNS requirements.
→ Custom domain needing DDoS/CDN: proxy OK only if SSL mode = Full (strict) + origin cert provisioned
→ Any doubt: start unproxied, add proxy after confirming SSL works
Q5. What SSL path?
→ Traefik + Let's Encrypt (default for all unproxied): automatic, no action needed
→ Cloudflare proxy + Full (strict): need origin cert from Cloudflare dashboard first
→ Nixpacks build pack: DO NOT USE for any app that needs custom SSL setup — nixpacks
containers have incompatible SSL configuration requirements. Use dockerfile build pack only.
Embed all five answers into the infra task description verbatim before handing to the agent.
tools
Convert Office documents to/from Markdown with the build-corpus CLI: .docx/.pptx/.ppt → Markdown (Word OMML equations become KaTeX-readable TeX; tables, images, headings preserved), and Markdown → Word (.docx) where inline $...$ and display $$...$$ LaTeX become NATIVE Office Math (OMML) that Word renders as real equations. Use this skill whenever the user asks to convert a Word/PowerPoint document to Markdown, build a Markdown corpus from Office files, turn Markdown into a .docx (optionally with a .dotx template), or "open the report" to edit. Install build-corpus straight from GitHub and run it in the session.
development
Usage `rdc:brochure <input> [--out <path>] [--template <name>] [--format Letter|A4]` — Turn a zip, folder, HTML file, URL, or markdown folder into a print-quality PDF brochure via Puppeteer. Auto-detects print-variant HTML, honors @page CSS, falls back to a Studio-token-aware template when no HTML exists.
tools
Usage `rdc:convert <input> [--out <dir>] [--to markdown|word] [--images assets|base64|s3]` — Convert .docx/.pptx/.ppt → Markdown (Word OMML equations as KaTeX TeX, tables, images) or Markdown → Word via the build-corpus CLI (PyPI `build-corpus`, npm `regen-mde`). Portable: runs in any session that can reach npm or PyPI — Claude Code CLI and claude.ai both fetch + run it. Use whenever the user asks to convert an Office document, build a Markdown corpus from .docx/.pptx, turn Markdown into a .docx, or 'open the report' in the regen-mde editor (Windows).
tools
Usage `rdc:fs-mcp <task>` — Use the File System MCP bridge for live repo reads, safe writes, cloud-to-local ingest, and GitHub-branch imports into a dirty local monorepo. Use when Claude.ai, Cowork, or CLI agents need fs_read/fs_write/fs_import_git_files guidance.