Externalize safety rules
Move permission rules out of fragile prompts and into policy files that can be reviewed and tested.
RuleOak
Developer release · v0.1.0 monorepo
RuleOak helps developers gate risky tool calls before execution and record what happened after: allow, deny, require approval, or dry run — with hash-chained evidence for audit and replay.
Why developers use it
Prompts can describe safety expectations, but tool execution needs an explicit boundary that is testable, versioned, replayable, and reviewable. RuleOak gives you that boundary as a small developer-facing runtime and CLI.
Move permission rules out of fragile prompts and into policy files that can be reviewed and tested.
Deny or pause risky actions before shell, filesystem, database, email, MCP, or connector calls execute.
Record structured Evidence JSONL so teams can inspect what the agent attempted and why RuleOak decided.
Start with the CLI and high-risk demos, then embed @ruleoak/core into your agent runtime or adapter.
Visual guide for developers
Use these diagrams to decide where the action boundary belongs, which component to embed first, and what evidence a reviewer should expect after a run. Click any diagram to enlarge it in place.
Click to enlarge
Start at the tool boundary, evaluate policy, pause for approval when required, record evidence, and validate locally.
Click to enlarge
Wrap the tool-call boundary without redesigning the whole agent or application.
Click to enlarge
Map the runtime pieces developers use: policy engine, guard engine, evidence store, report generator, and protocol layer.
What v0.1.0 offers
| Package | License | Developer purpose |
|---|---|---|
@ruleoak/protocol | MIT | Shared policy, decision, evidence, and replay contracts. Use this when you need stable types across adapters or frameworks. |
@ruleoak/core | Apache-2.0 | Policy evaluator, fail-closed decision model, evidence recorder, approval semantics, and replay primitives. |
@ruleoak/cli | Apache-2.0 | Command-line gate for demos, local checks, scripted workflows, and CI-friendly governance experiments. |
Start here
git clone https://github.com/ruleoak/ruleoak.git
cd ruleoak
npm install --ignore-scripts
npm run check:publish
npm test