{
  "id": "execution_ledger",
  "label": "Execution Ledger Canonical",
  "phase": "phase-07",
  "category": "observability_audit",
  "status": "ACTIVE_DH_MIRROR",
  "purpose": "Define how DEVON-DEV records every executed or blocked operation as a reconstructable ledger event before audit, observability, recovery, learning or promotion can trust the run.",
  "function": "Create the operational truth table of execution by binding task_id, action, environment, FSM decision, tool used, command, output, affected files, backup_id, result, evidence and timestamp into a durable record for every action.",
  "ledger_contract": {
    "requires_task_id": true,
    "requires_action": true,
    "requires_environment": true,
    "requires_fsm_decision": true,
    "requires_tool_used": true,
    "requires_command": true,
    "requires_output": true,
    "requires_affected_files": true,
    "requires_backup_id": true,
    "requires_result": true,
    "requires_evidence": true,
    "requires_timestamp": true,
    "records_allowed_actions": true,
    "records_blocked_actions": true,
    "records_failed_actions": true,
    "records_recovery_actions": true,
    "blocks_unlogged_execution": true,
    "requires_immutable_event_identity": true,
    "decision_authority": "NONE_FSM_DECIDES"
  },
  "technology_requirements": [
    {
      "technology": "Execution Ledger Store",
      "required_for": "Persist every DEVON-DEV action, command, tool call, FSM decision, environment target, affected file, backup reference, evidence reference and result as an auditable event.",
      "required_by_phase": "phase-07",
      "required_by_category": "execution_ledger",
      "required_by_buckets": [
        "Prerequisites",
        "Installation",
        "Configuration",
        "Validation",
        "Observable Evidence",
        "Failure Modes & Recovery",
        "Completion & Promotion"
      ],
      "expected_version": "MISSING until ledger schema, durable storage and event identity exist",
      "validation_command": "MISSING until ledger writes can prove task_id, action, environment, fsm_decision, tool_used, result, evidence and timestamp",
      "evidence_path": "/home/yeff/public_html/devon/canon/execution/state/dh_sources/execution_ledger_canonical.json",
      "status_source": "Documentation Hub + future Execution Ledger Store + future devon-api-core + future devon-server-ops",
      "blocking_if_missing": true,
      "failure_impact": "Without Execution Ledger Store, DEVON-DEV can execute work that cannot be reconstructed, audited, learned from, recovered or safely promoted."
    },
    {
      "technology": "FSM Decision Link",
      "required_for": "Attach each ledger event to the FSM decision that allowed, blocked, failed or required approval for the action.",
      "required_by_phase": "phase-07",
      "required_by_category": "execution_ledger",
      "required_by_buckets": [
        "Configuration",
        "Validation",
        "Observable Evidence",
        "Failure Modes & Recovery",
        "Completion & Promotion"
      ],
      "expected_version": "MISSING until FSM decision records expose stable decision identifiers",
      "validation_command": "MISSING until ledger event can prove fsm_decision, rule source, gate state and action outcome",
      "evidence_path": "/home/yeff/public_html/devon/canon/execution/state/dh_sources/execution_ledger_canonical.json",
      "status_source": "Documentation Hub + future FSM Decision Core + Decision Rule Registry + Execution Ledger Store",
      "blocking_if_missing": true,
      "failure_impact": "Without FSM Decision Link, the ledger records activity but cannot prove why an action was allowed or blocked."
    },
    {
      "technology": "Tool Invocation Recorder",
      "required_for": "Record the tool, command, parameters, output, timeout, environment and result for filesystem, shell, test, build, deploy, rollback and external access actions.",
      "required_by_phase": "phase-07",
      "required_by_category": "execution_ledger",
      "required_by_buckets": [
        "Installation",
        "Configuration",
        "Validation",
        "Observable Evidence",
        "Failure Modes & Recovery"
      ],
      "expected_version": "MISSING until Tool Registry and server operations emit invocation records",
      "validation_command": "MISSING until tool invocation can prove tool_used, command, output, timeout, affected_files, environment and result",
      "evidence_path": "/home/yeff/public_html/devon/canon/execution/state/dh_sources/execution_ledger_canonical.json",
      "status_source": "Documentation Hub + future Tool Registry + future devon-server-ops + Execution Ledger Store",
      "blocking_if_missing": true,
      "failure_impact": "Without Tool Invocation Recorder, server actions can exist as outcomes without the operational input needed to debug or audit them."
    },
    {
      "technology": "Evidence Snapshot Link",
      "required_for": "Bind each ledger event to the evidence snapshot used to justify or validate the action.",
      "required_by_phase": "phase-07",
      "required_by_category": "execution_ledger",
      "required_by_buckets": [
        "Configuration",
        "Validation",
        "Observable Evidence",
        "Failure Modes & Recovery",
        "Completion & Promotion"
      ],
      "expected_version": "MISSING until Evidence Store exposes accepted evidence references",
      "validation_command": "MISSING until ledger event can prove accepted evidence, evidence hash, source path or URL, and validation state",
      "evidence_path": "/home/yeff/public_html/devon/canon/execution/state/dh_sources/execution_ledger_canonical.json",
      "status_source": "Documentation Hub + future Evidence Store + Architecture Source Registry + Execution Ledger Store",
      "blocking_if_missing": true,
      "failure_impact": "Without Evidence Snapshot Link, DEVON-DEV cannot prove what material state or source justified the action."
    }
  ],
  "depends_on": [
    "oac",
    "fsm_absolute_decision",
    "decision_rule_registry",
    "tool_registry",
    "artifact_registry",
    "validation_matrix",
    "server_workspace_manager",
    "environment_registry",
    "filesystem_operations",
    "shell_execution",
    "backup_rollback",
    "production_deployment_gate",
    "runtime_status_support",
    "architecture_source_registry"
  ],
  "used_by": [
    "execution_logs",
    "audit_trail",
    "runtime_row_semantics",
    "observability_core",
    "self_monitoring",
    "patch_outcome_tracker",
    "governed_feedback_loop",
    "incident_management",
    "future_execution_monitoring_panel"
  ]
}
