codebase-architect

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.

5étoiles
0forks
Mis à jour 1/22/2026
SKILL.md
readonlyread-only
name
codebase-architect
description

"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, or verify.
  • 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:

  1. Classes: grep -rn "^class \|^abstract class \|^trait \|^interface "
  2. Functions: grep -rn "^function [a-z_]"
  3. Action hooks: grep -rohn "do_action\s*(\s*['\"][^'\"]*['\"]"
  4. Filter hooks: grep -rohn "apply_filters\s*(\s*['\"][^'\"]*['\"]"
  5. REST endpoints: grep -rn "register_rest_route"
  6. AJAX handlers: grep -rn "wp_ajax_"
  7. JavaScript files: find -name "*.js"
  8. DB tables: grep -rn "CREATE TABLE"
  9. Templates: find -name "*.php" -path "*/templates/*"
  10. Blocks: find -name "block.json"
  11. Shortcodes: grep -rn "add_shortcode"
  12. Widgets: grep -rn "extends WP_Widget"
  13. CPT/Taxonomies: grep -rn "register_post_type\|register_taxonomy"
  14. Admin pages: grep -rn "add_menu_page\|add_submenu_page"
  15. Cron jobs: grep -rn "wp_schedule_event"
  16. 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:

  1. Read from manifest
  2. Document each item
  3. Update manifest status: pendingdocumented
  4. Update PROGRESS.md

Read:

  • references/documentation-agents.md

3) Self-verification loop

After documentation completes:

  1. Count items with status:pending (gaps)
  2. Count items with status:documented (done)
  3. If coverage < 100%, trigger gap filling
  4. Run cross-reference check

Read:

  • references/verification-loop.md

4) Gap filling (automatic)

For any gaps found:

  1. Read source code for item
  2. Generate documentation
  3. Update manifest
  4. 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 architectural scope
  • 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

update-docs

137Kdev-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 avatarvercel
Obtenir
docstring

docstring

97Kdev-docs

Write docstrings for PyTorch functions and methods following PyTorch conventions. Use when writing or updating docstrings in PyTorch code.

pytorch avatarpytorch
Obtenir
docs-writer

docs-writer

94Kdev-docs

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 avatargoogle-gemini
Obtenir
write-concept

write-concept

66Kdev-docs

Write or review JavaScript concept documentation pages for the 33 JavaScript Concepts project, following strict structure and quality guidelines

leonardomso avatarleonardomso
Obtenir
resource-curator

resource-curator

66Kdev-docs

Find, evaluate, and maintain high-quality external resources for JavaScript concept documentation, including auditing for broken and outdated links

leonardomso avatarleonardomso
Obtenir
doc-coauthoring

doc-coauthoring

47Kdev-docs

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 avataranthropics
Obtenir