Open Reasoning Format (ORF) is a file-based specification that gives AI coding agents persistent memory of past problem-solving experience. Lessons are stored as plain Markdown files under an experiences/ directory β no vector databases, no embedding pipelines, no server infrastructure required.
Why ORF Exists
The Problem
Most agent sessions start cold. Every time the context window resets, the agent re-learns the same:
- Framework gotchas
- Parser edge cases
- Command failures
- Deployment traps
- Debugging paths
This repetition wastes tokens, time, and reliability.
Existing Approaches Fall Short
| Approach | Problem |
|---|---|
| Large RAG / vector systems | Adds embedding pipelines and retrieval infrastructure |
| Single giant memory file | Loads too much irrelevant context; hard to maintain |
The ORF Solution
ORF treats hard-won agent experience as source-controlled project knowledge. Each lesson is a small, structured playbook that records:
- The objective that triggered the lesson
- The trap or failure mode encountered
- An abstracted, reusable insight
- The validated path that worked
- A verification checklist
Think of it as a compact technical wiki for agents β not a search system or a monolithic prompt file.
Core Architecture
All experiences live under a single project-local directory:
<project-root>/
βββ experiences/
βββ INDEX.md
βββ <domain>/
βββ EXP-<YYYYMMDD>-<sequence>.md
Key design decisions:
- No database or daemon β files are plain Markdown, readable by humans and cheap for agents to inspect.
- Git-native β every file can be diffed, reviewed, and reverted like any other source artifact.
INDEX.mdas router β lists categories with short descriptions so an agent can determine whether relevant memory exists before loading any details.
Experience File Structure
Each experience file is a Markdown document with YAML frontmatter and five mandatory sections.
Step 1 β Frontmatter (Metadata)
---
id: "EXP-<YYYYMMDD>-<sequence>"
title: "<Short, imperative title>"
description: "<When to load this experience>"
domain: "<domain-id>"
keywords: [keyword1, keyword2]
complexity: "low" | "medium" | "high"
created_at: "YYYY-MM-DD"
---
Step 2 β Body Sections
## 1. Objective
<What task triggered the experience>
## 2. The Trap
<The naive path, failure mode, error, or edge case>
## 3. Abstracted Insight
> **Core Principle:** <Reusable heuristic>
## 4. Validated Path
<The commands, edits, or steps that worked>
## 5. Verification Checklist
- [ ] <How to confirm the path still works>
Why these two sections matter most:
- The Trap makes failure modes first-class, so a future agent can match on symptoms before it even knows the fix.
- Abstracted Insight forces the lesson above a one-off execution log into a reusable rule of thumb.
How Agents Retrieve Memory (Progressive Disclosure)
ORF never loads every memory file into context. Instead, it uses a three-step retrieval pattern that is intentionally token-budgeted:
| Step | Action | What the Agent Learns |
|---|---|---|
| 1 | List categories | Which experience domains exist |
| 2 | Read frontmatter for a category | Which specific lessons may match |
| 3 | Read one full experience | The full trap, insight, path, and checklist |
How it works in practice:
- Inspect low-cost category metadata (cheap).
- Scan frontmatter for one domain (cheap).
- Load the full body only after a match is found (expensive, done once).
This mirrors the discovery pattern used by agent skills: show cheap summaries first, reveal expensive detail only after a match is confirmed.
Reference CLI
A lightweight Python CLI handles both retrieval and recording.
Retrieving Experiences
# Step 1 β See which domains have recorded experience
python3 manage-experience/scripts/experiences.py list-categories
# Step 2 β Read frontmatter for a specific category
python3 manage-experience/scripts/experiences.py get-frontmatter --category python-scripting
# Step 3 β Read a specific experience in full
python3 manage-experience/scripts/experiences.py read-experience --id EXP-20260720-0001
Recording a New Experience
python3 manage-experience/scripts/experiences.py create-experience --domain cloud-run ...
Important:
create-experiencewrites the new file and updatesINDEX.md, but does not commit anything. This is a deliberate trust boundary β new memory appears as a normal working-tree change for human review before it becomes part of the project’s knowledge base.
Packaging as an Agent Skill
ORF also packages the experience workflow as an agentskills.io-style skill named manage-experience. A compliant host can:
- Discover the skill automatically.
- Run retrieval at the start of a complex task.
- Record a new experience after resolving something non-trivial.
The Two-Phase Lifecycle
Task Start Task End
β β
βΌ βΌ
Consult prior experience Record the lesson for
via progressive disclosure future agents to use
This feedback loop is ORF’s core goal: agent work should improve the next agent run instead of disappearing with the session.
Adoption: Step-by-Step Checklist
Follow these steps to add ORF to a project:
- Step 1 β Create
experiences/INDEX.mdwith your initial domain categories. - Step 2 β Add the
manage-experienceskill and reference CLI to the project. - Step 3 β Configure the agent to consult ORF at the start of complex tasks.
- Step 4 β Configure the agent to record a new experience after resolving a non-obvious trap.
- Step 5 β Review
experiences/changes like source code so stale or low-quality memory does not accumulate.
Where ORF Fits: Lineage
ORF combines ideas from three adjacent formats and research directions:
| Influence | What ORF Borrows |
|---|---|
| Reasoning Bank | Store abstracted heuristics and named traps, not raw trajectories |
| Open Knowledge Format | Use Markdown + YAML frontmatter as a portable, Git-native representation |
| Agent Skills | Use progressive disclosure so agents load summaries before full detail |
ORF is a narrow format for episodic problem-solving memory β not general organizational knowledge, not a tool skill registry, and not a semantic search corpus.
Evaluation Model
ORF uses a cold-versus-warm evaluation flow to measure effectiveness:
- Cold run β an agent attempts a task without any prior experience files.
- Spec validation β generated experience files are checked for required frontmatter and sections.
- Warm run β a fresh agent repeats the same task with the recorded experience available.
Early results show fewer repeated debugging steps in warm runs. Sample sizes are small, so treat findings as directional: ORF demonstrates that structured experience files can help a later agent avoid a known trap.
Compared With Alternatives
| Capability | ORF | Vector DB / RAG Memory | Monolithic Memory File |
|---|---|---|---|
| Infrastructure | Filesystem only | Embeddings + vector store | Filesystem only |
| Retrieval | Metadata-first progressive disclosure | Semantic top-k retrieval | Everything loads |
| Human review | Git-native Markdown | Often opaque or indirect | Git-native text |
| Write path | Structured agent-created experiences | Usually separate ingestion | Manual edits |
| Best fit | Small-to-medium lessons learned stores | Large unstructured corpora | Small stable context |
ORF is strongest when the memory unit is a reusable operational lesson: a trap, fix, command sequence, framework gotcha, or validated debugging path.
Strengths
| Strength | Detail |
|---|---|
| No infrastructure | Adoption can be as small as adding a folder, a skill, and a Python script |
| Git-native | Experience records can be diffed, reviewed, blamed, reverted, and discussed in PRs |
| Token-aware | Retrieval is staged so agents do not load every past lesson into context |
| Trap-oriented | The format optimizes for recognizing recurring failure modes, not just matching topics |
| Agent-writable | Memory can compound over repeated task execution instead of remaining a static document |
Limitations
| Limitation | Detail |
|---|---|
| Early draft | v0.1.0 should be treated as experimental |
| Abstraction quality not guaranteed | Agents may still record overly specific lessons despite the schema |
| Staleness unresolved | Validated paths can decay as dependencies, tools, and platforms change |
| Deduplication undefined | Overlapping or conflicting experiences need human or future-tool consolidation |
| Team sharing still open | Cross-repo experience distribution is not yet fully specified |
Bottom Line
ORF is a practical pattern for agent memory: structured, local, auditable, and cheap to query.
Its most useful idea is not the file extension or CLI, but the discipline of turning agent trial-and-error into small reusable playbooks that future agents can discover before repeating the same mistake.