@warnyin/sdlc 0.8.0 → 0.9.0
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/CHANGELOG.md +274 -258
- package/LICENSE +21 -21
- package/README.md +92 -92
- package/bin/cli.mjs +682 -682
- package/lib/active.mjs +199 -199
- package/lib/caps.mjs +46 -46
- package/lib/config.mjs +41 -41
- package/lib/delta.mjs +227 -227
- package/lib/frontmatter.mjs +59 -59
- package/lib/glob.mjs +29 -29
- package/lib/lenses.mjs +48 -48
- package/lib/manifest.mjs +99 -99
- package/lib/settings-merge.mjs +63 -63
- package/lib/skills.mjs +148 -148
- package/lib/validate.mjs +198 -198
- package/package.json +42 -42
- package/payload/adapters/agents-md.md +8 -8
- package/payload/adapters/claude/agents/sdlc-architect.md +12 -12
- package/payload/adapters/claude/agents/sdlc-builder.md +14 -14
- package/payload/adapters/claude/agents/sdlc-contractor.md +13 -13
- package/payload/adapters/claude/agents/sdlc-evaluator.md +13 -13
- package/payload/adapters/claude/agents/sdlc-learner.md +16 -16
- package/payload/adapters/claude/agents/sdlc-ops.md +11 -11
- package/payload/adapters/claude/agents/sdlc-quality.md +13 -13
- package/payload/adapters/claude/agents/sdlc-security.md +12 -12
- package/payload/adapters/claude/commands/sdlc/converge.md +5 -5
- package/payload/adapters/claude/commands/sdlc/init.md +4 -4
- package/payload/adapters/claude/commands/sdlc/next.md +4 -4
- package/payload/adapters/claude/commands/sdlc/observe.md +4 -4
- package/payload/adapters/claude/commands/sdlc/steer.md +4 -4
- package/payload/adapters/claude/skills/contract-writing/SKILL.md +26 -26
- package/payload/adapters/claude/skills/delta-spec-format/SKILL.md +36 -36
- package/payload/adapters/claude/skills/sdlc-conventions/SKILL.md +30 -30
- package/payload/adapters/cline.md +8 -8
- package/payload/adapters/copilot.md +8 -8
- package/payload/adapters/cursor.mdc +7 -7
- package/payload/adapters/gemini.md +8 -8
- package/payload/adapters/windsurf.md +4 -4
- package/payload/hooks/_shared.mjs +138 -138
- package/payload/hooks/guard-writes.mjs +87 -87
- package/payload/hooks/inject-context.mjs +57 -57
- package/payload/hooks/journal.mjs +66 -66
- package/payload/hooks/session-summary.mjs +52 -52
- package/payload/hooks/validate-artifact.mjs +84 -84
- package/payload/playbook/README.md +32 -32
- package/payload/playbook/context.md +26 -26
- package/payload/playbook/contract.md +29 -29
- package/payload/playbook/converge.md +19 -19
- package/payload/playbook/design.md +28 -28
- package/payload/playbook/init.md +22 -22
- package/payload/playbook/lenses.md +64 -64
- package/payload/playbook/new.md +41 -33
- package/payload/playbook/next.md +24 -24
- package/payload/playbook/observe.md +20 -20
- package/payload/playbook/principles.md +28 -28
- package/payload/playbook/review.md +31 -31
- package/payload/playbook/routing.md +19 -19
- package/payload/playbook/rules-card.md +17 -16
- package/payload/playbook/ship.md +35 -35
- package/payload/playbook/steer.md +21 -21
- package/payload/playbook/verify.md +42 -42
- package/payload/templates/change-deep.md +29 -29
- package/payload/templates/change-standard.md +28 -28
- package/payload/templates/change-vibe.md +19 -19
- package/payload/templates/config.yaml +8 -8
- package/payload/templates/constitution.md +14 -14
- package/payload/templates/contract-evals.md +9 -9
- package/payload/templates/contract-tests.md +9 -9
- package/payload/templates/harness.md +34 -34
- package/payload/templates/spec.md +14 -14
- package/payload/templates/steering.md +9 -9
- package/scripts/validate.mjs +47 -47
package/scripts/validate.mjs
CHANGED
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
// Thin CLI wrapper — validator core lives in lib/validate.mjs so that
|
|
3
|
-
// installed hooks (sdlc/.hooks/lib/) can share the exact same logic.
|
|
4
|
-
// Exit codes: 0 = clean, 1 = errors, 2 = usage/setup error.
|
|
5
|
-
|
|
6
|
-
import fs from 'node:fs';
|
|
7
|
-
import path from 'node:path';
|
|
8
|
-
import process from 'node:process';
|
|
9
|
-
import { fileURLToPath } from 'node:url';
|
|
10
|
-
import { validateAll, formatIssues } from '../lib/validate.mjs';
|
|
11
|
-
|
|
12
|
-
export * from '../lib/validate.mjs';
|
|
13
|
-
|
|
14
|
-
function main() {
|
|
15
|
-
const args = process.argv.slice(2);
|
|
16
|
-
const strict = args.includes('--strict');
|
|
17
|
-
const rootIdx = args.indexOf('--root');
|
|
18
|
-
const projectRoot = rootIdx !== -1 ? args[rootIdx + 1] : process.cwd();
|
|
19
|
-
const positional = args.filter((a, i) => !a.startsWith('--') && args[i - 1] !== '--root');
|
|
20
|
-
const changeId = positional[0] && positional[0] !== '--all' ? positional[0] : null;
|
|
21
|
-
|
|
22
|
-
const sdlcRoot = path.join(projectRoot, 'sdlc');
|
|
23
|
-
if (!fs.existsSync(sdlcRoot)) {
|
|
24
|
-
console.error(`No sdlc/ directory at ${projectRoot} — run \`npx @warnyin/sdlc init\` first.`);
|
|
25
|
-
process.exit(2);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
const issues = validateAll(sdlcRoot, { strict, changeId });
|
|
29
|
-
if (issues.length) console.log(formatIssues(issues));
|
|
30
|
-
const errors = issues.filter((i) => i.level === 'error').length;
|
|
31
|
-
const warns = issues.length - errors;
|
|
32
|
-
console.log(`validate: ${errors} error(s), ${warns} warning(s)${strict ? ' [strict]' : ''}`);
|
|
33
|
-
process.exit(errors > 0 ? 1 : 0);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
function isEntrypoint() {
|
|
37
|
-
if (!process.argv[1]) return false;
|
|
38
|
-
try {
|
|
39
|
-
return fs.realpathSync.native(path.resolve(process.argv[1])) === fileURLToPath(import.meta.url);
|
|
40
|
-
} catch {
|
|
41
|
-
return false;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
if (isEntrypoint()) {
|
|
46
|
-
main();
|
|
47
|
-
}
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Thin CLI wrapper — validator core lives in lib/validate.mjs so that
|
|
3
|
+
// installed hooks (sdlc/.hooks/lib/) can share the exact same logic.
|
|
4
|
+
// Exit codes: 0 = clean, 1 = errors, 2 = usage/setup error.
|
|
5
|
+
|
|
6
|
+
import fs from 'node:fs';
|
|
7
|
+
import path from 'node:path';
|
|
8
|
+
import process from 'node:process';
|
|
9
|
+
import { fileURLToPath } from 'node:url';
|
|
10
|
+
import { validateAll, formatIssues } from '../lib/validate.mjs';
|
|
11
|
+
|
|
12
|
+
export * from '../lib/validate.mjs';
|
|
13
|
+
|
|
14
|
+
function main() {
|
|
15
|
+
const args = process.argv.slice(2);
|
|
16
|
+
const strict = args.includes('--strict');
|
|
17
|
+
const rootIdx = args.indexOf('--root');
|
|
18
|
+
const projectRoot = rootIdx !== -1 ? args[rootIdx + 1] : process.cwd();
|
|
19
|
+
const positional = args.filter((a, i) => !a.startsWith('--') && args[i - 1] !== '--root');
|
|
20
|
+
const changeId = positional[0] && positional[0] !== '--all' ? positional[0] : null;
|
|
21
|
+
|
|
22
|
+
const sdlcRoot = path.join(projectRoot, 'sdlc');
|
|
23
|
+
if (!fs.existsSync(sdlcRoot)) {
|
|
24
|
+
console.error(`No sdlc/ directory at ${projectRoot} — run \`npx @warnyin/sdlc init\` first.`);
|
|
25
|
+
process.exit(2);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const issues = validateAll(sdlcRoot, { strict, changeId });
|
|
29
|
+
if (issues.length) console.log(formatIssues(issues));
|
|
30
|
+
const errors = issues.filter((i) => i.level === 'error').length;
|
|
31
|
+
const warns = issues.length - errors;
|
|
32
|
+
console.log(`validate: ${errors} error(s), ${warns} warning(s)${strict ? ' [strict]' : ''}`);
|
|
33
|
+
process.exit(errors > 0 ? 1 : 0);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function isEntrypoint() {
|
|
37
|
+
if (!process.argv[1]) return false;
|
|
38
|
+
try {
|
|
39
|
+
return fs.realpathSync.native(path.resolve(process.argv[1])) === fileURLToPath(import.meta.url);
|
|
40
|
+
} catch {
|
|
41
|
+
return false;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
if (isEntrypoint()) {
|
|
46
|
+
main();
|
|
47
|
+
}
|