fix(plugin): keep always-on rules alive across compaction (0.1.11) #76
Reference in New Issue
Block a user
Delete Branch "dev"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Ships plugin 0.1.11. A generic, instance-agnostic guardrail so operator rules governing consequential actions (git branch/commit/push, other hard-to-reverse or outward-facing actions) survive a compaction:
list_always_on_rules()/enter_project()before acting when rules may have been summarized away, and to let a loaded rule win over a generic harness/default habit.list_always_on_rules()(previously only re-ranenter_project()), since a compaction can summarize binding rules out of context and leave only generic harness defaults in their place.plugin.jsonversion bump 0.1.10 → 0.1.11 (required for autoUpdate marketplace to ship the change).Root cause: always-on rules are on-demand (tool-fetched) while the competing harness git defaults are always-present in the base prompt, so a compaction drops the rules but not the defaults. Fix is generic (no specific rule hardcoded into the shipped floor).
🤖 Generated with Claude Code
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) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E4bNefPFAz7esmMZMZmkzL