Land GUI planning adoption slice
This commit is contained in:
parent
9d47885de2
commit
218f885e0b
13 changed files with 979 additions and 23 deletions
|
|
@ -12,6 +12,7 @@
|
|||
"context",
|
||||
"jobs",
|
||||
"roles",
|
||||
"planning",
|
||||
"coordinator",
|
||||
"roleLaunch",
|
||||
"roleResult",
|
||||
|
|
@ -109,6 +110,132 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
"planning": {
|
||||
"threadId": "019dd9d1-045b-7f13-b0e1-38ed89b31495",
|
||||
"source": "live",
|
||||
"stateStatus": "ready",
|
||||
"stateRevision": 3,
|
||||
"planning": {
|
||||
"workspace_root": "E:\\Projects\\EpiphanyAgent",
|
||||
"captures": [
|
||||
{
|
||||
"id": "capture-github-planning",
|
||||
"title": "Import GitHub issue into planning inbox",
|
||||
"body": "Issues should become planning captures before becoming objectives.",
|
||||
"confidence": "observed",
|
||||
"status": "inbox",
|
||||
"speaker": "human",
|
||||
"tags": ["github", "backlog"],
|
||||
"source": {
|
||||
"kind": "github_issue",
|
||||
"provider": "github",
|
||||
"repo": "GameCult/EpiphanyAgent",
|
||||
"issue_number": 42,
|
||||
"url": "https://github.com/GameCult/EpiphanyAgent/issues/42",
|
||||
"state": "open",
|
||||
"labels": ["planning", "mvp"],
|
||||
"assignees": ["Meta"],
|
||||
"author": "Meta",
|
||||
"created_at": "2026-05-01T10:00:00Z",
|
||||
"updated_at": "2026-05-01T10:05:00Z",
|
||||
"imported_at": "2026-05-01T10:10:00Z"
|
||||
},
|
||||
"created_at": "2026-05-01T10:10:00Z",
|
||||
"updated_at": "2026-05-01T10:10:00Z"
|
||||
},
|
||||
{
|
||||
"id": "capture-chat-planning",
|
||||
"title": "Draft objectives from chat after bounding them",
|
||||
"body": "Discussion remains planning material until it becomes a firm artifact.",
|
||||
"confidence": "medium",
|
||||
"status": "triaged",
|
||||
"speaker": "human",
|
||||
"tags": ["chat", "objective"],
|
||||
"source": {
|
||||
"kind": "chat",
|
||||
"uri": "codex://threads/planning-smoke",
|
||||
"external_id": "turn-planning-smoke"
|
||||
},
|
||||
"created_at": "2026-05-01T10:12:00Z",
|
||||
"updated_at": "2026-05-01T10:12:00Z"
|
||||
}
|
||||
],
|
||||
"backlog_items": [
|
||||
{
|
||||
"id": "backlog-planning-dashboard",
|
||||
"title": "Expose planning state in the Epiphany dashboard",
|
||||
"kind": "feature",
|
||||
"summary": "Show captures, backlog, roadmap streams, and objective drafts.",
|
||||
"status": "ready",
|
||||
"horizon": "near",
|
||||
"priority": {
|
||||
"value": "high",
|
||||
"rationale": "Planning needs a visible user review loop before automation.",
|
||||
"impact": "user-steering",
|
||||
"urgency": "soon",
|
||||
"confidence": "medium",
|
||||
"effort": "small",
|
||||
"unblocks": ["objective-adoption"]
|
||||
},
|
||||
"confidence": "medium",
|
||||
"product_area": "epiphany-gui",
|
||||
"lane_hints": ["imagination", "hands", "soul"],
|
||||
"acceptance_sketch": ["Dashboard can render typed planning records."],
|
||||
"source_refs": [],
|
||||
"updated_at": "2026-05-01T10:15:00Z"
|
||||
}
|
||||
],
|
||||
"roadmap_streams": [
|
||||
{
|
||||
"id": "stream-user-steering",
|
||||
"title": "Human-steered planning",
|
||||
"purpose": "Keep future work visible and bounded before implementation starts.",
|
||||
"status": "active",
|
||||
"item_ids": ["backlog-planning-dashboard"],
|
||||
"near_term_focus": "backlog-planning-dashboard",
|
||||
"review_cadence": "per objective"
|
||||
}
|
||||
],
|
||||
"objective_drafts": [
|
||||
{
|
||||
"id": "draft-planning-dashboard",
|
||||
"title": "Build the planning dashboard slice",
|
||||
"summary": "Render planning records and let the user adopt one bounded objective.",
|
||||
"source_item_ids": ["backlog-planning-dashboard"],
|
||||
"scope": {
|
||||
"includes": ["read-only planning projection", "objective draft review"],
|
||||
"excludes": ["automatic objective adoption"]
|
||||
},
|
||||
"acceptance_criteria": [
|
||||
"Planning records render without changing thread state.",
|
||||
"A draft objective remains review-gated."
|
||||
],
|
||||
"evidence_required": ["live smoke", "GUI screenshot"],
|
||||
"lane_plan": {
|
||||
"imagination": "organize planning records into a bounded objective candidate",
|
||||
"eyes": "check prior art and GitHub issue metadata shape",
|
||||
"hands": "wire dashboard controls after the read-only surface is stable",
|
||||
"soul": "verify no planning record silently becomes active objective"
|
||||
},
|
||||
"risks": ["accidental objective adoption"],
|
||||
"review_gates": ["human adoption"],
|
||||
"status": "draft"
|
||||
}
|
||||
]
|
||||
},
|
||||
"summary": {
|
||||
"captureCount": 2,
|
||||
"pendingCaptureCount": 1,
|
||||
"githubIssueCaptureCount": 1,
|
||||
"backlogItemCount": 1,
|
||||
"readyBacklogItemCount": 1,
|
||||
"roadmapStreamCount": 1,
|
||||
"objectiveDraftCount": 1,
|
||||
"draftObjectiveCount": 1,
|
||||
"activeObjective": "Reach a testable Epiphany MVP through the local GUI/operator workflow.",
|
||||
"note": "Planning substrate is available. These records are planning state only until a human explicitly adopts an objective."
|
||||
}
|
||||
},
|
||||
"roleResults": {
|
||||
"modeling": {
|
||||
"bindingId": "modeling-checkpoint-worker",
|
||||
|
|
|
|||
|
|
@ -53,9 +53,12 @@ async function smokeViewport(browser, viewport, screenshotPath) {
|
|||
await page.getByRole("heading", { name: "Environment" }).waitFor();
|
||||
await page.getByText("Unity Editor").waitFor();
|
||||
await page.getByText("Rider").waitFor();
|
||||
await page.getByRole("heading", { name: "Planning", exact: true }).waitFor();
|
||||
await page.getByRole("heading", { name: "Build the planning dashboard slice", exact: true }).waitFor();
|
||||
await page.getByText("Role Lanes").waitFor();
|
||||
await page.getByText("Artifact Bundles").waitFor();
|
||||
await page.getByRole("button", { name: "Prepare Checkpoint" }).waitFor();
|
||||
await page.getByRole("button", { name: "Adopt Draft" }).waitFor();
|
||||
await page.getByRole("button", { name: "Launch Modeling" }).waitFor();
|
||||
await page.getByRole("button", { name: "Read Modeling" }).waitFor();
|
||||
await page.getByRole("button", { name: "Launch Verification" }).waitFor();
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ struct StatusRequest {
|
|||
cwd: Option<String>,
|
||||
codex_home: Option<String>,
|
||||
app_server: Option<String>,
|
||||
planning_draft_id: Option<String>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize)]
|
||||
|
|
@ -116,6 +117,7 @@ fn run_operator_action(
|
|||
| "launchVerification"
|
||||
| "readVerificationResult"
|
||||
| "acceptVerification"
|
||||
| "adoptObjectiveDraft"
|
||||
| "launchReorient"
|
||||
| "readReorientResult"
|
||||
| "acceptReorient"
|
||||
|
|
@ -348,6 +350,9 @@ fn run_gui_action_bridge(
|
|||
if let Some(app_server) = request.app_server {
|
||||
command.arg("--app-server").arg(app_server);
|
||||
}
|
||||
if let Some(planning_draft_id) = request.planning_draft_id {
|
||||
command.arg("--planning-draft-id").arg(planning_draft_id);
|
||||
}
|
||||
let value = run_json_command(command, &action)?;
|
||||
Ok(OperatorActionResult {
|
||||
action,
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import {
|
|||
Eye,
|
||||
FileText,
|
||||
GitBranch,
|
||||
ListChecks,
|
||||
Play,
|
||||
RefreshCw,
|
||||
} from "lucide-react";
|
||||
|
|
@ -25,8 +26,9 @@ const actionButtons: Array<{
|
|||
requiresModelingPatch?: boolean;
|
||||
requiresVerificationResult?: boolean;
|
||||
requiresReorientResult?: boolean;
|
||||
requiresPlanningDraft?: boolean;
|
||||
requiresContinueImplementation?: boolean;
|
||||
icon: "file" | "check" | "play" | "eye" | "accept" | "runtime";
|
||||
icon: "file" | "check" | "play" | "eye" | "accept" | "runtime" | "plan";
|
||||
}> = [
|
||||
{
|
||||
action: "statusSnapshot",
|
||||
|
|
@ -56,6 +58,16 @@ const actionButtons: Array<{
|
|||
title: "Seed durable Epiphany state for this GUI operator thread",
|
||||
icon: "accept",
|
||||
},
|
||||
{
|
||||
action: "adoptObjectiveDraft",
|
||||
label: "Adopt Draft",
|
||||
runningLabel: "Adopting",
|
||||
title: "Adopt the selected Objective Draft as the active implementation objective",
|
||||
requiresThread: true,
|
||||
requiresReadyState: true,
|
||||
requiresPlanningDraft: true,
|
||||
icon: "plan",
|
||||
},
|
||||
{
|
||||
action: "continueImplementation",
|
||||
label: "Continue Implementation",
|
||||
|
|
@ -166,6 +178,14 @@ function listText(value: unknown, fallback = "none"): string {
|
|||
return Array.isArray(value) && value.length > 0 ? value.map(String).join(", ") : fallback;
|
||||
}
|
||||
|
||||
function objectList(value: unknown): any[] {
|
||||
return Array.isArray(value) ? value.filter((item) => item && typeof item === "object") : [];
|
||||
}
|
||||
|
||||
function countText(value: unknown): string {
|
||||
return typeof value === "number" ? String(value) : text(value, "0");
|
||||
}
|
||||
|
||||
function statusClass(value: unknown): string {
|
||||
const lower = text(value).toLowerCase();
|
||||
if (lower.includes("blocked") || lower.includes("critical") || lower.includes("regather")) return "danger";
|
||||
|
|
@ -246,6 +266,13 @@ export function App() {
|
|||
return [...lanes].sort((a, b) => roleOrder.indexOf(text(a.id)) - roleOrder.indexOf(text(b.id)));
|
||||
}, [status]);
|
||||
const jobs: any[] = Array.isArray(status?.jobs?.jobs) ? status.jobs.jobs : [];
|
||||
const planningResponse = status?.planning ?? {};
|
||||
const planningState = planningResponse?.planning ?? {};
|
||||
const planningSummary = planningResponse?.summary ?? {};
|
||||
const planningCaptures = objectList(planningState?.captures);
|
||||
const backlogItems = objectList(planningState?.backlog_items ?? planningState?.backlogItems);
|
||||
const roadmapStreams = objectList(planningState?.roadmap_streams ?? planningState?.roadmapStreams);
|
||||
const objectiveDrafts = objectList(planningState?.objective_drafts ?? planningState?.objectiveDrafts);
|
||||
const roleResults = status?.roleResults ?? {};
|
||||
const reorientResult = status?.reorientResult ?? {};
|
||||
const latestArtifact = snapshot?.artifacts?.[0];
|
||||
|
|
@ -269,12 +296,30 @@ export function App() {
|
|||
const canAcceptVerification = text(roleResults?.verification?.status).toLowerCase() === "completed";
|
||||
const canAcceptReorient = text(reorientResult?.status).toLowerCase() === "completed";
|
||||
const canContinueImplementation = text(coordinator.action).toLowerCase() === "continueimplementation";
|
||||
const selectedDraft = objectiveDrafts.find((draft) => text(draft.id, "") === request.planningDraftId);
|
||||
const selectedDraftStatus = text(selectedDraft?.status).toLowerCase();
|
||||
const canAdoptDraft =
|
||||
Boolean(selectedDraft) && !["adopted", "rejected", "superseded"].includes(selectedDraftStatus);
|
||||
const unityBridge = latestRuntimeAudit?.editorBridge;
|
||||
const installedEditors = latestRuntimeAudit?.installedEditors ?? [];
|
||||
const candidatePaths = latestRuntimeAudit?.candidatePaths ?? [];
|
||||
const searchRoots = latestRuntimeAudit?.searchRoots ?? [];
|
||||
const unityBridgeReady = latestRuntimeAudit?.status === "ready" && unityBridge?.exists === true;
|
||||
|
||||
useEffect(() => {
|
||||
if (objectiveDrafts.length === 0) return;
|
||||
const draftIds = new Set(objectiveDrafts.map((draft) => text(draft.id, "")).filter(Boolean));
|
||||
setRequest((current) => {
|
||||
if (current.planningDraftId && draftIds.has(current.planningDraftId)) {
|
||||
return current;
|
||||
}
|
||||
const firstDraft =
|
||||
objectiveDrafts.find((draft) => text(draft.status).toLowerCase() === "draft") ?? objectiveDrafts[0];
|
||||
const firstDraftId = text(firstDraft?.id, "");
|
||||
return firstDraftId ? { ...current, planningDraftId: firstDraftId } : current;
|
||||
});
|
||||
}, [objectiveDrafts, setRequest]);
|
||||
|
||||
return (
|
||||
<main className="shell">
|
||||
<header className="topbar">
|
||||
|
|
@ -314,6 +359,7 @@ export function App() {
|
|||
const needsModeling = button.requiresModelingPatch && !canAcceptModeling;
|
||||
const needsVerification = button.requiresVerificationResult && !canAcceptVerification;
|
||||
const needsReorient = button.requiresReorientResult && !canAcceptReorient;
|
||||
const needsPlanningDraft = button.requiresPlanningDraft && !canAdoptDraft;
|
||||
const needsImplementation = button.requiresContinueImplementation && !canContinueImplementation;
|
||||
const needsNoDiffReview = button.requiresContinueImplementation && implementationNoDiffPending;
|
||||
const disabled =
|
||||
|
|
@ -323,6 +369,7 @@ export function App() {
|
|||
needsModeling ||
|
||||
needsVerification ||
|
||||
needsReorient ||
|
||||
needsPlanningDraft ||
|
||||
needsImplementation ||
|
||||
needsNoDiffReview;
|
||||
const title = needsThread
|
||||
|
|
@ -335,11 +382,13 @@ export function App() {
|
|||
? "Read a completed verification result before accepting it"
|
||||
: needsReorient
|
||||
? "Read a completed reorient result before accepting it"
|
||||
: needsImplementation
|
||||
? "Run the coordinator and clear review gates before continuing implementation"
|
||||
: needsNoDiffReview
|
||||
? "Review the latest no-diff implementation artifact or run another lane before retrying"
|
||||
: button.title;
|
||||
: needsPlanningDraft
|
||||
? "Select a draft objective that has not already been adopted"
|
||||
: needsImplementation
|
||||
? "Run the coordinator and clear review gates before continuing implementation"
|
||||
: needsNoDiffReview
|
||||
? "Review the latest no-diff implementation artifact or run another lane before retrying"
|
||||
: button.title;
|
||||
return (
|
||||
<button
|
||||
className="secondaryButton"
|
||||
|
|
@ -450,6 +499,118 @@ export function App() {
|
|||
</div>
|
||||
</section>
|
||||
|
||||
<section className="sectionBand">
|
||||
<SectionHeader title="Planning" icon={<ListChecks size={18} />} />
|
||||
<div className="planningGrid">
|
||||
<article className="environmentCard planningSummary">
|
||||
<div className="cardTopline">
|
||||
<h3>State</h3>
|
||||
<Pill tone={statusClass(planningResponse?.stateStatus)}>
|
||||
{text(planningResponse?.stateStatus, "missing")}
|
||||
</Pill>
|
||||
</div>
|
||||
<dl className="facts environmentFacts">
|
||||
<div><dt>Captures</dt><dd>{countText(planningSummary?.captureCount)}</dd></div>
|
||||
<div><dt>Pending</dt><dd>{countText(planningSummary?.pendingCaptureCount)}</dd></div>
|
||||
<div><dt>Backlog</dt><dd>{countText(planningSummary?.backlogItemCount)}</dd></div>
|
||||
<div><dt>Ready</dt><dd>{countText(planningSummary?.readyBacklogItemCount)}</dd></div>
|
||||
<div><dt>Streams</dt><dd>{countText(planningSummary?.roadmapStreamCount)}</dd></div>
|
||||
<div><dt>Drafts</dt><dd>{countText(planningSummary?.objectiveDraftCount)}</dd></div>
|
||||
</dl>
|
||||
<label className="draftPicker">
|
||||
Objective Draft
|
||||
<select
|
||||
value={request.planningDraftId ?? ""}
|
||||
onChange={(event) =>
|
||||
setRequest({ ...request, planningDraftId: event.target.value || undefined })
|
||||
}
|
||||
disabled={objectiveDrafts.length === 0}
|
||||
>
|
||||
<option value="">none</option>
|
||||
{objectiveDrafts.map((draft) => (
|
||||
<option value={text(draft.id, "")} key={text(draft.id)}>
|
||||
{text(draft.title)} [{text(draft.status)}]
|
||||
</option>
|
||||
))}
|
||||
</select>
|
||||
</label>
|
||||
<PathList title="Roadmap" items={roadmapStreams.map((stream) => `${text(stream.id)}: ${text(stream.title)}`)} />
|
||||
{planningSummary?.note && <p className="environmentNote">{text(planningSummary.note)}</p>}
|
||||
</article>
|
||||
|
||||
<div className="planningColumn">
|
||||
<div className="cardTopline planningColumnHeader">
|
||||
<h3>Objective Drafts</h3>
|
||||
<Pill tone={objectiveDrafts.length ? "warn" : "neutral"}>{objectiveDrafts.length}</Pill>
|
||||
</div>
|
||||
{objectiveDrafts.slice(0, 4).map((draft) => (
|
||||
<PlanningItem
|
||||
key={text(draft.id)}
|
||||
title={text(draft.title)}
|
||||
status={text(draft.status)}
|
||||
selected={text(draft.id, "") === request.planningDraftId}
|
||||
body={text(draft.summary)}
|
||||
meta={[
|
||||
text(draft.id),
|
||||
`${
|
||||
Array.isArray(draft.acceptance_criteria ?? draft.acceptanceCriteria)
|
||||
? (draft.acceptance_criteria ?? draft.acceptanceCriteria).length
|
||||
: 0
|
||||
} checks`,
|
||||
listText(draft.source_item_ids ?? draft.sourceItemIds),
|
||||
]}
|
||||
/>
|
||||
))}
|
||||
{objectiveDrafts.length === 0 && <EmptyState label="No objective drafts loaded." />}
|
||||
</div>
|
||||
|
||||
<div className="planningColumn">
|
||||
<div className="cardTopline planningColumnHeader">
|
||||
<h3>Backlog</h3>
|
||||
<Pill tone={backlogItems.length ? "ok" : "neutral"}>{backlogItems.length}</Pill>
|
||||
</div>
|
||||
{backlogItems.slice(0, 4).map((item) => (
|
||||
<PlanningItem
|
||||
key={text(item.id)}
|
||||
title={text(item.title)}
|
||||
status={text(item.status)}
|
||||
body={text(item.summary)}
|
||||
meta={[
|
||||
text(item.priority?.value),
|
||||
text(item.horizon),
|
||||
text(item.product_area ?? item.productArea),
|
||||
]}
|
||||
/>
|
||||
))}
|
||||
{backlogItems.length === 0 && <EmptyState label="No backlog items loaded." />}
|
||||
</div>
|
||||
|
||||
<div className="planningColumn">
|
||||
<div className="cardTopline planningColumnHeader">
|
||||
<h3>Captures</h3>
|
||||
<Pill tone={planningCaptures.length ? "neutral" : "neutral"}>{planningCaptures.length}</Pill>
|
||||
</div>
|
||||
{planningCaptures.slice(0, 4).map((capture) => {
|
||||
const source = capture.source ?? {};
|
||||
const sourceLabel =
|
||||
source.repo && source.issue_number
|
||||
? `${source.repo}#${source.issue_number}`
|
||||
: text(source.kind);
|
||||
return (
|
||||
<PlanningItem
|
||||
key={text(capture.id)}
|
||||
title={text(capture.title)}
|
||||
status={text(capture.status)}
|
||||
body={text(capture.body)}
|
||||
meta={[text(capture.confidence), sourceLabel, listText(capture.tags)]}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
{planningCaptures.length === 0 && <EmptyState label="No captures loaded." />}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section className="statusGrid" aria-label="Coordinator summary">
|
||||
<Panel title="Recommendation" icon={<ClipboardCheck size={18} />}>
|
||||
<div className={`actionBanner ${statusClass(coordinator.action ?? crrc.action)}`}>
|
||||
|
|
@ -560,12 +721,13 @@ function SectionHeader({ title, icon }: { title: string; icon: React.ReactNode }
|
|||
);
|
||||
}
|
||||
|
||||
function ActionIcon({ icon }: { icon: "file" | "check" | "play" | "eye" | "accept" | "runtime" }) {
|
||||
function ActionIcon({ icon }: { icon: "file" | "check" | "play" | "eye" | "accept" | "runtime" | "plan" }) {
|
||||
if (icon === "file") return <FileText size={16} aria-hidden="true" />;
|
||||
if (icon === "check") return <ClipboardCheck size={16} aria-hidden="true" />;
|
||||
if (icon === "play") return <Play size={16} aria-hidden="true" />;
|
||||
if (icon === "eye") return <Eye size={16} aria-hidden="true" />;
|
||||
if (icon === "runtime") return <Database size={16} aria-hidden="true" />;
|
||||
if (icon === "plan") return <ListChecks size={16} aria-hidden="true" />;
|
||||
return <CheckCircle2 size={16} aria-hidden="true" />;
|
||||
}
|
||||
|
||||
|
|
@ -597,6 +759,32 @@ function Finding({ title, result, findingKey = "finding" }: { title: string; res
|
|||
);
|
||||
}
|
||||
|
||||
function PlanningItem({
|
||||
title,
|
||||
status,
|
||||
body,
|
||||
meta,
|
||||
selected = false,
|
||||
}: {
|
||||
title: string;
|
||||
status: string;
|
||||
body: string;
|
||||
meta: string[];
|
||||
selected?: boolean;
|
||||
}) {
|
||||
const metaItems = meta.filter((item) => item && item !== "none");
|
||||
return (
|
||||
<article className={`planningItem ${selected ? "selected" : ""}`}>
|
||||
<div className="cardTopline">
|
||||
<h3>{title}</h3>
|
||||
<Pill tone={statusClass(status)}>{status}</Pill>
|
||||
</div>
|
||||
<p>{body}</p>
|
||||
{metaItems.length > 0 && <span className="planningMeta">{metaItems.join(" / ")}</span>}
|
||||
</article>
|
||||
);
|
||||
}
|
||||
|
||||
function ArtifactOutcome({ artifact }: { artifact: ArtifactBundle }) {
|
||||
const audit = artifact.implementationAudit;
|
||||
const runtime = artifact.runtimeAudit;
|
||||
|
|
|
|||
|
|
@ -22,7 +22,8 @@ body {
|
|||
}
|
||||
|
||||
button,
|
||||
input {
|
||||
input,
|
||||
select {
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
|
|
@ -136,7 +137,8 @@ label {
|
|||
font-weight: 700;
|
||||
}
|
||||
|
||||
input {
|
||||
input,
|
||||
select {
|
||||
width: 100%;
|
||||
min-height: 38px;
|
||||
border: 1px solid #ccd4ca;
|
||||
|
|
@ -146,6 +148,24 @@ input {
|
|||
background: #ffffff;
|
||||
}
|
||||
|
||||
select {
|
||||
appearance: none;
|
||||
padding-right: 34px;
|
||||
background:
|
||||
linear-gradient(45deg, transparent 50%, #526157 50%),
|
||||
linear-gradient(135deg, #526157 50%, transparent 50%),
|
||||
#ffffff;
|
||||
background-position:
|
||||
calc(100% - 17px) 16px,
|
||||
calc(100% - 11px) 16px,
|
||||
0 0;
|
||||
background-size:
|
||||
6px 6px,
|
||||
6px 6px,
|
||||
100% 100%;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
.notice,
|
||||
.panel,
|
||||
.laneCard,
|
||||
|
|
@ -325,6 +345,56 @@ dd {
|
|||
background: #ffffff;
|
||||
}
|
||||
|
||||
.planningGrid {
|
||||
display: grid;
|
||||
grid-template-columns: minmax(260px, 0.9fr) repeat(3, minmax(220px, 1fr));
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.planningColumn {
|
||||
display: grid;
|
||||
align-content: start;
|
||||
gap: 10px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.planningColumnHeader {
|
||||
min-height: 30px;
|
||||
}
|
||||
|
||||
.draftPicker {
|
||||
margin-top: 12px;
|
||||
}
|
||||
|
||||
.planningItem {
|
||||
min-width: 0;
|
||||
border: 1px solid #d9ded5;
|
||||
border-radius: 8px;
|
||||
padding: 12px;
|
||||
background: #ffffff;
|
||||
}
|
||||
|
||||
.planningItem.selected {
|
||||
border-color: #78a986;
|
||||
box-shadow: inset 3px 0 0 #2f7a49;
|
||||
}
|
||||
|
||||
.planningItem p {
|
||||
margin-top: 9px;
|
||||
color: #435045;
|
||||
font-size: 0.86rem;
|
||||
line-height: 1.38;
|
||||
}
|
||||
|
||||
.planningMeta {
|
||||
display: block;
|
||||
margin-top: 10px;
|
||||
overflow-wrap: anywhere;
|
||||
color: #667168;
|
||||
font-size: 0.76rem;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.environmentFacts {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
|
|
@ -471,6 +541,10 @@ code {
|
|||
.environmentGrid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.planningGrid {
|
||||
grid-template-columns: repeat(2, minmax(220px, 1fr));
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
|
|
@ -489,6 +563,7 @@ code {
|
|||
}
|
||||
|
||||
.cardGrid,
|
||||
.planningGrid,
|
||||
.facts,
|
||||
.facts.compact,
|
||||
.artifactHeader,
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ export interface StatusRequest {
|
|||
cwd?: string;
|
||||
codexHome?: string;
|
||||
appServer?: string;
|
||||
planningDraftId?: string;
|
||||
}
|
||||
|
||||
export type OperatorAction =
|
||||
|
|
@ -17,6 +18,7 @@ export type OperatorAction =
|
|||
| "launchVerification"
|
||||
| "readVerificationResult"
|
||||
| "acceptVerification"
|
||||
| "adoptObjectiveDraft"
|
||||
| "launchReorient"
|
||||
| "readReorientResult"
|
||||
| "acceptReorient";
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ Do not trust this file for the exact live HEAD. Always check git.
|
|||
- Do not copy exact branch or HEAD from this note. Run `git status --short --branch` and `git log --oneline -5`.
|
||||
- Phase 1 through Phase 5 are complete enough.
|
||||
- Phase 6 has read-only `thread/epiphany/scene`, `thread/epiphany/jobs`, `thread/epiphany/roles`, `thread/epiphany/freshness`, `thread/epiphany/context`, `thread/epiphany/graphQuery`, `thread/epiphany/planning`, `thread/epiphany/pressure`, `thread/epiphany/reorient`, `thread/epiphany/crrc`, `thread/epiphany/coordinator`, `thread/epiphany/reorientResult`, and `thread/epiphany/roleResult`; durable `jobBindings` now act as a thin Epiphany-owned launcher seam with launcher id, authority scope, and backend kind/job id, `thread/epiphany/jobLaunch` / `thread/epiphany/jobInterrupt` / `thread/epiphany/roleLaunch` now provide explicit bounded authority over that seam, jobs can overlay it onto live runtime `agent_jobs` progress for loaded threads, and `thread/epiphany/jobsUpdated` now translates live `agent_job_progress:{json}` background events into changed launcher-bound notifications without polling or scheduling. Freshness carries watcher-backed invalidation inputs, graphQuery traverses authoritative typed graph neighborhoods and path/symbol matches without mutation, planning projects typed captures/backlog/roadmap/objective drafts without adopting work, roles project implementation/modeling/verification/reorientation ownership from existing signals without becoming a scheduler, `roleLaunch` can launch only fixed modeling/checkpoint or verification/review specialists, `roleResult` reads those outputs back as reviewable findings without mutation, `thread/epiphany/roleAccept` can apply a reviewed modeling/checkpoint `statePatch` through the existing state validator, reorient turns checkpoint plus freshness/pressure/watcher signals into a read-only resume-versus-regather verdict, `thread/epiphany/reorientLaunch` is the explicit runtime consumer over that verdict, `thread/epiphany/reorientResult` reads the launched worker output back as a reviewable finding without mutation or promotion, `thread/epiphany/reorientAccept` explicitly banks completed findings into accepted observation/evidence plus optional scratch/checkpoint state, `thread/epiphany/crrc` recommends the next explicit CRRC action without launching, accepting, compacting, scheduling, or mutating, and `thread/epiphany/coordinator` composes those signals into a fixed-lane MVP action recommendation without becoming a writer.
|
||||
- `tools/epiphany_mvp_status.py` is the first dogfood operator view. It starts or reads a thread through app-server and prints scene, pressure, reorient, jobs, roles, modeling/verification role result read-backs, reorient result, and CRRC recommendation as text or JSON.
|
||||
- `tools/epiphany_mvp_status.py` is the first dogfood operator view. It starts or reads a thread through app-server and prints scene, planning, pressure, reorient, jobs, roles, modeling/verification role result read-backs, reorient result, and CRRC recommendation as text or JSON.
|
||||
- `tools/epiphany_mvp_coordinator.py` is the first auditable fixed-lane coordinator runner. It starts or reads a thread through app-server, follows the harness-native coordinator action, can auto-launch modeling, verification, or reorient-worker jobs, keeps semantic findings review-gated by default, and writes summary, steps, rendered snapshots, transcript, stderr, and final next-action artifacts under `.epiphany-dogfood/coordinator` or a caller-provided artifact directory.
|
||||
- Native CRRC automation is now landed only at turn-complete safe boundaries. It may submit `Op::Compact` for coordinator-approved `compactRehydrateReorient` or for a successful pre-compaction checkpoint intervention's pending compact handoff, and it may launch the fixed `reorient-worker` for coordinator-approved `launchReorientWorker`. It does not auto-launch modeling/verification, accept findings, promote evidence, edit implementation code, or keep going after reviewable semantic output.
|
||||
- Pre-compaction checkpoint intervention is now landed. On token-count events for loaded Epiphany threads, when current context usage reaches 80% of the active auto-compact/context limit, the harness steers the active turn once with a CRRC checkpoint directive so the agent banks working context before compaction/reorientation. Pressure ignores cumulative token spend; cumulative-only telemetry reports unknown instead of yelling. A successful steer now latches a turn-scoped compact handoff that is consumed at clean turn completion, preventing the brake from decaying into another implementation turn. This is still bounded steering plus compaction handoff, not automatic semantic acceptance, a broad scheduler, or implementation continuation.
|
||||
|
|
@ -50,7 +50,8 @@ Do not trust this file for the exact live HEAD. Always check git.
|
|||
- Aetheria dogfood exposed and then landed the first editor/runtime bridge. An implementation worker launched legacy `D:\Unity\Editor\Unity.exe -version` (Unity 5.5.0f3) even though Aetheria pins Unity `6000.1.10f1`; the stray process was killed. `tools/epiphany_unity_bridge.py` now resolves the project-pinned Unity editor, refuses wrong/missing versions, owns `-batchmode`, `-quit`, and `-projectPath`, and writes inspection/command/log artifacts. `tools/epiphany_gui_action.py` points implementation workers at that bridge, and the GUI has an Inspect Unity action.
|
||||
- The current Aetheria runtime truth is blocked but legible: the project pins Unity `6000.1.10f1`, this machine currently has Hub editor `6000.4.2f1`, and the bridge wrote `.epiphany-gui/runtime/unity-inspect-1777549218802064800-23832` proving the exact editor is missing. Treat that artifact as the evidence gap until the pinned editor exists.
|
||||
- The GUI parses `implementation-result.json` into artifact metadata, surfaces the latest implementation diff/no-diff outcome, and pauses immediate `Continue Implementation` repeats when the newest artifact is a no-diff implementation audit.
|
||||
- The planning substrate is now runtime-backed. Typed captures, backlog items, roadmap streams, Objective Drafts, and GitHub issue source refs live in `EpiphanyThreadState`, validate through revision-gated `thread/epiphany/update`, render into prompts when present, and project read-only through `thread/epiphany/planning`. Chat is deliberation, not an objective pipe; ideas and GitHub Issues remain planning state until explicit human adoption.
|
||||
- The planning loop is now runtime-backed and operator-visible. Typed captures, backlog items, roadmap streams, Objective Drafts, and GitHub issue source refs live in `EpiphanyThreadState`, validate through revision-gated `thread/epiphany/update`, render into prompts when present, project read-only through `thread/epiphany/planning`, render in the GUI Planning panel, and can be explicitly adopted through the artifacted `adoptObjectiveDraft` GUI action. Chat is deliberation, not an objective pipe; ideas and GitHub Issues remain planning state until explicit human adoption.
|
||||
- Next real product move: add the Imagination planning synthesis lane so existing planning material can produce reviewable Objective Drafts, then add GitHub Issues import into captures before returning to EpiphanyGraph/Rider bridge work.
|
||||
- The repo is an Epiphany fork of Codex, not a Codex preset.
|
||||
- `vendor/codex` is tracked directly, not a submodule.
|
||||
- `epiphany-core` owns the heavy Epiphany organs where practical.
|
||||
|
|
@ -97,7 +98,7 @@ The current spine:
|
|||
- read-only modeling/checkpoint and verification/review specialist result read-back through `thread/epiphany/roleResult`
|
||||
- review-gated modeling/checkpoint patch acceptance through `thread/epiphany/roleAccept`
|
||||
- config-backed Eyes/research prompt text and active anti-Greenspun checks in base, implementation, verification, and coordinator prompts; a full launchable research lane is still a coordinator/protocol extension, not yet a landed roleLaunch lane
|
||||
- typed planning state for captures, backlog, roadmap streams, Objective Drafts, explicit adoption boundaries, and GitHub Issues source refs; GUI Planning view, explicit adoption actions, and the Imagination synthesis lane are not landed yet
|
||||
- typed planning state for captures, backlog, roadmap streams, Objective Drafts, explicit adoption boundaries, GitHub Issues source refs, GUI Planning view, and artifacted Objective Draft adoption; the Imagination synthesis lane is not landed yet
|
||||
- bounded reorient-guided worker launch through `thread/epiphany/reorientLaunch`
|
||||
- read-only reorient-worker result read-back through `thread/epiphany/reorientResult`
|
||||
- explicit reorient-worker finding acceptance through `thread/epiphany/reorientAccept`
|
||||
|
|
@ -112,6 +113,7 @@ The current spine:
|
|||
- read-only targeted state-shard reflection through `thread/epiphany/context`
|
||||
- read-only graph traversal through `thread/epiphany/graphQuery`
|
||||
- read-only planning projection through `thread/epiphany/planning`
|
||||
- GUI planning adoption through `tools/epiphany_gui_action.py --action adoptObjectiveDraft`, which requires a selected Objective Draft id and writes objective/subgoal/planning/scratch/checkpoint/evidence updates plus patch/update artifacts
|
||||
- read-only current-context pressure reflection through `thread/epiphany/pressure`
|
||||
- read-only CRRC reorientation policy through `thread/epiphany/reorient`
|
||||
- read-only CRRC next-action recommendation through `thread/epiphany/crrc`
|
||||
|
|
@ -128,6 +130,7 @@ The current spine:
|
|||
- live context app-server smoke through `tools/epiphany_phase6_context_smoke.py`
|
||||
- live graph traversal app-server smoke through `tools/epiphany_phase6_graph_query_smoke.py`
|
||||
- live planning app-server smoke through `tools/epiphany_phase6_planning_smoke.py`
|
||||
- live GUI planning adoption smoke through `tools/epiphany_gui_planning_smoke.py`
|
||||
- live pressure app-server smoke through `tools/epiphany_phase6_pressure_smoke.py`
|
||||
- live reorientation app-server smoke through `tools/epiphany_phase6_reorient_smoke.py`
|
||||
- live reorient-guided worker launch smoke through `tools/epiphany_phase6_reorient_launch_smoke.py`
|
||||
|
|
@ -254,6 +257,12 @@ For the first MVP operator status view, run:
|
|||
& 'C:\Users\Meta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\python.exe' '.\tools\epiphany_mvp_status_smoke.py'
|
||||
```
|
||||
|
||||
For GUI Objective Draft adoption behavior, run:
|
||||
|
||||
```powershell
|
||||
& 'C:\Users\Meta\.cache\codex-runtimes\codex-primary-runtime\dependencies\python\python.exe' '.\tools\epiphany_gui_planning_smoke.py'
|
||||
```
|
||||
|
||||
For explicit modeling/checkpoint and verification/review role launch/read-back,
|
||||
run:
|
||||
|
||||
|
|
@ -328,8 +337,12 @@ The Phase 6 planning substrate runtime slice is also landed. It stores captures,
|
|||
backlog items, roadmap streams, Objective Drafts, and GitHub source refs inside
|
||||
typed Epiphany state, validates them through the revision-gated update path,
|
||||
renders a bounded planning section into prompts, and exposes read-only
|
||||
`thread/epiphany/planning` for clients. It does not adopt objectives, launch
|
||||
work, or turn imported issues into implementation authority.
|
||||
`thread/epiphany/planning` for clients. The GUI planning operator slice is
|
||||
landed on top of that projection: it renders planning summaries, captures,
|
||||
backlog, roadmap streams, and Objective Drafts, and its `adoptObjectiveDraft`
|
||||
action requires an explicit selected draft before writing active
|
||||
objective/subgoal state plus review artifacts. Imported issues still do not
|
||||
become implementation authority by themselves.
|
||||
|
||||
The bounded CRRC coordination/policy layer is now also landed as read-only
|
||||
`thread/epiphany/reorient`. It consumes the landed pressure, freshness,
|
||||
|
|
@ -434,6 +447,7 @@ Live `thread/epiphany/scene`, `thread/epiphany/jobs`, `thread/epiphany/roles`,
|
|||
`thread/epiphany/reorient`, `thread/epiphany/crrc`, `thread/epiphany/coordinator`,
|
||||
`tools/epiphany_mvp_status.py`, `tools/epiphany_mvp_coordinator.py`, and
|
||||
`tools/epiphany_phase6_graph_query_smoke.py` / `tools/epiphany_phase6_planning_smoke.py`
|
||||
/ `tools/epiphany_gui_planning_smoke.py`
|
||||
smokes are now guardrails, not the next organs.
|
||||
|
||||
## Not Yet
|
||||
|
|
|
|||
|
|
@ -61,3 +61,4 @@
|
|||
{"ts": "2026-05-01T00:00:00Z", "type": "design", "status": "ok", "note": "Planning substrate formalized in notes/epiphany-planning-substrate.md: conversation, captures/inbox, backlog, roadmap streams, Objective Drafts, and active objective adoption are distinct states. GitHub Issues import should land in captures first with source refs and metadata, not mutate active objectives or make GitHub the internal backlog model."}
|
||||
{"ts": "2026-05-01T05:23:34Z", "type": "design", "status": "ok", "note": "The planner/future-shape role is named Imagination. It may synthesize captures, backlog, roadmap streams, objective drafts, and unresolved planning questions alongside Eyes research, but its outputs remain planning artifacts until explicit human adoption turns a draft into the active objective."}
|
||||
{"ts": "2026-05-01T06:26:49Z", "type": "implementation", "status": "ok", "note": "The first planning substrate runtime slice landed: EpiphanyThreadState now carries typed captures, backlog items, roadmap streams, Objective Drafts, and GitHub source refs; planning validates through revision-gated updates, renders into prompts, exposes read-only thread/epiphany/planning with generated schema types, appears in scene actions, and is covered by tools/epiphany_phase6_planning_smoke.py."}
|
||||
{"ts": "2026-05-01T06:56:54Z", "type": "implementation", "status": "ok", "note": "The GUI planning operator slice landed: tools/epiphany_mvp_status.py now collects/render planning state, apps/epiphany-gui renders planning summaries/captures/backlog/roadmap/objective drafts with a selected draft control, and tools/epiphany_gui_action.py exposes adoptObjectiveDraft to explicitly update objective/subgoal/planning/scratch/checkpoint/evidence with patch/update artifacts. tools/epiphany_gui_planning_smoke.py proves draft adoption marks the draft adopted, source backlog active, and activeObjective updated."}
|
||||
|
|
|
|||
|
|
@ -12,9 +12,9 @@ objective:
|
|||
explicit typed models of the codebase, active goal, evidence, and change
|
||||
machinery they are working on.
|
||||
current: >
|
||||
Make Epiphany's planning substrate real in the harness: durable captures,
|
||||
backlog items, roadmap streams, Objective Drafts, and explicit human
|
||||
adoption boundaries before those ideas become implementation objectives.
|
||||
Make Epiphany's planning loop operable in the local GUI: visible captures,
|
||||
backlog, roadmap streams, Objective Drafts, and explicit human adoption
|
||||
before planning material becomes an implementation objective.
|
||||
|
||||
constraints:
|
||||
- No frontier-scale training budget.
|
||||
|
|
@ -66,7 +66,7 @@ active_subgoals:
|
|||
- Use `tools/epiphany_agent_telemetry.py` and generated `agent-function-telemetry.json` files to inspect behavior shape without opening sealed transcripts.
|
||||
- Treat repeated no-diff implementation turns as an MVP blocker, not success. A bounded implementation pass must leave a reviewable workspace diff or an explicit reviewable failure artifact before dogfood can be called healthy.
|
||||
- Build the Rider and Unity bridges before the next Aetheria implementation dogfood run: the Aetheria-side resident Unity editor package, named Unity bridge operation planner, and GUI Environment panel are now landed; next build the EpiphanyGraph-backed GUI graph dashboard, Rider context bridge, and Rider plugin MVP.
|
||||
- Wire the newly landed planning state into the actual product loop: GUI Planning view, explicit capture/objective adoption actions, and Imagination planning synthesis remain the next organs after the read-only planning projection.
|
||||
- Preserve the newly landed GUI Planning view and explicit Objective Draft adoption action; Imagination planning synthesis and GitHub Issues import remain the next planning organs.
|
||||
- Treat the target workflow as three integrated surfaces: Rider is the human code/diff view, Epiphany GUI is the agent dashboard and persisted-state graph view, and Unity is the pinned runtime/test/scene environment.
|
||||
- Use `notes/epiphany-rider-unity-integration-plan.md` as the source-grounded plan for Rider-as-IDE and Unity-as-editor/runtime integration seams.
|
||||
|
||||
|
|
@ -87,7 +87,7 @@ accepted_design:
|
|||
- The harness now has an in-flight investigation checkpoint packet in durable typed state; automatic CRRC still needs runtime logic that reads the packet and decides whether to resume or force reorientation and re-gathering after compaction.
|
||||
- GUI/client work must reflect or steer typed state rather than manufacture a second source of truth.
|
||||
- The MVP GUI target is a local Tauri v2 + React operator console over existing app-server APIs. Tauri owns windowing and local lifecycle; React renders the operator surface; app-server and typed Epiphany state remain authoritative.
|
||||
- `apps/epiphany-gui` is the first GUI shell: a Tauri v2 + React app that invokes the existing MVP status bridge, renders coordinator/CRRC/pressure/reorient/role/job/finding status, lists dogfood and GUI action artifact bundles, prepares a durable Epiphany checkpoint for a resumable operator thread, and exposes bounded buttons for status snapshots, coordinator plans, fixed modeling/verification/reorient launch and read-back, and explicit review-gated reorient acceptance.
|
||||
- `apps/epiphany-gui` is the first GUI shell: a Tauri v2 + React app that invokes the existing MVP status bridge, renders coordinator/CRRC/pressure/reorient/role/job/finding/planning status, lists dogfood and GUI action artifact bundles, prepares a durable Epiphany checkpoint for a resumable operator thread, and exposes bounded buttons for status snapshots, coordinator plans, fixed modeling/verification/reorient launch and read-back, explicit Objective Draft adoption, and explicit review-gated reorient acceptance.
|
||||
- Durable `job_bindings` now form a thin Epiphany-owned launcher seam: bindings can carry launcher identity, authority scope, backend kind, and backend job id while still supporting the older runtime-agent-job pointer as a compatibility alias.
|
||||
- `thread/epiphany/jobs` is a read-only job/progress reflection: it derives indexing, remap, verification, and specialist slots from authoritative state and retrieval summaries, and can overlay durable launcher bindings onto live runtime `agent_jobs` snapshots through the current backend adapter when a real owner exists; it is not a scheduler, notification stream, or durable runtime job table.
|
||||
- `thread/epiphany/jobsUpdated` is the first live bound-job progress notification: it translates runtime `agent_job_progress:{json}` background events into changed launcher-bound payloads by resolving durable `job_bindings` against live `agent_jobs` snapshots through the current backend adapter, without polling in a loop, mutating state, or scheduling work.
|
||||
|
|
@ -104,7 +104,7 @@ accepted_design:
|
|||
- `tools/epiphany_mvp_coordinator.py` is the first auditable coordinator runner: it drives the fixed single-user lanes through app-server APIs, may auto-launch modeling, verification, or reorient-worker jobs, keeps semantic findings review-gated by default, and writes coordinator summaries, JSONL steps, rendered snapshots, transcript, stderr, and final next-action artifacts.
|
||||
- Limited native CRRC automation is now wired only at turn-complete safe boundaries: it can submit a compact operation when the read-only coordinator recommends `compactRehydrateReorient` or when a successful pre-compaction checkpoint intervention left a pending compact handoff for the completed turn, and it can launch the fixed `reorient-worker` when the coordinator recommends `launchReorientWorker`. It does not auto-launch modeling or verification, auto-accept findings, promote evidence, edit implementation code, or continue after reviewable semantic results.
|
||||
- Pre-compaction checkpoint intervention is now wired at token-count boundaries: when a loaded Epiphany thread crosses the existing `shouldPrepareCompaction` pressure threshold during an active turn, the harness steers the active agent once for that turn with a bounded CRRC directive to bank scratch/checkpoint/map/evidence before compaction/reorientation. A successful steer marks a turn-scoped pending compact handoff consumed at clean turn completion; this is still steering plus compaction handoff, not semantic acceptance, broad scheduling, or automatic implementation continuation.
|
||||
- `tools/epiphany_mvp_status.py` is the first dogfood operator view: it starts or reads a thread through app-server and renders scene, pressure, reorient, jobs, role result read-backs, reorient result, CRRC recommendation, and MVP role lanes as text or JSON without becoming a state store.
|
||||
- `tools/epiphany_mvp_status.py` is the first dogfood operator view: it starts or reads a thread through app-server and renders scene, planning, pressure, reorient, jobs, role result read-backs, reorient result, CRRC recommendation, and MVP role lanes as text or JSON without becoming a state store.
|
||||
- `thread/epiphany/roles` is the first harness-native role ownership surface: it projects implementation, modeling/checkpoint, verification/review, and reorientation lanes from authoritative typed state, bound jobs, pressure/reorient/CRRC, and worker result status without launching, scheduling, accepting, compacting, or mutating state.
|
||||
- `thread/epiphany/roleLaunch` and `thread/epiphany/roleResult` are the first explicit role-scoped specialist templates: modeling/checkpoint and verification/review can be launched through fixed bindings over the existing job-control seam and read back as reviewable findings, while implementation stays owned by the main coding agent and reorientation stays on the CRRC-specific launch/result path.
|
||||
- `thread/epiphany/roleAccept` is the first review-gated role finding acceptance path: it currently accepts only completed modeling/checkpoint findings with a valid `statePatch`, applies only modeling-safe fields such as graphs/frontier/checkpoints/scratch/investigation checkpoint plus audit observation/evidence, and rejects verification or broad authority fields.
|
||||
|
|
@ -136,6 +136,7 @@ accepted_design:
|
|||
- The product architecture is three-pronged: Rider is the code view for human inspection of repo state, source tree, diffs, diagnostics, and code refs; Epiphany GUI is the agent dashboard for objectives, specialist lane state, logs/artifacts, persisted typed state, and graph/control-flow views; Unity is the runtime environment for pinned tests, probes, scene configuration, assets, shaders, and play/edit-mode evidence.
|
||||
- Epiphany needs a workspace-scoped planning substrate separate from the active objective: conversation captures, inbox, normalized backlog, roadmap streams, objective drafts, and explicit objective adoption are distinct states. The active objective remains the bounded run contract; chat and imported issues are planning inputs until reviewed and promoted. `notes/epiphany-planning-substrate.md` defines the product model, including GitHub Issues import semantics.
|
||||
- The first runtime planning slice is landed inside `EpiphanyThreadState`: typed captures, backlog items, roadmap streams, Objective Drafts, and GitHub source refs are revision-gated through `thread/epiphany/update`, rendered into prompts when present, and reflected read-only through `thread/epiphany/planning`.
|
||||
- The first GUI planning operator slice is landed: status collection includes `thread/epiphany/planning`, the Tauri/React dashboard renders planning summaries, captures, backlog, roadmap streams, and Objective Drafts, and the `adoptObjectiveDraft` GUI action requires an explicit selected draft before updating objective, subgoal, planning status, scratch, checkpoint, observation, evidence, and adoption artifacts.
|
||||
- The planning/future-shape role is Imagination: it can synthesize captures, backlog shape, roadmap streams, and Objective Drafts while Eyes scouts outside reality, but its output remains planning state until explicit human adoption.
|
||||
- Unity integration must be editor-resident, not text-archeology-only: scene files, prefabs, materials, shaders, ScriptableObjects, asset GUIDs, prefab overrides, and serialized component fields should be inspected through a Unity Editor package using Unity APIs, with narrow mutation preview/apply commands and artifact receipts.
|
||||
- The first resident Unity editor package now lives in the Aetheria branch `codex/epiphany-unity-editor-bridge`: `Assets/Editor/Epiphany/EpiphanyEditorBridge.cs` exposes editor-resident inspect, compilation, scene, prefab, serialized-object, and reference-search probes with JSON/Markdown artifacts. Epiphany's Unity bridge detects that package and plans named probe/test commands through `GameCult.Epiphany.Unity.EpiphanyEditorBridge.RunProbe`, while runtime execution remains blocked until the exact project-pinned Unity editor is present.
|
||||
|
|
@ -168,6 +169,7 @@ landed_baseline:
|
|||
- Phase 6 Unity runtime bridge: `tools/epiphany_unity_bridge.py` plus GUI Inspect Unity action resolve pinned Unity editors, reject wrong/missing versions, and write runtime artifacts before engine assumptions are treated as testable.
|
||||
- Planning substrate design: `notes/epiphany-planning-substrate.md` formalizes conversation capture, inbox, backlog, roadmap streams, objective drafts, explicit adoption, the Imagination planning role, and GitHub Issues import.
|
||||
- Phase 6 planning substrate runtime slice: typed planning state in `EpiphanyThreadState`, prompt rendering, revision-gated update validation, read-only `thread/epiphany/planning`, scene action reflection, generated schemas, and live planning smoke coverage.
|
||||
- Phase 6 GUI planning operator slice: MVP status and Tauri/React GUI now render planning state, and `tools/epiphany_gui_action.py` exposes explicit selected Objective Draft adoption with artifacted state patch/update proof.
|
||||
guardrails:
|
||||
- Use `tools/epiphany_phase5_smoke.py` before modifying update, distill, propose, promote, read-projection, or notification behavior.
|
||||
- Use `tools/epiphany_phase6_scene_smoke.py` before modifying scene projection behavior.
|
||||
|
|
@ -178,6 +180,7 @@ landed_baseline:
|
|||
- Use `tools/epiphany_phase6_context_smoke.py` before modifying targeted context-shard behavior.
|
||||
- Use `tools/epiphany_phase6_graph_query_smoke.py` before modifying graph traversal behavior.
|
||||
- Use `tools/epiphany_phase6_planning_smoke.py` before modifying planning state or the read-only planning projection.
|
||||
- Use `tools/epiphany_gui_planning_smoke.py` before modifying GUI Objective Draft adoption behavior.
|
||||
- Use `tools/epiphany_phase6_pressure_smoke.py` before modifying context-pressure reflection behavior.
|
||||
- Use `tools/epiphany_phase6_reorient_smoke.py` before modifying bounded CRRC reorientation policy behavior.
|
||||
- Use `tools/epiphany_phase6_reorient_launch_smoke.py` before modifying the bounded reorient-guided worker launch surface.
|
||||
|
|
@ -207,5 +210,5 @@ rejected_paths:
|
|||
reason: persistent state that accumulates every local truth becomes memory cruft and weakens rehydration
|
||||
|
||||
current_status:
|
||||
summary: Phase 1 durable state through Phase 6 GUI/coordinator/specialist/CRRC MVP surfaces are landed. The Aetheria supervised run found and fixed real harness wounds in coordinator policy, no-diff audits, stale job/result projection, and reorient acceptance. The Unity incident proved the next blocker is environment access, so `notes/epiphany-rider-unity-integration-plan.md` governs the Rider/Epiphany GUI/Unity workflow. The planning substrate is no longer just doctrine: typed captures, backlog items, roadmap streams, Objective Drafts, and GitHub source refs now live in Epiphany state, render into prompts, validate through revision-gated updates, and project through read-only `thread/epiphany/planning`.
|
||||
next_action: Build the GUI Planning view and explicit planning write/adoption flow over the landed read-only projection, then add the Imagination planning synthesis lane. Keep active objective adoption human-gated: captures, backlog items, roadmap streams, GitHub Issues, and Objective Drafts are planning material until explicitly adopted. After the planning loop is visible, return to the EpiphanyGraph dashboard, Rider context bridge, and Rider plugin MVP before another Aetheria implementation dogfood run.
|
||||
summary: Phase 1 durable state through Phase 6 GUI/coordinator/specialist/CRRC MVP surfaces are landed. The Aetheria supervised run found and fixed real harness wounds in coordinator policy, no-diff audits, stale job/result projection, and reorient acceptance. The Unity incident proved the next blocker is environment access, so `notes/epiphany-rider-unity-integration-plan.md` governs the Rider/Epiphany GUI/Unity workflow. Planning is now an operator-visible loop: typed captures, backlog items, roadmap streams, Objective Drafts, and GitHub source refs live in Epiphany state, render into prompts, validate through revision-gated updates, project through `thread/epiphany/planning`, render in the GUI, and can be explicitly adopted into the active objective through an artifacted GUI action.
|
||||
next_action: Add the Imagination planning synthesis lane so captures/backlog/roadmap material can produce reviewable Objective Drafts, then import GitHub Issues into planning captures. After the planning loop can synthesize and ingest work, return to the EpiphanyGraph dashboard, Rider context bridge, and Rider plugin MVP before another Aetheria implementation dogfood run.
|
||||
|
|
|
|||
|
|
@ -792,6 +792,259 @@ def state_revision(status: dict[str, Any]) -> int | None:
|
|||
return scene_revision if isinstance(scene_revision, int) else None
|
||||
|
||||
|
||||
def status_epiphany_state(status: dict[str, Any]) -> dict[str, Any]:
|
||||
state = first_present(
|
||||
status,
|
||||
("read", "thread", "epiphanyState"),
|
||||
("scene", "scene", "epiphanyState"),
|
||||
)
|
||||
return state if isinstance(state, dict) else {}
|
||||
|
||||
|
||||
def status_planning_state(status: dict[str, Any]) -> dict[str, Any]:
|
||||
planning_response = status.get("planning")
|
||||
if isinstance(planning_response, dict):
|
||||
planning = planning_response.get("planning")
|
||||
if isinstance(planning, dict):
|
||||
return planning
|
||||
state = status_epiphany_state(status)
|
||||
planning = state.get("planning")
|
||||
return planning if isinstance(planning, dict) else {}
|
||||
|
||||
|
||||
def planning_drafts(planning: dict[str, Any]) -> list[dict[str, Any]]:
|
||||
drafts = planning.get("objective_drafts") or planning.get("objectiveDrafts")
|
||||
if not isinstance(drafts, list):
|
||||
return []
|
||||
return [draft for draft in drafts if isinstance(draft, dict)]
|
||||
|
||||
|
||||
def planning_backlog_items(planning: dict[str, Any]) -> list[dict[str, Any]]:
|
||||
items = planning.get("backlog_items") or planning.get("backlogItems")
|
||||
if not isinstance(items, list):
|
||||
return []
|
||||
return [item for item in items if isinstance(item, dict)]
|
||||
|
||||
|
||||
def string_list(value: Any) -> list[str]:
|
||||
if not isinstance(value, list):
|
||||
return []
|
||||
return [str(item) for item in value if str(item).strip()]
|
||||
|
||||
|
||||
def objective_subgoal_id(draft_id: str) -> str:
|
||||
cleaned = "".join(
|
||||
char if char.isalnum() or char in {"-", "_", "."} else "-"
|
||||
for char in draft_id.strip()
|
||||
).strip("-")
|
||||
return f"objective-{cleaned or int(time.time())}"
|
||||
|
||||
|
||||
def update_or_append_subgoal(
|
||||
state: dict[str, Any],
|
||||
*,
|
||||
subgoal_id: str,
|
||||
title: str,
|
||||
summary: str,
|
||||
) -> list[dict[str, Any]]:
|
||||
raw_subgoals = state.get("subgoals")
|
||||
subgoals = deepcopy(raw_subgoals) if isinstance(raw_subgoals, list) else []
|
||||
subgoal = {
|
||||
"id": subgoal_id,
|
||||
"title": title,
|
||||
"status": "active",
|
||||
"summary": summary,
|
||||
}
|
||||
for index, item in enumerate(subgoals):
|
||||
if isinstance(item, dict) and item.get("id") == subgoal_id:
|
||||
subgoals[index] = {**item, **subgoal}
|
||||
return subgoals
|
||||
subgoals.append(subgoal)
|
||||
return subgoals
|
||||
|
||||
|
||||
def adoption_note_list(
|
||||
scratch: dict[str, Any],
|
||||
*,
|
||||
draft_id: str,
|
||||
acceptance_criteria: list[str],
|
||||
review_gates: list[str],
|
||||
) -> list[str]:
|
||||
notes = [
|
||||
f"Adopted Objective Draft {draft_id} from planning state.",
|
||||
"Acceptance criteria: "
|
||||
+ (", ".join(acceptance_criteria[:6]) if acceptance_criteria else "none recorded"),
|
||||
"Review gates: " + (", ".join(review_gates[:6]) if review_gates else "none recorded"),
|
||||
]
|
||||
existing = scratch.get("notes")
|
||||
if isinstance(existing, list):
|
||||
notes.extend(str(note) for note in existing if str(note).strip())
|
||||
return notes[:20]
|
||||
|
||||
|
||||
def adopted_investigation_checkpoint(
|
||||
state: dict[str, Any],
|
||||
*,
|
||||
artifact_dir: Path,
|
||||
evidence_id: str,
|
||||
draft_id: str,
|
||||
title: str,
|
||||
summary: str,
|
||||
) -> dict[str, Any]:
|
||||
existing = first_present(
|
||||
state,
|
||||
("investigation_checkpoint",),
|
||||
("investigationCheckpoint",),
|
||||
)
|
||||
checkpoint = existing if isinstance(existing, dict) else {}
|
||||
evidence_ids = string_list(
|
||||
checkpoint.get("evidence_ids") or checkpoint.get("evidenceIds")
|
||||
)
|
||||
if evidence_id not in evidence_ids:
|
||||
evidence_ids = [evidence_id, *evidence_ids]
|
||||
return {
|
||||
"checkpoint_id": str(
|
||||
checkpoint.get("checkpoint_id")
|
||||
or checkpoint.get("checkpointId")
|
||||
or f"objective-adoption-{int(time.time())}"
|
||||
),
|
||||
"kind": "objective_adoption",
|
||||
"disposition": "resume_ready",
|
||||
"focus": title,
|
||||
"summary": f"Human adopted Objective Draft {draft_id}: {summary}",
|
||||
"next_action": (
|
||||
"Run coordinator guidance from the adopted objective; launch modeling "
|
||||
"before implementation if the current graph/checkpoint is insufficient."
|
||||
),
|
||||
"captured_at_turn_id": f"objective-adoption-{artifact_dir.name}",
|
||||
"evidence_ids": evidence_ids,
|
||||
}
|
||||
|
||||
|
||||
def adopt_objective_draft_patch(
|
||||
status: dict[str, Any],
|
||||
*,
|
||||
draft_id: str,
|
||||
cwd: Path,
|
||||
artifact_dir: Path,
|
||||
) -> dict[str, Any]:
|
||||
if not draft_id.strip():
|
||||
raise ValueError("adoptObjectiveDraft requires --planning-draft-id")
|
||||
state = status_epiphany_state(status)
|
||||
planning = deepcopy(status_planning_state(status))
|
||||
if not planning:
|
||||
raise ValueError("adoptObjectiveDraft requires existing planning state")
|
||||
|
||||
draft_items = planning_drafts(planning)
|
||||
selected_draft: dict[str, Any] | None = None
|
||||
for draft in draft_items:
|
||||
if draft.get("id") == draft_id:
|
||||
selected_draft = draft
|
||||
break
|
||||
if selected_draft is None:
|
||||
raise ValueError(f"objective draft not found: {draft_id}")
|
||||
|
||||
draft_status = str(selected_draft.get("status") or "").strip().lower()
|
||||
if draft_status in {"adopted", "rejected", "superseded"}:
|
||||
raise ValueError(f"objective draft {draft_id} is {draft_status} and cannot be adopted")
|
||||
|
||||
title = str(selected_draft.get("title") or "").strip()
|
||||
summary = str(selected_draft.get("summary") or "").strip()
|
||||
if not title or not summary:
|
||||
raise ValueError(f"objective draft {draft_id} is missing title or summary")
|
||||
|
||||
generated_at = datetime.now(timezone.utc).isoformat()
|
||||
source_item_ids = string_list(
|
||||
selected_draft.get("source_item_ids") or selected_draft.get("sourceItemIds")
|
||||
)
|
||||
acceptance_criteria = string_list(
|
||||
selected_draft.get("acceptance_criteria")
|
||||
or selected_draft.get("acceptanceCriteria")
|
||||
)
|
||||
review_gates = string_list(
|
||||
selected_draft.get("review_gates") or selected_draft.get("reviewGates")
|
||||
)
|
||||
|
||||
for draft in draft_items:
|
||||
if draft.get("id") == draft_id:
|
||||
draft["status"] = "adopted"
|
||||
backlog_items = planning_backlog_items(planning)
|
||||
for item in backlog_items:
|
||||
if item.get("id") in source_item_ids and str(item.get("status", "")).lower() in {
|
||||
"ready",
|
||||
"triaged",
|
||||
"draft",
|
||||
}:
|
||||
item["status"] = "active"
|
||||
item["updated_at"] = generated_at
|
||||
|
||||
subgoal_id = objective_subgoal_id(draft_id)
|
||||
evidence_id = f"ev-objective-adoption-{artifact_dir.name}"
|
||||
observation_id = f"obs-objective-adoption-{artifact_dir.name}"
|
||||
scratch = deepcopy(state.get("scratch")) if isinstance(state.get("scratch"), dict) else {}
|
||||
scratch.update(
|
||||
{
|
||||
"summary": f"Adopted planning draft {draft_id} as the active objective: {summary}",
|
||||
"hypothesis": summary,
|
||||
"next_probe": (
|
||||
"Use coordinator/modeling guidance to strengthen the graph and "
|
||||
"checkpoint before implementation starts chasing this objective."
|
||||
),
|
||||
"notes": adoption_note_list(
|
||||
scratch,
|
||||
draft_id=draft_id,
|
||||
acceptance_criteria=acceptance_criteria,
|
||||
review_gates=review_gates,
|
||||
),
|
||||
}
|
||||
)
|
||||
|
||||
patch = {
|
||||
"objective": title,
|
||||
"activeSubgoalId": subgoal_id,
|
||||
"subgoals": update_or_append_subgoal(
|
||||
state,
|
||||
subgoal_id=subgoal_id,
|
||||
title=title,
|
||||
summary=summary,
|
||||
),
|
||||
"planning": planning,
|
||||
"scratch": scratch,
|
||||
"investigationCheckpoint": adopted_investigation_checkpoint(
|
||||
state,
|
||||
artifact_dir=artifact_dir,
|
||||
evidence_id=evidence_id,
|
||||
draft_id=draft_id,
|
||||
title=title,
|
||||
summary=summary,
|
||||
),
|
||||
"observations": [
|
||||
{
|
||||
"id": observation_id,
|
||||
"summary": (
|
||||
f"Objective Draft {draft_id} was explicitly adopted as the "
|
||||
"active implementation objective by the operator."
|
||||
),
|
||||
"source_kind": "planning",
|
||||
"status": "accepted",
|
||||
"evidence_ids": [evidence_id],
|
||||
}
|
||||
],
|
||||
"evidence": [
|
||||
{
|
||||
"id": evidence_id,
|
||||
"kind": "planning-adoption",
|
||||
"status": "accepted",
|
||||
"summary": (
|
||||
f"Human-gated planning adoption set active objective to {title!r}; "
|
||||
f"source items={', '.join(source_item_ids) or 'none'}; cwd={cwd}."
|
||||
),
|
||||
}
|
||||
],
|
||||
}
|
||||
return patch
|
||||
|
||||
|
||||
def require_thread_id(thread_id: str | None, action: str) -> str:
|
||||
if not thread_id:
|
||||
raise ValueError(f"{action} requires a persistent thread id")
|
||||
|
|
@ -858,7 +1111,32 @@ def run_action(args: argparse.Namespace) -> dict[str, Any]:
|
|||
before = collect_status(client, thread_id=thread_id, cwd=cwd, ephemeral=False)
|
||||
revision = state_revision(before)
|
||||
|
||||
if args.action in {"launchModeling", "launchVerification"}:
|
||||
if args.action == "adoptObjectiveDraft":
|
||||
if revision is None:
|
||||
raise ValueError(
|
||||
"adoptObjectiveDraft requires ready Epiphany state with a revision"
|
||||
)
|
||||
patch = adopt_objective_draft_patch(
|
||||
before,
|
||||
draft_id=args.planning_draft_id or "",
|
||||
cwd=cwd,
|
||||
artifact_dir=artifact_dir,
|
||||
)
|
||||
write_json(artifact_dir / "objective-adoption-state-patch.json", patch)
|
||||
response = client.send(
|
||||
"thread/epiphany/update",
|
||||
{
|
||||
"threadId": thread_id,
|
||||
"expectedRevision": revision,
|
||||
"patch": patch,
|
||||
},
|
||||
)
|
||||
write_json(artifact_dir / "objective-adoption-state-update.json", response)
|
||||
summary = (
|
||||
"Adopted reviewed Objective Draft "
|
||||
f"{args.planning_draft_id} as the active objective."
|
||||
)
|
||||
elif args.action in {"launchModeling", "launchVerification"}:
|
||||
role_id = "modeling" if args.action == "launchModeling" else "verification"
|
||||
payload: dict[str, Any] = {
|
||||
"threadId": thread_id,
|
||||
|
|
@ -1112,10 +1390,15 @@ def main() -> int:
|
|||
"launchReorient",
|
||||
"readReorientResult",
|
||||
"acceptReorient",
|
||||
"adoptObjectiveDraft",
|
||||
"continueImplementation",
|
||||
"prepareCheckpoint",
|
||||
],
|
||||
)
|
||||
parser.add_argument(
|
||||
"--planning-draft-id",
|
||||
help="Objective Draft id to adopt for adoptObjectiveDraft.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--force",
|
||||
action="store_true",
|
||||
|
|
|
|||
206
tools/epiphany_gui_planning_smoke.py
Normal file
206
tools/epiphany_gui_planning_smoke.py
Normal file
|
|
@ -0,0 +1,206 @@
|
|||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import json
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
from epiphany_phase5_smoke import AppServerClient
|
||||
from epiphany_phase5_smoke import DEFAULT_APP_SERVER
|
||||
from epiphany_phase5_smoke import ROOT
|
||||
from epiphany_phase5_smoke import require
|
||||
from epiphany_phase5_smoke import reset_smoke_paths
|
||||
from epiphany_phase6_planning_smoke import planning_patch
|
||||
|
||||
|
||||
DEFAULT_CODEX_HOME = ROOT / ".epiphany-smoke" / "gui-planning-codex-home"
|
||||
DEFAULT_ARTIFACT_ROOT = ROOT / ".epiphany-smoke" / "gui-planning-actions"
|
||||
DEFAULT_RESULT = ROOT / ".epiphany-smoke" / "gui-planning-smoke-result.json"
|
||||
DEFAULT_TRANSCRIPT = ROOT / ".epiphany-smoke" / "gui-planning-smoke-transcript.jsonl"
|
||||
DEFAULT_STDERR = ROOT / ".epiphany-smoke" / "gui-planning-smoke-server.stderr.log"
|
||||
DRAFT_ID = "draft-planning-dashboard"
|
||||
|
||||
|
||||
def find_draft(planning: dict[str, Any], draft_id: str) -> dict[str, Any]:
|
||||
drafts = planning.get("objective_drafts")
|
||||
require(isinstance(drafts, list), "planning should expose objective_drafts")
|
||||
for draft in drafts:
|
||||
if isinstance(draft, dict) and draft.get("id") == draft_id:
|
||||
return draft
|
||||
raise AssertionError(f"objective draft missing: {draft_id}")
|
||||
|
||||
|
||||
def find_backlog_item(planning: dict[str, Any], item_id: str) -> dict[str, Any]:
|
||||
items = planning.get("backlog_items")
|
||||
require(isinstance(items, list), "planning should expose backlog_items")
|
||||
for item in items:
|
||||
if isinstance(item, dict) and item.get("id") == item_id:
|
||||
return item
|
||||
raise AssertionError(f"backlog item missing: {item_id}")
|
||||
|
||||
|
||||
def run_gui_action(
|
||||
*,
|
||||
app_server: Path,
|
||||
codex_home: Path,
|
||||
artifact_root: Path,
|
||||
thread_id: str,
|
||||
cwd: Path,
|
||||
) -> dict[str, Any]:
|
||||
command = [
|
||||
sys.executable,
|
||||
str(ROOT / "tools" / "epiphany_gui_action.py"),
|
||||
"--app-server",
|
||||
str(app_server),
|
||||
"--codex-home",
|
||||
str(codex_home),
|
||||
"--artifact-root",
|
||||
str(artifact_root),
|
||||
"--cwd",
|
||||
str(cwd),
|
||||
"--thread-id",
|
||||
thread_id,
|
||||
"--action",
|
||||
"adoptObjectiveDraft",
|
||||
"--planning-draft-id",
|
||||
DRAFT_ID,
|
||||
]
|
||||
completed = subprocess.run(
|
||||
command,
|
||||
cwd=ROOT,
|
||||
capture_output=True,
|
||||
check=False,
|
||||
encoding="utf-8",
|
||||
errors="replace",
|
||||
)
|
||||
if completed.returncode != 0:
|
||||
raise RuntimeError(
|
||||
"GUI planning action failed:\n"
|
||||
f"stdout:\n{completed.stdout}\n\nstderr:\n{completed.stderr}"
|
||||
)
|
||||
return json.loads(completed.stdout)
|
||||
|
||||
|
||||
def run_smoke(args: argparse.Namespace) -> dict[str, Any]:
|
||||
app_server = args.app_server.resolve()
|
||||
if not app_server.exists():
|
||||
raise FileNotFoundError(f"codex app-server binary not found: {app_server}")
|
||||
|
||||
codex_home = args.codex_home.resolve()
|
||||
artifact_root = args.artifact_root.resolve()
|
||||
result_path = args.result.resolve()
|
||||
transcript_path = args.transcript.resolve()
|
||||
stderr_path = args.stderr.resolve()
|
||||
reset_smoke_paths(codex_home, result_path, transcript_path, stderr_path)
|
||||
if artifact_root.exists():
|
||||
shutil.rmtree(artifact_root)
|
||||
artifact_root.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
with AppServerClient(app_server, codex_home, transcript_path, stderr_path) as client:
|
||||
client.send(
|
||||
"initialize",
|
||||
{
|
||||
"clientInfo": {
|
||||
"name": "epiphany-gui-planning-smoke",
|
||||
"title": "Epiphany GUI Planning Smoke",
|
||||
"version": "0.1.0",
|
||||
},
|
||||
"capabilities": {"experimentalApi": True},
|
||||
},
|
||||
)
|
||||
client.send("initialized", expect_response=False)
|
||||
started = client.send("thread/start", {"cwd": str(ROOT), "ephemeral": False})
|
||||
assert started is not None
|
||||
thread_id = started["thread"]["id"]
|
||||
update = client.send(
|
||||
"thread/epiphany/update",
|
||||
{"threadId": thread_id, "expectedRevision": 0, "patch": planning_patch()},
|
||||
)
|
||||
assert update is not None
|
||||
require(update["revision"] == 1, "seed planning update should create revision 1")
|
||||
before_planning = client.send("thread/epiphany/planning", {"threadId": thread_id})
|
||||
assert before_planning is not None
|
||||
require(
|
||||
find_draft(before_planning["planning"], DRAFT_ID)["status"] == "draft",
|
||||
"seed draft should start as a draft",
|
||||
)
|
||||
|
||||
action_result = run_gui_action(
|
||||
app_server=app_server,
|
||||
codex_home=codex_home,
|
||||
artifact_root=artifact_root,
|
||||
thread_id=thread_id,
|
||||
cwd=ROOT,
|
||||
)
|
||||
artifact_path = Path(action_result["artifactPath"])
|
||||
require(artifact_path.exists(), "GUI action should write an artifact bundle")
|
||||
require(
|
||||
(artifact_path / "objective-adoption-state-patch.json").exists(),
|
||||
"adoption should write the state patch artifact",
|
||||
)
|
||||
require(
|
||||
(artifact_path / "objective-adoption-state-update.json").exists(),
|
||||
"adoption should write the state update artifact",
|
||||
)
|
||||
|
||||
after_status = json.loads((artifact_path / "after-status.json").read_text(encoding="utf-8"))
|
||||
state = after_status["read"]["thread"]["epiphanyState"]
|
||||
planning = after_status["planning"]["planning"]
|
||||
draft = find_draft(planning, DRAFT_ID)
|
||||
backlog_item = find_backlog_item(planning, "backlog-planning-dashboard")
|
||||
require(state["objective"] == "Build the planning dashboard slice", "draft title should become objective")
|
||||
require(
|
||||
state.get("activeSubgoalId") or state.get("active_subgoal_id"),
|
||||
"adoption should set an active subgoal id",
|
||||
)
|
||||
require(draft["status"] == "adopted", "adopted draft should be marked adopted")
|
||||
require(backlog_item["status"] == "active", "source backlog item should be marked active")
|
||||
require(
|
||||
after_status["planning"]["summary"]["activeObjective"]
|
||||
== "Build the planning dashboard slice",
|
||||
"planning summary should reflect the adopted active objective",
|
||||
)
|
||||
require(
|
||||
"Adopted reviewed Objective Draft" in action_result["summary"],
|
||||
"GUI action summary should describe objective adoption",
|
||||
)
|
||||
|
||||
result = {
|
||||
"threadId": thread_id,
|
||||
"codexHome": str(codex_home),
|
||||
"artifactPath": str(artifact_path),
|
||||
"objective": state["objective"],
|
||||
"activeSubgoalId": state.get("activeSubgoalId") or state.get("active_subgoal_id"),
|
||||
"draftStatus": draft["status"],
|
||||
"backlogStatus": backlog_item["status"],
|
||||
"summary": action_result["summary"],
|
||||
}
|
||||
result_path.parent.mkdir(parents=True, exist_ok=True)
|
||||
result_path.write_text(
|
||||
json.dumps(result, indent=2, ensure_ascii=False) + "\n",
|
||||
encoding="utf-8",
|
||||
)
|
||||
return result
|
||||
|
||||
|
||||
def main() -> int:
|
||||
parser = argparse.ArgumentParser(
|
||||
description="Live-smoke the GUI planning Objective Draft adoption action."
|
||||
)
|
||||
parser.add_argument("--app-server", type=Path, default=DEFAULT_APP_SERVER)
|
||||
parser.add_argument("--codex-home", type=Path, default=DEFAULT_CODEX_HOME)
|
||||
parser.add_argument("--artifact-root", type=Path, default=DEFAULT_ARTIFACT_ROOT)
|
||||
parser.add_argument("--result", type=Path, default=DEFAULT_RESULT)
|
||||
parser.add_argument("--transcript", type=Path, default=DEFAULT_TRANSCRIPT)
|
||||
parser.add_argument("--stderr", type=Path, default=DEFAULT_STDERR)
|
||||
args = parser.parse_args()
|
||||
result = run_smoke(args)
|
||||
print(json.dumps(result, indent=2, ensure_ascii=False))
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
|
|
@ -115,6 +115,7 @@ def collect_status(
|
|||
reorient = client.send("thread/epiphany/reorient", {"threadId": thread_id})
|
||||
jobs = client.send("thread/epiphany/jobs", {"threadId": thread_id})
|
||||
roles = client.send("thread/epiphany/roles", {"threadId": thread_id})
|
||||
planning = client.send("thread/epiphany/planning", {"threadId": thread_id})
|
||||
role_results = {
|
||||
"modeling": client.send(
|
||||
"thread/epiphany/roleResult", {"threadId": thread_id, "roleId": "modeling"}
|
||||
|
|
@ -135,6 +136,7 @@ def collect_status(
|
|||
"reorient": reorient,
|
||||
"jobs": jobs,
|
||||
"roles": roles,
|
||||
"planning": planning,
|
||||
"roleResults": role_results,
|
||||
"reorientResult": reorient_result,
|
||||
"crrc": crrc,
|
||||
|
|
@ -152,6 +154,10 @@ def render_status(status: dict[str, Any]) -> str:
|
|||
result = status["reorientResult"]
|
||||
crrc = status["crrc"]
|
||||
roles = status["roles"]["roles"]
|
||||
planning_response = status.get("planning") or {}
|
||||
planning_summary = planning_response.get("summary") or {}
|
||||
planning_state = planning_response.get("planning") or {}
|
||||
objective_drafts = planning_state.get("objective_drafts") or []
|
||||
role_results = status.get("roleResults") or {}
|
||||
recommendation = crrc["recommendation"]
|
||||
coordinator = status.get("coordinator") or {}
|
||||
|
|
@ -187,6 +193,39 @@ def render_status(status: dict[str, Any]) -> str:
|
|||
]
|
||||
)
|
||||
|
||||
lines.extend(
|
||||
[
|
||||
"",
|
||||
"Planning",
|
||||
(
|
||||
f"- state: {maybe(planning_response.get('stateStatus'))} rev "
|
||||
f"{maybe(planning_response.get('stateRevision'))}"
|
||||
),
|
||||
(
|
||||
f"- captures: {maybe(planning_summary.get('captureCount'), '0')} "
|
||||
f"(pending {maybe(planning_summary.get('pendingCaptureCount'), '0')}, "
|
||||
f"github {maybe(planning_summary.get('githubIssueCaptureCount'), '0')})"
|
||||
),
|
||||
(
|
||||
f"- backlog: {maybe(planning_summary.get('backlogItemCount'), '0')} "
|
||||
f"(ready {maybe(planning_summary.get('readyBacklogItemCount'), '0')})"
|
||||
),
|
||||
(
|
||||
f"- roadmap streams: {maybe(planning_summary.get('roadmapStreamCount'), '0')}; "
|
||||
f"objective drafts: {maybe(planning_summary.get('objectiveDraftCount'), '0')} "
|
||||
f"(draft {maybe(planning_summary.get('draftObjectiveCount'), '0')})"
|
||||
),
|
||||
f"- active objective: {maybe(planning_summary.get('activeObjective'))}",
|
||||
f"- note: {maybe(planning_summary.get('note'))}",
|
||||
]
|
||||
)
|
||||
if objective_drafts:
|
||||
draft = objective_drafts[0]
|
||||
lines.append(
|
||||
f"- first draft: {maybe(draft.get('id'))} / {maybe(draft.get('status'))} - "
|
||||
f"{maybe(draft.get('title'))}"
|
||||
)
|
||||
|
||||
lines.extend(
|
||||
[
|
||||
"",
|
||||
|
|
|
|||
|
|
@ -76,6 +76,15 @@ def run_smoke(args: argparse.Namespace) -> dict[str, object]:
|
|||
status["roles"]["note"].startswith("Role ownership is derived read-only"),
|
||||
"roles surface should declare read-only derived ownership",
|
||||
)
|
||||
require(
|
||||
status["planning"]["stateStatus"] == "missing"
|
||||
and status["planning"]["summary"]["captureCount"] == 0,
|
||||
"fresh status smoke should expose empty planning state honestly",
|
||||
)
|
||||
require(
|
||||
"Planning" in rendered and "captures: 0" in rendered,
|
||||
"rendered status should expose the planning section",
|
||||
)
|
||||
require(
|
||||
"Role Lanes" in rendered and "Verification / Review" in rendered,
|
||||
"rendered status should expose the role lane section",
|
||||
|
|
@ -92,6 +101,7 @@ def run_smoke(args: argparse.Namespace) -> dict[str, object]:
|
|||
"recommendation": status["crrc"]["recommendation"],
|
||||
"roles": status["roles"],
|
||||
"roleResults": status["roleResults"],
|
||||
"planning": status["planning"],
|
||||
"stateStatus": status["scene"]["scene"]["stateStatus"],
|
||||
"availableActions": status["scene"]["scene"]["availableActions"],
|
||||
"rendered": rendered,
|
||||
|
|
|
|||
Reference in a new issue