# WAKE-MARKER-QUOTED — v0.38.2

## Field evidence (perri, 2026-09-06, own across-commune)

The v0.38.0/0.38.1 boundary fired, but the wake message delivered post-clear was a slice of
commune PROSE, not the authored directive:

> `` ` `` marker convention is claude-spt's own (core parses it nowhere) … **Fix shipped as
> v0.38.1:** briefs updated so agents put `` ` ``

That text is exactly what sits BETWEEN two backtick-quoted mentions of the marker in the commune
body — a commune that DISCUSSED the wake convention. `wake_directive` takes the FIRST pair of
markers in the raw body, so two quotations paired with each other and the real directive never
had a chance.

## The class, not the instance

`has_wake_marker` is blind the same way: a commune that merely QUOTES the marker (a release note,
a plan, a message about this very bug) ARMS a context reset its author never requested. The
arming defect is worse than the wrong-directive one.

Our own shortform peer-tags already carry the rule — "a tag inside backticks or a fenced code
block is a quotation and fires nothing" — so an agent writing about the marker reasonably expects
the same. The wake marker is claude-spt's own convention (doyle: core parses it nowhere), so the
inconsistency and the fix are both ours.

## Scope

1. `mask_quoted(&str) -> String`: byte-length-preserving copy with fenced code blocks and inline
   code spans blanked to spaces, so marker offsets still index the ORIGINAL body.
   - Fence: a line whose trim starts with ``` toggles; fence lines are masked too.
   - Inline span: a backtick opens, the next backtick on the SAME line closes. Same-line closure
     is deliberate — an unmatched stray backtick must not swallow the rest of the body and
     silently kill a real marker (fail toward arming, never toward a dead boundary).
2. `has_wake_marker` + `wake_directive` search the MASKED copy; the directive text is sliced from
   the ORIGINAL.
3. Briefs state the rule (bare marker fires; a quoted one is a quotation), matching the shortform
   wording agents already know.

## Gate

`sh ci/run-gates.sh` PASS + `traceable-reqs check` exit 0. Unit-mutation checks: drop the mask
from either helper and the new tests must fail.

## Not in scope

Core changes. The marker is ours end to end.
