DO
Project Documentation
Documentation core v1.0.0
Project Documentation
Overview
Project documentation encompasses all written artifacts that enable developers, operators, and stakeholders to understand, use, and maintain a software project. It includes READMEs, architecture decision records (ADRs), runbooks, onboarding guides, and contribution guidelines. In the full-lifecycle pipeline, @documentation-writer generates all project documentation in Phase 12 by synthesizing artifacts from all preceding phases.
Key Concepts
Documentation Hierarchy
┌──────────────────────────────────────────────────────┐
│ Documentation Structure │
├──────────────────────────────────────────────────────┤
│ │
│ README.md → First thing anyone reads │
│ docs/ │
│ ├── getting-started.md → 5-minute quickstart │
│ ├── architecture.md → System design overview │
│ ├── api-guide.md → API usage with examples │
│ ├── deployment.md → Environment setup + deploy │
│ ├── runbook.md → Operational procedures │
│ ├── troubleshooting.md → Common issues + fixes │
│ └── adr/ → Architecture decisions │
│ ├── 001-use-postgresql.md │
│ ├── 002-event-driven-arch.md │
│ └── template.md │
│ CONTRIBUTING.md → How to contribute │
│ CHANGELOG.md → Version history │
└──────────────────────────────────────────────────────┘
README Template Sections
| Section | Purpose | Required |
|---|---|---|
| Title + Badges | Project name, CI status, coverage, license | ✅ |
| Overview | 1-2 sentence description | ✅ |
| Features | Key capabilities list | ✅ |
| Quick Start | Clone → install → run in 3 commands | ✅ |
| Architecture | High-level diagram + tech stack | ✅ |
| API Reference | Link to OpenAPI/AsyncAPI specs | Recommended |
| Configuration | Environment variables table | ✅ |
| Testing | How to run tests | ✅ |
| Deployment | Deploy instructions or link | Recommended |
| Contributing | Link to CONTRIBUTING.md | ✅ |
| License | License type | ✅ |
Architecture Decision Record (ADR) Format
# ADR-001: Use PostgreSQL as Primary Database
## Status
Accepted
## Context
We need a relational database that supports JSONB for flexible schema,
full-text search, and strong ACID compliance.
## Decision
Use PostgreSQL 16 with Flyway migrations.
## Consequences
- ✅ Strong ecosystem, JPA/Hibernate support
- ✅ JSONB, arrays, full-text search built-in
- ❌ Requires operational expertise for replication
- ❌ No auto-scaling (unlike DynamoDB)
## Alternatives Considered
| Option | Pros | Cons | Decision |
|--------|------|------|----------|
| PostgreSQL | Full-featured, JSONB | Operational overhead | ✅ Selected |
| MySQL | Widely known | Weaker JSONB support | ❌ |
| DynamoDB | Auto-scaling | No joins, vendor lock-in | ❌ |
Best Practices
- README is the front door — If it takes >2 minutes to understand the project, rewrite it
- Keep docs close to code —
docs/in the repo, not a separate wiki - Use ADRs for decisions — Record why not just what was decided
- Include a runbook — Operators need incident procedures, not just developer docs
- Document environment variables — Table with name, description, default, required columns
- Update docs with code — PRs that change behavior must update relevant docs
- Write for the audience — Developers, operators, and stakeholders need different content
- Use diagrams — Architecture diagrams (Mermaid/PlantUML) convey more than paragraphs
Code Examples
✅ Good: README with All Sections
# 🛒 Order Management Service



Order lifecycle management for the e-commerce platform. Handles order
creation, payment processing, fulfillment tracking, and notifications.
## Quick Start
\```bash
git clone https://github.com/org/order-service.git
cd order-service
docker compose up -d
./mvnw spring-boot:run
# API available at http://localhost:8080/swagger-ui.html
\```
## Architecture
\```mermaid
graph LR
A[React UI] --> B[API Gateway]
B --> C[Order Service]
C --> D[(PostgreSQL)]
C --> E[Kafka]
E --> F[Notification Service]
\```
## Configuration
| Variable | Description | Default | Required |
|----------|-------------|---------|----------|
| `DATABASE_URL` | PostgreSQL connection | `localhost:5432/orders` | Yes |
| `KAFKA_BROKERS` | Kafka bootstrap servers | `localhost:9092` | Yes |
| `LOG_LEVEL` | Application log level | `INFO` | No |
## Testing
\```bash
./mvnw test # Unit tests
./mvnw verify # Unit + Integration (requires Docker)
npm run test:e2e # E2E tests (requires running app)
\```
❌ Bad: Minimal/Missing Documentation
# MyApp
A project.
## Setup
Run it.
Anti-Patterns
- No README — Repository with no documentation at all
- Stale docs — README says “Java 11” but project uses Java 21
- Wiki syndrome — Documentation in separate wiki nobody maintains
- Wall of text — No headings, no formatting, no code examples
- Missing quickstart — 10-page setup guide before you can run the app
- No ADRs — “Why did we choose X?” is unanswerable 6 months later
Testing Strategies
- Doc link validation — CI job checks for broken links in markdown
- README rendering — Preview all markdown renders correctly on GitHub
- Doc freshness — Track last-modified dates; alert on stale docs (>6 months)
- Onboarding test — New developer follows docs to set up; report friction points