Skip to main content
Back to Prompt Library
Build the complete application

Implementation brief

Inspect the original prompt language first, then copy or adapt it once you know how it fits your workflow.

Linked challenge: Build a Contract Review and Redlining Assistant

Format
Code-aware
Lines
62
Sections
11
Linked challenge
Build a Contract Review and Redlining Assistant

Prompt source

Original prompt text with formatting preserved for inspection.

62 lines
11 sections
No variables
1 code block
## Who Uses It
A legal operations reviewer processing vendor agreements.

## What You Will Build
Build an agent that compares a vendor agreement with a supplied contract playbook, explains deviations, and proposes clause revisions. Give reviewers an editable risk register and a tracked-change document.

## Inputs
- Agreement clauses
- Approved clause playbook
- Reviewer instructions

## Workflow
1. Identify clauses and defined terms.
2. Compare clauses against applicable playbook entries.
3. Propose supported fallback text with references.
4. Export tracked changes and a reviewer decision log.

## Interface
A clause review workspace with source text, playbook references, proposed edits, and DOCX export.

## Working Demo
Flag C1, propose the P1 fallback, preserve C2, and export reviewer-visible tracked changes rather than silently rewriting the agreement.

## Deliverables
- A working local application with the specified review interface.
- Source code, dependency lockfile, and setup commands.
- A recorded end-to-end demo using the supplied starter data.
- Example outputs, action logs, and automated tests.

## Starter Data
These fictional records are a small development fixture, not a production dataset. Implement the mock services described in the brief.

```json
{
  "agreement": [
    {
      "id": "C1",
      "type": "liability",
      "text": "Supplier liability is unlimited."
    },
    {
      "id": "C2",
      "type": "payment",
      "text": "Payment is due in 30 days."
    }
  ],
  "playbook": [
    {
      "id": "P1",
      "type": "liability",
      "fallback": "Supplier liability is capped at fees paid in the preceding 12 months.",
      "review_required": true
    },
    {
      "id": "P2",
      "type": "payment",
      "acceptable_text": "Payment is due in 30 days."
    }
  ]
}
```

## Constraints
Use the fictional playbook. Do not give legal approval, negotiate, or sign documents.
Choose an available model that supports your implementation. Record its identifier and version.

## Evaluation
Review the complete application, not only the starter-case answers.
- The proposed edit cites P1.
- Unchanged clauses remain unchanged.
- The exported document contains actual insertion and deletion markup.
Add one normal case, one incomplete-input case, and one failure-recovery case.

Adaptation plan

Keep the source stable, then change the prompt in a predictable order so the next run is easier to evaluate.

Keep stable

Preserve the source structure until you know which part of the prompt is actually driving the result quality.

Tune next

Change domain facts, examples, and tool context first before you rewrite the instruction scaffold.

Verify after

Validate one failure mode at a time so prompt changes stay attributable instead of getting noisy.