# Covenant change draft

Check source citations and prepare covenant changes for human review.

## When to use it

Check source citations and prepare proposed covenant changes for review. Open the resulting source passages before deciding. Drafted changes remain proposals and do not enter an approved dated view until the required human decision.

## Add and configure

1. Add **Covenant change draft** from the workflow step picker.
2. Give the step a recognisable name and connect its required inputs.
3. Set the options below. Nested names identify fields within an object or a list item.
4. Validate the recipe, inspect the test result, then run it on the intended data.

The step identifier used in the editor’s code view is `covenant_draft`.

## Settings

This step has no declared configuration fields.

## Inputs and outputs

| Direction | Port | Content | Required | Multiple records |
| --- | --- | --- | --- | --- |
| Inputs | `in` | records | Yes | Yes |

### Inputs record fields

| Setting | Accepted value | Required | Default | What it controls |
| --- | --- | --- | --- | --- |
| Amendments (`amendments`) | list of object; maximum items 5000 | Yes | Not specified | — |
| Action (`amendments[].action`) | "add" / "replace" / "remove" / "waive" / "definition_change" | Yes | Not specified | — |
| Citations (`amendments[].citations`) | list of object; minimum items 1 | Yes | Not specified | — |
| Document Id (`amendments[].citations[].document_id`) | string; minimum characters 1; maximum characters 200 | Yes | Not specified | — |
| Document Sha256 (`amendments[].citations[].document_sha256`) | string; pattern `^[a-f0-9]{64}$` | Yes | Not specified | — |
| End (`amendments[].citations[].end`) | integer; greater than 0 | Yes | Not specified | — |
| Quote (`amendments[].citations[].quote`) | string; minimum characters 1 | Yes | Not specified | — |
| Segment Id (`amendments[].citations[].segment_id`) | string; minimum characters 1; maximum characters 200 | Yes | Not specified | — |
| Start (`amendments[].citations[].start`) | integer; minimum 0 | Yes | Not specified | — |
| Effective Confirmed (`amendments[].effective_confirmed`) | boolean | No | false | — |
| Effective On (`amendments[].effective_on`) | string; format date or null | No | null | — |
| expected term (`amendments[].expected_term`) | object or null | No | null | — |
| Conditions (`amendments[].expected_term.conditions`) | list of string | No | [] | Each condition is a verbatim substring of text, never a paraphrase. Use an empty array when no separate condition excerpts are needed. |
| Definition Ids (`amendments[].expected_term.definition_ids`) | list of string; minimum characters 1; maximum characters 200 | No | [] | — |
| Operator (`amendments[].expected_term.operator`) | "<" / "<=" / "=" / ">=" / ">" or null | No | null | The permitted comparison for compliance: a maximum normally uses <=, and a minimum normally uses >=. Do not copy the prohibited breach direction from 'shall not permit ... to exceed/be less than'. Use null if ambiguous. This draft field requires human review and does not execute a compliance calculation. |
| Text (`amendments[].expected_term.text`) | string; minimum characters 1; maximum characters 20000 | Yes | Not specified | One continuous verbatim excerpt of active evidence; never paraphrase. |
| Threshold (`amendments[].expected_term.threshold`) | string or null | No | null | Decimal string copied from text with its exact reported precision. Thousands separators may be omitted; do not round or calculate a value. |
| Unit (`amendments[].expected_term.unit`) | string or null | No | null | — |
| Expires On (`amendments[].expires_on`) | string; format date or null | No | null | — |
| Id (`amendments[].id`) | string; minimum characters 1; maximum characters 200 | Yes | Not specified | — |
| Sequence (`amendments[].sequence`) | integer; minimum 0 | No | 0 | — |
| Target Id (`amendments[].target_id`) | string; minimum characters 1; maximum characters 200 | Yes | Not specified | — |
| term (`amendments[].term`) | object or null | No | null | — |
| Conditions (`amendments[].term.conditions`) | list of string | No | [] | Each condition is a verbatim substring of text, never a paraphrase. Use an empty array when no separate condition excerpts are needed. |
| Definition Ids (`amendments[].term.definition_ids`) | list of string; minimum characters 1; maximum characters 200 | No | [] | — |
| Operator (`amendments[].term.operator`) | "<" / "<=" / "=" / ">=" / ">" or null | No | null | The permitted comparison for compliance: a maximum normally uses <=, and a minimum normally uses >=. Do not copy the prohibited breach direction from 'shall not permit ... to exceed/be less than'. Use null if ambiguous. This draft field requires human review and does not execute a compliance calculation. |
| Text (`amendments[].term.text`) | string; minimum characters 1; maximum characters 20000 | Yes | Not specified | One continuous verbatim excerpt of active evidence; never paraphrase. |
| Threshold (`amendments[].term.threshold`) | string or null | No | null | Decimal string copied from text with its exact reported precision. Thousands separators may be omitted; do not round or calculate a value. |
| Unit (`amendments[].term.unit`) | string or null | No | null | — |
| Title (`amendments[].title`) | string or null | No | null | — |
| As Of (`as_of`) | string; format date | Yes | Not specified | Date for which to project eligible reviewed terms. |
| Baseline (`baseline`) | object | Yes | Not specified | — |
| Covenants (`baseline.covenants`) | list of object | Yes | Not specified | — |
| Citations (`baseline.covenants[].citations`) | list of object; minimum items 1 | Yes | Not specified | — |
| Document Id (`baseline.covenants[].citations[].document_id`) | string; minimum characters 1; maximum characters 200 | Yes | Not specified | — |
| Document Sha256 (`baseline.covenants[].citations[].document_sha256`) | string; pattern `^[a-f0-9]{64}$` | Yes | Not specified | — |
| End (`baseline.covenants[].citations[].end`) | integer; greater than 0 | Yes | Not specified | — |
| Quote (`baseline.covenants[].citations[].quote`) | string; minimum characters 1 | Yes | Not specified | — |
| Segment Id (`baseline.covenants[].citations[].segment_id`) | string; minimum characters 1; maximum characters 200 | Yes | Not specified | — |
| Start (`baseline.covenants[].citations[].start`) | integer; minimum 0 | Yes | Not specified | — |
| Id (`baseline.covenants[].id`) | string; minimum characters 1; maximum characters 200 | Yes | Not specified | — |
| Term (`baseline.covenants[].term`) | object | Yes | Not specified | — |
| Conditions (`baseline.covenants[].term.conditions`) | list of string | No | [] | Each condition is a verbatim substring of text, never a paraphrase. Use an empty array when no separate condition excerpts are needed. |
| Definition Ids (`baseline.covenants[].term.definition_ids`) | list of string; minimum characters 1; maximum characters 200 | No | [] | — |
| Operator (`baseline.covenants[].term.operator`) | "<" / "<=" / "=" / ">=" / ">" or null | No | null | The permitted comparison for compliance: a maximum normally uses <=, and a minimum normally uses >=. Do not copy the prohibited breach direction from 'shall not permit ... to exceed/be less than'. Use null if ambiguous. This draft field requires human review and does not execute a compliance calculation. |
| Text (`baseline.covenants[].term.text`) | string; minimum characters 1; maximum characters 20000 | Yes | Not specified | One continuous verbatim excerpt of active evidence; never paraphrase. |
| Threshold (`baseline.covenants[].term.threshold`) | string or null | No | null | Decimal string copied from text with its exact reported precision. Thousands separators may be omitted; do not round or calculate a value. |
| Unit (`baseline.covenants[].term.unit`) | string or null | No | null | — |
| Title (`baseline.covenants[].title`) | string; minimum characters 1; maximum characters 500 | Yes | Not specified | — |
| Definitions (`baseline.definitions`) | list of object; maximum items 250 | No | [] | — |
| Citations (`baseline.definitions[].citations`) | list of object; minimum items 1 | Yes | Not specified | — |
| Document Id (`baseline.definitions[].citations[].document_id`) | string; minimum characters 1; maximum characters 200 | Yes | Not specified | — |
| Document Sha256 (`baseline.definitions[].citations[].document_sha256`) | string; pattern `^[a-f0-9]{64}$` | Yes | Not specified | — |
| End (`baseline.definitions[].citations[].end`) | integer; greater than 0 | Yes | Not specified | — |
| Quote (`baseline.definitions[].citations[].quote`) | string; minimum characters 1 | Yes | Not specified | — |
| Segment Id (`baseline.definitions[].citations[].segment_id`) | string; minimum characters 1; maximum characters 200 | Yes | Not specified | — |
| Start (`baseline.definitions[].citations[].start`) | integer; minimum 0 | Yes | Not specified | — |
| Id (`baseline.definitions[].id`) | string; minimum characters 1; maximum characters 200 | Yes | Not specified | — |
| Term (`baseline.definitions[].term`) | object | Yes | Not specified | — |
| Conditions (`baseline.definitions[].term.conditions`) | list of string | No | [] | Each condition is a verbatim substring of text, never a paraphrase. Use an empty array when no separate condition excerpts are needed. |
| Definition Ids (`baseline.definitions[].term.definition_ids`) | list of string; minimum characters 1; maximum characters 200 | No | [] | — |
| Operator (`baseline.definitions[].term.operator`) | "<" / "<=" / "=" / ">=" / ">" or null | No | null | The permitted comparison for compliance: a maximum normally uses <=, and a minimum normally uses >=. Do not copy the prohibited breach direction from 'shall not permit ... to exceed/be less than'. Use null if ambiguous. This draft field requires human review and does not execute a compliance calculation. |
| Text (`baseline.definitions[].term.text`) | string; minimum characters 1; maximum characters 20000 | Yes | Not specified | One continuous verbatim excerpt of active evidence; never paraphrase. |
| Threshold (`baseline.definitions[].term.threshold`) | string or null | No | null | Decimal string copied from text with its exact reported precision. Thousands separators may be omitted; do not round or calculate a value. |
| Unit (`baseline.definitions[].term.unit`) | string or null | No | null | — |
| Title (`baseline.definitions[].title`) | string; minimum characters 1; maximum characters 500 | Yes | Not specified | — |
| Effective On (`baseline.effective_on`) | string; format date | Yes | Not specified | — |
| Documents (`documents`) | list of object; maximum items 100 | Yes | Not specified | — |
| Id (`documents[].id`) | string; minimum characters 1; maximum characters 200 | Yes | Not specified | — |
| Segments (`documents[].segments`) | object of string | Yes | Not specified | — |
| Sha256 (`documents[].sha256`) | string; pattern `^[a-f0-9]{64}$` | Yes | Not specified | — |
| Outputs | `out` | records | Yes | Yes |

## Effects, testing, and recovery

Transforms or passes records without a declared external side effect.

The declared preview behaviour is to execute this step. Reads, processing, or model usage can therefore be real. Read [dry runs](/docs/workflows/dry-runs) before using a preview with live connections.

No duplicate-prevention key is declared for this step. The step declares safe replay for its supported recovery path.

## Example: Empty case

Step settings:

```json
{}
```

Input records:

```json
[
  {
    "amendments": [],
    "as_of": "2024-01-01",
    "baseline": {
      "covenants": [],
      "effective_on": "2024-01-01"
    },
    "documents": []
  }
]
```

Expected output for this example:

```json
[
  {
    "projection": {
      "as_of": "2024-01-01",
      "current": {},
      "definition_issues": {},
      "history": [],
      "indirect_impacts": {},
      "review_required": {},
      "waivers": {}
    },
    "proposals": [],
    "record_type": "covenant_review_draft",
    "source_hashes": {},
    "status": "review_required",
    "version": 1
  }
]
```

## Check the result

Inspect the selected run’s status, counts, errors, and output records. An empty collection can be a valid result, and a completed step can contain per-record failures where the step defines that behaviour. Check the next step’s expected record shape before publishing or delivering the result.
