Skip to content

Commit 69f8bbb

Browse files
author
Focaxis Dev
committed
Release v0.4.0 feedback-aware recall
1 parent 87e9abd commit 69f8bbb

24 files changed

Lines changed: 441 additions & 37 deletions

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [0.4.0] - 2026-04-24
6+
7+
- Reframed the README and package metadata around repo-local Markdown memory for AI coding agents.
8+
- Added observable recall budget reporting to scripted scans and the TypeScript engine.
9+
- Added recall feedback as a lightweight reward signal with `helpful`, `irrelevant`, `missed`, and `overloaded` outcomes.
10+
- Added `memory/recall-feedback.jsonl` templates and example feedback records.
11+
- Expanded memory linting for feedback records, status values, weights, date formats, scope naming, and unsafe record paths.
12+
- Updated protocol, workflow, scripted recall, storage, templates, and examples for Deja Vu Protocol v0.4.
13+
- Updated package metadata for the 0.4.0 release.
14+
515
## [0.3.1] - 2026-04-23
616

717
- Added impression cue quality warnings to `deja-vu-lint-memory` for sparse, oversized, duplicate, generic, and repeated keyword sets.

README.md

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,31 @@
11
# Deja Vu
22

3-
**Stop AI agents from forgetting project context without adding a database, vector store, or memory service.**
3+
**Persistent project memory for AI coding agents, stored in your repo as Markdown and JSONL.**
44

5-
Deja Vu is an AI agent memory protocol for teams that want durable project context in ordinary repo files.
5+
Deja Vu helps Codex, Claude Code, Cursor, Windsurf, and other coding agents remember project decisions, architecture context, open loops, and team preferences across new chats.
66

7-
Most agent memory tools start by storing more text. Deja Vu starts by asking a cheaper question: does this task feel familiar enough to justify loading memory at all?
7+
It does not require a database, vector store, embedding model, hosted memory service, or npm package.
88

99
```text
10-
before: agent reads too much, forgets why decisions were made, or carries noisy transcript history
11-
after: agent scans tiny cues, loads only relevant memory, and writes back durable project knowledge
10+
problem: every new agent session forgets why the project works the way it does
11+
result: the agent scans tiny repo-local cues, recalls only relevant memory, and writes back durable context
1212
```
1313

14+
Start with three files:
15+
16+
- `AGENTS.md`
17+
- `memory/summary.md`
18+
- `memory/impressions.jsonl`
19+
20+
Use Deja Vu if your team keeps repeating:
21+
22+
- "We already decided this."
23+
- "The agent forgot the architecture again."
24+
- "Do not load the whole repo history into context."
25+
- "We want memory in git, not in a vendor service."
26+
27+
Most agent memory tools start by storing more text. Deja Vu starts by asking a cheaper question: does this task feel familiar enough to justify loading memory at all?
28+
1429
The core loop is intentionally small:
1530

