Skip to main content

commands-readme-gen


type: command component_type: command name: readme-gen description: Generate README.md files for directories usage: /readme-gen [--recursive|--template|--missing] [path] arguments:

  • name: path type: string required: false description: Path to generate README for (default: current directory) options:
  • name: --recursive type: boolean default: false description: Generate READMEs for all subdirectories
  • name: --missing type: boolean default: false description: Only generate for directories without README
  • name: --template type: string default: auto description: Template to use (minimal|standard|comprehensive|auto)
  • name: --force type: boolean default: false description: Overwrite existing READMEs moe_confidence: 0.867 track: F quality_score: 75 moe_classified: 2026-01-03 last_reviewed: '2026-02-12'

/readme-gen - README Generation Command

Purpose

Automatically generate CODITECT-compliant README.md files by analyzing directory contents.

Usage

# Generate for current directory
/readme-gen

# Generate for specific directory
/readme-gen docs/guides/

# Generate all missing READMEs
/readme-gen --missing --recursive

# Use specific template
/readme-gen --template comprehensive

# Overwrite existing
/readme-gen --force

Templates

Minimal

For simple directories with few files:

# Directory Name

Brief description.

## Contents
| File | Description |

Standard

For most directories:

# Directory Name

## Overview
Description of purpose.

## Contents
| File | Description |

## Usage
How to use contents.

Comprehensive

For project roots:

# Project Name

## Overview
## Quick Start
## Prerequisites
## Installation
## Usage
## Documentation
## Contributing
## License

Auto (Default)

Selects template based on:

  • Number of files
  • Directory type
  • Existing patterns

Output

Single Generation

Generated: docs/guides/README.md
Template: Standard
Sections: Overview, Contents, Related

Batch Generation

## README Generation Report

Scanned: 45 directories
Generated: 15 READMEs

Coverage: 67% → 100%

| Directory | Template | Status |
|-----------|----------|--------|
| docs/ | Standard | ✓ |
| scripts/ | Standard | ✓ |
  • /structure - View structure
  • /organize - Full organization
  • /naming-check - Naming validation

Agents Used

  • readme-generator

Success Output

When README generation completes:

✅ COMMAND COMPLETE: /readme-gen
Target: <path>
Template: <minimal|standard|comprehensive|auto>
Generated: N README files
Coverage: X% → Y%

Completion Checklist

Before marking complete:

  • Target directory identified
  • Template selected (or auto-detected)
  • README generated
  • Contents documented
  • Format validated

Failure Indicators

This command has FAILED if:

  • ❌ Target directory not found
  • ❌ No README generated
  • ❌ Empty README created
  • ❌ Template not applied

When NOT to Use

Do NOT use when:

  • README exists and is accurate (use update instead)
  • Directory is temporary/build output
  • Non-project directory

Anti-Patterns (Avoid)

Anti-PatternProblemSolution
Overwrite without --forceLost contentCheck existing first
Wrong template selectionIncomplete docUse --template auto
Skip recursive for projectsMissing READMEsUse --recursive --missing

Principles

This command embodies:

  • #6 Clear, Understandable - Clear documentation
  • #1 Recycle → Extend - Template-based generation

Full Standard: CODITECT-STANDARD-AUTOMATION.md


Version: 1.0.0 Created: 2026-01-02