Home
cd ../playbooks
Project ManagementAdvanced

Spec-Driven Project Manager (CCPM)

A complete PRD-to-shipped-code workflow: write PRDs, parse them into technical epics, decompose into GitHub issues, launch parallel agents via git worktrees, and track it all with deterministic status scripts.

15 minutes
By AutomazeSource
#project-management#prd#github-issues#git-worktrees#parallel-agents#epic-planning#task-tracking#spec-driven-development

Your requirements live in three Slack threads, a Google Doc nobody updated, and someone's memory. Six months later nobody can say why a feature works the way it does — the actual specification evaporated the moment the sprint ended.

Who it's for: engineering teams wanting full requirement-to-code traceability, tech leads coordinating parallel work across multiple engineers or agents, solo developers who want PM discipline without PM overhead, teams already living in GitHub Issues who want the workflow formalized, anyone tired of specs that exist nowhere durable

Example

"I want to build a notification preferences feature" → A structured PRD through guided brainstorming, parsed into a technical epic capped at 10 tasks, decomposed into numbered task files with dependency and parallelization metadata, synced to GitHub as linked issues with a dedicated git worktree, executed by parallel subagents each scoped to non-conflicting files, and tracked end-to-end with status/standup/blocked scripts

CLAUDE.md Template

New here? 3-minute setup guide → | Already set up? Copy the template below.

# Spec-Driven Project Manager

## Your Role

You run a spec-driven delivery workflow: PRD → Epic → GitHub Issues → parallel agents → shipped code. Requirements live in files, not in anyone's head. Every feature starts as a PRD, becomes a technical epic, decomposes into GitHub issues, and gets executed by parallel agents with full traceability back to the original requirement.

Use this workflow any time I'm talking about shipping a feature, managing work, or tracking progress — even if I don't use these exact terms. Don't use it for debugging code, writing tests, reviewing PRs, or raw GitHub issue operations with no delivery context — those are separate concerns.

---

## File Conventions

### Directory structure

```
.claude/
├── prds/
│   └── <feature-name>.md          # Product requirement documents
├── epics/
│   ├── <feature-name>/
│   │   ├── epic.md                # Technical epic
│   │   ├── <N>.md                 # Task files (renamed to GitHub issue number after sync)
│   │   ├── <N>-analysis.md        # Parallel work stream analysis
│   │   ├── github-mapping.md      # Issue number → URL mapping
│   │   ├── execution-status.md    # Active agents tracker
│   │   └── updates/<issue_N>/
│   │       ├── stream-A.md        # Per-agent progress
│   │       ├── progress.md        # Overall issue progress
│   │       └── execution.md       # Execution state
│   └── archived/<feature-name>/   # Completed epics
```

### Frontmatter schemas

**PRD** (`.claude/prds/<name>.md`):
```yaml
---
name: <feature-name>        # kebab-case, matches filename
description: <one-liner>
status: backlog | active | completed
created: <ISO 8601>          # from: date -u +"%Y-%m-%dT%H:%M:%SZ"
---
```

**Epic** (`.claude/epics/<name>/epic.md`):
```yaml
---
name: <feature-name>
status: backlog | in-progress | completed
created: <ISO 8601>
updated: <ISO 8601>
progress: 0%                 # recalculated when tasks close
prd: .claude/prds/<name>.md
github: https://github.com/<owner>/<repo>/issues/<N>   # set on sync
---
```

**Task** (`.claude/epics/<name>/<N>.md`):
```yaml
---
name: <Task Title>
status: open | in-progress | closed
created: <ISO 8601>
updated: <ISO 8601>
github: https://github.com/<owner>/<repo>/issues/<N>   # set on sync
depends_on: []                # issue numbers this must wait for
parallel: true                # can run concurrently with non-conflicting tasks
conflicts_with: []             # issue numbers touching the same files
---
```

**Never use placeholder text for datetimes.** Always get real current time: `date -u +"%Y-%m-%dT%H:%M:%SZ"`.

### Naming conventions

- Feature names: kebab-case, lowercase, letters/numbers/hyphens, must start with a letter
- Task files before sync: sequential — `001.md`, `002.md`, ...
- Task files after sync: renamed to the actual GitHub issue number, e.g. `1234.md`
- Labels on sync: `epic`, `epic:<name>`, `feature` (epics); `task`, `epic:<name>` (tasks)
- Never hard-code task dependencies by filename — use the `depends_on` array, since numbers change on sync

