Skip to content

Commit f4cd6d8

Browse files
mcp-tool-shopclaude
andcommitted
docs: sync README/CLAUDE.md/ROADMAP to post-Phase-1 + Stage-A state
Phase 1 (workspace wiring) is done and Stage-A health fixes landed, but the front-door docs still described the pre-wiring state. README status line corrected (workspaces wired; remote still a Phase-5 waiver); CLAUDE.md known-issues #1/#2 moved to Resolved citing HOK-01 + the in-package memories fix, status bumped to 'Phase 1 done; Health Pass in progress'; ROADMAP Phase 1 boxes ticked (ab8aad8) + Phase 2 threshold ticked (43155a8) + a P5 line to remove packages/*/.github before the remote. Root package.json gains a //buildOrder note (kernel-first order is load-bearing; pwsh smoke deliberately excluded from cross-platform verify). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent c09568f commit f4cd6d8

4 files changed

Lines changed: 20 additions & 13 deletions

File tree

.claude/CLAUDE.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Operational consequences:
3939

4040
## Status — PROTOTYPE (bootstrapped 2026-06-10)
4141

42-
Phase 0 of 6 done. Pick up via `ROADMAP.md` (six phases: wiring → runtime quality → unified CLI → docs → npm/GitHub bootstrap → publish + retirement).
42+
Phase 1 done (workspace wiring); Health Pass (dogfood-swarm) in progress; Phase 2 hook-threshold landed. Pick up via `ROADMAP.md` (six phases: wiring → runtime quality → unified CLI → docs → npm/GitHub bootstrap → publish + retirement).
4343

4444
## Source-of-truth rule (load-bearing)
4545

@@ -69,17 +69,22 @@ Decompose-by-secrets (Parnas 1972) is right for N humans, operationally broken f
6969

7070
## Verification
7171

72-
- Per-package (until Phase 1 wires the root): `npm test` inside `packages/{kernel,memories,rules}` — all three have real suites.
72+
- Root: `npm run verify` (build + per-package verify across kernel/memories/rules); `npm test` / `npm run build` also run at root. Per-package still works: `npm test` inside `packages/{kernel,memories,rules}` — all three have real suites (228 green as of Stage A).
7373
- Hook: `apps/hook/smoke-test.ps1` (drives the hook with sample stdin JSON; also run it against the live copy after any hook change).
7474
- System: `claude-memories validate <store>/MEMORY.md` (expect 0 errors) and `ai-loadout validate <store>/index.json` / `~/.ai-loadout/index.json`.
7575
- This is a CLI/library repo — never use preview/browser tools here.
7676

7777
## Known issues (field evidence, 2026-06-10 — Phase 2 owns these)
7878

