From 6f3063248188a120010a0d5ec264e8850e677238 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sun, 21 Jun 2026 10:46:57 +0100 Subject: [PATCH] Project repo readiness into CultMesh --- .../bin/epiphany-repo-work-readiness-smoke.rs | 72 +++++- epiphany-core/src/bin/epiphany-verse-query.rs | 237 ++++++++++++++++-- epiphany-core/src/bin/epiphany-work.rs | 150 ++++++++--- epiphany-core/src/cultmesh_integration.rs | 143 +++++++++++ epiphany-core/src/lib.rs | 7 + notes/epiphany-repo-swarm-mvp-contract.md | 24 +- notes/fresh-workspace-handoff.md | 2 +- state/ledgers.msgpack | Bin 366010 -> 366698 bytes state/map.yaml | 2 +- 9 files changed, 572 insertions(+), 65 deletions(-) diff --git a/epiphany-core/src/bin/epiphany-repo-work-readiness-smoke.rs b/epiphany-core/src/bin/epiphany-repo-work-readiness-smoke.rs index d66ced52..f603460c 100644 --- a/epiphany-core/src/bin/epiphany-repo-work-readiness-smoke.rs +++ b/epiphany-core/src/bin/epiphany-repo-work-readiness-smoke.rs @@ -1,9 +1,9 @@ -use anyhow::anyhow; use anyhow::Context; use anyhow::Result; +use anyhow::anyhow; use chrono::Utc; -use serde_json::json; use serde_json::Value; +use serde_json::json; use std::env; use std::fs; use std::path::Path; @@ -129,6 +129,10 @@ fn run_smoke(args: Args) -> Result { item, "--summary", "Prove repo-work readiness sight can name missing publication and lifecycle gates without granting authority.", + "--local-verse-store", + path_str(&local_verse)?, + "--runtime-id", + "repo-work-readiness-smoke", "--candidate-action-ref", "candidate-action://repo-work-readiness/checklist", "--public-discussion-ref", @@ -233,6 +237,21 @@ fn run_smoke(args: Args) -> Result { )?; require_bool(&readiness, &["authority", "handsActionAuthorized"], false)?; require_bool(&readiness, &["authority", "privateStateExposed"], false)?; + require_eq( + &readiness, + &["verseProjection", "documentType"], + "epiphany.cultmesh.repo_work_readiness", + )?; + require_eq( + &readiness, + &["verseProjection", "readinessId"], + "repo-work-readiness-repo-work-readiness", + )?; + require_bool( + &readiness, + &["verseProjection", "privateStateExposed"], + false, + )?; require_row(&readiness, "repo-init", true)?; require_row(&readiness, "swarm-online", true)?; require_row(&readiness, "persona-intake", true)?; @@ -248,6 +267,32 @@ fn run_smoke(args: Args) -> Result { require_row(&readiness, "tool-directory", false)?; require_row(&readiness, "private-state-redaction", true)?; + let gjallar = cargo_json( + &manifest, + "epiphany-verse-query", + &[ + "gjallar", + "--store", + path_str(&local_verse)?, + "--runtime-id", + "repo-work-readiness-smoke", + ], + &root, + )?; + require_u64(&gjallar, &["repoWorkReadinessCount"], 1)?; + require_eq( + &gjallar, + &["latestRepoWorkReadiness"], + "repo-work-readiness-repo-work-readiness", + )?; + require_bool(&gjallar, &["privateStateExposed"], false)?; + require_tui_row_contains( + &gjallar, + &["repoWorkReadinessTuiRows"], + "REPO-WORK-READINESS", + )?; + require_tui_row_contains(&gjallar, &["swarmActionTuiRows"], "repo-work-readiness")?; + let summary = json!({ "schemaVersion": "epiphany.repo_work_readiness_smoke.v0", "status": "ok", @@ -258,6 +303,9 @@ fn run_smoke(args: Args) -> Result { "publicProofOutput": public_proof["outputPath"], "readinessStatus": readiness["status"], "missingRequiredCount": readiness["missingRequiredCount"], + "readinessVerseProjection": readiness["verseProjection"], + "gjallarRepoWorkReadinessCount": gjallar["repoWorkReadinessCount"], + "gjallarLatestRepoWorkReadiness": gjallar["latestRepoWorkReadiness"], "sightOnly": readiness["authority"]["sightOnly"], "readinessApprovalAuthorized": readiness["authority"]["readinessApprovalAuthorized"], "publicationAuthorized": readiness["authority"]["publicationAuthorized"], @@ -416,6 +464,26 @@ fn require_row(value: &Value, kind: &str, expected_satisfied: bool) -> Result<() } } +fn require_tui_row_contains(value: &Value, path: &[&str], needle: &str) -> Result<()> { + let rows = path + .iter() + .try_fold(value, |current, key| current.get(*key)) + .and_then(Value::as_array) + .ok_or_else(|| anyhow!("{} did not contain TUI rows", path.join(".")))?; + if rows + .iter() + .filter_map(Value::as_str) + .any(|row| row.contains(needle)) + { + Ok(()) + } else { + Err(anyhow!( + "expected {} to contain row fragment {needle:?}", + path.join(".") + )) + } +} + fn take_path( args: &mut std::iter::Peekable>, flag: &str, diff --git a/epiphany-core/src/bin/epiphany-verse-query.rs b/epiphany-core/src/bin/epiphany-verse-query.rs index 22058e9a..9d7829c4 100644 --- a/epiphany-core/src/bin/epiphany-verse-query.rs +++ b/epiphany-core/src/bin/epiphany-verse-query.rs @@ -27,6 +27,7 @@ use epiphany_core::EpiphanyCultMeshOdinAdvertisementEntry; use epiphany_core::EpiphanyCultMeshRepoWorkMapEntry; use epiphany_core::EpiphanyCultMeshRepoWorkOverviewEntry; use epiphany_core::EpiphanyCultMeshRepoWorkPublicProofEntry; +use epiphany_core::EpiphanyCultMeshRepoWorkReadinessEntry; use epiphany_core::EpiphanyCultMeshSwarmBrakeEntry; use epiphany_core::EpiphanyCultMeshWorkLoopTelemetryEntry; use epiphany_core::EpiphanyLocalVerseContext; @@ -57,6 +58,7 @@ use epiphany_core::load_epiphany_cultmesh_eve_surface_directory; use epiphany_core::load_epiphany_cultmesh_repo_work_map_entries; use epiphany_core::load_epiphany_cultmesh_repo_work_overviews; use epiphany_core::load_epiphany_cultmesh_repo_work_public_proofs; +use epiphany_core::load_epiphany_cultmesh_repo_work_readiness_reports; use epiphany_core::load_epiphany_cultmesh_swarm_brake; use epiphany_core::load_latest_epiphany_cultmesh_agent_state_soa_summary; use epiphany_core::load_latest_epiphany_cultmesh_bifrost_body_change_publication_intent; @@ -75,6 +77,7 @@ use epiphany_core::load_latest_epiphany_cultmesh_imagination_consensus_receipt; use epiphany_core::load_latest_epiphany_cultmesh_repo_work_map_entry; use epiphany_core::load_latest_epiphany_cultmesh_repo_work_overview; use epiphany_core::load_latest_epiphany_cultmesh_repo_work_public_proof; +use epiphany_core::load_latest_epiphany_cultmesh_repo_work_readiness; use epiphany_core::open_epiphany_cultmesh_node; use epiphany_core::query_epiphany_local_verse_context; use epiphany_core::seed_epiphany_local_verse_context; @@ -3599,6 +3602,7 @@ fn run_cli() -> Result<()> { &[missing_artifact_action], &[], &[], + &[], ); if !missing_artifact_rows.iter().any(|row| { row.priority == 50 @@ -3649,6 +3653,7 @@ fn run_cli() -> Result<()> { &[synthetic_runbook_action], &[], &[], + &[], ); if !synthetic_artifact_rows.iter().any(|row| { row.priority == 50 @@ -4121,6 +4126,8 @@ struct SwarmOverviewReport { repo_work_map_acceptance_tui_rows: Vec, repo_work_overview_rows: Vec, repo_work_overview_tui_rows: Vec, + repo_work_readiness_rows: Vec, + repo_work_readiness_tui_rows: Vec, repo_work_public_proof_rows: Vec, repo_work_public_proof_tui_rows: Vec, idunn_deployment_receipt_rows: Vec, @@ -4130,6 +4137,7 @@ struct SwarmOverviewReport { latest_repo_work_gate: Option, latest_repo_work_blocker: Option, latest_repo_work_next_safe_move: Option, + latest_repo_work_readiness: Option, latest_repo_work_public_proof: Option, latest_idunn_deployment_receipt: Option, latest_idunn_aftercare_audit_receipt: Option, @@ -4333,6 +4341,27 @@ struct RepoWorkPublicProofRow { private_state_exposed: bool, } +#[derive(Clone, Serialize)] +#[serde(rename_all = "camelCase")] +struct RepoWorkReadinessRow { + readiness_id: String, + workspace: String, + item: String, + status: String, + missing_required_count: u32, + satisfied_required_count: u32, + readiness_receipt_ref: String, + overview_receipt_ref: String, + proof_bundle_id: String, + missing_kinds: Vec, + sight_only: bool, + readiness_approval_authorized: bool, + publication_authorized: bool, + service_lifecycle_authority: bool, + hands_action_authorized: bool, + private_state_exposed: bool, +} + #[derive(Clone, Serialize)] #[serde(rename_all = "camelCase")] struct IdunnDeploymentReceiptRow { @@ -4462,6 +4491,9 @@ struct SwarmOverviewOutput { repo_work_overview_count: usize, repo_work_overview_rows: Vec, repo_work_overview_tui_rows: Vec, + repo_work_readiness_count: usize, + repo_work_readiness_rows: Vec, + repo_work_readiness_tui_rows: Vec, repo_work_public_proof_count: usize, repo_work_public_proof_rows: Vec, repo_work_public_proof_tui_rows: Vec, @@ -4473,6 +4505,7 @@ struct SwarmOverviewOutput { latest_repo_work_gate: Option, latest_repo_work_blocker: Option, latest_repo_work_next_safe_move: Option, + latest_repo_work_readiness: Option, latest_repo_work_public_proof: Option, latest_idunn_deployment_receipt: Option, latest_idunn_aftercare_audit_receipt: Option, @@ -4566,6 +4599,9 @@ impl SwarmOverviewOutput { repo_work_overview_count: report.repo_work_overview_rows.len(), repo_work_overview_rows: report.repo_work_overview_rows, repo_work_overview_tui_rows: report.repo_work_overview_tui_rows, + repo_work_readiness_count: report.repo_work_readiness_rows.len(), + repo_work_readiness_rows: report.repo_work_readiness_rows, + repo_work_readiness_tui_rows: report.repo_work_readiness_tui_rows, repo_work_public_proof_count: report.repo_work_public_proof_rows.len(), repo_work_public_proof_rows: report.repo_work_public_proof_rows, repo_work_public_proof_tui_rows: report.repo_work_public_proof_tui_rows, @@ -4577,6 +4613,7 @@ impl SwarmOverviewOutput { latest_repo_work_gate: report.latest_repo_work_gate, latest_repo_work_blocker: report.latest_repo_work_blocker, latest_repo_work_next_safe_move: report.latest_repo_work_next_safe_move, + latest_repo_work_readiness: report.latest_repo_work_readiness, latest_repo_work_public_proof: report.latest_repo_work_public_proof, latest_idunn_deployment_receipt: report.latest_idunn_deployment_receipt, latest_idunn_aftercare_audit_receipt: report.latest_idunn_aftercare_audit_receipt, @@ -4662,6 +4699,9 @@ struct SwarmTriageOutput { repo_work_overview_count: usize, repo_work_overview_rows: Vec, repo_work_overview_tui_rows: Vec, + repo_work_readiness_count: usize, + repo_work_readiness_rows: Vec, + repo_work_readiness_tui_rows: Vec, repo_work_public_proof_count: usize, repo_work_public_proof_rows: Vec, repo_work_public_proof_tui_rows: Vec, @@ -4673,6 +4713,7 @@ struct SwarmTriageOutput { latest_repo_work_gate: Option, latest_repo_work_blocker: Option, latest_repo_work_next_safe_move: Option, + latest_repo_work_readiness: Option, latest_repo_work_public_proof: Option, latest_idunn_deployment_receipt: Option, latest_idunn_aftercare_audit_receipt: Option, @@ -4761,6 +4802,9 @@ impl SwarmTriageOutput { repo_work_overview_count: report.repo_work_overview_rows.len(), repo_work_overview_rows: report.repo_work_overview_rows, repo_work_overview_tui_rows: report.repo_work_overview_tui_rows, + repo_work_readiness_count: report.repo_work_readiness_rows.len(), + repo_work_readiness_rows: report.repo_work_readiness_rows, + repo_work_readiness_tui_rows: report.repo_work_readiness_tui_rows, repo_work_public_proof_count: report.repo_work_public_proof_rows.len(), repo_work_public_proof_rows: report.repo_work_public_proof_rows, repo_work_public_proof_tui_rows: report.repo_work_public_proof_tui_rows, @@ -4772,6 +4816,7 @@ impl SwarmTriageOutput { latest_repo_work_gate: report.latest_repo_work_gate, latest_repo_work_blocker: report.latest_repo_work_blocker, latest_repo_work_next_safe_move: report.latest_repo_work_next_safe_move, + latest_repo_work_readiness: report.latest_repo_work_readiness, latest_repo_work_public_proof: report.latest_repo_work_public_proof, latest_idunn_deployment_receipt: report.latest_idunn_deployment_receipt, latest_idunn_aftercare_audit_receipt: report.latest_idunn_aftercare_audit_receipt, @@ -4999,6 +5044,7 @@ fn swarm_action_rows( service_execution_runbook_actions: &[ServiceExecutionRunbookAction], repo_work_overviews: &[EpiphanyCultMeshRepoWorkOverviewEntry], repo_work_public_proofs: &[EpiphanyCultMeshRepoWorkPublicProofEntry], + repo_work_readiness_reports: &[EpiphanyCultMeshRepoWorkReadinessEntry], ) -> (Vec, Vec) { let mut rows = Vec::new(); let mut service_execution_check_counts = BTreeMap::::new(); @@ -5252,6 +5298,9 @@ fn swarm_action_rows( 60 + index as u32, )); } + for (index, readiness) in repo_work_readiness_reports.iter().take(5).enumerate() { + rows.push(repo_work_readiness_action_row(readiness, 70 + index as u32)); + } if rows.is_empty() { rows.push(SwarmActionRow { priority: 100, @@ -5399,9 +5448,7 @@ fn repo_work_map_semantic_rows( (rows, tui_rows) } -fn repo_work_map_semantic_row( - entry: &EpiphanyCultMeshRepoWorkMapEntry, -) -> RepoWorkMapSemanticRow { +fn repo_work_map_semantic_row(entry: &EpiphanyCultMeshRepoWorkMapEntry) -> RepoWorkMapSemanticRow { let (stage, stage_owner) = repo_work_stage_for_family(&entry.safe_action_family); RepoWorkMapSemanticRow { item: entry.item.clone(), @@ -5616,21 +5663,20 @@ fn repo_work_map_stage_lens_rows( let mut by_stage = BTreeMap::::new(); for entry in repo_work_map_entries { let (stage, owner) = repo_work_stage_for_family(&entry.safe_action_family); - let row = - by_stage - .entry(stage.clone()) - .or_insert_with(|| RepoWorkMapStageLensRow { - stage, - owner, - item_count: 0, - changed_path_count: 0, - safe_action_families: Vec::new(), - latest_item: String::new(), - latest_commit_sha: String::new(), - latest_mind_state_commit_receipt_id: String::new(), - publication_gate: entry.publication_gate.clone(), - private_state_exposed: false, - }); + let row = by_stage + .entry(stage.clone()) + .or_insert_with(|| RepoWorkMapStageLensRow { + stage, + owner, + item_count: 0, + changed_path_count: 0, + safe_action_families: Vec::new(), + latest_item: String::new(), + latest_commit_sha: String::new(), + latest_mind_state_commit_receipt_id: String::new(), + publication_gate: entry.publication_gate.clone(), + private_state_exposed: false, + }); row.item_count += 1; row.changed_path_count += entry.changed_paths.len(); if !row @@ -6005,6 +6051,65 @@ fn repo_work_public_proof_tui_row(row: &RepoWorkPublicProofRow) -> String { ) } +fn repo_work_readiness_rows( + reports: &[EpiphanyCultMeshRepoWorkReadinessEntry], +) -> (Vec, Vec) { + let rows = reports + .iter() + .map(repo_work_readiness_row) + .collect::>(); + let tui_rows = rows + .iter() + .map(repo_work_readiness_tui_row) + .collect::>(); + (rows, tui_rows) +} + +fn repo_work_readiness_row( + report: &EpiphanyCultMeshRepoWorkReadinessEntry, +) -> RepoWorkReadinessRow { + RepoWorkReadinessRow { + readiness_id: report.readiness_id.clone(), + workspace: report.workspace.clone(), + item: report.item.clone(), + status: report.status.clone(), + missing_required_count: report.missing_required_count, + satisfied_required_count: report.satisfied_required_count, + readiness_receipt_ref: report.readiness_receipt_ref.clone(), + overview_receipt_ref: report.overview_receipt_ref.clone(), + proof_bundle_id: report.proof_bundle_id.clone(), + missing_kinds: report.missing_kinds.clone(), + sight_only: report.sight_only, + readiness_approval_authorized: report.readiness_approval_authorized, + publication_authorized: report.publication_authorized, + service_lifecycle_authority: report.service_lifecycle_authority, + hands_action_authorized: report.hands_action_authorized, + private_state_exposed: report.private_state_exposed, + } +} + +fn repo_work_readiness_tui_row(row: &RepoWorkReadinessRow) -> String { + format!( + "REPO-WORK-READINESS | item={} | status={} | missing={} | satisfied={} | gaps={} | proof={} | sightOnly={} | approvalAuth={} | publicationAuth={} | serviceAuth={} | handsAuth={} | private={}", + row.item, + row.status, + row.missing_required_count, + row.satisfied_required_count, + if row.missing_kinds.is_empty() { + "none".to_string() + } else { + row.missing_kinds.join(",") + }, + row.proof_bundle_id, + row.sight_only, + row.readiness_approval_authorized, + row.publication_authorized, + row.service_lifecycle_authority, + row.hands_action_authorized, + row.private_state_exposed + ) +} + fn idunn_deployment_receipt_rows( deployment_receipt: Option<&EpiphanyCultMeshIdunnDeploymentReceiptEntry>, aftercare_receipt: Option<&EpiphanyCultMeshIdunnAftercareAuditReceiptEntry>, @@ -6171,6 +6276,62 @@ fn repo_work_public_proof_action_row( } } +fn repo_work_readiness_action_row( + readiness: &EpiphanyCultMeshRepoWorkReadinessEntry, + priority: u32, +) -> SwarmActionRow { + SwarmActionRow { + priority, + family: "repo-work-readiness".to_string(), + status: readiness.status.clone(), + lifecycle_owner: "Gjallar".to_string(), + hosted_body: "repo-work".to_string(), + action: format!( + "Read repo work readiness {} for item {}; Maintainer/Soul/Mind/Bifrost own readiness approval.", + readiness.readiness_id, readiness.item + ), + wrapper_mode: "repo-work-readiness".to_string(), + wrapper_command: format!( + "epiphany-work readiness --workspace \"{}\" --item \"{}\"", + readiness.workspace, readiness.item + ), + operator_artifact_ref: readiness.readiness_receipt_ref.clone(), + operator_artifact_status: if readiness.readiness_receipt_ref == "none" { + "none".to_string() + } else { + "external-ref".to_string() + }, + operator_artifact_sha256: "none".to_string(), + operator_artifact_execution_command: "none".to_string(), + operator_aftercare_command: "none".to_string(), + completion_audit_wrapper_mode: "none".to_string(), + completion_audit_wrapper_command: "none".to_string(), + authority_gate: "repo.work.readiness_readback".to_string(), + effect_class: "repo-work-readiness-readback".to_string(), + mutates_state: false, + requires_elevated_authority: false, + service_execution_failed_check_count: 0, + service_execution_missing_check_count: 0, + service_id: "none".to_string(), + service_route: "none".to_string(), + reason: format!( + "Readiness status={} missing={} gaps={}; approval={}, publication={}, service={}, hands={}", + readiness.status, + readiness.missing_required_count, + if readiness.missing_kinds.is_empty() { + "none".to_string() + } else { + readiness.missing_kinds.join(",") + }, + readiness.readiness_approval_authorized, + readiness.publication_authorized, + readiness.service_lifecycle_authority, + readiness.hands_action_authorized + ), + private_state_exposed: readiness.private_state_exposed, + } +} + fn swarm_action_tui_row(row: &SwarmActionRow) -> String { format!( "{:03} | {} | {} | {} | {} | owner={} | hostedBody={} | service={} | route={} | command={} | mutates={} | elevated={} | failedChecks={} | missingChecks={} | artifact={} | sha256={} | exec={} | audit={} | aftercare={}", @@ -6604,6 +6765,32 @@ fn load_repo_work_public_proofs( Ok((latest_public_proof, public_proofs)) } +fn load_repo_work_readiness_reports( + args: &Args, +) -> Result<( + Option, + Vec, +)> { + let latest_readiness = + load_latest_epiphany_cultmesh_repo_work_readiness(&args.store, args.runtime_id.clone())?; + let mut reports = + load_epiphany_cultmesh_repo_work_readiness_reports(&args.store, args.runtime_id.clone())?; + if let Some(latest) = latest_readiness.as_ref() { + if !reports + .iter() + .any(|report| report.readiness_id == latest.readiness_id) + { + reports.push(latest.clone()); + reports.sort_by(|a, b| { + b.generated_at + .cmp(&a.generated_at) + .then_with(|| a.readiness_id.cmp(&b.readiness_id)) + }); + } + } + Ok((latest_readiness, reports)) +} + fn load_swarm_overview_report(args: &Args) -> Result { let topology = load_epiphany_cultmesh_cluster_topology(&args.store, args.runtime_id.clone())?; let topology_report = cluster_topology_report(&topology); @@ -6613,6 +6800,8 @@ fn load_swarm_overview_report(args: &Args) -> Result { let (latest_repo_work_map_entry, repo_work_map_entries) = load_repo_work_map_entries(args)?; let (latest_repo_work_public_proof, repo_work_public_proofs) = load_repo_work_public_proofs(args)?; + let (latest_repo_work_readiness, repo_work_readiness_reports) = + load_repo_work_readiness_reports(args)?; let latest_idunn_deployment_receipt = load_latest_epiphany_cultmesh_idunn_deployment_receipt( &args.store, args.runtime_id.clone(), @@ -6853,6 +7042,8 @@ fn load_swarm_overview_report(args: &Args) -> Result { repo_work_map_acceptance_rows(&repo_work_map_entries); let (repo_work_public_proof_rows, repo_work_public_proof_tui_rows) = repo_work_public_proof_rows(&repo_work_public_proofs); + let (repo_work_readiness_rows, repo_work_readiness_tui_rows) = + repo_work_readiness_rows(&repo_work_readiness_reports); let (idunn_deployment_receipt_rows, idunn_deployment_receipt_tui_rows) = idunn_deployment_receipt_rows( latest_idunn_deployment_receipt.as_ref(), @@ -6867,6 +7058,7 @@ fn load_swarm_overview_report(args: &Args) -> Result { &service_execution_runbook_actions, &repo_work_overviews, &repo_work_public_proofs, + &repo_work_readiness_reports, ); let private_state_exposed = daemon_report .rows @@ -6907,6 +7099,9 @@ fn load_swarm_overview_report(args: &Args) -> Result { || repo_work_public_proofs .iter() .any(|proof| proof.private_state_exposed) + || repo_work_readiness_reports + .iter() + .any(|report| report.private_state_exposed) || idunn_deployment_receipt_rows .iter() .any(|row| row.private_state_exposed) @@ -6932,6 +7127,9 @@ fn load_swarm_overview_report(args: &Args) -> Result { let latest_repo_work_public_proof = latest_repo_work_public_proof .as_ref() .map(|proof| proof.public_proof_id.clone()); + let latest_repo_work_readiness = latest_repo_work_readiness + .as_ref() + .map(|report| report.readiness_id.clone()); let latest_idunn_deployment_receipt = latest_idunn_deployment_receipt .as_ref() .map(|receipt| receipt.receipt_id.clone()); @@ -6980,6 +7178,8 @@ fn load_swarm_overview_report(args: &Args) -> Result { repo_work_map_acceptance_tui_rows, repo_work_overview_rows, repo_work_overview_tui_rows, + repo_work_readiness_rows, + repo_work_readiness_tui_rows, repo_work_public_proof_rows, repo_work_public_proof_tui_rows, idunn_deployment_receipt_rows, @@ -6989,6 +7189,7 @@ fn load_swarm_overview_report(args: &Args) -> Result { latest_repo_work_gate, latest_repo_work_blocker, latest_repo_work_next_safe_move, + latest_repo_work_readiness, latest_repo_work_public_proof, latest_idunn_deployment_receipt, latest_idunn_aftercare_audit_receipt, diff --git a/epiphany-core/src/bin/epiphany-work.rs b/epiphany-core/src/bin/epiphany-work.rs index 0f30fe9a..4b0a8d6b 100644 --- a/epiphany-core/src/bin/epiphany-work.rs +++ b/epiphany-core/src/bin/epiphany-work.rs @@ -1,8 +1,32 @@ -use anyhow::anyhow; use anyhow::Context; use anyhow::Result; +use anyhow::anyhow; use chrono::DateTime; use chrono::Utc; +use epiphany_core::EPIPHANY_CULTMESH_LOCAL_AREA_VERSE_ID; +use epiphany_core::EPIPHANY_CULTMESH_REPO_WORK_MAP_ENTRY_LATEST_KEY; +use epiphany_core::EPIPHANY_CULTMESH_REPO_WORK_MAP_ENTRY_SCHEMA_VERSION; +use epiphany_core::EPIPHANY_CULTMESH_REPO_WORK_OVERVIEW_SCHEMA_VERSION; +use epiphany_core::EPIPHANY_CULTMESH_REPO_WORK_PUBLIC_PROOF_SCHEMA_VERSION; +use epiphany_core::EPIPHANY_CULTMESH_REPO_WORK_READINESS_SCHEMA_VERSION; +use epiphany_core::EpiphanyCultMeshRepoWorkMapEntry; +use epiphany_core::EpiphanyCultMeshRepoWorkOverviewEntry; +use epiphany_core::EpiphanyCultMeshRepoWorkPublicProofEntry; +use epiphany_core::EpiphanyCultMeshRepoWorkReadinessEntry; +use epiphany_core::HANDS_ACTION_INTENT_SCHEMA_VERSION; +use epiphany_core::HANDS_COMMAND_RECEIPT_TYPE; +use epiphany_core::HANDS_COMMIT_RECEIPT_TYPE; +use epiphany_core::HANDS_PATCH_RECEIPT_TYPE; +use epiphany_core::HANDS_PR_RECEIPT_TYPE; +use epiphany_core::HandsActionIntent; +use epiphany_core::MIND_GATEWAY_REVIEW_SCHEMA_VERSION; +use epiphany_core::MindGatewayDecision; +use epiphany_core::MindGatewayReview; +use epiphany_core::RuntimeSpineInitOptions; +use epiphany_core::SOUL_VERDICT_RECEIPT_SCHEMA_VERSION; +use epiphany_core::SUBSTRATE_GATE_REPO_ACCESS_GRANT_RECEIPT_SCHEMA_VERSION; +use epiphany_core::SoulVerdictReceipt; +use epiphany_core::SubstrateGateRepoAccessGrantReceipt; use epiphany_core::hands_action_review_for_intent; use epiphany_core::hands_command_receipt_for_review; use epiphany_core::hands_commit_receipt_for_review; @@ -34,32 +58,11 @@ use epiphany_core::runtime_latest_hands_receipt_chain_after; use epiphany_core::write_epiphany_cultmesh_repo_work_map_entry; use epiphany_core::write_epiphany_cultmesh_repo_work_overview; use epiphany_core::write_epiphany_cultmesh_repo_work_public_proof; -use epiphany_core::EpiphanyCultMeshRepoWorkMapEntry; -use epiphany_core::EpiphanyCultMeshRepoWorkOverviewEntry; -use epiphany_core::EpiphanyCultMeshRepoWorkPublicProofEntry; -use epiphany_core::HandsActionIntent; -use epiphany_core::MindGatewayDecision; -use epiphany_core::MindGatewayReview; -use epiphany_core::RuntimeSpineInitOptions; -use epiphany_core::SoulVerdictReceipt; -use epiphany_core::SubstrateGateRepoAccessGrantReceipt; -use epiphany_core::EPIPHANY_CULTMESH_LOCAL_AREA_VERSE_ID; -use epiphany_core::EPIPHANY_CULTMESH_REPO_WORK_MAP_ENTRY_LATEST_KEY; -use epiphany_core::EPIPHANY_CULTMESH_REPO_WORK_MAP_ENTRY_SCHEMA_VERSION; -use epiphany_core::EPIPHANY_CULTMESH_REPO_WORK_OVERVIEW_SCHEMA_VERSION; -use epiphany_core::EPIPHANY_CULTMESH_REPO_WORK_PUBLIC_PROOF_SCHEMA_VERSION; -use epiphany_core::HANDS_ACTION_INTENT_SCHEMA_VERSION; -use epiphany_core::HANDS_COMMAND_RECEIPT_TYPE; -use epiphany_core::HANDS_COMMIT_RECEIPT_TYPE; -use epiphany_core::HANDS_PATCH_RECEIPT_TYPE; -use epiphany_core::HANDS_PR_RECEIPT_TYPE; -use epiphany_core::MIND_GATEWAY_REVIEW_SCHEMA_VERSION; -use epiphany_core::SOUL_VERDICT_RECEIPT_SCHEMA_VERSION; -use epiphany_core::SUBSTRATE_GATE_REPO_ACCESS_GRANT_RECEIPT_SCHEMA_VERSION; +use epiphany_core::write_epiphany_cultmesh_repo_work_readiness; use serde::Deserialize; use serde::Serialize; -use serde_json::json; use serde_json::Value; +use serde_json::json; use sha2::Digest; use sha2::Sha256; use std::env; @@ -1524,9 +1527,9 @@ fn run_accept(args: AcceptArgs) -> Result { .join("swarm-online") .join("repo-swarm-online-receipt.json") }); - let online_receipt = read_json(&online_receipt_path).with_context(|| { - "repo swarm online receipt is required; run epiphany-swarm online first" - })?; + let online_receipt = read_json(&online_receipt_path).with_context( + || "repo swarm online receipt is required; run epiphany-swarm online first", + )?; let local_verse_store = args.local_verse_store.unwrap_or_else(|| { path_from_json(&online_receipt, &["localVerseStore"]) .unwrap_or_else(|| workspace.join(".epiphany").join("local-verse.ccmp")) @@ -1687,9 +1690,9 @@ fn run_persona_intake(args: PersonaIntakeArgs) -> Result { .join("swarm-online") .join("repo-swarm-online-receipt.json") }); - let online_receipt = read_json(&online_receipt_path).with_context(|| { - "repo swarm online receipt is required; run epiphany-swarm online first" - })?; + let online_receipt = read_json(&online_receipt_path).with_context( + || "repo swarm online receipt is required; run epiphany-swarm online first", + )?; let local_verse_store = args.local_verse_store.clone().unwrap_or_else(|| { path_from_json(&online_receipt, &["localVerseStore"]) .unwrap_or_else(|| workspace.join(".epiphany").join("local-verse.ccmp")) @@ -12028,6 +12031,11 @@ fn run_readiness(args: ReadinessArgs) -> Result { .join(format!("repo-work-public-proof-{item_slug}.json")) }); let readiness_receipt_path = artifact_dir.join(format!("work-readiness-{item_slug}.json")); + let accept_receipt = read_json(&accept_receipt_path)?; + let runtime_id = string_from_json(&accept_receipt, &["runtimeId"]) + .unwrap_or_else(|| "repo-swarm-local".to_string()); + let local_verse_store = path_from_json(&accept_receipt, &["localVerseStore"]) + .or_else(|| path_from_json(&accept_receipt, &["localVerseStorePath"])); let close_receipt = read_json_if_exists(&close_receipt_path)?; let close_status = close_receipt @@ -12195,6 +12203,13 @@ fn run_readiness(args: ReadinessArgs) -> Result { .iter() .filter(|row| row.get("satisfied").and_then(Value::as_bool) != Some(true)) .count(); + let satisfied_rows = rows.len().saturating_sub(missing_rows); + let missing_kinds = rows + .iter() + .filter(|row| row.get("satisfied").and_then(Value::as_bool) != Some(true)) + .filter_map(|row| row.get("kind").and_then(Value::as_str)) + .map(str::to_string) + .collect::>(); let verdict = if missing_rows == 0 { "ready" } else { @@ -12206,6 +12221,26 @@ fn run_readiness(args: ReadinessArgs) -> Result { "Complete the missing readiness rows, then rerun epiphany-work readiness before asking for review." }; let now = Utc::now().to_rfc3339_opts(chrono::SecondsFormat::Secs, true); + let readiness_tui_rows = vec![ + format!( + "REPO-WORK-READINESS | item={} | status={} | missing={} | satisfied={} | receipt={} | approvalAuth=false | publicationAuth=false | serviceAuth=false | handsAuth=false | private=false", + item, + verdict, + missing_rows, + satisfied_rows, + readiness_receipt_path.display() + ), + format!( + "REPO-WORK-READINESS-GAPS | item={} | missingKinds={} | next={} | private=false", + item, + if missing_kinds.is_empty() { + "none".to_string() + } else { + missing_kinds.join(",") + }, + next_safe_move + ), + ]; let receipt = json!({ "schemaVersion": "epiphany.repo_work_readiness_report.v0", "createdAt": now, @@ -12241,6 +12276,54 @@ fn run_readiness(args: ReadinessArgs) -> Result { if args.write_receipt { write_json(&readiness_receipt_path, &receipt)?; } + let mut verse_projection = Value::Null; + if args.write_receipt { + if let Some(store) = local_verse_store.as_ref() { + let entry = EpiphanyCultMeshRepoWorkReadinessEntry { + schema_version: EPIPHANY_CULTMESH_REPO_WORK_READINESS_SCHEMA_VERSION.to_string(), + runtime_id: runtime_id.clone(), + verse_id: EPIPHANY_CULTMESH_LOCAL_AREA_VERSE_ID.to_string(), + readiness_id: format!("repo-work-readiness-{item_slug}"), + generated_at: now.clone(), + workspace: workspace.display().to_string(), + item: item.clone(), + status: verdict.to_string(), + missing_required_count: missing_rows as u32, + satisfied_required_count: satisfied_rows as u32, + readiness_receipt_ref: readiness_receipt_path.display().to_string(), + overview_receipt_ref: overview["receiptPath"] + .as_str() + .unwrap_or("missing") + .to_string(), + proof_bundle_id: overview["proofBundle"]["bundleId"] + .as_str() + .unwrap_or("missing") + .to_string(), + missing_kinds: missing_kinds.clone(), + tui_rows: readiness_tui_rows.clone(), + sight_only: true, + readiness_approval_authorized: false, + publication_authorized: false, + service_lifecycle_authority: false, + hands_action_authorized: false, + private_state_exposed: false, + notes: vec![ + "Repo work readiness is reviewable sight only; Maintainer/Soul/Mind/Bifrost own any readiness approval.".to_string(), + "Bifrost/GitHub own publication and upstream-main sync; Idunn owns service lifecycle; Hands owns branch-local action consequences.".to_string(), + "Gjallar may project these rows without scheduling, publication, merge, deployment, service lifecycle, cross-body mutation, or private Verse authority.".to_string(), + ], + }; + let written = write_epiphany_cultmesh_repo_work_readiness(store, entry)?; + verse_projection = json!({ + "localVerseStore": store, + "documentType": "epiphany.cultmesh.repo_work_readiness", + "readinessId": written.readiness_id, + "latestKey": "gamecult-local/repo-work-readiness/latest", + "tuiRows": written.tui_rows, + "privateStateExposed": written.private_state_exposed + }); + } + } Ok(json!({ "schemaVersion": "epiphany.repo_work_readiness.v0", "status": verdict, @@ -12249,6 +12332,7 @@ fn run_readiness(args: ReadinessArgs) -> Result { "receiptPath": if args.write_receipt { Value::String(readiness_receipt_path.display().to_string()) } else { Value::Null }, "missingRequiredCount": missing_rows, "rows": receipt["rows"], + "verseProjection": verse_projection, "authority": receipt["authority"], "privateStateExposed": false, "nextSafeMove": receipt["nextSafeMove"] @@ -14782,11 +14866,7 @@ fn string_array_field(value: &Value, field: &str) -> Vec { } fn default_if_empty(values: Vec, defaults: Vec) -> Vec { - if values.is_empty() { - defaults - } else { - values - } + if values.is_empty() { defaults } else { values } } fn adopted_action_item_from_plan(plan: &Value) -> Value { diff --git a/epiphany-core/src/cultmesh_integration.rs b/epiphany-core/src/cultmesh_integration.rs index 8b1ee818..cc0dd0d4 100644 --- a/epiphany-core/src/cultmesh_integration.rs +++ b/epiphany-core/src/cultmesh_integration.rs @@ -76,6 +76,12 @@ pub const EPIPHANY_CULTMESH_REPO_WORK_OVERVIEW_SCHEMA_VERSION: &str = "epiphany.cultmesh.repo_work_overview.v0"; pub const EPIPHANY_CULTMESH_REPO_WORK_OVERVIEW_LATEST_KEY: &str = "gamecult-local/repo-work-overview/latest"; +pub const EPIPHANY_CULTMESH_REPO_WORK_READINESS_TYPE: &str = + "epiphany.cultmesh.repo_work_readiness"; +pub const EPIPHANY_CULTMESH_REPO_WORK_READINESS_SCHEMA_VERSION: &str = + "epiphany.cultmesh.repo_work_readiness.v0"; +pub const EPIPHANY_CULTMESH_REPO_WORK_READINESS_LATEST_KEY: &str = + "gamecult-local/repo-work-readiness/latest"; pub const EPIPHANY_CULTMESH_REPO_WORK_MAP_ENTRY_TYPE: &str = "epiphany.cultmesh.repo_work_map_entry"; pub const EPIPHANY_CULTMESH_REPO_WORK_MAP_ENTRY_SCHEMA_VERSION: &str = @@ -766,6 +772,58 @@ pub struct EpiphanyCultMeshRepoWorkOverviewEntry { pub notes: Vec, } +#[derive(Clone, Debug, PartialEq, Eq, DatabaseEntry)] +#[cultcache( + type = "epiphany.cultmesh.repo_work_readiness", + schema = "EpiphanyCultMeshRepoWorkReadinessEntry" +)] +pub struct EpiphanyCultMeshRepoWorkReadinessEntry { + #[cultcache(key = 0)] + pub schema_version: String, + #[cultcache(key = 1)] + pub runtime_id: String, + #[cultcache(key = 2)] + pub verse_id: String, + #[cultcache(key = 3)] + pub readiness_id: String, + #[cultcache(key = 4)] + pub generated_at: String, + #[cultcache(key = 5)] + pub workspace: String, + #[cultcache(key = 6)] + pub item: String, + #[cultcache(key = 7)] + pub status: String, + #[cultcache(key = 8)] + pub missing_required_count: u32, + #[cultcache(key = 9)] + pub satisfied_required_count: u32, + #[cultcache(key = 10)] + pub readiness_receipt_ref: String, + #[cultcache(key = 11)] + pub overview_receipt_ref: String, + #[cultcache(key = 12)] + pub proof_bundle_id: String, + #[cultcache(key = 13)] + pub missing_kinds: Vec, + #[cultcache(key = 14)] + pub tui_rows: Vec, + #[cultcache(key = 15)] + pub sight_only: bool, + #[cultcache(key = 16)] + pub readiness_approval_authorized: bool, + #[cultcache(key = 17)] + pub publication_authorized: bool, + #[cultcache(key = 18)] + pub service_lifecycle_authority: bool, + #[cultcache(key = 19)] + pub hands_action_authorized: bool, + #[cultcache(key = 20)] + pub private_state_exposed: bool, + #[cultcache(key = 21)] + pub notes: Vec, +} + #[derive(Clone, Debug, PartialEq, Eq, DatabaseEntry)] #[cultcache( type = "epiphany.cultmesh.repo_work_map_entry", @@ -2274,6 +2332,7 @@ cultmesh_documents!(EpiphanyCultMeshDocuments { EpiphanyCultMeshWorkLoopTelemetryEntry => EPIPHANY_CULTMESH_WORK_LOOP_TELEMETRY_SCHEMA_VERSION, EpiphanyCultMeshAgentStateSoaSummaryEntry => EPIPHANY_CULTMESH_AGENT_STATE_SOA_SUMMARY_SCHEMA_VERSION, EpiphanyCultMeshRepoWorkOverviewEntry => EPIPHANY_CULTMESH_REPO_WORK_OVERVIEW_SCHEMA_VERSION, + EpiphanyCultMeshRepoWorkReadinessEntry => EPIPHANY_CULTMESH_REPO_WORK_READINESS_SCHEMA_VERSION, EpiphanyCultMeshRepoWorkMapEntry => EPIPHANY_CULTMESH_REPO_WORK_MAP_ENTRY_SCHEMA_VERSION, EpiphanyCultMeshRepoWorkPublicProofEntry => EPIPHANY_CULTMESH_REPO_WORK_PUBLIC_PROOF_SCHEMA_VERSION, EpiphanyCultMeshVersePolicyEntry => EPIPHANY_CULTMESH_VERSE_POLICY_SCHEMA_VERSION, @@ -4675,6 +4734,45 @@ pub fn load_epiphany_cultmesh_repo_work_overviews( Ok(overviews) } +pub fn write_epiphany_cultmesh_repo_work_readiness( + store_path: impl AsRef, + readiness: EpiphanyCultMeshRepoWorkReadinessEntry, +) -> Result { + validate_repo_work_readiness(&readiness)?; + let mut node = open_epiphany_cultmesh_node(&store_path, readiness.runtime_id.clone())?; + let written = node.put(readiness.readiness_id.clone(), &readiness)?; + node.put(EPIPHANY_CULTMESH_REPO_WORK_READINESS_LATEST_KEY, &written)?; + node.flush()?; + Ok(written) +} + +pub fn load_latest_epiphany_cultmesh_repo_work_readiness( + store_path: impl AsRef, + runtime_id: impl Into, +) -> Result> { + let node = open_epiphany_cultmesh_node(store_path, runtime_id)?; + node.get(EPIPHANY_CULTMESH_REPO_WORK_READINESS_LATEST_KEY) +} + +pub fn load_epiphany_cultmesh_repo_work_readiness_reports( + store_path: impl AsRef, + runtime_id: impl Into, +) -> Result> { + let node = open_epiphany_cultmesh_node(store_path, runtime_id)?; + let mut reports = node + .get_all_with_keys::()? + .into_iter() + .filter(|(key, _)| key != EPIPHANY_CULTMESH_REPO_WORK_READINESS_LATEST_KEY) + .map(|(_, report)| report) + .collect::>(); + reports.sort_by(|a, b| { + b.generated_at + .cmp(&a.generated_at) + .then_with(|| a.readiness_id.cmp(&b.readiness_id)) + }); + Ok(reports) +} + pub fn write_epiphany_cultmesh_repo_work_map_entry( store_path: impl AsRef, map_entry: EpiphanyCultMeshRepoWorkMapEntry, @@ -4790,6 +4888,51 @@ fn validate_repo_work_overview(overview: &EpiphanyCultMeshRepoWorkOverviewEntry) Ok(()) } +fn validate_repo_work_readiness(readiness: &EpiphanyCultMeshRepoWorkReadinessEntry) -> Result<()> { + if readiness.private_state_exposed { + return Err(anyhow!("repo work readiness must not expose private state")); + } + if readiness.schema_version != EPIPHANY_CULTMESH_REPO_WORK_READINESS_SCHEMA_VERSION { + return Err(anyhow!( + "repo work readiness schema_version must be {:?}", + EPIPHANY_CULTMESH_REPO_WORK_READINESS_SCHEMA_VERSION + )); + } + if readiness.verse_id != EPIPHANY_CULTMESH_LOCAL_AREA_VERSE_ID { + return Err(anyhow!( + "repo work readiness belongs in local-area Verse {:?}", + EPIPHANY_CULTMESH_LOCAL_AREA_VERSE_ID + )); + } + if readiness.readiness_id.trim().is_empty() || readiness.item.trim().is_empty() { + return Err(anyhow!( + "repo work readiness requires readiness_id and item" + )); + } + if !readiness.sight_only + || readiness.readiness_approval_authorized + || readiness.publication_authorized + || readiness.service_lifecycle_authority + || readiness.hands_action_authorized + { + return Err(anyhow!( + "repo work readiness is sight only and must not grant approval, publication, service, or Hands authority" + )); + } + if readiness.tui_rows.is_empty() { + return Err(anyhow!("repo work readiness requires compact TUI rows")); + } + if readiness.tui_rows.iter().any(|row| { + let lower = row.to_ascii_lowercase(); + lower.contains("rawresult") || lower.contains("receipt body") || lower.contains("thought") + }) { + return Err(anyhow!( + "repo work readiness rows must not expose raw worker payload names" + )); + } + Ok(()) +} + fn validate_repo_work_map_entry(entry: &EpiphanyCultMeshRepoWorkMapEntry) -> Result<()> { if entry.private_state_exposed { return Err(anyhow!("repo work map entry must not expose private state")); diff --git a/epiphany-core/src/lib.rs b/epiphany-core/src/lib.rs index 7d5dfd7a..b01332d2 100644 --- a/epiphany-core/src/lib.rs +++ b/epiphany-core/src/lib.rs @@ -212,6 +212,9 @@ pub use cultmesh_integration::EPIPHANY_CULTMESH_REPO_WORK_OVERVIEW_TYPE; pub use cultmesh_integration::EPIPHANY_CULTMESH_REPO_WORK_PUBLIC_PROOF_LATEST_KEY; pub use cultmesh_integration::EPIPHANY_CULTMESH_REPO_WORK_PUBLIC_PROOF_SCHEMA_VERSION; pub use cultmesh_integration::EPIPHANY_CULTMESH_REPO_WORK_PUBLIC_PROOF_TYPE; +pub use cultmesh_integration::EPIPHANY_CULTMESH_REPO_WORK_READINESS_LATEST_KEY; +pub use cultmesh_integration::EPIPHANY_CULTMESH_REPO_WORK_READINESS_SCHEMA_VERSION; +pub use cultmesh_integration::EPIPHANY_CULTMESH_REPO_WORK_READINESS_TYPE; pub use cultmesh_integration::EPIPHANY_CULTMESH_ROLE_REVIEW_EVENT_LATEST_KEY; pub use cultmesh_integration::EPIPHANY_CULTMESH_ROLE_REVIEW_EVENT_SCHEMA_VERSION; pub use cultmesh_integration::EPIPHANY_CULTMESH_ROLE_REVIEW_EVENT_TYPE; @@ -270,6 +273,7 @@ pub use cultmesh_integration::EpiphanyCultMeshPersonaSpeechAuditEntry; pub use cultmesh_integration::EpiphanyCultMeshRepoWorkMapEntry; pub use cultmesh_integration::EpiphanyCultMeshRepoWorkOverviewEntry; pub use cultmesh_integration::EpiphanyCultMeshRepoWorkPublicProofEntry; +pub use cultmesh_integration::EpiphanyCultMeshRepoWorkReadinessEntry; pub use cultmesh_integration::EpiphanyCultMeshRoleReviewEventEntry; pub use cultmesh_integration::EpiphanyCultMeshSoulContractEntry; pub use cultmesh_integration::EpiphanyCultMeshStatusEntry; @@ -331,6 +335,7 @@ pub use cultmesh_integration::load_epiphany_cultmesh_operator_status; pub use cultmesh_integration::load_epiphany_cultmesh_repo_work_map_entries; pub use cultmesh_integration::load_epiphany_cultmesh_repo_work_overviews; pub use cultmesh_integration::load_epiphany_cultmesh_repo_work_public_proofs; +pub use cultmesh_integration::load_epiphany_cultmesh_repo_work_readiness_reports; pub use cultmesh_integration::load_epiphany_cultmesh_status; pub use cultmesh_integration::load_epiphany_cultmesh_swarm_brake; pub use cultmesh_integration::load_latest_epiphany_cultmesh_agent_state_soa_summary; @@ -359,6 +364,7 @@ pub use cultmesh_integration::load_latest_epiphany_cultmesh_persona_speech_audit pub use cultmesh_integration::load_latest_epiphany_cultmesh_repo_work_map_entry; pub use cultmesh_integration::load_latest_epiphany_cultmesh_repo_work_overview; pub use cultmesh_integration::load_latest_epiphany_cultmesh_repo_work_public_proof; +pub use cultmesh_integration::load_latest_epiphany_cultmesh_repo_work_readiness; pub use cultmesh_integration::load_latest_epiphany_cultmesh_role_review_event; pub use cultmesh_integration::load_latest_epiphany_cultmesh_work_loop_telemetry; pub use cultmesh_integration::open_epiphany_cultmesh_node; @@ -402,6 +408,7 @@ pub use cultmesh_integration::write_epiphany_cultmesh_persona_speech_audit; pub use cultmesh_integration::write_epiphany_cultmesh_repo_work_map_entry; pub use cultmesh_integration::write_epiphany_cultmesh_repo_work_overview; pub use cultmesh_integration::write_epiphany_cultmesh_repo_work_public_proof; +pub use cultmesh_integration::write_epiphany_cultmesh_repo_work_readiness; pub use cultmesh_integration::write_epiphany_cultmesh_role_review_event; pub use cultmesh_integration::write_epiphany_cultmesh_soul_contracts; pub use cultmesh_integration::write_epiphany_cultmesh_status; diff --git a/notes/epiphany-repo-swarm-mvp-contract.md b/notes/epiphany-repo-swarm-mvp-contract.md index f2af30ac..8cf107c0 100644 --- a/notes/epiphany-repo-swarm-mvp-contract.md +++ b/notes/epiphany-repo-swarm-mvp-contract.md @@ -1612,13 +1612,21 @@ queue-run, Hands branch work, Soul closure, Modeling/Mind admission, redacted public proof, Bifrost publication, upstream-main sync, Idunn lifecycle, daemon tool directory, and private-state redaction rows, then writes `.epiphany/work/work-readiness-.json` as -`epiphany.repo_work_readiness_report.v0`. The command is sight only: it denies -readiness approval, durable state commit, publication, PR, merge, sync, -deployment, service lifecycle, Hands action, cross-body mutation, private Verse -rummaging, and private-state exposure. Smoke -`.epiphany-smoke\repo-work-readiness-20260621-092053` proved a partial local -work path reports `not-ready` with four missing rows: Bifrost publication, -upstream-main sync, Idunn lifecycle, and tool directory. +`epiphany.repo_work_readiness_report.v0`. When the accept receipt names a +repo-local Verse store, it also mirrors a compact +`epiphany.cultmesh.repo_work_readiness.v0` document with `REPO-WORK-READINESS` +TUI rows, missing proof kinds, readiness receipt ref, overview receipt ref, and +explicit sight-only authority denials. Gjallar, swarm overview, and swarm triage +now enumerate those documents as `repoWorkReadinessRows`, compact readiness TUI +rows, `latestRepoWorkReadiness`, and non-mutating `repo-work-readiness` action +rows. The command is sight only: it denies readiness approval, durable state +commit, publication, PR, merge, sync, deployment, service lifecycle, Hands +action, cross-body mutation, private Verse rummaging, and private-state +exposure. Smoke `.epiphany-smoke\repo-work-readiness-20260621-094043` proved a +partial local work path reports `not-ready` with four missing rows: Bifrost +publication, upstream-main sync, Idunn lifecycle, and tool directory; writes +readiness id `repo-work-readiness-repo-work-readiness`; and Gjallar reports +`repoWorkReadinessCount=1` without private-state exposure. Bifrost public-proof publication transport is now the closure after local proof sight. `epiphany-verse-query bifrost-public-proof --public-proof-id @@ -1876,7 +1884,7 @@ temptation wearing clean robes. | Self scheduling | `tick` and `serve` prove one-step branch-local advancement, brake refusal, active-turn refusal, cooldown, and stale-turn recovery; `tick` now routes executed branch-local work through the existing Soul/Modeling/Mind `close` gate; `queue-run` selects tick-actionable rows from the typed repo-work queue and delegates to `tick`; `epiphany-swarm run` is the bounded operator mouth over that queue/tick physiology; `repo-work-service-plan`, `repo-work-service-runbook`, `repo-work-service-launch`, and `repo-work-service-audit` write Idunn lifecycle receipts/artifacts for the same queue-run command and prove non-mutating launch/readiness closure. | Keep any future queue-run service install/start mutation behind Idunn and explicit elevated operator authority. | | Branch-local Hands work | `adopt` and `execute` create approved Hands gates, run planned commands, stage declared paths, commit on `epiphany/*`, and write receipts. | Keep mutation branch-contained and receipt-backed; broaden only through typed plan families, not ad hoc shell freedom. | | Soul/Modeling/Mind closure | `close` verifies the Hands commit, writes `epiphany.repo_work_closure_review.v0`, refuses path-scope mismatches, refuses missing/tampered/non-affirmative Mind adoption proof, runs known safe-family content assertions, optionally gates on model-authored closure verdicts, can require verification output to cite declared changed paths with `--require-source-grounding`, writes Soul/Modeling/Mind receipts, admits a compact typed repo map entry into `.epiphany/state/repo-work-map.msgpack`, and mirrors that admitted fact into local Verse as `epiphany.cultmesh.repo_work_map_entry.v0`. | Keep extending closure toward source-grounded semantic review and richer semantic map lenses, while preserving deterministic local closure for simple mechanical work. | -| Repo work sight | `overview` emits compact proof rows, an `epiphany.repo_work_intake_consensus_readback.v0` from the accept/plan chain, and typed `epiphany.cultmesh.repo_work_overview.v0` event documents plus a latest key; `readiness` now emits `epiphany.repo_work_readiness_report.v0` over the MVP proof rows and names missing Bifrost/upstream/Idunn/tool-directory gates without approving readiness; the CultMesh TUI rows include compact `CONSENSUS` readback showing Persona/public feedback ids, Imagination consensus route, public/candidate ref counts, safe family, and authority denials without private payloads; `close` mirrors Mind-admitted map facts as `epiphany.cultmesh.repo_work_map_entry.v0`; Gjallar enumerates overview history, map rows, semantic rows, closure rows, family lens rows, path lens rows, branch lens rows, stage lens rows, gate lens rows, and public-proof rows without private-state exposure; Persona's Eve surface and Eve connection readbacks expose peer-readable gate/blocker/next-action rows; `queue-run` consumes the same overview queue for branch-local scheduler pulses. | Deepen Bifrost-first external work accounting and semantic map readback without moving action authority out of Hands/Self/Bifrost. | +| Repo work sight | `overview` emits compact proof rows, an `epiphany.repo_work_intake_consensus_readback.v0` from the accept/plan chain, and typed `epiphany.cultmesh.repo_work_overview.v0` event documents plus a latest key; `readiness` now emits `epiphany.repo_work_readiness_report.v0` and mirrors `epiphany.cultmesh.repo_work_readiness.v0` over the MVP proof rows, naming missing Bifrost/upstream/Idunn/tool-directory gates without approving readiness; the CultMesh TUI rows include compact `CONSENSUS` and `REPO-WORK-READINESS` readbacks showing Persona/public feedback ids, Imagination consensus route, public/candidate ref counts, safe family, readiness gaps, and authority denials without private payloads; `close` mirrors Mind-admitted map facts as `epiphany.cultmesh.repo_work_map_entry.v0`; Gjallar enumerates overview history, readiness rows, map rows, semantic rows, closure rows, family lens rows, path lens rows, branch lens rows, stage lens rows, gate lens rows, and public-proof rows without private-state exposure; Persona's Eve surface and Eve connection readbacks expose peer-readable gate/blocker/next-action rows; `queue-run` consumes the same overview queue for branch-local scheduler pulses. | Deepen Bifrost-first external work accounting and semantic map readback without moving action authority out of Hands/Self/Bifrost. | | Publication | `publish` routes Bifrost/GitHub receipts from closure or explicit Soul/Mind refs. | Keep publication Bifrost-owned; do not let scheduler publish. | | Upstream main sync | `sync` proves the published commit is contained by upstream main after explicit merge/sync authority. | Treat upstream-main sync as a required final proof for published work. | | Daemon survival | Idunn service lifecycle receipts and runbooks exist outside repo-work tick authority. | Preserve Idunn as lifecycle owner; repo swarm may request or inspect service state, not impersonate daemon keeping. | diff --git a/notes/fresh-workspace-handoff.md b/notes/fresh-workspace-handoff.md index 0f4d64d8..730c7609 100644 --- a/notes/fresh-workspace-handoff.md +++ b/notes/fresh-workspace-handoff.md @@ -159,7 +159,7 @@ remembers doctrine; the branch remembers the blade. - 2026-06-20: `derive-plan` action-item receipts now carry richer model-authored planning facets without widening command authority, and `adopt --from-plan` now preserves the chosen Imagination action item in the Mind adoption receipt. New CLI fields `--assumption`, `--constraint`, `--non-goal`, `--open-question`, `--decision-point`, and `--evidence-need` are recorded under `planningFacets` in `epiphany.repo_work_imagination_action_items_receipt.v0`, mirrored into the plan derivation's `actionItemReceipt`, then copied into `epiphany.repo_work_adoption_receipt.v0` as `adoptedActionItem`; deterministic defaults are emitted when a model does not supply them. Focused smoke `.epiphany-smoke\repo-planning-facets-20260620-164958` ran init -> online -> accept -> model-authored `derive-plan --action-family planning-note` with all facet fields -> tick run/adopt/execute/close; the action-item receipt preserved assumptions, constraints, non-goals, open questions, decision points, and evidence needs while `handsAuthorityGranted=false`, `durableStateAdmitted=false`, `handsCommandAuthority=false`, `durableStateAuthority=false`, and `privateStateExposed=false`; the adoption receipt preserved `adoptedActionItem.safeActionFamily=repo.markdown_planning_note`, planning facets, `adoptedActionItem.handsCommandAuthority=false`, `adoptedActionItem.durableStateAuthority=false`, `adoptedActionItem.publicationAuthorized=false`, `authority.handsAuthorityGranted=true`, `authority.durableStateAdmitted=false`, and `privateStateExposed=false`; Soul closure passed with family assertions and path scope matched. Current remaining repo-swarm MVP organs are deeper interpreter/adoption semantics, more useful repo-owned configuration/action families, and Idunn-owned queue-run service lifecycle under explicit operator authority. - 2026-06-21: `repo-planning-brief` is live as richer family-friendly Imagination decomposition cargo, and Soul closure now emits a typed safe-family planning readback for its full matrix. `epiphany-work derive-plan --action-family repo-planning-brief` writes `.epiphany/planning-briefs/.toml` with safe family `repo.planning_brief`, status `draft`, twenty-one candidate next safe families grouped as preparation, adoption/queue, execution/review, publication/accounting, and policy/deployment, requested-path / verification-ask / evidence-need / owner / authority-denial / closure-proof requirements, and Mind/Self/Substrate/Hands/Soul/Bifrost/Idunn gate ordering while denying objective adoption, scheduling, substrate access, Hands action, shell, commit, publication, deployment execution, service lifecycle, cross-body mutation, private transcripts, raw-result payloads, and private-state exposure. Closure `familyAssertions.safeFamilyPlanning` now carries `epiphany.repo_work_safe_family_planning_readback.v0` with candidate-family rows/count, grouped matrix rows, matrix control flags, closure proof flags, planning requirement flags, gate flags, authority-denial flags, and the private-state seal. Focused smoke `.epiphany-smoke\repo-planning-brief-family-20260621-090158` ran init -> online -> accept -> repo-planning-brief derive-plan -> tick run/adopt/execute/close; Hands committed only `.epiphany/planning-briefs/repo-planning-brief-family.toml`, Soul passed with `pathScopeMatched=true`, `familyAssertions.status=passed`, `candidateNextSafeFamilyCount=21`, `allMatrixGroupsComplete=true`, `matrixControlsPresent=true`, `allClosureProofsPresent=true`, `allRequiredGatesPresent=true`, `authorityDenied=true`, and `privateStateExposed=false`. Current remaining repo-swarm MVP organs are deeper interpreter semantics, richer closure/map readback, another useful repo-owned safe family if needed, or Idunn-owned queue-run service lifecycle under explicit operator authority. - 2026-06-21: `repo-readiness-review-request` is live as the family-friendly MVP readiness review gate. `epiphany-work derive-plan --action-family repo-readiness-review-request` writes `.epiphany/readiness-reviews/.toml` with safe family `repo.readiness_review_request`, status `awaiting-mvp-readiness-review`, requested owner `Maintainer/Soul/Mind/Bifrost`, proof-bundle/readiness packet requirements for repo init, online swarm, Persona intake, Imagination planning, Self queue-run, Hands branch work, Soul closure, Modeling map update, Mind admission, Bifrost publication, upstream-main sync, Idunn lifecycle, global tool directory, and private-state redaction, while denying readiness approval, durable state commit, publication, Bifrost publication, PR, merge, upstream sync, deployment, service lifecycle, Hands action, cross-body mutation, private Verse rummaging, and private-state exposure. Focused smoke `.epiphany-smoke\repo-readiness-review-request-family-20260621-090003` ran init -> online -> accept -> repo-readiness-review-request derive-plan -> tick run/adopt/execute/close; Hands committed only `.epiphany/readiness-reviews/repo-readiness-review-request-family.toml`, Soul passed with `pathScopeMatched=true`, `familyAssertions.status=passed`, `awaitingMvpReadinessReview=true`, `idunnLifecycleRequired=true`, `toolDirectoryRequired=true`, and `privateStateExposed=false`. The planning-brief matrix now counts twenty-one families and includes this readiness review in publication/accounting; smoke `.epiphany-smoke\repo-planning-brief-family-20260621-090158` proved `candidateNextSafeFamilyCount=21`. -- 2026-06-21: `epiphany-work readiness` is live as a non-mutating repo-work MVP readiness sight rite. It reuses overview/proof-bundle state, inspects repo init, online swarm, Persona intake, Imagination plan, Self queue-run, Hands execute, Soul closure, Modeling/Mind admission, redacted public proof, Bifrost publication, upstream-main sync, Idunn lifecycle, daemon tool directory, and private-state redaction rows, then writes `.epiphany/work/work-readiness-.json` with schema `epiphany.repo_work_readiness_report.v0`. It can return `ready` only when all rows are satisfied, but it does not approve readiness or grant durable state, publication, PR, merge, sync, deployment, service lifecycle, Hands action, cross-body, or private Verse authority. Focused smoke `.epiphany-smoke\repo-work-readiness-20260621-092053` ran fresh repo init -> online -> accept -> checklist plan/tick close -> queue-run dry-run -> public-proof export -> readiness; it reported `not-ready`, `missingRequiredCount=4` for Bifrost publication, upstream-main sync, Idunn lifecycle, and tool directory, while local work/proof rows were satisfied, `sightOnly=true`, and `privateStateExposed=false`. +- 2026-06-21: `epiphany-work readiness` is live as a non-mutating repo-work MVP readiness sight rite, and now mirrors compact readiness into the repo-local Verse. It reuses overview/proof-bundle state, inspects repo init, online swarm, Persona intake, Imagination plan, Self queue-run, Hands execute, Soul closure, Modeling/Mind admission, redacted public proof, Bifrost publication, upstream-main sync, Idunn lifecycle, daemon tool directory, and private-state redaction rows, then writes `.epiphany/work/work-readiness-.json` with schema `epiphany.repo_work_readiness_report.v0` plus `epiphany.cultmesh.repo_work_readiness.v0` when the accept receipt names a local Verse store. Gjallar/swarm-overview/swarm-triage now expose `repoWorkReadinessRows`, compact `REPO-WORK-READINESS` TUI rows, `latestRepoWorkReadiness`, and non-mutating `repo-work-readiness` action rows. It can return `ready` only when all rows are satisfied, but it does not approve readiness or grant durable state, publication, PR, merge, sync, deployment, service lifecycle, Hands action, cross-body, or private Verse authority. Focused smoke `.epiphany-smoke\repo-work-readiness-20260621-094043` ran fresh repo init -> online -> accept -> checklist plan/tick close -> queue-run dry-run -> public-proof export -> readiness -> Gjallar; it reported `not-ready`, `missingRequiredCount=4` for Bifrost publication, upstream-main sync, Idunn lifecycle, and tool directory, wrote readiness id `repo-work-readiness-repo-work-readiness`, Gjallar reported `repoWorkReadinessCount=1`, while local work/proof rows were satisfied, `sightOnly=true`, and `privateStateExposed=false`. - 2026-06-21: `repo-interpreter-brief` is live as Mind-owned interpretation cargo between Imagination consensus and downstream action-family adoption. `epiphany-work derive-plan --action-family repo-interpreter-brief` writes `.epiphany/interpreter-briefs/.toml` with safe family `repo.interpreter_brief`, status `draft`, owner `Mind`, source `Imagination`, consensus/safe-family/path/verification/evidence requirements, semantic checks for intent/scope/paths/verification/evidence/rollback/non-goals/questions/consensus, candidate next safe families, and Mind/Soul/Bifrost/Hands/Substrate/Idunn gates while denying direct state commit, objective adoption, scheduling, substrate access, Hands action, shell, commit, publication, deployment execution, service lifecycle, cross-body mutation, private transcripts, raw-result payloads, and private-state exposure. Focused smoke `.epiphany-smoke\repo-interpreter-brief-family-20260621-010858` ran init -> online -> accept -> repo-interpreter-brief derive-plan -> tick run/adopt/execute/close; Hands committed only `.epiphany/interpreter-briefs/repo-interpreter-brief-family.toml`, Soul passed with `pathScopeMatched=true`, `familyAssertions.status=passed`, `mindOwnsInterpretation=true`, `candidateActionsNonAuthoritative=true`, `directStateCommitAuthorized=false`, `handsActionAuthorized=false`, and `privateStateExposed=false`. - 2026-06-20: Gjallar repo-work map sight now includes semantic stage lenses. `epiphany-verse-query gjallar`, swarm overview, and swarm triage expose `repoWorkMapStageLensRows` plus `REPO-WORK-MAP-STAGE` rows derived from Mind-admitted local Verse map entries, grouping safe families into stages and owning organs such as `imagination-planning` / `Imagination`, `hands-execution-request` / `Hands`, `soul-verification-request` / `Soul`, `bifrost-publication-accounting` / `Bifrost`, and `idunn-deployment` / `Idunn`. Focused smoke `.epiphany-smoke\repo-close-mind-adoption-guard-20260620-232414` proves the stage lens for accepted `repo.markdown_planning_note` work reports `stage=imagination-planning`, `owner=Imagination`, latest item/commit/Mind commit receipt, Bifrost gate, and `privateStateExposed=false`. This is sight only; Gjallar still does not schedule, publish, merge, deploy, keep daemons alive, or admit Mind state. - 2026-06-20: Gjallar repo-work map sight now includes next-publication-gate lenses. `epiphany-verse-query gjallar`, swarm overview, and swarm triage expose `repoWorkMapGateLensRows` plus `REPO-WORK-MAP-GATE` rows derived from the same Mind-admitted local Verse map entries, grouping accepted consequences by publication gate and naming the owning gate organ. Focused smoke `.epiphany-smoke\repo-close-mind-adoption-guard-20260620-233353` proves accepted `repo.markdown_planning_note` work reports `gate=Bifrost`, `owner=Bifrost`, latest item/commit/Mind commit receipt, `sightOnly=true`, `publicationAuthorized=false`, and `privateStateExposed=false`. This is sight only; Bifrost still owns publication/credit/upstream review and Gjallar does not schedule, publish, merge, deploy, keep daemons alive, or admit Mind state. diff --git a/state/ledgers.msgpack b/state/ledgers.msgpack index 655fe9c22958a712753886f11c94f88895fea282..3b790d81b49ba439fa7ffced46f59c53b95796e7 100644 GIT binary patch delta 553 zcmZWlJx|*}7_J?=L%J}~5UB%ig;=UMPQaB~ETl#y0)#{&LyN?A*w^HWb7$_(aWf&o zz{UdMw*CPYqzp)%I`J3y58b;}f^%p?s}8U3^gi#S=i}RD>Bm*+s%$*-yrtJ~c5j~8 zYIQVc92f>Y9-1dZ)6kQ@1wGdF(6r~z)ZNcQvA9s*uDxB#X{w%CWiXEdoG>S2d>=SQ z5usQJpe%zP;hb^xa@U+z??zVf)da5gYe1-EAiG$TG(Bb^is2*X0t2FvLbuioc14DG z&yk#<4hH-sVH(ZPceGgWM=M~Ns6fzcx160;u;B#F#>)C;b88E>Kdb{EqcM_L$lT~Z z)QZ+pU%y-Bk~8rJD3pZJF;TUDS+f@n`>C3pwr!Q1+s|uW&0BLjC^ql47$jF%6Je8?^Dib3RgJ@;gv;Y7A diff --git a/state/map.yaml b/state/map.yaml index 8e30f2c3..24cd5b81 100644 --- a/state/map.yaml +++ b/state/map.yaml @@ -91,7 +91,7 @@ active_subgoals: - Use `notes/epiphany-repo-swarm-mvp-contract.md` as the repo-swarm autonomy authority map. Autonomous branch-local work inside an Epiphany-owned repo Body is in scope and desired; the safety boundary is typed authority, branch containment, interruption, receipts, private-state sealing, and Bifrost-gated publication/merge/escalation, not asking a human before every local edit. Current safe-family cargo includes repo manifest, tool capability manifest, daemon-hosted tool request cargo, Eve/CultUI surface contract, repo collaboration policy, collaboration topics, consensus/objective/adoption/scheduling/work-order/verification/publication/sync/review/PR/credit/artifact/metrics/doctrine-update/secret-policy/deployment requests, repo deployment config, action-item receipts, Mind adoption interpretation/decision receipts, explicit Mind safe-family refusal proof `.epiphany-smoke\repo-mind-safe-family-guard-20260620-194425`, explicit Mind requested-path/plan changed-path refusal proof `.epiphany-smoke\repo-mind-path-guard-20260620-194239`, overview/public-proof/Gjallar/Eve readbacks, typed swarm-run stop classification, Idunn non-mutating queue-run lifecycle receipts, and fresh-repo upstream-main proof. Latest deployment proof `.epiphany-smoke\repo-deployment-config-family-20260620-221205` shows `repo.deployment_config` closes through Soul, `deployment-config-audit` reports `ready-for-idunn-review`, `deployment-execution-runbook` reports `ready-for-operator-git-push`, and `deployment-aftercare-audit` ingests local Verse/CultMesh Idunn deployment/aftercare receipt refs with source `cultmesh`, status `complete`, `deploymentComplete=true`, `daemonOwnsExecution=true`, no repo-agent execution/deployment/SSH/git-push/service/Hands/publication/merge/cross-body authority, and `privateStateExposed=false`; explicit Idunn receipt files remain only compatibility reliquaries. Latest deployment request proof `.epiphany-smoke\repo-deployment-request-family-20260620-195605` shows `repo.deployment_request` closes through Soul while requesting reviewed git-push-observed-by-Idunn deployment with script/host/secret/rollback/aftercare requirements and no deployment/SSH/git-push/service authority. Latest security cargo proof `.epiphany-smoke\repo-secret-policy-request-family-20260620-193046` shows `repo.secret_policy_request` closes through Soul while requesting reviewed secret/write/export/deployment policy without exposing secrets or granting write/deployment/publication authority. Governance proof `.epiphany-smoke\repo-doctrine-update-request-family-20260620-192140` shows `repo.doctrine_update_request` closes through Soul while requesting reviewed `AGENTS.md` doctrine work without mutating doctrine or granting Hands/service/publication authority. Swarm-run stop proofs now include `.epiphany-smoke\fresh-repo-mvp-20260620-180024` for `iteration-limit` / Self / `self.scheduler-iteration-limit` with upstream-main sync and public-proof export, plus `.epiphany-smoke\swarm-stop-classification-20260620-184717` for `queue-empty` / Gjallar / `repo.work.overview`, `dry-run-preview` / Self / `ready-to-run`, `authority-gated` / Bifrost / `awaiting-publication`, and `authority-gated` / Bifrost/GitHub / `awaiting-upstream-sync`; all stop packets are non-mutating, non-elevated, and `privateStateExposed=false`. Native proof `.epiphany-smoke\repo-work-service-lifecycle-20260620-185853` now proves Idunn-owned non-mutating repo-work queue-run service plan/runbook receipts for exact service id `epiphany-repo-work-queue-runner`, receipt-directory readback, runbook SHA-256 `f2ec67c4f8243a3ebc2f9e915b6b9f5ae2ac2d99d2cdb86905b54667adc456f8`, `hostedBody=repo-work`, no service-manager mutation, no launch, no elevation, and `privateStateExposed=false`. - Repo dependency/supply-chain policy request cargo is live. `repo-dependency-policy-request` lowers to safe family `repo.dependency_policy_request` and writes `.epiphany/dependency-policy-requests/.toml` with manifest inventory, lockfile policy, package-manager command review, network fetch policy, vulnerability/license/vendored-code/update-cadence requirements, Eyes/Soul/Mind/maintainer/Bifrost/dependency-audit receipt refs, and denials for dependency update, package install, lockfile mutation, network fetch, CI mutation, Hands, publication, merge, deployment, service lifecycle, cross-body mutation, private Verse rummaging, and private-state exposure. Proof `.epiphany-smoke\repo-dependency-policy-request-family-20260621-083433` closes through Soul with `familyAssertionsStatus=passed`, `pathScopeMatched=true`, `awaitingDependencyPolicyReview=true`, all direct dependency/package/network/CI authorities false, and `privateStateExposed=false`. - Repo planning brief cargo now carries the family-friendly safe-family matrix. `repo-planning-brief` still lowers to safe family `repo.planning_brief` and writes `.epiphany/planning-briefs/.toml`, but it now names twenty-one candidate next safe families across preparation, adoption/queue, execution/review, publication/accounting, and policy/deployment groups, including `repo.readiness_review_request` for redacted repo-swarm MVP proof-bundle review before readiness claims. Each candidate must name owner, requested paths, verification asks, evidence needs, authority denials, and closure proofs. Closure `safeFamilyPlanning` readback now reports grouped matrix completeness, matrix controls, and closure proof presence while granting no scheduling, substrate, Hands, shell, commit, publication, deployment, service lifecycle, cross-body, private-transcript, raw-result, or private-state authority. Proof `.epiphany-smoke\repo-planning-brief-family-20260621-090158` closes through Soul with `candidateNextSafeFamilyCount=21`, `allMatrixGroupsComplete=true`, `matrixControlsPresent=true`, `allClosureProofsPresent=true`, `authorityDenied=true`, and `privateStateExposed=false`. - - Repo-work readiness sight is live. `epiphany-work readiness` reuses the existing overview/proof-bundle artery, inspects repo init, swarm online, Persona intake, Imagination plan, Self queue-run, Hands execute, Soul closure, Modeling/Mind admission, public proof, Bifrost publication, upstream-main sync, Idunn lifecycle, daemon tool directory, and private-state redaction rows, then writes `.epiphany/work/work-readiness-.json` as `epiphany.repo_work_readiness_report.v0`. It is sight only: no readiness approval, durable state commit, publication, PR, merge, sync, deployment, service lifecycle, Hands action, cross-body mutation, private Verse rummaging, or private-state exposure authority. Proof `.epiphany-smoke\repo-work-readiness-20260621-092053` drove a fresh repo through init/online/intake/checklist execution/closure/queue-run/public-proof export; readiness reported `not-ready`, `missingRequiredCount=4` for Bifrost publication, upstream-main sync, Idunn lifecycle, and tool directory, while local work/proof rows were satisfied and authority denials held. + - Repo-work readiness sight is live and now leaves typed local Verse rows. `epiphany-work readiness` reuses the existing overview/proof-bundle artery, inspects repo init, swarm online, Persona intake, Imagination plan, Self queue-run, Hands execute, Soul closure, Modeling/Mind admission, public proof, Bifrost publication, upstream-main sync, Idunn lifecycle, daemon tool directory, and private-state redaction rows, then writes `.epiphany/work/work-readiness-.json` as `epiphany.repo_work_readiness_report.v0` and mirrors compact `epiphany.cultmesh.repo_work_readiness.v0` into the repo-local Verse when the accept receipt names a local Verse store. Gjallar/swarm-overview/swarm-triage expose `repoWorkReadinessRows`, `REPO-WORK-READINESS` TUI rows, `latestRepoWorkReadiness`, and non-mutating `repo-work-readiness` action rows. It is sight only: no readiness approval, durable state commit, publication, PR, merge, sync, deployment, service lifecycle, Hands action, cross-body mutation, private Verse rummaging, or private-state exposure authority. Proof `.epiphany-smoke\repo-work-readiness-20260621-094043` drove a fresh repo through init/online/intake/checklist execution/closure/queue-run/public-proof export; readiness reported `not-ready`, `missingRequiredCount=4` for Bifrost publication, upstream-main sync, Idunn lifecycle, and tool directory, wrote readiness id `repo-work-readiness-repo-work-readiness`, Gjallar reported `repoWorkReadinessCount=1`, and authority denials held. - Repo-swarm Mind interpretation cargo is live. `repo-interpreter-brief` lowers to safe family `repo.interpreter_brief` and writes `.epiphany/interpreter-briefs/.toml` as draft Mind-owned interpretation from Imagination consensus, with semantic checks, candidate safe families, required Mind/Soul/Bifrost/Hands/Substrate/Idunn gates, and explicit denials for direct state commit, objective adoption, scheduling, substrate access, Hands action, shell, commit, publication, deployment execution, service lifecycle, cross-body mutation, private transcripts/raw results, and private-state exposure. Proof `.epiphany-smoke\repo-interpreter-brief-family-20260621-010858` closes through Soul with `familyAssertions.status=passed`, `mindOwnsInterpretation=true`, `candidateActionsNonAuthoritative=true`, `directStateCommitAuthorized=false`, `handsActionAuthorized=false`, and `privateStateExposed=false`. - Idunn-hosted repo-work queue-run lifecycle now has plan/runbook/launch/audit closure under explicit operator authority. `epiphany-daemon-supervisor repo-work-service-audit` reads all typed service lifecycle receipts for `epiphany-repo-work-queue-runner`, requires planned install-plan, written local runbook artifact, completed launch with exit code `0`, and no private-state exposure, then writes a `repo-work-service-audit` receipt with `status=complete` or `incomplete`. Native proof `.epiphany-smoke\repo-work-service-lifecycle-20260621-004202` proves plan/runbook/launch/audit with `auditStatus=complete`, `auditRunbookArtifactStatus=present`, `auditLaunchExitCode=0`, `mutatesServiceManager=false`, `requiresElevatedAuthority=false`, and `privateStateExposed=false`. Wrapper proofs `local-20260621-014302-362-31bbef47`, `local-20260621-014337-108-cbd99615`, `local-20260621-014413-125-09e183c5`, and `local-20260621-014558-197-f6951806` prove operator plan/runbook/launch/audit ergonomics, with audit reporting no missing or failed checks. Basic queue-run service lifecycle readiness is sealed; remaining Idunn work is optional elevated install/start execution under explicit operator authority, not Self scheduling authority. - Gjallar/Odin sight now exposes Idunn deployment receipt refs without taking Idunn's execution throne. `EpiphanyLocalVerseContext`, `receipt-directory`, `swarm-overview`, `swarm-triage`, and `gjallar` surface latest `gamecult.idunn.deployment_receipt.v0` and `gamecult.idunn.deployment_aftercare_audit.v0` as compact `idunnDeploymentReceiptRows` / `IDUNN-DEPLOYMENT` rows with owner `Idunn`, watched/checked refs, source/result refs, aftercare ids, follow-up readback command, and `privateStateExposed=false`. Smoke `.epiphany-smoke\repo-deployment-config-family-20260620-223203` proves the aftercare audit still ingests CultMesh refs and Gjallar reports `gjallarIdunnDeploymentReceiptCount=2`, latest deployment receipt `fixture-idunn-deployment`, latest aftercare receipt `fixture-idunn-aftercare`, and no private-state exposure. This is citeable discovery only; deployment still happens by explicit operator `git push` observed by Idunn.