speckeeper 0.6.0 → 0.7.1
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/README.md +1 -1
- package/dist/cli.js +10 -4
- package/dist/cli.js.map +1 -1
- package/dist/dsl/index.d.ts +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js.map +1 -1
- package/dist/{model-2gVdKS3_.d.ts → model-BPZMYasZ.d.ts} +3 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -152,7 +152,7 @@ npx speckeeper impact FR-001
|
|
|
152
152
|
| `speckeeper check` | Verify consistency with external SSOT |
|
|
153
153
|
| `speckeeper check test --coverage` | Verify test coverage for requirements |
|
|
154
154
|
| `speckeeper scaffold` | Generate model skeletons from a mermaid flowchart |
|
|
155
|
-
| `speckeeper drift` | Detect manual edits to generated `
|
|
155
|
+
| `speckeeper drift` | Detect manual edits to generated `docs/` files |
|
|
156
156
|
| `speckeeper impact <id>` | Analyze change impact for a specific element |
|
|
157
157
|
|
|
158
158
|
**Note**: `speckeeper build` generates machine-readable `specs/` output. For human-readable docs (`docs/`), use [embedoc](https://www.npmjs.com/package/embedoc) or similar tools with the model rendering API.
|
package/dist/cli.js
CHANGED
|
@@ -196,7 +196,9 @@ async function buildCommand(options) {
|
|
|
196
196
|
}
|
|
197
197
|
for (const exporter of exporters) {
|
|
198
198
|
const outputDir = exporter.outputDir ? join(cwd, config.docsDir, exporter.outputDir) : join(cwd, config.docsDir);
|
|
199
|
-
|
|
199
|
+
if (exporter.single) {
|
|
200
|
+
ensureDir(outputDir);
|
|
201
|
+
}
|
|
200
202
|
if (exporter.single) {
|
|
201
203
|
for (const spec of modelSpecs) {
|
|
202
204
|
const content = exporter.single(spec);
|
|
@@ -209,8 +211,12 @@ async function buildCommand(options) {
|
|
|
209
211
|
}
|
|
210
212
|
if (exporter.index) {
|
|
211
213
|
const indexContent = exporter.index(modelSpecs);
|
|
214
|
+
const indexPath = exporter.outputFile ? join(cwd, config.docsDir, exporter.outputFile) : join(outputDir, "index.md");
|
|
215
|
+
if (!exporter.outputFile) {
|
|
216
|
+
ensureDir(outputDir);
|
|
217
|
+
}
|
|
212
218
|
files.push({
|
|
213
|
-
path:
|
|
219
|
+
path: indexPath,
|
|
214
220
|
content: indexContent
|
|
215
221
|
});
|
|
216
222
|
}
|
|
@@ -351,7 +357,7 @@ async function driftCommand(options) {
|
|
|
351
357
|
}
|
|
352
358
|
}
|
|
353
359
|
if (exporter.index) {
|
|
354
|
-
const indexPath = join(outputDir, "index.md");
|
|
360
|
+
const indexPath = exporter.outputFile ? join(cwd, config.docsDir, exporter.outputFile) : join(outputDir, "index.md");
|
|
355
361
|
if (!existsSync(indexPath)) {
|
|
356
362
|
results.push({ file: indexPath, status: "missing" });
|
|
357
363
|
} else {
|
|
@@ -1631,7 +1637,7 @@ var program = new Command();
|
|
|
1631
1637
|
program.name("speckeeper").description("Requirements and design management framework with TypeScript DSL").version(getVersion());
|
|
1632
1638
|
program.command("build").description("Generate docs/ and specs/ from TypeScript models").option("-c, --config <path>", "Path to config file").option("-o, --output <path>", "Base output directory path", ".").option("-f, --format <format>", "Output format: markdown, json, both", "both").option("-w, --watch", "Watch for changes and auto-regenerate").option("-v, --verbose", "Show detailed output").action(buildCommand);
|
|
1633
1639
|
program.command("lint").description("Check design integrity (ID duplicates, references, layer violations, etc.)").option("-c, --config <path>", "Path to config file").option("-p, --phase <phase>", "Phase gate to check against (REQ, HLD, LLD, OPS)").option("-s, --strict", "Treat warnings as errors").option("--fix", "Attempt to fix auto-fixable issues").option("-f, --format <format>", "Output format: text, json, github", "text").action(lintCommand);
|
|
1634
|
-
program.command("drift").description("Check if generated files have been manually edited").option("-c, --config <path>", "Path to config file").option("-u, --update", "Auto-update if differences are found").option("-f, --format <format>", "Output format: text, json, diff", "text").action(driftCommand);
|
|
1640
|
+
program.command("drift").description("Check if generated files have been manually edited").option("-c, --config <path>", "Path to config file").option("-u, --update", "Auto-update if differences are found").option("-f, --format <format>", "Output format: text, json, diff", "text").option("--fail-on-drift", "Exit with code 1 if drift is detected (for CI)").action(driftCommand);
|
|
1635
1641
|
program.command("check").description("Check external SSOT conformance (including custom models)").argument("[type]", "Type of check: external-ssot, openapi, ddl, iac, custom, all, test").option("-c, --config <path>", "Path to config file").option("--strict", "Treat warnings as errors").option("-v, --verbose", "Show detailed output").option("--coverage", "Check if all testable acceptance criteria are covered by TestRefs").action(checkCommand);
|
|
1636
1642
|
program.command("new").description("Create a new element with auto-generated ID").argument("<type>", "Type: requirement, usecase, entity, component, screen, flow, error-case, term").option("-k, --kind <kind>", "Sub-kind (e.g., functional, non-functional for requirements)").option("-n, --name <name>", "Name of the element").option("-o, --output <path>", "Output directory path").option("-t, --template <path>", "Path to template file").action(newCommand);
|
|
1637
1643
|
program.command("impact").description("Analyze impact of changes to an ID").argument("<id>", "ID to analyze (e.g., REQ-001, ENT-ORDER)").option("-c, --config <path>", "Path to config file").option("-d, --depth <depth>", "Analysis depth (reference tracking level)", "3").option("--direction <direction>", "Analysis direction: upstream, downstream, both", "both").option("-f, --format <format>", "Output format: text, json, mermaid", "text").action(impactCommand);
|