import{_ as t,o as i,c as d,ag as a}from"./chunks/framework.CmQHR1bQ.js";const h=JSON.parse('{"title":"Unified Event Taxonomy for Kush Ecosystem","description":"","frontmatter":{},"headers":[],"relativePath":"traceability/EVENT_TAXONOMY.md","filePath":"traceability/EVENT_TAXONOMY.md"}'),n={name:"traceability/EVENT_TAXONOMY.md"};function o(s,e,c,r,l,p){return i(),d("div",null,[...e[0]||(e[0]=[a(`<h1 id="unified-event-taxonomy-for-kush-ecosystem" tabindex="-1">Unified Event Taxonomy for Kush Ecosystem <a class="header-anchor" href="#unified-event-taxonomy-for-kush-ecosystem" aria-label="Permalink to &quot;Unified Event Taxonomy for Kush Ecosystem&quot;">​</a></h1><p><strong>Date:</strong> 2026-02-21 <strong>Scope:</strong> CIV simulation events + Venture autonomy events + cross-track event flows <strong>Status:</strong> ACTIVE <strong>Owner:</strong> Kush Ecosystem Integration Team</p><hr><h2 id="executive-summary" tabindex="-1">Executive Summary <a class="header-anchor" href="#executive-summary" aria-label="Permalink to &quot;Executive Summary&quot;">​</a></h2><p>This document defines the unified event taxonomy covering both CIV (city simulation) and Venture (autonomous agent platform) systems. It establishes:</p><ol><li><strong>CIV Event Catalog</strong>: Simulation lifecycle, policy evaluation, economy, energy, institutions, and citizen metrics</li><li><strong>Venture Event Catalog</strong>: Workflow orchestration, artifact compilation, treasury authorization, compliance operations</li><li><strong>Cross-Track Event Flows</strong>: How CIV events are relayed through Venture event bus, and how Venture events trigger CIV state updates</li></ol><p>All events conform to <code>EventEnvelopeV1</code> schema defined in <code>API_EVENTS_SPEC.md</code> and <code>TRACK_C_CONTROL_PLANE.md</code>.</p><hr><h2 id="event-envelope-contract-foundation" tabindex="-1">Event Envelope Contract (Foundation) <a class="header-anchor" href="#event-envelope-contract-foundation" aria-label="Permalink to &quot;Event Envelope Contract (Foundation)&quot;">​</a></h2><p>All events in both CIV and Venture adhere to this envelope:</p><div class="language-json vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">json</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  &quot;event_id&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;string (UUID)&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  &quot;event_type&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;string (namespace.resource.action.version)&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  &quot;workflow_id&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;string (UUID, links to parent workflow)&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  &quot;task_id&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;string (UUID, links to parent task)&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  &quot;trace_id&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;string (UUID, end-to-end request tracing)&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  &quot;policy_bundle_id&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;string (version, event evaluated under this policy)&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  &quot;payload&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;object (event-specific data)&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  &quot;created_at&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;timestamp (ISO 8601)&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  &quot;source_system&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;string (civ | venture)&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  &quot;replay_token&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;string (idempotency key for deterministic replay)&quot;</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><hr><h2 id="part-1-civ-event-catalog" tabindex="-1">Part 1: CIV Event Catalog <a class="header-anchor" href="#part-1-civ-event-catalog" aria-label="Permalink to &quot;Part 1: CIV Event Catalog&quot;">​</a></h2><p>Events emitted from the CIV simulation system.</p><h3 id="_1-1-simulation-lifecycle-events-run" tabindex="-1">1.1 Simulation Lifecycle Events (run.*) <a class="header-anchor" href="#_1-1-simulation-lifecycle-events-run" aria-label="Permalink to &quot;1.1 Simulation Lifecycle Events (run.*)&quot;">​</a></h3><table tabindex="0"><thead><tr><th>Event Name</th><th>Fully Qualified</th><th>Payload Schema</th><th>Emitted By</th><th>Purpose</th><th>Version</th></tr></thead><tbody><tr><td>Run Started</td><td><code>civ.run.started.v1</code></td><td><code>{run_id, simulation_seed, tick_count_target, config_snapshot, policy_bundle_id}</code></td><td>Simulation engine</td><td>Marks simulation initialization</td><td>v1</td></tr><tr><td>Run Completed</td><td><code>civ.run.completed.v1</code></td><td><code>{run_id, tick_count_executed, final_state_hash, event_count, duration_ms}</code></td><td>Simulation engine</td><td>Marks simulation completion</td><td>v1</td></tr><tr><td>Run Failed</td><td><code>civ.run.failed.v1</code></td><td><code>{run_id, error_code, error_message, tick_id_when_failed, state_snapshot}</code></td><td>Simulation engine</td><td>Records fatal errors during simulation</td><td>v1</td></tr><tr><td>Tick Started</td><td><code>civ.tick.started.v1</code></td><td><code>{run_id, tick_id, tick_sequence, phase_order}</code></td><td>Core simulation loop</td><td>Marks tick initialization</td><td>v1</td></tr><tr><td>Tick Completed</td><td><code>civ.tick.completed.v1</code></td><td><code>{run_id, tick_id, state_hash_after, sub_events_count, duration_ms, phase_hashes}</code></td><td>Core simulation loop</td><td>Marks tick completion with state verification</td><td>v1</td></tr></tbody></table><p><strong>Payload Schema Details:</strong></p><ul><li><code>run_id</code>: Unique identifier for a simulation run (immutable after creation)</li><li><code>simulation_seed</code>: RNG seed for reproducibility; pinned in replay</li><li><code>tick_count_target</code>: Expected number of ticks (from policy config)</li><li><code>final_state_hash</code>: SHA256(compressed_state); used for determinism verification</li><li><code>phase_order</code>: Array of phase names in deterministic order (e.g., <code>[&quot;demographics&quot;, &quot;policy&quot;, &quot;economy&quot;, &quot;spatial&quot;]</code>)</li></ul><hr><h3 id="_1-2-policy-evaluation-events-policy" tabindex="-1">1.2 Policy Evaluation Events (policy.*) <a class="header-anchor" href="#_1-2-policy-evaluation-events-policy" aria-label="Permalink to &quot;1.2 Policy Evaluation Events (policy.*)&quot;">​</a></h3><table tabindex="0"><thead><tr><th>Event Name</th><th>Fully Qualified</th><th>Payload Schema</th><th>Emitted By</th><th>Purpose</th><th>Version</th></tr></thead><tbody><tr><td>Policy Evaluated</td><td><code>civ.policy.evaluated.v1</code></td><td><code>{tick_id, policy_type, policy_bundle_id, control_decision, affected_entity_count, evaluation_duration_ms}</code></td><td>Policy engine (CIV-0100)</td><td>Records policy evaluation and control decision</td><td>v1</td></tr><tr><td>Policy Applied</td><td><code>civ.policy.applied.v1</code></td><td><code>{tick_id, policy_type, control_decision, entities_affected, ledger_updates_count, state_delta}</code></td><td>Policy engine</td><td>Records actual application of policy control</td><td>v1</td></tr><tr><td>Constraint Violation Detected</td><td><code>civ.policy.constraint_violation.v1</code></td><td><code>{tick_id, constraint_name, entity_id, actual_value, max_value, severity_level}</code></td><td>Policy engine / Verifier</td><td>Records when a constraint (CIV-0104) is violated</td><td>v1</td></tr></tbody></table><p><strong>Payload Schema Details:</strong></p><ul><li><code>policy_type</code>: One of <code>fiscal</code>, <code>labor_market</code>, <code>environmental</code>, <code>institutional</code></li><li><code>control_decision</code>: The control action selected (e.g., <code>&quot;subsidize_sector_X&quot;</code>, <code>&quot;raise_tax_rate&quot;</code>)</li><li><code>evaluation_duration_ms</code>: Cost of running <code>policy.evaluate()</code> function (for Venture tool budgeting)</li><li><code>severity_level</code>: <code>critical</code> | <code>warning</code> | <code>info</code></li></ul><hr><h3 id="_1-3-economy-events-economy" tabindex="-1">1.3 Economy Events (economy.*) <a class="header-anchor" href="#_1-3-economy-events-economy" aria-label="Permalink to &quot;1.3 Economy Events (economy.*)&quot;">​</a></h3><table tabindex="0"><thead><tr><th>Event Name</th><th>Fully Qualified</th><th>Payload Schema</th><th>Emitted By</th><th>Purpose</th><th>Version</th></tr></thead><tbody><tr><td>Market Cleared</td><td><code>civ.economy.market_cleared.v1</code></td><td><code>{tick_id, market_type, supply_qty, demand_qty, equilibrium_price, clearing_efficiency}</code></td><td>Market clearing engine</td><td>Records supply-demand equilibrium</td><td>v1</td></tr><tr><td>Transfer Booked</td><td><code>civ.economy.transfer_booked.v1</code></td><td><code>{tick_id, sender_id, receiver_id, amount, transfer_reason, ledger_account_pair}</code></td><td>Double-entry ledger engine</td><td>Records debit/credit transaction</td><td>v1</td></tr><tr><td>Account Balance Updated</td><td><code>civ.economy.balance_updated.v1</code></td><td><code>{tick_id, account_id, balance_before, balance_after, delta_reason}</code></td><td>Double-entry ledger engine</td><td>Records account balance change</td><td>v1</td></tr><tr><td>Supply Stress</td><td><code>civ.economy.supply_stress.v1</code></td><td><code>{tick_id, market_type, supply_shortfall, stress_multiplier, price_impact}</code></td><td>Supply-demand engine (CIV-0102)</td><td>Records when supply &lt; demand</td><td>v1</td></tr><tr><td>Market Price Changed</td><td><code>civ.economy.price_changed.v1</code></td><td><code>{tick_id, market_type, price_before, price_after, price_change_pct, reason}</code></td><td>Market clearing engine</td><td>Records price discovery and changes</td><td>v1</td></tr></tbody></table><p><strong>Payload Schema Details:</strong></p><ul><li><code>market_type</code>: One of <code>labor</code>, <code>goods</code>, <code>capital</code>, <code>energy</code></li><li><code>clearing_efficiency</code>: Float [0, 1]; 1.0 = perfect clearing, 0.5 = significant excess</li><li><code>ledger_account_pair</code>: <code>{debit_account: string, credit_account: string}</code> for accounting reconciliation</li><li><code>supply_shortfall</code>: Quantity units; used by Venture for quota model validation</li></ul><hr><h3 id="_1-4-energy-accounting-events-energy" tabindex="-1">1.4 Energy Accounting Events (energy.*) <a class="header-anchor" href="#_1-4-energy-accounting-events-energy" aria-label="Permalink to &quot;1.4 Energy Accounting Events (energy.*)&quot;">​</a></h3><table tabindex="0"><thead><tr><th>Event Name</th><th>Fully Qualified</th><th>Payload Schema</th><th>Emitted By</th><th>Purpose</th><th>Version</th></tr></thead><tbody><tr><td>Energy Consumed</td><td><code>civ.energy.consumed.v1</code></td><td><code>{tick_id, consumer_entity_id, energy_qty, source_type, consumption_reason}</code></td><td>Energy ledger (CIV-0102)</td><td>Records energy consumption</td><td>v1</td></tr><tr><td>Energy Generated</td><td><code>civ.energy.generated.v1</code></td><td><code>{tick_id, producer_entity_id, energy_qty, source_type, capacity_utilization_pct}</code></td><td>Energy ledger</td><td>Records energy production</td><td>v1</td></tr><tr><td>Energy Stored</td><td><code>civ.energy.stored.v1</code></td><td><code>{tick_id, storage_entity_id, energy_qty_added, storage_capacity_before, storage_capacity_after}</code></td><td>Energy ledger</td><td>Records energy reserve changes</td><td>v1</td></tr><tr><td>Supply-Demand Balance</td><td><code>civ.energy.balance.v1</code></td><td><code>{tick_id, supply_total, demand_total, reserves_delta, conservation_check_passed}</code></td><td>Energy ledger</td><td>Records energy conservation equation results</td><td>v1</td></tr><tr><td>Renewable Variability</td><td><code>civ.energy.renewable_variability.v1</code></td><td><code>{tick_id, renewable_source_id, expected_output, actual_output, variance_pct}</code></td><td>Energy ledger</td><td>Records renewable source variability</td><td>v1</td></tr></tbody></table><p><strong>Payload Schema Details:</strong></p><ul><li><code>energy_qty</code>: Joules (CIV-0107 unit system)</li><li><code>source_type</code>: One of <code>renewable</code>, <code>fossil</code>, <code>nuclear</code>, <code>storage</code></li><li><code>conservation_check_passed</code>: Boolean; failure indicates determinism bug</li><li><code>variance_pct</code>: Percentage deviation from expected; used for peak-shaving policy triggers</li></ul><hr><h3 id="_1-5-citizen-lifecycle-events-citizen" tabindex="-1">1.5 Citizen Lifecycle Events (citizen.*) <a class="header-anchor" href="#_1-5-citizen-lifecycle-events-citizen" aria-label="Permalink to &quot;1.5 Citizen Lifecycle Events (citizen.*)&quot;">​</a></h3><table tabindex="0"><thead><tr><th>Event Name</th><th>Fully Qualified</th><th>Payload Schema</th><th>Emitted By</th><th>Purpose</th><th>Version</th></tr></thead><tbody><tr><td>Citizen Born</td><td><code>civ.citizen.born.v1</code></td><td><code>{tick_id, citizen_id, parent_ids, birth_location, genetic_traits}</code></td><td>Demographic engine (CIV-0103)</td><td>Records citizen birth</td><td>v1</td></tr><tr><td>Citizen Education Updated</td><td><code>civ.citizen.education_updated.v1</code></td><td><code>{tick_id, citizen_id, education_level_before, education_level_after, institution_id}</code></td><td>Education subsystem</td><td>Records education progression</td><td>v1</td></tr><tr><td>Citizen Career Changed</td><td><code>civ.citizen.career_changed.v1</code></td><td><code>{tick_id, citizen_id, old_career, new_career, employer_id, salary_before, salary_after}</code></td><td>Labor market engine</td><td>Records career transition</td><td>v1</td></tr><tr><td>Citizen Retired</td><td><code>civ.citizen.retired.v1</code></td><td><code>{tick_id, citizen_id, retirement_age, career_length_years, final_wealth}</code></td><td>Labor market engine</td><td>Records retirement</td><td>v1</td></tr><tr><td>Citizen Died</td><td><code>civ.citizen.died.v1</code></td><td><code>{tick_id, citizen_id, death_age, death_location, estate_distributed_to}</code></td><td>Demographic engine</td><td>Records death</td><td>v1</td></tr><tr><td>Citizen Metrics Updated</td><td><code>civ.citizen.metrics_updated.v1</code></td><td><code>{tick_id, citizen_id, age, wealth, education_level, satisfaction_score, institution_affiliation}</code></td><td>Metrics engine (CIV-0103)</td><td>Time-series snapshot of citizen state</td><td>v1</td></tr></tbody></table><p><strong>Payload Schema Details:</strong></p><ul><li><code>education_level</code>: Integer [0, 5]; maps to institution types (primary, secondary, tertiary, etc.)</li><li><code>satisfaction_score</code>: Float [-1, 1]; used by Venture for user activity signaling</li><li><code>genetic_traits</code>: Array of traits; affects career path probabilities</li><li><code>estate_distributed_to</code>: Array of <code>{heir_id, amount_joules}</code></li></ul><hr><h3 id="_1-6-institution-lifecycle-events-institution" tabindex="-1">1.6 Institution Lifecycle Events (institution.*) <a class="header-anchor" href="#_1-6-institution-lifecycle-events-institution" aria-label="Permalink to &quot;1.6 Institution Lifecycle Events (institution.*)&quot;">​</a></h3><table tabindex="0"><thead><tr><th>Event Name</th><th>Fully Qualified</th><th>Payload Schema</th><th>Emitted By</th><th>Purpose</th><th>Version</th></tr></thead><tbody><tr><td>Institution Created</td><td><code>civ.institution.created.v1</code></td><td><code>{tick_id, institution_id, institution_type, founder_id, location, initial_population}</code></td><td>Institutional engine (CIV-0103, CIV-0105)</td><td>Records institution formation</td><td>v1</td></tr><tr><td>Institution State Changed</td><td><code>civ.institution.state_changed.v1</code></td><td><code>{tick_id, institution_id, state_before, state_after, reason, affected_citizens_count}</code></td><td>Institutional state machine</td><td>Records state transition (pending → active → dormant → dissolved)</td><td>v1</td></tr><tr><td>Institution Merged</td><td><code>civ.institution.merged.v1</code></td><td><code>{tick_id, merging_institution_ids, resulting_institution_id, population_transferred}</code></td><td>Institutional engine</td><td>Records institution merger</td><td>v1</td></tr><tr><td>Institution Split</td><td><code>civ.institution.split.v1</code></td><td><code>{tick_id, source_institution_id, new_institution_ids, population_distributed}</code></td><td>Institutional engine</td><td>Records institution fission</td><td>v1</td></tr><tr><td>Institution Dissolved</td><td><code>civ.institution.dissolved.v1</code></td><td><code>{tick_id, institution_id, citizen_relocations, asset_liquidations}</code></td><td>Institutional engine</td><td>Records institution dissolution</td><td>v1</td></tr><tr><td>Institution Metrics Updated</td><td><code>civ.institution.metrics_updated.v1</code></td><td><code>{tick_id, institution_id, population, wealth, assets, influence_score}</code></td><td>Metrics engine</td><td>Time-series snapshot of institution state</td><td>v1</td></tr></tbody></table><p><strong>Payload Schema Details:</strong></p><ul><li><code>institution_type</code>: One of <code>kingdom</code>, <code>city_state</code>, <code>alliance</code>, <code>corporation</code>, <code>religious_order</code>, <code>militia</code></li><li><code>state_before/after</code>: One of <code>pending</code>, <code>active</code>, <code>dormant</code>, <code>dissolved</code></li><li><code>reason</code>: String describing cause of state change (e.g., &quot;diplomatic_treaty_expired&quot;, &quot;bankruptcy&quot;, &quot;armed_conquest&quot;)</li><li><code>influence_score</code>: Float [0, 1]; used in policy evaluation and war/diplomacy subsystems</li></ul><hr><h3 id="_1-7-war-diplomacy-conflict-events-conflict" tabindex="-1">1.7 War, Diplomacy &amp; Conflict Events (conflict.*) <a class="header-anchor" href="#_1-7-war-diplomacy-conflict-events-conflict" aria-label="Permalink to &quot;1.7 War, Diplomacy &amp; Conflict Events (conflict.*)&quot;">​</a></h3><table tabindex="0"><thead><tr><th>Event Name</th><th>Fully Qualified</th><th>Payload Schema</th><th>Emitted By</th><th>Purpose</th><th>Version</th></tr></thead><tbody><tr><td>War Declared</td><td><code>civ.conflict.war_declared.v1</code></td><td><code>{tick_id, aggressor_institution_id, defender_institution_id, reason, military_strength_ratio}</code></td><td>Diplomacy engine (CIV-0105)</td><td>Records declaration of war</td><td>v1</td></tr><tr><td>Diplomatic Treaty Signed</td><td><code>civ.conflict.treaty_signed.v1</code></td><td><code>{tick_id, party_1_id, party_2_id, treaty_type, terms, duration_ticks}</code></td><td>Diplomacy engine</td><td>Records treaty formation</td><td>v1</td></tr><tr><td>Territorial Control Changed</td><td><code>civ.conflict.territorial_control_changed.v1</code></td><td><code>{tick_id, location_id, previous_controller_id, new_controller_id, population_affected}</code></td><td>Conflict resolution engine</td><td>Records territory conquest/cession</td><td>v1</td></tr><tr><td>Shadow Network Activated</td><td><code>civ.conflict.shadow_network_activated.v1</code></td><td><code>{tick_id, network_id, network_type, target_institution_id, influence_direction}</code></td><td>Shadow subsystem (CIV-0105)</td><td>Records covert influence operation</td><td>v1</td></tr></tbody></table><p><strong>Payload Schema Details:</strong></p><ul><li><code>treaty_type</code>: One of <code>military_alliance</code>, <code>trade_agreement</code>, <code>non_aggression_pact</code>, <code>vassalage</code></li><li><code>military_strength_ratio</code>: Float; attacker_strength / defender_strength</li><li><code>network_type</code>: One of <code>spy_ring</code>, <code>merchant_guild</code>, <code>religious_sect</code>, <code>secret_society</code></li><li><code>influence_direction</code>: One of <code>support</code>, <code>subvert</code>, <code>destabilize</code></li></ul><hr><h3 id="_1-8-social-health-events-social" tabindex="-1">1.8 Social &amp; Health Events (social.*) <a class="header-anchor" href="#_1-8-social-health-events-social" aria-label="Permalink to &quot;1.8 Social &amp; Health Events (social.*)&quot;">​</a></h3><table tabindex="0"><thead><tr><th>Event Name</th><th>Fully Qualified</th><th>Payload Schema</th><th>Emitted By</th><th>Purpose</th><th>Version</th></tr></thead><tbody><tr><td>Health Crisis Detected</td><td><code>civ.social.health_crisis.v1</code></td><td><code>{tick_id, location_id, disease_type, infection_rate, mortality_rate, affected_population}</code></td><td>Health subsystem (CIV-0106)</td><td>Records epidemic or plague</td><td>v1</td></tr><tr><td>Social Unrest Escalated</td><td><code>civ.social.unrest_escalated.v1</code></td><td><code>{tick_id, location_id, unrest_level, causes, insurgent_count}</code></td><td>Insurgency subsystem (CIV-0106)</td><td>Records uprising or revolt</td><td>v1</td></tr><tr><td>Ideology Shift</td><td><code>civ.social.ideology_shift.v1</code></td><td><code>{tick_id, institution_id, ideology_before, ideology_after, driver}</code></td><td>Ideology engine (CIV-0106)</td><td>Records ideological change</td><td>v1</td></tr><tr><td>Cultural Event</td><td><code>civ.social.cultural_event.v1</code></td><td><code>{tick_id, event_type, location_id, impact_on_satisfaction, influenced_population}</code></td><td>Cultural subsystem</td><td>Records cultural occurrence (e.g., festival, artistic movement)</td><td>v1</td></tr></tbody></table><p><strong>Payload Schema Details:</strong></p><ul><li><code>unrest_level</code>: Integer [0, 100]; &gt; 70 triggers insurgency events</li><li><code>ideology_before/after</code>: One of <code>monarchy</code>, <code>theocracy</code>, <code>democracy</code>, <code>autocracy</code>, <code>meritocracy</code></li><li><code>driver</code>: String explaining cause of shift (e.g., &quot;military_victory&quot;, &quot;enlightenment_era&quot;, &quot;famine&quot;)</li><li><code>event_type</code>: One of <code>festival</code>, <code>artistic_movement</code>, <code>scientific_breakthrough</code>, <code>religious_schism</code></li></ul><hr><h2 id="part-2-venture-event-catalog" tabindex="-1">Part 2: Venture Event Catalog <a class="header-anchor" href="#part-2-venture-event-catalog" aria-label="Permalink to &quot;Part 2: Venture Event Catalog&quot;">​</a></h2><p>Events emitted from the Venture autonomy platform.</p><h3 id="_2-1-workflow-orchestration-events-workflow" tabindex="-1">2.1 Workflow Orchestration Events (workflow.*) <a class="header-anchor" href="#_2-1-workflow-orchestration-events-workflow" aria-label="Permalink to &quot;2.1 Workflow Orchestration Events (workflow.*)&quot;">​</a></h3><table tabindex="0"><thead><tr><th>Event Name</th><th>Fully Qualified</th><th>Payload Schema</th><th>Emitted By</th><th>Purpose</th><th>Version</th></tr></thead><tbody><tr><td>Workflow Started</td><td><code>venture.workflow.started.v1</code></td><td><code>{workflow_id, agent_role, workspace_id, initial_task_count, policy_bundle_id}</code></td><td>Workflow orchestrator (TRACK-C)</td><td>Marks workflow initialization</td><td>v1</td></tr><tr><td>Workflow Completed</td><td><code>venture.workflow.completed.v1</code></td><td><code>{workflow_id, status, task_count_executed, event_count, duration_ms}</code></td><td>Workflow orchestrator</td><td>Marks workflow completion</td><td>v1</td></tr><tr><td>Workflow Failed</td><td><code>venture.workflow.failed.v1</code></td><td><code>{workflow_id, error_code, error_message, task_id_when_failed}</code></td><td>Workflow orchestrator</td><td>Records fatal workflow error</td><td>v1</td></tr><tr><td>Task Scheduled</td><td><code>venture.task.scheduled.v1</code></td><td><code>{task_id, workflow_id, task_type, estimated_eau_cost}</code></td><td>Scheduler</td><td>Marks task scheduling</td><td>v1</td></tr><tr><td>Task Started</td><td><code>venture.task.started.v1</code></td><td><code>{task_id, workflow_id, agent_role, tool_calls_expected}</code></td><td>Task executor</td><td>Marks task execution start</td><td>v1</td></tr><tr><td>Task Completed</td><td><code>venture.task.completed.v1</code></td><td><code>{task_id, workflow_id, status, tool_calls_count, actual_eau_cost, duration_ms}</code></td><td>Task executor</td><td>Records task completion and cost</td><td>v1</td></tr><tr><td>Task Failed</td><td><code>venture.task.failed.v1</code></td><td><code>{task_id, workflow_id, error_code, error_message, partial_results}</code></td><td>Task executor</td><td>Records task failure</td><td>v1</td></tr></tbody></table><p><strong>Payload Schema Details:</strong></p><ul><li><code>agent_role</code>: One of <code>analyst</code>, <code>architect</code>, <code>engineer</code>, <code>auditor</code>, <code>orchestrator</code></li><li><code>workspace_id</code>: Links to workspace isolation boundary</li><li><code>eau_cost</code>: Ecosystem Allocation Unit (EAU) consumed by task</li><li><code>task_type</code>: Corresponds to tool categories (code, artifact, policy, compliance, etc.)</li></ul><hr><h3 id="_2-2-artifact-compilation-events-artifact" tabindex="-1">2.2 Artifact Compilation Events (artifact.*) <a class="header-anchor" href="#_2-2-artifact-compilation-events-artifact" aria-label="Permalink to &quot;2.2 Artifact Compilation Events (artifact.*)&quot;">​</a></h3><table tabindex="0"><thead><tr><th>Event Name</th><th>Fully Qualified</th><th>Payload Schema</th><th>Emitted By</th><th>Purpose</th><th>Version</th></tr></thead><tbody><tr><td>Artifact IR Created</td><td><code>venture.artifact.ir_created.v1</code></td><td><code>{artifact_ir_id, ir_type, schema_version, content_hash, payload_size_bytes}</code></td><td>Artifact compiler (TRACK-A)</td><td>Marks artifact IR creation</td><td>v1</td></tr><tr><td>Artifact Build Started</td><td><code>venture.artifact.build_started.v1</code></td><td><code>{artifact_ir_id, build_id, toolchain_version, target_surface, estimated_cost_eau}</code></td><td>Build engine</td><td>Marks build initialization</td><td>v1</td></tr><tr><td>Artifact Build Completed</td><td><code>venture.artifact.build_completed.v1</code></td><td><code>{build_id, artifact_ir_id, status, output_hash, actual_cost_eau, duration_ms}</code></td><td>Build engine</td><td>Records build completion</td><td>v1</td></tr><tr><td>Artifact Build Failed</td><td><code>venture.artifact.build_failed.v1</code></td><td><code>{build_id, artifact_ir_id, error_code, error_message, partial_output}</code></td><td>Build engine</td><td>Records build failure</td><td>v1</td></tr><tr><td>Artifact Provenance Attested</td><td><code>venture.artifact.provenance_attested.v1</code></td><td><code>{artifact_id, build_id, provider, model_version, signature, timestamp}</code></td><td>Provenance engine</td><td>Records signed provenance evidence</td><td>v1</td></tr><tr><td>Artifact Cache Hit</td><td><code>venture.artifact.cache_hit.v1</code></td><td><code>{artifact_ir_id, idempotency_key, cached_artifact_id, cache_age_ms}</code></td><td>Build engine</td><td>Records deterministic cache hit</td><td>v1</td></tr></tbody></table><p><strong>Payload Schema Details:</strong></p><ul><li><code>ir_type</code>: One of <code>SlideSpec</code>, <code>DocSpec</code>, <code>TimelineSpec</code>, <code>AudioSpec</code>, <code>BoardSpec</code>, <code>CivSimulationArtifact</code></li><li><code>target_surface</code>: One of <code>web</code>, <code>mobile</code>, <code>vr</code>, <code>print</code>, <code>cinema</code></li><li><code>provider</code>: One of <code>openai</code>, <code>anthropic</code>, <code>veo</code>, <code>nanobanana</code>, <code>internal</code></li><li><code>model_version</code>: Semantic version of provider model/toolchain</li><li><code>signature</code>: Ed25519 signature over <code>{artifact_id, provider, model_version, timestamp}</code></li></ul><hr><h3 id="_2-3-money-treasury-events-money" tabindex="-1">2.3 Money &amp; Treasury Events (money.*) <a class="header-anchor" href="#_2-3-money-treasury-events-money" aria-label="Permalink to &quot;2.3 Money &amp; Treasury Events (money.*)&quot;">​</a></h3><table tabindex="0"><thead><tr><th>Event Name</th><th>Fully Qualified</th><th>Payload Schema</th><th>Emitted By</th><th>Purpose</th><th>Version</th></tr></thead><tbody><tr><td>Money Intent Created</td><td><code>venture.money.intent_created.v1</code></td><td><code>{intent_id, workflow_id, scope_type, scope_id, cap_amount, window, ttl_ms}</code></td><td>Money control (TRACK-B)</td><td>Records spend authorization request</td><td>v1</td></tr><tr><td>Money Authorization Decided</td><td><code>venture.money.authorization_decided.v1</code></td><td><code>{intent_id, workflow_id, decision, reason_code, policy_bundle_id}</code></td><td>Authorization engine</td><td>Records spend approval/rejection</td><td>v1</td></tr><tr><td>Ledger Entry Created</td><td><code>venture.ledger.entry_created.v1</code></td><td><code>{entry_id, debit_account, credit_account, amount, reference_id, policy_bundle_id}</code></td><td>Ledger engine (TRACK-B)</td><td>Records double-entry transaction</td><td>v1</td></tr><tr><td>Budget Allocation Approved</td><td><code>venture.budget.allocation_approved.v1</code></td><td><code>{workspace_id, allocation_amount, window, policy_bundle_id}</code></td><td>Budget engine</td><td>Records workspace budget approval</td><td>v1</td></tr><tr><td>Budget Exceeded</td><td><code>venture.budget.exceeded.v1</code></td><td><code>{workspace_id, budget_limit, actual_spend, overage_amount}</code></td><td>Budget engine</td><td>Records budget violation</td><td>v1</td></tr><tr><td>Reconciliation Run</td><td><code>venture.reconciliation.run.v1</code></td><td><code>{run_id, period, drift_amount, drift_pct, status, timestamp}</code></td><td>Reconciliation engine</td><td>Records daily/weekly reconciliation</td><td>v1</td></tr></tbody></table><p><strong>Payload Schema Details:</strong></p><ul><li><code>scope_type</code>: One of <code>workflow</code>, <code>task</code>, <code>agent_action</code>, <code>workspace</code>, <code>global</code></li><li><code>reason_code</code>: One of <code>approved</code>, <code>rejected_budget</code>, <code>rejected_policy</code>, <code>revoked</code>, <code>expired</code></li><li><code>debit_account</code> / <code>credit_account</code>: Account IDs from chart of accounts (see DATA_MODEL_DB_SPEC)</li><li><code>drift_pct</code>: Reconciliation discrepancy as percentage of total ledger balance</li></ul><hr><h3 id="_2-4-compliance-audit-events-compliance" tabindex="-1">2.4 Compliance &amp; Audit Events (compliance.*) <a class="header-anchor" href="#_2-4-compliance-audit-events-compliance" aria-label="Permalink to &quot;2.4 Compliance &amp; Audit Events (compliance.*)&quot;">​</a></h3><table tabindex="0"><thead><tr><th>Event Name</th><th>Fully Qualified</th><th>Payload Schema</th><th>Emitted By</th><th>Purpose</th><th>Version</th></tr></thead><tbody><tr><td>Compliance Case Opened</td><td><code>venture.compliance.case_opened.v1</code></td><td><code>{case_id, case_type, severity_level, evidence_chain_start}</code></td><td>Compliance machine (OPS)</td><td>Records new compliance investigation</td><td>v1</td></tr><tr><td>Compliance Case Evidence Added</td><td><code>venture.compliance.case_evidence_added.v1</code></td><td><code>{case_id, evidence_id, event_id_reference, evidence_type, timestamp}</code></td><td>Audit trail engine</td><td>Appends evidence to case</td><td>v1</td></tr><tr><td>Compliance Case Closed</td><td><code>venture.compliance.case_closed.v1</code></td><td><code>{case_id, closure_reason, evidence_count, finding}</code></td><td>Compliance machine</td><td>Records case resolution</td><td>v1</td></tr><tr><td>Compliance Violation Detected</td><td><code>venture.compliance.violation_detected.v1</code></td><td><code>{violation_id, violation_type, severity_level, affected_workflow_id, remediation_action}</code></td><td>Policy verifier</td><td>Records policy/regulatory breach</td><td>v1</td></tr><tr><td>Audit Log Entry</td><td><code>venture.audit.log_entry.v1</code></td><td><code>{log_id, action_type, actor_id, resource_id, change_summary, timestamp}</code></td><td>Audit engine</td><td>Records user/system action for audit</td><td>v1</td></tr><tr><td>Policy Bundle Drift Detected</td><td><code>venture.compliance.policy_drift.v1</code></td><td><code>{drift_id, expected_bundle_id, actual_bundle_id, diff_summary}</code></td><td>Policy drift detector</td><td>Records unintended policy change</td><td>v1</td></tr></tbody></table><p><strong>Payload Schema Details:</strong></p><ul><li><code>case_type</code>: One of <code>policy_violation</code>, <code>treasury_drift</code>, <code>tool_misuse</code>, <code>compliance_breach</code>, <code>incident_investigation</code></li><li><code>severity_level</code>: One of <code>critical</code>, <code>high</code>, <code>medium</code>, <code>low</code></li><li><code>evidence_type</code>: One of <code>event_log</code>, <code>state_snapshot</code>, <code>signature</code>, <code>attestation</code>, <code>audit_trail</code></li><li><code>remediation_action</code>: One of <code>suspend_workflow</code>, <code>revoke_authorization</code>, <code>escalate_to_human</code>, <code>auto_remediate</code></li></ul><hr><h3 id="_2-5-policy-governance-events-policy" tabindex="-1">2.5 Policy &amp; Governance Events (policy.*) <a class="header-anchor" href="#_2-5-policy-governance-events-policy" aria-label="Permalink to &quot;2.5 Policy &amp; Governance Events (policy.*)&quot;">​</a></h3><table tabindex="0"><thead><tr><th>Event Name</th><th>Fully Qualified</th><th>Payload Schema</th><th>Emitted By</th><th>Purpose</th><th>Version</th></tr></thead><tbody><tr><td>Policy Bundle Published</td><td><code>venture.policy.bundle_published.v1</code></td><td><code>{bundle_id, version, schema_snapshot, published_at, effective_at}</code></td><td>Policy engine (TRACK-C)</td><td>Records new policy bundle</td><td>v1</td></tr><tr><td>Policy Evaluation Started</td><td><code>venture.policy.evaluation_started.v1</code></td><td><code>{evaluation_id, bundle_id, context_snapshot, decision_pending}</code></td><td>Policy evaluator</td><td>Marks policy evaluation start</td><td>v1</td></tr><tr><td>Policy Decision Made</td><td><code>venture.policy.decision_made.v1</code></td><td><code>{decision_id, bundle_id, decision_result, supporting_facts}</code></td><td>Policy evaluator</td><td>Records policy decision</td><td>v1</td></tr><tr><td>Policy Rollback Initiated</td><td><code>venture.policy.rollback_initiated.v1</code></td><td><code>{rollback_id, bundle_id_being_revoked, new_bundle_id, affected_workflows}</code></td><td>Policy admin</td><td>Records policy revocation and recovery</td><td>v1</td></tr></tbody></table><p><strong>Payload Schema Details:</strong></p><ul><li><code>schema_snapshot</code>: Compressed JSON schema of entire policy bundle</li><li><code>decision_result</code>: The control decision output (e.g., <code>&quot;allow&quot;</code>, <code>&quot;reject_with_escalation&quot;</code>, <code>&quot;require_approval&quot;</code>)</li><li><code>supporting_facts</code>: Array of facts from context that drove decision</li></ul><hr><h3 id="_2-6-user-multi-tenancy-events-user" tabindex="-1">2.6 User &amp; Multi-Tenancy Events (user.*) <a class="header-anchor" href="#_2-6-user-multi-tenancy-events-user" aria-label="Permalink to &quot;2.6 User &amp; Multi-Tenancy Events (user.*)&quot;">​</a></h3><table tabindex="0"><thead><tr><th>Event Name</th><th>Fully Qualified</th><th>Payload Schema</th><th>Emitted By</th><th>Purpose</th><th>Version</th></tr></thead><tbody><tr><td>User Onboarded</td><td><code>venture.user.onboarded.v1</code></td><td><code>{user_id, role, workspace_id, capability_tier, initial_budget_eau}</code></td><td>User management</td><td>Records new user creation</td><td>v1</td></tr><tr><td>User Capability Changed</td><td><code>venture.user.capability_changed.v1</code></td><td><code>{user_id, old_capability_tier, new_capability_tier, reason}</code></td><td>Access control</td><td>Records permission/capability change</td><td>v1</td></tr><tr><td>User Activity Signal</td><td><code>venture.user.activity_signal.v1</code></td><td><code>{user_id, signal_type, metric_value, observation_window}</code></td><td>Metrics engine</td><td>Records user behavior metrics</td><td>v1</td></tr><tr><td>User Offboarded</td><td><code>venture.user.offboarded.v1</code></td><td><code>{user_id, offboarding_reason, residual_budget_disposal}</code></td><td>User management</td><td>Records user deactivation</td><td>v1</td></tr></tbody></table><p><strong>Payload Schema Details:</strong></p><ul><li><code>capability_tier</code>: One of <code>tier_0_admin</code>, <code>tier_1_advanced</code>, <code>tier_2_standard</code>, <code>tier_3_limited</code></li><li><code>signal_type</code>: One of <code>task_completion_rate</code>, <code>tool_usage_distribution</code>, <code>budget_utilization</code>, <code>compliance_rate</code></li><li><code>metric_value</code>: Float; context-dependent range</li><li><code>observation_window</code>: Time window over which signal was computed (e.g., &quot;last_7_days&quot;)</li></ul><hr><h3 id="_2-7-privacy-data-protection-events-privacy" tabindex="-1">2.7 Privacy &amp; Data Protection Events (privacy.*) <a class="header-anchor" href="#_2-7-privacy-data-protection-events-privacy" aria-label="Permalink to &quot;2.7 Privacy &amp; Data Protection Events (privacy.*)&quot;">​</a></h3><table tabindex="0"><thead><tr><th>Event Name</th><th>Fully Qualified</th><th>Payload Schema</th><th>Emitted By</th><th>Purpose</th><th>Version</th></tr></thead><tbody><tr><td>Privacy Request Received</td><td><code>venture.privacy.request_received.v1</code></td><td><code>{request_id, request_type, subject_user_id, received_at}</code></td><td>Privacy manager</td><td>Records data request (GDPR/CCPA)</td><td>v1</td></tr><tr><td>Privacy Request Processed</td><td><code>venture.privacy.request_processed.v1</code></td><td><code>{request_id, status, data_collected_bytes, completion_timestamp}</code></td><td>Privacy engine</td><td>Records request fulfillment</td><td>v1</td></tr><tr><td>Data Retention Policy Applied</td><td><code>venture.privacy.retention_policy_applied.v1</code></td><td><code>{policy_id, affected_record_count, data_deleted_bytes, policy_version}</code></td><td>Data retention engine</td><td>Records automatic data cleanup</td><td>v1</td></tr><tr><td>PII Detected in Artifact</td><td><code>venture.privacy.pii_detected.v1</code></td><td><code>{artifact_id, pii_type, detection_confidence, remediation_action}</code></td><td>PII detector</td><td>Records sensitive data discovery</td><td>v1</td></tr></tbody></table><p><strong>Payload Schema Details:</strong></p><ul><li><code>request_type</code>: One of <code>right_to_access</code>, <code>right_to_deletion</code>, <code>right_to_portability</code>, <code>right_to_correction</code></li><li><code>pii_type</code>: One of <code>email</code>, <code>phone</code>, <code>ssn</code>, <code>credit_card</code>, <code>api_key</code>, <code>password_hash</code>, <code>location</code></li><li><code>detection_confidence</code>: Float [0, 1]; confidence that detected data is actually PII</li></ul><hr><h2 id="part-3-cross-track-event-flows" tabindex="-1">Part 3: Cross-Track Event Flows <a class="header-anchor" href="#part-3-cross-track-event-flows" aria-label="Permalink to &quot;Part 3: Cross-Track Event Flows&quot;">​</a></h2><p>Events flowing between CIV and Venture systems.</p><h3 id="_3-1-civ-→-venture-relay-pattern" tabindex="-1">3.1 CIV → Venture Relay Pattern <a class="header-anchor" href="#_3-1-civ-→-venture-relay-pattern" aria-label="Permalink to &quot;3.1 CIV → Venture Relay Pattern&quot;">​</a></h3><p>CIV events are captured and relayed into Venture event bus for audit and compliance purposes:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>CIV Event Emitted</span></span>
<span class="line"><span>  ↓</span></span>
<span class="line"><span>Event Relay Layer (in TRACK-C_CONTROL_PLANE)</span></span>
<span class="line"><span>  ├─ Translate event type: civ.* → venture.civ.* (namespace isolation)</span></span>
<span class="line"><span>  ├─ Wrap in EventEnvelopeV1 (add workflow_id, trace_id, policy_bundle_id)</span></span>
<span class="line"><span>  ├─ Compute event_id (UUID for Venture tracking)</span></span>
<span class="line"><span>  └─ Emit to Venture event bus</span></span>
<span class="line"><span>  ↓</span></span>
<span class="line"><span>Venture Event Bus</span></span>
<span class="line"><span>  ├─ Store in event log</span></span>
<span class="line"><span>  ├─ Trigger subscribed handlers (compliance, metrics, etc.)</span></span>
<span class="line"><span>  └─ Make available for replay and audit</span></span></code></pre></div><p><strong>Key Mapping Rules:</strong></p><ol><li><strong>Namespace</strong>: CIV events prefixed with <code>civ.</code> to distinguish from native Venture events</li><li><strong>Workflow Context</strong>: CIV simulation run → Venture workflow_id (1:1 mapping)</li><li><strong>Tick to Task</strong>: Each CIV tick → Venture task in orchestration DAG</li><li><strong>Policy Bundle Pinning</strong>: CIV event&#39;s policy_bundle_id must match Venture&#39;s policy_bundle_id for that workflow</li><li><strong>Idempotency</strong>: CIV event_id + source_system + timestamp = replay_token for deduplication</li></ol><h3 id="_3-2-specific-cross-track-event-flows" tabindex="-1">3.2 Specific Cross-Track Event Flows <a class="header-anchor" href="#_3-2-specific-cross-track-event-flows" aria-label="Permalink to &quot;3.2 Specific Cross-Track Event Flows&quot;">​</a></h3><h4 id="flow-a-civ-economy-→-venture-ledger" tabindex="-1">Flow A: CIV Economy → Venture Ledger <a class="header-anchor" href="#flow-a-civ-economy-→-venture-ledger" aria-label="Permalink to &quot;Flow A: CIV Economy → Venture Ledger&quot;">​</a></h4><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>civ.economy.transfer_booked.v1 (sender, receiver, amount, reason)</span></span>
<span class="line"><span>  ↓ (Relay)</span></span>
<span class="line"><span>venture.civ.economy.transfer_booked.v1 (wrapped)</span></span>
<span class="line"><span>  ↓ (Subscription)</span></span>
<span class="line"><span>Venture Ledger Engine</span></span>
<span class="line"><span>  ├─ Extract sender/receiver/amount</span></span>
<span class="line"><span>  ├─ Determine debit_account (sender&#39;s account) and credit_account (receiver&#39;s account)</span></span>
<span class="line"><span>  ├─ Emit venture.ledger.entry_created.v1 with (debit_account, credit_account, amount, reference_id=civ_event_id)</span></span>
<span class="line"><span>  └─ Update account balances; validate conservation law</span></span></code></pre></div><p><strong>Validation Rules:</strong></p><ul><li>Both debit and credit amounts must be positive and equal</li><li>Sum of all ledger entries must equal zero (conservation)</li><li>Accounts must exist and be active</li><li>Policy bundle version must match CIV&#39;s policy bundle</li></ul><h4 id="flow-b-civ-policy-evaluation-→-venture-audit-trail" tabindex="-1">Flow B: CIV Policy Evaluation → Venture Audit Trail <a class="header-anchor" href="#flow-b-civ-policy-evaluation-→-venture-audit-trail" aria-label="Permalink to &quot;Flow B: CIV Policy Evaluation → Venture Audit Trail&quot;">​</a></h4><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>civ.policy.evaluated.v1 (policy_type, control_decision, evaluation_duration_ms)</span></span>
<span class="line"><span>  ↓ (Relay)</span></span>
<span class="line"><span>venture.civ.policy.evaluated.v1 (wrapped)</span></span>
<span class="line"><span>  ↓ (Subscription)</span></span>
<span class="line"><span>Venture Compliance Machine</span></span>
<span class="line"><span>  ├─ Open or append to compliance case (case_type=&quot;entity_policy_evaluation&quot;)</span></span>
<span class="line"><span>  ├─ Add evidence (event_id_reference, evidence_type=&quot;policy_evaluation_record&quot;)</span></span>
<span class="line"><span>  ├─ Check if control_decision matches policy bundle expectations</span></span>
<span class="line"><span>  └─ If unexpected: emit compliance.violation_detected.v1 (severity_level=&quot;warning&quot;)</span></span></code></pre></div><h4 id="flow-c-civ-citizen-lifecycle-→-venture-user-signals" tabindex="-1">Flow C: CIV Citizen Lifecycle → Venture User Signals <a class="header-anchor" href="#flow-c-civ-citizen-lifecycle-→-venture-user-signals" aria-label="Permalink to &quot;Flow C: CIV Citizen Lifecycle → Venture User Signals&quot;">​</a></h4><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>civ.citizen.born.v1 / civ.citizen.retired.v1 / civ.citizen.died.v1 (citizen_id, ...)</span></span>
<span class="line"><span>  ↓ (Relay)</span></span>
<span class="line"><span>venture.civ.citizen.[event_name].v1 (wrapped)</span></span>
<span class="line"><span>  ↓ (Subscription)</span></span>
<span class="line"><span>Venture Metrics Engine</span></span>
<span class="line"><span>  ├─ Create user.activity_signal.v1 for onboarding/offboarding if applicable</span></span>
<span class="line"><span>  ├─ If citizen_id maps to managed user_id in Venture:</span></span>
<span class="line"><span>  │   └─ Update user capability tier based on life stage</span></span>
<span class="line"><span>  └─ Otherwise: log as observational metric (do not auto-create users)</span></span></code></pre></div><p><strong>Mapping Details:</strong></p><ul><li>CIV citizen birth → Venture user onboarding signal (if opt-in)</li><li>CIV citizen career change → Venture capability tier escalation</li><li>CIV citizen death → Venture user offboarding signal (if opt-in)</li></ul><h4 id="flow-d-civ-institution-changes-→-venture-compliance-cases" tabindex="-1">Flow D: CIV Institution Changes → Venture Compliance Cases <a class="header-anchor" href="#flow-d-civ-institution-changes-→-venture-compliance-cases" aria-label="Permalink to &quot;Flow D: CIV Institution Changes → Venture Compliance Cases&quot;">​</a></h4><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>civ.institution.created.v1 / civ.institution.dissolved.v1 / civ.institution.state_changed.v1</span></span>
<span class="line"><span>  ↓ (Relay)</span></span>
<span class="line"><span>venture.civ.institution.[event_name].v1 (wrapped)</span></span>
<span class="line"><span>  ↓ (Subscription)</span></span>
<span class="line"><span>Venture Compliance Machine</span></span>
<span class="line"><span>  ├─ Open compliance case: case_type=&quot;institutional_change&quot;</span></span>
<span class="line"><span>  ├─ Add evidence chain:</span></span>
<span class="line"><span>  │   ├─ Event 1: institution.created.v1 (case opened)</span></span>
<span class="line"><span>  │   ├─ Event 2-N: state_changed.v1, merged.v1, split.v1 (evidence accumulation)</span></span>
<span class="line"><span>  │   └─ Event N+1: institution.dissolved.v1 (case closed)</span></span>
<span class="line"><span>  └─ Case queryable for audit and policy review</span></span></code></pre></div><h4 id="flow-e-civ-energy-accounting-→-venture-budget-consumption" tabindex="-1">Flow E: CIV Energy Accounting → Venture Budget Consumption <a class="header-anchor" href="#flow-e-civ-energy-accounting-→-venture-budget-consumption" aria-label="Permalink to &quot;Flow E: CIV Energy Accounting → Venture Budget Consumption&quot;">​</a></h4><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>civ.energy.consumed.v1 (consumer_entity_id, energy_qty, source_type)</span></span>
<span class="line"><span>  ↓ (Relay)</span></span>
<span class="line"><span>venture.civ.energy.consumed.v1 (wrapped)</span></span>
<span class="line"><span>  ↓ (Subscription)</span></span>
<span class="line"><span>Venture Budget Engine</span></span>
<span class="line"><span>  ├─ Map energy_qty → eau_cost_estimate using conversion function (see ENERGY_TO_BUDGET_CONTRACT)</span></span>
<span class="line"><span>  ├─ Deduct from workspace quota</span></span>
<span class="line"><span>  ├─ If quota exceeded:</span></span>
<span class="line"><span>  │   ├─ Emit budget.exceeded.v1</span></span>
<span class="line"><span>  │   └─ Trigger remediation (reduce consumption, escalate to policy review, etc.)</span></span>
<span class="line"><span>  └─ Log consumption signal for future capacity planning</span></span></code></pre></div><p><strong>Conversion Function</strong>:</p><ul><li>Base: 1 Joule (CIV-0107 unit) ≈ 0.001 EAU (empirically calibrated)</li><li>Multiplier by source_type: renewable=1.0x, fossil=1.5x, nuclear=0.8x, storage_discharge=2.0x</li><li>Final: <code>eau_cost = energy_qty * 0.001 * source_type_multiplier</code></li></ul><h3 id="_3-3-venture-→-civ-influence-optional-future" tabindex="-1">3.3 Venture → CIV Influence (Optional/Future) <a class="header-anchor" href="#_3-3-venture-→-civ-influence-optional-future" aria-label="Permalink to &quot;3.3 Venture → CIV Influence (Optional/Future)&quot;">​</a></h3><p>Venture compliance decisions can influence CIV simulation policy:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>venture.compliance.violation_detected.v1 (violation_type=&quot;tool_misuse&quot;)</span></span>
<span class="line"><span>  ↓ (Optional Feedback Loop)</span></span>
<span class="line"><span>CIV Policy Engine</span></span>
<span class="line"><span>  ├─ Reduce policy evaluation budget for next N ticks</span></span>
<span class="line"><span>  ├─ Adjust policy_bundle to be more conservative</span></span>
<span class="line"><span>  └─ Emit civ.policy.adjusted.v1 for audit</span></span></code></pre></div><p><strong>Note</strong>: This is optional and future; current design emphasizes CIV → Venture telemetry, not closed-loop control.</p><hr><h2 id="part-4-event-ordering-determinism-guarantees" tabindex="-1">Part 4: Event Ordering &amp; Determinism Guarantees <a class="header-anchor" href="#part-4-event-ordering-determinism-guarantees" aria-label="Permalink to &quot;Part 4: Event Ordering &amp; Determinism Guarantees&quot;">​</a></h2><h3 id="event-ordering-within-a-civ-tick" tabindex="-1">Event Ordering Within a CIV Tick <a class="header-anchor" href="#event-ordering-within-a-civ-tick" aria-label="Permalink to &quot;Event Ordering Within a CIV Tick&quot;">​</a></h3><p>All CIV events within a single tick follow deterministic phase order:</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>Tick T:</span></span>
<span class="line"><span>  1. civ.tick.started.v1</span></span>
<span class="line"><span>  2. civ.policy.evaluated.v1 (demographic policies)</span></span>
<span class="line"><span>  3. civ.citizen.[born|retired|died].v1 (demographic changes)</span></span>
<span class="line"><span>  4. civ.policy.evaluated.v1 (economic policies)</span></span>
<span class="line"><span>  5. civ.economy.market_cleared.v1</span></span>
<span class="line"><span>  6. civ.economy.transfer_booked.v1 (multiple)</span></span>
<span class="line"><span>  7. civ.energy.consumed.v1 / civ.energy.generated.v1 (multiple)</span></span>
<span class="line"><span>  8. civ.energy.balance.v1 (conservation check)</span></span>
<span class="line"><span>  9. civ.policy.evaluated.v1 (spatial policies)</span></span>
<span class="line"><span>  10. civ.citizen.metrics_updated.v1</span></span>
<span class="line"><span>  11. civ.institution.metrics_updated.v1</span></span>
<span class="line"><span>  12. civ.tick.completed.v1</span></span></code></pre></div><p><strong>Determinism Guarantee</strong>: Given identical <code>tick_id</code>, <code>simulation_seed</code>, and <code>policy_bundle_id</code>, events 1-12 must be emitted in identical order with identical payloads.</p><h3 id="event-ordering-within-a-venture-workflow" tabindex="-1">Event Ordering Within a Venture Workflow <a class="header-anchor" href="#event-ordering-within-a-venture-workflow" aria-label="Permalink to &quot;Event Ordering Within a Venture Workflow&quot;">​</a></h3><p>Venture events are ordered by task execution order (DAG semantics):</p><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>Workflow W (CIV integration example):</span></span>
<span class="line"><span>  1. venture.workflow.started.v1</span></span>
<span class="line"><span>  2. venture.task.scheduled.v1 (task_type=&quot;civ_simulation&quot;)</span></span>
<span class="line"><span>  3. venture.task.started.v1</span></span>
<span class="line"><span>  4. venture.civ.tick.started.v1 (relayed from CIV)</span></span>
<span class="line"><span>  5. venture.civ.economy.transfer_booked.v1 (relayed)</span></span>
<span class="line"><span>  6. venture.ledger.entry_created.v1 (Venture-side transaction)</span></span>
<span class="line"><span>  7. venture.civ.tick.completed.v1 (relayed)</span></span>
<span class="line"><span>  8. venture.task.completed.v1</span></span>
<span class="line"><span>  9. venture.workflow.completed.v1</span></span></code></pre></div><p><strong>Concurrency</strong>: Tasks can execute in parallel; events from different tasks may interleave. However, events from the same task follow strict ordering.</p><hr><h2 id="part-5-schema-registry-versioning" tabindex="-1">Part 5: Schema Registry &amp; Versioning <a class="header-anchor" href="#part-5-schema-registry-versioning" aria-label="Permalink to &quot;Part 5: Schema Registry &amp; Versioning&quot;">​</a></h2><h3 id="event-schema-versioning" tabindex="-1">Event Schema Versioning <a class="header-anchor" href="#event-schema-versioning" aria-label="Permalink to &quot;Event Schema Versioning&quot;">​</a></h3><p>All event types follow semantic versioning:</p><ul><li><strong>Major version</strong> (e.g., <code>v1</code> → <code>v2</code>): Breaking schema changes (required field added/removed/type changed)</li><li><strong>Minor version</strong> (e.g., <code>v1.1</code>): Backwards-compatible addition (new optional field)</li><li><strong>Patch version</strong> (e.g., <code>v1.0.1</code>): Documentation/comment updates; no schema changes</li></ul><p><strong>Deprecation Policy</strong>:</p><ul><li>When deprecating an event type, mark as deprecated in schema registry</li><li>Support deprecated types for 2 policy bundle versions (N and N+1)</li><li>After 2 versions, reject deprecated types with error message</li></ul><h3 id="payload-schema-storage" tabindex="-1">Payload Schema Storage <a class="header-anchor" href="#payload-schema-storage" aria-label="Permalink to &quot;Payload Schema Storage&quot;">​</a></h3><p>All event payload schemas are stored in <code>venture/SCHEMA_PACK.md</code> and registered in Venture&#39;s schema registry with:</p><div class="language-json vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">json</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">{</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  &quot;event_type&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;civ.economy.transfer_booked.v1&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  &quot;schema_version&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">1</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  &quot;json_schema&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: { </span><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">/* full JSON schema */</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  &quot;registered_at&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;2026-02-21T00:00:00Z&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  &quot;deprecated&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">false</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">  &quot;references&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: [</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;CIV-0100&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">, </span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">&quot;TRACK_B_TREASURY_COMPLIANCE_SPEC&quot;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">]</span></span>
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><hr><h2 id="summary" tabindex="-1">Summary <a class="header-anchor" href="#summary" aria-label="Permalink to &quot;Summary&quot;">​</a></h2><table tabindex="0"><thead><tr><th>Dimension</th><th>Count</th><th>Coverage</th></tr></thead><tbody><tr><td>CIV Event Types</td><td>32</td><td>Run lifecycle, policy, economy, energy, citizens, institutions, conflict, social</td></tr><tr><td>Venture Event Types</td><td>26</td><td>Workflows, artifacts, money, compliance, policy, users, privacy</td></tr><tr><td><strong>Total Event Types</strong></td><td><strong>58</strong></td><td>All mapped to EventEnvelopeV1 schema</td></tr><tr><td>Cross-Track Flows</td><td>5 major patterns</td><td>CIV→Venture relay, ledger sync, audit trail, user signals, budget consumption</td></tr><tr><td>Determinism Guarantees</td><td>100%</td><td>Both systems support full deterministic replay from event log</td></tr></tbody></table><p>All events are audit-ready, replay-safe, and traceable through both CIV and Venture systems.</p><hr><p><strong>Document Control</strong></p><table tabindex="0"><thead><tr><th>Version</th><th>Date</th><th>Author</th><th>Change</th></tr></thead><tbody><tr><td>1.0</td><td>2026-02-21</td><td>Kush Integration Team</td><td>Initial version; 58 event types documented, 5 cross-track flows defined</td></tr></tbody></table>`,146)])])}const v=t(n,[["render",o]]);export{h as __pageData,v as default};