1631
```text
@@ -25,10 +40,13 @@ It is packaged as three project-local assets:
2540

2641
No server. No hidden state. No required npm package. The base protocol works with Markdown and JSONL files that live beside the code.
2742

43+
If you found this on npm: the package is only the optional TypeScript engine and CLI tooling. The main product is the repo-local memory protocol you can copy into any project.
44+
2845
Use Deja Vu when you want:
2946

3047
- project memory that survives a new chat or agent session
3148
- low-token recall before planning, coding, or answering
49+
- observable recall budget and recall outcome feedback
3250
- durable decisions, preferences, open loops, and architecture intent in plain files
3351
- an optional TypeScript semantic engine only when the project outgrows the file-first protocol
3452

@@ -43,11 +61,13 @@ It answers:
4361
- how memory should be stored in ordinary project files
4462
- when memory should be updated, compacted, or retired
4563

46-
The minimum viable setup uses two project-local plain text files:
64+
The minimum viable setup uses two project-local plain text files, with one optional feedback ledger when recall results should change future behavior:
4765

4866
- `memory/summary.md`
4967
- `memory/impressions.jsonl`
5068

69+
- `memory/recall-feedback.jsonl`
70+
5171
No npm package, embeddings, vector search, or database is required.
5272

5373
## Start Here
@@ -78,7 +98,9 @@ Deja Vu follows a cue-first lifecycle:
7898
3. Load the project summary when the scan finds weak familiarity.
7999
4. Load one to three detailed records only when the scan finds strong familiarity or the task requires depth.
80100
5. Write back only durable outcomes that should change a future agent's behavior.
81-
6. Compact or supersede memories when detail becomes repetitive or stale.
101+
6. Record whether recall was helpful, irrelevant, missed, or overloaded when that feedback should tune future memory.
102+
103+
7. Compact or supersede memories when detail becomes repetitive or stale.
82104

83105
This keeps memory project-local, readable, and easy to maintain across new conversations.
84106

@@ -88,6 +110,7 @@ This keeps memory project-local, readable, and easy to maintain across new conve
88110
memory/
89111
summary.md
90112
impressions.jsonl
113+
recall-feedback.jsonl
91114
decisions/
92115
open-loops/
93116
events/
@@ -229,4 +252,5 @@ npm run lint:memory
229252
- [docs/bootstrap-instructions.md](./docs/bootstrap-instructions.md)
230253
- [docs/project-rules-template.md](./docs/project-rules-template.md)
231254
- [docs/release-v0.3.1.md](./docs/release-v0.3.1.md)
255+
- [docs/release-v0.4.0.md](./docs/release-v0.4.0.md)
232256
- [llms.txt](./llms.txt)

docs/bootstrap-instructions.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This document tells an agent how to bootstrap Deja Vu into a project using the p
77
Give a project durable memory continuity using only:
88

99
- project rules
10-
- two minimum Markdown memory files
10+
- minimum Markdown and JSONL memory files
1111
- the cue-first Deja Vu workflow
1212

1313
## Trigger conditions
@@ -55,11 +55,13 @@ Create or update:
5555
- `memory/summary.md`
5656
- `memory/impressions.jsonl`
5757
- `scripts/dejavu-scan-memory.mjs`
58+
- `memory/recall-feedback.jsonl` when feedback should tune future recall
5859

5960
Add only when useful:
6061

6162
- `memory/decisions/`
6263
- `memory/open-loops/`
64+
- `memory/recall-feedback.jsonl`
6365
- `memory/events/`
6466
- `memory/context/project-context.md`
6567
- `memory/index.md`

docs/protocol.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Deja Vu Protocol v0.3
1+
# Deja Vu Protocol v0.4
22

33
Deja Vu is a cue-first memory protocol for AI agents.
44

@@ -11,6 +11,7 @@ Enable any agent to maintain useful project memory with extremely low per-conver
1111
- project rules
1212
- a repeatable workflow
1313
- project-local plain text memory cues
14+
- recall feedback that tells the project what was useful, noisy, missed, or overloaded
1415

1516
The protocol must work without a custom runtime, package install, embedding model, or vector database.
1617

@@ -62,6 +63,7 @@ Recommended artifacts:
6263

6364
- `memory/decisions/`
6465
- `memory/open-loops/`
66+
- `memory/recall-feedback.jsonl`
6567

6668
Optional artifacts:
6769

@@ -81,6 +83,7 @@ Before substantial planning, coding, or answering:
8183
4. If the scan is `weak`, read `memory/summary.md`.
8284
5. If the scan is `strong`, open only the detailed records needed for the current task.
8385
6. If no script is available, fall back to `memory/summary.md` and only then to `memory/index.md` when present.
86+
7. Track the recall budget used for the task: impression scan, summary count, detailed records, and why anything was loaded.
8487

8588
Default recall budget:
8689

@@ -108,7 +111,22 @@ After meaningful work completes:
108111
5. Update `memory/index.md` when the project uses one.
109112
6. Update `memory/events/` only when the work should remain discoverable without becoming a durable record.
110113

111-
### 4. Compaction
114+
### 4. Recall Feedback
115+
116+
When recall quality changes future behavior, append a compact feedback record to `memory/recall-feedback.jsonl`.
117+
118+
Allowed outcomes:
119+
120+
- `helpful`: the loaded memory improved the work
121+
- `irrelevant`: the loaded memory matched the cue but did not help
122+
- `missed`: useful memory existed but the scan did not surface it
123+
- `overloaded`: recall loaded too much detail for the task
124+
125+
Feedback is the reward signal for future memory maintenance. Use it to tune keywords, weights, thresholds, summaries, open loops, or supersession.
126+
127+
Do not log every task. Record feedback only when it should change future recall.
128+
129+
### 5. Compaction
112130

113131
When related memories become repetitive, stale, or too granular:
114132

docs/release-v0.4.0.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Deja Vu v0.4.0: Feedback-Aware Memory for AI Coding Agents
2+
3+
Deja Vu stores persistent project memory for AI coding agents in repo-local Markdown and JSONL, without a database, vector store, embedding model, or hosted memory service.
4+
5+
v0.4.0 turns recall into an observable feedback loop. Agents can now see why memory was loaded, how much recall budget was spent, and whether the result was helpful, irrelevant, missed, or overloaded.
6+
7+
## Why It Matters
8+
9+
AI coding agents lose useful project context between chats. Most memory systems answer by storing and retrieving more text. Deja Vu keeps the first step cheap: scan tiny cues, load only what the task justifies, and write back durable context that belongs in git.
10+
11+
This release adds the missing reward signal. A project can now learn which memory routes are worth keeping, which ones are noisy, and which cues missed important context.
12+
13+
## Highlights
14+
15+
- Recall budget output for scripted scans and the optional TypeScript engine.
16+
- Recall feedback outcomes: `helpful`, `irrelevant`, `missed`, and `overloaded`.
17+
- New `memory/recall-feedback.jsonl` template and example records.
18+
- Stronger memory linting for feedback, weights, statuses, dates, scopes, and record paths.
19+
- README and package metadata tuned for AI coding agent memory discovery.
20+
- Protocol, workflow, scripted recall, storage, templates, and examples updated to Deja Vu Protocol v0.4.
21+
22+
## Upgrade Notes
23+
24+
The minimum protocol still works with:
25+
26+
- `AGENTS.md`
27+
- `memory/summary.md`
28+
- `memory/impressions.jsonl`
29+
30+
Add `memory/recall-feedback.jsonl` when recall quality should tune future memory behavior. Do not log every scan; record feedback only when it changes what the project should remember, ignore, lower in weight, or revise.
31+
32+
## Suggested GitHub Release Title
33+
34+
Deja Vu v0.4.0: Feedback-Aware Memory for AI Coding Agents
35+
36+
## Suggested Tagline
37+
38+
Repo-local Markdown memory for AI coding agents, now with observable recall budgets and feedback outcomes.

docs/scripted-recall.md

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ The linter also warns about low-quality cue routes that make future recall more
2626
- duplicate keywords inside one record
2727
- too many generic keywords
2828
- duplicate keyword sets across records
29+
- invalid recall feedback outcomes
30+
- invalid weight, status, scope, date, or unsafe record paths
2931

3032
## Inputs
3133

@@ -60,6 +62,16 @@ The script prints JSON:
6062
"matched_keywords": ["protocol", "memory"]
6163
}
6264
],
65+
"budget": {
66+
"impression_scan": 1,
67+
"summaries_loaded": 0,
68+
"detail_records_loaded": 0,
69+
"why_loaded": ["cue scan found a weak familiarity match"]
70+
},
71+
"feedback_hint": {
72+
"outcomes": ["helpful", "irrelevant", "missed", "overloaded"],
73+
"write_to": "memory/recall-feedback.jsonl"
74+
},
6375
"diagnostics": []
6476
}
6577
```
@@ -70,14 +82,17 @@ The script prints JSON:
7082
2. Treat `none` as permission to avoid detailed memory reads.
7183
3. Treat `weak` as a reason to read `memory/summary.md` and maybe one linked record.
7284
4. Treat `strong` as a reason to open the linked record before planning.
73-
5. Continue to apply normal writeback and compaction rules after work completes.
85+
5. Watch `budget` before loading more memory.
86+
6. Record recall feedback only when the result should tune future cue quality.
87+
7. Continue to apply normal writeback and compaction rules after work completes.
7488

