@aisdlc/core 2.0.0 → 2.0.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.cjs CHANGED
@@ -1452,22 +1452,31 @@ function auditUnitTestsPerFunction(results, rootDir) {
1452
1452
  }
1453
1453
  return untested;
1454
1454
  }
1455
+ function isVitestMidFlightCoverage(rel, fullPath) {
1456
+ if (!process.env.VITEST || rel !== "coverage/coverage-summary.json") return false;
1457
+ return path4__namespace.resolve(fullPath) === path4__namespace.resolve(process.cwd(), rel);
1458
+ }
1459
+ function parseCoverageSummaryFile(filePath, source) {
1460
+ try {
1461
+ const raw = JSON.parse(fs7__namespace.readFileSync(filePath, "utf-8"));
1462
+ const total = raw.total;
1463
+ if (!total) return null;
1464
+ return {
1465
+ linesPct: Number(total.lines?.pct ?? 0),
1466
+ branchesPct: Number(total.branches?.pct ?? 0),
1467
+ functionsPct: Number(total.functions?.pct ?? 0),
1468
+ source
1469
+ };
1470
+ } catch {
1471
+ return null;
1472
+ }
1473
+ }
1455
1474
  function readSummaryCoverageJson(rootDir) {
1456
1475
  for (const rel of ["coverage/coverage-summary.json", "reports/coverage-summary.json"]) {
1457
1476
  const full = path4__namespace.join(rootDir, rel);
1458
- if (!fs7__namespace.existsSync(full)) continue;
1459
- try {
1460
- const raw = JSON.parse(fs7__namespace.readFileSync(full, "utf-8"));
1461
- const total = raw.total;
1462
- if (!total) continue;
1463
- return {
1464
- linesPct: Number(total.lines?.pct ?? 0),
1465
- branchesPct: Number(total.branches?.pct ?? 0),
1466
- functionsPct: Number(total.functions?.pct ?? 0),
1467
- source: rel
1468
- };
1469
- } catch {
1470
- }
1477
+ if (!fs7__namespace.existsSync(full) || isVitestMidFlightCoverage(rel, full)) continue;
1478
+ const summary = parseCoverageSummaryFile(full, rel);
1479
+ if (summary) return summary;
1471
1480
  }
1472
1481
  return null;
1473
1482
  }
@@ -12887,7 +12896,7 @@ npx tsx packages/cli/src/index.ts sdd integrate --change <chg-id>
12887
12896
 
12888
12897
  ### 4. \`agent-system-architect\` (System Architect)
12889
12898
  - **Mission**: Translate the approved product definition into a modular technical architecture based on arc42 enriched with NAF v4 (\`CMP-*\`, Mermaid diagrams, \`ADR-*\`).
12890
- - **Guardrails**: Declare \`satisfies-requirements\` on every \`CMP-*\` (including \`PRIV-REQ-*\`) and trigger the technical security/privacy feedback loop toward \`agent-threat-modeler\` \u2794 \`agent-privacy-officer\` when infrastructure decisions introduce new attack vectors or PII flows.
12899
+ - **Guardrails**: Declare \`satisfies-requirements\` on every \`CMP-*\` (including \`PRIV-REQ-*\`), instantiate mandatory building block \`CMP-OBSERVABILITY\` (Level 2/3) alongside Section 8 and an ADR for runtime telemetry, and trigger the technical security/privacy feedback loop toward \`agent-threat-modeler\` \u2794 \`agent-privacy-officer\` when infrastructure decisions introduce new attack vectors or PII flows.
12891
12900
 
12892
12901
  ### 5. \`agent-qa-engineer\` (QA Engineer and SDET)
12893
12902
  - **Mission**: Translate approved requirements (\`FR-*\`, \`SEC-REQ-*\`, \`PRIV-REQ-*\`, \`QR-*\`) into comprehensive FAILING (red) BDD/Gherkin, End-to-End (E2E), UI, and unit test suites, before \`agent-developer\` writes production code.