Skip to content

About

Public-safe human-in-the-loop review gate for agent and automation workflows

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Human Review Gate

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.

Why this exists

Agent workflows get safer when they separate three steps:

  1. Proposal — the agent drafts an action with evidence and rationale.
  2. Policy check — deterministic rules decide whether the action can proceed, needs review, or must be blocked.
  3. Human decision — a reviewer approves, rejects, or requests changes before anything client-visible or system-of-record-sensitive happens.

Included

  • 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.

Quick start

Run with Node 18+:

npm test
npm run review:sample

Expected sample output:

Human Review Gate Summary
auto_approved: 1
needs_review: 2
blocked: 1

Decision shape

{
  "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"]
}

Policy outcomes

  • 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.

Static demo

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.

Safety notes

  • 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.

License

MIT

About

Public-safe human-in-the-loop review gate for agent and automation workflows

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages