The ai.Coach interface gains a grounding parameter carrying standing
context about the user (the knowledge port). buildPrompt injects an
"About the user" block only when grounding is non-empty, so an empty
grounding produces a byte-for-byte unchanged prompt. Drift judge and
nudge are untouched.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The knowledge.Source port answers "who am I; what are my priorities?".
The FileSource adapter reads one profile file (path selectable per call),
treats a missing/blank file as absent (not an error), and caps the text.
Leaf package mirroring tasks.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The planning view renders Marvin's today list as clickable chips;
clicking one fills the intent field, feeding the existing coach flow.
idle/error/empty render nothing, pending shows a quiet loading line.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
main constructs the Marvin adapter (command overridable via
ANTIDRIFT_MARVIN_CMD) and injects it. Adds a web test asserting the
planning state payload carries today's tasks.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Exercises the generation/left-planning guard in startTasksFetchLocked
via the fakeProvider gate: a fetch in flight when its generation is
superseded must not clobber the current tasks state.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The controller fetches the Marvin task list when entering planning,
mirroring the planning coach: generation-guarded goroutine, status enum
(idle/pending/ready/error), projected into State only while planning and
only when a provider is set. nil provider degrades to no tasks view.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The tasks.Provider port answers "what should I be doing?". The Marvin
adapter shells out to ampy's `am --json` and parses today's open tasks,
dropping done/empty-title entries. Leaf package mirroring ai.
Co-Authored-By: Claude Opus 4.8 <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 window-manager status bar can now read a single-line status file: a
glyph plus minutes-remaining (● 24m / ⚠ DRIFT 24m / ● 24m ·? / ◔ planning
/ ✓ review), empty when idle. Rewritten on a one-minute tick, only when
the line changes, and removed on shutdown. Degrades to no file if $HOME
is unresolvable.
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>
Addresses code-review follow-ups: codex now returns a specific error when
its -o file is empty rather than degrading to ErrEmptyResponse downstream;
CLI errors omit a dangling stderr suffix when stderr is empty.
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>