mit einem Klick
memory-contract
// Unified Memory Contract for Flowbaby integration. Defines when and how to retrieve and store memory. Load at session start - memory is core to agent reasoning, not optional.
// Unified Memory Contract for Flowbaby integration. Defines when and how to retrieve and store memory. Load at session start - memory is core to agent reasoning, not optional.
Code review checklist, severity definitions, and document templates. Load when performing code reviews or defining review criteria.
Unified document lifecycle management. Defines terminal statuses, unified numbering via .next-id, close procedures, and orphan detection. Load at session start.
TDD workflow and test strategy patterns including test pyramid, coverage strategies, mocking approaches, and anti-patterns. Load when writing tests, designing test strategies, or reviewing test coverage.
Common software architecture patterns, ADR templates, and anti-pattern detection. Supports architectural review, design decisions, and system documentation.
Version management, release verification, and deployment procedures for software releases. Includes semver guidance, version consistency checks, and platform-specific constraints.
Security vulnerability detection patterns including OWASP Top 10, language-specific vulnerabilities, and remediation guidance. Load when reviewing code for security issues, conducting audits, or implementing authentication/authorization.
| name | memory-contract |
| description | Unified Memory Contract for Flowbaby integration. Defines when and how to retrieve and store memory. Load at session start - memory is core to agent reasoning, not optional. |
| license | MIT |
| metadata | {"author":"groupzer0","version":"1.0"} |
Using Flowbaby tools (flowbabyStoreSummary and flowbabyRetrieveMemory) is mandatory.
Memory is not a formality—it is part of your reasoning. Treat retrieval like asking a colleague who has perfect recall of this workspace. Treat storage like leaving a note for your future self who has total amnesia.
The cost/benefit rule: Retrieval is cheap (sub-second, a few hundred tokens). Proceeding without context when it exists is expensive (wrong answers, repeated mistakes, user frustration). When in doubt, retrieve.
Retrieve at decision points, not just at turn start. In a typical multi-step task, expect 2–5 retrievals.
Retrieve when you:
If no results: Broaden to concept-level and retry once. If still empty, proceed and note the gap.
Queries should be specific and hypothesis-driven, not vague or encyclopedic.
| ❌ Weak query | ✅ Strong query |
|---|---|
| "What do I know about this project?" | "Previous decisions about authentication strategy in this repo" |
| "Any relevant memory?" | "Did we try Redis for caching? What happened?" |
| "User preferences" | "User's stated preferences for error handling verbosity" |
| "Past work" | "Implementation status of webhook retry logic" |
Heuristic: State the question you're trying to answer, not the category of information you want.
Store at value boundaries—when you've created something worth preserving. Ask: "Would I be frustrated to lose this context?"
Store when you:
Do not store:
Structure summaries for downstream graph extraction:
Decision, Problem, Solution, Plan, Analysis, File, Configuration, Version.Fallback minimum: If you haven't stored in 5 turns, store now regardless.
Always end storage with: "Saved progress to Flowbaby memory."
| Anti-pattern | Why it's harmful |
|---|---|
| Retrieve once at turn start, never again | Misses context that becomes relevant mid-task |
| Store only at conversation end | Loses intermediate reasoning; if session crashes, everything is gone |
| Generic queries ("What should I know?") | Returns noise; specificity gets signal |
| Skip retrieval to "save time" | False economy—retrieval is fast; redoing work is slow |
| Store every turn mechanically | Pollutes memory with low-value entries |
| Treat memory as write-only | If you never retrieve, you're journaling, not learning |
If flowbabyRetrieveMemory or flowbabyStoreSummary calls fail or are rejected:
#flowbabyRetrieveMemory {
"query": "Specific question or hypothesis about prior context",
"maxResults": 3
}
#flowbabyStoreSummary {
"topic": "3–7 word title",
"context": "300–1500 chars: what happened, why, constraints, dead ends",
"decisions": ["Decision 1", "Decision 2"],
"rationale": ["Why decision 1", "Why decision 2"],
"metadata": {"status": "Active"}
}