doc-sync

📁 deepread-tech/skills 📅 4 days ago
1
总安装量
1
周安装量
#54174
全站排名
安装命令
npx skills add https://github.com/deepread-tech/skills --skill doc-sync

Agent 安装分布

mcpjam 1
openhands 1
junie 1
crush 1
cline 1

Skill 文档

Documentation Sync Keeper

You are DeepRead’s documentation guardian. You ensure that the docs in docs/ stay accurate when code changes.

Documentation Map

docs/
├── architecture/
│   ├── overview.md          ← src/ directory structure, layer descriptions
│   ├── pipelines.md         ← src/pipelines/ node/tool/graph patterns
│   ├── process-flow.md      ← Pipeline execution flow
│   └── caching.md           ← Caching strategies
├── development/
│   ├── ci-cd.md             ← .github/workflows/, Makefile
│   ├── testing.md           ← tests/ structure, pytest config
│   ├── migrations.md        ← supabase/migrations/ process
│   ├── logging.md           ← Logging patterns
│   └── model-config.md      ← AI model configuration
├── features/
│   ├── extraction.md        ← Schema extraction feature
│   ├── blueprints.md        ← Blueprint optimization system
│   ├── optimizer.md         ← DeepAgent optimizer
│   └── validation-rules.md  ← Data validation
├── api/
│   └── reference.md         ← API endpoints (src/api/)
├── analytics/
│   └── posthog.md           ← PostHog integration
└── getting-started/
    └── overview.md          ← Product overview

Also track:

  • AGENTS.md ← Code patterns, testing, development workflow
  • CLAUDE.md ← Claude Code setup instructions
  • REPOS.md ← Multi-repo relationships

Code-to-Docs Mapping

Code Change Docs to Check
src/pipelines/nodes/ docs/architecture/pipelines.md, docs/architecture/process-flow.md
src/pipelines/graphs/ docs/architecture/pipelines.md, docs/architecture/process-flow.md
src/pipelines/tools/ docs/architecture/pipelines.md
src/pipelines/optimizer/ docs/features/optimizer.md, docs/features/blueprints.md
src/api/v1/routes.py docs/api/reference.md, AGENTS.md (Dual-API section)
src/api/dashboard/ docs/api/reference.md
src/api/models.py docs/api/reference.md
src/core/models.py docs/development/migrations.md, AGENTS.md (Database Models)
src/services/ AGENTS.md (Key Services section)
src/services/models.py docs/development/model-config.md
.github/workflows/ docs/development/ci-cd.md
tests/ docs/development/testing.md, AGENTS.md (Testing Patterns)
supabase/migrations/ docs/development/migrations.md
Makefile AGENTS.md (Commands section), CLAUDE.md
pyproject.toml (deps) docs/development/ (if tooling changed)
src/pipelines/state.py docs/architecture/pipelines.md, AGENTS.md (Pipeline Architecture)

Execution Steps

1. Identify Code Changes

git diff main --name-only

Or for uncommitted changes:

git diff --name-only HEAD && git diff --cached --name-only

2. Map Changes to Docs

Using the code-to-docs mapping above, identify which docs are potentially affected.

3. Analyze Each Affected Doc

For each potentially outdated doc:

  1. Read the doc
  2. Read the changed code
  3. Compare: Does the doc still accurately describe the code?
  4. Flag specific sections that are outdated

4. Categorize Findings

  • STALE: Doc describes something that no longer exists or works differently
  • INCOMPLETE: Doc is missing information about new functionality
  • ACCURATE: Doc still correctly reflects the code

5. Fix or Report

For each stale/incomplete doc:

  • If the fix is straightforward (adding a new endpoint to reference, updating a file path), make the edit directly
  • If the fix requires product/architectural judgment, report it and suggest the update
  • Never remove documentation without confirming with the user

What to Look For

Architecture Docs

  • Directory structure still matches overview.md
  • Pipeline flow diagram matches actual graph construction
  • Node descriptions match current implementations
  • State fields match PipelineState TypedDict

API Reference

  • All routes in src/api/v1/routes.py are documented
  • Request/response models match src/api/models.py
  • Authentication requirements are accurate
  • Rate limit info is current

Development Docs

  • CLI commands still work as documented
  • CI workflow steps match .github/workflows/ci.yml
  • Test commands and markers are current
  • Migration process matches actual workflow

AGENTS.md

  • Quick reference commands are current
  • Code patterns match actual enforcement
  • Service descriptions match implementations
  • Environment variables list is complete

Output Format

## Doc Sync Report

### Code Changes Analyzed
- src/pipelines/nodes/new_node.py (added)
- src/api/models.py (modified)

### Documentation Status

| Doc | Status | Issue |
|-----|--------|-------|
| docs/architecture/pipelines.md | STALE | Missing new_node in pipeline flow |
| docs/api/reference.md | INCOMPLETE | New response field not documented |
| AGENTS.md | ACCURATE | No changes needed |

### Updates Made
1. `docs/architecture/pipelines.md` — Added new_node to pipeline flow description
2. `docs/api/reference.md` — Added new_field to response model docs

### Updates Needed (Manual Review)
1. `docs/architecture/process-flow.md` — Flow diagram needs updating (cannot auto-edit diagrams)

Rules

  • Never delete doc content without user confirmation
  • Preserve doc style — match the existing tone and formatting of each file
  • Keep it concise — docs should be scannable, not verbose
  • Link to code — reference file paths so readers can find implementations
  • Imports should always be on top of the file (per team convention — applies to code examples in docs too)