bmad-planning-orchestrator/skills/bmad-document-project/SKILL.md
BROWNFIELD planning input. Scans an existing codebase READ-ONLY and writes project-documentation.md — ground truth for stack, structure, key flows, conventions, and integration points — so downstream BMAD planning skills start from reality. Does NOT modify code; produces only the doc artifact. Use when the user says: "document this codebase", "document the project", "document my app", "scan the existing code", "brownfield planning", "we have existing code, start planning", "map what's already built", "document current state", "capture the current architecture", "understand the existing system before planning", "write project-documentation.md", or before a PRD or architecture doc when the user already has code written. Three intents: Create (initial scan), Update (re-scan changed areas), Validate (check completeness). Plans only — reads code but never writes it, runs no tests, no linters, no build tools, no application code.
npx skillsauth add aj-geddes/claude-code-bmad-skills bmad-document-projectInstall 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.
BROWNFIELD entry point. When a project already has code, planning skills need
ground truth — not guesses about the stack or conventions. This skill performs a
systematic, READ-ONLY codebase scan and emits project-documentation.md, the
authoritative current-state snapshot that every downstream BMAD planning skill loads.
No code is written, modified, or executed. Allowed tools are Read, Glob, Grep, Write (for the output document only), and TodoWrite (to track scan progress).
bmad-output/project-documentation.md
(or the user-configured output folder — honor it)
Load bmad-output/project-context.md if it exists; merge any constraints already
recorded there rather than rediscovering them from scratch.
Ask which intent applies if ambiguous; never silently regenerate an existing document.
Use TodoWrite to track the six scan passes below. Complete every pass before writing the final document.
Pass 1 — Repository skeleton
Glob: **/* (depth ≤ 3, exclude node_modules, .git, dist, build, __pycache__, .venv)
Glob: *.md, *.txt, *.rst at root and docs/
Capture: directory tree shape, presence of monorepo markers (packages/,
apps/, libs/), top-level config files, documentation roots.
Pass 2 — Stack and toolchain
Read whichever of these exist (don't fail on missing files):
| File | What to extract |
|------|----------------|
| package.json / package-lock.json | runtime + dev deps, scripts |
| pyproject.toml / requirements*.txt / Pipfile | Python stack |
| go.mod | Go module + dependencies |
| Cargo.toml | Rust crate |
| pom.xml / build.gradle | JVM stack |
| Gemfile | Ruby stack |
| composer.json | PHP stack |
| *.csproj / *.sln | .NET stack |
| Dockerfile / docker-compose*.yml | container strategy |
| .github/workflows/*.yml / *.gitlab-ci.yml / Jenkinsfile | CI/CD chain |
| *.tf / *.bicep / *.yaml (in infra/) | IaC / cloud provider |
Record: primary language, frameworks, major libraries, runtime version pins, test frameworks (note them — do NOT run them), build tool, package manager.
Pass 3 — Entry points and key flows
Grep: "main\|entrypoint\|app\.listen\|createServer\|handler\|router\|routes"
Grep: "export default\|module\.exports\|@app\.route\|@Controller\|@RestController"
Read the top-level entry files surfaced (max 5–8 files; skim, don't exhaustively read).
Capture: how the app starts, primary routing layer, authentication/middleware chain (names only), background workers or queues detected.
Pass 4 — Module / domain structure
Read directory names and index.* / __init__.* files one level down from src/,
app/, lib/, or the equivalent.
Glob: src/**/index.{ts,js,py,go,rb}
Glob: app/**/__init__.py
Capture: module names and inferred responsibility, layer boundaries (controllers / services / repositories / models / utils), shared utilities.
Pass 5 — Conventions and patterns
Sample 3–5 representative files per layer (prefer recently modified if discernible from file names / path depth):
Grep: "class \|interface \|type \|enum " — naming style
Grep: "async \|await \|Promise\|goroutine\|concurrent" — concurrency pattern
Grep: "import \|require\|from " — module resolution style
Grep: "console\.log\|logger\.\|log\." — logging approach
Grep: "\.env\|process\.env\|os\.environ\|config\." — config/secrets pattern
Capture: naming conventions (casing style for files, classes, functions), error handling style, logging approach, config/secrets management, test file location convention (name only — no execution).
Pass 6 — Integration points
Grep: "http[s]\?://\|fetch(\|axios\.\|requests\.\|http\.Get\|RestTemplate"
Grep: "database\|db\.\|pool\.\|prisma\.\|mongoose\.\|sqlx\.\|gorm\."
Grep: "redis\|kafka\|rabbitmq\|sqs\|pubsub\|queue\|event"
Grep: "s3\.\|storage\.\|blob\.\|bucket"
Capture: external HTTP APIs called (domains/service names, not secrets), database type and ORM/driver, message queues or event buses, object storage, third-party services (payment, email, auth providers — names only).
Write the document
Fill ${CLAUDE_PLUGIN_ROOT}/skills/bmad-document-project/templates/project-documentation.template.md
→ bmad-output/project-documentation.md.
Use the Write tool. Leave sections with a <!-- not detected --> comment rather
than inventing content. Accuracy over completeness.
project-documentation.md.Do NOT regenerate the full document from scratch if only part has changed.
Read the existing project-documentation.md and verify:
Report a pass/fail checklist. Offer to fill gaps rather than silently editing.
This skill is READ-ONLY except for its single output document. It:
If a scan reveals something worth fixing, record it as a planning note in the document — do not fix it.
Once project-documentation.md is written, it becomes the brownfield input for:
project-context.md with the detected stack and constraints.State the recommended next step when the document is ready.
This analysis role aligns with Mary (Business Analyst) in the BMAD Method — start with what exists before prescribing what should change. The document is her field notes: precise, sourced, free of conjecture.
Part of the BMAD Planning & Orchestrator plugin — a Claude Code harness for the BMAD Method by the BMAD Code Organization (https://github.com/bmad-code-org/BMAD-METHOD). Implements the spirit of
bmad-document-project. All methodology credit belongs to the BMAD Code Organization.
testing
Solutioning-phase UX planning skill (optional; activate when the project has a UI). Produces TWO planning documents: DESIGN.md (the visual system — design tokens, color palette, typography, spacing, component specs, WCAG 2.1 AA contract) and EXPERIENCE.md (user journeys, flow diagrams, screen states, error/empty/loading handling). Use when the user says "design the UX", "create UX planning docs", "define the design system", "map the user flows", "UX for this feature", "wireframe the flows", "what are the user journeys", "accessibility design", "WCAG compliance", "design tokens", "responsive design plan", "mobile-first design", or "create DESIGN.md / EXPERIENCE.md". Runs after architecture is drafted and before stories are created. Supports Create / Update / Validate intents.
testing
Quick Flow lightweight technical specification for small-scope work (1-15 stories). Replaces the full PRD + architecture pair when scope is small and requirements are clear. Produces bmad-output/tech-spec.md as the single planning artifact before story creation. Use when the user says: "write a tech spec", "create a technical specification", "I need a tech spec for this feature", "quick spec", "small project spec", "we don't need a full PRD", "just a tech spec", "spec out this change", "document this feature". QUICK FLOW TRACK ONLY (1-15 stories). If scope grows beyond ~15 stories or involves multiple teams / external integrations at scale, stop and redirect to bmad-prd + bmad-architecture instead — those skills are built for that complexity. Supports three intents: Create (new spec), Update (revise an existing tech-spec.md), Validate (review a draft for completeness against BMAD criteria).
tools
Orchestration handoff bridge: emits and maintains sprint-status.yaml as the project's sequencing system-of-record. Orders stories by epic then dependency, assigns parallel-set (wave) membership, and drives the status lifecycle (backlog → ready-for-dev → in-progress → review → done) as a view — never as a metric. Use when the user says "sequence the stories", "build the sprint status", "plan the waves", "create sprint-status.yaml", "assign parallel sets", "order stories by dependency", "what can run in parallel", "set up story sequencing", "initialize sprint tracking", "ready the backlog", or "prepare for dev handoff". Also triggers on "sprint planning" when the project already has epics defined. SCOPE: SEQUENCING AND ORCHESTRATION ONLY. No velocity, no burndown, no committed points, no coverage metrics. Capacity is expressed as wave width (concurrent story count), not points. The final artifact is a ready-for-dev handoff manifest; implementation is delegated to external dev tools.
development
Distills ANY messy input — brain dump, transcript, long PRD, stakeholder notes, feature request, voice memo — into a tight five-field SPEC.md kernel that any downstream planning skill can consume. The five fields are: Problem, Capabilities, Constraints, Non-Goals, Success Metrics. Use when the user says "create a spec", "write a spec for", "distill this into a spec", "I have a brain dump", "turn this into something structured", "clean up these notes", "make a SPEC from", "I want to define the problem", "help me scope this", "summarize what we're building", "I have a PRD but need a kernel", "what are we actually solving?", or drops raw text/transcript and asks for structure. Also use when starting any new initiative and a clean shared definition is missing.