.claude/skills/section-drafter-prompt/SKILL.md
# 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
npx skillsauth add itmegirish/boardingmcp-server .claude/skills/section-drafter-promptInstall 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 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.
prompts/draft_prompt.pySingle LLM call produces the complete document. No templates, no section keys, no gap-fill markers.
intake_classify -> rag -> enrichment -> draft_freetext_node -> 4 gates -> review
Model: glm-5:cloud with reasoning=ON, temperature=0.7, ~30-50s
build_draft_freetext_system_prompt(doc_type, cause_type) builds:
load_exemplar(doc_type) (~1,500 tokens)Key instruction: plain text output, not JSON, not markdown code blocks.
build_draft_freetext_user_prompt(...) includes (in order):
_build_limitation_context()_build_verified_provisions_context()_build_lkb_brief_context() (acts, limitation, terminology)_build_rag_context() (top chunks, deduped)| Builder | What it provides |
|---------|-----------------|
| _build_limitation_context() | Limitation article, period, description. Handles article == "NONE" |
| _build_verified_provisions_context() | List of verified statutory provisions from enrichment |
| _build_rag_context() | Top RAG chunks from Qdrant, deduped, scored |
| _build_lkb_brief_context() | Primary acts, limitation summary, terminology, anti-hallucination instruction |
| _build_procedural_requirements_context() | Court rules, procedural requirements from LKB |
_build_lkb_brief_context() feeds verified legal knowledge to the draft LLM:
Structural exemplars per cause type in exemplars/ directory (~1,500 tokens each):
To add a new exemplar:
exemplars/ matching cause type nameload_exemplar(doc_type) auto-discovers by naming conventiondraft_freetext_node(state):
DraftArtifact -> draft.draft_artifacts[0]evidence_anchoring gate| File | What |
|------|------|
| prompts/draft_prompt.py | System/user prompt builders + exemplar loading |
| nodes/draft_single_call.py | draft_freetext_node + all context builders |
| exemplars/ | Structural exemplars per cause type |
| lkb/civil.py | LKB entries feeding the brief |
limitation.article == "NONE" explicitlydevelopment
# 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: 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