Skip to content

Commit 0e89f2e

Browse files
test: restore H1 check, fix skill count, refresh memory doc
- shared_skill_contract: assert the first content line after the frontmatter is a plain-title H1 (restores the retired cursor heading-convention check) - claude_plugin_bundle: correct the skill-directory count in the assertion message to 29 (matches EXPECTED_SKILLS and the on-disk tree) - AGENT-MEMORY-INTERCEPTION.md: point slug/path references at the shared plugin/ tree and the merged project-memory skill, with a dated note that the per-host cursor-plugin/codex-plugin trees collapsed into plugin/ Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent d7b4b1b commit 0e89f2e

3 files changed

Lines changed: 32 additions & 12 deletions

File tree

docs/AGENT-MEMORY-INTERCEPTION.md

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,16 @@ instead of — or layered on top of — each agent's native memory mechanism.
1010
All file paths below were verified on this machine (Codex CLI 0.142.4, Cursor
1111
with hooks + plugins, tracedecay plugin v0.0.23 installed for both agents).
1212

13+
> **Note (as of 2026-07-03):** the per-host `cursor-plugin/` / `codex-plugin/`
14+
> source trees have since collapsed into a single shared `plugin/` tree, so
15+
> skill/command/agent sources now live under `plugin/skills/…`,
16+
> `plugin/commands/…`, and `plugin/agents/…` (Cursor-only surfaces under
17+
> `plugin/overlays/cursor/…`). The `recalling-project-memory` and
18+
> `curating-project-memory` skills were also merged into a single
19+
> `project-memory` skill. References below to the old paths/slugs are retained
20+
> as historical design context; the current locations are the shared-tree
21+
> equivalents.
22+
1323
---
1424

1525
## 1. How Codex reads memory today
@@ -171,9 +181,9 @@ to `~/.cursor/plugins/local/tracedecay/`:
171181
`src/hooks/`).
172182
- **`rules/tracedecay.mdc`** — always-applied rule; its **Recall** bullet
173183
steers models to `tracedecay_message_search` / `tracedecay_fact_store`
174-
search and the `recalling-project-memory` skill.
175-
- **`skills/`** — 25+ workflow skills incl. `recalling-project-memory`,
176-
`curating-project-memory`, `recalling-session-context`; plus an
184+
search and the `project-memory` skill.
185+
- **`skills/`** — 25+ workflow skills incl. `project-memory` (the merged
186+
recall+curate memory skill) and `recalling-session-context`; plus an
177187
agent-managed skill overlay (`install_cursor_managed_skill_overlay`).
178188
- **`agents/`**`code-explorer`, `code-health-auditor`, `session-historian`
179189
subagent definitions.
@@ -277,9 +287,9 @@ surfaces on a schedule," which design D reuses for memory.
277287
| --- | --- | --- |
278288
| Facts stored | ✅ fact store (9 facts here) + LCM transcripts | same store |
279289
| Model *can* recall | ✅ MCP `tracedecay_fact_store` search + skill | ✅ same |
280-
| Model is *told* to recall | ⚠️ soft steering in SessionStart/UserPromptSubmit context; `recalling-project-memory` skill matches only when the model thinks "recall" | ⚠️ one Recall bullet in `tracedecay.mdc`; same skill-match dependency |
290+
| Model is *told* to recall | ⚠️ soft steering in SessionStart/UserPromptSubmit context; `project-memory` skill matches only when the model thinks "recall" | ⚠️ one Recall bullet in `tracedecay.mdc`; same skill-match dependency |
281291
| Facts *pushed* into context | ❌ none — hook context is index status + hints only | ❌ none |
282-
| Automatic storage | ⚠️ session_reflector exists but disabled by default; skills say "add facts **only when the user asks**" (`recalling-project-memory` guardrail) | same |
292+
| Automatic storage | ⚠️ session_reflector exists but disabled by default; skills say "add facts **only when the user asks**" (`project-memory` guardrail) | same |
283293
| Native memory overlap | ⚠️ Codex memories **on** (`features.memories=true`), learning from the same threads in parallel | Unknown toggle state; server-side, uninspectable |
284294

285295
The delta is precisely: **nothing proactively retrieves facts at
@@ -323,7 +333,7 @@ Implementation pointers: `src/hooks/codex.rs`, `src/hooks/cursor.rs`,
323333
`src/memory/retrieval.rs` (`FactRetriever::search/probe`), analytics via
324334
`record_hint_analytics` so injection quality is measurable. No plugin schema
325335
change; hook hashes change → users re-trust via `/hooks` (already documented
326-
in `codex-plugin/README.md`).
336+
in the Codex plugin README).
327337

328338
### B. Cursor session-start injection + a materialized memory rule — **do with A**
329339

@@ -359,11 +369,10 @@ doctor checks cover it.
359369

360370
*Effort: XS. Effect: medium. Risk: memory spam (mitigated by write-time dedupe).*
361371

362-
Today `recalling-project-memory`'s guardrail says add facts "**only when the
372+
Today `project-memory`'s guardrail says add facts "**only when the
363373
user asks**" — the opposite of agent-memory behavior. Change the instruction
364-
(rule Recall bullet + skill in `cursor-plugin/rules/tracedecay.mdc`,
365-
`cursor-plugin/skills/recalling-project-memory/SKILL.md`, codex-plugin
366-
mirrors) to:
374+
(rule Recall bullet in `plugin/overlays/cursor/rules/tracedecay.mdc` + the
375+
`plugin/skills/project-memory/SKILL.md` skill, shared across every host) to:
367376

368377
- *Recall:* "before starting non-trivial work, search `tracedecay_fact_store`
369378
for prior decisions" (currently phrased as fallback, not default).
@@ -458,7 +467,7 @@ alongside D and reusing the managed-file conventions from the skill overlay.
458467
analytics.
459468
2. **B2 + C** (materialized Cursor memory rule + proactive storage wording) —
460469
one PR in `src/agents/cursor.rs` embedded files + plugin rule/skill text
461-
(mirrored in `codex-plugin/` skill text).
470+
(shared skill text under `plugin/skills/`).
462471
3. **D** (reflector enablement UX) — config/doctor/dashboard nudge.
463472
4. **E** (coexistence policy + optional Codex-memories harvest importer).
464473
5. **F** (generalized AGENTS.md materialization across all 15 agent

tests/agent_suite/claude_plugin_bundle_test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ fn claude_bundle_ships_exactly_the_expected_skills() {
355355
assert_eq!(
356356
sorted_subdir_names(&skills_root),
357357
expected,
358-
"claude-plugin/skills must contain exactly the expected 26 skill directories"
358+
"claude-plugin/skills must contain exactly the expected 29 skill directories"
359359
);
360360
}
361361

tests/agent_suite/shared_skill_contract_test.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,17 @@ fn shared_skill_bodies_follow_the_intersection_body_rules() {
247247
}
248248
}
249249

250+
// The first content line after the frontmatter must be that H1: a
251+
// single plain-title H1 opens the body (restores the retired
252+
// `cursor_skill_bodies_follow_heading_conventions` check).
253+
match skill.body.lines().find(|line| !line.trim().is_empty()) {
254+
Some(first) if first.starts_with("# ") => {}
255+
Some(first) => violations.push(format!(
256+
"{at}: body must open with a plain-title H1 (`# …`), found {first:?}"
257+
)),
258+
None => {} // empty-body already flagged by the hygiene test
259+
}
260+
250261
// No skipped heading levels.
251262
let mut prev = 0usize;
252263
for (level, text) in &headings {

0 commit comments

Comments
 (0)