Skip to content

test(scaffold): add frontmatter spec gate for skills and agents#55

Merged
shyamsridhar123 merged 5 commits into
All-The-Vibes:mainfrom
andreaswasita:chore/skill-spec-gate
Jun 7, 2026
Merged

test(scaffold): add frontmatter spec gate for skills and agents#55
shyamsridhar123 merged 5 commits into
All-The-Vibes:mainfrom
andreaswasita:chore/skill-spec-gate

Conversation

@andreaswasita

@andreaswasita andreaswasita commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

What

Adds a structural regression gate (pkg/scaffold/skillspec_test.go) that
validates the YAML frontmatter of every shipped Copilot skill and agent
definition, so the repo's growing definition set cannot silently drift out of
the shape the Copilot harness expects.

Ported from the governance verify.sh spec-checks in
copilot-agents-dojo,
re-expressed as a native Go test so it runs inside the existing go test ./...
CI with zero new tooling.

Trees covered

  • .github/skills and .github/agents (canonical dogfood definitions)
  • pkg/scaffold/templates/skills and pkg/scaffold/templates/agents
    (consumer-facing templates)

Invariants enforced (calibrated to pass green on current main)

  • standalone --- / --- delimiters (CRLF-normalized, so .github CRLF and
    template LF are treated identically)
  • required keys present: skill name+description; agent
    description+user-invocable
  • skill name matches its folder and is unique across a tree
  • no duplicate frontmatter keys
  • descriptions are not unfilled placeholders (TODO/TBD/…)
  • user-invocable ∈ {true,false}
  • non-empty body after frontmatter

Deliberately no stylistic policy ATV doesn't already follow (no description
length cap, no required-section list, no naming-style rule beyond name==folder).
A self-test (TestParseFrontmatterRejectsMalformed) proves the gate is not
vacuous.

Stacked on #56

The agent-template coverage depends on the corruption repair in #56. This
branch therefore merges #56, so until #56 lands this PR's diff temporarily
includes #56's files. Review/merge #56 first; this diff will then reduce to the
test file (+ CHANGELOG).

Verification

go test ./pkg/scaffold/ passes. (The only failure in this Windows env,
TestDogfoodPromptParity, is a pre-existing CRLF artifact unrelated to this
change and green on Linux CI.)

andreaswasita and others added 2 commits June 5, 2026 01:31
Add skillspec_test.go, a structural regression guard that validates the
frontmatter of every shipped Copilot definition under .github/skills,
.github/agents, and pkg/scaffold/templates/skills stays well-formed and
complete, so definitions cannot silently drift out of spec as the set
grows.

Calibrated to existing conventions so it is green on current main:
requires well-formed standalone --- delimiters, required keys (skill
name/description, agent description/user-invocable), name == folder for
skills, unique skill names within a tree, no duplicate keys,
non-placeholder descriptions, and a non-empty body. It deliberately does
NOT enforce a description length cap, required body sections, or any
naming style beyond name == folder. Includes unit tests proving each
defect class is rejected (not a vacuous gate).

pkg/scaffold/templates/agents is intentionally excluded: those files are
currently stored single-line (collapsed frontmatter) and are not
standard line-delimited YAML frontmatter; tracked as follow-up.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
andreaswasita and others added 3 commits June 5, 2026 01:58
Now that the scaffolded agent templates are repaired (no longer single-line
minified), hold pkg/scaffold/templates/agents to the same structural contract
as .github/agents: well-formed delimited frontmatter, a non-placeholder
description, a boolean user-invocable, and a non-empty body.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@shyamsridhar123 shyamsridhar123 merged commit 4953743 into All-The-Vibes:main Jun 7, 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.

2 participants