create-ai-memory 0.8.2 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -274,7 +274,7 @@ optional. Set `AI_MEM_ROOT` in `~/.zshrc` first if you do not want the default
274
274
  | `ai-start [project]` | Prepare the session (project note and fresh log) without launching an agent |
275
275
  | `ai-context [project]` | Print the vault context block for the current repo, and arm the git commit guard |
276
276
  | `ai-note <text>` | Append a timestamped note to today's session log while you work |
277
- | `ai-lesson <topic-slug> <text>` | Append a timestamped note to a cross-project `_lessons/<topic-slug>.md` -- decisions, mistakes, solutions worth recalling outside the current project |
277
+ | `ai-lesson <topic-slug> <problem> <solution>` | Append a dated Problem/Solution entry to a cross-project `_lessons/<topic-slug>.md` -- decisions, mistakes, solutions worth recalling outside the current project |
278
278
  | `ai-mem-lint` | Check the vault's links: orphaned session logs, dangling `previous` links, unreferenced project notes |
279
279
  | `ai-mem-search <term> [project]` | Grep across the vault (or one project's logs) for a term, with `file:line:excerpt` |
280
280
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-ai-memory",
3
- "version": "0.8.2",
3
+ "version": "0.9.0",
4
4
  "description": "Persistent, agent-agnostic session memory for AI coding CLIs (Claude Code, Codex, Gemini, Cursor, opencode). One Markdown vault, any agent.",
5
5
  "bin": {
6
6
  "create-ai-memory": "bin/create-ai-memory.js"
package/shell/ai-mem.zsh CHANGED
@@ -262,7 +262,7 @@ Use the Obsidian vault as the persistent memory layer.
262
262
  Treat the global profile and standards note as the shared baseline for every run.
263
263
  Keep durable preferences and project facts in the vault, and keep the active session log updated with decisions, blockers, and next steps.
264
264
  For anything not covered above -- a decision from further back, a different project, a health check on the vault's links -- run \`ai-mem-search <term> [project]\` or \`ai-mem-lint\` yourself; both are plain shell commands already on PATH.
265
- When you hit a mistake, decision, or solution worth remembering across projects (not just this one), run \`ai-lesson <topic-slug> <text>\` -- e.g. \`ai-lesson rate-limiting "used a token bucket, fixed window kept losing bursts"\`. It appends to a cross-project note at _lessons/<topic-slug>.md; ai-mem-search already covers it.
265
+ When you hit a mistake, decision, or solution worth remembering across projects (not just this one), run \`ai-lesson <topic-slug> <problem> <solution>\` -- e.g. \`ai-lesson rate-limiting "a fixed-window limiter kept losing bursts of legitimate traffic" "switched to a token bucket, which absorbs bursts correctly"\`. It appends a dated Problem/Solution entry to a cross-project note at _lessons/<topic-slug>.md; ai-mem-search already covers it.
266
266
  EOF
267
267
  }
268
268
 
@@ -560,15 +560,9 @@ codex-lesson() {
560
560
  # (ADR/postmortem shape, not a full wiki) so ai-mem-search already covers it
561
561
  # for free -- no new search path, no taxonomy to maintain.
562
562
  ai-lesson() {
563
- local topic="${1:-}"
564
- if [[ -z "$topic" ]]; then
565
- echo "Usage: ai-lesson <topic-slug> <text>"
566
- return 1
567
- fi
568
- shift
569
- local text="${*:-}"
570
- if [[ -z "$text" ]]; then
571
- echo "Usage: ai-lesson <topic-slug> <text>"
563
+ local topic="${1:-}" problem="${2:-}" solution="${3:-}"
564
+ if [[ -z "$topic" || -z "$problem" || -z "$solution" ]]; then
565
+ echo "Usage: ai-lesson <topic-slug> <problem> <solution>"
572
566
  return 1
573
567
  fi
574
568
 
@@ -596,7 +590,8 @@ ai-lesson() {
596
590
  fi
597
591
  fi
598
592
 
599
- printf -- '\n- %s [[%s]] %s\n' "$timestamp" "$project_name" "$text" >> "$lesson_file"
593
+ printf -- '\n## %s [[%s]]\n\n### Problem\n%s\n\n### Solution\n%s\n' \
594
+ "$timestamp" "$project_name" "$problem" "$solution" >> "$lesson_file"
600
595
  printf 'Appended to %s\n' "$lesson_file"
601
596
  }
602
597
  # Lints the vault's links: session logs missing a project wikilink, previous