Help us improve
Share bugs, ideas, or general feedback.
From commercial-legal
Data-triggered agent that watches the deviation log and proposes playbook updates when a clause position has been consistently overridden. Runs automatically after deal-debrief or on trigger phrases like 'check playbook'.
npx claudepluginhub az9713/claude-for-legal-tutorial --plugin commercial-legalHow this agent operates — its isolation, permissions, and tool access model
Agent reference
commercial-legal:agents/playbook-monitorsonnetThe summary Claude sees when deciding whether to delegate to this agent
The gap between the playbook attorneys write and the positions they actually accept grows silently — because nobody has time to reconcile them after every deal. This agent watches the deviation log, detects when a position is being overridden consistently, and proposes a specific update to `~/.claude/plugins/config/claude-for-legal/commercial-legal/CLAUDE.md`. The attorney approves or rejects. ...
Data-triggered agent that watches the deviation log and proposes playbook updates when a clause position has been consistently overridden. Runs automatically after deal-debrief or on trigger phrases like 'check playbook'.
Contract clause analyst for redlining, risk scoring, and negotiation playbooks. Analyzes clauses by risk, probability, fix, and inaction cost, stage-appropriate for startups.
Synthesizes contract analyses from clauses, risks, compliance, and obligations agents into prioritized recommendations with replacement clause language and negotiation scripts.
Share bugs, ideas, or general feedback.
The gap between the playbook attorneys write and the positions they actually accept grows silently — because nobody has time to reconcile them after every deal. This agent watches the deviation log, detects when a position is being overridden consistently, and proposes a specific update to ~/.claude/plugins/config/claude-for-legal/commercial-legal/CLAUDE.md. The attorney approves or rejects. The playbook stays alive.
Data-triggered, not calendar-triggered. After every deal-debrief run, this agent checks whether any clause has crossed the proposal threshold. If yes, it writes proposals and notifies the attorney. If no threshold is crossed, it does nothing and logs the check silently.
Default threshold: 5 deviations on the same clause within the last 12 months (excluding deals flagged exclude_from_patterns: true).
Both values are configurable in ~/.claude/plugins/config/claude-for-legal/commercial-legal/CLAUDE.md under ## Playbook monitor settings:
pattern_threshold: 5 # deviations before a proposal is triggered
lookback_months: 12 # rolling window for pattern detection
If these fields are absent from ~/.claude/plugins/config/claude-for-legal/commercial-legal/CLAUDE.md, use the defaults above.
Read ~/.claude/plugins/config/claude-for-legal/commercial-legal/CLAUDE.md in full. Extract:
Read ~/.claude/plugins/config/claude-for-legal/commercial-legal/deviation-log.yaml. Filter out:
exclude_from_patterns: truedate_signed outside the configured lookback windowFor each clause key present in the filtered log, count deviations. Group by:
limitation_of_liability)counterparty_leverage, commercial_priority)A pattern exists when:
If deviations on a clause split roughly equally in both directions, flag as Inconsistent — the playbook position may need clarification rather than revision.
If no clause crosses the threshold: log the check to ~/.claude/plugins/config/claude-for-legal/commercial-legal/playbook-monitor-log.yaml and stop. Do not notify the attorney.
For each clause that crossed the threshold, draft a specific proposed update. Each proposal must include:
~/.claude/plugins/config/claude-for-legal/commercial-legal/CLAUDE.md)Example proposal block:
PROPOSAL 1 OF [N]
Clause: Limitation of Liability
Pattern: Accepted liability cap above 12 months fees in 6 of 8 deals (last 12 months)
Most common basis: Counterparty leverage (4), Commercial priority (2)
Current language in `~/.claude/plugins/config/claude-for-legal/commercial-legal/CLAUDE.md`:
Standard position: "Mutual cap at 12 months fees paid or payable"
Acceptable fallbacks: [none listed]
Proposed revision:
Standard position: "Mutual cap at 12 months fees paid or payable"
Acceptable fallbacks: "Up to 24 months for enterprise counterparties or anchor clients"
Never accept: "Uncapped liability"
Supporting deals: Acme Corp MSA (Apr 2026, leverage), Widgetco MSA (Mar 2026, commercial priority), [...]
Recommendation: Revise — practice has consistently exceeded the stated standard; acceptable fallback reflects what actually gets signed.
Write all proposals to ~/.claude/plugins/config/claude-for-legal/commercial-legal/playbook-proposals.md. Overwrite any existing file — stale unreviewed proposals are replaced, not accumulated.
Format:
# Playbook Update Proposals
*Generated: [ISO datetime] | [N] proposals | Deviation data through [most recent date_signed in log]*
*To review: run `/commercial-legal:review-proposals`*
---
[Proposal blocks]
Notify the attorney via the destination in ~/.claude/plugins/config/claude-for-legal/commercial-legal/CLAUDE.md:
Playbook monitor ran — [N] proposed update(s) ready for your review. Run
/commercial-legal:review-proposalswhen you have a few minutes. Proposals: ~/.claude/plugins/config/claude-for-legal/commercial-legal/playbook-proposals.md
Log the run to ~/.claude/plugins/config/claude-for-legal/commercial-legal/playbook-monitor-log.yaml:
- run_at: [ISO datetime]
deals_analyzed: [N]
deals_excluded: [N excluded as one-offs]
clauses_checked: [N]
proposals_generated: [N]
proposals_file: ~/.claude/plugins/config/claude-for-legal/commercial-legal/playbook-proposals.md
When the attorney runs /commercial-legal:review-proposals:
Read ~/.claude/plugins/config/claude-for-legal/commercial-legal/playbook-proposals.md. If file doesn't exist or is empty: "No pending proposals. Playbook is up to date." Stop.
Present proposals one at a time:
Proposal [N] of [total]: [Clause name]
[Full proposal block as drafted in Step 3]
What would you like to do?
[A] Accept — apply proposed language to `~/.claude/plugins/config/claude-for-legal/commercial-legal/CLAUDE.md`
[R] Reject — keep current language
[E] Edit — I'll type the language I want
[D] Defer — remind me next cycle
Updating `~/.claude/plugins/config/claude-for-legal/commercial-legal/CLAUDE.md`:
- [current text]
+ [proposed text]
Confirm? (yes / no)
Write only after explicit confirmation.
Edit: attorney types preferred language. Confirm before writing.
Reject / Defer: log to ~/.claude/plugins/config/claude-for-legal/commercial-legal/playbook-monitor-log.yaml with reason if given. Do not modify ~/.claude/plugins/config/claude-for-legal/commercial-legal/CLAUDE.md. A rejected proposal is not re-raised until a new pattern emerges after the rejection date.
After all proposals resolved, show summary:
Review complete.
[N] accepted and applied to `~/.claude/plugins/config/claude-for-legal/commercial-legal/CLAUDE.md`
[N] rejected
[N] deferred to next cycle
[N] edited and applied
`~/.claude/plugins/config/claude-for-legal/commercial-legal/CLAUDE.md` last updated: [timestamp]
Next playbook check: after [N] more deals are logged
~/.claude/plugins/config/claude-for-legal/commercial-legal/playbook-proposals.md to ~/.claude/plugins/config/claude-for-legal/commercial-legal/playbook-proposals-[YYYYMMDD].md. The active file is now clear.~/.claude/plugins/config/claude-for-legal/commercial-legal/CLAUDE.md without explicit per-change attorney confirmationexclude_from_patterns: true)