Skip to content
Isonapse
Install

Rules that travel with the repository

Keep rules in the repository, so every clone starts with them.

Keep project rules with the repository

Your user policy is the shared baseline. Managed controls come first, followed by project policy and then user policy. Learned history is stored by normalized Git origin, or by the canonical repository path when no origin exists; clones with the same origin share that identity. Enforce consults repository history first and can fall back to discounted machine-wide learning when it has no opinion.

After some ordinary work, run this inside the Git checkout whose rules you want to publish. It previews the draft against that project's policy, rather than the user-policy preview in Switch to Enforce.

isonapse hook suggest --repo . --diff

Stop and review the diff before applying it.

isonapse hook apply --target project
isonapse hook policy show --repo .

Project apply writes restrictions to .isonapse/policy.lua, then attempts the guarded Enforce transition. If admission fails, the policy remains applied but the mode is unchanged. Check status and the effective policy, then commit that file to Git:

git add .isonapse/policy.lua && git commit

Fresh clones inherit its restrictions without a trust grant. This does not turn repository policy into an operating-system sandbox.

Gate mode is machine-wide. Profile, Normal and Enforce are one setting for the whole machine, not one per repository. If you are still in Profile or Normal, the Enforce transition that project apply attempts switches every repository and every host on this machine to Enforce, not only this project. If the apply in Switch to Enforce completed its Enforce transition, you are in Enforce already. Check the current mode first with isonapse hook mode.

To see what this repository has learned so far, run isonapse hook suggest --repo . without --diff. Its summary names the evidence it used and says when the repository had no observations of its own and the draft fell back to machine-wide learning.

Only a deliberately reviewed project rule that widens the user baseline needs isonapse hook trust .. That grant is bound to the exact policy bytes; changing them revokes widening authority. Managed limits still win. List the current grants with isonapse hook trust --list and revoke one with isonapse hook untrust .. Ordinary isonapse hook apply targets the user layer, not this project file.

Stuck? Help finds the message you see.