Docs manager

From sequenzia/agent-alchemy · View interactive version

Docs manager is an AI agent skill from the GitHub repository sequenzia/agent-alchemy. Documentation management workflow for MkDocs sites and standalone markdown files — initialize, generate, update docs, and create change summaries.

How to use this skill

Skill file

Documentation Manager Workflow

Execute a structured 6-phase workflow for managing documentation. Supports two documentation formats (MkDocs sites and standalone markdown files) and three action types (generate, update, change summary).

Phase Overview

Execute these phases in order, completing all applicable phases:

  1. Interactive Discovery — Determine documentation type, format, and scope through user interaction
  2. Project Detection & Setup — Detect project context, conditionally scaffold MkDocs
  3. Codebase Analysis — Deep codebase exploration using the deep-analysis skill
  4. Documentation Planning — Translate analysis findings into a concrete plan for user approval
  5. Documentation Generation — Delegate to docs-writer to generate content
  6. Integration & Finalization — Write files, validate, present results

Phase 1: Interactive Discovery

Goal: Determine through user interaction what documentation to create and in what format.

Step 1 — Infer intent from inputs

Parse the user's input to pre-fill selections:

If the intent is clear, present a summary for quick confirmation before proceeding (skip to Step 4). If ambiguous, proceed to Step 2.

Step 2 — Q1: Documentation type

If the documentation type is ambiguous or needs confirmation, prompt the user:

What type of documentation would you like to create?

Options:

Store as DOC_TYPE = mkdocs | basic-markdown | change-summary.

Step 3 — Conditional follow-up questions

If DOC_TYPE = mkdocs:

Prompt the user — Existing project or new setup?

If existing: Prompt the user — What to do?

Store as ACTION.

If new: Prompt the user — Scope?

Store as MKDOCS_SCOPE. If custom, ask for desired pages (free text).

If DOC_TYPE = basic-markdown:

Prompt the user — Which files?

Store as MARKDOWN_FILES. If "Other" is selected, ask for custom file paths/descriptions.

If DOC_TYPE = change-summary:

Prompt the user — What range?

Follow up for specific range details (tag name, ref pair, etc.).

Step 4 — Confirm selections

Present a summary of all selections and prompt the user:

If the user wants to change, loop back to the relevant question. Then proceed to Phase 2.


Phase 2: Project Detection & Setup

Goal: Detect project context automatically, conditionally scaffold MkDocs.

Step 1 — Detect project metadata (all paths)

Step 2 — Check existing documentation (all paths)

Step 3 — MkDocs Initialization (only if `DOC_TYPE = mkdocs` AND `MKDOCS_MODE = new`)

  1. Use this MkDocs configuration template:

```yaml

site_name: PROJECT_NAME

site_description: PROJECT_DESCRIPTION

site_url: ""

repo_url: REPO_URL

repo_name: REPO_NAME

theme:

name: material

features:

palette:

primary: indigo

accent: indigo

toggle:

icon: material/brightness-7

name: Switch to dark mode

primary: indigo

accent: indigo

toggle:

icon: material/brightness-4

name: Switch to light mode

markdown_extensions:

custom_fences:

class: mermaid

format: !!python/name:pymdownx.superfences.fence_code_format

anchor_linenums: true

line_spans: __span

pygments_lang_guess: false

alternate_style: true

permalink: true

nav:

```

Field population:

  1. Fill template with detected metadata (prompt the user if incomplete)
  2. Generate mkdocs.yml, create docs/index.md and docs/getting-started.md
  3. Present scaffold for confirmation before writing

If MKDOCS_SCOPE = minimal (getting started only): write the scaffold files and skip to Phase 6.

Step 4 — Set action-specific context (for update/change-summary)

For update modes, determine the approach:

For change-summary, execute: git log and git diff --stat for the determined range.

Proceed to Phase 3.


Phase 3: Codebase Analysis

Goal: Deep codebase exploration using the deep-analysis skill.

Skip conditions:

Step 1 — Build documentation-focused analysis context

Construct a specific context string based on Phase 1 selections:

| Selection | Analysis Context |

|-----------|-----------------|

| MkDocs generate | "Documentation generation — find all public APIs, architecture, integration points, and existing documentation..." |

| MkDocs update | "Documentation update — identify changes to public APIs, outdated references, documentation gaps..." |

