Three parallel trees documented the same ecosystem: omp-docs/skills/
(two overview pages), tools/npx-skills/ (10 pi-era npm pages), and
tools/vercel-labs-skills/ (11 CLI pages), plus a fourth leaderboard page
at engineering/skills-ecosystem.md. Verbatim overlap (identical SKILL.md
field tables in skills-spec.md vs skill-format.md; 13-agent vs 68-agent
copies of the same upstream table). Consolidated to four concept pages:
- skills/agent-skills.md: standard, format, loading, authoring (merges
skills-spec, skill-format, skill-file-structure, skill-loading,
best-practices, skills-vs-extensions)
- skills/skills-cli.md: CLI reference (merges commands, source-formats,
installation-scope, skill-discovery, lock-file, env-variables,
agent-support, related-links)
- skills/store-wiring.md: moved, fleet ops, links retargeted
- skills/ecosystem.md: replaces skills-ecosystem.md; stale 2026-08-12
top-50 table dropped, replaced with a live top-10 re-queried from the
skills.sh API tonight and the API contract re-verified (zero-based,
200/page, {skills,total,hasMore,page}, total 9909)
All facts re-verified 2026-10-19 against primary sources:
agentskills.io, vercel-labs/skills README + src/cli.ts (command set,
--full-depth) + src/skill-lock.ts (v3 lock, XDG path, wipe-on-old),
live skills.sh API. Deleted superseded core/index-doc.md (old pi-era
docs index). Retargeted all inbound links (tools/index, engineering x3,
packages x3, pi/skills, core/index). Pi-era npm skill packaging is
listed as archived under /pi/.
Refs #29
93 lines
2.2 KiB
Bash
Executable File
93 lines
2.2 KiB
Bash
Executable File
#!/usr/bin/env bats
|
|
# tests/kb-lint.bats — black-box tests for scripts/kb-lint.sh
|
|
#
|
|
# Contract: exit 0 when a knowledge bundle is OKF v0.1 conformant;
|
|
# one line per violation otherwise. Observable surface: stdout lines
|
|
# and exit status only.
|
|
|
|
setup() {
|
|
LINT="$BATS_TEST_DIRNAME/../scripts/kb-lint.sh"
|
|
KB="$(mktemp -d)/kb"
|
|
mkdir -p "$KB/sub"
|
|
cat > "$KB/index.md" <<'EOF'
|
|
# Index
|
|
|
|
* [Good](good.md) — fine.
|
|
EOF
|
|
cat > "$KB/good.md" <<'EOF'
|
|
---
|
|
type: reference
|
|
title: Good
|
|
---
|
|
Body.
|
|
EOF
|
|
}
|
|
|
|
teardown() { rm -rf "$(dirname "$KB")"; }
|
|
|
|
@test "conformant bundle passes" {
|
|
run bash "$LINT" "$KB"
|
|
[ "$status" -eq 0 ]
|
|
}
|
|
|
|
@test "missing frontmatter is reported" {
|
|
printf 'no frontmatter here\n' > "$KB/bad.md"
|
|
run bash "$LINT" "$KB"
|
|
[ "$status" -ne 0 ]
|
|
[[ "$output" == *"bad.md: missing frontmatter"* ]]
|
|
}
|
|
|
|
@test "frontmatter without type is reported" {
|
|
printf -- '---\ntitle: x\n---\nbody\n' > "$KB/notype.md"
|
|
run bash "$LINT" "$KB"
|
|
[ "$status" -ne 0 ]
|
|
[[ "$output" == *"notype.md"*"type"* ]]
|
|
}
|
|
|
|
@test "unclosed frontmatter is reported, not silently passed" {
|
|
# regression: a `---` in the body (fenced code, rule) must not be
|
|
# accepted as the closing delimiter of the frontmatter block
|
|
cat > "$KB/unclosed.md" <<'EOF'
|
|
---
|
|
type: reference
|
|
title: Unclosed
|
|
|
|
# Heading after a forgotten closing fence
|
|
|
|
```markdown
|
|
---
|
|
name: example
|
|
---
|
|
```
|
|
EOF
|
|
run bash "$LINT" "$KB"
|
|
[ "$status" -ne 0 ]
|
|
[[ "$output" == *"unclosed.md"* ]]
|
|
}
|
|
|
|
@test "frontmatter in index.md is reported" {
|
|
printf -- '---\ntype: x\n---\n# I\n' > "$KB/sub/index.md"
|
|
run bash "$LINT" "$KB"
|
|
[ "$status" -ne 0 ]
|
|
[[ "$output" == *"index.md must not have frontmatter"* ]]
|
|
}
|
|
|
|
@test "broken relative link is reported" {
|
|
printf -- '---\ntype: reference\n---\nsee [x](gone.md)\n' > "$KB/links.md"
|
|
run bash "$LINT" "$KB"
|
|
[ "$status" -ne 0 ]
|
|
[[ "$output" == *"links.md: broken relative link"* ]]
|
|
}
|
|
|
|
@test "broken wikilink is reported" {
|
|
printf -- '---\ntype: reference\n---\nsee [[nowhere]]\n' > "$KB/wiki.md"
|
|
run bash "$LINT" "$KB"
|
|
[ "$status" -ne 0 ]
|
|
[[ "$output" == *"wiki.md: broken wikilink"* ]]
|
|
}
|
|
|
|
@test "missing kb directory exits 2" {
|
|
run bash "$LINT" "$KB/no-such-dir"
|
|
[ "$status" -eq 2 ]
|
|
}
|