construction-contract-review

Review construction and subcontracting contracts against 27 deterministic risk rules with LLM verification.

Updated Sep 2, 2026
One-click install
npx skills add https://github.com/pinedu/xmc-work-wiki --skill construction-contract-review-pinedu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: construction-contract-review
Source: https://github.com/pinedu/xmc-work-wiki/tree/main/skills/construction-contract-review
Command: npx skills add https://github.com/pinedu/xmc-work-wiki --skill construction-contract-review-pinedu

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) and assets (resource) components.

What problem does it solve? Reviewing construction and subcontracting contracts for risky clauses (back-to-back payment, excessive retention, waived priority lien, advance funding, illegal subcontracting, etc.) is slow and inconsistent when done manually. This Skill runs a deterministic 27-rule engine that produces identical results for the same contract every time, then adds a mandatory LLM review pass to catch false positives and missed findings. ## Core Features & Use Cases - Deterministic Stage 1 engine: A Python rule engine scans contract clauses (down to sub-clause granularity like 第22.2条) against 27 rules covering payment, warranty, liability, subcontracting, and settlement risks, with exemption keywords to avoid flagging compliant wording. - Mandatory Stage 2 LLM review: The platform agent reviews every Stage 1 finding and all 27 rules in two passes (false-positive correction plus full missed-finding coverage), producing a verdicts.json validated against a strict JSON schema with fail-safe exit on violations. - Fixed-format report delivery: The final report is rendered by the engine's render_markdown() and printed directly to the chat panel; intermediate files are deleted immediately after delivery. - Use Case: A contractor receives a subcontract draft as a .docx file and asks to check for risk clauses. The Skill outputs a clause-level risk report citing the exact rule, legal basis, and revision suggestion for each finding. ## Quick Start Review the attached construction contract file for risky clauses and show me the risk report.

Frequently Asked Questions about construction-contract-review

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I review a construction contract for risky clauses automatically?

Provide the contract as a .txt or .docx file and ask for a contract risk review. The engine splits the contract into clauses and sub-clauses, matches them against 27 deterministic rules, and outputs a clause-level risk report with legal basis and revision suggestions.

What risks does a construction contract review check for?

The 27 rules cover back-to-back payment clauses, retention money above the 3% statutory cap, waived priority lien rights, advance funding, illegal subcontracting and资质挂靠, migrant worker wage liability transfer, excluded delay claims, unlimited liability, and non-competitive fee concessions.

Does the contract review produce the same result every time?

Yes. Stage 1 is a pure-Python deterministic engine with fixed rule ordering and no model dependence, so the same contract always yields byte-identical findings. A self_check.py script verifies this with golden-baseline tests.

Why does the skill use a two-stage LLM review process?

Keyword matching alone cannot tell whether a clause already preserves rights elsewhere in its text. Stage 2 lets an LLM correct false positives and catch missed findings, but only within the existing 27 rules, with all reasoning recorded in verdicts.json.

What are the limitations of rule-based contract review?

The engine only detects risks covered by its 27 rules and cannot judge facts outside the contract text, such as whether a project required public bidding. Such cases are marked uncertain, and the report states it is not a substitute for advice from a licensed lawyer.