Brainstormed design for Keel's first cross-run memory: a thin memory.Store
port backed by an internal/aw REST client writing to the keel.events bucket,
with off-screen as the single wired consumer (records proposal_made /
action_taken / proposal_dismissed and reads its recent history back into the
brief for fresher, follow-up-aware proposals). Brain-only, best-effort,
degrades to nop when AW is down. Realizes keel-architecture.md §5/§7 at the
smallest honest vertical.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Loosen AntiDrift's session controller into Keel's general collect→brain→act
loop. A new internal/harness runs at most one mode.Mode at a time, fanning
async completions out to the web SSE and status-bar surfaces.
- internal/mode: the Mode contract (Kind/Command/View/Active) plus optional
EvidenceConsumer and Expirer ports, and the surfacing Envelope.
- internal/mode/focus: the former session/domain/statemachine packages moved
under the mode, now satisfying the harness contracts unchanged.
- internal/mode/offscreen: a one-shot away-from-desk mode built on the new
ai.Proposer, which turns a life-domain brief into one off-screen action.
- cmd/keeld replaces cmd/antidriftd; daemon wires focus + offscreen factories
with per-mode persistence under ~/.keel/modes/<kind>.
- Finish the rename: KEEL_* env refs in the README, /keeld build artifact
ignored, stale antidriftd binary removed.
Include the design + implementation plan this refactor was built from under
docs/superpowers/{specs,plans}/2026-06-04-controller-refactor*.md.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Full-parity design: evidence.Source (polling) and enforce.Guard
(ShowWindow) behind the existing X11/no-op port boundaries, pure Go,
verified compile-only.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Closes the one coverage gap from the final review: the spec's
'one async call per session' efficiency claim is now directly
verified via the reviewer call count, not just implied. Also drops a
stale CarryForward-preview mention from the Review projection in the
design spec to match the shipped (cleaner) behaviour.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Design for the tasks.Provider port: an Amazing Marvin adapter shelling
out to `am --json`, today's tasks seeding the planning intent field.
Read-only, no writeback, graceful degradation — mirrors the ai port.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
State-driven accent HUD, stacked bands, CSS/JS split out of the inline
HTML, polished presentational review recap. No behavior changes.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
A soft nudge advisory belongs to one continuous on-task stretch in an allowed
app. Guard it with an on-task-stretch epoch (advanced on session reset and on
any non-on-task-match observation) instead of a session-only counter, and clear
the advisory on leaving the allowed app, so a stale 'Heads up' never resurfaces
after a drift episode.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Make the OS-level "gate → plan → work → reflect → gate" loop the explicit
destination. Promote the deferred AI reviewer into the loop as M7 (Reflection),
and reframe enforcement as M8 (Enforcement & gate) building toward the Guard
checking for a declared intention before the machine is usable — kept as the
last, heaviest milestone.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The activity port (evidence.Source + X11 adapter + fake), a two-tier
evidence store (disposable per-session raw log + permanent hash-chained
session summaries), live SSE evidence updates, and crash-recovery replay.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add the hexagonal architecture section (skeleton/nervous-system/cortex
layering), name the tasks/knowledge/enforce ports as deferred, and extend
the roadmap with M5-M7. Clarifies that the state machine owns transitions
and the LLM advises within the rails.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>