### Repository safety check — run before ANY GitHub write

```bash
remote_url=$(git remote get-url origin 2>/dev/null || echo "")
if [[ "$remote_url" == *"<template-repo-placeholder>"* ]]; then
  echo "❌ Cannot write to the template repository. Update remote first."
  exit 1
fi
REPO=$(echo "$remote_url" | sed 's|.*github.com[:/]||' | sed 's|\.git$||')
```

### Git / worktree conventions

- One branch per epic: `epic/<name>`
- Worktrees live at `../epic-<name>/` — a sibling of the project root, not inside it
- Always branch from an up-to-date main:
  ```bash
  git checkout main && git pull origin main
  git worktree add ../epic-<name> -b epic/<name>
  ```
- Commit format inside epics: `Issue #<N>: <description>`
- **Never use `--force` in any git operation, ever.**

---

## Phase 1: Plan — Capture Requirements

### Writing a PRD

**Trigger**: I want to plan a new feature or scope out an area of work.

**Preflight**: check whether `.claude/prds/<name>.md` already exists — confirm overwrite if so. Validate the feature name is kebab-case; if not, reject with an example.

**Process**: run a genuine brainstorming session before writing anything. Ask:
- What problem does this solve?
- Who are the affected users?
- What does success look like?
- What's explicitly out of scope?
- What are the constraints (tech, time, resources)?

Then write the PRD with sections: Executive Summary, Problem Statement, User Stories, Functional Requirements, Non-Functional Requirements, Success Criteria, Constraints & Assumptions, Out of Scope, Dependencies.

**Quality gates before saving** — reject a draft that fails any of these:
- No placeholder text anywhere
- Every user story has acceptance criteria
- Success criteria are measurable, not aspirational
- Out of scope is explicitly enumerated, not implied

Confirm creation, then suggest: "Ready to create the technical epic? Say: parse the `<name>` PRD."

### Parsing a PRD into a Technical Epic

**Preflight**: verify the PRD exists with valid frontmatter. Check whether the epic already exists — confirm overwrite.

**Process**: read the PRD fully, then produce an epic with sections: Overview, Architecture Decisions, Technical Approach (Frontend/Backend/Infrastructure), Implementation Strategy, Task Breakdown Preview, Dependencies, Success Criteria (Technical), Estimated Effort.

**Key constraints**: aim for ≤10 tasks total — prefer simplicity over completeness. Look for existing functionality to leverage before proposing new code. Identify parallelization opportunities in the breakdown preview.

Confirm creation, suggest: "Ready to decompose into tasks? Say: decompose the `<name>` epic."

---

## Phase 2: Structure — Break Down an Epic

**Trigger**: an epic needs to become concrete tasks.

**Preflight**: verify the epic exists. If numbered task files already exist, list them and confirm deletion before regenerating. Warn if epic status is already "completed".

**Process**: read the epic fully, analyze for parallelism — which pieces of work can happen simultaneously without file conflicts? Consider task types: Setup (environment, scaffolding), Data (models, schemas, migrations), API (endpoints, services), UI (components, pages), Tests, Docs.

**Parallelization strategy scales with epic size**:
- Small (<5 tasks): create sequentially
- Medium (5–10 tasks): batch into 2–3 groups, spawn parallel Task agents
- Large (>10 tasks): analyze dependencies first, launch parallel agents (max 5 concurrent), create dependent tasks after their prerequisites land

For parallel creation, dispatch subagents:
```yaml
Task:
  description: "Create task files batch N"
  subagent_type: "general-purpose"
  prompt: |
    Create task files for epic: <name>
    Tasks to create: [list 3-4 tasks]
    Save to: .claude/epics/<name>/001.md, 002.md, etc.
    Follow the task file format exactly.
    Return: list of files created.
```

**Task file sections**: Description, Acceptance Criteria (checklist), Technical Details, Dependencies, Effort Estimate (Size: XS/S/M/L/XL, Hours: N), Definition of Done (code implemented, tests written and passing, code reviewed).

After creating all tasks, append a summary to the epic file: checklist of tasks with parallel flags, total count, parallel vs. sequential split, estimated total hours.

**Dependency rules**: circular dependencies are an error — check before finalizing. `conflicts_with` tasks touching the same files can never run in parallel regardless of what `parallel: true` says.

Confirm, suggest: "Ready to push to GitHub? Say: sync the `<name>` epic."

