You are a coding agent. Given source legislation + test cases, you’re producing a deterministic rule ruleset. This is the authoring workflow. Three phases — each gated on the previous. Only phase 3 has a TDD loop today; phases 1 and 2 are informal. Requires an Aethis API key withDocumentation Index
Fetch the complete documentation index at: https://docs.aethis.ai/llms.txt
Use this file to discover all available pages before exploring further.
projects:write and rulesets:write. Set AETHIS_API_KEY in your environment. If you’re using MCP, the key goes in the MCP client config (see MCP install).
Phase 1 — Section discovery
Legislation often covers multiple independent criteria. Split each into its own section so they can be tested and regenerated separately.CLI path
MCP path
Phase 2 — Field vocabulary
Define the input fields each section will consume. Shared vocabulary across sections lets rulebooks compose cleanly.CLI path
MCP path
Phase 3 — Rule generation (TDD loop)
The only phase with an automated test gate. Test-first is non-negotiable: write the tests, THEN generate, THEN iterate until green.Step 3.1 — Write tests
Step 3.2 — Generate
Step 3.3 — Review + refine
aethis_generate_and_test handles this internally — you just pass guidance hints via aethis_add_guidance.
Step 3.4 — Publish
Only publish whenaethis test shows 100% pass. The publish endpoint runs the tests again server-side as a gate.
Composing sections into a rulebook
Once each section has an active ruleset with a stable slug, create the rulebook. See the worked UK Free School Meals example for a full multi-section composition including theoutcome_logic AST.
outcome_logic must be a proper Expr AST. The server rejects the text shorthand { "expr": "A AND B" } with HTTP 422 at ingress since aethis-core 0.7.2. To find the group names your sections emit, inspect each ruleset’s compiled criteria — or use a known pattern like the one in the FSM example.
Verification checklist
Before declaring a rule complete:aethis testpasses 100% on the ruleset that’s about to be published/decidewith the publishedruleset_idreturns the expected decision for each test input- If the rule is public-facing,
visibilityispublic(auto-set foraethis/*slugs; usePATCH /rulesets/<id>/visibilityotherwise) - The ruleset shows up in
GET /api/v1/public/rulesets(public) or via the authored key (private)
Next steps
- Debug a failing decide — when tests pass but
/decidesurprises you - Worked examples — full projects you can crib from
- MCP tools reference — every authoring tool