79-
1. **Hook has no score threshold.** Design said below-threshold → silence; implementation injects top-5 regardless (observed: irrelevant claude-guardian/duel-system pointers on a memory-os prompt).
80-
2. **Junk index entries** derived from prose lines: `memory-files`, `full-frame`, `see-also-…` (100+-char id). Root cause is in `packages/memories` parsing/index-gen, not the data.
81-
3. **Weak keyword matching** on auto-extracted keywords; `ai-loadout overlaps` shows routing ambiguities. Hand-curated frontmatter keywords is the cheap fix.
82-
4. One LONG_SUMMARY warning left in the store index (`newsletter-publishing-…`).
79+
**Resolved (Stage A health pass):**
80+
81+
- ~~**Hook has no score threshold.**~~ **FIXED (HOK-01, commit `43155a8`)**`apps/hook/loadout-hook.mjs` now applies a `HOOK_MIN_SCORE=0.3` floor, so below-threshold matches emit nothing (the design's silence behavior). The off-topic claude-guardian/duel-system pointers were the symptom.
82+
- ~~**Junk index entries** derived from prose lines (`memory-files`, `full-frame`, `see-also-…`).~~ **FIXED in-package (commit `a4fa04f`)**`packages/memories` parser/index-gen no longer turns prose citations into index entries, plus an `ID_TOO_LONG` validate rule. The live store/global index regenerates upstream via the Index Freshness Ritual (the fix is in the package; the data clears on the next regen).
83+
84+
**Open (Phase 2):**
85+
86+
1. **Weak keyword matching** on auto-extracted keywords; `ai-loadout overlaps` shows routing ambiguities. Hand-curated frontmatter keywords is the cheap fix.
87+
2. One LONG_SUMMARY warning left in the store index (`newsletter-publishing-…`).
8388

8489
## Quick orientation
8590

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# memory-os
22

3-
> **Prototype, 2026-06-10.** Consolidated Knowledge OS for the studio — folds `ai-loadout` (kernel) + `claude-memories` (MEMORY.md adapter) + `claude-rules` (CLAUDE.md adapter) + the runtime UserPromptSubmit pointer-injection hook into a single repo. Not yet wired as workspaces, not yet published, not yet on a remote.
3+
> **Prototype, 2026-06-10.** Consolidated Knowledge OS for the studio — folds `ai-loadout` (kernel) + `claude-memories` (MEMORY.md adapter) + `claude-rules` (CLAUDE.md adapter) + the runtime UserPromptSubmit pointer-injection hook into a single repo. Wired as npm workspaces (Phase 1 done — `npm install` + `npm run build`/`test`/`verify` work at root). Not yet published; no remote yet (a deliberate Phase-5 waiver — see `.claude/CLAUDE.md`).
44
55
## Pickers start here
66

@@ -17,7 +17,7 @@ memory-os/
1717
│ ├── memories/ # was @mcptoolshop/claude-memories (unpublished)
1818
│ └── rules/ # was @mcptoolshop/claude-rules (unpublished)
1919
├── apps/
20-
│ └── hook/ # mirror of ~/.claude/loadout-hook/ (the LIVE one)
20+
│ └── hook/ # workspace member; mirrors ~/.claude/loadout-hook/ (the LIVE one)
2121
├── .claude/
2222
│ └── CLAUDE.md
2323
├── ROADMAP.md

ROADMAP.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@
1111
- [x] Drop CLAUDE.md and this ROADMAP for the next picker
1212
- [x] `git init` + initial commit (no remote yet — deliberate; see the repo-first waiver in CLAUDE.md)
1313

14-
## Phase 1 — Workspace wiring (1 session)
14+
## Phase 1 — Workspace wiring (DONE 2026-06-16, commit `ab8aad8`)
1515

1616
Goal: make the four trees install + build + test under one root.
1717

18-
- [ ] Root `package.json` with `workspaces: ["packages/*", "apps/*"]`**npm workspaces** (studio standard; not pnpm/yarn — `workspace:*` protocol is NOT valid npm, depend by package name and let the workspace resolve it)
19-
- [ ] One root `tsconfig.base.json` extended by each package
18+
- [x] Root `package.json` with `workspaces: ["packages/*", "apps/*"]`**npm workspaces** (studio standard; not pnpm/yarn — `workspace:*` protocol is NOT valid npm, depend by package name and let the workspace resolve it) — commit `ab8aad8`
19+
- [x] One root `tsconfig.base.json` extended by each package — commit `ab8aad8`
2020
- [ ] **Package names do not change in this phase.** `packages/kernel` keeps `@mcptoolshop/ai-loadout` (it is published under that name; renaming is a Phase 5 decision). `apps/hook`'s existing `"@mcptoolshop/ai-loadout"` dependency then resolves to the workspace copy automatically.
2121
- [ ] Each package keeps its own `package.json`; versions follow the root version from Phase 5 onward
22-
- [ ] `npm ci` at root → working install; `npm run build --workspaces` builds all four; `npm test --workspaces` green
22+
- [x] `npm ci` at root → working install; root `build`/`test`/`verify` scripts run the three TS packages in order, all green (203 baseline → 228 after Stage A) — commit `ab8aad8`
2323
- [ ] Sync check: `git diff --no-index apps/hook ~/.claude/loadout-hook` shows no drift (run `apps/hook/smoke-test.ps1` after any hook change)
2424

2525
Gate: green root build, all existing suites pass, hook still injects when driven with stdin JSON, mirror-vs-live diff clean.
@@ -28,7 +28,7 @@ Gate: green root build, all existing suites pass, hook still injects when driven
2828

2929
The hook went live 2026-06-10 and immediately produced field evidence. Fix the known defects before building more surface on top of them.
3030

31-
- [ ] **Score threshold in the hook.** The design said "below-threshold match → emit nothing"; the implementation takes top-5 regardless (`apps/hook/loadout-hook.mjs` filters only `manual` entries). Observed result: a memory-os prompt got claude-guardian and duel-system pointers. Add a minimum-score floor to the filter; calibrate against `~/.ai-loadout/usage.jsonl` + a sample of real prompts.
31+
- [x] **Score threshold in the hook.** (DONE — commit `43155a8`, HOK-01.) `apps/hook/loadout-hook.mjs` now applies a `HOOK_MIN_SCORE=0.3` floor alongside the `manual`-entry filter, so below-threshold matches emit nothing. Resolves the observed off-topic claude-guardian/duel-system pointers. (Calibration against accumulated `usage.jsonl` can still tune the floor later.)
3232
- [ ] **Index hygiene at the source.** The generated index contains junk entries derived from prose lines that aren't topic refs — confirmed examples: `memory-files` (from a "- Memory files:" line), `full-frame` (from "Full frame: …"), `see-also-…` (a 100+-char id from a "See also:" line). Fix in `packages/memories`' parser/index-gen: skip refs whose derived name is empty/generic, and add a `validate` rule flagging ids > 60 chars. Then regenerate the store index + global copy and confirm the junk is gone.
3333
- [ ] **Fix the 1 remaining LONG_SUMMARY entry** (`newsletter-publishing-…`, 159-char summary) — shorten its MEMORY.md line.
3434
- [ ] **Keyword quality pass.** Weak matches come from generic auto-extracted keywords. Use `ai-loadout overlaps` to find routing ambiguities; hand-curate keywords (via frontmatter) for the worst offenders.
@@ -73,6 +73,7 @@ Goal: reserve the name, set up Trusted Publishing, create the GitHub repo.
7373
- [ ] Create `mcp-tool-shop-org/memory-os` on GitHub (private at first; public at Phase 6 publish) — this closes the repo-first waiver
7474
- [ ] Add remote, push everything to date
7575
- [ ] CI workflow per `github-actions.md` rules: paths-gated, ubuntu-latest only, concurrency block, max 2 workflow files
76+
- Remove `packages/*/.github/` (8 inert workflow files + 2 dependabot.yml) BEFORE adding the remote; author a single root CI per github-actions.md (max 2 workflows, paths-gated, one pages deploy).
7677

7778
## Phase 6 — First real publish + upstream retirement (1 session)
7879

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"packages/*",
1111
"apps/*"
1212
],
13+
"//buildOrder": "INTENTIONAL: kernel must build before memories and rules — they import the kernel's built dist. Do NOT 'simplify' build/test/verify to `--workspaces` (npm does not guarantee topo order) or the order breaks. The PowerShell hook smoke-test (apps/hook/smoke-test.ps1) is deliberately NOT in verify: it is Windows/rig-specific and would break Linux CI.",
1314
"scripts": {
1415
"build": "npm run build -w packages/kernel && npm run build -w packages/memories && npm run build -w packages/rules",
1516
"test": "npm run test -w packages/kernel && npm run test -w packages/memories && npm run test -w packages/rules",

0 commit comments

Comments
 (0)