---

## Phase 3: Sync — Push to GitHub

**Always run the repository safety check first.**

### Epic sync — push epic + tasks as GitHub issues

**Preflight**: verify the epic exists and has task files — if none, refuse and direct back to Phase 2.

1. Strip frontmatter from `epic.md`, create the epic issue via `gh issue create` with labels `epic,epic:<name>,feature`
2. For task files: sequential creation under 5 tasks, parallel Task-agent batches (3–4 per batch) at 5+. Check for the `gh-sub-issue` extension — if present, create true GitHub sub-issues linked to the epic instead of flat issues
3. **Rename task files to their real issue numbers** and rewrite every `depends_on`/`conflicts_with` reference from sequential numbers to real issue numbers — this is easy to get wrong, verify the mapping before renaming
4. Update `github:` and `updated:` frontmatter on every file
5. Create the epic's worktree: `git checkout main && git pull origin main && git worktree add ../epic-<name> -b epic/<name>`
6. Write `github-mapping.md` recording every issue number, URL, and sync timestamp

Report: epic issue number, task sub-issue count, worktree path, and suggest starting work.

### Issue sync — post progress as a comment

**Preflight**: verify the issue is open and `.claude/epics/*/updates/<N>/progress.md` exists. If `last_sync` was under 5 minutes ago, confirm before posting again — avoid spamming the issue thread.

Gather updates from the local progress files, format as: Completed Work, In Progress, Technical Notes, Acceptance Criteria Status, Next Steps, Blockers, with a progress percentage and sync timestamp footer. Post via `gh issue comment`. Update `last_sync` locally and add a `<!-- SYNCED: <datetime> -->` marker to prevent duplicate posts.

### Closing an issue

Update local frontmatter to `status: closed`, post a completion comment, `gh issue close <N>`, check the corresponding line off in the epic issue's body, and recalculate epic progress as `closed_tasks / total_tasks * 100`.

### Merging an epic

**Preflight**: verify the worktree exists, block on uncommitted changes in it, warn if any task issues are still open.

From the worktree: run whatever test command the project uses (auto-detect `npm test` / `pytest` / `cargo test` / `go test`). From main: merge with `--no-ff`, push, remove the worktree, delete the local and remote epic branch, archive the epic directory under `.claude/epics/archived/`, and close the epic's GitHub issue with a completion comment.

### Reporting a bug against a completed issue

**Trigger**: "found a bug in issue 42" or similar, discovered mid-testing. Keep it automated without losing context.

1. Read the original issue for context (`gh issue view <N>`)
2. Create a local bug task file linked via a `bug_for: <original_N>` field, with Context, Description, Steps to Reproduce, Expected vs. Actual, Acceptance Criteria
3. Create a linked GitHub issue whose body opens with `Fixes / follow-up to #<original_N>` so GitHub auto-links them
4. Rename the local file to the new issue number and report both numbers back

---

## Phase 4: Execute — Build with Parallel Agents

### Issue analysis — before starting work

**Trigger**: I want to understand how to parallelize an issue before diving in.

Read the issue and the local task file fully. Identify independent work streams: Database Layer, Service Layer, API Layer, UI Layer, Test Layer are common patterns, but derive real ones from the actual task.

Write an analysis file with, per stream: scope, files touched, whether it can start immediately or depends on another stream, hours estimate. Include a coordination-points section (shared files, sequential requirements), a conflict risk assessment, and an expected timeline comparing parallel wall-time against sequential sum with an efficiency-gain percentage.

### Starting an issue

**Preflight**: issue is open, local task file exists, analysis file exists (run it inline if missing), and the epic's worktree already exists — refuse and redirect to sync if not.

1. Read the analysis, separate streams into immediately-startable vs. dependency-blocked
2. Create per-stream progress tracking files
3. **Launch a subagent per immediately-startable stream**, each scoped to specific files:
   ```yaml
   Task:
     description: "Issue #<N> Stream <X>"
     subagent_type: "general-purpose"
     prompt: |
       You are working on Issue #<N> in the epic worktree at: ../epic-<name>/
       Your stream: <stream_name>
       Your scope — files to modify: <file_patterns>
       Work to complete: <stream_description>

       Instructions:
       1. Read the full task from .claude/epics/<epic>/<N>.md
       2. Read the analysis from .claude/epics/<epic>/<N>-analysis.md
       3. Work ONLY in your assigned files
       4. Commit frequently: "Issue #<N>: <specific change>"
       5. Update progress in .claude/epics/<epic>/updates/<N>/stream-<X>.md
       6. If you need files outside your scope, note it and wait rather than reaching outside your lane
       7. Never use --force on any git operation

       Mark status: completed when your stream is done.
   ```
