Add repo Persona intake surface

This commit is contained in:
Meta Vens 2026-06-20 02:28:59 +01:00
commit d6113602e4
6 changed files with 297 additions and 18 deletions

View file

@ -61,6 +61,9 @@ fn main() -> Result<()> {
};
let result = match command.as_str() {
"accept" => run_accept(parse_accept_args(args)?),
"persona-intake" | "intake" | "repo-persona-intake" => {
run_persona_intake(parse_persona_intake_args(args)?)
}
"derive-plan" | "imagine" | "plan-from-pressure" => {
run_derive_plan(parse_derive_plan_args(args)?)
}
@ -100,6 +103,20 @@ struct AcceptArgs {
candidate_action_refs: Vec<String>,
}
#[derive(Clone, Debug)]
struct PersonaIntakeArgs {
workspace: PathBuf,
epiphany_root: PathBuf,
item: String,
message: String,
topic: Option<String>,
local_verse_store: Option<PathBuf>,
artifact_dir: Option<PathBuf>,
runtime_id: Option<String>,
online_receipt: Option<PathBuf>,
mood: String,
}
#[derive(Clone, Debug)]
struct RunArgs {
workspace: PathBuf,
@ -345,6 +362,53 @@ fn parse_accept_args(args: impl Iterator<Item = String>) -> Result<AcceptArgs> {
})
}
fn parse_persona_intake_args(args: impl Iterator<Item = String>) -> Result<PersonaIntakeArgs> {
let mut workspace = None;
let mut epiphany_root = None;
let mut item = None;
let mut message = None;
let mut topic = None;
let mut local_verse_store = None;
let mut artifact_dir = None;
let mut runtime_id = None;
let mut online_receipt = None;
let mut mood = "attentive".to_string();
let mut args = args.peekable();
while let Some(arg) = args.next() {
match arg.as_str() {
"--workspace" => workspace = Some(take_path(&mut args, "--workspace")?),
"--epiphany-root" => epiphany_root = Some(take_path(&mut args, "--epiphany-root")?),
"--item" => item = Some(take_string(&mut args, "--item")?),
"--message" | "--content" | "--persona-input" => {
message = Some(take_string(&mut args, "--message")?);
}
"--topic" => topic = Some(take_string(&mut args, "--topic")?),
"--local-verse-store" | "--store" => {
local_verse_store = Some(take_path(&mut args, "--local-verse-store")?);
}
"--artifact-dir" => artifact_dir = Some(take_path(&mut args, "--artifact-dir")?),
"--runtime-id" => runtime_id = Some(take_string(&mut args, "--runtime-id")?),
"--online-receipt" => online_receipt = Some(take_path(&mut args, "--online-receipt")?),
"--mood" => mood = take_string(&mut args, "--mood")?,
other => return Err(anyhow!("unexpected persona-intake argument {other:?}")),
}
}
Ok(PersonaIntakeArgs {
workspace: workspace.context("missing --workspace")?,
epiphany_root: epiphany_root
.unwrap_or(env::current_dir().context("failed to resolve current directory")?),
item: item.context("missing --item")?,
message: message.context("missing --message")?,
topic,
local_verse_store,
artifact_dir,
runtime_id,
online_receipt,
mood,
})
}
fn parse_run_args(args: impl Iterator<Item = String>) -> Result<RunArgs> {
let mut workspace = None;
let mut epiphany_root = None;
@ -1187,6 +1251,152 @@ fn run_accept(args: AcceptArgs) -> Result<Value> {
}))
}
fn run_persona_intake(args: PersonaIntakeArgs) -> Result<Value> {
let workspace = args
.workspace
.canonicalize()
.with_context(|| format!("failed to resolve {}", args.workspace.display()))?;
ensure_git_repo(&workspace)?;
let epiphany_root = args
.epiphany_root
.canonicalize()
.with_context(|| format!("failed to resolve {}", args.epiphany_root.display()))?;
let manifest_path = epiphany_root.join("epiphany-core").join("Cargo.toml");
if !manifest_path.exists() {
return Err(anyhow!(
"could not find epiphany-core manifest at {}",
manifest_path.display()
));
}
let online_receipt_path = args.online_receipt.clone().unwrap_or_else(|| {
workspace
.join(".epiphany")
.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 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"))
});
let runtime_id = args.runtime_id.clone().unwrap_or_else(|| {
string_from_json(&online_receipt, &["runtimeId"])
.unwrap_or_else(|| "repo-swarm-local".to_string())
});
let artifact_dir = args
.artifact_dir
.clone()
.unwrap_or_else(|| workspace.join(".epiphany").join("persona-intake"));
fs::create_dir_all(&artifact_dir)
.with_context(|| format!("failed to create {}", artifact_dir.display()))?;
let item_slug = sanitize(&args.item);
let persona = cargo_json(
&manifest_path,
"epiphany-persona-discord",
&[
"bubble".to_string(),
"--artifact-dir".to_string(),
artifact_dir.display().to_string(),
"--cultmesh-store".to_string(),
local_verse_store.display().to_string(),
"--runtime-id".to_string(),
runtime_id.clone(),
"--content".to_string(),
args.message.clone(),
"--source".to_string(),
"epiphany/Persona/repo-intake".to_string(),
"--status".to_string(),
"accepted-for-imagination-consensus".to_string(),
"--mood".to_string(),
args.mood.clone(),
],
)?;
let speech_audit = persona
.get("speechAudit")
.cloned()
.unwrap_or_else(|| json!({}));
let audit_id = string_from_json(&speech_audit, &["auditId"])
.unwrap_or_else(|| format!("persona-speech-audit-{item_slug}"));
let bubble_path = string_from_json(&persona, &["bubblePath"]).unwrap_or_default();
let content_fingerprint =
string_from_json(&speech_audit, &["contentFingerprint"]).unwrap_or_default();
let topic = args
.topic
.clone()
.unwrap_or_else(|| format!("repo-persona-intake-{item_slug}"));
let summary = compact_text(&args.message, 480);
let public_ref = format!("eve://epiphany/persona#repo-intake/{item_slug}/{audit_id}");
let candidate_ref = format!("candidate-action://{runtime_id}/{item_slug}/{audit_id}");
let accept = run_accept(AcceptArgs {
workspace: workspace.clone(),
epiphany_root: epiphany_root.clone(),
source: "persona".to_string(),
item: args.item.clone(),
summary: Some(summary.clone()),
topic: Some(topic.clone()),
local_verse_store: Some(local_verse_store.clone()),
artifact_dir: Some(workspace.join(".epiphany").join("work")),
runtime_id: Some(runtime_id.clone()),
online_receipt: Some(online_receipt_path.clone()),
eve_connection_receipt_id: Some(format!("repo-persona-intake-eve-{item_slug}")),
public_discussion_refs: vec![public_ref.clone()],
candidate_action_refs: vec![candidate_ref.clone()],
})?;
let receipt = json!({
"schemaVersion": "epiphany.repo_persona_intake_receipt.v0",
"createdAt": Utc::now().to_rfc3339_opts(chrono::SecondsFormat::Secs, true),
"workspace": workspace,
"runtimeId": runtime_id,
"localVerseStore": local_verse_store,
"onlineReceiptPath": online_receipt_path,
"source": "persona",
"item": args.item,
"topic": topic,
"messageSummary": summary,
"persona": {
"bubblePath": bubble_path,
"speechAudit": speech_audit,
"contentFingerprint": content_fingerprint,
"publicDiscussionRef": public_ref,
"candidateActionRef": candidate_ref
},
"accept": accept,
"authority": {
"status": "accepted-for-imagination-consensus",
"personaSpeechAudited": true,
"handsAuthorityGranted": false,
"durableStateAdmitted": false,
"publicationAuthorized": false,
"privateStateExposed": false
},
"nextSafeMove": "Run epiphany-work derive-plan --workspace <repo> --item <id> after Imagination forms a concrete safe-family plan."
});
let receipt_path = workspace
.join(".epiphany")
.join("work")
.join(format!("work-persona-intake-{item_slug}.json"));
write_json(&receipt_path, &receipt)?;
Ok(json!({
"schemaVersion": "epiphany.repo_persona_intake.v0",
"status": "accepted-for-imagination-consensus",
"workspace": receipt["workspace"],
"runtimeId": receipt["runtimeId"],
"localVerseStore": receipt["localVerseStore"],
"receiptPath": receipt_path,
"item": receipt["item"],
"speechAuditId": audit_id,
"bubblePath": receipt["persona"]["bubblePath"],
"acceptReceiptPath": accept["receiptPath"],
"feedback": accept["feedback"],
"authority": receipt["authority"],
"privateStateExposed": false,
"nextSafeMove": receipt["nextSafeMove"],
}))
}
fn run_work(args: RunArgs) -> Result<Value> {
let workspace = args
.workspace
@ -4438,6 +4648,19 @@ fn string_array_field(value: &Value, field: &str) -> Vec<String> {
.unwrap_or_default()
}
fn compact_text(text: &str, limit: usize) -> String {
let compact = text.split_whitespace().collect::<Vec<_>>().join(" ");
if compact.chars().count() <= limit {
return compact;
}
let mut truncated = compact
.chars()
.take(limit.saturating_sub(3))
.collect::<String>();
truncated.push_str("...");
truncated
}
fn read_json(path: &Path) -> Result<Value> {
let raw =
fs::read_to_string(path).with_context(|| format!("failed to read {}", path.display()))?;
@ -4532,7 +4755,8 @@ fn sanitize(value: &str) -> String {
fn print_usage() {
eprintln!(
"usage: epiphany-work <accept|derive-plan|plan|run|adopt|execute|close|publish|sync|overview|tick|queue-run|serve> ...\n\
"usage: epiphany-work <persona-intake|accept|derive-plan|plan|run|adopt|execute|close|publish|sync|overview|tick|queue-run|serve> ...\n\
persona-intake --workspace <repo> --item <id> --message <text> [--topic <topic>] [--store <local-verse.ccmp>] [--runtime-id <id>]\n\
accept --workspace <repo> --from <persona|bifrost|persona-or-bifrost> --item <id> [--summary <text>] [--topic <topic>] [--store <local-verse.ccmp>] [--runtime-id <id>] [--online-receipt <path>] [--public-discussion-ref <ref>] [--candidate-action-ref <ref>]\n\
derive-plan --workspace <repo> [--item <id>] [--accept-receipt <path>] [--action-family append-worklog|planning-note] [--target-path <path>] [--model-ref <ref>]\n\
plan --workspace <repo> [--item <id>] --objective <text> --plan-summary <text> --command <command> --changed-path <path> --commit-message <text> [--adoption-evidence-ref <ref>]\n\

View file

@ -826,9 +826,9 @@ temptation wearing clean robes.
| --- | --- | --- |
| Repo Body birth | `epiphany-repo init` exists and writes repo-local stores plus branch workbench intent. | Keep birth startup-only, review-gated, and branch-oriented. |
| Local Verse online | `epiphany-swarm online` seeds repo-local CultMesh, standing-faculty SoA, topology, liveness, Eve, and tool sight. | Keep private Verse sealed while exposing operator-safe repo status. |
| Persona/Bifrost intake | `epiphany-work accept` records pressure and candidate action refs without Hands authority. | Add a repo Persona intake mouth so humans can talk to the project instead of hand-authoring CLI work items. |
| Persona/Bifrost intake | `epiphany-work accept` records pressure and candidate action refs without Hands authority. `epiphany-work persona-intake` now invokes the Persona bubble speech-audit path, records public discussion and candidate-action refs, then delegates to `accept`; wrapper mode `repo-persona-intake` exposes the operator mouth. | Deepen the intake-to-Imagination interpreter so richer model-authored action items can be proposed without granting Hands, publication, or durable-state authority at the mouth edge. |
| Imagination planning | `derive-plan` deterministically creates allowlisted `append-worklog` and `planning-note` plans; `plan` remains manual quarantine scaffolding. | Replace deterministic templates with model-authored, typed Imagination action items for richer safe command families. |
| Self scheduling | `tick` and `serve` prove one-step branch-local advancement, brake refusal, active-turn refusal, cooldown, and stale-turn recovery; `queue-run` selects tick-actionable rows from the typed repo-work queue and delegates to `tick`; `repo-work-service-plan` and `repo-work-service-runbook` now write Idunn lifecycle receipts/artifacts for that same queue-run command without launching it. | Add the repo Persona/action-item artery next; keep any future queue-run service launch/install behind Idunn and explicit operator authority. |
| Self scheduling | `tick` and `serve` prove one-step branch-local advancement, brake refusal, active-turn refusal, cooldown, and stale-turn recovery; `queue-run` selects tick-actionable rows from the typed repo-work queue and delegates to `tick`; `repo-work-service-plan` and `repo-work-service-runbook` now write Idunn lifecycle receipts/artifacts for that same queue-run command without launching it. | Add model-authored action-item depth next; keep any future queue-run service launch/install behind Idunn and explicit 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 and writes deterministic Soul, Modeling, and Mind receipts. | Add richer model-authored closure where useful, while preserving deterministic local closure for simple mechanical work. |
| Repo work sight | `overview` emits compact proof rows and mirrors typed `epiphany.cultmesh.repo_work_overview.v0` event documents plus a latest key; Gjallar enumerates the history as queue rows and non-mutating action rows; Persona's Eve surface and Eve connection readbacks expose peer-readable gate/blocker/next-action rows; `queue-run` consumes the same queue for branch-local scheduler pulses. | Deepen the Persona-to-plan loop without moving action authority out of Hands/Self/Bifrost. |
@ -854,11 +854,14 @@ Build the remaining MVP in this order:
operator may grant service mutation. Self must not become the daemon keeper.
This first cut is landed through `tools/epiphany_local_run.ps1 -Mode
repo-work-service-plan` and `-Mode repo-work-service-runbook`.
2. **Persona-to-Imagination action items.** Add the repo Persona intake mouth
and route work-shaped speech into reviewed candidate actions. Imagination
should emit typed action-item receipts with allowed safe families, requested
paths, verification asks, stop conditions, and escalation reasons. Banter
remains banter unless Mind/Interpreter extracts a work candidate.
2. **Persona-to-Imagination action items.** The first repo Persona intake mouth
is landed: `epiphany-work persona-intake` routes work-shaped speech through
the Persona bubble speech-audit path, records public discussion refs and
candidate action refs, then delegates to `accept`; wrapper mode
`repo-persona-intake` exposes the operator surface. The remaining cut is for
Imagination to emit typed action-item receipts with allowed safe families,
requested paths, verification asks, stop conditions, and escalation reasons.
Banter remains banter unless Mind/Interpreter extracts a work candidate.
3. **Model-authored safe plan families.** Promote `derive-plan` beyond the
deterministic `append-worklog` and `planning-note` reliquaries by letting
Imagination author typed plans over allowlisted repo-local families. Shell
@ -1029,6 +1032,15 @@ The chain is typed and sealed enough to be useful:
--runtime-id <id> --max-items <n>`. The receipts and runbook describe the
real queue-run command, but do not launch, install, publish, merge, cross repo
boundaries, or expose private state.
- `epiphany-work persona-intake` is the first repo Persona mouth over accepted
work pressure. It requires an online repo swarm receipt, writes a Persona
bubble plus speech-audit witness into the repo-local Verse, records public
discussion and candidate-action refs, delegates to `accept`, and seals
`work-persona-intake-<item>.json` with `handsAuthorityGranted=false`,
`durableStateAdmitted=false`, `publicationAuthorized=false`, and
`privateStateExposed=false`. Wrapper:
`tools/epiphany_local_run.ps1 -Mode repo-persona-intake -RepoWorkItem <id>
-PersonaInput '<request>'`.
The scar is equally important: this is still an operator-started cadence loop,
not installed service lifecycle. The operator can prove the scheduler breathes,
@ -1056,9 +1068,10 @@ Required organs before MVP:
the close gate and any later Idunn service launch/install under explicit
operator authority.
- Persona-to-plan depth: deterministic `append-worklog` and `planning-note`
derivations exist for accepted Persona/Bifrost pressure; remaining work is
model-authored Imagination planning for richer action classes without
operator shell details.
derivations exist for accepted Persona/Bifrost pressure, and
`persona-intake` now gives the project Persona a speech-audited mouth into
that pressure stream. Remaining work is model-authored Imagination planning
for richer action classes without operator shell details.
- Closure depth: deterministic Soul/Modeling/Mind closure exists for Hands
commits; richer model-authored Soul/Modeling review remains to replace the
current local verification rite where appropriate.

View file

@ -104,7 +104,8 @@ remembers doctrine; the branch remembers the blade.
- Hands now has a first executable action receipt spine. `epiphany-core::hands_gateway` owns `HandsActionIntent`, `HandsActionReview`, `HandsPatchReceipt`, `HandsCommandReceipt`, and `HandsCommitReceipt`; runtime-spine can persist/reread them; `runtime_spine_persists_mind_gateway_review_receipts` includes the Hands chain beside Mind/Eyes/Substrate/Soul/Continuity proofs and proves the post-timestamp Hands receipt-chain detector; `epiphany-hands-action-smoke` emits intent/review/patch/command/commit receipt ids from `.epiphany-smoke\runtime-spine\hands-action-smoke.msgpack`; and the repo-action launch proof profile now requires action intent, action review, and patch receipt together. `epiphany-mvp-coordinator` now turns `continueImplementation` into a persisted Substrate Gate grant plus Hands intent/review gate and includes the receipt ids in the operator step. `epiphany-hands-action` is the native consequence recorder for that gate: `record-patch`, `record-command`, `record-commit`, and turn-level `record-pass` load the stored intent/review or `finalAction.handsActionGate` from `coordinator-summary.json`, require an approved matching review, enforce allowed operations, and keep patch/commit changed paths inside the requested scope. `epiphany-mvp-coordinator-smoke` includes the deterministic Hands pass proof. The coordinator now treats a complete Hands receipt chain after an accepted Soul result as new implementation evidence, launches Soul again, and routes a passing accepted Soul result to Modeling/modeling before another Hands turn. Work-loop telemetry is now typed internal CultMesh state: Verification role launches write `epiphany.cultmesh.work_loop_telemetry.v0` beside runtime-spine, render that packet for Soul with resolved receipt bodies, commit diff preview, source proof notes, verification assertions, and stdout/stderr previews, and Modeling launches read/enrich the latest packet with Soul acceptance receipt ids before Modeling updates the map. Local Verse prompt context now exposes only a sealed `latest_work_loop_summary` digest with telemetry id, Hands receipt ids, path/source/assertion counts, and Soul receipt ids; receipt payload previews, artifact previews, and commit diff previews remain internal telemetry and are leak-guarded by tests plus `epiphany-verse-query -- smoke`.
- `notes/epiphany-swarm-readiness-plan.md` is the current live-fire direction gate. The local runner proves startup/status/coordinator wiring; it does not authorize unattended swarm operation. Carry VoidBot's lessons forward: one CTB-style initiative scheduler, typed pause/brake, active-turn freeze, cooldown after completion, stale active-turn recovery receipts, parent-side speech eligibility, memory lifecycle phases, and typed operation proposals instead of prompt-owned governance. `epiphany-verse-query swarm-brake --brake-status engaged|released` can now write the local Verse brake document, and `tools/epiphany_local_run.ps1` refuses live `plan`/`run`/`mvp` modes when that brake is engaged while keeping `status` readable. `epiphany-mvp-coordinator` also checks `--local-verse-store` before app-server startup, and `epiphany-heartbeat-store` guards tick/pump/heat/queue-mention/routine when passed `--local-verse-store`. Daemon tool invocation, daemon lifecycle poke, and `epiphany-daemon-supervisor` restart/tick/serve/service-plan/service-launch/service-runbook/windows-service-install/windows-service-status/windows-service-reconcile/windows-service-execution-readiness/start/stop attempts now fail closed under a matching engaged brake; supervisor restart now has durable per-daemon policy with cooldown/backoff, explicit scheduled tick pulses, latest scheduler receipts, typed service lifecycle plan/launch/runbook/install/status/reconcile/readiness/start/stop receipts, and local operator wrapper modes that write runbook/install/status/reconcile/readiness/control-plan/execution artifacts plus operator run receipts. The installed-service read path, read-only service-policy reconciliation path, execution-readiness path, non-mutating start/stop control-plan path, and non-elevated execution refusal path have been proved against real Windows `EventLog` service-manager state or safe missing-service targets through local Verse receipts, including explicit wrapper install/start/stop execution modes. The next cut is actual elevated install/start/stop execution proof under operator authority.
- `notes/epiphany-repo-swarm-mvp-contract.md` is the repo-swarm MVP authority map and migration plan. It states the live fourteen-front-door chain from `epiphany-repo init` through `epiphany-work derive-plan`, `close`, `overview`, `tick`, `queue-run`, `publish`, and `sync`, documents the operator-safe proof receipts already proved with `privateStateExposed=false`, and names the remaining MVP organs: model-authored Persona-to-plan depth, optional Idunn-hosted queue-run lifecycle, optional execute-to-close handoff, richer published proof bundles, and richer model-authored closure. Autonomous branch-local work inside the owned repo Body is in scope and desired; Bifrost gates publication/merge/escalation, Idunn owns daemon lifecycle, and `epiphany-work tick` may only advance one safe receipt-backed branch-local step per pulse before stopping at closure or publication gates. `epiphany-work derive-plan` now consumes accepted Persona/Bifrost pressure and writes Imagination/Self action plans through deterministic safe families: `append-worklog` appends to `EPIPHANY_WORKLOG.md`, and `planning-note` creates a contained markdown note under `notes/epiphany-work/<item>.md`; both carry `operatorAuthoredShellDetails=false`, an authority seal, and no private-state exposure. Disposable smokes proved the append-worklog route through accept -> derive-plan -> run -> adopt -> execute -> close, changed only `EPIPHANY_WORKLOG.md`, ended `closed:passed`, and reported no private-state exposure; `.epiphany-smoke\planning-note-20260620-015921` proved the planning-note route through accept -> derive-plan -> run -> adopt -> execute, with mode `planning-note`, safe family `repo.markdown_planning_note`, a branch-local commit, and no private-state exposure. `epiphany-work overview` now reads the repo work receipt chain and writes an Eyes/Gjallar-owned sight/proof bundle with current gate, blocker, next safe action, branch, changed paths, commit SHA, Soul verdict, compact rows, and private-state seal; it also mirrors a typed `epiphany.cultmesh.repo_work_overview.v0` document into the repo-local Verse when a local Verse store is known. Disposable smokes proved pre-plan `awaiting-plan`/`plan-receipt-missing`, post-close `awaiting-publication`/`bifrost-publication-missing`, and latest-key CultMesh readback through `epiphany-verse-query smoke` as `latestRepoWorkOverview=repo-work-overview-verse-overview-request`, `latestRepoWorkGate=awaiting-publication`, `latestRepoWorkBlocker=bifrost-publication-missing`, with no private-state exposure. The tick pulse reads the repo-local CultMesh swarm brake and writes `refused-by-swarm-brake` without creating run/adopt/execute receipts when the brake is engaged. It also writes active-turn and last-completed scheduler receipts, refuses live duplicate pulses as `refused-active-turn`, refuses explicit completion-anchored cooldown as `refused-by-cooldown`, clears stale active markers after `--active-timeout-seconds`, and records `physiology.recoveredActiveTurn.recovered=true` when recovery proceeds. `epiphany-work queue-run` reads the repo-local typed overview queue, selects only tick-actionable rows for the current repo Body, delegates to `tick`, refreshes overview after real advancement, and is wrapped by `tools/epiphany_local_run.ps1 -Mode repo-work-queue-run`. `epiphany-work serve` wraps the item-scoped tick artery in Self-owned cadence: bounded `--max-iterations` proof mode writes `work-scheduler-serve-<item>.json`, unbounded service mode relies on per-pulse tick receipts, and unbounded zero-second polling is refused. `epiphany-work close` consumes branch-local execute receipts, verifies the Hands commit, writes Soul verdict plus Modeling summary plus Mind gateway/state-commit receipts, and seals `work-close-<item>.json` without granting publication, merge, service lifecycle, cross-repo mutation, or private-state exposure. `epiphany-work publish --closure-receipt` can consume the closure's Soul/Mind ids, while tick no-ops once closure exists before Bifrost publication authority.
- 2026-06-20: The same repo-swarm note now carries the explicit migration thesis, MVP status board, Epiphany Online cut order, authority matrix, local CultMesh tool availability doctrine, and upstream-main sync doctrine. `tools/epiphany_local_run.ps1 -Mode repo-work-service-plan` and `-Mode repo-work-service-runbook` now write Idunn-owned non-mutating lifecycle receipts/artifacts for the real `epiphany-work queue-run` command; proofs `local-20260620-021415-094-58439baf` and `local-20260620-021415-147-067c36b0` planned/wrote the queue-run command vector with `privateStateExposed=false` and no service launch/install. Use that note when answering "are we headed toward a functional swarm?" The answer is yes, but only if the remaining cuts preserve typed organ ownership: next repo Persona intake, model-authored Imagination action items over allowlisted safe families, `epiphany-swarm run`, execute-to-close scheduler handoff, proof bundles, and a fresh-repo acceptance run. Persona is the mouth, Imagination plans, Self schedules, Hands acts, Soul verifies, Modeling maps, Mind admits, Gjallar sees, Odin discovers, Idunn keeps daemon physiology alive, Bifrost publishes and credits, and Eve/CultUI renders without becoming truth.
- 2026-06-20: The same repo-swarm note now carries the explicit migration thesis, MVP status board, Epiphany Online cut order, authority matrix, local CultMesh tool availability doctrine, and upstream-main sync doctrine. `tools/epiphany_local_run.ps1 -Mode repo-work-service-plan` and `-Mode repo-work-service-runbook` now write Idunn-owned non-mutating lifecycle receipts/artifacts for the real `epiphany-work queue-run` command; proofs `local-20260620-021415-094-58439baf` and `local-20260620-021415-147-067c36b0` planned/wrote the queue-run command vector with `privateStateExposed=false` and no service launch/install. Use that note when answering "are we headed toward a functional swarm?" The answer is yes, but only if the remaining cuts preserve typed organ ownership: model-authored Imagination action items over allowlisted safe families, `epiphany-swarm run`, execute-to-close scheduler handoff, proof bundles, and a fresh-repo acceptance run. Persona is the mouth, Imagination plans, Self schedules, Hands acts, Soul verifies, Modeling maps, Mind admits, Gjallar sees, Odin discovers, Idunn keeps daemon physiology alive, Bifrost publishes and credits, and Eve/CultUI renders without becoming truth.
- 2026-06-20: The first repo Persona intake mouth is live. `epiphany-work persona-intake` requires a repo-swarm online receipt, records a Persona bubble/speech-audit witness into repo-local CultMesh, creates public discussion and candidate action refs, delegates to `accept`, and seals `work-persona-intake-<item>.json` without Hands, durable-state, publication, service lifecycle, cross-repo, elevation, or private-state authority. Wrapper mode `tools/epiphany_local_run.ps1 -Mode repo-persona-intake -RepoWorkItem <id> -PersonaInput '<request>'` exposes the operator surface. Disposable proof `.epiphany-smoke\persona-intake-20260620-022500` wrote direct item `persona-request` with speech audit `persona-speech-audit-cdcd20a7`, feedback `repo-work-feedback-persona-request`, consensus `repo-work-consensus-persona-request`, and `privateStateExposed=false`; wrapper artifact `local-20260620-022551-566-5576908e` wrote item `persona-wrapper`, speech audit `persona-speech-audit-55f74218`, feedback `repo-work-feedback-persona-wrapper`, consensus `repo-work-consensus-persona-wrapper`, and candidate action `candidate-action://repo-swarm-local/persona-wrapper/persona-speech-audit-55f74218`. The next cut is typed Imagination action-item receipts over allowlisted safe families, not another intake/display surface.
- 2026-06-20: Gjallar/swarm-overview now exposes repo-work overview history as first-class compact sight, Persona's public Eve surface lowers the same queue for peer-readable collaboration, and Self has a first runnable queue surface over it. `SwarmOverviewOutput` and `SwarmTriageOutput` include `repoWorkOverviewCount`, `repoWorkOverviewRows`, `repoWorkOverviewTuiRows`, `latestRepoWorkOverview`, `latestRepoWorkGate`, `latestRepoWorkBlocker`, and `latestRepoWorkNextSafeMove`; the shared `swarmActionRows` queue gets priority 35 `repo-work-overview` rows owned by Gjallar, hosted body `repo-work`, authority gate `repo.work.overview`, effect class `repo-work-readback`, no mutation, no elevation, proof-bundle ref, and private-state seal. `eve-surfaces`, direct `connect-eve`, and the globally invokable Persona `eve-connect` daemon tool readback expose public `REPO-WORK-PEER` rows with item, gate, blocker, next safe move, branch, publication, sync, and `private=false`. `epiphany-work queue-run` reads the same typed queue, selects current-repo rows at `ready-to-run`, `ready-to-adopt`, or `ready-to-execute`, delegates to `tick`, refreshes overview after real advancement, and wrapper `repo-work-queue-run` exposes the operator surface. Disposable proofs `.epiphany-smoke\gjallar-repo-work-queue-20260620-012027`, `.epiphany-smoke\eve-repo-work-queue-20260620-013322`, `.epiphany-smoke\queue-run-20260620-014314`, and wrapper artifact `local-20260620-014627-174-aada0241` prove two-item queue sight, Eve lowering, direct queue-run advancement, and wrapper dry-run without publication, merge, service lifecycle mutation, elevation, cross-repo mutation, or private-state exposure. The next cut is richer Persona-to-Imagination plan derivation, not another queue display surface.
- `service-execution-runbook` makes that next cut repeatable: it generates the exact elevated wrapper command sequence without mutating the service manager, continues after per-step failure to preserve more receipts, runs `service-execution-audit` in `finally`, exits nonzero if any step failed, and seals a typed runbook lifecycle receipt. Run the generated artifact only with explicit operator authority.
- `service-execution-audit` is the non-mutating acceptance proof after the elevated rite: it reports `complete` only when typed lifecycle receipts prove the runbook witness plus expected elevated chain, and otherwise reports the missing/failed sealed checks.

Binary file not shown.

View file

@ -88,7 +88,7 @@ active_subgoals:
- Keep the landed Phase 6 coordinator, limited safe-boundary CRRC automation, and pre-compaction checkpoint intervention ready for the next bridge-equipped dogfood run.
- Preserve the Ghostlight-derived heartbeat initiative seam: every lane, including coordinator/Self and Persona, has a organ-state record and competes for heartbeat slots through readiness/reaction timing; initiative heat can raise or cool global, group, arena, role, and agent tempo through typed heartbeat policy; active thinking freezes initiative until completion, so heat never queues a lane already mid-turn; idle winners ruminate instead of inventing project work, and sleep windows distill the accumulated thought pressure into reviewed self-memory or doctrine.
- Use `notes/epiphany-swarm-readiness-plan.md` as the live-fire direction gate. The local run path is a compass, not launch clearance: before unattended swarm operation, Epiphany needs typed pause/brake enforcement, one initiative scheduler, completion-gated cooldown, stale active-turn recovery receipts, parent-side Persona speech eligibility, memory lifecycle operations, and CultNet-first operator snapshots/intents/receipts. The local Verse brake document exists, `epiphany-verse-query swarm-brake` can engage/release it, `tools/epiphany_local_run.ps1` refuses live `plan`/`run`/`mvp` modes when the brake is engaged while leaving `status` readable, `epiphany-mvp-coordinator` checks the local Verse brake before app-server startup, and `epiphany-heartbeat-store` guards tick/pump/heat/queue-mention/routine when given `--local-verse-store`. Daemon liveness is now a typed local Verse authority: `epiphany-verse-query daemon-status` writes one daemon status without repainting the table, local Verse seeding preserves existing daemon statuses and swarm brakes, `invoke-tool` refuses when the host daemon is not ready or lacks `submitTypedToolIntent`, and both daemon tool invocation and lifecycle poke fail closed under an engaged matching brake. `epiphany-daemon-supervisor policy` writes durable per-daemon restart policy with command/args/cwd/cooldown/backoff/attempt state plus reconcile cadence and stale-heartbeat threshold; `epiphany-daemon-supervisor reconcile` loads that policy when no override command is supplied, refuses under a matching lifecycle brake, refuses during cooldown/backoff, writes daemon poke intent/receipt, updates daemon status, and updates policy attempt state; `epiphany-daemon-supervisor tick` is an explicit scheduler pulse that scans durable policies, records ready/noop pulses, skips before the configured reconcile interval, marks stale heartbeat status degraded, routes restarts through the same brake/cooldown/poke receipt path, and writes a latest `epiphany.cultmesh.daemon_scheduler_receipt.v0`; `epiphany-daemon-supervisor serve` runs that same pulse on a configurable cadence with bounded `--max-iterations` proof mode or unbounded service mode. `epiphany-daemon-supervisor service-plan`/`install-service` now writes a planned `epiphany.cultmesh.daemon_service_lifecycle_receipt.v0` for the `serve` command, while `service-launch`/`start-service` spawns that `serve` loop through the current executable or `--service-command`, can `--wait-child` for bounded proof, and records command/args/cwd, scheduler id, daemon selector, pid/exit/status, artifact ref, and private-state guard. `service-runbook`, `windows-service-install`/`service-install-plan`, `windows-service-status`, `windows-service-reconcile`, `windows-service-execution-readiness`, and `windows-service-start`/`stop` now record service lifecycle receipts through the same local Verse; the read-only status path has been proved against the real Windows `EventLog` service with receipt `daemon-service-lifecycle-receipt-windows-eventlog-proof-windows-service-status`, status `running`, exit code `0`, and `privateStateExposed=false`; the read-only service-policy reconciliation path has been proved for missing service, real-service drift against `EventLog`, lifecycle-brake refusal, and wrapper/local-Verse receipt `daemon-service-lifecycle-receipt-windows-eventlog-reconcile-proof-windows-service-reconcile`; execution readiness has been proved as a non-mutating `not-elevated` receipt through direct and wrapper paths; start/stop now produce non-mutating `start-planned`/`stop-planned` receipts unless `--execute-control`/`--execute-service-control` is passed, and wrapper `service-start-plan`/`service-stop-plan` proves those receipts against `EventLog`; explicit install/control execution now refuses as `execution-refused-not-elevated` with `executed=false` when the shell lacks Windows administrator authority, and wrapper `service-install-execute`, `service-start-execute`, and `service-stop-execute` prove those refusal receipts without mutation. Service lifecycle actions check the local Verse swarm brake before process launch, artifact writes, service-manager queries, service-policy reconciliation, execution-readiness checks, control planning, elevation-gated execution, or start/stop execution. The local wrapper builds/checks this binary.
- Use `notes/epiphany-repo-swarm-mvp-contract.md` as the authority correction and migration plan for repo-swarm autonomy. Autonomous branch-local work inside an Epiphany-owned repo Body is in scope and desired; the safety boundary is typed authority, branch containment, interruptibility, receipts, private-state sealing, and Bifrost-gated publication/merge/escalation, not asking a human before every local edit. Fourteen native repo-swarm front doors are live and documented there: `epiphany-repo init`, `epiphany-swarm online`, `epiphany-work accept`, `epiphany-work derive-plan`, `epiphany-work plan`, `epiphany-work run`, `epiphany-work adopt --from-plan`, `epiphany-work execute --from-plan`, `epiphany-work close`, `epiphany-work overview`, `epiphany-work tick`, `epiphany-work queue-run`, `epiphany-work publish`, and `epiphany-work sync`. Fresh-repo smokes proved the chain with `privateStateExposed=false`, including deterministic Persona/Bifrost pressure-to-plan derivation (`append-worklog` and `planning-note`, `operatorAuthoredShellDetails=false`) into `EPIPHANY_WORKLOG.md` or contained markdown planning notes, plan-backed branch-local commit creation, a Self-owned tick pulse that advances `run-from-plan -> adopt-from-plan -> execute-from-plan` then no-ops before closure/publication gates, local CultMesh swarm-brake refusal that writes `refused-by-swarm-brake` without creating a run/adopt/execute receipt, active-turn refusal through `work-tick-active-<item>.json`, explicit completion-anchored cooldown refusal through `work-tick-last-<item>.json`, stale active-turn recovery that records `physiology.recoveredActiveTurn.recovered=true`, Self-owned `epiphany-work serve` cadence that writes `work-scheduler-serve-<item>.json`, bounded serve proof `advanced:run-from-plan -> refused-by-cooldown:none` without adoption, unbounded zero-interval refusal, deterministic `epiphany-work close` proof that consumes execute receipts, verifies the Hands commit, writes Soul verdict plus Modeling summary plus Mind gateway/state-commit receipts, local `epiphany-work overview` proof bundle that reports pre-plan `awaiting-plan`/`plan-receipt-missing` and post-close `awaiting-publication`/`bifrost-publication-missing` with branch, commit, changed paths, Soul verdict, compact rows, and private seal, typed local Verse projection as `epiphany.cultmesh.repo_work_overview.v0` with latest-key/event-history readback through Gjallar plus peer-readable Persona Eve lowering, `epiphany-work queue-run` selection over tick-actionable queue rows with wrapper `repo-work-queue-run`, Idunn-owned non-mutating `repo-work-service-plan`/`repo-work-service-runbook` receipts for the same queue-run command, `publish --closure-receipt` consumption of the close receipt's Soul/Mind refs, post-publication tick `noop:none`, and upstream-main ancestry proof after explicit merge receipt. Remaining MVP organs are model-authored Persona-to-plan depth beyond deterministic safe templates, optional execute-to-close scheduler handoff, richer published proof bundles, and richer model-authored closure; the scheduler may advance only one safe receipt-backed branch-local step per pulse and must not publish, merge, mutate services, cross repo boundaries, expose private state, or impersonate Idunn.
- Use `notes/epiphany-repo-swarm-mvp-contract.md` as the authority correction and migration plan for repo-swarm autonomy. Autonomous branch-local work inside an Epiphany-owned repo Body is in scope and desired; the safety boundary is typed authority, branch containment, interruptibility, receipts, private-state sealing, and Bifrost-gated publication/merge/escalation, not asking a human before every local edit. Fifteen native repo-swarm front doors are live and documented there: `epiphany-repo init`, `epiphany-swarm online`, `epiphany-work accept`, `epiphany-work persona-intake`, `epiphany-work derive-plan`, `epiphany-work plan`, `epiphany-work run`, `epiphany-work adopt --from-plan`, `epiphany-work execute --from-plan`, `epiphany-work close`, `epiphany-work overview`, `epiphany-work tick`, `epiphany-work queue-run`, `epiphany-work publish`, and `epiphany-work sync`. Fresh-repo smokes proved the chain with `privateStateExposed=false`, including deterministic Persona/Bifrost pressure-to-plan derivation (`append-worklog` and `planning-note`, `operatorAuthoredShellDetails=false`) into `EPIPHANY_WORKLOG.md` or contained markdown planning notes, plan-backed branch-local commit creation, a speech-audited repo Persona intake mouth that records public discussion refs plus candidate action refs before delegating to `accept`, a Self-owned tick pulse that advances `run-from-plan -> adopt-from-plan -> execute-from-plan` then no-ops before closure/publication gates, local CultMesh swarm-brake refusal that writes `refused-by-swarm-brake` without creating a run/adopt/execute receipt, active-turn refusal through `work-tick-active-<item>.json`, explicit completion-anchored cooldown refusal through `work-tick-last-<item>.json`, stale active-turn recovery that records `physiology.recoveredActiveTurn.recovered=true`, Self-owned `epiphany-work serve` cadence that writes `work-scheduler-serve-<item>.json`, bounded serve proof `advanced:run-from-plan -> refused-by-cooldown:none` without adoption, unbounded zero-interval refusal, deterministic `epiphany-work close` proof that consumes execute receipts, verifies the Hands commit, writes Soul verdict plus Modeling summary plus Mind gateway/state-commit receipts, local `epiphany-work overview` proof bundle that reports pre-plan `awaiting-plan`/`plan-receipt-missing` and post-close `awaiting-publication`/`bifrost-publication-missing` with branch, commit, changed paths, Soul verdict, compact rows, and private seal, typed local Verse projection as `epiphany.cultmesh.repo_work_overview.v0` with latest-key/event-history readback through Gjallar plus peer-readable Persona Eve lowering, `epiphany-work queue-run` selection over tick-actionable queue rows with wrapper `repo-work-queue-run`, Idunn-owned non-mutating `repo-work-service-plan`/`repo-work-service-runbook` receipts for the same queue-run command, `publish --closure-receipt` consumption of the close receipt's Soul/Mind refs, post-publication tick `noop:none`, and upstream-main ancestry proof after explicit merge receipt. Remaining MVP organs are typed model-authored Imagination action items beyond deterministic safe templates, optional execute-to-close scheduler handoff, richer published proof bundles, and richer model-authored closure; the scheduler may advance only one safe receipt-backed branch-local step per pulse and must not publish, merge, mutate services, cross repo boundaries, expose private state, or impersonate Idunn.
- Gjallar/swarm-overview now projects typed repo-work overview history into the compact global sight report, Persona's public Eve surface lowers the same queue for peers, and Self has a first runnable queue surface over it. `epiphany-verse-query gjallar` reads all `epiphany.cultmesh.repo_work_overview.v0` event documents from local Verse, excludes the `latest` mirror, preserves latest scalar fields, emits multi-item `repoWorkOverviewRows`/TUI rows, and publishes bounded priority 35-39 non-mutating `repo-work-overview` action rows with `owner=Gjallar`, `hostedBody=repo-work`, `authorityGate=repo.work.overview`, `mutatesState=false`, `requiresElevatedAuthority=false`, proof-bundle refs, current gate/blocker/next-safe-move, and `privateStateExposed=false`. `epiphany-verse-query eve-surfaces`, `connect-eve`, and globally invokable Persona `eve-connect` tool readbacks expose compact `REPO-WORK-PEER` rows with item, gate, blocker, next safe move, branch, publication/sync state, and private seal for the public Persona surface only. `epiphany-work queue-run` selects current-repo rows at `ready-to-run`, `ready-to-adopt`, or `ready-to-execute`, delegates action to `tick`, refreshes overview after real advancement, and writes `epiphany.repo_work_queue_run_receipt.v0`; wrapper mode `tools/epiphany_local_run.ps1 -Mode repo-work-queue-run` exposes the same surface. Disposable proofs `.epiphany-smoke\gjallar-repo-work-queue-20260620-012027`, `.epiphany-smoke\eve-repo-work-queue-20260620-013322`, `.epiphany-smoke\queue-run-20260620-014314`, and wrapper artifact `local-20260620-014627-174-aada0241` showed two-item queues through sight, public Eve, direct queue-run, and wrapper dry-run without publication, merge, service lifecycle mutation, elevation, cross-repo mutation, or private-state exposure.
- Agent memory lifecycle now has a first typed v0 operation surface in `epiphany-core::agent_memory`: `AgentMemoryLifecycleOperation` can revise, retire, crystallize, prune, and merge bounded memory records after role/agent review, and `epiphany-agent-memory-store review-lifecycle|apply-lifecycle` exposes the path at the operator edge. This closes the first explicit lifecycle-operation slice from the swarm-readiness gate; it does not yet make sleep silently mutate identity or project truth.
- Persona public speech now has a parent-side eligibility receipt at the Discord/Aquarium mouth edge. `epiphany.persona_speech_audit.v0` records action kind, content fingerprint, opening/topic keys, recent-window counts, repeated opening/topic counts, channel saturation, and allow/block reasons. `epiphany-persona-discord post` blocks repeated public openings before token/webhook work; draft and bubble still emit audit receipts for operator inspection. The compatibility JSON artifact remains for display, but the durable witness is now `epiphany.cultmesh.persona_speech_audit.v0` in CultMesh with latest-key projection through local Verse context. Local MVP Persona bubbles now write that durable witness to `.epiphany-run/cultmesh/local-verse.ccmp`, not a separate mouth-side store. This is posting-edge policy, not a Persona prompt wish.
@ -634,4 +634,4 @@ current_status:
- `tools/epiphany_local_run.ps1 -Mode swarm-online-runbook` now emits an explicit Idunn preflight summary before the operator elevation boundary. Its JSON and one-line summary report `preflightStatus`, child artifact present/hash-verified/mismatch/missing counts, aggregate service execution failed/missing check counts, child preflight rows with expected/actual SHA-256s, and private-state exposure. Live proof `local-20260619-025627-410-9724e2f6` generated the non-mutating parent artifact with `preflightStatus=ready-for-elevated-operator`, two child runbooks present, two hashes verified, zero mismatches, zero missing artifacts, eleven failed sealed service checks, zero missing checks, explicit aftercare audits, and `privateStateExposed=false`. The remaining scar is still explicit elevated operator execution followed by complete Idunn audits, not missing parent/child artifact readiness.
- Service lifecycle receipt history is now event-only: `load_epiphany_cultmesh_daemon_service_lifecycle_receipts` filters out the `epiphany-local/daemon-service-lifecycle-receipt/latest` mirror, while `load_latest_epiphany_cultmesh_daemon_service_lifecycle_receipt` remains the latest-state reader. Focused unit test `service_lifecycle_receipt_history_excludes_latest_mirror` proves two per-receipt writes return exactly two history records and latest points at the second. Fresh smoke `verse-query-lifecycle-history-filter-smoke` and live overview/triage `local-20260618-145632-497-efac6f0d` / `local-20260618-145632-321-867947af` prove compact swarm sights still expose service lifecycle attention plus the present elevated runbook artifact without daemon pokes or service mutation. Do not use a broad unscoped cargo test filter for this check on Windows; it fans out across bin harnesses and hit a broken pipe during this pass.
- `epiphany-verse-query seed-compact` is the compact seed receipt for wrappers and read-only rites. The older `seed` command still prints the full local Verse context for explicit debugging, but compact wrapper modes now avoid full `seed`/final `query` readback after the combined overview proof exposed Windows debug stack overflow from full-context serialization pressure.
next_action: Continue repo-swarm MVP work from the documented Epiphany Online cut order in `notes/epiphany-repo-swarm-mvp-contract.md`. Typed Gjallar repo-work history/queue sight, peer-readable Persona Eve lowering, Self-owned `epiphany-work queue-run`, deterministic `derive-plan` families `append-worklog` plus `planning-note`, and Idunn-hosted non-mutating queue-run lifecycle plan/runbook receipts are live with `privateStateExposed=false`; the next cut is repo Persona intake and model-authored Imagination action items over allowlisted safe families. Preserve Idunn service lifecycle ownership and existing CultMesh/Odin/Eve tool directories; service install/start execution still requires explicit elevated operator authority.
next_action: Continue repo-swarm MVP work from the documented Epiphany Online cut order in `notes/epiphany-repo-swarm-mvp-contract.md`. Typed Gjallar repo-work history/queue sight, peer-readable Persona Eve lowering, Self-owned `epiphany-work queue-run`, deterministic `derive-plan` families `append-worklog` plus `planning-note`, Idunn-hosted non-mutating queue-run lifecycle plan/runbook receipts, and the speech-audited `epiphany-work persona-intake` mouth plus wrapper `repo-persona-intake` are live with `privateStateExposed=false`; the next cut is typed model-authored Imagination action-item receipts over allowlisted safe families. Preserve Idunn service lifecycle ownership and existing CultMesh/Odin/Eve tool directories; service install/start execution still requires explicit elevated operator authority.

View file

@ -1,5 +1,5 @@
param(
[ValidateSet("status", "plan", "smoke", "run", "mvp", "agent-state-soa", "swarm-status", "swarm-poke-down", "swarm-triage", "cluster-topology", "eve-surfaces", "eve-connect", "collaboration-feedback", "bifrost-publication", "bifrost-ledger", "receipt-directory", "tool-directory", "tool-invoke", "swarm-overview", "gjallar", "repo-work-queue-run", "repo-work-service-plan", "repo-work-service-runbook", "swarm-online-runbook", "service-policy-directory", "service-plan", "service-launch", "service-runbook", "cluster-service-runbook", "cluster-service-install-plan", "cluster-service-install-execute", "cluster-service-audit", "cluster-service-start-plan", "cluster-service-stop-plan", "cluster-service-start-execute", "cluster-service-stop-execute", "cluster-service-execution-readiness", "cluster-service-execution-runbook", "cluster-service-execution-audit", "service-execution-runbook", "service-install-plan", "service-install-execute", "service-tick", "service-status", "service-reconcile", "service-execution-readiness", "service-execution-audit", "service-start-plan", "service-stop-plan", "service-start-execute", "service-stop-execute")]
[ValidateSet("status", "plan", "smoke", "run", "mvp", "agent-state-soa", "swarm-status", "swarm-poke-down", "swarm-triage", "cluster-topology", "eve-surfaces", "eve-connect", "collaboration-feedback", "bifrost-publication", "bifrost-ledger", "receipt-directory", "tool-directory", "tool-invoke", "swarm-overview", "gjallar", "repo-persona-intake", "repo-work-queue-run", "repo-work-service-plan", "repo-work-service-runbook", "swarm-online-runbook", "service-policy-directory", "service-plan", "service-launch", "service-runbook", "cluster-service-runbook", "cluster-service-install-plan", "cluster-service-install-execute", "cluster-service-audit", "cluster-service-start-plan", "cluster-service-stop-plan", "cluster-service-start-execute", "cluster-service-stop-execute", "cluster-service-execution-readiness", "cluster-service-execution-runbook", "cluster-service-execution-audit", "service-execution-runbook", "service-install-plan", "service-install-execute", "service-tick", "service-status", "service-reconcile", "service-execution-readiness", "service-execution-audit", "service-start-plan", "service-stop-plan", "service-start-execute", "service-stop-execute")]
[string]$Mode = "smoke",
[string]$Root = (Resolve-Path ".").Path,
[string]$Workspace = "",
@ -42,6 +42,7 @@ param(
[string]$ToolIntentId = "",
[string]$ToolReceiptId = "",
[int]$RepoWorkMaxItems = 1,
[string]$RepoWorkItem = "persona-intake-local",
[string]$RepoWorkRuntimeId = "repo-swarm-local",
[switch]$RepoWorkDryRun,
[string]$PersonaInput = "",
@ -323,7 +324,7 @@ $runtimeStore = Join-Path $Workspace "state\runtime-spine.msgpack"
$liveRuntimeMode = @("run", "mvp") -contains $Mode
if (-not $SkipBuild) {
if ($Mode -ne "status" -and $Mode -ne "agent-state-soa" -and $Mode -ne "swarm-status" -and $Mode -ne "swarm-poke-down" -and $Mode -ne "swarm-triage" -and $Mode -ne "cluster-topology" -and $Mode -ne "eve-surfaces" -and $Mode -ne "eve-connect" -and $Mode -ne "collaboration-feedback" -and $Mode -ne "bifrost-publication" -and $Mode -ne "bifrost-ledger" -and $Mode -ne "receipt-directory" -and $Mode -ne "tool-directory" -and $Mode -ne "tool-invoke" -and $Mode -ne "swarm-overview" -and $Mode -ne "gjallar" -and $Mode -ne "repo-work-queue-run" -and $Mode -ne "repo-work-service-plan" -and $Mode -ne "repo-work-service-runbook" -and $Mode -ne "swarm-online-runbook" -and $Mode -ne "service-policy-directory" -and $Mode -ne "service-plan" -and $Mode -ne "service-launch" -and $Mode -ne "service-runbook" -and $Mode -ne "cluster-service-runbook" -and $Mode -ne "cluster-service-install-plan" -and $Mode -ne "cluster-service-install-execute" -and $Mode -ne "cluster-service-audit" -and $Mode -ne "cluster-service-start-plan" -and $Mode -ne "cluster-service-stop-plan" -and $Mode -ne "cluster-service-start-execute" -and $Mode -ne "cluster-service-stop-execute" -and $Mode -ne "cluster-service-execution-readiness" -and $Mode -ne "cluster-service-execution-runbook" -and $Mode -ne "cluster-service-execution-audit" -and $Mode -ne "service-execution-runbook" -and $Mode -ne "service-install-plan" -and $Mode -ne "service-install-execute" -and $Mode -ne "service-tick" -and $Mode -ne "service-status" -and $Mode -ne "service-reconcile" -and $Mode -ne "service-execution-readiness" -and $Mode -ne "service-execution-audit" -and $Mode -ne "service-start-plan" -and $Mode -ne "service-stop-plan" -and $Mode -ne "service-start-execute" -and $Mode -ne "service-stop-execute") {
if ($Mode -ne "status" -and $Mode -ne "agent-state-soa" -and $Mode -ne "swarm-status" -and $Mode -ne "swarm-poke-down" -and $Mode -ne "swarm-triage" -and $Mode -ne "cluster-topology" -and $Mode -ne "eve-surfaces" -and $Mode -ne "eve-connect" -and $Mode -ne "collaboration-feedback" -and $Mode -ne "bifrost-publication" -and $Mode -ne "bifrost-ledger" -and $Mode -ne "receipt-directory" -and $Mode -ne "tool-directory" -and $Mode -ne "tool-invoke" -and $Mode -ne "swarm-overview" -and $Mode -ne "gjallar" -and $Mode -ne "repo-persona-intake" -and $Mode -ne "repo-work-queue-run" -and $Mode -ne "repo-work-service-plan" -and $Mode -ne "repo-work-service-runbook" -and $Mode -ne "swarm-online-runbook" -and $Mode -ne "service-policy-directory" -and $Mode -ne "service-plan" -and $Mode -ne "service-launch" -and $Mode -ne "service-runbook" -and $Mode -ne "cluster-service-runbook" -and $Mode -ne "cluster-service-install-plan" -and $Mode -ne "cluster-service-install-execute" -and $Mode -ne "cluster-service-audit" -and $Mode -ne "cluster-service-start-plan" -and $Mode -ne "cluster-service-stop-plan" -and $Mode -ne "cluster-service-start-execute" -and $Mode -ne "cluster-service-stop-execute" -and $Mode -ne "cluster-service-execution-readiness" -and $Mode -ne "cluster-service-execution-runbook" -and $Mode -ne "cluster-service-execution-audit" -and $Mode -ne "service-execution-runbook" -and $Mode -ne "service-install-plan" -and $Mode -ne "service-install-execute" -and $Mode -ne "service-tick" -and $Mode -ne "service-status" -and $Mode -ne "service-reconcile" -and $Mode -ne "service-execution-readiness" -and $Mode -ne "service-execution-audit" -and $Mode -ne "service-start-plan" -and $Mode -ne "service-stop-plan" -and $Mode -ne "service-start-execute" -and $Mode -ne "service-stop-execute") {
Invoke-Checked `
-Label "build Codex app-server compatibility organ" `
-FilePath $cargoExe `
@ -379,7 +380,7 @@ if (-not $SkipBuild) {
}
$requiredBinaries = @($statusExe, $operatorRunExe, $operatorSnapshotExe, $verseQueryExe, $repoWorkExe, $daemonSupervisorExe, $handsActionExe)
if ($Mode -ne "status" -and $Mode -ne "agent-state-soa" -and $Mode -ne "swarm-status" -and $Mode -ne "swarm-poke-down" -and $Mode -ne "swarm-triage" -and $Mode -ne "cluster-topology" -and $Mode -ne "eve-surfaces" -and $Mode -ne "eve-connect" -and $Mode -ne "collaboration-feedback" -and $Mode -ne "bifrost-publication" -and $Mode -ne "bifrost-ledger" -and $Mode -ne "receipt-directory" -and $Mode -ne "tool-directory" -and $Mode -ne "tool-invoke" -and $Mode -ne "swarm-overview" -and $Mode -ne "gjallar" -and $Mode -ne "repo-work-queue-run" -and $Mode -ne "repo-work-service-plan" -and $Mode -ne "repo-work-service-runbook" -and $Mode -ne "swarm-online-runbook" -and $Mode -ne "service-policy-directory" -and $Mode -ne "service-plan" -and $Mode -ne "service-launch" -and $Mode -ne "service-runbook" -and $Mode -ne "cluster-service-runbook" -and $Mode -ne "cluster-service-install-plan" -and $Mode -ne "cluster-service-install-execute" -and $Mode -ne "cluster-service-audit" -and $Mode -ne "cluster-service-start-plan" -and $Mode -ne "cluster-service-stop-plan" -and $Mode -ne "cluster-service-start-execute" -and $Mode -ne "cluster-service-stop-execute" -and $Mode -ne "cluster-service-execution-readiness" -and $Mode -ne "cluster-service-execution-runbook" -and $Mode -ne "cluster-service-execution-audit" -and $Mode -ne "service-execution-runbook" -and $Mode -ne "service-install-plan" -and $Mode -ne "service-install-execute" -and $Mode -ne "service-tick" -and $Mode -ne "service-status" -and $Mode -ne "service-reconcile" -and $Mode -ne "service-execution-readiness" -and $Mode -ne "service-execution-audit" -and $Mode -ne "service-start-plan" -and $Mode -ne "service-stop-plan" -and $Mode -ne "service-start-execute" -and $Mode -ne "service-stop-execute") {
if ($Mode -ne "status" -and $Mode -ne "agent-state-soa" -and $Mode -ne "swarm-status" -and $Mode -ne "swarm-poke-down" -and $Mode -ne "swarm-triage" -and $Mode -ne "cluster-topology" -and $Mode -ne "eve-surfaces" -and $Mode -ne "eve-connect" -and $Mode -ne "collaboration-feedback" -and $Mode -ne "bifrost-publication" -and $Mode -ne "bifrost-ledger" -and $Mode -ne "receipt-directory" -and $Mode -ne "tool-directory" -and $Mode -ne "tool-invoke" -and $Mode -ne "swarm-overview" -and $Mode -ne "gjallar" -and $Mode -ne "repo-persona-intake" -and $Mode -ne "repo-work-queue-run" -and $Mode -ne "repo-work-service-plan" -and $Mode -ne "repo-work-service-runbook" -and $Mode -ne "swarm-online-runbook" -and $Mode -ne "service-policy-directory" -and $Mode -ne "service-plan" -and $Mode -ne "service-launch" -and $Mode -ne "service-runbook" -and $Mode -ne "cluster-service-runbook" -and $Mode -ne "cluster-service-install-plan" -and $Mode -ne "cluster-service-install-execute" -and $Mode -ne "cluster-service-audit" -and $Mode -ne "cluster-service-start-plan" -and $Mode -ne "cluster-service-stop-plan" -and $Mode -ne "cluster-service-start-execute" -and $Mode -ne "cluster-service-stop-execute" -and $Mode -ne "cluster-service-execution-readiness" -and $Mode -ne "cluster-service-execution-runbook" -and $Mode -ne "cluster-service-execution-audit" -and $Mode -ne "service-execution-runbook" -and $Mode -ne "service-install-plan" -and $Mode -ne "service-install-execute" -and $Mode -ne "service-tick" -and $Mode -ne "service-status" -and $Mode -ne "service-reconcile" -and $Mode -ne "service-execution-readiness" -and $Mode -ne "service-execution-audit" -and $Mode -ne "service-start-plan" -and $Mode -ne "service-stop-plan" -and $Mode -ne "service-start-execute" -and $Mode -ne "service-stop-execute") {
$requiredBinaries += @($codexAppServer, $coordinatorExe)
}
function Assert-SwarmBrakeAllowsLiveRun {
@ -452,7 +453,7 @@ function Assert-SwarmBrakeAllowsLiveRun {
}
}
if (@("plan", "run", "mvp", "repo-work-queue-run", "repo-work-service-plan", "repo-work-service-runbook", "service-plan", "service-launch", "service-runbook", "cluster-service-runbook", "cluster-service-install-plan", "cluster-service-install-execute", "cluster-service-audit", "cluster-service-start-plan", "cluster-service-stop-plan", "cluster-service-start-execute", "cluster-service-stop-execute", "cluster-service-execution-readiness", "cluster-service-execution-runbook", "cluster-service-execution-audit", "service-execution-runbook", "service-install-plan", "service-install-execute", "service-tick", "service-status", "service-reconcile", "service-execution-readiness", "service-execution-audit", "service-start-plan", "service-stop-plan", "service-start-execute", "service-stop-execute") -contains $Mode) {
if (@("plan", "run", "mvp", "repo-persona-intake", "repo-work-queue-run", "repo-work-service-plan", "repo-work-service-runbook", "service-plan", "service-launch", "service-runbook", "cluster-service-runbook", "cluster-service-install-plan", "cluster-service-install-execute", "cluster-service-audit", "cluster-service-start-plan", "cluster-service-stop-plan", "cluster-service-start-execute", "cluster-service-stop-execute", "cluster-service-execution-readiness", "cluster-service-execution-runbook", "cluster-service-execution-audit", "service-execution-runbook", "service-install-plan", "service-install-execute", "service-tick", "service-status", "service-reconcile", "service-execution-readiness", "service-execution-audit", "service-start-plan", "service-stop-plan", "service-start-execute", "service-stop-execute") -contains $Mode) {
if (-not (Test-Path -LiteralPath $verseQueryExe)) {
throw "required binary not found for swarm brake preflight: $verseQueryExe"
}
@ -1791,6 +1792,34 @@ if ($Mode -eq "service-start-plan" -or $Mode -eq "service-stop-plan" -or $Mode -
-StderrPath (Join-Path $artifactRoot "daemon-service-$control-$controlModeName.stderr.log")
}
if ($Mode -eq "repo-persona-intake") {
$resultPath = Join-Path $artifactRoot "repo-persona-intake.stdout.json"
$repoWorkVerseStore = Join-Path $Workspace ".epiphany\local-verse.ccmp"
$repoPersonaInput = $PersonaInput
if ($repoPersonaInput -eq "") {
$repoPersonaInput = "Persona intake requests an Imagination plan for the next repo-swarm MVP cut."
}
$repoWorkArgs = @(
"persona-intake",
"--workspace", $Workspace,
"--epiphany-root", $Root,
"--item", $RepoWorkItem,
"--message", $repoPersonaInput,
"--local-verse-store", $repoWorkVerseStore,
"--runtime-id", $RepoWorkRuntimeId
)
if ($CollaborationTopic -ne "") {
$repoWorkArgs += @("--topic", $CollaborationTopic)
}
Invoke-Checked `
-Label "record repo Persona intake surface" `
-FilePath $repoWorkExe `
-Arguments $repoWorkArgs `
-WorkingDirectory $Root `
-StdoutPath $resultPath `
-StderrPath (Join-Path $artifactRoot "repo-persona-intake.stderr.log")
}
if ($Mode -eq "repo-work-queue-run") {
$resultPath = Join-Path $artifactRoot "repo-work-queue-run.stdout.json"
$repoWorkVerseStore = Join-Path $Workspace ".epiphany\local-verse.ccmp"
@ -2343,6 +2372,18 @@ if ($resultPath -ne "" -and (Test-Path -LiteralPath $resultPath)) {
$overviewLabel = "Gjallar"
}
Write-Host "${overviewLabel}: status=$($result.status), liveness=$($result.livenessStatus), recovery=$($result.recoveryStatus), agents=$($result.agentCount), clusters=$($result.clusterCount), privateVerses=$($result.privateVerseCount), surfaces=$($result.surfaceCount), tools=$($result.toolCount), nonReady=$($result.nonReadyDaemonCount), policyMissing=$($result.policyMissingCount), recommended=$($result.recommendedWrapperMode), serviceRecommended=$($result.serviceLifecycleRecommendedWrapperMode), swarmOnlineTool=$swarmOnlineTool, actionQueue=$actionQueue, actionRows=$actionRows, attention=$attention, daemonRows=$daemonRows, toolRows=$toolRows, policyRows=$policyRows, toolHostAttention=$toolHostAttention, toolAttentionRows=$toolAttentionRows, serviceLifecycleAttention=$serviceLifecycleAttention, serviceAttentionRows=$serviceAttentionRows, serviceExecutionFailedChecks=$serviceExecutionFailedChecks, serviceFailedCheckRows=$serviceFailedCheckRows, privateStateExposed=$($result.privateStateExposed)"
} elseif ($Mode -eq "repo-persona-intake") {
$feedbackId = "none"
$consensusReceiptId = "none"
$candidateActions = "none"
if ($null -ne $result.feedback) {
$feedbackId = $result.feedback.feedbackId
$consensusReceiptId = $result.feedback.consensusReceiptId
if ($null -ne $result.feedback.candidateActionRefs -and @($result.feedback.candidateActionRefs).Count -gt 0) {
$candidateActions = (@($result.feedback.candidateActionRefs) -join "; ")
}
}
Write-Host "Repo Persona intake: status=$($result.status), item=$($result.item), speechAudit=$($result.speechAuditId), accept=$($result.acceptReceiptPath), feedback=$feedbackId, consensus=$consensusReceiptId, candidateActions=$candidateActions, next=$($result.nextSafeMove), privateStateExposed=$($result.privateStateExposed)"
} elseif ($Mode -eq "repo-work-queue-run") {
$selectedRows = Format-TuiRows $result.selectedRows
$tickRows = "none"