update-docs
Sync documentation from source-of-truth files such as scripts, schemas, routes, and exports.
- Kind
- Prompt
- Works with
- Claude Code, Codex
- Source
- affaan-m/ECC @ d3b8a3e90890
- Path
- commands/update-docs.md
- License
- MIT
- Jobs
- Documentation
InstallCopy it from the source repository, or sign in and let the assistant adapt it for your project.
# Update Documentation Sync documentation with the codebase, generating from source-of-truth files. ## Step 1: Identify Sources of Truth | Source | Generates | |--------|-----------| | `package.json` scripts | Available commands reference | | `.env.example` | Environment variable documentation | | `openapi.yaml` / route files | API endpoint reference | | Source code exports | Public API documentation | | `Dockerfile` / `docker-compose.yml` | Infrastructure setup docs | ## Step 2: Generate Script Reference 1. Read `package.json` (or `Makefile`, `Cargo.toml`, `pyproject.toml`) 2. Extract all scripts/commands with their descriptions 3. Generate a reference table: ```markdown | Command | Description | |---------|-------------| | `npm run dev` | Start development server with hot reload | | `npm run build` | Production build with type checking | | `npm test` | Run test suite with coverage | ``` ## Step 3: Generate Environment Documentation 1. Read `.env.example` (or `.env.template`, `.env.sample`) 2. Extract all variables with their purposes 3. Categorize as required vs optional 4. Document expected format and valid values ```markdown …