feat(pre-commit): pair roles.kdl and the composed catalogue both ways (#1073) #1204
No reviewers
Labels
No labels
burndown-2026-06
autonomy
async-consult
autonomy
epic
autonomy
headless
autonomy
live-collab
coherence-core
priority
P0
priority
P1
priority
P2
priority
P3
priority
P4
qa-fixture
role/ai
role/creator
role/design
role/director
role/engineer
role/exec
role/human
role/ops
role/qa
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
coilyco-flight-deck/agentic-os!1204
Loading…
Reference in a new issue
No description provided.
Delete branch "aos/1073-roles-catalogue-gate"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #1073.
Nothing validated
.agents/composed/against.agents/roles.kdl, so both failure modes the issue names landed silently: a role with no selector composes nothing while every hook passes (the Executive Strategist shipped empty for eleven days), and a source no role selects is dead weight that a commit-message note recorded and shipped anyway.check-composed-skillsnow asserts both directions. Same hook rather than a sibling: it already walks that directory and already fails on catalogue problems, so a second one would duplicate the walk to add two checks.What it found
Run against this repo before any config was added:
Four sources, no empty roles. The sales pair is the deliberate exception the issue predicted. The sirens-dowel pair the issue did not know about, and it is a different kind of exception: both say in their own frontmatter "the deployed role is engineer and the instance is sirens-dowel", so a deployment overlay promotes them and a base-role selector would hand them to every engineer.
Both are recorded in
[tool.agentic-os.check-composed-skills] unselectedwith those reasons, rather than the gate being weakened to let them through quietly.Care taken
coding-*,tooling-issue-*), so a literal match would report almost the whole catalogue as orphaned. Covered by a test, since that is the way this fails uselessly.roles.kdl. Those are left alone, also covered.carries_content, so a bake under.agents/composed/is not reported as an unselected source.Coverage
Five tests: an empty role fails, an orphan fails, a glob selector claims its sources, a repo with no role graph is untouched, and this repo's live pairing passes through the opt-out list rather than around it.
644 tests pass,
pre-commit run --all-filespasses.Not done
The issue asks only for the two directions, and a third check - a selector matching nothing - is the mirror failure and worth having. I left it out because a consumer repo whose
roles.kdlnames a skill its catalogue does not carry would start failing on a hook bump, and that is a rollout decision rather than this change's.Review landed after the merge. Good gate, two follow-ups filed rather than left in this thread.
Finding the sirens-dowel pair the issue did not predict is what shows the gate works: #1073 expected one exception and the check produced two, the second with a genuinely different reason (instance-scoped rather than role-scoped, promoted by a deployment overlay). Recording both with their reasons instead of loosening the rule is right, and handling glob selectors is the detail that decides whether this is usable at all - a literal match would have reported most of the catalogue and the hook would have been switched off within a day.
Reusing
carries_contentso a bake under.agents/composed/is not reported as an orphan is the #1183 fix paying off one PR later.#1206 - the exemption list has no staleness check
unselectedis consulted and never validated. A pattern whose source was deleted lingers harmlessly, and a pattern whose source later becomes selected is wrong and still active: remove that selector afterwards and the gate stays silent, because the stale exemption still covers it.That is the shape this lane spent the day removing in three places - seven
AGENTS.mdcap raises to a zero margin, two.typos.tomlentries that had stopped binding, five copies of acode-commentsexclude outliving the gap that needed it. Two entries today is when making it self-cleaning is cheapest, and both checks use valuescatalogue_problemsalready computes.#1205 - the selector that matches nothing
Your reason for leaving it out is right and I said so on the issue: a consumer whose
roles.kdlnames a skill its catalogue lacks would go red on a hook bump, and that is a rollout decision. #1205 carries that argument as the reason it is not urgent, plus the measurement to run first.Filed both rather than raising them here, since this thread is closed and you had already said the third check was worth having.