Power Doc Invoker
All-in-one command covering generate, comprehensive, documentation, code. Includes structured workflows, validation checks, and reusable patterns for documentation.
Power Doc Invoker
Execute documentation generation tasks with intelligent template selection and format optimization.
When to Use This Command
Run this command when you need to:
- Generate multiple documentation artifacts (README, API docs, changelogs) from a single invocation
- Produce formatted documentation from code comments, type definitions, and inline annotations
- Create documentation in multiple output formats (Markdown, HTML, PDF) simultaneously
Consider alternatives when:
- You need to write a single README file with custom narrative content
- Your project uses a dedicated documentation framework like Docusaurus or MkDocs
Quick Start
Configuration
name: power-doc-invoker type: command category: documentation
Example Invocation
claude command:run power-doc-invoker --scope full --format markdown
Example Output
Project Scan: src/ (247 files, 38,400 LOC)
Documentation Sources:
JSDoc comments: 892 found
TypeScript interfaces: 134 exported
README sections: 6 existing
Generated Documentation:
[+] docs/api-reference.md (134 endpoints documented)
[+] docs/architecture.md (system overview with diagrams)
[+] docs/configuration.md (28 environment variables)
[+] docs/changelog.md (last 20 releases from git tags)
[+] README.md (updated: installation, usage, API sections)
Coverage: 87% of public APIs documented
Missing docs: 18 exported functions without JSDoc comments
Core Concepts
Documentation Generation Overview
| Aspect | Details |
|---|---|
| Source Extraction | Parses JSDoc, TSDoc, docstrings, and inline comments from source |
| Type Introspection | Reads TypeScript interfaces and type aliases for API shape docs |
| Git History Mining | Extracts changelog entries from conventional commit messages |
| Template System | Selects output templates based on project type and conventions |
| Multi-Format Output | Generates Markdown, HTML, and structured JSON simultaneously |
Documentation Pipeline Workflow
Source Code
|
v
+------------------+
| Extract Comments |---> JSDoc, TSDoc, docstrings
+------------------+
|
v
+------------------+
| Parse Types |---> Interfaces, schemas, models
+------------------+
|
v
+------------------+
| Mine Git History |---> Commits, tags, releases
+------------------+
|
v
+------------------+
| Apply Templates |---> Format and structure
+------------------+
|
v
+------------------+
| Output Files |---> MD, HTML, JSON artifacts
+------------------+
Configuration
| Parameter | Type | Default | Description |
|---|---|---|---|
| scope | string | full | Documentation scope: full, api-only, changelog-only, readme-only |
| format | string | markdown | Output format: markdown, html, json, or all |
| output_dir | string | docs/ | Directory to write generated documentation files |
| include_private | boolean | false | Include private and internal APIs in documentation |
| changelog_depth | integer | 20 | Number of releases to include in changelog generation |
Best Practices
-
Document Public APIs First - Focus generation on exported functions, classes, and interfaces that other developers consume. Internal implementation details change frequently and documenting them creates maintenance burden.
-
Use Conventional Commits for Changelogs - The changelog generator relies on structured commit messages. Without conventional commit prefixes (feat, fix, refactor), the generated changelog will be a flat list of uninformative messages.
-
Review Generated Content Before Publishing - Auto-generated documentation is a starting point, not a finished product. Review for accuracy, add context that cannot be inferred from code, and remove redundant sections.
-
Keep Documentation Close to Code - Store generated docs in the repository alongside the source code. Documentation hosted separately from the code it describes drifts out of sync within weeks.
-
Track Documentation Coverage - Use the coverage report to identify undocumented public APIs. Set a team standard (e.g., 90% coverage) and enforce it in CI to prevent documentation debt from accumulating.
Common Issues
-
JSDoc Comments Not Parsed - Comments use the wrong format (// instead of /** */). Ensure documentation comments follow the JSDoc or TSDoc syntax expected by the parser.
-
Changelog Contains Merge Commits - The changelog is cluttered with "Merge branch" entries. Filter out merge commits by using --no-merges in git log or configuring the changelog generator to exclude them.
-
Generated Docs Overwrite Manual Edits - Running the command again replaces hand-written sections. Use marker comments to separate generated content from manual content so only the generated sections are replaced.
Reviews
No reviews yet. Be the first to review this template!
Similar Templates
Git Commit Message Generator
Generates well-structured conventional commit messages by analyzing staged changes. Follows Conventional Commits spec with scope detection.
React Component Scaffolder
Scaffolds a complete React component with TypeScript types, Tailwind styles, Storybook stories, and unit tests. Follows project conventions automatically.
CI/CD Pipeline Generator
Generates GitHub Actions workflows for CI/CD including linting, testing, building, and deploying. Detects project stack automatically.