P

Power Doc Invoker

All-in-one command covering generate, comprehensive, documentation, code. Includes structured workflows, validation checks, and reusable patterns for documentation.

CommandClipticsdocumentationv1.0.0MIT
0 views0 copies

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

AspectDetails
Source ExtractionParses JSDoc, TSDoc, docstrings, and inline comments from source
Type IntrospectionReads TypeScript interfaces and type aliases for API shape docs
Git History MiningExtracts changelog entries from conventional commit messages
Template SystemSelects output templates based on project type and conventions
Multi-Format OutputGenerates 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

ParameterTypeDefaultDescription
scopestringfullDocumentation scope: full, api-only, changelog-only, readme-only
formatstringmarkdownOutput format: markdown, html, json, or all
output_dirstringdocs/Directory to write generated documentation files
include_privatebooleanfalseInclude private and internal APIs in documentation
changelog_depthinteger20Number of releases to include in changelog generation

Best Practices

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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

  1. JSDoc Comments Not Parsed - Comments use the wrong format (// instead of /** */). Ensure documentation comments follow the JSDoc or TSDoc syntax expected by the parser.

  2. 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.

  3. 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.

Community

Reviews

Write a review

No reviews yet. Be the first to review this template!

Similar Templates