{
  "id": "code_quality_learning",
  "label": "Code Quality Learning Canonical",
  "phase": "phase-08",
  "category": "memory_learning_reasoning",
  "status": "ACTIVE_DH_MIRROR",
  "purpose": "Define how DEVON-DEV learns patterns of clean code and bad code from real outcomes.",
  "function": "Learn from duplicated code, unnecessary append, correct replace, rejected fallback, successful refactor, bloated file, dead function and clean correction without converting one-off style preference into architecture.",
  "technology_requirements": [
    {
      "technology": "Code Quality Learning Service",
      "required_for": "Define how DEVON-DEV learns patterns of clean code and bad code from real outcomes.",
      "required_by_phase": "phase-08",
      "required_by_category": "code_quality_learning",
      "required_by_buckets": [
        "Prerequisites",
        "Installation",
        "Configuration",
        "Validation",
        "Observable Evidence",
        "Failure Modes & Recovery",
        "Completion & Promotion"
      ],
      "expected_version": "MISSING until implemented and validated in the future Execution & Monitoring Panel",
      "validation_command": "MISSING until code_quality_learning can prove source, scope, state, evidence and decision linkage",
      "evidence_path": "/home/yeff/public_html/devon/canon/execution/state/dh_sources/code_quality_learning_canonical.json",
      "status_source": "Documentation Hub + future Execution & Monitoring Panel",
      "blocking_if_missing": true,
      "failure_impact": "MISSING applies when code-quality outcomes have no evidence or affected scope. FAIL applies when DEVON-DEV repeats a brittle pattern, learns style as canon, promotes a one-off workaround or keeps generating bloated patches. Without this category, LESS CODE, LESS BUG cannot improve from experience."
    }
  ],
  "depends_on": [
    "learning_gov",
    "memory_lifecycle",
    "knowledge_versioning",
    "execution_ledger",
    "observable_evidence",
    "fsm_absolute_decision"
  ],
  "used_by": [
    "future_execution_monitoring_panel",
    "planning_reasoning",
    "tool_execution",
    "learning_gov"
  ]
}
