Install in seconds
Install this skill
Copy the command and run it in your terminal. You can review the source before installing.
terminal
git clone https://github.com/crbnos/carbon

Works with Git. The repository opens in your current directory.

πŸ“‹
AutomationTypeScript

Plan

by crbnos

Creates a detailed, executable implementation plan from a finalized specification, breaking down work into verifiable tasks with exact file paths, commands, and expected outputs. For use in agent-assisted development workflows to plan implementation steps before execution.

2.3K stars318 forksAdded 2026/07/20
agentic-platformassemblylinebusinesserpleanmanagementmanufacturingmcp-servermespostgresqlqmsreact-routersupabasetypescript

Documentation

README

plan β€” implementation plan from a spec

Input: a finalized spec (.ai/specs/{date}-{slug}.md with zero unresolved open questions) or, for small changes, an explicit user description. Output: a plan at .ai/plans/{YYYY-MM-DD}-{slug}.md that /execute can follow mechanically.

Write the plan for the weakest plausible executor: an agent with no memory of this session. Every task must be executable from the plan text alone.

Announce at start: "Using the plan skill β€” turning the spec into an implementation plan."

Step 1: Check prerequisites

  1. Read the spec. If any Open Question is unchecked β†’ STOP and return to /spec-writing Step 7. Do not plan around an open question.
  2. Read .ai/lessons.md and the module AGENTS.md for every module the spec touches.
  3. Read the matching guides for the work in the plan (from the root AGENTS.md Task Router). At minimum:
    • migrations β†’ .ai/rules/workflow-database-migration.md
    • services β†’ .ai/rules/conventions-services.md
    • forms/UI β†’ .ai/rules/conventions-forms.md + packages/form/AGENTS.md
    • database access β†’ .ai/rules/database-patterns.md

Step 2: Decompose into tasks

  • One task = one verifiable unit of work (a migration, a service function + its test, a route + form, a UI component). If a task can't be verified by a single command or a single browser check, split it.
  • Default order: migration β†’ pnpm run generate:types β†’ models (zod) β†’ service functions (+ unit tests) β†’ routes/actions β†’ UI β†’ browser verification.
  • For every UI task, name the precedent: the existing Carbon screen or component to copy from (file path). Do not design UI from concepts β€” grep packages/react/src/ and apps/erp/app/components/ first.
  • Mark tasks that are independent of each other β€” /execute may run them as parallel subagents.

Step 3: Write each task

Every task uses exactly this shape:

## Task N: {imperative title}

**Depends on:** {task numbers, or "none"}
**Files:**
- Create: `{exact path}`
- Modify: `{exact path}` β€” {what changes}
- Copy from (precedent): `{exact path of the exemplar}`

**Steps:**
1. {exact instruction; include full SQL for migrations, function signatures for
   services, and the exemplar to copy for UI}
2. ...

**Verify:**
```bash
{exact command}
# Expected: {what the output must contain}
```

**Out of scope:** {things that look related but must NOT be touched}

Hard rules for task content:

  • Migrations: create with pnpm db:migrate:new <name> (never hand-pick a timestamp; never 000000 as HHMMSS). SQL must use id('prefix') defaults, companyId + composite PK ("id", "companyId"), audit columns (createdBy/createdAt/updatedBy/updatedAt), RLS policies per .ai/rules/conventions-database.md, and be idempotent (IF NOT EXISTS / DROP ... IF EXISTS guards). Never backdate a timestamp older than the newest migration on main. The task after any migration is always pnpm run generate:types.
  • Verification is scoped. Typecheck a package with pnpm exec turbo run typecheck --filter=<pkg> (e.g. --filter=erp, --filter=@carbon/react). Never plan a whole-repo pnpm typecheck β€” it OOMs. Tests: pnpm --filter <pkg> test.
  • No placeholders. No "TBD", no "similar to Task 3", no "add appropriate logic". If you can't specify it, the spec is incomplete β€” go back.
  • Escape hatches. Where a task rests on an assumption, add: "If {assumption} turns out false, STOP and report β€” do not improvise."

Red flags β€” if you catch yourself writing any of these, the task is under-specified; fix it before moving on:

  • "similar to the previous task" / "as appropriate" / "etc."
  • a Verify block with no expected output
  • a UI task with no precedent file path
  • a migration task without a generate:types follow-up

Step 4: Write the plan file

Save to .ai/plans/{YYYY-MM-DD}-{slug}.md (today's date, same slug as the spec):

# {Feature} β€” implementation plan

**Spec:** .ai/specs/{date}-{slug}.md
**Research:** .ai/research/{slug}.md
**Branch:** {branch name}

## Progress
- [ ] Task 1: {title}
- [ ] Task 2: {title}

## Dependencies
{`Task 2 needs Task 1 (types)`, `Tasks 4–5 independent`}

---
{tasks}

The Progress checklist is the live tracker β€” /execute checks items off in this file. Do not create a separate todo file.

Step 5: Self-check, then present

  • Every task has exact paths, exact commands, expected output
  • Every migration task follows the hard rules above and is followed by a generate:types step
  • Every UI task names its precedent file
  • No whole-repo typecheck anywhere in the plan
  • Every acceptance criterion in the spec is covered by at least one task, and the final task is browser verification via /test for user-facing work

Present the plan path and a one-paragraph summary. Wait for approval, then hand off to /execute.

More from crbnos

Other Claude Code skills by this author in the directory.

🌐
1w ago

Agent Browser

Browser automation CLI for AI agents. Use it to navigate pages, fill forms, click buttons, take screenshots, extract data, test web apps, or automate any browser task.
Automation
+0%2.3K325
πŸ”‘
1w ago

Carbon Dev Auth

Authenticates a local browser session against the Carbon ERP dev server using DEV_BYPASS_EMAIL, enabling automated testing and manual verification. Leaves session open for subsequent commands.
Automation
+0%2.3K325
πŸ“š
1w ago

Carbon Docs

Author, edit, or extend Carbon's documentation site β€” a Fumadocs + Next.js app. Use for reader-facing guides, reference pages, and documentation IA. Grounds every claim in source code and follows a warm-paper house style.
Writing
+0%2.3K325
βœ…
1w ago

Check and Commit

Runs a sequence of code quality gates (type generation, formatting, linting, typecheck, tests, build, i18n) on changed files, fixes simple issues, and commits only when all checks pass. Ideal after a code fix, task execution, or manual changes before committing.
Quality
+0%2.3K325
πŸ”„
1w ago

Conductor

Drive a single work item through a doer→gate→judge→keep-or-revert→ledger cycle to a gated PR, unattended. Use for tightly-scoped bugs, usability tweaks, or small features with explicit acceptance criteria.
Automation
+0%2.3K325
πŸ€–
1w ago

Create AGENTS.md

Generates or refreshes AGENTS.md files for Carbon packages and ERP modules by analyzing the actual source code. Ensures every documentation claim is verified against real functions, tables, and exports.
Writing
+0%2.3K325