From 8e4138c87950c6647e43c41b1f262791468bdb96 Mon Sep 17 00:00:00 2001 From: Himanshu Dongre Date: Wed, 20 May 2026 00:30:47 +0530 Subject: [PATCH] Fix the stale SessionStart hook example in the README MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The step-5 hook snippet showed `smriti state my-project --compact` and claimed it was what `smriti init` generates. `smriti init` actually generates a space-agnostic hook (`smriti state --compact`) that resolves the space from the repo's .smriti.json attachment — verified in `_build_session_start_hook_command`. Correct the snippet and note the space-agnostic resolution. Caught while integrating the cli/README.md command-reference refresh, closing the docs truth pass as one coherent unit. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1da1d16..06a7eab 100644 --- a/README.md +++ b/README.md @@ -234,7 +234,7 @@ backend. "hooks": [ { "type": "command", - "command": "smriti state my-project --compact 2>/dev/null || echo 'Smriti backend not reachable. Start it with: make dev-local'" + "command": "smriti state --compact 2>/dev/null || echo 'Smriti backend not reachable. Start it with: make dev-local'" } ] } @@ -243,7 +243,7 @@ backend. } ``` -`smriti init` already writes this hook into `.claude/settings.json`, with the `smriti` path resolved for your machine — the block above is what it generates. With the hook in place, the state brief is injected automatically at session start; the agent doesn't need to remember to call `smriti_state`. +`smriti init` already writes this hook into `.claude/settings.json`, with the `smriti` path resolved for your machine — the block above is what it generates. The hook is space-agnostic — `smriti state --compact` resolves the space from the repo's `.smriti.json`, so one hook works in every project. With the hook in place, the state brief is injected automatically at session start; the agent doesn't need to remember to call `smriti_state`. ---