Documentation Index
Fetch the complete documentation index at: https://docs.aethis.ai/llms.txt
Use this file to discover all available pages before exploring further.
Private beta. Rule authoring is invite-only private beta — approval required. Decision tools (decide, explain, schema, next question)
are available now with no sign-up.
Join the authoring waitlist →
Simple rules? Skip this phase. If your domain fits a single section (one coherent set of criteria, one decision), go straight to Phase 3 — Rule generation. Section discovery is for multi-section domains where decomposing the legislation correctly before authoring begins matters.
What section discovery does
Complex legislation often contains multiple distinct entitlements or criteria that operate independently. Section discovery proposes how to split source text into sections — each of which becomes its own independently testable rule ruleset.
For example, UK Free School Meals eligibility has three sections:
- Section A (child eligibility gate): age 4–15, attending a state-funded school in England
- Section B (means-tested household): qualifying benefit or income below threshold
- Section C (universal infant): automatic entitlement for Reception–Year 2, no income test
Sections A and B come from the Education Act 1996 and the Free School Meals Regulations 2014. Section C draws additionally from the Children and Families Act 2014. The Free School Meals Regulations 2014 contribute to all three sections — different regulations to each.
The outcome logic is A AND (B OR C): A is a prerequisite gate, B and C are alternative routes.
Run section discovery
aethis_discover_sections({
domain: "uk_fsm",
sources: [
{ name: "education_act_1996_s512.md", content: "..." },
{ name: "fsm_regulations_2014_reg3.md", content: "..." },
{ name: "fsm_regulations_2014_reg4.md", content: "..." },
{ name: "fsm_regulations_2014_reg4a.md", content: "..." },
{ name: "fsm_regulations_2014_reg5.md", content: "..." },
{ name: "children_families_act_2014_s105.md", content: "..." }
]
})
Returns:
{
"domain": "uk_fsm",
"proposed_sections": [
{
"section_id": "child_eligibility",
"name": "Child eligibility gate",
"description": "Age and school-type criteria that apply as a prerequisite to all FSM routes. Regulation 3 of the FSM Regulations 2014.",
"source_documents": ["fsm_regulations_2014_reg3.md", "education_act_1996_s512.md"]
},
{
"section_id": "household_qualifying_criteria",
"name": "Means-tested household criteria",
"description": "Qualifying benefit receipt or income below threshold. Regulations 4 and 4A of the FSM Regulations 2014.",
"source_documents": ["fsm_regulations_2014_reg4.md", "fsm_regulations_2014_reg4a.md"]
},
{
"section_id": "universal_infant_fsm",
"name": "Universal Infant Free School Meals",
"description": "Automatic entitlement for pupils in Reception, Year 1, or Year 2. No income test. Section 512ZB of the Education Act 1996 as inserted by s.105 of the Children and Families Act 2014. Regulation 5 of the FSM Regulations 2014.",
"source_documents": ["children_families_act_2014_s105.md", "fsm_regulations_2014_reg5.md", "education_act_1996_s512.md"]
}
],
"outcome_logic_suggestion": "A AND (B OR C)"
}
Notice that education_act_1996_s512.md appears in both Section A and Section C — different provisions of the same document apply to different sections.
Validate against your expected structure
If you know the sections you expect, validate immediately after discovery:
aethis_validate_sections({
domain: "uk_fsm",
expected_sections: [
"child_eligibility",
"household_qualifying_criteria",
"universal_infant_fsm"
]
})
Returns (all match):
{
"all_match": true,
"proposed_sections": ["child_eligibility", "household_qualifying_criteria", "universal_infant_fsm"],
"expected_sections": ["child_eligibility", "household_qualifying_criteria", "universal_infant_fsm"],
"discrepancies": []
}
Returns (mismatch):
{
"all_match": false,
"proposed_sections": ["child_eligibility", "household_qualifying_criteria"],
"expected_sections": ["child_eligibility", "household_qualifying_criteria", "universal_infant_fsm"],
"discrepancies": [
{
"type": "missing_from_proposed",
"section_id": "universal_infant_fsm",
"note": "Expected section not found in proposed list"
}
]
}
Refine if sections are wrong
If discovery merged sections that should be separate, or split a single section unnecessarily:
aethis_refine_sections({
domain: "uk_fsm",
feedback: "Universal Infant Free School Meals must be a separate section. It has no income test — Reception, Year 1 and Year 2 pupils qualify automatically under s.512ZB of the Education Act 1996 regardless of household circumstances. It should not be merged with the means-tested criteria."
})
Feedback must reference the specific source clause or principle. Vague feedback (“split it differently”) won’t converge. Provide the section name, why it should be separate, and the clause that establishes the boundary.
After section discovery
Once sections are agreed, create one project per section and move to Phase 2 — Field vocabulary.
aethis_create_ruleset({
name: "Child eligibility gate",
section_id: "child_eligibility",
domain: "uk_fsm",
source_text: "..." // text of the documents for this section only
})
Returns:
{ "project_id": "proj_8CzLVwyx53rTGEJv" }
Pass the same domain string on every aethis_create_ruleset call. Guidance added with aethis_add_domain_guidance applies automatically to all projects in the domain — no need to repeat cross-section principles on each ruleset individually.
Section composition
Sections compose into a rulebook at evaluation time. The outcome logic is applied across section results:
outcome_logic: "A AND (B OR C)"
Section A is a prerequisite gate. Sections B and C are alternative routes — passing either is sufficient. This mirrors the statutory structure: the Universal Infant entitlement (C) is layered on top of the means-tested route (B), both sharing the same child eligibility gate (A).
See the UK Free School Meals worked example for the full multi-section structure with source documents, test cases, and published ruleset IDs.