From bdk
Use when existing architecture documentation needs refreshing after code changes, when running periodic doc maintenance, or when user asks to "update docs", "refresh documentation", or "sync docs with code".
npx claudepluginhub broneq/bdk --plugin bdkThis skill uses the workspace's default tool permissions.
> Relies on BDK foundation (STARTUP_INSTRUCTIONS.md) for project context and MCP tool preference.
Mandates invoking relevant skills via tools before any response in coding sessions. Covers access, priorities, and adaptations for Claude Code, Copilot CLI, Gemini CLI.
Share bugs, ideas, or general feedback.
Relies on BDK foundation (STARTUP_INSTRUCTIONS.md) for project context and MCP tool preference.
Refresh existing architecture documentation by comparing it against current code, merging updates while preserving accurate manual prose. The result is uniform text — no changelog, no diff markers, no "updated on" annotations.
Read the documentation file at $ARGUMENTS and extract:
## headers into top-level sectionssrc/data_migrator/processors/loaders/xml/)### Class: patterns and code blocks image links → note the SVG pathSource: [...](*.dot) links → note the .dot source path```dot / ```graphviz blocks → note contentDo this in main context — no subagent needed. Use regex and string matching.
Fallback: If the doc lacks a clear file tree or module root, ask the user which code path the doc covers.
Step 2.1 — Discover Current State
mcp__serena__list_dir(relative_path="<module_root>", recursive=True)
mcp__serena__get_symbols_overview(relative_path="<key_files>")
Compare actual file list against the doc's file tree. Note added/removed/renamed files immediately.
Step 2.2 — Check Diagram References
For each diagram reference found in step 1:
.dot source file (from Source: [...](.dot) links or extracted .dot files)Include diagram findings alongside code findings for subagents.
Step 2.3 — Partition into Logical Blocks
Same rules as /bdk:explain-complex-code:
| Files Count | Subagent Count |
|---|---|
| 1-2 files | 1 subagent |
| 3-5 files | 1-2 subagents |
| 6-10 files | 2-3 subagents |
| 10+ files | 3-4 subagents |
Step 2.4 — Launch Comparison-Aware Subagents
CRITICAL: Launch all subagents in a SINGLE message with multiple Task tool calls.
Each subagent receives existing doc claims alongside files to explore:
Subagent Instructions Template:
Explore these files: [FILE_LIST]
The existing documentation claims:
[EXTRACTED_CLAIMS_PER_FILE]
The following diagrams reference these files:
[DIAGRAM_REFERENCES_FOR_THIS_BLOCK]
For EACH file, report:
1. What's ACCURATE in the existing docs
2. What's OUTDATED (changed signatures, renamed classes, different logic)
3. What's NEW (undocumented classes, methods, rules)
4. What's GONE (documented things that no longer exist)
For EACH referenced diagram, report:
1. Which nodes/edges still match the code
2. Which nodes/edges are stale (renamed, removed, restructured)
3. What new components should be added to the diagram
Also report: purpose, components, dependencies, key algorithms,
data structures, edge cases.
Format as:
## Block: [block name]
### Comparison Results:
- ACCURATE: [list]
- OUTDATED: [list with details of what changed]
- NEW: [list with details]
- GONE: [list]
### Diagram Results:
- [diagram name]: ACCURATE / OUTDATED (details) / MISSING new diagram needed
### Current State:
For each file:
#### File: [name]
- Purpose: [brief]
- Components: [list with descriptions]
- Dependencies: [list]
- Key Rules: [list]
- Special Cases: [list]
After subagents return, classify each section by content matching — no hardcoded section mapping.
Classification logic (generic, works with any template):
Present the update plan and ask for confirmation in a single AskUserQuestion call:
Use AskUserQuestion with a single question. Put the full update plan in the question text:
Update plan for [doc_path]:
KEEP: [list of accurate sections]
UPDATE: [list of outdated sections with brief reason]
ADD: [new content to add]
REMOVE: [orphaned references to clean up]
DIAGRAMS: [list of diagrams to update/add/keep with brief reason]
Approve this update plan?
Options: "Approve" / "Approve with changes" / "Cancel"
Only proceed to step 4 after user approves. If "Approve with changes", incorporate user feedback.
Reconstruct the document:
/bdk:explain-complex-code references.dot blocks / source files to reflect current code structure and Source: [...](.dot) references stay consistentThe final file reads as one uniform document. No markers indicating which parts were updated.
Prototype code rules (same as /bdk:explain-complex-code):
process(), transform(), calculate()Save to the same path as the input $ARGUMENTS.
After saving, invoke /bdk:graphviz-docs-compiler to extract .dot files and compile to SVG.
Use /bdk:explain-complex-code references for section structure when rewriting outdated sections. Do not load unless rewriting sections.
| Signal | Classification |
|---|---|
| Symbol changed/renamed | Section OUTDATED |
| File added/removed | File tree OUTDATED |
| New undocumented symbol | Content MISSING |
| Referenced symbol gone | Section OUTDATED |
| Diagram references stale symbols | Diagram OUTDATED |
| New subsystem without diagram | Diagram MISSING |
| No discrepancies | Section ACCURATE |
/bdk:graphviz-docs-compiler to compile diagrams to SVG