Index of every page on this site: llms.txt
All skills
aj-geddes avatar

/bmad-document-project

@27dca0e
Run it yourself

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.

Use this Skill: https://skilld.dev/gh/aj-geddes/claude-code-bmad-skills/bmad-document-project

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

templatesproject-documentation.template.md

≈1.6k tokens on demand. Your agent reads this file only when SKILL.md points to it.

Project Documentation — {{PROJECT_NAME}}

BROWNFIELD ground truth. Generated by the BMAD bmad-document-project skill via READ-ONLY codebase scan. This document feeds BMAD planning skills (PRD, architecture, tech-spec, project-context) so they start from reality. Do not hand-edit without noting changes; run an Update scan to keep it current.

  • Scan date: {{SCAN_DATE}}
  • Codebase root: {{CODEBASE_ROOT}}
  • BMAD track (if initialized): {{BMAD_TRACK}}

1. Repository Structure

Layout

{{DIRECTORY_TREE}}

Depth-3 snapshot; node_modules, .git, dist, build, and cache directories excluded.

Monorepo / Workspace Signals

{{MONOREPO_SIGNALS}}

<!-- not detected | mono-repo with packages/ | turborepo | nx workspace | lerna | pnpm workspaces | go workspace | ... -->

Documentation Roots

{{DOC_ROOTS}}

<!-- paths to README, docs/, wiki/, ADR directories -->

2. Stack and Toolchain

Primary Language(s) and Runtime

Language Version Evidence File
{{LANG_1}} {{LANG_1_VERSION}} {{LANG_1_EVIDENCE}}
{{LANG_2}} {{LANG_2_VERSION}} {{LANG_2_EVIDENCE}}

Framework(s)

Framework Version Role
{{FRAMEWORK_1}} {{FRAMEWORK_1_VERSION}} {{FRAMEWORK_1_ROLE}}
{{FRAMEWORK_2}} {{FRAMEWORK_2_VERSION}} {{FRAMEWORK_2_ROLE}}

Key Dependencies

Runtime:

{{RUNTIME_DEPS}}

<!-- bullet list: library name, version, purpose -->

Build / Dev toolchain:

{{BUILD_DEPS}}

<!-- package manager, bundler, transpiler, linter, formatter -->

Test Framework(s)

{{TEST_FRAMEWORKS}}

<!-- name and version only — these are NOTED, not executed -->

Container / Infrastructure

{{INFRA_SUMMARY}}

<!-- Dockerfile base image, docker-compose services, IaC provider, CI/CD platform -->

3. Entry Points and Key Flows

Application Bootstrap

Entry File Role
{{ENTRY_1}} {{ENTRY_1_ROLE}}
{{ENTRY_2}} {{ENTRY_2_ROLE}}

Primary Routing Layer

{{ROUTING_SUMMARY}}

<!-- Router name, route file locations, top-level route groups detected -->

Authentication / Middleware Chain

{{AUTH_MIDDLEWARE}}

<!-- Middleware names in order (e.g. cors → auth → rateLimit → router). Names only. -->

Background Workers / Queues

{{BACKGROUND_WORKERS}}

<!-- Job names, scheduler type, queue consumers detected. Write "None detected." if absent. -->

4. Module and Domain Structure

Layer Breakdown

Layer / Module Path(s) Inferred Responsibility
{{MODULE_1}} {{MODULE_1_PATH}} {{MODULE_1_RESP}}
{{MODULE_2}} {{MODULE_2_PATH}} {{MODULE_2_RESP}}
{{MODULE_3}} {{MODULE_3_PATH}} {{MODULE_3_RESP}}
{{MODULE_4}} {{MODULE_4_PATH}} {{MODULE_4_RESP}}
{{MODULE_5}} {{MODULE_5_PATH}} {{MODULE_5_RESP}}

Cross-Cutting Utilities

{{SHARED_UTILS}}

<!-- paths and inferred roles for shared helpers, constants, types, middleware -->

Notable Domain Concepts (from naming)

{{DOMAIN_CONCEPTS}}

<!-- Entity names, aggregate names, or domain language detected in file/class names -->

5. Conventions and Patterns

Naming Conventions