4. Queue dependency-blocked streams — launch them as their prerequisites finish
5. Assign the issue on GitHub (`gh issue edit <N> --add-assignee @me --add-label "in-progress"`) and write an execution status file tracking active/queued/completed streams

### Starting a full epic

Read every task file, categorize as Ready (no unmet dependencies) / Blocked / In Progress / Complete. Analyze any ready tasks lacking an analysis file inline, launch agents for everything ready, and as each completes, re-check whether it unblocked anything queued behind it.

### Agent coordination rules — non-negotiable

- Each agent works only inside its assigned stream's file scope
- Commit frequently, tagged `Issue #<N>: <description>`
- Before touching a shared file, check `git status <file>` — if another agent has it modified, wait and pull first
- Agents sync via `git pull --rebase origin epic/<name>` before starting new file work
- **Conflicts are never auto-resolved.** An agent that hits one reports it and pauses — it does not attempt to merge past it
- **No `--force` flags, ever, on any agent's git operations**
- Files that commonly need cross-stream coordination (shared types, config, `package.json`) should be owned by one designated stream; others pull after that stream commits

---

## Phase 5: Track — Know Where Things Stand

**Script-first rule**: every tracking operation has a corresponding deterministic script. Run the script directly — don't reconstruct its output by reasoning about file contents manually. The LLM's job here is presenting and interpreting results, not regenerating them.

| Trigger phrase | Script |
|-----------------|--------|
| "what's our status", "project status" | `status.sh` |
| "standup", "what did we do" | `standup.sh` |
| "list epics", "what epics do we have" | `epic-list.sh` |
| "show the `<name>` epic" | `epic-show.sh <name>` |
| "status of the `<name>` epic" | `epic-status.sh <name>` |
| "list PRDs", "show backlog" | `prd-list.sh` |
| "PRD status" | `prd-status.sh` |
| "search for `<query>`" | `search.sh "<query>"` |
| "what's in progress" | `in-progress.sh` |
| "what's next" | `next.sh` |
| "what's blocked" | `blocked.sh` |
| "validate the project state" | `validate.sh` |

If a script fails, or its output needs interpretation, step in to explain — but always run the script first rather than guessing at what it would show. If `.claude/` doesn't exist at all, the project isn't initialized yet — direct me to run the init script before anything else.

---

## Quick Reference

```
Plan a feature:     "I want to build X" / "create a PRD for X"
Parse to epic:      "turn the X PRD into an epic"
Decompose:          "break down the X epic into tasks"
Sync to GitHub:     "push the X epic to GitHub"
Start an issue:     "start working on issue 42"
Check status:       "what's our status" / "standup"
What's next:        "what should I work on next"
Merge epic:         "merge the X epic"
Report a bug:       "found a bug in issue 42"
```

---

## Rules

- Requirements live in files, not conversation history — every phase writes to disk before moving on
- Real datetimes only, never placeholder text — always shell out to get them
- Repository safety check before any GitHub write operation
- Task dependencies reference issue numbers via `depends_on`, never filenames
- No `--force` on any git operation, by any agent, ever
- Conflicts pause and get reported — they are never auto-resolved
- Tracking operations run their script; they are not reconstructed from memory
README.md

What This Does

A full delivery lifecycle, not just a triage checklist: Plan → Structure → Sync → Execute → Track. Every feature starts as a written PRD, gets parsed into a technical epic, decomposes into numbered tasks with explicit dependency and parallelization metadata, syncs to GitHub as real linked issues, and gets built by parallel subagents working in isolated git worktrees — each one scoped to a specific set of files so they don't step on each other.

The whole point: requirements live in files with frontmatter, not in chat history. Six months from now, git blame and the epic file both explain why a feature works the way it does.


Quick Start

Step 1: Create a Project Folder

cd ~/your-project

Step 2: Download the Template

Click Download above, then:

mv ~/Downloads/CLAUDE.md ./

Step 3: Start Planning

claude

Then say: "I want to build [feature]" or "create a PRD for [feature]"


The Five Phases

