@aisdlc/cli 3.1.0 → 3.3.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/dist/index.js +110 -46
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
// src/index.ts
|
|
4
4
|
import { Command } from "commander";
|
|
5
|
-
import
|
|
5
|
+
import pc11 from "picocolors";
|
|
6
6
|
|
|
7
7
|
// src/commands/check.ts
|
|
8
8
|
import pc2 from "picocolors";
|
|
@@ -1802,6 +1802,7 @@ function emitInitJson(result, isSuccess, dryRun) {
|
|
|
1802
1802
|
ciProvider: result.ciProvider,
|
|
1803
1803
|
agentsConfigured: result.agentsConfigured,
|
|
1804
1804
|
architectureGranularity: result.architectureGranularity,
|
|
1805
|
+
stacksConfigured: result.stacksConfigured || [],
|
|
1805
1806
|
gitHookInstalled: result.gitHookInstalled,
|
|
1806
1807
|
dryRun,
|
|
1807
1808
|
...isSuccess ? {} : { error: result.error || "Error initializing project." }
|
|
@@ -1887,6 +1888,7 @@ function runInit(targetDir = ".", options = {}) {
|
|
|
1887
1888
|
ci: options.ci,
|
|
1888
1889
|
agents: options.agents === "none" ? false : options.agents,
|
|
1889
1890
|
architecture: options.architecture,
|
|
1891
|
+
stack: options.stack,
|
|
1890
1892
|
dryRun,
|
|
1891
1893
|
force: Boolean(options.force)
|
|
1892
1894
|
});
|
|
@@ -2095,6 +2097,53 @@ function runReportQuality(options = {}) {
|
|
|
2095
2097
|
return result.verdict === "PASS";
|
|
2096
2098
|
}
|
|
2097
2099
|
|
|
2100
|
+
// src/commands/review.ts
|
|
2101
|
+
import pc9 from "picocolors";
|
|
2102
|
+
import { submitReviewReport } from "@aisdlc/core";
|
|
2103
|
+
function printJsonResult(options, result) {
|
|
2104
|
+
console.log(
|
|
2105
|
+
JSON.stringify(
|
|
2106
|
+
{
|
|
2107
|
+
command: "review:submit",
|
|
2108
|
+
success: result.success,
|
|
2109
|
+
change: options.change,
|
|
2110
|
+
reviewer: options.reviewer,
|
|
2111
|
+
verdict: result.verdict,
|
|
2112
|
+
reportPath: result.reportPath,
|
|
2113
|
+
digest: result.digest,
|
|
2114
|
+
error: result.error
|
|
2115
|
+
},
|
|
2116
|
+
null,
|
|
2117
|
+
2
|
|
2118
|
+
)
|
|
2119
|
+
);
|
|
2120
|
+
}
|
|
2121
|
+
function printTextResult(result) {
|
|
2122
|
+
if (result.success) {
|
|
2123
|
+
console.log(` ${pc9.green("\u2714")} Review report persisted: ${pc9.bold(result.reportPath || "")}`);
|
|
2124
|
+
console.log(` Verdict: ${pc9.cyan(result.verdict || "")} | Digest: ${pc9.dim(result.digest || "")}`);
|
|
2125
|
+
} else {
|
|
2126
|
+
console.error(` ${pc9.red("\u2716")} Review submission rejected: ${result.error || "Unknown error"}`);
|
|
2127
|
+
}
|
|
2128
|
+
}
|
|
2129
|
+
function runReviewSubmit(options) {
|
|
2130
|
+
const result = submitReviewReport({
|
|
2131
|
+
rootDir: options.root,
|
|
2132
|
+
changeId: options.change,
|
|
2133
|
+
reviewer: options.reviewer,
|
|
2134
|
+
verdict: options.verdict,
|
|
2135
|
+
body: options.body
|
|
2136
|
+
});
|
|
2137
|
+
if (options.json) {
|
|
2138
|
+
printJsonResult(options, result);
|
|
2139
|
+
return result.success;
|
|
2140
|
+
}
|
|
2141
|
+
if (!options.silent) {
|
|
2142
|
+
printTextResult(result);
|
|
2143
|
+
}
|
|
2144
|
+
return result.success;
|
|
2145
|
+
}
|
|
2146
|
+
|
|
2098
2147
|
// src/commands/inspect.ts
|
|
2099
2148
|
import { inspectElement, formatInspectResultMarkdown } from "@aisdlc/core";
|
|
2100
2149
|
function isJsonOutput2(options = {}) {
|
|
@@ -2117,7 +2166,7 @@ function runInspect(query, options = {}) {
|
|
|
2117
2166
|
|
|
2118
2167
|
// src/commands/sdd.ts
|
|
2119
2168
|
import * as path3 from "path";
|
|
2120
|
-
import
|
|
2169
|
+
import pc10 from "picocolors";
|
|
2121
2170
|
import {
|
|
2122
2171
|
depositProductHandoffSidecar,
|
|
2123
2172
|
detectActiveChangeForIntegration,
|
|
@@ -2144,8 +2193,8 @@ function buildHandoffPayload(options, changeId) {
|
|
|
2144
2193
|
return { handoff, reqList };
|
|
2145
2194
|
}
|
|
2146
2195
|
function printDepositSuccess(depositedPath, handoffId, reqList) {
|
|
2147
|
-
console.log(` ${
|
|
2148
|
-
console.log(` Handoff ID: ${
|
|
2196
|
+
console.log(` ${pc10.green("\u2714")} Sidecar successfully deposited: ${pc10.bold(depositedPath)}`);
|
|
2197
|
+
console.log(` Handoff ID: ${pc10.cyan(handoffId)}`);
|
|
2149
2198
|
console.log(` Delivered requirements: ${reqList.join(", ")}
|
|
2150
2199
|
`);
|
|
2151
2200
|
}
|
|
@@ -2161,12 +2210,12 @@ function emitDepositJson(success, changeId, framework, depositedPath, handoff, e
|
|
|
2161
2210
|
console.log(JSON.stringify(payload, null, 2));
|
|
2162
2211
|
}
|
|
2163
2212
|
function printDepositHeader(changeId, framework) {
|
|
2164
|
-
console.log(
|
|
2213
|
+
console.log(pc10.bold(pc10.cyan(`
|
|
2165
2214
|
\u{1F4E6} [AI-SDLC SDD] Depositing PDaC Handoff Sidecar for '${changeId}' (${framework})...`)));
|
|
2166
2215
|
}
|
|
2167
2216
|
function printDepositError(err) {
|
|
2168
2217
|
const errMessage = err instanceof Error ? err.message : String(err);
|
|
2169
|
-
console.error(
|
|
2218
|
+
console.error(pc10.red(` \u2716 Error depositing sidecar: ${errMessage}
|
|
2170
2219
|
`));
|
|
2171
2220
|
}
|
|
2172
2221
|
function runSddDeposit(options) {
|
|
@@ -2192,9 +2241,9 @@ function runSddDeposit(options) {
|
|
|
2192
2241
|
}
|
|
2193
2242
|
function printHandoffEntry(isValid, id, relDir, reqCount) {
|
|
2194
2243
|
if (isValid) {
|
|
2195
|
-
console.log(` ${
|
|
2244
|
+
console.log(` ${pc10.green("\u2714")} [${pc10.bold(id)}] in ${relDir} (Requirements: ${reqCount})`);
|
|
2196
2245
|
} else {
|
|
2197
|
-
console.log(` ${
|
|
2246
|
+
console.log(` ${pc10.red("\u2716")} [${pc10.bold(id)}] in ${relDir} - Invalid handoff schema or subgraph.`);
|
|
2198
2247
|
}
|
|
2199
2248
|
}
|
|
2200
2249
|
function processHandoffEntry(handoff, changeDir, rootDir, isSilent) {
|
|
@@ -2210,7 +2259,7 @@ function processHandoffEntry(handoff, changeDir, rootDir, isSilent) {
|
|
|
2210
2259
|
function auditHandoffsMap(handoffsMap, rootDir, isSilent) {
|
|
2211
2260
|
if (handoffsMap.size === 0) {
|
|
2212
2261
|
if (!isSilent) {
|
|
2213
|
-
console.log(
|
|
2262
|
+
console.log(pc10.yellow(" [NOTICE] No handoff.yaml sidecar companion files found in specs/."));
|
|
2214
2263
|
}
|
|
2215
2264
|
return { handoffItems: [], validCount: 0, invalidCount: 0 };
|
|
2216
2265
|
}
|
|
@@ -2234,10 +2283,10 @@ function auditDuplicatesShiftLeft(rootDir, checkDuplicates, isSilent) {
|
|
|
2234
2283
|
}
|
|
2235
2284
|
const dupResult = verifyArtifactDuplicates3({ rootDir });
|
|
2236
2285
|
if (dupResult.errorCount > 0 && !isSilent) {
|
|
2237
|
-
console.log(
|
|
2286
|
+
console.log(pc10.red(`
|
|
2238
2287
|
\u2716 [Shift-Left Gate] Detected ${dupResult.errorCount} requirement collision(s)/duplicate(s) in workspace:`));
|
|
2239
2288
|
for (const issue of dupResult.issues.filter((i) => i.severity === "ERROR")) {
|
|
2240
|
-
console.log(` ${
|
|
2289
|
+
console.log(` ${pc10.red("\u2716")} [${issue.type}] ${issue.id} in ${issue.file}: ${issue.message}`);
|
|
2241
2290
|
}
|
|
2242
2291
|
}
|
|
2243
2292
|
return { duplicateErrors: dupResult.errorCount, duplicateIssues: dupResult.issues };
|
|
@@ -2258,12 +2307,12 @@ function emitSddVerifyJson(payload) {
|
|
|
2258
2307
|
}
|
|
2259
2308
|
function printSddVerifyVerdict(isOk) {
|
|
2260
2309
|
console.log(
|
|
2261
|
-
isOk ?
|
|
2310
|
+
isOk ? pc10.green("\n\u2714 SDD Integration COMPLIANT: All sidecars and requirements are valid.\n") : pc10.red("\n\u2716 SDD Integration BLOCKED: Non-compliant sidecars or duplicate requirements detected.\n")
|
|
2262
2311
|
);
|
|
2263
2312
|
}
|
|
2264
2313
|
function printSddVerifyHeader(totalFound) {
|
|
2265
|
-
console.log(
|
|
2266
|
-
console.log(` Found PDaC sidecars: ${
|
|
2314
|
+
console.log(pc10.bold(pc10.cyan("\n\u{1F50D} [AI-SDLC SDD] Verifying SDD Workspaces and Handoff Sidecars (HOF-*)...")));
|
|
2315
|
+
console.log(` Found PDaC sidecars: ${pc10.bold(String(totalFound))}`);
|
|
2267
2316
|
}
|
|
2268
2317
|
function runSddVerify(options = {}) {
|
|
2269
2318
|
const rootDir = options.root || process.cwd();
|
|
@@ -2287,7 +2336,7 @@ function runSddVerify(options = {}) {
|
|
|
2287
2336
|
}
|
|
2288
2337
|
function handleUndetectedChange(detection, isSilent, useJson) {
|
|
2289
2338
|
if (!isSilent) {
|
|
2290
|
-
console.log(
|
|
2339
|
+
console.log(pc10.yellow("\n\u2139 [AI-SDLC SDD] No active SDD change detected to integrate:"));
|
|
2291
2340
|
for (const r of detection.reasons) console.log(` - ${r}`);
|
|
2292
2341
|
console.log("");
|
|
2293
2342
|
}
|
|
@@ -2299,7 +2348,7 @@ function handleUndetectedChange(detection, isSilent, useJson) {
|
|
|
2299
2348
|
}
|
|
2300
2349
|
function handlePendingTasks(detection, isSilent, useJson) {
|
|
2301
2350
|
if (!isSilent) {
|
|
2302
|
-
console.log(
|
|
2351
|
+
console.log(pc10.red(`
|
|
2303
2352
|
\u2716 [AI-SDLC SDD] Detected change '${detection.changeId}' has pending tasks (${detection.completedTasksCount}/${detection.totalTasksCount} completed). All tasks must be in COMPLETED status.
|
|
2304
2353
|
`));
|
|
2305
2354
|
}
|
|
@@ -2331,7 +2380,7 @@ function resolveAutoChange(options, rootDir, isSilent, useJson) {
|
|
|
2331
2380
|
return handlePendingTasks(detection, isSilent, useJson);
|
|
2332
2381
|
}
|
|
2333
2382
|
if (!isSilent) {
|
|
2334
|
-
console.log(
|
|
2383
|
+
console.log(pc10.cyan(` \u2714 Automatically detected SDD change: ${pc10.bold(detection.changeId)} (via ${detection.source})`));
|
|
2335
2384
|
}
|
|
2336
2385
|
return detection.changeId;
|
|
2337
2386
|
}
|
|
@@ -2339,7 +2388,7 @@ function resolveIntegrationChangeId(options, rootDir, isSilent, useJson) {
|
|
|
2339
2388
|
const changeId = options.change || (options.auto ? resolveAutoChange(options, rootDir, isSilent, useJson) : null);
|
|
2340
2389
|
if (!changeId) {
|
|
2341
2390
|
if (!options.auto) {
|
|
2342
|
-
if (!isSilent) console.error(
|
|
2391
|
+
if (!isSilent) console.error(pc10.red("\n\u2716 Change identifier (--change <id>) or --auto option must be specified.\n"));
|
|
2343
2392
|
if (useJson) {
|
|
2344
2393
|
console.log(JSON.stringify({ command: "sdd:integrate", success: false, exitCode: 1, error: "Change identifier (--change <id>) or --auto option must be specified." }, null, 2));
|
|
2345
2394
|
}
|
|
@@ -2349,22 +2398,22 @@ function resolveIntegrationChangeId(options, rootDir, isSilent, useJson) {
|
|
|
2349
2398
|
return changeId;
|
|
2350
2399
|
}
|
|
2351
2400
|
function printIntegrationSuccess(changeId, result) {
|
|
2352
|
-
console.log(` ${
|
|
2353
|
-
console.log(` - Completed tasks: ${
|
|
2354
|
-
console.log(` - Integrated requirements: ${
|
|
2355
|
-
console.log(` - Created canonical artifacts: ${
|
|
2356
|
-
console.log(` - Updated product artifacts: ${
|
|
2357
|
-
console.log(` - Updated arc42 architecture: ${
|
|
2401
|
+
console.log(` ${pc10.green("\u2714")} Change '${changeId}' successfully processed:`);
|
|
2402
|
+
console.log(` - Completed tasks: ${pc10.bold(String(result.completedTasks.length))}`);
|
|
2403
|
+
console.log(` - Integrated requirements: ${pc10.green(result.integratedRequirements.join(", ") || "None")}`);
|
|
2404
|
+
console.log(` - Created canonical artifacts: ${pc10.green(result.createdCanonicalArtifacts?.join(", ") || "None")}`);
|
|
2405
|
+
console.log(` - Updated product artifacts: ${pc10.green(result.updatedProductArtifacts.join(", ") || "None")}`);
|
|
2406
|
+
console.log(` - Updated arc42 architecture: ${pc10.green(result.updatedArchitectureArtifacts.join(", ") || "None")}`);
|
|
2358
2407
|
if (result.archived) {
|
|
2359
|
-
console.log(` - Archived to: ${
|
|
2408
|
+
console.log(` - Archived to: ${pc10.cyan(result.archivedPath || "specs/changes/completed")}`);
|
|
2360
2409
|
}
|
|
2361
|
-
console.log(
|
|
2410
|
+
console.log(pc10.green("\n\u2714 Canonical specification integration COMPLETED (EXIT 0)\n"));
|
|
2362
2411
|
}
|
|
2363
2412
|
function printIntegrationFailure(changeId, errors) {
|
|
2364
|
-
console.log(
|
|
2413
|
+
console.log(pc10.red(`
|
|
2365
2414
|
\u2716 Failed to integrate change '${changeId}':`));
|
|
2366
|
-
for (const err of errors) console.log(` ${
|
|
2367
|
-
console.log(
|
|
2415
|
+
for (const err of errors) console.log(` ${pc10.red("\u2716")} ${err}`);
|
|
2416
|
+
console.log(pc10.red("\n\u2716 Integration BLOCKED (EXIT 1)\n"));
|
|
2368
2417
|
}
|
|
2369
2418
|
function emitIntegrateJson(changeId, result) {
|
|
2370
2419
|
const payload = {
|
|
@@ -2390,7 +2439,7 @@ function runSddIntegrate(options) {
|
|
|
2390
2439
|
const changeId = resolveIntegrationChangeId(options, rootDir, isSilent, useJson);
|
|
2391
2440
|
if (!changeId) return false;
|
|
2392
2441
|
if (!isSilent) {
|
|
2393
|
-
console.log(
|
|
2442
|
+
console.log(pc10.bold(pc10.cyan(`
|
|
2394
2443
|
\u{1F504} [AI-SDLC SDD] Integrating change '${changeId}' into canonical specification...`)));
|
|
2395
2444
|
}
|
|
2396
2445
|
const result = integrateSddChange({ rootDir, changeId, author: options.author, autoArchive: options.autoArchive });
|
|
@@ -2402,24 +2451,24 @@ function runSddIntegrate(options) {
|
|
|
2402
2451
|
return result.success;
|
|
2403
2452
|
}
|
|
2404
2453
|
function printChangeNewSuccess(result) {
|
|
2405
|
-
console.log(` ${
|
|
2406
|
-
console.log(` ${
|
|
2407
|
-
console.log(` ${
|
|
2454
|
+
console.log(` ${pc10.green("\u2714")} Change directory: ${pc10.bold(result.changeDir)}`);
|
|
2455
|
+
console.log(` ${pc10.green("\u2714")} SDD Change ID: ${pc10.cyan(result.canonicalId)} (${result.changeId})`);
|
|
2456
|
+
console.log(` ${pc10.green("\u2714")} Risk profile: ${pc10.magenta(result.profile || "standard")}`);
|
|
2408
2457
|
if (result.productArtifactCreated) {
|
|
2409
|
-
console.log(` ${
|
|
2458
|
+
console.log(` ${pc10.green("\u2714")} Product artifact: ${pc10.bold(result.productArtifactCreated)} (status: draft)`);
|
|
2410
2459
|
}
|
|
2411
|
-
console.log(` ${
|
|
2460
|
+
console.log(` ${pc10.green("\u2714")} Cited artifacts: ${result.citedArtifacts.length}`);
|
|
2412
2461
|
for (const cite of result.citedArtifacts) {
|
|
2413
|
-
console.log(` - [${
|
|
2462
|
+
console.log(` - [${pc10.cyan(cite.id)}] ${cite.digest.substring(0, 19)}... (${cite.title || "Untitled"})`);
|
|
2414
2463
|
}
|
|
2415
|
-
console.log(` ${
|
|
2416
|
-
console.log(
|
|
2464
|
+
console.log(` ${pc10.green("\u2714")} Generated files: ${result.createdFiles.length}`);
|
|
2465
|
+
console.log(pc10.green("\n\u2714 SDD change successfully initialized and validated.\n"));
|
|
2417
2466
|
}
|
|
2418
2467
|
function printChangeNewFailure(name, errors) {
|
|
2419
|
-
console.log(
|
|
2468
|
+
console.log(pc10.red(`
|
|
2420
2469
|
\u2716 Failed to create SDD change '${name}':`));
|
|
2421
|
-
for (const err of errors) console.log(` ${
|
|
2422
|
-
console.log(
|
|
2470
|
+
for (const err of errors) console.log(` ${pc10.red("\u2716")} ${err}`);
|
|
2471
|
+
console.log(pc10.red("\n\u2716 Change creation BLOCKED\n"));
|
|
2423
2472
|
}
|
|
2424
2473
|
function emitChangeNewJson(name, result) {
|
|
2425
2474
|
const payload = {
|
|
@@ -2439,7 +2488,7 @@ function emitChangeNewJson(name, result) {
|
|
|
2439
2488
|
console.log(JSON.stringify(payload, null, 2));
|
|
2440
2489
|
}
|
|
2441
2490
|
function printChangeNewHeader(name, framework) {
|
|
2442
|
-
console.log(
|
|
2491
|
+
console.log(pc10.bold(pc10.cyan(`
|
|
2443
2492
|
\u{1F4E6} [AI-SDLC SDD] Scaffolding new SDD change '${name}' (${framework})...`)));
|
|
2444
2493
|
}
|
|
2445
2494
|
function handleScaffoldOutput(name, result, isSilent, useJson) {
|
|
@@ -2474,7 +2523,7 @@ function runChangeNew(options) {
|
|
|
2474
2523
|
|
|
2475
2524
|
// src/index.ts
|
|
2476
2525
|
var program = new Command();
|
|
2477
|
-
program.name("aisdlc").description("AI-SDLC: Spec-Driven Development, Governance & Quality Gates for AI & Humans").version("3.
|
|
2526
|
+
program.name("aisdlc").description("AI-SDLC: Spec-Driven Development, Governance & Quality Gates for AI & Humans").version("3.3.0");
|
|
2478
2527
|
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) => {
|
|
2479
2528
|
const passed = runCheck({
|
|
2480
2529
|
fix: opts.fix,
|
|
@@ -2769,7 +2818,7 @@ program.command("inspect <element>").description("Inspect an element (FR, UC, CM
|
|
|
2769
2818
|
});
|
|
2770
2819
|
process.exit(passed ? 0 : 1);
|
|
2771
2820
|
});
|
|
2772
|
-
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) => {
|
|
2821
|
+
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("-s, --stack <stacks>", "Technology stacks to deploy coding rules for (dotnet, typescript, javascript, angular, java, kotlin, rust, go, c, cpp, all, none)").option("--json", "Structured JSON format output").option("-F, --format <format>", "Output format: text or json").action(async (directory, opts) => {
|
|
2773
2822
|
let agents = opts.agents;
|
|
2774
2823
|
let arch = opts.architecture || opts.arch;
|
|
2775
2824
|
let ci = opts.ci;
|
|
@@ -2789,6 +2838,7 @@ program.command("init [directory]").description("Initialize a new repository wit
|
|
|
2789
2838
|
ci,
|
|
2790
2839
|
agents,
|
|
2791
2840
|
architecture: arch,
|
|
2841
|
+
stack: opts.stack,
|
|
2792
2842
|
json: opts.json,
|
|
2793
2843
|
format: opts.format
|
|
2794
2844
|
});
|
|
@@ -2801,6 +2851,7 @@ program.command("sync [directory]").description("Synchronize and refresh AI agen
|
|
|
2801
2851
|
agents: opts.agents || "all",
|
|
2802
2852
|
ci: "none",
|
|
2803
2853
|
architecture: "none",
|
|
2854
|
+
stack: "none",
|
|
2804
2855
|
json: opts.json,
|
|
2805
2856
|
format: opts.format
|
|
2806
2857
|
});
|
|
@@ -2809,10 +2860,23 @@ program.command("sync [directory]").description("Synchronize and refresh AI agen
|
|
|
2809
2860
|
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) => {
|
|
2810
2861
|
await runMcpServer({ root: opts.root, role: opts.role });
|
|
2811
2862
|
});
|
|
2863
|
+
var reviewCmd = program.command("review").description("Review commands: sanitized write channel for reviewer roles (agent-code-reviewer, etc.)");
|
|
2864
|
+
reviewCmd.command("submit").description("Persist a formal review report for an active change").requiredOption("-c, --change <id>", "Active change identifier (e.g. chg-054-foo)").requiredOption("--reviewer <role>", "Reviewer role (e.g. agent-code-reviewer, agent-security-auditor)").requiredOption("--verdict <verdict>", "Review verdict (COMPLIANT, SUGGESTIONS, BLOCKING)").requiredOption("--body <body>", "Review findings and content in markdown").option("-r, --root <path>", "Project root directory").option("--silent", "Suppress console output").option("--json", "Output report details as JSON").action((opts) => {
|
|
2865
|
+
const ok = runReviewSubmit({
|
|
2866
|
+
root: opts.root,
|
|
2867
|
+
change: opts.change,
|
|
2868
|
+
reviewer: opts.reviewer,
|
|
2869
|
+
verdict: opts.verdict,
|
|
2870
|
+
body: opts.body,
|
|
2871
|
+
silent: opts.silent,
|
|
2872
|
+
json: opts.json
|
|
2873
|
+
});
|
|
2874
|
+
if (!ok) process.exit(1);
|
|
2875
|
+
});
|
|
2812
2876
|
program.on("command:*", () => {
|
|
2813
|
-
console.error(
|
|
2877
|
+
console.error(pc11.red(`
|
|
2814
2878
|
[ERROR] Unrecognized command: ${program.args.join(" ")}`));
|
|
2815
|
-
console.log(
|
|
2879
|
+
console.log(pc11.yellow("Run `aisdlc --help` to see available commands.\n"));
|
|
2816
2880
|
process.exit(1);
|
|
2817
2881
|
});
|
|
2818
2882
|
program.parse(process.argv);
|