{"_id":"@arpon007/decision","_rev":"3-22122e750401c23c8902601212f8412c","name":"@arpon007/decision","dist-tags":{"latest":"0.1.3"},"versions":{"0.1.1":{"name":"@arpon007/decision","version":"0.1.1","keywords":["claude-code","claude-code-plugin","decisions","memory","context","briefing","knowledge-management","ai"],"author":{"url":"https://github.com/arpondark/decision","name":"arpondark"},"license":"MIT","_id":"@arpon007/decision@0.1.1","maintainers":[{"name":"arpon007","email":"arponarpon007@gmail.com"}],"homepage":"https://github.com/arpondark/decision#readme","bugs":{"url":"https://github.com/arpondark/decision/issues"},"bin":{"decision":"bin/install.js"},"dist":{"shasum":"9f8eb5575d8d1a2ecac30dd649a7bf5b09dde51f","tarball":"https://registry.npmjs.org/@arpon007/decision/-/decision-0.1.1.tgz","fileCount":17,"integrity":"sha512-eRiw+wVc/PuuhU7RViZXMf+sv5UPNM9Y3DqXFiUDlnTinxRHTnTJ77llHZ8tZSH9bLqwIjo+0OKYDR8yv5Ah/g==","signatures":[{"sig":"MEQCIDcfwhjUmSn+w8j410UMVWRXZzzBVx5kTBaCFZHqj5qGAiBz+w4kOVAOEne+yqoY8oYiZkDvCeJ6j76sf+woGVD4NQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":57049},"main":".claude-plugin/plugin.json","engines":{"node":">=18"},"gitHead":"32a49535b887e63cc11566ba3fc2f297f763677d","scripts":{"pack:dry":"npm pack --dry-run","postinstall":"node ./bin/install.js","publish:dry":"npm publish --dry-run --access public","prepublishOnly":"npm run pack:dry","publish:public":"npm publish --access public"},"_npmUser":{"name":"arpon007","email":"arponarpon007@gmail.com"},"repository":{"url":"git+https://github.com/arpondark/decision.git","type":"git"},"_npmVersion":"11.16.0","description":"Claude Code skill (name: decision) that captures *why* decisions were made during sessions — sourced from user prompts, not commit diffs — so any agent can get caught up without re-deriving context. Install with `npm install -g @arpon007/decision` and the","directories":{},"_nodeVersion":"24.18.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/decision_0.1.1_1786996035211_0.6805434442859142","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@arpon007/decision","version":"0.1.2","keywords":["claude-code","claude-code-plugin","decisions","memory","context","briefing","knowledge-management","ai"],"author":{"url":"https://github.com/arpondark/decision","name":"arpondark"},"license":"MIT","_id":"@arpon007/decision@0.1.2","maintainers":[{"name":"arpon007","email":"arponarpon007@gmail.com"}],"homepage":"https://github.com/arpondark/decision#readme","bugs":{"url":"https://github.com/arpondark/decision/issues"},"bin":{"decision":"bin/decision.js"},"dist":{"shasum":"0b6da277fb5cbee74c43b17464d901975de8e4c0","tarball":"https://registry.npmjs.org/@arpon007/decision/-/decision-0.1.2.tgz","fileCount":21,"integrity":"sha512-u4ZYGbHO49xWy0DCNpKacWzLm/4LvjUIkKX1gf8YXMsPJt3gshYkwGIMQ5cyWAQK2w87XLY+AAeTHu8BopKEtw==","signatures":[{"sig":"MEQCIBJA/h0vbrSf4Ux30DNaKZSYcSKaDBX3hOn1o4ov6mnPAiBvCf4IZYhvM5IBNq4av+CdBrdrpkESKfUXdIHObz11iA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":69691},"main":".claude-plugin/plugin.json","engines":{"node":">=18"},"gitHead":"1ce8abf4fcfab0c94ad7c7a671731ff9b08c009f","scripts":{"pack:dry":"npm pack --dry-run","postinstall":"node ./bin/install.js","publish:dry":"npm publish --dry-run --access public","prepublishOnly":"npm run pack:dry","publish:public":"npm publish --access public"},"_npmUser":{"name":"arpon007","email":"arponarpon007@gmail.com"},"repository":{"url":"git+https://github.com/arpondark/decision.git","type":"git"},"_npmVersion":"11.16.0","description":"Claude Code skill (name: decision) that captures *why* decisions were made during sessions — sourced from user prompts, not commit diffs — so any agent can get caught up without re-deriving context. Install with `npm install -g @arpon007/decision` and the","directories":{},"_nodeVersion":"24.18.0","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/decision_0.1.2_1786998081412_0.860798765997856","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@arpon007/decision","version":"0.1.3","description":"Claude Code skill (name: decision) that captures *why* decisions were made during sessions — sourced from user prompts, not commit diffs — so any agent can get caught up without re-deriving context. Install with `npm install -g @arpon007/decision` and the","license":"MIT","author":{"name":"arpondark","url":"https://github.com/arpondark/decision"},"keywords":["claude-code","claude-code-plugin","decisions","memory","context","briefing","knowledge-management","ai"],"engines":{"node":">=18"},"main":".claude-plugin/plugin.json","bin":{"decision":"bin/decision.js"},"scripts":{"postinstall":"node ./bin/install.js","prepublishOnly":"npm run pack:dry","pack:dry":"npm pack --dry-run","publish:public":"npm publish --access public","publish:dry":"npm publish --dry-run --access public"},"repository":{"type":"git","url":"git+https://github.com/arpondark/decision.git"},"bugs":{"url":"https://github.com/arpondark/decision/issues"},"homepage":"https://github.com/arpondark/decision#readme","publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"dependencies":{"@arpon007/decision":"^0.1.2"},"gitHead":"92f763f1e37fa750d0013f32b17350e5a665182a","_id":"@arpon007/decision@0.1.3","_nodeVersion":"24.18.0","_npmVersion":"11.16.0","dist":{"integrity":"sha512-+gamLijxd7OLTW+5tanv371oo6FaYX2yHWwqDxiepSzEWBKX9NHSBnWU7uc/gNpDjxfivGbEzDxtdz2fmvsx9w==","shasum":"920c4e49ee20d148c094069478cf2689cfe575d2","tarball":"https://registry.npmjs.org/@arpon007/decision/-/decision-0.1.3.tgz","fileCount":21,"unpackedSize":72232,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHpHOxiB01oSpDMABVKklld6m+vXQcTkmdiLHvZFvkBHAiEA9zRbp8d8DKJe5dCKlsBDGOt0OzJGZCziWG41/gjrbS0="}]},"_npmUser":{"name":"arpon007","email":"arponarpon007@gmail.com"},"directories":{},"maintainers":[{"name":"arpon007","email":"arponarpon007@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/decision_0.1.3_1786998508349_0.7403652952378945"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-17T19:47:15.040Z","modified":"2026-08-17T20:28:28.612Z","0.1.1":"2026-08-17T19:47:15.340Z","0.1.2":"2026-08-17T20:21:21.569Z","0.1.3":"2026-08-17T20:28:28.469Z"},"bugs":{"url":"https://github.com/arpondark/decision/issues"},"author":{"name":"arpondark","url":"https://github.com/arpondark/decision"},"license":"MIT","homepage":"https://github.com/arpondark/decision#readme","keywords":["claude-code","claude-code-plugin","decisions","memory","context","briefing","knowledge-management","ai"],"repository":{"type":"git","url":"git+https://github.com/arpondark/decision.git"},"description":"Claude Code skill (name: decision) that captures *why* decisions were made during sessions — sourced from user prompts, not commit diffs — so any agent can get caught up without re-deriving context. Install with `npm install -g @arpon007/decision` and the","maintainers":[{"name":"arpon007","email":"arponarpon007@gmail.com"}],"readme":"# decision\n\nA Claude Code & AI Agent **skill named `decision`** that automatically captures **why** decisions were made during sessions — sourced from user prompts, not commit diffs — so any agent (yours or a teammate's) can get caught up without re-reading history or re-deriving context that already exists.\n\nRun `/decision` or `/decision-review` to read. Hooks to write. Filter is strict: only decision-shaped sessions leave a trace.\n\nThe public skill name is **`decision`**. Inside it, the skill dispatches to two named sub-capabilities:\n\n- **`decision-logger`** — write mode (capture).\n- **`decision-briefing`** — read mode (briefing).\n\nAvailable slash commands:\n- `/decision` — main command (read briefing or log decision)\n- `/decision-review` — read decision briefing\n- `/decision-logger` — force capture session decisions\n- `/decision-briefing` — read decision briefing\n\nWorks with **Claude Code** (full hook support), **skills.sh** (`npx skills add arpondark/decision`), **Cursor** (real hooks), and degrades gracefully to other AI IDEs via rules + slash commands.\n\n---\n\n## Table of contents\n\n- [Install via skills.sh](#install-via-skillssh-recommended) — works with Claude Code, Cursor, Antigravity, & all skills.sh agents\n- [Install in Claude Code](#install-in-claude-code) — npm registry & standalone options\n- [Install in Cursor](#install-in-cursor) — real hooks on sessionStart / preCompact / etc.\n- [Install in other AI IDEs](#install-in-other-ai-ides) — Windsurf, Continue, Cline, Aider, Antigravity\n- [Verify it worked](#verify-it-worked)\n- [After install: use it](#after-install-use-it)\n- [How it works](#how-it-works)\n- [The filter rule](#the-filter-rule)\n- [The schema](#the-schema)\n- [Layout](#layout)\n- [License](#license)\n\n---\n\n## Install via skills.sh (Recommended)\n\nYou can install this skill directly using the `skills.sh` CLI into any supported AI agent:\n\n```bash\nnpx skills add arpondark/decision\n```\n\nOr for Claude Code specifically:\n\n```bash\nnpx skills add arpondark/decision -a claude-code -g\n```\n\n---\n\n## Install in Claude Code\n\nPick **one** of the install methods below. They all set up the plugin, skills, and slash commands in `~/.claude/` so Claude Code picks them up automatically.\n\n### Method 1 — npm registry\n\nOne command. The package's `postinstall` script registers the plugin, skills, and slash commands (`/decision`, `/decision-review`, etc.) for you.\n\n```bash\nnpm install -g @arpon007/decision\n```\n\nThat's it. Restart Claude Code and run `/decision`.\n\n> **Note:** the npm package name is `@arpon007/decision` (scoped, because plain `decision` is taken on npm). The skill itself is still called **`decision`** — the scope is just npm's namespace. If you fork and re-publish under your own scope, replace `@arpon007` with yours.\n\nThe install also exposes a `decision` CLI for later:\n\n```bash\ndecision          # re-run install (alias for `decision install`)\ndecision status   # show install path and confirm it's wired up\ndecision update   # re-copy files from the latest package into ~/.claude/plugins/decision/\ndecision uninstall\n```\n\n#### As a project-scoped dep instead\n\nIf you'd rather not install globally (e.g. for a CI runner or to pin a version per repo):\n\n```bash\n# In your repo root\nnpm install @arpon007/decision\nnode node_modules/@arpon007/decision/bin/install.js\n```\n\nThe same script copies files into `~/.claude/plugins/decision/`.\n\n### Method 2 — directly from GitHub (no npm publish required)\n\n```bash\n# Pin to a tag (best — reproducible)\nnpm install -g \"github:arpondark/decision#v0.1.0\"\n\n# Or, if you don't have npm package metadata and just want the files:\nmkdir -p ~/.claude/plugins/decision\ngit clone --depth 1 --branch v0.1.0 https://github.com/arpondark/decision.git /tmp/decision\ncp -r /tmp/decision/.claude-plugin ~/.claude/plugins/decision/\ncp -r /tmp/decision/{hooks,skills,commands} ~/.claude/plugins/decision/\nrm -rf /tmp/decision\n```\n\nTip: replace `v0.1.0` with `main` if you want the bleeding edge.\n\n### Method 3 — git clone and symlink (live updates)\n\nIf you'll be iterating on the plugin locally and want `git pull` to update your install:\n\n```bash\ngit clone https://github.com/arpondark/decision.git ~/decision\nmkdir -p ~/.claude/plugins/decision\nln -s ~/decision/.claude-plugin ~/.claude/plugins/decision/.claude-plugin\nln -s ~/decision/hooks ~/.claude/plugins/decision/hooks\nln -s ~/decision/skills ~/.claude/plugins/decision/skills\nln -s ~/decision/commands ~/.claude/plugins/decision/commands\n```\n\nNow `cd ~/decision && git pull` updates your Claude install.\n\n---\n\n## Install in Cursor\n\nCursor has first-class hooks (via `~/.cursor/hooks.json`) that run on the same lifecycle events Claude Code uses (`sessionStart`, `beforeSubmitPrompt`, `stop`, etc.). This is the closest non-Claude Code experience to the full plugin.\n\n### One-shot install\n\n```bash\n# macOS / Linux\ngit clone https://github.com/arpondark/decision.git ~/.cursor/decision\nmkdir -p ~/.cursor/rules ~/.cursor/hooks\ncp -r ~/.cursor/decision/skills/decision ~/.cursor/rules/decision\ncp -r ~/.cursor/decision/skills/decision-logger ~/.cursor/rules/decision-logger\ncp -r ~/.cursor/decision/skills/decision-briefing ~/.cursor/rules/decision-briefing\n```\n\nThen create `~/.cursor/hooks.json` (or merge into your existing one):\n\n```json\n{\n  \"hooks\": {\n    \"sessionStart\": [\n      {\n        \"command\": \"bash $HOME/.cursor/decision/hooks/session-start.sh\",\n        \"async\": false\n      }\n    ],\n    \"beforeSubmitPrompt\": [\n      {\n        \"command\": \"bash $HOME/.cursor/decision/hooks/autosave.sh\",\n        \"async\": true\n      }\n    ],\n    \"stop\": [\n      {\n        \"command\": \"bash $HOME/.cursor/decision/hooks/session-end.sh\",\n        \"async\": false\n      }\n    ]\n  }\n}\n```\n\nRestart Cursor. The `decision` skill is auto-loadable as an agent.\n\n### Windows caveat\n\nCursor's default shell on Windows is PowerShell, not bash. You have two options:\n\n1. **Recommended:** install [Git for Windows](https://git-scm.com/download/win) so `bash.exe` is on `PATH`, then set Cursor's shell to Git Bash (Settings → Shell → Bash Path).\n2. **Or:** ship a `.cmd` shim next to each `.sh` and call the shim from `hooks.json`. Create `~/.cursor/decision/hooks/session-start.cmd` containing:\n\n   ```cmd\n   @echo off\n   bash \"%~dp0session-start.sh\" %*\n   ```\n\n   …and reference `session-start.cmd` instead of `.sh` in `hooks.json`.\n\n### Bridging the slash command\n\nCursor doesn't load Claude-Code-style command files from `commands/`, but rules can supply the same prompt. Drop this into `~/.cursor/rules/decision-review.mdc`:\n\n```markdown\n---\ndescription: Read the captured decision log for the current repo and surface anything decision-shaped.\nglobs:\nalwaysApply: false\n---\n\n# decision-review\n\nWhen the user types `/decision-review` (or asks you to \"review decisions\", \"catch me up on decisions\", \"what did we decide about X\"), run the briefing from the `decision` skill files in `~/.cursor/rules/decision/`.\n```\n\n---\n\n## Install in other AI IDEs\n\nThe plugin's heartbeat is bash hooks fired on session lifecycle events. Not every IDE exposes that. The level of fidelity you get depends on the IDE:\n\n| IDE | Hooks? | What you get | Install path |\n|---|---|---|---|\n| **Claude Code** | ✅ Full | Hooks + slash command + skills | `~/.claude/plugins/decision/` |\n| **Cursor** | ✅ Full | Hooks + rules + slash-equivalent | `~/.cursor/hooks.json` + `~/.cursor/rules/` |\n| **Windsurf** | ⚠️ Workflows only | Manual / auto-triggered workflow + global rules | `~/.codeium/windsurf/memories/` + `.windsurf/workflows/` |\n| **Continue** | ❌ Rules only | Rule + slash command | `~/.continue/rules/` |\n| **Cline** | ❌ Rules only | Per-project `.clinerules` | `<repo>/.clinerules` |\n| **Aider** | ❌ Rules only | Per-project `CONVENTIONS.md` | `<repo>/CONVENTIONS.md` |\n| **Antigravity** | ❓ Unverified | If present, follows Codeium pattern | `~/.codeium/` (see below) |\n\n### Windsurf\n\nWindsurf has user-global rules and per-project workflows. There are no lifecycle hooks, but a workflow with `auto_execution_mode: 3` runs the recording on Cascade turns.\n\n1. Install the global rule:\n\n   ```bash\n   mkdir -p ~/.codeium/windsurf/memories\n   git clone --depth 1 https://github.com/arpondark/decision.git /tmp/decision\n   cp /tmp/decision/skills/decision/SKILL.md ~/.codeium/windsurf/memories/decision.md\n   cp /tmp/decision/skills/decision-logger/SKILL.md ~/.codeium/windsurf/memories/decision-logger.md\n   cp /tmp/decision/skills/decision-briefing/SKILL.md ~/.codeium/windsurf/memories/decision-briefing.md\n   rm -rf /tmp/decision\n   ```\n\n2. Inside any repo where you want the plugin active, create `.windsurf/workflows/decision-review.md`:\n\n   ```markdown\n   ---\n   description: Review the captured decisions for this repo.\n   auto_execution_mode: 0\n   ---\n\n   Read `.decision/` at the repo root and produce a briefing of the most recent decision-shaped entries. Quote the user rationale verbatim when present.\n   ```\n\n   For automatic capture, set `auto_execution_mode: 3` (full auto) and prefix the body with: *\"At the end of every turn, run `bash <plugin>/hooks/autosave.sh` against the current session buffer.\"*\n\n### Continue\n\nContinue loads user-global rules from `~/.continue/rules/` and slash commands from `config.yaml`.\n\n```bash\nmkdir -p ~/.continue/rules\ngit clone --depth 1 https://github.com/arpondark/decision.git /tmp/decision\ncp -r /tmp/decision/skills/decision ~/.continue/rules/decision\ncp -r /tmp/decision/skills/decision-logger ~/.continue/rules/decision-logger\ncp -r /tmp/decision/skills/decision-briefing ~/.continue/rules/decision-briefing\nrm -rf /tmp/decision\n```\n\nThen add a slash command to `~/.continue/config.yaml`:\n\n```yaml\ncommands:\n  - name: decision-review\n    description: Surface the captured decision log for the current repo\n    prompt: |\n      Open .decision/ at the repo root and produce a briefing of every\n      decision-shaped entry. Quote the user rationale verbatim when present.\n```\n\nThere are no lifecycle hooks in Continue, so capture is **manual** — invoke `/decision-review` after a session to have the agent write its own entry.\n\n### Cline\n\nCline reads `.clinerules` from the workspace root. Copy the skill into each repo you want it active in:\n\n```bash\n# In the repo where you want decisions captured\ngit clone --depth 1 https://github.com/arpondark/decision.git /tmp/decision\nmkdir -p .clinerules\ncp /tmp/decision/skills/decision/SKILL.md .clinerules/decision.md\ncp /tmp/decision/skills/decision-logger/SKILL.md .clinerules/decision-logger.md\ncp /tmp/decision/skills/decision-briefing/SKILL.md .clinerules/decision-briefing.md\nrm -rf /tmp/decision\n```\n\nCline has no hook system, so capture is **manual**: ask Cline to *\"log this decision\"* and it will write `.decision/<date>-<slug>.md` per the skill body.\n\n### Aider\n\nAider reads `CONVENTIONS.md` (for git repos) or `AIDER.md` (no git) from the repo root. Drop a pointer in:\n\n```bash\n# In your repo\ncat >> CONVENTIONS.md <<'EOF'\n\n# Decision capture\n\nWhen the user asks to \"log this decision\", \"why did we decide X\", or \"review decisions\",\nconsult the skill bodies at:\n- https://github.com/arpondark/decision/tree/main/skills/decision           (entry point)\n- https://github.com/arpondark/decision/tree/main/skills/decision-logger  (write mode)\n- https://github.com/arpondark/decision/tree/main/skills/decision-briefing (read mode)\n\nWrite entries to `.decision/<date>-<slug>.md` and run `/decision-review` to surface the log.\nEOF\n```\n\nAider has no hook system and no global rules path. Capture is **manual** and **per-repo**.\n\n### Antigravity\n\nAntigravity is Codeium's agentic IDE. If you have it installed, the most likely install paths follow the same pattern as Windsurf:\n\n```bash\n# Try this and adjust if Antigravity uses a different directory\nmkdir -p ~/.codeium/antigravity/memories ~/.codeium/antigravity/workflows ~/.codeium/antigravity/skills ~/.codeium/antigravity/hooks\ngit clone --depth 1 https://github.com/arpondark/decision.git /tmp/decision\ncp /tmp/decision/skills/decision/SKILL.md ~/.codeium/antigravity/memories/decision.md\ncp /tmp/decision/skills/decision-logger/SKILL.md ~/.codeium/antigravity/memories/decision-logger.md\ncp /tmp/decision/skills/decision-briefing/SKILL.md ~/.codeium/antigravity/memories/decision-briefing.md\ncp -r /tmp/decision/skills/* ~/.codeium/antigravity/skills/\ncp -r /tmp/decision/hooks/* ~/.codeium/antigravity/hooks/\nrm -rf /tmp/decision\n```\n\n> **Note:** Antigravity is a recent product and its exact skill/rules directory layout could not be verified at the time of writing. If the paths above don't match your install, check Antigravity's docs for where it looks for user-level skills/rules, then copy the same files there. PRs to update this section are welcome.\n\n---\n\n## Verify it worked\n\nAfter installing in Claude Code, restart and run:\n\n```\n/decision-review\n```\n\nYou should see a (possibly empty) briefing. If you see \"decision: 0 decisions recorded\" it's working — no decisions have been captured yet, just the framework is in place.\n\nFor Claude Code, you can also confirm the install by checking that all five hook files exist and that the three skills are present:\n\n```bash\nls ~/.claude/plugins/decision/hooks/*.sh\n# should print autosave.sh, pre-compact.sh, session-end.sh, session-start.sh, supersedes-check.sh\nls ~/.claude/plugins/decision/skills/\n# should print: decision/  decision-logger/  decision-briefing/\n```\n\nFor Cursor:\n\n```bash\nls ~/.cursor/decision/hooks/*.sh\ncat ~/.cursor/hooks.json\nls ~/.cursor/rules/decision/SKILL.md\n```\n\nFor other IDEs, just confirm the rule/skill files are in the directory shown in the table above.\n\n---\n\n## After install: use it\n\nFor Claude Code, the hooks fire automatically:\n\n- **Each turn:** raw buffer autosave (~free).\n- **Before any `/compact`:** incremental summarize.\n- **End of session:** full filter + final entry.\n- **Start of next session:** sweep any unfinished entries, surface a brief nudge if there are new decisions.\n\nFor other IDEs, see the IDE-specific section — most require manual invocation.\n\n### Read side (Claude Code)\n\n```\n/decision-review                          # all areas, current state\n/decision-review payments                 # just payments\n/decision-review auth --since 30d         # auth, last 30 days\n/decision-review --all                    # include pre-superseded entries\n```\n\nFor other IDEs, the equivalent command is whatever the IDE calls the rule/skill (see the install instructions above).\n\n### Per-repo setup (one-time, in the repo where decisions will be written)\n\nThe skill writes entries to `.decision/<date>-<slug>.md` at the **repo root**. Add the buffer directory to `.gitignore` so scratch files don't leak:\n\n```bash\necho \".decision/.buffers/\" >> .gitignore\n```\n\nThe `.decision/*.md` files themselves **should** be committed — that's how teammates (and their agents) inherit the context.\n\n---\n\n## Prerequisites\n\n- **`bash`** — all hook scripts are bash; works on Linux, macOS, and Windows (Git Bash / WSL).\n- **Node 18+** — only for the npm install methods (Claude Code's npm path) and to run Cursor's hooks.json config generator.\n- **Claude Code** CLI on PATH — only if you want the full hook-driven experience. All other IDEs work without it.\n\n---\n\n## How it works\n\n| Layer | Trigger | Cost | Does what |\n|---|---|---|---|\n| Raw buffer autosave | every turn | ~free, no LLM | Appends prompt to scratch file |\n| Incremental summarize | `PreCompact` | 1 cheap LLM | Updates `.decision/*.md` in place |\n| Finalize | `SessionEnd` (clean) | 1 LLM | Full filter + summarize, marks complete |\n| Sweep | `SessionStart` (next) | conditional | Finishes any orphan `incomplete` files |\n\nKilled mid-flight? The buffer survives. Next session sweeps it up.\n\n---\n\n## The filter rule (the whole point)\n\nOnly writes a substantive entry if something decision-shaped actually happened:\n\n- An approach was chosen over a named alternative.\n- A direction was explicitly rejected, with a reason given.\n- The user stated a constraint, tradeoff, or \"we prefer X because Y.\"\n- A conclusion was reached after weighing options.\n- A previous decision was reversed or superseded.\n\nRoutine debugging, typo fixes, pure implementation with no branch point → **no file**. Signal density over completeness.\n\n---\n\n## The schema\n\n```yaml\nsession_id: <id>\ndate: YYYY-MM-DD\narea: [payments, auth]\ntype: decision | exploration | routine\nstatus: complete | incomplete\nsummary: \"...\"\ndecision: \"...\"\nrationale: \"...\"     # quoted from user when possible\nalternatives_considered: \"...\"\nsupersedes: <path to older .decision/*.md, or null>\n```\n\nFiles live in `.decision/` at the repo root, committed to git. Buffers live in `.decision/.buffers/` (gitignored) — only the cleaned-up entries are shared.\n\n---\n\n## Layout\n\n```\ndecision/\n├── .claude-plugin/plugin.json\n├── hooks/\n│   ├── hooks.json\n│   ├── autosave.sh\n│   ├── pre-compact.sh\n│   ├── session-end.sh\n│   ├── session-start.sh\n│   └── supersedes-check.sh\n├── skills/\n│   ├── decision/SKILL.md            # public entry-point skill (name: decision)\n│   ├── decision-logger/SKILL.md     # write-mode sub-capability\n│   └── decision-briefing/SKILL.md   # read-mode sub-capability\n└── commands/decision-review.md\n```\n\n---\n\n## License\n\nMIT","readmeFilename":"README.md"}