Why field vocabulary matters
Test cases are written against field names. If the names in your test cases don’t exactly match the names the engine expects, the tests will silently fail for the wrong reason — the engine receives an unknown field and treats it as absent. Phase 2 resolves this before test writing begins. You discover what fields the source text implies, validate them against your expected spec, and confirm names before writing a single test case.Step 1 — Discover fields from source text
Step 2 — Set a field spec (optional but recommended)
If you know the fields you expect before discovery, set a spec upfront.aethis_discover_fields will auto-validate against it:
aethis_discover_fields returns a validation result alongside the field list showing any missing fields, type mismatches, or unexpected extras.
Pin field notes exactly
Usenotes on a field spec when the note content is authoritative. It is an
ordered list of objects. Each has a required note_text string, an optional
source string, and an optional metadata object. The metadata is opaque
JSON: the engine preserves it without assigning meaning to its keys.
fields/fields.yaml:
- Omit
noteson a field to leave its notes to the model. - Send
notes: []to clear the field’s notes authoritatively. - Do not send
notes: null. The API rejects it with a422; use[]to clear.
note_text, source, and metadata. An unknown key, or
an entry without note_text, is rejected with a 422. The CLI (v0.43.0+)
applies the same checks to fields.yaml before it makes any engine call, and
sends each entry exactly as written.
During generation, the engine checks an authored list exactly, including list
order and metadata (object key order does not matter), and checks it again
before it saves the resulting ruleset. If the generated ruleset’s notes still
differ, the generation fails with authored_notes_mismatch. When you refine a
ruleset whose fields already carry the declared notes, the refinement can leave
them unchanged.
aethis_validate_fields is a separate check. It compares field keys, types, and
enum values; it does not validate authored notes.
Step 3 — Explicit validation
Validate discovered fields against your spec as a gate before writing test cases:Refine if fields are wrong
aethis_discover_fields to confirm the change.
Field naming conventions
Consistent naming within a domain makes test cases readable and prevents silently mismatched fields. Every field in a domain should follow the same convention.