Skip to content
Automation
Command

/document-creator

Generate DEVGUIDE.md architectural documentation using LSP (project)

From plugin
essentials-claude-code
9125 skills8 agents25 commands
Install
$ npx -y skills add GantisStorm/essentials-claude-code --agent claude-code

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/document-creator

Context preview

What this command does when you run it.

Generate DEVGUIDE.md architectural documentation using LSP (project)

Command definition

document-creator.md
allowed-tools: Task, Glob, Read
argument-hint: "<dir1> [dir2] ... [dirN]"
description: Generate DEVGUIDE.md architectural documentation using LSP (project)
context: fork
model: opus

Document Creator

Generate hierarchical architectural documentation (DEVGUIDE.md) using Claude Code's built-in LSP tools. Supports multiple directories with parallel agent execution.

Built-in LSP Operations

  • `documentSymbol` — Extract symbols from files
  • `findReferences` — Map dependencies
  • `goToDefinition` — Detailed symbol analysis

Arguments

Directory paths to document (one agent per directory):

  • Single directory: `/document-creator src/services/`
  • Multiple directories: `/document-creator src/services src/components src/lib`
  • No argument: analyzes current directory (`.`)

Instructions

Step 1: Parse Input

Parse `$ARGUMENTS` to extract directory list:

  • Split arguments by spaces
  • If empty → use current directory (`.`)
  • Validate each path exists as a directory

Step 2: Check for Rules

Check if `.claude/rules` directory exists at project root:

Use Glob(".claude/rules/*.md") to find rules files.

If rules exist:
- Read each rules file to understand frontmatter paths
- Pass relevant rules info to agents

If no rules exist:
- Note this for agents to create rules files when missing

Step 3: Determine Output Paths

For each directory:

  • If no DEVGUIDE.md exists → `<target-dir>/DEVGUIDE.md`
  • If exists → `<target-dir>/DEVGUIDE_2.md` (increment until unused)

Step 4: Launch Agents

For EACH directory, launch background agent:

Generate DEVGUIDE: <directory-path>
Output: <determined path>
Rules: <exists/not found>

**REQUIRED Task tool parameters:**

subagent_type: "essentials:document-creator-default"
run_in_background: true
prompt: "Generate DEVGUIDE: <dir>\nOutput: <path>\nRules: <status>"

**Launch ALL agents in a single message for parallel execution.** Output a status message like "Generating N DEVGUIDE files..." and **end your turn**. The system wakes you when agents finish.

Step 5: Report Results

## DEVGUIDE Documentation Created (LSP)

| Directory | Output | Status |
|-----------|--------|--------|
| [dir1] | [output path] | CREATED |
| [dir2] | [output path] | CREATED |

Rules Status: [Found N rules / No rules folder found]

Next Steps:
1. Review generated documentation
2. Commit the DEVGUIDE files
3. [If no rules] Agent created .claude/rules/ file automatically

Error Handling

| Scenario | Action | |----------|--------| | Path not found | Report error, continue with other paths | | Path is file not directory | Report error, continue with other paths | | Empty directory | Generate minimal guide | | Agent fails | Report error, suggest retry |

Example Usage

/document-creator
/document-creator src/services/
/document-creator src/services src/components src/lib
/document-creator backend/src frontend/src
Read more
Ships withessentials-claude-code

Loops, swarms, and teams powered by Claude Code's built-in Task System. Loop, swarm, and team are three execution modes. Loop runs sequentially. Swarm runs parallel subagents. Team spawns full Claude Code instances with shared contracts via Agent Teams.

Get the whole plugin, auto-invoked
Stats
91
Stars
1
Views
9
Forks
Maintained
Maintenance
Unlicense
License
5mo ago
Last commit
7mo ago
Created

Repo: GantisStorm/essentials-claude-code