Memory care
Brigade memory care is a local, read-only scanner for durable memory cards. It detects cards that need review, writes a refresh queue, and routes review tasks into the existing work inbox.
Commands
brigade memory care init
brigade memory care scan
brigade memory care plan-fixes
brigade memory care backfill
brigade memory care status
brigade memory care doctor
brigade memory care import-issues
brigade memory care closeout
init writes .brigade/memory-care.toml. The config is host-local and should stay gitignored.
Config
The local config supports:
card_roots: directories containing memory card Markdown files.index_paths: memory indexes such asMEMORY.md.stale_after_days: review age threshold.expiry_warning_days: days beforefresh_untilorexpires_atcounts as expired.minimum_confidence:unknown,low,medium, orhigh.require_evidence: whether cards without evidence metadata are flagged.include_pathsandexclude_paths: relative path prefixes.output_path: wherescan-latest.jsonandrefresh-queue.jsonare written.enabled_checks: enabled issue types.max_card_bytes: oversized-card threshold.
Issue Types
Memory care can emit:
staleexpiredundersourcedcontradictorymissing-index-linkorphaned-cardoversized-cardmissing-frontmattermissing-reviewedmissing-freshness
Contradiction detection is deliberately conservative. Brigade only flags explicit duplicate card identities or metadata hints, not LLM-inferred factual conflicts.
Safe Fix Planning and Backfill
brigade memory care plan-fixes reads the latest scan and builds a planning-only view for low-risk metadata repairs such as missing reviewed dates or missing freshness dates. The command never writes card files; plan items include candidate metadata fields, source fingerprints, blockers, and the next review command.
brigade memory care backfill handles the bulk version of the same repair for setups whose cards predate the freshness convention. It derives last_reviewed from each card’s last git commit date (file mtime outside git, labeled as the lower-confidence source) and proposes fresh_until from the configured stale window. It is dry-run by default; --apply writes the derived values into card frontmatter, never overwrites an existing value, and records a receipt under .brigade/memory-care/backfills/. Backfilled dates are honest rather than flattering: an old card lands as stale immediately, which is the point.
Refresh Queue
brigade memory care scan writes:
.brigade/memory-care/decay/scan-latest.json
.brigade/memory-care/decay/refresh-queue.json
Scanner state lives under .brigade/ rather than inside your memory/cards/ tree. An explicit output_path in the config is honored unchanged, and readers (import-issues, status, doctor) fall back to the legacy memory/cards/decay/ location when it still holds the latest scan.
Queue entries include card identity, issue type, severity, priority, safe summary, evidence references, suggested refresh action, acceptance criteria, source item key, and source fingerprint. brigade memory care import-issues imports those entries as source memory-care task imports with dedupe and dismissed-until-changed behavior.
Closeout
brigade memory care closeout records review metadata for the current refresh queue, closing the loop opened by import-issues. It marks the current queue as reviewed. Use --reason to annotate the closeout and --defer to mark the queue deferred instead of reviewed. --json prints machine-readable output.
Boundary
Memory care never edits card content, runs a scheduler, mutates canonical memory, performs remote sync, or promotes imports automatically. The only write path is backfill --apply, which fills missing frontmatter dates and never overwrites existing values. Refreshes stay explicit through reviewed work tasks or the existing Memory Handoff flow.