deterministic-authority
Skill3 starsChanged 38 days agoMITView on GitHub
Build deterministic admission and authorization between model proposals and side effects. Use when an LLM can propose state changes, money movements, permission decisions or actions subject to executable constraints, or reviewing whether a model can override policy. Do not use for purely advisory text generation or ordinary business logic with no model-to-action trust boundary.
In this repository18 other files it gives its agents.
- agent-architectureSkill
- agent-cost-and-latencySkill
- agent-development-workflowSkill
- agent-evalsSkill
- agent-failure-recoverySkill
- agent-guardrailsSkill
- agent-observabilitySkill
- agent-orchestrationSkill
- agent-securitySkill
- agent-state-and-memorySkill
- agent-testingSkill
- evidence-provenanceSkill
- human-in-the-loopSkill
- prompt-engineeringSkill
- rag-engineeringSkill
- structured-output-designSkill
- tool-designSkill
- tool-evalsSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 2 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 18
Keep stages explicit: bounded parsing/schema → semantic validation → policy/permissions/invariants → required approval → admission …
- Distinctive: line 25
Keep explicit policy exceptions auditable and narrowly scoped.
- Distinctive: line 33
Use human-in-the-loop to design review experience and agent-guardrails to assemble defense layers.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Deterministic Authority
MODEL = advisory/proposal layer. DETERMINISTIC CODE = validation and authority layer. A model may suggest an exception; only the trusted policy path can define and authorize one.
Establish an admission contract
- Enumerate each action, authenticated principal, resources, authoritative facts, invariants, permissions, impact and policy owner. Derive identity and permissions from trusted execution context. Model-supplied role, confidence, approved=true and natural-language memory have no authority.
- Express business rules and calculations in deterministic code using typed inputs and explicit units. Validate cross-resource and tenant constraints, freshness, current state version and available budget. Return structured allow, deny or needs_approval with reason codes and policy version. Missing facts, policy errors and unknown action types fail closed for execution.
- Keep stages explicit: bounded parsing/schema → semantic validation → policy/permissions/invariants → required approval → admission immediately before execution → tool execution → receipt/evidence → evaluator → deterministic state transition. Validators do not issue permissions, and evaluators do not retroactively authorize an action.
Prevent bypass and race conditions
- Enforce admission at every side-effect entry point, including retries, resumed runs, workers and alternate tools. A system prompt is not a policy engine. Avoid a generic execute capability that bypasses the constrained executor.
- Bind any authorization/approval grant to principal, action, resource, canonical arguments, state/policy version, expiry and use count. The application issues the grant; the model cannot mint one. Recheck policy if facts change. Use a transaction or compare-and-set to prevent state changes between admission and commit; handle conflict by a fresh decision rather than trusting an earlier allow.
- Define idempotency and concurrent budget reservation in the trusted executor. Two individually allowed actions can violate a cumulative limit; check/reserve the aggregate atomically. Preserve deny decisions in the run evidence without exposing secrets.
- Keep explicit policy exceptions auditable and narrowly scoped. Human approval may satisfy a required discretionary gate but cannot silently waive a hard invariant or exceed the approver's authority. Change the policy through its authorized process if an exception is truly intended.
Verify adversarial proposals
Deliver the action/policy table, typed admission function or pseudocode, denial examples, authorized execution path and tests. Exercise forged approval, stale state, absent facts, policy outage, alternate path, concurrent overdraw and retry/resume. Prove denial leaves state unchanged and allow commits once with a valid receipt.
Example: balance=100 units, reserve floor=20, proposal transfer=90. Trusted code rejects because 100−90 is below 20 even if the model cites an urgent request and approval. A later valid transfer still needs principal permissions and a fresh atomic balance check.
Use human-in-the-loop to design review experience and agent-guardrails to assemble defense layers. This skill owns enforceable admission, not the user interface or every surrounding safety mechanism.
Construct before terminal failure
An invalid proposal is denied, but need not end the task. If authorized facts permit a valid solution, construct a fresh candidate (or deterministic solution), verify against the same invariants, then seek admission. Bound alternatives, model calls and deadline. Do not silently change the requested amount or commit an alternative the user did not authorize; prepare a preview where approval is needed. Distinguish missing permission, irreconcilable constraints and unavailable required facts from repairable candidate errors. Every rejected candidate stays effect-free; only a freshly validated and authorized candidate executes. Fail closed when no admissible candidate can be established.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

