AI coding agent admin guide·verified October 21, 2026

different ai agent rules per team

Different engineers need different agent guardrails. Scope policies by repository, machine and role, and know which scope wins when they overlap.

the short answer

Yes. Repository rules live in project-scope policy files committed with the code. Central rules are deployed per machine from the console, in observe or enforce mode. Persona assignment, such as stricter rules for on-call or infra admins, is available in managed deployments, and you can also key a policy on the credentials a command uses. Use repository scope for conventions, persona and credential rules for risk, and one base pack everywhere.

Repository
<repo>/.failproofai/policies/*policies.{js,mjs,ts}, committed
Local
<repo>/.failproofai/policies-config.local.json, one user, gitignored
User
~/.failproofai/policies/ and ~/.failproofai/policies-config.json
Machine
Cloud deployment per machine, observe or enforce
Persona
Assigned in managed deployments, or keyed on the credentials in a command

The Scopes

ScopeWhere it livesWho changes itUse it for
Repository (project).failproofai/policies/ and .failproofai/policies-config.json in the repoAnyone who can merge to the repoProject conventions: generated files, package manager, test-before-stop
Local.failproofai/policies-config.local.json in the repo, gitignoredOne developer, for one projectOverrides for that developer only; not a control
User~/.failproofai/policies/ and ~/.failproofai/policies-config.jsonThe developerPersonal preferences; not a control
MachineCloud deployment from Admin → enforcement or fp fleet deployAdminsOrg-wide guardrails, observe or enforce per policy
PersonaAssigned by role in managed deployments, or a policy that keys on elevated credentialsAdminsStricter rules for infra admins and on-call

A Typical Persona Map

Failproof’s managed console lets admins assign policy sets by persona; ask us how persona assignments map to machine deployments in your setup. You can also script per-machine assignments yourself with fp fleet deploy.

PersonaAdds on top of the base pack
All engineersPack defaults (secrets, push to main, sudo, curl-pipe-sh), plus block-force-push
BackendDatabase target checks, migration conventions
Infra and platform adminsTerraform plan-only, Route 53 protection, Kubernetes prod guard, approved AWS profile
On-call (rotating)Elevated-profile guard: agents diagnose, humans change production
Contractorsblock-read-outside-cwd (off by default in the pack), no cloud CLI

Scripting per-Machine Assignment

Label machines right after enrolling (failproofai config --machine-label infra-alice-mbp); the flag renames a machine that is already connected, and hostnames rarely survive laptop replacement. fp fleet deploy replaces the machine’s set with the computed result: --add keeps what is there, while --set replaces it, so include the base policies when you use --set. Fleet commands exit with an error under an API key, so run this as a signed-in admin, not from unattended CI. Check the JSON shape of fp fleet list in your installed version before relying on the field names.

fp login                             # fleet commands need a signed-in session with policies:write
fp policies publish terraform-plan-only ./terraform-plan-only.policy.mjs
fp policies publish protect-route53 ./protect-route53.policy.mjs

# Deploy the infra-admin set to every machine labelled infra-*
for id in $(fp --json fleet list | jq -r '.[] | select(.label | startswith("infra-")) | .id'); do
  fp fleet deploy "$id" --yes \
    --add terraform-plan-only:enforce \
    --add protect-route53:enforce
done

When Scopes Overlap

  • Built-in policies evaluate before custom ones, and the first deny stops evaluation. A repository cannot “allow” its way past a central deny.
  • Policy parameters (for example allowPaths on block-rm-rf) come from the first scope that defines them, in project, local, user order.
  • Which pack policies are on is machine-wide, not per repository, regardless of --scope.
  • Repository policies are code that anyone with merge rights can change. Treat .failproofai/ like CI config and require review on it.

Credential-Keyed Rules Are Harder to Escape

Machine-based assignment assumes the right person is on the right laptop. Credential-keyed rules assume nothing: they apply stricter checks whenever a command names an elevated profile, whoever runs it. That is the better fit for rotating roles like on-call; see on-call guardrails.

FAQ

Can a repository weaken an org-wide policy?

A repository can add policies and set parameters for its own scope, and parameters can broaden what a built-in allows (for example an allow path). Review .failproofai/ changes like CI changes. A repository cannot remove a centrally deployed policy.

Can I target a policy at one user rather than a machine?

Central deployments target machines. Map people to machines with labels after enrollment, use persona assignment in a managed deployment, or key the policy on the credentials that person holds.

How do I see which policies a machine runs?

On the machine, failproofai policies. Centrally, fp fleet show <machine-id> or the machine row under Admin → enforcement.

Sources

Checked against the sources below on October 21, 2026. Harness settings, hook capabilities and cloud features change between versions.

  1. Failproof AI docs: Local configuration
  2. Failproof AI docs: Custom policies (policy SDK)
  3. Failproof AI docs: Deploy a policy
  4. Failproof AI docs: Cloud CLI reference
  5. Failproof AI docs: failproofai CLI reference
  6. Failproof AI docs: Use a policy pack
  7. Failproof AI docs: Users and organizations