@aisdlc/cli 4.4.0 → 4.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/README.md CHANGED
@@ -138,9 +138,13 @@ Running `aisdlc init` (or `npx @aisdlc/cli init`) delivers a turnkey governance
138
138
 
139
139
  ### Automated Code Coverage Ingestion (.NET / Polyglot)
140
140
 
141
- `aisdlc report quality` and `aisdlc report dashboard` passively ingest test coverage from standard locations:
141
+ `aisdlc verify quality`, `aisdlc verify all`, `aisdlc report quality`, and `aisdlc report dashboard` passively ingest test coverage from standard locations:
142
142
  - `coverage/lcov.info` or `reports/lcov.info` (LCOV format)
143
143
  - `coverage/coverage-summary.json` or `reports/coverage-summary.json` (Istanbul/JSON summary format)
144
+ - `coverage.cobertura.xml` / `coverage.xml` / `TestResults/*/coverage.cobertura.xml` (Cobertura XML, e.g. .NET Coverlet & Pytest)
145
+ - `jacoco.xml`, `coverage.out` (Go), `llvm-cov.json` (Rust/C++)
146
+
147
+ > **Strict Enforcement:** In `STRICT` mode (`quality-policy.yaml`), `aisdlc verify quality` (enabled by default), `aisdlc verify all`, and `aisdlc report quality` fail if no coverage report is found on disk. In `PERMISSIVE` mode (or during pre-flight `aisdlc check`), missing coverage is non-blocking.
144
148
 
145
149
  #### Setting up .NET / C# projects:
146
150
  1. Ensure `coverlet.collector` is installed in your test project (`*.Tests.csproj`):
package/dist/index.js CHANGED
@@ -103,8 +103,14 @@ function buildQualityViolations(result) {
103
103
  metric: "unit-test",
104
104
  message: `Function [${u.functionName}] lacks direct unit test`
105
105
  }));
106
+ const untestedUi = (result.untestedUiComponents || []).map((c) => ({
107
+ file: c.file,
108
+ component: c.componentName,
109
+ metric: "ui-test",
110
+ message: `UI component [${c.componentName}] lacks UI/E2E test`
111
+ }));
106
112
  const cov = (result.coverageViolations || []).map((message) => ({ metric: "coverage", message }));
107
- return [...fnViolations, ...untested, ...cov];
113
+ return [...fnViolations, ...untested, ...untestedUi, ...cov];
108
114
  }
109
115
  function emitQualityJson(result) {
110
116
  const violations = buildQualityViolations(result);
@@ -118,6 +124,7 @@ function emitQualityJson(result) {
118
124
  passCount: result.passCount,
119
125
  failCount: result.failCount,
120
126
  untestedFunctionsCount: result.untestedFunctions?.length || 0,
127
+ untestedUiComponentsCount: result.untestedUiComponents?.length || 0,
121
128
  coverageViolationsCount: result.coverageViolations?.length || 0,
122
129
  baselineViolationsCount: result.baselineViolationsCount || 0,
123
130
  toleratedViolationsCount: result.toleratedViolationsCount || 0,
@@ -148,6 +155,13 @@ function printQualityTestAndCoverageGaps(result) {
148
155
  console.log(` ${pc.red("\u2716")} ${pc.bold(u.file)} [${u.functionName}]`);
149
156
  }
150
157
  }
158
+ const untestedUi = result.untestedUiComponents || [];
159
+ if (untestedUi.length > 0) {
160
+ console.log(pc.red("\n UI components lacking UI/E2E tests:"));
161
+ for (const c of untestedUi.slice(0, 15)) {
162
+ console.log(` ${pc.red("\u2716")} ${pc.bold(c.file)} [${c.componentName}]`);
163
+ }
164
+ }
151
165
  for (const cv of result.coverageViolations || []) {
152
166
  console.log(` ${pc.red("\u2716")} ${cv}`);
153
167
  }
@@ -198,7 +212,8 @@ function runVerifyQuality(options = {}) {
198
212
  thresholds: buildQualityThresholds(options),
199
213
  updateBaseline: options.updateBaseline,
200
214
  baseline: options.baseline,
201
- ratchet: options.ratchet
215
+ ratchet: options.ratchet,
216
+ requireCoverageReport: options.requireCoverageReport
202
217
  });
203
218
  if (useJson) {
204
219
  emitQualityJson(result);
@@ -1343,7 +1358,7 @@ function auditPdacGate(rootDir, wasAutoFixed) {
1343
1358
  };
1344
1359
  }
1345
1360
  function auditQualityGate(rootDir) {
1346
- const res = verifyQualityGate2({ rootDir });
1361
+ const res = verifyQualityGate2({ rootDir, requireCoverageReport: false });
1347
1362
  if (res.success) {
1348
1363
  return {
1349
1364
  name: "Quality Gate (Complexity & Maintainability)",
@@ -2861,7 +2876,7 @@ function runChangeNew(options) {
2861
2876
 
2862
2877
  // src/index.ts
2863
2878
  var program = new Command();
2864
- program.name("aisdlc").description("AI-SDLC: Spec-Driven Development, Governance & Quality Gates for AI & Humans").version("4.4.0");
2879
+ program.name("aisdlc").description("AI-SDLC: Spec-Driven Development, Governance & Quality Gates for AI & Humans").version("4.5.0");
2865
2880
  program.command("doctor").description("Comprehensive environment, toolchain, git-hooks, and security health diagnostics").option("-r, --root <path>", "Project root directory").option("--fix", "Automatically repair broken or missing git hooks with backup").option("--json", "Emit diagnostics report in structured JSON format").option("--strict", "Fail with non-zero exit code on warnings as well as critical failures").option("--offline", "Skip remote external network probes (e.g. for air-gapped environments)").option("--timeout <ms>", "Maximum timeout in milliseconds for subprocess execution", parseInt).action(async (opts) => {
2866
2881
  const exitCode = await runDoctor({
2867
2882
  rootDir: opts.root,