7589
## Bootstrap Rule
7690

7791
When installing Deja Vu into a project, copy or create:
7892

7993
- `memory/impressions.jsonl`
8094
- `memory/summary.md`
95+
- `memory/recall-feedback.jsonl`
8196
- `scripts/dejavu-scan-memory.mjs`
8297

8398
The script is intentionally small. Hosts may replace it with a faster native implementation, but the input and output contract should stay stable.
@@ -89,3 +104,22 @@ Run the linter after bootstrap and after memory file migrations:
89104
```bash
90105
node scripts/dejavu-lint-memory.mjs
91106
```
107+
108+
## Recall Feedback
109+
110+
Use `memory/recall-feedback.jsonl` as a small reward signal for the memory system.
111+
112+
Each line is one JSON object:
113+
114+
```json
115+
{"schema_version":1,"query":"release feedback memory","matched_id":"decision-protocol-first","outcome":"helpful","created":"2026-04-24T12:00:00Z","note":"The decision record prevented a duplicate engine-first proposal."}
116+
```
117+
118+
Allowed outcomes:
119+
120+
- `helpful`
121+
- `irrelevant`
122+
- `missed`
123+
- `overloaded`
124+
125+
Do not log every scan. Add feedback only when it should change future keywords, weights, summaries, thresholds, or supersession.

