contract-review
Execute a micro-granular 7-stage review of building contracts and schedules of amendments — risk matrix, redline negotiation package, BSA 2022 SI mapping, and mandatory independent audit (contract-review-auditor subagent). Use when asked to review, audit, or redline a building contract.
Source: .opencode/skills/contract-review/SKILL.md — site rebuilt 2026-09-05.
Specialist Contract Review Skill¶
Overview¶
When the user asks to review, audit, or analyze a building contract, sub-contract, or schedule of amendments, execute this 7-stage automated workflow.
Mandatory Precondition — the standard form MUST be loaded (DO NOT RUN WITHOUT IT)¶
This skill must NOT execute any stage unless the actual unamended standard form of the base contract is available and loaded into the working context first.
- Locate the standard form transcription (.md / OKF) — for JCT Design and Build Contract 2024 the canonical copy is:
C:\Users\antho\OneDrive - The Building Law Practice\WORK\30_Research\Building Contracts\JCT_DB_2024\JCT DB 2024.md(the full 126-page verbatim OKF transcription; the partial TOC transcription in00_Standard_Forms\JCT Design and Build Contract 2024_Complete_Transcription.mdis NOT sufficient). - Verify before starting: confirm the file exists and covers the full conditions (all Sections 1–9, Contract Particulars, and Schedules). If the base form of the correct edition is not found anywhere, STOP and ask the user for the standard form file — do not proceed on the SoA alone.
- Never substitute assumed default wording for the actual form: the JCT base clause text (e.g. 2.11, 2.13/2.14, 2.26, 2.27, 8.9, 4.21.6/4.21.7, Annex forms) must be quoted/checked against the loaded transcription, not recalled from memory.
- Every stage (1–7) must compare the SoA amendments against the actual base clause being amended and record the delta explicitly (deleted / substituted / added / unamended).
- If the standard form transcription cannot be located or the edition does not match the SoA's base contract, halt and report the gap to the user before producing any deliverable.
7-Stage Execution Workflow¶
- Stage 1: Micro-Granular OKF Schema & Parsing: Parse the contract and schedule of amendments into an Open Knowledge Format (.okf) micro-granular tree up to 8 levels deep.
- Stage 2: Micro-Granular Contractor Risk Allocation Matrix: Generate a Markdown table classifying every item into 🔴 HIGH RISK, 🟡 MODERATE RISK, 🟢 MITIGATED, or ⚪ NEUTRAL across Recitals, Articles, Sections 1 to 9, and Schedules.
- Stage 3: Core Technical & Structural Risk Deep-Dive: Evaluate key substrate specifications, fire classification (A1/A2-s1,d0), PAS 9980 FRAEW compliance, structural/wind load resistance, and interface weather-tightness.
- Stage 4: Redline Compromise Amendments & Priority Mechanics: Apply pre-approved compromise drafting:
- Clause 2.1.1A: PCSA Pervasiveness Rule vs. Non-Existence Baseline Rule.
- Clause 2.1.1A.3: Absolute Overriding Priority Clause (overriding ERs and all conflicting clauses).
- Clause 2.1.1A.4: Deemed Change Mechanism (deeming unlisted pre-existing defects an instructed Change under Clause 5.1).
- Stage 5: Recursive Loophole & Gap Audit: Audit all remaining clauses and close all 10 contract-wide loopholes (latent defects, collateral warranties, consents, deleterious materials, mitigation programmes, LDs, property indemnities, default termination).
- Stage 6: BSA 2022 & Statutory Instruments Compliance Mapping: Map against SI 2023/909 (HRB procedures), SI 2023/911 (Part 2A dutyholders & PAS 8672 competence proof), statutory limitation periods under BSA 2022 s.135, and s.130 Building Liability Orders (BLOs).
- Stage 7: Specialist Contractor Deliverables Master Schedule: Generate a Master Schedule of Contractor Deliverables in a Markdown table grouped into lifecycle categories.
- Stage 8: Independent Auditor Review (MANDATORY): Before issuing any deliverable, invoke the contract-review-auditor subagent to verify the output: completeness (every OKF amendment node in the register, nothing summarised), base-form accuracy (every quoted clause verified against the fixed OKF / 126-page PDF), risk-tier calibration, redline legal soundness (real cross-references, no numbering collisions), and BSA 2022 / SI mapping accuracy. The auditor returns an Audit Report (findings + verdict + certification statement). Do not issue any deliverable unless the verdict is PASS or CONDITIONAL PASS with the specified corrections applied. Record the audit verdict in the README index.
File Output Rule¶
Save all generated master markdown artifacts as clean .md files to prevent copy-paste formatting errors. The auditor's report is saved as review_outputs/stage8_audit_report.md and its verdict recorded in the README index.
Report Format (MANDATORY — grey scale, house Typst template)¶
Any report rendered to PDF (client negotiation reports, amendment packages, review reports) MUST be produced in the in-house report format and MUST be grey scale end to end:
- Grey scale only — every element (text, rules, table strokes, fills, headings, subtitle) is black or a shade of grey (
luma(...)); NEVER emit colour. - Grayscale logo — import
#import "@preview/grayness:0.7.0": image-grayscaleand render the logo with#image-grayscale(read("LOGO.png", encoding: none), width: 2.4cm)so the colour logo is converted to monochrome. Do NOT use#image(...)for the logo. - House template — follow the canonical template at
C:\Users\antho\.config\opencode\skills\typst-report-generator\resources\template.typ(or the contract-review companioncontract_review\resources\report_template.typ): clinical serif ("Libertinus Serif", "Times New Roman", "Georgia", 10.5pt), justified; cover page with top-left grayscale logo, right-aligned title block (22–24pt bold title, italic grey subtitleluma(80), grey descriptorluma(100)), right-aligned metadata grid, horizontal rule (0.5pt + luma(150)), imprint footer (The Building Law Practice Limited | Edinburgh, Scotland);#pagebreak(); Table of Contents page (#outline(...)); then reset page geometry for report pages (marginsleft: 4.5cm, right: 2.5cm, top: 3.5cm, bottom: 3.5cm) with a running header (italic report title left, "Our Ref: ..." right,0.5pt + blackbottom rule) and a centred page-number footer on every page after the cover. - Compile and verify — run
typst compile, then verify the output PDF: cover, TOC, header/footer present, and confirm the embedded logo image is greyscale (e.g. PyMuPDFget_image_info()reportscolorspace: ICCBased(Gray)). - Deliverables — save the
.typsource and the.pdfside by side in the matter folder; copy the.pdftoC:\Users\antho\Downloadswhen the user asks for the report in Downloads.