← ClaudeAtlas

citation-validatorlisted

Use this skill when modifying src/regulaitor/citation/validator.py or its policy. Documents the canonical 3-check validation procedure and the rules for evolving it (e.g. adding a fuzzy-fallback layer in H15).
enriquerodrig/regulaitor · ★ 0 · AI & Automation · score 65
Install: claude install-skill enriquerodrig/regulaitor
# Citation validator skill ## Why The validator is the operational core of the "no citation, no answer" rule (CLAUDE.md §6). Any change here directly affects whether the system can produce auditable answers. This skill encodes the disciplined evolution path. ## Activation Activate when: - Modifying `src/regulaitor/citation/validator.py`. - Modifying `_normalize` in `src/regulaitor/rag/chunking.py` (validator depends on it). - Adding a new validation check (e.g. version-consistency, language-consistency). - Calibrating thresholds in H15. Do NOT activate for unrelated tests, schema field additions in `citation/schemas.py`, or refactors that don't change validation semantics. ## Canonical procedure (H3 baseline) The validator runs 3 strict checks in order, with fail-fast on first failure: 1. `article_exists`: `(norma, articulo)` is in the manifest. 2. `apartado_exists` (if citation has an apartado): the apartado is a known paragraph for that article. 3. `text_normalized_match`: `_normalize(citation.text)` is a substring of `_normalize(target_text)`, where `target_text` is the apartado paragraph when an apartado is given, else the full article text. `validated` = AND of the checks. `reason` field carries a specific code: - `article_not_found:` - `apartado_not_found:` - `text_not_in_apartado:` - `text_not_in_article:` ## Adding new checks When proposing a new check (e.g. `version_consistent`): 1. Open a brainstorming session per `superpowers:brainstorming` skil