Skip to content

Every profile is parsed, its unknown keys rejected, and the default profile proven to exist

Each file under .ai/repo/profiles/ must parse, must carry only known keys, must have a name equal to its filename, and the profile the policy names as default must exist as a file. A policy that points at a profile nobody wrote is a failure, not a fallback to something else.

guaranteed Deterministic and blocking. Implemented, and a behavioural test proves it.

What it means

Each file under .ai/repo/profiles/ must parse, must carry only known keys, must have a name equal to its filename, and the profile the policy names as default must exist as a file. A policy that points at a profile nobody wrote is a failure, not a fallback to something else.

How it works

lib/doctor.sh iterates the profile directory, flattens each file with the same parser the policy uses, checks keys against share/allow/profile.txt, compares name with the filename, and finally looks up profiles.default from the policy on disk. majordomus start performs the same lookup for the profile a task names and refuses with exit code 12 when the file is absent.

How to see it

sed -i.bak 's/^name: routine/name: other/' .ai/repo/profiles/routine.yaml
majordomus doctor
# FAIL profiles    routine — name field 'other' does not match filename

What it does not cover

Doctor does not judge whether a profile's values are sensible for your team; effort: max on routine parses fine. It validates shape and existence.

Why it exists

Four mutually inconsistent, unenforced status vocabularies and profiles that existed only in prose were found in the source environment. A profile is only a decision if a command can read it and fail when it is missing.

Detail rendered from docs/claims/profile-validate.md.

Provenance

defined in
read it on this site · docs/SCHEMAS.md
implemented in
lib/doctor.sh · majordomus doctor
proved by
test/cases/02_doctor_basic.sh
claim id
profile-validate

Verify it yourself

The test runs in a disposable temporary repository and asserts the behaviour, not a string in the source.

from a clone of the repository
bash test/run.sh 02_doctor_basic

Where this claim is used

responsibilities it covers

Related claims same implementation