contract-review

--- name: contract-review description: Review a contract against a supplied playbook, extract cited clauses, redline risky terms, and summarize risk without emitting effects. runx: category: legal ---

You’re reading version sha-22e721e6843e. Go to the current version

Overview


SKILL.md


Contract Review

Review contract text against a supplied acceptable-terms playbook.

This skill extracts clauses from a contract, checks only the supplied playbook rules, emits playbook-cited redlines, and summarizes risk for a human reviewer. It is read-only over the inputs and never emits an approval, signature, negotiation, filing, or payment effect.

What this skill does

This skill converts contract and playbook inputs into a review packet:

  • clauses: contract clauses that are actually present in the input.
  • redlines: risk findings that cite both the contract clause and the breached playbook rule.
  • risk_summary: risk level, counts, and read-only constraints.

It emits one of three decision states:

  • reviewed: the input looked like a contract and supplied playbook rules were evaluated.
  • refused: the input was not a contract or was unparseable as contract text.
  • needs_input: the playbook did not supply review rules.

When to use this skill

  • A legal, sales, security, or operations reviewer needs a first-pass contract risk packet.
  • The contract text and acceptable-terms playbook are both available as inputs.
  • A reviewer needs redlines that cite exact clause text and exact supplied playbook rules.
  • A workflow needs a read-only artifact before a human decides whether to accept, reject, negotiate, or escalate terms.

When not to use this skill

  • To sign, approve, reject, negotiate, file, or send a contract.
  • To infer hidden terms, oral side agreements, or external legal standards not in the supplied playbook.
  • To summarize a document without clause-level evidence.
  • To review non-contract inputs such as emails, menus, resumes, tickets, or policies.
  • To provide legal advice without human review.

Procedure

  1. Confirm contract is a JSON object with text or clauses.
  2. Confirm playbook is a JSON object with a non-empty rules array.
  3. Extract clauses only from contract.clauses or clearly labelled contract sections in contract.text.
  4. For each playbook rule, locate the matching clause by clause_type or supplied keywords.
  5. If a required clause is missing, create a redline that cites the playbook rule and marks the clause as absent.
  6. If a present clause breaches a supplied rule, create a redline with clause_id, quoted clause_text, the playbook_rule, severity, and a recommendation.
  7. Produce a risk summary from the redlines.
  8. Stop with refused or needs_input instead of inventing missing contract clauses or missing playbook rules.

Edge cases and stop conditions

  • Non-contract text: return refused.
  • Empty or absent playbook.rules: return needs_input.
  • Missing required clause: redline the absence; do not invent clause text.
  • Rule has no matching clause and is not required: skip it without asserting a breach.
  • Ambiguous clause mapping: prefer needs_input or a conservative redline only when clause text and rule citation are both present.
  • Secrets, credentials, or private account numbers in contract text: do not echo them; cite a redacted evidence id instead.
  • Requests to approve, sign, send, or negotiate the contract: refuse those effects and return the read-only review artifact.

Output schema

yaml
decision:
  status: reviewed | refused | needs_input
  contract_ref: string
  playbook_ref: string
  reasons: [string]
clauses:
  - id: string
    type: string
    title: string
    text: string
redlines:
  - rule_id: string
    playbook_ref: string
    clause_id: string | null
    clause_type: string
    severity: low | medium | high
    issue: string
    citation:
      clause_text: string | null
      playbook_rule: string
    recommendation: string
risk_summary:
  level: low | medium | high | not_reviewed
  redline_count: number
  clause_count: number
  read_only: true
  no_effects_emitted: true

Worked example

Input:

yaml
contract:
  id: msa-acme-2026
  clauses:
    - id: c1
      type: termination
      text: Either party may terminate this Agreement with 90 days notice.
playbook:
  id: legal-playbook-2026-06
  rules:
    - id: term-notice-max-30
      clause_type: termination
      description: Termination for convenience must not require more than 30 days notice.
      max_notice_days: 30
      severity: medium
      recommendation: Change notice period to 30 days or less.

Output:

yaml
decision:
  status: reviewed
clauses:
  - id: c1
    type: termination
redlines:
  - rule_id: term-notice-max-30
    clause_id: c1
    issue: Notice period is 90 days, above playbook maximum 30 days.
    citation:
      clause_text: Either party may terminate this Agreement with 90 days notice.
      playbook_rule: Termination for convenience must not require more than 30 days notice.
risk_summary:
  level: medium
  read_only: true
  no_effects_emitted: true

If the same input is a lunch menu or ordinary note, the result is refused and no clauses or redlines are emitted.

Inputs

  • contract: JSON object with id, optional text, and optional clauses. Each clause should include id, type, title, and text.
  • playbook: JSON object with id and rules.

Playbook rules may include:

yaml
rules:
  - id: term-notice-max-30
    clause_type: termination
    description: Termination notice must be 30 days or less.
    max_notice_days: 30
    severity: medium
    recommendation: Reduce notice period to 30 days or less.
  - id: liability-cap-required
    clause_type: liability
    description: Liability must be expressly capped.
    requires_liability_cap: true
    severity: high

