diff --git a/docs/ROADMAP.org b/docs/ROADMAP.org index 3bec676..dd6583f 100644 --- a/docs/ROADMAP.org +++ b/docs/ROADMAP.org @@ -1063,50 +1063,50 @@ The v0.5.0 file reorganization produced ~100 compilation warnings and 2 real err Rationale: Passepartout already has the infrastructure for time awareness — timestamped memory (v0.1.0), heartbeat+cron (v0.3.0), and foveal-peripheral context pruning (v0.2.0). Adding time awareness costs ~175 lines of Lisp and unlocks three layers that no competitor provides. The temporal dimension is the missing axis in the foveal-peripheral model: prune in time as well as in semantic space. -*** TODO Time Awareness — Level 2: temporal memory filtering +*** DONE Time Awareness — Level 2: temporal memory filtering :PROPERTIES: :ID: id-v060-time-memory :CREATED: [2026-05-07 Thu] :END: +:LOGBOOK: +- State "DONE" from "TODO" [2026-05-08 Thu] +:END: -Rationale: ~memory-object-version~ has been set to ~get-universal-time~ on every ingest since v0.1.0. Every memory node carries a timestamp. But ~context-query~ has no time filter — "what did I work on today?" serializes all nodes to the LLM instead of filtering 500→12 in sub-millisecond Lisp. +- ~org/symbolic-time-memory.org~ → ~lisp/symbolic-time-memory.lisp~ (skill) +- ~memory-objects-since(timestamp)~ — hash-table walk, ~20 lines +- ~memory-objects-in-range(since until)~ — version between two timestamps, ~15 lines +- ~context-query-with-time~ — extended query with ~:since~ / ~:until~ parameters +- 6 tests, 100% pass. Pure Lisp, sub-millisecond, 0 LLM tokens. -- ~memory-objects-since(timestamp)~ in ~core-memory.lisp~: hash-table walk returning objects with ~version >= timestamp~. ~20 lines. -- ~memory-objects-in-range(since until)~ in ~core-memory.lisp~: version between two timestamps. ~15 lines. -- Extend ~context-query~ in ~symbolic-awareness.lisp~ with ~:since~ and ~:until~ keyword parameters. ~10 lines. -- Pure Lisp, sub-millisecond, 0 LLM tokens. ~90% token reduction on time-scoped memory queries. -- FiveAM test: ingest 3 nodes at T0, sleep, ingest 2 nodes at T1, verify ~memory-objects-since(T1)~ returns exactly 2. - -*** TODO Time Awareness — Level 3: ~sensor-time~ skill +*** DONE Time Awareness — Level 3: ~sensor-time~ skill :PROPERTIES: :ID: id-v060-sensor-time :CREATED: [2026-05-07 Thu] :END: +:LOGBOOK: +- State "DONE" from "TODO" [2026-05-08 Thu] +:END: -Rationale: The heartbeat fires every 60 seconds for maintenance tasks. It can also carry temporal awareness — scanning for approaching deadlines, tracking session duration, and injecting temporal context so the LLM knows "3 deadlines today: Submit report (45min)" without triggering a call. This turns "what should I do today?" from a 1,500–4,000 token LLM call into a 0-token pre-loaded context answer. +- ~org/sensor-time.org~ → ~lisp/sensor-time.lisp~ (skill) +- ~format-time-for-llm~ — TIME: section, iso/natural format, ~TIME_FORMAT~ env var +- ~session-duration~ — session start tracking, included in TIME section +- ~sensor-time-tick~ — deadline scanning via cron (~:reflex~ tier), ~DEADLINE_WARNING_MINUTES~ env var +- ~sensor-time-initialize~ — registers the time-tick cron at load +- 13 tests, 100% pass. All pure Lisp, 0 LLM tokens for temporal awareness. -- New skill: ~sensor-time.org~ → ~sensor-time.lisp~. ~120 lines. -- Session tracking: record session start time at load. Expose ~(session-duration)~. -- Cron-registered heartbeat tick: ~orchestrator-register-cron "time-tick"~ with ~:action sensor-time-tick~, ~:tier :reflex~ (no LLM), ~:repeat "+1m"~. -- Deadline scanning on tick: query memory for headlines with ~:DEADLINE~ or ~:SCHEDULED~ properties. If within ~DEADLINE_WARNING_MINUTES~ (env var, default 60), inject deadline note into awareness context. -- Deadline context note format: ~"3 deadlines approaching: Submit report (45min), Review PR (2h), Call mom (3h)."~ -- ~TUI status bar~: add session duration and deadline count to the status bar (reuse existing gate-trace / focus-map rendering from v0.4.0). -- FiveAM test: set deadline 30 minutes from now, fire tick, verify deadline appears in awareness context. - -*** TODO Time Awareness — Level 1: timestamp in system prompt +*** DONE Time Awareness — Level 1: timestamp in system prompt :PROPERTIES: :ID: id-v060-time-prompt :CREATED: [2026-05-07 Thu] :END: +:LOGBOOK: +- State "DONE" from "TODO" [2026-05-08 Thu] +:END: -Rationale: The system prompt currently has IDENTITY, TOOLS, CONTEXT, LOGS. No TIME. The LLM cannot answer "what time is it?" or contextualize deadlines correctly. Adding a timestamp costs ~8 incremental tokens and eliminates guessing, time-check tool calls, and preamble hedging. Combined with session duration from Level 3, the LLM knows "2026-05-07 Thu 14:32:17 UTC. Session: 3h 12m." - -- ~format-time-for-llm~ function: returns human-readable date + time + optional session duration. Uses ~multiple-value-bind~ with ~decode-universal-time~. ~15 lines. -- Inject into ~think()~'s system prompt format string in ~core-reason.lisp~: add ~TIME:~ section between IDENTITY and TOOLS. ~5 lines. -- ~TIME_AWARENESS~ env var (default ~true~) in ~.env.example~. When ~false~, timestamp omitted. -- ~TIME_FORMAT~ env var (default ~iso~): ~iso~ = ~2026-05-07T14:32:17Z~, ~natural~ = ~2:32 PM UTC, Thursday May 7, 2026~. -- Session duration from ~session-duration~ function in ~sensor-time~ skill (Level 3). If skill not loaded, omit duration, show time only. -- FiveAM test: ~format-time-for-llm~ returns string containing current year and UTC; with ~TIME_AWARENESS=false~ returns empty string. +- ~core-reason.lisp~: TIME section injected at top of system prompt via ~fboundp~ guard +- Uses ~format-time-for-llm~ from sensor-time skill, falls back gracefully when skill not loaded +- ~TIME_AWARENESS~ / ~TIME_FORMAT~ env vars respected +- Session duration included when sensor-time skill provides ~session-duration~ ** v0.7.0: TUI Essentials — Terminal Parity