tiered-memory
Skill227 starsChanged 9 months agoApache-2.0View on GitHub
Three-tier agent memory model (hot/cold/wiki) for context reduction per spawn
We split this skill into the rules it gives an agent
6 rules. 0 are common, 4 are distinctive, and 2 are very specific to this project.
0
Common
Most of the 3 edited versions we read keep these.
4
Distinctive
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 22
Size target: keep small (~2–4KB typical)
- Distinctive: line 23
Load policy: Always loaded. Every spawn includes hot memory by default.
- Very specific: line 70
Add --include-cold when the task needs history:
- Very specific: line 81
Add --include-wiki when the task needs domain knowledge:
- Distinctive: line 129
Use this template when spawning any Squad agent.
- Distinctive: line 207
If blocked or uncertain:
“Common” is measured: kept by at least 6 in 10 of the 3 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.
Files
Skill: Tiered Agent Memory
Status (v0.10.0): This skill describes a design proposal, not a shipped runtime. Skill files install via
squad init/upgrade, but the underlying tier scaffolding (.squad/memory/hot/,cold/,wiki/), Scribe promotion logic, and spawn-template tier-aware reads are tracked in bradygaster/squad#1264. Until those land, agents continue to load fullhistory.md+decisions.mdon every spawn.
Overview
Squad agents today load their full context history on every spawn, which grows unboundedly across sessions. The Tiered Agent Memory model proposes a three-tier separation so agents only load the bytes that are actually relevant to the current task, with older context kept available on demand.
Memory Tiers
🔥 Hot Tier — Current Session Context
- Size target: keep small (~2–4KB typical)
- Load policy: Always loaded. Every spawn includes hot memory by default.
- Contents: Current task description, active decisions made this session, immediate blockers, last 3–5 actions taken, who you are talking to right now.
- Lifetime: Current session only. Discarded after session ends (Scribe promotes relevant parts to Cold).
- Purpose: Provide immediate task context without any latency or load decision.
❄️ Cold Tier — Summarized Cross-Session History
- Size target: larger summary, not full transcript (~8–12KB typical)
- Load policy: Load on demand. Include only when the task explicitly needs history.
- Contents: Summarized past sessions (compressed by Scribe), cross-session decisions, recurring patterns, unresolved issues from prior work.
- Lifetime: Rolling window (default proposal: 30 days). Eligible entries are then promoted to Wiki.
- Purpose: Answer "what have we tried before?" and "what was decided?" without replaying full transcripts.
- How to include: Pass
--include-coldin spawn template or add## Cold Memorysection.
📚 Wiki Tier — Durable Structured Knowledge
- Size target: variable, structured reference docs
- Load policy: Async write, selective read. Load only when task requires domain knowledge.
- Contents: Architecture decisions (ADRs), agent charters, routing rules, stable conventions, external API contracts, known platform constraints.
- Lifetime: Permanent until explicitly deprecated.
- Purpose: Authoritative reference. Not history — structured facts.
- How to include: Pass
--include-wikior reference specific wiki doc paths in spawn template.
When to Load Each Tier
| Situation | Hot | Cold | Wiki |
| New task, no prior context needed | ✅ | ❌ | ❌ |
| Resuming interrupted work | ✅ | ✅ | ❌ |
| Debugging a recurring issue | ✅ | ✅ | ❌ |
| Implementing against a spec/ADR | ✅ | ❌ | ✅ |
| Onboarding to unfamiliar subsystem | ✅ | ❌ | ✅ |
| Post-incident review | ✅ | ✅ | ✅ |
Spawn Template Pattern
The default spawn prompt should include Hot tier only:
## Memory Context
### Hot (current session)
{hot_context}Add --include-cold when the task needs history:
## Memory Context
### Hot (current session)
{hot_context}
### Cold (summarized history — load on demand)
See: .squad/memory/cold/{agent-name}.mdAdd --include-wiki when the task needs domain knowledge:
## Memory Context
### Hot (current session)
{hot_context}
### Wiki (durable reference)
See: .squad/memory/wiki/{topic}.mdIntegration with Scribe Agent (design — not yet implemented)
Scribe is the proposed memory coordinator for this system. Once the runtime lands, Scribe will:
- End of session: Compress Hot → Cold summary (target: ~10% of session verbosity)
- Aged cold entries: Promote Cold → Wiki for decisions/facts that aged into stable knowledge
- On-demand wiki writes: Any agent can request Scribe to write a wiki entry mid-session
Until then, see the Scribe charter for current behavior: .squad/agents/scribe/charter.md
Implementation Checklist (tracked in #1264)
- Scribe writes Hot context file at session start (
.squad/memory/hot/{agent}.md) - Scribe compresses and writes Cold summary at session end
- Spawn templates default to Hot-only
- Coordinators add
--include-cold/--include-wikiflags as needed - Wiki entries stored in
.squad/memory/wiki/ - Cold entries stored in
.squad/memory/cold/with rolling TTL
References
- Tracking issue: bradygaster/squad#1264 — installation gap + runtime status
- Original design spike: bradygaster/squad#686 — tiered memory implementation plan
- Related: bradygaster/squad#600 — context payload growth
Spawn Template
Spawn Template: Agent with Tiered Memory
Use this template when spawning any Squad agent. By default it loads Hot tier only. Add optional sections as needed.
Task
{task_description}
WHY
{why_this_matters}
Success Criteria
- {criterion_1}
- {criterion_2}
Memory Context
🔥 Hot (always included)
Paste current session context here (~2–4KB target):
Current task: {task_description}
Active decisions: {decisions_this_session}
Last actions: {last_3_to_5_actions}
Blockers: {current_blockers_or_none}
Talking to: {current_interlocutor}❄️ Cold (include when task needs history — add --include-cold)
Load on demand. Do not inline unless specifically needed.
Summarized cross-session history is at:
.squad/memory/cold/{agent-name}.md
Include when:
- Resuming interrupted work
- Debugging a recurring issue
- "What have we tried before?"
To load cold memory, add this section and fetch the file before spawning:
## Cold Memory Summary
{contents_of_.squad/memory/cold/{agent-name}.md}📚 Wiki (include when task needs domain knowledge — add --include-wiki)
Load on demand. Reference specific wiki docs by path.
Wiki entries are at: .squad/memory/wiki/
Include when:
- Implementing against an ADR or spec
- Onboarding to unfamiliar subsystem
- Need stable conventions or API contracts
To load wiki, add this section and reference the specific doc:
## Wiki Reference
{contents_of_.squad/memory/wiki/{topic}.md}Escalation
If blocked or uncertain:
- Architecture questions → @picard
- Security concerns → @worf
- Infrastructure/deployment → @belanna
- Memory/history questions → @scribe
Notes
- Hot tier is always included; keep it focused
- Cold adds a summary; only include when history is relevant
- Wiki adds variable size; only include specific relevant docs
- Runtime backing is tracked in bradygaster/squad#1264 — until those changes land, this skill is design-only and agents continue to load full history.md + decisions.md on every spawn
Other versions8 projects use a version of this.
Word for word · 5
- github/gh-aw★ 5.5k100% same
- microsoft/Generative-AI-for-beginners-dotnet★ 3.2k100% same
- kubefleet-dev/kubefleet★ 162100% same
- microsoft/github-vteam-industry-demos★ 2100% same
- microsoft/fsi-banking-payments-dispute-resolution-accelerator★ 0100% same
Edited · 1
- microsoft/waza★ 1.5k96% same
Wrote their own version · 2
- shali10/awesome-agent-skills★ 1same name
- weininghui/skills★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Used alongsideProjects with it also use squad-commands and {skill-name}.
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.
MicrosoftSkillsquad-commands
Categorized catalog of common Squad operations. Coordinator reads this file and presents it as an interactive menu when the user asks for available commands or help.
Also in 3 projects that use this
MicrosoftSkill{skill-name}
{what this skill teaches agents}
Also in 5 projects that use this
In this repository21 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- agent-collaborationSkill
- coordinator-init-modeSkill
- coordinator-response-modeSkill
- coordinator-source-of-truthSkill
- cross-squad-communicationSkill
- cross-squadSkill
- error-recoverySkill
- git-workflowSkill
- iterative-retrievalSkill
- reflectSkill
- reviewer-protocolSkill
- secret-handlingSkill
- session-recoverySkill
- squad-conventionsSkill
- squad-helpSkill
- squadSkill
- squad-version-checkSkill
- test-disciplineSkill
- humanizerSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
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.

