Synchronize knowledge base documentation with current codebase implementation. Performs full, incremental, or targeted audits of source code and updates code maps, PRDs, patterns, SOPs, and user-facing docs to match reality. Use when: - After major refactors - Periodic maintenance (monthly) - Before starting new phase of work - When docs feel stale - User says "update kb", "sync docs", "audit docs"
Synchronizes knowledge base docs with current codebase after refactors or when docs feel stale. Performs full, incremental, or targeted audits to update code maps, PRDs, patterns, and SOPs to match reality.
/plugin marketplace add jayprimer/pmc-marketplace/plugin install jayprimer-pmc-plugins-pmc@jayprimer/pmc-marketplaceThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Synchronize knowledge base documentation with current codebase implementation.
ALWAYS run /pmc:kb first to understand KB structure and document formats.
| Type | Scope | When to Use |
|---|---|---|
| Full | Read all source files, create/update all code maps | First time, major version, annual |
| Incremental | Compare git diff since last anchor, update affected docs | After feature work, monthly |
| Targeted | Focus on specific area (e.g., just CLI or just dashboard) | After focused changes |
git rev-parse HEAD
git log -1 --format="%H %s (%ai)"
Create audit notes file: .pmc/docs/6-references/audit-{date}.md
# Code Audit Notes - {date}
**Anchor Commit:** `{hash}` - "{message}" ({date})
**Status:** In Progress
## Files Read
(track as you go)
## Features Discovered
(update incrementally)
Decision: Always record anchor for future incremental audits.
Glob: src/**/*.py (or appropriate pattern for your codebase)
Group by area (example for Python):
Critical: For full audit, read every file. Do not sample or infer.
Read in parallel where possible. Update audit notes incrementally:
### {Area} ({n}/{total} read)
| File | Lines | Features Identified |
|------|-------|---------------------|
| file.py | 123 | Feature1, Feature2 |
Decision: Reading is non-negotiable for full audit. Sampling leads to gaps.
After reading all files, create comprehensive feature list organized by functional area.
Glob: .pmc/docs/5-code-maps/*.md
For each feature area, decide:
Decision: Feature-based approach (not file-based) ensures user-relevant documentation.
For each code map:
Format: See kb/references/codemap-format.md
Mark audit as complete:
After code maps are current, verify other docs match reality.
Glob: .pmc/docs/1-prd/*.md
For each PRD:
Glob: .pmc/docs/4-patterns/*.md
For each pattern:
Status: open patterns - still valid?Status: resolved patterns - solution still applies?Status: open | resolvedSource: CLI help, README, code map features
personas.md - Who uses this?use-cases.md - Common scenariosfaq.md - Questions answered in sessionsGlob: .pmc/docs/2-sop/*.md
For each SOP:
git log --oneline {last-anchor}..HEAD
git diff --name-only {last-anchor}..HEAD -- src/
Focus on files that changed. Update affected code maps.
Update audit notes with new anchor commit.
6-references/ - permanent recordThis skill should be used when the user asks to "create a hookify rule", "write a hook rule", "configure hookify", "add a hookify rule", or needs guidance on hookify rule syntax and patterns.
Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.