{
  "item_type": "chapter",
  "chapter_id": "cli-reference",
  "chapter_title": "CLI Reference",
  "chapter_file": "book/src/cli-reference.md",
  "drift_detected": true,
  "severity": "medium",
  "quality_assessment": "Good overall documentation with comprehensive command coverage, but missing one command and several options",
  "issues": [
    {
      "type": "missing_content",
      "severity": "medium",
      "section": "Commands",
      "description": "The 'diagnose-coverage' command is not documented",
      "feature_reference": "cli_interface.commands.diagnose_coverage",
      "fix_suggestion": "Add a new section for the 'diagnose-coverage' command that explains it validates and diagnoses LCOV coverage files with text or JSON output",
      "source_reference": "src/cli/args.rs:533-540 (DiagnoseCoverage command definition)"
    },
    {
      "type": "missing_content",
      "severity": "low",
      "section": "Options",
      "description": "The '--show-config-sources' global flag is not documented",
      "feature_reference": "configuration.capabilities",
      "fix_suggestion": "Add documentation for '--show-config-sources' global flag that shows where each configuration value came from (spec 201)",
      "source_reference": "src/cli/args.rs:49-51"
    },
    {
      "type": "missing_content",
      "severity": "low",
      "section": "Options - Analyze",
      "description": "The '--min-score' option is not documented",
      "feature_reference": "risk_assessment.capabilities",
      "fix_suggestion": "Add documentation for '--min-score' option which sets minimum score threshold for filtering T3/T4 recommendations (default: 3.0). Note that T1/T2 items bypass this filter.",
      "source_reference": "src/cli/args.rs:147-152"
    },
    {
      "type": "missing_content",
      "severity": "low",
      "section": "Options - Analyze",
      "description": "The '--show-filter-stats' option is not documented",
      "feature_reference": "output_formats.display_options",
      "fix_suggestion": "Add documentation for '--show-filter-stats' option that displays how many items were filtered and why",
      "source_reference": "src/cli/args.rs:161-163"
    },
    {
      "type": "missing_content",
      "severity": "low",
      "section": "Options - Analyze",
      "description": "The '--no-tui' option is not documented",
      "feature_reference": "output_formats.display_options",
      "fix_suggestion": "Add documentation for '--no-tui' flag that disables TUI progress visualization and uses simple progress bars instead",
      "source_reference": "src/cli/args.rs:184-186"
    },
    {
      "type": "missing_content",
      "severity": "low",
      "section": "Options - Analyze",
      "description": "The '--quiet' / '-q' option is not documented",
      "feature_reference": "output_formats.display_options",
      "fix_suggestion": "Add documentation for '--quiet' / '-q' flag that suppresses progress output (quiet mode)",
      "source_reference": "src/cli/args.rs:188-190"
    },
    {
      "type": "missing_content",
      "severity": "low",
      "section": "Options - Analyze",
      "description": "The '--streaming' and '--stream-to' options are not documented",
      "feature_reference": "output_formats.features",
      "fix_suggestion": "Add documentation for '--streaming' flag that enables streaming output mode for large codebases (Spec 003) and '--stream-to' option for specifying output file",
      "source_reference": "src/cli/args.rs:192-201"
    },
    {
      "type": "missing_content",
      "severity": "low",
      "section": "Options - Analyze",
      "description": "The '--min-split-methods' and '--min-split-lines' options are not documented",
      "feature_reference": "god_object_detection.recommendations.split_suggestions",
      "fix_suggestion": "Add documentation for '--min-split-methods' (default: 10) and '--min-split-lines' (default: 150) options for god object split recommendations",
      "source_reference": "src/cli/args.rs:246-252"
    },
    {
      "type": "missing_content",
      "severity": "low",
      "section": "Options - Analyze",
      "description": "The '--show-splits' option is not documented",
      "feature_reference": "god_object_detection.recommendations",
      "fix_suggestion": "Add documentation for '--show-splits' flag that shows detailed module split recommendations for god objects and large files (experimental)",
      "source_reference": "src/cli/args.rs:254-259"
    },
    {
      "type": "missing_content",
      "severity": "low",
      "section": "Options - Analyze",
      "description": "The '--no-public-api-detection' and '--public-api-threshold' options are not documented",
      "feature_reference": "debt_detection.detection_categories.organization",
      "fix_suggestion": "Add documentation for dead code analysis options: '--no-public-api-detection' disables public API detection heuristics and '--public-api-threshold' (0.0-1.0, default: 0.7) sets confidence threshold",
      "source_reference": "src/cli/args.rs:261-267"
    },
    {
      "type": "missing_content",
      "severity": "low",
      "section": "Options - Analyze",
      "description": "The '--no-pattern-detection', '--patterns', and '--pattern-threshold' options are not documented",
      "feature_reference": "debt_detection.detection_categories.organization",
      "fix_suggestion": "Add documentation for pattern detection options: '--no-pattern-detection' disables it, '--patterns' enables specific patterns (observer,singleton,factory,strategy,callback,template_method), '--pattern-threshold' (0.0-1.0, default: 0.7) sets confidence",
      "source_reference": "src/cli/args.rs:269-279"
    },
    {
      "type": "missing_content",
      "severity": "low",
      "section": "Options - Analyze",
      "description": "The '--show-pattern-warnings' option is not documented",
      "feature_reference": "debt_detection.capabilities",
      "fix_suggestion": "Add documentation for '--show-pattern-warnings' flag that shows pattern warnings for uncertain detections",
      "source_reference": "src/cli/args.rs:324-326"
    },
    {
      "type": "missing_content",
      "severity": "low",
      "section": "Options - Analyze",
      "description": "The '--profile' and '--profile-output' options are not documented",
      "feature_reference": "parallel_processing.capabilities",
      "fix_suggestion": "Add documentation for '--profile' flag that enables profiling to identify performance bottlenecks (Spec 001) and '--profile-output' to write profiling data to file in JSON format",
      "source_reference": "src/cli/args.rs:356-368"
    },
    {
      "type": "missing_content",
      "severity": "low",
      "section": "Options - Validate",
      "description": "The '--show-splits' option for validate command is not documented",
      "feature_reference": "god_object_detection.recommendations",
      "fix_suggestion": "Update the Command Compatibility Matrix to show '--show-splits' is available in validate command",
      "source_reference": "src/cli/args.rs:466-470"
    },
    {
      "type": "missing_content",
      "severity": "low",
      "section": "Output Formats",
      "description": "The 'dot' output format is not documented",
      "feature_reference": "output_formats.formats",
      "fix_suggestion": "Add documentation for 'dot' output format (Graphviz DOT format for dependency visualization)",
      "source_reference": "src/cli/args.rs:581-582"
    },
    {
      "type": "incomplete_explanation",
      "severity": "low",
      "section": "Command Compatibility Matrix",
      "description": "The compatibility matrix is missing several options including --quiet, --streaming, --profile, --show-splits, --min-score, --show-filter-stats",
      "feature_reference": "cli_interface",
      "fix_suggestion": "Update the Command Compatibility Matrix to include all analyze and validate command options for comprehensive reference",
      "source_reference": "src/cli/args.rs"
    }
  ],
  "positive_aspects": [
    "Comprehensive documentation of six main commands with clear usage patterns",
    "Well-organized sections by category (Output Control, Analysis Control, Context & Coverage, Performance, Debugging)",
    "Excellent command compatibility matrix showing which options apply to which commands",
    "Clear examples and common workflow patterns throughout",
    "Good troubleshooting section with practical solutions",
    "Detailed explanation of validate-improvement composite score calculation",
    "All internal links are valid and point to existing documentation files",
    "Option aliases are clearly documented",
    "Deprecated options are properly noted with migration guidance"
  ],
  "improvement_suggestions": [
    "Add documentation for the 'diagnose-coverage' command",
    "Add documentation for undocumented options in the analyze command",
    "Update the Command Compatibility Matrix to be complete",
    "Consider adding a section on the 'dot' output format for dependency visualization",
    "Document the global '--show-config-sources' flag"
  ],
  "metadata": {
    "analyzed_at": "2025-12-27T00:00:00Z",
    "feature_inventory": ".prodigy/book-analysis/features.json",
    "topics_covered": [
      "Commands",
      "Arguments",
      "Options",
      "Configuration"
    ],
    "validation_focus": "Verify all CLI commands from src/cli/ are documented with current options",
    "internal_links_validated": true,
    "broken_links_count": 0,
    "total_internal_links": 5
  }
}
