rag-wright 0.1.0__tar.gz → 0.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1273) hide show
  1. rag_wright-0.2.0/.claude/skills/authoring-a-capability/SKILL.md +145 -0
  2. rag_wright-0.2.0/.claude/skills/building-an-ingestion-capability/SKILL.md +149 -0
  3. rag_wright-0.2.0/.claude/skills/classifier-opportunity-analysis/SKILL.md +188 -0
  4. rag_wright-0.2.0/.claude/skills/creating-evals/SKILL.md +146 -0
  5. rag_wright-0.2.0/.claude/skills/laya/SKILL.md +137 -0
  6. rag_wright-0.2.0/.claude/skills/qwen-vllm-modal/SKILL.md +104 -0
  7. rag_wright-0.2.0/.claude/skills/setfit/SKILL.md +304 -0
  8. rag_wright-0.2.0/.claude/skills/using-the-rag-wright-engine/SKILL.md +130 -0
  9. rag_wright-0.2.0/.github/workflows/publish.yml +57 -0
  10. rag_wright-0.2.0/.github/workflows/release-please.yml +30 -0
  11. rag_wright-0.2.0/.release-please-manifest.json +3 -0
  12. rag_wright-0.2.0/CHANGELOG.md +90 -0
  13. rag_wright-0.2.0/CLAUDE.md +207 -0
  14. rag_wright-0.2.0/PKG-INFO +192 -0
  15. rag_wright-0.2.0/README.md +139 -0
  16. rag_wright-0.2.0/docs/ARCHITECTURE_OVERVIEW.md +229 -0
  17. rag_wright-0.2.0/docs/ArcadeDB_Local.md +62 -0
  18. rag_wright-0.2.0/docs/OBSERVABILITY.md +94 -0
  19. rag_wright-0.2.0/docs/adr/0040-neuro-symbolic-extraction-fidelity-ontology-shacl-validation.md +111 -0
  20. rag_wright-0.2.0/docs/adr/0122-provision-boundary-deterministic-plus-decision-model-residue.md +84 -0
  21. rag_wright-0.2.0/docs/adr/0123-batched-releases-release-please-and-consumer-dependabot.md +33 -0
  22. rag_wright-0.2.0/docs/adr/0124-generic-ingestion-builder-and-hooks.md +255 -0
  23. rag_wright-0.2.0/docs/adr/README.md +183 -0
  24. rag_wright-0.2.0/docs/api/README.md +293 -0
  25. rag_wright-0.2.0/docs/architecture.md +113 -0
  26. rag_wright-0.2.0/docs/concepts.md +151 -0
  27. rag_wright-0.2.0/docs/configuration.md +118 -0
  28. rag_wright-0.2.0/docs/contract_pipeline_explainer.md +169 -0
  29. rag_wright-0.2.0/docs/corpus_ingest_recipe.md +73 -0
  30. rag_wright-0.2.0/docs/domain-adaptation/README.md +84 -0
  31. rag_wright-0.2.0/docs/domain-adaptation/_engine-gaps.md +144 -0
  32. rag_wright-0.2.0/docs/domain-adaptation/authoring-capabilities.md +113 -0
  33. rag_wright-0.2.0/docs/domain-adaptation/classification-and-decision-models.md +112 -0
  34. rag_wright-0.2.0/docs/domain-adaptation/entity-resolution.md +115 -0
  35. rag_wright-0.2.0/docs/domain-adaptation/kg-construction.md +147 -0
  36. rag_wright-0.2.0/docs/domain-adaptation/ontology-authoring.md +135 -0
  37. rag_wright-0.2.0/docs/installation.md +119 -0
  38. rag_wright-0.2.0/docs/playbook.md +226 -0
  39. rag_wright-0.2.0/docs/product/engine-api-migration-handoff.md +278 -0
  40. rag_wright-0.2.0/docs/product/engine_async_api.md +150 -0
  41. rag_wright-0.2.0/docs/product/seam-adaptation-guide.md +64 -0
  42. rag_wright-0.2.0/docs/quickstart.md +123 -0
  43. rag_wright-0.2.0/docs/reference-pack.md +98 -0
  44. rag_wright-0.2.0/docs/releasing.md +68 -0
  45. rag_wright-0.2.0/docs/specs/ingestion-hooks/ing5-doc-audit.md +75 -0
  46. rag_wright-0.2.0/docs/specs/ingestion-hooks/ing8-breaking-changes.md +251 -0
  47. rag_wright-0.2.0/docs/specs/ingestion-hooks/plan.md +52 -0
  48. rag_wright-0.2.0/docs/templates/product-starter/CLAUDE.md.template +210 -0
  49. rag_wright-0.2.0/docs/templates/product-starter/README.md +50 -0
  50. rag_wright-0.2.0/docs/templates/product-starter/dependabot.yml +22 -0
  51. rag_wright-0.2.0/docs/templates/product-starter/playbook.md.template +195 -0
  52. rag_wright-0.2.0/eval/boundary_residue_gold.py +99 -0
  53. rag_wright-0.2.0/eval/condensed_pipeline.py +285 -0
  54. rag_wright-0.2.0/eval/contract_parity_live.py +231 -0
  55. rag_wright-0.2.0/eval/cuad_highlight.py +218 -0
  56. rag_wright-0.2.0/eval/embedded_eval.py +90 -0
  57. rag_wright-0.2.0/eval/full_pipeline_rerank.py +159 -0
  58. rag_wright-0.2.0/eval/function_property_rerank.py +114 -0
  59. rag_wright-0.2.0/eval/function_rerank.py +107 -0
  60. rag_wright-0.2.0/eval/golden.py +112 -0
  61. rag_wright-0.2.0/eval/ground_discriminator_rerank.py +193 -0
  62. rag_wright-0.2.0/eval/harness.py +83 -0
  63. rag_wright-0.2.0/eval/ingestion_live_smoke.py +110 -0
  64. rag_wright-0.2.0/eval/kg_primary.py +400 -0
  65. rag_wright-0.2.0/eval/kg_property_rerank.py +135 -0
  66. rag_wright-0.2.0/eval/listwise_rerank.py +254 -0
  67. rag_wright-0.2.0/eval/nl_to_type.py +206 -0
  68. rag_wright-0.2.0/eval/relational_eval.py +91 -0
  69. rag_wright-0.2.0/eval/residual_decision_gold.py +135 -0
  70. rag_wright-0.2.0/eval/segmenter_eval.py +211 -0
  71. rag_wright-0.2.0/eval/semantic_judge_gold.py +155 -0
  72. rag_wright-0.2.0/eval/test_harness.py +112 -0
  73. rag_wright-0.2.0/eval/unit_grouper_eval.py +163 -0
  74. rag_wright-0.2.0/examples/quickstart.py +102 -0
  75. rag_wright-0.2.0/pyproject.toml +149 -0
  76. rag_wright-0.2.0/release-please-config.json +27 -0
  77. rag_wright-0.2.0/scripts/ab_model_overlap.py +110 -0
  78. rag_wright-0.2.0/scripts/acord_unify.py +223 -0
  79. rag_wright-0.2.0/scripts/acquire_cuad.py +183 -0
  80. rag_wright-0.2.0/scripts/acquire_edgar.py +105 -0
  81. rag_wright-0.2.0/scripts/backfill_affiliations.py +106 -0
  82. rag_wright-0.2.0/scripts/backfill_clause_span_id.py +97 -0
  83. rag_wright-0.2.0/scripts/bootstrap_template_capture.py +72 -0
  84. rag_wright-0.2.0/scripts/bootstrap_typed_edges.py +54 -0
  85. rag_wright-0.2.0/scripts/build_api_docs.py +99 -0
  86. rag_wright-0.2.0/scripts/build_api_docs.sh +6 -0
  87. rag_wright-0.2.0/scripts/build_cuad_clause_cache.py +92 -0
  88. rag_wright-0.2.0/scripts/build_function_routing_map.py +51 -0
  89. rag_wright-0.2.0/scripts/cic1_assemble_v2.py +125 -0
  90. rag_wright-0.2.0/scripts/cic1_generate_training.py +154 -0
  91. rag_wright-0.2.0/scripts/cic1_jev_actor.py +100 -0
  92. rag_wright-0.2.0/scripts/cic1_label_spans.py +202 -0
  93. rag_wright-0.2.0/scripts/cic1_relabel_rubric.py +107 -0
  94. rag_wright-0.2.0/scripts/cic1_relabel_rubric2.py +108 -0
  95. rag_wright-0.2.0/scripts/compare_extraction_models.py +142 -0
  96. rag_wright-0.2.0/scripts/compliance_actor_gate_smoke.py +115 -0
  97. rag_wright-0.2.0/scripts/compliance_engine_smoke.py +66 -0
  98. rag_wright-0.2.0/scripts/compliance_policy_demo.py +70 -0
  99. rag_wright-0.2.0/scripts/curate_taxonomy_gaps.py +127 -0
  100. rag_wright-0.2.0/scripts/dg_model_ab.py +119 -0
  101. rag_wright-0.2.0/scripts/distill/eval_all.py +122 -0
  102. rag_wright-0.2.0/scripts/distill/eval_ce.py +107 -0
  103. rag_wright-0.2.0/scripts/distill/export_ce_dataset.py +69 -0
  104. rag_wright-0.2.0/scripts/enrich_edgar_candidates.py +114 -0
  105. rag_wright-0.2.0/scripts/eval_classifier_guided_vs_tagparse.py +156 -0
  106. rag_wright-0.2.0/scripts/eval_compliance_gold.py +92 -0
  107. rag_wright-0.2.0/scripts/generate_contract_python.py +30 -0
  108. rag_wright-0.2.0/scripts/ingest_compliance_async_prod2.py +69 -0
  109. rag_wright-0.2.0/scripts/ingest_compliance_document_prod2.py +59 -0
  110. rag_wright-0.2.0/scripts/ingest_compliance_prod2.py +65 -0
  111. rag_wright-0.2.0/scripts/ingest_cuad.py +203 -0
  112. rag_wright-0.2.0/scripts/ingest_cuad_full.py +63 -0
  113. rag_wright-0.2.0/scripts/ingest_ftc_compliance.py +52 -0
  114. rag_wright-0.2.0/scripts/ingest_prod1.py +96 -0
  115. rag_wright-0.2.0/scripts/ingest_prod1_async.py +102 -0
  116. rag_wright-0.2.0/scripts/ingest_smoke.py +83 -0
  117. rag_wright-0.2.0/scripts/label_new_functions.py +136 -0
  118. rag_wright-0.2.0/scripts/legb_function_gate_recall.py +121 -0
  119. rag_wright-0.2.0/scripts/mcp_compliance_agent_demo.py +78 -0
  120. rag_wright-0.2.0/scripts/mcp_intra_document_qa_smoke.py +65 -0
  121. rag_wright-0.2.0/scripts/mcp_query_legs_agent_demo.py +84 -0
  122. rag_wright-0.2.0/scripts/measure_generation_robustness.py +172 -0
  123. rag_wright-0.2.0/scripts/migrate_silver_evidence_autotag.py +58 -0
  124. rag_wright-0.2.0/scripts/migrate_span_fields.py +38 -0
  125. rag_wright-0.2.0/scripts/mine_scarce_functions.py +89 -0
  126. rag_wright-0.2.0/scripts/modal_query_app.py +103 -0
  127. rag_wright-0.2.0/scripts/phase_a_leg_validate.py +120 -0
  128. rag_wright-0.2.0/scripts/populate_clause_kg.py +142 -0
  129. rag_wright-0.2.0/scripts/populate_entity_graph.py +107 -0
  130. rag_wright-0.2.0/scripts/populate_entity_graph_extracted.py +110 -0
  131. rag_wright-0.2.0/scripts/populate_property_store.py +202 -0
  132. rag_wright-0.2.0/scripts/prep_relational_verification.py +113 -0
  133. rag_wright-0.2.0/scripts/reclassify_kg.py +323 -0
  134. rag_wright-0.2.0/scripts/refresh_framework_graph.sh +103 -0
  135. rag_wright-0.2.0/scripts/run_clause_exception_linking.py +39 -0
  136. rag_wright-0.2.0/scripts/semantic_judge_live_validate.py +131 -0
  137. rag_wright-0.2.0/scripts/semantic_judge_probe.py +84 -0
  138. rag_wright-0.2.0/scripts/snapshot_leg_a_eval.py +130 -0
  139. rag_wright-0.2.0/scripts/stack_correctness_validate.py +120 -0
  140. rag_wright-0.2.0/scripts/table_retrieval_smoke.py +118 -0
  141. rag_wright-0.2.0/scripts/train_function_classifier.py +95 -0
  142. rag_wright-0.2.0/scripts/train_legalbert_function.py +270 -0
  143. rag_wright-0.2.0/scripts/typed_rerank_validate.py +74 -0
  144. rag_wright-0.2.0/scripts/vllm_extraction_ab.py +111 -0
  145. rag_wright-0.2.0/scripts/vllm_kg_query_validate.py +83 -0
  146. rag_wright-0.2.0/src/rag_wright/api/__init__.py +83 -0
  147. rag_wright-0.2.0/src/rag_wright/api/config.py +61 -0
  148. rag_wright-0.2.0/src/rag_wright/api/documents.py +47 -0
  149. rag_wright-0.2.0/src/rag_wright/api/ids.py +23 -0
  150. rag_wright-0.2.0/src/rag_wright/api/invoke.py +99 -0
  151. rag_wright-0.2.0/src/rag_wright/api/kg.py +64 -0
  152. rag_wright-0.2.0/src/rag_wright/api/mcp.py +94 -0
  153. rag_wright-0.2.0/src/rag_wright/api/workspace.py +86 -0
  154. rag_wright-0.2.0/src/rag_wright/capabilities/document_parse.py +300 -0
  155. rag_wright-0.2.0/src/rag_wright/capabilities/invoke.py +31 -0
  156. rag_wright-0.2.0/src/rag_wright/capabilities/jev_decision.py +48 -0
  157. rag_wright-0.2.0/src/rag_wright/capabilities/manifests.py +355 -0
  158. rag_wright-0.2.0/src/rag_wright/capabilities/parsing.py +305 -0
  159. rag_wright-0.2.0/src/rag_wright/capabilities/registry.py +237 -0
  160. rag_wright-0.2.0/src/rag_wright/capabilities/remote_encoders.py +62 -0
  161. rag_wright-0.2.0/src/rag_wright/capabilities/rlm_chunking.py +808 -0
  162. rag_wright-0.2.0/src/rag_wright/capabilities/span_relevance_judgment.py +191 -0
  163. rag_wright-0.2.0/src/rag_wright/capabilities/vlm_ocr.py +100 -0
  164. rag_wright-0.2.0/src/rag_wright/contracts/extraction.py +128 -0
  165. rag_wright-0.2.0/src/rag_wright/contracts/graph.py +67 -0
  166. rag_wright-0.2.0/src/rag_wright/contracts/identifiers.py +153 -0
  167. rag_wright-0.2.0/src/rag_wright/contracts/ingestion.py +306 -0
  168. rag_wright-0.2.0/src/rag_wright/contracts/span.py +129 -0
  169. rag_wright-0.2.0/src/rag_wright/corpus/document_parser.py +362 -0
  170. rag_wright-0.2.0/src/rag_wright/corpus/embedded.py +310 -0
  171. rag_wright-0.2.0/src/rag_wright/ingestion/__init__.py +11 -0
  172. rag_wright-0.2.0/src/rag_wright/ingestion/builder.py +468 -0
  173. rag_wright-0.2.0/src/rag_wright/ingestion/evaluate.py +235 -0
  174. rag_wright-0.2.0/src/rag_wright/ingestion/group.py +145 -0
  175. rag_wright-0.2.0/src/rag_wright/ingestion/layout.py +81 -0
  176. rag_wright-0.2.0/src/rag_wright/ingestion/segment.py +128 -0
  177. rag_wright-0.2.0/src/rag_wright/ingestion/tables.py +54 -0
  178. rag_wright-0.2.0/src/rag_wright/models/profiles.py +332 -0
  179. rag_wright-0.2.0/src/rag_wright/models/tag_structured.py +285 -0
  180. rag_wright-0.2.0/src/rag_wright/models/usage.py +104 -0
  181. rag_wright-0.2.0/src/rag_wright/ontology/pack_schema.py +47 -0
  182. rag_wright-0.2.0/src/rag_wright/packs/__init__.py +6 -0
  183. rag_wright-0.2.0/src/rag_wright/packs/compliance/__init__.py +4 -0
  184. rag_wright-0.2.0/src/rag_wright/packs/compliance/capabilities/assertion_extraction.py +79 -0
  185. rag_wright-0.2.0/src/rag_wright/packs/compliance/capabilities/claim_extraction.py +153 -0
  186. rag_wright-0.2.0/src/rag_wright/packs/compliance/capabilities/compliance_judgment.py +322 -0
  187. rag_wright-0.2.0/src/rag_wright/packs/compliance/capabilities/compliance_store.py +138 -0
  188. rag_wright-0.2.0/src/rag_wright/packs/compliance/capabilities/requirement_extraction.py +250 -0
  189. rag_wright-0.2.0/src/rag_wright/packs/compliance/mcp/compliance_server.py +299 -0
  190. rag_wright-0.2.0/src/rag_wright/packs/compliance/ontology/compliance_bridge.ttl +195 -0
  191. rag_wright-0.2.0/src/rag_wright/packs/compliance/ontology/loader.py +210 -0
  192. rag_wright-0.2.0/src/rag_wright/packs/compliance/pack.py +210 -0
  193. rag_wright-0.2.0/src/rag_wright/packs/compliance/skills/claim_extraction/template.py +50 -0
  194. rag_wright-0.2.0/src/rag_wright/packs/compliance/skills/requirement_extraction/template.py +50 -0
  195. rag_wright-0.2.0/src/rag_wright/packs/compliance/subgraphs/compliance_check.py +1041 -0
  196. rag_wright-0.2.0/src/rag_wright/packs/compliance/subgraphs/compliance_ingestion.py +307 -0
  197. rag_wright-0.2.0/src/rag_wright/packs/compliance/subgraphs/requirement_extraction.py +137 -0
  198. rag_wright-0.2.0/src/rag_wright/packs/contracts/__init__.py +4 -0
  199. rag_wright-0.2.0/src/rag_wright/packs/contracts/capabilities/clause_exception_linking.py +118 -0
  200. rag_wright-0.2.0/src/rag_wright/packs/contracts/capabilities/contract_kg_serve.py +156 -0
  201. rag_wright-0.2.0/src/rag_wright/packs/contracts/capabilities/contract_kg_store.py +456 -0
  202. rag_wright-0.2.0/src/rag_wright/packs/contracts/capabilities/dg_extraction.py +585 -0
  203. rag_wright-0.2.0/src/rag_wright/packs/contracts/capabilities/graph_extraction.py +243 -0
  204. rag_wright-0.2.0/src/rag_wright/packs/contracts/capabilities/highlight_serve.py +134 -0
  205. rag_wright-0.2.0/src/rag_wright/packs/contracts/capabilities/property_boosted_retrieval.py +125 -0
  206. rag_wright-0.2.0/src/rag_wright/packs/contracts/capabilities/query_function_classifier.py +94 -0
  207. rag_wright-0.2.0/src/rag_wright/packs/contracts/capabilities/query_understanding.py +109 -0
  208. rag_wright-0.2.0/src/rag_wright/packs/contracts/corpus/cuad.py +153 -0
  209. rag_wright-0.2.0/src/rag_wright/packs/contracts/corpus/cuad_ingestion.py +73 -0
  210. rag_wright-0.2.0/src/rag_wright/packs/contracts/corpus/gcs_ingestion.py +120 -0
  211. rag_wright-0.2.0/src/rag_wright/packs/contracts/mcp/__init__.py +12 -0
  212. rag_wright-0.2.0/src/rag_wright/packs/contracts/mcp/intra_document_qa_server.py +170 -0
  213. rag_wright-0.2.0/src/rag_wright/packs/contracts/mcp/relational_qa_server.py +171 -0
  214. rag_wright-0.2.0/src/rag_wright/packs/contracts/mcp/typed_property_retrieval_server.py +191 -0
  215. rag_wright-0.2.0/src/rag_wright/packs/contracts/ontology/clause_template.py +964 -0
  216. rag_wright-0.2.0/src/rag_wright/packs/contracts/ontology/codegen.py +84 -0
  217. rag_wright-0.2.0/src/rag_wright/packs/contracts/ontology/contract_bridge.ttl +2741 -0
  218. rag_wright-0.2.0/src/rag_wright/packs/contracts/ontology/contract_taxonomy.py +24 -0
  219. rag_wright-0.2.0/src/rag_wright/packs/contracts/ontology/derive.py +58 -0
  220. rag_wright-0.2.0/src/rag_wright/packs/contracts/ontology/loader.py +270 -0
  221. rag_wright-0.2.0/src/rag_wright/packs/contracts/ontology/template_introspect.py +100 -0
  222. rag_wright-0.2.0/src/rag_wright/packs/contracts/options.py +27 -0
  223. rag_wright-0.2.0/src/rag_wright/packs/contracts/pack.py +420 -0
  224. rag_wright-0.2.0/src/rag_wright/packs/contracts/schemas/function.py +167 -0
  225. rag_wright-0.2.0/src/rag_wright/packs/contracts/schemas/ontology.py +85 -0
  226. rag_wright-0.2.0/src/rag_wright/packs/contracts/schemas/property.py +201 -0
  227. rag_wright-0.2.0/src/rag_wright/packs/contracts/schemas/query_intent.py +53 -0
  228. rag_wright-0.2.0/src/rag_wright/packs/contracts/schemas/value_match.py +84 -0
  229. rag_wright-0.2.0/src/rag_wright/packs/contracts/skills/corpus_ingest/SKILL.md +101 -0
  230. rag_wright-0.2.0/src/rag_wright/packs/contracts/spans/boundary.py +135 -0
  231. rag_wright-0.2.0/src/rag_wright/packs/contracts/spans/clause_function_classifier.py +490 -0
  232. rag_wright-0.2.0/src/rag_wright/packs/contracts/spans/clause_kg_extractor.py +338 -0
  233. rag_wright-0.2.0/src/rag_wright/packs/contracts/spans/cuad_labels.py +81 -0
  234. rag_wright-0.2.0/src/rag_wright/packs/contracts/spans/dim_classifier.py +158 -0
  235. rag_wright-0.2.0/src/rag_wright/packs/contracts/spans/function_families.py +62 -0
  236. rag_wright-0.2.0/src/rag_wright/packs/contracts/spans/hybrid_classifier.py +103 -0
  237. rag_wright-0.2.0/src/rag_wright/packs/contracts/spans/legalbert_classifier.py +119 -0
  238. rag_wright-0.2.0/src/rag_wright/packs/contracts/spans/model_capabilities.py +107 -0
  239. rag_wright-0.2.0/src/rag_wright/packs/contracts/spans/new_function_labels.py +111 -0
  240. rag_wright-0.2.0/src/rag_wright/packs/contracts/spans/property_extractor.py +389 -0
  241. rag_wright-0.2.0/src/rag_wright/packs/contracts/spans/property_grounding.py +182 -0
  242. rag_wright-0.2.0/src/rag_wright/packs/contracts/spans/reclassify.py +77 -0
  243. rag_wright-0.2.0/src/rag_wright/packs/contracts/spans/residual_candidates.py +180 -0
  244. rag_wright-0.2.0/src/rag_wright/packs/contracts/spans/scarce_function_labels.py +105 -0
  245. rag_wright-0.2.0/src/rag_wright/packs/contracts/spans/segment.py +282 -0
  246. rag_wright-0.2.0/src/rag_wright/packs/contracts/spans/semantic_judge.py +271 -0
  247. rag_wright-0.2.0/src/rag_wright/packs/contracts/spans/symbolic_validation.py +131 -0
  248. rag_wright-0.2.0/src/rag_wright/packs/contracts/spans/tag_clause_extractor.py +182 -0
  249. rag_wright-0.2.0/src/rag_wright/packs/contracts/subgraphs/async_ingestion.py +204 -0
  250. rag_wright-0.2.0/src/rag_wright/packs/contracts/subgraphs/contract_ingestion_pipeline.py +985 -0
  251. rag_wright-0.2.0/src/rag_wright/packs/contracts/subgraphs/intra_document_qa.py +328 -0
  252. rag_wright-0.2.0/src/rag_wright/packs/contracts/subgraphs/query_constraint_extraction.py +73 -0
  253. rag_wright-0.2.0/src/rag_wright/packs/contracts/subgraphs/relational_qa.py +165 -0
  254. rag_wright-0.2.0/src/rag_wright/packs/contracts/subgraphs/typed_clause_extraction.py +171 -0
  255. rag_wright-0.2.0/src/rag_wright/packs/contracts/subgraphs/typed_property_retrieval.py +278 -0
  256. rag_wright-0.2.0/src/rag_wright/packs/reference_seam.py +123 -0
  257. rag_wright-0.2.0/src/rag_wright/store/arcadedb.py +986 -0
  258. rag_wright-0.2.0/src/rag_wright/store/seam.py +219 -0
  259. rag_wright-0.2.0/src/rag_wright/subgraphs/__init__.py +0 -0
  260. rag_wright-0.2.0/src/rag_wright/subgraphs/graph_extraction.py +100 -0
  261. rag_wright-0.2.0/src/rag_wright/subgraphs/scaffold.py +70 -0
  262. rag_wright-0.2.0/src/rag_wright/subgraphs/semantic_chunking.py +183 -0
  263. rag_wright-0.2.0/tasks.md +5053 -0
  264. rag_wright-0.2.0/tests/__init__.py +0 -0
  265. rag_wright-0.2.0/tests/api/__init__.py +0 -0
  266. rag_wright-0.2.0/tests/api/test_capability_reexports.py +43 -0
  267. rag_wright-0.2.0/tests/api/test_documents.py +73 -0
  268. rag_wright-0.2.0/tests/api/test_invoke.py +311 -0
  269. rag_wright-0.2.0/tests/api/test_kg.py +87 -0
  270. rag_wright-0.2.0/tests/api/test_mcp.py +108 -0
  271. rag_wright-0.2.0/tests/api/test_options.py +93 -0
  272. rag_wright-0.2.0/tests/api/test_workspace.py +85 -0
  273. rag_wright-0.2.0/tests/arch/test_api_docs_current.py +17 -0
  274. rag_wright-0.2.0/tests/arch/test_doc_references.py +121 -0
  275. rag_wright-0.2.0/tests/arch/test_import_contracts.py +33 -0
  276. rag_wright-0.2.0/tests/capabilities/__init__.py +0 -0
  277. rag_wright-0.2.0/tests/capabilities/test_assertion_extraction.py +62 -0
  278. rag_wright-0.2.0/tests/capabilities/test_authoring_contract.py +79 -0
  279. rag_wright-0.2.0/tests/capabilities/test_claim_extraction.py +151 -0
  280. rag_wright-0.2.0/tests/capabilities/test_clause_exception_linking.py +103 -0
  281. rag_wright-0.2.0/tests/capabilities/test_compliance_judgment.py +356 -0
  282. rag_wright-0.2.0/tests/capabilities/test_compliance_store.py +116 -0
  283. rag_wright-0.2.0/tests/capabilities/test_contract_kg_serve.py +193 -0
  284. rag_wright-0.2.0/tests/capabilities/test_contract_kg_store.py +155 -0
  285. rag_wright-0.2.0/tests/capabilities/test_contract_kg_store_reads.py +133 -0
  286. rag_wright-0.2.0/tests/capabilities/test_contract_taxonomy_and_spans.py +103 -0
  287. rag_wright-0.2.0/tests/capabilities/test_dg_adapter.py +62 -0
  288. rag_wright-0.2.0/tests/capabilities/test_dg_async.py +100 -0
  289. rag_wright-0.2.0/tests/capabilities/test_dg_extraction.py +188 -0
  290. rag_wright-0.2.0/tests/capabilities/test_dg_model_seam.py +51 -0
  291. rag_wright-0.2.0/tests/capabilities/test_dg_private.py +55 -0
  292. rag_wright-0.2.0/tests/capabilities/test_entity_resolution.py +189 -0
  293. rag_wright-0.2.0/tests/capabilities/test_graph_extraction.py +186 -0
  294. rag_wright-0.2.0/tests/capabilities/test_highlight_serve.py +118 -0
  295. rag_wright-0.2.0/tests/capabilities/test_jev_decision.py +131 -0
  296. rag_wright-0.2.0/tests/capabilities/test_manifest_validation.py +30 -0
  297. rag_wright-0.2.0/tests/capabilities/test_manifests.py +288 -0
  298. rag_wright-0.2.0/tests/capabilities/test_parsing.py +180 -0
  299. rag_wright-0.2.0/tests/capabilities/test_parties_extraction.py +71 -0
  300. rag_wright-0.2.0/tests/capabilities/test_property_boosted_retrieval.py +128 -0
  301. rag_wright-0.2.0/tests/capabilities/test_query_function_classifier.py +43 -0
  302. rag_wright-0.2.0/tests/capabilities/test_query_understanding.py +117 -0
  303. rag_wright-0.2.0/tests/capabilities/test_registry.py +298 -0
  304. rag_wright-0.2.0/tests/capabilities/test_remote_encoders.py +70 -0
  305. rag_wright-0.2.0/tests/capabilities/test_requirement_extraction.py +262 -0
  306. rag_wright-0.2.0/tests/capabilities/test_retrieval_core.py +113 -0
  307. rag_wright-0.2.0/tests/capabilities/test_vlm_ocr.py +103 -0
  308. rag_wright-0.2.0/tests/compliance_fakes.py +38 -0
  309. rag_wright-0.2.0/tests/conftest.py +92 -0
  310. rag_wright-0.2.0/tests/contracts/__init__.py +0 -0
  311. rag_wright-0.2.0/tests/contracts/test_compliance.py +164 -0
  312. rag_wright-0.2.0/tests/contracts/test_cuad_highlight_contracts.py +109 -0
  313. rag_wright-0.2.0/tests/contracts/test_extraction.py +160 -0
  314. rag_wright-0.2.0/tests/contracts/test_function.py +119 -0
  315. rag_wright-0.2.0/tests/contracts/test_function_routing.py +69 -0
  316. rag_wright-0.2.0/tests/contracts/test_identifiers.py +161 -0
  317. rag_wright-0.2.0/tests/contracts/test_ingestion_hooks.py +247 -0
  318. rag_wright-0.2.0/tests/contracts/test_jurisdiction.py +76 -0
  319. rag_wright-0.2.0/tests/contracts/test_ontology.py +167 -0
  320. rag_wright-0.2.0/tests/contracts/test_property.py +107 -0
  321. rag_wright-0.2.0/tests/contracts/test_value_match.py +43 -0
  322. rag_wright-0.2.0/tests/corpus/__init__.py +0 -0
  323. rag_wright-0.2.0/tests/corpus/_ooxml_fixtures.py +150 -0
  324. rag_wright-0.2.0/tests/corpus/test_cuad.py +45 -0
  325. rag_wright-0.2.0/tests/corpus/test_cuad_ingestion.py +38 -0
  326. rag_wright-0.2.0/tests/corpus/test_document_parser.py +341 -0
  327. rag_wright-0.2.0/tests/corpus/test_edgar.py +136 -0
  328. rag_wright-0.2.0/tests/corpus/test_embedded.py +212 -0
  329. rag_wright-0.2.0/tests/corpus/test_gcs_ingestion.py +138 -0
  330. rag_wright-0.2.0/tests/corpus/test_parse_wire2.py +64 -0
  331. rag_wright-0.2.0/tests/corpus/test_selection.py +133 -0
  332. rag_wright-0.2.0/tests/fixtures/ingestion/segmenter_gold.json +37 -0
  333. rag_wright-0.2.0/tests/fixtures/ingestion/textile_spec_sheet.md +33 -0
  334. rag_wright-0.2.0/tests/fixtures/ingestion/textile_test_report.md +24 -0
  335. rag_wright-0.2.0/tests/foundation/__init__.py +0 -0
  336. rag_wright-0.2.0/tests/ingestion/__init__.py +0 -0
  337. rag_wright-0.2.0/tests/ingestion/test_builder.py +256 -0
  338. rag_wright-0.2.0/tests/ingestion/test_evaluate.py +45 -0
  339. rag_wright-0.2.0/tests/ingestion/test_layout_segmenter.py +147 -0
  340. rag_wright-0.2.0/tests/ingestion/test_spreadsheet_content.py +122 -0
  341. rag_wright-0.2.0/tests/ingestion/test_table_rows.py +102 -0
  342. rag_wright-0.2.0/tests/ingestion/test_tuning.py +60 -0
  343. rag_wright-0.2.0/tests/ingestion/test_unit_grouper.py +127 -0
  344. rag_wright-0.2.0/tests/journey/test_pack_schema.py +79 -0
  345. rag_wright-0.2.0/tests/mcp/__init__.py +0 -0
  346. rag_wright-0.2.0/tests/mcp/test_compliance_server.py +200 -0
  347. rag_wright-0.2.0/tests/mcp/test_intra_document_qa_server.py +64 -0
  348. rag_wright-0.2.0/tests/mcp/test_no_model_supplied_tenant.py +123 -0
  349. rag_wright-0.2.0/tests/mcp/test_relational_qa_server.py +63 -0
  350. rag_wright-0.2.0/tests/mcp/test_typed_property_retrieval_server.py +74 -0
  351. rag_wright-0.2.0/tests/models/__init__.py +0 -0
  352. rag_wright-0.2.0/tests/models/test_profile_routing.py +77 -0
  353. rag_wright-0.2.0/tests/models/test_profile_seam.py +254 -0
  354. rag_wright-0.2.0/tests/models/test_serving_wiring.py +82 -0
  355. rag_wright-0.2.0/tests/models/test_tag_structured.py +320 -0
  356. rag_wright-0.2.0/tests/ontology/__init__.py +0 -0
  357. rag_wright-0.2.0/tests/ontology/test_clause_template.py +171 -0
  358. rag_wright-0.2.0/tests/ontology/test_compliance_ontology_authoritative.py +94 -0
  359. rag_wright-0.2.0/tests/ontology/test_derivation.py +120 -0
  360. rag_wright-0.2.0/tests/ontology/test_entity_taxonomy.py +33 -0
  361. rag_wright-0.2.0/tests/ontology/test_generated_template_meta_in_sync.py +21 -0
  362. rag_wright-0.2.0/tests/ontology/test_generated_vocab_in_sync.py +23 -0
  363. rag_wright-0.2.0/tests/ontology/test_template_captured_in_ttl.py +22 -0
  364. rag_wright-0.2.0/tests/ontology/test_ttl_is_source_of_truth.py +33 -0
  365. rag_wright-0.2.0/tests/reference/test_compliance_reference.py +146 -0
  366. rag_wright-0.2.0/tests/reference/test_contract_seam.py +116 -0
  367. rag_wright-0.2.0/tests/skills/__init__.py +0 -0
  368. rag_wright-0.2.0/tests/skills/test_ingestion_skill_example.py +79 -0
  369. rag_wright-0.2.0/tests/spans/test_boundary.py +148 -0
  370. rag_wright-0.2.0/tests/spans/test_classifier_property_extractor.py +96 -0
  371. rag_wright-0.2.0/tests/spans/test_clause_classifier_tags_0005.py +54 -0
  372. rag_wright-0.2.0/tests/spans/test_clause_function_classifier.py +185 -0
  373. rag_wright-0.2.0/tests/spans/test_clause_function_classifier_async.py +78 -0
  374. rag_wright-0.2.0/tests/spans/test_clause_kg_extractor.py +234 -0
  375. rag_wright-0.2.0/tests/spans/test_clause_kg_extractor_async.py +70 -0
  376. rag_wright-0.2.0/tests/spans/test_dim_classifier.py +43 -0
  377. rag_wright-0.2.0/tests/spans/test_dim_fleet_live.py +147 -0
  378. rag_wright-0.2.0/tests/spans/test_function_classifier.py +111 -0
  379. rag_wright-0.2.0/tests/spans/test_hybrid_classifier.py +86 -0
  380. rag_wright-0.2.0/tests/spans/test_hybrid_property_extractor.py +150 -0
  381. rag_wright-0.2.0/tests/spans/test_legalbert_classifier.py +56 -0
  382. rag_wright-0.2.0/tests/spans/test_model_capabilities.py +51 -0
  383. rag_wright-0.2.0/tests/spans/test_new_function_labels.py +51 -0
  384. rag_wright-0.2.0/tests/spans/test_property_extractor.py +108 -0
  385. rag_wright-0.2.0/tests/spans/test_property_grounding.py +108 -0
  386. rag_wright-0.2.0/tests/spans/test_reclassify.py +59 -0
  387. rag_wright-0.2.0/tests/spans/test_residual_decision.py +158 -0
  388. rag_wright-0.2.0/tests/spans/test_scarce_function_labels.py +64 -0
  389. rag_wright-0.2.0/tests/spans/test_segment.py +280 -0
  390. rag_wright-0.2.0/tests/spans/test_segmentation_vocab.py +44 -0
  391. rag_wright-0.2.0/tests/spans/test_semantic_judge.py +224 -0
  392. rag_wright-0.2.0/tests/spans/test_setfit_clause_adapter.py +70 -0
  393. rag_wright-0.2.0/tests/spans/test_span_offsets.py +54 -0
  394. rag_wright-0.2.0/tests/spans/test_stage_labels_0005.py +41 -0
  395. rag_wright-0.2.0/tests/spans/test_symbolic_validation.py +197 -0
  396. rag_wright-0.2.0/tests/spans/test_tag_clause_extractor.py +140 -0
  397. rag_wright-0.2.0/tests/store/__init__.py +0 -0
  398. rag_wright-0.2.0/tests/store/test_arcadedb_clause_kg.py +193 -0
  399. rag_wright-0.2.0/tests/store/test_arcadedb_contract.py +73 -0
  400. rag_wright-0.2.0/tests/store/test_arcadedb_property.py +109 -0
  401. rag_wright-0.2.0/tests/store/test_arcadedb_requirement_sources.py +101 -0
  402. rag_wright-0.2.0/tests/store/test_arcadedb_schema.py +253 -0
  403. rag_wright-0.2.0/tests/store/test_arcadedb_span.py +147 -0
  404. rag_wright-0.2.0/tests/store/test_concurrent_writes.py +50 -0
  405. rag_wright-0.2.0/tests/store/test_document_scope.py +151 -0
  406. rag_wright-0.2.0/tests/store/test_engine_domain_neutral.py +48 -0
  407. rag_wright-0.2.0/tests/store/test_kg_edges.py +125 -0
  408. rag_wright-0.2.0/tests/store/test_kg_read.py +114 -0
  409. rag_wright-0.2.0/tests/store/test_neutral_schema.py +79 -0
  410. rag_wright-0.2.0/tests/subgraphs/__init__.py +0 -0
  411. rag_wright-0.2.0/tests/subgraphs/test_async_ingestion.py +258 -0
  412. rag_wright-0.2.0/tests/subgraphs/test_chunk7_structure_carry.py +77 -0
  413. rag_wright-0.2.0/tests/subgraphs/test_clause_results.py +55 -0
  414. rag_wright-0.2.0/tests/subgraphs/test_compliance_check.py +1495 -0
  415. rag_wright-0.2.0/tests/subgraphs/test_compliance_ingestion.py +342 -0
  416. rag_wright-0.2.0/tests/subgraphs/test_contract_ingestion_pipeline.py +351 -0
  417. rag_wright-0.2.0/tests/subgraphs/test_contract_ingestion_pipeline_async.py +142 -0
  418. rag_wright-0.2.0/tests/subgraphs/test_contract_ingestion_pipeline_graph_async.py +223 -0
  419. rag_wright-0.2.0/tests/subgraphs/test_ingest_knobs.py +32 -0
  420. rag_wright-0.2.0/tests/subgraphs/test_ingest_segment_classify.py +119 -0
  421. rag_wright-0.2.0/tests/subgraphs/test_intra_document_qa.py +395 -0
  422. rag_wright-0.2.0/tests/subgraphs/test_partial_entry_contract.py +81 -0
  423. rag_wright-0.2.0/tests/subgraphs/test_query_constraint_extraction.py +47 -0
  424. rag_wright-0.2.0/tests/subgraphs/test_relational_qa.py +128 -0
  425. rag_wright-0.2.0/tests/subgraphs/test_requirement_extraction.py +127 -0
  426. rag_wright-0.2.0/tests/subgraphs/test_typed_clause_extraction.py +117 -0
  427. rag_wright-0.2.0/tests/subgraphs/test_typed_property_retrieval.py +244 -0
  428. rag_wright-0.2.0/tests/test_populate_clause_kg.py +70 -0
  429. rag_wright-0.2.0/tests/util/__init__.py +0 -0
  430. rag_wright-0.2.0/uv.lock +4863 -0
  431. rag_wright-0.1.0/.claude/skills/authoring-a-capability/SKILL.md +0 -106
  432. rag_wright-0.1.0/.claude/skills/classifier-opportunity-analysis/SKILL.md +0 -175
  433. rag_wright-0.1.0/.claude/skills/creating-evals/SKILL.md +0 -114
  434. rag_wright-0.1.0/.claude/skills/laya/SKILL.md +0 -119
  435. rag_wright-0.1.0/.claude/skills/qwen-vllm-modal/SKILL.md +0 -96
  436. rag_wright-0.1.0/.claude/skills/setfit/SKILL.md +0 -293
  437. rag_wright-0.1.0/.claude/skills/using-the-rag-wright-engine/SKILL.md +0 -90
  438. rag_wright-0.1.0/.github/workflows/publish.yml +0 -56
  439. rag_wright-0.1.0/CHANGELOG.md +0 -48
  440. rag_wright-0.1.0/CLAUDE.md +0 -201
  441. rag_wright-0.1.0/PKG-INFO +0 -168
  442. rag_wright-0.1.0/README.md +0 -118
  443. rag_wright-0.1.0/docs/ARCHITECTURE_OVERVIEW.md +0 -199
  444. rag_wright-0.1.0/docs/ArcadeDB_Local.md +0 -43
  445. rag_wright-0.1.0/docs/OBSERVABILITY.md +0 -88
  446. rag_wright-0.1.0/docs/adr/0040-neuro-symbolic-extraction-fidelity-ontology-shacl-validation.md +0 -82
  447. rag_wright-0.1.0/docs/adr/0122-provision-boundary-deterministic-plus-decision-model-residue.md +0 -60
  448. rag_wright-0.1.0/docs/adr/README.md +0 -181
  449. rag_wright-0.1.0/docs/api/README.md +0 -123
  450. rag_wright-0.1.0/docs/architecture.md +0 -103
  451. rag_wright-0.1.0/docs/concepts.md +0 -110
  452. rag_wright-0.1.0/docs/configuration.md +0 -91
  453. rag_wright-0.1.0/docs/contract_pipeline_explainer.md +0 -169
  454. rag_wright-0.1.0/docs/corpus_ingest_recipe.md +0 -56
  455. rag_wright-0.1.0/docs/domain-adaptation/README.md +0 -71
  456. rag_wright-0.1.0/docs/domain-adaptation/_engine-gaps.md +0 -44
  457. rag_wright-0.1.0/docs/domain-adaptation/authoring-capabilities.md +0 -85
  458. rag_wright-0.1.0/docs/domain-adaptation/classification-and-decision-models.md +0 -69
  459. rag_wright-0.1.0/docs/domain-adaptation/entity-resolution.md +0 -54
  460. rag_wright-0.1.0/docs/domain-adaptation/kg-construction.md +0 -66
  461. rag_wright-0.1.0/docs/domain-adaptation/ontology-authoring.md +0 -83
  462. rag_wright-0.1.0/docs/installation.md +0 -93
  463. rag_wright-0.1.0/docs/playbook.md +0 -222
  464. rag_wright-0.1.0/docs/product/engine-api-migration-handoff.md +0 -278
  465. rag_wright-0.1.0/docs/product/engine_async_api.md +0 -150
  466. rag_wright-0.1.0/docs/product/seam-adaptation-guide.md +0 -64
  467. rag_wright-0.1.0/docs/quickstart.md +0 -106
  468. rag_wright-0.1.0/docs/reference-pack.md +0 -69
  469. rag_wright-0.1.0/docs/templates/product-starter/CLAUDE.md.template +0 -193
  470. rag_wright-0.1.0/docs/templates/product-starter/README.md +0 -45
  471. rag_wright-0.1.0/docs/templates/product-starter/playbook.md.template +0 -174
  472. rag_wright-0.1.0/eval/condensed_pipeline.py +0 -284
  473. rag_wright-0.1.0/eval/cuad_highlight.py +0 -218
  474. rag_wright-0.1.0/eval/full_pipeline_rerank.py +0 -159
  475. rag_wright-0.1.0/eval/function_property_rerank.py +0 -113
  476. rag_wright-0.1.0/eval/function_rerank.py +0 -107
  477. rag_wright-0.1.0/eval/golden.py +0 -112
  478. rag_wright-0.1.0/eval/ground_discriminator_rerank.py +0 -193
  479. rag_wright-0.1.0/eval/harness.py +0 -83
  480. rag_wright-0.1.0/eval/kg_primary.py +0 -399
  481. rag_wright-0.1.0/eval/kg_property_rerank.py +0 -135
  482. rag_wright-0.1.0/eval/listwise_rerank.py +0 -254
  483. rag_wright-0.1.0/eval/nl_to_type.py +0 -206
  484. rag_wright-0.1.0/eval/relational_eval.py +0 -91
  485. rag_wright-0.1.0/eval/test_harness.py +0 -112
  486. rag_wright-0.1.0/examples/quickstart.py +0 -94
  487. rag_wright-0.1.0/pyproject.toml +0 -157
  488. rag_wright-0.1.0/scripts/ab_model_overlap.py +0 -110
  489. rag_wright-0.1.0/scripts/acord_unify.py +0 -223
  490. rag_wright-0.1.0/scripts/acquire_cuad.py +0 -183
  491. rag_wright-0.1.0/scripts/acquire_edgar.py +0 -105
  492. rag_wright-0.1.0/scripts/backfill_affiliations.py +0 -106
  493. rag_wright-0.1.0/scripts/backfill_clause_span_id.py +0 -95
  494. rag_wright-0.1.0/scripts/bootstrap_template_capture.py +0 -72
  495. rag_wright-0.1.0/scripts/bootstrap_typed_edges.py +0 -54
  496. rag_wright-0.1.0/scripts/build_api_docs.py +0 -59
  497. rag_wright-0.1.0/scripts/build_api_docs.sh +0 -7
  498. rag_wright-0.1.0/scripts/build_cuad_clause_cache.py +0 -92
  499. rag_wright-0.1.0/scripts/build_function_routing_map.py +0 -50
  500. rag_wright-0.1.0/scripts/cic1_assemble_v2.py +0 -125
  501. rag_wright-0.1.0/scripts/cic1_generate_training.py +0 -154
  502. rag_wright-0.1.0/scripts/cic1_jev_actor.py +0 -100
  503. rag_wright-0.1.0/scripts/cic1_label_spans.py +0 -202
  504. rag_wright-0.1.0/scripts/cic1_relabel_rubric.py +0 -107
  505. rag_wright-0.1.0/scripts/cic1_relabel_rubric2.py +0 -108
  506. rag_wright-0.1.0/scripts/compare_extraction_models.py +0 -142
  507. rag_wright-0.1.0/scripts/compliance_actor_gate_smoke.py +0 -113
  508. rag_wright-0.1.0/scripts/compliance_engine_smoke.py +0 -65
  509. rag_wright-0.1.0/scripts/compliance_policy_demo.py +0 -69
  510. rag_wright-0.1.0/scripts/curate_taxonomy_gaps.py +0 -127
  511. rag_wright-0.1.0/scripts/dg_model_ab.py +0 -119
  512. rag_wright-0.1.0/scripts/distill/eval_all.py +0 -122
  513. rag_wright-0.1.0/scripts/distill/eval_ce.py +0 -107
  514. rag_wright-0.1.0/scripts/distill/export_ce_dataset.py +0 -69
  515. rag_wright-0.1.0/scripts/enrich_edgar_candidates.py +0 -114
  516. rag_wright-0.1.0/scripts/eval_classifier_guided_vs_tagparse.py +0 -156
  517. rag_wright-0.1.0/scripts/eval_compliance_gold.py +0 -91
  518. rag_wright-0.1.0/scripts/generate_contract_python.py +0 -30
  519. rag_wright-0.1.0/scripts/ingest_compliance_async_prod2.py +0 -67
  520. rag_wright-0.1.0/scripts/ingest_compliance_document_prod2.py +0 -57
  521. rag_wright-0.1.0/scripts/ingest_compliance_prod2.py +0 -63
  522. rag_wright-0.1.0/scripts/ingest_cuad.py +0 -203
  523. rag_wright-0.1.0/scripts/ingest_cuad_full.py +0 -61
  524. rag_wright-0.1.0/scripts/ingest_ftc_compliance.py +0 -50
  525. rag_wright-0.1.0/scripts/ingest_prod1.py +0 -95
  526. rag_wright-0.1.0/scripts/ingest_prod1_async.py +0 -101
  527. rag_wright-0.1.0/scripts/ingest_smoke.py +0 -81
  528. rag_wright-0.1.0/scripts/label_new_functions.py +0 -136
  529. rag_wright-0.1.0/scripts/legb_function_gate_recall.py +0 -121
  530. rag_wright-0.1.0/scripts/mcp_compliance_agent_demo.py +0 -78
  531. rag_wright-0.1.0/scripts/mcp_intra_document_qa_smoke.py +0 -65
  532. rag_wright-0.1.0/scripts/mcp_query_legs_agent_demo.py +0 -84
  533. rag_wright-0.1.0/scripts/measure_generation_robustness.py +0 -172
  534. rag_wright-0.1.0/scripts/migrate_silver_evidence_autotag.py +0 -58
  535. rag_wright-0.1.0/scripts/mine_scarce_functions.py +0 -89
  536. rag_wright-0.1.0/scripts/modal_query_app.py +0 -103
  537. rag_wright-0.1.0/scripts/phase_a_leg_validate.py +0 -120
  538. rag_wright-0.1.0/scripts/populate_clause_kg.py +0 -141
  539. rag_wright-0.1.0/scripts/populate_entity_graph.py +0 -107
  540. rag_wright-0.1.0/scripts/populate_entity_graph_extracted.py +0 -110
  541. rag_wright-0.1.0/scripts/populate_property_store.py +0 -202
  542. rag_wright-0.1.0/scripts/prep_relational_verification.py +0 -113
  543. rag_wright-0.1.0/scripts/reclassify_kg.py +0 -322
  544. rag_wright-0.1.0/scripts/refresh_framework_graph.sh +0 -100
  545. rag_wright-0.1.0/scripts/run_clause_exception_linking.py +0 -38
  546. rag_wright-0.1.0/scripts/semantic_judge_live_validate.py +0 -131
  547. rag_wright-0.1.0/scripts/semantic_judge_probe.py +0 -84
  548. rag_wright-0.1.0/scripts/snapshot_leg_a_eval.py +0 -130
  549. rag_wright-0.1.0/scripts/stack_correctness_validate.py +0 -120
  550. rag_wright-0.1.0/scripts/table_retrieval_smoke.py +0 -118
  551. rag_wright-0.1.0/scripts/train_function_classifier.py +0 -95
  552. rag_wright-0.1.0/scripts/train_legalbert_function.py +0 -270
  553. rag_wright-0.1.0/scripts/typed_rerank_validate.py +0 -74
  554. rag_wright-0.1.0/scripts/vllm_extraction_ab.py +0 -111
  555. rag_wright-0.1.0/scripts/vllm_kg_query_validate.py +0 -83
  556. rag_wright-0.1.0/src/rag_wright/api/__init__.py +0 -33
  557. rag_wright-0.1.0/src/rag_wright/api/config.py +0 -59
  558. rag_wright-0.1.0/src/rag_wright/api/documents.py +0 -39
  559. rag_wright-0.1.0/src/rag_wright/api/ids.py +0 -31
  560. rag_wright-0.1.0/src/rag_wright/api/invoke.py +0 -99
  561. rag_wright-0.1.0/src/rag_wright/api/kg.py +0 -61
  562. rag_wright-0.1.0/src/rag_wright/api/mcp.py +0 -94
  563. rag_wright-0.1.0/src/rag_wright/api/workspace.py +0 -85
  564. rag_wright-0.1.0/src/rag_wright/capabilities/assertion_extraction.py +0 -79
  565. rag_wright-0.1.0/src/rag_wright/capabilities/claim_extraction.py +0 -153
  566. rag_wright-0.1.0/src/rag_wright/capabilities/clause_exception_linking.py +0 -117
  567. rag_wright-0.1.0/src/rag_wright/capabilities/compliance_judgment.py +0 -322
  568. rag_wright-0.1.0/src/rag_wright/capabilities/compliance_store.py +0 -87
  569. rag_wright-0.1.0/src/rag_wright/capabilities/contract_kg_serve.py +0 -156
  570. rag_wright-0.1.0/src/rag_wright/capabilities/contract_kg_store.py +0 -251
  571. rag_wright-0.1.0/src/rag_wright/capabilities/dg_extraction.py +0 -585
  572. rag_wright-0.1.0/src/rag_wright/capabilities/document_parse.py +0 -87
  573. rag_wright-0.1.0/src/rag_wright/capabilities/graph_extraction.py +0 -243
  574. rag_wright-0.1.0/src/rag_wright/capabilities/highlight_serve.py +0 -142
  575. rag_wright-0.1.0/src/rag_wright/capabilities/invoke.py +0 -31
  576. rag_wright-0.1.0/src/rag_wright/capabilities/jev_decision.py +0 -38
  577. rag_wright-0.1.0/src/rag_wright/capabilities/manifests.py +0 -872
  578. rag_wright-0.1.0/src/rag_wright/capabilities/parsing.py +0 -286
  579. rag_wright-0.1.0/src/rag_wright/capabilities/property_boosted_retrieval.py +0 -125
  580. rag_wright-0.1.0/src/rag_wright/capabilities/query_function_classifier.py +0 -94
  581. rag_wright-0.1.0/src/rag_wright/capabilities/query_understanding.py +0 -109
  582. rag_wright-0.1.0/src/rag_wright/capabilities/registry.py +0 -262
  583. rag_wright-0.1.0/src/rag_wright/capabilities/remote_encoders.py +0 -94
  584. rag_wright-0.1.0/src/rag_wright/capabilities/requirement_extraction.py +0 -247
  585. rag_wright-0.1.0/src/rag_wright/capabilities/rlm_chunking.py +0 -808
  586. rag_wright-0.1.0/src/rag_wright/capabilities/span_relevance_judgment.py +0 -191
  587. rag_wright-0.1.0/src/rag_wright/capabilities/vlm_ocr.py +0 -85
  588. rag_wright-0.1.0/src/rag_wright/contracts/extraction.py +0 -130
  589. rag_wright-0.1.0/src/rag_wright/contracts/function.py +0 -167
  590. rag_wright-0.1.0/src/rag_wright/contracts/identifiers.py +0 -153
  591. rag_wright-0.1.0/src/rag_wright/contracts/ontology.py +0 -142
  592. rag_wright-0.1.0/src/rag_wright/contracts/property.py +0 -201
  593. rag_wright-0.1.0/src/rag_wright/contracts/query_intent.py +0 -53
  594. rag_wright-0.1.0/src/rag_wright/contracts/span.py +0 -76
  595. rag_wright-0.1.0/src/rag_wright/contracts/value_match.py +0 -84
  596. rag_wright-0.1.0/src/rag_wright/corpus/cuad.py +0 -153
  597. rag_wright-0.1.0/src/rag_wright/corpus/cuad_ingestion.py +0 -72
  598. rag_wright-0.1.0/src/rag_wright/corpus/document_parser.py +0 -299
  599. rag_wright-0.1.0/src/rag_wright/corpus/gcs_ingestion.py +0 -120
  600. rag_wright-0.1.0/src/rag_wright/mcp/__init__.py +0 -11
  601. rag_wright-0.1.0/src/rag_wright/mcp/compliance_server.py +0 -299
  602. rag_wright-0.1.0/src/rag_wright/mcp/intra_document_qa_server.py +0 -170
  603. rag_wright-0.1.0/src/rag_wright/mcp/relational_qa_server.py +0 -171
  604. rag_wright-0.1.0/src/rag_wright/mcp/typed_property_retrieval_server.py +0 -191
  605. rag_wright-0.1.0/src/rag_wright/models/profiles.py +0 -331
  606. rag_wright-0.1.0/src/rag_wright/models/tag_structured.py +0 -285
  607. rag_wright-0.1.0/src/rag_wright/models/usage.py +0 -102
  608. rag_wright-0.1.0/src/rag_wright/ontology/clause_template.py +0 -964
  609. rag_wright-0.1.0/src/rag_wright/ontology/codegen.py +0 -84
  610. rag_wright-0.1.0/src/rag_wright/ontology/compliance_bridge.ttl +0 -186
  611. rag_wright-0.1.0/src/rag_wright/ontology/contract_bridge.ttl +0 -2685
  612. rag_wright-0.1.0/src/rag_wright/ontology/contract_taxonomy.py +0 -24
  613. rag_wright-0.1.0/src/rag_wright/ontology/derive.py +0 -58
  614. rag_wright-0.1.0/src/rag_wright/ontology/loader.py +0 -435
  615. rag_wright-0.1.0/src/rag_wright/ontology/template_introspect.py +0 -100
  616. rag_wright-0.1.0/src/rag_wright/reference/__init__.py +0 -2
  617. rag_wright-0.1.0/src/rag_wright/reference/contract_seam.py +0 -123
  618. rag_wright-0.1.0/src/rag_wright/skills/claim_extraction/template.py +0 -50
  619. rag_wright-0.1.0/src/rag_wright/skills/corpus_ingest/SKILL.md +0 -106
  620. rag_wright-0.1.0/src/rag_wright/skills/requirement_extraction/template.py +0 -50
  621. rag_wright-0.1.0/src/rag_wright/spans/boundary.py +0 -78
  622. rag_wright-0.1.0/src/rag_wright/spans/clause_function_classifier.py +0 -490
  623. rag_wright-0.1.0/src/rag_wright/spans/clause_kg_extractor.py +0 -337
  624. rag_wright-0.1.0/src/rag_wright/spans/cuad_labels.py +0 -81
  625. rag_wright-0.1.0/src/rag_wright/spans/dim_classifier.py +0 -158
  626. rag_wright-0.1.0/src/rag_wright/spans/function_families.py +0 -62
  627. rag_wright-0.1.0/src/rag_wright/spans/hybrid_classifier.py +0 -103
  628. rag_wright-0.1.0/src/rag_wright/spans/legalbert_classifier.py +0 -83
  629. rag_wright-0.1.0/src/rag_wright/spans/model_capabilities.py +0 -107
  630. rag_wright-0.1.0/src/rag_wright/spans/new_function_labels.py +0 -111
  631. rag_wright-0.1.0/src/rag_wright/spans/property_extractor.py +0 -365
  632. rag_wright-0.1.0/src/rag_wright/spans/property_grounding.py +0 -182
  633. rag_wright-0.1.0/src/rag_wright/spans/reclassify.py +0 -77
  634. rag_wright-0.1.0/src/rag_wright/spans/scarce_function_labels.py +0 -105
  635. rag_wright-0.1.0/src/rag_wright/spans/segment.py +0 -341
  636. rag_wright-0.1.0/src/rag_wright/spans/semantic_judge.py +0 -197
  637. rag_wright-0.1.0/src/rag_wright/spans/symbolic_validation.py +0 -131
  638. rag_wright-0.1.0/src/rag_wright/spans/tag_clause_extractor.py +0 -182
  639. rag_wright-0.1.0/src/rag_wright/store/arcadedb.py +0 -1135
  640. rag_wright-0.1.0/src/rag_wright/store/seam.py +0 -213
  641. rag_wright-0.1.0/src/rag_wright/subgraphs/async_ingestion.py +0 -204
  642. rag_wright-0.1.0/src/rag_wright/subgraphs/compliance_check.py +0 -1042
  643. rag_wright-0.1.0/src/rag_wright/subgraphs/compliance_ingestion.py +0 -306
  644. rag_wright-0.1.0/src/rag_wright/subgraphs/contract_ingestion_pipeline.py +0 -999
  645. rag_wright-0.1.0/src/rag_wright/subgraphs/graph_extraction.py +0 -102
  646. rag_wright-0.1.0/src/rag_wright/subgraphs/intra_document_qa.py +0 -328
  647. rag_wright-0.1.0/src/rag_wright/subgraphs/query_constraint_extraction.py +0 -73
  648. rag_wright-0.1.0/src/rag_wright/subgraphs/relational_qa.py +0 -165
  649. rag_wright-0.1.0/src/rag_wright/subgraphs/requirement_extraction.py +0 -137
  650. rag_wright-0.1.0/src/rag_wright/subgraphs/scaffold.py +0 -65
  651. rag_wright-0.1.0/src/rag_wright/subgraphs/semantic_chunking.py +0 -183
  652. rag_wright-0.1.0/src/rag_wright/subgraphs/typed_clause_extraction.py +0 -172
  653. rag_wright-0.1.0/src/rag_wright/subgraphs/typed_property_retrieval.py +0 -278
  654. rag_wright-0.1.0/tasks.md +0 -5053
  655. rag_wright-0.1.0/tests/api/test_capability_reexports.py +0 -30
  656. rag_wright-0.1.0/tests/api/test_documents.py +0 -66
  657. rag_wright-0.1.0/tests/api/test_invoke.py +0 -311
  658. rag_wright-0.1.0/tests/api/test_kg.py +0 -90
  659. rag_wright-0.1.0/tests/api/test_mcp.py +0 -108
  660. rag_wright-0.1.0/tests/api/test_options.py +0 -84
  661. rag_wright-0.1.0/tests/api/test_workspace.py +0 -84
  662. rag_wright-0.1.0/tests/arch/test_import_contracts.py +0 -32
  663. rag_wright-0.1.0/tests/capabilities/test_assertion_extraction.py +0 -62
  664. rag_wright-0.1.0/tests/capabilities/test_authoring_contract.py +0 -58
  665. rag_wright-0.1.0/tests/capabilities/test_claim_extraction.py +0 -151
  666. rag_wright-0.1.0/tests/capabilities/test_clause_exception_linking.py +0 -103
  667. rag_wright-0.1.0/tests/capabilities/test_compliance_judgment.py +0 -356
  668. rag_wright-0.1.0/tests/capabilities/test_compliance_store.py +0 -123
  669. rag_wright-0.1.0/tests/capabilities/test_contract_kg_serve.py +0 -193
  670. rag_wright-0.1.0/tests/capabilities/test_contract_kg_store.py +0 -138
  671. rag_wright-0.1.0/tests/capabilities/test_contract_kg_store_reads.py +0 -132
  672. rag_wright-0.1.0/tests/capabilities/test_contract_taxonomy_and_spans.py +0 -102
  673. rag_wright-0.1.0/tests/capabilities/test_dg_adapter.py +0 -62
  674. rag_wright-0.1.0/tests/capabilities/test_dg_async.py +0 -94
  675. rag_wright-0.1.0/tests/capabilities/test_dg_extraction.py +0 -182
  676. rag_wright-0.1.0/tests/capabilities/test_dg_model_seam.py +0 -43
  677. rag_wright-0.1.0/tests/capabilities/test_dg_private.py +0 -55
  678. rag_wright-0.1.0/tests/capabilities/test_entity_resolution.py +0 -189
  679. rag_wright-0.1.0/tests/capabilities/test_graph_extraction.py +0 -186
  680. rag_wright-0.1.0/tests/capabilities/test_highlight_serve.py +0 -118
  681. rag_wright-0.1.0/tests/capabilities/test_jev_decision.py +0 -119
  682. rag_wright-0.1.0/tests/capabilities/test_manifests.py +0 -288
  683. rag_wright-0.1.0/tests/capabilities/test_parsing.py +0 -148
  684. rag_wright-0.1.0/tests/capabilities/test_parties_extraction.py +0 -71
  685. rag_wright-0.1.0/tests/capabilities/test_property_boosted_retrieval.py +0 -128
  686. rag_wright-0.1.0/tests/capabilities/test_query_function_classifier.py +0 -43
  687. rag_wright-0.1.0/tests/capabilities/test_query_understanding.py +0 -117
  688. rag_wright-0.1.0/tests/capabilities/test_registry.py +0 -283
  689. rag_wright-0.1.0/tests/capabilities/test_remote_encoders.py +0 -68
  690. rag_wright-0.1.0/tests/capabilities/test_requirement_extraction.py +0 -262
  691. rag_wright-0.1.0/tests/capabilities/test_retrieval_core.py +0 -113
  692. rag_wright-0.1.0/tests/capabilities/test_vlm_ocr.py +0 -54
  693. rag_wright-0.1.0/tests/conftest.py +0 -8
  694. rag_wright-0.1.0/tests/contracts/test_compliance.py +0 -164
  695. rag_wright-0.1.0/tests/contracts/test_cuad_highlight_contracts.py +0 -109
  696. rag_wright-0.1.0/tests/contracts/test_extraction.py +0 -171
  697. rag_wright-0.1.0/tests/contracts/test_function.py +0 -119
  698. rag_wright-0.1.0/tests/contracts/test_function_routing.py +0 -69
  699. rag_wright-0.1.0/tests/contracts/test_identifiers.py +0 -161
  700. rag_wright-0.1.0/tests/contracts/test_jurisdiction.py +0 -76
  701. rag_wright-0.1.0/tests/contracts/test_ontology.py +0 -167
  702. rag_wright-0.1.0/tests/contracts/test_property.py +0 -107
  703. rag_wright-0.1.0/tests/contracts/test_value_match.py +0 -43
  704. rag_wright-0.1.0/tests/corpus/test_cuad.py +0 -45
  705. rag_wright-0.1.0/tests/corpus/test_cuad_ingestion.py +0 -38
  706. rag_wright-0.1.0/tests/corpus/test_document_parser.py +0 -312
  707. rag_wright-0.1.0/tests/corpus/test_edgar.py +0 -136
  708. rag_wright-0.1.0/tests/corpus/test_gcs_ingestion.py +0 -138
  709. rag_wright-0.1.0/tests/corpus/test_parse_wire2.py +0 -50
  710. rag_wright-0.1.0/tests/corpus/test_selection.py +0 -133
  711. rag_wright-0.1.0/tests/journey/test_pack_schema.py +0 -79
  712. rag_wright-0.1.0/tests/mcp/test_compliance_server.py +0 -200
  713. rag_wright-0.1.0/tests/mcp/test_intra_document_qa_server.py +0 -64
  714. rag_wright-0.1.0/tests/mcp/test_no_model_supplied_tenant.py +0 -116
  715. rag_wright-0.1.0/tests/mcp/test_relational_qa_server.py +0 -63
  716. rag_wright-0.1.0/tests/mcp/test_typed_property_retrieval_server.py +0 -74
  717. rag_wright-0.1.0/tests/models/test_profile_routing.py +0 -77
  718. rag_wright-0.1.0/tests/models/test_profile_seam.py +0 -264
  719. rag_wright-0.1.0/tests/models/test_serving_wiring.py +0 -82
  720. rag_wright-0.1.0/tests/models/test_tag_structured.py +0 -320
  721. rag_wright-0.1.0/tests/ontology/test_clause_template.py +0 -171
  722. rag_wright-0.1.0/tests/ontology/test_compliance_ontology_authoritative.py +0 -92
  723. rag_wright-0.1.0/tests/ontology/test_derivation.py +0 -120
  724. rag_wright-0.1.0/tests/ontology/test_entity_taxonomy.py +0 -33
  725. rag_wright-0.1.0/tests/ontology/test_generated_template_meta_in_sync.py +0 -21
  726. rag_wright-0.1.0/tests/ontology/test_generated_vocab_in_sync.py +0 -23
  727. rag_wright-0.1.0/tests/ontology/test_template_captured_in_ttl.py +0 -22
  728. rag_wright-0.1.0/tests/ontology/test_ttl_is_source_of_truth.py +0 -33
  729. rag_wright-0.1.0/tests/reference/test_compliance_reference.py +0 -146
  730. rag_wright-0.1.0/tests/reference/test_contract_seam.py +0 -116
  731. rag_wright-0.1.0/tests/spans/test_boundary.py +0 -35
  732. rag_wright-0.1.0/tests/spans/test_classifier_property_extractor.py +0 -96
  733. rag_wright-0.1.0/tests/spans/test_clause_classifier_tags_0005.py +0 -54
  734. rag_wright-0.1.0/tests/spans/test_clause_function_classifier.py +0 -185
  735. rag_wright-0.1.0/tests/spans/test_clause_function_classifier_async.py +0 -78
  736. rag_wright-0.1.0/tests/spans/test_clause_kg_extractor.py +0 -234
  737. rag_wright-0.1.0/tests/spans/test_clause_kg_extractor_async.py +0 -70
  738. rag_wright-0.1.0/tests/spans/test_dim_classifier.py +0 -43
  739. rag_wright-0.1.0/tests/spans/test_dim_fleet_live.py +0 -147
  740. rag_wright-0.1.0/tests/spans/test_function_classifier.py +0 -111
  741. rag_wright-0.1.0/tests/spans/test_hybrid_classifier.py +0 -86
  742. rag_wright-0.1.0/tests/spans/test_hybrid_property_extractor.py +0 -150
  743. rag_wright-0.1.0/tests/spans/test_legalbert_classifier.py +0 -56
  744. rag_wright-0.1.0/tests/spans/test_model_capabilities.py +0 -51
  745. rag_wright-0.1.0/tests/spans/test_new_function_labels.py +0 -51
  746. rag_wright-0.1.0/tests/spans/test_property_extractor.py +0 -108
  747. rag_wright-0.1.0/tests/spans/test_property_grounding.py +0 -108
  748. rag_wright-0.1.0/tests/spans/test_reclassify.py +0 -59
  749. rag_wright-0.1.0/tests/spans/test_scarce_function_labels.py +0 -64
  750. rag_wright-0.1.0/tests/spans/test_segment.py +0 -281
  751. rag_wright-0.1.0/tests/spans/test_semantic_judge.py +0 -143
  752. rag_wright-0.1.0/tests/spans/test_setfit_clause_adapter.py +0 -70
  753. rag_wright-0.1.0/tests/spans/test_span_offsets.py +0 -54
  754. rag_wright-0.1.0/tests/spans/test_stage_labels_0005.py +0 -41
  755. rag_wright-0.1.0/tests/spans/test_symbolic_validation.py +0 -197
  756. rag_wright-0.1.0/tests/spans/test_tag_clause_extractor.py +0 -140
  757. rag_wright-0.1.0/tests/store/test_arcadedb_clause_kg.py +0 -175
  758. rag_wright-0.1.0/tests/store/test_arcadedb_contract.py +0 -72
  759. rag_wright-0.1.0/tests/store/test_arcadedb_property.py +0 -107
  760. rag_wright-0.1.0/tests/store/test_arcadedb_requirement_sources.py +0 -97
  761. rag_wright-0.1.0/tests/store/test_arcadedb_schema.py +0 -224
  762. rag_wright-0.1.0/tests/store/test_arcadedb_span.py +0 -107
  763. rag_wright-0.1.0/tests/store/test_document_scope.py +0 -150
  764. rag_wright-0.1.0/tests/store/test_engine_domain_neutral.py +0 -48
  765. rag_wright-0.1.0/tests/store/test_kg_edges.py +0 -124
  766. rag_wright-0.1.0/tests/store/test_kg_read.py +0 -107
  767. rag_wright-0.1.0/tests/subgraphs/test_async_ingestion.py +0 -256
  768. rag_wright-0.1.0/tests/subgraphs/test_chunk7_structure_carry.py +0 -73
  769. rag_wright-0.1.0/tests/subgraphs/test_compliance_check.py +0 -1509
  770. rag_wright-0.1.0/tests/subgraphs/test_compliance_ingestion.py +0 -333
  771. rag_wright-0.1.0/tests/subgraphs/test_contract_ingestion_pipeline.py +0 -300
  772. rag_wright-0.1.0/tests/subgraphs/test_contract_ingestion_pipeline_async.py +0 -142
  773. rag_wright-0.1.0/tests/subgraphs/test_contract_ingestion_pipeline_graph_async.py +0 -223
  774. rag_wright-0.1.0/tests/subgraphs/test_ingest_knobs.py +0 -32
  775. rag_wright-0.1.0/tests/subgraphs/test_ingest_segment_classify.py +0 -121
  776. rag_wright-0.1.0/tests/subgraphs/test_intra_document_qa.py +0 -395
  777. rag_wright-0.1.0/tests/subgraphs/test_partial_entry_contract.py +0 -81
  778. rag_wright-0.1.0/tests/subgraphs/test_query_constraint_extraction.py +0 -47
  779. rag_wright-0.1.0/tests/subgraphs/test_relational_qa.py +0 -128
  780. rag_wright-0.1.0/tests/subgraphs/test_requirement_extraction.py +0 -127
  781. rag_wright-0.1.0/tests/subgraphs/test_typed_clause_extraction.py +0 -117
  782. rag_wright-0.1.0/tests/subgraphs/test_typed_property_retrieval.py +0 -244
  783. rag_wright-0.1.0/tests/test_populate_clause_kg.py +0 -70
  784. rag_wright-0.1.0/uv.lock +0 -4848
  785. {rag_wright-0.1.0 → rag_wright-0.2.0}/.claude/settings.json +0 -0
  786. {rag_wright-0.1.0 → rag_wright-0.2.0}/.env.example +0 -0
  787. {rag_wright-0.1.0 → rag_wright-0.2.0}/.gitignore +0 -0
  788. {rag_wright-0.1.0 → rag_wright-0.2.0}/LICENSE +0 -0
  789. {rag_wright-0.1.0 → rag_wright-0.2.0}/SPEC.md +0 -0
  790. {rag_wright-0.1.0 → rag_wright-0.2.0}/conftest.py +0 -0
  791. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0001-stack-and-library-choices.md +0 -0
  792. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0002-validation-corpus-cuad-edgar.md +0 -0
  793. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0003-ard-registration-and-capability-kinds.md +0 -0
  794. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0004-entity-disambiguation.md +0 -0
  795. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0005-relational-golden-set.md +0 -0
  796. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0006-model-profile.md +0 -0
  797. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0007-arcadedb-store-schema.md +0 -0
  798. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0008-unified-framework-index-docs-grounding.md +0 -0
  799. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0009-rlm-chunking-retained-as-configurable-capability.md +0 -0
  800. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0010-transformers-pinned-below-5-for-flagembedding-reranker.md +0 -0
  801. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0011-cuad-not-a-retrieval-benchmark-acord-for-queries.md +0 -0
  802. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0012-entity-mention-confidence-no-proximity-edges.md +0 -0
  803. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0013-entity-resolution-matching-strategy.md +0 -0
  804. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0014-split-generation-and-vision-to-text.md +0 -0
  805. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0015-rlm-dynamic-subagents-and-granted-subagents.md +0 -0
  806. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0016-rlm-defined-by-required-capabilities-enforced-as-tests.md +0 -0
  807. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0017-dynamic-dispatch-trigger-as-typed-flag.md +0 -0
  808. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0018-rlm-method-is-the-orchestrator-system-prompt.md +0 -0
  809. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0019-recursion-is-optional-for-chunking-required-for-synthesis.md +0 -0
  810. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0020-serialize-interpreter-sessions-per-process-ki1.md +0 -0
  811. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0021-capability-interface-governed-typed-io.md +0 -0
  812. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0022-fr-k-embedding-free-okf-navigation-experimental.md +0 -0
  813. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0023-cheap-model-for-okf-enrichment.md +0 -0
  814. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0024-reader-parallelism-lives-in-python-not-the-interpreter.md +0 -0
  815. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0025-retrieval-pivot-function-classify-property-graph-rerank.md +0 -0
  816. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0026-property-schema-and-extended-function-taxonomy.md +0 -0
  817. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0027-openrouter-provider-routing-by-throughput.md +0 -0
  818. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0028-deterministic-grounding-judge-and-flash-pro-cascade.md +0 -0
  819. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0029-retrieval-pipeline-domain-portability-and-adaptation.md +0 -0
  820. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0030-model-training-standard-modal-reusable-checkpointed.md +0 -0
  821. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0031-single-call-chunking-for-structured-contracts.md +0 -0
  822. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0032-nl-to-type-two-step-reason-emit-on-gemma.md +0 -0
  823. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0033-unified-contract-kg-three-legs-one-graph.md +0 -0
  824. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0034-granite-json-schema-structured-output-profile.md +0 -0
  825. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0035-graph-extraction-rebacked-with-gp1b-retire-hybrid.md +0 -0
  826. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0036-party-clause-link-party-to-edge.md +0 -0
  827. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0037-clause-template-is-authoritative-code-not-generated.md +0 -0
  828. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0038-full-cuad-kg-on-gcp-gpu-vm-and-gcs-backup.md +0 -0
  829. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0039-self-hosted-open-model-stack-on-modal-a100.md +0 -0
  830. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0041-capability-kind-rubric-and-agent-skill-runtime-tiers.md +0 -0
  831. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0042-clause-level-span-id-provenance-and-content-hash-backfill.md +0 -0
  832. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0043-retire-cross-corpus-retrieval-standardize-on-leg-b.md +0 -0
  833. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0044-is-exception-to-derived-carveout-relationship.md +0 -0
  834. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0045-client-side-tag-parse-structured-output.md +0 -0
  835. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0046-acord-unified-into-one-production-kg.md +0 -0
  836. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0047-retire-precomputed-clause-function-gate.md +0 -0
  837. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0048-ingest-llm-classifier-nondestructive-reclassify.md +0 -0
  838. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0049-generic-customer-lens-for-ingestion.md +0 -0
  839. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0050-async-langgraph-ingestion.md +0 -0
  840. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0051-schema-bootstrap-and-feedback-driven-ontology-evolution.md +0 -0
  841. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0052-engine-product-split-graphwright-parked.md +0 -0
  842. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0053-answer-prose-output-hygiene.md +0 -0
  843. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0054-remove-auto-tag-from-generator-evidence.md +0 -0
  844. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0055-confidence-out-of-band.md +0 -0
  845. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0056-bound-structured-retry-wall-clock.md +0 -0
  846. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0057-async-engine-architecture.md +0 -0
  847. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0058-structure-first-chunking.md +0 -0
  848. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0059-recall-decoupled-from-classification-and-visible-partial-loss.md +0 -0
  849. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0060-scope-compliance-check-to-named-policy-sources.md +0 -0
  850. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0061-subject-document-compliance-per-section.md +0 -0
  851. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0062-tiered-ocr-scan-quality-vlm-escalation.md +0 -0
  852. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0063-per-sentence-compliance-subject-facts.md +0 -0
  853. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0064-typed-properties-out-of-band-on-evidence.md +0 -0
  854. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0065-deontic-applicability-gates-query-side.md +0 -0
  855. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0066-ontology-ttl-single-source-of-truth.md +0 -0
  856. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0067-domain-pack-retargeting.md +0 -0
  857. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0068-recall-first-actor-gate-ontology-role-disjointness.md +0 -0
  858. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0069-reading-order-chunking-tables-figures-retrievable.md +0 -0
  859. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0070-text-layer-first-parsing-no-false-vlm-escalation.md +0 -0
  860. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0071-defragmentation-reconstruct-paragraphs-from-line-items.md +0 -0
  861. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0072-extract-guard-furniture-and-deterministic-failure.md +0 -0
  862. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0073-born-digital-threshold-sparse-pages-no-vlm-escalation.md +0 -0
  863. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0074-retry-transient-extraction-failures.md +0 -0
  864. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0075-per-page-vlm-escalation.md +0 -0
  865. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0076-thread-safe-shared-embedder-reranker.md +0 -0
  866. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0077-concurrent-function-classification-across-chunks.md +0 -0
  867. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0078-dedicated-extraction-executor.md +0 -0
  868. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0079-product-default-granite-4.2-openrouter-routing.md +0 -0
  869. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0080-nested-tag-parse-and-degrade.md +0 -0
  870. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0081-function-independent-tagparse-clause-extraction.md +0 -0
  871. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0082-symbolic-gate-function-independent.md +0 -0
  872. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0083-executor-hop-trace-context-capture.md +0 -0
  873. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0084-gleaning-off-on-the-query-leg.md +0 -0
  874. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0085-query-constraint-extraction-tagparse.md +0 -0
  875. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0086-streaming-cost-capture.md +0 -0
  876. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0087-retrieval-relevance-score-on-rankedspan.md +0 -0
  877. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0088-per-span-relevance-verdict.md +0 -0
  878. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0089-structured-output-generation-tracing.md +0 -0
  879. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0090-affiliate-of-extraction.md +0 -0
  880. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0091-retire-partyto-edge.md +0 -0
  881. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0092-idempotent-write-graph.md +0 -0
  882. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0093-entities-by-name-seam.md +0 -0
  883. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0094-workspace-document-scope.md +0 -0
  884. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0095-span-page-provenance.md +0 -0
  885. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0096-carveout-keyword-normalization.md +0 -0
  886. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0097-caller-configurable-ingest-extraction-models.md +0 -0
  887. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0098-invoke-time-document-scope.md +0 -0
  888. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0099-mcp-tools-never-take-a-model-supplied-tenant.md +0 -0
  889. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0100-profile-based-model-routing.md +0 -0
  890. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0101-untagged-spans-reach-extraction-aspect-gate-removed.md +0 -0
  891. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0102-open-descriptive-list-dims-retain-verbatim.md +0 -0
  892. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0103-a-clause-is-a-provision-not-a-span.md +0 -0
  893. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0104-dense-floor-protection-in-leg-b.md +0 -0
  894. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0105-in-band-model-usage-accounting.md +0 -0
  895. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0106-document-signals-off-the-citation.md +0 -0
  896. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0107-requirement-page-provenance.md +0 -0
  897. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0108-qwen3-27b-single-a100-serving-profile.md +0 -0
  898. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0109-vllm-cold-start-reduction.md +0 -0
  899. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0110-fp8-kv-cache-16k-single-a100.md +0 -0
  900. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0111-pin-qwen3-27b-deepinfra-bf16.md +0 -0
  901. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0112-relax-deepagents-pin-to-floor.md +0 -0
  902. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0113-llm-span-instrumentation-for-latency-attribution.md +0 -0
  903. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0114-setfit-default-clause-function-classifier.md +0 -0
  904. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0115-classifier-only-step3a-property-extraction.md +0 -0
  905. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0116-soft-function-scoping-classifier-lane.md +0 -0
  906. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0117-engine-api-layer-and-capability-runtime.md +0 -0
  907. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0118-engine-core-api-vs-ard-adapter-free-impl-ref-client.md +0 -0
  908. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0119-jev-typed-decision-model-for-compliance-closed-set-fields.md +0 -0
  909. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0120-rlm-sub-agent-identity-dynamic-dispatch-trigger.md +0 -0
  910. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/adr/0121-spacy-optional-extra-model-runtime-download.md +0 -0
  911. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/architecture/foundations-and-adding-a-domain.md +0 -0
  912. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/README.md +0 -0
  913. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/design/deontic-applicability-routing.md +0 -0
  914. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/design/ingestion-neuro-symbolic-gaps.md +0 -0
  915. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/design/semantic-subject-segmentation.md +0 -0
  916. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/design/unify-subject-preprocessing.md +0 -0
  917. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/engine-issues/0037-closed-vocab-drops-verbatim-values-to-other.md +0 -0
  918. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/engine-issues/0038-a-clause-node-is-now-created-per-sentence-so-98-percent-of-spans-become-clauses.md +0 -0
  919. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/engine-issues/0039-the-provision-detector-reads-text-but-docling-puts-the-section-number-in-marker.md +0 -0
  920. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/engine-issues/0040-covered-subject-is-asked-of-every-provision-so-verbatim-retention-fills-it-with-noise.md +0 -0
  921. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/engine-issues/0041-VERIFICATION-dense-floor.md +0 -0
  922. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/engine-issues/0041-leg-b-discards-the-best-dense-matches-on-some-queries.md +0 -0
  923. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/engine-issues/0042-usage-is-captured-per-call-but-never-returned-so-cost-needs-a-langfuse-round-trip.md +0 -0
  924. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/engine-issues/0043-a-requirement-carries-no-page-provenance-so-a-finding-cannot-point-into-its-policy.md +0 -0
  925. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/engine-issues/0044-document-signals-scaffolding-is-shown-to-the-user-as-a-quote-from-their-document.md +0 -0
  926. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/engine-issues/0045-a-fixed-money-cap-records-no-cap-quantum-so-the-amount-is-only-prose.md +0 -0
  927. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/engine-issues/0046-appending-a-natural-follow-up-to-a-question-drops-the-clause-type.md +0 -0
  928. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/engine-issues/0047-an-exact-deepagents-pin-transitively-pins-every-consumer.md +0 -0
  929. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/engine-issues/0048-the-pinned-endpoints-latency-tail-makes-agent-runs-undebuggable-from-either-side.md +0 -0
  930. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/handoffs/2026-07-20_graphwright_capability_interface_reply.md +0 -0
  931. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/handoffs/2026-07-20b_graphwright_interface_confirmation.md +0 -0
  932. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/handoffs/2026-07-20c_graphwright_ingestion_interfaces.md +0 -0
  933. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/handoffs/2026-08-30_subject_compliance_final_rulewright.md +0 -0
  934. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/handoffs/2026-09-01_issue-0013-recall-first-actor-gate_rulewright.md +0 -0
  935. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/handoffs/2026-09-01_ontology-source-of-truth_rulewright.md +0 -0
  936. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/handoffs/2026-09-03_issue-0014-table-retrievability_rulewright.md +0 -0
  937. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/handoffs/2026-09-04_bulk-ingestion-wall_rulewright.md +0 -0
  938. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/handoffs/2026-09-04_issue-0016-thread-safe-embedder_rulewright.md +0 -0
  939. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/handoffs/2026-09-05_observability-langfuse_rulewright.md +0 -0
  940. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/handoffs/2026-09-05_tagparse-ingestion-and-granite-4.2_rulewright.md +0 -0
  941. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/handoffs/2026-09-09_affiliate-of-extraction_rulewright.md +0 -0
  942. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/handoffs/2026-09-09_issue-0028-partyto-retired_rulewright.md +0 -0
  943. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/handoffs/2026-09-09_issue-0029-idempotent-write-graph_rulewright.md +0 -0
  944. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/handoffs/2026-09-09_issue-0030-entities-by-name_rulewright.md +0 -0
  945. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/handoffs/2026-09-09_observability-and-retrieval-floor_rulewright.md +0 -0
  946. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/handoffs/2026-09-09_relevance-verdict_rulewright.md +0 -0
  947. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/handoffs/2026-09-09_rename-run-ad-compliance-check_rulewright.md +0 -0
  948. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/handoffs/2026-09-09_structured-output-cost-tracing_rulewright.md +0 -0
  949. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/handoffs/2026-09-10_ingest-models-caller-configurable_rulewright.md +0 -0
  950. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/handoffs/2026-09-10_issue-0031-followup-failclosed-and-nodrift_rulewright.md +0 -0
  951. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/handoffs/2026-09-10_issue-0031-followup-validate-ingested-set_rulewright.md +0 -0
  952. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/handoffs/2026-09-10_issue-0031-workspace-document-scope_rulewright.md +0 -0
  953. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/handoffs/2026-09-10_issue-0032-span-page-provenance_rulewright.md +0 -0
  954. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/handoffs/2026-09-10_issue-0033-carveout-normalization_rulewright.md +0 -0
  955. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/handoffs/2026-09-10_issue-0034-invoke-time-document-scope_rulewright.md +0 -0
  956. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/handoffs/2026-09-11_issue-0035-followup-derived-guard_rulewright.md +0 -0
  957. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/handoffs/2026-09-11_issue-0035-mcp-no-model-tenant_rulewright.md +0 -0
  958. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/handoffs/2026-09-11_profile-based-model-routing_rulewright.md +0 -0
  959. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/handoffs/2026-09-11_qwen-default-modal-or_rulewright.md +0 -0
  960. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/handoffs/2026-09-11_qwen-everywhere-config_rulewright.md +0 -0
  961. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/handoffs/2026-09-12_clause-granularity_0036-0039_rulewright.md +0 -0
  962. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/handoffs/2026-09-12_closed-vocab_0037-0040_rulewright.md +0 -0
  963. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/handoffs/2026-09-12_dense-floor-protection_0041_rulewright.md +0 -0
  964. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/handoffs/2026-09-13_in-band-usage_0042_rulewright.md +0 -0
  965. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/handoffs/2026-09-14_document-signals-off-citation_0044_rulewright.md +0 -0
  966. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/handoffs/2026-09-14_requirement-page-provenance_0043_rulewright.md +0 -0
  967. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/handoffs/2026-09-16_qwen3-27b-single-a100-serving-profile_rulewright.md +0 -0
  968. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/handoffs/2026-09-18_fp8-accuracy-eval-configB_rulewright.md +0 -0
  969. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/handoffs/2026-09-18_fp8-kv-16k-single-a100_rulewright.md +0 -0
  970. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/handoffs/2026-09-20_deepagents-pin-relaxed_0047_rulewright.md +0 -0
  971. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/handoffs/2026-09-20_llm-span-instrumentation_0048_rulewright.md +0 -0
  972. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/handoffs/2026-09-21_0048-part2-modal-answers_from_rulewright.md +0 -0
  973. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/handoffs/2026-09-21_0048-part2-modal-scoping-questions_rulewright.md +0 -0
  974. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/misc/.gitkeep +0 -0
  975. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/plans/Corpus_Acquisition.md +0 -0
  976. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/plans/async-migration.md +0 -0
  977. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/plans/demo_plan.md +0 -0
  978. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/plans/gp1b_docling_graph_plan.md +0 -0
  979. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/plans/unified_contract_kg_ontology_bridge.md +0 -0
  980. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/plans/unified_contract_kg_plan.md +0 -0
  981. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/results/2026-07-24-t58-property-graph-population.md +0 -0
  982. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/results/2026-07-25-t58b-full-pipeline-rerank.md +0 -0
  983. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/archive/results/2026-07-25-t58b-topk-ordering-levers.md +0 -0
  984. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/eval/classifier_model_ab.md +0 -0
  985. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/eval/compliance_demo.md +0 -0
  986. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/eval/compliance_gate_cc7.md +0 -0
  987. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/eval/compliance_rung2_cc7.md +0 -0
  988. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/eval/cuad_highlighting_cu-d1.md +0 -0
  989. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/eval/dg_model_ab.md +0 -0
  990. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/eval/function_gate_recall.md +0 -0
  991. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/eval/generation_robustness_b_vs_c.md +0 -0
  992. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/eval/nl_to_type_cu-d2.md +0 -0
  993. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/eval/ocr_benchmark.md +0 -0
  994. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/eval/prod1_readiness.md +0 -0
  995. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/eval/prod2_readiness.md +0 -0
  996. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/eval/query_side_model_ab.md +0 -0
  997. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/eval/silver_granite_vs_gemma4.md +0 -0
  998. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/eval/silver_provider_routing.md +0 -0
  999. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/eval/silver_selfhosted_gemma4_26b.md +0 -0
  1000. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/product/capability_profiles.md +0 -0
  1001. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/product/contracts_product_roadmap.md +0 -0
  1002. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/product/new-domain-build-sequence.md +0 -0
  1003. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/proposals/compliance-ingest-classifier-decomposition.md +0 -0
  1004. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/proposals/de-domaining-and-capability-runtime.md +0 -0
  1005. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/proposals/new-domain-developer-journey.md +0 -0
  1006. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/specs/engine-platform/SPEC.md +0 -0
  1007. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/specs/engine-platform/TASKS.md +0 -0
  1008. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/specs/engine-prep/plan.md +0 -0
  1009. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/vendor/arcadedb/arcadedb-buckets-schema.md +0 -0
  1010. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/vendor/arcadedb/arcadedb-docs-extraction.json +0 -0
  1011. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/vendor/arcadedb/arcadedb-vector-embeddings.md +0 -0
  1012. {rag_wright-0.1.0 → rag_wright-0.2.0}/docs/vendor/arcadedb/arcadedb-vector-search-tutorial.md +0 -0
  1013. {rag_wright-0.1.0 → rag_wright-0.2.0}/eval/__init__.py +0 -0
  1014. {rag_wright-0.1.0 → rag_wright-0.2.0}/eval/ablation.py +0 -0
  1015. {rag_wright-0.1.0 → rag_wright-0.2.0}/eval/acord.py +0 -0
  1016. {rag_wright-0.1.0 → rag_wright-0.2.0}/eval/acord_retrieval.py +0 -0
  1017. {rag_wright-0.1.0 → rag_wright-0.2.0}/eval/build_golden.py +0 -0
  1018. {rag_wright-0.1.0 → rag_wright-0.2.0}/eval/category_retrieval.py +0 -0
  1019. {rag_wright-0.1.0 → rag_wright-0.2.0}/eval/compliance_demo/policy/community_conduct_policy.md +0 -0
  1020. {rag_wright-0.1.0 → rag_wright-0.2.0}/eval/compliance_demo/subjects/post_borderline.txt +0 -0
  1021. {rag_wright-0.1.0 → rag_wright-0.2.0}/eval/compliance_demo/subjects/post_compliant.txt +0 -0
  1022. {rag_wright-0.1.0 → rag_wright-0.2.0}/eval/compliance_demo/subjects/post_violation.txt +0 -0
  1023. {rag_wright-0.1.0 → rag_wright-0.2.0}/eval/contractnli_judge.py +0 -0
  1024. {rag_wright-0.1.0 → rag_wright-0.2.0}/eval/function_ceiling.py +0 -0
  1025. {rag_wright-0.1.0 → rag_wright-0.2.0}/eval/gate1_chunker_ab.py +0 -0
  1026. {rag_wright-0.1.0 → rag_wright-0.2.0}/eval/gate2_hybrid_rerank.py +0 -0
  1027. {rag_wright-0.1.0 → rag_wright-0.2.0}/eval/golden/relational/set.json +0 -0
  1028. {rag_wright-0.1.0 → rag_wright-0.2.0}/eval/multihop.py +0 -0
  1029. {rag_wright-0.1.0 → rag_wright-0.2.0}/eval/okf_gold.py +0 -0
  1030. {rag_wright-0.1.0 → rag_wright-0.2.0}/eval/reachability.py +0 -0
  1031. {rag_wright-0.1.0 → rag_wright-0.2.0}/eval/test_acord.py +0 -0
  1032. {rag_wright-0.1.0 → rag_wright-0.2.0}/eval/test_acord_retrieval.py +0 -0
  1033. {rag_wright-0.1.0 → rag_wright-0.2.0}/eval/test_category_retrieval.py +0 -0
  1034. {rag_wright-0.1.0 → rag_wright-0.2.0}/eval/test_multihop_set.py +0 -0
  1035. {rag_wright-0.1.0 → rag_wright-0.2.0}/eval/test_okf_gold.py +0 -0
  1036. {rag_wright-0.1.0 → rag_wright-0.2.0}/eval/test_reachability.py +0 -0
  1037. {rag_wright-0.1.0 → rag_wright-0.2.0}/plan.md +0 -0
  1038. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/acquire_acord.py +0 -0
  1039. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/acquire_ecfr.py +0 -0
  1040. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/acquire_ftc_255.py +0 -0
  1041. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/acquire_prod1_corpus.py +0 -0
  1042. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/audit_reclass_flips.py +0 -0
  1043. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/author_leg_a_silver_key.py +0 -0
  1044. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/backfill_edge_source_doc_id.py +0 -0
  1045. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/backup_kg_to_gcs.sh +0 -0
  1046. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/cic1_assemble_v3.py +0 -0
  1047. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/cic1_generate_hard_negatives.py +0 -0
  1048. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/cic1_generate_hard_positives.py +0 -0
  1049. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/cic1_hybrid.py +0 -0
  1050. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/cic1_hybrid2.py +0 -0
  1051. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/cic1_jev_claimtypes.py +0 -0
  1052. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/cic1_jev_operative.py +0 -0
  1053. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/cic1_laya_prep.py +0 -0
  1054. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/cic1_laya_train.py +0 -0
  1055. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/cic1_prep_operative.py +0 -0
  1056. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/cic1_train_operative.py +0 -0
  1057. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/diagnose_acord_knn_expansion.py +0 -0
  1058. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/diagnose_acord_knn_rerank.py +0 -0
  1059. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/diagnose_acord_leg_pool.py +0 -0
  1060. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/diagnose_acord_legs.py +0 -0
  1061. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/diagnose_acord_pool.py +0 -0
  1062. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/diagnose_acord_relstructure.py +0 -0
  1063. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/diagnose_acord_retrieval.py +0 -0
  1064. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/distill/eval_listwise_b.py +0 -0
  1065. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/distill/extract_features.py +0 -0
  1066. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/distill/listwise_variants.py +0 -0
  1067. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/distill/relational_features.py +0 -0
  1068. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/distill/train_ce.py +0 -0
  1069. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/distill/train_modal.py +0 -0
  1070. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/eval_chunking_ab.py +0 -0
  1071. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/extract_arcadedb_docs.py +0 -0
  1072. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/git_post_commit_graphify.sh +0 -0
  1073. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/granite_chunker_assess.py +0 -0
  1074. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/graph_status.sh +0 -0
  1075. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/ingest_acord.py +0 -0
  1076. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/install_git_hooks.sh +0 -0
  1077. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/make_compliance_fixtures.py +0 -0
  1078. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/make_compliance_gold.py +0 -0
  1079. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/measure_silver.py +0 -0
  1080. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/merge_docs_into_framework.py +0 -0
  1081. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/migrate_entity_cik_to_canonical_id.py +0 -0
  1082. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/migrate_silver_evidence_remove_autotag.py +0 -0
  1083. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/modal_arcadedb.py +0 -0
  1084. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/modal_backfill.py +0 -0
  1085. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/modal_exception_linking.py +0 -0
  1086. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/modal_gemma4_vllm.py +0 -0
  1087. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/modal_gemma4_vllm_snapshot.py +0 -0
  1088. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/modal_granite_server.py +0 -0
  1089. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/modal_granite_throughput.py +0 -0
  1090. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/modal_granite_vllm_server.py +0 -0
  1091. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/modal_qwen3_27b_bench.py +0 -0
  1092. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/modal_qwen3_27b_snapshot.py +0 -0
  1093. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/modal_qwen3_vllm_server.py +0 -0
  1094. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/modal_stack_a100.py +0 -0
  1095. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/ocr_benchmark.py +0 -0
  1096. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/ocr_preprocess.py +0 -0
  1097. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/ontology_dimension_check.py +0 -0
  1098. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/publish_manifests.py +0 -0
  1099. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/revert_reclass_flips.py +0 -0
  1100. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/run_acord_retrieval.py +0 -0
  1101. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/train_legalbert_modal.py +0 -0
  1102. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/verify_wheel_install.sh +0 -0
  1103. {rag_wright-0.1.0 → rag_wright-0.2.0}/scripts/vllm_raw_diagnostic.py +0 -0
  1104. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/__init__.py +0 -0
  1105. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/api/discover.py +0 -0
  1106. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/api/usage.py +0 -0
  1107. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/capabilities/__init__.py +0 -0
  1108. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/capabilities/answer_generator.py +0 -0
  1109. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/capabilities/ard.py +0 -0
  1110. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/capabilities/chunk_read.py +0 -0
  1111. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/capabilities/chunk_write.py +0 -0
  1112. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/capabilities/disambiguation.py +0 -0
  1113. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/capabilities/document_scope.py +0 -0
  1114. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/capabilities/embedding.py +0 -0
  1115. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/capabilities/embedding_profiles.py +0 -0
  1116. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/capabilities/entity_resolution.py +0 -0
  1117. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/capabilities/fusion.py +0 -0
  1118. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/capabilities/graph_query.py +0 -0
  1119. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/capabilities/graph_storage.py +0 -0
  1120. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/capabilities/hybrid_search.py +0 -0
  1121. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/capabilities/okf_navigate.py +0 -0
  1122. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/capabilities/reranking.py +0 -0
  1123. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/capabilities/retrieval_core.py +0 -0
  1124. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/capabilities/rlm_synthesis.py +0 -0
  1125. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/capabilities/scan_quality.py +0 -0
  1126. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/capabilities/vision_to_text.py +0 -0
  1127. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/contracts/__init__.py +0 -0
  1128. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/contracts/chunk.py +0 -0
  1129. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/contracts/provenance.py +0 -0
  1130. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/corpus/__init__.py +0 -0
  1131. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/corpus/canonicalize.py +0 -0
  1132. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/corpus/http.py +0 -0
  1133. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/models/__init__.py +0 -0
  1134. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/models/seam.py +0 -0
  1135. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/models/tracing.py +0 -0
  1136. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/okf/__init__.py +0 -0
  1137. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/okf/compile.py +0 -0
  1138. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/okf/document.py +0 -0
  1139. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/okf/enrich.py +0 -0
  1140. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/okf/links.py +0 -0
  1141. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/okf/lint.py +0 -0
  1142. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/ontology/__init__.py +0 -0
  1143. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/ontology/registry.py +0 -0
  1144. {rag_wright-0.1.0/src/rag_wright/subgraphs → rag_wright-0.2.0/src/rag_wright/packs/compliance/capabilities}/__init__.py +0 -0
  1145. /rag_wright-0.1.0/src/rag_wright/reference/compliance.py → /rag_wright-0.2.0/src/rag_wright/packs/compliance/invokers.py +0 -0
  1146. {rag_wright-0.1.0/tests → rag_wright-0.2.0/src/rag_wright/packs/compliance/mcp}/__init__.py +0 -0
  1147. {rag_wright-0.1.0/tests/api → rag_wright-0.2.0/src/rag_wright/packs/compliance/ontology}/__init__.py +0 -0
  1148. {rag_wright-0.1.0/src/rag_wright → rag_wright-0.2.0/src/rag_wright/packs/compliance}/ontology/packs/ftc_16cfr255.ttl +0 -0
  1149. {rag_wright-0.1.0/tests/capabilities → rag_wright-0.2.0/src/rag_wright/packs/compliance/schemas}/__init__.py +0 -0
  1150. {rag_wright-0.1.0/src/rag_wright/contracts → rag_wright-0.2.0/src/rag_wright/packs/compliance/schemas}/compliance.py +0 -0
  1151. {rag_wright-0.1.0/tests/contracts → rag_wright-0.2.0/src/rag_wright/packs/compliance/skills}/__init__.py +0 -0
  1152. {rag_wright-0.1.0/src/rag_wright → rag_wright-0.2.0/src/rag_wright/packs/compliance}/skills/claim_extraction/SKILL.md +0 -0
  1153. {rag_wright-0.1.0/src/rag_wright → rag_wright-0.2.0/src/rag_wright/packs/compliance}/skills/claim_extraction/__init__.py +0 -0
  1154. {rag_wright-0.1.0/src/rag_wright → rag_wright-0.2.0/src/rag_wright/packs/compliance}/skills/compliance_judgment/SKILL.md +0 -0
  1155. {rag_wright-0.1.0/src/rag_wright → rag_wright-0.2.0/src/rag_wright/packs/compliance}/skills/generic_compliance_judgment/SKILL.md +0 -0
  1156. {rag_wright-0.1.0/src/rag_wright → rag_wright-0.2.0/src/rag_wright/packs/compliance}/skills/requirement_extraction/SKILL.md +0 -0
  1157. {rag_wright-0.1.0/src/rag_wright → rag_wright-0.2.0/src/rag_wright/packs/compliance}/skills/requirement_extraction/__init__.py +0 -0
  1158. {rag_wright-0.1.0/tests/corpus → rag_wright-0.2.0/src/rag_wright/packs/compliance/subgraphs}/__init__.py +0 -0
  1159. {rag_wright-0.1.0/tests/foundation → rag_wright-0.2.0/src/rag_wright/packs/contracts/capabilities}/__init__.py +0 -0
  1160. {rag_wright-0.1.0/tests/mcp → rag_wright-0.2.0/src/rag_wright/packs/contracts/corpus}/__init__.py +0 -0
  1161. {rag_wright-0.1.0/src/rag_wright → rag_wright-0.2.0/src/rag_wright/packs/contracts}/corpus/edgar.py +0 -0
  1162. {rag_wright-0.1.0/src/rag_wright → rag_wright-0.2.0/src/rag_wright/packs/contracts}/corpus/selection.py +0 -0
  1163. {rag_wright-0.1.0/src/rag_wright → rag_wright-0.2.0/src/rag_wright/packs/contracts}/mcp/session_store.py +0 -0
  1164. {rag_wright-0.1.0/tests/models → rag_wright-0.2.0/src/rag_wright/packs/contracts/ontology}/__init__.py +0 -0
  1165. {rag_wright-0.1.0/src/rag_wright → rag_wright-0.2.0/src/rag_wright/packs/contracts}/ontology/_generated_template_meta.py +0 -0
  1166. {rag_wright-0.1.0/src/rag_wright → rag_wright-0.2.0/src/rag_wright/packs/contracts}/ontology/_generated_vocab.py +0 -0
  1167. {rag_wright-0.1.0/tests/ontology → rag_wright-0.2.0/src/rag_wright/packs/contracts/schemas}/__init__.py +0 -0
  1168. {rag_wright-0.1.0/src/rag_wright/contracts → rag_wright-0.2.0/src/rag_wright/packs/contracts/schemas}/contract_meta.py +0 -0
  1169. {rag_wright-0.1.0/src/rag_wright/contracts → rag_wright-0.2.0/src/rag_wright/packs/contracts/schemas}/function_routing.py +0 -0
  1170. {rag_wright-0.1.0/src/rag_wright/contracts → rag_wright-0.2.0/src/rag_wright/packs/contracts/schemas}/highlight.py +0 -0
  1171. {rag_wright-0.1.0/src/rag_wright/contracts → rag_wright-0.2.0/src/rag_wright/packs/contracts/schemas}/jurisdiction.py +0 -0
  1172. {rag_wright-0.1.0/tests/store → rag_wright-0.2.0/src/rag_wright/packs/contracts/skills}/__init__.py +0 -0
  1173. {rag_wright-0.1.0/src/rag_wright → rag_wright-0.2.0/src/rag_wright/packs/contracts}/skills/extraction_semantic_judge/SKILL.md +0 -0
  1174. {rag_wright-0.1.0/src/rag_wright → rag_wright-0.2.0/src/rag_wright/packs/contracts}/skills/extraction_semantic_judge/__init__.py +0 -0
  1175. {rag_wright-0.1.0/tests/subgraphs → rag_wright-0.2.0/src/rag_wright/packs/contracts/spans}/__init__.py +0 -0
  1176. {rag_wright-0.1.0/src/rag_wright → rag_wright-0.2.0/src/rag_wright/packs/contracts}/spans/dim_fleet.json +0 -0
  1177. {rag_wright-0.1.0/src/rag_wright → rag_wright-0.2.0/src/rag_wright/packs/contracts}/spans/function_classifier.py +0 -0
  1178. {rag_wright-0.1.0/tests/util → rag_wright-0.2.0/src/rag_wright/packs/contracts/subgraphs}/__init__.py +0 -0
  1179. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/py.typed +0 -0
  1180. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/skills/__init__.py +0 -0
  1181. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/skills/generation/SKILL.md +0 -0
  1182. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/skills/generation/__init__.py +0 -0
  1183. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/skills/okf_navigate/SKILL.md +0 -0
  1184. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/skills/rlm/SKILL.md +0 -0
  1185. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/skills/rlm/__init__.py +0 -0
  1186. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/skills/rlm/agent.py +0 -0
  1187. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/skills/span_relevance_judgment/SKILL.md +0 -0
  1188. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/skills/vision_to_text/SKILL.md +0 -0
  1189. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/skills/vision_to_text/__init__.py +0 -0
  1190. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/spans/__init__.py +0 -0
  1191. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/spans/page_map.py +0 -0
  1192. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/store/__init__.py +0 -0
  1193. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/store/chunk_text.py +0 -0
  1194. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/subgraphs/observability.py +0 -0
  1195. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/util/__init__.py +0 -0
  1196. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/util/concurrent.py +0 -0
  1197. {rag_wright-0.1.0 → rag_wright-0.2.0}/src/rag_wright/util/spacy_model.py +0 -0
  1198. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/api/test_discover.py +0 -0
  1199. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/api/test_e2e.py +0 -0
  1200. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/api/test_usage.py +0 -0
  1201. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/async_helpers.py +0 -0
  1202. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/capabilities/_fixtures/rlm_probe_skill/SKILL.md +0 -0
  1203. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/capabilities/test_answer_generator.py +0 -0
  1204. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/capabilities/test_answer_generator_async.py +0 -0
  1205. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/capabilities/test_chunk_read.py +0 -0
  1206. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/capabilities/test_chunk_write.py +0 -0
  1207. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/capabilities/test_disambiguation.py +0 -0
  1208. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/capabilities/test_document_scope.py +0 -0
  1209. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/capabilities/test_embedding.py +0 -0
  1210. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/capabilities/test_embedding_profiles.py +0 -0
  1211. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/capabilities/test_fusion.py +0 -0
  1212. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/capabilities/test_graph_query.py +0 -0
  1213. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/capabilities/test_graph_storage.py +0 -0
  1214. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/capabilities/test_hybrid_search.py +0 -0
  1215. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/capabilities/test_okf_compile.py +0 -0
  1216. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/capabilities/test_okf_links.py +0 -0
  1217. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/capabilities/test_okf_navigate.py +0 -0
  1218. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/capabilities/test_repair_partition.py +0 -0
  1219. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/capabilities/test_reranking.py +0 -0
  1220. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/capabilities/test_rlm_chunking.py +0 -0
  1221. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/capabilities/test_rlm_chunking_async.py +0 -0
  1222. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/capabilities/test_rlm_method.py +0 -0
  1223. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/capabilities/test_rlm_synthesis.py +0 -0
  1224. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/capabilities/test_runtime_registry.py +0 -0
  1225. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/capabilities/test_scan_quality.py +0 -0
  1226. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/capabilities/test_span_relevance_judgment.py +0 -0
  1227. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/capabilities/test_structural_boundary_discoverer.py +0 -0
  1228. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/capabilities/test_structural_model_fallback.py +0 -0
  1229. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/capabilities/test_tag_boundary_discoverer.py +0 -0
  1230. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/capabilities/test_tiered_ocr.py +0 -0
  1231. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/contracts/test_canonical_source_doc_id.py +0 -0
  1232. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/contracts/test_chunk_record.py +0 -0
  1233. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/contracts/test_provenance.py +0 -0
  1234. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/corpus/test_canonicalize.py +0 -0
  1235. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/corpus/test_http.py +0 -0
  1236. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/eval/test_contractnli_judge.py +0 -0
  1237. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/eval/test_cuad_highlight_metrics.py +0 -0
  1238. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/eval/test_kg_property_rerank.py +0 -0
  1239. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/eval/test_nl_to_type_metrics.py +0 -0
  1240. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/eval/test_relational_eval.py +0 -0
  1241. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/fixtures/leg_a_silver/README.md +0 -0
  1242. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/fixtures/leg_a_silver/evidence_snapshot.json +0 -0
  1243. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/fixtures/table-bearing-contract.pdf +0 -0
  1244. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/foundation/test_arcadedb_hybrid.py +0 -0
  1245. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/foundation/test_model_seam_structured.py +0 -0
  1246. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/journey/incidents_domain.py +0 -0
  1247. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/journey/incidents_pack.ttl +0 -0
  1248. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/journey/test_incidents_journey.py +0 -0
  1249. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/models/test_async_infra.py +0 -0
  1250. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/models/test_seam_async.py +0 -0
  1251. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/models/test_seam_retry.py +0 -0
  1252. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/models/test_seam_stream.py +0 -0
  1253. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/models/test_serving_seam.py +0 -0
  1254. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/models/test_tag_structured_async.py +0 -0
  1255. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/models/test_tracing.py +0 -0
  1256. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/models/test_usage.py +0 -0
  1257. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/scripts/test_eval_chunking_ab.py +0 -0
  1258. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/scripts/test_eval_classifier_ab.py +0 -0
  1259. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/spans/test_page_map.py +0 -0
  1260. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/store/test_affiliation_backfill.py +0 -0
  1261. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/store/test_chunk_text.py +0 -0
  1262. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/store/test_entities_by_name.py +0 -0
  1263. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/store/test_kg_write.py +0 -0
  1264. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/store/test_write_graph_idempotent.py +0 -0
  1265. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/subgraphs/test_graph_extraction.py +0 -0
  1266. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/subgraphs/test_observability.py +0 -0
  1267. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/subgraphs/test_scaffold.py +0 -0
  1268. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/subgraphs/test_semantic_chunking.py +0 -0
  1269. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/test_backfill_clause_span_id.py +0 -0
  1270. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/test_dg_model_ab.py +0 -0
  1271. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/test_populate_entity_graph.py +0 -0
  1272. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/util/test_concurrent.py +0 -0
  1273. {rag_wright-0.1.0 → rag_wright-0.2.0}/tests/util/test_spacy_model.py +0 -0
