nominee
AGENTS.md0 starsChanged 15 days agoMITView on GitHub
This repository is a reference implementation of MCP Tasks gated by a custom approval backend using Auth0 identity and FGA permissions. “Task Authority” is that backend's internal name, not an Auth0 product. Policy Desk embeds it in the same Cloudflare Worker as the app and MCP server. Read README.md and docs/architecture.md for what it is. This file tells you how to deploy it for a user and how to work on it. Follow docs/deploy-cloudflare.md. Condensed: Run it with --dry-run first…
- Reads credentials
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 35,266 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
The file
We split this AGENTS.md into the rules it gives an agent
4 rules. About 0 are common, 2 are distinctive, and 2 are 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.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 7
Follow docs/deploy-cloudflare.md.
- Very specific: line 13
Run setup with secrets in the environment and --yes, so it never waits on a question:
- Distinctive: line 29
Use the offline loop; it needs no server:
- Very specific: line 46
Never commit secrets. .dev.vars* and .env* are ignored.
≈ “Common” is an estimate: at least 1 in 5 of the 45,344 AGENTS.md 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
Instructions for coding agents
This repository is a reference implementation of MCP Tasks gated by a custom approval backend using Auth0 identity and FGA permissions. “Task Authority” is that backend's internal name, not an Auth0 product. Policy Desk embeds it in the same Cloudflare Worker as the app and MCP server. Read README.md and docs/architecture.md for what it is. This file tells you how to deploy it for a user and how to work on it.
Deploy a working copy for a user
Follow docs/deploy-cloudflare.md. Condensed:
- Confirm the user has: a Cloudflare account, an Auth0 account with a new tenant (https://auth0.com/signup), an Auth0 FGA store (https://dashboard.fga.dev), and a Postgres owner connection string. You cannot create these accounts for them; ask once, for all of them together.
- Ask the user to create the FGA client (dashboard Settings > Create Client, all permission sets) and give you the Store ID, Client ID and Client Secret. Treat the secret like a password: pass it through the environment, never in a command line, a file in the repo, or a message you echo back.
- Deploy the Worker: either the user clicks the Deploy to Cloudflare button in the README, or you add
--deployin step 5 (then--origincan be omitted; setup reads the URL from Wrangler). - Make sure the CLIs are installed and logged in. On a terminal the user can answer, plain
npm run setupopens the Auth0 and Wrangler logins itself. Without one, the user runsauth0 login --scopes "<list>"(setup prints the exact list when it is missing a scope) andnpx wrangler login. Check withnpm run doctor -- --deploy, which also confirms the setup variables are set and the owner database answers (it never prints their values). Run setup with secrets in the environment and
--yes, so it never waits on a question:OWNER_DATABASE_URL=... FGA_STORE_ID=... FGA_CLIENT_ID=... FGA_CLIENT_SECRET=... \ npm run setup -- --yes --tenant <tenant domain> --origin <Worker https origin> \ --admin-email <user's email> [--deploy]Run it with
--dry-runfirst if the tenant is not brand new, and show the user the plan. The delegating user defaults to the user's+alexaddress; override with--alex-email. Step 7 opens a browser for that user's one-time sign-in; the user must complete it (password in~/.policy-desk/auth0-state.json,alex.password). If they cannot right now, pass--skip-alex-loginand re-run setup without it later. Re-runs reconcile managed Auth0 objects and rotate the database runtime password and IP-hash salt; they are not read-only.- Verify: setup ends with a read-only checklist.
npm run verifyrepeats it but does not prove an interactive approval, FGA access or Alex's refresh grant. Walk the user through "Your first approval" in the guide. Default approvals need the user's own passkey (routine TOTP is an explicit demo opt-in); never approve on their behalf.
Setup is rerunnable, but not a no-op. On failure, read the error, fix the cause (the troubleshooting table in the guide covers the common ones), and re-run the same command.
Write or change an approval policy
Use the offline loop; it needs no server:
npm run --silent task-authority -- policy init refunds > refunds.json
npm run task-authority -- policy check refunds.json
npm run task-authority -- policy explain refunds.json refund:create --actor agent --args '{"amountMinor":5000,"currency":"usd"}'check runs the same validation as publishing. Use explain to show the user the decision for each example they care about before publishing. Reference: docs/approval-policy.md.
Working on the code
npm ci,npm run db:up(Postgres in Docker on127.0.0.1:55432, or setTEST_PG_ADMIN_URL), thennpm run checkbefore every push: it is what CI runs.npm run doctorexplains a failing prerequisite.- To try a change end to end with a real MCP host,
npm run local -- --ownerand Claude Code (docs/claude-code.md). - Where things live: docs/README.md.
- Layers:
auth0/service(custom approval backend),auth0/sdk(local unpublished client),demo/*(apps). Theauth0/directory is not an ownership or hosting claim.node auth0/tools/check-boundaries.mjsenforces SDK-only access for Refund Desk and Deploy Gate; Policy Desk is the explicit exception because it embeds the backend. - The root
wrangler.jsoncis the one-click deployment.demo/policy-desk/wrangler.jsoncis the maintainer's hosted demo (custom domain); do not point a user's deploy at it. - Never commit secrets.
.dev.vars*and.env*are ignored; the lint step scans tracked files.
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.

