Skip to main content

commands-organize


type: command component_type: command name: organize description: Analyze and organize project structure against CODITECT standards usage: /organize [--analyze|--plan|--execute|--validate] [path] arguments:

  • name: path type: string required: false description: Path to analyze (default: current directory) options:
  • name: --analyze type: boolean default: true description: Analyze current structure and generate report
  • name: --plan type: boolean default: false description: Generate reorganization plan
  • name: --execute type: boolean default: false description: Execute reorganization plan (requires confirmation)
  • name: --validate type: boolean default: false description: Validate structure after changes
  • name: --dry-run type: boolean default: false description: Show what would be done without making changes moe_confidence: 0.878 track: H quality_score: 75 moe_classified: 2026-01-03 last_reviewed: '2026-02-12'

/organize - Project Organization Command

Purpose

Analyze, plan, and execute project organization against CODITECT standards.

Usage

# Analyze current state (default)
/organize

# Analyze specific directory
/organize docs/

# Generate reorganization plan
/organize --plan

# Execute reorganization
/organize --execute

# Validate after changes
/organize --validate

# Preview without changes
/organize --dry-run

Modes

Analyze Mode (Default)

Scans project structure and generates analysis report:

  • Directory structure compliance
  • Naming convention violations
  • Missing READMEs
  • Stray files
  • Production readiness score
/organize --analyze

Plan Mode

Creates reorganization plans in docs/reorganization-plans/:

  • Master plan with priorities
  • Per-directory plans
  • Tasklists with checkboxes
/organize --plan

Execute Mode

Executes reorganization plan with safety checks:

  • Creates backup branch
  • Uses git mv for moves
  • Commits checkpoints
  • Validates after each phase
/organize --execute

Validate Mode

Validates current structure against standards:

  • Confirms compliance
  • Checks for regressions
  • Updates production score
/organize --validate

Output

Analysis Report

## Project Organization Analysis

Score: 72/100 (Grade C)

Issues:
- 8 stray files in root
- 5 missing READMEs
- 3 naming violations

Recommendations:
1. Move scripts to scripts/
2. Generate missing READMEs
3. Fix naming conventions
  • /structure - View/validate structure
  • /readme-gen - Generate READMEs
  • /naming-check - Check naming conventions
  • /production-audit - Full production audit

Agents Used

  • project-structure-analyzer
  • file-reorganization-orchestrator

Action Policy

<default_behavior> This command analyzes and organizes project structure. Proceeds with:

  • Structure analysis (default)
  • Plan generation (if --plan)
  • Execution (if --execute, requires approval)
  • Validation (if --validate)

Provides detailed reports at each phase. </default_behavior>

After execution, verify: - Analysis complete - Plans generated (if requested) - Score improved (if executed) - Structure validated

Success Output

When organize completes:

✅ COMMAND COMPLETE: /organize
Mode: <analyze|plan|execute|validate>
Score: <before> → <after>
Issues: <N> found
Status: <summary>

Completion Checklist

Before marking complete:

  • Directory scanned
  • Issues identified
  • Report generated
  • Score calculated

Failure Indicators

This command has FAILED if:

  • ❌ Path not found
  • ❌ Analysis failed
  • ❌ Plan generation failed
  • ❌ Execution blocked

When NOT to Use

Do NOT use when:

  • Simple single file move
  • Already organized
  • Need custom structure

Anti-Patterns (Avoid)

Anti-PatternProblemSolution
Skip --analyzeBlind changesAnalyze first
Force --executeUnexpected movesReview plan first
Ignore scoreIncomplete workTarget 90+ score

Principles

This command embodies:

  • #3 Complete Execution - Full organization workflow
  • #4 Idempotent - Safe to re-run
  • #6 Clear, Understandable - Clear reports

Full Standard: CODITECT-STANDARD-AUTOMATION.md


Version: 1.0.0 Created: 2026-01-02