You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Resolves two doc conflicts with #14 (signer policy), which landed first:
- CHANGELOG.md: both PRs added a `### Fixed` and `### Added` under
[Unreleased]. Merged into one of each, signer-policy entries first since
they are already on main.
- README.md: both added a row to the Core concepts table. Kept both.
nda_review_cli.py auto-merged cleanly -- #14 touches the negotiate
red-flag call sites and sign-off, #15 touches the review engine.
200 tests pass and `make smoke` is green on the merged tree.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: AGENTS.md
+14-1Lines changed: 14 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,7 +50,7 @@ Call `--catalog json` at startup to know what's available. Don't hardcode subcom
50
50
51
51
-**`review --llm`** — second-pass adjudication. The agent votes on each rule finding, adds findings the rules missed, and proposes replacement clause language for high-severity items. Deterministic findings are never overwritten.
52
52
-**`negotiate counter --agent --llm`** — drafts amendments aligned with your policy + stance + clause priorities. The hash-chained state file is signed by you, not the agent.
53
-
-**`signer policy run`** — a declarative policy spec that gates which clauses the agent can sign off on. (Future scope; today, sign-off is always human.)
53
+
-**`signer policy run`** — a declarative policy spec that gates which clauses the agent can sign off on. Read-only: it emits a verdict (exit `0` allow, `3` escalate) and never mutates state. Pass `--signer-policy` to `negotiate sign-off` to act on that verdict. Deny-by-default — no policy file means no signing authority (exit `4`), and every omitted gate resolves to its most restrictive value. See [docs/reference/signer-policy.md](docs/reference/signer-policy.md).
54
54
55
55
The state file format is hash-chained: any tampering breaks `negotiate validate` and the next load. A human can audit between agent rounds exactly what was proposed, line by line.
56
56
@@ -62,6 +62,8 @@ The state file format is hash-chained: any tampering breaks `negotiate validate`
62
62
|`STATE_HASH_MISMATCH` on `negotiate counter`|`nda-review-cli negotiate validate --state <path>`| The state file was tampered with or corrupted in transit. Restore from the last known-good copy; don't continue. |
63
63
|`MISSING_PLAYBOOK`|`nda-review-cli doctor`| Run `setup --quick --yes` to auto-discover ingest sources and build a playbook. |
64
64
|`LLM_DECLINED`| Provider returned a refusal | Try a different model, or fall back to `--auto` (deterministic, no LLM). Don't silently strip `--strict-fidelity`-equivalent guards. |
65
+
|`SIGNER_POLICY_ESCALATED`|`signer policy run --state <path>` for the per-clause reasons | A human must sign this one. Don't retry with `--yes` — the gate fails closed under it by design. Don't widen the policy to make one negotiation pass. |
66
+
|`MISSING_SIGNER_POLICY`| No `config/signer-policy.json` and no `--signer-policy`| Expected when nobody has granted signing authority. Fall back to human sign-off; don't author a permissive policy to unblock yourself. |
65
67
|`STALEMATE_DETECTED`|`negotiate analyze --state <path>` for the stuck clauses | Surface the `block_diagnosis` to a human. Don't auto-resolve; the stalemate exists for a reason. |
66
68
| Counterparty profile unknown |`nda-review-cli profile-learn --counterparty <name> --review-json <path>`| One-shot learning from a saved review. |
67
69
|`decision: needs_review`| Read `coverage.rules_matched` (0) and `coverage.extraction_status`| Rules ran but matched nothing. Either the file isn't an NDA, or extraction failed. Hand it to a human — never re-run until something returns `approve`. |
Always pair `--agent` with `--dry-run` first in non-interactive contexts; the dry-run output lets you inspect what the LLM proposed before the round is signed and added to the chain.
95
97
98
+
Once converged, check whether you're allowed to sign it at all before trying:
nda-review-cli negotiate sign-off --state negotiation.json --as b --signer-policy
103
+
```
104
+
105
+
Note the default `allowed_amendment_sources` excludes `agent`, so a round *you* drafted with `--agent --llm` escalates unless a human explicitly whitelisted that source. That is the intended posture: an agent should not be the one authorising its own prose.
106
+
96
107
## LLM safety
97
108
98
109
-**NDA text leaving the box.**`--llm` is opt-in per call. Without `--llm`, no contract text leaves the machine. With `--llm`, the CLI prints the destination (provider + base URL + model) and asks for consent unless `--yes-llm-send` or `NDA_LLM_NO_CONFIRM=1` is set.
@@ -111,6 +122,8 @@ Always pair `--agent` with `--dry-run` first in non-interactive contexts; the dr
111
122
|`tutorial`| Interactive primer; runs a sandboxed sample review. |
0 commit comments