Artifact Convention Example
Files {{FILE_NAMING}} {{FILE_NAMING_EX}}
Classes / Types {{CLASS_NAMING}} {{CLASS_NAMING_EX}}
Functions {{FN_NAMING}} {{FN_NAMING_EX}}
Constants {{CONST_NAMING}} {{CONST_NAMING_EX}}

Module Resolution

{{MODULE_RESOLUTION}}

<!-- ESM import / CommonJS require / path aliases / barrel exports detected -->

Concurrency Model

{{CONCURRENCY_MODEL}}

<!-- async/await, Promises, goroutines, threads, none detected -->

Error Handling Style

{{ERROR_HANDLING}}

<!-- throw/catch, Result types, error middleware, panic/recover, custom error classes -->

Logging Approach

{{LOGGING}}

<!-- library name (winston, pino, zap, logrus, structlog …), log levels used, log targets -->

Configuration and Secrets

{{CONFIG_PATTERN}}

<!-- .env files, env vars, config library, secrets manager detected -->

Test File Location Convention

{{TEST_CONVENTION}}

<!-- __tests__/, *.test.ts, *_test.go, spec/ — location and naming pattern -->

6. Integration Points

External HTTP APIs

Service / Domain Direction Notes
{{EXT_API_1}} {{EXT_API_1_DIR}} {{EXT_API_1_NOTES}}
{{EXT_API_2}} {{EXT_API_2_DIR}} {{EXT_API_2_NOTES}}

Direction: inbound (called by external parties) | outbound (we call them) | both.

Database(s)

Database Type ORM / Driver Connection Pattern
{{DB_1}} {{DB_1_TYPE}} {{DB_1_ORM}} {{DB_1_CONN}}
{{DB_2}} {{DB_2_TYPE}} {{DB_2_ORM}} {{DB_2_CONN}}

Message Queues / Event Buses

{{QUEUES}}

<!-- Queue type (Kafka, SQS, Redis Streams, RabbitMQ…), topic/queue names detected, pub/sub roles. Write "None detected." if absent. -->

Object / File Storage

{{OBJECT_STORAGE}}

<!-- Provider, bucket/container naming pattern, SDK used. Write "None detected." if absent. -->

Third-Party Services

Service Category SDK / Client
{{SVC_1}} {{SVC_1_CAT}} {{SVC_1_SDK}}
{{SVC_2}} {{SVC_2_CAT}} {{SVC_2_SDK}}

Categories: auth provider, payment, email/SMS, monitoring, analytics, CDN, search.


7. Planning Notes

Observations from the scan that are relevant to planning but require a decision. These are NOT implementation tasks — they are inputs for the PRD and architecture skills.

{{PLANNING_NOTES}}

<!-- Examples: - "No migrations folder detected; schema management approach unknown — clarify before architecture." - "Three separate HTTP clients used for external APIs; consolidation may be worth an ADR." - "Auth middleware detected but no role/permission model visible at this scan depth." -->

8. Open Questions

Questions the scan raised that cannot be answered from static analysis. Resolve these before starting PRD or architecture work.

  1. {{OPEN_Q_1}}
  2. {{OPEN_Q_2}}
  3. {{OPEN_Q_3}}

9. Document History

Date Author Change
{{SCAN_DATE}} BMAD bmad-document-project Initial scan

BMAD Planning & Orchestrator · Document Project · tracks bmad-document-project from the BMAD Method by the BMAD Code Organization (https://github.com/bmad-code-org/BMAD-METHOD)

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

1 warning5mo3 checks · Risk MEDIUM
  • Gen Agent Trust Hub5mo

    This skill is a documentation agent designed to perform a read-only scan of a codebase and generate a project summary. It accesses configuration and dependency files to identify the tech stack and integration points. While it includes instructions to avoid capturing secrets, the access to sensitive files like .env and configuration files poses a medium risk. It also has a surface for indirect prompt injection from codebase content.

  • Socket5mo

    No alerts

  • Snyk5mo

    Risk: LOW · No issues

Signed by skilld at 27dca0e. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 months ago.

Steadyupdated 5 months ago
What it can do
Reads files Edits files
All 5 allowed tools
ReadGlobGrepWriteTodoWrite

README badge

README badge for aj-geddes/claude-code-bmad-skills/bmad-document-project