core/language_packs/data
Shay 44c0aa2896
feat(ADR-0169/CC-2+CC-3): CompositionClaim ratification handler + decomposer heuristic tightening (#393)
PR-β of the CompositionClaim wave (CC-2 + CC-3 bundled per the brief
pack — CC-3's heuristic depends on CC-2's new change_kind Literal value).
Mirrors the F1 / ADR-0168 FrameClaim template 1:1 with composition-specific
substitutions.

CC-2 — handler implementation
  - teaching/math_composition_proposal.py — MathCompositionClaimProposal
    adapter per ADR-0169.1 §"Data shape". Frozen dataclass, deterministic
    proposal_id / claim_signature, source="math_audit" pin at the
    proposal layer (rejects "corpus" laundering).
  - teaching/math_composition_ratification.py — apply_composition_claim()
    handler. SAFE_COMPOSITION_CATEGORIES = {multiplicative,
    additive, subtractive}_composition per ADR-0169 §"Initial safe
    category scope". New WrongCompositionCategory exception per
    ADR-0169.1 §"Trip-wires" #8. Writes only to
    language_packs/data/en_core_math_v1/compositions/{category}.jsonl;
    no solver / parser / decomposer / runtime mutation.
  - workbench/readers.py — _HANDLER_DISPATCH now routes
    composition_reclassification → CompositionClaim; suggested_cli
    branch added for both read_math_proposal and ratify_math_proposal.
  - teaching/math_contemplation_proposal.py — ChangeKind Literal +
    _VALID_CHANGE_KINDS frozenset extended with
    composition_reclassification.
  - language_packs/data/en_core_math_v1/compositions/.gitkeep —
    reviewed-pack scaffold.
  - tests/test_math_composition_ratification.py — 22 tests including
    case 0050 hazard pin, cross-process replay equivalence, queue-order
    independence, partition, no-corpus-laundering, dispatch wire,
    Literal acceptance, JSONL round-trip.
  - tests/test_adr_0172_w1_shape_proposal.py — parametrize round-trip
    over all 5 change_kinds.
  - core/cli.py — teaching suite tuple includes new test file.

CC-3 — decomposer heuristic tightening
  - teaching/math_contemplation.py::_CHANGE_KIND_BY_PAIR:
    + (incomplete_operation, quantity_extraction)         → composition_reclassification
    + (incomplete_operation, multi_quantity_composition)  → composition_reclassification
    - (unexpected_category, multi_subject_sentence)       demoted to injector_sub_shape
      (was frame_reclassification; FrameClaim SAFE_FRAME_CATEGORIES doesn't
       cover this — needs ReferenceClaim/CompositionClaim)
    - (unexpected_category, descriptive_frame_question)   demoted to injector_sub_shape
      (was frame_reclassification; needs SlotClaim, not FrameClaim)
    Updated hypothesis-step justification text to reflect new dispatch
    table.
  - tests/test_adr_0172_w2_decomposer.py — distribution assertion
    tightened from "≥3 matcher, ≥2 frame" to exact counts:
    3 matcher / 2 composition / 3 injector / 0 frame. New
    per-pair tests for the four CC-3 dispatch changes.

Verification on real audit_brief_11.json (20 of 47 highest-leverage
refusals now routable):

  2  composition_reclassification   (12 quantity_extraction + 8 multi_quantity_composition)
  3  injector_sub_shape             (2 multi_subject + 2 descriptive_frame + 4 unattached_quantity)
  3  matcher_extension              (9 pre_frame_filler + 4 fraction_percentage + 4 pronoun)
  0  frame_reclassification         (the two prior misroutes are gone)

Workbench POST /math-proposals/{id}/ratify on either composition
proposal now returns 200/routed with a real apply_composition_claim()
command instead of 501.

Suites green:
  - core test --suite teaching -q  → 71 passed
  - core test --suite runtime -q   → 20 passed

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-27 15:15:11 -07:00
..
en_arithmetic_v1 feat(parser): ADR-0123 comparison-phrasing substrate (substrate-only; lift deferred) 2026-05-23 01:56:28 -07:00
en_collapse_anchors_v1 feat(packs): apply ADR-0085 gloss fluency pass (#73) 2026-05-20 16:19:09 -07:00
en_core_action_v1 feat(packs): ADR-0085 content style pass v2 — 3sg + plural agreement (+ closure infra) (#100) 2026-05-20 23:12:28 -07:00
en_core_attitude_v1 feat(packs): ADR-0085 content style pass v2 — 3sg + plural agreement (+ closure infra) (#100) 2026-05-20 23:12:28 -07:00
en_core_causation_v1 feat(packs): ADR-0085 content style pass v2 — 3sg + plural agreement (+ closure infra) (#100) 2026-05-20 23:12:28 -07:00
en_core_cognition_v1 feat(packs): ADR-0085 content style pass v2 — 3sg + plural agreement (+ closure infra) (#100) 2026-05-20 23:12:28 -07:00
en_core_math_v1 feat(ADR-0169/CC-2+CC-3): CompositionClaim ratification handler + decomposer heuristic tightening (#393) 2026-05-27 15:15:11 -07:00
en_core_meta_v1 feat(packs): ADR-0085 content style pass v2 — 3sg + plural agreement (+ closure infra) (#100) 2026-05-20 23:12:28 -07:00
en_core_polarity_v1 feat(adr-0084): definitional layer — proposal + substrate (schema/loader/closure) (#64) 2026-05-20 15:25:25 -07:00
en_core_quantitative_v1 feat(packs): apply ADR-0085 gloss fluency pass (#73) 2026-05-20 16:19:09 -07:00
en_core_relations_v1 content(en_core_relations_v1): +14 kinship/social lemmas + +14 chains, cognition eval byte-identical, ratify-idempotent (#211) 2026-05-23 22:47:53 -07:00
en_core_relations_v2 feat(adr-0084): definitional layer — proposal + substrate (schema/loader/closure) (#64) 2026-05-20 15:25:25 -07:00
en_core_relations_v3 feat(adr-0084): definitional layer — proposal + substrate (schema/loader/closure) (#64) 2026-05-20 15:25:25 -07:00
en_core_spatial_v1 feat(packs): ADR-0085 content style pass v2 — 3sg + plural agreement (+ closure infra) (#100) 2026-05-20 23:12:28 -07:00
en_core_temporal_v1 feat(packs): apply ADR-0085 gloss fluency pass (#73) 2026-05-20 16:19:09 -07:00
en_mathematics_logic_v1 feat(packs): implement ADR-0097 — Mathematics-Logic Reasoning-Capable 2026-05-21 18:51:58 -07:00
en_minimal_v1 Implement trilingual field coherence 2026-05-13 19:53:37 -07:00
en_numerics_v1 feat(packs): ADR-0128.1+0128.2 — en_numerics_v1 + loader 2026-05-23 07:02:09 -07:00
en_physics_v1 feat(packs): ADR-0100/0101/0102 — three sibling domain ratifications 2026-05-21 20:25:48 -07:00
en_systems_software_v1 feat(packs): ADR-0100/0101/0102 — three sibling domain ratifications 2026-05-21 20:25:48 -07:00
en_units_v1 feat(packs): ADR-0127.1+0127.2 — en_units_v1 + loader 2026-05-23 07:04:06 -07:00
grc_logos_cognition_v1 feat(packs): ADR-0103 — attach hebrew_fluency + koine_greek_fluency lanes to ADR-0102 (#106) 2026-05-22 09:43:46 -07:00
grc_logos_micro_v1 feat(packs): ADR-0103 — attach hebrew_fluency + koine_greek_fluency lanes to ADR-0102 (#106) 2026-05-22 09:43:46 -07:00
he_core_cognition_v1 feat(packs): ADR-0103 — attach hebrew_fluency + koine_greek_fluency lanes to ADR-0102 (#106) 2026-05-22 09:43:46 -07:00
he_logos_micro_v1 feat(packs): ADR-0103 — attach hebrew_fluency + koine_greek_fluency lanes to ADR-0102 (#106) 2026-05-22 09:43:46 -07:00