Every AI assistant has a finite context window, and every session eventually ends. In long-running software projects — the kind that span days, weeks, or team members — the silent loss of accumulated engineering knowledge between sessions is one of the most expensive hidden costs of AI-assisted development. dbv-specs-ops addresses this directly with a two-file context architecture:Documentation Index
Fetch the complete documentation index at: https://mintlify.com/davidbuenov/dbv-specs-ops/llms.txt
Use this file to discover all available pages before exploring further.
memory.md and task.md. These files are not optional organizational conveniences; they are the primary mechanism by which the framework eliminates AI amnesia and keeps token consumption predictable across the full project lifecycle.
The Two Context Files
The boundary between the two files is intentional and must be maintained precisely.memory.md — Qualitative Knowledge
memory.md is the project’s persistent engineering brain. It stores knowledge that has no expiry date: the reasoning behind decisions, the lessons extracted from failures, and the current focus area of the product. It is designed to be read by the AI at the start of every session to reconstruct the technical thread.
Its four sections serve distinct purposes:
- Active Context (
## 🎯 Contexto Activo): A brief description of the current development state and the immediate focus area. Updated when the project’s direction changes significantly. - Technical Decisions Log (
## 🏗️ Log de Decisiones Técnicas): A lightweight ADR (Architecture Decision Record) log. Each entry explains why a technical route was taken — library choices, architectural pivots, security tradeoffs — with a date. This is where the Adversarial Architect Review deposits accepted risks. - Lessons Learned (
## ⚠️ Lecciones Aprendidas): Notes on specific bugs, failed configurations, or refactors that must not be repeated. These entries protect future sessions (and future developers) from re-discovering the same pitfalls. - Relations Map (
## 🗺️ Mapa de Relaciones): A brief description of how current modules interact — their responsibilities and dependencies — so the AI can navigate the codebase without reading every file.
task.md — Operational State
task.md is the project’s real-time logbook. It stores data that is precise, time-stamped, and task-bound: the active checklist, the backlog, and the Context Snapshot — the exact re-entry point for the next session. Where memory.md answers “why did we build it this way?”, task.md answers “where exactly did we stop, and what is the next concrete action?”
If information is useful for both files, the routing rule is clear: data with a specific date or step → task.md; reasoning, lessons, and architectural decisions → memory.md.
Memory Trigger Rules
The AI does not wait for the end of a task to updatememory.md. Specific in-workflow events act as Memory Triggers that require immediate updates:
- During
/build: If the implementation modifies or contradicts a decision already documented indocs/ARCHITECTURE.md, the AI records it inmemory.mdunder## 🏗️ Log de Decisiones Técnicasimmediately — not deferred to/ship. - During
/test: If a test reveals that a documented assumption indocs/SPECIFICATIONS.mdwas incorrect, the AI records it inmemory.mdunder## ⚠️ Lecciones Aprendidasimmediately. - During
/plan: If the Adversarial Architect Review identifies a risk that is consciously accepted, it is logged inmemory.mdbefore the plan proceeds.
The Memory Gate in /ship
At the end of every task cycle, the /ship phase includes a mandatory Memory Gate. Before the task can be closed, the AI must print a structured XML block in the chat that makes the knowledge extraction decision explicit and visible:
memory.md over time — every session either adds verified knowledge or explicitly confirms there is nothing to add.
Context Snapshots in task.md
A Context Snapshot is a brief structured entry written at the bottom of task.md whenever a session is about to end or a conversation is approaching its token limit. It contains exactly the information needed to resume work without any loss of precision.
A Context Snapshot records:
- The date of the last update
- The exact point reached in the current task
- What remains pending (the next concrete action)
- The immediate next step in specific, actionable terms
The “Consult First, Update After” Pattern
The two-file architecture is governed by a single behavioral rule that applies at every session boundary:- Consult first: Before proposing any code, the AI reads
project.config.md,SPECIFICATIONS.md,memory.md, andtask.md. Consultingmemory.mdat the start of every session is mandatory — it is the only way to recover the technical thread. - Update after: After each milestone, the AI updates the operational state in
task.mdand proposes updates tomemory.mdwhen a decision, deviation, or lesson has emerged.
memory.md and task.md are always consistent with the actual state of the project — not a stale snapshot from weeks ago.
Practical Example: Resuming a Session
Imagine returning to a project after a week away, or switching from Claude to Windsurf mid-project. The resume sequence is:- Open your AI assistant. The activation file (
CLAUDE.md,GEMINI.md,.windsurfrules) loadsMASTER_PROMPT.mdautomatically. - The AI reads
memory.md→ recovers architectural decisions, active context, and lessons. - The AI reads
task.md→ finds the Context Snapshot with the exact next step. - The AI reports its understanding: “Last session completed version 2.1.0. The pending action is to confirm and push the Git tag.”
- Development resumes from the precise point where it stopped — no re-explanation, no reconstruction, no duplicated work.