Maintained by FirmOps, this package shows a small public-safe pattern for human-in-the-loop review gates: automation proposes an action, policy decides whether review is required, and a human approves or rejects before any external side effect.
The repo is intentionally generic. It does not include private client data, production credentials, Telegram bot tokens, internal FirmOps/Conduit implementation code, or law-firm matter details.
Agent workflows get safer when they separate three steps:
- Proposal — the agent drafts an action with evidence and rationale.
- Policy check — deterministic rules decide whether the action can proceed, needs review, or must be blocked.
- Human decision — a reviewer approves, rejects, or requests changes before anything client-visible or system-of-record-sensitive happens.
policies/default-policy.json— generic review policy.src/review-gate.mjs— small evaluator for one decision or a batch.src/cli.mjs— CLI summary for proposal JSON.examples/sample-decisions.json— sample proposals.demo/index.html— static local demo of review cards.test/review-gate.test.mjs— dependency-free Node tests.
Run with Node 18+:
npm test
npm run review:sampleExpected sample output:
Human Review Gate Summary
auto_approved: 1
needs_review: 2
blocked: 1
{
"id": "draft-client-update-001",
"title": "Draft client update",
"actionType": "external_message",
"riskLevel": "high",
"confidence": 0.84,
"proposedAction": "Send a status update draft after human approval.",
"rationale": "The action is client-visible and should be approved even with a strong source trail.",
"sourceLinks": ["matter://example/123", "note://example/456"]
}auto_approved— low-risk, high-confidence, complete evidence, allowed by policy.needs_review— allowed only after human review.blocked— not allowed under the current policy.
Open this file locally:
demo/index.html
It renders the sample proposals as review cards with Approve / Reject / Request changes buttons. The demo stores decisions in browser memory only and does not make network calls.
- Do not paste real client or matter data into public repos or browser demos.
- Do not wire this directly to external sends without authentication, authorization, audit logs, replay protection, and reviewer identity.
- This is not legal advice and does not replace attorney judgment, privacy review, or platform-specific compliance work.
MIT