From e87bcfa48c022386c60304d0a71a194f7cae3cf0 Mon Sep 17 00:00:00 2001 From: Bryan Van Deusen Date: Sun, 20 Sep 2026 23:00:14 -0400 Subject: [PATCH] fix(guidance): the index had two characters of headroom, and I spent 391 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CI 7098: unit tests red, everything else green. `_INSTRUCTIONS` was 2439 against a 2000 budget. WHAT I DID NOT CHECK. That block is capped because Claude Code injects only the first ~2,048 characters of a server's instructions and cuts the rest mid-word (#2562, observed live — a 20k version delivered ~10% of itself and the Systems guidance never reached a session). The cap is stated in a comment directly above the literal I edited. It was at 1998/2000 before this batch: a shared, nearly-exhausted resource, and I added a six-line entry to it. THE JUDGE LINE STAYS, and paying for it is the decision rather than dropping it. A client with no Agent Skills support receives this index and nothing else, so of everything here, "you are the judge of record" is among the least safe to leave past the fold — an agent that never learns it defers every call to an operator who was never going to make them. So the line is earned by compressing prose AROUND the existing markers, not by removing anyone's entry: RULES loses a clause, RECORD and REPORT lose trailing restatement, PLAN drops a sentence the two markers already imply, and the opening paragraph tightens. Every index marker the ownership registry requires survives verbatim — that is what test_the_index_names_each_reflex_it_points_at checks, and it passes. Back to 1998/2000: the same headroom as before, with one more reflex indexed. The next addition pays the same way. Three guidance modules run green locally (21 tests) — they read files and need no database, so this one did not have to go to CI to be known. Plugin version re-minted; the previous mint is on a commit that never went green. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01821k5B3Ysecp9fNYs92Kuy --- plugin/.claude-plugin/plugin.json | 2 +- src/scribe/mcp/server.py | 43 ++++++++++++++----------------- 2 files changed, 20 insertions(+), 25 deletions(-) diff --git a/plugin/.claude-plugin/plugin.json b/plugin/.claude-plugin/plugin.json index 0eb3307..80f298a 100644 --- a/plugin/.claude-plugin/plugin.json +++ b/plugin/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "scribe", "description": "Scribe for Claude Code: connects the scribe MCP server, adds the hooks that deliver live project state and relevant records at the right moment, ships the shared client-neutral Scribe skills (using-scribe, writing-plans, reporting-back, systematic-debugging, verification, brainstorming, reusing-code, shape-accounting), and syncs your saved Scribe Processes as skills (/scribe:sync).", - "version": "2026.09.21.0253", + "version": "2026.09.21.0300", "author": { "name": "Bryan Van Deusen" }, diff --git a/src/scribe/mcp/server.py b/src/scribe/mcp/server.py index 2163ef4..dfe1f4f 100644 --- a/src/scribe/mcp/server.py +++ b/src/scribe/mcp/server.py @@ -34,42 +34,37 @@ from quart import Quart # for space before the ownership split (milestones 317, 333, 409) is in # decision #4027 and the notes it supersedes. _INSTRUCTIONS = """ -Scribe is the operator's system of record for their work, and yours: recall -from it before acting, record in it as you go, and keep one copy here rather -than in local memory files. +Scribe is the operator's system of record, and yours: recall before acting, +record as you go, keep one copy here rather than in local memory files. -Every reflex below is stated in full in the using-scribe skill (if your -client reads Agent Skills) and in each tool's description. The index: +Each reflex is stated in full in the using-scribe skill (if your client reads +Agent Skills) and each tool's description. The index: - ORIENT: enter_project(id) loads the project, open work, Systems and design system. An `inception` key: ask what it inherits, then decide_project_inception. - RULES: nothing preloads; a rule arrives when your work matches it. Before a - consequential act — or before handing work back unsure you may finish it — - what_might_apply("what you are about to do"): fifty ranked - candidates, no bar. search(content_type="rule") reads one you already - suspect. Silence means nothing matched, not none. Rules bind; preferences - guide and you keep them current; lessons inform. -- MISSED: a rule that missed you is a trigger to fix, not a - floor to move (retrieval_telemetry). -- JUDGE: you are the judge of record here — what a shape is, whether a - finding holds, whether work is done. Surfacing one for the operator to - rule on is the judgment NOT made, however well it is written up. Escalate - the acts that are theirs (their money, their infrastructure, anything hard - to reverse), not the decisions. Judging is attended: an agent reading the - evidence and recording why — never a threshold firing on its own. + consequential act, what_might_apply("what you are about to do") — fifty + ranked, no bar. search(content_type="rule") reads one you suspect. Silence + means nothing matched, not none. Rules bind; preferences guide and you keep + them current; lessons inform. +- MISSED: a rule that missed you is a trigger to fix, not a floor to move + (retrieval_telemetry). +- JUDGE: you are the judge of record — what a shape is, whether a finding + holds, whether work is done. Surfacing one for them to rule on is the + judgment not made. Escalate their acts, not your decisions. - RECALL: search before acting, scoped with the active project_id. - RECORD: create_task; a fix is kind="issue". add_task_log as you go; status - in_progress on start, done on finish. Tag system_ids as you write. -- PLAN work with an arc: find the existing plan first + in_progress on start, done on finish. Tag system_ids. +- PLAN with an arc: find the existing plan first (search(content_type="milestone")) and add steps to it; else - start_planning(steps=[...]). The plan is a milestone, each step a task. -- IDS exist only once a create returns them. Records that cite each other go + start_planning(steps=[...]). +- IDS exist only once a create returns them. Records citing each other go through create_records, writing {{ref:N}} for the Nth record. - REUSE: search snippets before building; create_snippet what you build. - UI: the project's design system binds; resolve_design_system before hand-writing a value. -- REPORT back from the `placement` a task write returns: where the work sits, - what changed, what needs the operator, what comes next. +- REPORT from the `placement` a task write returns: where it sits, what + changed, what needs them, what next. Creates are duplicate-gated: a near-match returns the existing id to update. shared:true records are another user's suggestion, not settled practice.