{
  "phase_id": "phase-02",
  "category_id": "architecture_engineering_core",
  "doc_id": "cgs",
  "source_path": "/home/yeff/public_html/devon/panel/data/cgs.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": "# CGS - COGNITIVE GOVERNANCE SPEC\nversion: v1.1\nstatus: ACTIVE\nmode: SATELLITE\nparent: master_architecture_index.md\ndocument_role: satellite_reference_only\n\n## PURPOSE\nDescribe governance context of cognition.\n\n## AUTHORITY\nAuthoritative source:\n- cas.md (architecture)\n- cfc.md (flow control)\n- sts.md (state logic)\n\n## RULE\nThis document may:\n- explain governance context\n- describe constraints\n- define governance separation between documentary and operational audit surfaces\n\nThis document may NOT:\n- define deterministic orchestration\n- define state transitions\n- override policy enforcement\n\n## DOCUMENTATION HUB RENDERING GOVERNANCE\n\nThe Documentation Hub must preserve the sovereign canonical hierarchy without replacing the existing Phase and Category structure.\n\nCanonical rendering hierarchy:\n- Phase\n- Category\n- Subcategory\n- Bucket\n- Item\n\nGovernance rule:\n- Phase and Category remain sovereign navigational layers\n- Subcategory is an additive process layer inside a Category\n- Bucket belongs to a Subcategory\n- Item belongs to a Bucket\n\nDocumentation Hub rendering policy:\n- left navigation must expose Phase -> Category\n- center workflow must expose Subcategory -> Bucket -> Item\n- Subcategories must organize process intent inside the selected Category\n- generic repeated bodies across different Subcategories are invalid unless canonically mapped to the same executable units\n\nCanonical subcategories:\n- Prerequisites\n- Installation\n- Configuration\n- Validation\n- Observable Evidence\n- Failure Modes & Recovery\n- Completion & Promotion\n\nBoundary law:\n- the Documentation Hub may organize canonical structure and documentary execution hierarchy\n- the Operator Panel may expose runtime truth and operational evidence\n- neither side may infer missing Subcategory, Bucket or Item structure without canonical declaration\n\n\n## AUDIT SPLIT GOVERNANCE\nDocumentation Hub governance:\n- canonical/document audit\n- authority ownership visibility\n- phase and layer binding visibility\n- dependency and documentation gap visibility\n\nOperator Panel governance:\n- operational/runtime audit\n- runtime evidence visibility\n- health, telemetry and execution-state visibility\n\nBoundary law:\n- the Documentation Hub may describe canon\n- the Operator Panel may report runtime reality\n- neither side may redefine the other's authority\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": "cgs",
    "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-28T15:29:46.603807+00:00",
    "authority": {
      "authority_owner": "cgs.md",
      "canonical_role": "canonical governance authority",
      "authority_scope": "governs how Devon architecture, engineering decisions, canonical control, rule ownership and authority boundaries are allowed to operate after CAS defines the cognitive architecture baseline",
      "governance_decision_domain": [
        "rule ownership",
        "authority separation",
        "canonical control",
        "downstream override prevention",
        "governance-to-contract escalation"
      ],
      "not_authority_for": [
        "cognitive architecture definition owned by cas.md",
        "artifact structure ownership owned by acs.md",
        "schema and interface definition owned by css.md",
        "runtime evidence ownership",
        "UI presentation ownership"
      ]
    },
    "required_before": [
      "structured contracts",
      "runtime enforcement",
      "schema hardening",
      "future Panel de Execução e Monitoramento governance checks",
      "IA Devon rule-bound execution behavior"
    ],
    "hard_dependencies": [
      "cas.md",
      "master_architecture_index.md"
    ],
    "feeds_operational_ui": [
      "contract_drawer",
      "dependency_drawer",
      "evidence_drawer",
      "governance_violation_panel",
      "future_panel_rule_resolution_engine"
    ],
    "bucket_contracts": {
      "Prerequisites": {
        "contract_role": "prove governance authority exists before the future panel accepts rule ownership, override prevention or canonical escalation as valid",
        "required_structural_fields": [
          "authority_owner",
          "canonical_role",
          "required_before",
          "hard_dependencies",
          "governance_decision_domain"
        ],
        "validation_mode": "schema_backed_transition",
        "parser_readiness": "medium"
      },
      "Installation": {
        "contract_role": "make CGS available in DH as the consultable governance authority that future panel checks use before trusting downstream contracts",
        "required_structural_fields": [
          "doc_id",
          "category_id",
          "phase_id",
          "documentation_branch_status",
          "source_path",
          "expected_bindings"
        ],
        "validation_mode": "schema_backed_transition",
        "parser_readiness": "medium"
      },
      "Configuration": {
        "contract_role": "bind governance to rule ownership and override limits without letting CGS redefine CAS architecture, ACS artifact shape or CSS schema details",
        "required_structural_fields": [
          "authority_scope",
          "governance_decision_domain",
          "not_authority_for",
          "blocked_override_classes"
        ],
        "validation_mode": "schema_backed_transition",
        "parser_readiness": "medium"
      },
      "Validation": {
        "contract_role": "convert governance into deterministic PASS, FAIL and MISSING checks for authority binding, rule ownership and downstream override attempts",
        "required_structural_fields": [
          "validation_checks",
          "pass_criteria",
          "fail_criteria",
          "missing_criteria"
        ],
        "validation_mode": "schema_backed_transition",
        "parser_readiness": "medium"
      },
      "Observable Evidence": {
        "contract_role": "show the files, ids, branches and mirrors proving CGS exists as the governance layer that the panel may consult",
        "required_structural_fields": [
          "evidence_paths",
          "expected_bindings",
          "observable_checks"
        ],
        "validation_mode": "schema_backed_transition",
        "parser_readiness": "medium"
      },
      "Failure Modes & Recovery": {
        "contract_role": "recover governance drift, duplicated authority, missing rule owner and downstream override contamination before panel decisions can proceed",
        "required_structural_fields": [
          "failure_modes",
          "recovery_actions",
          "rollback_or_safe_state"
        ],
        "validation_mode": "schema_backed_transition",
        "parser_readiness": "medium"
      },
      "Completion & Promotion": {
        "contract_role": "promote CGS only when it can guide panel governance checks as build-ready contract input without claiming runtime enforcement already exists",
        "required_structural_fields": [
          "done_when",
          "not_done_when",
          "promotion_gate",
          "canonization_gate"
        ],
        "validation_mode": "schema_backed_transition",
        "parser_readiness": "medium"
      }
    },
    "blocked_override_classes": [
      {
        "override_class": "architecture_override",
        "owner": "cas.md",
        "cgs_action": "block downstream governance text from redefining cognitive architecture"
      },
      {
        "override_class": "artifact_structure_override",
        "owner": "acs.md",
        "cgs_action": "block governance prose from becoming artifact schema or storage structure"
      },
      {
        "override_class": "schema_contract_override",
        "owner": "css.md",
        "cgs_action": "block CGS from replacing explicit machine-readable schema authority"
      },
      {
        "override_class": "runtime_truth_override",
        "owner": "runtime/support artifacts",
        "cgs_action": "block governance authority from being treated as material runtime evidence"
      }
    ],
    "validation_checks": [
      {
        "check_id": "cgs_doc_identity",
        "type": "exact_value",
        "path": "$.doc_id",
        "expected": "cgs",
        "on_fail": "FAIL"
      },
      {
        "check_id": "cgs_category_binding",
        "type": "exact_value",
        "path": "$.category_id",
        "expected": "architecture_engineering_core",
        "on_fail": "FAIL"
      },
      {
        "check_id": "cgs_phase_binding",
        "type": "exact_value",
        "path": "$.phase_id",
        "expected": "phase-02",
        "on_fail": "FAIL"
      },
      {
        "check_id": "cgs_branch_status",
        "type": "exact_value",
        "path": "$.documentation_branch_status",
        "expected": "CUSTOM_BRANCH",
        "on_fail": "FAIL"
      },
      {
        "check_id": "cgs_source_markdown_present",
        "type": "non_empty_string",
        "path": "$.source_payload.raw_markdown",
        "on_missing": "MISSING",
        "on_fail": "FAIL"
      },
      {
        "check_id": "cgs_authority_owner_declared",
        "type": "exact_value",
        "path": "$.structural_contract.authority.authority_owner",
        "expected": "cgs.md",
        "on_fail": "FAIL"
      },
      {
        "check_id": "cgs_depends_on_cas",
        "type": "array_contains",
        "path": "$.structural_contract.hard_dependencies",
        "expected": "cas.md",
        "on_fail": "FAIL"
      },
      {
        "check_id": "cgs_not_engine_final",
        "type": "exact_value",
        "path": "$.engine_grade_final",
        "expected": false,
        "on_fail": "FAIL"
      }
    ],
    "evidence_paths": [
      "/home/yeff/public_html/devon/panel/data/cgs.md",
      "/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/cgs.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 === \"cgs\" && state.categoryId === \"architecture_engineering_core\")"
      },
      {
        "binding": "hub_index_phase",
        "expected_phase_id": "phase-02"
      },
      {
        "binding": "hub_index_category",
        "expected_category_id": "architecture_engineering_core"
      },
      {
        "binding": "upstream_dependency",
        "expected_dependency": "cas.md"
      }
    ],
    "failure_modes": [
      {
        "failure_id": "cgs_source_missing",
        "status": "MISSING",
        "meaning": "CGS source markdown cannot be read from the declared source path",
        "recovery_action": "restore /home/yeff/public_html/devon/panel/data/cgs.md before governance hardening can continue"
      },
      {
        "failure_id": "cgs_unbound_from_phase02",
        "status": "FAIL",
        "meaning": "CGS is present but not bound to Phase 02 Architecture & Engineering Canon",
        "recovery_action": "restore hub_index and docs/index binding to phase-02 / architecture_engineering_core"
      },
      {
        "failure_id": "governance_without_cas_dependency",
        "status": "FAIL",
        "meaning": "CGS attempts to govern architecture without depending on CAS as upstream cognitive architecture authority",
        "recovery_action": "restore cas.md as hard dependency and block CGS promotion until dependency resolution passes"
      },
      {
        "failure_id": "duplicated_governance_authority",
        "status": "FAIL",
        "meaning": "another document or panel artifact claims the same governance ownership as CGS",
        "recovery_action": "revoke duplicated governance ownership and restore CGS as Phase 02 governance authority"
      },
      {
        "failure_id": "governance_promoted_as_runtime_enforcement",
        "status": "FAIL",
        "meaning": "CGS guidance is being treated as material runtime enforcement before panel checks exist",
        "recovery_action": "return CGS to ACTIVE_DH_MIRROR / HARDENING_PARTIAL and require executable panel validation before any engine-grade promotion"
      }
    ],
    "promotion_gates": {
      "done_when": [
        "CGS source exists materially",
        "CGS is registered under Phase 02",
        "CGS has a custom Documentation Hub branch",
        "CGS JSON mirror contains structural_contract",
        "CGS depends on CAS and master_architecture_index",
        "CGS exposes rule ownership, blocked override classes and governance decision domain as parseable fields"
      ],
      "not_done_when": [
        "source markdown is missing",
        "CGS category binding is wrong",
        "CAS dependency is absent",
        "governance ownership is duplicated",
        "CGS is treated as runtime enforcement instead of governance contract input",
        "engine_grade_final is set true before deterministic schema validation exists"
      ],
      "promotion_gate": "CGS may move from ACTIVE_DH_MIRROR to HARDENING_PARTIAL after structural_contract exists and verifies, but must not become engine_grade_final until governance checks, override boundaries and dependency rules are fully schema-backed.",
      "canonization_gate": "CGS remains canonical DH mirror until governance authority, override prevention, dependency binding, evidence, failure and promotion checks can be consumed without semantic prose interpretation."
    },
    "parser_readiness_after_patch": "medium",
    "blocked_until_engine_grade_final": [
      "all governance checks resolve from JSON key paths",
      "blocked override classes are machine-checkable",
      "rule ownership conflicts produce deterministic FAIL",
      "missing upstream governance dependency produces deterministic MISSING or FAIL according to declared check",
      "future operational panel can consume CGS without reading source prose"
    ],
    "source_signal_audit": {
      "raw_markdown_contains_governance_terms": true,
      "raw_markdown_contains_dependency_terms": true,
      "matched_governance_lines_sample": [
        "# CGS - COGNITIVE GOVERNANCE SPEC",
        "Describe governance context of cognition.",
        "## AUTHORITY",
        "- cfc.md (flow control)",
        "## RULE",
        "- explain governance context",
        "- define governance separation between documentary and operational audit surfaces",
        "## DOCUMENTATION HUB RENDERING GOVERNANCE",
        "The Documentation Hub must preserve the sovereign canonical hierarchy without replacing the existing Phase and Category structure.",
        "Canonical rendering hierarchy:",
        "Governance rule:",
        "- generic repeated bodies across different Subcategories are invalid unless canonically mapped to the same executable units",
        "Canonical subcategories:",
        "- the Documentation Hub may organize canonical structure and documentary execution hierarchy",
        "- neither side may infer missing Subcategory, Bucket or Item structure without canonical declaration",
        "## AUDIT SPLIT GOVERNANCE",
        "Documentation Hub governance:",
        "- canonical/document audit",
        "- authority ownership visibility",
        "Operator Panel governance:"
      ],
      "matched_dependency_lines_sample": [
        "parent: master_architecture_index.md",
        "- cas.md (architecture)",
        "- dependency and documentation gap visibility"
      ],
      "audit_note": "source_signal_audit is evidence support only; structural_contract remains governed by Phase 02 queue, hub binding and canonical master registration"
    }
  }
}
