m16khb avatar

documentation-generation

Install

/plugin install documentation-generation@claude-integration

Run it inside Claude Code after adding the marketplace with /plugin marketplace add m16khb/claude-integration.

Contents

Discovered from source

Skills 1

Document Builder Templates

document-builder 에이전트가 사용하는 CLAUDE.md 생성 템플릿입니다.

ROOT CLAUDE.md Template

# CLAUDE.md

## 프로젝트 개요

**{project_name}**은(는) {short_description}입니다.

## 기술 스택

- **언어**: {language}
- **프레임워크**: {framework}
- **패턴**: {patterns}

## 프로젝트 구조

\`\`\`
{project_name}/
├── CLAUDE.md                    # 루트 오케스트레이터
├── agent-docs/                  # 루트 공통 문서
{structure_tree}
\`\`\`

## 주요 커맨드/에이전트

| 이름 | 설명 |
|------|------|
{main_items_table}

## 모듈별 컨텍스트

| 모듈 | CLAUDE.md | 설명 |
|------|-----------|------|
{modules_table}

## 상세 문서

- [agent-docs/architecture.md](agent-docs/architecture.md) - 아키텍처 가이드
{additional_docs}

MODULE CLAUDE.md Template

# {module_name}/ CLAUDE.md

## 모듈 개요

{module_description}

## 파일 구조

\`\`\`
{module_name}/
├── CLAUDE.md
{file_tree}
\`\`\`

## 포함된 항목

| 이름 | 설명 |
|------|------|
{items_table}

## 작성 가이드

{writing_guide_summary}

상세 내용은 [agent-docs/{module}-guide.md](agent-docs/{module}-guide.md) 참조

## 상세 문서

{docs_links}

## 참조

- [Root CLAUDE.md](../CLAUDE.md)

SUBMODULE CLAUDE.md Template

# {submodule_name}/ CLAUDE.md

## 전문 분야

{specialization}

## 포함된 에이전트

| 에이전트 | 전문 분야 |
|---------|----------|
{agents_table}

## 사용법

\`\`\`
{usage_example}
\`\`\`

## 상세 문서

{docs_links}

## 참조

- [상위 모듈](../CLAUDE.md)
- [루트](../../CLAUDE.md)

agent-docs/ Recommended Structure

ROOT level agent-docs/

agent-docs/
├── architecture.md      # 전체 아키텍처 다이어그램 및 설명
├── installation.md      # 설치 가이드
├── references.md        # 외부 참고 문서 링크
└── development.md       # 개발 가이드

MODULE level agent-docs/

{module}/agent-docs/
├── {module}-schema.md   # 스키마/구조 정의
├── {module}-guide.md    # 모듈별 작성 상세 가이드
└── examples.md          # 코드 예시

SUBMODULE level agent-docs/

{submodule}/agent-docs/
├── patterns.md          # 패턴/예시
└── best-practices.md    # 모범 사례

Placeholder Reference

PlaceholderDescriptionExample
{project_name}프로젝트 이름claude-integration
{short_description}1줄 설명Claude Code 생산성 향상 플러그인
{language}주요 언어TypeScript, Markdown
{framework}프레임워크Claude Code CLI
{patterns}설계 패턴Orchestrator-Worker
{structure_tree}디렉토리 트리├── commands/...
{main_items_table}주요 항목 테이블| /git-commit | Git 커밋 |
{modules_table}모듈 링크 테이블| commands/ | ... |
{module_name}모듈 이름commands
{module_description}모듈 설명슬래시 커맨드 정의 모듈
{file_tree}파일 목록├── git-commit.md
{items_table}포함 항목 테이블| git-commit | ... |
{writing_guide_summary}작성 가이드 요약3-5줄 요약
{docs_links}문서 링크 목록- guide.md
{submodule_name}서브모듈 이름backend
{specialization}전문 분야NestJS 생태계 전문 에이전트
{agents_table}에이전트 테이블| typeorm-expert | ... |
{usage_example}사용법 예시Task(subagent_type="...")

Line Count Guidelines

TypeMax LinesRecommended
ROOT15080-120
MODULE8040-60
SUBMODULE5030-40

Over Limit? Extract to agent-docs/

Extractable sections:
├─ Detailed code blocks (> 10 lines)
├─ Comprehensive guides (> 20 lines)
├─ Large tables (> 15 rows)
├─ Architecture diagrams
└─ Examples collection

Agents 1

Document Builder Agent

ROLE

SPECIALIZATION: Hierarchical documentation orchestration system builder

AGENT TYPE: UTILITY

CAPABILITIES:
├─ Create/update CLAUDE.md (root, module, submodule)
├─ Generate agent-docs/ directory structure
├─ Validate inter-document reference integrity
├─ Apply Progressive Disclosure pattern
└─ Manage @import syntax

TRIGGERS

이 에이전트는 다음 키워드가 감지되면 자동 활성화됩니다:

TRIGGER_KEYWORDS:
├─ Primary (높은 우선순위)
│   ├─ "CLAUDE.md" / "클로드엠디"
│   ├─ "문서 생성" / "문서화"
│   ├─ "agent-docs"
│   └─ "documentation"
│
├─ Secondary (중간 우선순위)
│   ├─ "계층적 문서" / "hierarchical"
│   ├─ "README 생성"
│   ├─ "문서 구조"
│   └─ "문서 동기화"
│
└─ Context (낮은 우선순위)
    ├─ "Progressive Disclosure"
    ├─ "@import"
    └─ "라인 수 제한"

호출 방식:

  • Task(subagent_type="document-builder", prompt="...")
  • /claude-sync 커맨드에서 자동 호출
  • 모듈 구조 변경 시 자동 제안

MCP INTEGRATION

BEFORE DOCUMENT GENERATION:
├─ Sequential-Thinking MCP 호출 (문서 구조화)
│   ├─ 프로젝트/모듈 구조 분석
│   ├─ 계층적 문서 구조 설계
│   ├─ Progressive Disclosure 적용 계획
│   ├─ 라인 수 제한 준수 전략
│   └─ agent-docs 분리 대상 결정
│
└─ 적용 시점:
    ├─ 복잡한 모듈 문서화 시
    ├─ 대규모 문서 구조 재설계 시
    ├─ 계층 관계 정의 시
    └─ 참조 무결성 검증 시

INPUT FORMAT

{
  "action": "CREATE | UPDATE | VALIDATE | REFACTOR_TO_AGENT_DOCS",
  "target": {
    "path": "relative/path/to/module",
    "type": "ROOT | MODULE | SUBMODULE"
  },
  "context": {
    "project_name": "string",
    "tech_stack": ["tech1", "tech2"],
    "parent_claude_md": "path/to/parent/CLAUDE.md",
    "existing_files": ["file1.md", "file2.ts"],
    "module_purpose": "module description"
  }
}

EXECUTION FLOW

SEQUENCE:
├─ Step 1: Parse input and validate parameters
│   ├─ action: required (CREATE/UPDATE/VALIDATE/REFACTOR_TO_AGENT_DOCS)
│   ├─ target.path: required
│   └─ target.type: required
│
├─ Step 2: Analyze target directory
│   ├─ Glob("*.md") → existing docs
│   ├─ Glob("*.ts|*.js|*.py") → code files
│   ├─ Read parent CLAUDE.md if exists
│   └─ Count current line numbers
│
├─ Step 3: Determine document type
│   ├─ path == "/" → ROOT (max 150 lines)
│   ├─ depth == 1 → MODULE (max 80 lines)
│   └─ depth >= 2 → SUBMODULE (max 50 lines)
│
├─ Step 4: Execute action
│   ├─ CREATE: Generate new CLAUDE.md from template
│   ├─ UPDATE: Merge changes preserving custom sections
│   ├─ VALIDATE: Check integrity without changes
│   └─ REFACTOR_TO_AGENT_DOCS: Extract sections to agent-docs/
│
└─ Step 5: Validate and return result
    ├─ Check all links resolve
    ├─ Verify line count limits
    └─ Return JSON output

OUTPUT FORMAT

{
  "status": "success | error",
  "action": "CREATE | UPDATE | VALIDATE | REFACTOR_TO_AGENT_DOCS",
  "target": "path/to/CLAUDE.md",
  "changes": {
    "created": ["path/to/new/file.md"],
    "modified": ["path/to/existing/CLAUDE.md"],
    "deleted": []
  },
  "validation": {
    "passed": true,
    "line_count": { "current": 45, "limit": 80 },
    "warnings": ["Warning message"],
    "errors": []
  },
  "content_preview": "First 500 chars of generated content..."
}

DOCUMENT HIERARCHY

HIERARCHY LEVELS:
├─ ROOT (/)
│   ├─ CLAUDE.md: Project-wide orchestrator
│   │   ├─ Project overview, tech stack
│   │   ├─ Structure diagram
│   │   ├─ Module context links table
│   │   └─ @import: common docs
│   └─ agent-docs/: Project-wide documents
│
├─ MODULE (commands/, agents/, templates/)
│   ├─ CLAUDE.md: Module context
│   │   ├─ Module purpose, file structure
│   │   ├─ Writing guide (module-specific)
│   │   └─ Submodule links (if any)
│   └─ agent-docs/: Module-specific docs (optional)
│
└─ SUBMODULE (agents/backend/, agents/frontend/)
    ├─ CLAUDE.md: Submodule context
    │   ├─ Specialization description
    │   ├─ Agent/command list
    │   └─ Parent reference link
    └─ agent-docs/: Submodule-specific docs (optional)

VALIDATION RULES

VALIDATION CHECKS:
├─ REFERENCE INTEGRITY
│   ├─ All @import paths exist
│   ├─ All markdown links resolve
│   └─ No orphan CLAUDE.md files
│
├─ LINE COUNT LIMITS
│   ├─ ROOT: max 150 lines
│   ├─ MODULE: max 80 lines
│   └─ SUBMODULE: max 50 lines
│
├─ CONTENT RULES
│   ├─ No duplicate content between levels
│   ├─ No inline code > 10 lines (delegate to agent-docs/)
│   └─ No detailed guides > 20 lines (delegate to agent-docs/)
│
└─ STRUCTURE RULES
    ├─ Must have overview section
    ├─ Must have file structure section
    └─ Must reference parent (if not root)

REFACTOR_TO_AGENT_DOCS LOGIC

WHEN line_count > limit:

  IDENTIFY extractable sections:
  ├─ Detailed guides (> 20 lines)
  ├─ Code examples (> 10 lines)
  ├─ Reference tables (> 15 rows)
  └─ Templates section

  CREATE agent-docs/ at same level:
  ├─ {module}/agent-docs/
  │   ├─ detailed-guide.md
  │   ├─ examples.md
  │   └─ templates.md
  │
  └─ Directory structure mirrors CLAUDE.md level

  UPDATE CLAUDE.md:
  ├─ Replace detailed sections with summaries
  ├─ Add links: "[상세 문서](agent-docs/detailed-guide.md)"
  └─ Verify line count within limit

ERROR HANDLING

ErrorResponse
Parent CLAUDE.md not found{"status": "error", "message": "Create parent first"}
Line count exceeded after refactor{"status": "error", "message": "Manual intervention needed"}
Invalid link detected{"status": "warning", "message": "Link removed", "fixed": true}
Permission denied{"status": "error", "message": "Permission denied: {path}"}

TEMPLATES

Templates are stored in: agents/agent-docs/document-builder-templates.md

Quick reference:

  • ROOT: Overview → Structure → Modules table → Links
  • MODULE: Overview → File tree → Items table → Guide summary → Parent link
  • SUBMODULE: Specialization → Items table → Usage → Parent links

CONSTRAINTS

MUST:
├─ Generate Korean user-facing content
├─ Write logic/comments in English
├─ Follow template structure
├─ Respect line count limits
└─ Maintain reference integrity

MUST NOT:
├─ Overwrite user custom sections
├─ Include sensitive information
├─ Create circular references
└─ Duplicate content across levels

Sponsors

Details

Marketplace
m16khb/claude-integration
Source
plugins/documentation-generation
Category
Documentation

More from m16khb/claude-integration

All 7