Output

Return JSON with:

  • decision: review/refusal status and input refs.
  • clauses: extracted contract clauses that are present in the input.
  • redlines: playbook-cited clause issues or missing required clauses.
  • risk_summary: risk level, counts, and read-only/no-effect constraints.

Safety Rules

  • Stay read-only. Do not sign, approve, reject, send, file, pay, or negotiate.
  • Never assert a clause that is absent from the contract input.
  • Never invent a playbook rule that was not supplied.
  • Cite both the clause and the playbook rule for every redline.
  • Refuse non-contract or unparseable documents.
  • Route legal decisions to a human reviewer.

Local Verification

Run:

sh
node test.mjs

The test covers a contract that yields extracted clauses and playbook-cited redlines, plus a non-contract input that is refused.

Published execution profile

The execution profile published with sha-22e721e6843e, shown as its exact bytes.

Runner
  • review
Profile digestsha256:3e562ad4ae5042bbb132b6416c685de6808b3326050e9df7bfacfc86bb0fb22e
skill: contract-review
version: 0.1.0
catalog:
  kind: skill
  audience: operator
  visibility: public
  role: canonical
runners:
  review:
    default: true
    inputs:
      contract:
        type: json
        required: true
        description: Contract text and optional clause map.
      playbook:
        type: json
        required: true
        description: Acceptable terms, required clauses, and risk rules.
    steps:
      - id: review
        tool:
          command: node
          args:
            - run.mjs
        inputs:
          contract: $input.contract
          playbook: $input.playbook
        artifacts:
          wrap_as: contract_review_packet
harness:
  cases:
    - name: playbook-redlines
      runner: review
      inputs:
        contract:
          id: msa-acme-2026
          clauses:
            - id: c1
              type: termination
              title: Termination for Convenience
              text: Either party may terminate this Agreement with 90 days notice.
            - id: c2
              type: liability
              title: Limitation of Liability
              text: Supplier liability is uncapped for all damages.
        playbook:
          id: legal-playbook-2026-06
          rules:
            - id: term-notice-max-30
              clause_type: termination
              description: Termination for convenience must not require more than 30 days notice.
              max_notice_days: 30
              severity: medium
              recommendation: Change notice period to 30 days or less.
            - id: liability-cap-required
              clause_type: liability
              description: Liability must be expressly capped.
              requires_liability_cap: true
              severity: high
              recommendation: Add a negotiated liability cap.
      expect:
        status: sealed
        receipt:
          schema: runx.receipt.v1
      operator_journeys:
        - mode: standalone
          confusors:
            - contract-drafter
            - policy-draft
          request: Review this contract against our policy before signature.
          expected_outcome: Return cited findings and a recommendation, signing and sending nothing.
        - mode: composed
          request: Continue this contract-review work from evidence already gathered upstream.
          expected_outcome: Return cited findings and a recommendation, signing and sending nothing.
          prior_evidence:
            - The contract text and review policy already supplied.
          must_not_repeat:
            - Do not re-review clauses already cleared.
    - name: missing-playbook-fails
      runner: review
      inputs:
        contract:
          id: msa-acme-2026
          clauses:
            - id: c1
              type: termination
              title: Termination for Convenience
              text: Either party may terminate this Agreement with 90 days notice.
      expect:
        status: failure

Published package and test evidence.

The latest recorded test covers an earlier version, sha-eff2787b259f. It does not establish a result for this version.

Test result

Harness resultAn earlier version was tested
Tested versionsha-eff2787b259fNot this page’s version, sha-22e721e6843e
Recorded result2 checks passed · 0 failed
Result sourceReported by the publisher (runx_registry_publish)
Suiterunx-harness
Test recorded
Declared cases2

Package identity

Published revisionsha-22e721e6843e
Content digestsha256:22e721e6843eef580d76644f4f7ce7e7b6e6aedd8dc9c1b1146f628752e78b76
SKILL.md digestsha256:7e1b8a135af7b925949707e3545fbf0e2534026f9e46dd19463300c152ca7656
Execution profile digestsha256:3e562ad4ae5042bbb132b6416c685de6808b3326050e9df7bfacfc86bb0fb22e
Publisher identityUnverified publisher · Kid
Trust tierCommunityPublished through the registry without publisher verification. This tier is not a code assessment.
Attestations
  • Publisher · DeclaredKid · 13 Oct 2026
Source provenanceNot published with this version

Version history

  1. sha-eff2787b259fContent digest sha256:eff2787b259f1f24eaf4c16d40b1bcec5ffac276792c2c6e9196cce137684365
  2. sha-8a72932433f4Content digest sha256:8a72932433f48f242441d03e87463909e82536a7ee9591ba51afd3ed6c126491
  3. sha-3c2d944e676aContent digest sha256:3c2d944e676a9350b81d08c331641cb785372586997c5d83bba60fab259e9def
  4. sha-22e721e6843eViewingContent digest sha256:22e721e6843eef580d76644f4f7ce7e7b6e6aedd8dc9c1b1146f628752e78b76