Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"name": "memory-kit",
"source": "./plugins/memory-kit",
"description": "Persistent memory for your agent as plain files in your folder: a hot cache injected every session and held under three size caps, per-session handoffs, and promotion into knowledge articles and rules only on your yes. Carries the builder's layers too — executor/recon/idea-validator agents, session review, second opinion, agent QA and a system audit — all lazy-loaded skills you only pay for on use. Installs into any existing repository.",
"version": "7.2.1",
"version": "7.2.2",
"author": {
"name": "awrshift"
},
Expand Down
2 changes: 1 addition & 1 deletion .cursor-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"name": "memory-kit",
"source": "plugins/memory-kit",
"description": "Persistent memory for your agent as plain files in your folder: a hot cache injected every session and held under three size caps, per-session handoffs, and promotion into knowledge articles and rules only on your yes. Carries the builder's layers too — executor/recon/idea-validator agents, session review, second opinion, agent QA and a system audit — all lazy-loaded skills you only pay for on use. Installs into any existing repository.",
"version": "7.2.1",
"version": "7.2.2",
"author": {
"name": "awrshift"
},
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7.2.1
7.2.2
2 changes: 1 addition & 1 deletion docs/ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,7 @@ Six hooks, declared in the plugin's `hooks/hooks.json` — nothing to wire in yo
ls` in some repos, so projects dropped the deny; the hook gates reads without touching that
check. Fails open on a parse error; opt-out `CMK_SECRETS_GUARD=off`.
- **pre-compact.sh** — blocks compaction until MEMORY.md is BOTH fresh AND inside all three caps.
- **session-end.sh** — SessionEnd timestamp logging.
- **session-end.sh** — SessionEnd timestamp logging, adopted repositories only (7.2.2).

Beside them sits **stale-refs.py** (`hooks/lib/`), which the session-start hook runs to check that
file paths mentioned in CLAUDE.md + MEMORY.md still exist on disk — a stale belief that looks
Expand Down
29 changes: 29 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,35 @@

All notable changes to Memory Kit are documented here. Breaking changes marked **BREAKING**.

<a id="v722"></a>

## [7.2.2] — 2026-10-07 — SessionEnd writes nothing in an unadopted repo; directory-ready README

**BREAKING: none.**

### Fixed

- **`session-end.sh` created `.claude/state/session-end.log` in every repository**, adopted or
not — the one hook that skipped the adoption test session-start and pre-compact already run.
With a user-wide install, every repo you opened got a `.claude/state/` folder it never asked
for, while the plugin README said the hooks "write nothing" there. It now exits first unless
`.claude/memory/MEMORY.md` or `context/handoffs/` exists.
- `package.json` and the `AGENTS.md` protocol marker carried 7.2.0 through the 7.2.1 release
(CI on main was red from 62b8685 until the follow-up commit).

### Changed

- **Plugin README: a «What it reads, writes and sends» section** — no network calls, what
`system-audit` reads (`~/.claude/projects/` transcripts, settings files), what `/memory-kit:setup`
writes into `.claude/settings.json` and only after a yes, and where hooks run (Claude Code and
Cowork load them; Claude chat loads skills only). Written for Anthropic's plugin directory,
whose security scan looks for undisclosed behaviour; the directory shows this README as the
listing.
- Plugin README images use absolute URLs: the installed plugin and the directory listing get
only the plugin folder, so `../../.github/assets/` never resolved there.
- Repository: `SECURITY.md`, GitHub Actions pinned to commit SHAs, Dependabot for
github-actions.

<a id="v721"></a>

## [7.2.1] — 2026-09-28 — orchestration: resume vs fresh subagent
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "memory-kit",
"version": "7.2.1",
"version": "7.2.2",
"description": "Memory Kit's OpenCode plugin entry — built-in memory decides what to remember, this one asks. The plugin itself lives in plugins/memory-kit; this package exists so OpenCode can install the shim via \"plugin\": [\"memory-kit@git+https://github.com/awrshift/agent-memory-kit.git\"].",
"type": "module",
"main": ".opencode/plugins/memory-kit.js",
Expand Down
2 changes: 1 addition & 1 deletion plugins/memory-kit/.claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "memory-kit",
"displayName": "Memory Kit",
"version": "7.2.1",
"version": "7.2.2",
"description": "Persistent memory for your agent as plain files in your folder: a hot cache injected every session and held under three size caps, per-session handoffs, and promotion into knowledge articles and rules only on your yes. Carries the builder's layers too — executor/recon/idea-validator agents, session review, second opinion, agent QA and a system audit — all lazy-loaded skills you only pay for on use. Installs into any existing repository.",
"author": {
"name": "awrshift",
Expand Down
2 changes: 1 addition & 1 deletion plugins/memory-kit/.cursor-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "memory-kit",
"displayName": "Memory Kit",
"version": "7.2.1",
"version": "7.2.2",
"description": "Persistent memory for your agent as plain files in your folder: a hot cache injected every session and held under three size caps, per-session handoffs, and promotion into knowledge articles and rules only on your yes. Carries the builder's layers too — executor/recon/idea-validator agents, session review, second opinion, agent QA and a system audit — all lazy-loaded skills you only pay for on use. Installs into any existing repository.",
"author": {
"name": "awrshift",
Expand Down
24 changes: 21 additions & 3 deletions plugins/memory-kit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,29 @@ claude plugin update memory-kit@memory-kit
`id_rsa*`, `*.p12` — by the file tools or by a shell command, inline script or redirection;
`source` / `.`, `cp`/`ln`/`mv`, `ls`, `test`, `git`, `rm` pass, and `.env.example` is never
secret; `CMK_SECRETS_GUARD=off` opts out.
- **SessionEnd** — timestamp logging.
- **SessionEnd** — appends one timestamp line to `.claude/state/session-end.log`.

In a repository that never ran `/memory-kit:setup`, the hooks inject one pointer line and write
nothing.

## What it reads, writes and sends

- **Network: none.** No server, no telemetry, no package downloads: no hook or script in this
folder opens a connection. Every one is readable Python or shell, standard library only.
- **Reads** the memory files of the repository you work in (below), and the `.claude/settings.json`
files the rails nudge and `system-audit` inspect. `system-audit` also reads this repository's
Claude Code session transcripts in `~/.claude/projects/` to count which layers actually fired;
the report stays in the conversation.
- **Writes** only in an adopted repository: the memory state below and `.claude/state/` (session
counter, logs). `/memory-kit:setup` writes into `.claude/settings.json` only after you approve
the diff it shows: `"autoMemoryEnabled": false` if you choose kit-owned memory, and the
permission rails — `Read`/`Edit` deny rules for root `.env` files and, where you agree, a
narrow allow naming one exact script; never a broad allow, and never removing your rules.
- **Blocks**, through the guards above; each guard names its opt-out variable.
- **Where hooks run:** Claude Code and Cowork load them; Cursor CLI runs the SessionStart hook;
OpenCode uses its own shim. Claude chat loads only the skills (no hooks, no agents), so there is
no automatic injection there.

## Skills

| Skill | For |
Expand All @@ -61,8 +79,8 @@ nothing.
Agents: `executor` (builds to a spec file in a worktree) · `recon` (read-only facts) ·
`idea-validator` (isolated critic) · `qa` (one adversarial lens on the running app).

![](../../.github/assets/07-orchestrated-work-spec.png)
![](../../.github/assets/09-agent-qa-projects.png)
![Orchestrated work: a spec, executors, one integrator](https://raw.githubusercontent.com/awrshift/agent-memory-kit/main/.github/assets/07-orchestrated-work-spec.png)
![Agent QA and per-project documents](https://raw.githubusercontent.com/awrshift/agent-memory-kit/main/.github/assets/09-agent-qa-projects.png)

## Beyond Claude Code

Expand Down
7 changes: 7 additions & 0 deletions plugins/memory-kit/hooks/session-end.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@ fi

PROJECT_DIR="${CLAUDE_PROJECT_DIR:-$PWD}"
STATE_DIR="$PROJECT_DIR/.claude/state"

# Not a Memory Kit repository → write nothing (a user-wide install must not scaffold
# .claude/state/ into a repo that never asked; same test as session-start and pre-compact).
if [[ ! -f "$PROJECT_DIR/.claude/memory/MEMORY.md" && ! -d "$PROJECT_DIR/context/handoffs" ]]; then
exit 0
fi

mkdir -p "$STATE_DIR"
LOG_FILE="$STATE_DIR/session-end.log"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- memory-kit protocol v7.2.1 — managed block; a newer kit version REPLACES everything down to the end marker -->
<!-- memory-kit protocol v7.2.2 — managed block; a newer kit version REPLACES everything down to the end marker -->
# Memory protocol (for any agent working in this repository)

This repository keeps agent memory in plain files. Follow this protocol every session.
Expand Down
Loading