Guidance for AI coding agents working in the Dogwood policy-language package. This file is intentionally short; it points to detailed procedures rather than inlining them, so it costs little when it is not relevant.
Setting up Dogwood authorization has a lifecycle, and there is a procedure
(a skill under .claude/skills/) for each stage. Follow the one matching what
the user is actually doing — each is the single source of truth for its task,
references the guide rather than duplicating it, and enforces a mandatory
dogwood CLI validation gate. Ignore this section for unrelated requests.
The lifecycle and its skills (dependency order):
- Action schema — declare the Cedar
.cedarschema: the entity types (principals/resources), one action per tool/operation, and each action'scontext.input/output/systemlayout — hand-written or generated from an MCPtools/listmanifest. This is the prerequisite for everything else. →.claude/skills/authoring-action-schema/SKILL.md(gate:dogwood schema action schema.cedarschema) - Service schema (only if needed) — the event schema (
.dwschema: event kinds, decision vs history points, pins, themax_windowlook-back cap) and/or information providers (providers.json+ Rhai). Optional; defaults sensibly (request/response/error kinds with onlyrequestdeciding, a universal principal pin, a 24h window cap, no providers, standard macros). →.claude/skills/authoring-service-schema/SKILL.md(gate:dogwood schema event/providers, then compositedogwood validate) - Policies — turn a natural-language authorization requirement ("permit X
only if Y", "deny after Z", "no more than N per hour") into a validated
.dwpolicy. →.claude/skills/autoformalize-policies/SKILL.md(gate:dogwood validate policy.dw --policy-schema schema.cedarschema) - Check / replay — validate or replay existing files with the
dogwoodCLI. →dogwood-docs/guide/12-cli.md
Pick by what the user names: entities/actions/MCP tools → (1); event kinds or providers → (2); a prose access rule → (3); running the CLI on existing files → (4). Read the matching skill file and follow it exactly.
This is a Cargo workspace of Rust crates (dogwood-language, dogwood-cli,
dogwood-docs). Build and test with cargo build / cargo test from the
workspace root. See the crate READMEs and
dogwood-docs/guide/ for the language, and
dogwood-docs/guide/12-cli.md for the dogwood
CLI.