@aisdlc/cli 2.5.0 → 2.5.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/dist/index.js +25 -4
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -1795,6 +1795,7 @@ function emitInitJson(result, isSuccess, dryRun) {
|
|
|
1795
1795
|
targetDir: result.targetDir,
|
|
1796
1796
|
directoriesCreated: result.directoriesCreated,
|
|
1797
1797
|
filesCreated: result.filesCreated,
|
|
1798
|
+
filesUpdated: result.filesUpdated || [],
|
|
1798
1799
|
ciProvider: result.ciProvider,
|
|
1799
1800
|
agentsConfigured: result.agentsConfigured,
|
|
1800
1801
|
architectureGranularity: result.architectureGranularity,
|
|
@@ -1821,8 +1822,11 @@ function printGitHookStatus(dryRun, installed) {
|
|
|
1821
1822
|
}
|
|
1822
1823
|
function printCreatedItems(items, type, dryRun) {
|
|
1823
1824
|
const isDir = type === "directory";
|
|
1825
|
+
const isUpdated = type === "updated-file";
|
|
1824
1826
|
for (const item of items) {
|
|
1825
|
-
const
|
|
1827
|
+
const actionLabel = isDir ? "Create directory:" : isUpdated ? "Update file:" : "Create file:";
|
|
1828
|
+
const doneLabel = isDir ? "Directory created:" : isUpdated ? "File updated:" : "File generated:";
|
|
1829
|
+
const prefix = dryRun ? pc5.blue("DRY-RUN") + ` ${actionLabel}` : pc5.green("\u2714") + ` ${doneLabel}`;
|
|
1826
1830
|
console.log(` ${prefix} ${item}`);
|
|
1827
1831
|
}
|
|
1828
1832
|
}
|
|
@@ -1832,6 +1836,9 @@ function printInitSuccess(result, dryRun) {
|
|
|
1832
1836
|
`)));
|
|
1833
1837
|
printCreatedItems(result.directoriesCreated, "directory", dryRun);
|
|
1834
1838
|
printCreatedItems(result.filesCreated, "file", dryRun);
|
|
1839
|
+
if (result.filesUpdated && result.filesUpdated.length > 0) {
|
|
1840
|
+
printCreatedItems(result.filesUpdated, "updated-file", dryRun);
|
|
1841
|
+
}
|
|
1835
1842
|
if (result.ciProvider) {
|
|
1836
1843
|
console.log(pc5.cyan(`
|
|
1837
1844
|
\u2714 CI/CD configuration generated for provider: ${pc5.bold(result.ciProvider)}`));
|
|
@@ -1877,7 +1884,8 @@ function runInit(targetDir = ".", options = {}) {
|
|
|
1877
1884
|
ci: options.ci,
|
|
1878
1885
|
agents: options.agents === "none" ? false : options.agents,
|
|
1879
1886
|
architecture: options.architecture,
|
|
1880
|
-
dryRun
|
|
1887
|
+
dryRun,
|
|
1888
|
+
force: Boolean(options.force)
|
|
1881
1889
|
});
|
|
1882
1890
|
return handleInitResult(result, { isSilent, useJson, dryRun });
|
|
1883
1891
|
}
|
|
@@ -2443,7 +2451,7 @@ function runChangeNew(options) {
|
|
|
2443
2451
|
|
|
2444
2452
|
// src/index.ts
|
|
2445
2453
|
var program = new Command();
|
|
2446
|
-
program.name("aisdlc").description("AI-SDLC: Spec-Driven Development, Governance & Quality Gates for AI & Humans").version("2.5.
|
|
2454
|
+
program.name("aisdlc").description("AI-SDLC: Spec-Driven Development, Governance & Quality Gates for AI & Humans").version("2.5.1");
|
|
2447
2455
|
program.command("check").description("Unified pre-flight command: validates Quality Gates with optional non-destructive auto-fix").option("--fix", "Automatically synchronize Gherkin scenarios (.feature) and cryptographic digests of PDaC citations").option("-r, --root <path>", "Project root directory").option("--vuln", "Scan for known vulnerabilities (CVE/GHSA) in dependencies").option("--json", "Emit verification results in structured JSON format").option("-F, --format <format>", "Output format: text or json").action((opts) => {
|
|
2448
2456
|
const passed = runCheck({
|
|
2449
2457
|
fix: opts.fix,
|
|
@@ -2730,7 +2738,7 @@ sddCommand.command("integrate").description("Integrate and synchronize implement
|
|
|
2730
2738
|
});
|
|
2731
2739
|
process.exit(passed ? 0 : 1);
|
|
2732
2740
|
});
|
|
2733
|
-
program.command("init [directory]").description("Initialize a new repository with AI-SDLC guidelines, schemas, and policies").option("-d, --dry-run", "Simulate file and directory creation without writing to disk").option("--ci <provider>", "CI/CD provider for pipeline generation (github, gitlab, azure, bitbucket)").option("--agents [targets]", "AI agent environments to configure (all, cursor, claude, antigravity, copilot, mcp, or comma-separated combination)").option("--arch, --architecture <granularity>", "Architecture templates granularity level (minimal, full, complete, none)").option("--json", "Structured JSON format output").option("-F, --format <format>", "Output format: text or json").action(async (directory, opts) => {
|
|
2741
|
+
program.command("init [directory]").description("Initialize a new repository with AI-SDLC guidelines, schemas, and policies").option("-d, --dry-run", "Simulate file and directory creation without writing to disk").option("-f, --force", "Force overwrite existing agent, rule, and policy configurations with canonical templates").option("--ci <provider>", "CI/CD provider for pipeline generation (github, gitlab, azure, bitbucket)").option("--agents [targets]", "AI agent environments to configure (all, cursor, claude, antigravity, copilot, mcp, or comma-separated combination)").option("--arch, --architecture <granularity>", "Architecture templates granularity level (minimal, full, complete, none)").option("--json", "Structured JSON format output").option("-F, --format <format>", "Output format: text or json").action(async (directory, opts) => {
|
|
2734
2742
|
let agents = opts.agents;
|
|
2735
2743
|
let arch = opts.architecture || opts.arch;
|
|
2736
2744
|
let ci = opts.ci;
|
|
@@ -2746,6 +2754,7 @@ program.command("init [directory]").description("Initialize a new repository wit
|
|
|
2746
2754
|
}
|
|
2747
2755
|
const passed = runInit(directory, {
|
|
2748
2756
|
dryRun: opts.dryRun,
|
|
2757
|
+
force: opts.force,
|
|
2749
2758
|
ci,
|
|
2750
2759
|
agents,
|
|
2751
2760
|
architecture: arch,
|
|
@@ -2754,6 +2763,18 @@ program.command("init [directory]").description("Initialize a new repository wit
|
|
|
2754
2763
|
});
|
|
2755
2764
|
process.exit(passed ? 0 : 1);
|
|
2756
2765
|
});
|
|
2766
|
+
program.command("sync [directory]").description("Synchronize and refresh AI agent configurations, skills, and rules from canonical templates").option("-d, --dry-run", "Simulate file updates without writing to disk").option("--agents [targets]", "AI agent environments to configure (all, cursor, claude, antigravity, copilot, mcp, or comma-separated combination)").option("--json", "Structured JSON format output").option("-F, --format <format>", "Output format: text or json").action((directory, opts) => {
|
|
2767
|
+
const passed = runInit(directory, {
|
|
2768
|
+
dryRun: opts.dryRun,
|
|
2769
|
+
force: true,
|
|
2770
|
+
agents: opts.agents || "all",
|
|
2771
|
+
ci: "none",
|
|
2772
|
+
architecture: "none",
|
|
2773
|
+
json: opts.json,
|
|
2774
|
+
format: opts.format
|
|
2775
|
+
});
|
|
2776
|
+
process.exit(passed ? 0 : 1);
|
|
2777
|
+
});
|
|
2757
2778
|
program.command("mcp").description("Start native AI-SDLC Model Context Protocol (MCP) server (stdio)").option("-r, --root <path>", "Project root directory").option("--role <role>", "Role context for MCP server authorization").action(async (opts) => {
|
|
2758
2779
|
await runMcpServer({ root: opts.root, role: opts.role });
|
|
2759
2780
|
});
|