{
  "phase_id": "phase-02",
  "category_id": "architecture_engineering_core",
  "doc_id": "cas",
  "source_path": "/home/yeff/public_html/devon/panel/data/cas.md",
  "documentation_branch_status": "CUSTOM_BRANCH",
  "bucket_statuses_from_docs_index": {
    "Prerequisites": "ACTIVE",
    "Installation": "ACTIVE",
    "Configuration": "ACTIVE",
    "Validation": "ACTIVE",
    "Observable Evidence": "ACTIVE",
    "Failure Modes & Recovery": "ACTIVE",
    "Completion & Promotion": "ACTIVE"
  },
  "exported_at": "2026-04-28T05:56:48.644291+00:00",
  "export_rule": "docs/json export generated from real panel/data source plus docs/index.php branch evidence; no authored content invented by export patch",
  "source_payload": {
    "source_format": "markdown",
    "raw_markdown": "# CAS - COGNITIVE ARCHITECTURE SPEC\nversion: v1.1\nstatus: ACTIVE\nparent: master_architecture_index.md\nphase: 02\nphase_name: Architecture & Engineering Canon\ndocument_role: cognitive_architecture_authority\n\n## 1. OBJECTIVE\nDefine the canonical cognitive architecture of Devon.\n\nThis file owns:\n- architecture placement of layers\n- module responsibility at architecture level\n- separation between probabilistic and deterministic components\n\nThis file does not own:\n- detailed flow behavior\n- latency budget\n- security policy\n- operational flow sequence\n\nThose belong to:\n- cfc.md\n- lpc.md\n- sec.md\n- ofc.md\n\n## 2. CORE PRINCIPLE\nDevon is not an LLM-centric system.\nDevon is a governed cognitive system where the LLM is one probabilistic component under deterministic control.\n\n## 3. CANONICAL LAYERS\n\n### 3.1 Interpreter Layer\n- LLM\n- extraction\n- classification\n- semantic parsing\n\n### 3.2 Deterministic Control Layer\n- FSM\n- policy engine\n- transition enforcement\n\n### 3.3 Validation Layer\n- validator\n- contract checker\n- policy enforcement\n\n### 3.4 Execution Layer\n- executor\n- dispatch\n- bounded side effects\n\n### 3.5 Memory Layer\n- working memory\n- canonical memory\n- audit-linked memory routing\n\n### 3.6 Retrieval Layer\n- embeddings\n- retrieval\n- recall support\n\nRule:\nretrieval is a support layer.\nretrieval is not sovereign decision authority.\n\n## 4. SOVEREIGNTY BOUNDARY\nArchitecture ownership in this file means:\n- where a capability belongs\n- what responsibility it has\n- what it must not absorb from another layer\n\nThis file may not redefine:\n- exact state transitions\n- hot path latency limits\n- security controls\n- end-to-end operational sequencing\n\n## 5. LLM BOUNDARY\nThe LLM may:\n- interpret\n- extract\n- structure\n- propose\n\nThe LLM may not:\n- own final policy\n- override FSM\n- bypass validator\n- execute protected action directly\n\n## 6. RETRIEVAL BOUNDARY\nRetrieval belongs to architecture as a support capability.\n\nRetrieval may:\n- provide relevant context\n- support reasoning inputs\n- enrich decision inputs\n\nRetrieval may not:\n- define sovereign policy\n- replace state control\n- mutate canonical truth by itself\n\n## 7. ARCHITECTURE OUTPUT CONTRACT\nAny architecture derived from Devon must preserve:\n- deterministic control above probabilistic interpretation\n- validator before protected execution\n- retrieval as support, never sovereignty\n- explicit auditability\n\n"
  },
  "transition_status": "ACTIVE_DH_MIRROR",
  "hardening_status": "HARDENING_PARTIAL",
  "engine_grade_final": false,
  "validation_mode": "schema_backed_transition",
  "parser_readiness": "medium",
  "hardening_priority": "extract_structural_fields_from_dh_text",
  "structural_contract": {
    "hardening_status": "HARDENING_PARTIAL",
    "engine_grade_final": false,
    "transition_status": "ACTIVE_DH_MIRROR",
    "doc_id": "cas",
    "category_id": "architecture_engineering_core",
    "phase_id": "phase-02",
    "hardening_lane": "dh_text_to_structural_contract",
    "patch_type": "extract_structural_fields",
    "created_at": "2026-04-28T06:57:33.544519+00:00",
    "authority": {
      "authority_owner": "cas.md",
      "canonical_role": "sovereign cognitive architecture definition",
      "authority_scope": "defines the upstream cognitive architecture boundary that Phase 02 must settle before downstream orchestration, runtime, monitoring, panel execution or IA Devon behavior can be trusted",
      "not_authority_for": [
        "runtime execution state",
        "operator panel runtime telemetry",
        "deployment topology ownership",
        "security enforcement ownership",
        "UI presentation ownership"
      ]
    },
    "required_before": [
      "cfc.md",
      "ofms.md",
      "operator/runtime implementation",
      "future Panel de Execução e Monitoramento architecture consumption",
      "IA Devon execution architecture trust"
    ],
    "hard_dependencies": [
      "master_architecture_index.md",
      "project_scope_canonical.json"
    ],
    "feeds_operational_ui": [
      "category_cards",
      "evidence_drawer",
      "dependency_drawer",
      "phase_registry_view",
      "future_panel_execution_contract_reader"
    ],
    "bucket_contracts": {
      "Prerequisites": {
        "contract_role": "prove CAS exists as the upstream cognitive authority before downstream architecture can consume it",
        "required_structural_fields": [
          "authority_owner",
          "canonical_role",
          "required_before",
          "hard_dependencies",
          "feeds_operational_ui"
        ],
        "validation_mode": "schema_backed_transition",
        "parser_readiness": "medium"
      },
      "Installation": {
        "contract_role": "make CAS available to Documentation Hub as a Phase 02 category authority without converting it into runtime proof",
        "required_structural_fields": [
          "doc_id",
          "category_id",
          "phase_id",
          "documentation_branch_status",
          "source_path"
        ],
        "validation_mode": "schema_backed_transition",
        "parser_readiness": "medium"
      },
      "Configuration": {
        "contract_role": "separate cognitive architecture boundary, sovereignty and satellite reference permissions",
        "required_structural_fields": [
          "authority_scope",
          "not_authority_for",
          "allowed_satellite_references"
        ],
        "validation_mode": "semantic_plus_structural_transition",
        "parser_readiness": "medium"
      },
      "Validation": {
        "contract_role": "test CAS conformity against declared authority, phase binding and downstream dependency boundaries",
        "required_structural_fields": [
          "validation_checks",
          "pass_criteria",
          "fail_criteria",
          "missing_criteria"
        ],
        "validation_mode": "schema_backed_transition",
        "parser_readiness": "medium"
      },
      "Observable Evidence": {
        "contract_role": "expose material files, DH branch binding and mirror source used to prove CAS is observable",
        "required_structural_fields": [
          "evidence_paths",
          "expected_bindings",
          "observable_checks"
        ],
        "validation_mode": "schema_backed_transition",
        "parser_readiness": "medium"
      },
      "Failure Modes & Recovery": {
        "contract_role": "define deterministic recovery when CAS is missing, misbound, overreached or contradicted by satellites",
        "required_structural_fields": [
          "failure_modes",
          "recovery_actions",
          "rollback_or_safe_state"
        ],
        "validation_mode": "schema_backed_transition",
        "parser_readiness": "medium"
      },
      "Completion & Promotion": {
        "contract_role": "promote CAS only as build-ready cognitive architecture contract input, not as runtime implementation evidence",
        "required_structural_fields": [
          "done_when",
          "not_done_when",
          "promotion_gate",
          "canonization_gate"
        ],
        "validation_mode": "schema_backed_transition",
        "parser_readiness": "medium"
      }
    },
    "allowed_satellite_references": [
      "cfc.md",
      "ris.md",
      "ccc.md"
    ],
    "validation_checks": [
      {
        "check_id": "cas_doc_identity",
        "type": "exact_value",
        "path": "$.doc_id",
        "expected": "cas",
        "on_fail": "FAIL"
      },
      {
        "check_id": "cas_category_binding",
        "type": "exact_value",
        "path": "$.category_id",
        "expected": "architecture_engineering_core",
        "on_fail": "FAIL"
      },
      {
        "check_id": "cas_phase_binding",
        "type": "exact_value",
        "path": "$.phase_id",
        "expected": "phase-02",
        "on_fail": "FAIL"
      },
      {
        "check_id": "cas_branch_status",
        "type": "exact_value",
        "path": "$.documentation_branch_status",
        "expected": "CUSTOM_BRANCH",
        "on_fail": "FAIL"
      },
      {
        "check_id": "cas_source_markdown_present",
        "type": "non_empty_string",
        "path": "$.source_payload.raw_markdown",
        "on_missing": "MISSING",
        "on_fail": "FAIL"
      },
      {
        "check_id": "cas_authority_owner_declared",
        "type": "exact_value",
        "path": "$.structural_contract.authority.authority_owner",
        "expected": "cas.md",
        "on_fail": "FAIL"
      },
      {
        "check_id": "cas_not_engine_final",
        "type": "exact_value",
        "path": "$.engine_grade_final",
        "expected": false,
        "on_fail": "FAIL"
      }
    ],
    "evidence_paths": [
      "/home/yeff/public_html/devon/panel/data/cas.md",
      "/home/yeff/public_html/devon/docs/index.php",
      "/home/yeff/public_html/devon/panel/data/hub_index.json",
      "/home/yeff/public_html/devon/panel/data/master_architecture_index.md",
      "/home/yeff/public_html/devon/docs/json/phase-02/cas.json",
      "/home/yeff/public_html/devon/docs/json/phase-02/_phase02_hardening_queue.json"
    ],
    "expected_bindings": [
      {
        "binding": "docs_index_custom_branch",
        "expected": "if (doc.id === \"cas\" && state.categoryId === \"architecture_engineering_core\")"
      },
      {
        "binding": "hub_index_phase",
        "expected_phase_id": "phase-02"
      },
      {
        "binding": "hub_index_category",
        "expected_category_id": "architecture_engineering_core"
      }
    ],
    "failure_modes": [
      {
        "failure_id": "cas_source_missing",
        "status": "MISSING",
        "meaning": "CAS source markdown cannot be read from the declared source path",
        "recovery_action": "restore /home/yeff/public_html/devon/panel/data/cas.md before hardening can continue"
      },
      {
        "failure_id": "cas_wrong_phase_or_category",
        "status": "FAIL",
        "meaning": "CAS is present but not bound to phase-02 / architecture_engineering_core",
        "recovery_action": "rebind hub_index and docs/index branch to the canonical Phase 02 category"
      },
      {
        "failure_id": "cas_satellite_overrides_sovereign_scope",
        "status": "FAIL",
        "meaning": "CFC, RIS or CCC redefine CAS authority instead of referencing it",
        "recovery_action": "restore CAS as sovereign cognitive architecture authority and downgrade satellite text to contextual reference"
      },
      {
        "failure_id": "cas_promoted_as_runtime_truth",
        "status": "FAIL",
        "meaning": "CAS is being treated as operational runtime evidence instead of cognitive architecture contract",
        "recovery_action": "restore boundary between DH/canonical guidance and Operator Panel runtime evidence"
      }
    ],
    "promotion_gates": {
      "done_when": [
        "CAS source exists materially",
        "CAS is registered under Phase 02",
        "CAS has a custom Documentation Hub branch",
        "CAS JSON mirror contains structural_contract",
        "CAS structural fields are parseable without reading prose for identity, binding, authority owner and primary dependencies"
      ],
      "not_done_when": [
        "source markdown is missing",
        "category binding is wrong",
        "authority owner is absent",
        "satellite references redefine CAS",
        "engine_grade_final is set true before deterministic schema validation exists"
      ],
      "promotion_gate": "CAS may move from ACTIVE_DH_MIRROR to HARDENING_PARTIAL after structural_contract exists and verifies, but may not become engine_grade_final until all bucket checks are schema-backed and deterministic.",
      "canonization_gate": "CAS remains canonical DH mirror until structural fields replace semantic reading for authority, dependency, evidence, failure and promotion checks."
    },
    "parser_readiness_after_patch": "medium",
    "blocked_until_engine_grade_final": [
      "all validation checks resolve from JSON key paths",
      "all bucket contracts expose deterministic pass/fail/missing criteria",
      "CAS authority boundaries can be checked without natural-language interpretation",
      "future operational panel can consume CAS contract without reading source prose"
    ],
    "source_signal_audit": {
      "raw_markdown_contains_architecture_terms": true,
      "raw_markdown_contains_authority_terms": true,
      "matched_architecture_lines_sample": [
        "# CAS - COGNITIVE ARCHITECTURE SPEC",
        "parent: master_architecture_index.md",
        "phase_name: Architecture & Engineering Canon",
        "document_role: cognitive_architecture_authority",
        "Define the canonical cognitive architecture of Devon.",
        "- architecture placement of layers",
        "- module responsibility at architecture level",
        "- separation between probabilistic and deterministic components",
        "Devon is not an LLM-centric system.",
        "Devon is a governed cognitive system where the LLM is one probabilistic component under deterministic control.",
        "Architecture ownership in this file means:",
        "Retrieval belongs to architecture as a support capability.",
        "## 7. ARCHITECTURE OUTPUT CONTRACT",
        "Any architecture derived from Devon must preserve:"
      ],
      "matched_authority_lines_sample": [
        "phase_name: Architecture & Engineering Canon",
        "document_role: cognitive_architecture_authority",
        "Define the canonical cognitive architecture of Devon.",
        "## 3. CANONICAL LAYERS",
        "- canonical memory",
        "retrieval is not sovereign decision authority.",
        "## 4. SOVEREIGNTY BOUNDARY",
        "- define sovereign policy",
        "- mutate canonical truth by itself",
        "- retrieval as support, never sovereignty"
      ],
      "audit_note": "source_signal_audit is evidence support only; structural_contract remains governed by Phase 02 queue, hub binding and canonical master registration"
    }
  }
}