docs/storage-markdown.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ These paths are the stable minimum. Agents may add more files when they improve
1818
memory/
1919
summary.md
2020
impressions.jsonl
21+
recall-feedback.jsonl
2122
decisions/
2223
open-loops/
2324
```
@@ -85,6 +86,33 @@ Each line must be one JSON object with:
8586
- `record_path`
8687
- `updated`
8788

89+
### `memory/recall-feedback.jsonl`
90+
91+
Purpose:
92+
93+
- record recall outcomes that should tune future memory behavior
94+
- capture reward signals without logging full transcripts
95+
- identify helpful, irrelevant, missed, or overloaded recall routes
96+
97+
Each line must be one JSON object with:
98+
99+
- `schema_version`
100+
- `query`
101+
- `outcome`
102+
- `created`
103+
104+
Optional fields:
105+
106+
- `matched_id`
107+
- `note`
108+
109+
Allowed outcomes:
110+
111+
- `helpful`
112+
- `irrelevant`
113+
- `missed`
114+
- `overloaded`
115+
88116
### `memory/events/`
89117

90118
Purpose:

docs/templates/AGENTS.template.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Protocol identity
44

5-
- Protocol: Deja Vu Protocol v0.3
5+
- Protocol: Deja Vu Protocol v0.4
66
- Scope: `project:<project-id>`
77
- Memory root: `memory/`
88

@@ -18,6 +18,8 @@ Before substantial planning, coding, or answering:
1818
4. If the result is `strong`, open the linked detailed record.
1919
5. If the script is missing, fall back to `memory/summary.md` and then `memory/index.md` when present.
2020

21+
6. Keep the scan output's budget fields visible before loading more memory.
22+
2123
Recall budget:
2224

2325
- impression scan: always allowed
@@ -36,6 +38,8 @@ After meaningful work completes:
3638
5. Update `memory/index.md` if the project uses one.
3739
6. Add a short entry to `memory/events/` only when the work should remain discoverable without becoming durable memory.
3840

41+
7. Append `memory/recall-feedback.jsonl` only when recall was helpful, irrelevant, missed, or overloaded in a way that should tune future memory.
42+
3943
Good writeback candidates:
4044

4145
- decisions
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"schema_version":1,"query":"example task cue","matched_id":"summary","outcome":"helpful","created":"2026-04-24T12:00:00Z","note":"This recall changed future memory behavior."}

0 commit comments

Comments
 (0)