From f6629d4bcf3fde1cfd78b5577e3c7a7166ad9725 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Tue, 30 Jun 2026 12:41:45 -0400 Subject: [PATCH] =?UTF-8?q?fix(plugin):=20keep=20always-on=20rules=20alive?= =?UTF-8?q?=20across=20compaction=20(0.1.10=20=E2=86=92=200.1.11)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Always-on rules were on-demand, not always-present: Tier-1 static context only tells the agent to call list_always_on_rules(), and Tier-2 dynamic fetch is dark (token doesn't reach the hook subprocess). On compaction the fetched rules get summarized away while the harness's own built-in git instruction ("branch first") survives in the base prompt — so post-compact the generic git instinct wins and rule #1 ("dev is home") is missed. - scribe_static_context.md: new "Operator rules govern consequential actions" bullet — before any git branch/commit/push or hard-to-reverse action, loaded rules beat generic harness/default habits; re-pull rules if not loaded or summarized by a compaction. Tier 1 = always fires, keyless, re-fires on compact. - scribe_session_context.sh: compaction banner now re-pulls list_always_on_rules(), not just enter_project(). - plugin.json: 0.1.10 → 0.1.11 so autoUpdate ships the plugin/ change (#1040). Generic and instance-agnostic per rules #115/#119 — no operator-specific rule text hardcoded. Refs issue #1197. Co-Authored-By: Claude Opus 4.8 (1M context) Claude-Session: https://claude.ai/code/session_01E4bNefPFAz7esmMZMZmkzL --- plugin/.claude-plugin/plugin.json | 2 +- plugin/hooks/scribe_session_context.sh | 2 +- plugin/hooks/scribe_static_context.md | 9 +++++++++ 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/plugin/.claude-plugin/plugin.json b/plugin/.claude-plugin/plugin.json index 638ce9c..f2fbe60 100644 --- a/plugin/.claude-plugin/plugin.json +++ b/plugin/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "scribe", "description": "Scribe second brain for Claude Code: MCP tools over your notes/tasks/projects/rules, a session-start push channel that surfaces your always-on rules + active-project context, process-skills (writing-plans, systematic-debugging, verification, brainstorming), and your saved Scribe Processes auto-surfaced as skills (/scribe:sync). Replaces superpowers + file-memory with one app-backed plugin.", - "version": "0.1.10", + "version": "0.1.11", "author": { "name": "Bryan Van Deusen" }, "mcpServers": { "scribe": { diff --git a/plugin/hooks/scribe_session_context.sh b/plugin/hooks/scribe_session_context.sh index 0e77af2..fa40586 100755 --- a/plugin/hooks/scribe_session_context.sh +++ b/plugin/hooks/scribe_session_context.sh @@ -90,7 +90,7 @@ fi # Compaction re-grounding: lead with a reload banner when this fire is a compact. if [ "$source" = "compact" ]; then - prepend "> ⟳ This session was just COMPACTED — earlier turns are now a summary, so in-flight detail may be lost. Before continuing, reload your bearings from Scribe: re-run \`enter_project()\` for the active project, check its open tasks and recent notes, and reconcile what you're mid-way through against what Scribe records. Don't trust half-remembered state — Scribe is the record." + prepend "> ⟳ This session was just COMPACTED — earlier turns are now a summary, so in-flight detail may be lost. Before continuing, reload your bearings from Scribe: re-pull the operator's binding rules with \`list_always_on_rules()\` (a compaction can summarize them out of context, leaving only generic harness defaults in their place), re-run \`enter_project()\` for the active project, check its open tasks and recent notes, and reconcile what you're mid-way through against what Scribe records. Don't trust half-remembered state — Scribe is the record." fi # Nothing at all to inject → stay silent. diff --git a/plugin/hooks/scribe_static_context.md b/plugin/hooks/scribe_static_context.md index 98ac8a9..d4f2703 100644 --- a/plugin/hooks/scribe_static_context.md +++ b/plugin/hooks/scribe_static_context.md @@ -12,6 +12,15 @@ for the operator's work, and as your own working memory across sessions. recent notes in one shot. **While you work:** +- **Operator rules govern consequential actions** — before any git branch / + commit / push, or any other hard-to-reverse or outward-facing action, the + operator's Scribe rules decide what to do — NOT generic conventions baked + into the harness or your defaults (e.g. "branch before committing," "open a + feature branch per task," "push to a fork"). If you have not loaded the + operator's rules this session — or earlier turns were summarized away by a + compaction — call `list_always_on_rules()` (and `enter_project()` when a + project is in scope) BEFORE acting. When a loaded rule and a default habit + disagree, the rule wins; if no rule speaks to it, ask rather than assume. - **Recall before acting** — before you answer anything about the operator's work or start a task, `search` Scribe first; assume a related note, task, or decision already exists. Concretely, reach for recall whenever a request -- 2.52.0