diff --git a/CHANGELOG.md b/CHANGELOG.md index efcfab1..333eb38 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -435,7 +435,7 @@ Android project; A/B precision@10 lifts from 0.19 (FTS5 baseline) to 0.97 - **`tre` CLI** (cac) with `init`, `status`, `backfill`, `search`, `pin`, `graduate`, `list-branches`, `hook`, `mcp` commands. - **A/B benchmark harness** at `scripts/benchmark.mjs` with results in - [BENCHMARK.md](./BENCHMARK.md). + [BENCHMARK.md](./docs/BENCHMARK.md). - **Docs**: README, [CLAUDE.md](./CLAUDE.md) codebase guide, [docs/HOOKS.md](./docs/HOOKS.md) hook registration guide, [PLAN.md](./PLAN.md) as single source of truth for design + roadmap. diff --git a/CLAUDE.md b/CLAUDE.md index c90cf2c..65750e0 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -1,6 +1,6 @@ # CLAUDE.md — Codebase Guide for Claude Code -> **Always read `PLAN.md` first.** It is the roadmap & status index — current version, what shipped, and the phase-SSOT chain. This file gives Claude orientation; `PLAN.md` gives the work. Current: **v0.10.0**. Phase SSOTs: `PLAN-PHASE2.md` (v0.2–0.4 team share), `PLAN-PHASE3.md` (v0.5 web dashboard), `PLAN-PHASE4.md` (v0.6 cross-tool), `PLAN-PHASE5.md` (v0.7 "share, made obvious"), `PLAN-PHASE6.md` (v0.8–0.9 bamboo identity + the Grove), `PLAN-PHASE7.md` (v0.10 agent-driven export + cross-clone memory). +> **Always read `PLAN.md` first.** It is the roadmap & status index — current version, what shipped, and the phase-SSOT chain. This file gives Claude orientation; `PLAN.md` gives the work. Current: **v0.10.0**. Phase SSOTs: `docs/plan/PLAN-PHASE2.md` (v0.2–0.4 team share), `docs/plan/PLAN-PHASE3.md` (v0.5 web dashboard), `docs/plan/PLAN-PHASE4.md` (v0.6 cross-tool), `docs/plan/PLAN-PHASE5.md` (v0.7 "share, made obvious"), `docs/plan/PLAN-PHASE6.md` (v0.8–0.9 bamboo identity + the Grove), `docs/plan/PLAN-PHASE7.md` (v0.10 agent-driven export + cross-clone memory). ## What this project is diff --git a/PLAN.md b/PLAN.md index 322aa19..4d4baf2 100644 --- a/PLAN.md +++ b/PLAN.md @@ -18,16 +18,16 @@ **366 tests**, green on Node 20 + 22. Releases are tracked in [CHANGELOG.md](./CHANGELOG.md). -| Version | Theme | Phase SSOT | -| ---------- | ------------------------------------------------------------------------- | ------------------------------------ | -| **v0.10** | Agent-driven `export_memory` + cross-clone memory union (by git remote) | [PLAN-PHASE7.md](./PLAN-PHASE7.md) | -| **v0.9** | "The Grove" — contributor graph + leaderboard + full Vietnamese i18n | [PLAN-PHASE6.md](./PLAN-PHASE6.md) | -| **v0.8** | Bamboo-green design identity (web + terminal), `docs/BRAND.md` SSOT | [PLAN-PHASE6.md](./PLAN-PHASE6.md) | -| **v0.7** | "Share, made obvious" — one-command `tre share`, local graduate-on-merge | [PLAN-PHASE5.md](./PLAN-PHASE5.md) | -| **v0.6** | Cross-tool — Codex / Gemini / Cursor / Antigravity via MCP | [PLAN-PHASE4.md](./PLAN-PHASE4.md) | -| **v0.5** | Local team dashboard (`tre web`) — branch graph + team memory, live (SSE) | [PLAN-PHASE3.md](./PLAN-PHASE3.md) | -| **v0.2–4** | Git-native team share — export/import, redaction, branch graduation | [PLAN-PHASE2.md](./PLAN-PHASE2.md) | -| **v0.1** | Branch-aware retrieval (3-signal rerank) + MCP server | Phase 1 (this file, § Phase 1 recap) | +| Version | Theme | Phase SSOT | +| ---------- | ------------------------------------------------------------------------- | -------------------------------------------- | +| **v0.10** | Agent-driven `export_memory` + cross-clone memory union (by git remote) | [PLAN-PHASE7.md](./docs/plan/PLAN-PHASE7.md) | +| **v0.9** | "The Grove" — contributor graph + leaderboard + full Vietnamese i18n | [PLAN-PHASE6.md](./docs/plan/PLAN-PHASE6.md) | +| **v0.8** | Bamboo-green design identity (web + terminal), `docs/BRAND.md` SSOT | [PLAN-PHASE6.md](./docs/plan/PLAN-PHASE6.md) | +| **v0.7** | "Share, made obvious" — one-command `tre share`, local graduate-on-merge | [PLAN-PHASE5.md](./docs/plan/PLAN-PHASE5.md) | +| **v0.6** | Cross-tool — Codex / Gemini / Cursor / Antigravity via MCP | [PLAN-PHASE4.md](./docs/plan/PLAN-PHASE4.md) | +| **v0.5** | Local team dashboard (`tre web`) — branch graph + team memory, live (SSE) | [PLAN-PHASE3.md](./docs/plan/PLAN-PHASE3.md) | +| **v0.2–4** | Git-native team share — export/import, redaction, branch graduation | [PLAN-PHASE2.md](./docs/plan/PLAN-PHASE2.md) | +| **v0.1** | Branch-aware retrieval (3-signal rerank) + MCP server | Phase 1 (this file, § Phase 1 recap) | --- @@ -120,7 +120,7 @@ The original 2-week MVP, shipped as v0.1.0: with score-breakdown output. - MCP server (5 tools at the time) + SessionStart hook. - Benchmark harness: precision@10 **0.19 → 0.97** on the tre-mem repo itself - (see [BENCHMARK.md](./BENCHMARK.md)). + (see [BENCHMARK.md](./docs/BENCHMARK.md)). Everything from v0.2 onward is detailed in the phase SSOTs linked in the status table above. diff --git a/README.md b/README.md index 383ab39..6ceb7ab 100644 --- a/README.md +++ b/README.md @@ -58,7 +58,7 @@ sees Stripe webhook chatter alongside JWT context. tre-mem fixes that: retrieval — and publish memory — directly. On the tre-mem repo itself the rerank lifts precision@10 from **0.19** (raw -FTS5 baseline) to **0.97**. See [BENCHMARK.md](./BENCHMARK.md) for the harness. +FTS5 baseline) to **0.97**. See [BENCHMARK.md](./docs/BENCHMARK.md) for the harness. ## Install diff --git a/README.vi.md b/README.vi.md index 48a2189..0b0dd39 100644 --- a/README.vi.md +++ b/README.vi.md @@ -57,7 +57,7 @@ Stripe webhook với JWT context. tre-mem xử lý điều đó: - **MCP server** expose 7 tool để Claude Code gọi retrieval branch-aware trực tiếp. Trên chính repo tre-mem, rerank nâng precision@10 từ **0.19** (FTS5 baseline thuần) -lên **0.97**. Xem [BENCHMARK.md](./BENCHMARK.md) để biết chi tiết harness. +lên **0.97**. Xem [BENCHMARK.md](./docs/BENCHMARK.md) để biết chi tiết harness. ## Cài đặt diff --git a/BENCHMARK.md b/docs/BENCHMARK.md similarity index 100% rename from BENCHMARK.md rename to docs/BENCHMARK.md diff --git a/PLAN-PHASE2.md b/docs/plan/PLAN-PHASE2.md similarity index 99% rename from PLAN-PHASE2.md rename to docs/plan/PLAN-PHASE2.md index 9e475f1..14838b1 100644 --- a/PLAN-PHASE2.md +++ b/docs/plan/PLAN-PHASE2.md @@ -1,6 +1,6 @@ # tre-mem Phase 2 — "Git for AI Memory" -> Sibling plan to [`PLAN.md`](./PLAN.md) (Phase 1 SSOT, v0.1.0 shipped). +> Sibling plan to [`PLAN.md`](../../PLAN.md) (Phase 1 SSOT, v0.1.0 shipped). > This file is the Phase 2 SSOT. **Engineering complete (v0.2.0)** — all build tasks T3D1–T4D10 done, 165 tests green, two-dev sync verified E2E through real git. The only open items are human-gated: the 2-dev demo screen-record (T4D9) and the real-team adoption checkpoint (T4D10 / Checkpoint T4). ## Context diff --git a/PLAN-PHASE3.md b/docs/plan/PLAN-PHASE3.md similarity index 98% rename from PLAN-PHASE3.md rename to docs/plan/PLAN-PHASE3.md index ea61e3d..edbae1e 100644 --- a/PLAN-PHASE3.md +++ b/docs/plan/PLAN-PHASE3.md @@ -1,6 +1,6 @@ # tre-mem Phase 3 — "See your shared roots" (Team Web Dashboard) -> Sibling plan to [`PLAN.md`](./PLAN.md) (Phase 1 SSOT, v0.1.0) and [`PLAN-PHASE2.md`](./PLAN-PHASE2.md) (Phase 2 SSOT, v0.2.0). +> Sibling plan to [`PLAN.md`](../../PLAN.md) (Phase 1 SSOT, v0.1.0) and [`PLAN-PHASE2.md`](./PLAN-PHASE2.md) (Phase 2 SSOT, v0.2.0). > This file is the **Phase 3 SSOT** (v0.5.x). Status: **planned** — not yet started. Tick `- [x]` per task and commit with the code, same as prior phases. ## Context @@ -123,7 +123,7 @@ reduced-motion respected. Bundle target < 80kb JS gzipped (microsite budget). > (`--bark` → `--bamboo`, jade on green-tinted rice paper), not the original > amber/bark. `tre` = bamboo, so the identity reads green across both the > dashboard and the terminal. The full token contract moved to its own SSOT, -> [`docs/BRAND.md`](./docs/BRAND.md). +> [`docs/BRAND.md`](../BRAND.md). ### Daemon lifecycle (`tre web`) diff --git a/PLAN-PHASE4.md b/docs/plan/PLAN-PHASE4.md similarity index 98% rename from PLAN-PHASE4.md rename to docs/plan/PLAN-PHASE4.md index e190960..8de149c 100644 --- a/PLAN-PHASE4.md +++ b/docs/plan/PLAN-PHASE4.md @@ -1,6 +1,6 @@ # tre-mem Phase 4 — "Memory for every harness" (Cross-Tool Port) -> Sibling plan to [`PLAN.md`](./PLAN.md) (v0.1), [`PLAN-PHASE2.md`](./PLAN-PHASE2.md) (v0.2), [`PLAN-PHASE3.md`](./PLAN-PHASE3.md) (v0.5). +> Sibling plan to [`PLAN.md`](../../PLAN.md) (v0.1), [`PLAN-PHASE2.md`](./PLAN-PHASE2.md) (v0.2), [`PLAN-PHASE3.md`](./PLAN-PHASE3.md) (v0.5). > This file is the **Phase 4 SSOT** (v0.6.x). Status: **planned** — starts after 0.5.x ships. Tick `- [x]` per task and commit with the code. ## Context diff --git a/PLAN-PHASE5.md b/docs/plan/PLAN-PHASE5.md similarity index 99% rename from PLAN-PHASE5.md rename to docs/plan/PLAN-PHASE5.md index 829fe2f..3416af3 100644 --- a/PLAN-PHASE5.md +++ b/docs/plan/PLAN-PHASE5.md @@ -1,6 +1,6 @@ # tre-mem Phase 5 — "Share, made obvious" (git-native team memory, provider-agnostic) -> Sibling plan to [`PLAN.md`](./PLAN.md) (v0.1), [`PLAN-PHASE2.md`](./PLAN-PHASE2.md) (v0.2–v0.4), +> Sibling plan to [`PLAN.md`](../../PLAN.md) (v0.1), [`PLAN-PHASE2.md`](./PLAN-PHASE2.md) (v0.2–v0.4), > [`PLAN-PHASE3.md`](./PLAN-PHASE3.md) (v0.5), [`PLAN-PHASE4.md`](./PLAN-PHASE4.md) (v0.6). > This file is the **Phase 5 SSOT** (v0.7.x). Tick `- [x]` per task and commit with the code. diff --git a/PLAN-PHASE6.md b/docs/plan/PLAN-PHASE6.md similarity index 96% rename from PLAN-PHASE6.md rename to docs/plan/PLAN-PHASE6.md index fcd7ee4..c9ec4d0 100644 --- a/PLAN-PHASE6.md +++ b/docs/plan/PLAN-PHASE6.md @@ -1,6 +1,6 @@ # tre-mem Phase 6 — "The Grove" (contributor graph, leaderboard & viral share) -> Sibling plan to [`PLAN.md`](./PLAN.md) (v0.1), [`PLAN-PHASE2.md`](./PLAN-PHASE2.md) (v0.2–v0.4), +> Sibling plan to [`PLAN.md`](../../PLAN.md) (v0.1), [`PLAN-PHASE2.md`](./PLAN-PHASE2.md) (v0.2–v0.4), > [`PLAN-PHASE3.md`](./PLAN-PHASE3.md) (v0.5), [`PLAN-PHASE4.md`](./PLAN-PHASE4.md) (v0.6), > [`PLAN-PHASE5.md`](./PLAN-PHASE5.md) (v0.7.x). This file is the **Phase 6 SSOT** (v0.9.0; > rebased onto the v0.8.0 bamboo identity). diff --git a/PLAN-PHASE7.md b/docs/plan/PLAN-PHASE7.md similarity index 98% rename from PLAN-PHASE7.md rename to docs/plan/PLAN-PHASE7.md index f4124c4..aefc3c3 100644 --- a/PLAN-PHASE7.md +++ b/docs/plan/PLAN-PHASE7.md @@ -1,6 +1,6 @@ # PLAN — Phase 7 (v0.10.x): Agent-driven export + cross-clone memory -> Phase SSOT, chained from [`PLAN.md`](./PLAN.md). Status: **done (v0.10.0)**. +> Phase SSOT, chained from [`PLAN.md`](../../PLAN.md). Status: **done (v0.10.0)**. ## Why diff --git a/scripts/benchmark.mjs b/scripts/benchmark.mjs index 33f1eed..74dcc6a 100644 --- a/scripts/benchmark.mjs +++ b/scripts/benchmark.mjs @@ -13,7 +13,7 @@ import { const HERE = dirname(fileURLToPath(import.meta.url)); const REPO_ROOT = resolve(HERE, '..'); -const OUT_PATH = resolve(REPO_ROOT, 'BENCHMARK.md'); +const OUT_PATH = resolve(REPO_ROOT, 'docs', 'BENCHMARK.md'); const PROJECT = process.env.TRE_BENCH_PROJECT ?? 'tre-mem'; const BRANCH = process.env.TRE_BENCH_BRANCH ?? 'main';