.claude/skills/template-builder/SKILL.md
# 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
npx skillsauth add itmegirish/boardingmcp-server .claude/skills/template-builderInstall 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.
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.
LKB Layer 1 (legal knowledge) + LKB Layer 2 (document components) + Document Schema
→ Structured prompt (3 sections, ~1,500 tokens)
→ LLM drafts complete document (1 call)
→ Gates validate (0 LLM)
No template engine. No exemplar files. Just better context to the same LLM.
app/agents/drafting_agents/schemas/
├── __init__.py # DOCUMENT_SCHEMAS registry + lookup
├── trial_court.py # plaint, written_statement, rejoinder, counter_claim
├── applications.py # interim_application, condonation, set_aside_ex_parte, caveat
├── appellate.py # appeal_memo, revision_petition, review_petition
└── execution.py # execution_application
Each schema defines structure for ONE document type, independent of cause type:
{
"code": "written_statement",
"display_name": "Written Statement",
"filed_by": "defendant",
"cpc_reference": "Order VIII",
"annexure_prefix": "D-",
"verification_type": "defendant",
"signing_format": "Defendant through Advocate",
"sections": [
{"key": "court_heading", "instruction": "Court name, place, suit number"},
{"key": "parties", "instruction": "Defendant and Plaintiff details"},
{"key": "preliminary_objections", "instruction": "Limitation, jurisdiction, non-joinder objections"},
{"key": "parawise_reply", "instruction": "Reply to EVERY plaint paragraph: ADMITTED/DENIED/NOT ADMITTED"},
{"key": "additional_facts", "instruction": "New facts supporting defence, not in plaint"},
{"key": "legal_grounds", "instruction": "Statutory and legal basis for defence"},
{"key": "prayer", "instruction": "Dismiss suit with costs"},
{"key": "verification", "instruction": "Verification on oath"},
],
"filing_rules": {
"court_fee": False,
"filing_deadline": "30 days from service (max 120 days — Order VIII Rule 1)",
"vakalatnama": True,
},
}
Each LKB entry gets document component fields alongside existing legal knowledge:
"breach_of_contract": {
# Layer 1 — Legal knowledge (already exists)
"primary_acts": [...],
"limitation": {...},
"facts_must_cover": [...],
# Layer 2 — Document components (NEW)
"available_reliefs": [
{"type": "damages", "statute": "S.73 ICA", "prayer_text": "decree for damages of Rs.{{AMOUNT}}"},
{"type": "interest_pre_suit", "statute": "S.34 CPC", "prayer_text": "interest at {{RATE}}% per annum from {{BREACH_DATE}}"},
{"type": "interest_pendente_lite", "statute": "Order XX Rule 11 CPC", "prayer_text": "pendente lite and future interest"},
{"type": "costs", "statute": "S.35 CPC", "prayer_text": "costs of the suit"},
],
"jurisdiction_basis": "Section 20 CPC — where cause of action arose",
"valuation_basis": "Amount of damages claimed",
}
filed_by, annexure_prefix, verification_typefiling_rules (deadline, court fee, etc.)available_reliefs with prayer_textjurisdiction_basis (which CPC section determines jurisdiction)valuation_basis (what determines suit valuation/court fee)| File | What |
|------|------|
| schemas/ | Document type schemas (NEW) |
| lkb/causes/ | LKB entries (enrich with Layer 2) |
| lkb/causes/_helpers.py | _entry() schema definition |
| prompts/draft_prompt.py | Structured prompt builder |
| nodes/draft_single_call.py | _build_lkb_brief_context() (to be replaced) |
available_reliefs.prayer_text must match actual court prayer wordingdevelopment
# 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: 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
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