spec-kit-memory-hub / templates
AGENTS.md15 starsChanged 7 months agoMITView on GitHub
This repository is built to work with Spec Kit Memory Hub. ⚠️ Never write directly to docs/memory/ files. Always use the capture flow or speckit_memory_register so that INDEX.md and the SQLite cache stay in sync. A task is not fully complete until memory has been reviewed and systemic lessons are captured.
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 35,337 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository2 other files it gives its agents.
- templates/CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
The file
We split this AGENTS.md into the rules it gives an agent
4 rules. About 0 are common, 3 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
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
- Distinctive: line 7
Proactive Check: Before planning or tasking, you MUST prepare context using the best available path:
- Distinctive: line 11
Capture Lessons: After implementation, you MUST review whether there is durable knowledge to preserve and use the best available capture …
- Distinctive: line 19
Do not wait for a manual capture request at the end of your task.
- Very specific: line 22
For global sharing: After local approval, call speckit_memory_share_lesson to propagate valuable, stack-specific lessons to the global …
≈ “Common” is an estimate: at least 1 in 5 of the 45,344 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Agent Instructions
This repository is built to work with Spec Kit Memory Hub.
Mandatory Workflow
- Core Governance: You MUST follow the memory-first workflow defined in .specify/memory/workflow.md.
- Proactive Check: Before planning or tasking, you MUST prepare context using the best available path:
- MCP: call
speckit_memory_refresh_cache,speckit_memory_search,speckit_memory_synthesize, andspeckit_memory_synthesize_docs - Spec Kit commands: run
/speckit.memory-md.prepare-context - Markdown-first fallback: follow
.specify/memory/workflow.mdand refreshmemory-synthesis.mdmanually
- MCP: call
- Capture Lessons: After implementation, you MUST review whether there is durable knowledge to preserve and use the best available capture path:
- Spec Kit commands:
/speckit.memory-md.captureor/speckit.memory-md.capture-from-diff - MCP maintenance flow:
speckit_memory_registeronly after explicit approval
- Spec Kit commands:
MCP Optimization (Preferred)
If you are running with an active Model Context Protocol (MCP) server integration (e.g., speckit-memory-hub), you DO NOT need to run shell commands for cache work. You can instead invoke MCP tools directly (speckit_memory_refresh_cache, speckit_memory_rebuild_cache, speckit_memory_audit_cache, speckit_memory_search, speckit_memory_synthesize, speckit_memory_search_docs, speckit_memory_synthesize_docs, speckit_memory_register, speckit_memory_share_lesson, speckit_memory_sync_shared, speckit_memory_init_project) to manage the SQLite cache and synchronize lessons in the background.
Proactive Self-Governance (Confidence > 50%)
Do not wait for a manual capture request at the end of your task. If you evaluate your confidence in a newly discovered design pattern, architectural trade-off, or bug resolution to be greater than 50%, you MUST proactively surface it for capture:
- 80–100% confident: Propose the entry inline, state your confidence, and invoke
/speckit.memory-md.captureimmediately — awaiting a single user confirmation before writing. - 50–80% confident: Surface the proposal in the conversation and ask: "I've identified a potential lesson worth capturing: [X]. Shall I record it?"
- For global sharing: After local approval, call
speckit_memory_share_lessonto propagate valuable, stack-specific lessons to the global shared memory.
⚠️ Never write directly to
docs/memory/files. Always use thecaptureflow orspeckit_memory_registerso thatINDEX.mdand the SQLite cache stay in sync.
Memory Source of Truth
- Governance:
.specify/memory/(Constitution, Architecture, Workflow) - Durable:
docs/memory/(History, Decisions, Patterns) - Active:
specs/<feature>/(Local context and synthesis)
A task is not fully complete until memory has been reviewed and systemic lessons are captured.
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
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.

