Add repo work derived plan gate
This commit is contained in:
parent
836cf11fa6
commit
a2ba319ec4
5 changed files with 313 additions and 47 deletions
|
|
@ -130,6 +130,7 @@ The first MVP is done when a fresh repository can run:
|
|||
epiphany-repo init --workspace <repo>
|
||||
epiphany-swarm online --workspace <repo>
|
||||
epiphany-work accept --workspace <repo> --from persona-or-bifrost --item <id>
|
||||
epiphany-work derive-plan --workspace <repo> --item <id>
|
||||
epiphany-work plan --workspace <repo> --item <id> --objective <text> --plan-summary <text> --command <command> --changed-path <path> --commit-message <text>
|
||||
epiphany-work run --workspace <repo>
|
||||
epiphany-work adopt --workspace <repo> --item <id> --from-plan <plan-receipt>
|
||||
|
|
@ -226,23 +227,35 @@ ref, public discussion ref, and `privateStateExposed=false`.
|
|||
|
||||
### Landed Work Plan Gate
|
||||
|
||||
The fourth front door exists as native Rust:
|
||||
The fourth and fifth front doors exist as native Rust:
|
||||
|
||||
```powershell
|
||||
cargo run --manifest-path .\epiphany-core\Cargo.toml --bin epiphany-work -- derive-plan --workspace <repo> --item <id>
|
||||
cargo run --manifest-path .\epiphany-core\Cargo.toml --bin epiphany-work -- plan --workspace <repo> --item <id> --objective <text> --plan-summary <text> --command <command> --changed-path <path> --commit-message <text>
|
||||
```
|
||||
|
||||
It reads the named or latest work-accept receipt and writes
|
||||
Both commands read the named or latest work-accept receipt and write
|
||||
`.epiphany/work/work-plan-<item>.json` as a typed
|
||||
`epiphany.repo_work_action_plan_receipt.v0`. The receipt names Imagination as
|
||||
planner, Self as router, Mind as state gate, the objective, plan summary,
|
||||
adoption evidence refs, and one branch-local command action with changed paths,
|
||||
commit message, verification asks, stop conditions, and rollback hints.
|
||||
|
||||
This is still not Hands authority. It is the first less-manual bridge between
|
||||
Imagination/Self planning and Hands execution: `adopt --from-plan <receipt>`
|
||||
can approve the plan, and `execute --from-plan <receipt>` can consume the
|
||||
planned command/paths/commit message without the operator retyping them.
|
||||
`epiphany-work plan` is the manual compatibility reliquary: the operator supplies
|
||||
objective, summary, shell command, paths, and commit message. `epiphany-work
|
||||
derive-plan` is the first Persona/Bifrost-to-plan automation: it consumes the
|
||||
accepted pressure summary, candidate action refs, and consensus receipt, then
|
||||
derives a safe append-only `EPIPHANY_WORKLOG.md` plan with
|
||||
`operatorAuthoredShellDetails=false`. Its receipt includes
|
||||
`epiphany.repo_work_plan_derivation.v0`, mode `append-worklog`, and explicitly
|
||||
marks the path as deterministic quarantine rather than final model-authored
|
||||
Imagination.
|
||||
|
||||
This is still not Hands authority. It is the first non-operator-shell bridge
|
||||
between Imagination/Self planning and Hands execution: `adopt --from-plan
|
||||
<receipt>` can approve the plan, and `execute --from-plan <receipt>` can
|
||||
consume the planned command/paths/commit message without the operator retyping
|
||||
them.
|
||||
|
||||
The first smoke proved:
|
||||
|
||||
|
|
@ -258,9 +271,26 @@ The execute receipt produced a real branch-local commit from the typed plan
|
|||
packet, with Hands patch/command/commit receipts and
|
||||
`privateStateExposed=false`.
|
||||
|
||||
A later smoke proved the derived route:
|
||||
|
||||
```powershell
|
||||
epiphany-work accept --workspace <repo> --from persona --item derive-request --summary '...'
|
||||
epiphany-work derive-plan --workspace <repo> --item derive-request
|
||||
epiphany-work run --workspace <repo> --item derive-request
|
||||
epiphany-work adopt --workspace <repo> --item derive-request --from-plan <work-plan-derive-request.json>
|
||||
epiphany-work execute --workspace <repo> --item derive-request --from-plan <work-plan-derive-request.json>
|
||||
epiphany-work close --workspace <repo> --item derive-request
|
||||
```
|
||||
|
||||
The derived plan used mode `append-worklog`,
|
||||
`operatorAuthoredShellDetails=false`, changed only `EPIPHANY_WORKLOG.md`,
|
||||
executed into `branch-local-commit-recorded`, closed as `closed:passed`, and
|
||||
reported `privateStateExposed=false` across accept, plan, run, adopt, execute,
|
||||
and close.
|
||||
|
||||
### Landed Work Run Gate
|
||||
|
||||
The fifth front door exists as native Rust:
|
||||
The seventh front door exists as native Rust:
|
||||
|
||||
```powershell
|
||||
cargo run --manifest-path .\epiphany-core\Cargo.toml --bin epiphany-work -- run --workspace <repo>
|
||||
|
|
@ -323,7 +353,7 @@ still refuses queued or mismatched gates.
|
|||
|
||||
### Landed Work Execution Gate
|
||||
|
||||
The seventh front door exists as native Rust:
|
||||
The eighth front door exists as native Rust:
|
||||
|
||||
```powershell
|
||||
cargo run --manifest-path .\epiphany-core\Cargo.toml --bin epiphany-work -- execute --workspace <repo> --item <id> --command <command> --changed-path <path> --commit-message <text>
|
||||
|
|
@ -360,7 +390,7 @@ The execute receipt produced a real branch-local commit on
|
|||
|
||||
### Landed Work Publication Gate
|
||||
|
||||
The eighth front door exists as native Rust:
|
||||
The ninth front door exists as native Rust:
|
||||
|
||||
```powershell
|
||||
cargo run --manifest-path .\epiphany-core\Cargo.toml --bin epiphany-work -- publish --workspace <repo> --item <id> --change-summary <text> --justification <text> --verification-receipt <ref> --review-receipt <ref> --ledger-entry-id <id> --pull-request-url <url> --pull-request-title <text>
|
||||
|
|
@ -392,14 +422,11 @@ epiphany-work publish --workspace <repo> --item first-request --change-summary '
|
|||
|
||||
The publish receipt produced a Hands PR receipt, Bifrost publication receipt,
|
||||
GitHub publication receipt, `privateStateExposed=false`, and an explicit
|
||||
`upstreamMainSynced=false` guard. The next cut is a merge/sync gate that can
|
||||
prove upstream main actually matches the accepted publication, plus a less
|
||||
manual planner/executor bridge that supplies executable commands from
|
||||
Imagination/Self rather than operator CLI arguments.
|
||||
`upstreamMainSynced=false` guard.
|
||||
|
||||
### Landed Upstream Sync Proof Gate
|
||||
|
||||
The ninth front door exists as native Rust:
|
||||
The tenth front door exists as native Rust:
|
||||
|
||||
```powershell
|
||||
cargo run --manifest-path .\epiphany-core\Cargo.toml --bin epiphany-work -- sync --workspace <repo> --item <id> --upstream-ref origin/main --merge-receipt <ref>
|
||||
|
|
@ -431,7 +458,7 @@ The synced receipt produced `publicationAuthorized=true`,
|
|||
|
||||
### Landed Work Scheduler Pulse
|
||||
|
||||
The tenth front door exists as native Rust:
|
||||
The eleventh front door exists as native Rust:
|
||||
|
||||
```powershell
|
||||
cargo run --manifest-path .\epiphany-core\Cargo.toml --bin epiphany-work -- tick --workspace <repo> --item <id>
|
||||
|
|
@ -588,18 +615,19 @@ That is the machine we are building.
|
|||
|
||||
## Full Migration Plan To Repo Swarm MVP
|
||||
|
||||
This plan starts from the current state: eleven native front doors exist, but
|
||||
the work loop is not yet a full physiology. `init`, `online`, `accept`, `plan`,
|
||||
`run`, `adopt`, `execute`, `close`, `tick`, `publish`, and `sync` prove the typed path
|
||||
from repo birth to branch-local scheduler pulse, Bifrost/GitHub publication
|
||||
receipts, and upstream-main sync proof. `tick` now also proves brake refusal,
|
||||
active-turn refusal, completion-anchored cooldown refusal, and stale active-turn
|
||||
recovery through typed scheduler receipts; `serve` now proves bounded cadence
|
||||
around that same tick artery; `close` now proves first deterministic
|
||||
Soul/Modeling/Mind closure over Hands commit receipts. The chain does not yet
|
||||
prove a repo Persona that can turn conversation into autonomous action without
|
||||
the operator feeding plan details by hand, and deeper model-authored
|
||||
Soul/Modeling closure remains future work.
|
||||
This plan starts from the current state: twelve native front doors exist, but
|
||||
the work loop is not yet a full physiology. `init`, `online`, `accept`,
|
||||
`derive-plan`, `plan`, `run`, `adopt`, `execute`, `close`, `tick`, `publish`,
|
||||
and `sync` prove the typed path from repo birth to branch-local scheduler
|
||||
pulse, Bifrost/GitHub publication receipts, and upstream-main sync proof.
|
||||
`tick` now also proves brake refusal, active-turn refusal,
|
||||
completion-anchored cooldown refusal, and stale active-turn recovery through
|
||||
typed scheduler receipts; `serve` now proves bounded cadence around that same
|
||||
tick artery; `close` now proves first deterministic Soul/Modeling/Mind closure
|
||||
over Hands commit receipts; `derive-plan` now proves a deterministic
|
||||
Persona/Bifrost pressure-to-plan bridge with no operator-authored shell
|
||||
details. The chain does not yet prove fully model-authored Imagination planning
|
||||
or deeper model-authored Soul/Modeling closure.
|
||||
|
||||
The MVP target is narrower than the full Perfect Machine and wider than a demo:
|
||||
a fresh repository can host an Epiphany swarm that initializes its Body,
|
||||
|
|
@ -617,7 +645,7 @@ The repo swarm can already prove the following chain on a fresh repo Body:
|
|||
repo birth
|
||||
-> local Verse online
|
||||
-> Persona/Bifrost work intake
|
||||
-> Imagination/Self action plan receipt
|
||||
-> derived or manual Imagination/Self action plan receipt
|
||||
-> Substrate Gate + Hands queued run packet
|
||||
-> plan-backed branch-local Hands adoption
|
||||
-> plan-backed branch-local execution and commit
|
||||
|
|
@ -634,9 +662,13 @@ The chain is typed and sealed enough to be useful:
|
|||
topology, liveness, daemon tool directory, and private-state seals.
|
||||
- `epiphany-work accept` records Persona/Bifrost pressure without granting
|
||||
Hands, durable-state, publication, or merge authority.
|
||||
- `epiphany-work plan` records the first typed Imagination/Self action plan:
|
||||
- `epiphany-work derive-plan` records the first deterministic
|
||||
Persona/Bifrost-to-plan bridge: accepted pressure becomes a safe append-only
|
||||
action plan with `operatorAuthoredShellDetails=false`.
|
||||
- `epiphany-work plan` records a manual typed Imagination/Self action plan:
|
||||
objective, command, changed paths, commit message, verification asks, stop
|
||||
conditions, and rollback hints.
|
||||
conditions, and rollback hints. It remains a compatibility reliquary until
|
||||
model-authored Imagination can cover richer action classes.
|
||||
- `epiphany-work run` opens the Substrate Gate and queues a Hands packet, but
|
||||
leaves mutation blocked until adoption.
|
||||
- `epiphany-work adopt --from-plan` converts the queued packet into
|
||||
|
|
@ -682,9 +714,10 @@ Required organs before MVP:
|
|||
Remaining work is optional handoff from branch-local execution into the close
|
||||
gate and any later Idunn service lifecycle integration under explicit
|
||||
operator authority.
|
||||
- Persona-to-plan automation: repo Persona input becomes candidate action
|
||||
pressure, Mind/Interpreter extracts work-shaped intent, and Imagination
|
||||
writes the plan packet without the operator hand-authoring shell details.
|
||||
- Persona-to-plan depth: deterministic append-worklog derivation exists for
|
||||
accepted Persona/Bifrost pressure; 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.
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ remembers doctrine; the branch remembers the blade.
|
|||
- Edge JSON is allowed for schema description, hostile ingress before immediate typed parsing, sealed forensic artifacts, or named quarantine experiments. When both subsystems are ours, runtime data must remain typed CultCache documents and move over CultNet typed contracts. Generic `serde_json::Value` in worker launch/result/selfPatch/runtime flow is contamination until classified and replaced.
|
||||
- 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 eleven-front-door chain from `epiphany-repo init` through `epiphany-work close`, `tick`, `publish`, and `sync`, documents the operator-safe proof receipts already proved with `privateStateExposed=false`, and names the remaining MVP organs: Persona-to-plan automation, repo work overview, proof bundles, optional execute-to-close handoff, 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. The tick pulse now 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 serve` now wraps that 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` now 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. Disposable fresh-repo smokes proved active refusal, `advanced:run-from-plan`, cooldown refusal without adoption, stale recovery into `advanced:adopt-from-plan`, active marker cleanup, last-completed anchor creation, serve cadence iteration one `advanced:run-from-plan`, iteration two `refused-by-cooldown:none`, no adoption during cooldown, unbounded zero-interval refusal, close `closed:passed`, publish consumption of the close receipt's Soul/Mind refs, post-publication tick `noop:none`, and `privateStateExposed=false`.
|
||||
- `notes/epiphany-repo-swarm-mvp-contract.md` is the repo-swarm MVP authority map and migration plan. It states the live twelve-front-door chain from `epiphany-repo init` through `epiphany-work derive-plan`, `close`, `tick`, `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, repo work overview, proof bundles, optional execute-to-close handoff, 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 an Imagination/Self action plan in deterministic `append-worklog` quarantine mode with `operatorAuthoredShellDetails=false`; disposable smoke proved accept -> derive-plan -> run -> adopt -> execute -> close, changed only `EPIPHANY_WORKLOG.md`, ended `closed:passed`, and reported 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 serve` wraps that 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.
|
||||
- `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.
|
||||
- `service-tick` is the non-elevated scheduler pulse proof: it writes the latest daemon scheduler receipt through durable policy ownership and local wrapper receipts.
|
||||
|
|
|
|||
Reference in a new issue