Docs / Shared memory
Keep memory healthy
Memory card decay scanning and refresh imports.
BrigadeStack memory care is a local 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
brigadestack memory care init
brigadestack memory care scan
brigadestack memory care plan-fixes
brigadestack memory care backfill
brigadestack memory care status
brigadestack memory care doctor
brigadestack memory care import-issues
brigadestack 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.read_only_paths: globs for policy cards.scan,plan-fixesandbackfillskip matching cards, andbrigadestack memory proposal createandapplyrefuse them with an error that names the pattern.statusanddoctorlist the active patterns.
Issue Types
Memory care can emit:
staleunconsolidated-evidenceexpiredundersourcedcontradictorymissing-index-linkorphaned-cardoversized-cardmissing-frontmattermissing-reviewedmissing-freshnessmissing-evidence-ref
unconsolidated-evidence flags a card when evidence logged by ingest is newer than its last consolidation (or last review). missing-evidence-ref flags a card that cites evidence it cannot resolve. Neither has an automatic fix, because both need a judgment about the evidence.
Contradiction detection in scan is deliberately conservative. It flags only explicit duplicate card identities or metadata hints. Checking whether a card’s facts still hold is done by the model-backed memory verify, described below.
Safe Fix Planning and Backfill
brigadestack memory care plan-fixes reads the latest scan and builds a plan for low-risk metadata repairs such as missing reviewed dates or missing freshness dates. In 0.31.0 it does not write card files (see 0.32.0 beta under What it writes for --apply). Plan items include candidate metadata fields, source fingerprints, blockers, and the next review command.
brigadestack 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 the run under .brigade/memory-care/backfills/. Backfilled dates reflect the real age, so an old card lands as stale immediately.
Refresh Queue
brigadestack memory care scan writes:
.brigade/memory-care/decay/scan-latest.json
.brigade/memory-care/decay/refresh-queue.json
Scanner state lives under .brigade/, outside 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. brigadestack memory care import-issues imports those entries as source memory-care task imports with dedupe and dismissed-until-changed behavior.
Closeout
brigadestack 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.
What it writes
In 0.31.0, memory care does not edit card content, sync remotely, or promote imports. The one command that changes cards is backfill --apply, which fills missing frontmatter dates and keeps existing values. Refreshes go through work tasks or the Memory Handoff flow.
0.32.0 beta. Memory care tends cards on its own, with an undo for every change:
brigadestack memory care tendruns five stages: retry pending backend operations, apply low-risk fixes, report retirement eligibility, drain the review inbox, and report instruction-file budgets.--stagepicks one,--dry-runpreviews, and[tend] enabled = falsein.brigade/memory-care.tomlturns it off.- The fixes stage fills
fresh_untilfrom the review date andlast_reviewedfrom the card’s last git commit. It reports the other issue types and leaves them alone.plan-fixes --applyapplies the same list. - A successful
brigadestack ingestdrains the review inbox itself. Drafts whose content already sits in the destination are resolved, stale ones are retried, and anything uncertain stays held for a person.ingest --no-tendskips it once. - Every automatic change is journaled with the card’s before-bytes.
brigadestack memory care undo <decision-id>restores it, andrecover <decision-id>finishes a change that was interrupted. brigadestack memory care archive --from-file decisions.jsonlmoves cards tomemory/archive/cards/with the same undo. Automatic archiving of unused cards is switched off in code for now, so only this explicit command archives.tendruns when you call it and after ingest. The daily care pass thatbrigadestack care installschedules also calls it.
For model-backed checking, see reflection and model-backed verification. brigadestack memory verify asks two agents to check cards against their evidence, memory reflect proposes duplicate merges without a model, and brigadestack care install can schedule both. They open proposals, and need configuration before they run.