@oiyonet/decision-core
v1.0.0
Published
Deterministic decision calibration & approval gate engine for autonomous AI agents. 100% zero-dependency.
Maintainers
Readme
@oiyonet/decision-core
Deterministic decision calibration & approval gate engine for autonomous AI coding agents. 100% zero-dependency.
Engineered by OIYO Lab to power autonomous AI operations ("Human-on-the-Loop") by calibrating when an agent can execute autonomously vs when human sign-off is strictly required.
🌟 The 3 Decision Tiers
@oiyonet/decision-core formalizes a 3-tier boundary:
[TIER 0: Full Autonomous] ──────► Auto-execute & auto-merge (Bugfixes, refactors, tests)
[TIER 1: Canary Autonomous] ────► Auto-execute with 24h self-healing / revert guarantee (UI, features)
[TIER 2: Human Sign-Off] ───────► Blocked by 5 Hard Gates (Money, deletion, legal, emails, linter skips)The 5 Hard Gates (Tier 2 Mandatory Human Approval)
- Financial: Payment gateways, checkout, pricing changes, subscription logic.
- Deletion: Irreversible database table drops, hard deletes, wholesale file removal.
- Legal & Credentials: Terms of service, privacy policies, API keys, credentials files.
- External Messaging: Broadcast emails, SMS blasts, third-party outbound webhooks.
- Quality Gate Weakening: Disabling linters, lowering test coverage thresholds, skipping tests.
📦 Installation
# Global CLI
npm install -g @oiyonet/decision-core
# Or run via npx
npx @oiyonet/decision-core check-git🚀 CLI Commands
1. Evaluate a Proposed Task / PR
decision-core evaluate --title "refactor: optimize SQLite query performance" --files "src/db/queries.ts"Output:
⚖️ Decision Core Policy Calibration:
• Tier: TIER_0_AUTONOMOUS
• Allowed Immediately: ✅ YES
• Human Signoff Required: 🟢 NO
• Revert Guarantee Required: NONE
• Summary: Approved for immediate full autonomous execution. Standard test & verification gates apply.2. Audit Current Git Diff against Hard Gates
decision-core check-git3. Evaluate a High-Risk Change
decision-core evaluate --title "update stripe checkout billing plan"Output:
⚖️ Decision Core Policy Calibration:
• Tier: TIER_2_HUMAN_APPROVAL
• Allowed Immediately: ❌ NO
• Human Signoff Required: 🛑 MANDATORY
• Summary: Blocked by 1 safety gate(s): [FINANCIAL]. Human approval required.
🛑 Matched Hard Gates (1):
• [FINANCIAL] Financial & payment logic modification requires explicit human authorization.
↳ Evidence pattern: "stripe"💻 Programmatic TypeScript API
import { DecisionEvaluator } from '@oiyonet/decision-core';
const evaluator = new DecisionEvaluator();
const evalResult = evaluator.evaluate({
title: 'fix: navigation drawer bug on mobile',
files: ['src/components/Nav.tsx'],
});
if (evalResult.allowedToExecuteImmediately) {
// Proceed with autonomous execution
} else {
// Queue for human approval
}🌐 Powered by OIYO Lab
@oiyonet/decision-core is an open-source tool developed and maintained by OIYO Lab.
Explore our companion developer tools at tools.oiyo.net and deep technical engineering articles on blog.oiyo.net.
License
MIT © OIYO Lab
