Repository navigation
feat(contracts): enforce approvals, auto-create renewal obligations, exposure reporting - #37
Merged
Merged
Conversation
…exposure reporting Close the gap between the charter's headline CLM capabilities and what the template actually did: - Approval visibility/enforcement: add `approver` + `approved_at` (hook-stamped when an approver is recorded) and a warning-severity validation flagging any ≥ $50k contract that reaches signed/active without a recorded approver. (Hard routed enforcement stays a fork onto the native approval engine; warning keeps seed loads and the lifecycle unblocked.) - signed → obligations: the charter promised this flow but it never existed, so AI-extracted terms produced no actionable work. New `signed_obligations.flow` fires once on the transition into "signed" and creates a dated renewal-decision obligation assigned to the owner (kind=notice, due = end_date) — turning post-signature metadata into a tracked task. Idempotent via previous.status. - Renewal loop: add `renewal_decision` (pending/renew/renegotiate/terminate) and `renewal_decision_due` so the system records the decision, not just alerts. - Currency: add `currency` (ISO-4217) — extract_terms already detects it but had nowhere to write it. - Exposure-by-counterparty: the charter promised this report; add the `party` (+`contract_type`) dataset dimensions and an "Active Exposure by Counterparty" bar widget to the dashboard. CHARTER: flows cap 3→4 (ship the promised signed→obligations flow), LOC cap 2,500→3,000, reconcile the stale `contract_party_link`/locale lines to reality. en + zh-CN updated. typecheck + objectstack build + format:check clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The charter's headline CLM capabilities weren't real: amount-tiered approval was a display-only formula (a $240k contract could be signed with zero sign-off), the promised signed → obligations flow didn't exist (AI-extracted terms produced no tasks), there was no way to record the renewal decision,
extract_termsdetected a currency it couldn't store, and the dashboard was missing the charter's "exposure by counterparty" report.What changed (within caps)
approver+approved_at(hook-stamped) + a warning-severity validation flagging ≥$50k signed/active contracts with no approver. (Hard routed enforcement is a documented fork onto the native approval engine; warning keeps seed loads + lifecycle unblocked.)signedand creates a dated renewal-decision obligation (kind=notice, due=end_date, assigned to owner). Idempotent viaprevious.status.renewal_decision(pending/renew/renegotiate/terminate) +renewal_decision_due.currency(ISO-4217) field.party/contract_typedataset dimensions + an "Active Exposure by Counterparty" bar widget.Charter
Flows cap 3→4 (ship the promised flow); LOC 2,500→3,000; reconciled the stale
contract_party_linkand en-only lines to reality. en + zh-CN updated.Verification
typecheck+objectstack build+ repoformat:checkclean. Build: 3 Objects / 44 Fields / 4 Flows.🤖 Generated with Claude Code