rag-wright 0.1.0__tar.gz → 0.2.1__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.
- rag_wright-0.2.1/.claude/skills/authoring-a-capability/SKILL.md +145 -0
- rag_wright-0.2.1/.claude/skills/building-an-ingestion-capability/SKILL.md +149 -0
- rag_wright-0.2.1/.claude/skills/classifier-opportunity-analysis/SKILL.md +188 -0
- rag_wright-0.2.1/.claude/skills/creating-evals/SKILL.md +146 -0
- rag_wright-0.2.1/.claude/skills/laya/SKILL.md +137 -0
- rag_wright-0.2.1/.claude/skills/qwen-vllm-modal/SKILL.md +104 -0
- rag_wright-0.2.1/.claude/skills/setfit/SKILL.md +304 -0
- rag_wright-0.2.1/.claude/skills/using-the-rag-wright-engine/SKILL.md +146 -0
- rag_wright-0.2.1/.github/workflows/publish.yml +57 -0
- rag_wright-0.2.1/.github/workflows/release-please.yml +30 -0
- rag_wright-0.2.1/.release-please-manifest.json +3 -0
- rag_wright-0.2.1/CHANGELOG.md +97 -0
- rag_wright-0.2.1/CLAUDE.md +211 -0
- rag_wright-0.2.1/PKG-INFO +192 -0
- rag_wright-0.2.1/README.md +139 -0
- rag_wright-0.2.1/docs/ARCHITECTURE_OVERVIEW.md +229 -0
- rag_wright-0.2.1/docs/ArcadeDB_Local.md +62 -0
- rag_wright-0.2.1/docs/OBSERVABILITY.md +94 -0
- rag_wright-0.2.1/docs/adr/0040-neuro-symbolic-extraction-fidelity-ontology-shacl-validation.md +111 -0
- rag_wright-0.2.1/docs/adr/0122-provision-boundary-deterministic-plus-decision-model-residue.md +84 -0
- rag_wright-0.2.1/docs/adr/0123-batched-releases-release-please-and-consumer-dependabot.md +33 -0
- rag_wright-0.2.1/docs/adr/0124-generic-ingestion-builder-and-hooks.md +255 -0
- rag_wright-0.2.1/docs/adr/README.md +183 -0
- rag_wright-0.2.1/docs/api/README.md +293 -0
- rag_wright-0.2.1/docs/architecture.md +113 -0
- rag_wright-0.2.1/docs/concepts.md +154 -0
- rag_wright-0.2.1/docs/configuration.md +118 -0
- rag_wright-0.2.1/docs/contract_pipeline_explainer.md +169 -0
- rag_wright-0.2.1/docs/corpus_ingest_recipe.md +73 -0
- rag_wright-0.2.1/docs/domain-adaptation/README.md +84 -0
- rag_wright-0.2.1/docs/domain-adaptation/_engine-gaps.md +217 -0
- rag_wright-0.2.1/docs/domain-adaptation/authoring-capabilities.md +113 -0
- rag_wright-0.2.1/docs/domain-adaptation/classification-and-decision-models.md +112 -0
- rag_wright-0.2.1/docs/domain-adaptation/entity-resolution.md +115 -0
- rag_wright-0.2.1/docs/domain-adaptation/kg-construction.md +147 -0
- rag_wright-0.2.1/docs/domain-adaptation/ontology-authoring.md +135 -0
- rag_wright-0.2.1/docs/installation.md +119 -0
- rag_wright-0.2.1/docs/playbook.md +226 -0
- rag_wright-0.2.1/docs/product/engine-api-migration-handoff.md +278 -0
- rag_wright-0.2.1/docs/product/engine_async_api.md +150 -0
- rag_wright-0.2.1/docs/product/seam-adaptation-guide.md +64 -0
- rag_wright-0.2.1/docs/proposals/ontology-induction.md +154 -0
- rag_wright-0.2.1/docs/quickstart.md +123 -0
- rag_wright-0.2.1/docs/reference-pack.md +98 -0
- rag_wright-0.2.1/docs/releasing.md +68 -0
- rag_wright-0.2.1/docs/specs/ingestion-hooks/ing5-doc-audit.md +75 -0
- rag_wright-0.2.1/docs/specs/ingestion-hooks/ing8-breaking-changes.md +254 -0
- rag_wright-0.2.1/docs/specs/ingestion-hooks/plan.md +52 -0
- rag_wright-0.2.1/docs/specs/ingestion-hooks/rulewright-migration-0.2.0.md +296 -0
- rag_wright-0.2.1/docs/templates/product-starter/CLAUDE.md.template +225 -0
- rag_wright-0.2.1/docs/templates/product-starter/README.md +52 -0
- rag_wright-0.2.1/docs/templates/product-starter/dependabot.yml +22 -0
- rag_wright-0.2.1/docs/templates/product-starter/playbook.md.template +210 -0
- rag_wright-0.2.1/eval/boundary_residue_gold.py +99 -0
- rag_wright-0.2.1/eval/condensed_pipeline.py +285 -0
- rag_wright-0.2.1/eval/contract_parity_live.py +231 -0
- rag_wright-0.2.1/eval/cuad_highlight.py +218 -0
- rag_wright-0.2.1/eval/embedded_eval.py +90 -0
- rag_wright-0.2.1/eval/full_pipeline_rerank.py +159 -0
- rag_wright-0.2.1/eval/function_property_rerank.py +114 -0
- rag_wright-0.2.1/eval/function_rerank.py +107 -0
- rag_wright-0.2.1/eval/golden.py +112 -0
- rag_wright-0.2.1/eval/ground_discriminator_rerank.py +193 -0
- rag_wright-0.2.1/eval/harness.py +83 -0
- rag_wright-0.2.1/eval/ingestion_live_smoke.py +110 -0
- rag_wright-0.2.1/eval/kg_primary.py +400 -0
- rag_wright-0.2.1/eval/kg_property_rerank.py +135 -0
- rag_wright-0.2.1/eval/listwise_rerank.py +254 -0
- rag_wright-0.2.1/eval/nl_to_type.py +206 -0
- rag_wright-0.2.1/eval/relational_eval.py +91 -0
- rag_wright-0.2.1/eval/residual_decision_gold.py +135 -0
- rag_wright-0.2.1/eval/segmenter_eval.py +211 -0
- rag_wright-0.2.1/eval/semantic_judge_gold.py +155 -0
- rag_wright-0.2.1/eval/test_harness.py +112 -0
- rag_wright-0.2.1/eval/unit_grouper_eval.py +163 -0
- rag_wright-0.2.1/examples/quickstart.py +102 -0
- rag_wright-0.2.1/pyproject.toml +149 -0
- rag_wright-0.2.1/release-please-config.json +27 -0
- rag_wright-0.2.1/scripts/ab_model_overlap.py +110 -0
- rag_wright-0.2.1/scripts/acord_unify.py +223 -0
- rag_wright-0.2.1/scripts/acquire_cuad.py +183 -0
- rag_wright-0.2.1/scripts/acquire_edgar.py +105 -0
- rag_wright-0.2.1/scripts/backfill_affiliations.py +106 -0
- rag_wright-0.2.1/scripts/backfill_clause_span_id.py +97 -0
- rag_wright-0.2.1/scripts/bootstrap_template_capture.py +72 -0
- rag_wright-0.2.1/scripts/bootstrap_typed_edges.py +54 -0
- rag_wright-0.2.1/scripts/build_api_docs.py +99 -0
- rag_wright-0.2.1/scripts/build_api_docs.sh +6 -0
- rag_wright-0.2.1/scripts/build_cuad_clause_cache.py +92 -0
- rag_wright-0.2.1/scripts/build_function_routing_map.py +51 -0
- rag_wright-0.2.1/scripts/cic1_assemble_v2.py +125 -0
- rag_wright-0.2.1/scripts/cic1_generate_training.py +154 -0
- rag_wright-0.2.1/scripts/cic1_jev_actor.py +100 -0
- rag_wright-0.2.1/scripts/cic1_label_spans.py +202 -0
- rag_wright-0.2.1/scripts/cic1_relabel_rubric.py +107 -0
- rag_wright-0.2.1/scripts/cic1_relabel_rubric2.py +108 -0
- rag_wright-0.2.1/scripts/compare_extraction_models.py +142 -0
- rag_wright-0.2.1/scripts/compliance_actor_gate_smoke.py +115 -0
- rag_wright-0.2.1/scripts/compliance_engine_smoke.py +66 -0
- rag_wright-0.2.1/scripts/compliance_policy_demo.py +70 -0
- rag_wright-0.2.1/scripts/curate_taxonomy_gaps.py +127 -0
- rag_wright-0.2.1/scripts/dg_model_ab.py +119 -0
- rag_wright-0.2.1/scripts/distill/eval_all.py +122 -0
- rag_wright-0.2.1/scripts/distill/eval_ce.py +107 -0
- rag_wright-0.2.1/scripts/distill/export_ce_dataset.py +69 -0
- rag_wright-0.2.1/scripts/enrich_edgar_candidates.py +114 -0
- rag_wright-0.2.1/scripts/eval_classifier_guided_vs_tagparse.py +156 -0
- rag_wright-0.2.1/scripts/eval_compliance_gold.py +92 -0
- rag_wright-0.2.1/scripts/generate_contract_python.py +30 -0
- rag_wright-0.2.1/scripts/ingest_compliance_async_prod2.py +69 -0
- rag_wright-0.2.1/scripts/ingest_compliance_document_prod2.py +59 -0
- rag_wright-0.2.1/scripts/ingest_compliance_prod2.py +65 -0
- rag_wright-0.2.1/scripts/ingest_cuad.py +203 -0
- rag_wright-0.2.1/scripts/ingest_cuad_full.py +63 -0
- rag_wright-0.2.1/scripts/ingest_ftc_compliance.py +52 -0
- rag_wright-0.2.1/scripts/ingest_prod1.py +96 -0
- rag_wright-0.2.1/scripts/ingest_prod1_async.py +102 -0
- rag_wright-0.2.1/scripts/ingest_smoke.py +83 -0
- rag_wright-0.2.1/scripts/label_new_functions.py +136 -0
- rag_wright-0.2.1/scripts/legb_function_gate_recall.py +121 -0
- rag_wright-0.2.1/scripts/mcp_compliance_agent_demo.py +78 -0
- rag_wright-0.2.1/scripts/mcp_intra_document_qa_smoke.py +65 -0
- rag_wright-0.2.1/scripts/mcp_query_legs_agent_demo.py +84 -0
- rag_wright-0.2.1/scripts/measure_generation_robustness.py +172 -0
- rag_wright-0.2.1/scripts/migrate_silver_evidence_autotag.py +58 -0
- rag_wright-0.2.1/scripts/migrate_span_fields.py +38 -0
- rag_wright-0.2.1/scripts/mine_scarce_functions.py +89 -0
- rag_wright-0.2.1/scripts/modal_query_app.py +103 -0
- rag_wright-0.2.1/scripts/phase_a_leg_validate.py +120 -0
- rag_wright-0.2.1/scripts/populate_clause_kg.py +142 -0
- rag_wright-0.2.1/scripts/populate_entity_graph.py +107 -0
- rag_wright-0.2.1/scripts/populate_entity_graph_extracted.py +110 -0
- rag_wright-0.2.1/scripts/populate_property_store.py +202 -0
- rag_wright-0.2.1/scripts/prep_relational_verification.py +113 -0
- rag_wright-0.2.1/scripts/reclassify_kg.py +323 -0
- rag_wright-0.2.1/scripts/refresh_framework_graph.sh +103 -0
- rag_wright-0.2.1/scripts/run_clause_exception_linking.py +39 -0
- rag_wright-0.2.1/scripts/semantic_judge_live_validate.py +131 -0
- rag_wright-0.2.1/scripts/semantic_judge_probe.py +84 -0
- rag_wright-0.2.1/scripts/snapshot_leg_a_eval.py +130 -0
- rag_wright-0.2.1/scripts/stack_correctness_validate.py +120 -0
- rag_wright-0.2.1/scripts/table_retrieval_smoke.py +118 -0
- rag_wright-0.2.1/scripts/train_function_classifier.py +95 -0
- rag_wright-0.2.1/scripts/train_legalbert_function.py +270 -0
- rag_wright-0.2.1/scripts/typed_rerank_validate.py +74 -0
- rag_wright-0.2.1/scripts/vllm_extraction_ab.py +111 -0
- rag_wright-0.2.1/scripts/vllm_kg_query_validate.py +83 -0
- rag_wright-0.2.1/src/rag_wright/api/__init__.py +83 -0
- rag_wright-0.2.1/src/rag_wright/api/config.py +61 -0
- rag_wright-0.2.1/src/rag_wright/api/documents.py +47 -0
- rag_wright-0.2.1/src/rag_wright/api/ids.py +23 -0
- rag_wright-0.2.1/src/rag_wright/api/invoke.py +99 -0
- rag_wright-0.2.1/src/rag_wright/api/kg.py +64 -0
- rag_wright-0.2.1/src/rag_wright/api/mcp.py +94 -0
- rag_wright-0.2.1/src/rag_wright/api/workspace.py +86 -0
- rag_wright-0.2.1/src/rag_wright/capabilities/document_parse.py +300 -0
- rag_wright-0.2.1/src/rag_wright/capabilities/invoke.py +31 -0
- rag_wright-0.2.1/src/rag_wright/capabilities/jev_decision.py +48 -0
- rag_wright-0.2.1/src/rag_wright/capabilities/manifests.py +355 -0
- rag_wright-0.2.1/src/rag_wright/capabilities/parsing.py +305 -0
- rag_wright-0.2.1/src/rag_wright/capabilities/registry.py +237 -0
- rag_wright-0.2.1/src/rag_wright/capabilities/remote_encoders.py +62 -0
- rag_wright-0.2.1/src/rag_wright/capabilities/rlm_chunking.py +808 -0
- rag_wright-0.2.1/src/rag_wright/capabilities/span_relevance_judgment.py +191 -0
- rag_wright-0.2.1/src/rag_wright/capabilities/vlm_ocr.py +100 -0
- rag_wright-0.2.1/src/rag_wright/contracts/extraction.py +128 -0
- rag_wright-0.2.1/src/rag_wright/contracts/graph.py +67 -0
- rag_wright-0.2.1/src/rag_wright/contracts/identifiers.py +153 -0
- rag_wright-0.2.1/src/rag_wright/contracts/ingestion.py +306 -0
- rag_wright-0.2.1/src/rag_wright/contracts/span.py +129 -0
- rag_wright-0.2.1/src/rag_wright/corpus/document_parser.py +362 -0
- rag_wright-0.2.1/src/rag_wright/corpus/embedded.py +310 -0
- rag_wright-0.2.1/src/rag_wright/ingestion/__init__.py +11 -0
- rag_wright-0.2.1/src/rag_wright/ingestion/builder.py +468 -0
- rag_wright-0.2.1/src/rag_wright/ingestion/evaluate.py +235 -0
- rag_wright-0.2.1/src/rag_wright/ingestion/group.py +145 -0
- rag_wright-0.2.1/src/rag_wright/ingestion/layout.py +81 -0
- rag_wright-0.2.1/src/rag_wright/ingestion/segment.py +128 -0
- rag_wright-0.2.1/src/rag_wright/ingestion/tables.py +54 -0
- rag_wright-0.2.1/src/rag_wright/models/profiles.py +332 -0
- rag_wright-0.2.1/src/rag_wright/models/tag_structured.py +285 -0
- rag_wright-0.2.1/src/rag_wright/models/usage.py +104 -0
- rag_wright-0.2.1/src/rag_wright/ontology/pack_schema.py +47 -0
- rag_wright-0.2.1/src/rag_wright/packs/__init__.py +6 -0
- rag_wright-0.2.1/src/rag_wright/packs/compliance/__init__.py +4 -0
- rag_wright-0.2.1/src/rag_wright/packs/compliance/capabilities/assertion_extraction.py +79 -0
- rag_wright-0.2.1/src/rag_wright/packs/compliance/capabilities/claim_extraction.py +153 -0
- rag_wright-0.2.1/src/rag_wright/packs/compliance/capabilities/compliance_judgment.py +322 -0
- rag_wright-0.2.1/src/rag_wright/packs/compliance/capabilities/compliance_store.py +138 -0
- rag_wright-0.2.1/src/rag_wright/packs/compliance/capabilities/requirement_extraction.py +250 -0
- rag_wright-0.2.1/src/rag_wright/packs/compliance/mcp/compliance_server.py +299 -0
- rag_wright-0.2.1/src/rag_wright/packs/compliance/ontology/compliance_bridge.ttl +195 -0
- rag_wright-0.2.1/src/rag_wright/packs/compliance/ontology/loader.py +210 -0
- rag_wright-0.2.1/src/rag_wright/packs/compliance/pack.py +210 -0
- rag_wright-0.2.1/src/rag_wright/packs/compliance/skills/claim_extraction/template.py +50 -0
- rag_wright-0.2.1/src/rag_wright/packs/compliance/skills/requirement_extraction/template.py +50 -0
- rag_wright-0.2.1/src/rag_wright/packs/compliance/subgraphs/compliance_check.py +1041 -0
- rag_wright-0.2.1/src/rag_wright/packs/compliance/subgraphs/compliance_ingestion.py +307 -0
- rag_wright-0.2.1/src/rag_wright/packs/compliance/subgraphs/requirement_extraction.py +137 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/__init__.py +4 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/capabilities/clause_exception_linking.py +118 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/capabilities/contract_kg_serve.py +156 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/capabilities/contract_kg_store.py +456 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/capabilities/dg_extraction.py +585 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/capabilities/graph_extraction.py +243 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/capabilities/highlight_serve.py +134 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/capabilities/property_boosted_retrieval.py +125 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/capabilities/query_function_classifier.py +94 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/capabilities/query_understanding.py +109 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/corpus/cuad.py +153 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/corpus/cuad_ingestion.py +73 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/corpus/gcs_ingestion.py +120 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/mcp/__init__.py +12 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/mcp/intra_document_qa_server.py +170 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/mcp/relational_qa_server.py +171 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/mcp/typed_property_retrieval_server.py +191 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/ontology/clause_template.py +964 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/ontology/codegen.py +84 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/ontology/contract_bridge.ttl +2741 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/ontology/contract_taxonomy.py +24 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/ontology/derive.py +58 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/ontology/loader.py +270 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/ontology/template_introspect.py +100 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/options.py +27 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/pack.py +420 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/schemas/function.py +167 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/schemas/ontology.py +85 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/schemas/property.py +201 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/schemas/query_intent.py +53 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/schemas/value_match.py +84 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/skills/corpus_ingest/SKILL.md +101 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/spans/boundary.py +135 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/spans/clause_function_classifier.py +490 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/spans/clause_kg_extractor.py +338 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/spans/cuad_labels.py +81 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/spans/dim_classifier.py +158 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/spans/function_families.py +62 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/spans/hybrid_classifier.py +103 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/spans/legalbert_classifier.py +119 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/spans/model_capabilities.py +107 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/spans/new_function_labels.py +111 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/spans/property_extractor.py +389 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/spans/property_grounding.py +182 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/spans/reclassify.py +77 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/spans/residual_candidates.py +180 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/spans/scarce_function_labels.py +105 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/spans/segment.py +282 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/spans/semantic_judge.py +271 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/spans/symbolic_validation.py +131 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/spans/tag_clause_extractor.py +182 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/subgraphs/async_ingestion.py +204 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/subgraphs/contract_ingestion_pipeline.py +985 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/subgraphs/intra_document_qa.py +328 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/subgraphs/query_constraint_extraction.py +73 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/subgraphs/relational_qa.py +165 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/subgraphs/typed_clause_extraction.py +171 -0
- rag_wright-0.2.1/src/rag_wright/packs/contracts/subgraphs/typed_property_retrieval.py +278 -0
- rag_wright-0.2.1/src/rag_wright/packs/reference_seam.py +135 -0
- rag_wright-0.2.1/src/rag_wright/store/arcadedb.py +986 -0
- rag_wright-0.2.1/src/rag_wright/store/seam.py +219 -0
- rag_wright-0.2.1/src/rag_wright/subgraphs/__init__.py +0 -0
- rag_wright-0.2.1/src/rag_wright/subgraphs/graph_extraction.py +100 -0
- rag_wright-0.2.1/src/rag_wright/subgraphs/scaffold.py +70 -0
- rag_wright-0.2.1/src/rag_wright/subgraphs/semantic_chunking.py +183 -0
- rag_wright-0.2.1/tasks.md +5071 -0
- rag_wright-0.2.1/tests/__init__.py +0 -0
- rag_wright-0.2.1/tests/api/__init__.py +0 -0
- rag_wright-0.2.1/tests/api/test_capability_reexports.py +43 -0
- rag_wright-0.2.1/tests/api/test_documents.py +73 -0
- rag_wright-0.2.1/tests/api/test_invoke.py +311 -0
- rag_wright-0.2.1/tests/api/test_kg.py +87 -0
- rag_wright-0.2.1/tests/api/test_mcp.py +108 -0
- rag_wright-0.2.1/tests/api/test_options.py +93 -0
- rag_wright-0.2.1/tests/api/test_workspace.py +85 -0
- rag_wright-0.2.1/tests/arch/test_api_docs_current.py +17 -0
- rag_wright-0.2.1/tests/arch/test_doc_references.py +121 -0
- rag_wright-0.2.1/tests/arch/test_import_contracts.py +33 -0
- rag_wright-0.2.1/tests/capabilities/__init__.py +0 -0
- rag_wright-0.2.1/tests/capabilities/test_assertion_extraction.py +62 -0
- rag_wright-0.2.1/tests/capabilities/test_authoring_contract.py +79 -0
- rag_wright-0.2.1/tests/capabilities/test_claim_extraction.py +151 -0
- rag_wright-0.2.1/tests/capabilities/test_clause_exception_linking.py +103 -0
- rag_wright-0.2.1/tests/capabilities/test_compliance_judgment.py +356 -0
- rag_wright-0.2.1/tests/capabilities/test_compliance_store.py +116 -0
- rag_wright-0.2.1/tests/capabilities/test_contract_kg_serve.py +193 -0
- rag_wright-0.2.1/tests/capabilities/test_contract_kg_store.py +155 -0
- rag_wright-0.2.1/tests/capabilities/test_contract_kg_store_reads.py +133 -0
- rag_wright-0.2.1/tests/capabilities/test_contract_taxonomy_and_spans.py +103 -0
- rag_wright-0.2.1/tests/capabilities/test_dg_adapter.py +62 -0
- rag_wright-0.2.1/tests/capabilities/test_dg_async.py +100 -0
- rag_wright-0.2.1/tests/capabilities/test_dg_extraction.py +188 -0
- rag_wright-0.2.1/tests/capabilities/test_dg_model_seam.py +51 -0
- rag_wright-0.2.1/tests/capabilities/test_dg_private.py +55 -0
- rag_wright-0.2.1/tests/capabilities/test_entity_resolution.py +189 -0
- rag_wright-0.2.1/tests/capabilities/test_graph_extraction.py +186 -0
- rag_wright-0.2.1/tests/capabilities/test_highlight_serve.py +118 -0
- rag_wright-0.2.1/tests/capabilities/test_jev_decision.py +131 -0
- rag_wright-0.2.1/tests/capabilities/test_manifest_validation.py +30 -0
- rag_wright-0.2.1/tests/capabilities/test_manifests.py +288 -0
- rag_wright-0.2.1/tests/capabilities/test_parsing.py +180 -0
- rag_wright-0.2.1/tests/capabilities/test_parties_extraction.py +71 -0
- rag_wright-0.2.1/tests/capabilities/test_property_boosted_retrieval.py +128 -0
- rag_wright-0.2.1/tests/capabilities/test_query_function_classifier.py +43 -0
- rag_wright-0.2.1/tests/capabilities/test_query_understanding.py +117 -0
- rag_wright-0.2.1/tests/capabilities/test_registry.py +298 -0
- rag_wright-0.2.1/tests/capabilities/test_remote_encoders.py +70 -0
- rag_wright-0.2.1/tests/capabilities/test_requirement_extraction.py +262 -0
- rag_wright-0.2.1/tests/capabilities/test_retrieval_core.py +113 -0
- rag_wright-0.2.1/tests/capabilities/test_vlm_ocr.py +103 -0
- rag_wright-0.2.1/tests/compliance_fakes.py +38 -0
- rag_wright-0.2.1/tests/conftest.py +92 -0
- rag_wright-0.2.1/tests/contracts/__init__.py +0 -0
- rag_wright-0.2.1/tests/contracts/test_compliance.py +164 -0
- rag_wright-0.2.1/tests/contracts/test_cuad_highlight_contracts.py +109 -0
- rag_wright-0.2.1/tests/contracts/test_extraction.py +160 -0
- rag_wright-0.2.1/tests/contracts/test_function.py +119 -0
- rag_wright-0.2.1/tests/contracts/test_function_routing.py +69 -0
- rag_wright-0.2.1/tests/contracts/test_identifiers.py +161 -0
- rag_wright-0.2.1/tests/contracts/test_ingestion_hooks.py +247 -0
- rag_wright-0.2.1/tests/contracts/test_jurisdiction.py +76 -0
- rag_wright-0.2.1/tests/contracts/test_ontology.py +167 -0
- rag_wright-0.2.1/tests/contracts/test_property.py +107 -0
- rag_wright-0.2.1/tests/contracts/test_value_match.py +43 -0
- rag_wright-0.2.1/tests/corpus/__init__.py +0 -0
- rag_wright-0.2.1/tests/corpus/_ooxml_fixtures.py +150 -0
- rag_wright-0.2.1/tests/corpus/test_cuad.py +45 -0
- rag_wright-0.2.1/tests/corpus/test_cuad_ingestion.py +38 -0
- rag_wright-0.2.1/tests/corpus/test_document_parser.py +341 -0
- rag_wright-0.2.1/tests/corpus/test_edgar.py +136 -0
- rag_wright-0.2.1/tests/corpus/test_embedded.py +212 -0
- rag_wright-0.2.1/tests/corpus/test_gcs_ingestion.py +138 -0
- rag_wright-0.2.1/tests/corpus/test_parse_wire2.py +64 -0
- rag_wright-0.2.1/tests/corpus/test_selection.py +133 -0
- rag_wright-0.2.1/tests/fixtures/ingestion/segmenter_gold.json +37 -0
- rag_wright-0.2.1/tests/fixtures/ingestion/textile_spec_sheet.md +33 -0
- rag_wright-0.2.1/tests/fixtures/ingestion/textile_test_report.md +24 -0
- rag_wright-0.2.1/tests/foundation/__init__.py +0 -0
- rag_wright-0.2.1/tests/ingestion/__init__.py +0 -0
- rag_wright-0.2.1/tests/ingestion/test_builder.py +256 -0
- rag_wright-0.2.1/tests/ingestion/test_evaluate.py +45 -0
- rag_wright-0.2.1/tests/ingestion/test_layout_segmenter.py +147 -0
- rag_wright-0.2.1/tests/ingestion/test_spreadsheet_content.py +122 -0
- rag_wright-0.2.1/tests/ingestion/test_table_rows.py +102 -0
- rag_wright-0.2.1/tests/ingestion/test_tuning.py +60 -0
- rag_wright-0.2.1/tests/ingestion/test_unit_grouper.py +127 -0
- rag_wright-0.2.1/tests/journey/test_pack_schema.py +79 -0
- rag_wright-0.2.1/tests/mcp/__init__.py +0 -0
- rag_wright-0.2.1/tests/mcp/test_compliance_server.py +200 -0
- rag_wright-0.2.1/tests/mcp/test_intra_document_qa_server.py +64 -0
- rag_wright-0.2.1/tests/mcp/test_no_model_supplied_tenant.py +123 -0
- rag_wright-0.2.1/tests/mcp/test_relational_qa_server.py +63 -0
- rag_wright-0.2.1/tests/mcp/test_typed_property_retrieval_server.py +74 -0
- rag_wright-0.2.1/tests/models/__init__.py +0 -0
- rag_wright-0.2.1/tests/models/test_profile_routing.py +77 -0
- rag_wright-0.2.1/tests/models/test_profile_seam.py +254 -0
- rag_wright-0.2.1/tests/models/test_serving_wiring.py +82 -0
- rag_wright-0.2.1/tests/models/test_tag_structured.py +320 -0
- rag_wright-0.2.1/tests/ontology/__init__.py +0 -0
- rag_wright-0.2.1/tests/ontology/test_clause_template.py +171 -0
- rag_wright-0.2.1/tests/ontology/test_compliance_ontology_authoritative.py +94 -0
- rag_wright-0.2.1/tests/ontology/test_derivation.py +120 -0
- rag_wright-0.2.1/tests/ontology/test_entity_taxonomy.py +33 -0
- rag_wright-0.2.1/tests/ontology/test_generated_template_meta_in_sync.py +21 -0
- rag_wright-0.2.1/tests/ontology/test_generated_vocab_in_sync.py +23 -0
- rag_wright-0.2.1/tests/ontology/test_template_captured_in_ttl.py +22 -0
- rag_wright-0.2.1/tests/ontology/test_ttl_is_source_of_truth.py +33 -0
- rag_wright-0.2.1/tests/reference/test_compliance_reference.py +146 -0
- rag_wright-0.2.1/tests/reference/test_contract_seam.py +133 -0
- rag_wright-0.2.1/tests/skills/__init__.py +0 -0
- rag_wright-0.2.1/tests/skills/test_ingestion_skill_example.py +79 -0
- rag_wright-0.2.1/tests/spans/test_boundary.py +148 -0
- rag_wright-0.2.1/tests/spans/test_classifier_property_extractor.py +96 -0
- rag_wright-0.2.1/tests/spans/test_clause_classifier_tags_0005.py +54 -0
- rag_wright-0.2.1/tests/spans/test_clause_function_classifier.py +185 -0
- rag_wright-0.2.1/tests/spans/test_clause_function_classifier_async.py +78 -0
- rag_wright-0.2.1/tests/spans/test_clause_kg_extractor.py +234 -0
- rag_wright-0.2.1/tests/spans/test_clause_kg_extractor_async.py +70 -0
- rag_wright-0.2.1/tests/spans/test_dim_classifier.py +43 -0
- rag_wright-0.2.1/tests/spans/test_dim_fleet_live.py +147 -0
- rag_wright-0.2.1/tests/spans/test_function_classifier.py +111 -0
- rag_wright-0.2.1/tests/spans/test_hybrid_classifier.py +86 -0
- rag_wright-0.2.1/tests/spans/test_hybrid_property_extractor.py +150 -0
- rag_wright-0.2.1/tests/spans/test_legalbert_classifier.py +56 -0
- rag_wright-0.2.1/tests/spans/test_model_capabilities.py +51 -0
- rag_wright-0.2.1/tests/spans/test_new_function_labels.py +51 -0
- rag_wright-0.2.1/tests/spans/test_property_extractor.py +108 -0
- rag_wright-0.2.1/tests/spans/test_property_grounding.py +108 -0
- rag_wright-0.2.1/tests/spans/test_reclassify.py +59 -0
- rag_wright-0.2.1/tests/spans/test_residual_decision.py +158 -0
- rag_wright-0.2.1/tests/spans/test_scarce_function_labels.py +64 -0
- rag_wright-0.2.1/tests/spans/test_segment.py +280 -0
- rag_wright-0.2.1/tests/spans/test_segmentation_vocab.py +44 -0
- rag_wright-0.2.1/tests/spans/test_semantic_judge.py +224 -0
- rag_wright-0.2.1/tests/spans/test_setfit_clause_adapter.py +70 -0
- rag_wright-0.2.1/tests/spans/test_span_offsets.py +54 -0
- rag_wright-0.2.1/tests/spans/test_stage_labels_0005.py +41 -0
- rag_wright-0.2.1/tests/spans/test_symbolic_validation.py +197 -0
- rag_wright-0.2.1/tests/spans/test_tag_clause_extractor.py +140 -0
- rag_wright-0.2.1/tests/store/__init__.py +0 -0
- rag_wright-0.2.1/tests/store/test_arcadedb_clause_kg.py +193 -0
- rag_wright-0.2.1/tests/store/test_arcadedb_contract.py +73 -0
- rag_wright-0.2.1/tests/store/test_arcadedb_property.py +109 -0
- rag_wright-0.2.1/tests/store/test_arcadedb_requirement_sources.py +101 -0
- rag_wright-0.2.1/tests/store/test_arcadedb_schema.py +253 -0
- rag_wright-0.2.1/tests/store/test_arcadedb_span.py +147 -0
- rag_wright-0.2.1/tests/store/test_concurrent_writes.py +50 -0
- rag_wright-0.2.1/tests/store/test_document_scope.py +151 -0
- rag_wright-0.2.1/tests/store/test_engine_domain_neutral.py +48 -0
- rag_wright-0.2.1/tests/store/test_kg_edges.py +125 -0
- rag_wright-0.2.1/tests/store/test_kg_read.py +114 -0
- rag_wright-0.2.1/tests/store/test_neutral_schema.py +79 -0
- rag_wright-0.2.1/tests/subgraphs/__init__.py +0 -0
- rag_wright-0.2.1/tests/subgraphs/test_async_ingestion.py +258 -0
- rag_wright-0.2.1/tests/subgraphs/test_chunk7_structure_carry.py +77 -0
- rag_wright-0.2.1/tests/subgraphs/test_clause_results.py +55 -0
- rag_wright-0.2.1/tests/subgraphs/test_compliance_check.py +1495 -0
- rag_wright-0.2.1/tests/subgraphs/test_compliance_ingestion.py +342 -0
- rag_wright-0.2.1/tests/subgraphs/test_contract_ingestion_pipeline.py +351 -0
- rag_wright-0.2.1/tests/subgraphs/test_contract_ingestion_pipeline_async.py +142 -0
- rag_wright-0.2.1/tests/subgraphs/test_contract_ingestion_pipeline_graph_async.py +223 -0
- rag_wright-0.2.1/tests/subgraphs/test_ingest_knobs.py +32 -0
- rag_wright-0.2.1/tests/subgraphs/test_ingest_segment_classify.py +119 -0
- rag_wright-0.2.1/tests/subgraphs/test_intra_document_qa.py +395 -0
- rag_wright-0.2.1/tests/subgraphs/test_partial_entry_contract.py +81 -0
- rag_wright-0.2.1/tests/subgraphs/test_query_constraint_extraction.py +47 -0
- rag_wright-0.2.1/tests/subgraphs/test_relational_qa.py +128 -0
- rag_wright-0.2.1/tests/subgraphs/test_requirement_extraction.py +127 -0
- rag_wright-0.2.1/tests/subgraphs/test_typed_clause_extraction.py +117 -0
- rag_wright-0.2.1/tests/subgraphs/test_typed_property_retrieval.py +244 -0
- rag_wright-0.2.1/tests/test_populate_clause_kg.py +70 -0
- rag_wright-0.2.1/tests/util/__init__.py +0 -0
- rag_wright-0.2.1/uv.lock +4863 -0
- rag_wright-0.1.0/.claude/skills/authoring-a-capability/SKILL.md +0 -106
- rag_wright-0.1.0/.claude/skills/classifier-opportunity-analysis/SKILL.md +0 -175
- rag_wright-0.1.0/.claude/skills/creating-evals/SKILL.md +0 -114
- rag_wright-0.1.0/.claude/skills/laya/SKILL.md +0 -119
- rag_wright-0.1.0/.claude/skills/qwen-vllm-modal/SKILL.md +0 -96
- rag_wright-0.1.0/.claude/skills/setfit/SKILL.md +0 -293
- rag_wright-0.1.0/.claude/skills/using-the-rag-wright-engine/SKILL.md +0 -90
- rag_wright-0.1.0/.github/workflows/publish.yml +0 -56
- rag_wright-0.1.0/CHANGELOG.md +0 -48
- rag_wright-0.1.0/CLAUDE.md +0 -201
- rag_wright-0.1.0/PKG-INFO +0 -168
- rag_wright-0.1.0/README.md +0 -118
- rag_wright-0.1.0/docs/ARCHITECTURE_OVERVIEW.md +0 -199
- rag_wright-0.1.0/docs/ArcadeDB_Local.md +0 -43
- rag_wright-0.1.0/docs/OBSERVABILITY.md +0 -88
- rag_wright-0.1.0/docs/adr/0040-neuro-symbolic-extraction-fidelity-ontology-shacl-validation.md +0 -82
- rag_wright-0.1.0/docs/adr/0122-provision-boundary-deterministic-plus-decision-model-residue.md +0 -60
- rag_wright-0.1.0/docs/adr/README.md +0 -181
- rag_wright-0.1.0/docs/api/README.md +0 -123
- rag_wright-0.1.0/docs/architecture.md +0 -103
- rag_wright-0.1.0/docs/concepts.md +0 -110
- rag_wright-0.1.0/docs/configuration.md +0 -91
- rag_wright-0.1.0/docs/contract_pipeline_explainer.md +0 -169
- rag_wright-0.1.0/docs/corpus_ingest_recipe.md +0 -56
- rag_wright-0.1.0/docs/domain-adaptation/README.md +0 -71
- rag_wright-0.1.0/docs/domain-adaptation/_engine-gaps.md +0 -44
- rag_wright-0.1.0/docs/domain-adaptation/authoring-capabilities.md +0 -85
- rag_wright-0.1.0/docs/domain-adaptation/classification-and-decision-models.md +0 -69
- rag_wright-0.1.0/docs/domain-adaptation/entity-resolution.md +0 -54
- rag_wright-0.1.0/docs/domain-adaptation/kg-construction.md +0 -66
- rag_wright-0.1.0/docs/domain-adaptation/ontology-authoring.md +0 -83
- rag_wright-0.1.0/docs/installation.md +0 -93
- rag_wright-0.1.0/docs/playbook.md +0 -222
- rag_wright-0.1.0/docs/product/engine-api-migration-handoff.md +0 -278
- rag_wright-0.1.0/docs/product/engine_async_api.md +0 -150
- rag_wright-0.1.0/docs/product/seam-adaptation-guide.md +0 -64
- rag_wright-0.1.0/docs/quickstart.md +0 -106
- rag_wright-0.1.0/docs/reference-pack.md +0 -69
- rag_wright-0.1.0/docs/templates/product-starter/CLAUDE.md.template +0 -193
- rag_wright-0.1.0/docs/templates/product-starter/README.md +0 -45
- rag_wright-0.1.0/docs/templates/product-starter/playbook.md.template +0 -174
- rag_wright-0.1.0/eval/condensed_pipeline.py +0 -284
- rag_wright-0.1.0/eval/cuad_highlight.py +0 -218
- rag_wright-0.1.0/eval/full_pipeline_rerank.py +0 -159
- rag_wright-0.1.0/eval/function_property_rerank.py +0 -113
- rag_wright-0.1.0/eval/function_rerank.py +0 -107
- rag_wright-0.1.0/eval/golden.py +0 -112
- rag_wright-0.1.0/eval/ground_discriminator_rerank.py +0 -193
- rag_wright-0.1.0/eval/harness.py +0 -83
- rag_wright-0.1.0/eval/kg_primary.py +0 -399
- rag_wright-0.1.0/eval/kg_property_rerank.py +0 -135
- rag_wright-0.1.0/eval/listwise_rerank.py +0 -254
- rag_wright-0.1.0/eval/nl_to_type.py +0 -206
- rag_wright-0.1.0/eval/relational_eval.py +0 -91
- rag_wright-0.1.0/eval/test_harness.py +0 -112
- rag_wright-0.1.0/examples/quickstart.py +0 -94
- rag_wright-0.1.0/pyproject.toml +0 -157
- rag_wright-0.1.0/scripts/ab_model_overlap.py +0 -110
- rag_wright-0.1.0/scripts/acord_unify.py +0 -223
- rag_wright-0.1.0/scripts/acquire_cuad.py +0 -183
- rag_wright-0.1.0/scripts/acquire_edgar.py +0 -105
- rag_wright-0.1.0/scripts/backfill_affiliations.py +0 -106
- rag_wright-0.1.0/scripts/backfill_clause_span_id.py +0 -95
- rag_wright-0.1.0/scripts/bootstrap_template_capture.py +0 -72
- rag_wright-0.1.0/scripts/bootstrap_typed_edges.py +0 -54
- rag_wright-0.1.0/scripts/build_api_docs.py +0 -59
- rag_wright-0.1.0/scripts/build_api_docs.sh +0 -7
- rag_wright-0.1.0/scripts/build_cuad_clause_cache.py +0 -92
- rag_wright-0.1.0/scripts/build_function_routing_map.py +0 -50
- rag_wright-0.1.0/scripts/cic1_assemble_v2.py +0 -125
- rag_wright-0.1.0/scripts/cic1_generate_training.py +0 -154
- rag_wright-0.1.0/scripts/cic1_jev_actor.py +0 -100
- rag_wright-0.1.0/scripts/cic1_label_spans.py +0 -202
- rag_wright-0.1.0/scripts/cic1_relabel_rubric.py +0 -107
- rag_wright-0.1.0/scripts/cic1_relabel_rubric2.py +0 -108
- rag_wright-0.1.0/scripts/compare_extraction_models.py +0 -142
- rag_wright-0.1.0/scripts/compliance_actor_gate_smoke.py +0 -113
- rag_wright-0.1.0/scripts/compliance_engine_smoke.py +0 -65
- rag_wright-0.1.0/scripts/compliance_policy_demo.py +0 -69
- rag_wright-0.1.0/scripts/curate_taxonomy_gaps.py +0 -127
- rag_wright-0.1.0/scripts/dg_model_ab.py +0 -119
- rag_wright-0.1.0/scripts/distill/eval_all.py +0 -122
- rag_wright-0.1.0/scripts/distill/eval_ce.py +0 -107
- rag_wright-0.1.0/scripts/distill/export_ce_dataset.py +0 -69
- rag_wright-0.1.0/scripts/enrich_edgar_candidates.py +0 -114
- rag_wright-0.1.0/scripts/eval_classifier_guided_vs_tagparse.py +0 -156
- rag_wright-0.1.0/scripts/eval_compliance_gold.py +0 -91
- rag_wright-0.1.0/scripts/generate_contract_python.py +0 -30
- rag_wright-0.1.0/scripts/ingest_compliance_async_prod2.py +0 -67
- rag_wright-0.1.0/scripts/ingest_compliance_document_prod2.py +0 -57
- rag_wright-0.1.0/scripts/ingest_compliance_prod2.py +0 -63
- rag_wright-0.1.0/scripts/ingest_cuad.py +0 -203
- rag_wright-0.1.0/scripts/ingest_cuad_full.py +0 -61
- rag_wright-0.1.0/scripts/ingest_ftc_compliance.py +0 -50
- rag_wright-0.1.0/scripts/ingest_prod1.py +0 -95
- rag_wright-0.1.0/scripts/ingest_prod1_async.py +0 -101
- rag_wright-0.1.0/scripts/ingest_smoke.py +0 -81
- rag_wright-0.1.0/scripts/label_new_functions.py +0 -136
- rag_wright-0.1.0/scripts/legb_function_gate_recall.py +0 -121
- rag_wright-0.1.0/scripts/mcp_compliance_agent_demo.py +0 -78
- rag_wright-0.1.0/scripts/mcp_intra_document_qa_smoke.py +0 -65
- rag_wright-0.1.0/scripts/mcp_query_legs_agent_demo.py +0 -84
- rag_wright-0.1.0/scripts/measure_generation_robustness.py +0 -172
- rag_wright-0.1.0/scripts/migrate_silver_evidence_autotag.py +0 -58
- rag_wright-0.1.0/scripts/mine_scarce_functions.py +0 -89
- rag_wright-0.1.0/scripts/modal_query_app.py +0 -103
- rag_wright-0.1.0/scripts/phase_a_leg_validate.py +0 -120
- rag_wright-0.1.0/scripts/populate_clause_kg.py +0 -141
- rag_wright-0.1.0/scripts/populate_entity_graph.py +0 -107
- rag_wright-0.1.0/scripts/populate_entity_graph_extracted.py +0 -110
- rag_wright-0.1.0/scripts/populate_property_store.py +0 -202
- rag_wright-0.1.0/scripts/prep_relational_verification.py +0 -113
- rag_wright-0.1.0/scripts/reclassify_kg.py +0 -322
- rag_wright-0.1.0/scripts/refresh_framework_graph.sh +0 -100
- rag_wright-0.1.0/scripts/run_clause_exception_linking.py +0 -38
- rag_wright-0.1.0/scripts/semantic_judge_live_validate.py +0 -131
- rag_wright-0.1.0/scripts/semantic_judge_probe.py +0 -84
- rag_wright-0.1.0/scripts/snapshot_leg_a_eval.py +0 -130
- rag_wright-0.1.0/scripts/stack_correctness_validate.py +0 -120
- rag_wright-0.1.0/scripts/table_retrieval_smoke.py +0 -118
- rag_wright-0.1.0/scripts/train_function_classifier.py +0 -95
- rag_wright-0.1.0/scripts/train_legalbert_function.py +0 -270
- rag_wright-0.1.0/scripts/typed_rerank_validate.py +0 -74
- rag_wright-0.1.0/scripts/vllm_extraction_ab.py +0 -111
- rag_wright-0.1.0/scripts/vllm_kg_query_validate.py +0 -83
- rag_wright-0.1.0/src/rag_wright/api/__init__.py +0 -33
- rag_wright-0.1.0/src/rag_wright/api/config.py +0 -59
- rag_wright-0.1.0/src/rag_wright/api/documents.py +0 -39
- rag_wright-0.1.0/src/rag_wright/api/ids.py +0 -31
- rag_wright-0.1.0/src/rag_wright/api/invoke.py +0 -99
- rag_wright-0.1.0/src/rag_wright/api/kg.py +0 -61
- rag_wright-0.1.0/src/rag_wright/api/mcp.py +0 -94
- rag_wright-0.1.0/src/rag_wright/api/workspace.py +0 -85
- rag_wright-0.1.0/src/rag_wright/capabilities/assertion_extraction.py +0 -79
- rag_wright-0.1.0/src/rag_wright/capabilities/claim_extraction.py +0 -153
- rag_wright-0.1.0/src/rag_wright/capabilities/clause_exception_linking.py +0 -117
- rag_wright-0.1.0/src/rag_wright/capabilities/compliance_judgment.py +0 -322
- rag_wright-0.1.0/src/rag_wright/capabilities/compliance_store.py +0 -87
- rag_wright-0.1.0/src/rag_wright/capabilities/contract_kg_serve.py +0 -156
- rag_wright-0.1.0/src/rag_wright/capabilities/contract_kg_store.py +0 -251
- rag_wright-0.1.0/src/rag_wright/capabilities/dg_extraction.py +0 -585
- rag_wright-0.1.0/src/rag_wright/capabilities/document_parse.py +0 -87
- rag_wright-0.1.0/src/rag_wright/capabilities/graph_extraction.py +0 -243
- rag_wright-0.1.0/src/rag_wright/capabilities/highlight_serve.py +0 -142
- rag_wright-0.1.0/src/rag_wright/capabilities/invoke.py +0 -31
- rag_wright-0.1.0/src/rag_wright/capabilities/jev_decision.py +0 -38
- rag_wright-0.1.0/src/rag_wright/capabilities/manifests.py +0 -872
- rag_wright-0.1.0/src/rag_wright/capabilities/parsing.py +0 -286
- rag_wright-0.1.0/src/rag_wright/capabilities/property_boosted_retrieval.py +0 -125
- rag_wright-0.1.0/src/rag_wright/capabilities/query_function_classifier.py +0 -94
- rag_wright-0.1.0/src/rag_wright/capabilities/query_understanding.py +0 -109
- rag_wright-0.1.0/src/rag_wright/capabilities/registry.py +0 -262
- rag_wright-0.1.0/src/rag_wright/capabilities/remote_encoders.py +0 -94
- rag_wright-0.1.0/src/rag_wright/capabilities/requirement_extraction.py +0 -247
- rag_wright-0.1.0/src/rag_wright/capabilities/rlm_chunking.py +0 -808
- rag_wright-0.1.0/src/rag_wright/capabilities/span_relevance_judgment.py +0 -191
- rag_wright-0.1.0/src/rag_wright/capabilities/vlm_ocr.py +0 -85
- rag_wright-0.1.0/src/rag_wright/contracts/extraction.py +0 -130
- rag_wright-0.1.0/src/rag_wright/contracts/function.py +0 -167
- rag_wright-0.1.0/src/rag_wright/contracts/identifiers.py +0 -153
- rag_wright-0.1.0/src/rag_wright/contracts/ontology.py +0 -142
- rag_wright-0.1.0/src/rag_wright/contracts/property.py +0 -201
- rag_wright-0.1.0/src/rag_wright/contracts/query_intent.py +0 -53
- rag_wright-0.1.0/src/rag_wright/contracts/span.py +0 -76
- rag_wright-0.1.0/src/rag_wright/contracts/value_match.py +0 -84
- rag_wright-0.1.0/src/rag_wright/corpus/cuad.py +0 -153
- rag_wright-0.1.0/src/rag_wright/corpus/cuad_ingestion.py +0 -72
- rag_wright-0.1.0/src/rag_wright/corpus/document_parser.py +0 -299
- rag_wright-0.1.0/src/rag_wright/corpus/gcs_ingestion.py +0 -120
- rag_wright-0.1.0/src/rag_wright/mcp/__init__.py +0 -11
- rag_wright-0.1.0/src/rag_wright/mcp/compliance_server.py +0 -299
- rag_wright-0.1.0/src/rag_wright/mcp/intra_document_qa_server.py +0 -170
- rag_wright-0.1.0/src/rag_wright/mcp/relational_qa_server.py +0 -171
- rag_wright-0.1.0/src/rag_wright/mcp/typed_property_retrieval_server.py +0 -191
- rag_wright-0.1.0/src/rag_wright/models/profiles.py +0 -331
- rag_wright-0.1.0/src/rag_wright/models/tag_structured.py +0 -285
- rag_wright-0.1.0/src/rag_wright/models/usage.py +0 -102
- rag_wright-0.1.0/src/rag_wright/ontology/clause_template.py +0 -964
- rag_wright-0.1.0/src/rag_wright/ontology/codegen.py +0 -84
- rag_wright-0.1.0/src/rag_wright/ontology/compliance_bridge.ttl +0 -186
- rag_wright-0.1.0/src/rag_wright/ontology/contract_bridge.ttl +0 -2685
- rag_wright-0.1.0/src/rag_wright/ontology/contract_taxonomy.py +0 -24
- rag_wright-0.1.0/src/rag_wright/ontology/derive.py +0 -58
- rag_wright-0.1.0/src/rag_wright/ontology/loader.py +0 -435
- rag_wright-0.1.0/src/rag_wright/ontology/template_introspect.py +0 -100
- rag_wright-0.1.0/src/rag_wright/reference/__init__.py +0 -2
- rag_wright-0.1.0/src/rag_wright/reference/contract_seam.py +0 -123
- rag_wright-0.1.0/src/rag_wright/skills/claim_extraction/template.py +0 -50
- rag_wright-0.1.0/src/rag_wright/skills/corpus_ingest/SKILL.md +0 -106
- rag_wright-0.1.0/src/rag_wright/skills/requirement_extraction/template.py +0 -50
- rag_wright-0.1.0/src/rag_wright/spans/boundary.py +0 -78
- rag_wright-0.1.0/src/rag_wright/spans/clause_function_classifier.py +0 -490
- rag_wright-0.1.0/src/rag_wright/spans/clause_kg_extractor.py +0 -337
- rag_wright-0.1.0/src/rag_wright/spans/cuad_labels.py +0 -81
- rag_wright-0.1.0/src/rag_wright/spans/dim_classifier.py +0 -158
- rag_wright-0.1.0/src/rag_wright/spans/function_families.py +0 -62
- rag_wright-0.1.0/src/rag_wright/spans/hybrid_classifier.py +0 -103
- rag_wright-0.1.0/src/rag_wright/spans/legalbert_classifier.py +0 -83
- rag_wright-0.1.0/src/rag_wright/spans/model_capabilities.py +0 -107
- rag_wright-0.1.0/src/rag_wright/spans/new_function_labels.py +0 -111
- rag_wright-0.1.0/src/rag_wright/spans/property_extractor.py +0 -365
- rag_wright-0.1.0/src/rag_wright/spans/property_grounding.py +0 -182
- rag_wright-0.1.0/src/rag_wright/spans/reclassify.py +0 -77
- rag_wright-0.1.0/src/rag_wright/spans/scarce_function_labels.py +0 -105
- rag_wright-0.1.0/src/rag_wright/spans/segment.py +0 -341
- rag_wright-0.1.0/src/rag_wright/spans/semantic_judge.py +0 -197
- rag_wright-0.1.0/src/rag_wright/spans/symbolic_validation.py +0 -131
- rag_wright-0.1.0/src/rag_wright/spans/tag_clause_extractor.py +0 -182
- rag_wright-0.1.0/src/rag_wright/store/arcadedb.py +0 -1135
- rag_wright-0.1.0/src/rag_wright/store/seam.py +0 -213
- rag_wright-0.1.0/src/rag_wright/subgraphs/async_ingestion.py +0 -204
- rag_wright-0.1.0/src/rag_wright/subgraphs/compliance_check.py +0 -1042
- rag_wright-0.1.0/src/rag_wright/subgraphs/compliance_ingestion.py +0 -306
- rag_wright-0.1.0/src/rag_wright/subgraphs/contract_ingestion_pipeline.py +0 -999
- rag_wright-0.1.0/src/rag_wright/subgraphs/graph_extraction.py +0 -102
- rag_wright-0.1.0/src/rag_wright/subgraphs/intra_document_qa.py +0 -328
- rag_wright-0.1.0/src/rag_wright/subgraphs/query_constraint_extraction.py +0 -73
- rag_wright-0.1.0/src/rag_wright/subgraphs/relational_qa.py +0 -165
- rag_wright-0.1.0/src/rag_wright/subgraphs/requirement_extraction.py +0 -137
- rag_wright-0.1.0/src/rag_wright/subgraphs/scaffold.py +0 -65
- rag_wright-0.1.0/src/rag_wright/subgraphs/semantic_chunking.py +0 -183
- rag_wright-0.1.0/src/rag_wright/subgraphs/typed_clause_extraction.py +0 -172
- rag_wright-0.1.0/src/rag_wright/subgraphs/typed_property_retrieval.py +0 -278
- rag_wright-0.1.0/tasks.md +0 -5053
- rag_wright-0.1.0/tests/api/test_capability_reexports.py +0 -30
- rag_wright-0.1.0/tests/api/test_documents.py +0 -66
- rag_wright-0.1.0/tests/api/test_invoke.py +0 -311
- rag_wright-0.1.0/tests/api/test_kg.py +0 -90
- rag_wright-0.1.0/tests/api/test_mcp.py +0 -108
- rag_wright-0.1.0/tests/api/test_options.py +0 -84
- rag_wright-0.1.0/tests/api/test_workspace.py +0 -84
- rag_wright-0.1.0/tests/arch/test_import_contracts.py +0 -32
- rag_wright-0.1.0/tests/capabilities/test_assertion_extraction.py +0 -62
- rag_wright-0.1.0/tests/capabilities/test_authoring_contract.py +0 -58
- rag_wright-0.1.0/tests/capabilities/test_claim_extraction.py +0 -151
- rag_wright-0.1.0/tests/capabilities/test_clause_exception_linking.py +0 -103
- rag_wright-0.1.0/tests/capabilities/test_compliance_judgment.py +0 -356
- rag_wright-0.1.0/tests/capabilities/test_compliance_store.py +0 -123
- rag_wright-0.1.0/tests/capabilities/test_contract_kg_serve.py +0 -193
- rag_wright-0.1.0/tests/capabilities/test_contract_kg_store.py +0 -138
- rag_wright-0.1.0/tests/capabilities/test_contract_kg_store_reads.py +0 -132
- rag_wright-0.1.0/tests/capabilities/test_contract_taxonomy_and_spans.py +0 -102
- rag_wright-0.1.0/tests/capabilities/test_dg_adapter.py +0 -62
- rag_wright-0.1.0/tests/capabilities/test_dg_async.py +0 -94
- rag_wright-0.1.0/tests/capabilities/test_dg_extraction.py +0 -182
- rag_wright-0.1.0/tests/capabilities/test_dg_model_seam.py +0 -43
- rag_wright-0.1.0/tests/capabilities/test_dg_private.py +0 -55
- rag_wright-0.1.0/tests/capabilities/test_entity_resolution.py +0 -189
- rag_wright-0.1.0/tests/capabilities/test_graph_extraction.py +0 -186
- rag_wright-0.1.0/tests/capabilities/test_highlight_serve.py +0 -118
- rag_wright-0.1.0/tests/capabilities/test_jev_decision.py +0 -119
- rag_wright-0.1.0/tests/capabilities/test_manifests.py +0 -288
- rag_wright-0.1.0/tests/capabilities/test_parsing.py +0 -148
- rag_wright-0.1.0/tests/capabilities/test_parties_extraction.py +0 -71
- rag_wright-0.1.0/tests/capabilities/test_property_boosted_retrieval.py +0 -128
- rag_wright-0.1.0/tests/capabilities/test_query_function_classifier.py +0 -43
- rag_wright-0.1.0/tests/capabilities/test_query_understanding.py +0 -117
- rag_wright-0.1.0/tests/capabilities/test_registry.py +0 -283
- rag_wright-0.1.0/tests/capabilities/test_remote_encoders.py +0 -68
- rag_wright-0.1.0/tests/capabilities/test_requirement_extraction.py +0 -262
- rag_wright-0.1.0/tests/capabilities/test_retrieval_core.py +0 -113
- rag_wright-0.1.0/tests/capabilities/test_vlm_ocr.py +0 -54
- rag_wright-0.1.0/tests/conftest.py +0 -8
- rag_wright-0.1.0/tests/contracts/test_compliance.py +0 -164
- rag_wright-0.1.0/tests/contracts/test_cuad_highlight_contracts.py +0 -109
- rag_wright-0.1.0/tests/contracts/test_extraction.py +0 -171
- rag_wright-0.1.0/tests/contracts/test_function.py +0 -119
- rag_wright-0.1.0/tests/contracts/test_function_routing.py +0 -69
- rag_wright-0.1.0/tests/contracts/test_identifiers.py +0 -161
- rag_wright-0.1.0/tests/contracts/test_jurisdiction.py +0 -76
- rag_wright-0.1.0/tests/contracts/test_ontology.py +0 -167
- rag_wright-0.1.0/tests/contracts/test_property.py +0 -107
- rag_wright-0.1.0/tests/contracts/test_value_match.py +0 -43
- rag_wright-0.1.0/tests/corpus/test_cuad.py +0 -45
- rag_wright-0.1.0/tests/corpus/test_cuad_ingestion.py +0 -38
- rag_wright-0.1.0/tests/corpus/test_document_parser.py +0 -312
- rag_wright-0.1.0/tests/corpus/test_edgar.py +0 -136
- rag_wright-0.1.0/tests/corpus/test_gcs_ingestion.py +0 -138
- rag_wright-0.1.0/tests/corpus/test_parse_wire2.py +0 -50
- rag_wright-0.1.0/tests/corpus/test_selection.py +0 -133
- rag_wright-0.1.0/tests/journey/test_pack_schema.py +0 -79
- rag_wright-0.1.0/tests/mcp/test_compliance_server.py +0 -200
- rag_wright-0.1.0/tests/mcp/test_intra_document_qa_server.py +0 -64
- rag_wright-0.1.0/tests/mcp/test_no_model_supplied_tenant.py +0 -116
- rag_wright-0.1.0/tests/mcp/test_relational_qa_server.py +0 -63
- rag_wright-0.1.0/tests/mcp/test_typed_property_retrieval_server.py +0 -74
- rag_wright-0.1.0/tests/models/test_profile_routing.py +0 -77
- rag_wright-0.1.0/tests/models/test_profile_seam.py +0 -264
- rag_wright-0.1.0/tests/models/test_serving_wiring.py +0 -82
- rag_wright-0.1.0/tests/models/test_tag_structured.py +0 -320
- rag_wright-0.1.0/tests/ontology/test_clause_template.py +0 -171
- rag_wright-0.1.0/tests/ontology/test_compliance_ontology_authoritative.py +0 -92
- rag_wright-0.1.0/tests/ontology/test_derivation.py +0 -120
- rag_wright-0.1.0/tests/ontology/test_entity_taxonomy.py +0 -33
- rag_wright-0.1.0/tests/ontology/test_generated_template_meta_in_sync.py +0 -21
- rag_wright-0.1.0/tests/ontology/test_generated_vocab_in_sync.py +0 -23
- rag_wright-0.1.0/tests/ontology/test_template_captured_in_ttl.py +0 -22
- rag_wright-0.1.0/tests/ontology/test_ttl_is_source_of_truth.py +0 -33
- rag_wright-0.1.0/tests/reference/test_compliance_reference.py +0 -146
- rag_wright-0.1.0/tests/reference/test_contract_seam.py +0 -116
- rag_wright-0.1.0/tests/spans/test_boundary.py +0 -35
- rag_wright-0.1.0/tests/spans/test_classifier_property_extractor.py +0 -96
- rag_wright-0.1.0/tests/spans/test_clause_classifier_tags_0005.py +0 -54
- rag_wright-0.1.0/tests/spans/test_clause_function_classifier.py +0 -185
- rag_wright-0.1.0/tests/spans/test_clause_function_classifier_async.py +0 -78
- rag_wright-0.1.0/tests/spans/test_clause_kg_extractor.py +0 -234
- rag_wright-0.1.0/tests/spans/test_clause_kg_extractor_async.py +0 -70
- rag_wright-0.1.0/tests/spans/test_dim_classifier.py +0 -43
- rag_wright-0.1.0/tests/spans/test_dim_fleet_live.py +0 -147
- rag_wright-0.1.0/tests/spans/test_function_classifier.py +0 -111
- rag_wright-0.1.0/tests/spans/test_hybrid_classifier.py +0 -86
- rag_wright-0.1.0/tests/spans/test_hybrid_property_extractor.py +0 -150
- rag_wright-0.1.0/tests/spans/test_legalbert_classifier.py +0 -56
- rag_wright-0.1.0/tests/spans/test_model_capabilities.py +0 -51
- rag_wright-0.1.0/tests/spans/test_new_function_labels.py +0 -51
- rag_wright-0.1.0/tests/spans/test_property_extractor.py +0 -108
- rag_wright-0.1.0/tests/spans/test_property_grounding.py +0 -108
- rag_wright-0.1.0/tests/spans/test_reclassify.py +0 -59
- rag_wright-0.1.0/tests/spans/test_scarce_function_labels.py +0 -64
- rag_wright-0.1.0/tests/spans/test_segment.py +0 -281
- rag_wright-0.1.0/tests/spans/test_semantic_judge.py +0 -143
- rag_wright-0.1.0/tests/spans/test_setfit_clause_adapter.py +0 -70
- rag_wright-0.1.0/tests/spans/test_span_offsets.py +0 -54
- rag_wright-0.1.0/tests/spans/test_stage_labels_0005.py +0 -41
- rag_wright-0.1.0/tests/spans/test_symbolic_validation.py +0 -197
- rag_wright-0.1.0/tests/spans/test_tag_clause_extractor.py +0 -140
- rag_wright-0.1.0/tests/store/test_arcadedb_clause_kg.py +0 -175
- rag_wright-0.1.0/tests/store/test_arcadedb_contract.py +0 -72
- rag_wright-0.1.0/tests/store/test_arcadedb_property.py +0 -107
- rag_wright-0.1.0/tests/store/test_arcadedb_requirement_sources.py +0 -97
- rag_wright-0.1.0/tests/store/test_arcadedb_schema.py +0 -224
- rag_wright-0.1.0/tests/store/test_arcadedb_span.py +0 -107
- rag_wright-0.1.0/tests/store/test_document_scope.py +0 -150
- rag_wright-0.1.0/tests/store/test_engine_domain_neutral.py +0 -48
- rag_wright-0.1.0/tests/store/test_kg_edges.py +0 -124
- rag_wright-0.1.0/tests/store/test_kg_read.py +0 -107
- rag_wright-0.1.0/tests/subgraphs/test_async_ingestion.py +0 -256
- rag_wright-0.1.0/tests/subgraphs/test_chunk7_structure_carry.py +0 -73
- rag_wright-0.1.0/tests/subgraphs/test_compliance_check.py +0 -1509
- rag_wright-0.1.0/tests/subgraphs/test_compliance_ingestion.py +0 -333
- rag_wright-0.1.0/tests/subgraphs/test_contract_ingestion_pipeline.py +0 -300
- rag_wright-0.1.0/tests/subgraphs/test_contract_ingestion_pipeline_async.py +0 -142
- rag_wright-0.1.0/tests/subgraphs/test_contract_ingestion_pipeline_graph_async.py +0 -223
- rag_wright-0.1.0/tests/subgraphs/test_ingest_knobs.py +0 -32
- rag_wright-0.1.0/tests/subgraphs/test_ingest_segment_classify.py +0 -121
- rag_wright-0.1.0/tests/subgraphs/test_intra_document_qa.py +0 -395
- rag_wright-0.1.0/tests/subgraphs/test_partial_entry_contract.py +0 -81
- rag_wright-0.1.0/tests/subgraphs/test_query_constraint_extraction.py +0 -47
- rag_wright-0.1.0/tests/subgraphs/test_relational_qa.py +0 -128
- rag_wright-0.1.0/tests/subgraphs/test_requirement_extraction.py +0 -127
- rag_wright-0.1.0/tests/subgraphs/test_typed_clause_extraction.py +0 -117
- rag_wright-0.1.0/tests/subgraphs/test_typed_property_retrieval.py +0 -244
- rag_wright-0.1.0/tests/test_populate_clause_kg.py +0 -70
- rag_wright-0.1.0/uv.lock +0 -4848
- {rag_wright-0.1.0 → rag_wright-0.2.1}/.claude/settings.json +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/.env.example +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/.gitignore +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/LICENSE +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/SPEC.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/conftest.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0001-stack-and-library-choices.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0002-validation-corpus-cuad-edgar.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0003-ard-registration-and-capability-kinds.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0004-entity-disambiguation.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0005-relational-golden-set.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0006-model-profile.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0007-arcadedb-store-schema.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0008-unified-framework-index-docs-grounding.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0009-rlm-chunking-retained-as-configurable-capability.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0010-transformers-pinned-below-5-for-flagembedding-reranker.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0011-cuad-not-a-retrieval-benchmark-acord-for-queries.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0012-entity-mention-confidence-no-proximity-edges.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0013-entity-resolution-matching-strategy.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0014-split-generation-and-vision-to-text.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0015-rlm-dynamic-subagents-and-granted-subagents.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0016-rlm-defined-by-required-capabilities-enforced-as-tests.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0017-dynamic-dispatch-trigger-as-typed-flag.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0018-rlm-method-is-the-orchestrator-system-prompt.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0019-recursion-is-optional-for-chunking-required-for-synthesis.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0020-serialize-interpreter-sessions-per-process-ki1.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0021-capability-interface-governed-typed-io.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0022-fr-k-embedding-free-okf-navigation-experimental.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0023-cheap-model-for-okf-enrichment.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0024-reader-parallelism-lives-in-python-not-the-interpreter.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0025-retrieval-pivot-function-classify-property-graph-rerank.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0026-property-schema-and-extended-function-taxonomy.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0027-openrouter-provider-routing-by-throughput.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0028-deterministic-grounding-judge-and-flash-pro-cascade.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0029-retrieval-pipeline-domain-portability-and-adaptation.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0030-model-training-standard-modal-reusable-checkpointed.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0031-single-call-chunking-for-structured-contracts.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0032-nl-to-type-two-step-reason-emit-on-gemma.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0033-unified-contract-kg-three-legs-one-graph.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0034-granite-json-schema-structured-output-profile.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0035-graph-extraction-rebacked-with-gp1b-retire-hybrid.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0036-party-clause-link-party-to-edge.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0037-clause-template-is-authoritative-code-not-generated.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0038-full-cuad-kg-on-gcp-gpu-vm-and-gcs-backup.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0039-self-hosted-open-model-stack-on-modal-a100.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0041-capability-kind-rubric-and-agent-skill-runtime-tiers.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0042-clause-level-span-id-provenance-and-content-hash-backfill.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0043-retire-cross-corpus-retrieval-standardize-on-leg-b.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0044-is-exception-to-derived-carveout-relationship.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0045-client-side-tag-parse-structured-output.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0046-acord-unified-into-one-production-kg.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0047-retire-precomputed-clause-function-gate.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0048-ingest-llm-classifier-nondestructive-reclassify.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0049-generic-customer-lens-for-ingestion.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0050-async-langgraph-ingestion.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0051-schema-bootstrap-and-feedback-driven-ontology-evolution.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0052-engine-product-split-graphwright-parked.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0053-answer-prose-output-hygiene.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0054-remove-auto-tag-from-generator-evidence.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0055-confidence-out-of-band.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0056-bound-structured-retry-wall-clock.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0057-async-engine-architecture.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0058-structure-first-chunking.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0059-recall-decoupled-from-classification-and-visible-partial-loss.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0060-scope-compliance-check-to-named-policy-sources.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0061-subject-document-compliance-per-section.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0062-tiered-ocr-scan-quality-vlm-escalation.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0063-per-sentence-compliance-subject-facts.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0064-typed-properties-out-of-band-on-evidence.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0065-deontic-applicability-gates-query-side.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0066-ontology-ttl-single-source-of-truth.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0067-domain-pack-retargeting.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0068-recall-first-actor-gate-ontology-role-disjointness.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0069-reading-order-chunking-tables-figures-retrievable.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0070-text-layer-first-parsing-no-false-vlm-escalation.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0071-defragmentation-reconstruct-paragraphs-from-line-items.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0072-extract-guard-furniture-and-deterministic-failure.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0073-born-digital-threshold-sparse-pages-no-vlm-escalation.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0074-retry-transient-extraction-failures.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0075-per-page-vlm-escalation.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0076-thread-safe-shared-embedder-reranker.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0077-concurrent-function-classification-across-chunks.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0078-dedicated-extraction-executor.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0079-product-default-granite-4.2-openrouter-routing.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0080-nested-tag-parse-and-degrade.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0081-function-independent-tagparse-clause-extraction.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0082-symbolic-gate-function-independent.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0083-executor-hop-trace-context-capture.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0084-gleaning-off-on-the-query-leg.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0085-query-constraint-extraction-tagparse.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0086-streaming-cost-capture.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0087-retrieval-relevance-score-on-rankedspan.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0088-per-span-relevance-verdict.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0089-structured-output-generation-tracing.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0090-affiliate-of-extraction.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0091-retire-partyto-edge.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0092-idempotent-write-graph.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0093-entities-by-name-seam.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0094-workspace-document-scope.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0095-span-page-provenance.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0096-carveout-keyword-normalization.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0097-caller-configurable-ingest-extraction-models.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0098-invoke-time-document-scope.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0099-mcp-tools-never-take-a-model-supplied-tenant.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0100-profile-based-model-routing.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0101-untagged-spans-reach-extraction-aspect-gate-removed.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0102-open-descriptive-list-dims-retain-verbatim.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0103-a-clause-is-a-provision-not-a-span.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0104-dense-floor-protection-in-leg-b.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0105-in-band-model-usage-accounting.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0106-document-signals-off-the-citation.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0107-requirement-page-provenance.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0108-qwen3-27b-single-a100-serving-profile.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0109-vllm-cold-start-reduction.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0110-fp8-kv-cache-16k-single-a100.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0111-pin-qwen3-27b-deepinfra-bf16.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0112-relax-deepagents-pin-to-floor.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0113-llm-span-instrumentation-for-latency-attribution.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0114-setfit-default-clause-function-classifier.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0115-classifier-only-step3a-property-extraction.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0116-soft-function-scoping-classifier-lane.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0117-engine-api-layer-and-capability-runtime.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0118-engine-core-api-vs-ard-adapter-free-impl-ref-client.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0119-jev-typed-decision-model-for-compliance-closed-set-fields.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0120-rlm-sub-agent-identity-dynamic-dispatch-trigger.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/adr/0121-spacy-optional-extra-model-runtime-download.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/architecture/foundations-and-adding-a-domain.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/README.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/design/deontic-applicability-routing.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/design/ingestion-neuro-symbolic-gaps.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/design/semantic-subject-segmentation.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/design/unify-subject-preprocessing.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/engine-issues/0037-closed-vocab-drops-verbatim-values-to-other.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/engine-issues/0038-a-clause-node-is-now-created-per-sentence-so-98-percent-of-spans-become-clauses.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/engine-issues/0039-the-provision-detector-reads-text-but-docling-puts-the-section-number-in-marker.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/engine-issues/0040-covered-subject-is-asked-of-every-provision-so-verbatim-retention-fills-it-with-noise.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/engine-issues/0041-VERIFICATION-dense-floor.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/engine-issues/0041-leg-b-discards-the-best-dense-matches-on-some-queries.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/engine-issues/0042-usage-is-captured-per-call-but-never-returned-so-cost-needs-a-langfuse-round-trip.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/engine-issues/0043-a-requirement-carries-no-page-provenance-so-a-finding-cannot-point-into-its-policy.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/engine-issues/0044-document-signals-scaffolding-is-shown-to-the-user-as-a-quote-from-their-document.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/engine-issues/0045-a-fixed-money-cap-records-no-cap-quantum-so-the-amount-is-only-prose.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/engine-issues/0046-appending-a-natural-follow-up-to-a-question-drops-the-clause-type.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/engine-issues/0047-an-exact-deepagents-pin-transitively-pins-every-consumer.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/engine-issues/0048-the-pinned-endpoints-latency-tail-makes-agent-runs-undebuggable-from-either-side.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/handoffs/2026-07-20_graphwright_capability_interface_reply.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/handoffs/2026-07-20b_graphwright_interface_confirmation.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/handoffs/2026-07-20c_graphwright_ingestion_interfaces.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/handoffs/2026-08-30_subject_compliance_final_rulewright.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/handoffs/2026-09-01_issue-0013-recall-first-actor-gate_rulewright.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/handoffs/2026-09-01_ontology-source-of-truth_rulewright.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/handoffs/2026-09-03_issue-0014-table-retrievability_rulewright.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/handoffs/2026-09-04_bulk-ingestion-wall_rulewright.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/handoffs/2026-09-04_issue-0016-thread-safe-embedder_rulewright.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/handoffs/2026-09-05_observability-langfuse_rulewright.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/handoffs/2026-09-05_tagparse-ingestion-and-granite-4.2_rulewright.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/handoffs/2026-09-09_affiliate-of-extraction_rulewright.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/handoffs/2026-09-09_issue-0028-partyto-retired_rulewright.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/handoffs/2026-09-09_issue-0029-idempotent-write-graph_rulewright.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/handoffs/2026-09-09_issue-0030-entities-by-name_rulewright.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/handoffs/2026-09-09_observability-and-retrieval-floor_rulewright.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/handoffs/2026-09-09_relevance-verdict_rulewright.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/handoffs/2026-09-09_rename-run-ad-compliance-check_rulewright.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/handoffs/2026-09-09_structured-output-cost-tracing_rulewright.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/handoffs/2026-09-10_ingest-models-caller-configurable_rulewright.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/handoffs/2026-09-10_issue-0031-followup-failclosed-and-nodrift_rulewright.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/handoffs/2026-09-10_issue-0031-followup-validate-ingested-set_rulewright.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/handoffs/2026-09-10_issue-0031-workspace-document-scope_rulewright.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/handoffs/2026-09-10_issue-0032-span-page-provenance_rulewright.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/handoffs/2026-09-10_issue-0033-carveout-normalization_rulewright.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/handoffs/2026-09-10_issue-0034-invoke-time-document-scope_rulewright.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/handoffs/2026-09-11_issue-0035-followup-derived-guard_rulewright.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/handoffs/2026-09-11_issue-0035-mcp-no-model-tenant_rulewright.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/handoffs/2026-09-11_profile-based-model-routing_rulewright.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/handoffs/2026-09-11_qwen-default-modal-or_rulewright.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/handoffs/2026-09-11_qwen-everywhere-config_rulewright.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/handoffs/2026-09-12_clause-granularity_0036-0039_rulewright.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/handoffs/2026-09-12_closed-vocab_0037-0040_rulewright.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/handoffs/2026-09-12_dense-floor-protection_0041_rulewright.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/handoffs/2026-09-13_in-band-usage_0042_rulewright.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/handoffs/2026-09-14_document-signals-off-citation_0044_rulewright.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/handoffs/2026-09-14_requirement-page-provenance_0043_rulewright.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/handoffs/2026-09-16_qwen3-27b-single-a100-serving-profile_rulewright.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/handoffs/2026-09-18_fp8-accuracy-eval-configB_rulewright.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/handoffs/2026-09-18_fp8-kv-16k-single-a100_rulewright.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/handoffs/2026-09-20_deepagents-pin-relaxed_0047_rulewright.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/handoffs/2026-09-20_llm-span-instrumentation_0048_rulewright.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/handoffs/2026-09-21_0048-part2-modal-answers_from_rulewright.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/handoffs/2026-09-21_0048-part2-modal-scoping-questions_rulewright.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/misc/.gitkeep +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/plans/Corpus_Acquisition.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/plans/async-migration.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/plans/demo_plan.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/plans/gp1b_docling_graph_plan.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/plans/unified_contract_kg_ontology_bridge.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/plans/unified_contract_kg_plan.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/results/2026-07-24-t58-property-graph-population.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/results/2026-07-25-t58b-full-pipeline-rerank.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/archive/results/2026-07-25-t58b-topk-ordering-levers.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/eval/classifier_model_ab.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/eval/compliance_demo.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/eval/compliance_gate_cc7.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/eval/compliance_rung2_cc7.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/eval/cuad_highlighting_cu-d1.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/eval/dg_model_ab.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/eval/function_gate_recall.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/eval/generation_robustness_b_vs_c.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/eval/nl_to_type_cu-d2.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/eval/ocr_benchmark.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/eval/prod1_readiness.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/eval/prod2_readiness.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/eval/query_side_model_ab.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/eval/silver_granite_vs_gemma4.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/eval/silver_provider_routing.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/eval/silver_selfhosted_gemma4_26b.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/product/capability_profiles.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/product/contracts_product_roadmap.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/product/new-domain-build-sequence.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/proposals/compliance-ingest-classifier-decomposition.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/proposals/de-domaining-and-capability-runtime.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/proposals/new-domain-developer-journey.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/specs/engine-platform/SPEC.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/specs/engine-platform/TASKS.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/specs/engine-prep/plan.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/vendor/arcadedb/arcadedb-buckets-schema.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/vendor/arcadedb/arcadedb-docs-extraction.json +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/vendor/arcadedb/arcadedb-vector-embeddings.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/docs/vendor/arcadedb/arcadedb-vector-search-tutorial.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/eval/__init__.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/eval/ablation.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/eval/acord.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/eval/acord_retrieval.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/eval/build_golden.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/eval/category_retrieval.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/eval/compliance_demo/policy/community_conduct_policy.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/eval/compliance_demo/subjects/post_borderline.txt +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/eval/compliance_demo/subjects/post_compliant.txt +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/eval/compliance_demo/subjects/post_violation.txt +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/eval/contractnli_judge.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/eval/function_ceiling.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/eval/gate1_chunker_ab.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/eval/gate2_hybrid_rerank.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/eval/golden/relational/set.json +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/eval/multihop.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/eval/okf_gold.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/eval/reachability.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/eval/test_acord.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/eval/test_acord_retrieval.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/eval/test_category_retrieval.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/eval/test_multihop_set.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/eval/test_okf_gold.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/eval/test_reachability.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/plan.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/acquire_acord.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/acquire_ecfr.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/acquire_ftc_255.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/acquire_prod1_corpus.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/audit_reclass_flips.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/author_leg_a_silver_key.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/backfill_edge_source_doc_id.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/backup_kg_to_gcs.sh +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/cic1_assemble_v3.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/cic1_generate_hard_negatives.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/cic1_generate_hard_positives.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/cic1_hybrid.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/cic1_hybrid2.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/cic1_jev_claimtypes.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/cic1_jev_operative.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/cic1_laya_prep.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/cic1_laya_train.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/cic1_prep_operative.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/cic1_train_operative.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/diagnose_acord_knn_expansion.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/diagnose_acord_knn_rerank.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/diagnose_acord_leg_pool.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/diagnose_acord_legs.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/diagnose_acord_pool.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/diagnose_acord_relstructure.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/diagnose_acord_retrieval.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/distill/eval_listwise_b.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/distill/extract_features.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/distill/listwise_variants.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/distill/relational_features.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/distill/train_ce.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/distill/train_modal.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/eval_chunking_ab.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/extract_arcadedb_docs.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/git_post_commit_graphify.sh +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/granite_chunker_assess.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/graph_status.sh +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/ingest_acord.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/install_git_hooks.sh +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/make_compliance_fixtures.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/make_compliance_gold.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/measure_silver.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/merge_docs_into_framework.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/migrate_entity_cik_to_canonical_id.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/migrate_silver_evidence_remove_autotag.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/modal_arcadedb.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/modal_backfill.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/modal_exception_linking.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/modal_gemma4_vllm.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/modal_gemma4_vllm_snapshot.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/modal_granite_server.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/modal_granite_throughput.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/modal_granite_vllm_server.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/modal_qwen3_27b_bench.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/modal_qwen3_27b_snapshot.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/modal_qwen3_vllm_server.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/modal_stack_a100.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/ocr_benchmark.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/ocr_preprocess.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/ontology_dimension_check.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/publish_manifests.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/revert_reclass_flips.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/run_acord_retrieval.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/train_legalbert_modal.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/verify_wheel_install.sh +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/scripts/vllm_raw_diagnostic.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/__init__.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/api/discover.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/api/usage.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/capabilities/__init__.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/capabilities/answer_generator.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/capabilities/ard.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/capabilities/chunk_read.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/capabilities/chunk_write.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/capabilities/disambiguation.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/capabilities/document_scope.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/capabilities/embedding.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/capabilities/embedding_profiles.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/capabilities/entity_resolution.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/capabilities/fusion.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/capabilities/graph_query.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/capabilities/graph_storage.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/capabilities/hybrid_search.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/capabilities/okf_navigate.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/capabilities/reranking.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/capabilities/retrieval_core.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/capabilities/rlm_synthesis.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/capabilities/scan_quality.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/capabilities/vision_to_text.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/contracts/__init__.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/contracts/chunk.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/contracts/provenance.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/corpus/__init__.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/corpus/canonicalize.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/corpus/http.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/models/__init__.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/models/seam.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/models/tracing.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/okf/__init__.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/okf/compile.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/okf/document.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/okf/enrich.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/okf/links.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/okf/lint.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/ontology/__init__.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/ontology/registry.py +0 -0
- {rag_wright-0.1.0/src/rag_wright/subgraphs → rag_wright-0.2.1/src/rag_wright/packs/compliance/capabilities}/__init__.py +0 -0
- /rag_wright-0.1.0/src/rag_wright/reference/compliance.py → /rag_wright-0.2.1/src/rag_wright/packs/compliance/invokers.py +0 -0
- {rag_wright-0.1.0/tests → rag_wright-0.2.1/src/rag_wright/packs/compliance/mcp}/__init__.py +0 -0
- {rag_wright-0.1.0/tests/api → rag_wright-0.2.1/src/rag_wright/packs/compliance/ontology}/__init__.py +0 -0
- {rag_wright-0.1.0/src/rag_wright → rag_wright-0.2.1/src/rag_wright/packs/compliance}/ontology/packs/ftc_16cfr255.ttl +0 -0
- {rag_wright-0.1.0/tests/capabilities → rag_wright-0.2.1/src/rag_wright/packs/compliance/schemas}/__init__.py +0 -0
- {rag_wright-0.1.0/src/rag_wright/contracts → rag_wright-0.2.1/src/rag_wright/packs/compliance/schemas}/compliance.py +0 -0
- {rag_wright-0.1.0/tests/contracts → rag_wright-0.2.1/src/rag_wright/packs/compliance/skills}/__init__.py +0 -0
- {rag_wright-0.1.0/src/rag_wright → rag_wright-0.2.1/src/rag_wright/packs/compliance}/skills/claim_extraction/SKILL.md +0 -0
- {rag_wright-0.1.0/src/rag_wright → rag_wright-0.2.1/src/rag_wright/packs/compliance}/skills/claim_extraction/__init__.py +0 -0
- {rag_wright-0.1.0/src/rag_wright → rag_wright-0.2.1/src/rag_wright/packs/compliance}/skills/compliance_judgment/SKILL.md +0 -0
- {rag_wright-0.1.0/src/rag_wright → rag_wright-0.2.1/src/rag_wright/packs/compliance}/skills/generic_compliance_judgment/SKILL.md +0 -0
- {rag_wright-0.1.0/src/rag_wright → rag_wright-0.2.1/src/rag_wright/packs/compliance}/skills/requirement_extraction/SKILL.md +0 -0
- {rag_wright-0.1.0/src/rag_wright → rag_wright-0.2.1/src/rag_wright/packs/compliance}/skills/requirement_extraction/__init__.py +0 -0
- {rag_wright-0.1.0/tests/corpus → rag_wright-0.2.1/src/rag_wright/packs/compliance/subgraphs}/__init__.py +0 -0
- {rag_wright-0.1.0/tests/foundation → rag_wright-0.2.1/src/rag_wright/packs/contracts/capabilities}/__init__.py +0 -0
- {rag_wright-0.1.0/tests/mcp → rag_wright-0.2.1/src/rag_wright/packs/contracts/corpus}/__init__.py +0 -0
- {rag_wright-0.1.0/src/rag_wright → rag_wright-0.2.1/src/rag_wright/packs/contracts}/corpus/edgar.py +0 -0
- {rag_wright-0.1.0/src/rag_wright → rag_wright-0.2.1/src/rag_wright/packs/contracts}/corpus/selection.py +0 -0
- {rag_wright-0.1.0/src/rag_wright → rag_wright-0.2.1/src/rag_wright/packs/contracts}/mcp/session_store.py +0 -0
- {rag_wright-0.1.0/tests/models → rag_wright-0.2.1/src/rag_wright/packs/contracts/ontology}/__init__.py +0 -0
- {rag_wright-0.1.0/src/rag_wright → rag_wright-0.2.1/src/rag_wright/packs/contracts}/ontology/_generated_template_meta.py +0 -0
- {rag_wright-0.1.0/src/rag_wright → rag_wright-0.2.1/src/rag_wright/packs/contracts}/ontology/_generated_vocab.py +0 -0
- {rag_wright-0.1.0/tests/ontology → rag_wright-0.2.1/src/rag_wright/packs/contracts/schemas}/__init__.py +0 -0
- {rag_wright-0.1.0/src/rag_wright/contracts → rag_wright-0.2.1/src/rag_wright/packs/contracts/schemas}/contract_meta.py +0 -0
- {rag_wright-0.1.0/src/rag_wright/contracts → rag_wright-0.2.1/src/rag_wright/packs/contracts/schemas}/function_routing.py +0 -0
- {rag_wright-0.1.0/src/rag_wright/contracts → rag_wright-0.2.1/src/rag_wright/packs/contracts/schemas}/highlight.py +0 -0
- {rag_wright-0.1.0/src/rag_wright/contracts → rag_wright-0.2.1/src/rag_wright/packs/contracts/schemas}/jurisdiction.py +0 -0
- {rag_wright-0.1.0/tests/store → rag_wright-0.2.1/src/rag_wright/packs/contracts/skills}/__init__.py +0 -0
- {rag_wright-0.1.0/src/rag_wright → rag_wright-0.2.1/src/rag_wright/packs/contracts}/skills/extraction_semantic_judge/SKILL.md +0 -0
- {rag_wright-0.1.0/src/rag_wright → rag_wright-0.2.1/src/rag_wright/packs/contracts}/skills/extraction_semantic_judge/__init__.py +0 -0
- {rag_wright-0.1.0/tests/subgraphs → rag_wright-0.2.1/src/rag_wright/packs/contracts/spans}/__init__.py +0 -0
- {rag_wright-0.1.0/src/rag_wright → rag_wright-0.2.1/src/rag_wright/packs/contracts}/spans/dim_fleet.json +0 -0
- {rag_wright-0.1.0/src/rag_wright → rag_wright-0.2.1/src/rag_wright/packs/contracts}/spans/function_classifier.py +0 -0
- {rag_wright-0.1.0/tests/util → rag_wright-0.2.1/src/rag_wright/packs/contracts/subgraphs}/__init__.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/py.typed +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/skills/__init__.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/skills/generation/SKILL.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/skills/generation/__init__.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/skills/okf_navigate/SKILL.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/skills/rlm/SKILL.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/skills/rlm/__init__.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/skills/rlm/agent.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/skills/span_relevance_judgment/SKILL.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/skills/vision_to_text/SKILL.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/skills/vision_to_text/__init__.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/spans/__init__.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/spans/page_map.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/store/__init__.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/store/chunk_text.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/subgraphs/observability.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/util/__init__.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/util/concurrent.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/src/rag_wright/util/spacy_model.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/api/test_discover.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/api/test_e2e.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/api/test_usage.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/async_helpers.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/capabilities/_fixtures/rlm_probe_skill/SKILL.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/capabilities/test_answer_generator.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/capabilities/test_answer_generator_async.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/capabilities/test_chunk_read.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/capabilities/test_chunk_write.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/capabilities/test_disambiguation.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/capabilities/test_document_scope.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/capabilities/test_embedding.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/capabilities/test_embedding_profiles.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/capabilities/test_fusion.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/capabilities/test_graph_query.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/capabilities/test_graph_storage.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/capabilities/test_hybrid_search.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/capabilities/test_okf_compile.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/capabilities/test_okf_links.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/capabilities/test_okf_navigate.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/capabilities/test_repair_partition.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/capabilities/test_reranking.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/capabilities/test_rlm_chunking.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/capabilities/test_rlm_chunking_async.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/capabilities/test_rlm_method.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/capabilities/test_rlm_synthesis.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/capabilities/test_runtime_registry.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/capabilities/test_scan_quality.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/capabilities/test_span_relevance_judgment.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/capabilities/test_structural_boundary_discoverer.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/capabilities/test_structural_model_fallback.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/capabilities/test_tag_boundary_discoverer.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/capabilities/test_tiered_ocr.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/contracts/test_canonical_source_doc_id.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/contracts/test_chunk_record.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/contracts/test_provenance.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/corpus/test_canonicalize.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/corpus/test_http.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/eval/test_contractnli_judge.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/eval/test_cuad_highlight_metrics.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/eval/test_kg_property_rerank.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/eval/test_nl_to_type_metrics.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/eval/test_relational_eval.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/fixtures/leg_a_silver/README.md +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/fixtures/leg_a_silver/evidence_snapshot.json +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/fixtures/table-bearing-contract.pdf +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/foundation/test_arcadedb_hybrid.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/foundation/test_model_seam_structured.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/journey/incidents_domain.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/journey/incidents_pack.ttl +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/journey/test_incidents_journey.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/models/test_async_infra.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/models/test_seam_async.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/models/test_seam_retry.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/models/test_seam_stream.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/models/test_serving_seam.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/models/test_tag_structured_async.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/models/test_tracing.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/models/test_usage.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/scripts/test_eval_chunking_ab.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/scripts/test_eval_classifier_ab.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/spans/test_page_map.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/store/test_affiliation_backfill.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/store/test_chunk_text.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/store/test_entities_by_name.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/store/test_kg_write.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/store/test_write_graph_idempotent.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/subgraphs/test_graph_extraction.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/subgraphs/test_observability.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/subgraphs/test_scaffold.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/subgraphs/test_semantic_chunking.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/test_backfill_clause_span_id.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/test_dg_model_ab.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/test_populate_entity_graph.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/tests/util/test_concurrent.py +0 -0
- {rag_wright-0.1.0 → rag_wright-0.2.1}/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.
|