@c-d-cc/reap 0.17.0 → 0.17.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/RELEASE_NOTICE.md +6 -0
- package/dist/cli/index.js +403 -251
- package/dist/templates/migration/v0.17.1.md +56 -0
- package/dist/templates/reap-guide.md +92 -37
- package/package.json +1 -1
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# v0.17.1 — Vision Memory Content-Type Reorganization
|
|
2
|
+
|
|
3
|
+
## What changed
|
|
4
|
+
|
|
5
|
+
Up through v0.17.0, REAP's vision memory tiers (`.reap/vision/memory/{shortterm,midterm,longterm}.md`) were classified by **lifespan** — "how long will this live?" That heuristic forced the AI to predict the future and led to repeated misclassification + bloat.
|
|
6
|
+
|
|
7
|
+
Starting with v0.17.1, tiers are classified by **content-type** — "what is this content for?" The decision is now mechanical and bloat-resistant.
|
|
8
|
+
|
|
9
|
+
| File | Role (new) | 1-line decision rule |
|
|
10
|
+
|------|------------|----------------------|
|
|
11
|
+
| `shortterm.md` | **Session handoff** — immediate context for the next session | "Is this needed right now?" |
|
|
12
|
+
| `midterm.md` | **Ongoing tracks** — multi-generation work in progress | "Is this an incomplete large track?" |
|
|
13
|
+
| `longterm.md` | **Design lessons** — recurring lessons worth re-reading | "Does this lesson prevent the next generation from making the same mistake?" |
|
|
14
|
+
|
|
15
|
+
A mandatory **reflect-phase pruning policy** was also added: shortterm is replaced (not appended) every generation, midterm sections get deleted on track completion (key decisions promoted to longterm), and longterm gets periodic dedup vs genome.
|
|
16
|
+
|
|
17
|
+
See `~/.reap/reap-guide.md` § Memory and `.reap/genome/evolution.md` § Vision 활용 원칙 for the full rules.
|
|
18
|
+
|
|
19
|
+
## Required actions for the AI agent
|
|
20
|
+
|
|
21
|
+
Apply these in order. Do **not** treat this as a code change — it is an artifact reorganization. No source code is touched.
|
|
22
|
+
|
|
23
|
+
1. **Read** the current state of all three memory files:
|
|
24
|
+
- `.reap/vision/memory/shortterm.md`
|
|
25
|
+
- `.reap/vision/memory/midterm.md`
|
|
26
|
+
- `.reap/vision/memory/longterm.md`
|
|
27
|
+
|
|
28
|
+
2. **Reclassify each entry** using the new decision tree (apply top-to-bottom):
|
|
29
|
+
```
|
|
30
|
+
1. Is this needed in the next session immediately? → shortterm.md
|
|
31
|
+
2. Is this an ongoing, incomplete track or plan? → midterm.md
|
|
32
|
+
3. Is this a finished design lesson worth preserving? → longterm.md
|
|
33
|
+
4. Finished, no special lesson? → DELETE (lineage + git history preserve it)
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
3. **Move misclassified entries** to the correct tier. Typical patterns to fix:
|
|
37
|
+
- "Will be useful eventually" / "background context" sitting in `longterm.md` but not driving any current behavior → delete
|
|
38
|
+
- Completed track summaries in `midterm.md` without a next step → delete (promote one-line lessons to `longterm.md` only if they prevent future mistakes)
|
|
39
|
+
- Stale session handoffs from earlier generations in `shortterm.md` → delete (shortterm is **replaced** every generation, not appended)
|
|
40
|
+
|
|
41
|
+
4. **Apply the size-bloat heuristics**:
|
|
42
|
+
- `longterm.md` should stay under ~30–50 lines. Over that = pruning was skipped.
|
|
43
|
+
- `midterm.md` should stay under ~50–70 lines. Over that = completed tracks weren't removed.
|
|
44
|
+
- `shortterm.md` should contain only the most recent 1–2 generations' handoff.
|
|
45
|
+
|
|
46
|
+
5. **Do NOT add new entries** during this migration. Goal is reorganization of what already exists. New lessons land in the next generation's normal reflect.
|
|
47
|
+
|
|
48
|
+
6. **Verify** the new classification by re-applying the decision tree to each entry one more time. If you can't justify keeping an entry under any of branches 1–3, delete it.
|
|
49
|
+
|
|
50
|
+
7. **Run** `reap update --mark-migrated` to record completion. This sets `lastMigratedVersion: 0.17.1` in `.reap/config.yml` so this instruction stops surfacing in subsequent SessionStart loads and `reap update` runs.
|
|
51
|
+
|
|
52
|
+
## Reference
|
|
53
|
+
|
|
54
|
+
- `~/.reap/reap-guide.md` § Memory — the canonical 3-tier definition + decision tree + pruning policy
|
|
55
|
+
- `.reap/genome/evolution.md` § Vision 활용 원칙 — same content in Korean (when project language is Korean)
|
|
56
|
+
- REAP gen-070 lineage entry — the generation that established this convention, with worked examples of compression (255 → 49 lines in this very project's longterm)
|
|
@@ -22,53 +22,72 @@ REAP consists of four interconnected layers:
|
|
|
22
22
|
|
|
23
23
|
## Memory
|
|
24
24
|
|
|
25
|
-
Memory is a free-form recording system under `.reap/vision/memory/` where AI can persist context across sessions and generations. Unlike Genome (which has modification constraints) or Lineage (which gets compressed), Memory is always accessible and freely writable.
|
|
25
|
+
Memory is a free-form recording system under `.reap/vision/memory/` where AI can persist project context across sessions and generations. Unlike Genome (which has modification constraints) or Lineage (which gets compressed), Memory is always accessible and freely writable.
|
|
26
26
|
|
|
27
|
-
### 3-Tier Structure
|
|
27
|
+
### 3-Tier Structure — content-type based
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|------|------|----------|---------|
|
|
31
|
-
| **Longterm** | `longterm.md` | Project lifetime | Lessons that bear repeating, recurring patterns, decision rationale, architecture choice reasons |
|
|
32
|
-
| **Midterm** | `midterm.md` | Multiple generations | Ongoing large task context, multi-generation plans, progress tracking |
|
|
33
|
-
| **Shortterm** | `shortterm.md` | 1-2 sessions | Next session handoff, immediate context to pass forward, unfinished discussions |
|
|
29
|
+
Tiers are classified by **what the content is for** (content-type), NOT by how long it will live (lifespan). Lifespan requires predicting the future, which the AI can't reliably do — that judgment burden has historically led to misclassification and bloat.
|
|
34
30
|
|
|
35
|
-
|
|
31
|
+
| File | Role | 1-line decision rule |
|
|
32
|
+
|------|------|----------------------|
|
|
33
|
+
| `shortterm.md` | **Session handoff** — immediate context to pass to the next session | "Is this needed right now?" |
|
|
34
|
+
| `midterm.md` | **Ongoing tracks** — multi-generation work in progress | "Is this an incomplete large track?" |
|
|
35
|
+
| `longterm.md` | **Design lessons** — recurring lessons worth re-reading | "Does this lesson prevent the next generation from making the same mistake?" |
|
|
36
36
|
|
|
37
|
-
|
|
38
|
-
- **AI discretion**: Content and timing are the AI's judgment. No mandatory updates
|
|
39
|
-
- **Tier fitness**: Place content in the tier matching its expected lifespan. Promote/demote between tiers as relevance changes
|
|
40
|
-
- **Keep concise**: Memory should be scannable, not exhaustive. Prefer bullet points over paragraphs
|
|
41
|
-
- **Empty is normal**: Memory files may be empty — this is a valid state
|
|
42
|
-
- **Git-committed**: Memory is committed with the project, accessible to any AI agent
|
|
37
|
+
### Memory Classification Decision Tree (mandatory for AI)
|
|
43
38
|
|
|
44
|
-
|
|
39
|
+
When you have something to write to memory, apply top-to-bottom:
|
|
45
40
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
41
|
+
```
|
|
42
|
+
1. Is this needed in the next session immediately?
|
|
43
|
+
→ Yes: shortterm.md
|
|
44
|
+
|
|
45
|
+
2. Is this an ongoing, incomplete track or plan?
|
|
46
|
+
→ Yes: midterm.md
|
|
47
|
+
|
|
48
|
+
3. Is this a finished design lesson worth preserving?
|
|
49
|
+
→ Yes: longterm.md
|
|
50
|
+
|
|
51
|
+
4. Is this finished with no special lesson?
|
|
52
|
+
→ Do NOT record (memory keeps no junk; lineage/git history preserves it)
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**Important**: Do not stash "might-be-useful" notes in longterm. If it disappears, it's still in lineage and git history.
|
|
49
56
|
|
|
50
|
-
###
|
|
57
|
+
### Memory Pruning Policy — mandatory in reflect phase
|
|
51
58
|
|
|
52
|
-
|
|
53
|
-
- Summary of what was done in this generation
|
|
54
|
-
- Context to hand off to the next session
|
|
55
|
-
- Undecided matters, ongoing discussions
|
|
56
|
-
- Current backlog state snapshot
|
|
59
|
+
During `reap run completion --phase reflect`, the AI **must** perform cleanup:
|
|
57
60
|
|
|
58
|
-
**
|
|
59
|
-
-
|
|
60
|
-
-
|
|
61
|
-
-
|
|
61
|
+
**Shortterm — every generation, mandatory**:
|
|
62
|
+
- Delete previous handoff items that are "already acted on"
|
|
63
|
+
- **Replace** (overwrite) with the new generation's handoff. No accumulation.
|
|
64
|
+
- Result: shortterm.md stays within "last 1~2 generations of content".
|
|
62
65
|
|
|
63
|
-
**
|
|
64
|
-
-
|
|
65
|
-
-
|
|
66
|
-
-
|
|
66
|
+
**Midterm — at track completion**:
|
|
67
|
+
- When a track completes, **promote** its key decisions to longterm and **delete** the section from midterm
|
|
68
|
+
- Decision rule: "Does this track have a next step?" — No → delete
|
|
69
|
+
- Result: midterm.md stays within "tracks that are alive right now".
|
|
67
70
|
|
|
68
|
-
**
|
|
69
|
-
-
|
|
70
|
-
-
|
|
71
|
-
-
|
|
71
|
+
**Longterm — periodic (every ~10 generations or when bloat is detected in reflect)**:
|
|
72
|
+
- If a section is already documented in genome (application.md / evolution.md), it's a **duplicate → delete**
|
|
73
|
+
- If early project transition context (e.g., v0.X → v0.Y differences) is no longer a behavioral guide → **delete**
|
|
74
|
+
- Decision rule: "Without this lesson, would the next agent make the same mistake?" — No → delete
|
|
75
|
+
- Result: longterm.md stays within "lessons that still drive behavior today".
|
|
76
|
+
|
|
77
|
+
### Do NOT write to memory
|
|
78
|
+
|
|
79
|
+
- Code change details (`environment/summary.md` handles this)
|
|
80
|
+
- Test numbers, run logs (artifact handles this)
|
|
81
|
+
- Principles already stated in genome (no duplication)
|
|
82
|
+
- Generation-specific debug logs (lineage preserves them; don't crowd memory)
|
|
83
|
+
|
|
84
|
+
### Memory Usage — freedom with responsibility
|
|
85
|
+
|
|
86
|
+
- **Free access**: Read and write at any time — no permission needed
|
|
87
|
+
- **Cross-tier promotion/demotion is encouraged**: a shortterm note that evolves into a track moves to midterm; a midterm track that completes leaves only its lesson in longterm
|
|
88
|
+
- **Architecture changes must propagate**: when adding new features/structure, update evolution.md / application.md / memory together
|
|
89
|
+
- **Bloat is a failure signal**: if longterm exceeds ~30~50 lines or midterm exceeds ~50~70 lines, pruning was skipped. Clean up in the next reflect.
|
|
90
|
+
- **Empty is normal**: any memory file may be empty — that is a valid state
|
|
72
91
|
|
|
73
92
|
## .reap/ Structure
|
|
74
93
|
|
|
@@ -300,7 +319,8 @@ All REAP interactions go through `/reap.*` slash commands. These are the primary
|
|
|
300
319
|
- `reap make backlog --type <type> --title <title> [--body <body>] [--priority <priority>]` — Create backlog item (type: genome-change, environment-change, task)
|
|
301
320
|
- `reap make hook --event <event> --name <name> [--type md|sh] [--condition <condition>] [--order <order>]` — Create hook file with correct naming and frontmatter
|
|
302
321
|
- `reap cruise <count>` — Set cruise mode (pre-approve N generations for autonomous execution)
|
|
303
|
-
- `reap update` — Update project structure to match current REAP version (v0.15 migrate, v0.16 sync)
|
|
322
|
+
- `reap update` — Update project structure to match current REAP version (v0.15 migrate, v0.16 sync). When the project's `lastMigratedVersion` lags behind the installed package, pending per-version migration notes are surfaced in `context.pendingMigrations` (see § Migration Instruction Layer).
|
|
323
|
+
- `reap update --mark-migrated` — Mark this project as having applied all pending migration notes up to the current package version (gen-071 migration layer).
|
|
304
324
|
- `reap dump-state [--stdout] [--silent]` — Dump dynamic REAP context to `.reap/.session-state.md` (used by OpenCode plugin; useful for any external tool that needs current generation state)
|
|
305
325
|
- `reap daemon status|stop|index|query` — Inspect or control the local code-intelligence daemon (see § Code Intelligence below)
|
|
306
326
|
|
|
@@ -381,6 +401,41 @@ If stale, you can request a re-index with `curl -X POST "http://127.0.0.1:17224/
|
|
|
381
401
|
- **Filesystem-first (Grep/Glob)**: literal string search, comment search, files with no parser support, daemon down.
|
|
382
402
|
- The two are complementary — symbol-graph queries return file:line positions you can `Read` immediately.
|
|
383
403
|
|
|
404
|
+
## Migration Instruction Layer
|
|
405
|
+
|
|
406
|
+
When REAP itself evolves (e.g. memory tier semantics change in v0.17.1), existing user projects need to reorganize their artifacts to match the new conventions. The migration instruction layer (gen-071) closes this gap.
|
|
407
|
+
|
|
408
|
+
### How it works
|
|
409
|
+
|
|
410
|
+
1. Each REAP release that requires user-side reorganization ships a `vX.Y.Z.md` note at `src/templates/migration/` (bundled to `dist/templates/migration/` on install).
|
|
411
|
+
2. `config.yml` carries `lastMigratedVersion: "X.Y.Z"` — the most recent REAP version this project has acknowledged.
|
|
412
|
+
3. On every `reap update` and on every SessionStart (`reap load-context`), REAP compares `lastMigratedVersion` against the installed package version. Any `vX.Y.Z.md` file whose version falls in the gap (`lastMigratedVersion < v <= packageVersion`) is surfaced to the agent.
|
|
413
|
+
4. After the agent applies the listed reorganizations, it runs `reap update --mark-migrated`. This sets `lastMigratedVersion` to the current package version and the notes stop surfacing.
|
|
414
|
+
|
|
415
|
+
### Where pending migrations appear
|
|
416
|
+
|
|
417
|
+
- `reap update` output: `context.pendingMigrations: [{ version, instructions }, ...]` + a summary line in `message`.
|
|
418
|
+
- SessionStart context: a `# Pending Migrations` section in the additionalContext (Claude Code hookSpecificOutput / OpenCode instructions).
|
|
419
|
+
- `.reap/.session-state.md` sync dump (written by lifecycle commands): same section, byte-identical.
|
|
420
|
+
|
|
421
|
+
When `lastMigratedVersion >= packageVersion`, no section is added and output is byte-identical to pre-gen-071 behavior.
|
|
422
|
+
|
|
423
|
+
### Agent behavior
|
|
424
|
+
|
|
425
|
+
When you see a `# Pending Migrations` section:
|
|
426
|
+
|
|
427
|
+
1. Read each `## vX.Y.Z` subsection in order.
|
|
428
|
+
2. Apply the listed actions to the project's artifacts (memory, backlog, env, etc. — never to source code unless the note explicitly says so).
|
|
429
|
+
3. Once **all** pending migrations are applied, run `reap update --mark-migrated`. Do not call this halfway through — it marks every gap version as done.
|
|
430
|
+
4. Migration is best-effort and non-blocking. If you cannot apply a step (missing file, ambiguous instruction), record the partial state in the next reflect and skip `--mark-migrated` so the note re-surfaces in the next session.
|
|
431
|
+
|
|
432
|
+
### Authoring migration notes (REAP maintainers)
|
|
433
|
+
|
|
434
|
+
- File: `src/templates/migration/vX.Y.Z.md` (must match `^v\d+\.\d+\.\d+\.md$`).
|
|
435
|
+
- Audience: an AI agent that has *not* yet read the new REAP version's guide. Be explicit about what to read, what to change, and how to verify.
|
|
436
|
+
- Scope: artifact reorganization only by default. Source-code migrations belong in a separate generation, not in a migration note.
|
|
437
|
+
- Build is automatic — `scripts/build.sh` copies `src/templates/` wholesale to `dist/templates/`. No additional sync step.
|
|
438
|
+
|
|
384
439
|
## AI Client Support
|
|
385
440
|
|
|
386
441
|
REAP supports multiple AI clients via the `agentClient` field in `.reap/config.yml`:
|
package/package.json
CHANGED