Skip to content

Wiring-fix: single source of truth for review leaf list + CI enforcement#48

Merged
JesperSchulz merged 1 commit into
mainfrom
jesperschulz-wiring-fix-de-enumerate
Jun 25, 2026
Merged

Wiring-fix: single source of truth for review leaf list + CI enforcement#48
JesperSchulz merged 1 commit into
mainfrom
jesperschulz-wiring-fix-de-enumerate

Conversation

@JesperSchulz

Copy link
Copy Markdown
Collaborator

Problem

The super-skill microsoft/skills/review/al-code-review.md composes one leaf reviewer per knowledge domain. That leaf list was restated in four hand-maintained places, which collide on every concurrent domain PR/rebase and already produced a real off-by-one bug (README said "eight" while nine leaves existed):

  1. al-code-review.md frontmatter sub-skills:the source of truth
  2. al-code-review.md ## Source section — a redundant bullet re-list of the same paths
  3. al-code-review.md description: frontmatter — an enumerated parenthetical of domain names
  4. README.md — a sentence hardcoding a spelled-out count word + the enumerated domain list

Fix

Keep the list in exactly one place (frontmatter sub-skills:) and fully de-enumerate the other three:

  • al-code-review.md description — drop the (performance, security, …) parenthetical; now reads "…composing the AL review leaf skills, one per knowledge domain."
  • al-code-review.md ## Source — delete the redundant 11-path bullet list; keep the intro sentence and the trailing "added by updating the sub-skills list" paragraph.
  • README.md — replace "composes eleven leaf skills … (enumerated domains)" with "composes the AL review leaf skills … — one per knowledge domain." Markdown links preserved.

Enforcement — new validator rule R26

.github/scripts/validate_frontmatter.py gains cross-file rule R26. For any action-skill declaring a non-empty sub-skills: list, it compares the declared set against the sibling al-*-review.md leaf files actually on disk (set equality, ordering-agnostic, super-skill file excluded):

  • declared entry missing on disk → error (missing sub-skill file)
  • declared entry that isn't a real sibling leaf → error (stale entry)
  • on-disk leaf not in sub-skills: → error (leaf not registered — the "forgot to wire it up" case)

This shrinks every future domain PR to a single appended line and makes drift impossible. The existing R20 shape-check is untouched.

Validation

  • python .github/scripts/validate_frontmatter.py --root .0 errors / 0 warnings
  • pwsh .github/scripts/Test-KnowledgeIndex.ps1 -Root .PASSED (190 articles, unchanged)
  • Negative tests (not committed): removing a sub-skills line fires R26: leaf not registered; adding a non-existent entry fires R26: declared sub-skill does not exist on disk.

Co-authored-by: Copilot 223556219+Copilot@users.noreply.github.com

De-enumerate the AL review leaf list so it lives in exactly one place:
the al-code-review super-skill's frontmatter sub-skills list.

- al-code-review.md: drop the enumerated parenthetical from description
  and remove the redundant bullet re-list in the Source section.
- README.md: remove the hardcoded count word and the enumerated domain
  list from the leaf-skill sentence.
- validate_frontmatter.py: add cross-file rule R26 asserting a
  super-skill's declared sub-skills exactly match the sibling
  al-*-review.md leaf files on disk (missing, stale, and unregistered
  leaves all fail CI).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@JesperSchulz JesperSchulz merged commit 1eaf473 into main Jun 25, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant