agentleFS
criptoguscriptogus/brainstack/skills/memory/SKILL.md

memory

Skill4 starsChanged 4 months agoMITView on GitHub

Use when storing, retrieving, or reasoning about typed memory - facts, preferences, decisions, observations - with schema, confidence, TTL, decay, and conflict resolution. Governs what is stored, how it ages, and how conflicts resolve.

66 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use harness-review, postmortem and 10 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • fockusSkill

    harness-review

    Harness v3 統合レビュースキル。コード・プラン・スコープを多角的にレビュー。以下で起動: レビュー、コードレビュー、プランレビュー、スコープ分析、セキュリティ、品質チェック、harness-review。実装・新機能・バグ修正・セットアップ・リリースには使わない。

    Also in 3 projects that use this

  • Hongyu-yuSkill

    postmortem

    Use when analyzing failures, outages, incidents, or negative outcomes, conducting blameless postmortems, documenting root causes with 5 Whys or fishbone diagrams, identifying corrective actions with owners and timelines, learning from near-misses, establishing prevention strategies, or when user mentions postmortem, incident review, failure analysis, RCA, lessons learned, or after-action review.

    Also in 4 projects that use this

  • MicrosoftSkill

    dev

    Development workflows for the playwright-cli repository. Use when the user asks about rolling dependencies, releasing, or other repo maintenance tasks.

    Also in 3 projects that use this

  • AnthropicSkill

    start

    Set up your bio-research environment and explore available tools. Use when first getting oriented with the plugin, checking which literature, drug-discovery, or visualization MCP servers are connected, or surveying available analysis skills before starting a new project.

    Also in 4 projects that use this

  • MicrosoftSkill

    sync

    Sync the current session branch with its upstream branch, or publish the current session branch to a remote. Use when the user asks to sync a branch, pull latest changes, rebase onto upstream, push current branch, publish branch, or set upstream.

    Also in 3 projects that use this

  • GitHubSkill

    refactor

    Surgical code refactoring to improve maintainability without changing behavior. Covers extracting functions, renaming variables, breaking down god functions, improving type safety, eliminating code smells, and applying design patterns. Less drastic than repo-rebuilder; use for gradual improvements.

    Also in 4 projects that use this

  • +1 more from microsoft

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 57 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Don't use for: full-text retrieval (see retrieval), or capturing notes (see capture).

    line 26
  2. Distinctive:

    Every entry has a type.

    line 94
  3. Distinctive:

    Start low, let reinforcement raise it.

    line 122

“Common” is measured: kept by at least 6 in 10 of the 57 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Memory

Memory is not a flat dump in context. Every fact, preference, decision or observation has a type, confidence, provenance and lifecycle. This skill governs what is stored, how it ages, and how conflicts resolve.

When to Use

  • Storing a fact, preference, correction, or decision
  • Reviewing what the brain knows about a topic or person
  • Resolving contradictory memories
  • Running the nightly consolidation of the memory store
  • Answering "what do we know about X?" from the vault

Don't use for: full-text retrieval (see retrieval), or capturing notes (see capture).

Two parallel tracks

AspectCompiler store (auto-generated)Curated entries (human-edited)
OriginAuto-generated from vault notes by the compilerManual / migrated from legacy systems
Schema7 JSON types13 types, Markdown + YAML frontmatter
DurabilityEphemeral (regenerated nightly)Permanent (git-versioned)
ConflictsDedup by hash (higher confidence wins)supersedes / superseded_by chain
UseFast recovery, bulk contextAuthoritative, traceable facts

The compiler does NOT read curated entries. For facts confirmed by the human, prefer curated entries.

Type schema

Compiler types (7, with TTL and default confidence)

TypeTTLConfidenceHeuristic
raw7d0.3Lives in 00-Inbox/
working30d0.5Default
semantic365d0.8>500 chars, formal content
episodic180d0.7Date + meeting/call context
procedural365d0.8"How to", workflow, playbook
preference365d0.6"I like", "I prefer", style
decision730d0.7"I decided", "approved", "signed"

Fields: id, type, title, content(<=2000), source, confidence, created/updated, valid_until, ttl_days, tags, links, superseded_by, hash.

Curated types (13)

The 7 above plus relationship, instruction, goal, commitment, context, event, observation, artifact, error - reserved for human curation.

Decay

TypeRule
preference-0.1 @ 30d, -0.2 @ 90d
decision-0.05 @ 180d
context-0.1 @ 14d
observation-0.15 @ 7d, -0.3 @ 30d
learning+0.05 per validation (reinforcement)

Decay is healthy: preferences change, observations age. TTL (valid_until) marks expiry but does not remove - the compiler keeps the store clean.

Conflict resolution

Conflict is not an error - it is an opportunity to refine.

  1. Detect contradiction between active entries of the same type/topic.
  2. Resolve by recency + confidence: newest and most confident wins.
  3. The loser is archived with a conflict note (superseded_by), never deleted.
  4. Unresolved conflict becomes silent contradiction - apply the policy automatically.

Example: "I prefer in-person meetings" (conf 0.8, 90d old) vs "remote meetings are more productive" (conf 0.85, today) -> the newer entry wins, the old one is archived with a supersedes note.

Golden rules

  1. Every entry has a type.
  2. Archiving is not deleting - history preserves provenance.
  3. One entry = one concept.
  4. Fact is not opinion - "X is a good leader" is an observation, not a semantic.
  5. Drafts enter with confidence < 0.5 so they don't inflate the signal.
  6. Hot cache (the harness memory) is not cold storage (the vault). Neither substitutes for the other.

Workflow

1. Detect the trigger (correction, decision, preference, pattern)
2. Assign type + confidence (see schema)
3. Store: curated entry (Markdown) and/or let the compiler pick it up
4. On conflict: apply recency + confidence policy, archive the loser
5. Run compiler (nightly or manually): python3 bin/memory-compiler.py [--quick]

Common Pitfalls

  1. Typeless entries. "Every entry has a type" is rule 1 for a reason - untyped memory is noise.
  2. No provenance. An entry without a source is a rumor. Always record source.
  3. Overwriting instead of superseding. Archive the old entry with a superseded_by link. History is evidence.
  4. Confidence inflation. Drafts and guesses at 0.9 pollute retrieval. Start low, let reinforcement raise it.
  5. Deleting on expiry. TTL flags, it does not delete. The compiler prunes.
  6. The compiler only reads the first 2000 chars of a note - long notes are classified by their beginning. Keep note openings informative.

Verification Checklist

  • Every entry has a type, source, and confidence
  • Conflicts resolved by recency + confidence, loser archived
  • Decay applied where applicable (TTL respected, nothing deleted)
  • Compiler run succeeded (nightly or manual)
  • No silent contradictions left unresolved

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.