rag-tracking
Memory Skill
Persistent memory for dragster document processing. Track collections, ingestion history, and issues across sessions.
When to Use This Skill
Use this skill when:
- Working with agents that lack persistent memory (Claude Code, Codex, OpenCode, etc.)
- Sharing ingestion state across multiple agents or team members
- Running in CI/CD environments where agent memory doesn't persist
NOT needed for:
- Letta Code — has built-in persistent memory (system, progressive, recall)
- Any agent platform with native long-term memory support
For Letta Code users, simply store collection state in your agent's memory files instead.
Memory Files
ctx Default Files (created by ctx init)
| File | Purpose | When to Use |
|---|---|---|
TASKS.md |
Active work | Track what we're doing now |
DECISIONS.md |
Architecture decisions | Record why we chose X |
LEARNINGS.md |
Patterns learned | Store discovered patterns |
CONVENTIONS.md |
Coding conventions | Define how we work |
Dragster-Specific Files (our templates)
| File | Purpose | When to Use |
|---|---|---|
COLLECTIONS.md |
Collection state + ingestion history | Before/after ingesting documents |
ISSUES.md |
Parsing problems + workarounds | When encountering errors |
Location
These files live in .context/ (ctx's directory) for cross-session persistence:
.context/
├── COLLECTIONS.md # What we've indexed
├── ISSUES.md # What's broken
├── TASKS.md # (ctx default) Active work
├── DECISIONS.md # (ctx default) Architecture decisions
├── LEARNINGS.md # (ctx default) Patterns learned
└── CONVENTIONS.md # (ctx default) Conventions
Templates vs Runtime Files
The files in this skill directory (skills/memory/) are templates for reference.
Runtime files live in .context/ (managed by ctx):
.context/
├── COLLECTIONS.md # Created by ctx init or copied from template
├── ISSUES.md # Created when first issue is recorded
└── ...
Initial Setup
- Install ctx:
brew install worktrunk(or see ctx.ist) - Initialize ctx in your project:
ctx init- This creates
.context/with TASKS.md, DECISIONS.md, LEARNINGS.md, CONVENTIONS.md
- This creates
- Copy dragster templates to
.context/:cp skills/memory/COLLECTIONS.md .context/ cp skills/memory/ISSUES.md .context/ - Copy ctx configuration (optional, enables hooks):
cp skills/memory/ctxrc.template .ctxrc - Add dragster-specific patterns to LEARNINGS.md:
ctx add learning "French government PDFs require --ocr-language fra" ctx add learning "Scanned documents benefit from --dpi 300"
Enable/Disable
Set enabled: false in the frontmatter to disable this skill.
When disabled, the skill won't be loaded by Letta Code and hooks won't fire.
To re-enable: change back to enabled: true.
Commands
Record Ingestion
After successfully ingesting documents, add an entry to COLLECTIONS.md and update the Collections table.
Record Issue
When encountering a parsing problem, add an entry to ISSUES.md with the error and any workaround found.
Promote to Learning
When a pattern is discovered, promote to LEARNINGS.md via:
ctx add learning "<pattern-description>"
Workflow
Starting a Session
- Read
.context/COLLECTIONS.mdto understand current state - Check
.context/ISSUES.mdfor any open problems - Proceed with document processing
After Ingestion
- Update
COLLECTIONS.mdwith ingestion details - If issues occurred, add entries to
ISSUES.md - If patterns discovered, promote to
LEARNINGS.md
Session Wrap-up
- Review open issues in
ISSUES.md - Mark resolved issues
- Ensure collections table is accurate
Integration with ctx
This skill integrates with ctx's memory system:
ctx agentincludes COLLECTIONS.md and ISSUES.md in context packetsctx add learningpromotes patterns to persistent memoryctx statusshows memory file health
Hooks
Hooks provide automatic reminders at key points in the agent lifecycle.
Available Hooks
| Hook | When | Reminder |
|---|---|---|
session_start |
Session begins | Load memory context |
post_ingestion |
After lit parse or qmd |
Record ingestion |
pre_compact |
Before context compaction | Save state |
Configuration
Hooks are configured in .ctxrc (copy from skills/memory/ctxrc.template):
# .ctxrc
[hooks.session_start]
reminder = "📦 Memory: Read .context/COLLECTIONS.md and .context/ISSUES.md"
[hooks.post_tool_use]
match = "lit parse|qmd collection"
reminder = "Record this ingestion in .context/COLLECTIONS.md"
[freshness_files]
- path: .context/COLLECTIONS.md
desc: Document collection state
- path: .context/ISSUES.md
desc: Parsing problems and workarounds
Disabling Hooks
Set enabled: false in this skill's frontmatter to disable all hooks.
More from etalab-ia/dragster
memory
Maintain persistent memory for document ingestion and issues. Use when ingesting documents, tracking parsing problems, or recalling collection state. Works with ctx for cross-session persistence.
2rag-parse
Use this skill when the user asks to parse, perform multi-format document conversion or spatially extract text from an unstructured file (PDF, DOCX, PPTX, XLSX, images, etc.) locally without cloud dependencies.
2rag-index
Index a document corpus for semantic search. Use when the user wants to set up a knowledge base, create a searchable index from markdown documents, or enable semantic search. Triggers on keywords like "index documents", "create knowledge base", "setup search", "semantic search".
2rag-search
Search the knowledge base for relevant documents. Use when the user wants to find documents in their indexed corpus, has questions that could be answered by their documents, or needs context from their knowledge base. Triggers on keywords like "search documents", "find in knowledge base", "query index".
2parse
Use this skill when the user asks to parse, perform multi-format document conversion or spatially extract text from an unstructured file (PDF, DOCX, PPTX, XLSX, images, etc.) locally without cloud dependencies.
1search
Search the knowledge base for relevant documents. Use when the user wants to find documents in their indexed corpus, has questions that could be answered by their documents, or needs context from their knowledge base. Triggers on keywords like "search documents", "find in knowledge base", "query index".
1