2.1 KiB
Memory Scripts
This directory exposes a project-agnostic interface for canonical project knowledge.
The current implementation resolves the canonical Markdown directory from profiles/<profile>/workspace.json and can optionally delegate to the Obsidian CLI when it is available. The agent should depend on this memory interface, not on Obsidian-specific behavior, so the backing tool can be replaced later.
Backend Model
AIW_PROJECT_PROFILEselects the profile, defaulting tofidelityin this repository.profiles/<profile>/workspace.jsondefines the canonical Markdown project knowledge directory.AIW_PROJECT_KNOWLEDGE_DIRcan override the resolved directory for local experiments.AIW_MEMORY_BACKENDdefaults toauto.autouses Obsidian CLI when it is useful and available, then falls back to direct Markdown operations.filesforces direct Markdown operations.obsidianrequires the Obsidian CLI for supported operations.
Commands
bash scripts/memory/memory.sh root
bash scripts/memory/memory.sh read 01-current/current-work.md
bash scripts/memory/memory.sh search "PDIAP-15765"
bash scripts/memory/memory.sh create work-item pdiap-15999 "Example title"
bash scripts/memory/memory.sh base-query work-items
bash scripts/memory/memory.sh health
Note Creation
create maps note types to canonical folders and templates:
daily->06-daily/work-item->02-work-items/person->04-people/decision->05-decisions/system->03-context/systems/workstream->03-context/workstreams/meeting-note->06-daily/
The template is resolved from 09-templates/<type>.md. When Obsidian CLI is available, the script uses obsidian create path=... template=.... Otherwise it creates the file directly from the template and resolves the basic {{title}}, {{date}}, and {{time}} variables.
Agent Rule
Use these scripts for project-knowledge operations such as creating notes, querying Bases, validating navigation health, and searching memory. For precise content edits, agents should still edit Markdown files directly so diffs remain auditable.