Skip to main content

commands-structure


type: command component_type: command name: structure description: Display and validate project directory structure usage: /structure [--validate|--tree|--compare] [path] arguments:

  • name: path type: string required: false description: Path to display (default: current directory) options:
  • name: --validate type: boolean default: false description: Validate structure against standards
  • name: --tree type: boolean default: true description: Display directory tree
  • name: --compare type: boolean default: false description: Compare current vs expected structure
  • name: --depth type: number default: 3 description: Maximum depth to display moe_confidence: 0.891 track: H quality_score: 75 moe_classified: 2026-01-03 last_reviewed: '2026-02-12'

/structure - Project Structure Command

Purpose

Display, validate, and compare project directory structure against CODITECT standards.

Usage

# Show directory tree (default)
/structure

# Show specific directory
/structure docs/

# Validate against standards
/structure --validate

# Compare current vs expected
/structure --compare

# Limit depth
/structure --depth 2

Modes

Tree Mode (Default)

Displays directory tree structure:

/structure

project/
├── .claude/
├── docs/
│ ├── guides/
│ └── reference/
├── scripts/
├── src/
└── tests/

Validate Mode

Validates structure against CODITECT standards:

/structure --validate

Structure Validation:
✓ docs/ present
✓ scripts/ present
✓ README.md at root
✗ Missing CLAUDE.md
✗ Stray files in root: 3

Score: 85/100

Compare Mode

Shows current vs expected structure:

/structure --compare

Current Expected
─────── ────────
✓ docs/ docs/
✓ scripts/ scripts/
✗ src/ (missing) src/
✗ random.py (move to scripts/)

Output

Tree Output

docs/
├── README.md
├── guides/
│ ├── README.md
│ └── QUICK-START.md
└── reference/
└── API.md

Validation Output

## Structure Validation

Status: VALID (with warnings)
Score: 92/100

✓ Required directories present
✓ README.md coverage: 95%
⚠ 2 directories exceed depth limit
  • /organize - Analyze and fix structure
  • /naming-check - Check naming conventions
  • /production-audit - Full audit

Agents Used

  • project-structure-analyzer

Action Policy

<default_behavior> This command analyzes and displays without making changes. Provides:

  • Directory tree visualization
  • Structure validation scores
  • Comparison with standards
  • Actionable recommendations

Read-only operation on project structure. </default_behavior>

After execution, verify: - Tree displayed correctly - Validation score calculated - Issues identified - Recommendations provided

Success Output

When structure check completes:

✅ COMMAND COMPLETE: /structure
Path: <directory>
Mode: <tree|validate|compare>
Score: XX/100
Issues: N found

Completion Checklist

Before marking complete:

  • Directory scanned
  • Tree/validation generated
  • Score calculated (if validate)
  • Issues identified
  • Output displayed

Failure Indicators

This command has FAILED if:

  • ❌ Directory not found
  • ❌ Permission denied
  • ❌ No output generated
  • ❌ Invalid depth

When NOT to Use

Do NOT use when:

  • Need to fix structure (use /organize)
  • Need file content (use Read)
  • Need naming check (use /naming-check)

Anti-Patterns (Avoid)

Anti-PatternProblemSolution
Deep scanSlow performanceLimit depth
Root onlyMiss nested issuesCheck subdirectories
Skip validationUnknown statusUse --validate regularly

Principles

This command embodies:

  • #6 Clear, Understandable - Visual tree output
  • #9 Based on Facts - Objective scoring

Full Standard: CODITECT-STANDARD-AUTOMATION.md


Version: 1.0.0 Created: 2026-01-02