@@ -0,0 +1,145 @@
1
+ ---
2
+ name: authoring-a-capability
3
+ description: >-
4
+ How to author a new RAG_Wright engine capability of any kind (subgraph, function, model, agent_skill, mcp_tool)
5
+ so it is registered, ARD-discoverable, and invokable by name through the engine API. Use it whenever you add a
6
+ new capability or a new-domain product/graph needs one: it gives the shared registration + ARD + invocation
7
+ contract (the four surfaces + the definition of done), the per-kind implementation specifics, and the
8
+ conformance guardrail that keeps the catalog honest. Grounded against the real code; keep it in step with it.
9
+ ---
10
+
11
+ # Authoring a capability
12
+
13
+ A **capability** is a named, ARD-registered unit of engine behavior (FR-C). Every capability has a `kind`
14
+ (`ard.py::EntryKind`): `subgraph | function | model | agent_skill | mcp_tool` (`dagster_asset` is reserved). The
15
+ contract below is the SAME for every kind; only the implementation differs. Capabilities compose — a subgraph calls
16
+ functions/models; a product invokes a capability by name through `rag_wright.api`.
17
+
18
+ **Ground every call before writing it** (CLAUDE.md library rule). The authoritative sources this skill summarizes:
19
+ `capabilities/registry.py` (the canonical-slug set, `register_canonical_slugs`, the internal
20
+ `CapabilityRegistry.register`), `capabilities/manifests.py` (`CapabilityManifest`; `_ENGINE_SPECS`, the engine's
21
+ 7 generic manifests returned by `engine_capabilities()`; `MANIFEST_SPECS`, the runtime catalog; `register_capability`,
22
+ `load_pack(module)`), the reference pack's manifests (`CONTRACT_SPECS` / `COMPLIANCE_SPECS` in `rag_wright.packs.{contracts,compliance}.pack`), `capabilities/ard.py` (`EntryKind`, `MEDIA_TYPE_BY_KIND`,
23
+ `CALLABLE_KINDS`), `scripts/publish_manifests.py`, `api/invoke.py` + `capabilities/invoke.py::capability_impl` (the adapter-free impl_ref invoker + drift guard),
24
+ `api/mcp.py` (generic MCP exposure). The guardrail test is `tests/capabilities/test_authoring_contract.py`.
25
+ Paths here are relative to `src/rag_wright/` unless they start with `scripts/` or `tests/`. A product imports the
26
+ authoring surface from `rag_wright.api`: `CapabilityManifest`, `register_capability`, `load_pack`,
27
+ `engine_capabilities`, `register_canonical_slugs`, `canonical_capability_slugs`, `load_reference_pack`,
28
+ `reference_pack` (the same objects as in `capabilities/manifests.py` and `capabilities/registry.py`).
29
+
30
+ ## The four surfaces (the definition of done)
31
+
32
+ A finished capability touches these: 1 (implementation) is for EVERY kind; 2 (the invoke factory + `impl_ref`) is
33
+ for invokable kinds (`subgraph`/`model`); 3 (manifest + register) is for every discoverable kind; 4 (invocable +
34
+ MCP) follows automatically for invokable kinds; 4b (a bespoke MCP server) is optional.
35
+
36
+ 1. **Implementation** — the real code, in that kind's home (see per-kind below).
37
+ 2. **The invoke factory + `impl_ref`** (invokable kinds: subgraph/model) — write a co-located
38
+ `async def ainvoke(resources, inputs)` (subgraph) / `def <name>(resources, inputs)` (model) in the capability's
39
+ own module. A subgraph factory builds over the opaque `WorkspaceHandle` (`resources._store`,
40
+ `resources._embedder`, `resources.model_id(role)`), never env; a model factory is store-independent and ignores
41
+ `resources`. The manifest's `impl_ref="module:attr"` points to it. The invoker imports
42
+ it LAZILY and calls it — there is **NO central adapter dict** (EP-CORE-2). A plain function/agent_skill/mcp_tool
43
+ declares no `impl_ref`.
44
+ 3. **ARD manifest + register it** — a `CapabilityManifest(slug, kind, display_name, description,
45
+ representative_queries=(2-5…), tags=…, impl_ref=…)`. **The catalog ships EMPTY (EP-CORE-3):** call
46
+ `register_capability(manifest)` at runtime to add it (a product registers its own; the engine's reference pack is
47
+ opt-in via `load_reference_pack()`). `representative_queries` is the field ARD discovery ranks on — write real,
48
+ specific queries. For the ENGINE's reference pack, the manifest is committed in its pack's `pack.py` (`CONTRACT_SPECS` / `COMPLIANCE_SPECS`) and
49
+ the slug in its `*_CAPABILITY_SLUGS` (added to the registry by `register_canonical_slugs` when the pack loads);
50
+ a GENERIC engine capability's manifest is in `manifests.py::_ENGINE_SPECS` and its slug in
51
+ `registry.ENGINE_CAPABILITY_SLUGS`. Engine capabilities (`jev_decision`, `generation`, ...) are NOT in the
52
+ catalog until registered too: register them from `engine_capabilities()` when your pack uses them.
53
+ **Packs:** a pack is a module exposing `register()`, which calls `register_canonical_slugs(...)` for its slugs and
54
+ then `register_capability(m)` per manifest (plus any engine capabilities it builds on); load it with
55
+ `load_pack("<module>")`. `load_reference_pack()` is just `load_pack("rag_wright.packs.compliance.pack")` (compliance registers contracts first).
56
+ A downstream product can register without touching the canonical set (`register_capability` does not check
57
+ slugs), BUT `manifests.author()` rejects a non-canonical slug, so a product that publishes ARD JSON must call
58
+ `register_canonical_slugs` for its slugs first.
59
+ Publish to `~/.air/registry` with `uv run python scripts/publish_manifests.py`; that script publishes only the
60
+ engine's reference pack (it calls `load_reference_pack()`), so a product publishes its own with `publish_all`.
61
+ Callable kinds get `ResponseBounds` (defaulted); `agent_skill` must NOT declare bounds (loaded, not called).
62
+ 4. **Invocable + MCP for free** — once registered with an `impl_ref`, the capability is callable as
63
+ `ainvoke_subgraph(slug, inputs, resources=ws)` / `invoke_model(slug, inputs, resources=ws)` (or
64
+ `ainvoke_model(...)`, all on `rag_wright.api`). The invoker first checks the slug is in the catalog with the
65
+ kind that invoker serves (`KeyError` / `ValueError` otherwise), then imports the `impl_ref` via
66
+ `capabilities.invoke.capability_impl` — AND exposable over MCP (surface 4b), with **zero engine edits**.
67
+
68
+ 4b. **MCP exposure** (optional) — any invokable capability is already an MCP tool with zero extra code via
69
+ `api/mcp.py::build_capability_mcp(slug, resources=ws)` (EP-RT-2). Write a bespoke FastMCP server only
70
+ when you want a CURATED, typed tool signature instead of the generic opaque-`inputs` surface.
71
+
72
+ ## Per-kind specifics
73
+
74
+ ### subgraph — a compiled LangGraph `StateGraph`
75
+ - **Home:** a generic engine subgraph in `subgraphs/<slug>.py`; a domain subgraph in its pack, `packs/<pack>/subgraphs/<slug>.py`
76
+ (the reference pack: `packs/contracts/subgraphs/typed_property_retrieval.py`). A `production_<slug>(*, store, ...) -> CompiledGraph` builder: `g = StateGraph(_State)`,
77
+ add nodes/edges with `START`/`END`, `return g.compile()`. Nodes call functions/models (compose).
78
+ - **Invoke:** the co-located `async def ainvoke(resources, inputs)` factory (impl_ref target) builds + awaits the graph.
79
+ - Retry/dead-letter come from the graph scaffold, not the invoker. `CapabilityManifest` has no contract field (only
80
+ the internal `CapabilityRegistry.register(contract=...)` takes one); where the typed I/O must be declared, set
81
+ `capability_interface` on the manifest.
82
+
83
+ ### function — a plain, typed callable
84
+ - **Home:** `capabilities/<slug>.py` (generic) or `packs/<pack>/capabilities/<slug>.py` (domain). A deterministic or model-backed callable with a Pydantic in/out contract.
85
+ - Invoker adapters for `function` are not wired yet (EP-API-2c); until then functions are composed inside
86
+ subgraphs, not invoked standalone through the API. Still register + manifest it.
87
+
88
+ ### model — a trained checkpoint behind a seam
89
+ - **Home:** a GENERIC engine model capability lives in `capabilities/` (e.g. `capabilities/jev_decision.py`); a
90
+ domain model (e.g. the reference pack's SetFit clause classifier and 29-dim property fleet) lives with its pack,
91
+ in the reference pack (`rag_wright.packs.contracts.spans.model_capabilities`) for the engine's worked example, or in
92
+ your product repo. Load the checkpoint ONCE and cache it (the fleet is heavy).
93
+ - Serve behind the existing seam/adapter so nothing upstream changes (to FIND where a model cap belongs, use the
94
+ `classifier-opportunity-analysis` skill; to BUILD/train + checkpoint + serve it, the `setfit` skill). The impl_ref
95
+ factory is `def <slug>(resources, inputs)` for a SYNC impl (CPU-bound local inference — a classifier/XGBoost
96
+ checkpoint; `resources` ignored) or `async def <slug>(resources, inputs)` for an ASYNC impl (I/O-bound — an
97
+ LLM-backed model cap calling OpenRouter / a local vLLM client). `invoke_model` runs a sync impl and REFUSES an
98
+ async one; `ainvoke_model` (EP-API-7) off-loads a sync impl with `asyncio.to_thread` and awaits an async impl
99
+ directly, with an optional `sem` for fan-out backpressure.
100
+
101
+ ### agent_skill — authored SKILL.md + the Deep Agents runtime
102
+ - **Home:** `skills/<slug>/SKILL.md` (generic) or `packs/<pack>/skills/<slug>/SKILL.md` (domain, e.g.
103
+ `packs/compliance/skills/compliance_judgment/SKILL.md`) + the agent runtime (e.g. `skills/rlm/`). It is LOADED (progressive
104
+ disclosure), not called: no `ResponseBounds`. Declare `requires=(...)` for a closure over other skills and
105
+ `skill_runtime` for its intrinsic runtime.
106
+
107
+ ### mcp_tool — a capability exposed over MCP
108
+ - A distinct ARD identity (`<slug>_mcp`) for the same underlying capability exposed as a cross-agent MCP tool.
109
+ Prefer the generic `build_capability_mcp` (surface 4b); author a bespoke server only for a curated typed
110
+ signature (the reference pack's are in `packs/contracts/mcp/` and `packs/compliance/mcp/`, e.g.
111
+ `packs/compliance/mcp/compliance_server.py`). Bind the store server-side (issue 0035) — the tool never takes a tenant/store argument.
112
+
113
+ ## Verify (the guardrail)
114
+
115
+ Run `uv run pytest tests/capabilities/test_authoring_contract.py tests/capabilities/test_manifests.py
116
+ tests/capabilities/test_registry.py tests/arch/test_import_contracts.py` after authoring. It pins the contract this
117
+ skill teaches: no manifest under a non-canonical slug; the reserved-without-manifest set is a fixed allowlist (so
118
+ adding a slug but forgetting its manifest FAILS here); every manifest kind is a real ARD kind; every cap that declares
119
+ an `impl_ref` is a canonical slug with a manifest of the matching kind. The guardrail does not import the
120
+ `impl_ref` itself: add a test of your own that resolves it with `capability_impl(slug)` and calls it (the reference
121
+ pack's is `tests/spans/test_model_capabilities.py`). If you deliberately add a reserved/internal slug (no manifest),
122
+ add it to `_RESERVED_WITHOUT_MANIFEST` with a one-line reason. The engine's `tests/conftest.py` loads the reference
123
+ pack, so these tests see its slugs.
124
+
125
+ **The import boundary (engine repo).** `pyproject.toml` `[tool.importlinter]` has two forbidden contracts: every
126
+ generic engine package (`source_modules`: `rag_wright.api`, `capabilities`, `contracts`, `corpus`, `ingestion`,
127
+ `models`, `okf`, `ontology`, `skills`, `spans`, `store`, `subgraphs`, `util`) must never import `rag_wright.packs`;
128
+ and `rag_wright.packs.contracts` must never import `rag_wright.packs.compliance`. A new generic top-level package
129
+ goes in the first contract's `source_modules`; a new module inside an existing package or inside `rag_wright.packs`
130
+ needs no edit. `tests/arch/test_import_contracts.py` enforces both.
131
+
132
+ **The network guard.** `tests/conftest.py` fails any test that resolves a non-local host unless it carries a live
133
+ marker (`model`, `store`, `parse`, `embed`, `rerank`, `ner`, `fleet`). Mock model and HTTP calls in unit tests, or
134
+ mark the test live.
135
+
136
+ ## Common mistakes
137
+
138
+ - Adding the slug but forgetting the manifest (slug becomes silently un-discoverable) — the guardrail catches it.
139
+ - An impl_ref factory that reaches env/globals instead of the `WorkspaceHandle` — breaks multi-workspace use; build
140
+ everything from `resources`.
141
+ - A heavy import at the top of an impl_ref factory module that something light imports (a pack's `register()`
142
+ module, `rag_wright.api`): it inflates the light index; import inside the factory body.
143
+ - Declaring `response_bounds` on an `agent_skill` (constructing that `CapabilityManifest` raises `ValueError`: the
144
+ bounds apply only to callable kinds, and a skill is loaded, not called).
145
+ - Inventing a kind. If a capability fits none of the five, flag it — do not force-fit.
@@ -0,0 +1,149 @@
1
+ ---
2
+ name: building-an-ingestion-capability
3
+ description: >-
4
+ How to build a NEW domain's ingestion on the RAG_Wright engine with `build_ingestion`: decide what one extraction
5
+ UNIT is in your documents, write the one required hook (the extractor) and only the optional hooks you need,
6
+ declare the record types in your pack `.ttl`, tune the default hooks with `evaluate_ingestion` on your own sample
7
+ documents, and handle spreadsheets, tables and embedded files. Use it when a product or domain pack needs to turn
8
+ its documents into a cited knowledge graph, or when an ingestion result looks wrong (units too big, tables split,
9
+ records uncited). Grounded in ADR-0124 and the generated API reference (`docs/api/`).
10
+ ---
11
+
12
+ # Building an ingestion capability
13
+
14
+ The engine owns the ingestion MECHANISM; a domain supplies one function, the extractor, plus any optional hook whose
15
+ default does not fit. Everything named here is imported from `rag_wright.api` (the generated `docs/api/README.md` has
16
+ every signature). The decision record is ADR-0124 (`docs/adr/0124-generic-ingestion-builder-and-hooks.md`).
17
+
18
+ ## 1. Who owns which stage
19
+
20
+ | stage | owner | default (engine) | override with |
21
+ |---|---|---|---|
22
+ | parse (PDF, Office, spreadsheets incl. hidden sheets, HTML, Markdown; embedded files) | engine | docling, content-hash cached | (none) |
23
+ | chunk | engine | structural boundaries; a model refines only an over-cap section | `chunk_model=` |
24
+ | segment a chunk into spans | engine default, domain may override | layout-driven: a table row per span, sentences for prose, a heading joins what follows | `segmenter=` |
25
+ | tag spans (soft tags) | domain, optional | none | `span_tagger=` |
26
+ | index spans (embed + store, page/bbox provenance) | engine | the workspace's ingest embedder | `embedder=` |
27
+ | group spans into units | engine default, domain may override | a heading starts a unit, a table stays whole (a record table is one unit per row), page furniture dropped, units capped | `unit_grouper=`, `boundary_decider=` |
28
+ | extract records from a unit | **domain (required)** | (none) | the `extractor` argument |
29
+ | write records | engine default | `kg_write` | `writer=` |
30
+ | per-document follow-up (e.g. an entity graph) | domain, optional | none | `document_hook=` |
31
+ | `Document` node, embedded children (`EmbeddedIn` / `AttachedTo`), progress, dead-lettering | engine | always on | (none) |
32
+
33
+ Every hook's output is checked by the engine, default or override alike: `check_tiling` (spans tile the chunk text,
34
+ ids `<chunk_id>#<index>`), `check_units` (known spans, each once, in order), `check_extraction` (provenance, below).
35
+ A unit whose extraction fails is recorded in the report and skipped; a document that fails is dead-lettered; the run
36
+ goes on.
37
+
38
+ ## 2. Decide what ONE unit is (before writing code)
39
+
40
+ The unit is the text one extractor call reads. Get it right first; every other choice follows.
41
+
42
+ - Ask: "one record in my domain comes from ... ?" A section under a heading (a report, a policy) -> the default
43
+ grouper already does this. One table row (a register, a test log) -> the default treats a DATABASE-style table
44
+ (named, distinct header columns plus a serial first column or many columns) as one unit per row, and sets
45
+ `Unit.table_row` with exact cell values; force it per document with `IngestSource(table_mode="record")`, or keep
46
+ tables whole with `"block"`. A form (fields of ONE record) -> one unit (`auto` keeps a form grid whole).
47
+ - Units are capped at `IngestionTuning.max_unit_chars` (default 6000); a split table repeats its header row in each
48
+ continuation unit.
49
+ - If your documents mark units in a way layout does not show (a numbering scheme, a domain heading convention),
50
+ override `unit_grouper=` or pass a `boundary_decider=` (candidate line texts -> "starts a new unit?" per text) to
51
+ settle the lines the default grouper is unsure of. Domain conventions belong in your pack, never in the engine.
52
+
53
+ ## 3. Declare your record types in the pack `.ttl`
54
+
55
+ The store creates only the types a pack declares (ADR-0066: schema lives in the ontology, not in code). A record type
56
+ needs `span_id` and `confidence` properties to carry provenance:
57
+
58
+ ```turtle
59
+ @prefix eng: <https://ragwright.local/ontology/engine#> .
60
+ @prefix my: <https://example.org/my-domain#> .
61
+
62
+ my:SectionNode a eng:KgVertexType ; eng:vertexName "Section" ;
63
+ eng:kgProperty "section_id:STRING", "title:STRING", "span_id:STRING", "confidence:STRING" ;
64
+ eng:uniqueIndexOn "section_id" .
65
+ ```
66
+
67
+ Point the workspace at it with `EngineConfig(pack="<path to your .ttl>")`; `open_workspace` then creates these types
68
+ on top of the neutral engine types. Writing a type the pack does not declare fails.
69
+
70
+ ## 4. Write the extractor, tune, ingest
71
+
72
+ The extractor turns one `Unit` into a `UnitExtraction` of `KgNode` / `KgEdge` records. Provenance rule
73
+ (`check_extraction`): a fact node or edge carries `span_id` (a span of THIS unit, e.g. `unit.anchor.span_id`) and
74
+ `confidence` (`EXTRACTED`, `INFERRED` or `AMBIGUOUS`); nodes without `span_id` are shared vocabulary; a non-empty
75
+ extraction must cite at least once. Run `evaluate_ingestion` on your OWN sample documents before trusting the
76
+ defaults; it needs no store and makes no model calls.
77
+
78
+ ```python
79
+ import asyncio
80
+ import os
81
+
82
+ from rag_wright.api import (
83
+ EngineConfig, IngestionTuning, IngestSource, KgNode, StoreConfig, UnitExtraction, build_ingestion,
84
+ evaluate_ingestion, open_workspace,
85
+ )
86
+
87
+ PACK_TTL = "my_domain/pack.ttl"
88
+ SAMPLES = ["samples/report.pdf"]
89
+ CORPUS = "my_domain"
90
+ CACHE = "data/cache/my_domain"
91
+
92
+
93
+ async def extract(unit, *, source_doc_id):
94
+ """One unit -> its records, each citing a span of the unit."""
95
+ title = unit.text.strip().splitlines()[0][:200]
96
+ return UnitExtraction(nodes=[KgNode("Section", "section_id", {
97
+ "section_id": f"{source_doc_id}:{unit.index}", "title": title,
98
+ "span_id": unit.anchor.span_id, "confidence": "EXTRACTED"})])
99
+
100
+
101
+ tuning = IngestionTuning(max_unit_chars=6000)
102
+ evaluation = evaluate_ingestion(SAMPLES, cache_dir=CACHE, tuning=tuning)
103
+ print("evaluation passed:", evaluation.passed, evaluation.failures)
104
+
105
+ ws = open_workspace(EngineConfig(store=StoreConfig(
106
+ host=os.environ["ARCADEDB_HOST"], port=os.environ["ARCADEDB_PORT"],
107
+ user=os.environ["ARCADEDB_USER"], password=os.environ["ARCADEDB_PASSWORD"]), pack=PACK_TTL), corpus=CORPUS)
108
+ pipeline = build_ingestion(extract, tuning=tuning)
109
+ report = asyncio.run(pipeline.aingest(ws, [IngestSource(path=p) for p in SAMPLES], cache_dir=CACHE))
110
+ print(report.succeeded, "ingested,", report.failed, "dead-lettered")
111
+ for doc in report.documents:
112
+ print(doc.doc_id, doc.units, "units,", doc.records, "records,", doc.extraction_failures)
113
+ ```
114
+
115
+ Iterate on `evaluation.failures` (and the `DocumentEvaluation` measures: `tables_whole`, `headings_start_units`,
116
+ `coverage`, `cap_ok`, ...) by changing `IngestionTuning` before you override a hook. Keep `extract` async and
117
+ network-bound work inside it; the engine runs up to `IngestionTuning.extract_concurrency` units at once.
118
+
119
+ ## 5. Spreadsheets, tables and embedded files
120
+
121
+ - **Hidden sheets** are ingested by default; `IngestSource(include_hidden_sheets=False)` skips them (listed in
122
+ `DocumentReport.skipped_hidden_sheets`).
123
+ - **Exact cell values**: `table_rows(parse_document(...))` returns every data row as a `TableRow` (`columns`,
124
+ `values`, `cell(name)`), read from the parse's cell grid, whole even when chunking split the table. A per-row unit
125
+ carries its row in `Unit.table_row`, so the extractor reads cells, not re-parsed text.
126
+ - **Embedded files and PDF attachments** (an Office package's embedded workbook or PDF, a PDF's attached files) are
127
+ ingested as CHILD documents through the same pipeline: each gets its own `Document` node and an `EmbeddedIn` edge
128
+ to its parent, and an `AttachedTo` edge from the child to the table-row span it belongs to, with a confidence and
129
+ the identifier evidence (`IngestionTuning.identifier` sets what counts as an identifier). The report lists them in
130
+ `DocumentReport.children`, `links` and `unmapped_links`.
131
+
132
+ ## 6. Verify (definition of done)
133
+
134
+ 1. `evaluate_ingestion` passes on a representative sample of YOUR documents (not a hand-picked easy one).
135
+ 2. A live ingest of that sample: no dead letters, `extraction_failures` explained, records cite spans
136
+ (`kg_read(ws, "<your type>", fields=["span_id"])`), and `span_positions(ws, doc_id)` gives the citation positions.
137
+ 3. A hermetic test of your extractor on fixed units (no model calls in the default suite; the engine's test network
138
+ guard fails any unmarked test that reaches the network).
139
+ 4. If the extractor calls a model, meter it: run the ingest inside `measure_usage()` and check the call count and
140
+ cost per document before a bulk run.
141
+
142
+ ## Anti-patterns
143
+
144
+ - Putting domain rules (section words, abbreviations, value lists) in Python: they belong in your pack `.ttl`.
145
+ - Overriding the segmenter or grouper before `evaluate_ingestion` shows the default fails on your documents.
146
+ - An extractor that returns records without `span_id`, or cites a span outside its unit (the run reports it as an
147
+ extraction failure, and the records are not written).
148
+ - Re-parsing table text with regexes when `Unit.table_row` / `table_rows` already give the exact cells.
149
+ - Importing engine internals (`rag_wright.ingestion.*`, `rag_wright.store.*`): everything here is on `rag_wright.api`.
@@ -0,0 +1,188 @@
1
+ ---
2
+ name: classifier-opportunity-analysis
3
+ description: >-
4
+ Structured guide for ANALYZING a domain's ingestion + retrieval pipeline to find where an LLM call can be
5
+ replaced by a deterministic rule, a trained classifier, or a routing decision. Use it BEFORE building or
6
+ refactoring a domain pack, when an LLM is doing per-unit work that multiplies over a document, or when
7
+ onboarding a new domain — it is the identification/decision step upstream of `setfit` (which BUILDS the
8
+ classifier) and `authoring-a-capability` (which REGISTERS it as a capability). It captures the recipe applied
9
+ twice (contracts, then compliance) so the next domain is mapped the same way instead of re-derived.
10
+ ---
11
+
12
+ # Finding classifier / routing opportunities in a pipeline
13
+
14
+ This is an **analysis** skill: its output is a decision — an *opportunity list / decomposition plan*, not code and
15
+ not a trained model. It answers "where in this domain's ingestion and retrieval does a classifier, a routing
16
+ decision, or a deterministic rule belong, and where must the LLM stay?" Build what it identifies with the `setfit`
17
+ skill, serve the teacher with `qwen-vllm-modal`, and register each result as a capability with
18
+ `authoring-a-capability`.
19
+
20
+ ## The core pattern (why this works, and why we have done it twice)
21
+
22
+ A per-unit "do everything" LLM extraction is almost never one decision. It is a **bundle of separable decisions**
23
+ wearing one prompt. Decomposed, most of the bundle is not LLM-shaped work:
24
+
25
+ - **boundaries** (where does a unit start / is this span worth extracting) are usually structural → deterministic;
26
+ - **closed-vocab tags** (the type, the role, the dimension values) are classification → a classifier, or a
27
+ deterministic cue-rule when the cues are enumerable;
28
+ - only the **genuinely open part** (numbers, free text, synthesis) needs an LLM, and then only **one residual call
29
+ per unit**.
30
+
31
+ Worked precedent in this engine:
32
+
33
+ | | Contracts (decomposed) | Compliance (the CIC arc) |
34
+ |---|---|---|
35
+ | Unit boundaries | deterministic (section numbering / headings) + a decision-model residue decider (one batched `noul` call for the uncertain lines; ADR-0122) | deterministic operative-rule spans + one `jev_decision` call per span for the operative gate (the default `extraction_backend="jev"`) |
36
+ | Closed-vocab tags | the 21-dim / 29-dim classifier fleet | deontic cue-rule + actor / claim-types in that same per-span Jev call |
37
+ | Open / numeric field | deterministic candidate spans + one Jev `choice` call per provision with candidates (none without); the LLM only as fallback (`RAG_RESIDUAL_EXTRACTOR=llm`). Value recall / precision 0.83 / 0.88 vs the LLM's 0.60 / 0.79 | applicability + evidence standard: one gated residual LLM call, only for a rule with a conditional or evidence cue (most skip it); the `"docling"` fallback keeps one LLM extraction per section |
38
+ | Extraction judge | the Layer-3 judge on Jev: one batched call per provision, 95.3% vs the LLM judge's 90.1% (192 blind hand-labelled cases); `RAG_SEMANTIC_JUDGE=llm` opts out | (none) |
39
+ | Text of the record | verbatim span | verbatim span (was a paraphrase) |
40
+ | Structure / graph extraction | once per document (parties), keep the LLM | once per document, keep the LLM |
41
+
42
+ Cost shape (live, 131 provisions of one contract): 215 Jev calls, 0 LLM calls, $0.013, against 277 calls (276 of them
43
+ LLM) and $0.277 on the LLM path (ADR-0040, ING-9 / ING-9b addendum). One batched call per unit is the shape to aim for.
44
+
45
+ The pattern is domain-independent. What changes per domain is the vocabulary and the document structure — which is
46
+ exactly what the phases below make you look at.
47
+
48
+ ## Phase A — Map the pipeline as per-unit decisions
49
+
50
+ Enumerate every LLM call and, for each, its **unit** and how the unit COUNT scales:
51
+
52
+ - per **document** (parse, a party/graph-structure pass) — count ≈ corpus size; cheap per doc.
53
+ - per **section / chunk / segment / span** — count scales with **document length**. A 100-page document is
54
+ thousands of these. **This is where the cost lives and where decomposition pays.**
55
+ - per **query** / per **candidate** / per **(claim, requirement) pair** — query-time; count ≈ traffic, usually a
56
+ few per request (see Phase D).
57
+
58
+ Two things to separate immediately:
59
+
60
+ 1. **Structure / connection extraction** (entities, parties, graph edges — "who/what is in this document and how is
61
+ it connected") is a **once-per-document** pass. It is NOT the per-unit cost; leave the LLM there. Do not mistake
62
+ it for the thing to decompose. (In this engine that is the docling-graph pass; it runs once per contract and once
63
+ per regulation.)
64
+ 2. **Per-unit semantic tagging** (what IS this unit, what are its typed properties) is the multiplying cost. This is
65
+ the target.
66
+
67
+ ## Phase B — Classify each decision by its shape, then pick the mechanism
68
+
69
+ For every per-unit decision, name its shape. The shape dictates the mechanism, in this order of preference (cheapest
70
+ and most robust first):
71
+
72
+ 1. **Boundary / segmentation** — "does a new unit start here?", "is this span operative / extractable?" →
73
+ **deterministic structure first** (numbering, enumeration `(a)(b)`, headings, list markers). Add a small
74
+ **binary classifier** only for the residue where structure is ambiguous (the analog of a `is_extractable_span`
75
+ model). Rarely needs an LLM.
76
+ 2. **Closed-vocab with an enumerable cue list** — a value the ontology can map from a fixed set of trigger phrases
77
+ (e.g. a deontic type from "must / shall / may not") → a **deterministic cue-rule, NO ML**. Do this before
78
+ training anything; it is free and exact.
79
+ 3. **Single-label routing** — one of a closed set, no clean cue list → a **classifier**.
80
+ 4. **Multi-label soft-tagging** — several of a closed set, used as *guidance* not a gate → a **soft-tag classifier**
81
+ (top-k). The most forgiving shape; a modest-accuracy model is still useful because wrong extra tags are cheap.
82
+ 5. **Verbatim vs generated text** — if the record just needs the unit's text, extract the **verbatim span**
83
+ (deterministic) rather than a generated paraphrase. Drops a generative LLM step and is more faithful for
84
+ citation. Keep a paraphrase only if a human-readable restatement is a real requirement.
85
+ 6. **Open / numeric / free-text / synthesis**: no closed set. Often still not LLM work: **propose candidates
86
+ deterministically** (the numbers, amounts, durations in the unit), then a **decision model labels each
87
+ candidate's role** in one batched call per unit. Author the roles and their one-line criteria in the pack `.ttl`
88
+ (the reference pack's `cbr:ResidualRole` + `cbr:decisionCriterion`). Keep the LLM, as **one residual call per
89
+ unit**, only for values no candidate generator can propose.
90
+ 7. **Pair / entailment / verdict**: rerank a candidate against a query, or a judge verdict over a (subject, rule)
91
+ pair → a **decision model** is a strong candidate (a verdict over a closed label set IS a classification), then
92
+ a **cross-encoder / NLI classifier**. The ingestion extraction judge moved to a decision model (ING-9). Often
93
+ query-time; see Phase D.
94
+
95
+ ## Phase C — What to look for in the documents themselves
96
+
97
+ Signals that make decomposition **feasible** (push toward rules + classifiers):
98
+
99
+ - explicit **numbering / enumeration / heading** structure → deterministic boundaries;
100
+ - a **closed, ontology-authored vocabulary** for the typed fields → classifiers + cue-rules;
101
+ - **repeated template structure** across documents → stable features;
102
+ - **enumerable linguistic cues** (deontic verbs, defined terms, standard phrasings) → cue-rules.
103
+
104
+ Signals that **resist** it (keep the LLM): genuinely open / unbounded values, cross-document or multi-hop
105
+ reasoning, long-prose synthesis, values that depend on interpretation rather than surface form.
106
+
107
+ ## Phase D — Ingestion vs retrieval: where the win actually is
108
+
109
+ - **Ingestion** per-unit work on long documents multiplies into thousands of calls. This is the **biggest, do-first**
110
+ opportunity. The whole Phase B decomposition applies.
111
+ - **Retrieval / query time** is typically a **few calls per request** (classify the query, extract its constraints,
112
+ rerank, judge). These ARE classifier/routing shapes (closed-set query routing, a pair-classifier reranker or
113
+ judge), but the volume is low and you often want the LLM's rationale or synthesis. It is legitimate to **live with
114
+ the LLM at query time** (as this engine does for the contract and compliance judges) and still decompose
115
+ ingestion fully. State this as a deliberate choice per decision; do not reflexively de-LLM query time.
116
+
117
+ ## Phase E — Soft-tag vs hard-gate: decide the role before committing
118
+
119
+ The same classifier is safe or dangerous depending on how its output is used:
120
+
121
+ - a **soft tag** that only augments / hints → safe even at modest accuracy; wrong extra tags are cheap.
122
+ - a **hard gate** that drops, blocks, or routes irreversibly → needs high accuracy AND a safe fallback.
123
+
124
+ Decide the role first. Keep a **graceful-degrade path**: a classifier abstention or a persistent rule-miss should
125
+ fall back to the residual LLM (or to an explicit "ambiguous"), never to a silent wrong answer.
126
+
127
+ ## Phase F — Make it ttl-driven, and know what transfers across domains
128
+
129
+ Author the closed vocabulary and the cue lists in the **ontology (`.ttl`), never in Python** (the engine's
130
+ knowledge-in-the-ontology rule). Then:
131
+
132
+ - the **deterministic mechanism** (structure split + cue-rule + verbatim extraction) is domain-generic and
133
+ **transfers to any pack for free** — it reads whatever vocab/cues the pack authors;
134
+ - a **trained classifier is vocabulary-specific** — a new-vocabulary domain pack trains **its own**. "Reuse across
135
+ products" therefore means the *same mechanism + per-pack models*, not one model everywhere.
136
+ - A pack that only re-routes an existing vocabulary at query time (an override overlay) is NOT a new-vocabulary pack
137
+ and needs no new ingestion classifier.
138
+
139
+ ## The output: the opportunity list
140
+
141
+ Produce a decomposition plan, not prose:
142
+
143
+ 1. **Headline the single biggest per-unit LLM cost** (the multiplying ingestion pass).
144
+ 2. For **each decision** give: its unit, its shape (Phase B), the chosen mechanism (deterministic / cue-rule /
145
+ classifier / residual-LLM / verbatim), and its role (soft-tag vs gate).
146
+ 3. Separate an **ingestion bucket** (do first) from a **query-time bucket** (decide case by case; often live with
147
+ the LLM).
148
+ 4. Note the **ttl + per-pack** generality (what transfers, what each pack re-trains).
149
+ 5. **Map each decision onto an ingestion hook** (`build_ingestion`, ADR-0124): a boundary decision →
150
+ `BoundaryDecider` / `UnitGrouper`; closed-vocab tags → `SpanTagger`; residual values and the judge → `Extractor`.
151
+ 6. Exclude anything that is not actually a per-unit cost (once-per-document structure extraction) and anything
152
+ already settled (a decision an existing cue-rule covers).
153
+
154
+ ## Hand-off (what to do with the opportunities)
155
+
156
+ - **Deterministic rule / cue-rule / span-split** → plain code in an ingestion hook (`Segmenter`, `UnitGrouper`,
157
+ `SpanTagger`, passed to `build_ingestion`). NOT a capability; it is mechanism, and the knowledge it reads lives in the `.ttl`.
158
+ - **System-1 decision model (NO training)** → for a closed-set decision (yes/no, choice, score), A/B a decision
159
+ model — **Jev** (managed, OpenRouter Decisions API, zero/few-shot, calibrated) or **Laya** (open, fine-tuned) —
160
+ BEFORE committing to a trained classifier. It often wins when data is scarce or label-ambiguous, or when you need
161
+ calibrated uncertainty to route/gate (measured: RAG_Wright CIC-1c — Jev zero-shot 0.92 vs a trained SetFit 0.82;
162
+ ADR-0119). See `setfit` Phase 0.5 (the decision-vs-train A/B) and the `laya` skill; wire it as a `jev_decision`-style
163
+ model capability with a `DecisionModelProfile`. **Evaluate this first; it may remove the need to train at all.**
164
+ The decision path runs only when `jev_decision` is registered (from `engine_capabilities()`) AND
165
+ `OPENROUTER_API_KEY` is set; otherwise the reference pack's decision paths degrade silently (to the deterministic
166
+ rule or the LLM), so check both before reading a number.
167
+ - **Trained classifier** → build it with the **`setfit`** skill (framing, symmetric leakage-safe eval, per-class
168
+ floor, soft-tag/top-k, rare-class curation, checkpointing). Serve the teacher / bulk-labeler with **`qwen-vllm-modal`**.
169
+ Then register it as a capability with **`authoring-a-capability`**: a `kind="model"` capability with an
170
+ `impl_ref` factory `def <slug>(resources, inputs)` over a cached checkpoint, invoked by name through the engine
171
+ API: from your ingestion hook, call `ainvoke_model(slug, inputs, resources=ws)`, **routed THROUGH the
172
+ capability layer, never hand-constructed around it.** A model impl may be sync (a classifier / XGBoost — run
173
+ off-loop by `ainvoke_model`) or async (an LLM-backed cap — awaited by `ainvoke_model`).
174
+
175
+ ## Anti-patterns (from the real sessions — do not repeat)
176
+
177
+ - **Letting classifier training cost/time decide whether an opportunity exists.** Identify opportunities by the
178
+ *pattern* (per-unit closed-set decision on a long document); training ROI is a separate, later question.
179
+ - **Mistaking once-per-document structure extraction for the per-unit cost.** It is cheap; leave the LLM.
180
+ - **Claiming a judge/verdict step "can't classify."** A verdict over a closed label set (compliant / violation /
181
+ needs-review, relevant / not) IS a classification; it is a legitimate pair-classifier candidate (usually
182
+ query-time).
183
+ - **Hardcoding the vocabulary or cues in Python.** They belong in the `.ttl`; the mechanism reads them.
184
+ - **Training a classifier where an enumerable cue-rule already settles the decision** (the deontic-type case).
185
+ - **Forcing a hard gate where a soft tag suffices** — it imposes an accuracy bar you did not need.
186
+ - **Reflexively de-LLM'ing query time** — low volume + wanted rationale often make the LLM the right call there.
187
+ - **A router/cascade of specialists** — it multiplies errors (router acc × specialist acc). A flat classifier +
188
+ multi-tag usually beats it (see `setfit`).
@@ -0,0 +1,146 @@
1
+ ---
2
+ name: creating-evals
3
+ description: >-
4
+ Domain-agnostic recipe for creating EVALS for engine/product capabilities, eval-first (TDD): write the eval as
5
+ soon as a capability is DEFINED (its contract + acceptance criterion), before it is implemented. Use it when
6
+ starting a new domain (right after capabilities are defined), when adding or changing a capability, or when A/B-ing
7
+ alternatives (e.g. a trained classifier vs a System-1 decision model). Covers gold-set design + reliability,
8
+ per-capability-KIND metrics (extraction / classification / retrieval / graph / generation / judgment), the
9
+ gate-vs-diagnostic split, building the gold cheaply, an isolated executable harness, and optional Langfuse
10
+ Datasets/Experiments/Scores automation. An eval is the executable acceptance criterion; training data IS an eval.
11
+ ---
12
+
13
+ # Creating evals (eval-first / TDD)
14
+
15
+ An eval is the **executable acceptance criterion** for a capability. Write it **as soon as the capability is
16
+ DEFINED** — its contract (typed in/out) and its acceptance criterion exist — **before it is implemented**. This is
17
+ TDD at the capability level: the eval fails (red) on the unbuilt/weak capability, you implement to green, then you
18
+ can A/B alternatives and catch regressions forever. Corollary observed repeatedly in this engine: **the training
19
+ data you build for a classifier/decision model IS an eval** (a labeled gold set + a metric) — so building the eval
20
+ first also gives you the data design for free.
21
+
22
+ ## When to use
23
+ - **Starting a new domain**: the FIRST build step after capabilities are defined (step 5 of the domain-adaptation guide, `docs/domain-adaptation/README.md`) — write
24
+ each capability's eval before/while you implement it.
25
+ - Adding or changing a capability, or tuning a threshold/prompt/model.
26
+ - **A/B-ing alternatives** on one capability (a deterministic rule vs a trained classifier vs a System-1 decision
27
+ model vs an LLM) — the eval is the neutral judge; select on the metric.
28
+
29
+ ## 1. Design the gold set (the foundation — get this right FIRST)
30
+ - **Real, in-domain items + expected outputs/labels.** Small but REPRESENTATIVE; never the easy cases only.
31
+ - **Reproducible + pinned + gitignored.** The gold is a generated artifact: pin its source snapshot + the selected
32
+ ids so it rebuilds identically; gitignore the data, commit the BUILDER. (Pattern: `eval/build_golden.py`.)
33
+ - **Leakage-safe + balanced.** Split by the natural grouping unit (document / source / record), not by row.
34
+ For classification, a SYMMETRIC per-class test and a per-class FLOOR (not overall accuracy — it hides dead
35
+ classes). "k-shot" = k per class.
36
+ - **The gold is the CEILING — measure its RELIABILITY.** For subjective/ambiguous labels, get a second
37
+ independent labeling and report inter-annotator (or inter-pass) agreement; adjudicate the disagreements and
38
+ document the calls. A model cannot beat the gold's own consistency, and label ambiguity in the gold shows up as a
39
+ classifier ceiling you cannot train past (CIC-1c: a two-pass gold agreed at 0.905 and a trained SetFit capped
40
+ ~0.82 — diagnose the gold before blaming the model). If you have no human expert yet, a documented rubric + a
41
+ two-pass consensus is
42
+ the honest proxy — say so.
43
+ - **Validate silver against a small BLIND hand-labelled sample before treating it as gold.** Label the sample
44
+ without seeing any model output, then measure silver-vs-hand agreement. If it is low, the hand-labelled sample IS
45
+ the gold. (ING-9: silver judge labels derived from classifier test sets agreed only 64% with hand labels; the
46
+ decision rested on 192 blind hand-labelled cases. Pattern: `eval/semantic_judge_gold.py --score-blind`.)
47
+ - **Separate a tuning set from a held-out set.** Label the held-out set BEFORE any prompt runs on it, tune only on
48
+ the tuning set, and report both numbers (ADR-0122 boundary residue prompt: 94.5% held-out vs 96.2% tuning). A
49
+ number measured only on the set you tuned on is not a result.
50
+ - **Gold stays local when the corpus is restrictively licensed** (CUAD/ACORD-derived gold lives under the
51
+ gitignored `data/eval/`); commit the builder and the scorer, never the data.
52
+
53
+ ## 2. Pick the metric by capability KIND, and split GATE vs DIAGNOSTIC
54
+ Always set ONE pass/fail **gate** (from the acceptance criterion) and report **diagnostics** alongside (never gate
55
+ on a diagnostic).
56
+ - **Extraction** (section → records, clauses, requirements): recall / precision / F1 of extracted items vs gold,
57
+ reported SEPARATELY (under- vs over-extraction are different failures). Watch over-extraction on non-operative
58
+ input (definitions) and under-extraction on long input.
59
+ - **Classification / typed decision** (incl. SetFit, Laya, **Jev**): per-class recall + the per-class **floor**;
60
+ symmetric eval; top-k recall for multi-label (reported against tags-per-item). Prefer a soft-tag/calibrated
61
+ metric when the output routes rather than hard-gates.
62
+ - **Retrieval**: recall@k (binary, relevant = grade ≥ a floor) as the GATE; nDCG@k (graded, exp gain) as a
63
+ DIAGNOSTIC (do NOT threshold nDCG). Isolate the retrieval legs (score corpus-ids before rehydration). Pattern:
64
+ `eval/acord_retrieval.py`.
65
+ - **Graph / relational**: recall over the answer SET (reachability/traversal), k large enough to cover the set;
66
+ node ids match gold by construction. Pattern: `eval/relational_eval.py`.
67
+ - **Generation / QA**: citation-recall / groundedness / correct-abstention; LLM-as-judge for free-text, but anchor
68
+ with deterministic checks (a cited span must exist). Generation is non-deterministic near the abstain boundary —
69
+ measure over several runs.
70
+ - **Judgment / compliance verdicts**: report PRECISION and RECALL of the actionable class (e.g. violation)
71
+ SEPARATELY (alert-fatigue vs missed), and break out by provenance (real vs constructed). Pattern:
72
+ `scripts/eval_compliance_gold.py`. For a judge that accepts or refutes other outputs, report the **error-catch
73
+ rate** (wrong outputs refuted), the **false-refute rate** (correct outputs refuted) and **calibration** (do its
74
+ scores mean what they say), not one accuracy number. Pattern: `eval/semantic_judge_gold.py` (ING-9: decision
75
+ model 95.3% vs LLM 90.1% on 192 blind hand-labelled cases).
76
+ - **Candidate-then-choose pipelines** (a generator proposes, a model picks): measure the generator's **coverage**
77
+ separately, because it caps recall (ING-9b residual values: candidate coverage 95%; value-level recall 0.83 /
78
+ precision 0.88 vs the LLM's 0.60 / 0.79. Pattern: `eval/residual_decision_gold.py`). **Count is not accuracy**:
79
+ emitting more values is not a win without precision.
80
+ - **Ingestion structure**: `evaluate_ingestion` (in `rag_wright.api`) is the packaged structural eval of the
81
+ ingestion hooks (tiling, table-row integrity, layout respect, coverage) on your own sample documents. Gate
82
+ patterns: `eval/segmenter_eval.py`, `eval/unit_grouper_eval.py`.
83
+
84
+ ## 3. Build the gold cheaply (without faking it)
85
+ - **Silver bootstrapping**: a higher-capability teacher (LLM, or a decision model) labels candidate items; CURATE
86
+ with reject-rules; mark silver, never conflate with gold. (Teacher labeling runs on the flat-GPU substrate per
87
+ `qwen-vllm-modal`, not ad-hoc paid calls.)
88
+ - **Real public datasets** where they exist (e.g. labeled corpora for the task) — add to TRAIN; keep the TEST
89
+ in-corpus + human-adjudicated so it stays an honest transfer test.
90
+ - **Generate hard cases** (near-boundary positives/negatives) to stress the exact confusions — TRAIN-ONLY; the
91
+ gold test stays real. (Full data playbook: the `setfit` skill Phase 1/4 + `classifier-opportunity-analysis`.)
92
+
93
+ ## 4. Make it an executable, isolated harness
94
+ - **Isolate the capability under test**: inject it (a seam / `extract_override` / an injected `retrieve`) so the
95
+ eval measures ONE capability, not the whole pipeline. Invoke production code THROUGH the capability layer
96
+ (`ainvoke_subgraph`/`ainvoke_model`), never a hand-built copy. Score the **shipped request** (the exact
97
+ prompt/question builder production uses, e.g. `judge_request`), not a copy of it re-typed in the eval.
98
+ - **Repeatability for non-deterministic models.** Run each case several times on identical input; report how many
99
+ answers flip and how far the scores sit from the threshold. Flips cluster near the threshold and usually mean
100
+ the QUESTION is ambiguous: fix the question, do not vote it away (Jev flipped 5/181 answers at scores 0.47-0.56;
101
+ temperature/seed did not help, majority voting barely helped, rewriting the ambiguous question did. The ADR-0122
102
+ boundary residue prompt went from 94-96% with flips to 460/461, zero flips across 3 calls). Pattern:
103
+ `eval/boundary_residue_gold.py`.
104
+ - **Cache keys include the prompt and the method.** Any decision or extraction cache must key on the prompt text
105
+ and the method (decision model vs LLM, and which model), so an eval never reuses outputs a different prompt or
106
+ method produced (ADR-0122 ING-4d / ADR-0040 ING-9b: the residue decision cache and the clause cache).
107
+ - **Score from a RESULT ARTIFACT (JSON), not stdout scraping** (scraping truncates and silently drops rows).
108
+ - **Parallelize** model/LLM calls (async + semaphore) — same cost, far less wall-clock; order-preserving so it
109
+ stays deterministic.
110
+ - **Env-selected** so the SAME harness runs local (dev) or on Modal (full corpus + GPU).
111
+ - **Pre-flight paid bulk** (>~50 paid calls): print the exact count + cost and wait (`warn-before-bulk` rule).
112
+ - Stream `X/N` progress + actively monitor any run over ~30s (never launch-and-forget).
113
+ - **Hermetic tests never touch the network**: `tests/conftest.py` fails a test that resolves a non-local host unless
114
+ it carries a live marker (`model`, `store`, ...). Live evals run as `uv run python -u eval/<name>.py` (outside
115
+ pytest) or carry a live marker.
116
+
117
+ ## 5. Langfuse — optional eval automation (we already use it for tracing)
118
+ Langfuse has a first-class eval stack we are NOT yet using (we use it only for spans/usage today): a **Dataset**
119
+ (items = input + optional expected output) → a **Task** (your capability) run over the dataset as an **Experiment
120
+ Run** → **Evaluators** (deterministic checks or LLM-as-judge) producing **Scores** (numeric/categorical/boolean),
121
+ all linked to traces. Reach for it when you want **tracked, re-runnable, dashboarded** evals + regression tracking
122
+ across capability versions; a local JSON harness is enough for a quick one-off gate. Keep the gold BUILDER + a
123
+ committed snapshot in the repo (reproducibility); push the items to the Langfuse dataset so runs and scores land
124
+ next to the traces you already collect. Ground the exact Dataset/Experiment API before wiring
125
+ (https://langfuse.com/docs/evaluation/concepts, https://langfuse.com/docs/datasets/overview); confirm the installed
126
+ SDK version's surface, not prose.
127
+
128
+ ## 6. The TDD loop
129
+ 1. Write the eval from the contract + a handful of real gold items → it fails (red) on the unbuilt/weak capability.
130
+ 2. Implement the minimum to pass the gate (green).
131
+ 3. A/B alternatives (rule / trained classifier / decision model / LLM) on the SAME gold; select on gate + diagnostics + cost + calibration.
132
+ 4. Keep the eval; it is the regression guard (the Beyonce rule — if you shipped it, it has an eval).
133
+
134
+ ## Anti-patterns (seen, do not repeat)
135
+ - **Overall accuracy** instead of a per-class floor — hides dead classes.
136
+ - **Testing on teacher/generated data as if it were gold** — measures mimicry, not accuracy; keep the test real + adjudicated.
137
+ - **Gating on a diagnostic** (e.g. nDCG) — report it, don't threshold it.
138
+ - **No reliability check on a subjective gold** — you can't read a number off a gold whose own labels disagree.
139
+ - **Eval not isolated** to the capability (measures the whole pipeline) — you can't attribute a regression.
140
+ - **Scraping stdout** for metrics — write + read a JSON artifact.
141
+ - **Faking a win by shrinking the sample / picking easy items** — real, representative, honest.
142
+
143
+ ## Hand-off / where this sits
144
+ Chain: `classifier-opportunity-analysis` (identify the decision) → **`creating-evals` (THIS — write the eval FIRST)**
145
+ → build it (a deterministic rule, or `setfit`/`laya`/Jev for a decision, or an LLM) → `authoring-a-capability`
146
+ (register). In the new-domain build sequence, this is the step right after capabilities are defined.