← ClaudeAtlas

catchlaw-rule-enginelisted

Governs the pure-Dart rule_engine package shared by the app and content CLI: resolution filtered on jurisdiction, species_id and water_type with valid_from at or before the injected date, collapsed to the greatest valid_from per zone_id and citation_lineage_id, matched against NULL, equal or ancestor zones, ranked by the specificity ladder exclusion 40, reserve 30, bank 20, subzone 10, region 0, expiry TAGGED and never filtered so a lapsed orden de vedas still evaluates, disagreeing ties returned as Resolution.ambiguous rather than chosen, FindingKind precedence protected, closedSeason, maxSize, minSize, bagLimit and vesselLimit, and one NFKC-first normaliseSpeciesTerm. Use when writing a resolution query, touching valid_to or isExpired, adding a FindingKind or Resolution variant, replacing DateTime.now with an injected Clock, indexing species_alias rows, debugging hamour against هامور search, or reviewing rule_resolver.dart in a diff.
zakariaf/CatchLaw · ★ 0 · Code & Development · score 55
Install: claude install-skill zakariaf/CatchLaw
# Catchlaw Rule Engine The engine never decides what a fisher should do; it states which rules were found, which one bites first, and which instrument says so. This skill owns the pure-Dart `rule_engine` package — the resolution pipeline, specificity ladder, tie contract, expiry tagging, finding precedence, the no-rule-found state and the species normalisation contract. It owns neither the `Result` spine, sealed-class style and reference schema, nor the sentence printed from a finding. Read the reference for the task at hand: - `references/resolution-algorithm.md` — selection predicate, lineage collapse, zone ancestry, specificity ladder, tie matrix, expiry axis, finding precedence, worked traces, edge cases. - `references/normalisation-contract.md` — nfkc ordering, tatweel and harakat, alef and ya folding, ta-marbuta collapse, definite-article dual indexing, Arabic-Indic digits, acceptance test. Run `scripts/check_rule_engine.sh` before a PR. Rows arrive as plain Dart records: DAOs and indices belong to `catchlaw-reference-database`, the content that fills them to `catchlaw-content-pipeline`, the `Result` spine to `error-handling-typed-results`, sealed-class and complexity policy to `dart3-idioms-and-coding-standards`, and the printed sentence to `catchlaw-verdict-contract`. ## Non-negotiable rules 1. **An expired ruleset is TAGGED, never filtered away.** No resolution query may mention `valid_to` in a `WHERE`, and no Dart pipeline may `.where((r) => r.validTo!.