arborist/docs
russell@unturf.com 9ec9469c4d
qa(frame): #000002 land — reference-frame polarity contract (D3 → ✓)
The phrase-pattern retrieval route (commit 1b8677d) closed the
RETRIEVAL side of reference-frame failure; this ticket closes
the ANSWER side.

New module aborist/qa/frame.py:
  FrameDetection dataclass (frame_kind, reference_title,
    reference_uri, confidence). Sidecar — never enters cache_key
    or governance_policy_hash.
  detect_frame(question, sources, phrase_match_roots) — heuristic
    detector. Reference-frame classification fires when:
    (a) phrase route surfaced at least one source, AND
    (b) at least one phrase-matched source is a reference work,
        determined by:
          - title parenthetical disambig (`(novel)` / `(film)` /
            `(play)` / `(franchise)` / etc.), OR
          - body sample contains ≥3 DISTINCT fiction markers
            (novel / published / protagonist / plot / ...).
    Distinct-marker count keeps the heuristic robust against a
    history article saying "novel approach" twice.

aborist/qa/query.py:
  Calls detect_frame for lattice modes only. Body sample uses the
  ARTICLE LEAD (chunk_idx=0, post-wikitext-strip) — fiction
  markers cluster in the lead on Wikipedia, not in plot chunks
  that may have been query-relevance-ranked higher.
  New policy field claim_lattice_polarity_preamble injected as a
  user-role message before the grounding_reminder when
  frame_kind == "reference". Format-string with
  {reference_title} placeholder.
  Result dict carries frame_detection (kind / title / uri /
  confidence) for renderer + bench consumption.

aborist/cli.py:
  Renderer adds a `reference frame: <title>` line when
  frame_detection.kind == "reference". Skipped for literal /
  no-phrase-route / ambiguous rows.

Live verification — Orwell case:
  PRE  : "The text does not directly state that Oceania has always
          been at war with East Asia."
  POST : "In George Orwell's dystopian novel Nineteen Eighty-Four,
          the nation of Oceania is always at war with Eastasia,
          but this is a result of propaganda and doublethink, not
          actual historical continuity. The war with Eastasia is
          a fabricated conflict to maintain control..."

Multi-frame compilation: distinguishes propaganda claim from
fictional-actual continuity, exactly the polarity contract from
the ticket §2 abstraction.

Literal queries (capital of france) unchanged — polarity preamble
only injects when frame_kind classifies as "reference".

22 new tests (19 in test_frame.py + 3 in test_cli_render.py).
Full suite: 734 passed (was 712, +22).

Directive D3 status: ½ → ✓. Ticket #000002 closed.

All seven structural directives now ✓:
  D1, D2, D5 (were ✓);
  D3 #000002, D4 #000001, D6 #000003, D7 #000005 (closed in this
  series).
2026-05-01 20:18:13 -04:00
..
diagrams docs: mesh multiplayer protocol with dot diagrams 2026-04-28 12:54:36 -04:00
bench-maxing.md docs(claude): compress + attribute — split bench-maxing, add docs index 2026-05-01 14:12:37 -04:00
cti-architecture.md arch: layer-cake docs + verifier_policy_hash + old-maps principle 2026-05-01 12:10:29 -04:00
mesh-deploy.md docs: mesh-deploy runbook for two-host gossip setup 2026-04-28 17:24:37 -04:00
mesh.md docs: mesh multiplayer protocol with dot diagrams 2026-04-28 12:54:36 -04:00
naming-deferral.md arch: layer-cake docs + verifier_policy_hash + old-maps principle 2026-05-01 12:10:29 -04:00
qa-modes-bench-2026-04-30.md docs(qa): final stop-sequence bench row, day-journey net summary 2026-04-30 16:32:41 -04:00
reference-frame-failure-class.md qa: phrase-pattern retrieval route closes the reference-frame failure class 2026-05-01 13:53:03 -04:00
self-reference-distillation-design.md arch: layer-cake docs + verifier_policy_hash + old-maps principle 2026-05-01 12:10:29 -04:00
self-reference-thought-chains-design.md qa: self-reference thought chains — STRICT-as-fact substrate 2026-05-01 10:16:47 -04:00
seven-point-program.md qa(frame): #000002 land — reference-frame polarity contract (D3 → ✓) 2026-05-01 20:18:13 -04:00
test-coverage-audit-2026-05-01.md arch: layer-cake docs + verifier_policy_hash + old-maps principle 2026-05-01 12:10:29 -04:00
ticket-000001-retrieval-keywords-audit-gap.md qa(provenance): #000001 land — retrieval_plan_hash binds D4 2026-05-01 19:26:01 -04:00
ticket-000002-reference-frame-polarity-contract.md qa(frame): #000002 land — reference-frame polarity contract (D3 → ✓) 2026-05-01 20:18:13 -04:00
ticket-000003-anchor-class-warrant.md qa(warrant): #000003 land — anchor-class generalization (D6 → ✓) 2026-05-01 19:16:06 -04:00
ticket-000004-directive-coverage-in-bench.md docs: open #000004 (closed/retroactive) + #000005; update program status 2026-05-01 16:31:44 -04:00
ticket-000005-label-ladder-migration.md qa(label): #000005 land — four-rung ladder migration (D7 sharpened) 2026-05-01 19:20:47 -04:00
TICKETS.md qa(frame): #000002 land — reference-frame polarity contract (D3 → ✓) 2026-05-01 20:18:13 -04:00
verifier-semantic-gap-design.md docs(qa): design proposal for verifier semantic-gap NLI sidecar 2026-04-30 19:50:05 -04:00