Commit Graph

168 Commits

Author SHA1 Message Date
felixm 8b7bec1173 Fetch today's tasks asynchronously on entering planning
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>
2026-05-31 22:02:28 -04:00
felixm 569264be11 Add tasks port and Amazing Marvin adapter
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>
2026-05-31 21:59:00 -04:00
felixm 267eda59e6 Add M5 tasks-port design spec
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>
2026-05-31 21:50:15 -04:00
felixm 6b2a96620c M4: drop stale plan-task reference from CSS comment
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 21:16:11 -04:00
felixm 51cb09c520 M4: presentational review recap
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 21:13:04 -04:00
felixm f5da12362a M4: cockpit HUD with state-driven accent
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 21:10:03 -04:00
felixm 76816ae188 M4: split web UI assets into app.css and app.js
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 21:05:34 -04:00
felixm 93e779348c M4: add look-good implementation plan
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 21:03:34 -04:00
felixm c807a72623 Spec M4: cockpit-style web UI design pass
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>
2026-05-31 20:57:32 -04:00
felixm 097678e839 Mirror runtime status to ~/.antidrift_status
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>
2026-05-31 20:49:48 -04:00
felixm 19654c2b57 Align M3.5 design doc with the nudgeEpoch guard
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 18:52:01 -04:00
felixm 622a1cd401 Tie nudge validity to the on-task stretch
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>
2026-05-31 18:20:22 -04:00
felixm 9dd0bb934e Wire the semantic nudge into the daemon and document M3.5
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 18:11:42 -04:00
felixm 20a102b4a4 Add dismiss-only Heads up tier for semantic nudges
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 18:10:03 -04:00
felixm 97577c003f Assert semantic nudge reaches the state payload
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 18:08:51 -04:00
felixm b43ba5179d Orchestrate semantic nudge on the on-task path
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 18:07:31 -04:00
felixm b96319d847 Add ai.Nudger role for semantic drift within allowed apps
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 17:57:20 -04:00
felixm 4e5e1f3881 Plan M3.5 semantic nudge implementation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 17:52:31 -04:00
felixm 5818d401c3 Design M3.5 semantic nudge within allowed apps
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 17:44:30 -04:00
felixm 7621093eef Document M3 drift interceptor in README
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 17:23:31 -04:00
felixm fefa72b909 Wire drift judge into the daemon alongside the coach
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 17:23:05 -04:00
felixm f73bb21c80 Add allowed-apps field and active-view drift interrupt UI
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 17:21:12 -04:00
felixm 6ca796dee3 Add /refocus and /ontask routes and carry allowed classes
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 17:18:25 -04:00
felixm 4e7676560d Wire debounced cached async drift judgment into RecordWindow
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 17:16:59 -04:00
felixm 2977b903c2 Add drift state, persistence, and override controls to controller
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 16:53:23 -04:00
felixm 75d31b5fa8 Extend coach proposal with allowed window classes
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 16:49:06 -04:00
felixm 83bae00e45 Add DriftJudge AI role with verdict parsing
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 16:45:59 -04:00
felixm 7e9d00b80b Port allowed-context matching to evidence package
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 16:42:48 -04:00
felixm fccf856054 Add M3 drift interceptor implementation plan
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 16:39:08 -04:00
felixm 4e167744a0 Add M3 drift interceptor design spec
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 16:27:50 -04:00
felixm 571a97e0e2 M2: mark AI planning coach milestone done
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 14:22:08 -04:00
felixm b51ad45c10 M2: wire planning coach backend into the daemon with graceful fallback
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 14:21:37 -04:00
felixm c61c9d46b1 M2: planning-view Sharpen control with non-clobbering coach updates
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 14:20:39 -04:00
felixm 38a62e4c68 M2: POST /coach route wiring the planning coach
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 14:19:12 -04:00
felixm 463ac4f23c M2: controller async coach with generation guard and ephemeral state
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 14:16:28 -04:00
felixm 25a33f027a M2: surface codex empty-output and clean CLI error messages
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>
2026-05-31 14:14:04 -04:00
felixm 3148fdfa92 M2: ai claude and codex CLI backends with selector
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 14:11:57 -04:00
felixm dea8e6ba78 M2: ai Coach interface and Service over a pluggable Backend
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 14:10:49 -04:00
felixm 5545a4e1cd M2: ai Proposal type, JSON extraction and validation
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 14:09:21 -04:00
felixm ae5a0f123c Add M2 AI planning coach implementation plan
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 13:47:31 -04:00
felixm b2104f6442 Pin M2 spec to verified claude/codex CLI invocations
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 13:39:10 -04:00
felixm 332e17d742 Add M2 AI planning coach design spec
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 13:33:37 -04:00
felixm cd5d69dec5 Reframe roadmap around the gate-first focus loop
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>
2026-05-31 13:22:03 -04:00
felixm 1d281ad528 M1: mark evidence & audit milestone done in README
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 12:58:54 -04:00
felixm ed5085ab6b M1: make evidence tests race-clean
Rewrite TestFakeSourceEmits to synchronize through a channel (it now
asserts emission instead of racing on a shared slice and discarding it).
Skip the live X11 smoke test under -race: xgbutil's event loop has an
internal Quit/Quitting race on shutdown that is never reached in
production (Watch runs under a never-cancelled context.Background()).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 12:57:50 -04:00
felixm f286609ec0 M1: render evidence (current window, buckets, switches) in UI
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 12:55:43 -04:00
felixm b5c3f883b7 M1: start active-window sensor wired to the controller
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 12:54:31 -04:00
felixm 63418d106f M1: broadcast focus updates, expiry uses Expire outcome
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 12:52:55 -04:00
felixm df384afb7c M1: controller evidence stats, accumulation, replay, audit-at-End
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 12:49:19 -04:00
felixm 1646321d0b M1: X11 active-window adapter + platform fallback
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-05-31 12:44:25 -04:00