@ruyfranca/myskills 1.0.33 → 1.0.34
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.
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
---
|
|
2
|
-
name: sdd-spec-writer
|
|
3
|
-
description: Specification writer for Spec-Driven Development (SDD)
|
|
4
|
-
tools: Read, Grep, Glob, Bash
|
|
5
|
-
model: inherit
|
|
6
|
-
skills: sdd-spec-writer, clean-code, writing-plans
|
|
2
|
+
name: "sdd-spec-writer"
|
|
3
|
+
description: "Specification writer for Spec-Driven Development (SDD) - creates executable specifications that serve as unambiguous contracts."
|
|
4
|
+
tools: "Read, Grep, Glob, Bash"
|
|
5
|
+
model: "inherit"
|
|
6
|
+
skills: "sdd-spec-writer, clean-code, writing-plans"
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
# SDD Spec Writer
|
package/index.js
CHANGED
package/package.json
CHANGED
package/test-yaml.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import fs from 'fs';
|
|
2
|
+
import path from 'path';
|
|
3
|
+
|
|
4
|
+
function checkDir(dir) {
|
|
5
|
+
let files = fs.readdirSync(dir, { withFileTypes: true });
|
|
6
|
+
for (let f of files) {
|
|
7
|
+
let full = path.join(dir, f.name);
|
|
8
|
+
if (f.isDirectory()) {
|
|
9
|
+
checkDir(full);
|
|
10
|
+
} else if (f.name.endsWith('.md')) {
|
|
11
|
+
let content = fs.readFileSync(full, 'utf8');
|
|
12
|
+
if (content.startsWith('---')) {
|
|
13
|
+
let closing = content.indexOf('\n---', 3);
|
|
14
|
+
if (closing === -1) {
|
|
15
|
+
console.log('Error: No closing --- in', full);
|
|
16
|
+
} else {
|
|
17
|
+
// extract
|
|
18
|
+
let yamlStr = content.substring(4, closing);
|
|
19
|
+
// check if there's another block immediately following
|
|
20
|
+
let rest = content.substring(closing + 4).trimStart();
|
|
21
|
+
if (rest.startsWith('---')) {
|
|
22
|
+
console.log('Error: Duplicate frontmatter block in', full);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
checkDir('.agent');
|
|
31
|
+
console.log('Done checking.');
|