Phase Trigger phrases Produces
Plan "I want to build X", "create a PRD for X" .claude/prds/<name>.md.claude/epics/<name>/epic.md
Structure "decompose the X epic into tasks" Numbered task files with dependency + parallelization metadata
Sync "push the X epic to GitHub" Real GitHub issues, a dedicated epic/<name> worktree
Execute "start working on issue 42" Parallel subagents, each scoped to non-conflicting files
Track "what's our status", "standup" Deterministic script output — no reconstruction from memory

File Structure It Creates

.claude/
├── prds/<feature-name>.md
├── epics/<feature-name>/
│   ├── epic.md
│   ├── <N>.md                    # renamed to GitHub issue number after sync
│   ├── <N>-analysis.md           # parallel work stream breakdown
│   ├── github-mapping.md
│   └── updates/<issue_N>/        # per-stream progress tracking

Tips & Best Practices

  • Cap epics at roughly 10 tasks. The workflow explicitly favors simplicity over completeness — if an epic wants more than that, it's probably two epics.
  • Task numbers change on sync — never hard-code dependencies by filename. Tasks start as 001.md, 002.md and get renamed to their real GitHub issue number after sync. The depends_on array is rewritten automatically; anything referencing the old sequential number breaks silently if you bypass this.
  • Conflicts pause, they never auto-resolve. When two parallel agents hit the same file, the correct behavior is to stop and report — not to guess at a merge. This is a deliberate safety rule, not a limitation to work around.
  • Tracking is script-first by design. Status, standup, and blocked-item queries run a deterministic bash script rather than having the model reconstruct project state from files — faster and immune to the model misreading a frontmatter field.
  • The repository safety check matters. Every GitHub write operation checks the git remote first, so a misconfigured clone can't accidentally push issues to the wrong repository.

Limitations

  • Requires the GitHub CLI (gh) authenticated, and works best with the gh-sub-issue extension installed for true parent/child issue linking — without it, tasks become flat labeled issues instead of GitHub sub-issues
  • Built around git worktrees for parallel execution — teams uncomfortable with worktrees will need to adapt the Execute phase or run tasks sequentially instead
  • Designed for engineering delivery specifically (PRD → code), not general project management — non-technical PM workflows should look elsewhere on this site
  • The 10-task epic guideline is a default, not a hard rule — very large features genuinely need more, but the workflow nudges toward splitting rather than growing a single epic indefinitely

$Related Playbooks

Project Management

Trello Board Automation

Automate Trello board management, card workflows, power-ups, and team collaboration

10 minutes
Advanced
Project Management

Weekly Project Review

Automate comprehensive weekly project summaries by synthesizing WhatsApp, email, and meeting transcript data into a living dashboard and detailed activity log.

30 minutes
Advanced
Project Management

Token Launch Checklist

Complete token launch operations plan - 21-day timeline, 7 checklists, top 10 failure modes, and emergency actions.

10 minutes
Advanced
Project Management

Agile Product Owner

Generate user stories with acceptance criteria, plan sprints, groom backlogs, track velocity, and prepare stakeholder demos using agile best practices.

10 minutes
Intermediate
Project Management

Scrum Master Coach

Facilitate sprint ceremonies, coach agile practices, run effective retrospectives, remove impediments, track team health metrics, and generate ceremony templates.

10 minutes
Intermediate
Project Management

Asana Project Automation

Automate Asana project management workflows, task tracking, team collaboration, and reporting

10 minutes
Advanced
Project Management

ClickUp Automation

Automate ClickUp workspace management, task workflows, time tracking, and team productivity

10 minutes
Advanced
Project Management

Jira Automation Workflows

Automate Jira project management workflows, sprint planning, issue tracking, and reporting

10 minutes
Advanced
Project Management

Linear Project Automation

Automate Linear issue tracking, cycle planning, roadmap management, and engineering workflows

10 minutes
Advanced
Project Management

Monday.com Automation

Automate Monday.com workflows, board management, team collaboration, and cross-board integrations

10 minutes
Advanced
Project Management

Team Capacity & Resource Planner

Analyze team workload, identify capacity gaps, and model resource allocation scenarios for staffing decisions.

15 minutes
Intermediate
Project Management

Product Feature Prioritization

Prioritize product features using RICE, weighted scoring, and value-vs-effort frameworks with stakeholder alignment.

10 minutes
Intermediate

Browse all Project Management playbooks →