Contract drafting
Draft a contract from a versioned template with explicit parties and terms, reconciling every clause against the rendered baseline deterministically and keeping delivery behind a human gate.
Overview
Draft a contract without letting the drafting agent silently rewrite the template. The template, parties, and terms are the only evidence; the agent assembles clause text, and deterministic code re-renders every baseline with the supplied values and reconciles the draft against it. A clause may differ from its rendered baseline only through a declared deviation with a reason.
This is not legal advice and does not replace counsel. It is an execution boundary for template fidelity: the receipt proves which template version was drafted, which terms were bound, and which deviations were declared.
In the manual
Runner
draft
Declared by its execution profile. Read the profile
SKILL.md
Contract Draft
Draft a contract without letting the drafting agent silently rewrite the template. The template, parties, and terms are the only evidence; the agent assembles clause text, and deterministic code re-renders every baseline with the supplied values and reconciles the draft against it. A clause may differ from its rendered baseline only through a declared deviation with a reason.
This is not legal advice and does not replace counsel. It is an execution boundary for template fidelity: the receipt proves which template version was drafted, which terms were bound, and which deviations were declared.
Procedure
- Admission requires a complete template (id, version, title, clauses with
baselines), explicit parties, and every
required_termskey present interms. Missing evidence stops before the drafting agent runs. - Native
data.digestbinds the exact template, parties, and terms. - The drafting agent assembles clause text and declares any deviations.
- Deterministic reconciliation re-renders each baseline with the supplied
values (
{{provider.legal_name}},{{terms.fee_usd}}, and similar paths). A clause must match its rendered baseline exactly, or carry a declared deviation with a reason. Undeclared deviations, deviations that match the baseline anyway, unknown clause targets, unresolved placeholders, and missing clauses all refuse. - A drafted verdict carries the document and a send proposal gated on a human
approver through
message-send.delivery_performedis always false.
Output
contract_draft (runx/contract-draft.draft.v1) carries decision, reason, the
document or null, confirmed deviations with baseline and text, the gated
send_proposal or null, validation, and the three input digests.
Inputs are template, parties, and terms.
Agent task contracts
contract-draft-assemble
Read template, parties, and terms from step inputs. Return draft_doc
with title, clauses (each id, heading, text), and deviations as an
array of clause_id plus reason entries. Render every placeholder from
the supplied values; never invent parties, amounts, or dates. Match each
baseline exactly unless a deviation is genuinely needed, and declare every
deviation with its reason. Do not add clauses the template does not define and
do not produce delivery instructions; delivery belongs to the gated proposal.
Published execution profile
The execution profile published with 0.1.9, shown as its exact bytes.
| Runner |
|
|---|---|
| Profile digest | sha256:6d766da98ba56101e258ca4caebd7b02ffcfb78b3952be5d12101a5f67b36774 |
skill: contract-draft
version: "0.1.9"
catalog:
kind: graph
audience: operator
visibility: public
category: content
role: canonical
execution: plan
completion: runtime_receipt
approval: none
harness:
files: [fixtures/support/composed.graph]
cases:
- name: contract-draft-complete-draft-seals
operator_journeys:
- mode: standalone
confusors: [ghostwrite, message-send]
request: Draft this services agreement from the approved template with every required term bound.
expected_outcome: Return a sealed draft where every clause reconciles with the rendered template and delivery stays behind a human gate.
- mode: composed
request: Continue from this sealed contract draft into the governed delivery step.
expected_outcome: Reuse the sealed draft and its send proposal without re-drafting any clause.
prior_evidence:
- The template, parties, terms, and sealed draft supplied by the prior step.
must_not_repeat:
- Do not re-render or re-negotiate clauses already sealed.
inputs:
template:
id: msa-basic-v1
version: "1.0"
title: Services Agreement
required_terms: [services, fee_usd]
clauses:
- id: parties
heading: Parties
baseline: "This Services Agreement is between {{provider.legal_name}} and {{customer.legal_name}}."
- id: fees
heading: Fees and Payment
baseline: "Customer will pay USD {{terms.fee_usd}} for {{terms.services}}."
parties:
provider: { legal_name: Acme Pty Ltd }
customer: { legal_name: Globex LLC }
terms:
services: monthly platform maintenance
fee_usd: 4000
caller:
answers:
assemble:
draft_doc:
title: Services Agreement
clauses:
- id: parties
heading: Parties
text: This Services Agreement is between Acme Pty Ltd and Globex LLC.
- id: fees
heading: Fees and Payment
text: Customer will pay USD 4000 for monthly platform maintenance.
deviations: []
expect:
status: sealed
steps: [admit, digest-template, digest-parties, digest-terms, assemble, finalize]
step_outputs:
finalize:
subset:
contract_draft:
data:
schema: runx/contract-draft.draft.v1
decision: drafted
deviations: []
send_proposal:
gate: human-approver
delivery_skill: message-send
sent: false
delivery_performed: false
validation: { status: pass, findings: [] }
receipt: { schema: runx.receipt.v1 }
- name: contract-draft-declared-deviation-seals
inputs:
template:
id: msa-basic-v1
version: "1.0"
title: Services Agreement
required_terms: [fee_usd]
clauses:
- id: fees
heading: Fees and Payment
baseline: "Customer will pay USD {{terms.fee_usd}} within 30 days after invoice."
parties:
customer: { legal_name: Globex LLC }
terms:
fee_usd: 4000
caller:
answers:
assemble:
draft_doc:
title: Services Agreement
clauses:
- id: fees
heading: Fees and Payment
text: Customer will pay USD 4000 within 45 days after invoice.
deviations:
- clause_id: fees
reason: Customer requested 45-day payment terms and the operator approved the extension.
expect:
status: sealed
steps: [admit, digest-template, digest-parties, digest-terms, assemble, finalize]
step_outputs:
finalize:
subset:
contract_draft:
data:
decision: drafted
validation: { status: pass, findings: [] }
receipt: { schema: runx.receipt.v1 }
- name: contract-draft-undeclared-deviation-refuses
inputs:
template:
id: msa-basic-v1
version: "1.0"
title: Services Agreement
required_terms: [fee_usd]
clauses:
- id: fees
heading: Fees and Payment
baseline: "Customer will pay USD {{terms.fee_usd}} within 30 days after invoice."
parties:
customer: { legal_name: Globex LLC }
terms:
fee_usd: 4000
caller:
answers:
assemble:
draft_doc:
title: Services Agreement
clauses:
- id: fees
heading: Fees and Payment
text: Customer will pay USD 9000 within 90 days after invoice.
deviations: []
expect:
status: sealed
steps: [admit, digest-template, digest-parties, digest-terms, assemble, finalize]
step_outputs:
finalize:
subset:
contract_draft:
data:
decision: refused
document: null
send_proposal: null
validation: { status: fail }
receipt: { schema: runx.receipt.v1 }
- name: contract-draft-missing-term-stops
inputs:
template:
id: msa-basic-v1
version: "1.0"
title: Services Agreement
required_terms: [fee_usd, services]
clauses:
- id: fees
heading: Fees and Payment
baseline: "Customer will pay USD {{terms.fee_usd}} for {{terms.services}}."
parties:
customer: { legal_name: Globex LLC }
terms:
fee_usd: 4000
expect:
status: sealed
steps: [admit, stop]
step_outputs:
stop:
subset:
contract_draft:
data:
decision: refused
document: null
send_proposal: null
validation: { status: fail }
receipt: { schema: runx.receipt.v1 }
runners:
draft:
default: true
inputs:
template:
type: object
required: true
description: Versioned contract template with stable clause baselines and required term keys.
parties:
type: object
required: true
description: Explicit party records referenced by template placeholders; no party may be inferred.
terms:
type: object
required: true
description: Explicit deal terms; every template required term must be supplied.
examples:
- template:
id: msa-basic-v1
version: "1.0"
title: Services Agreement
required_terms: [fee_usd]
clauses:
- id: fees
heading: Fees and Payment
baseline: "Customer will pay USD {{terms.fee_usd}}."
parties:
customer: { legal_name: Globex LLC }
terms:
fee_usd: 4000
result_from: [stop, finalize]
steps:
- id: admit
label: admit only complete template, party, and term evidence
inputs:
template: $input.template
parties: $input.parties
terms: $input.terms
tool: { module: contract-draft.mjs, export: admitRequest }
outputs:
draft_context: object
- id: stop
when:
value: $steps.admit.draft_context.path
equals: stop
inputs:
draft_context: $steps.admit.draft_context
template: $input.template
parties: $input.parties
terms: $input.terms
tool: { module: contract-draft.mjs, export: finalizeDraft }
outputs:
contract_draft: object
artifacts:
named_emits:
contract_draft: contract_draft
packets:
contract_draft: runx/contract-draft.draft.v1
- id: digest-template
when:
value: $steps.admit.draft_context.path
equals: draft
tool: data.digest
inputs:
value: $input.template
- id: digest-parties
when:
value: $steps.admit.draft_context.path
equals: draft
tool: data.digest
inputs:
value: $input.parties
- id: digest-terms
when:
value: $steps.admit.draft_context.path
equals: draft
tool: data.digest
inputs:
value: $input.terms
- id: assemble
label: draft clauses from the template under declared-deviation rules
when:
value: $steps.admit.draft_context.path
equals: draft
agent: { role: reviewer, task: contract-draft-assemble }
outputs:
draft_doc: object
inputs:
template: $input.template
parties: $input.parties
terms: $input.terms
artifacts:
named_emits:
draft_doc: draft_doc
- id: finalize
label: reconcile the draft against the rendered template deterministically
when:
value: $steps.admit.draft_context.path
equals: draft
inputs:
template: $input.template
parties: $input.parties
terms: $input.terms
draft_context: $steps.admit.draft_context
draft_doc: $steps.assemble.draft_doc
template_digest: $steps.digest-template.digest_result.digest
parties_digest: $steps.digest-parties.digest_result.digest
terms_digest: $steps.digest-terms.digest_result.digest
tool: { module: contract-draft.mjs, export: finalizeDraft }
outputs:
contract_draft:
type: object
artifacts:
named_emits:
contract_draft: contract_draft
packets:
contract_draft: runx/contract-draft.draft.v1
Published package and test evidence.
This exact version passed its recorded harness run: 5 checks passed · 0 failed.
Test result
| Harness result | Passed |
|---|---|
| Tested version | 0.1.9 |
| Recorded result | 5 checks passed · 0 failed |
| Result source | Run by the Runx registry at publication |
| Suite | runx-harness |
| Test recorded | |
| Declared cases | 4 |
| Test record | Open the recorded run |
Inspect receipt references
sha256:04edf5f39c98f1e400e6d662f0884d1f1a45d88f791a1ff3e7e4832038ec2822sha256:9fe14e2a5271e6d64d306dcf20c276c591b2b8fdf70c0c6b0a70b13b562bb545sha256:4d179a8d2865f4246b873004c52831261d4d98669198d1cc8e6a99befc90bb64sha256:bd3e1653461c571255d7de7fd4954a3029e8ec89ccfc0888d46d6c22d8e46fbcsha256:97b2c284fa58e6cc3f062755a26236eda83d09f442d5ccfe1fe12e04cb87c772Package identity
| Published revision | 0.1.9 |
|---|---|
| Content digest | sha256:820ac2e2ccb971d81e762bb2a729bcc32eb88e5b80215bec77d8da4fdfce1967 |
| SKILL.md digest | sha256:dc417e9b562de2601d5634777b4e0c282176aded548f4acbc4963a55ec1f167f |
| Execution profile digest | sha256:6d766da98ba56101e258ca4caebd7b02ffcfb78b3952be5d12101a5f67b36774 |
| Publisher identity | Verified publisher · runx |
| Trust tier | Verified publisherRunx has verified this publisher. This tier is not a code assessment. |
| Attestations |
|
| Source provenance | Not published with this version |
Version history
0.1.9ViewingContent digest sha256:820ac2e2ccb971d81e762bb2a729bcc32eb88e5b80215bec77d8da4fdfce1967sha-cdec3779dc22Content digest sha256:cdec3779dc22c58ef8f66ee8f13084e165582f6e523d3bdea0a09036be83ab0f