Skip to content

feat(goals): autopilot progress stepper on goal detail page#1146

Open
psdjungpulzze wants to merge 3 commits into
mainfrom
feat/goal-autopilot-stepper
Open

feat(goals): autopilot progress stepper on goal detail page#1146
psdjungpulzze wants to merge 3 commits into
mainfrom
feat/goal-autopilot-stepper

Conversation

@psdjungpulzze

Copy link
Copy Markdown
Contributor

What

Adds a four-stage autopilot progress stepper to the top of the engine goal-detail surface: Scoping → Building → Review → Delivered. A human can now read at a glance where the daemon fleet is driving the goal, instead of inferring it from scattered badges.

![stages] done = green check · current = amber spinner · upcoming = muted ordinal

How

  • src/lib/engine/goal-autopilot.ts — new pure, dependency-free derivation deriveAutopilotProgress. It ranks the in-flight stage from the same rollups the page already renders (goal status, an in-flight planning task, completion, review-readiness / ready-to-deliver), so the ribbon can never disagree with the badges and rollup cards below it. Mirrors goal-ready.ts's single-predicate, client-bundle-safe pattern (no @/lib/db import).
    • accepted ⇒ every stage done.
    • cancelled ⇒ autopilot stopped: reached stages done, the rest upcoming, none current.
  • goals/goal-autopilot-stepper.tsx — new presentational component re-using the task-progress-panel step vocabulary (done green / current amber / upcoming muted). Horizontal on sm+, stacked on mobile. Re-renders for free on the detail client's existing live refetch (it's just props).
  • engine-goal-detail-client.tsx — derives the progress from the fields already in scope and renders the ribbon between the header and the rollup cards.

Tests

  • goal-autopilot.test.ts — 8 cases covering every stage transition (scoping → building → review), the empty/unscoped goal, completion-without-explicit-review, and both terminal states (accepted, cancelled).
  • npm run typecheck clean; eslint clean on all touched files; existing goal-detail.test.ts still green.

Agent config

No PM-agent update needed — this is purely presentational and adds no tool, data, or workflow the agent surfaces (per CLAUDE.md's AI Agent Maintenance rule).

🤖 Generated with Claude Code

psdjungpulzze and others added 3 commits June 16, 2026 23:02
Add a four-stage autopilot lifecycle ribbon (Scoping → Building → Review
→ Delivered) to the top of the engine goal-detail surface, so a human can
read at a glance where the daemon fleet is driving the goal.

- New pure, client-bundle-safe derivation `deriveAutopilotProgress`
  (goal-autopilot.ts) ranks the in-flight stage from the SAME rollups the
  page already renders (status, in-flight planning task, completion,
  review-readiness / ready-to-deliver) — so the ribbon can never disagree
  with the badges + cards below it. Mirrors goal-ready.ts's single-predicate
  pattern. Accepted => all done; cancelled => stopped (reached stages done,
  rest upcoming, none current).
- New presentational `GoalAutopilotStepper` re-using the task-progress-panel
  step vocabulary (done = green check, current = amber spinner, upcoming =
  muted ordinal). Re-renders for free on the detail client's live refetch.
- Unit tests cover every stage transition + the two terminal states.

No agent-config update needed: purely presentational, adds no tool, data,
or workflow the PM agent surfaces.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…eview→Deliver→Done)

Review rework: the stepper merged Deliver and Done into one "Delivered"
stage, and readyToDeliver was OR'd into reviewReady so a PR-ready,
deploy-gate-passed goal rendered Review as current instead of Deliver.

- goal-autopilot.ts: STEP_META now has 5 entries (scoping, building,
  review, deliver, done); AutopilotProgressInput carries reviewReady and
  readyToDeliver as distinct signals; activeStageIndex returns 3 (Deliver)
  on readyToDeliver, 2 (Review) on reviewReady/completion. Done is terminal
  (only "done" on accepted, never "current").
- engine-goal-detail-client.tsx: pass reviewReady (reviewReadiness.ready)
  and readyToDeliver separately instead of OR-ing them.
- goal-autopilot-stepper.tsx: header comment updated to five stages.
- goal-autopilot.test.ts: add Deliver scenario (Deliver=current/Review=done)
  and exactly-one-current test; update lifecycle-order + Review assertions.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…test collision

The presentational stepper renders every step's description unconditionally,
so the Deliver step's 'Ready to deliver — waiting on your accept.' string
matched queryByText(/ready to deliver/i) in three cue tests that assert the
phrase is ABSENT on non-ready/accepted goals. Reword to 'Waiting on your
accept-stamp to ship.' — same meaning, no verbatim cue phrase. Full suite green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant