Drop SKILL.md size budgets and document doc layering

This commit is contained in:
gitea committed 2026-10-25 17:55:03 +08:00
1 parent f5b66be85f
commit 43fced7c72
4 files changed
+16 -49

No files matched your search

+1 -18
View File
@@ -1,7 +1,7 @@
import { describe, expect, test } from "bun:test"
import { readdirSync, readFileSync } from "node:fs"
import { join } from "node:path"
import { SKILL_MAX_H2_SECTIONS, SKILL_MAX_LINES, validateSkillDoc } from "./check-skill-md.js"
import { validateSkillDoc } from "./check-skill-md.js"
const REFERENCE_FILES = ["references/alpha.md", "references/beta.md"]
@@ -31,23 +31,6 @@ describe("validateSkillDoc", () => {
expect(validateSkillDoc(cleanSkill(), REFERENCE_FILES)).toEqual([])
})
test("enforces the line budget as a hard error", () => {
const padded = Array.from({ length: SKILL_MAX_LINES }, () => "filler line")
const content = `${cleanSkill()}\n${padded.join("\n")}`
const issues = validateSkillDoc(content, REFERENCE_FILES)
expect(issues.some((issue) => issue.rule === "skill-budget-lines")).toBe(true)
})
test("enforces the H2 section budget as a hard error", () => {
const sections = Array.from(
{ length: SKILL_MAX_H2_SECTIONS + 1 },
(_, index) => `## Section ${index + 1}`
)
const content = `${lines("# Demo Skill", "")}\n${sections.join("\n\n")}`
const issues = validateSkillDoc(content, REFERENCE_FILES)
expect(issues.some((issue) => issue.rule === "skill-budget-h2")).toBe(true)
})
test("flags routing that points at a missing reference file", () => {
const content = lines(
"# Demo Skill",