/foundation:fa-foundation-memory-maintenancefrom foundation
Refreshes a scope's memory store (memory/ topic files and MEMORY.md index) against inspected reality. Use after shipping, deciding, discovering, or when last_verified is stale.
Ships in foundation. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Use this skill to re-establish one scope's memory store — the MEMORY.md index and the memory/ topic files beside it — against reality you inspected, not against what the last version of the file happened to say.
Use this skill when:
last_verified is older than the repository's freshness windowDo not use this skill when:
memory/ directory yet, or the split between the two context files is itself wrong — that is authoring, not maintenancememory/, and the MEMORY.md index they derive topython3 ${CLAUDE_PLUGIN_ROOT}/scripts/context-audit.pylast_verifieddescription: lines that carry the state signal without the reader opening a file, and an index regenerated from themmemory/ directory, stop and author the store first; maintenance assumes one exists.description: that no longer describes the body it sits above. ls memory/ locates the store; it never assesses it.MEMORY.md and adjusting it. Minimum sweep for a code scope: git log -1 --format='%h %cd %s', the current branch, git status --short, whether a remote and an upstream exist, whether anything is unpushed, and whether the test command actually asserts something rather than passing vacuously. For a non-code scope: which files exist and when they last changed.state topic as one tight file — stage, last real activity with a date, what works, what is half-built. No hedging, no aspiration in the present tense. Re-cut its description: — that line is the index hook, so the signal must show there without the file being opened, inside 240 characters.decision topic with its why. A decision recorded without its rationale is reversed by the next agent, who sees only its cost — this is the single highest-value content in the store. A red do-not-do-this item becomes its own alert topic, indexed near the top.last_verified only on topics you genuinely verified — editing a file is not verifying it — keep the six-line frontmatter intact so head -8 still yields the full relevance signal plus the heading, then regenerate the index: python3 ${CLAUDE_PLUGIN_ROOT}/scripts/context-audit.py --fix-index --scope <your directory> — carry --scope every time, not only when other agents are working in the same tree, because unscoped it regenerates every index in the tree and a scope that matches nothing is reported as SCOPE-EMPTY rather than silently printing clean. The index is derived from the topic files' # H1, description: and type:; hand-editing it is how a hook and its body start disagreeing, and the audit reports any hand-edit as MEMORY-INDEX-STALE. Then re-run the script and resolve what it reports.Ahead-counts, behind-counts, dirty-path counts and commit totals go stale inside the session that writes them. The closing context commit — the one this skill exists to produce — moves the branch pointer and dirties the tree, so the sentence is false before the session ends, sometimes with arithmetic that no longer adds up. The next agent reads it, believes it, and acts on a number that was true for about a minute.
Record the topology instead: the shape of the situation, which survives the commit and carries the signal a reader actually needs.
--force destroys the remotegit added, so git clean deletes it with no reflogA number earns its place only when it is itself the hazard and does not move. "The unpushed range deletes 21 named tracked files" is a fact about what a commit does — true for as long as that commit exists, and the entire reason to look before pushing. "3 ahead" is a fact about where a pointer currently sits, and the audit script re-measures it in seconds, which makes any copy of it a second source that starts disagreeing immediately. If you quote a moving number anyway, date it in the same sentence and say plainly that it must be re-measured before anyone acts on it.
This is not cosmetic accuracy. Two of the ordinary ways a store gets someone's work destroyed are an agent force-pushing because a topic file said ahead-only when the branch had since diverged, and an agent running a cleanup because a topic file said the tree was clean when a body of never-added files was sitting in it. Topology would have been right in both cases; the integer was already wrong in the hour it was written.
| Failure mode | Recovery | Owner | Escalation |
|---|---|---|---|
| store read only in part | stop editing and read every topic end to end, then restart the pass | maintainer | none — this is not escalatable, it is redoable |
| a claim that cannot be verified | record it as a question topic naming its owner, not as state | maintainer | raise to the human owner if the answer gates a decision |
| a volatile integer already in the store | replace it with the topology it was standing in for | maintainer | re-run the audit to confirm nothing else quotes it |
| a claim about another scope's context file | delete it here and report the discrepancy to the caller | maintainer | the reconciling pass at the root is the only writer allowed across scopes |
last_verified for a file you only editeddescription: or the rest of its frontmatter; head -8 is a relevance signal for a reader deciding whether to open a file it does not ownMEMORY.md; edit the topic files and regeneratefa-foundation-create-skillstate topic rewritten, the decision recorded with its why, the question's topic file deleted, and the index regenerated.MEMORY.md at all — the pair is missing, which is an authoring job, and there is nothing here to refresh.last_verified moved only where that happeneddescription: carries the signal inside 240 characters, and the index was regenerated rather than hand-writtenWhat SKILL.md sets; muted values are Claude Code's defaults
10 skills in this plugin
/fa-foundation-context-auditProvides the whole-repository context-layer drift sweep — every instruction file, every MEMORY.md and topic store, and every skills directory reconciled against inspected reality rather than against what the files claim. Use it when the periodic sweep is due, after a long dormancy, before any decision that depends on the context layer or the registry being literally true, when more than one scope looks untrustworthy at once, or when a previous sweep's findings need verifying rather than re-deriving. It checks what those files and registries claim against what is on disk; it never re-derives what they should say from a project's source — a tree with no context layer, or one to rebuild from source, is `fa-foundation-optimize-directory-tree`'s./fa-foundation-context-authoringProvides cascade-aware authoring for a scope's instruction file (CLAUDE.md or AGENTS.md) and its MEMORY.md topic store, keeping timeless rules strictly separate from dated state and holding every scope to its own delta over its parent. Use it when creating, rewriting or restructuring either file at a single scope whose surrounding cascade already exists, when a nested scope restates content it already inherits, when an instruction file has started asserting status, versions or progress, or when a memory store has no memory/ directory, carries malformed topic frontmatter, or has a hand-written index instead of one generated from its topic files./fa-foundation-create-agentProvides the house rules for an agent definition that actually gets invoked and stays in its lane — one role per file, a description carrying what the agent is for and when to reach for it, an explicit anti-mission, an output contract, and a tool scope no wider than the role needs. Use it when adding an agent, when an agent never fires or fires on the wrong work, when two agents claim the same scope, when a definition's tools no longer match what it does, or when rationalizing a set of agents that has sprawled. It never authors a skill — that is `fa-foundation-create-skill` — and it never audits a whole definition directory, which is the skills auditor's./fa-foundation-create-planProvides a researched, executable plan for work that is large, ambiguous or hard to reverse — requirements clarified with the human first, three identical subagents fanned out to propose plans in parallel, all three critiqued dispassionately, and the best single plan synthesized and written to a file another agent can execute from. Use it before any multi-step build, refactor or migration, when two plausible approaches need deciding between, when the first choice made will be expensive to undo, or when the work will be handed to someone else to carry out. It plans; it never implements, and sequencing an approved architecture into gated delivery tasks is `fa-engineering-planning`'s./fa-foundation-create-skillProvides the house rules for a SKILL.md that actually fires — naming, the frontmatter contract, a description written as a trigger rather than a summary of the body, the standard section shape, references kept one level deep, and the prior decision of whether a new skill is warranted at all. Use it when adding a skill, when a skill never triggers or triggers on the wrong work, when a trap-bearing procedure has been repeated often enough to deserve one, or when consolidating skills that have drifted into each other. It never authors an agent definition — that is `fa-foundation-create-agent`./fa-foundation-optimize-directory-treeProvides the whole-tree bootstrap that puts the Gaia context layer onto an existing directory tree — an instruction file and MEMORY.md topic store at every scope that earns one, a root registry, and the retrospective design documentation its projects never had — and re-validates a bootstrapped tree against its projects' source. Use it when a tree of code, research or operational documentation has no context layer, or when one exists that was never derived from what the projects actually are. It never edits one scope's pair inside a cascade that already exists — that is `fa-foundation-context-authoring`; never audits an existing layer against itself — `fa-foundation-context-audit`; never writes one repository's design docs alone — `fa-engineering-architecture`; and never scaffolds application code.npx claudepluginhub frostaura/technologies.fa.gaia --plugin foundationOther plugins' skills for the same job