Before you start
A signed-in NodeFox workspace. Use synthetic data and prepare outputs before enabling external writes.
01Prepare the two sources
Use a synthetic agreement containing Clause 8.2: renewal notice is 30 days. Use a separate internal review policy requiring at least 60 days. The policy is an example business requirement, not a statement of legal adequacy.
02Extract with provenance
Use Reader for the agreement and Conversation to extract renewalNoticeDays and clauseReference. Retrieve the policy separately. Preserve the clause text so a person can check the model’s interpretation. Missing or nonnumeric values must become review cases.
03Apply an exact check
Code validates both day counts and compares 30 < 60. Output reviewRequired true with the clause reference and both values. This flags a policy mismatch; it does not determine enforceability or give authoritative legal advice.
04Request and record a decision
Configure Decision Options to request a 60-day revision or hold for follow-up. Route the chosen output to a review packet. Include the source clause, policy reference and reviewer action. Negotiation, acceptance and signing remain separate authorized activities.
Example configuration or input
{"renewalNoticeDays":30,"minimumNoticeDays":60,"clauseReference":"8.2"}Expected result
Review required; requested revision to 60 days. Agreement remains unaccepted and unsigned.
If the result is wrong
A reviewer must verify the original clause. Do not accept a model’s summary as the legal text.
Reproduce the exact checks
Save both .mjs files and the two Code-node .js files in the same folder and run node --test checks.test.mjs. These test the calculation independently; they do not execute the NodeFox runtime.