| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
| |
Replace the three near-identical dump scripts with a single
dump.hook.sh that derives both target dir and filename from the
payload: dir from hook_event_name (trailing `failure` stripped so the
two post events share posttooluse), id from tool_use_id else
session_id-source/reason.
This adds SessionEnd for free, so register the hook (and the notifier)
on SessionEnd too, and extend the notifier's id fallback to reason.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add nvim-notify.hook.sh, a generic hook that tells the Neovim instance
owning the terminal ($NVIM) that a state dump is available, by firing a
`User Claude<Event>` autocmd whose `data` is the dump's basename.
The signal is derived from the payload, so the one script serves every
event it is registered against: `hook_event_name` becomes the pattern,
and `tool_use_id` (else `session_id-source`) becomes the `data`, matching
how the dump hooks name their files. It is a no-op outside a Neovim
terminal or without an identifier, and the remote call is backgrounded
with a timeout so a slow or absent editor never blocks a tool call.
Register it after each dump hook on SessionStart, PreToolUse (Bash),
PostToolUse (Bash), and PostToolUseFailure (Bash).
|
| |
|
|
|
|
|
|
|
|
| |
Add sessionstart-dump.hook.sh, mirroring the Bash payload dumps: it
writes the full SessionStart JSON to
$XDG_STATE_HOME/claude/sessionstart/<session_id>-<source>.json. Register
it as a second SessionStart hook, alongside the memory-status report.
session_id is stable across a session's fires, so source
(startup/resume/clear/compact) is appended to keep them distinct.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Capture each Bash call's full pre/post JSON payload to
$XDG_STATE_HOME/claude/{pretooluse,posttooluse}/<tool_use_id>.json.
The pre dump is the command (input), the post dump is command plus
result (output); the post hook registers on PostToolUse and
PostToolUseFailure so failed commands are captured. Naming files by the
shared tool_use_id lets a consumer pair a call's input and output dumps
by matching basename across the two folders.
Retire the per-session bash-log hook, which the dumps supersede.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Move the hook wrappers out of bin/ into hooks/, and name every
registered hook with a .hook.sh suffix. bin/ keeps only the standalone
installer and the by-hand utilities (memory-status.sh, managed-files.sh)
that those wrappers now resolve as their implementations.
Coalesce the eight per-language formatter hooks into a single
format.hook.sh that dispatches on file type with a case, so no file is
ever run through more than one formatter.
Update settings.json, .claude/settings.json, and .gitignore to match.
|
| |
|
|
|
|
|
|
|
| |
Drop the user-level Setup hook that pointed each project's automemory at
its own .claude/memory/, the tracked memory entries, and the
autoMemoryDirectory settings. Strip the automemory stats, counts, and
warnings from the SessionStart memory-status report, leaving the
CLAUDE.md rows. Auto-memory is now disabled via
CLAUDE_CODE_DISABLE_AUTO_MEMORY in the environment.
|
| | |
|
| | |
|
| |
|
|
|
| |
Collapse the granular git/dotfiles-git allow entries into a single
Bash(git *) rule, ask before commits, and deny push.
|
| | |
|
| |
|
|
|
|
| |
Mirror the plain-`git` allowlist for the `dotfiles git …` helper, now
that Claude's Bash reaches the dotfiles repo through the passthrough
rather than a forced GIT_DIR env.
|
| |
|
|
|
| |
Migrate the allow entries from `:*` to ` *` syntax, sort them
alphabetically, and add `git add`/`grep`/`restore`/`rm`.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
Add a user-level Setup hook (bin/auto-memory-dir.hook.sh) that sets
autoMemoryDirectory to "$CLAUDE_PROJECT_DIR/.claude/memory/" in each
project's .claude/settings.json, so automemory lives with the repo instead of
under the shared projects/<encoded-cwd>/ default.
Extend memory-status.sh to resolve the automemory dir from that setting (when
present) and to warn when a project has not opted in.
|
| |
|
|
|
|
|
|
|
|
| |
Mirror the managed-files.{sh,hook.sh} convention: move the stats logic out
of hooks/session-start.sh into a standalone bin/memory-status.sh (runnable by
hand, takes cwd as $1), and add a thin bin/session-start.hook.sh wrapper that
does the stdin/JSON plumbing.
Behavior change: omit the 'Automemory entries' row when MEMORY.md is missing,
rather than showing a 0 count.
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The per-project store kept each project's `.claude/` under
`projects/<encoded-cwd>/.claude/` with `$PWD/.claude` a symlink into it,
wired by a `Setup` hook. The indirection bought nothing — a project's
`.claude/` belongs in that project's own repo. Discard it.
- remove `hooks/setup-init.sh` (the symlink-wiring `Setup` hook) and its
registration
- remove `hooks/worktree-create.sh`: with `.claude/` tracked, a worktree
checks out its own, so `claude --worktree` reverts to the built-in
- rework `session-start.sh`: drop the `Setup`→`SessionStart`
`.last-setup-result.json` channel, report each memory file as a
whole-KB size, and warn only when the always-loaded MEMORY.md index
exceeds 25 KB
- `.gitignore` now tracks the top-level `.claude/` and, under
`projects/`, only `memory/` (the harness auto-memory)
tested: `session-start.sh` renders the KB stats table with no `Setup`
section and valid JSON; no tracked `projects/*/.claude/*` remain.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Setup hook has no live feedback channel, so it now records its
outcome to a machine-local .last-setup-result.json and SessionStart
reads it back.
- rename hooks/setup.sh → setup-init.sh (Setup matcher `init`); create
the store on first use, leave a real .claude as project-local, record
a simple status (created/repointed/linked/local/ok|error) via an ERR
trap, keeping stdout+exit0 / stderr+exit2 conventions.
- rewrite session-start.sh: surface the last Setup outcome (or a hint to
run `claude --init-only`), show per-file memory stats (user/project
CLAUDE.md sizes, automemory entries) with full paths — and warn on any
always-loaded file over 200 lines.
- settings.json: point the Setup hook at setup-init.sh
- README: document store creation and the new session-start behavior.
- memory: record the "Setup hook has no feedback channel" finding.
|
|
|
Collapse the double-submodule setup (claude-config + claude-memory) into
this single repo and replace the `claude-wrapper` launcher with hooks, so
`claude` runs directly — no alias, no installer.
Verified: `claude --init-only` wires/repairs the link and the no-store
path points at `dotfiles claude-adopt-project`; `git check-ignore`
confirms `*.jsonl`, session dirs, `settings.local.json`, and `worktrees/`
stay out while the stores and auto-memory are tracked.
|