From 3ce5d418274ec344860967ff39eebadfa615d762 Mon Sep 17 00:00:00 2001 From: Paul Jolly Date: Tue, 21 Apr 2026 19:06:19 +0000 Subject: [PATCH] all: adopt cueckoo guidance SessionStart hook MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add the SessionStart hook that injects the current cueckoo guidance-hash into Claude's context on each new session and on "claude -c" resumes, as described in the common guidance served by the cueckoo MCP server. Also expand the CLAUDE.md prelude to mention the guidance-hash and the requirement to re-invoke the guidance tool when the hash changes. Signed-off-by: Paul Jolly Change-Id: Ic5f4bd3018d33925ec7ec7a7480285c769625785 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1236067 TryBot-Result: CUEcueckoo Reviewed-by: Daniel Martí Unity-Result: CUE porcuepine --- .claude/settings.json | 12 ++++++++++++ CLAUDE.md | 4 +++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.claude/settings.json b/.claude/settings.json index 1c4278213..aa02e6f88 100644 --- a/.claude/settings.json +++ b/.claude/settings.json @@ -1,5 +1,17 @@ { "includeCoAuthoredBy": false, + "hooks": { + "SessionStart": [ + { + "hooks": [ + { + "type": "command", + "command": "printf 'Current cueckoo guidance-hash: %s\\n' \"$(cueckoo guidance --hash)\"" + } + ] + } + ] + }, "permissions": { "allow": [ "Bash(go build:*)", diff --git a/CLAUDE.md b/CLAUDE.md index 8605949b6..cb3346141 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -4,7 +4,9 @@ Use the cueckoo MCP server's `guidance` tool to get the latest common guidance for CUE project repos. The server is registered as the -`cueckoo` MCP server (via `cueckoo mcp`). Follow all instructions +`cueckoo` MCP server (via `cueckoo mcp`). The response includes a +guidance-hash — if a later system-reminder reports a different hash, +re-invoke the tool to pick up the changes. Follow all instructions returned by the `guidance` tool. See https://github.com/cue-lang/contrib-tools for more information on `cueckoo` and related tooling. -- 2.51.2