Skip to main content

Orchestrate Submodule Command

Zero human-in-the-loop orchestration for bringing a submodule to CODITECT compliance standards.

System Prompt

⚠️ EXECUTION DIRECTIVE: When the user invokes this command, you MUST:

  1. IMMEDIATELY execute - no questions, no explanations first
  2. ALWAYS show full output from script/tool execution
  3. ALWAYS provide summary after execution completes

DO NOT:

  • Say "I don't need to take action" - you ALWAYS execute when invoked
  • Ask for confirmation unless requires_confirmation: true in frontmatter
  • Skip execution even if it seems redundant - run it anyway

The user invoking the command IS the confirmation.


Usage

/orchestrate-submodule [options]

Options

  • --path PATH - Path to submodule (default: current directory)
  • --target-score N - Target compliance score (default: 90)
  • --dry-run - Analysis only, don't execute agents
  • --auto-commit - Automatically commit changes
  • --auto-push - Automatically push after commit
  • --generate-script - Generate executable agent script

Execution

When invoked, this command will:

  1. Analyze the submodule structure and calculate compliance score
  2. Identify gaps (CLAUDE.md, symlinks, docs/, etc.)
  3. Generate agent tasks for each gap
  4. Execute agents in sequence (unless --dry-run)
  5. Verify final compliance score
  6. Sync changes to git (if --auto-commit/--auto-push)

Agent Invocations

The command orchestrates these specialized agents:

# Directory standardization
Task(subagent_type="project-organizer", prompt="Standardize {submodule} directory structure to CODITECT compliance")

# CLAUDE.md creation/refactoring
Task(subagent_type="codi-documentation-writer", prompt="Create/refactor CLAUDE.md for {submodule} to <150 lines")

# Compliance validation
Task(subagent_type="compliance-checker-agent", prompt="Verify {submodule} compliance score is now 90+")

# Git sync
/git-sync --target {submodule_path}

Example Workflow

# 1. Analyze current state
/orchestrate-submodule --dry-run

# 2. Review recommendations and agent tasks
# Output shows compliance score, gaps, and required agents

# 3. Execute full orchestration
/orchestrate-submodule --auto-commit --auto-push

# 4. Verify completion
# Final score should be 90+

Output

The command produces:

  • Console: Progress updates, compliance score, recommendations
  • agent_tasks.py: Executable agent invocations (if --generate-script)
  • JSON: Detailed analysis (if --output specified)

Integration

This command integrates with:

  • Master TASKLIST.md for phase tracking
  • Submodule PROJECT-PLAN.md and TASKLIST.md
  • Git workflow for sync operations

For Customers/Contributors

Use this command to bring any project or submodule to CODITECT standards:

# In your project root
/orchestrate-submodule --target-score 90

# Or specify a submodule
/orchestrate-submodule --path submodules/my-component

Action Policy

<default_behavior> This command brings submodules to compliance. Proceeds with:

  • Structure analysis
  • Gap identification
  • Agent orchestration
  • Git sync (if --auto-commit/--auto-push)

Provides progress updates throughout. </default_behavior>

After execution, verify: - Compliance score ≥ target - All gaps addressed - Changes committed (if requested) - Final report generated

Success Output

When orchestrate-submodule completes:

✅ COMMAND COMPLETE: /orchestrate-submodule
Submodule: <path>
Score: <before> → <after>
Target: <target>
Status: <compliant|needs work>

Completion Checklist

Before marking complete:

  • Structure analyzed
  • Gaps identified
  • Agents executed
  • Score verified
  • Changes synced (if requested)

Failure Indicators

This command has FAILED if:

  • ❌ Path not found
  • ❌ Analysis failed
  • ❌ Target score not reached
  • ❌ Git sync failed

When NOT to Use

Do NOT use when:

  • Ecosystem-wide (use /orchestrate-ecosystem)
  • Already compliant
  • Manual control needed

Anti-Patterns (Avoid)

Anti-PatternProblemSolution
Skip --dry-runUnexpected changesPreview first
Low target scoreIncomplete workUse 90+
Force pushHistory lossReview commits

Principles

This command embodies:

  • #3 Complete Execution - Full compliance workflow
  • #1 Self-Provisioning - Auto agent coordination
  • #9 Based on Facts - Score-based validation

Full Standard: CODITECT-STANDARD-AUTOMATION.md


Related: /orchestrate-ecosystem, orchestration-automation skill