Skip to content

Commit 9aa8033

Browse files
vvillait88claude
andcommitted
fix(discovery): agentskills.io spec compliance + parity hardening
Mirrors node-commerce — addresses spec violations + parity issues from end-to-end review against https://agentskills.io/specification: P0 — spec violations: - description / license / compatibility / allowed-tools / metadata-values now emitted as YAML double-quoted scalars. Fixes the colon / quote / newline parse failure the spec explicitly warns about. - metadata.version emitted as quoted string ("1") not int (1). Spec requires metadata values to be strings. P1 — validation + exports: - Validate name against the spec regex (1-64 chars, lowercase alphanumeric + hyphens, no leading / trailing / consecutive hyphens). - Validate description length ≤1024 + non-empty. - Validate compatibility length ≤500. - Title-block parity fix: tagline + intro now join with blank lines instead of being glued together (previously diverged from node output). - Re-export RailKey + compatible_clients_by_rails from agentscore_commerce .discovery (added to __all__). P2 — additional spec fields: - Surface optional license, compatibility, allowed_tools frontmatter fields. - Move homepage from top-level to metadata.homepage (spec-compliant). P3 — edge cases: - Drop compatible_clients overrides for rails not in accepted_rails. - Escape pipe characters in markdown table cells. - Add /SKILL.md (uppercase) to DEFAULT_DISCOVERY_PATHS for canonical-cased alias. Tests: 49 cases covering spec violations + edge cases + validation throws. Coverage 95.45% (over 95%). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent ce9a8ec commit 9aa8033

4 files changed

Lines changed: 340 additions & 131 deletions

File tree

agentscore_commerce/discovery/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,13 @@
3535
)
3636
from agentscore_commerce.discovery.skill_md import (
3737
BuildSkillMdInput,
38+
RailKey,
3839
SkillMdEndpoint,
3940
SkillMdIdentityRequirements,
4041
SkillMdLink,
4142
SkillMdShippingPolicy,
4243
build_skill_md,
44+
compatible_clients_by_rails,
4345
)
4446
from agentscore_commerce.discovery.well_known_mpp import (
4547
PaymentMethodConfig,
@@ -62,6 +64,7 @@
6264
"LlmsTxtSection",
6365
"NoindexNonDiscoveryMiddleware",
6466
"PaymentMethodConfig",
67+
"RailKey",
6568
"SkillMdEndpoint",
6669
"SkillMdIdentityRequirements",
6770
"SkillMdLink",
@@ -77,6 +80,7 @@
7780
"build_llms_txt",
7881
"build_skill_md",
7982
"build_well_known_mpp",
83+
"compatible_clients_by_rails",
8084
"install_flask_noindex",
8185
"is_discovery_path",
8286
"is_discovery_probe_request",

agentscore_commerce/discovery/robots_tag.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"/openapi.json",
2323
"/llms.txt",
2424
"/skill.md",
25+
"/SKILL.md",
2526
"/.well-known/mpp.json",
2627
"/.well-known/agent-card.json",
2728
"/.well-known/ucp",

0 commit comments

Comments
 (0)