"Quickstart: Claude Code"
Install the dsail package, run dsail init once, and let Claude Code compile and check a policy from the repository.
For a coding agent working in a repository. Turn a written policy into rules a program can check, keep the rules in the repo, and call the hosted service for every check.
1. Install
pip install dsail
dsail init
dsail init writes three things into the repository, all idempotent: a Claude Code skill at .claude/skills/dsail/SKILL.md carrying the authoring sequence and grammar, a dsail entry in .mcp.json that launches the stdio proxy dsail mcp, and a marked stanza in CLAUDE.md. Commit them; every later session, by anyone, finds DSAIL without being told.
The package name dsail is reserved on PyPI. Until the public release ships, install from the distribution Jaxon gives you (pip install ./dsail-*.whl).
2. One command
Ask Claude Code, in the repository:
Enforce our expense policy: receipts over 75 USD, nothing over 5,000 USD.
It restates the policy, asks you to confirm, writes policies/expenses.dsail, compiles it through the dsail_compile tool (the proxy forwards to the hosted REST door over HTTPS), and replays a few adversarial claim dictionaries against its own draft before showing you anything. An evaluation credential is obtained automatically on the first call; nothing to sign up for.
3. A result
dsail check policies/expenses.dsail --claims claims.json --summary
receipt_over_75 FALSE counterexample: amount = 120 USD, has_receipt = false
within_cap TRUE
For review by a person, dsail serve policies/expenses.dsail prints a localhost link to the same review widget the chat clients render; approval there is recorded on the service against the exact hash.
What the agent gets
- The same ten
dsail_*tools the chat clients have, with the same descriptions — the proxy publishes the bundled definitions verbatim. - Results per assertion in four words,
TRUE,FALSE,UNKNOWN,AMBIGUOUS, and no overall verdict to invent. Unknown is an answer, not a guess. - A structured error on every failure, each carrying the
docsURL of the page that resolves it (Errors).
If the first call fails saying outbound network access is blocked, the message names the one-time organisation-level fix; relay it verbatim.
Next: Quickstart: REST for the production integration, or the REST API reference.