feat(409): the reporting reflex reaches every surface a session reads (#4012)
CI & Build / Python lint (push) Successful in 3s
CI & Build / Plugin hooks (push) Successful in 12s
CI & Build / integration (push) Successful in 53s
CI & Build / TypeScript typecheck (push) Successful in 55s
CI & Build / Python tests (push) Successful in 1m28s
CI & Build / Build & push image (push) Successful in 31s
CI & Build / Python lint (push) Successful in 3s
CI & Build / Plugin hooks (push) Successful in 12s
CI & Build / integration (push) Successful in 53s
CI & Build / TypeScript typecheck (push) Successful in 55s
CI & Build / Python tests (push) Successful in 1m28s
CI & Build / Build & push image (push) Successful in 31s
Step 3 of milestone 409 "Response shapes". Step 2's reporting-back skill only helps if it fires, and only exists in the Claude Code plugin. - scribe_static_context.md and using-scribe (new reflex 11) say: report back in a shape the operator can read, placed from the `placement` block rather than memory, and point at the reporting-back skill. using-scribe also lists it among the sibling process-skills. - update_task returns a one-line `report_back` cue when a task is closed (done or cancelled). A tool response is the only surface every MCP client sees, at the moment the report is about to be written. - _INSTRUCTIONS takes no line: there is no budget without trading out a session-start reflex. The decision is recorded in server.py's comment block so it is not re-litigated blind. - Guards: test_instruction_surfaces_agree pins the reflex and the placement pointer on both plugin surfaces; a tool test pins the cue on closing statuses and its absence on every other update. Plugin version minted. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -322,3 +322,39 @@ def test_a_surface_claiming_rules_bind_also_names_what_does_not():
|
||||
f"'how the operator likes this done' as something it may not proceed "
|
||||
f"past. Name the other kind, however briefly."
|
||||
)
|
||||
|
||||
|
||||
# ── Reporting back (milestone 409 step 3) ──────────────────────────────
|
||||
#
|
||||
# The reporting-back skill carries the shapes, but a skill only helps if it
|
||||
# fires. The reflex that sends a session to it lives on the two plugin
|
||||
# surfaces a session always reads; the in-band cue on update_task is the half
|
||||
# that reaches clients with no plugin at all. _INSTRUCTIONS took no line, on
|
||||
# purpose — server.py's comment block records why.
|
||||
|
||||
REPORT_REFLEX = "report back in a shape the operator can read"
|
||||
REPORT_SURFACES = (
|
||||
ROOT / "plugin" / "hooks" / "scribe_static_context.md",
|
||||
ROOT / "plugin" / "skills" / "using-scribe" / "SKILL.md",
|
||||
)
|
||||
|
||||
|
||||
def test_the_reporting_reflex_reaches_every_plugin_surface():
|
||||
missing = []
|
||||
for path in REPORT_SURFACES:
|
||||
text = " ".join(path.read_text().split()).lower()
|
||||
if REPORT_REFLEX not in text or "reporting-back" not in text:
|
||||
missing.append(str(path.relative_to(ROOT)))
|
||||
assert not missing, (
|
||||
f"these surfaces no longer send a session to the reporting-back skill "
|
||||
f"({REPORT_REFLEX!r} plus the skill's name): {missing}. Without the "
|
||||
f"reflex the skill loads only when its description happens to match."
|
||||
)
|
||||
|
||||
|
||||
def test_the_reporting_reflex_takes_placement_from_the_record():
|
||||
"""The failure milestone 409 began from: a placement reconstructed from
|
||||
memory reads exactly like a real one when it is wrong."""
|
||||
for path in REPORT_SURFACES:
|
||||
text = " ".join(path.read_text().split())
|
||||
assert "`placement`" in text, f"{path.relative_to(ROOT)} no longer points at the placement block"
|
||||
|
||||
Reference in New Issue
Block a user