passepartout: v0.6.0 — Time Awareness
Level 2: symbolic-time-memory skill - memory-objects-since(timestamp) — hash-table walk, objects with version >= timestamp - memory-objects-in-range(since until) — version between two timestamps - context-query-with-time — extended query with :since :until - 6 tests, 100% pass Level 3: sensor-time skill - format-time-for-llm — TIME: section for system prompt (iso/natural format) - session-duration — session start tracking - sensor-time-tick — deadline scanning, cron-registered, 0 LLM tokens - TIME_AWARENESS / TIME_FORMAT / DEADLINE_WARNING_MINUTES env vars - 13 tests, 100% pass Level 1: TIME injection in think() (core-reason) - fboundp-guarded call to format-time-for-llm - session duration included when sensor-time skill loaded - Injected at top of system prompt in both token-economics and fallback paths Full suite: 135/135 (100%)
This commit is contained in:
@@ -255,6 +255,12 @@ each cascade call via ~cost-track-backend-call~. All four calls are
|
||||
(when (and text (stringp text) (> (length text) 0))
|
||||
(setf out (concatenate 'string out text (string #\Newline))))))
|
||||
(when (> (length out) 0) out)))
|
||||
(time-section (if (fboundp 'sensor-time-duration) ; v0.6.0: temporal awareness
|
||||
(format-time-for-llm
|
||||
:session-duration-seconds (funcall (symbol-function 'session-duration)))
|
||||
(if (fboundp 'format-time-for-llm)
|
||||
(format-time-for-llm)
|
||||
"")))
|
||||
(system-prompt (if (fboundp 'prompt-prefix-cached)
|
||||
;; v0.5.0: cached prefix with optional budget enforcement
|
||||
(let* ((prefix (prompt-prefix-cached assistant-name reflection-feedback
|
||||
@@ -265,12 +271,13 @@ each cascade call via ~cost-track-backend-call~. All four calls are
|
||||
raw-prompt standing-mandates-text)
|
||||
(declare (ignore _))
|
||||
(setf standing-mandates-text mandates)
|
||||
(format nil "~a~%~%CONTEXT:~%~a~%~%LOGS:~%~a"
|
||||
pfx (or ctxt "") logs))
|
||||
(format nil "~a~%~%CONTEXT:~%~a~%~%LOGS:~%~a"
|
||||
prefix (or global-context "") system-logs)))
|
||||
(format nil "~a~%~%~a~%~%CONTEXT:~%~a~%~%LOGS:~%~a"
|
||||
time-section pfx (or ctxt "") logs))
|
||||
(format nil "~a~%~%~a~%~%CONTEXT:~%~a~%~%LOGS:~%~a"
|
||||
time-section prefix (or global-context "") system-logs)))
|
||||
;; Fallback when token-economics not loaded
|
||||
(format nil "IDENTITY: ~a~a~a~%~%TOOLS:~%~a~%~%CONTEXT:~%~a~%~%LOGS:~%~a"
|
||||
(format nil "~a~%~%IDENTITY: ~a~a~a~%~%TOOLS:~%~a~%~%CONTEXT:~%~a~%~%LOGS:~%~a"
|
||||
time-section
|
||||
assistant-name reflection-feedback
|
||||
(if standing-mandates-text
|
||||
(concatenate 'string (string #\Newline) standing-mandates-text)
|
||||
|
||||
Reference in New Issue
Block a user