CLI and local policy engine
pip install rulence
Open source • Local-first policy layer
One machine. Consistency across all agents.
Value in Consistency.
Rulence classifies task difficulty first, then applies local policy files that decide when agents check memory, spend tokens, call tools, escalate, or stop.
~/.rulence/policies/tier-4-complex.md
release freeze conflicts with migration
pip install rulence
npx -y @rulence/mcp
docker pull ghcr.io/rulence/rulence:latest
One-line runner setup
rulence install claude-code
rulence install cursor --dir .
rulence install n8n
Demo artifacts
Public demo artifacts live in the repository: the trace, the runnable script, and the recording script for the launch video.
The Rulence philosophy
Your memory belongs to you.
Agents should ask your memory before wasting tokens.
Reasoning should be inspectable, not hidden.
Rules should travel across agents.
Local first. Cloud optional. No lock-in.
Rulence turns local memory and project rules into a reasoning layer agents can use across tools, models, and runtimes.
First call every agent makes
No tool use. No policy overhead beyond current instruction.
Answer from current context or local memory.
One lookup, one file, or one memory check.
Multi-step work with budget and consistency checks.
Tool chains, code edits, migrations, research, or synthesis.
Credentials, destructive actions, sensitive data, or unclear intent.
What users gain
Budget context before execution, retrieve only relevant memory, and reduce repeated rediscovery.
Check contradictions, stale assumptions, risky tool chains, and high-impact actions before execution.
Keep rules, preferences, constraints, and prior decisions available across agents and model providers.
Policy files travel
---
tier: 3
required:
- memory_check
- consistency_check
- context_budget
- tool_preflight
block_if:
contradictions_found: true
sensitive_action: true
---
Use this tier for multi-step work
that may call tools or rely on memory.
Memory before tokens
What Rulence checks
Classify difficulty, risk, ambiguity, and required checks before the agent starts.
Load the right local policy file and compose only the checks that tier requires.
Predict input, output, memory, tool-call, cost, and latency budget before the agent starts.
Extract claims, premises, assumptions, conclusions, and contradictions from agent plans.
Compare current instruction, Honcho, MemPalace, local files, freshness, and confidence.
Look for a case where the agent plan fails before it spends tokens or calls tools.
Use deterministic checks first, then optional Z3 or Prolog when a claim can be formalized.
Warn, shrink, route, or block when an action chain relies on weak reasoning.
Record policy version, tier, checks run, warnings, overrides, and final verdict.
Canonical links
Code, issues, releases, examples, and demo artifacts.
Install the CLI and local governance engine with `pip install rulence`.
Run the MCP server with `npx -y @rulence/mcp`.
Pull `ghcr.io/rulence/rulence:latest` for containerized MCP use.
Benchmarks coming