@ichintansoni/skills-master 0.1.21 → 0.1.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bin.js +13 -2
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
import { Command } from "commander";
|
|
5
5
|
|
|
6
6
|
// package.json
|
|
7
|
-
var version = "0.1.
|
|
7
|
+
var version = "0.1.23";
|
|
8
8
|
|
|
9
9
|
// src/schema/projectConfig.ts
|
|
10
10
|
import { z } from "zod";
|
|
@@ -1712,6 +1712,8 @@ var CANONICAL_HEADINGS = [
|
|
|
1712
1712
|
];
|
|
1713
1713
|
var MAX_BODY_LINES = 500;
|
|
1714
1714
|
var WARN_BODY_LINES = 450;
|
|
1715
|
+
var TOC_REQUIRED_LINES = 100;
|
|
1716
|
+
var TOC_HEADING_RE = /^##\s+Contents\s*$/m;
|
|
1715
1717
|
var XML_TAG_RE = /<[A-Za-z/]/;
|
|
1716
1718
|
function today() {
|
|
1717
1719
|
return (/* @__PURE__ */ new Date()).toISOString().slice(0, 10);
|
|
@@ -1838,9 +1840,18 @@ function lintSkills(skillsRoot) {
|
|
|
1838
1840
|
["checklist", "checklist.md"]
|
|
1839
1841
|
];
|
|
1840
1842
|
for (const [key, file] of l3) {
|
|
1841
|
-
|
|
1843
|
+
const text = s.resources?.[key];
|
|
1844
|
+
if (text == null) continue;
|
|
1845
|
+
if (!s.body.includes(`(${file}`) && !s.body.includes(`(./${file}`)) {
|
|
1842
1846
|
push("warn", `${file} exists but is never linked from the SKILL.md body`);
|
|
1843
1847
|
}
|
|
1848
|
+
const lines = text.split("\n");
|
|
1849
|
+
if (lines.length > TOC_REQUIRED_LINES && !TOC_HEADING_RE.test(lines.slice(0, 15).join("\n"))) {
|
|
1850
|
+
push(
|
|
1851
|
+
"warn",
|
|
1852
|
+
`${file} is ${lines.length} lines with no "## Contents" section in its first 15 lines \u2014 a partial read cannot see its full scope`
|
|
1853
|
+
);
|
|
1854
|
+
}
|
|
1844
1855
|
}
|
|
1845
1856
|
const lineCount = s.body.split("\n").length;
|
|
1846
1857
|
if (lineCount > MAX_BODY_LINES) {
|
package/package.json
CHANGED