| Basic markdown README | "Project overview — understand purpose, architecture, setup, key features, configuration, and dependencies..." |

| Basic markdown ARCHITECTURE | "Architecture documentation — map system structure, components, data flow, design decisions, key dependencies..." |

| Basic markdown API docs | "API documentation — find all public functions, classes, methods, types, their signatures and usage patterns..." |

| Basic markdown CONTRIBUTING | "Contribution guidelines — find dev workflow, testing setup, code style rules, commit conventions, CI process..." |

| Multiple files | Combine relevant contexts from above |

Step 2 — Run deep-analysis

Refer to the deep-analysis skill (from the core-tools package) and follow its workflow. Pass the documentation-focused analysis context from Step 1.

Step 3 — Supplemental analysis for update with git-diff mode

After deep-analysis, additionally:

  1. Execute: git diff --name-only [base-ref] for changed files
  2. Search file contents in existing docs for references to changed files/functions
  3. Cross-reference with synthesis findings

For change-summary path (instead of deep-analysis)

  1. Execute: git log --oneline [range] and git diff --stat [range]
  2. Delegate to an exploration specialist to analyze the changed files:

```

Analysis context: Change summary for [range]

Focus area: These files changed in the specified range:

[list from git diff --stat]

For each significant change, identify:

Return a structured report of your findings.

```

Proceed to Phase 4.


Phase 4: Documentation Planning

Goal: Translate analysis findings into a concrete documentation plan.

Step 1 — Produce plan based on doc type

MkDocs:

Basic Markdown:

Change Summary:

Step 2 — User approval

Prompt the user:

Proceed to Phase 5.


Phase 5: Documentation Generation

Goal: Generate content using the docs-writer skill.

Step 1 — Load templates

Step 2 — Group by dependency

Step 3 — Delegate to docs-writer

Delegate to the docs-writer skill for each page/file. Launch independent pages/files in parallel, then sequential for dependent ones.

MkDocs prompt template:

Documentation task: [page type]
Target file: [docs/path/to/page.md]
Output format: MkDocs
Project: [project name] at [project root]

MkDocs site context:
- Theme: Material for MkDocs
- Extensions available: admonitions, code highlighting, tabbed content, Mermaid diagrams
- Diagram guidance: Use Mermaid for all diagrams with dark text on nodes for readability.
- Existing pages: [list]

Exploration findings: [relevant findings]
Existing page content: [current content or "New page"]

Generate the complete page content in MkDocs-flavored Markdown.

Basic Markdown prompt template:

Documentation task: [file type]
Target file: [path/to/file.md]
Output format: Basic Markdown
Project: [project name] at [project root]

File type guidance: [relevant template from markdown-file-templates.md]
Exploration findings: [relevant findings]
Existing file content: [current content or "New file"]

Generate the complete file content in standard GitHub-flavored Markdown.
Do NOT use MkDocs-specific extensions.
Diagram guidance: Use Mermaid for all diagrams with dark text on nodes. GitHub renders Mermaid natively.

Step 4 — Review generated content

Proceed to Phase 6.


Phase 6: Integration & Finalization

Goal: Write files, validate, present results.

Step 1 — Write files

MkDocs: Write pages under docs/, update mkdocs.yml nav.

Basic Markdown: Write files to target paths. For updates, modify existing files.

Change Summary: Present outputs inline, write files as applicable.

Step 2 — Validate

MkDocs: Verify all nav-referenced files exist. Check cross-references. Optionally run mkdocs build --strict.

Basic Markdown: Validate internal cross-references. Check referenced paths exist.

Step 3 — Present results

Summarize: files created/updated, navigation changes, validation warnings. For change-summary, present outputs inline.

Step 4 — Next steps

Prompt the user with relevant options:

MkDocs:

Basic Markdown:


Error Handling

If any phase fails:

  1. Explain what went wrong
  2. Offer retry/skip/abort options

Non-Git Projects

Basic Markdown on Non-Git Projects


Additional Resources


Integration Notes

This skill was converted from the dev-tools plugin package. It orchestrates documentation management across 6 phases. It depends on deep-analysis (from core-tools) for codebase exploration and delegates content generation to docs-writer. The MkDocs config template and change summary templates have been inlined. The markdown-file-templates reference remains as a separate file due to its size (316 lines).

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.