Instruction delivery fits the fold — 2k server map, floor Systems reflex, write-time systems_hint #106

Merged
bvandeusen merged 1 commits from dev into main 2026-08-09 13:11:20 -04:00
Owner

Fixes #2562 (Scribe issue): Claude Code injects only the first ~2,048 chars of an MCP server's instructions and silently cuts the rest — _INSTRUCTIONS was 20,002 chars, so ~90% (including all Systems tagging guidance) never reached any session.

  • _INSTRUCTIONS rewritten as a 1,997-char purpose-sorted map; header comment documents the fold and where displaced detail belongs.
  • Docstring backfill for the four topics not already duplicated at tool level (enter_project scoping/bootstrap, create_rule entity-vs-rule test, create_design_system not-a-rulebook, create_system two-records test).
  • Static floor gains the tag-to-Systems reflex + surfaces-layering statement; plugin 0.1.25 → 0.1.26.
  • New systems_hint on create_task / create_note / create_snippet: untagged creates in a project that has Systems get the tagging question in-band, fail-open like the dedup gate.
  • Guards: _INSTRUCTIONS length budget, floor-states-the-reflex, displaced-topics delivered-surface sweep.

CI green on dev (run 3560, 3ff8803).

Fixes #2562 (Scribe issue): Claude Code injects only the first ~2,048 chars of an MCP server's instructions and silently cuts the rest — `_INSTRUCTIONS` was 20,002 chars, so ~90% (including all Systems tagging guidance) never reached any session. - `_INSTRUCTIONS` rewritten as a 1,997-char purpose-sorted map; header comment documents the fold and where displaced detail belongs. - Docstring backfill for the four topics not already duplicated at tool level (enter_project scoping/bootstrap, create_rule entity-vs-rule test, create_design_system not-a-rulebook, create_system two-records test). - Static floor gains the tag-to-Systems reflex + surfaces-layering statement; plugin 0.1.25 → 0.1.26. - New `systems_hint` on create_task / create_note / create_snippet: untagged creates in a project that has Systems get the tagging question in-band, fail-open like the dedup gate. - Guards: `_INSTRUCTIONS` length budget, floor-states-the-reflex, displaced-topics delivered-surface sweep. CI green on dev (run 3560, 3ff8803).
bvandeusen added 1 commit 2026-08-09 13:10:50 -04:00
feat(instructions): fit the delivery fold — 2k server map, floor Systems reflex, write-time systems_hint
CI & Build / Python lint (push) Successful in 3s
CI & Build / Plugin hooks (push) Successful in 7s
CI & Build / integration (push) Successful in 18s
CI & Build / TypeScript typecheck (push) Successful in 32s
CI & Build / Python tests (push) Successful in 47s
CI & Build / Build & push image (push) Successful in 28s
3ff8803593
Claude Code injects only the first ~2,048 chars of an MCP server's
instructions and silently cuts the rest mid-word (#2562, observed live):
_INSTRUCTIONS was 20,002 chars, so ~90% — including all Systems tagging
guidance — never reached any session. Rearchitect delivery around what
each surface actually delivers:

- _INSTRUCTIONS becomes a 1,997-char purpose-sorted map, with a header
  comment stating the budget and where detail belongs instead.
- Tool docstrings keep the per-tool HOW (audit: nearly all displaced
  topics were already duplicated there); backfill the four gaps —
  enter_project session scoping + project bootstrap, create_rule
  entity-vs-rule test, create_design_system not-a-rulebook,
  create_system two-records test.
- The plugin static context (the delivery floor) gains the
  tag-to-Systems reflex and a surfaces-layering statement; plugin
  0.1.25 -> 0.1.26 so the executing cache refreshes (#2209).
- create_task / create_note / create_snippet return a systems_hint when
  a record is created untagged in a project that has Systems — in-band
  at the exact write it applies to, fail-open like the dedup gate.
- Guards: _INSTRUCTIONS length budget, floor-states-the-reflex, and a
  displaced-topics sweep asserting every cut topic still lives on a
  delivered surface.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
bvandeusen merged commit e80f2f233b into main 2026-08-09 13:11:20 -04:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bvandeusen/FabledScribe#106