Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Architecture overview

Note

Design document: draft. Authorization, approvals, evidence, and early client/integration code exist in source; platform, host, and milestone validation remain incomplete.

Shiin is a local, agent-agnostic authorization layer for AI agent actions. It sits between agents and the files, commands, networks, and services they act on.

Components

flowchart LR
    agent["Agent"] -->|proposed action| adapter["Adapter"]
    adapter -->|action request| engine["Engine"]
    policy["Policy and task declaration"] --> engine
    engine --> decision{"Decision"}
    decision -->|allow or deny| adapter
    decision -->|pending| approver["Approver"]
    approver -->|resolution| adapter
    decision --> audit["Audit log"]

Engine

The engine is the pure, synchronous component that evaluates an action request against a policy snapshot and returns a decision. It performs no I/O (ADR-0010).

Adapters

An adapter connects a host to Shiin. It intercepts proposed actions, builds action requests, and enforces the resulting decision using the host’s own protocol. Adapters never make decisions.

Audit log

The audit log is an append-only JSON Lines file of audit events linked by a hash chain. It is tamper-evident, not tamper-proof.

Crates

The component map is described in Workspace and crates. The engine crates are shiin-schema, shiin-classify, shiin-policy, and shiin-engine.

Deployment

Shiin is local-first and daemonless in v0.1 (ADR-0022). The Unix per-user daemon is implemented in source for approvals; Windows transport and broader platform validation remain open. See Deployment models.