.claude/skills/section-validator/SKILL.md
# SKILL: section-validator ## Purpose Build and maintain the 4 deterministic verification gates (Stage 3). Gates run on the full draft text with zero LLM calls. They validate, auto-fix formatting, and flag issues for review. ## When to Use - Building or modifying any gate - Adding new entity extraction patterns - Debugging false positives / false negatives - Extending verified provisions coverage ## Architecture Context (v5.1 — what's running) 4 gates run sequentially on `draft.draft_artifac
npx skillsauth add itmegirish/boardingmcp-server .claude/skills/section-validatorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Build and maintain the 4 deterministic verification gates (Stage 3). Gates run on the full draft text with zero LLM calls. They validate, auto-fix formatting, and flag issues for review.
4 gates run sequentially on draft.draft_artifacts[0].text (full document text). Total time: ~0.1s.
draft_freetext -> evidence_anchoring -> lkb_compliance -> postprocess -> citation_validator -> review
All gates are deterministic — zero LLM calls.
evidence_anchoring.py)For each extracted entity (date, amount, reference) in the draft:
{{PLACEHOLDER}}evidence_anchoring_issues — list of dicts with type and descriptionlkb_compliance.py)Checks draft against LKB entry for the classified cause type:
postprocess_issuespostprocess.py)Deterministic formatting fixes on the draft text:
postprocess_issues — list of formatting fixes appliedcitation_validator.py)Every statutory citation in the draft must:
verified_provisions (from enrichment) OR be a well-known procedural provision(2015) 5 SCC 123AIR 2015 SC 1232015 SCC OnLine SC 123ILR 2015 KAR 123citation_issues — list of dicts with severity and messageDRAFTING_CITATION_VALIDATOR_ENABLED setting| File | What |
|------|------|
| nodes/evidence_anchoring.py | Gate 1: fact -> intake tracing |
| nodes/lkb_compliance.py | Gate 2: act citation + superseded law check |
| nodes/postprocess.py | Gate 3: formatting fixes |
| nodes/citation_validator.py | Gate 4: provision verification |
| nodes/_utils.py | Shared helpers (placeholder collection, encoding cleanup) |
DRAFTING_CITATION_VALIDATOR_ENABLED: bool = True
draft.draft_artifacts[0].text)_build_gate_errors_summary()development
# SKILL: v9-architecture Use when: planning, building, or reviewing v11.0 architecture components (LKB 2-layer model, document schemas, structured prompt builder, gates, family migrations). ## v11.0 Architecture — Scalable Context-Driven Pipeline ### Core Principles 1. **Better context to LLM = better draft** — no complex engine needed 2. **Separate law from structure** — cause type (92) × document type (12) = 1,104 combinations 3. **Decide law before drafting, enforce law after drafting** #
development
# SKILL: test-draft-pipeline ## Purpose Run the drafting pipeline, evaluate output quality, and verify all 4 gates + review work correctly. ## When to Use - After modifying any pipeline node, gate, or prompt - After creating or updating an exemplar or LKB entry - For regression testing across multiple scenarios - For debugging pipeline failures ## Test Runners ### Quick Test (single scenario) ```bash agent_steer/Scripts/python.exe research/run_draft_live.py ``` ### Unit Tests ```bash agent_
development
# SKILL: exemplar-builder ## Purpose Create, validate, and maintain document schemas and LKB Layer 2 data for the v11.0 scalable drafting pipeline. **v11.0 approach:** No exemplar documents in prompts. Instead: LKB 2-layer data + document schema → structured prompt → LLM drafts. ## When to Use - Creating a new document schema (e.g., written_statement, appeal_memo) - Enriching LKB entries with Layer 2 data (available_reliefs, jurisdiction_basis) - Reviewing schema quality against CPC rules - A
development
# SKILL: draft-prompt ## Purpose Build and refine the draft prompt that produces a complete court-ready legal document in a single LLM call. v5.1 uses free-text drafting — the LLM outputs the entire document (not section-keyed JSON, not gap-fill). Exemplar-guided, LKB-informed. ## When to Use - Building or modifying `prompts/draft_prompt.py` - Debugging why draft quality is low - Tuning exemplars or context injection - Adapting prompt for a new cause type - Optimizing prompt token count ## Ar