diff --git a/skills/kb-docs-add/SKILL.md b/skills/kb-docs-add/SKILL.md index 5a0594b..fe6a152 100644 --- a/skills/kb-docs-add/SKILL.md +++ b/skills/kb-docs-add/SKILL.md @@ -1,6 +1,6 @@ --- name: kb-docs-add -description: Onboard a repository's documentation into the AbsaOSS knowledge base. Classifies the repo (markdown files → single-page, a static docs site → packaged, hosted elsewhere → iframe stopgap), writes only the files the contract requires (one workflow calling publish-single-page-docs, or kb-docs.json + a headless build flag + a publish-docs workflow), and explains how to verify the release carries kb-docs.tar.gz. Use whenever someone wants to publish docs to the knowledge base, add a repo or service to the knowledge base, write kb-docs.json, produce kb-docs.tar.gz, make a docs site headless for the knowledge base, or fix a failing publish-docs / publish-single-page-docs workflow — even when they only say "get our docs into the KB" or "our docs don't show up in the knowledge base". Also audits an onboarded repo: runs the contract checker, fixes findings by rule ID (KB-HTML-003…) at the source — for publish warnings or docs that break once embedded. +description: Onboard a repository's documentation into the AbsaOSS knowledge base. Classifies the repo (markdown files → single-page, a static docs site → packaged, hosted elsewhere → iframe stopgap), writes only the files the contract requires (one workflow calling publish-single-page-docs, or kb-docs.json + a headless build flag + a publish-docs workflow), and explains how to verify the release carries kb-docs.tar.gz. Use whenever someone wants to publish docs to the knowledge base, add a repo or service to the knowledge base, write kb-docs.json, produce kb-docs.tar.gz, make a docs site headless for the knowledge base, or fix a failing publish-docs / publish-single-page-docs workflow — even when they only say "get our docs into the KB" or "our docs don't show up in the knowledge base". Also audits an onboarded repo — runs the contract checker, fixes findings by rule ID (KB-HTML-003…) at the source — for publish warnings or docs that break once embedded. license: Apache-2.0 metadata: author: AbsaOSS diff --git a/tests/skill.spec.js b/tests/skill.spec.js index 384caf6..183f36f 100644 --- a/tests/skill.spec.js +++ b/tests/skill.spec.js @@ -73,6 +73,19 @@ test.describe('SKILL.md frontmatter satisfies the Agent Skills spec', () => { } }); + test('top-level values are valid plain YAML scalars', () => { + // The parser above splits on the first colon, so it accepts what a real YAML + // parser rejects: a later ": " (mapping indicator) or " #" (comment), or a + // leading indicator character. Consumers parse the frontmatter as YAML. + for (const [key, value] of Object.entries(fields)) { + if (!value) continue; // a block mapping such as `metadata:` + expect(value, `${key}: ": " is a mapping indicator in a plain scalar`).not.toContain(': '); + expect(value, `${key}: " #" starts a comment in a plain scalar`).not.toContain(' #'); + expect(value, `${key}: plain scalar must not end with ":"`).not.toMatch(/:$/); + expect(value, `${key}: leading indicator character`).not.toMatch(/^[-?:,[\]{}#&*!|>'"%@`]/); + } + }); + test('only portable frontmatter fields are used', () => { // `allowed-tools` is Claude-only and experimental; a skill installed into // .github/skills must not depend on it.