Skip to content

Memory deduping and sanitization#13

Merged
roberto-mello merged 29 commits into
mainfrom
bd-work/lavra-6y8-memory-sanitize
May 22, 2026
Merged

Memory deduping and sanitization#13
roberto-mello merged 29 commits into
mainfrom
bd-work/lavra-6y8-memory-sanitize

Conversation

@roberto-mello
Copy link
Copy Markdown
Owner

Improving the memory system

…file

lavra-plan.md was removed (became a skill), so the sentinel check always
returned GLOBALLY_INSTALLED=false, causing per-project installs to duplicate
all commands/agents/skills even when a global install was present.

Switch to checking .lavra-version in the global hooks dir — written
explicitly by the global install and not tied to any specific command name.
…outer

- Sequential vs parallel choice when working multi-bead epics
- lavra-work-single/multi triage review findings; cosmetic fixes inline
- lavra-work router logic moved to skills/lavra-work/SKILL.md
- lavra-design Phase 2 gate now token-explicit with skip-by-default option
- Deferred anti-patterns require durable MUST-CHECK entry or rules addition
- knowledge.jsonl background cleanup (Go binary or jq fallback)
- Draft release notes for v0.7.8
…mand

lavra-work.md now delegates to the lavra-work skill (thin router), so
the Gemini conversion no longer produces the untrusted-input block with
#{{args}}. Test now checks for {{args}} which is present in the converted
Skill() invocation.

Also updates CATALOG.md (Skills 22→23, Core 15→16), ARCHITECTURE.md,
and plugin-catalog.md rule to reflect the new lavra-work skill.
When the Go helper is built during install and then immediately invoked
via --run, the binary and source have equal or near-equal timestamps.
The -nt (strictly newer-than) check fails for equal timestamps, causing
an unnecessary rebuild attempt that fails in CI without a writable GOCACHE.

Switch to '! -ot' (not older-than), which also accepts equal timestamps.
…-nt/-ot

Bash's -ot with equal timestamps returns true on macOS (treating equal as
older-than) but false on Linux. This caused build_go_helper to skip the
fresh-binary check and attempt a rebuild immediately after install, which
fails in CI when the GOCACHE is not set up for runtime invocations.

Use stat -c '%Y' (Linux) / stat -f '%m' (macOS) and numeric -ge comparison,
which behaves identically on both platforms for equal timestamps.
…runtime checks

Command substitution with a failing command triggers set -e before the
conditional can handle it. Capture exit code via || rc=$? pattern instead.
…t -e

Under bash set -e, a failing command in a command substitution or bare
invocation aborts the script before any conditional can handle it. Using
|| true makes the line always succeed, then checking the output files
(knowledge.active.jsonl or .memory-sanitize-go) is sufficient to determine
whether the helper ran correctly.
@roberto-mello roberto-mello merged commit 2e7e512 into main May 22, 2026
4 checks passed
@roberto-mello roberto-mello deleted the bd-work/lavra-6y8-memory-sanitize branch May 22, 2026 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant