arborist/aborist/qa
russell@unturf.com e5ffa6c6fd
qa(inspect): wordlist union (US+UK) + configurable supplemental dictionaries
Three changes that shape the same lever:

(1) The metaphor-cue wordlist now unions /usr/share/dict/words +
    /usr/share/dict/american-english + /usr/share/dict/british-english.
    The Debian split made the prior 'just symlink to american-english'
    miss British spellings (colour, organisation, realise) which
    silently became false negatives on British-speaker questions.
    Union: 102,485 → 104,305 entries on this machine. ~1,820 added
    British-specific entries.

(2) Supplemental dictionary support: operators can layer
    domain-specific vocabulary into the morphological substrate.
    Two paths:

      - Env var: ABORIST_METAPHOR_DICTS=/path/a:/path/b
      - Programmatic: register_metaphor_dictionary(path)

    Each supplemental dict is one word per line. The cue suffix
    tests (-ly stem, -ing stem, -est stem) then resolve domain
    stems automatically — adding 'aerodynamic' to a custom dict
    makes 'aerodynamically' classify as adverbial without code
    changes.

    Use case: 'a tree with its own vocabulary' — an aviation
    forest, a medical corpus, a legal-domain shard each carries
    jargon the standard wordlist doesn't cover. Register once,
    suffix tests pick up domain stems forever.

(3) README gains a 'Sidecar diagnostics' section with a table of
    the three sidecars (deflection, title-relevance, metaphor-
    deflection) plus a 'Metaphor-deflection cue dictionary' subsection
    explaining the derivation rule, the load order, and the per-
    forest vocabulary configurability. Architecturally documents
    why the rule is *derived* from the union (Phase-2 lesson) and
    not hand-curated.

3 new tests in tests/test_inspect.py:
  - register_metaphor_dictionary unions a custom path's words
  - ABORIST_METAPHOR_DICTS env var supplements with two paths
  - re-registering same path is idempotent

763/34 tests pass.
2026-05-02 14:27:24 -04:00
..
__init__.py multi-source corpus query: pose a question, the tree pulls related cached docs 2026-04-27 11:43:57 -04:00
client.py qa(client): scrub lone UTF-16 surrogates before httpx encode 2026-05-02 11:58:25 -04:00
concepts.py qa(concepts): corpus-derived concept_relations table replaces frozensets 2026-05-01 21:14:53 -04:00
dag.py speed: pytest-xdist, bench smoke, concurrency default; UTF surrogate fix 2026-05-02 09:29:40 -04:00
evidence.py speed: pytest-xdist, bench smoke, concurrency default; UTF surrogate fix 2026-05-02 09:29:40 -04:00
frame.py docs: tickets/ subdir + delete naming-deferral, ref-frame, coverage-audit 2026-05-02 12:51:09 -04:00
inspect.py qa(inspect): wordlist union (US+UK) + configurable supplemental dictionaries 2026-05-02 14:27:24 -04:00
keys.py speed: pytest-xdist, bench smoke, concurrency default; UTF surrogate fix 2026-05-02 09:29:40 -04:00
parse_claims.py qa: G0 claim-lattice-pointer answer mode — CTI quote-by-pointer 2026-04-29 21:19:19 -04:00
prompts.py docs(bench): rename qa-modes-bench-2026-05-02.md → qa-modes-bench.md 2026-05-02 12:27:38 -04:00
query.py qa(query): #000007 land — query-layer hyphen folding 2026-05-02 14:12:46 -04:00
repair.py qa: chain-segment failure localization + re-prompt repair tier 2026-04-29 19:27:33 -04:00
retrieval_plan.py docs: tickets/ subdir + delete naming-deferral, ref-frame, coverage-audit 2026-05-02 12:51:09 -04:00
runner.py qa(query): #000007 land — query-layer hyphen folding 2026-05-02 14:12:46 -04:00
verify.py qa: tighten TITLE_MISMATCH + DEFLECTION demotes from emergent-log review 2026-05-02 13:33:48 -04:00
warrant.py docs: tickets/ subdir + delete naming-deferral, ref-frame, coverage-audit 2026-05-02 12:51:09 -04:00