Add repo status section work family
This commit is contained in:
parent
6c0c93fbff
commit
682073e78a
5 changed files with 125 additions and 24 deletions
|
|
@ -1849,9 +1849,12 @@ fn derive_safe_plan_family(input: DeriveSafePlanInput<'_>) -> Result<DerivedSafe
|
|||
"section-note" | "markdown-section" | "section-update" => {
|
||||
derive_section_note_plan(input, &action_family)
|
||||
}
|
||||
"repo-status-section" | "status-section" | "readme-status" => {
|
||||
derive_repo_status_section_plan(input, &action_family)
|
||||
}
|
||||
"task-card" | "action-card" | "plan-card" => derive_task_card_plan(input, &action_family),
|
||||
other => Err(anyhow!(
|
||||
"unsupported derive-plan action family {other:?}; supported families are append-worklog, planning-note, checklist-note, section-note, and task-card"
|
||||
"unsupported derive-plan action family {other:?}; supported families are append-worklog, planning-note, checklist-note, section-note, repo-status-section, and task-card"
|
||||
)),
|
||||
}
|
||||
}
|
||||
|
|
@ -2074,6 +2077,86 @@ fn derive_section_note_plan(
|
|||
})
|
||||
}
|
||||
|
||||
fn derive_repo_status_section_plan(
|
||||
input: DeriveSafePlanInput<'_>,
|
||||
action_family: &str,
|
||||
) -> Result<DerivedSafePlan> {
|
||||
let item_slug = sanitize(input.item);
|
||||
let target_path = validate_markdown_target_path(input.target_path.unwrap_or("README.md"))?;
|
||||
let candidate_refs =
|
||||
string_array_from_json(input.accept_receipt, &["feedback", "candidateActionRefs"]);
|
||||
let public_refs =
|
||||
string_array_from_json(input.accept_receipt, &["feedback", "publicDiscussionRefs"]);
|
||||
let section_name = format!("epiphany-status:{item_slug}");
|
||||
let start_marker = format!("<!-- epiphany-status:{item_slug}:start -->");
|
||||
let end_marker = format!("<!-- epiphany-status:{item_slug}:end -->");
|
||||
let lines = vec![
|
||||
start_marker.clone(),
|
||||
format!("## Epiphany Status: {}", compact_line(input.item)),
|
||||
String::new(),
|
||||
format!(
|
||||
"- Updated: {}",
|
||||
Utc::now().to_rfc3339_opts(chrono::SecondsFormat::Secs, true)
|
||||
),
|
||||
format!("- Source: {}", compact_line(input.source)),
|
||||
format!("- Summary: {}", compact_line(input.summary)),
|
||||
format!("- Candidate action refs: {}", compact_join(&candidate_refs)),
|
||||
format!("- Public discussion refs: {}", compact_join(&public_refs)),
|
||||
String::new(),
|
||||
"### Repo-Visible Consequence".to_string(),
|
||||
String::new(),
|
||||
"- Publish an operator-safe status section inside the owned repo Body.".to_string(),
|
||||
"- Keep the section bounded by Epiphany status markers so later passes update the same surface instead of duplicating it.".to_string(),
|
||||
"- Escalate if the accepted pressure requires code mutation, publication, merge, deployment, service lifecycle, elevation, or cross-repo authority.".to_string(),
|
||||
String::new(),
|
||||
"### Verification".to_string(),
|
||||
String::new(),
|
||||
"- Soul verifies only the declared README/status markdown path changed.".to_string(),
|
||||
"- Soul verifies the status section contains the accepted pressure summary and both Epiphany status markers.".to_string(),
|
||||
"- Soul verifies the section preserves private-state and publication seals.".to_string(),
|
||||
String::new(),
|
||||
"### Authority".to_string(),
|
||||
String::new(),
|
||||
"- Safe action family: repo-status-section".to_string(),
|
||||
"- Section id: ".to_string() + §ion_name,
|
||||
"- Branch local only: true".to_string(),
|
||||
"- Publication authorized: false".to_string(),
|
||||
"- Merge authorized: false".to_string(),
|
||||
"- Service lifecycle authority: false".to_string(),
|
||||
"- Cross-repo mutation: false".to_string(),
|
||||
"- Private state exposed: false".to_string(),
|
||||
end_marker.clone(),
|
||||
String::new(),
|
||||
];
|
||||
let command = powershell_replace_managed_section_command(
|
||||
&target_path,
|
||||
&start_marker,
|
||||
&end_marker,
|
||||
&lines,
|
||||
);
|
||||
Ok(DerivedSafePlan {
|
||||
safe_action_family: "repo.status_section".to_string(),
|
||||
target_path,
|
||||
plan_summary: format!(
|
||||
"Imagination derived a repo-visible status section from accepted {} pressure.",
|
||||
input.source
|
||||
),
|
||||
command,
|
||||
commit_message: format!("Update repo status section for work item {}", input.item),
|
||||
verification_asks: vec![
|
||||
"Soul verifies the repo status section path changed and contains the accepted pressure summary.".to_string(),
|
||||
"Soul verifies both Epiphany status markers are present so later runs update the same bounded section.".to_string(),
|
||||
"Soul verifies no paths outside the declared status section target changed.".to_string(),
|
||||
"Soul verifies the section does not grant publication, merge, service lifecycle, elevation, cross-repo mutation, or private-state exposure.".to_string(),
|
||||
],
|
||||
rollback_hints: vec![
|
||||
"Remove the managed status section between its Epiphany markers if the accepted pressure was misinterpreted.".to_string(),
|
||||
"Restore the prior marked status section from git if a later status update regressed the repo-facing surface.".to_string(),
|
||||
],
|
||||
derivation: plan_derivation_receipt(input, action_family, "repo.status_section"),
|
||||
})
|
||||
}
|
||||
|
||||
fn derive_task_card_plan(
|
||||
input: DeriveSafePlanInput<'_>,
|
||||
action_family: &str,
|
||||
|
|
@ -5846,7 +5929,7 @@ fn print_usage() {
|
|||
"usage: epiphany-work <persona-intake|accept|derive-plan|plan|run|adopt|execute|close|publish|sync|overview|export-proof|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|checklist-note|section-note|task-card] [--target-path <path>] [--model-ref <ref>] [--model-authored] [--action-summary <text>] [--verification-ask <text>] [--stop-condition <text>] [--escalation-reason <text>]\n\
|
||||
derive-plan --workspace <repo> [--item <id>] [--accept-receipt <path>] [--action-family append-worklog|planning-note|checklist-note|section-note|repo-status-section|task-card] [--target-path <path>] [--model-ref <ref>] [--model-authored] [--action-summary <text>] [--verification-ask <text>] [--stop-condition <text>] [--escalation-reason <text>]\n\
|
||||
plan --workspace <repo> [--item <id>] --objective <text> --plan-summary <text> --command <command> --changed-path <path> --commit-message <text> [--adoption-evidence-ref <ref>]\n\
|
||||
run --workspace <repo> [--item <id>] [--accept-receipt <path>] [--runtime-store <path>] [--requested-path <path>]\n\
|
||||
adopt --workspace <repo> [--item <id>] [--run-receipt <path>] [--from-plan <path>] [--plan-summary <text>] [--adoption-evidence-ref <ref>]\n\
|
||||
|
|
|
|||
|
|
@ -255,12 +255,15 @@ appends a contained markdown checklist, defaulting to
|
|||
`notes/epiphany-work/<item>-checklist.md`; and `--action-family section-note`
|
||||
creates or replaces one Epiphany-managed markdown section between explicit
|
||||
markers, defaulting to `notes/epiphany-work/<item>-section.md`; and
|
||||
`--action-family repo-status-section` creates or replaces one marker-bounded
|
||||
operator-safe status section in the repo Body, defaulting to `README.md`; and
|
||||
`--action-family task-card` writes a structured TOML task card, defaulting to
|
||||
`notes/epiphany-work/<item>-task-card.toml`. Its receipt includes
|
||||
`epiphany.repo_work_plan_derivation.v0`, mode `append-worklog`,
|
||||
`planning-note`, `checklist-note`, `section-note`, or `task-card`, a
|
||||
`safeActionFamily`, and an authority seal forbidding publication, merge,
|
||||
service lifecycle mutation, cross-repo mutation, and private state exposure.
|
||||
`planning-note`, `checklist-note`, `section-note`, `repo-status-section`, or
|
||||
`task-card`, a `safeActionFamily`, and an authority seal forbidding
|
||||
publication, merge, service lifecycle mutation, cross-repo mutation, and private
|
||||
state exposure.
|
||||
These deterministic families are quarantine scaffolding on the road to
|
||||
model-authored Imagination, but they are no longer operator-authored shell
|
||||
details.
|
||||
|
|
@ -347,6 +350,18 @@ authority seals for no publication, merge, service lifecycle, cross-repo
|
|||
mutation, durable state admission, or private-state exposure. Final overview
|
||||
reported `awaiting-publication` with `privateStateExposed=false`.
|
||||
|
||||
The first non-planning safe-family smoke proved repo-visible status cargo:
|
||||
`.epiphany-smoke\repo-status-section-20260620-140245` ran init -> online ->
|
||||
accept -> `derive-plan --action-family repo-status-section --model-ref
|
||||
smoke-imagination-v0 --model-authored` -> run -> adopt -> execute -> close ->
|
||||
overview on a fresh repo. The plan and action-item receipts carried
|
||||
`safeActionFamily=repo.status_section`, `modelAuthored=true`,
|
||||
`operatorAuthoredShellDetails=false`, and `privateStateExposed=false`; Hands
|
||||
created a branch-local commit changing only `README.md`; Soul passed closure
|
||||
with `pathScopeMatched=true`; and the README contained both
|
||||
`<!-- epiphany-status:repo-status-request:start -->` and
|
||||
`<!-- epiphany-status:repo-status-request:end -->` markers.
|
||||
|
||||
### Landed Work Run Gate
|
||||
|
||||
The sixth front door exists as native Rust:
|
||||
|
|
@ -1005,7 +1020,7 @@ existing typed artery run as a living repo organism:
|
|||
|
||||
- deeper model-authored closure review beyond the first typed
|
||||
`epiphany.repo_work_closure_review.v0` packet
|
||||
- later non-planning action classes where Imagination can propose useful
|
||||
- further non-planning action classes where Imagination can propose useful
|
||||
branch-local work beyond planning cargo without arbitrary shell authority
|
||||
- an Idunn-owned service lifecycle path for the queue-run pulse when the
|
||||
operator explicitly grants service mutation or elevated host authority
|
||||
|
|
@ -1029,7 +1044,7 @@ 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. `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` now writes a typed `epiphany.repo_work_imagination_action_items_receipt.v0` before the executable plan receipt. The action-item receipt can carry model provenance, allowed safe family, requested paths, verification asks, stop conditions, escalation reasons, and private-state seals; command text remains deterministic safe-family lowering for `append-worklog`, `planning-note`, `checklist-note`, `section-note` / `repo.markdown_managed_section`, and `task-card` / `repo.task_card`. `plan` remains manual quarantine scaffolding. | Deepen model-authored closure and any later non-planning action classes without turning model text into arbitrary shell authority. |
|
||||
| Imagination planning | `derive-plan` now writes a typed `epiphany.repo_work_imagination_action_items_receipt.v0` before the executable plan receipt. The action-item receipt can carry model provenance, allowed safe family, requested paths, verification asks, stop conditions, escalation reasons, and private-state seals; command text remains deterministic safe-family lowering for `append-worklog`, `planning-note`, `checklist-note`, `section-note` / `repo.markdown_managed_section`, `repo-status-section` / `repo.status_section`, and `task-card` / `repo.task_card`. `plan` remains manual quarantine scaffolding. | Deepen model-authored closure and further non-planning action classes without turning model text into arbitrary shell authority. |
|
||||
| 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` and `repo-work-service-runbook` write Idunn lifecycle receipts/artifacts for the same queue-run command without launching it. | 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, writes `epiphany.repo_work_closure_review.v0`, refuses path-scope mismatches, and writes Soul, Modeling, and Mind receipts. | Deepen model-authored closure review beyond the first structured closure-review packet while preserving deterministic local closure for simple mechanical work. |
|
||||
|
|
@ -1300,9 +1315,11 @@ Required organs before MVP:
|
|||
pressure stream, and `derive-plan` now writes typed Imagination action-item
|
||||
receipts before safe-family command lowering. `checklist-note`,
|
||||
`section-note`, and `task-card` now prove richer model-authored planning cargo
|
||||
without operator shell details. Remaining work is richer closure depth and any
|
||||
later model-authored action classes that move beyond planning cargo while
|
||||
preserving the same authority seals.
|
||||
without operator shell details. `repo-status-section` now proves the first
|
||||
repo-visible non-planning safe family by updating a marker-bounded README
|
||||
status section with the same authority seals. Remaining work is richer closure
|
||||
depth and any later model-authored action classes that move beyond
|
||||
documentation/status cargo while preserving the same authority seals.
|
||||
- Closure depth: `close` now writes a structured
|
||||
`epiphany.repo_work_closure_review.v0` packet for Hands commits, records
|
||||
model-review provenance when supplied, refuses actual-vs-declared path-scope
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Reference in a new issue