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
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ Migration details for `/agent-memory update` live in [`skills/agent-memory/vendo

## [Unreleased]

## [0.1.1] - 2026-07-31

### Added

- `/agent-memory learn [>topic] <clue>` — gated capture of one learning/pitfall into `learnings.md` or `learnings-<topic>.md` (confirm; no `--auto`); conflict/dirty guards, slug sanitizing, deterministic target routing, and duplicate-rule skip.
Expand All @@ -24,6 +26,7 @@ Migration details for `/agent-memory update` live in [`skills/agent-memory/vendo
- `instructions.md` slimmed for always-load: permission boundaries, numbered precedence, task-organized sections, observable turn closure, and formats linked to templates (`TEMPLATE.md`, `log.md`, `decisions.md`) instead of duplicated inventories.
- Learning/pitfall format and topic-split / scope-hint policy documented in `instructions.md` and `index.md`; `bootstrap` / `sync` / `lint` / `consolidate` aligned.
- CLI build publishes `bin/cli.js` without minify for supply-chain auditability.
- Cross-package docs pin `hooks/README.md` / examples to `0.1.1`.

## [0.1.0] - 2026-07-27

Expand Down Expand Up @@ -331,7 +334,8 @@ Migration details for `/agent-memory update` live in [`skills/agent-memory/vendo

- Initial Agent Memory method, skill, and `.agents/memory/` skeleton.

[unreleased]: https://github.com/diegoos/agent-memory/compare/0.1.0...HEAD
[unreleased]: https://github.com/diegoos/agent-memory/compare/0.1.1...HEAD
[0.1.1]: https://github.com/diegoos/agent-memory/compare/0.1.0...0.1.1
[0.1.0]: https://github.com/diegoos/agent-memory/compare/0.0.14...0.1.0
[0.0.14]: https://github.com/diegoos/agent-memory/compare/0.0.13...0.0.14
[0.0.13]: https://github.com/diegoos/agent-memory/compare/0.0.12...0.0.13
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ npx skills add diegoos/agent-memory --skill agent-memory
### Manual skeleton (no skill CLI)

```bash
git clone --branch 0.1.0 --depth 1 \
git clone --branch 0.1.1 --depth 1 \
https://github.com/diegoos/agent-memory /tmp/agent-memory
mkdir -p .agents/skills/
cp -R /tmp/agent-memory/skills/agent-memory .agents/skills/
Expand Down
2 changes: 1 addition & 1 deletion hooks/install-hooks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ elif [[ -f "$SCRIPT_DIR/../package.json" ]] && command -v node >/dev/null 2>&1;
node -p 'require(process.argv[1]).version' "$SCRIPT_DIR/../package.json" 2>/dev/null || true
)"
fi
VERSION="${VERSION:-0.1.0}"
VERSION="${VERSION:-0.1.1}"

# Resolve project dir (absolute). Relative AGENT_MEMORY_PROJECT_DIR is allowed.
# Require an existing directory so realpath and python3 agree (no mkdir surprise).
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": "@dosx/agent-memory",
"version": "0.1.0",
"version": "0.1.1",
"description": "Local Markdown workspace memory for AI coding agents (Cursor, Claude Code, Codex, OpenCode, Copilot, Gemini). npx CLI installs the skill into .agents/skills/ and harness lifecycle hooks — no server, vector DB, or embeddings.",
"bin": {
"agent-memory": "bin/cli.js"
Expand Down
2 changes: 1 addition & 1 deletion skills/agent-memory/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ description: >-
demand only.
metadata:
invocation: manual
version: "0.1.0"
version: "0.1.1"
compatibility: >-
Works offline from the skill package vendor skeleton. Hook installation is
user-run (shell script or npx CLI), not performed by this skill.
Expand Down
2 changes: 1 addition & 1 deletion skills/agent-memory/references/agent-block.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,5 @@ applyTo: "**"
## Notes

- Delimiters `<!-- <agent-memory> -->` … `<!-- </agent-memory> -->` let `update` replace only this block. Legacy plain `<agent-memory>` tags migrate to comments.
- Explicit **Read** `instructions.md` covers plain-Markdown / Cursor rules; `@import` covers Claude/Gemini/Codex. Keep the block short — method details stay in `instructions.md` → _Harness parity — memory contract_ and the [hooks README](https://github.com/diegoos/agent-memory/blob/0.1.0/hooks/README.md).
- Explicit **Read** `instructions.md` covers plain-Markdown / Cursor rules; `@import` covers Claude/Gemini/Codex. Keep the block short — method details stay in `instructions.md` → _Harness parity — memory contract_ and the [hooks README](https://github.com/diegoos/agent-memory/blob/0.1.1/hooks/README.md).
- Compare installed vs canonical byte-for-byte (body only for `.mdc`); identical → skip; different → confirm before replace.
4 changes: 2 additions & 2 deletions skills/agent-memory/references/init.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ Canonical sources live under `skills/agent-memory/` in the agent-memory repo:

**Dotfiles (required):** hosts often hide dotfiles from `Glob`. After the copy, **explicitly** Read `vendor/memory/.gitignore` and Write it to `.agents/memory/.gitignore` (create/overwrite to match vendor). Contents must ignore `.hook-sync-state`. Do **not** skip this step if Glob omitted the file. Then verify `.agents/memory/.gitignore` exists before continuing.

3. **Write the version anchor.** Create `.agents/memory/.version` containing the latest version — the newest version section in this skill's `vendor/UPDATE.md`, e.g. `0.1.0`.
3. **Write the version anchor.** Create `.agents/memory/.version` containing the latest version — the newest version section in this skill's `vendor/UPDATE.md`, e.g. `0.1.1`.

4. **Parse the harness target.** From the invocation, read optional `<harness>`. Normalize aliases (`claude-code` → `claude`, `github` → `copilot`). If omitted, set mode to `auto` and **detect harnesses** (see **Auto-detection** below).

Expand Down Expand Up @@ -121,5 +121,5 @@ When `CLAUDE.md` is standalone (no `@AGENTS.md`), claude and opencode have disti
## Notes

- Do not populate the memory here — `init` only scaffolds. To index canonical sources and gaps, the user runs `/agent-memory bootstrap` (pointers, not doc copies). Bootstrap does not invent product vision when docs are missing — it reports the gap.
- Optional git `pre-commit` hook is **not** wired by `init` — see the [hooks README](https://github.com/diegoos/agent-memory/blob/0.1.0/hooks/README.md).
- Optional git `pre-commit` hook is **not** wired by `init` — see the [hooks README](https://github.com/diegoos/agent-memory/blob/0.1.1/hooks/README.md).
- **Context vs checkpoint:** native instruction files (`.mdc`, agent `*.md`, `.instructions.md`) inject the agent-memory workflow into the model context. Lifecycle hooks (see `install-hooks.md`) run deterministic git checkpoints — they do not replace context injection.
12 changes: 6 additions & 6 deletions skills/agent-memory/references/install-hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ Canonical hook sources live under `hooks/` in the [agent-memory](https://github.

3. **Prerequisite dir.** The user-run installer (`install-hooks.sh` / `npx`) **creates** the harness prerequisite directory if missing (e.g. `.cursor/`, `.opencode/`). The skill itself still must **not** create those dirs — only print the install commands.

4. **Print install instructions (do not execute).** Read this skill's `metadata.version` (e.g. `0.1.0`). Tell the user to review and run **one** of the following from the **project root** (never embed `raw.githubusercontent.com` URLs):
4. **Print install instructions (do not execute).** Read this skill's `metadata.version` (e.g. `0.1.1`). Tell the user to review and run **one** of the following from the **project root** (never embed `raw.githubusercontent.com` URLs):

**Preferred — npx:**

Expand All @@ -45,12 +45,12 @@ Canonical hook sources live under `hooks/` in the [agent-memory](https://github.
**Pinned tag (optional):**

```bash
npx --yes github:diegoos/agent-memory#0.1.0 -- install hooks <harness>
npx --yes github:diegoos/agent-memory#0.1.1 -- install hooks <harness>
```

(Replace `0.1.0` with this skill's `metadata.version` when it differs.)
(Replace `0.1.1` with this skill's `metadata.version` when it differs.)

**Alternative — shell script:** open the GitHub release page for the matching tag (Releases → `0.1.0`, or the tag tree on GitHub), review `hooks/install-hooks.sh`, then from a checkout of that tag:
**Alternative — shell script:** open the GitHub release page for the matching tag (Releases → `0.1.1`, or the tag tree on GitHub), review `hooks/install-hooks.sh`, then from a checkout of that tag:

```bash
bash hooks/install-hooks.sh <harness>
Expand All @@ -77,6 +77,6 @@ For `update`, for **each** installed harness print the refresh commands from ste

## Behavior

Hooks run a **deterministic ephemeral checkpoint** — session binding and session-cumulative touched paths in `.hook-sync-state` only. Semantic log text, active-work resume fields, decision pointers / fallbacks, learnings, and consolidation stay agent-owned (or `/agent-memory sync` / `/agent-memory consolidate`). Hooks never write Markdown and never copy project docs. See the [hooks README](https://github.com/diegoos/agent-memory/blob/0.1.0/hooks/README.md).
Hooks run a **deterministic ephemeral checkpoint** — session binding and session-cumulative touched paths in `.hook-sync-state` only. Semantic log text, active-work resume fields, decision pointers / fallbacks, learnings, and consolidation stay agent-owned (or `/agent-memory sync` / `/agent-memory consolidate`). Hooks never write Markdown and never copy project docs. See the [hooks README](https://github.com/diegoos/agent-memory/blob/0.1.1/hooks/README.md).

Optional git `pre-commit` is **not** installed by this command — see the same [hooks README](https://github.com/diegoos/agent-memory/blob/0.1.0/hooks/README.md).
Optional git `pre-commit` is **not** installed by this command — see the same [hooks README](https://github.com/diegoos/agent-memory/blob/0.1.1/hooks/README.md).
2 changes: 1 addition & 1 deletion skills/agent-memory/vendor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Install the `agent-memory` skill ([skills.sh](https://www.skills.sh/diegoos/agen
/agent-memory update | sync | learn | consolidate
```

Hooks are **user-installed** (skill only prints commands) — see the [hooks README](https://github.com/diegoos/agent-memory/blob/0.1.0/hooks/README.md).
Hooks are **user-installed** (skill only prints commands) — see the [hooks README](https://github.com/diegoos/agent-memory/blob/0.1.1/hooks/README.md).

### Manual

Expand Down
13 changes: 13 additions & 0 deletions skills/agent-memory/vendor/UPDATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,3 +199,16 @@ Format:
- safe: `skills/agent-memory/SKILL.md` — version bumped to `0.1.0`.
- safe: root `package.json` — version bumped to `0.1.0`.
- safe: `init` / `update` — explicitly ensure `.agents/memory/.gitignore` from `vendor/memory/.gitignore` (dotfiles are often omitted by Glob); `update` creates/refreshes it when missing or incomplete.

## 0.1.1

- sensitive: `instructions.md` — slimmed always-load (permission boundaries, numbered precedence, task-organized sections, observable turn closure); formats linked to templates; normative `when editing:` contract; H2 learning/pitfall format + legacy one-liner + duplicate rule; topic-split / scope-hint policy; `/agent-memory learn` as gated capture path. Show full diff and confirm. Preserve any project-specific notes outside the method text.
- sensitive: `index.md` — recall files document topic splits (`learnings-<topic>.md`) and optional `when editing:` hints (generic shape). Preserve user source/recall lists.
- safe: `learn` command (`references/learn.md`) — gated capture into `learnings.md` / `learnings-<topic>.md`; conflict/dirty guards; slug sanitize; deterministic routing; duplicate-rule skip. Skill routing + help updated; shared-rules exception for in-turn / bootstrap / learn primary write.
- safe: `bootstrap` / `sync` / `lint` / `consolidate` / `update` references — H2 format; topic splits; `when editing:` preserve/validate; consolidate split/merge converts moved entries to H2.
- safe: OpenCode plugin — refuse symlink hook scripts; confine resolved paths under `.opencode/hooks`; validate session/conversation binding IDs. **User must re-run the hooks installer** for OpenCode.
- safe: Document trust boundary in `SECURITY.md` (package docs; no consumer memory change).
- safe: CLI build publishes `bin/cli.js` without minify for supply-chain auditability. Re-run `npx @dosx/agent-memory update` (or install) after upgrading the npm package. Memory migration remains `/agent-memory update` in-agent.
- safe: Cross-package docs pin `hooks/README.md` / examples to `0.1.1`.
- safe: `skills/agent-memory/SKILL.md` — version bumped to `0.1.1`.
- safe: root `package.json` — version bumped to `0.1.1`.
2 changes: 1 addition & 1 deletion skills/agent-memory/vendor/memory/instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ Create `active-work/<branch>.md` only when work is resumable: Next step and Vali

### Harness parity — memory contract

Every supported harness targets the same memory shape. **Context layer** injects the obligation to read/maintain memory; **checkpoint layer** (hooks/plugin) collects **ephemeral evidence only** in `.hook-sync-state` (gitignored). Harness config controls timing, not meaning — see the [hooks README](https://github.com/diegoos/agent-memory/blob/0.1.0/hooks/README.md). Differing outcomes are bugs.
Every supported harness targets the same memory shape. **Context layer** injects the obligation to read/maintain memory; **checkpoint layer** (hooks/plugin) collects **ephemeral evidence only** in `.hook-sync-state` (gitignored). Harness config controls timing, not meaning — see the [hooks README](https://github.com/diegoos/agent-memory/blob/0.1.1/hooks/README.md). Differing outcomes are bugs.

**Hooks own ephemeral evidence only:** session id binding; branch cache; session-cumulative touched paths; `last_processed_head` / commit range markers. Hooks never create or edit Markdown under `.agents/memory/`.

Expand Down
Loading