
codebase-architect
Use when generating exhaustive architecture documentation for any WordPress plugin/theme with built-in self-checking, progress tracking, and verification loops. Produces comprehensive docs covering classes, functions, hooks, REST API, AJAX, JS, DB, templates, blocks, and more.
"Use when generating exhaustive architecture documentation for any WordPress plugin/theme with built-in self-checking, progress tracking, and verification loops. Produces comprehensive docs covering classes, functions, hooks, REST API, AJAX, JS, DB, templates, blocks, and more."
Codebase Architect
Generate exhaustive architecture documentation for any WordPress plugin/theme with built-in self-checking, progress tracking, and verification loops.
When to use
Use this skill when:
- Creating comprehensive architecture documentation for a plugin/theme
- Auditing what exists in a codebase (classes, functions, hooks, APIs)
- Verifying existing documentation completeness
- Onboarding to a new codebase and need a reference guide
Inputs required
- Path to the plugin or theme directory.
- Scope level:
architectural,hybrid,reference, orverify. - Output directory for documentation files.
Scope Parameter
| Scope | Coverage | Best For | Output Size |
|---|---|---|---|
architectural |
Conceptual 95%, Reference 15% | Large codebases (500+ files) | 2,000-4,000 lines |
hybrid |
Conceptual 95%, Reference 50% | Medium codebases (50-500 files) | 4,000-8,000 lines |
reference |
Conceptual 95%, Reference 90%+ | Small codebases (<50 files) | 8,000+ lines |
verify |
Verification only | Check existing docs | Report only |
Procedure
0) Initialize manifest
Create manifest directory and tracking files:
mkdir -p <output-dir>/manifest
Create manifest files for each category:
- classes.txt, functions.txt, hooks.txt
- rest-endpoints.txt, ajax-handlers.txt
- js-files.txt, db-tables.txt, templates.txt
- blocks.txt, shortcodes.txt, widgets.txt
- cpt-taxonomies.txt, admin-pages.txt
- cron-jobs.txt, cli-commands.txt
- PROGRESS.md (master tracker)
Read:
references/manifest-format.md
1) Run enumeration (parallel agents)
Launch 16 enumeration agents in parallel to populate manifests:
- Classes:
grep -rn "^class \|^abstract class \|^trait \|^interface " - Functions:
grep -rn "^function [a-z_]" - Action hooks:
grep -rohn "do_action\s*(\s*['\"][^'\"]*['\"]" - Filter hooks:
grep -rohn "apply_filters\s*(\s*['\"][^'\"]*['\"]" - REST endpoints:
grep -rn "register_rest_route" - AJAX handlers:
grep -rn "wp_ajax_" - JavaScript files:
find -name "*.js" - DB tables:
grep -rn "CREATE TABLE" - Templates:
find -name "*.php" -path "*/templates/*" - Blocks:
find -name "block.json" - Shortcodes:
grep -rn "add_shortcode" - Widgets:
grep -rn "extends WP_Widget" - CPT/Taxonomies:
grep -rn "register_post_type\|register_taxonomy" - Admin pages:
grep -rn "add_menu_page\|add_submenu_page" - Cron jobs:
grep -rn "wp_schedule_event" - CLI commands:
grep -rn "WP_CLI::add_command"
Read:
references/enumeration-commands.md
2) Document (with progress updates)
For each category, launch documentation agents that:
- Read from manifest
- Document each item
- Update manifest status:
pending→documented - Update PROGRESS.md
Read:
references/documentation-agents.md
3) Self-verification loop
After documentation completes:
- Count items with
status:pending(gaps) - Count items with
status:documented(done) - If coverage < 100%, trigger gap filling
- Run cross-reference check
Read:
references/verification-loop.md
4) Gap filling (automatic)
For any gaps found:
- Read source code for item
- Generate documentation
- Update manifest
- Trigger verification again
5) Final validation
When verification passes:
- Structure check (TOC, links, code examples)
- Completeness check (all categories at 100%)
- Quality check (each item has required fields)
- Generate FINAL_REPORT.md
Verification
Documentation is COMPLETE when:
- All 15 manifest categories at 100% coverage
- Verification loop passes without finding new gaps
- Cross-reference check passes
- Final validation checklist complete
- FINAL_REPORT.md generated
Failure modes / debugging
- Enumeration returns 0 items:
- Path doesn't exist, wrong grep pattern, vendor folder included
- Documentation incomplete after multiple passes:
- Check for status:error items in manifests
- Review Gap Log in PROGRESS.md
- Cross-reference failures:
- Stale references from renamed/moved files
Read:
references/debugging.md
Escalation
- For very large codebases (1000+ files), use
architecturalscope - If enumeration takes too long, exclude vendor/node_modules
- For manual review items, document what's known and mark as partial
Output Files
<output-dir>/
├── PLUGIN_ARCHITECTURE.md # Final documentation
├── manifest/
│ ├── PROGRESS.md # Progress tracker
│ ├── classes.txt
│ ├── functions.txt
│ └── ... (other manifests)
└── FINAL_REPORT.md # Validation report
You Might Also Like
Related Skills

update-docs
This skill should be used when the user asks to "update documentation for my changes", "check docs for this PR", "what docs need updating", "sync docs with code", "scaffold docs for this feature", "document this feature", "review docs completeness", "add docs for this change", "what documentation is affected", "docs impact", or mentions "docs/", "docs/01-app", "docs/02-pages", "MDX", "documentation update", "API reference", ".mdx files". Provides guided workflow for updating Next.js documentation based on code changes.
vercel
docstring
Write docstrings for PyTorch functions and methods following PyTorch conventions. Use when writing or updating docstrings in PyTorch code.
pytorch
docs-writer
Always use this skill when the task involves writing, reviewing, or editing files in the `/docs` directory or any `.md` files in the repository.
google-gemini
write-concept
Write or review JavaScript concept documentation pages for the 33 JavaScript Concepts project, following strict structure and quality guidelines
leonardomso
resource-curator
Find, evaluate, and maintain high-quality external resources for JavaScript concept documentation, including auditing for broken and outdated links
leonardomso
doc-coauthoring
Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks.
anthropics