Validate skills against the open Agent Skills spec (N2 WP4) #28

Merged
weichen merged 1 commits from feature/n2-skills-wp4 into main 2026-10-07 13:52:49 +00:00
Owner

Why: the completion doc N2 requires skills validated per the open spec; today frontmatter was a description-only line hack with silent skips, no name field, and no error surface.

What:

  • frontmatter.go: dependency-free strict-subset parser (scalars, metadata string map, space-delimited allowed-tools) and spec validation — name required + kebab-case + equals directory, description required ≤1024, known-keys whitelist with located rejection, compatibility ≤500.
  • Store.Diagnostics() surfaces per-skill reasons; Load returns the located validation error for same-named invalid skills (no more silent skip, no vague unknown).
  • ValidateSkillDocument exported so the product plugin/seed paths share the validator.
  • Fixtures updated to spec form across skills/resources/adapter tests.

Evidence: GOWORK=off go vet + go test -count=1 ./... green.

Impact: stricter by design (recorded in the N2 card) — skills without name/description or with unknown keys now produce located errors.

Refs: Agent-System-Documents#42 (N2 plan WP4)

Why: the completion doc N2 requires skills validated per the open spec; today frontmatter was a description-only line hack with silent skips, no name field, and no error surface. What: - frontmatter.go: dependency-free strict-subset parser (scalars, metadata string map, space-delimited allowed-tools) and spec validation — name required + kebab-case + equals directory, description required ≤1024, known-keys whitelist with located rejection, compatibility ≤500. - Store.Diagnostics() surfaces per-skill reasons; Load returns the located validation error for same-named invalid skills (no more silent skip, no vague unknown). - ValidateSkillDocument exported so the product plugin/seed paths share the validator. - Fixtures updated to spec form across skills/resources/adapter tests. Evidence: GOWORK=off go vet + go test -count=1 ./... green. Impact: stricter by design (recorded in the N2 card) — skills without name/description or with unknown keys now produce located errors. Refs: Agent-System-Documents#42 (N2 plan WP4)
weichen added 1 commit 2026-10-07 13:51:25 +00:00
Validate skills against the open Agent Skills spec (N2 WP4)
ci / vet-and-test (pull_request) Successful in 1m1s
ci / docker-checkout-hostgateway (pull_request) Successful in 1s
e1fac5864d
Why: the completion doc's N2 requires skills validated per the open
spec; today frontmatter was a description-only line hack with silent
skips, no name field, and no error surface.
Evidence: GOWORK=off go vet + go test -count=1 ./... green; parser
units cover all field forms and reject malformed shapes with located
errors; the validation matrix covers kebab-case/name-equals-dir/
required description/limits; Store.Diagnostics surfaces per-skill
reasons and Load returns the located validation error for same-named
invalid skills; existing fixtures updated to spec form.
Impact: stricter by design — skills without name/description or with
unknown frontmatter keys now produce located errors instead of silently
loading or silently skipping; ValidateSkillDocument is exported so the
product plugin/seed paths share the same validator.
Refs: Agent-System-Documents#42 (N2 plan WP4)
weichen merged commit 7425b32b9e into main 2026-10-07 13:52:49 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: weichen/Agent-Native#28