Specialist doc updater

From VenTheZone/pi-dots · View interactive version

Specialist doc updater is an AI agent skill from the GitHub repository VenTheZone/pi-dots. Documentation and codemap specialist keeping docs in sync with the actual codebase. Use when generating or updating architecture codemaps, refreshing READMEs after feature or API changes, validating doc links and examples, or auditing which files, endpoints, or dependencies the docs mention.

How to use this skill

Skill file

Specialist: Documentation & Codemap

Documentation specialist keeping codemaps and docs current with the real state of the code. Maintains accurate, up-to-date documentation generated from the source of truth — the code itself.

Workflow

  1. Map the repo — identify workspaces, entry points, frameworks, and module boundaries
  2. Analyze modules — extract exports, imports, routes, DB models, and queue/worker modules
  3. Generate codemaps — write architecture maps per area with freshness timestamps
  4. Extract docs from code — JSDoc, README sections, .env.example, API endpoint definitions
  5. Validate — verify files exist, links work, examples run, then commit

Codemap Generation

a) Identify all workspaces/packages
b) Map directory structure
c) Find entry points (apps/*, packages/*, services/*)
d) Detect framework patterns (Next.js, Node.js, etc.)

Per module: extract exports (public API), map imports, identify routes (API routes, pages), find DB models (Supabase, Prisma), locate queue/worker modules.

Store under:

docs/CODEMAPS/
├── INDEX.md              # Overview of all areas
├── frontend.md           # Frontend structure
├── backend.md            # Backend/API structure
├── database.md           # Database schema
├── integrations.md       # External services
└── workers.md            # Background jobs

Codemap Format

# [Area] Codemap

**Last Updated:** YYYY-MM-DD
**Entry Points:** list of main files

## Architecture

[ASCII diagram of component relationships]

## Key Modules

| Module | Purpose | Exports | Dependencies |
|--------|---------|---------|--------------|

## Data Flow

[How data flows through this area]

## External Dependencies

- package-name - Purpose, Version

## Related Areas

Links to other codemaps that interact with this area

Documentation Updates

Update docs when:

Minor bug fixes and cosmetic changes typically don't require doc updates.

# Verify referenced files exist
while read -r path; do [ -e "$path" ] || echo "MISSING: $path"; done < <(grep -oE '`[^`]+\.(ts|tsx|md|json)`' docs/ | tr -d '`')

# Check internal links resolve
grep -oE '\]\([^)]+\)' README.md docs/**/*.md | grep -v '^](http' | grep -v '^](#'

README Update Template

# Project Name

Brief description

## Setup

Installation

npm install

Environment variables

cp .env.example .env.local

Fill in: OPENAI_API_KEY, REDIS_URL, etc.

Development

npm run dev

Build

npm run build


## Architecture

See [docs/CODEMAPS/INDEX.md](docs/CODEMAPS/INDEX.md) for detailed architecture.

### Key Directories

- `src/app` - Next.js App Router pages and API routes
- `src/components` - Reusable React components
- `src/lib` - Utility libraries and clients

## Features

- [Feature 1] - Description
- [Feature 2] - Description

## Documentation

- [Setup Guide](docs/GUIDES/setup.md)
- [API Reference](docs/GUIDES/api.md)
- [Architecture](docs/CODEMAPS/INDEX.md)

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md)

Best Practices

  1. Single source of truth — generate from code, don't write from memory
  2. Freshness timestamps — always include last-updated date
  3. Token efficiency — keep codemaps under 500 lines each
  4. Clear structure — consistent markdown formatting
  5. Actionable — setup commands that actually work
  6. Linked — cross-reference related docs
  7. Version controlled — track doc changes in git

Quality Checklist

Remember: Documentation that doesn't match reality is worse than no documentation.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.