diff --git a/.claude/tasks/contracts/2026-11-04-memory-recall-1859.md b/.claude/tasks/contracts/2026-11-04-memory-recall-1859.md index 437c5c6..4a9fbeb 100644 --- a/.claude/tasks/contracts/2026-11-04-memory-recall-1859.md +++ b/.claude/tasks/contracts/2026-11-04-memory-recall-1859.md @@ -42,6 +42,25 @@ Pass B `[gated 2026-11-04]` (plan r1; user: "oui, tels quels" / "oui"): visible 7. Every hook fails open; the `~/.claude/memory.json` off switch covers the read side; `claude plugin validate --strict`, `claude plugin test` (mods suite) and `make test` are green. 8. Proof: recall precision measured on ≥ 20 real prompts and tool-error matching on ≥ 10 real errors, at or above the 14/22 baseline; a digest observed after a real compaction; the injection noise measured before shipping (LRN-261); the measured oracle written only after the measurement (EVAL-056). +STEP 3 gate `[gated 2026-11-05]` (user: "oui"): plan r3 (`docs/superpowers/plans/2026-11-04-memory-recall.md`, c38e602; § R2 and § R3 override the task text, R3 wins) approved; the 3 s haiku bound stays, its timeout share measured on the 20 real prompts and put to the merge gate (> 25 % → propose 5 s). + +9. `[gated 2026-11-05]` Mod tests: `mods/memory/hooks/register.test.ts` holds the plan's named tests and the mods suite is green; no line of register.ts over 80 columns. + CHECK: cd /home/bchanot/Documents/claude && T=mods/memory/hooks/register.test.ts && for n in SR1 SR3 SR5 LS1 LS4 ER1 ER3 RB1 RB3 RB5 IR1 IR5 IR6 IR7 IR8 IR9 IR11 TE1 TE2 TE4 PM1 PM2; do /usr/bin/grep -q "$n" "$T" || exit 1; done && [ "$(awk 'length($0) > 80' mods/memory/hooks/register.ts | wc -l)" = 0 ] && a=$(make test suite=lib/tests/mods.test.sh 2>&1) && printf '%s\n' "$a" | /usr/bin/grep -q 'all suites green' && echo MOD4C-OK + EXPECT: MOD4C-OK + EVIDENCE: pending +10. `[gated 2026-11-05]` Digest: `lib/tests/session-digest.test.sh` exists and is green, and the existing session-start callers stay green. + CHECK: cd /home/bchanot/Documents/claude && [ -f lib/tests/session-digest.test.sh ] && a=$(make test suite=lib/tests/session-digest.test.sh 2>&1) && printf '%s\n' "$a" | /usr/bin/grep -q 'all suites green' && b=$(make test suite=lib/tests/memory.test.sh 2>&1) && printf '%s\n' "$b" | /usr/bin/grep -q 'all suites green' && echo DIGEST-OK + EXPECT: DIGEST-OK + EVIDENCE: pending +11. `[gated 2026-11-05]` Measured before shipping: `.claude/tasks/plans/2026-11-04-memory-recall-spike/RECALL.md` holds, for the prompt channel and the error channel, the injected count n, the relevant share and the timeout share, and no prompt or error text. + CHECK: cd /home/bchanot/Documents/claude/.claude/tasks/plans/2026-11-04-memory-recall-spike && [ -s RECALL.md ] && /usr/bin/grep -qi 'timeout' RECALL.md && /usr/bin/grep -qi 'relevant' RECALL.md && /usr/bin/grep -qE '\bn ?= ?[0-9]+' RECALL.md && echo RECALL-OK + EXPECT: RECALL-OK + EVIDENCE: pending +12. `[gated 2026-11-05]` Whole branch: `make test` all suites green, shellcheck clean on the health stack, settings.json untouched by the branch's own commits (the develop merge excepted). + CHECK: cd /home/bchanot/Documents/claude && t=$(make test 2>&1) && printf '%s\n' "$t" | /usr/bin/grep -q 'all suites green' && shellcheck ./*.sh hooks/*.sh lib/*.sh && [ -z "$(git diff develop...HEAD --stat -- settings.json)" ] && echo BRANCH4C-OK + EXPECT: BRANCH4C-OK + EVIDENCE: pending + ## FILE SCOPE (seed, final at STEP 3 `[gated]`) - mods/memory/hooks/register.ts, mods/memory/hooks/register.test.ts (host, BDR-137); mods/memory/.claude-plugin/plugin.json (version) - hooks/session-start.sh and the suites that run it (lib/tests/memory.test.sh, push-guard.test.sh, graphify-gate.test.sh) if its output changes