AgileFlow

/code:completeness

PreviousNext

Multi-agent analysis for forgotten features, dead handlers, stub code, and incomplete implementations

/code:completeness

Deploy multiple specialized completeness analyzers in parallel to find forgotten features, dead handlers, stub code, and incomplete implementations, then synthesize results through consensus voting into a prioritized Completeness Audit Report.

Quick Start

/agileflow:code:completeness app/
/agileflow:code:completeness . DEPTH=deep
/agileflow:code:completeness src/ FOCUS=handlers,routes

Arguments

ArgumentValuesDefaultDescription
[file|directory]file or directory.What to analyze
DEPTHquick, deep, ultradeepquickAnalysis depth: quick = core 5 analyzers, deep = all 7 analyzers, ultradeep = separate tmux sessions
FOCUShandlers, routes, api, stubs, state, imports, conditional, allallWhich analyzers to deploy (comma-separated)
MODELhaiku, sonnet, opushaikuModel for analyzer subagents

How It Works

  1. Parse arguments - Determine target, depth, and focus areas
  2. Deploy analyzers in parallel - 5-7 specialized agents depending on depth
  3. Collect all findings - Wait for all analyzers to complete
  4. Run consensus coordinator - Validate findings and prioritize by severity
  5. Generate Completeness Audit Report - Actionable recommendations saved to docs/08-project/completeness-audits/

Core Analyzers (Quick Mode - 5)

AnalyzerFinds
HandlersDead/empty event handlers, console-only handlers
RoutesDead navigation, broken links, missing pages
APIFrontend-backend endpoint mismatches, orphaned endpoints
StubsTODO/FIXME comments, empty function bodies, mock data in production
StateUnused useState/useReducer, orphaned context providers

Deep Mode Analyzers (2 Additional)

AnalyzerFinds
ImportsDead exports, unused dependencies, orphaned modules
ConditionalDead feature flags, unreachable code, commented-out features

Severity Scale

LevelDefinitionExample
BROKENVisibly broken in production - user encounters crash or non-functional elementEmpty onClick handler, API call to non-existent endpoint
INCOMPLETEFeature exists but silently does nothing or loses dataForm submits but handler is noop, state set but never read
PLACEHOLDERDevelopment stub shipped to productionTODO: implement, throw new Error('Not implemented'), hardcoded mock data
DORMANTUnused code that should be alive or removedDead export, hardcoded false feature flag, commented-out feature

Confidence Levels

LevelDefinitionPriority
CONFIRMED2+ analyzers agree on findingHigh
LIKELY1 analyzer with strong evidenceMedium
INVESTIGATE1 analyzer with weak evidenceLow

Examples

# Quick audit of app directory (core 5 analyzers)
/agileflow:code:completeness app/
 
# Deep audit with all 7 analyzers
/agileflow:code:completeness . DEPTH=deep
 
# Focus on specific incomplete features
/agileflow:code:completeness src/ FOCUS=handlers,routes
 
# Check for stubs and unused state only
/agileflow:code:completeness components/ FOCUS=stubs,state
 
# Comprehensive full audit with deep model
/agileflow:code:completeness . DEPTH=deep FOCUS=all MODEL=sonnet

Example Output

šŸ” Completeness Audit: app/
══════════════════════════════════════════════════════════════

Deploying 5 completeness analyzers (quick mode)...
āœ“ Handlers Analyzer
āœ“ Routes Analyzer
āœ“ API Analyzer
āœ“ Stubs Analyzer
āœ“ State Analyzer

Running consensus...
āœ“ Consensus complete
āœ“ Project type detected: Full-stack Web Application

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
šŸ“Š COMPLETENESS SUMMARY
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

| Severity    | Count | User Impact            |
|-------------|-------|------------------------|
| Broken      | 2     | user-blocking          |
| Incomplete  | 3     | user-confusing         |
| Placeholder | 1     | data-silent            |
| Dormant     | 4     | developer-only         |

Total: 10 findings (3 intentional exclusions)

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
🚨 SHIP BLOCKERS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

1. Empty onClick handler on "Delete Account" button [CONFIRMED]
   Location: components/Settings.tsx:45
   Severity: BROKEN | Impact: user-blocking
   Remediation: Implement delete API call or hide button

2. fetch('/api/payments') but route doesn't exist [CONFIRMED]
   Location: pages/checkout.tsx:28
   Severity: BROKEN | Impact: user-blocking
   Remediation: Create API route or disable checkout

━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
āš ļø  FIX BEFORE RELEASE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

3. Form onSubmit only sets loading state, never calls API [LIKELY]
   Location: components/ContactForm.tsx:22
   Severity: INCOMPLETE | Impact: user-confusing

4. useState for searchResults setter called but value never rendered [LIKELY]
   Location: pages/search.tsx:8
   Severity: INCOMPLETE | Impact: data-silent

[Full report saved to docs/08-project/completeness-audits/]

Quick Depth Comparison

Aspectquickdeepultradeep
Analyzers5 (core)7 (all)7 (all, parallel tmux)
ExecutionSequentialSequentialParallel sessions
Severity FocusBROKEN/INCOMPLETEAll 4 levelsAll 4 levels
Time<5min5-10min5-10min (parallel)
CostLowMediumMedium (parallelized)

What NOT to Use This For

This command focuses on incomplete/missing/stub code. Use other commands for:

  • Security issues - Use /code:security for vulnerabilities, XSS, injection, auth bypass
  • Logic bugs - Use /code:logic for race conditions, type bugs, edge cases, control flow
  • Performance - Use /code:performance for slow queries, memory leaks, bundle size
  • Test gaps - Use /code:test for missing tests, weak assertions, test patterns
  • Compliance - Use /code:legal for GDPR, licensing, regulatory requirements

Ultradeep Mode

For high-stakes audits, use DEPTH=ultradeep to spawn each analyzer in a separate Claude Code tmux session:

# Show cost estimate before launching
/agileflow:code:completeness . DEPTH=ultradeep --dry-run
 
# Launch parallel sessions
/agileflow:code:completeness . DEPTH=ultradeep

The command will:

  1. Show estimated cost and token usage
  2. Confirm with you before spawning sessions
  3. Monitor progress via sentinel files in docs/09-agents/ultradeep/
  4. Collect all findings and run consensus
  5. Generate final report

If tmux is unavailable, it automatically falls back to DEPTH=deep.

CommandPurpose
/code:logicFind logic bugs and edge cases
/code:securityDetect security vulnerabilities
/code:performanceFind performance bottlenecks
/code:testAnalyze test coverage and quality
/code:legalCheck compliance and licensing
/reviewAI-powered code review