Daily Notes Option A Implementation, 2026-04-08
Findings summary
Option A is now implemented in the smallest safe form.
What shipped:
- one deterministic append script for canonical daily notes at
memory/YYYY-MM-DD.md - consistent structured entry format
- create-if-missing behavior
- duplicate suppression for exact repeated captures
- rejection of obvious raw transcript or session-dump style input
- basic redaction for obvious sensitive strings before they enter searchable daily notes
- a small integration point in
workspace/AGENTS.mdso explicitcapture this,flush memory, and task-close state capture use the new path
What did not change:
- no full harvester
- no heartbeat synthesis changes
- no
MEMORY.mdauto-promotion - no gateway restart
- no change to bundled
session-memorybehavior yet
Design
Canonical writer
New file:
workspace/scripts/daily-notes-append.mjs
Behavior:
- resolves the canonical file only as
memory/YYYY-MM-DD.md - creates the file with
# YYYY-MM-DDif missing - appends one entry block at a time in a fixed structure:
## <time> | <kind>- Source: <source>- optional
### Summary - optional
### Decisions - optional
### Tasks - optional
### Follow-ups - optional
### Notes - supports CLI flags or
--stdin-jsonfor structured payloads - computes a stable content hash and stores it as an HTML comment marker so exact repeat appends become no-ops
Safety rules in the writer
The script is intentionally conservative.
It rejects input that looks like:
user:/assistant:/system:/tool:transcript lines- session-summary markdown headings
- JSON or message-dump shaped content
It redacts obvious sensitive strings before writing:
- bearer tokens and common API-key style strings
- long hex secrets
- email addresses
- phone numbers
- exact dollar amounts
This is not a full DLP system. It is a minimum guardrail to keep the canonical searchable path from becoming a raw transcript bucket.
Integration point
Changed file:
workspace/AGENTS.md
Changes:
- declared
node /Users/vinny/.openclaw/workspace/scripts/daily-notes-append.mjsas the canonical append path for daily notes - instructed agents to use it for explicit
capture this,flush memory, and task-close state capture - explicitly told agents not to write freeform markdown or raw transcript material directly into
memory/*.md - added the same script reference to the existing memory-flush event instructions
Why this integration point:
- smallest live workflow touch
- no gateway restart required
- usable immediately by any agent that follows workspace instructions and can run local scripts
- does not broaden into Option B/C
Session-memory handling
Current state:
- bundled
session-memoryis still enabled - it still writes date-plus-slug files into
memory/on/newand/reset - that remains a source of mixed-quality searchable memory and filename sprawl
Decision taken here:
- left it unchanged
Why:
- changing or disabling it without a separate approval/review step risks breaking current reset-time recall behavior
- rerouting it cleanly is not a one-line config tweak in the visible local surface. The bundled hook writes directly into
memory/ - changing that safely would require either disabling the hook or replacing its behavior with a reviewed alternative
Follow-up recommendation:
- yes, follow-up needed
- next task should explicitly decide between:
- disable bundled
session-memory, or - replace/reroute reset-time capture to a non-searchable archive path outside
memory/*.md
I do not recommend making that change silently as part of this Option A shipment.
Files changed
workspace/scripts/daily-notes-append.mjsworkspace/AGENTS.mdworkspace/artifacts/daily-notes-option-a-implementation-2026-04-08.md
Validation
1. Syntax and help
Ran:
chmod +x /Users/vinny/.openclaw/workspace/scripts/daily-notes-append.mjs
node --check /Users/vinny/.openclaw/workspace/scripts/daily-notes-append.mjs
node /Users/vinny/.openclaw/workspace/scripts/daily-notes-append.mjs --helpResult:
- passed
2. Isolated smoke test in a temp workspace
Ran create, append, duplicate, redaction, and rejection checks against a temporary workspace, not Pete's real memory directory.
Observed results:
- first write created
memory/2026-04-08.md - second distinct write appended to the same canonical file
- third identical write returned
status: duplicate - email, phone, dollar amount, and bearer token were redacted in the written note
- transcript-shaped input failed with:
summary looks like a raw transcript or session dump. Distill it first.
3. JSON stdin path
Ran --stdin-json --dry-run with a structured payload.
Result:
- rendered the same deterministic file format without writing to disk
Intentionally not done
- no full session harvester
- no automatic compaction-flow rewrite
- no reset/new hook rewrite
- no
MEMORY.mdpromotion automation - no migration of historical memory files
- no heartbeat-state work
- no gateway restart
Recommended next action
One focused follow-up only:
- review and decide the fate of bundled
session-memory, because it is now the main remaining source of messy searchable memory files
Do not expand that follow-up into broader automation until a separate approval step exists.