--- name: legal-test-builder-patrick-munro description: > Builds a high-fidelity interactive legal assessment as a single self-contained HTML artifact. Output includes a live countdown timer, contract review tasks with hover-annotated problem clauses, candidate answer textareas, model answers hidden behind reveal blocks, scenario-based legal memo tasks, strategy and function-building questions, and a pre-submission checklist that encodes the marking criteria. Use when the user needs to (1) assess a legal candidate with a realistic timed exercise, (2) train or onboard junior lawyers using problem sets rather than doctrine, (3) help a candidate prepare for a real take-home assessment they are facing, (4) build educational materials for law students, in-house teams, or compliance training, or (5) produce scenario-based training modules on specific legal topics. Triggers on "legal test", "take-home", "mock exam", "contract redline exercise", "candidate assessment", "legal training exercise", "practice test", or similar phrasing even when informal. metadata: author: "Patrick Munro" license: "agpl-3.0" version: "2026-04-25" --- # Legal Test Builder Produces a production-grade interactive HTML legal assessment as a single self-contained file that works offline and renders cleanly in any modern browser. ## When to use - Preparing a candidate for a real take-home assessment - Assessing legal candidates with a realistic, timed exercise that tests judgment rather than doctrine recall - Onboarding junior lawyers through scenario-based learning - Building legal training modules for in-house teams or client education - Law student moot and drafting exercises - Compliance or regulatory training where scenario application is the point ## Step 1: Gather inputs Before building, confirm or infer the following. If not specified, make sensible defaults and flag assumptions visibly in the output so the user can correct them. | Input | Key questions | Default if unspecified | |---|---|---| | **Role** | What position is being tested or trained for? | "Legal Counsel" | | **Organisation** | Context for the scenario | Fictional company from the library below | | **Legal domain(s)** | Contract law, IP, employment, regulatory, M&A, compliance, privacy, etc. | Commercial contracts | | **Governing law** | English law, German law, French law, New York law, etc. | English law | | **Test duration** | Total time for the assessment | 3 hours | | **Difficulty** | Junior / Mid / Senior / Partner-equivalent | Mid-level | | **Purpose** | Candidate assessment vs. training vs. exam prep | Candidate assessment | | **Number of tasks** | How many distinct exercises | 3-4 tasks | | **Model answers** | Included (training / prep) or excluded (live exam) | Included as reveals | For candidate prep and training: always include model answers as hidden reveals. For live candidate assessment: generate a second "examiner version" that strips the reveals. ## Step 2: Design the task stack A strong 3-hour test uses this structure. Scale task count and timing to the duration. ### Task 01: Contract Review and Redline (50-70 min) The anchor task. Most revealing of practical legal judgment. - Draft a realistic 6-10 clause agreement with **5-8 embedded problems** - Problems should span critical, high, and medium severity - Always include at least one **missing clause** (something not in the contract at all) - Include at least one **trap clause** that looks standard but is not (e.g., a licence-back that launders an overbroad IP assignment) - See `references/contract-design.md` for problem-embedding patterns ### Task 02: Legal Memo / Written Analysis (35-50 min) Tests reasoning under novelty. Best structured as a scenario with no clean answer. - Give a factual scenario with a genuine legal tension - Specify the governing law and any constraints - The scenario should be novel enough that the candidate cannot recite a textbook answer - See `references/scenario-design.md` for scenario construction patterns ### Task 03: Short Analysis (20-35 min) A focused issue with one problem and one answer. Good for: conflict of interest, regulatory compliance, specific employment or GDPR question, contractual interpretation. ### Task 04: Strategy / Function-Building (30-45 min) Tests seniority and commercial judgment rather than legal knowledge. - Classic framing: "You are the first legal hire. It is Day 90. What have you built, what have you deliberately not built, and what keeps you up at night?" - Alternative: "Identify the three highest-priority legal risks and how you would address each." - See `references/strategy-questions.md` for templates by role type ## Step 3: Build the HTML Read `references/html-framework.md` before writing code. It contains: - The full CSS design system (tokens, typography, components) - The contract annotation pattern with hover tooltips on problem clauses - The reveal block component - The timer implementation - The checklist component - Colour and severity conventions ### Core architectural rules 1. **Single file**: everything inline. No external dependencies except Google Fonts. 2. **Offline-capable**: the test must work without internet access once fonts are cached. 3. **Timer**: sticky header, shows hours:minutes:seconds. Colour shifts: normal → amber (under 30 min) → red and pulsing (under 10 min). 4. **Contract problems**: annotated with `data-title` and `data-body` attributes on `` elements. A JS tooltip renders on hover. The annotation is invisible until hovered. 5. **Reveal blocks**: model answers hidden by default. Click to reveal. Never auto-open. 6. **Write areas**: `