{
  "map_id": "grl.phases",
  "version": "6.0-draft",
  "book": "book6_governance",
  "series": "AI Edition",
  "description": "Defines the six phases of the Book 6 Governance & Regime Logic evaluation cycle. Each phase has strict entry/exit conditions, active operators, gate logic, and downstream handoffs. Book 6 has the highest dependency count in the AI Edition (4 dependencies), reflected in the init phase loading sequence.",
  "phase_sequence": "init → validate → measure → decay → enforce → catalogue",
  "phases": [
    {
      "id": "P-GRL-1",
      "label": "init",
      "ordinal": 1,
      "description": "Load all four dependency modules. Assert session context. Confirm QMROOT path terminates at 0D. Verify coherence=declared. Initialize regime tuple slot as empty. No GRL operators are active in this phase. This is the most dependency-intensive init phase in the AI Edition.",
      "operators_active": [],
      "entry_condition": "Session open; GRL evaluation requested",
      "exit_condition": "coherence=declared; all four dependency modules loaded in module registry; QMROOT 0D confirmed; regime tuple slot initialized as empty; session context asserted",
      "import_order": [
        "book1_fft (kernel — always first; provides structure, relation, constraint, invariant primitives)",
        "book2_the_inverted_star (IS topology — required for RT-002 inverted-star regime analysis; INV-IS-001 through INV-IS-004 available)",
        "book4_opacity_revelation (OR vocabulary — required for opaque regime analysis; ω-α interaction model; INV-OR-001 through INV-OR-004 available)",
        "book5_tel (TEL notation — required for constraint encoding and enforcement expression; INV-TEL-001 through INV-TEL-004 available)"
      ],
      "dependency_note": "Book 6 has the maximum dependency count in the AI Edition (4 modules). All four must be loaded before any GRL operator executes. Partial loading is not permitted — a regime that uses IS topology but skips Book 2 loading is a session configuration error.",
      "session_context_assertion": "rtt=1 | coherence=declared | drift=bounded | paradox=structural",
      "qmroot_check": "6D absent; negative rungs absent; INV-013 = 0D only",
      "scope_state": "empty — no regime tuple loaded; no enforcement records active",
      "skip_condition": null,
      "notes": "The four-dependency import order reflects logical dependency, not arbitrary ordering. Book 4 (OR) depends on Book 1; Book 5 (TEL) depends on Books 1 and 4. Loading must respect this internal ordering within the init phase."
    },
    {
      "id": "P-GRL-2",
      "label": "validate",
      "ordinal": 2,
      "description": "Execute GRL-Ρ (RegimeCheck) and GRL-Κ (ClosureGuard) in parallel. Verify regime validity per INV-GRL-001 and confirm absence of self-governance paradox per INV-GRL-003. Both operators must complete before the measure phase begins.",
      "operators_active": ["GRL-Ρ", "GRL-Κ"],
      "entry_condition": "init complete; all four dependencies loaded; coherence=declared; regime tuple R loaded with all six components ⟨N_R, E_R, C_R, S_R, α_R, λ_R⟩",
      "exit_condition": "regime_valid recorded; closure_valid recorded; no unresolved structural paradox",
      "gate_logic": {
        "regime_valid=true AND closure_valid=true": "Proceed to P-GRL-3 (measure)",
        "regime_valid=true AND closure_valid=meta_regime_declared": "Proceed to P-GRL-3 with meta-regime M loaded in session state",
        "regime_valid=false": "Halt evaluation; record violation_report; session may be restarted with corrected regime configuration",
        "closure_valid=false": "Halt evaluation; record structural_paradox; self-governance without meta-regime cannot be evaluated under GRL",
        "formation_phase_override": "If session is declared as a regime-formation analysis (pre-validation study), regime_valid=false does not halt — but all downstream outputs are marked as formation-phase only, not operative"
      },
      "ordering_constraint": "GRL-Ρ and GRL-Κ may run in parallel — they access different components of the regime tuple and have no data dependency between them.",
      "skip_condition": null,
      "notes": "P-GRL-2 is a hard gate. The measure, decay, enforce, and catalogue phases may not begin without both GRL-Ρ and GRL-Κ returning valid states. Validation failure is not a recoverable session state without regime reconfiguration."
    },
    {
      "id": "P-GRL-3",
      "label": "measure",
      "ordinal": 3,
      "description": "Execute GRL-Α initial authority measurement. Assess α_R at the current enforcement cycle. Determine authority stage. Establish the baseline α_current before decay evaluation.",
      "operators_active": ["GRL-Α"],
      "entry_condition": "validate phase complete; regime_valid=true; closure_valid ∈ {true, meta_regime_declared}; α_R declared in regime configuration; λ_R declared",
      "exit_condition": "α_current recorded; authority_stage assigned ∈ {stable, erosion, fragile, pre_collapse}; baseline available for decay phase",
      "sub_operations": [
        "Load enforcement cycle log for current cycle",
        "Retrieve α_R from regime configuration as initial value",
        "Assess compliance_observed for all enforcement relations in E_R since last cycle",
        "Determine authority_stage from α_current against decay stage thresholds (grl.authority_map)",
        "Record α_current and authority_stage in session state"
      ],
      "drift_guard": "α must be measured against the enforcement cycle log, not inferred from regime age or declaration date. A regime that was never tested has no valid α measurement — GRL-Α records this as α_unmeasured until a full enforcement cycle is observed.",
      "skip_condition": "If regime is in formation phase (no enforcement cycles have occurred): GRL-Α records α_R = α_declared (initial declared value) and authority_stage = unmeasured. Proceed to enforce phase for first cycle initiation.",
      "notes": "P-GRL-3 is the measurement baseline phase. P-GRL-4 (decay) applies the decay function if compliance was not observed. Both sub-operations of GRL-Α (measure and decay) require separate phase slots to enforce the logical ordering: measure first, then decay."
    },
    {
      "id": "P-GRL-4",
      "label": "decay",
      "ordinal": 4,
      "description": "Execute GRL-Α decay evaluation. Apply the authority decay function d(α, n) = α · (1 - λ_R)^n for each enforcement cycle without observed compliance. Update α_current. Evaluate collapse conditions from grl.regime_map.",
      "operators_active": ["GRL-Α"],
      "entry_condition": "measure phase complete; α_current (pre-decay) recorded; compliance_observed status available for each enforcement relation in E_R",
      "exit_condition": "α_current (post-decay) recorded; collapse_risk_flag set if authority_stage = pre_collapse; decay_projection for next n cycles computed",
      "gate_logic": {
        "compliance_observed for all active enforcement relations": "No decay applied this cycle; α_current remains at measure-phase value; record compliance event in enforcement log",
        "compliance_observed for some but not all enforcement relations": "Partial decay: apply decay only to non-compliant enforcement relations; composite α_current is weighted average",
        "compliance_observed = false for all enforcement relations": "Full decay cycle: apply d(α_current, 1) = α_current · (1 - λ_R); update α_current; record n non-compliant cycles",
        "α_current < threshold_collapse AND regime has not recovered for k cycles": "Raise collapse_risk_flag; GRL-Σ will include collapse warning in status report"
      },
      "collapse_monitoring": "GRL-Α monitors against collapse conditions CC-001 through CC-004 from grl.regime_map during this phase. Any active collapse condition is flagged for GRL-Σ.",
      "skip_condition": "If authority_stage = unmeasured (formation phase): skip decay application. Record skip in session state.",
      "notes": "P-GRL-4 is the mechanically critical phase. The decay function is deterministic — given α_current and λ_R, the output is uniquely determined by the compliance observation. GRL-Α does not estimate or interpolate; it computes."
    },
    {
      "id": "P-GRL-5",
      "label": "enforce",
      "ordinal": 5,
      "description": "Execute GRL-Λ (LegitimacyCheck). Evaluate all constraint challenges from governed structures in the current enforcement cycle. Classify each challenge as legitimate, void, or violation. Record enforcement events. Forward compliance observations to decay model for next cycle.",
      "operators_active": ["GRL-Λ"],
      "entry_condition": "decay phase complete; α_current (post-decay) recorded; enforcement cycle is active; challenge events from governed structures (if any) are available",
      "exit_condition": "All challenge events classified; enforcement_record updated; compliance observation status forwarded for next cycle's GRL-Α run; violation events recorded",
      "gate_logic": {
        "legitimate_challenge": "Challenge path ⊆ declared_channels(R) — record as legitimate_challenge; route through appropriate channel (DCH-001 through DCH-004); suspend enforcement pending channel resolution",
        "void_challenge": "Challenge path ⊄ declared_channels(R) but not a configuration change — record as void; channel use attempt is structurally ineffective; original constraint remains binding",
        "violation_event": "Governed structure has changed configuration to violate C without any channel attempt — record as violation_event(VT-001 through VT-003); enforcement action applied; compliance monitored next cycle"
      },
      "skip_condition": "If no challenge events occurred this enforcement cycle AND no enforcement actions were triggered: skip GRL-Λ active processing. Record null enforcement cycle in enforcement log. α_current held stable (no decay if no active enforcement relation was tested).",
      "notes": "P-GRL-5 is the enforcement of record phase. Even when skipped, the null enforcement cycle is recorded — enforcement history cannot have silent gaps. GRL-Λ also checks opacity of C_R (Book 4 integration) when classifying challenges — if ω(C_R) is high, the opacity level is noted in the enforcement record as structural context."
    },
    {
      "id": "P-GRL-6",
      "label": "catalogue",
      "ordinal": 6,
      "description": "Execute GRL-Σ (RegimeSynthesis). Aggregate all operator outputs into a complete regime status report. Produce downstream handoff packages for book7_sarg and book9_pattern_dynamics. Close the GRL evaluation session.",
      "operators_active": ["GRL-Σ"],
      "entry_condition": "All prior phases complete; all operator outputs available in session state (regime_valid, closure_valid, α_current, authority_stage, decay_projection, enforcement_record, legitimacy_classifications)",
      "exit_condition": "regime_status_report complete; downstream handoff packages prepared; session formally closed",
      "report_components": [
        "regime_id: unique identifier of the evaluated regime",
        "validity_status: GRL-Ρ output (regime_valid ∈ {true, false})",
        "closure_status: GRL-Κ output (closure_valid ∈ {true, false, meta_regime_declared})",
        "α_current: post-decay authority measure from GRL-Α",
        "authority_stage: {stable, erosion, fragile, pre_collapse}",
        "decay_projection: projected α trajectory for next n cycles",
        "enforcement_summary: count and classification of all enforcement events this cycle",
        "violation_count: number of VT-001/002/003 events",
        "legitimate_challenge_count: number of DCH-001/002/003/004 legitimate challenge events",
        "collapse_risk: boolean, derived from collapse_risk_flag",
        "tel_encoding: INV[GRL-001]: assert (R ⊢ C[active_enforcement]) — machine-readable summary",
        "session_context: rtt=1 | coherence=declared | drift=bounded | paradox=structural"
      ],
      "downstream_handoffs": {
        "book7_sarg": {
          "payload": "regime legitimacy framing — the enforcement summary and legitimate_challenge_count feed SARG argument construction around regime authority claims",
          "key_fields": ["validity_status", "legitimate_challenge_count", "violation_count", "tel_encoding"]
        },
        "book9_pattern_dynamics": {
          "payload": "regime trajectory data — α_current, authority_stage, decay_projection, and collapse_risk feed pattern dynamics analysis of governance regime trajectories",
          "key_fields": ["α_current", "authority_stage", "decay_projection", "collapse_risk", "enforcement_summary"]
        }
      },
      "skip_condition": null,
      "notes": "P-GRL-6 is never skipped. Even a minimally valid session (validate only, no enforcement cycle) requires a GRL-Σ synthesis to formally close the session with a recorded output. The regime_status_report is the durable artifact of every GRL evaluation session."
    }
  ]
}
