LearnNewsExamplesServices
Frontmatter
id14436
titleDeference matcher: carve out reported/cited phrases
stateClosed
labels
bugaimodel-experience
assigneesneo-gpt
createdAtJul 2, 2026, 6:17 AM
updatedAtJul 2, 2026, 8:40 AM
githubUrlhttps://github.com/neomjs/neo/issues/14436
authorneo-gpt
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtJul 2, 2026, 8:40 AM

Deference matcher: carve out reported/cited phrases

Closed v13.1.0/archive-v13-1-0-chunk-8 bugaimodel-experience
neo-gpt
neo-gpt commented on Jul 2, 2026, 6:17 AM

Context

This is the narrow implementation leaf for #14420 Defect A. The parent ticket captures several stop-hook detection defects; this leaf only covers the pure deference phrase matcher so the implementation PR can use an honest close target without closing the broader parent.

Live latest-open sweep: checked latest 20 open issues at 2026-07-02T04:16:12Z. #14420 is the parent, and no equivalent matcher-only leaf exists. Closest related issues are #14093 (operator-gated close/convergence wait) and #13751 (release-ROI direction, not code-ready). A2A in-flight sweep at 2026-07-02T04:16:12Z found Clio's sibling [lane-claim] #14420 re-fire axis, explicitly sequenced after this Defect-A PR, so it is related-not-duplicate.

The Problem

The current matcher strips markdown code spans/fences before scanning, but it still treats reported prose as live deference. That creates two false-positive classes from the #14420 corpus:

  • quoted or reported mentions such as "your call" or the phrase your call;
  • attributive citations such as per your call, where the phrase credits an operator decision already made rather than handing a decision back.

The false positive is costly because agents then learn to phrase around the matcher instead of examining whether they actually deferred.

The Architectural Reality

The relevant substrate is intentionally small and pure:

  • ai/scripts/lifecycle/deferencePhraseMatch.mjs owns the tight phrase list and autonomous-turn phrase detection.
  • test/playwright/unit/hooks/deferencePhraseMatch.spec.mjs owns direct unit coverage for the matcher.
  • ai/scripts/lifecycle/stopHookDecision.mjs, .claude/hooks/laneStateStopHook.mjs, and .codex/hooks/codex-lane-state-stop.mjs consume the matcher but should not need policy changes for this leaf.

The Fix

Add local match-context filters after markdown-code stripping:

  • strip quoted prose spans before phrase matching;
  • suppress reported/use-mention contexts immediately preceding a match;
  • suppress your call when the local prefix marks it as an attributive citation (per, as you said/directed/called);
  • preserve actual deference uses of your call.

Contract Ledger Matrix

Target Surface Source of Authority Proposed Behavior Fallback Docs Evidence
matchDeferencePhrase(text) #14420 Defect A corpus + existing matcher JSDoc Return null for quoted/reported phrase mentions and attributive citations Keep current matching for actual deference phrases Existing JSDoc remains the public API note Focused unit fixtures in deferencePhraseMatch.spec.mjs
Stop-hook deference decision stopHookDecision.mjs consumes detectDeferencePhrase() Inherits the narrower matcher without changing L3 no-hold policy Operator-dialogue carve remains unchanged No doc change; behavior covered by tests Shared stop-hook decision + adapter tests

Decision Record impact

none (classifier precision bug; aligned with the #14420 detection-quality lane)

Acceptance Criteria

  • Quoted/reported mentions of deference phrases do not match.
  • Attributive operator-decision citations such as per your call do not match.
  • Live deference uses such as Your call? and it's your call whether... still match.
  • Focused matcher unit tests cover the new negative and positive fixtures.
  • Shared stop-hook consumer tests still pass.

Out of Scope

  • #14420 Defect B operator-prompt visibility.
  • #14420 terminal-shape re-fire axis; Clio owns this as a sibling lane after this PR.
  • #14420 sunset branch and declining-yield artifact logging.
  • #13751 release-ROI direction injection.

Avoided Traps

  • Do not add a phrase-specific blocklist exception only for per your call; the filter must distinguish reported/attributive contexts from live deference uses.
  • Do not weaken L3 no-hold behavior or the operator-dialogue carve; this leaf narrows phrase detection only.

Related

Related: #14420 Related: #14093 Related: #13751

Origin Session ID: 8facbc96-c346-4633-9141-79a968ca1c5d

Handoff Retrieval Hints: deferencePhraseMatch reported mention, per your call attributive citation, #14420 Defect A matcher