@aisdlc/core 1.6.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/README.md +4 -3
- package/dist/index.cjs +1048 -157
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +161 -16
- package/dist/index.d.ts +161 -16
- package/dist/index.js +1033 -158
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -561,9 +561,11 @@ function resolveTargetFiles(rootDir, targetPath) {
|
|
|
561
561
|
const searchDirs = [
|
|
562
562
|
path4.join(rootDir, "product"),
|
|
563
563
|
path4.join(rootDir, "security"),
|
|
564
|
+
path4.join(rootDir, "privacy"),
|
|
564
565
|
path4.join(rootDir, "specs"),
|
|
565
566
|
path4.join(rootDir, "examples", "product"),
|
|
566
567
|
path4.join(rootDir, "examples", "security"),
|
|
568
|
+
path4.join(rootDir, "examples", "privacy"),
|
|
567
569
|
path4.join(rootDir, "examples", "specs")
|
|
568
570
|
];
|
|
569
571
|
return searchDirs.filter((d) => fs7.existsSync(d)).flatMap((d) => walkMdFiles(d));
|
|
@@ -574,10 +576,12 @@ function resolveFeatureFilePath(rootDir, filePath, id, customTarget) {
|
|
|
574
576
|
}
|
|
575
577
|
const baseDir = path4.join(rootDir, "tests", "features");
|
|
576
578
|
const candidateSecurity = path4.join(baseDir, "security", `${id.toLowerCase()}.feature`);
|
|
579
|
+
const candidatePrivacy = path4.join(baseDir, "privacy", `${id.toLowerCase()}.feature`);
|
|
577
580
|
const candidateRoot = path4.join(baseDir, `${id.toLowerCase()}.feature`);
|
|
578
581
|
if (fs7.existsSync(candidateSecurity)) return candidateSecurity;
|
|
582
|
+
if (fs7.existsSync(candidatePrivacy)) return candidatePrivacy;
|
|
579
583
|
if (fs7.existsSync(candidateRoot)) return candidateRoot;
|
|
580
|
-
const subDir = filePath.includes("security") ? "security" : "";
|
|
584
|
+
const subDir = filePath.includes("security") ? "security" : filePath.includes("privacy") ? "privacy" : "";
|
|
581
585
|
return path4.join(baseDir, subDir, `${id.toLowerCase()}.feature`);
|
|
582
586
|
}
|
|
583
587
|
function buildFeatureFileContent(rootDir, filePath, id, version, gherkinBlocks) {
|
|
@@ -804,7 +808,7 @@ function parseFeatureTags(content, relTest, reqToTestsMap) {
|
|
|
804
808
|
}
|
|
805
809
|
}
|
|
806
810
|
}
|
|
807
|
-
var REQ_ID_REGEX = /\b(FR|QR|CON|SEC-REQ)-[A-Z0-9]+(-[A-Z0-9]+)*\b/g;
|
|
811
|
+
var REQ_ID_REGEX = /\b(FR|QR|CON|SEC-REQ|PRIV-REQ)-[A-Z0-9]+(-[A-Z0-9]+)*\b/g;
|
|
808
812
|
function parseCodeTestIds(content, relTest, reqToTestsMap) {
|
|
809
813
|
const idMatches = content.match(REQ_ID_REGEX);
|
|
810
814
|
if (!idMatches) return;
|
|
@@ -904,9 +908,9 @@ function computeMissingVariants(cov) {
|
|
|
904
908
|
if (!cov.invalid) missing.push("invalid");
|
|
905
909
|
return missing;
|
|
906
910
|
}
|
|
907
|
-
var REQ_PREFIXES = ["FR-", "QR-", "CON-", "SEC-REQ-"];
|
|
911
|
+
var REQ_PREFIXES = ["FR-", "QR-", "CON-", "SEC-REQ-", "PRIV-REQ-"];
|
|
908
912
|
function isRequirementArtifact(frontmatter, id) {
|
|
909
|
-
if (frontmatter.type === "requirement" || frontmatter.type === "security-requirement") {
|
|
913
|
+
if (frontmatter.type === "requirement" || frontmatter.type === "security-requirement" || frontmatter.type === "privacy-requirement") {
|
|
910
914
|
return true;
|
|
911
915
|
}
|
|
912
916
|
return REQ_PREFIXES.some((prefix) => id.startsWith(prefix));
|
|
@@ -1420,22 +1424,31 @@ function auditUnitTestsPerFunction(results, rootDir) {
|
|
|
1420
1424
|
}
|
|
1421
1425
|
return untested;
|
|
1422
1426
|
}
|
|
1427
|
+
function isVitestMidFlightCoverage(rel, fullPath) {
|
|
1428
|
+
if (!process.env.VITEST || rel !== "coverage/coverage-summary.json") return false;
|
|
1429
|
+
return path4.resolve(fullPath) === path4.resolve(process.cwd(), rel);
|
|
1430
|
+
}
|
|
1431
|
+
function parseCoverageSummaryFile(filePath, source) {
|
|
1432
|
+
try {
|
|
1433
|
+
const raw = JSON.parse(fs7.readFileSync(filePath, "utf-8"));
|
|
1434
|
+
const total = raw.total;
|
|
1435
|
+
if (!total) return null;
|
|
1436
|
+
return {
|
|
1437
|
+
linesPct: Number(total.lines?.pct ?? 0),
|
|
1438
|
+
branchesPct: Number(total.branches?.pct ?? 0),
|
|
1439
|
+
functionsPct: Number(total.functions?.pct ?? 0),
|
|
1440
|
+
source
|
|
1441
|
+
};
|
|
1442
|
+
} catch {
|
|
1443
|
+
return null;
|
|
1444
|
+
}
|
|
1445
|
+
}
|
|
1423
1446
|
function readSummaryCoverageJson(rootDir) {
|
|
1424
1447
|
for (const rel of ["coverage/coverage-summary.json", "reports/coverage-summary.json"]) {
|
|
1425
1448
|
const full = path4.join(rootDir, rel);
|
|
1426
|
-
if (!fs7.existsSync(full)) continue;
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
const total = raw.total;
|
|
1430
|
-
if (!total) continue;
|
|
1431
|
-
return {
|
|
1432
|
-
linesPct: Number(total.lines?.pct ?? 0),
|
|
1433
|
-
branchesPct: Number(total.branches?.pct ?? 0),
|
|
1434
|
-
functionsPct: Number(total.functions?.pct ?? 0),
|
|
1435
|
-
source: rel
|
|
1436
|
-
};
|
|
1437
|
-
} catch {
|
|
1438
|
-
}
|
|
1449
|
+
if (!fs7.existsSync(full) || isVitestMidFlightCoverage(rel, full)) continue;
|
|
1450
|
+
const summary = parseCoverageSummaryFile(full, rel);
|
|
1451
|
+
if (summary) return summary;
|
|
1439
1452
|
}
|
|
1440
1453
|
return null;
|
|
1441
1454
|
}
|
|
@@ -1933,11 +1946,40 @@ var CANONICAL_TYPE_MAP = {
|
|
|
1933
1946
|
"product/business-rules/": "business-rule",
|
|
1934
1947
|
"product/journeys/": "journey",
|
|
1935
1948
|
"security/requirements/": "security-requirement",
|
|
1949
|
+
"privacy/requirements/": "privacy-requirement",
|
|
1950
|
+
"specs/privacy/requirements/": "privacy-requirement",
|
|
1951
|
+
"privacy/assets/": "data-asset",
|
|
1952
|
+
"privacy/data-assets/": "data-asset",
|
|
1953
|
+
"specs/privacy/assets/": "data-asset",
|
|
1954
|
+
"specs/privacy/data-assets/": "data-asset",
|
|
1955
|
+
"privacy/ropa/": "privacy-ropa",
|
|
1956
|
+
"specs/privacy/ropa/": "privacy-ropa",
|
|
1957
|
+
"privacy/dpia/": "dpia-request",
|
|
1958
|
+
"specs/privacy/dpia/": "dpia-request",
|
|
1936
1959
|
"architecture/": "component"
|
|
1937
1960
|
};
|
|
1961
|
+
var ID_PREFIX_TYPE_PAIRS = [
|
|
1962
|
+
["PRIV-REQ-", "privacy-requirement"],
|
|
1963
|
+
["DATA-ASSET-", "data-asset"],
|
|
1964
|
+
["PRIV-ROPA-", "privacy-ropa"],
|
|
1965
|
+
["DPIA-", "dpia-request"],
|
|
1966
|
+
["SEC-REQ-", "security-requirement"],
|
|
1967
|
+
["FR-", "requirement"],
|
|
1968
|
+
["QR-", "requirement"],
|
|
1969
|
+
["CON-", "requirement"],
|
|
1970
|
+
["UC-", "use-case"],
|
|
1971
|
+
["ACT-", "actor"],
|
|
1972
|
+
["BR-", "business-rule"],
|
|
1973
|
+
["CMP-", "component"]
|
|
1974
|
+
];
|
|
1975
|
+
function resolveCanonicalArtifactType(normTarget, id) {
|
|
1976
|
+
if (CANONICAL_TYPE_MAP[normTarget]) return CANONICAL_TYPE_MAP[normTarget];
|
|
1977
|
+
const matched = ID_PREFIX_TYPE_PAIRS.find(([prefix]) => id.startsWith(prefix));
|
|
1978
|
+
return matched ? matched[1] : "artifact";
|
|
1979
|
+
}
|
|
1938
1980
|
function buildCanonicalInitialContent(item, changeId, author, date) {
|
|
1939
1981
|
const normTarget = item.targetDir.endsWith("/") ? item.targetDir : `${item.targetDir}/`;
|
|
1940
|
-
const artifactType =
|
|
1982
|
+
const artifactType = resolveCanonicalArtifactType(normTarget, item.id);
|
|
1941
1983
|
const frontmatter = `id: ${item.id}
|
|
1942
1984
|
type: ${artifactType}
|
|
1943
1985
|
status: draft
|
|
@@ -1992,6 +2034,21 @@ function checkTasksExecution(changeDir, changeId) {
|
|
|
1992
2034
|
}
|
|
1993
2035
|
return { ok: true, completedTasks, pendingTasks, error: null };
|
|
1994
2036
|
}
|
|
2037
|
+
function isProposalRequirementId(id) {
|
|
2038
|
+
return id.startsWith("FR-") || id.startsWith("QR-") || id.startsWith("CON-") || id.startsWith("SEC-REQ-");
|
|
2039
|
+
}
|
|
2040
|
+
function buildSubgraphFromProposalIds(ids) {
|
|
2041
|
+
const reqs = ids.filter(isProposalRequirementId);
|
|
2042
|
+
const privReqs = ids.filter((id) => id.startsWith("PRIV-REQ-"));
|
|
2043
|
+
const dataAssets = ids.filter((id) => id.startsWith("DATA-ASSET-"));
|
|
2044
|
+
const ropaEntries = ids.filter((id) => id.startsWith("PRIV-ROPA-"));
|
|
2045
|
+
return {
|
|
2046
|
+
requirements: reqs,
|
|
2047
|
+
...privReqs.length > 0 ? { privacyRequirements: privReqs } : {},
|
|
2048
|
+
...dataAssets.length > 0 ? { dataAssets } : {},
|
|
2049
|
+
...ropaEntries.length > 0 ? { ropaEntries } : {}
|
|
2050
|
+
};
|
|
2051
|
+
}
|
|
1995
2052
|
function resolveChangeHandoff(changeDir, changeId) {
|
|
1996
2053
|
const sidecar = loadProductHandoffSidecar(changeDir);
|
|
1997
2054
|
if (sidecar) return sidecar;
|
|
@@ -2000,12 +2057,12 @@ function resolveChangeHandoff(changeDir, changeId) {
|
|
|
2000
2057
|
const propContent = fs7.readFileSync(proposalFile, "utf-8");
|
|
2001
2058
|
const { frontmatter } = parseFrontmatter(propContent);
|
|
2002
2059
|
const citations = Array.isArray(frontmatter.citations) ? frontmatter.citations : [];
|
|
2003
|
-
const
|
|
2060
|
+
const ids = citations.map((c) => c.id || "").filter(Boolean);
|
|
2004
2061
|
return {
|
|
2005
2062
|
id: `HOF-${changeId.toUpperCase()}`,
|
|
2006
2063
|
type: "handoff",
|
|
2007
2064
|
changeId,
|
|
2008
|
-
subgraph:
|
|
2065
|
+
subgraph: buildSubgraphFromProposalIds(ids),
|
|
2009
2066
|
citations
|
|
2010
2067
|
};
|
|
2011
2068
|
}
|
|
@@ -2113,10 +2170,14 @@ function collectArchitectureComponents(handoff, canonicalArtifacts, targetReqs)
|
|
|
2113
2170
|
collectSatisfyingComponents(canonicalArtifacts, targetReqs, cited);
|
|
2114
2171
|
return cited;
|
|
2115
2172
|
}
|
|
2173
|
+
function isSatisfiableRequirementId(id) {
|
|
2174
|
+
return id.startsWith("FR-") || id.startsWith("QR-") || id.startsWith("CON-") || id.startsWith("SEC-REQ-") || id.startsWith("PRIV-REQ-");
|
|
2175
|
+
}
|
|
2116
2176
|
function mergeSatisfiesRequirements(fm, targetReqs) {
|
|
2117
2177
|
const existing = Array.isArray(fm["satisfies-requirements"]) ? [...fm["satisfies-requirements"]] : [];
|
|
2118
2178
|
let modified = false;
|
|
2119
2179
|
for (const req of targetReqs) {
|
|
2180
|
+
if (!isSatisfiableRequirementId(req)) continue;
|
|
2120
2181
|
if (!existing.includes(req)) {
|
|
2121
2182
|
existing.push(req);
|
|
2122
2183
|
modified = true;
|
|
@@ -2228,24 +2289,71 @@ function buildIntegrationSuccessPayload(changeId, tasksRes, targetReqs, updatedP
|
|
|
2228
2289
|
errors
|
|
2229
2290
|
};
|
|
2230
2291
|
}
|
|
2292
|
+
function collectSubgraphPromotableIds(subgraph) {
|
|
2293
|
+
if (!subgraph) return [];
|
|
2294
|
+
const rawSub = subgraph;
|
|
2295
|
+
const ropaAlias = Array.isArray(rawSub.ropaEntries) ? rawSub.ropaEntries : [];
|
|
2296
|
+
const privacyRopa = Array.isArray(rawSub.privacyRopa) ? rawSub.privacyRopa : [];
|
|
2297
|
+
const combined = [
|
|
2298
|
+
...subgraph.requirements || [],
|
|
2299
|
+
...subgraph.securityRequirements || [],
|
|
2300
|
+
...subgraph.privacyRequirements || [],
|
|
2301
|
+
...subgraph.dataAssets || [],
|
|
2302
|
+
...ropaAlias,
|
|
2303
|
+
...privacyRopa
|
|
2304
|
+
];
|
|
2305
|
+
return Array.from(new Set(combined));
|
|
2306
|
+
}
|
|
2307
|
+
function collectSpecAffectedNonArchIds(changeDir) {
|
|
2308
|
+
const specFile = path4.join(changeDir, "spec.md");
|
|
2309
|
+
if (!fs7.existsSync(specFile)) return [];
|
|
2310
|
+
const { affectedItems } = parseSpecCatalogScope(fs7.readFileSync(specFile, "utf-8"));
|
|
2311
|
+
return affectedItems.map((item) => item.id).filter((id) => !isArchitectureComponentId(id));
|
|
2312
|
+
}
|
|
2313
|
+
function resolveIntegrationOptions(options) {
|
|
2314
|
+
return {
|
|
2315
|
+
rootDir: options.rootDir || process.cwd(),
|
|
2316
|
+
changeId: options.changeId,
|
|
2317
|
+
author: options.author || "AI-SDLC Integration Engine",
|
|
2318
|
+
date: options.date || (/* @__PURE__ */ new Date()).toISOString().split("T")[0]
|
|
2319
|
+
};
|
|
2320
|
+
}
|
|
2321
|
+
function resolveTargetRequirements(handoff, changeDir) {
|
|
2322
|
+
return Array.from(
|
|
2323
|
+
/* @__PURE__ */ new Set([
|
|
2324
|
+
...collectSubgraphPromotableIds(handoff.subgraph),
|
|
2325
|
+
...collectSpecAffectedNonArchIds(changeDir)
|
|
2326
|
+
])
|
|
2327
|
+
);
|
|
2328
|
+
}
|
|
2329
|
+
function applyArtifactUpdates(ctx, changeDir, handoff, completedTasks, errors) {
|
|
2330
|
+
const targetReqs = resolveTargetRequirements(handoff, changeDir);
|
|
2331
|
+
const createdArtifacts = materializeNewCatalogArtifacts(changeDir, ctx.rootDir, ctx.changeId, ctx.author, ctx.date, errors);
|
|
2332
|
+
const canonicalArtifacts = loadCanonicalArtifacts(ctx.rootDir);
|
|
2333
|
+
const updatedProduct = updateRequirementsArtifacts(targetReqs, createdArtifacts, canonicalArtifacts, completedTasks, ctx.changeId, ctx.date, ctx.author, errors);
|
|
2334
|
+
const citedComponents = collectArchitectureComponents(handoff, canonicalArtifacts, targetReqs);
|
|
2335
|
+
const updatedArch = updateArchitectureComponents(citedComponents, canonicalArtifacts, targetReqs, ctx.changeId, ctx.date, ctx.author, errors);
|
|
2336
|
+
return { targetReqs, updatedProduct, updatedArch, createdArtifacts };
|
|
2337
|
+
}
|
|
2231
2338
|
function integrateSddChange(options) {
|
|
2232
|
-
const
|
|
2233
|
-
const
|
|
2234
|
-
|
|
2235
|
-
const date = options.date || (/* @__PURE__ */ new Date()).toISOString().split("T")[0];
|
|
2236
|
-
const validation = validateChangeWorkspace(rootDir, changeId);
|
|
2237
|
-
if (validation.error) return buildEmptyIntegrationResult(changeId, validation.error, validation.pendingTasks);
|
|
2238
|
-
const { changeDir, tasksRes, handoff } = validation;
|
|
2339
|
+
const ctx = resolveIntegrationOptions(options);
|
|
2340
|
+
const validation = validateChangeWorkspace(ctx.rootDir, ctx.changeId);
|
|
2341
|
+
if (validation.error) return buildEmptyIntegrationResult(ctx.changeId, validation.error, validation.pendingTasks);
|
|
2239
2342
|
const errors = [];
|
|
2240
|
-
const
|
|
2241
|
-
const
|
|
2242
|
-
const canonicalArtifacts = loadCanonicalArtifacts(rootDir);
|
|
2243
|
-
const updatedProduct = updateRequirementsArtifacts(targetReqs, createdArtifacts, canonicalArtifacts, tasksRes.completedTasks, changeId, date, author, errors);
|
|
2244
|
-
const citedComponents = collectArchitectureComponents(handoff, canonicalArtifacts, targetReqs);
|
|
2245
|
-
const updatedArch = updateArchitectureComponents(citedComponents, canonicalArtifacts, targetReqs, changeId, date, author, errors);
|
|
2343
|
+
const { changeDir, tasksRes, handoff } = validation;
|
|
2344
|
+
const updates = applyArtifactUpdates(ctx, changeDir, handoff, tasksRes.completedTasks, errors);
|
|
2246
2345
|
const completedAll = tasksRes.completedTasks.length > 0 && tasksRes.pendingTasks.length === 0;
|
|
2247
|
-
const archiveRes = archiveChangeWorkspace(changeDir, changeId, rootDir, options.autoArchive !== false, completedAll);
|
|
2248
|
-
return buildIntegrationSuccessPayload(
|
|
2346
|
+
const archiveRes = archiveChangeWorkspace(changeDir, ctx.changeId, ctx.rootDir, options.autoArchive !== false, completedAll);
|
|
2347
|
+
return buildIntegrationSuccessPayload(
|
|
2348
|
+
ctx.changeId,
|
|
2349
|
+
tasksRes,
|
|
2350
|
+
updates.targetReqs,
|
|
2351
|
+
updates.updatedProduct,
|
|
2352
|
+
updates.updatedArch,
|
|
2353
|
+
updates.createdArtifacts,
|
|
2354
|
+
archiveRes,
|
|
2355
|
+
errors
|
|
2356
|
+
);
|
|
2249
2357
|
}
|
|
2250
2358
|
function auditChangeRequirements(targetReqs, canonicalMap) {
|
|
2251
2359
|
const integrated = [];
|
|
@@ -2276,7 +2384,7 @@ function auditChangeEntry(changeDir, changeName, canonicalMap) {
|
|
|
2276
2384
|
const tasksFile = path4.join(changeDir, "tasks.md");
|
|
2277
2385
|
const tasks = fs7.existsSync(tasksFile) ? parseTasksFromContent(fs7.readFileSync(tasksFile, "utf-8")) : [];
|
|
2278
2386
|
const completed = tasks.filter((t) => t.status === "COMPLETED");
|
|
2279
|
-
const targetReqs = handoff.subgraph
|
|
2387
|
+
const targetReqs = collectSubgraphPromotableIds(handoff.subgraph);
|
|
2280
2388
|
const { integrated, missing, gaps } = auditChangeRequirements(targetReqs, canonicalMap);
|
|
2281
2389
|
const status = resolveAuditStatus(integrated.length, targetReqs.length, gaps.length);
|
|
2282
2390
|
return {
|
|
@@ -2710,14 +2818,18 @@ function syncPdacDigests(options = {}) {
|
|
|
2710
2818
|
|
|
2711
2819
|
// src/init/starter-schemas.ts
|
|
2712
2820
|
var SCHEMA_SCHEMAS_ARCHITECTURE_ADR_SCHEMA_JSON = '{\r\n "$schema": "https://json-schema.org/draft/2020-12/schema",\r\n "$id": "https://ai-sdlc.org/schemas/architecture/adr.schema.json",\r\n "title": "Architecture Decision Record Schema (Versionable)",\r\n "type": "object",\r\n "required": ["id", "type", "title", "status", "version", "deciders", "decision-date"],\r\n "properties": {\r\n "id": {\r\n "type": "string",\r\n "pattern": "^ADR-[0-9]{3,4}(-[A-Z0-9]+)*$"\r\n },\r\n "type": {\r\n "type": "string",\r\n "const": "architecture-decision-record"\r\n },\r\n "version": {\r\n "type": "string",\r\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$",\r\n "description": "Decision record semantic version (SemVer)."\r\n },\r\n "schema-version": {\r\n "type": "string"\r\n },\r\n "title": {\r\n "type": "string",\r\n "minLength": 3\r\n },\r\n "status": {\r\n "type": "string",\r\n "enum": ["proposed", "accepted", "rejected", "deprecated", "superseded"]\r\n },\r\n "deciders": {\r\n "type": "array",\r\n "minItems": 1,\r\n "items": { "type": "string" }\r\n },\r\n "decision-date": {\r\n "type": "string",\r\n "format": "date"\r\n },\r\n "affects-components": {\r\n "type": "array",\r\n "items": {\r\n "type": "string",\r\n "pattern": "^CMP-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n }\r\n },\r\n "supersedes": {\r\n "type": ["string", "null"],\r\n "pattern": "^ADR-[0-9]{3,4}(-[A-Z0-9]+)*$"\r\n },\r\n "superseded-by": {\r\n "type": ["string", "null"],\r\n "pattern": "^ADR-[0-9]{3,4}(-[A-Z0-9]+)*$"\r\n }\r\n },\r\n "additionalProperties": false\r\n}\r\n';
|
|
2713
|
-
var SCHEMA_SCHEMAS_ARCHITECTURE_COMPONENT_SCHEMA_JSON = '{\r\n "$schema": "https://json-schema.org/draft/2020-12/schema",\r\n "$id": "https://ai-sdlc.org/schemas/architecture/component.schema.json",\r\n "title": "NAF v4 / arc42 Architecture Component Schema (Multilevel)",\r\n "type": "object",\r\n "required": [\r\n "id",\r\n "type",\r\n "title",\r\n "status",\r\n "version",\r\n "level",\r\n "implementation-type",\r\n "implements-use-cases"\r\n ],\r\n "properties": {\r\n "id": {\r\n "type": "string",\r\n "pattern": "^CMP-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "type": {\r\n "type": "string",\r\n "const": "component"\r\n },\r\n "version": {\r\n "type": "string",\r\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$",\r\n "description": "Architecture component semantic version (SemVer)."\r\n },\r\n "schema-version": {\r\n "type": "string"\r\n },\r\n "title": {\r\n "type": "string",\r\n "minLength": 3\r\n },\r\n "status": {\r\n "type": "string",\r\n "enum": ["proposed", "accepted", "deprecated", "retired"]\r\n },\r\n "level": {\r\n "type": "integer",\r\n "minimum": 1,\r\n "description": "Hierarchical architecture level (1: Bounded Context / Root System, 2: Subsystem / Container, 3: Executable Unit / DLL / Function)."\r\n },\r\n "bounded-context": {\r\n "type": "string",\r\n "description": "Domain-Driven Design (DDD) Bounded Context name this component belongs to."\r\n },\r\n "parent-component": {\r\n "type": ["string", "null"],\r\n "pattern": "^CMP-[A-Z0-9]+(-[A-Z0-9]+)*$",\r\n "description": "Parent component identifier (null if Level 1)."\r\n },\r\n "implementation-type": {\r\n "type": "string",\r\n "enum": ["service", "dll", "function", "composite"],\r\n "description": "Technical implementation paradigm: distributed service (service), dynamic/native library (dll), in-process module/function (function), or logical aggregator/Bounded Context (composite)."\r\n },\r\n "implements-use-cases": {\r\n "type": "array",\r\n "minItems": 1,\r\n "items": {\r\n "type": "string",\r\n "pattern": "^UC-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n }\r\n },\r\n "satisfies-requirements": {\r\n "type": "array",\r\n "items": {\r\n "type": "string",\r\n "pattern": "^(FR|QR|CON|SEC-REQ)-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n }\r\n },\r\n "hosted-in-enclave": {\r\n "type": "string",\r\n "pattern": "^SEC-ENC-[A-Z0-9]+(-[A-Z0-9]+)*$",\r\n "description": "Security enclave where the component resides (optional for DLLs or in-process functions)."\r\n },\r\n "interfaces": {\r\n "type": "array",\r\n "items": {\r\n "type": "object",\r\n "required": ["name", "protocol"],\r\n "properties": {\r\n "name": { "type": "string" },\r\n "protocol": {\r\n "type": "string",\r\n "enum": [\r\n "REST/HTTP",\r\n "gRPC",\r\n "WebSocket",\r\n "Kafka",\r\n "MQTT",\r\n "C-ABI",\r\n "Native-ABI",\r\n "FFI",\r\n "In-Process API",\r\n "Function-Call",\r\n "CLI",\r\n "GUI",\r\n "IPC"\r\n ]\r\n },\r\n "contract-spec": { "type": "string" }\r\n }\r\n }\r\n },\r\n "supersedes": {\r\n "type": ["string", "null"],\r\n "pattern": "^CMP-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "superseded-by": {\r\n "type": ["string", "null"],\r\n "pattern": "^CMP-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n }\r\n },\r\n "additionalProperties": false\r\n}\r\n';
|
|
2714
|
-
var SCHEMA_SCHEMAS_ARCHITECTURE_INTRODUCTION_AND_GOALS_SCHEMA_JSON = '{\r\n "$schema": "https://json-schema.org/draft/2020-12/schema",\r\n "$id": "https://ai-sdlc.org/schemas/architecture/introduction-and-goals.schema.json",\r\n "title": "NAF v4 Enterprise & Capability / arc42 Introduction and System Goals Schema",\r\n "type": "object",\r\n "required": [\r\n "id",\r\n "type",\r\n "title",\r\n "status",\r\n "version",\r\n "naf-perspective",\r\n "cites-product-actors",\r\n "cites-quality-goals",\r\n "cites-use-cases"\r\n ],\r\n "properties": {\r\n "id": {\r\n "type": "string",\r\n "pattern": "^ARCH-INTRO-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "type": {\r\n "type": "string",\r\n "const": "architecture-introduction"\r\n },\r\n "version": {\r\n "type": "string",\r\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$",\r\n "description": "Artifact semantic version (SemVer)."\r\n },\r\n "schema-version": {\r\n "type": "string"\r\n },\r\n "title": {\r\n "type": "string",\r\n "minLength": 3\r\n },\r\n "status": {\r\n "type": "string",\r\n "enum": ["draft", "proposed", "accepted", "approved", "deprecated", "superseded"]\r\n },\r\n "owner": {\r\n "type": "string"\r\n },\r\n "arc42-section": {\r\n "type": "integer",\r\n "const": 1\r\n },\r\n "naf-perspective": {\r\n "type": "string",\r\n "const": "Enterprise & Capability"\r\n },\r\n "cites-product-actors": {\r\n "type": "array",\r\n "minItems": 1,\r\n "items": {\r\n "type": "string",\r\n "pattern": "^ACT-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n }\r\n },\r\n "cites-quality-goals": {\r\n "type": "array",\r\n "minItems": 1,\r\n "items": {\r\n "type": "string",\r\n "pattern": "^(QR|SEC-REQ)-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n }\r\n },\r\n "cites-use-cases": {\r\n "type": "array",\r\n "minItems": 1,\r\n "items": {\r\n "type": "string",\r\n "pattern": "^UC-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n }\r\n },\r\n "supersedes": {\r\n "type": ["string", "null"],\r\n "pattern": "^ARCH-INTRO-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "superseded-by": {\r\n "type": ["string", "null"],\r\n "pattern": "^ARCH-INTRO-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n }\r\n },\r\n "additionalProperties": false\r\n}\r\n';
|
|
2821
|
+
var SCHEMA_SCHEMAS_ARCHITECTURE_COMPONENT_SCHEMA_JSON = '{\r\n "$schema": "https://json-schema.org/draft/2020-12/schema",\r\n "$id": "https://ai-sdlc.org/schemas/architecture/component.schema.json",\r\n "title": "NAF v4 / arc42 Architecture Component Schema (Multilevel)",\r\n "type": "object",\r\n "required": [\r\n "id",\r\n "type",\r\n "title",\r\n "status",\r\n "version",\r\n "level",\r\n "implementation-type",\r\n "implements-use-cases"\r\n ],\r\n "properties": {\r\n "id": {\r\n "type": "string",\r\n "pattern": "^CMP-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "type": {\r\n "type": "string",\r\n "const": "component"\r\n },\r\n "version": {\r\n "type": "string",\r\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$",\r\n "description": "Architecture component semantic version (SemVer)."\r\n },\r\n "schema-version": {\r\n "type": "string"\r\n },\r\n "title": {\r\n "type": "string",\r\n "minLength": 3\r\n },\r\n "status": {\r\n "type": "string",\r\n "enum": ["proposed", "accepted", "deprecated", "retired"]\r\n },\r\n "level": {\r\n "type": "integer",\r\n "minimum": 1,\r\n "description": "Hierarchical architecture level (1: Bounded Context / Root System, 2: Subsystem / Container, 3: Executable Unit / DLL / Function)."\r\n },\r\n "bounded-context": {\r\n "type": "string",\r\n "description": "Domain-Driven Design (DDD) Bounded Context name this component belongs to."\r\n },\r\n "parent-component": {\r\n "type": ["string", "null"],\r\n "pattern": "^CMP-[A-Z0-9]+(-[A-Z0-9]+)*$",\r\n "description": "Parent component identifier (null if Level 1)."\r\n },\r\n "implementation-type": {\r\n "type": "string",\r\n "enum": ["service", "dll", "function", "composite"],\r\n "description": "Technical implementation paradigm: distributed service (service), dynamic/native library (dll), in-process module/function (function), or logical aggregator/Bounded Context (composite)."\r\n },\r\n "implements-use-cases": {\r\n "type": "array",\r\n "minItems": 1,\r\n "items": {\r\n "type": "string",\r\n "pattern": "^UC-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n }\r\n },\r\n "satisfies-requirements": {\r\n "type": "array",\r\n "items": {\r\n "type": "string",\r\n "pattern": "^(FR|QR|CON|SEC-REQ|SAF-REQ|PRIV-REQ)-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n }\r\n },\r\n "hosted-in-enclave": {\r\n "type": "string",\r\n "pattern": "^SEC-ENC-[A-Z0-9]+(-[A-Z0-9]+)*$",\r\n "description": "Security enclave where the component resides (optional for DLLs or in-process functions)."\r\n },\r\n "interfaces": {\r\n "type": "array",\r\n "items": {\r\n "type": "object",\r\n "required": ["name", "protocol"],\r\n "properties": {\r\n "name": { "type": "string" },\r\n "protocol": {\r\n "type": "string",\r\n "enum": [\r\n "REST/HTTP",\r\n "gRPC",\r\n "WebSocket",\r\n "Kafka",\r\n "MQTT",\r\n "C-ABI",\r\n "Native-ABI",\r\n "FFI",\r\n "In-Process API",\r\n "Function-Call",\r\n "CLI",\r\n "GUI",\r\n "IPC"\r\n ]\r\n },\r\n "contract-spec": { "type": "string" }\r\n }\r\n }\r\n },\r\n "supersedes": {\r\n "type": ["string", "null"],\r\n "pattern": "^CMP-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "superseded-by": {\r\n "type": ["string", "null"],\r\n "pattern": "^CMP-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n }\r\n },\r\n "additionalProperties": false\r\n}\r\n';
|
|
2822
|
+
var SCHEMA_SCHEMAS_ARCHITECTURE_INTRODUCTION_AND_GOALS_SCHEMA_JSON = '{\r\n "$schema": "https://json-schema.org/draft/2020-12/schema",\r\n "$id": "https://ai-sdlc.org/schemas/architecture/introduction-and-goals.schema.json",\r\n "title": "NAF v4 Enterprise & Capability / arc42 Introduction and System Goals Schema",\r\n "type": "object",\r\n "required": [\r\n "id",\r\n "type",\r\n "title",\r\n "status",\r\n "version",\r\n "naf-perspective",\r\n "cites-product-actors",\r\n "cites-quality-goals",\r\n "cites-use-cases"\r\n ],\r\n "properties": {\r\n "id": {\r\n "type": "string",\r\n "pattern": "^ARCH-INTRO-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "type": {\r\n "type": "string",\r\n "const": "architecture-introduction"\r\n },\r\n "version": {\r\n "type": "string",\r\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$",\r\n "description": "Artifact semantic version (SemVer)."\r\n },\r\n "schema-version": {\r\n "type": "string"\r\n },\r\n "title": {\r\n "type": "string",\r\n "minLength": 3\r\n },\r\n "status": {\r\n "type": "string",\r\n "enum": ["draft", "proposed", "accepted", "approved", "deprecated", "superseded"]\r\n },\r\n "owner": {\r\n "type": "string"\r\n },\r\n "arc42-section": {\r\n "type": "integer",\r\n "const": 1\r\n },\r\n "naf-perspective": {\r\n "type": "string",\r\n "const": "Enterprise & Capability"\r\n },\r\n "cites-product-actors": {\r\n "type": "array",\r\n "minItems": 1,\r\n "items": {\r\n "type": "string",\r\n "pattern": "^ACT-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n }\r\n },\r\n "cites-quality-goals": {\r\n "type": "array",\r\n "minItems": 1,\r\n "items": {\r\n "type": "string",\r\n "pattern": "^(QR|SEC-REQ|PRIV-REQ)-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n }\r\n },\r\n "cites-use-cases": {\r\n "type": "array",\r\n "minItems": 1,\r\n "items": {\r\n "type": "string",\r\n "pattern": "^UC-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n }\r\n },\r\n "supersedes": {\r\n "type": ["string", "null"],\r\n "pattern": "^ARCH-INTRO-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "superseded-by": {\r\n "type": ["string", "null"],\r\n "pattern": "^ARCH-INTRO-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n }\r\n },\r\n "additionalProperties": false\r\n}\r\n';
|
|
2715
2823
|
var SCHEMA_SCHEMAS_COMPLIANCE_LICENSE_MANIFEST_SCHEMA_JSON = '{\r\n "$schema": "https://json-schema.org/draft/2020-12/schema",\r\n "$id": "https://ai-sdlc.org/schemas/compliance/license-manifest.schema.json",\r\n "title": "Static Dependencies License Manifest Schema",\r\n "type": "object",\r\n "required": ["evaluated_dependencies"],\r\n "properties": {\r\n "id": {\r\n "type": "string",\r\n "pattern": "^(MAN-LIC|LIC-MAN|LIC)-[A-Z0-9]+(-[A-Z0-9]+)*$",\r\n "description": "Optional canonical artifact identifier."\r\n },\r\n "type": {\r\n "type": "string",\r\n "const": "license-manifest"\r\n },\r\n "version": {\r\n "type": "string",\r\n "pattern": "^[0-9]+\\\\.[0-9]+(\\\\.[0-9]+)?(-[0-9A-Za-z.-]+)?$",\r\n "description": "Manifest format version."\r\n },\r\n "schema-version": {\r\n "type": "string"\r\n },\r\n "description": {\r\n "type": "string"\r\n },\r\n "generated_at": {\r\n "type": "string"\r\n },\r\n "evaluated_dependencies": {\r\n "type": "array",\r\n "minItems": 1,\r\n "items": {\r\n "type": "object",\r\n "required": ["package", "version", "spdx_license", "status"],\r\n "properties": {\r\n "package": {\r\n "type": "string",\r\n "minLength": 1\r\n },\r\n "version": {\r\n "type": "string",\r\n "minLength": 1\r\n },\r\n "spdx_license": {\r\n "type": "string",\r\n "minLength": 1\r\n },\r\n "status": {\r\n "type": "string",\r\n "enum": [\r\n "APPROVED",\r\n "REJECTED",\r\n "REVIEW_REQUIRED",\r\n "COMMERCIAL_APPROVAL_REQUIRED",\r\n "PENDING"\r\n ]\r\n },\r\n "reason": {\r\n "type": "string"\r\n },\r\n "approved_by": {\r\n "type": "string"\r\n }\r\n },\r\n "additionalProperties": false\r\n }\r\n }\r\n },\r\n "additionalProperties": false\r\n}\r\n';
|
|
2716
2824
|
var SCHEMA_SCHEMAS_COMPLIANCE_LICENSE_POLICY_SCHEMA_JSON = '{\r\n "$schema": "https://json-schema.org/draft/2020-12/schema",\r\n "$id": "https://ai-sdlc.org/schemas/compliance/license-policy.schema.json",\r\n "title": "Open Source License Policy Schema",\r\n "type": "object",\r\n "required": ["version", "project", "default_action", "categories", "agent_guardrails", "ci_gates"],\r\n "properties": {\r\n "version": {\r\n "type": "string"\r\n },\r\n "project": {\r\n "type": "string"\r\n },\r\n "default_action": {\r\n "type": "string",\r\n "enum": ["ALLOW", "DENY", "REVIEW_REQUIRED"]\r\n },\r\n "categories": {\r\n "type": "object"\r\n },\r\n "agent_guardrails": {\r\n "type": "object",\r\n "required": ["enforce_pre_check", "reject_unknown_licenses"],\r\n "properties": {\r\n "enforce_pre_check": { "type": "boolean" },\r\n "reject_unknown_licenses": { "type": "boolean" },\r\n "auto_reject_categories": { "type": "array", "items": { "type": "string" } },\r\n "on_commercial_detected": { "type": "object" }\r\n }\r\n },\r\n "ci_gates": {\r\n "type": "object",\r\n "required": ["fail_on_denied", "generate_sbom"],\r\n "properties": {\r\n "fail_on_denied": { "type": "boolean" },\r\n "fail_on_missing_license": { "type": "boolean" },\r\n "generate_sbom": { "type": "boolean" },\r\n "sbom_format": { "type": "string" },\r\n "output_notices_file": { "type": "string" },\r\n "allowed_depth": { "type": "string", "enum": ["DIRECT", "TRANSITIVE"] }\r\n }\r\n }\r\n },\r\n "additionalProperties": false\r\n}\r\n';
|
|
2717
2825
|
var SCHEMA_SCHEMAS_COMPLIANCE_QUALITY_POLICY_SCHEMA_JSON = '{\r\n "$schema": "https://json-schema.org/draft/2020-12/schema",\r\n "$id": "https://ai-sdlc.org/schemas/compliance/quality-policy.schema.json",\r\n "title": "Software Quality Policy Schema (Polyglot)",\r\n "type": "object",\r\n "required": ["version", "project", "enforcement_mode", "coding_rules", "release_thresholds", "agent_guardrails"],\r\n "properties": {\r\n "version": { "type": "string" },\r\n "project": { "type": "string" },\r\n "enforcement_mode": { "type": "string", "enum": ["STRICT", "PERMISSIVE"] },\r\n "scope": {\r\n "type": "object",\r\n "properties": {\r\n "target_directories": { "type": "array", "items": { "type": "string" } },\r\n "supported_extensions": { "type": "array", "items": { "type": "string" } },\r\n "exclude_patterns": { "type": "array", "items": { "type": "string" } }\r\n }\r\n },\r\n "language_toolchains": {\r\n "type": "object"\r\n },\r\n "coding_rules": {\r\n "type": "object",\r\n "required": ["standards", "enforce_formatting", "rules"],\r\n "properties": {\r\n "standards": { "type": "array", "items": { "type": "string" } },\r\n "enforce_formatting": { "type": "boolean" },\r\n "formatting_engine": { "type": "string" },\r\n "linter_engine": { "type": "string" },\r\n "rules": { "type": "object" }\r\n }\r\n },\r\n "release_thresholds": {\r\n "type": "object",\r\n "required": ["cyclomatic_complexity", "cognitive_complexity", "maintainability_index", "code_duplication", "test_coverage"],\r\n "properties": {\r\n "cyclomatic_complexity": {\r\n "type": "object",\r\n "required": ["max_per_function", "action_on_breach"],\r\n "properties": {\r\n "max_per_function": { "type": "integer" },\r\n "warning_at": { "type": "integer" },\r\n "action_on_breach": { "type": "string" }\r\n }\r\n },\r\n "cognitive_complexity": {\r\n "type": "object",\r\n "required": ["max_per_function", "action_on_breach"],\r\n "properties": {\r\n "max_per_function": { "type": "integer" },\r\n "warning_at": { "type": "integer" },\r\n "action_on_breach": { "type": "string" }\r\n }\r\n },\r\n "maintainability_index": {\r\n "type": "object",\r\n "required": ["min_acceptable_score", "action_on_breach"],\r\n "properties": {\r\n "min_acceptable_score": { "type": "number" },\r\n "target_score": { "type": "number" },\r\n "action_on_breach": { "type": "string" }\r\n }\r\n },\r\n "code_duplication": {\r\n "type": "object",\r\n "required": ["max_percentage", "action_on_breach"],\r\n "properties": {\r\n "max_percentage": { "type": "number" },\r\n "action_on_breach": { "type": "string" }\r\n }\r\n },\r\n "test_coverage": {\r\n "type": "object",\r\n "required": ["min_line_coverage_percent", "action_on_breach"],\r\n "properties": {\r\n "min_line_coverage_percent": { "type": "number" },\r\n "min_branch_coverage_percent": { "type": "number" },\r\n "min_function_coverage_percent": { "type": "number" },\r\n "action_on_breach": { "type": "string" }\r\n }\r\n },\r\n "technical_debt": {\r\n "type": "object"\r\n }\r\n }\r\n },\r\n "agent_guardrails": {\r\n "type": "object",\r\n "required": ["enforce_pre_commit_linter", "prevent_suppression_comments"],\r\n "properties": {\r\n "enforce_pre_commit_linter": { "type": "boolean" },\r\n "prevent_suppression_comments": { "type": "boolean" },\r\n "auto_refactor_on_high_complexity": { "type": "boolean" }\r\n }\r\n }\r\n },\r\n "additionalProperties": false\r\n}\r\n';
|
|
2718
2826
|
var SCHEMA_SCHEMAS_IDE_MCP_CONFIG_SCHEMA_JSON = '{\r\n "$schema": "https://json-schema.org/draft/2020-12/schema",\r\n "$id": "https://ai-sdlc.org/schemas/ide/mcp-config.schema.json",\r\n "title": "IDE MCP Configuration Schema (Cursor, Antigravity, VS Code)",\r\n "type": "object",\r\n "properties": {\r\n "$schema": {\r\n "type": "string"\r\n },\r\n "id": {\r\n "type": "string",\r\n "pattern": "^(MCP-CFG|IDE-MCP|MCP)-[A-Z0-9]+(-[A-Z0-9]+)*$",\r\n "description": "Optional identifier for MCP configuration artifact."\r\n },\r\n "type": {\r\n "type": "string",\r\n "const": "mcp-config"\r\n },\r\n "mcpServers": {\r\n "type": "object",\r\n "additionalProperties": {\r\n "type": "object",\r\n "required": ["command"],\r\n "properties": {\r\n "command": {\r\n "type": "string",\r\n "minLength": 1\r\n },\r\n "args": {\r\n "type": "array",\r\n "items": {\r\n "type": "string"\r\n }\r\n },\r\n "env": {\r\n "type": "object"\r\n },\r\n "disabled": {\r\n "type": "boolean"\r\n },\r\n "alwaysAllow": {\r\n "type": "array",\r\n "items": {\r\n "type": "string"\r\n }\r\n }\r\n },\r\n "additionalProperties": false\r\n },\r\n "description": "MCP server registry format for Cursor and Antigravity."\r\n },\r\n "servers": {\r\n "type": "object",\r\n "additionalProperties": {\r\n "type": "object",\r\n "required": ["command"],\r\n "properties": {\r\n "command": {\r\n "type": "string",\r\n "minLength": 1\r\n },\r\n "args": {\r\n "type": "array",\r\n "items": {\r\n "type": "string"\r\n }\r\n },\r\n "env": {\r\n "type": "object"\r\n },\r\n "disabled": {\r\n "type": "boolean"\r\n },\r\n "alwaysAllow": {\r\n "type": "array",\r\n "items": {\r\n "type": "string"\r\n }\r\n }\r\n },\r\n "additionalProperties": false\r\n },\r\n "description": "MCP server registry format for VS Code."\r\n }\r\n },\r\n "additionalProperties": false\r\n}\r\n';
|
|
2719
2827
|
var SCHEMA_SCHEMAS_MANUALS_PRODUCTION_MANUAL_SCHEMA_JSON = '{\r\n "$schema": "https://json-schema.org/draft/2020-12/schema",\r\n "$id": "https://ai-sdlc.org/schemas/manuals/production-manual.schema.json",\r\n "title": "AI-SDLC Production & Operations Manual Schema",\r\n "type": "object",\r\n "required": [\r\n "id",\r\n "type",\r\n "title",\r\n "status",\r\n "version",\r\n "applies-to-version",\r\n "target-audience"\r\n ],\r\n "properties": {\r\n "id": {\r\n "type": "string",\r\n "pattern": "^MAN-PROD-[A-Z0-9]+(-[A-Z0-9]+)*$",\r\n "description": "Immutable production manual identifier (e.g. MAN-PROD-SENTINELCORE)."\r\n },\r\n "type": {\r\n "type": "string",\r\n "const": "production-manual"\r\n },\r\n "version": {\r\n "type": "string",\r\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$",\r\n "description": "Document semantic version (SemVer)."\r\n },\r\n "schema-version": {\r\n "type": "string",\r\n "description": "Template schema version."\r\n },\r\n "title": {\r\n "type": "string",\r\n "minLength": 3,\r\n "description": "Descriptive title of the production manual."\r\n },\r\n "status": {\r\n "type": "string",\r\n "enum": ["draft", "active", "deprecated", "retired"]\r\n },\r\n "applies-to-version": {\r\n "type": "string",\r\n "description": "Software version or release this production manual applies to (e.g. v1.0.0)."\r\n },\r\n "target-audience": {\r\n "type": "array",\r\n "items": {\r\n "type": "string"\r\n },\r\n "minItems": 1,\r\n "description": "Target technical profiles (e.g. DevOps, SRE, Release Manager, SecOps)."\r\n },\r\n "components-covered": {\r\n "type": "array",\r\n "items": {\r\n "type": "string",\r\n "pattern": "^CMP-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "description": "Architecture components (CMP-*) deployed and covered by the manual."\r\n },\r\n "enclaves-involved": {\r\n "type": "array",\r\n "items": {\r\n "type": "string",\r\n "pattern": "^SEC-ENC-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "description": "Security enclaves (SEC-ENC-*) in which deployment executes."\r\n },\r\n "supersedes": {\r\n "type": ["string", "null"],\r\n "pattern": "^MAN-PROD-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "superseded-by": {\r\n "type": ["string", "null"],\r\n "pattern": "^MAN-PROD-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n }\r\n },\r\n "additionalProperties": false\r\n}\r\n';
|
|
2720
2828
|
var SCHEMA_SCHEMAS_MANUALS_USER_MANUAL_SCHEMA_JSON = '{\r\n "$schema": "https://json-schema.org/draft/2020-12/schema",\r\n "$id": "https://ai-sdlc.org/schemas/manuals/user-manual.schema.json",\r\n "title": "AI-SDLC User Manual Schema",\r\n "type": "object",\r\n "required": [\r\n "id",\r\n "type",\r\n "title",\r\n "status",\r\n "version",\r\n "target-audience",\r\n "allowed-roles",\r\n "applies-to-version"\r\n ],\r\n "properties": {\r\n "id": {\r\n "type": "string",\r\n "pattern": "^MAN-USER-[A-Z0-9]+(-[A-Z0-9]+)*$",\r\n "description": "Immutable user manual identifier (e.g. MAN-USER-SENTINELCORE)."\r\n },\r\n "type": {\r\n "type": "string",\r\n "const": "user-manual"\r\n },\r\n "version": {\r\n "type": "string",\r\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$",\r\n "description": "Document semantic version (SemVer)."\r\n },\r\n "schema-version": {\r\n "type": "string",\r\n "description": "Template schema version."\r\n },\r\n "title": {\r\n "type": "string",\r\n "minLength": 3,\r\n "description": "Descriptive title of the user manual."\r\n },\r\n "status": {\r\n "type": "string",\r\n "enum": ["draft", "active", "deprecated", "retired"]\r\n },\r\n "applies-to-version": {\r\n "type": "string",\r\n "description": "Software version or release this manual applies to (e.g. v1.0.0)."\r\n },\r\n "target-audience": {\r\n "type": "array",\r\n "items": {\r\n "type": "string"\r\n },\r\n "minItems": 1,\r\n "description": "Target user profiles or roles for the manual."\r\n },\r\n "allowed-roles": {\r\n "type": "array",\r\n "items": {\r\n "type": "string"\r\n },\r\n "minItems": 1,\r\n "description": "Formal catalog of authorized roles to operate the application (linked to ACT-*)."\r\n },\r\n "journeys-covered": {\r\n "type": "array",\r\n "items": {\r\n "type": "string",\r\n "pattern": "^JRN-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "description": "Product journey identifiers (JRN-*) covered in the manual."\r\n },\r\n "use-cases-covered": {\r\n "type": "array",\r\n "items": {\r\n "type": "string",\r\n "pattern": "^UC-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "description": "Use case identifiers (UC-*) implemented across journeys."\r\n },\r\n "supersedes": {\r\n "type": ["string", "null"],\r\n "pattern": "^MAN-USER-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "superseded-by": {\r\n "type": ["string", "null"],\r\n "pattern": "^MAN-USER-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n }\r\n },\r\n "additionalProperties": false\r\n}\r\n';
|
|
2829
|
+
var SCHEMA_SCHEMAS_PRIVACY_DATA_ASSET_SCHEMA_JSON = '{\n "$schema": "https://json-schema.org/draft/2020-12/schema",\n "$id": "https://ai-sdlc.org/schemas/privacy/data-asset.schema.json",\n "title": "Personal Data Asset & PII Inventory Schema (DATA-ASSET-*)",\n "type": "object",\n "required": [\n "id",\n "type",\n "title",\n "status",\n "version",\n "classification",\n "pii-categories",\n "data-subjects",\n "retention-period",\n "erasure-method"\n ],\n "properties": {\n "id": {\n "type": "string",\n "pattern": "^DATA-ASSET-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "type": {\n "type": "string",\n "const": "data-asset"\n },\n "version": {\n "type": "string",\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$",\n "description": "Data asset semantic version (SemVer)."\n },\n "schema-version": {\n "type": "string"\n },\n "title": {\n "type": "string",\n "minLength": 3\n },\n "status": {\n "type": "string",\n "enum": ["draft", "active", "deprecated", "retired"]\n },\n "classification": {\n "type": "string",\n "enum": [\n "public",\n "internal",\n "confidential-pii",\n "special-category-sensitive"\n ],\n "description": "Data sensitivity classification aligned with privacy-policy.yaml."\n },\n "pii-categories": {\n "type": "array",\n "minItems": 1,\n "items": {\n "type": "string",\n "enum": [\n "identifiers",\n "contact",\n "authentication",\n "financial",\n "location",\n "behavioral",\n "biometric",\n "health",\n "telemetry-operator"\n ]\n }\n },\n "data-subjects": {\n "type": "array",\n "minItems": 1,\n "items": {\n "type": "string",\n "pattern": "^ACT-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "description": "Product actors (ACT-*) whose personal data is stored or processed."\n },\n "fields": {\n "type": "array",\n "items": {\n "type": "object",\n "required": ["name", "sensitivity", "masking-strategy"],\n "properties": {\n "name": {\n "type": "string",\n "minLength": 1\n },\n "sensitivity": {\n "type": "string",\n "enum": ["public", "internal", "pii", "special-category"]\n },\n "masking-strategy": {\n "type": "string",\n "enum": [\n "none",\n "redact",\n "sha256-salt",\n "tokenize",\n "aes-256-gcm",\n "truncate"\n ]\n }\n },\n "additionalProperties": false\n }\n },\n "retention-period": {\n "type": "string",\n "pattern": "^([0-9]+(d|m|y)|session-only|indefinite-anonymized)$",\n "description": "Maximum retention TTL (e.g. 30d, 12m, 5y, session-only, indefinite-anonymized)."\n },\n "erasure-method": {\n "type": "string",\n "enum": [\n "hard-delete",\n "crypto-shredding",\n "irreversible-anonymization"\n ]\n },\n "owner-bounded-context": {\n "type": "string",\n "pattern": "^(BC|CMP)-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "supersedes": {\n "type": ["string", "null"],\n "pattern": "^DATA-ASSET-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "superseded-by": {\n "type": ["string", "null"],\n "pattern": "^DATA-ASSET-[A-Z0-9]+(-[A-Z0-9]+)*$"\n }\n },\n "additionalProperties": false\n}\n';
|
|
2830
|
+
var SCHEMA_SCHEMAS_PRIVACY_PRIVACY_POLICY_SCHEMA_JSON = '{\n "$schema": "https://json-schema.org/draft/2020-12/schema",\n "$id": "https://ai-sdlc.org/schemas/privacy/privacy-policy.schema.json",\n "title": "Privacy-by-Design as Code Governance Policy Schema",\n "type": "object",\n "required": [\n "version",\n "project",\n "regulatory_frameworks",\n "default_action",\n "classifications",\n "agent_guardrails",\n "ci_gates"\n ],\n "properties": {\n "id": {\n "type": "string",\n "pattern": "^(PRIV-POL|POL-PRIV)-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "type": {\n "type": "string",\n "const": "privacy-policy"\n },\n "version": {\n "type": "string",\n "minLength": 1\n },\n "project": {\n "type": "string",\n "minLength": 1\n },\n "regulatory_frameworks": {\n "type": "array",\n "minItems": 1,\n "items": {\n "type": "string",\n "enum": ["GDPR", "LOPDGDD", "ISO-27701", "CCPA", "HIPAA", "LGPD"]\n }\n },\n "default_action": {\n "type": "string",\n "enum": ["DENY_UNREGISTERED_PII", "ALLOW", "REVIEW_REQUIRED"]\n },\n "classifications": {\n "type": "object",\n "required": ["public", "internal", "confidential_pii", "special_category_sensitive"],\n "additionalProperties": {\n "type": "object",\n "required": ["action", "encryption_at_rest", "encryption_in_transit", "allow_in_logs", "allow_in_ai_prompts"],\n "properties": {\n "action": {\n "type": "string",\n "enum": ["ALLOW", "STRICT_GOVERNANCE", "DPIA_APPROVAL_REQUIRED", "DENY"]\n },\n "description": { "type": "string" },\n "exception_requires": { "type": "string" },\n "require_ropa_entry": { "type": "boolean" },\n "require_dpia_artifact": { "type": "boolean" },\n "encryption_at_rest": { "type": "boolean" },\n "encryption_in_transit": { "type": "boolean" },\n "require_field_level_encryption": { "type": "boolean" },\n "allow_in_logs": { "type": "boolean" },\n "log_masking_strategy": { "type": "string" },\n "allow_in_ai_prompts": { "type": "boolean" },\n "max_retention_days": { "type": "integer", "minimum": 1 },\n "require_right_to_erasure": { "type": "boolean" }\n },\n "additionalProperties": false\n }\n },\n "cross_border_transfers": {\n "type": "object",\n "properties": {\n "allowed_regions": {\n "type": "array",\n "items": { "type": "string" }\n },\n "require_scc_for_third_countries": { "type": "boolean" },\n "approved_subprocessors": {\n "type": "array",\n "items": { "type": "string" }\n }\n },\n "additionalProperties": false\n },\n "agent_guardrails": {\n "type": "object",\n "required": [\n "forbid_real_pii_in_tests",\n "forbid_pii_in_console_or_logger",\n "require_dto_projection_for_pii"\n ],\n "properties": {\n "forbid_real_pii_in_tests": { "type": "boolean" },\n "forbid_pii_in_console_or_logger": { "type": "boolean" },\n "require_dto_projection_for_pii": { "type": "boolean" },\n "on_special_category_detected": {\n "type": "object",\n "required": ["action", "notification_tag", "message"],\n "properties": {\n "action": { "type": "string" },\n "notification_tag": { "type": "string" },\n "message": { "type": "string" }\n },\n "additionalProperties": false\n }\n },\n "additionalProperties": false\n },\n "ci_gates": {\n "type": "object",\n "required": [\n "fail_on_unregistered_pii",\n "fail_on_pii_in_logs",\n "fail_on_missing_retention_policy",\n "generate_ropa_inventory",\n "output_ropa_file",\n "output_privacy_report"\n ],\n "properties": {\n "fail_on_unregistered_pii": { "type": "boolean" },\n "fail_on_pii_in_logs": { "type": "boolean" },\n "fail_on_missing_retention_policy": { "type": "boolean" },\n "fail_on_unapproved_subprocessor": { "type": "boolean" },\n "generate_ropa_inventory": { "type": "boolean" },\n "output_ropa_file": { "type": "string" },\n "output_privacy_report": { "type": "string" }\n },\n "additionalProperties": false\n }\n },\n "additionalProperties": false\n}\n';
|
|
2831
|
+
var SCHEMA_SCHEMAS_PRIVACY_PRIVACY_REQ_SCHEMA_JSON = '{\n "$schema": "https://json-schema.org/draft/2020-12/schema",\n "$id": "https://ai-sdlc.org/schemas/privacy/privacy-req.schema.json",\n "title": "Privacy Requirement & Technical Control Schema (PRIV-REQ-*)",\n "type": "object",\n "required": [\n "id",\n "type",\n "title",\n "status",\n "version",\n "privacy-principle",\n "linddun-category",\n "governs-ropa"\n ],\n "properties": {\n "id": {\n "type": "string",\n "pattern": "^PRIV-REQ-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "type": {\n "type": "string",\n "const": "privacy-requirement"\n },\n "version": {\n "type": "string",\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$",\n "description": "Privacy requirement semantic version (SemVer)."\n },\n "schema-version": {\n "type": "string"\n },\n "title": {\n "type": "string",\n "minLength": 3\n },\n "status": {\n "type": "string",\n "enum": ["draft", "active", "deprecated", "retired"]\n },\n "privacy-principle": {\n "type": "string",\n "enum": [\n "data-minimization",\n "purpose-limitation",\n "storage-limitation",\n "accuracy",\n "integrity-and-confidentiality",\n "transparency-and-consent",\n "data-subject-rights-arco",\n "pseudonymization-anonymization"\n ]\n },\n "linddun-category": {\n "type": "string",\n "enum": [\n "linkability",\n "identifiability",\n "non-repudiation",\n "detectability",\n "disclosure-of-information",\n "unawareness",\n "non-compliance"\n ],\n "description": "LINDDUN privacy threat category mitigated by this control."\n },\n "governs-ropa": {\n "type": "array",\n "minItems": 1,\n "items": {\n "type": "string",\n "pattern": "^PRIV-ROPA-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "description": "Upstream ROPA records (PRIV-ROPA-*) governed by this privacy requirement."\n },\n "protects-data-assets": {\n "type": "array",\n "items": {\n "type": "string",\n "pattern": "^DATA-ASSET-[A-Z0-9]+(-[A-Z0-9]+)*$"\n }\n },\n "enforced-in-enclave": {\n "type": "string",\n "pattern": "^SEC-ENC-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "compliance-references": {\n "type": "array",\n "items": {\n "type": "string"\n }\n },\n "acceptance-format": {\n "type": "string",\n "enum": ["gherkin", "declarative-prose"]\n },\n "cucumber-tags": {\n "type": "array",\n "items": {\n "type": "string",\n "pattern": "^@[a-zA-Z0-9_-]+$"\n }\n },\n "supersedes": {\n "type": ["string", "null"],\n "pattern": "^PRIV-REQ-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "superseded-by": {\n "type": ["string", "null"],\n "pattern": "^PRIV-REQ-[A-Z0-9]+(-[A-Z0-9]+)*$"\n }\n },\n "additionalProperties": false\n}\n';
|
|
2832
|
+
var SCHEMA_SCHEMAS_PRIVACY_PRIVACY_ROPA_SCHEMA_JSON = '{\n "$schema": "https://json-schema.org/draft/2020-12/schema",\n "$id": "https://ai-sdlc.org/schemas/privacy/privacy-ropa.schema.json",\n "title": "Record of Processing Activities Schema (PRIV-ROPA-* / GDPR Art. 30)",\n "type": "object",\n "required": [\n "id",\n "type",\n "title",\n "status",\n "version",\n "lawful-basis",\n "processing-purpose",\n "use-cases",\n "data-assets",\n "data-subjects",\n "retention-ttl"\n ],\n "properties": {\n "id": {\n "type": "string",\n "pattern": "^PRIV-ROPA-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "type": {\n "type": "string",\n "const": "privacy-ropa"\n },\n "version": {\n "type": "string",\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$",\n "description": "ROPA record semantic version (SemVer)."\n },\n "schema-version": {\n "type": "string"\n },\n "title": {\n "type": "string",\n "minLength": 3\n },\n "status": {\n "type": "string",\n "enum": ["draft", "active", "deprecated", "retired"]\n },\n "lawful-basis": {\n "type": "string",\n "enum": [\n "consent",\n "contract",\n "legal-obligation",\n "vital-interests",\n "public-task",\n "legitimate-interests"\n ],\n "description": "Lawful basis for processing under GDPR Art. 6.1."\n },\n "special-category-condition": {\n "type": ["string", "null"],\n "enum": [\n null,\n "explicit-consent",\n "employment-social-security",\n "vital-interests",\n "public-interest",\n "preventive-medicine",\n "public-health"\n ],\n "description": "GDPR Art. 9.2 condition when processing special category data."\n },\n "processing-purpose": {\n "type": "string",\n "minLength": 10\n },\n "use-cases": {\n "type": "array",\n "minItems": 1,\n "items": {\n "type": "string",\n "pattern": "^UC-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "description": "Upstream Use Cases (UC-*) that trigger this data processing activity."\n },\n "data-assets": {\n "type": "array",\n "minItems": 1,\n "items": {\n "type": "string",\n "pattern": "^DATA-ASSET-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "description": "Personal Data Assets (DATA-ASSET-*) processed in this activity."\n },\n "data-subjects": {\n "type": "array",\n "minItems": 1,\n "items": {\n "type": "string",\n "pattern": "^ACT-[A-Z0-9]+(-[A-Z0-9]+)*$"\n }\n },\n "retention-ttl": {\n "type": "string",\n "pattern": "^([0-9]+(d|m|y)|session-only|indefinite-anonymized)$"\n },\n "cross-border-transfer": {\n "type": "boolean"\n },\n "transfer-safeguards": {\n "type": ["string", "null"],\n "enum": [null, "adequacy-decision", "scc", "bcr", "derogation"]\n },\n "subprocessors": {\n "type": "array",\n "items": {\n "type": "string"\n }\n },\n "dpia-required": {\n "type": "boolean"\n },\n "dpia-reference": {\n "type": ["string", "null"],\n "pattern": "^DPIA-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "mitigated-by": {\n "type": "array",\n "items": {\n "type": "string",\n "pattern": "^PRIV-REQ-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "description": "Privacy requirements (PRIV-REQ-*) governing and enforcing this processing activity."\n },\n "supersedes": {\n "type": ["string", "null"],\n "pattern": "^PRIV-ROPA-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "superseded-by": {\n "type": ["string", "null"],\n "pattern": "^PRIV-ROPA-[A-Z0-9]+(-[A-Z0-9]+)*$"\n }\n },\n "additionalProperties": false\n}\n';
|
|
2721
2833
|
var SCHEMA_SCHEMAS_PRODUCT_ACTOR_SCHEMA_JSON = '{\r\n "$schema": "https://json-schema.org/draft/2020-12/schema",\r\n "$id": "https://ai-sdlc.org/schemas/product/actor.schema.json",\r\n "title": "ProductShape Actor Schema (Versionable)",\r\n "type": "object",\r\n "required": ["id", "type", "title", "status", "version", "role-type"],\r\n "properties": {\r\n "id": {\r\n "type": "string",\r\n "pattern": "^ACT-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "type": {\r\n "type": "string",\r\n "const": "actor"\r\n },\r\n "version": {\r\n "type": "string",\r\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$",\r\n "description": "Artifact semantic version (SemVer)."\r\n },\r\n "schema-version": {\r\n "type": "string",\r\n "description": "Schema specification version used."\r\n },\r\n "title": {\r\n "type": "string",\r\n "minLength": 3\r\n },\r\n "status": {\r\n "type": "string",\r\n "enum": ["draft", "active", "deprecated", "retired"]\r\n },\r\n "role-type": {\r\n "type": "string",\r\n "enum": ["human-user", "ai-agent", "external-system", "sensor-iot"]\r\n },\r\n "description": {\r\n "type": "string"\r\n },\r\n "supersedes": {\r\n "type": ["string", "null"],\r\n "pattern": "^ACT-[A-Z0-9]+(-[A-Z0-9]+)*$",\r\n "description": "Identifier of the actor superseded by this version or artifact."\r\n },\r\n "superseded-by": {\r\n "type": ["string", "null"],\r\n "pattern": "^ACT-[A-Z0-9]+(-[A-Z0-9]+)*$",\r\n "description": "Identifier of the new actor superseding this one upon deprecation/retirement."\r\n }\r\n },\r\n "additionalProperties": false\r\n}\r\n';
|
|
2722
2834
|
var SCHEMA_SCHEMAS_PRODUCT_BUSINESS_RULE_SCHEMA_JSON = '{\r\n "$schema": "https://json-schema.org/draft/2020-12/schema",\r\n "$id": "https://ai-sdlc.org/schemas/product/business-rule.schema.json",\r\n "title": "ProductShape Business Rule Schema (Versionable)",\r\n "type": "object",\r\n "required": ["id", "type", "title", "status", "version", "enforcement-level"],\r\n "properties": {\r\n "id": {\r\n "type": "string",\r\n "pattern": "^BR-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "type": {\r\n "type": "string",\r\n "const": "business-rule"\r\n },\r\n "version": {\r\n "type": "string",\r\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$",\r\n "description": "Business rule semantic version (SemVer)."\r\n },\r\n "schema-version": {\r\n "type": "string"\r\n },\r\n "title": {\r\n "type": "string",\r\n "minLength": 3\r\n },\r\n "status": {\r\n "type": "string",\r\n "enum": ["draft", "active", "deprecated", "retired"]\r\n },\r\n "enforcement-level": {\r\n "type": "string",\r\n "enum": ["strict-invariant", "override-with-approval", "guideline"]\r\n },\r\n "defined-in": {\r\n "type": "string",\r\n "pattern": "^BC-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "uses-terms": {\r\n "type": "array",\r\n "items": {\r\n "type": "string",\r\n "pattern": "^TERM-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n }\r\n },\r\n "supersedes": {\r\n "type": ["string", "null"],\r\n "pattern": "^BR-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "superseded-by": {\r\n "type": ["string", "null"],\r\n "pattern": "^BR-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n }\r\n },\r\n "additionalProperties": false\r\n}\r\n';
|
|
2723
2835
|
var SCHEMA_SCHEMAS_PRODUCT_JOURNEY_SCHEMA_JSON = '{\r\n "$schema": "https://json-schema.org/draft/2020-12/schema",\r\n "$id": "https://ai-sdlc.org/schemas/product/journey.schema.json",\r\n "title": "Customer / Operator Journey Schema",\r\n "type": "object",\r\n "required": [\r\n "id",\r\n "type",\r\n "title",\r\n "status",\r\n "version",\r\n "persona",\r\n "stages",\r\n "touchpoints"\r\n ],\r\n "properties": {\r\n "id": {\r\n "type": "string",\r\n "pattern": "^JRN-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "type": {\r\n "type": "string",\r\n "const": "journey"\r\n },\r\n "version": {\r\n "type": "string",\r\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$",\r\n "description": "Journey semantic version (SemVer)."\r\n },\r\n "schema-version": {\r\n "type": "string"\r\n },\r\n "title": {\r\n "type": "string",\r\n "minLength": 3\r\n },\r\n "status": {\r\n "type": "string",\r\n "enum": ["draft", "active", "deprecated", "retired"]\r\n },\r\n "persona": {\r\n "type": "string",\r\n "pattern": "^ACT-[A-Z0-9]+(-[A-Z0-9]+)*$",\r\n "description": "Actor (persona) starring in this journey."\r\n },\r\n "stages": {\r\n "type": "array",\r\n "minItems": 1,\r\n "items": {\r\n "type": "string"\r\n },\r\n "description": "Sequential journey stages (e.g. Awareness, Onboarding, Activation, Retention)."\r\n },\r\n "touchpoints": {\r\n "type": "array",\r\n "minItems": 1,\r\n "items": {\r\n "type": "string"\r\n },\r\n "description": "Touchpoints between persona and system at each stage."\r\n },\r\n "related-use-cases": {\r\n "type": "array",\r\n "items": {\r\n "type": "string",\r\n "pattern": "^UC-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "description": "System use cases related to this journey."\r\n },\r\n "pain-points": {\r\n "type": "array",\r\n "items": {\r\n "type": "string"\r\n },\r\n "description": "Frictions or issues detected along the user journey."\r\n },\r\n "supersedes": {\r\n "type": ["string", "null"]\r\n },\r\n "superseded-by": {\r\n "type": ["string", "null"]\r\n }\r\n },\r\n "additionalProperties": false\r\n}\r\n';
|
|
@@ -2727,12 +2839,12 @@ var SCHEMA_SCHEMAS_PRODUCT_USE_CASE_SCHEMA_JSON = '{\r\n "$schema": "https://js
|
|
|
2727
2839
|
var SCHEMA_SCHEMAS_SAFETY_HAZARD_SCHEMA_JSON = '{\r\n "$schema": "https://json-schema.org/draft/2020-12/schema",\r\n "$id": "https://ai-sdlc.org/schemas/safety/hazard.schema.json",\r\n "title": "Hazard Schema (Operational Hazard & Safety Risk Analysis)",\r\n "type": "object",\r\n "required": [\r\n "id",\r\n "type",\r\n "title",\r\n "status",\r\n "version",\r\n "severity",\r\n "probability",\r\n "fault-tolerance-time-ms",\r\n "mitigated-by"\r\n ],\r\n "properties": {\r\n "id": {\r\n "type": "string",\r\n "pattern": "^HAZ-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "type": {\r\n "type": "string",\r\n "const": "hazard"\r\n },\r\n "version": {\r\n "type": "string",\r\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$",\r\n "description": "Hazard semantic version (SemVer)."\r\n },\r\n "schema-version": {\r\n "type": "string"\r\n },\r\n "title": {\r\n "type": "string",\r\n "minLength": 3\r\n },\r\n "status": {\r\n "type": "string",\r\n "enum": ["draft", "active", "deprecated", "retired"]\r\n },\r\n "severity": {\r\n "type": "string",\r\n "enum": ["catastrophic", "critical", "major", "minor", "negligible"],\r\n "description": "Hazard severity per functional safety classification (DO-178C / ISO 26262)."\r\n },\r\n "probability": {\r\n "type": "string",\r\n "enum": ["frequent", "probable", "occasional", "remote", "improbable", "extremely-improbable"],\r\n "description": "Probability of operational hazard occurrence."\r\n },\r\n "fault-tolerance-time-ms": {\r\n "type": "number",\r\n "minimum": 0,\r\n "description": "Fault tolerance time interval (FTTI) limit in milliseconds before entering safe state."\r\n },\r\n "mitigated-by": {\r\n "type": "array",\r\n "minItems": 1,\r\n "items": {\r\n "type": "string",\r\n "pattern": "^SAF-REQ-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "description": "Safety requirements mitigating this hazard."\r\n },\r\n "hazardous-condition": {\r\n "type": "string",\r\n "description": "Description of the dangerous operational condition."\r\n },\r\n "potential-effect": {\r\n "type": "string",\r\n "description": "Potential effect on people, aircraft, or environment if hazard materializes."\r\n },\r\n "supersedes": {\r\n "type": ["string", "null"]\r\n },\r\n "superseded-by": {\r\n "type": ["string", "null"]\r\n }\r\n },\r\n "additionalProperties": false\r\n}\r\n';
|
|
2728
2840
|
var SCHEMA_SCHEMAS_SAFETY_SAFETY_REQ_SCHEMA_JSON = '{\r\n "$schema": "https://json-schema.org/draft/2020-12/schema",\r\n "$id": "https://ai-sdlc.org/schemas/safety/safety-req.schema.json",\r\n "title": "Safety Requirement Schema (Functional Safety & Hazard Mitigation)",\r\n "type": "object",\r\n "required": [\r\n "id",\r\n "type",\r\n "title",\r\n "status",\r\n "version",\r\n "safety-domain",\r\n "safety-integrity-level",\r\n "mitigates-hazard",\r\n "fail-safe-action"\r\n ],\r\n "properties": {\r\n "id": {\r\n "type": "string",\r\n "pattern": "^SAF-REQ-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "type": {\r\n "type": "string",\r\n "const": "safety-requirement"\r\n },\r\n "version": {\r\n "type": "string",\r\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$",\r\n "description": "Safety requirement semantic version (SemVer)."\r\n },\r\n "schema-version": {\r\n "type": "string"\r\n },\r\n "title": {\r\n "type": "string",\r\n "minLength": 3\r\n },\r\n "status": {\r\n "type": "string",\r\n "enum": ["draft", "active", "deprecated", "retired"]\r\n },\r\n "safety-domain": {\r\n "type": "string",\r\n "enum": [\r\n "flight-control",\r\n "collision-avoidance",\r\n "energy-management",\r\n "emergency-recovery",\r\n "sensor-integrity",\r\n "propulsion",\r\n "telemetry"\r\n ],\r\n "description": "Operational safety domain."\r\n },\r\n "safety-integrity-level": {\r\n "type": "string",\r\n "description": "Safety integrity level (e.g. DAL-A..D, ASIL-A..D, SIL-1..4)."\r\n },\r\n "mitigates-hazard": {\r\n "type": "array",\r\n "minItems": 1,\r\n "items": {\r\n "type": "string",\r\n "pattern": "^HAZ-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "description": "Operational hazards mitigated by safety control."\r\n },\r\n "fail-safe-action": {\r\n "type": "string",\r\n "description": "Automatic action or contingency maneuver to enter safe state."\r\n },\r\n "fault-tolerance-time-ms": {\r\n "type": "number",\r\n "description": "Fault tolerance time interval limit in milliseconds (FTTI)."\r\n },\r\n "acceptance-format": {\r\n "type": "string",\r\n "enum": ["gherkin", "declarative-prose"]\r\n },\r\n "cucumber-tags": {\r\n "type": "array",\r\n "items": {\r\n "type": "string"\r\n }\r\n },\r\n "supersedes": {\r\n "type": ["string", "null"]\r\n },\r\n "superseded-by": {\r\n "type": ["string", "null"]\r\n }\r\n },\r\n "additionalProperties": false\r\n}\r\n';
|
|
2729
2841
|
var SCHEMA_SCHEMAS_SDD_DESIGN_SCHEMA_JSON = '{\r\n "$schema": "https://json-schema.org/draft/2020-12/schema",\r\n "$id": "https://ai-sdlc.org/schemas/sdd/design.schema.json",\r\n "title": "Spec-Driven Development Technical Design Schema (DSG-*)",\r\n "type": "object",\r\n "required": ["id", "type", "title"],\r\n "properties": {\r\n "id": {\r\n "type": "string",\r\n "pattern": "^(DSG-[A-Z0-9]+(-[A-Z0-9]+)*|CHG-[A-Z0-9]+-DESIGN|[A-Z0-9]+(-[A-Z0-9]+)*)$",\r\n "description": "Unique identifier of the technical design specification."\r\n },\r\n "type": {\r\n "type": "string",\r\n "enum": ["spec-design", "spec-change-design", "design"]\r\n },\r\n "change-id": {\r\n "type": "string",\r\n "pattern": "^(CHG|FEAT|PATCH)-[A-Z0-9]+(-[A-Z0-9]+)*$",\r\n "description": "Parent change identifier associated with this design."\r\n },\r\n "title": {\r\n "type": "string",\r\n "minLength": 3\r\n },\r\n "version": {\r\n "type": "string",\r\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$",\r\n "description": "Semantic versioning (SemVer)."\r\n },\r\n "schema-version": {\r\n "type": "string"\r\n },\r\n "handoff": {\r\n "type": "string",\r\n "pattern": "^HOF-[A-Z0-9]+(-[A-Z0-9]+)*$",\r\n "description": "Reference to the HOF-* sidecar."\r\n },\r\n "architecture-component": {\r\n "type": "string",\r\n "pattern": "^CMP-[A-Z0-9]+(-[A-Z0-9]+)*$",\r\n "description": "Associated architecture component."\r\n },\r\n "architecture-components": {\r\n "type": "array",\r\n "items": {\r\n "type": "string",\r\n "pattern": "^CMP-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "description": "List of architecture components covered by this technical design."\r\n },\r\n "enclave": {\r\n "type": "string",\r\n "pattern": "^(SEC-ENC-)?[A-Z0-9]+(-[A-Z0-9]+)*$",\r\n "description": "Zero trust security enclave."\r\n },\r\n "status": {\r\n "type": "string",\r\n "enum": [\r\n "draft",\r\n "proposed",\r\n "review",\r\n "approved",\r\n "active",\r\n "completed",\r\n "deprecated"\r\n ]\r\n },\r\n "author": {\r\n "type": "string"\r\n },\r\n "date": {\r\n "type": "string"\r\n },\r\n "contracts": {\r\n "type": "array",\r\n "description": "Explicit contract interfaces and methods designed for implementation and unit testing.",\r\n "items": {\r\n "oneOf": [\r\n { "type": "string", "minLength": 1 },\r\n {\r\n "type": "object",\r\n "required": ["methods"],\r\n "properties": {\r\n "component": { "type": "string" },\r\n "interface": { "type": "string" },\r\n "methods": {\r\n "type": "array",\r\n "minItems": 1,\r\n "items": { "type": "string", "minLength": 1 }\r\n }\r\n },\r\n "additionalProperties": false\r\n }\r\n ]\r\n }\r\n },\r\n "citations": {\r\n "type": "array",\r\n "items": {\r\n "type": "object",\r\n "required": ["id"],\r\n "properties": {\r\n "id": { "type": "string" },\r\n "digest": { "type": "string" },\r\n "comment": { "type": "string" },\r\n "anchor": { "type": "string" }\r\n },\r\n "additionalProperties": false\r\n }\r\n }\r\n },\r\n "additionalProperties": false\r\n}\r\n';
|
|
2730
|
-
var SCHEMA_SCHEMAS_SDD_HANDOFF_SCHEMA_JSON = '{\r\n "$schema": "https://json-schema.org/draft/2020-12/schema",\r\n "$id": "https://ai-sdlc.org/schemas/sdd/handoff.schema.json",\r\n "title": "PDaC Product Handoff Sidecar Schema (HOF-*)",\r\n "type": "object",\r\n "required": ["id", "type", "changeId", "subgraph"],\r\n "properties": {\r\n "id": {\r\n "type": "string",\r\n "pattern": "^HOF-[A-Z0-9]+(-[A-Z0-9]+)*$",\r\n "description": "Immutable identifier emitted by PDaC handoff."\r\n },\r\n "type": {\r\n "type": "string",\r\n "enum": ["handoff", "product-handoff"]\r\n },\r\n "title": {\r\n "type": "string",\r\n "minLength": 3\r\n },\r\n "changeId": {\r\n "type": "string",\r\n "pattern": "^(CHG|FEAT)-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "version": {\r\n "type": "string",\r\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$"\r\n },\r\n "createdAt": {\r\n "type": "string"\r\n },\r\n "subgraph": {\r\n "type": "object",\r\n "required": ["requirements"],\r\n "properties": {\r\n "requirements": {\r\n "type": "array",\r\n "minItems": 1,\r\n "items": { "type": "string" }\r\n },\r\n "useCases": {\r\n "type": "array",\r\n "items": { "type": "string" }\r\n },\r\n "businessRules": {\r\n "type": "array",\r\n "items": { "type": "string" }\r\n },\r\n "securityRequirements": {\r\n "type": "array",\r\n "items": { "type": "string" }\r\n },\r\n "abuseCases": {\r\n "type": "array",\r\n "items": { "type": "string" }\r\n },\r\n "actors": {\r\n "type": "array",\r\n "items": { "type": "string" }\r\n }\r\n },\r\n "additionalProperties": true\r\n },\r\n "citations": {\r\n "type": "array",\r\n "items": {\r\n "type": "object",\r\n "required": ["id"],\r\n "properties": {\r\n "id": { "type": "string" },\r\n "digest": { "type": "string" },\r\n "anchor": { "type": "string" },\r\n "comment": { "type": "string" }\r\n }\r\n }\r\n }\r\n },\r\n "additionalProperties": true\r\n}\r\n';
|
|
2842
|
+
var SCHEMA_SCHEMAS_SDD_HANDOFF_SCHEMA_JSON = '{\r\n "$schema": "https://json-schema.org/draft/2020-12/schema",\r\n "$id": "https://ai-sdlc.org/schemas/sdd/handoff.schema.json",\r\n "title": "PDaC Product Handoff Sidecar Schema (HOF-*)",\r\n "type": "object",\r\n "required": ["id", "type", "changeId", "subgraph"],\r\n "properties": {\r\n "id": {\r\n "type": "string",\r\n "pattern": "^HOF-[A-Z0-9]+(-[A-Z0-9]+)*$",\r\n "description": "Immutable identifier emitted by PDaC handoff."\r\n },\r\n "type": {\r\n "type": "string",\r\n "enum": ["handoff", "product-handoff"]\r\n },\r\n "title": {\r\n "type": "string",\r\n "minLength": 3\r\n },\r\n "changeId": {\r\n "type": "string",\r\n "pattern": "^(CHG|FEAT)-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "version": {\r\n "type": "string",\r\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$"\r\n },\r\n "createdAt": {\r\n "type": "string"\r\n },\r\n "subgraph": {\r\n "type": "object",\r\n "required": ["requirements"],\r\n "properties": {\r\n "requirements": {\r\n "type": "array",\r\n "minItems": 1,\r\n "items": { "type": "string" }\r\n },\r\n "useCases": {\r\n "type": "array",\r\n "items": { "type": "string" }\r\n },\r\n "businessRules": {\r\n "type": "array",\r\n "items": { "type": "string" }\r\n },\r\n "securityRequirements": {\r\n "type": "array",\r\n "items": { "type": "string" }\r\n },\r\n "abuseCases": {\r\n "type": "array",\r\n "items": { "type": "string" }\r\n },\r\n "privacyRequirements": {\r\n "type": "array",\r\n "items": { "type": "string" }\r\n },\r\n "dataAssets": {\r\n "type": "array",\r\n "items": { "type": "string" }\r\n },\r\n "privacyRopa": {\r\n "type": "array",\r\n "items": { "type": "string" }\r\n },\r\n "actors": {\r\n "type": "array",\r\n "items": { "type": "string" }\r\n }\r\n },\r\n "additionalProperties": true\r\n },\r\n "citations": {\r\n "type": "array",\r\n "items": {\r\n "type": "object",\r\n "required": ["id"],\r\n "properties": {\r\n "id": { "type": "string" },\r\n "digest": { "type": "string" },\r\n "anchor": { "type": "string" },\r\n "comment": { "type": "string" }\r\n }\r\n }\r\n }\r\n },\r\n "additionalProperties": true\r\n}\r\n';
|
|
2731
2843
|
var SCHEMA_SCHEMAS_SDD_PROPOSAL_SCHEMA_JSON = '{\r\n "$schema": "https://json-schema.org/draft/2020-12/schema",\r\n "$id": "https://ai-sdlc.org/schemas/sdd/proposal.schema.json",\r\n "title": "Spec-Driven Development Change Proposal Schema (CHG-*)",\r\n "type": "object",\r\n "required": ["id", "type", "title", "status"],\r\n "properties": {\r\n "id": {\r\n "type": "string",\r\n "pattern": "^(CHG|FEAT|PATCH)-[A-Z0-9]+(-[A-Z0-9]+)*$",\r\n "description": "Unique identifier of the change proposal."\r\n },\r\n "type": {\r\n "type": "string",\r\n "enum": ["spec-change-proposal", "proposal"]\r\n },\r\n "title": {\r\n "type": "string",\r\n "minLength": 3\r\n },\r\n "status": {\r\n "type": "string",\r\n "enum": [\r\n "draft",\r\n "proposed",\r\n "review",\r\n "approved",\r\n "applied",\r\n "active",\r\n "completed",\r\n "rejected"\r\n ]\r\n },\r\n "author": {\r\n "type": "string"\r\n },\r\n "version": {\r\n "type": "string",\r\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$",\r\n "description": "Semantic versioning (SemVer)."\r\n },\r\n "schema-version": {\r\n "type": "string"\r\n },\r\n "date": {\r\n "type": "string"\r\n },\r\n "handoff": {\r\n "type": "string",\r\n "description": "Associated handoff sidecar reference."\r\n },\r\n "sdd-framework-compat": {\r\n "type": "array",\r\n "items": {\r\n "type": "string"\r\n },\r\n "description": "Supported SDD framework adapters."\r\n },\r\n "citations": {\r\n "type": "array",\r\n "items": {\r\n "type": "object",\r\n "required": ["id"],\r\n "properties": {\r\n "id": { "type": "string" },\r\n "digest": { "type": "string" },\r\n "comment": { "type": "string" },\r\n "anchor": { "type": "string" }\r\n },\r\n "additionalProperties": false\r\n }\r\n }\r\n },\r\n "additionalProperties": false\r\n}\r\n';
|
|
2732
2844
|
var SCHEMA_SCHEMAS_SDD_RELEASE_KPIS_SCHEMA_JSON = '{\r\n "$schema": "https://json-schema.org/draft/2020-12/schema",\r\n "$id": "https://ai-sdlc.org/schemas/sdd/release-kpis.schema.json",\r\n "title": "Release Consolidated KPIs & Attribution Telemetry Schema",\r\n "type": "object",\r\n "required": [\r\n "releaseBranch",\r\n "baseBranch",\r\n "generatedAt",\r\n "totalCommits",\r\n "totalLinesAdded",\r\n "totalLinesDeleted",\r\n "totalKloc",\r\n "totalBugs",\r\n "globalDefectDensity",\r\n "totalTimeSeconds",\r\n "totalTokens",\r\n "totalCostUsd",\r\n "authorStats",\r\n "bugList"\r\n ],\r\n "properties": {\r\n "id": {\r\n "type": "string",\r\n "pattern": "^(KPI-REL|REL-KPI)-[A-Z0-9]+(-[A-Z0-9]+)*$",\r\n "description": "Optional artifact identifier."\r\n },\r\n "type": {\r\n "type": "string",\r\n "const": "release-kpis"\r\n },\r\n "releaseBranch": {\r\n "type": "string"\r\n },\r\n "baseBranch": {\r\n "type": "string"\r\n },\r\n "generatedAt": {\r\n "type": "string"\r\n },\r\n "totalCommits": {\r\n "type": "integer",\r\n "minimum": 0\r\n },\r\n "totalLinesAdded": {\r\n "type": "integer",\r\n "minimum": 0\r\n },\r\n "totalLinesDeleted": {\r\n "type": "integer",\r\n "minimum": 0\r\n },\r\n "totalKloc": {\r\n "type": "number",\r\n "minimum": 0\r\n },\r\n "totalBugs": {\r\n "type": "integer",\r\n "minimum": 0\r\n },\r\n "globalDefectDensity": {\r\n "type": "number",\r\n "minimum": 0\r\n },\r\n "totalTimeSeconds": {\r\n "type": "number",\r\n "minimum": 0\r\n },\r\n "totalTokens": {\r\n "type": "integer",\r\n "minimum": 0\r\n },\r\n "totalCostUsd": {\r\n "type": "number",\r\n "minimum": 0\r\n },\r\n "reworkTimeSeconds": {\r\n "type": "number",\r\n "minimum": 0\r\n },\r\n "reworkTokens": {\r\n "type": "integer",\r\n "minimum": 0\r\n },\r\n "reworkCostUsd": {\r\n "type": "number",\r\n "minimum": 0\r\n },\r\n "reworkTimePercent": {\r\n "type": "number",\r\n "minimum": 0\r\n },\r\n "reworkTokensPercent": {\r\n "type": "number",\r\n "minimum": 0\r\n },\r\n "reworkCostPercent": {\r\n "type": "number",\r\n "minimum": 0\r\n },\r\n "authorStats": {\r\n "type": "array",\r\n "items": {\r\n "type": "object",\r\n "required": [\r\n "authorOrModel",\r\n "isAgent",\r\n "commits",\r\n "linesAdded",\r\n "linesDeleted",\r\n "klocProduced",\r\n "bugsInjected",\r\n "defectInjectionRate",\r\n "totalTimeSeconds",\r\n "totalTokens",\r\n "estimatedCostUsd"\r\n ],\r\n "properties": {\r\n "authorOrModel": {\r\n "type": "string"\r\n },\r\n "isAgent": {\r\n "type": "boolean"\r\n },\r\n "commits": {\r\n "type": "integer",\r\n "minimum": 0\r\n },\r\n "linesAdded": {\r\n "type": "integer",\r\n "minimum": 0\r\n },\r\n "linesDeleted": {\r\n "type": "integer",\r\n "minimum": 0\r\n },\r\n "klocProduced": {\r\n "type": "number",\r\n "minimum": 0\r\n },\r\n "bugsInjected": {\r\n "type": "integer",\r\n "minimum": 0\r\n },\r\n "defectInjectionRate": {\r\n "type": "number",\r\n "minimum": 0\r\n },\r\n "totalTimeSeconds": {\r\n "type": "number",\r\n "minimum": 0\r\n },\r\n "totalTokens": {\r\n "type": "integer",\r\n "minimum": 0\r\n },\r\n "estimatedCostUsd": {\r\n "type": "number",\r\n "minimum": 0\r\n }\r\n },\r\n "additionalProperties": false\r\n }\r\n },\r\n "bugList": {\r\n "type": "array",\r\n "items": {\r\n "type": "object",\r\n "required": ["sha", "subject", "author", "timeSeconds", "tokens"],\r\n "properties": {\r\n "sha": {\r\n "type": "string"\r\n },\r\n "subject": {\r\n "type": "string"\r\n },\r\n "author": {\r\n "type": "string"\r\n },\r\n "parentRef": {\r\n "type": "string"\r\n },\r\n "timeSeconds": {\r\n "type": "number",\r\n "minimum": 0\r\n },\r\n "tokens": {\r\n "type": "integer",\r\n "minimum": 0\r\n }\r\n },\r\n "additionalProperties": false\r\n }\r\n }\r\n },\r\n "additionalProperties": false\r\n}\r\n';
|
|
2733
2845
|
var SCHEMA_SCHEMAS_SDD_SESSION_TELEMETRY_SCHEMA_JSON = '{\r\n "$schema": "https://json-schema.org/draft/2020-12/schema",\r\n "$id": "https://ai-sdlc.org/schemas/sdd/session-telemetry.schema.json",\r\n "title": "Agent Session Telemetry Schema (.ai-sdlc/session-telemetry.json)",\r\n "type": "object",\r\n "required": [\r\n "model",\r\n "promptTokens",\r\n "completionTokens",\r\n "activeTimeSeconds"\r\n ],\r\n "properties": {\r\n "id": {\r\n "type": "string",\r\n "pattern": "^(TEL-SES|SES-TEL|TEL)-[A-Z0-9]+(-[A-Z0-9]+)*$",\r\n "description": "Optional telemetry session identifier."\r\n },\r\n "type": {\r\n "type": "string",\r\n "const": "session-telemetry"\r\n },\r\n "model": {\r\n "type": "string",\r\n "minLength": 1,\r\n "description": "AI model name or identifier."\r\n },\r\n "promptTokens": {\r\n "type": "integer",\r\n "minimum": 0,\r\n "description": "Total prompt tokens consumed."\r\n },\r\n "completionTokens": {\r\n "type": "integer",\r\n "minimum": 0,\r\n "description": "Total completion tokens generated."\r\n },\r\n "activeTimeSeconds": {\r\n "type": "number",\r\n "minimum": 0,\r\n "description": "Active session development duration in seconds."\r\n },\r\n "author": {\r\n "type": "string"\r\n },\r\n "authorType": {\r\n "type": "string",\r\n "enum": ["agent", "human"]\r\n },\r\n "sessionId": {\r\n "type": "string"\r\n },\r\n "timestamp": {\r\n "type": "string"\r\n },\r\n "provider": {\r\n "type": "string"\r\n },\r\n "confidence": {\r\n "type": "string",\r\n "enum": ["HIGH", "MEDIUM", "LOW"]\r\n },\r\n "source": {\r\n "type": "string"\r\n }\r\n },\r\n "additionalProperties": false\r\n}\r\n';
|
|
2734
2846
|
var SCHEMA_SCHEMAS_SDD_SPEC_SCHEMA_JSON = '{\r\n "$schema": "https://json-schema.org/draft/2020-12/schema",\r\n "$id": "https://ai-sdlc.org/schemas/sdd/spec.schema.json",\r\n "title": "Spec-Driven Development Delivery Specification Schema (SPEC-*)",\r\n "type": "object",\r\n "required": ["id", "type", "change-id"],\r\n "properties": {\r\n "id": {\r\n "type": "string",\r\n "pattern": "^SPEC-(CHG|FEAT|PATCH)-[A-Z0-9]+(-[A-Z0-9]+)*$",\r\n "description": "Unique identifier of the delivery specification."\r\n },\r\n "type": {\r\n "type": "string",\r\n "enum": ["delivery-spec", "spec"]\r\n },\r\n "change-id": {\r\n "type": "string",\r\n "pattern": "^(CHG|FEAT|PATCH)-[A-Z0-9]+(-[A-Z0-9]+)*$",\r\n "description": "Parent change identifier associated with this specification."\r\n },\r\n "profile": {\r\n "type": "string",\r\n "enum": ["patch", "standard", "critical"],\r\n "description": "Risk and governance profile of the change."\r\n },\r\n "title": {\r\n "type": "string",\r\n "minLength": 3\r\n },\r\n "version": {\r\n "type": "string",\r\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$",\r\n "description": "Semantic versioning (SemVer)."\r\n },\r\n "schema-version": {\r\n "type": "string"\r\n },\r\n "handoff": {\r\n "type": "string",\r\n "description": "Associated handoff sidecar reference."\r\n },\r\n "status": {\r\n "type": "string",\r\n "enum": [\r\n "draft",\r\n "proposed",\r\n "review",\r\n "approved",\r\n "active",\r\n "completed",\r\n "deprecated"\r\n ]\r\n },\r\n "verification": {\r\n "type": "object",\r\n "properties": {\r\n "method": {\r\n "type": "string"\r\n },\r\n "command": {\r\n "type": "string"\r\n },\r\n "target": {\r\n "type": "string"\r\n }\r\n },\r\n "additionalProperties": true\r\n },\r\n "citations": {\r\n "type": "array",\r\n "items": {\r\n "type": "object",\r\n "required": ["id"],\r\n "properties": {\r\n "id": { "type": "string" },\r\n "digest": { "type": "string" },\r\n "comment": { "type": "string" },\r\n "anchor": { "type": "string" }\r\n },\r\n "additionalProperties": false\r\n }\r\n },\r\n "acceptance-format": {\r\n "type": "string",\r\n "enum": ["gherkin"],\r\n "description": "Formato de aceptaci\xF3n BDD obligatorio para especificaciones de entrega SDD."\r\n },\r\n "cucumber-tags": {\r\n "type": "array",\r\n "items": {\r\n "type": "string",\r\n "pattern": "^@[a-zA-Z0-9_-]+$"\r\n },\r\n "description": "Etiquetas de trazabilidad BDD para ejecuci\xF3n con Cucumber."\r\n },\r\n "cucumber-feature-file": {\r\n "type": "string",\r\n "description": "Ruta personalizada de extracci\xF3n del archivo .feature para Cucumber."\r\n }\r\n },\r\n "additionalProperties": false\r\n}\r\n';
|
|
2735
|
-
var SCHEMA_SCHEMAS_SDD_TASKS_SCHEMA_JSON = '{\r\n "$schema": "https://json-schema.org/draft/2020-12/schema",\r\n "$id": "https://ai-sdlc.org/schemas/sdd/tasks.schema.json",\r\n "title": "Verifiable Tasks & Human Autonomy Governance Schema",\r\n "type": "object",\r\n "required": ["id", "type", "change-id", "version", "tasks"],\r\n "properties": {\r\n "id": {\r\n "type": "string",\r\n "pattern": "^TSK-PLAN-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "type": {\r\n "type": "string",\r\n "const": "task-plan"\r\n },\r\n "change-id": {\r\n "type": "string",\r\n "pattern": "^(CHG|FEAT)-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "version": {\r\n "type": "string",\r\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$"\r\n },\r\n "schema-version": {\r\n "type": "string"\r\n },\r\n "title": {\r\n "type": "string",\r\n "minLength": 5\r\n },\r\n "status": {\r\n "type": "string",\r\n "enum": ["draft", "approved", "in-progress", "completed", "blocked"]\r\n },\r\n "governance-summary": {\r\n "type": "object",\r\n "properties": {\r\n "autonomous-tasks-count": { "type": "integer", "minimum": 0 },\r\n "human-review-plan-count": { "type": "integer", "minimum": 0 },\r\n "ambiguous-count": { "type": "integer", "minimum": 0 },\r\n "high-risk-manual-count": { "type": "integer", "minimum": 0 }\r\n }\r\n },\r\n "tasks": {\r\n "type": "array",\r\n "minItems": 1,\r\n "items": {\r\n "type": "object",\r\n "required": ["id", "title", "complexity", "risk-level", "autonomy-mode", "verification", "assigned-to", "status"],\r\n "properties": {\r\n "id": {\r\n "type": "string",\r\n "pattern": "^TSK-[0-9]{3,}$"\r\n },\r\n "title": {\r\n "type": "string",\r\n "minLength": 5\r\n },\r\n "complexity": {\r\n "type": "string",\r\n "enum": ["LOW", "MEDIUM", "HIGH"]\r\n },\r\n "risk-level": {\r\n "type": "string",\r\n "enum": ["LOW", "MEDIUM", "HIGH", "CRITICAL"]\r\n },\r\n "autonomy-mode": {\r\n "type": "string",\r\n "enum": [\r\n "AUTONOMOUS",\r\n "HUMAN_REVIEW_PLAN",\r\n "AMBIGUOUS",\r\n "HIGH_RISK_MANUAL"\r\n ],\r\n "description": "AI agent human governance and supervision mode."\r\n },\r\n "verification": {\r\n "type": "object",\r\n "required": ["method", "command-or-criteria"],\r\n "properties": {\r\n "method": {\r\n "type": "string",\r\n "enum": ["automated-unit-test", "cucumber-bdd", "quality-gate", "license-audit", "sast-scan", "manual-inspection", "smoke-test"]\r\n },\r\n "command-or-criteria": {\r\n "type": "string",\r\n "minLength": 5\r\n }\r\n }\r\n },\r\n "assigned-to": {\r\n "type": "string",\r\n "enum": [\r\n "agent-developer",\r\n "agent-security-auditor",\r\n "agent-compliance-checker",\r\n "agent-qa",\r\n "human-engineer",\r\n "human-architect",\r\n "pair-human-agent"\r\n ]\r\n },\r\n "status": {\r\n "type": "string",\r\n "enum": ["PENDING", "IN_PROGRESS", "COMPLETED", "BLOCKED"]\r\n },\r\n "blocking-reason": {\r\n "type": "string"\r\n },\r\n "implements-components": {\r\n "type": "array",\r\n "items": {\r\n "type": "string",\r\n "pattern": "^CMP-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "description": "Architecture components (CMP-*) implemented by this atomic task."\r\n },\r\n "satisfies-requirements": {\r\n "type": "array",\r\n "items": {\r\n "type": "string",\r\n "pattern": "^(FR|QR|CON|SEC-REQ|SAF-REQ)-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "description": "Requirements satisfied by this atomic task."\r\n },\r\n "implements-contracts": {\r\n "type": "array",\r\n "items": {\r\n "type": "string",\r\n "minLength": 1\r\n },\r\n "description": "Explicit interface or method contracts from design.md implemented by this task."\r\n }\r\n },\r\n "additionalProperties": false\r\n }\r\n },\r\n "supersedes": { "type": ["string", "null"] },\r\n "superseded-by": { "type": ["string", "null"] }\r\n },\r\n "additionalProperties": false\r\n}\r\n';
|
|
2847
|
+
var SCHEMA_SCHEMAS_SDD_TASKS_SCHEMA_JSON = '{\r\n "$schema": "https://json-schema.org/draft/2020-12/schema",\r\n "$id": "https://ai-sdlc.org/schemas/sdd/tasks.schema.json",\r\n "title": "Verifiable Tasks & Human Autonomy Governance Schema",\r\n "type": "object",\r\n "required": ["id", "type", "change-id", "version", "tasks"],\r\n "properties": {\r\n "id": {\r\n "type": "string",\r\n "pattern": "^TSK-PLAN-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "type": {\r\n "type": "string",\r\n "const": "task-plan"\r\n },\r\n "change-id": {\r\n "type": "string",\r\n "pattern": "^(CHG|FEAT)-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "version": {\r\n "type": "string",\r\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$"\r\n },\r\n "schema-version": {\r\n "type": "string"\r\n },\r\n "title": {\r\n "type": "string",\r\n "minLength": 5\r\n },\r\n "status": {\r\n "type": "string",\r\n "enum": ["draft", "approved", "in-progress", "completed", "blocked"]\r\n },\r\n "governance-summary": {\r\n "type": "object",\r\n "properties": {\r\n "autonomous-tasks-count": { "type": "integer", "minimum": 0 },\r\n "human-review-plan-count": { "type": "integer", "minimum": 0 },\r\n "ambiguous-count": { "type": "integer", "minimum": 0 },\r\n "high-risk-manual-count": { "type": "integer", "minimum": 0 }\r\n }\r\n },\r\n "tasks": {\r\n "type": "array",\r\n "minItems": 1,\r\n "items": {\r\n "type": "object",\r\n "required": ["id", "title", "complexity", "risk-level", "autonomy-mode", "verification", "assigned-to", "status"],\r\n "properties": {\r\n "id": {\r\n "type": "string",\r\n "pattern": "^TSK-[0-9]{3,}$"\r\n },\r\n "title": {\r\n "type": "string",\r\n "minLength": 5\r\n },\r\n "complexity": {\r\n "type": "string",\r\n "enum": ["LOW", "MEDIUM", "HIGH"]\r\n },\r\n "risk-level": {\r\n "type": "string",\r\n "enum": ["LOW", "MEDIUM", "HIGH", "CRITICAL"]\r\n },\r\n "autonomy-mode": {\r\n "type": "string",\r\n "enum": [\r\n "AUTONOMOUS",\r\n "HUMAN_REVIEW_PLAN",\r\n "AMBIGUOUS",\r\n "HIGH_RISK_MANUAL"\r\n ],\r\n "description": "AI agent human governance and supervision mode."\r\n },\r\n "verification": {\r\n "type": "object",\r\n "required": ["method", "command-or-criteria"],\r\n "properties": {\r\n "method": {\r\n "type": "string",\r\n "enum": ["automated-unit-test", "cucumber-bdd", "quality-gate", "license-audit", "sast-scan", "privacy-audit", "manual-inspection", "smoke-test"]\r\n },\r\n "command-or-criteria": {\r\n "type": "string",\r\n "minLength": 5\r\n }\r\n }\r\n },\r\n "assigned-to": {\r\n "type": "string",\r\n "enum": [\r\n "agent-developer",\r\n "agent-security-auditor",\r\n "agent-compliance-checker",\r\n "agent-privacy-officer",\r\n "agent-qa",\r\n "human-engineer",\r\n "human-architect",\r\n "pair-human-agent"\r\n ]\r\n },\r\n "status": {\r\n "type": "string",\r\n "enum": ["PENDING", "IN_PROGRESS", "COMPLETED", "BLOCKED"]\r\n },\r\n "blocking-reason": {\r\n "type": "string"\r\n },\r\n "implements-components": {\r\n "type": "array",\r\n "items": {\r\n "type": "string",\r\n "pattern": "^CMP-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "description": "Architecture components (CMP-*) implemented by this atomic task."\r\n },\r\n "satisfies-requirements": {\r\n "type": "array",\r\n "items": {\r\n "type": "string",\r\n "pattern": "^(FR|QR|CON|SEC-REQ|SAF-REQ|PRIV-REQ)-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "description": "Requirements satisfied by this atomic task."\r\n },\r\n "implements-contracts": {\r\n "type": "array",\r\n "items": {\r\n "type": "string",\r\n "minLength": 1\r\n },\r\n "description": "Explicit interface or method contracts from design.md implemented by this task."\r\n }\r\n },\r\n "additionalProperties": false\r\n }\r\n },\r\n "supersedes": { "type": ["string", "null"] },\r\n "superseded-by": { "type": ["string", "null"] }\r\n },\r\n "additionalProperties": false\r\n}\r\n';
|
|
2736
2848
|
var SCHEMA_SCHEMAS_SECURITY_ABUSE_CASE_SCHEMA_JSON = '{\r\n "$schema": "https://json-schema.org/draft/2020-12/schema",\r\n "$id": "https://ai-sdlc.org/schemas/security/abuse-case.schema.json",\r\n "title": "Abuse Case Schema (Versionable)",\r\n "type": "object",\r\n "required": ["id", "type", "title", "status", "version", "primary-threat-actor", "targets-use-case", "stride-category", "mitigated-by"],\r\n "properties": {\r\n "id": {\r\n "type": "string",\r\n "pattern": "^ABUSE-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "type": {\r\n "type": "string",\r\n "const": "abuse-case"\r\n },\r\n "version": {\r\n "type": "string",\r\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$",\r\n "description": "Abuse case semantic version (SemVer)."\r\n },\r\n "schema-version": {\r\n "type": "string"\r\n },\r\n "title": {\r\n "type": "string",\r\n "minLength": 3\r\n },\r\n "status": {\r\n "type": "string",\r\n "enum": ["draft", "active", "deprecated", "retired"]\r\n },\r\n "primary-threat-actor": {\r\n "type": "string",\r\n "pattern": "^ACT-THREAT-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "targets-use-case": {\r\n "type": "string",\r\n "pattern": "^UC-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "stride-category": {\r\n "type": "string",\r\n "enum": ["spoofing", "tampering", "repudiation", "information-disclosure", "denial-of-service", "elevation-of-privilege"]\r\n },\r\n "mitigated-by": {\r\n "type": "array",\r\n "minItems": 1,\r\n "items": {\r\n "type": "string",\r\n "pattern": "^SEC-REQ-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n }\r\n },\r\n "asvs-controls": {\r\n "type": "array",\r\n "items": {\r\n "type": "string"\r\n }\r\n },\r\n "supersedes": {\r\n "type": ["string", "null"],\r\n "pattern": "^ABUSE-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "superseded-by": {\r\n "type": ["string", "null"],\r\n "pattern": "^ABUSE-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n }\r\n },\r\n "additionalProperties": false\r\n}\r\n';
|
|
2737
2849
|
var SCHEMA_SCHEMAS_SECURITY_ENCLAVE_SCHEMA_JSON = `{\r
|
|
2738
2850
|
"$schema": "https://json-schema.org/draft/2020-12/schema",\r
|
|
@@ -2837,7 +2949,7 @@ var SCHEMA_SCHEMAS_SECURITY_ENCLAVE_SCHEMA_JSON = `{\r
|
|
|
2837
2949
|
`;
|
|
2838
2950
|
var SCHEMA_SCHEMAS_SECURITY_SECURITY_REQ_SCHEMA_JSON = '{\r\n "$schema": "https://json-schema.org/draft/2020-12/schema",\r\n "$id": "https://ai-sdlc.org/schemas/security/security-req.schema.json",\r\n "title": "Security Requirement Schema (Strict Test Validation Enforced)",\r\n "type": "object",\r\n "required": ["id", "type", "title", "status", "version", "security-domain", "mitigates-abuse-case"],\r\n "properties": {\r\n "id": {\r\n "type": "string",\r\n "pattern": "^SEC-REQ-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "type": {\r\n "type": "string",\r\n "const": "security-requirement"\r\n },\r\n "version": {\r\n "type": "string",\r\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$",\r\n "description": "Security requirement semantic version (SemVer)."\r\n },\r\n "schema-version": {\r\n "type": "string"\r\n },\r\n "title": {\r\n "type": "string",\r\n "minLength": 3\r\n },\r\n "status": {\r\n "type": "string",\r\n "enum": ["draft", "active", "deprecated", "retired"]\r\n },\r\n "security-domain": {\r\n "type": "string",\r\n "enum": ["authentication", "authorization", "cryptography", "input-validation", "audit-logging", "communication-security", "data-protection"]\r\n },\r\n "mitigates-abuse-case": {\r\n "type": "array",\r\n "minItems": 1,\r\n "items": {\r\n "type": "string",\r\n "pattern": "^ABUSE-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "description": "Product/Security Traceability: Abuse case or threat this control neutralizes."\r\n },\r\n "enforced-in-enclave": {\r\n "type": "string",\r\n "pattern": "^SEC-ENC-[A-Z0-9]+(-[A-Z0-9]+)*$",\r\n "description": "Architecture Traceability: Perimeter or internal security enclave."\r\n },\r\n "compliance-references": {\r\n "type": "array",\r\n "items": {\r\n "type": "string"\r\n }\r\n },\r\n "acceptance-format": {\r\n "type": "string",\r\n "enum": ["gherkin", "declarative-prose"],\r\n "description": "Mitigation criteria format."\r\n },\r\n "cucumber-tags": {\r\n "type": "array",\r\n "items": {\r\n "type": "string",\r\n "pattern": "^@[a-zA-Z0-9_-]+$"\r\n }\r\n },\r\n "supersedes": {\r\n "type": ["string", "null"],\r\n "pattern": "^SEC-REQ-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "superseded-by": {\r\n "type": ["string", "null"],\r\n "pattern": "^SEC-REQ-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n }\r\n },\r\n "additionalProperties": false\r\n}\r\n';
|
|
2839
2951
|
var SCHEMA_SCHEMAS_SECURITY_THREAT_ACTOR_SCHEMA_JSON = '{\r\n "$schema": "https://json-schema.org/draft/2020-12/schema",\r\n "$id": "https://ai-sdlc.org/schemas/security/threat-actor.schema.json",\r\n "title": "Threat Actor Schema (Versionable)",\r\n "type": "object",\r\n "required": ["id", "type", "title", "status", "version", "threat-capability", "motivation"],\r\n "properties": {\r\n "id": {\r\n "type": "string",\r\n "pattern": "^ACT-THREAT-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "type": {\r\n "type": "string",\r\n "const": "threat-actor"\r\n },\r\n "version": {\r\n "type": "string",\r\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$",\r\n "description": "Threat profile semantic version (SemVer)."\r\n },\r\n "schema-version": {\r\n "type": "string"\r\n },\r\n "title": {\r\n "type": "string",\r\n "minLength": 3\r\n },\r\n "status": {\r\n "type": "string",\r\n "enum": ["draft", "active", "deprecated", "retired"]\r\n },\r\n "threat-capability": {\r\n "type": "string",\r\n "enum": ["script-kiddie", "advanced-persistent-threat", "insider-threat", "automated-botnet", "supply-chain-attacker"]\r\n },\r\n "motivation": {\r\n "type": "string",\r\n "enum": ["financial-gain", "espionage", "sabotage", "data-theft", "reputational-damage"]\r\n },\r\n "attack-surfaces": {\r\n "type": "array",\r\n "items": {\r\n "type": "string"\r\n }\r\n },\r\n "supersedes": {\r\n "type": ["string", "null"],\r\n "pattern": "^ACT-THREAT-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n },\r\n "superseded-by": {\r\n "type": ["string", "null"],\r\n "pattern": "^ACT-THREAT-[A-Z0-9]+(-[A-Z0-9]+)*$"\r\n }\r\n },\r\n "additionalProperties": false\r\n}\r\n';
|
|
2840
|
-
var SCHEMA_SCHEMAS_WORKFLOW_AGENT_HANDOFF_SCHEMA_JSON = '{\r\n "$schema": "https://json-schema.org/draft/2020-12/schema",\r\n "$id": "https://ai-sdlc.org/schemas/workflow/agent-handoff.schema.json",\r\n "title": "Agent Workflow Handoff Block Schema",\r\n "type": "object",\r\n "required": [\r\n "id",\r\n "type",\r\n "completed-phase",\r\n "acting-role",\r\n "autonomy-mode",\r\n "deliverables",\r\n "suggested-prompt"\r\n ],\r\n "properties": {\r\n "id": {\r\n "type": "string",\r\n "pattern": "^(AHOF|HOF-WORKFLOW|HOF)-[A-Z0-9]+(-[A-Z0-9]+)*$",\r\n "description": "Unique workflow handoff identifier."\r\n },\r\n "type": {\r\n "type": "string",\r\n "const": "agent-handoff"\r\n },\r\n "title": {\r\n "type": "string",\r\n "minLength": 3\r\n },\r\n "version": {\r\n "type": "string",\r\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$",\r\n "description": "Semantic versioning (SemVer)."\r\n },\r\n "schema-version": {\r\n "type": "string"\r\n },\r\n "status": {\r\n "type": "string",\r\n "enum": ["draft", "active", "completed", "transferred"]\r\n },\r\n "completed-phase": {\r\n "type": "string",\r\n "minLength": 2,\r\n "description": "Name of the completed lifecycle phase or activity."\r\n },\r\n "acting-role": {\r\n "type": "string",\r\n "enum": [\r\n "agent-product-analyst",\r\n "agent-threat-modeler",\r\n "agent-system-architect",\r\n "agent-qa-engineer",\r\n "agent-developer",\r\n "agent-expert-user",\r\n "agent-security-auditor",\r\n "agent-compliance-checker",\r\n "agent-code-reviewer",\r\n "agent-devops",\r\n "human-dev",\r\n "tech-lead",\r\n "release-manager"\r\n ],\r\n "description": "Specialized role executing the handoff."\r\n },\r\n "autonomy-mode": {\r\n "type": "string",\r\n "enum": ["AUTONOMOUS", "HUMAN_REVIEW_PLAN", "AMBIGUOUS", "HIGH_RISK_MANUAL"],\r\n "description": "Autonomy level under which the task was executed."\r\n },\r\n "deliverables": {\r\n "type": "array",\r\n "minItems": 1,\r\n "items": {\r\n "type": "string"\r\n },\r\n "description": "Paths or IDs of artifacts produced during the phase."\r\n },\r\n "recommended-next-roles": {\r\n "type": "array",\r\n "items": {\r\n "type": "object",\r\n "required": ["role", "rationale"],\r\n "properties": {\r\n "role": {\r\n "type": "string"\r\n },\r\n "rationale": {\r\n "type": "string"\r\n }\r\n },\r\n "additionalProperties": false\r\n },\r\n "description": "Recommended downstream specialist roles and technical justifications."\r\n },\r\n "suggested-prompt": {\r\n "type": "string",\r\n "minLength": 5,\r\n "description": "Suggested invocation prompt to initiate the next agent."\r\n },\r\n "human-action-window": {\r\n "type": "object",\r\n "properties": {\r\n "review-and-validate": {\r\n "type": "boolean"\r\n },\r\n "edit-directly": {\r\n "type": "boolean"\r\n },\r\n "pause-or-divert": {\r\n "type": "boolean"\r\n },\r\n "delegate": {\r\n "type": "boolean"\r\n }\r\n },\r\n "additionalProperties": false,\r\n "description": "Actions available to the human engineer within the sovereign action window."\r\n }\r\n },\r\n "additionalProperties": false\r\n}\r\n';
|
|
2952
|
+
var SCHEMA_SCHEMAS_WORKFLOW_AGENT_HANDOFF_SCHEMA_JSON = '{\r\n "$schema": "https://json-schema.org/draft/2020-12/schema",\r\n "$id": "https://ai-sdlc.org/schemas/workflow/agent-handoff.schema.json",\r\n "title": "Agent Workflow Handoff Block Schema",\r\n "type": "object",\r\n "required": [\r\n "id",\r\n "type",\r\n "completed-phase",\r\n "acting-role",\r\n "autonomy-mode",\r\n "deliverables",\r\n "suggested-prompt"\r\n ],\r\n "properties": {\r\n "id": {\r\n "type": "string",\r\n "pattern": "^(AHOF|HOF-WORKFLOW|HOF)-[A-Z0-9]+(-[A-Z0-9]+)*$",\r\n "description": "Unique workflow handoff identifier."\r\n },\r\n "type": {\r\n "type": "string",\r\n "const": "agent-handoff"\r\n },\r\n "title": {\r\n "type": "string",\r\n "minLength": 3\r\n },\r\n "version": {\r\n "type": "string",\r\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$",\r\n "description": "Semantic versioning (SemVer)."\r\n },\r\n "schema-version": {\r\n "type": "string"\r\n },\r\n "status": {\r\n "type": "string",\r\n "enum": ["draft", "active", "completed", "transferred"]\r\n },\r\n "completed-phase": {\r\n "type": "string",\r\n "minLength": 2,\r\n "description": "Name of the completed lifecycle phase or activity."\r\n },\r\n "acting-role": {\r\n "type": "string",\r\n "enum": [\r\n "agent-product-analyst",\r\n "agent-threat-modeler",\r\n "agent-privacy-officer",\r\n "agent-system-architect",\r\n "agent-qa-engineer",\r\n "agent-developer",\r\n "agent-expert-user",\r\n "agent-security-auditor",\r\n "agent-compliance-checker",\r\n "agent-code-reviewer",\r\n "agent-devops",\r\n "human-dev",\r\n "tech-lead",\r\n "release-manager",\r\n "dpo"\r\n ],\r\n "description": "Specialized role executing the handoff."\r\n },\r\n "autonomy-mode": {\r\n "type": "string",\r\n "enum": ["AUTONOMOUS", "HUMAN_REVIEW_PLAN", "AMBIGUOUS", "HIGH_RISK_MANUAL"],\r\n "description": "Autonomy level under which the task was executed."\r\n },\r\n "deliverables": {\r\n "type": "array",\r\n "minItems": 1,\r\n "items": {\r\n "type": "string"\r\n },\r\n "description": "Paths or IDs of artifacts produced during the phase."\r\n },\r\n "recommended-next-roles": {\r\n "type": "array",\r\n "items": {\r\n "type": "object",\r\n "required": ["role", "rationale"],\r\n "properties": {\r\n "role": {\r\n "type": "string"\r\n },\r\n "rationale": {\r\n "type": "string"\r\n }\r\n },\r\n "additionalProperties": false\r\n },\r\n "description": "Recommended downstream specialist roles and technical justifications."\r\n },\r\n "suggested-prompt": {\r\n "type": "string",\r\n "minLength": 5,\r\n "description": "Suggested invocation prompt to initiate the next agent."\r\n },\r\n "human-action-window": {\r\n "type": "object",\r\n "properties": {\r\n "review-and-validate": {\r\n "type": "boolean"\r\n },\r\n "edit-directly": {\r\n "type": "boolean"\r\n },\r\n "pause-or-divert": {\r\n "type": "boolean"\r\n },\r\n "delegate": {\r\n "type": "boolean"\r\n }\r\n },\r\n "additionalProperties": false,\r\n "description": "Actions available to the human engineer within the sovereign action window."\r\n }\r\n },\r\n "additionalProperties": false\r\n}\r\n';
|
|
2841
2953
|
var STARTER_SCHEMAS_MAP = {
|
|
2842
2954
|
"schemas/architecture/adr.schema.json": JSON.parse(SCHEMA_SCHEMAS_ARCHITECTURE_ADR_SCHEMA_JSON),
|
|
2843
2955
|
"schemas/architecture/component.schema.json": JSON.parse(SCHEMA_SCHEMAS_ARCHITECTURE_COMPONENT_SCHEMA_JSON),
|
|
@@ -2848,6 +2960,10 @@ var STARTER_SCHEMAS_MAP = {
|
|
|
2848
2960
|
"schemas/ide/mcp-config.schema.json": JSON.parse(SCHEMA_SCHEMAS_IDE_MCP_CONFIG_SCHEMA_JSON),
|
|
2849
2961
|
"schemas/manuals/production-manual.schema.json": JSON.parse(SCHEMA_SCHEMAS_MANUALS_PRODUCTION_MANUAL_SCHEMA_JSON),
|
|
2850
2962
|
"schemas/manuals/user-manual.schema.json": JSON.parse(SCHEMA_SCHEMAS_MANUALS_USER_MANUAL_SCHEMA_JSON),
|
|
2963
|
+
"schemas/privacy/data-asset.schema.json": JSON.parse(SCHEMA_SCHEMAS_PRIVACY_DATA_ASSET_SCHEMA_JSON),
|
|
2964
|
+
"schemas/privacy/privacy-policy.schema.json": JSON.parse(SCHEMA_SCHEMAS_PRIVACY_PRIVACY_POLICY_SCHEMA_JSON),
|
|
2965
|
+
"schemas/privacy/privacy-req.schema.json": JSON.parse(SCHEMA_SCHEMAS_PRIVACY_PRIVACY_REQ_SCHEMA_JSON),
|
|
2966
|
+
"schemas/privacy/privacy-ropa.schema.json": JSON.parse(SCHEMA_SCHEMAS_PRIVACY_PRIVACY_ROPA_SCHEMA_JSON),
|
|
2851
2967
|
"schemas/product/actor.schema.json": JSON.parse(SCHEMA_SCHEMAS_PRODUCT_ACTOR_SCHEMA_JSON),
|
|
2852
2968
|
"schemas/product/business-rule.schema.json": JSON.parse(SCHEMA_SCHEMAS_PRODUCT_BUSINESS_RULE_SCHEMA_JSON),
|
|
2853
2969
|
"schemas/product/journey.schema.json": JSON.parse(SCHEMA_SCHEMAS_PRODUCT_JOURNEY_SCHEMA_JSON),
|
|
@@ -2889,6 +3005,11 @@ var TYPE_TO_SCHEMA_MAP = {
|
|
|
2889
3005
|
"security-enclave": "schemas/security/enclave.schema.json",
|
|
2890
3006
|
"security-requirement": "schemas/security/security-req.schema.json",
|
|
2891
3007
|
"threat-actor": "schemas/security/threat-actor.schema.json",
|
|
3008
|
+
// Privacy & Data Protection
|
|
3009
|
+
"data-asset": "schemas/privacy/data-asset.schema.json",
|
|
3010
|
+
"privacy-ropa": "schemas/privacy/privacy-ropa.schema.json",
|
|
3011
|
+
"privacy-requirement": "schemas/privacy/privacy-req.schema.json",
|
|
3012
|
+
"privacy-policy": "schemas/privacy/privacy-policy.schema.json",
|
|
2892
3013
|
// Architecture
|
|
2893
3014
|
"architecture-introduction": "schemas/architecture/introduction-and-goals.schema.json",
|
|
2894
3015
|
"architecture-decision-record": "schemas/architecture/adr.schema.json",
|
|
@@ -2931,6 +3052,11 @@ var PREFIX_TAXONOMY = [
|
|
|
2931
3052
|
["ABUSE-", "abuse-case"],
|
|
2932
3053
|
["SEC-ENC-", "security-enclave"],
|
|
2933
3054
|
["SEC-REQ-", "security-requirement"],
|
|
3055
|
+
["DATA-ASSET-", "data-asset"],
|
|
3056
|
+
["PRIV-ROPA-", "privacy-ropa"],
|
|
3057
|
+
["PRIV-REQ-", "privacy-requirement"],
|
|
3058
|
+
["PRIV-POL-", "privacy-policy"],
|
|
3059
|
+
["POL-PRIV-", "privacy-policy"],
|
|
2934
3060
|
["HAZ-", "hazard"],
|
|
2935
3061
|
["SAF-REQ-", "safety-requirement"],
|
|
2936
3062
|
["SAF-", "safety-requirement"],
|
|
@@ -3836,11 +3962,28 @@ function createGreenfieldRequirement(rootDir, name, padNum, canonicalId, author,
|
|
|
3836
3962
|
const digest = computeCanonicalSha256(reqContent);
|
|
3837
3963
|
return { reqId, ucId, reqFilePath, digest };
|
|
3838
3964
|
}
|
|
3965
|
+
function resolveMissingDraftDestination(rootDir, id) {
|
|
3966
|
+
if (id.startsWith("PRIV-REQ-")) {
|
|
3967
|
+
return { dir: path4.join(rootDir, "specs", "privacy", "requirements"), type: "privacy-requirement" };
|
|
3968
|
+
}
|
|
3969
|
+
if (id.startsWith("DATA-ASSET-")) {
|
|
3970
|
+
return { dir: path4.join(rootDir, "specs", "privacy", "assets"), type: "data-asset" };
|
|
3971
|
+
}
|
|
3972
|
+
if (id.startsWith("PRIV-ROPA-")) {
|
|
3973
|
+
return { dir: path4.join(rootDir, "specs", "privacy", "ropa"), type: "privacy-ropa" };
|
|
3974
|
+
}
|
|
3975
|
+
if (id.startsWith("UC-")) {
|
|
3976
|
+
return { dir: path4.join(rootDir, "specs", "product"), type: "use-case" };
|
|
3977
|
+
}
|
|
3978
|
+
if (id.startsWith("SEC-REQ-") || id.startsWith("SAF-REQ-")) {
|
|
3979
|
+
return { dir: path4.join(rootDir, "specs", "product"), type: "security-requirement" };
|
|
3980
|
+
}
|
|
3981
|
+
return { dir: path4.join(rootDir, "specs", "product"), type: "requirement" };
|
|
3982
|
+
}
|
|
3839
3983
|
function createMissingDraftRequirement(rootDir, name, id, canonicalId, createdFiles) {
|
|
3840
|
-
const
|
|
3841
|
-
if (!fs7.existsSync(
|
|
3842
|
-
const reqFilePath = path4.join(
|
|
3843
|
-
const reqType = id.startsWith("UC-") ? "use-case" : id.startsWith("SEC-REQ-") ? "security-requirement" : "requirement";
|
|
3984
|
+
const { dir, type: reqType } = resolveMissingDraftDestination(rootDir, id);
|
|
3985
|
+
if (!fs7.existsSync(dir)) fs7.mkdirSync(dir, { recursive: true });
|
|
3986
|
+
const reqFilePath = path4.join(dir, `${id}.md`);
|
|
3844
3987
|
const header = MISSING_DRAFT_HEADER.replaceAll("{{ID}}", id).replaceAll("{{TYPE}}", reqType).replaceAll("{{NAME}}", name);
|
|
3845
3988
|
const body = MISSING_DRAFT_BODY.replaceAll("{{ID}}", id).replaceAll("{{NAME}}", name).replaceAll("{{CANONICAL_ID}}", canonicalId);
|
|
3846
3989
|
const reqContent = `${header}
|
|
@@ -3870,13 +4013,30 @@ function discoverDerivedRequirements(id, artifactMap, subRequirements, citedArti
|
|
|
3870
4013
|
function appendUnique(list, item) {
|
|
3871
4014
|
if (!list.includes(item)) list.push(item);
|
|
3872
4015
|
}
|
|
3873
|
-
function
|
|
4016
|
+
function recordCitedArtifact(existing, col) {
|
|
3874
4017
|
col.citedArtifacts.push({
|
|
3875
4018
|
id: existing.id,
|
|
3876
4019
|
digest: `sha256:${existing.digest}`,
|
|
3877
4020
|
title: existing.title,
|
|
3878
4021
|
comment: `Citaci\xF3n de ${existing.frontmatter.type || "artefacto"} (${existing.title || existing.id})`
|
|
3879
4022
|
});
|
|
4023
|
+
}
|
|
4024
|
+
function classifyPrivacyCitation(id, col) {
|
|
4025
|
+
if (id.startsWith("PRIV-REQ-")) {
|
|
4026
|
+
appendUnique(col.subPrivReqs, id);
|
|
4027
|
+
return true;
|
|
4028
|
+
}
|
|
4029
|
+
if (id.startsWith("DATA-ASSET-")) {
|
|
4030
|
+
appendUnique(col.subDataAssets, id);
|
|
4031
|
+
return true;
|
|
4032
|
+
}
|
|
4033
|
+
if (id.startsWith("PRIV-ROPA-")) {
|
|
4034
|
+
appendUnique(col.subRopa, id);
|
|
4035
|
+
return true;
|
|
4036
|
+
}
|
|
4037
|
+
return false;
|
|
4038
|
+
}
|
|
4039
|
+
function classifyProductCitation(id, artifactMap, col) {
|
|
3880
4040
|
if (/^(FR|QR|CON)-/.test(id)) {
|
|
3881
4041
|
appendUnique(col.subRequirements, id);
|
|
3882
4042
|
} else if (id.startsWith("UC-")) {
|
|
@@ -3888,9 +4048,18 @@ function classifyExistingCitation(id, existing, artifactMap, col) {
|
|
|
3888
4048
|
appendUnique(col.subRules, id);
|
|
3889
4049
|
}
|
|
3890
4050
|
}
|
|
4051
|
+
function classifyExistingCitation(id, existing, artifactMap, col) {
|
|
4052
|
+
recordCitedArtifact(existing, col);
|
|
4053
|
+
if (!classifyPrivacyCitation(id, col)) {
|
|
4054
|
+
classifyProductCitation(id, artifactMap, col);
|
|
4055
|
+
}
|
|
4056
|
+
}
|
|
3891
4057
|
function routeMissingCitationId(id, col) {
|
|
3892
4058
|
if (id.startsWith("UC-")) col.subUseCases.push(id);
|
|
3893
4059
|
else if (id.startsWith("SEC-REQ-")) col.subSecReqs.push(id);
|
|
4060
|
+
else if (id.startsWith("PRIV-REQ-")) col.subPrivReqs.push(id);
|
|
4061
|
+
else if (id.startsWith("DATA-ASSET-")) col.subDataAssets.push(id);
|
|
4062
|
+
else if (id.startsWith("PRIV-ROPA-")) col.subRopa.push(id);
|
|
3894
4063
|
else col.subRequirements.push(id);
|
|
3895
4064
|
}
|
|
3896
4065
|
function collectExplicitCitations(inputFromIds, name, canonicalId, artifactMap, col, rootDir, createdFiles) {
|
|
@@ -3920,16 +4089,31 @@ function collectGreenfieldCitations(rootDir, name, padNum, canonicalId, author,
|
|
|
3920
4089
|
col.subUseCases.push(gf.ucId);
|
|
3921
4090
|
}
|
|
3922
4091
|
}
|
|
4092
|
+
function initEmptyCitations() {
|
|
4093
|
+
return {
|
|
4094
|
+
citedArtifacts: [],
|
|
4095
|
+
subRequirements: [],
|
|
4096
|
+
subUseCases: [],
|
|
4097
|
+
subSecReqs: [],
|
|
4098
|
+
subRules: [],
|
|
4099
|
+
subPrivReqs: [],
|
|
4100
|
+
subDataAssets: [],
|
|
4101
|
+
subRopa: []
|
|
4102
|
+
};
|
|
4103
|
+
}
|
|
4104
|
+
function ensureFallbackRequirement(col, padNum, name) {
|
|
4105
|
+
if (col.subRequirements.length === 0) {
|
|
4106
|
+
col.subRequirements.push(`FR-${padNum}-${slugify(name).toUpperCase()}-001`);
|
|
4107
|
+
}
|
|
4108
|
+
}
|
|
3923
4109
|
function collectChangeCitations(rootDir, name, padNum, canonicalId, author, dateStr, inputFromIds, artifactMap, createdFiles) {
|
|
3924
|
-
const col =
|
|
4110
|
+
const col = initEmptyCitations();
|
|
3925
4111
|
if (inputFromIds.length === 0) {
|
|
3926
4112
|
collectGreenfieldCitations(rootDir, name, padNum, canonicalId, author, dateStr, createdFiles, col);
|
|
3927
4113
|
} else {
|
|
3928
4114
|
collectExplicitCitations(inputFromIds, name, canonicalId, artifactMap, col, rootDir, createdFiles);
|
|
3929
4115
|
}
|
|
3930
|
-
|
|
3931
|
-
col.subRequirements.push(`FR-${padNum}-${slugify(name).toUpperCase()}-001`);
|
|
3932
|
-
}
|
|
4116
|
+
ensureFallbackRequirement(col, padNum, name);
|
|
3933
4117
|
return col;
|
|
3934
4118
|
}
|
|
3935
4119
|
function renderProposalFile(changeDir, canonicalId, name, author, citationsYamlBlock) {
|
|
@@ -4043,6 +4227,9 @@ function buildHandoffSubgraph(citations) {
|
|
|
4043
4227
|
if (citations.subUseCases.length > 0) subgraph.useCases = citations.subUseCases;
|
|
4044
4228
|
if (citations.subSecReqs.length > 0) subgraph.securityRequirements = citations.subSecReqs;
|
|
4045
4229
|
if (citations.subRules.length > 0) subgraph.businessRules = citations.subRules;
|
|
4230
|
+
if (citations.subPrivReqs.length > 0) subgraph.privacyRequirements = citations.subPrivReqs;
|
|
4231
|
+
if (citations.subDataAssets.length > 0) subgraph.dataAssets = citations.subDataAssets;
|
|
4232
|
+
if (citations.subRopa.length > 0) subgraph.privacyRopa = citations.subRopa;
|
|
4046
4233
|
return subgraph;
|
|
4047
4234
|
}
|
|
4048
4235
|
function buildHandoffPayload(canonicalId, name, citations) {
|
|
@@ -4088,7 +4275,7 @@ function buildScaffoldFailure(profile, error, slug = "", canonicalId = "", chang
|
|
|
4088
4275
|
}
|
|
4089
4276
|
function renderAndCollectArtifactFiles(changeDir, canonicalId, name, author, dateStr, profile, citations, createdFiles) {
|
|
4090
4277
|
const citationsBlock = renderCitationsYamlBlock(citations.citedArtifacts);
|
|
4091
|
-
const reqIds = [...citations.subRequirements, ...citations.subSecReqs];
|
|
4278
|
+
const reqIds = [...citations.subRequirements, ...citations.subSecReqs, ...citations.subPrivReqs];
|
|
4092
4279
|
createdFiles.push(renderProposalFile(changeDir, canonicalId, name, author, citationsBlock));
|
|
4093
4280
|
const { specPath, specFmObj } = renderSpecFile(changeDir, canonicalId, name, profile);
|
|
4094
4281
|
createdFiles.push(specPath);
|
|
@@ -4541,28 +4728,28 @@ function buildHandoffList(rootDir, artifactMap) {
|
|
|
4541
4728
|
}
|
|
4542
4729
|
return handoffList;
|
|
4543
4730
|
}
|
|
4731
|
+
function indexSubgraphIds(ids, hof, map) {
|
|
4732
|
+
if (!Array.isArray(ids)) return;
|
|
4733
|
+
for (const reqId of ids) {
|
|
4734
|
+
map.set(reqId, hof);
|
|
4735
|
+
}
|
|
4736
|
+
}
|
|
4544
4737
|
function indexRequirementsToHandoff(handoffList) {
|
|
4545
4738
|
const reqToHandoffMap = /* @__PURE__ */ new Map();
|
|
4546
4739
|
for (const hof of handoffList) {
|
|
4547
|
-
if (hof.subgraph
|
|
4548
|
-
|
|
4549
|
-
|
|
4550
|
-
|
|
4551
|
-
}
|
|
4552
|
-
if (hof.subgraph && Array.isArray(hof.subgraph.securityRequirements)) {
|
|
4553
|
-
for (const reqId of hof.subgraph.securityRequirements) {
|
|
4554
|
-
reqToHandoffMap.set(reqId, hof);
|
|
4555
|
-
}
|
|
4556
|
-
}
|
|
4740
|
+
if (!hof.subgraph) continue;
|
|
4741
|
+
indexSubgraphIds(hof.subgraph.requirements, hof, reqToHandoffMap);
|
|
4742
|
+
indexSubgraphIds(hof.subgraph.securityRequirements, hof, reqToHandoffMap);
|
|
4743
|
+
indexSubgraphIds(hof.subgraph.privacyRequirements, hof, reqToHandoffMap);
|
|
4557
4744
|
}
|
|
4558
4745
|
return reqToHandoffMap;
|
|
4559
4746
|
}
|
|
4560
|
-
var TARGET_REQ_PREFIXES = ["FR-", "QR-", "SEC-REQ-", "CON-"];
|
|
4747
|
+
var TARGET_REQ_PREFIXES = ["FR-", "QR-", "SEC-REQ-", "CON-", "PRIV-REQ-"];
|
|
4561
4748
|
function isRequirementToVerify(data, id) {
|
|
4562
4749
|
if (data.file.includes("templates/") || data.file.includes(".template.") || data.file.includes("process/")) {
|
|
4563
4750
|
return false;
|
|
4564
4751
|
}
|
|
4565
|
-
if (data.type === "requirement" || data.type === "security-requirement") {
|
|
4752
|
+
if (data.type === "requirement" || data.type === "security-requirement" || data.type === "privacy-requirement") {
|
|
4566
4753
|
return true;
|
|
4567
4754
|
}
|
|
4568
4755
|
return TARGET_REQ_PREFIXES.some((prefix) => id.startsWith(prefix));
|
|
@@ -4600,6 +4787,8 @@ function collectHandoffSubgraphTraces(subgraph) {
|
|
|
4600
4787
|
if (subgraph.useCases) traces.push(...subgraph.useCases);
|
|
4601
4788
|
if (subgraph.businessRules) traces.push(...subgraph.businessRules);
|
|
4602
4789
|
if (subgraph.abuseCases) traces.push(...subgraph.abuseCases);
|
|
4790
|
+
if (subgraph.privacyRopa) traces.push(...subgraph.privacyRopa);
|
|
4791
|
+
if (subgraph.dataAssets) traces.push(...subgraph.dataAssets);
|
|
4603
4792
|
return traces;
|
|
4604
4793
|
}
|
|
4605
4794
|
function collectArchIntroTraces(reqId, artifactMap) {
|
|
@@ -4618,6 +4807,8 @@ function resolveProductTraces(fm, reqId, associatedHandoff, artifactMap) {
|
|
|
4618
4807
|
const traces = [
|
|
4619
4808
|
...extractArrayOrSingle(fm["derives-from"]),
|
|
4620
4809
|
...extractArrayOrSingle(fm["mitigates-abuse-case"]),
|
|
4810
|
+
...extractArrayOrSingle(fm["governs-ropa"]),
|
|
4811
|
+
...extractArrayOrSingle(fm["protects-data-assets"]),
|
|
4621
4812
|
...collectHandoffSubgraphTraces(associatedHandoff?.subgraph),
|
|
4622
4813
|
...collectArchIntroTraces(reqId, artifactMap)
|
|
4623
4814
|
];
|
|
@@ -5054,7 +5245,8 @@ function extractHandoffExpectedScope(changeDir, maxUc = 1, violations) {
|
|
|
5054
5245
|
}
|
|
5055
5246
|
const reqs = handoff.subgraph.requirements || [];
|
|
5056
5247
|
const secReqs = handoff.subgraph.securityRequirements || [];
|
|
5057
|
-
|
|
5248
|
+
const privReqs = handoff.subgraph.privacyRequirements || [];
|
|
5249
|
+
return [...reqs, ...secReqs, ...privReqs];
|
|
5058
5250
|
}
|
|
5059
5251
|
function collectTaskCoveredScope(tasks) {
|
|
5060
5252
|
const covered = /* @__PURE__ */ new Set();
|
|
@@ -7417,6 +7609,503 @@ function detectPromptInjection(content) {
|
|
|
7417
7609
|
checkMultilinePromptInjection(content, findings);
|
|
7418
7610
|
return findings;
|
|
7419
7611
|
}
|
|
7612
|
+
var DEFAULT_PRIVACY_POLICY = {
|
|
7613
|
+
version: "1.0",
|
|
7614
|
+
project: "AI-SDLC Standard Organization",
|
|
7615
|
+
regulatory_frameworks: ["GDPR", "LOPDGDD", "ISO-27701"],
|
|
7616
|
+
default_action: "DENY_UNREGISTERED_PII",
|
|
7617
|
+
classifications: {
|
|
7618
|
+
public: {
|
|
7619
|
+
action: "ALLOW",
|
|
7620
|
+
encryption_at_rest: false,
|
|
7621
|
+
encryption_in_transit: true,
|
|
7622
|
+
allow_in_logs: true,
|
|
7623
|
+
allow_in_ai_prompts: true
|
|
7624
|
+
},
|
|
7625
|
+
internal: {
|
|
7626
|
+
action: "ALLOW",
|
|
7627
|
+
encryption_at_rest: true,
|
|
7628
|
+
encryption_in_transit: true,
|
|
7629
|
+
allow_in_logs: true,
|
|
7630
|
+
allow_in_ai_prompts: true
|
|
7631
|
+
},
|
|
7632
|
+
confidential_pii: {
|
|
7633
|
+
action: "STRICT_GOVERNANCE",
|
|
7634
|
+
require_ropa_entry: true,
|
|
7635
|
+
encryption_at_rest: true,
|
|
7636
|
+
encryption_in_transit: true,
|
|
7637
|
+
allow_in_logs: false,
|
|
7638
|
+
log_masking_strategy: "REDACT_OR_SHA256_SALT",
|
|
7639
|
+
allow_in_ai_prompts: false,
|
|
7640
|
+
max_retention_days: 365,
|
|
7641
|
+
require_right_to_erasure: true
|
|
7642
|
+
},
|
|
7643
|
+
special_category_sensitive: {
|
|
7644
|
+
action: "DPIA_APPROVAL_REQUIRED",
|
|
7645
|
+
require_ropa_entry: true,
|
|
7646
|
+
require_dpia_artifact: true,
|
|
7647
|
+
encryption_at_rest: true,
|
|
7648
|
+
encryption_in_transit: true,
|
|
7649
|
+
require_field_level_encryption: true,
|
|
7650
|
+
allow_in_logs: false,
|
|
7651
|
+
allow_in_ai_prompts: false
|
|
7652
|
+
}
|
|
7653
|
+
},
|
|
7654
|
+
cross_border_transfers: {
|
|
7655
|
+
allowed_regions: ["EU-EEA", "ADEQUACY_DECISION"],
|
|
7656
|
+
require_scc_for_third_countries: true,
|
|
7657
|
+
approved_subprocessors: []
|
|
7658
|
+
},
|
|
7659
|
+
agent_guardrails: {
|
|
7660
|
+
forbid_real_pii_in_tests: true,
|
|
7661
|
+
forbid_pii_in_console_or_logger: true,
|
|
7662
|
+
require_dto_projection_for_pii: true
|
|
7663
|
+
},
|
|
7664
|
+
ci_gates: {
|
|
7665
|
+
fail_on_unregistered_pii: true,
|
|
7666
|
+
fail_on_pii_in_logs: true,
|
|
7667
|
+
fail_on_missing_retention_policy: true,
|
|
7668
|
+
fail_on_unapproved_subprocessor: true,
|
|
7669
|
+
generate_ropa_inventory: true,
|
|
7670
|
+
output_ropa_file: "reports/ROPA_INVENTORY.md",
|
|
7671
|
+
output_privacy_report: "reports/PRIVACY_SCAN_REPORT.md"
|
|
7672
|
+
}
|
|
7673
|
+
};
|
|
7674
|
+
var PII_SAST_RULES = [
|
|
7675
|
+
{
|
|
7676
|
+
id: "PRIV-001-PII-IN-LOGS",
|
|
7677
|
+
type: "PII_IN_LOGS",
|
|
7678
|
+
severity: "HIGH",
|
|
7679
|
+
description: "Direct exposure of unmasked PII or sensitive fields in logger or console output (GDPR Art. 25 / Art. 32)",
|
|
7680
|
+
pattern: /(?:console\.(?:log|info|warn|error|debug)|logger\.(?:info|warn|error|debug|trace)|log\.(?:info|warn|error|debug))\s*\([^)]*\b(?:user\.(?:email|phone|ssn|dni|nif|password|creditCard|biometric)|req\.body\.(?:email|phone|ssn|dni|nif|password|creditCard)|rawPii|patientRecord|creditCardNumber|socialSecurityNumber)\b/i
|
|
7681
|
+
},
|
|
7682
|
+
{
|
|
7683
|
+
id: "PRIV-002-PII-IN-LLM-PROMPT",
|
|
7684
|
+
type: "PII_IN_LLM_PROMPT",
|
|
7685
|
+
severity: "CRITICAL",
|
|
7686
|
+
description: "Unmasked personal or special-category data interpolated into external AI/LLM prompt payload",
|
|
7687
|
+
pattern: /(?:(?:prompt|userPrompt|systemPrompt|llmPrompt)\s*(?::=|\+=|=)|(?:generateContent|chat\.completions\.create)\s*\()[^;\n]*\$\{[^}]*\b(?:user\.(?:email|phone|ssn|dni|nif|biometric)|patient\.(?:diagnosis|health|medicalRecord)|rawPii|creditCard)\b[^}]*\}/i
|
|
7688
|
+
},
|
|
7689
|
+
{
|
|
7690
|
+
id: "PRIV-004-HARDCODED-REAL-PII",
|
|
7691
|
+
type: "HARDCODED_PII_IN_CODE",
|
|
7692
|
+
severity: "HIGH",
|
|
7693
|
+
description: "Hardcoded real-world personal identifier (SSN / National ID / Credit Card) detected in source or test file",
|
|
7694
|
+
pattern: /\b(?:ssn|dni|nif|tax_?id|national_?id)\s*[:=]\s*['"](?:\d{3}-\d{2}-\d{4}|\d{8}[A-HJ-NP-TV-Z])['"]/i
|
|
7695
|
+
}
|
|
7696
|
+
];
|
|
7697
|
+
function loadPrivacyPolicy(rootDir, policyPath) {
|
|
7698
|
+
const candidate = policyPath ? path4.isAbsolute(policyPath) ? policyPath : path4.join(rootDir, policyPath) : path4.join(rootDir, "privacy-policy.yaml");
|
|
7699
|
+
if (!fs7.existsSync(candidate)) return DEFAULT_PRIVACY_POLICY;
|
|
7700
|
+
try {
|
|
7701
|
+
const parsed = yaml3.load(fs7.readFileSync(candidate, "utf-8"));
|
|
7702
|
+
if (!parsed || typeof parsed !== "object") return DEFAULT_PRIVACY_POLICY;
|
|
7703
|
+
return {
|
|
7704
|
+
...DEFAULT_PRIVACY_POLICY,
|
|
7705
|
+
...parsed,
|
|
7706
|
+
classifications: { ...DEFAULT_PRIVACY_POLICY.classifications, ...parsed.classifications || {} },
|
|
7707
|
+
agent_guardrails: { ...DEFAULT_PRIVACY_POLICY.agent_guardrails, ...parsed.agent_guardrails || {} },
|
|
7708
|
+
ci_gates: { ...DEFAULT_PRIVACY_POLICY.ci_gates, ...parsed.ci_gates || {} }
|
|
7709
|
+
};
|
|
7710
|
+
} catch {
|
|
7711
|
+
return DEFAULT_PRIVACY_POLICY;
|
|
7712
|
+
}
|
|
7713
|
+
}
|
|
7714
|
+
function isLineExemptFromPrivacyScan(line) {
|
|
7715
|
+
return line.includes("ai-sdlc:allow-pii") || line.includes("ai-sdlc:allow-sast") || line.includes("nosec");
|
|
7716
|
+
}
|
|
7717
|
+
function shouldApplyPiiRule(rule, policy) {
|
|
7718
|
+
if (rule.type === "PII_IN_LOGS" && !policy.ci_gates.fail_on_pii_in_logs) {
|
|
7719
|
+
return false;
|
|
7720
|
+
}
|
|
7721
|
+
if (rule.type === "HARDCODED_PII_IN_CODE" && !policy.agent_guardrails.forbid_real_pii_in_tests) {
|
|
7722
|
+
return false;
|
|
7723
|
+
}
|
|
7724
|
+
return true;
|
|
7725
|
+
}
|
|
7726
|
+
function scanFileForPrivacyViolations(filePath, rootDir, policy = DEFAULT_PRIVACY_POLICY) {
|
|
7727
|
+
const violations = [];
|
|
7728
|
+
try {
|
|
7729
|
+
const content = fs7.readFileSync(filePath, "utf-8");
|
|
7730
|
+
const lines = content.split(/\r?\n/);
|
|
7731
|
+
const relPath = path4.relative(rootDir, filePath).replace(/\\/g, "/");
|
|
7732
|
+
for (let i = 0; i < lines.length; i++) {
|
|
7733
|
+
const line = lines[i];
|
|
7734
|
+
if (isLineExemptFromPrivacyScan(line)) continue;
|
|
7735
|
+
for (const rule of PII_SAST_RULES) {
|
|
7736
|
+
if (!shouldApplyPiiRule(rule, policy)) continue;
|
|
7737
|
+
rule.pattern.lastIndex = 0;
|
|
7738
|
+
if (rule.pattern.test(line)) {
|
|
7739
|
+
violations.push({
|
|
7740
|
+
ruleId: rule.id,
|
|
7741
|
+
type: rule.type,
|
|
7742
|
+
severity: rule.severity,
|
|
7743
|
+
filePath,
|
|
7744
|
+
relPath,
|
|
7745
|
+
lineNumber: i + 1,
|
|
7746
|
+
snippet: line.trim(),
|
|
7747
|
+
message: rule.description
|
|
7748
|
+
});
|
|
7749
|
+
}
|
|
7750
|
+
}
|
|
7751
|
+
}
|
|
7752
|
+
} catch {
|
|
7753
|
+
}
|
|
7754
|
+
return violations;
|
|
7755
|
+
}
|
|
7756
|
+
var EXCLUDED_ARTIFACT_PREFIXES = [
|
|
7757
|
+
"templates/",
|
|
7758
|
+
"node_modules/",
|
|
7759
|
+
"dist/",
|
|
7760
|
+
".git/",
|
|
7761
|
+
"reports/",
|
|
7762
|
+
".agent/",
|
|
7763
|
+
".agents/",
|
|
7764
|
+
".claude/",
|
|
7765
|
+
".cursor/",
|
|
7766
|
+
".github/",
|
|
7767
|
+
"process/"
|
|
7768
|
+
];
|
|
7769
|
+
function isExcludedPrivacyMd(relPath) {
|
|
7770
|
+
return EXCLUDED_ARTIFACT_PREFIXES.some((prefix) => relPath.startsWith(prefix));
|
|
7771
|
+
}
|
|
7772
|
+
function toStringArray2(val) {
|
|
7773
|
+
if (Array.isArray(val)) return val.map((v) => String(v));
|
|
7774
|
+
if (typeof val === "string" && val.trim().length > 0) return [val.trim()];
|
|
7775
|
+
return [];
|
|
7776
|
+
}
|
|
7777
|
+
function parseDataAsset(fm, relPath) {
|
|
7778
|
+
return {
|
|
7779
|
+
id: String(fm.id || ""),
|
|
7780
|
+
title: String(fm.title || ""),
|
|
7781
|
+
classification: String(fm.classification || "internal"),
|
|
7782
|
+
piiCategories: toStringArray2(fm["pii-categories"]),
|
|
7783
|
+
dataSubjects: toStringArray2(fm["data-subjects"]),
|
|
7784
|
+
retentionPeriod: String(fm["retention-period"] || ""),
|
|
7785
|
+
erasureMethod: String(fm["erasure-method"] || ""),
|
|
7786
|
+
filePath: relPath
|
|
7787
|
+
};
|
|
7788
|
+
}
|
|
7789
|
+
function parseRopaRecord(fm, relPath) {
|
|
7790
|
+
return {
|
|
7791
|
+
id: String(fm.id || ""),
|
|
7792
|
+
title: String(fm.title || ""),
|
|
7793
|
+
lawfulBasis: String(fm["lawful-basis"] || ""),
|
|
7794
|
+
processingPurpose: String(fm["processing-purpose"] || ""),
|
|
7795
|
+
useCases: toStringArray2(fm["use-cases"]),
|
|
7796
|
+
dataAssets: toStringArray2(fm["data-assets"]),
|
|
7797
|
+
dataSubjects: toStringArray2(fm["data-subjects"]),
|
|
7798
|
+
retentionTtl: String(fm["retention-ttl"] || ""),
|
|
7799
|
+
crossBorderTransfer: Boolean(fm["cross-border-transfer"]),
|
|
7800
|
+
subprocessors: toStringArray2(fm.subprocessors),
|
|
7801
|
+
dpiaRequired: Boolean(fm["dpia-required"]),
|
|
7802
|
+
dpiaReference: typeof fm["dpia-reference"] === "string" ? fm["dpia-reference"] : null,
|
|
7803
|
+
mitigatedBy: toStringArray2(fm["mitigated-by"]),
|
|
7804
|
+
filePath: relPath
|
|
7805
|
+
};
|
|
7806
|
+
}
|
|
7807
|
+
function isDataAssetArtifact(type, id) {
|
|
7808
|
+
return type === "data-asset" || id.startsWith("DATA-ASSET-");
|
|
7809
|
+
}
|
|
7810
|
+
function isRopaArtifact(type, id) {
|
|
7811
|
+
return type === "privacy-ropa" || id.startsWith("PRIV-ROPA-");
|
|
7812
|
+
}
|
|
7813
|
+
function isPrivacyReqArtifact(type, id) {
|
|
7814
|
+
return type === "privacy-requirement" || id.startsWith("PRIV-REQ-");
|
|
7815
|
+
}
|
|
7816
|
+
function isDpiaArtifact(type, id) {
|
|
7817
|
+
return type === "dpia-request" || id.startsWith("DPIA-");
|
|
7818
|
+
}
|
|
7819
|
+
function classifyPrivacyMarkdown(fm, relPath, acc) {
|
|
7820
|
+
const id = String(fm.id || "");
|
|
7821
|
+
const type = String(fm.type || "");
|
|
7822
|
+
if (isDataAssetArtifact(type, id)) {
|
|
7823
|
+
acc.dataAssets.push(parseDataAsset(fm, relPath));
|
|
7824
|
+
} else if (isRopaArtifact(type, id)) {
|
|
7825
|
+
acc.ropaRecords.push(parseRopaRecord(fm, relPath));
|
|
7826
|
+
} else if (isPrivacyReqArtifact(type, id)) {
|
|
7827
|
+
acc.privacyReqs.push({ id, governsRopa: toStringArray2(fm["governs-ropa"]), filePath: relPath });
|
|
7828
|
+
} else if (isDpiaArtifact(type, id)) {
|
|
7829
|
+
acc.dpiaStatuses.set(id, String(fm.status || "draft"));
|
|
7830
|
+
}
|
|
7831
|
+
}
|
|
7832
|
+
function discoverPrivacyArtifacts(rootDir) {
|
|
7833
|
+
const acc = {
|
|
7834
|
+
dataAssets: [],
|
|
7835
|
+
ropaRecords: [],
|
|
7836
|
+
privacyReqs: [],
|
|
7837
|
+
dpiaStatuses: /* @__PURE__ */ new Map()
|
|
7838
|
+
};
|
|
7839
|
+
for (const file of walkMdFiles(rootDir)) {
|
|
7840
|
+
const relPath = path4.relative(rootDir, file).replace(/\\/g, "/");
|
|
7841
|
+
if (isExcludedPrivacyMd(relPath)) continue;
|
|
7842
|
+
try {
|
|
7843
|
+
const fm = extractFrontmatter(fs7.readFileSync(file, "utf-8"));
|
|
7844
|
+
if (fm && fm.id) classifyPrivacyMarkdown(fm, relPath, acc);
|
|
7845
|
+
} catch {
|
|
7846
|
+
}
|
|
7847
|
+
}
|
|
7848
|
+
return acc;
|
|
7849
|
+
}
|
|
7850
|
+
var SENSITIVE_CLASSIFICATIONS = /* @__PURE__ */ new Set([
|
|
7851
|
+
"confidential-pii",
|
|
7852
|
+
"confidential_pii",
|
|
7853
|
+
"special-category-sensitive",
|
|
7854
|
+
"special_category_sensitive"
|
|
7855
|
+
]);
|
|
7856
|
+
function isSensitiveClassification(classification) {
|
|
7857
|
+
return SENSITIVE_CLASSIFICATIONS.has(classification);
|
|
7858
|
+
}
|
|
7859
|
+
function createViolation(ruleId, type, severity, fullPath, relPath, message) {
|
|
7860
|
+
return { ruleId, type, severity, filePath: fullPath, relPath, message };
|
|
7861
|
+
}
|
|
7862
|
+
function checkAssetRetention(asset, policy, fullPath) {
|
|
7863
|
+
if (!policy.ci_gates.fail_on_missing_retention_policy) return null;
|
|
7864
|
+
if (asset.retentionPeriod && asset.erasureMethod) return null;
|
|
7865
|
+
return createViolation(
|
|
7866
|
+
"PRIV-003-MISSING-RETENTION-POLICY",
|
|
7867
|
+
"MISSING_RETENTION_POLICY",
|
|
7868
|
+
"HIGH",
|
|
7869
|
+
fullPath,
|
|
7870
|
+
asset.filePath,
|
|
7871
|
+
`Data asset '${asset.id}' (${asset.classification}) is missing a valid retention-period or erasure-method`
|
|
7872
|
+
);
|
|
7873
|
+
}
|
|
7874
|
+
function checkAssetRopaRegistration(asset, ropaRecords, policy, fullPath) {
|
|
7875
|
+
if (!policy.ci_gates.fail_on_unregistered_pii) return null;
|
|
7876
|
+
if (ropaRecords.some((r) => r.dataAssets.includes(asset.id))) return null;
|
|
7877
|
+
return createViolation(
|
|
7878
|
+
"PRIV-005-UNREGISTERED-ROPA",
|
|
7879
|
+
"UNREGISTERED_ROPA",
|
|
7880
|
+
"HIGH",
|
|
7881
|
+
fullPath,
|
|
7882
|
+
asset.filePath,
|
|
7883
|
+
`Personal data asset '${asset.id}' is not registered in any GDPR Art. 30 ROPA artifact (PRIV-ROPA-*)`
|
|
7884
|
+
);
|
|
7885
|
+
}
|
|
7886
|
+
function auditDataAssetGovernance(asset, ropaRecords, policy, rootDir) {
|
|
7887
|
+
if (!isSensitiveClassification(asset.classification)) return [];
|
|
7888
|
+
const fullPath = path4.join(rootDir, asset.filePath);
|
|
7889
|
+
const v1 = checkAssetRetention(asset, policy, fullPath);
|
|
7890
|
+
const v2 = checkAssetRopaRegistration(asset, ropaRecords, policy, fullPath);
|
|
7891
|
+
return [v1, v2].filter((v) => v !== null);
|
|
7892
|
+
}
|
|
7893
|
+
function checkRopaControlLink(ropa, governedRopaIds, fullPath) {
|
|
7894
|
+
if (ropa.mitigatedBy.length > 0 || governedRopaIds.has(ropa.id)) return [];
|
|
7895
|
+
return [
|
|
7896
|
+
createViolation(
|
|
7897
|
+
"PRIV-006-MISSING-PRIVACY-CONTROL",
|
|
7898
|
+
"MISSING_PRIVACY_CONTROL",
|
|
7899
|
+
"HIGH",
|
|
7900
|
+
fullPath,
|
|
7901
|
+
ropa.filePath,
|
|
7902
|
+
`ROPA activity '${ropa.id}' lacks a governing technical privacy control (PRIV-REQ-*)`
|
|
7903
|
+
)
|
|
7904
|
+
];
|
|
7905
|
+
}
|
|
7906
|
+
function checkRopaSubprocessors(ropa, policy, fullPath) {
|
|
7907
|
+
if (!policy.ci_gates.fail_on_unapproved_subprocessor) return [];
|
|
7908
|
+
const approved = new Set(policy.cross_border_transfers?.approved_subprocessors || []);
|
|
7909
|
+
return ropa.subprocessors.filter((sub) => !approved.has(sub)).map(
|
|
7910
|
+
(sub) => createViolation(
|
|
7911
|
+
"PRIV-007-UNAPPROVED-SUBPROCESSOR",
|
|
7912
|
+
"UNAPPROVED_SUBPROCESSOR",
|
|
7913
|
+
"HIGH",
|
|
7914
|
+
fullPath,
|
|
7915
|
+
ropa.filePath,
|
|
7916
|
+
`ROPA activity '${ropa.id}' references unapproved subprocessor '${sub}' not listed in privacy-policy.yaml`
|
|
7917
|
+
)
|
|
7918
|
+
);
|
|
7919
|
+
}
|
|
7920
|
+
function checkRopaControlsAndSubprocessors(ropa, governedRopaIds, policy, fullPath) {
|
|
7921
|
+
return [
|
|
7922
|
+
...checkRopaControlLink(ropa, governedRopaIds, fullPath),
|
|
7923
|
+
...checkRopaSubprocessors(ropa, policy, fullPath)
|
|
7924
|
+
];
|
|
7925
|
+
}
|
|
7926
|
+
function ropaProcessesSpecialCategory(ropa, dataAssets) {
|
|
7927
|
+
return ropa.dataAssets.some((id) => {
|
|
7928
|
+
const found = dataAssets.find((a) => a.id === id);
|
|
7929
|
+
return Boolean(found && found.classification.includes("special"));
|
|
7930
|
+
});
|
|
7931
|
+
}
|
|
7932
|
+
function isDpiaMissingOrUnapproved(dpiaId, dpiaStatuses) {
|
|
7933
|
+
if (!dpiaId) return true;
|
|
7934
|
+
const status = dpiaStatuses.get(dpiaId);
|
|
7935
|
+
return Boolean(status && status !== "approved");
|
|
7936
|
+
}
|
|
7937
|
+
function checkRopaDpiaApproval(ropa, dataAssets, dpiaStatuses, fullPath) {
|
|
7938
|
+
const requiresDpia = ropa.dpiaRequired || ropaProcessesSpecialCategory(ropa, dataAssets);
|
|
7939
|
+
if (!requiresDpia) return { violations: [], dpiaRequired: false };
|
|
7940
|
+
if (!isDpiaMissingOrUnapproved(ropa.dpiaReference, dpiaStatuses)) {
|
|
7941
|
+
return { violations: [], dpiaRequired: true };
|
|
7942
|
+
}
|
|
7943
|
+
return {
|
|
7944
|
+
dpiaRequired: true,
|
|
7945
|
+
violations: [
|
|
7946
|
+
createViolation(
|
|
7947
|
+
"PRIV-008-DPIA-APPROVAL-REQUIRED",
|
|
7948
|
+
"DPIA_APPROVAL_REQUIRED",
|
|
7949
|
+
"CRITICAL",
|
|
7950
|
+
fullPath,
|
|
7951
|
+
ropa.filePath,
|
|
7952
|
+
`ROPA activity '${ropa.id}' processes special-category/high-risk data and requires an approved DPIA-* signed by the DPO`
|
|
7953
|
+
)
|
|
7954
|
+
]
|
|
7955
|
+
};
|
|
7956
|
+
}
|
|
7957
|
+
function collectSourceFilesForPrivacy(rootDir, targetDirs) {
|
|
7958
|
+
const files = [];
|
|
7959
|
+
for (const dir of targetDirs) {
|
|
7960
|
+
const fullDir = path4.join(rootDir, dir);
|
|
7961
|
+
if (fs7.existsSync(fullDir)) {
|
|
7962
|
+
files.push(...walkSourceFiles(fullDir, rootDir));
|
|
7963
|
+
}
|
|
7964
|
+
}
|
|
7965
|
+
return files;
|
|
7966
|
+
}
|
|
7967
|
+
function formatRopaTableRow(r) {
|
|
7968
|
+
const ucs = r.useCases.join(", ") || "\u2014";
|
|
7969
|
+
const assets = r.dataAssets.join(", ") || "\u2014";
|
|
7970
|
+
const controls = r.mitigatedBy.join(", ") || "\u2014";
|
|
7971
|
+
return `| \`${r.id}\` | ${r.title} | \`${r.lawfulBasis}\` | ${ucs} | ${assets} | \`${r.retentionTtl}\` | ${controls} |`;
|
|
7972
|
+
}
|
|
7973
|
+
function formatAssetTableRow(a) {
|
|
7974
|
+
const cats = a.piiCategories.join(", ");
|
|
7975
|
+
return `| \`${a.id}\` | ${a.title} | \`${a.classification}\` | ${cats} | \`${a.retentionPeriod}\` | \`${a.erasureMethod}\` |`;
|
|
7976
|
+
}
|
|
7977
|
+
function buildRopaSectionLines(ropaRecords) {
|
|
7978
|
+
const rows = ropaRecords.map(formatRopaTableRow);
|
|
7979
|
+
const emptyRopa = `| \u2014 | No processing activities registered | \u2014 | \u2014 | \u2014 | \u2014 | \u2014 |`;
|
|
7980
|
+
return [
|
|
7981
|
+
`## 1. Processing Activities Register (\`PRIV-ROPA-*\`)`,
|
|
7982
|
+
``,
|
|
7983
|
+
`| ROPA ID | Processing Activity | Lawful Basis | Triggering Use Cases | Data Assets | Retention TTL | Privacy Controls |`,
|
|
7984
|
+
`| :--- | :--- | :--- | :--- | :--- | :---: | :--- |`,
|
|
7985
|
+
...rows.length > 0 ? rows : [emptyRopa]
|
|
7986
|
+
];
|
|
7987
|
+
}
|
|
7988
|
+
function buildAssetSectionLines(dataAssets) {
|
|
7989
|
+
const assetRows = dataAssets.map(formatAssetTableRow);
|
|
7990
|
+
const emptyAsset = `| \u2014 | No personal data assets registered | \u2014 | \u2014 | \u2014 | \u2014 |`;
|
|
7991
|
+
return [
|
|
7992
|
+
`## 2. Personal Data Assets Inventory (\`DATA-ASSET-*\`)`,
|
|
7993
|
+
``,
|
|
7994
|
+
`| Asset ID | Title | Classification | PII Categories | Retention | Erasure Method |`,
|
|
7995
|
+
`| :--- | :--- | :--- | :--- | :---: | :--- |`,
|
|
7996
|
+
...assetRows.length > 0 ? assetRows : [emptyAsset]
|
|
7997
|
+
];
|
|
7998
|
+
}
|
|
7999
|
+
function generateRopaInventoryMarkdown(result, policy = DEFAULT_PRIVACY_POLICY) {
|
|
8000
|
+
return [
|
|
8001
|
+
`# \u{1F510} GDPR Art. 30 Record of Processing Activities (ROPA Inventory)`,
|
|
8002
|
+
``,
|
|
8003
|
+
`> **Project:** ${policy.project}`,
|
|
8004
|
+
`> **Regulatory Frameworks:** ${policy.regulatory_frameworks.join(", ")}`,
|
|
8005
|
+
`> **Total Data Assets:** ${result.dataAssetsCount} | **Active ROPA Entries:** ${result.ropaRecordsCount} | **Privacy Controls:** ${result.privacyRequirementsCount}`,
|
|
8006
|
+
``,
|
|
8007
|
+
...buildRopaSectionLines(result.ropaRecords),
|
|
8008
|
+
``,
|
|
8009
|
+
...buildAssetSectionLines(result.dataAssets),
|
|
8010
|
+
``
|
|
8011
|
+
].join("\n");
|
|
8012
|
+
}
|
|
8013
|
+
function formatViolationRow(v) {
|
|
8014
|
+
const loc = v.lineNumber ? `${v.relPath}:${v.lineNumber}` : v.relPath;
|
|
8015
|
+
return `| **${v.severity}** | \`${v.ruleId}\` | \`${v.type}\` | \`${loc}\` | ${v.message} |`;
|
|
8016
|
+
}
|
|
8017
|
+
function buildReportFindingsSection(violations) {
|
|
8018
|
+
if (violations.length === 0) {
|
|
8019
|
+
return [
|
|
8020
|
+
`## Compliance Summary`,
|
|
8021
|
+
``,
|
|
8022
|
+
`Zero unmasked PII leaks in logs or AI prompts, zero hardcoded personal identifiers, and 100% of declared personal data assets comply with GDPR Art. 25 & Art. 30 governance.`
|
|
8023
|
+
];
|
|
8024
|
+
}
|
|
8025
|
+
return [
|
|
8026
|
+
`## Detected Privacy & Data Protection Findings`,
|
|
8027
|
+
``,
|
|
8028
|
+
`| Severity | Rule | Finding Type | Location | Details |`,
|
|
8029
|
+
`| :---: | :--- | :--- | :--- | :--- |`,
|
|
8030
|
+
...violations.map(formatViolationRow)
|
|
8031
|
+
];
|
|
8032
|
+
}
|
|
8033
|
+
function generatePrivacyReportMarkdown(result, policy = DEFAULT_PRIVACY_POLICY) {
|
|
8034
|
+
const verdict = result.success ? "\u2705 COMPLIANT (Privacy-by-Design as Code verified)" : `\u274C BLOCKED (${result.violationsCount} privacy violations detected)`;
|
|
8035
|
+
return [
|
|
8036
|
+
`# \u{1F6E1}\uFE0F Privacy-by-Design & Data Protection Audit (Gate 12)`,
|
|
8037
|
+
``,
|
|
8038
|
+
`> **Verdict:** ${verdict}`,
|
|
8039
|
+
`> **Regulatory Baseline:** ${policy.regulatory_frameworks.join(", ")}`,
|
|
8040
|
+
`> **Audited Source Files:** ${result.totalFilesScanned} | **Data Assets:** ${result.dataAssetsCount} | **ROPA Records:** ${result.ropaRecordsCount} | **Privacy Reqs:** ${result.privacyRequirementsCount}`,
|
|
8041
|
+
``,
|
|
8042
|
+
`---`,
|
|
8043
|
+
``,
|
|
8044
|
+
...buildReportFindingsSection(result.violations),
|
|
8045
|
+
``
|
|
8046
|
+
].join("\n");
|
|
8047
|
+
}
|
|
8048
|
+
function writePrivacyOutputsIfNeeded(result, options, policy, rootDir) {
|
|
8049
|
+
if (options.generateRopa) {
|
|
8050
|
+
const relRopa = options.ropaOutputPath || policy.ci_gates.output_ropa_file || "reports/ROPA_INVENTORY.md";
|
|
8051
|
+
const fullRopa = path4.isAbsolute(relRopa) ? relRopa : path4.join(rootDir, relRopa);
|
|
8052
|
+
fs7.mkdirSync(path4.dirname(fullRopa), { recursive: true });
|
|
8053
|
+
fs7.writeFileSync(fullRopa, result.ropaMarkdown, "utf-8");
|
|
8054
|
+
result.ropaOutputPath = fullRopa;
|
|
8055
|
+
}
|
|
8056
|
+
if (options.reportOutputPath) {
|
|
8057
|
+
const fullReport = path4.isAbsolute(options.reportOutputPath) ? options.reportOutputPath : path4.join(rootDir, options.reportOutputPath);
|
|
8058
|
+
fs7.mkdirSync(path4.dirname(fullReport), { recursive: true });
|
|
8059
|
+
fs7.writeFileSync(fullReport, result.reportMarkdown, "utf-8");
|
|
8060
|
+
result.reportOutputPath = fullReport;
|
|
8061
|
+
}
|
|
8062
|
+
}
|
|
8063
|
+
function evaluateDiscoveredPrivacyGovernance(discovered, policy, rootDir) {
|
|
8064
|
+
const governedRopaIds = new Set(discovered.privacyReqs.flatMap((r) => r.governsRopa));
|
|
8065
|
+
const violations = [];
|
|
8066
|
+
for (const asset of discovered.dataAssets) {
|
|
8067
|
+
violations.push(...auditDataAssetGovernance(asset, discovered.ropaRecords, policy, rootDir));
|
|
8068
|
+
}
|
|
8069
|
+
let dpiaRequiredCount = 0;
|
|
8070
|
+
for (const ropa of discovered.ropaRecords) {
|
|
8071
|
+
const fullPath = path4.join(rootDir, ropa.filePath);
|
|
8072
|
+
violations.push(...checkRopaControlsAndSubprocessors(ropa, governedRopaIds, policy, fullPath));
|
|
8073
|
+
const dpiaCheck = checkRopaDpiaApproval(ropa, discovered.dataAssets, discovered.dpiaStatuses, fullPath);
|
|
8074
|
+
if (dpiaCheck.dpiaRequired) dpiaRequiredCount++;
|
|
8075
|
+
violations.push(...dpiaCheck.violations);
|
|
8076
|
+
}
|
|
8077
|
+
return { violations, dpiaRequiredCount };
|
|
8078
|
+
}
|
|
8079
|
+
function buildInitialPrivacyResult(totalFilesScanned, discovered, violations, dpiaRequiredCount) {
|
|
8080
|
+
return {
|
|
8081
|
+
success: violations.length === 0,
|
|
8082
|
+
totalFilesScanned,
|
|
8083
|
+
dataAssetsCount: discovered.dataAssets.length,
|
|
8084
|
+
ropaRecordsCount: discovered.ropaRecords.length,
|
|
8085
|
+
privacyRequirementsCount: discovered.privacyReqs.length,
|
|
8086
|
+
violationsCount: violations.length,
|
|
8087
|
+
dpiaRequiredCount,
|
|
8088
|
+
dataAssets: discovered.dataAssets,
|
|
8089
|
+
ropaRecords: discovered.ropaRecords,
|
|
8090
|
+
violations,
|
|
8091
|
+
ropaMarkdown: "",
|
|
8092
|
+
reportMarkdown: ""
|
|
8093
|
+
};
|
|
8094
|
+
}
|
|
8095
|
+
function verifyPrivacy(options = {}) {
|
|
8096
|
+
const rootDir = options.rootDir || process.cwd();
|
|
8097
|
+
const policy = loadPrivacyPolicy(rootDir, options.policyPath);
|
|
8098
|
+
const sourceFiles = collectSourceFilesForPrivacy(rootDir, options.targetDirectories || ["src", "packages"]);
|
|
8099
|
+
const codeViolations = sourceFiles.flatMap((file) => scanFileForPrivacyViolations(file, rootDir, policy));
|
|
8100
|
+
const discovered = discoverPrivacyArtifacts(rootDir);
|
|
8101
|
+
const gov = evaluateDiscoveredPrivacyGovernance(discovered, policy, rootDir);
|
|
8102
|
+
const violations = [...codeViolations, ...gov.violations];
|
|
8103
|
+
const result = buildInitialPrivacyResult(sourceFiles.length, discovered, violations, gov.dpiaRequiredCount);
|
|
8104
|
+
result.ropaMarkdown = generateRopaInventoryMarkdown(result, policy);
|
|
8105
|
+
result.reportMarkdown = generatePrivacyReportMarkdown(result, policy);
|
|
8106
|
+
writePrivacyOutputsIfNeeded(result, options, policy, rootDir);
|
|
8107
|
+
return result;
|
|
8108
|
+
}
|
|
7420
8109
|
function calculateRating(mi, cc) {
|
|
7421
8110
|
if (mi >= 75 && cc <= 5) return "A";
|
|
7422
8111
|
if (mi >= 60 && cc <= 10) return "B";
|
|
@@ -8857,7 +9546,9 @@ var NON_GRAPH_TYPES = /* @__PURE__ */ new Set([
|
|
|
8857
9546
|
"mcp-config",
|
|
8858
9547
|
"user-manual",
|
|
8859
9548
|
"production-manual",
|
|
8860
|
-
"architecture-glossary"
|
|
9549
|
+
"architecture-glossary",
|
|
9550
|
+
"dpia-request",
|
|
9551
|
+
"privacy-policy"
|
|
8861
9552
|
]);
|
|
8862
9553
|
var PREFIX_MAP = {
|
|
8863
9554
|
"ARCH-INTRO": { type: "architecture-introduction", layer: "product" },
|
|
@@ -8867,11 +9558,14 @@ var PREFIX_MAP = {
|
|
|
8867
9558
|
"UC": { type: "use-case", layer: "product" },
|
|
8868
9559
|
"BR": { type: "business-rule", layer: "product" },
|
|
8869
9560
|
"ABUSE": { type: "abuse-case", layer: "product" },
|
|
9561
|
+
"DATA-ASSET": { type: "data-asset", layer: "product" },
|
|
9562
|
+
"PRIV-ROPA": { type: "privacy-ropa", layer: "product" },
|
|
8870
9563
|
"HAZ": { type: "hazard", layer: "product" },
|
|
8871
9564
|
"SEC-ENC": { type: "security-enclave", layer: "architecture" },
|
|
8872
9565
|
"CMP": { type: "component", layer: "architecture" },
|
|
8873
9566
|
"ADR": { type: "adr", layer: "architecture" },
|
|
8874
|
-
"SEC-REQ": { type: "security-requirement", layer: "requirement" }
|
|
9567
|
+
"SEC-REQ": { type: "security-requirement", layer: "requirement" },
|
|
9568
|
+
"PRIV-REQ": { type: "privacy-requirement", layer: "requirement" }
|
|
8875
9569
|
};
|
|
8876
9570
|
var TYPE_LOOKUP = {
|
|
8877
9571
|
"architecture-introduction": { type: "architecture-introduction", layer: "product" },
|
|
@@ -8883,15 +9577,18 @@ var TYPE_LOOKUP = {
|
|
|
8883
9577
|
"business-rule": { type: "business-rule", layer: "product" },
|
|
8884
9578
|
"rule": { type: "business-rule", layer: "product" },
|
|
8885
9579
|
"abuse-case": { type: "abuse-case", layer: "product" },
|
|
9580
|
+
"data-asset": { type: "data-asset", layer: "product" },
|
|
9581
|
+
"privacy-ropa": { type: "privacy-ropa", layer: "product" },
|
|
8886
9582
|
"hazard": { type: "hazard", layer: "product" },
|
|
8887
9583
|
"security-enclave": { type: "security-enclave", layer: "architecture" },
|
|
8888
9584
|
"component": { type: "component", layer: "architecture" },
|
|
8889
9585
|
"architecture-decision-record": { type: "adr", layer: "architecture" },
|
|
8890
9586
|
"adr": { type: "adr", layer: "architecture" },
|
|
8891
|
-
"security-requirement": { type: "security-requirement", layer: "requirement" }
|
|
9587
|
+
"security-requirement": { type: "security-requirement", layer: "requirement" },
|
|
9588
|
+
"privacy-requirement": { type: "privacy-requirement", layer: "requirement" }
|
|
8892
9589
|
};
|
|
8893
9590
|
function classifyArtifactLayerAndType(id, declaredType) {
|
|
8894
|
-
if (NON_GRAPH_TYPES.has(declaredType) || /^(TERM|HOF|AHOF|CHG|DSG|SPEC|TSK|UDF|AUDIT)-/.test(id)) {
|
|
9591
|
+
if (NON_GRAPH_TYPES.has(declaredType) || /^(TERM|HOF|AHOF|CHG|DSG|SPEC|TSK|UDF|AUDIT|DPIA)-/.test(id)) {
|
|
8895
9592
|
return null;
|
|
8896
9593
|
}
|
|
8897
9594
|
for (const [prefix, mapping] of Object.entries(PREFIX_MAP)) {
|
|
@@ -8935,7 +9632,7 @@ function parseAndCatalogArtifactFile(rootDir, filePath, scannedMap, archViewByBa
|
|
|
8935
9632
|
function scanWorkspaceArtifacts(rootDir) {
|
|
8936
9633
|
const scannedArtifactsMap = /* @__PURE__ */ new Map();
|
|
8937
9634
|
const archViewByBasename = /* @__PURE__ */ new Map();
|
|
8938
|
-
const artifactDirs = ["product", "architecture", "specs", "security"];
|
|
9635
|
+
const artifactDirs = ["product", "architecture", "specs", "security", "privacy"];
|
|
8939
9636
|
for (const dirName of artifactDirs) {
|
|
8940
9637
|
const fullDirPath = path4.join(rootDir, dirName);
|
|
8941
9638
|
if (fs7.existsSync(fullDirPath)) {
|
|
@@ -8952,6 +9649,8 @@ function resolveUpstreamType(u) {
|
|
|
8952
9649
|
if (u.startsWith("UC-")) return "use-case";
|
|
8953
9650
|
if (u.startsWith("BR-")) return "business-rule";
|
|
8954
9651
|
if (u.startsWith("ABUSE-")) return "abuse-case";
|
|
9652
|
+
if (u.startsWith("DATA-ASSET-")) return "data-asset";
|
|
9653
|
+
if (u.startsWith("PRIV-ROPA-")) return "privacy-ropa";
|
|
8955
9654
|
return "product";
|
|
8956
9655
|
}
|
|
8957
9656
|
function addTraceUpstreamEdges(r, status, nodeMap, addEdge) {
|
|
@@ -9030,7 +9729,7 @@ function addTraceTestEdges(r, status, rootDir, nodeMap, addEdge) {
|
|
|
9030
9729
|
}
|
|
9031
9730
|
}
|
|
9032
9731
|
function buildReqNode(r, status) {
|
|
9033
|
-
const reqType = r.id.startsWith("SEC-REQ-") ? "security-requirement" : "requirement";
|
|
9732
|
+
const reqType = r.id.startsWith("SEC-REQ-") ? "security-requirement" : r.id.startsWith("PRIV-REQ-") ? "privacy-requirement" : "requirement";
|
|
9034
9733
|
return {
|
|
9035
9734
|
id: r.id,
|
|
9036
9735
|
label: r.id,
|
|
@@ -9104,7 +9803,7 @@ function connectIntroRelationships(art, nodeMap, addEdge) {
|
|
|
9104
9803
|
for (const qrId of list) {
|
|
9105
9804
|
if (typeof qrId === "string" && qrId.trim()) {
|
|
9106
9805
|
const q = qrId.trim();
|
|
9107
|
-
const qType = q.startsWith("SEC-REQ-") ? "security-requirement" : "requirement";
|
|
9806
|
+
const qType = q.startsWith("SEC-REQ-") ? "security-requirement" : q.startsWith("PRIV-REQ-") ? "privacy-requirement" : "requirement";
|
|
9108
9807
|
connectTargets(art.id, [q], "defines-goal", nodeMap, addEdge, qType, "requirement");
|
|
9109
9808
|
}
|
|
9110
9809
|
}
|
|
@@ -9183,6 +9882,28 @@ function connectAbuseCaseRelationships(art, nodeMap, addEdge) {
|
|
|
9183
9882
|
connectAbuseTargets(fm["targets-use-case"] || fm["targets-use-cases"] || fm["targets"], art.id, nodeMap, addEdge);
|
|
9184
9883
|
connectAbuseMitigations(fm["mitigated-by"], art.id, nodeMap, addEdge);
|
|
9185
9884
|
}
|
|
9885
|
+
function connectDataAssetRelationships(art, nodeMap, addEdge) {
|
|
9886
|
+
const fm = art.frontmatter;
|
|
9887
|
+
for (const subj of toList(fm["data-subjects"])) {
|
|
9888
|
+
connectTargets(subj.trim(), [art.id], "owns-data", nodeMap, addEdge, "actor", "product");
|
|
9889
|
+
}
|
|
9890
|
+
const owner = typeof fm["owner-bounded-context"] === "string" ? fm["owner-bounded-context"].trim() : "";
|
|
9891
|
+
if (owner && owner.startsWith("CMP-")) {
|
|
9892
|
+
connectTargets(art.id, [owner], "satisfies", nodeMap, addEdge, "component", "architecture");
|
|
9893
|
+
}
|
|
9894
|
+
}
|
|
9895
|
+
function connectPrivacyRopaRelationships(art, nodeMap, addEdge) {
|
|
9896
|
+
const fm = art.frontmatter;
|
|
9897
|
+
for (const uc of toList(fm["use-cases"])) {
|
|
9898
|
+
connectTargets(uc.trim(), [art.id], "derives-from", nodeMap, addEdge, "use-case", "product");
|
|
9899
|
+
}
|
|
9900
|
+
for (const asset of toList(fm["data-assets"])) {
|
|
9901
|
+
connectTargets(asset.trim(), [art.id], "governs", nodeMap, addEdge, "data-asset", "product");
|
|
9902
|
+
}
|
|
9903
|
+
for (const req of toList(fm["mitigated-by"])) {
|
|
9904
|
+
connectTargets(art.id, [req.trim()], "mitigated-by", nodeMap, addEdge, "privacy-requirement", "requirement");
|
|
9905
|
+
}
|
|
9906
|
+
}
|
|
9186
9907
|
function connectRequirementMitigations(art, nodeMap, addEdge) {
|
|
9187
9908
|
for (const ab of toList(art.frontmatter["mitigates-abuse-case"])) {
|
|
9188
9909
|
const id = ab.trim();
|
|
@@ -9190,6 +9911,18 @@ function connectRequirementMitigations(art, nodeMap, addEdge) {
|
|
|
9190
9911
|
connectTargets(id, [art.id], "mitigated-by", nodeMap, addEdge, "abuse-case", "product");
|
|
9191
9912
|
}
|
|
9192
9913
|
}
|
|
9914
|
+
for (const ropa of toList(art.frontmatter["governs-ropa"])) {
|
|
9915
|
+
const id = ropa.trim();
|
|
9916
|
+
if (id) {
|
|
9917
|
+
connectTargets(id, [art.id], "mitigated-by", nodeMap, addEdge, "privacy-ropa", "product");
|
|
9918
|
+
}
|
|
9919
|
+
}
|
|
9920
|
+
for (const asset of toList(art.frontmatter["protects-data-assets"])) {
|
|
9921
|
+
const id = asset.trim();
|
|
9922
|
+
if (id) {
|
|
9923
|
+
connectTargets(id, [art.id], "governs", nodeMap, addEdge, "data-asset", "product");
|
|
9924
|
+
}
|
|
9925
|
+
}
|
|
9193
9926
|
}
|
|
9194
9927
|
function connectAdrRelationships(art, nodeMap, addEdge) {
|
|
9195
9928
|
for (const cmp of toList(art.frontmatter["affects-components"])) {
|
|
@@ -9213,8 +9946,11 @@ var CONNECTOR_MAP = {
|
|
|
9213
9946
|
"use-case": connectUseCaseRelationships,
|
|
9214
9947
|
"business-rule": (art, _map, addEdge) => connectBusinessRuleRelationships(art, addEdge),
|
|
9215
9948
|
"abuse-case": connectAbuseCaseRelationships,
|
|
9949
|
+
"data-asset": connectDataAssetRelationships,
|
|
9950
|
+
"privacy-ropa": connectPrivacyRopaRelationships,
|
|
9216
9951
|
"requirement": connectRequirementMitigations,
|
|
9217
9952
|
"security-requirement": connectRequirementMitigations,
|
|
9953
|
+
"privacy-requirement": connectRequirementMitigations,
|
|
9218
9954
|
"adr": connectAdrRelationships,
|
|
9219
9955
|
"security-enclave": connectEnclaveRelationships
|
|
9220
9956
|
};
|
|
@@ -9834,6 +10570,28 @@ var DASHBOARD_CLIENT_SCRIPT = `
|
|
|
9834
10570
|
'height': 46
|
|
9835
10571
|
}
|
|
9836
10572
|
},
|
|
10573
|
+
{
|
|
10574
|
+
selector: 'node.type-data-asset',
|
|
10575
|
+
style: {
|
|
10576
|
+
'shape': 'barrel',
|
|
10577
|
+
'background-color': '#134e4a',
|
|
10578
|
+
'border-color': '#5eead4',
|
|
10579
|
+
'border-width': 2.5,
|
|
10580
|
+
'width': 68,
|
|
10581
|
+
'height': 42
|
|
10582
|
+
}
|
|
10583
|
+
},
|
|
10584
|
+
{
|
|
10585
|
+
selector: 'node.type-privacy-ropa',
|
|
10586
|
+
style: {
|
|
10587
|
+
'shape': 'round-rectangle',
|
|
10588
|
+
'background-color': '#1e3a8a',
|
|
10589
|
+
'border-color': '#60a5fa',
|
|
10590
|
+
'border-width': 2.5,
|
|
10591
|
+
'width': 72,
|
|
10592
|
+
'height': 40
|
|
10593
|
+
}
|
|
10594
|
+
},
|
|
9837
10595
|
{
|
|
9838
10596
|
selector: 'node.type-security-enclave',
|
|
9839
10597
|
style: {
|
|
@@ -9846,7 +10604,7 @@ var DASHBOARD_CLIENT_SCRIPT = `
|
|
|
9846
10604
|
}
|
|
9847
10605
|
},
|
|
9848
10606
|
{
|
|
9849
|
-
selector: 'node.type-requirement, node.type-security-requirement',
|
|
10607
|
+
selector: 'node.type-requirement, node.type-security-requirement, node.type-privacy-requirement',
|
|
9850
10608
|
style: {
|
|
9851
10609
|
'shape': 'round-rectangle',
|
|
9852
10610
|
'background-color': '#1e293b',
|
|
@@ -9879,7 +10637,7 @@ var DASHBOARD_CLIENT_SCRIPT = `
|
|
|
9879
10637
|
}
|
|
9880
10638
|
},
|
|
9881
10639
|
{
|
|
9882
|
-
selector: 'node.layer-product:not(.type-architecture-introduction):not(.type-journey):not(.type-actor):not(.type-use-case):not(.type-usecase):not(.type-business-rule):not(.type-rule):not(.type-abuse-case):not(.type-threat-actor)',
|
|
10640
|
+
selector: 'node.layer-product:not(.type-architecture-introduction):not(.type-journey):not(.type-actor):not(.type-use-case):not(.type-usecase):not(.type-business-rule):not(.type-rule):not(.type-abuse-case):not(.type-threat-actor):not(.type-data-asset):not(.type-privacy-ropa)',
|
|
9883
10641
|
style: { 'shape': 'diamond', 'background-color': '#0e7490', 'border-color': '#38bdf8', 'width': 50, 'height': 50 }
|
|
9884
10642
|
},
|
|
9885
10643
|
{
|
|
@@ -10077,7 +10835,15 @@ var DASHBOARD_CLIENT_SCRIPT = `
|
|
|
10077
10835
|
typeBadgeColor = '#881337';
|
|
10078
10836
|
typeTitle = 'ABUSE CASE (ABUSE)';
|
|
10079
10837
|
typologyKey = 'abuse-case';
|
|
10080
|
-
} else if (typeName === '
|
|
10838
|
+
} else if (typeName === 'data-asset') {
|
|
10839
|
+
typeBadgeColor = '#134e4a';
|
|
10840
|
+
typeTitle = 'DATA ASSET (DATA-ASSET)';
|
|
10841
|
+
typologyKey = 'data-asset';
|
|
10842
|
+
} else if (typeName === 'privacy-ropa') {
|
|
10843
|
+
typeBadgeColor = '#1e3a8a';
|
|
10844
|
+
typeTitle = 'PRIVACY ROPA (PRIV-ROPA)';
|
|
10845
|
+
typologyKey = 'privacy-ropa';
|
|
10846
|
+
} else if (typeName === 'requirement' || typeName === 'security-requirement' || typeName === 'privacy-requirement') {
|
|
10081
10847
|
typeBadgeColor = '#1e293b';
|
|
10082
10848
|
typeTitle = 'REQUIREMENT (' + (data.id.split('-')[0] || 'REQ') + ')';
|
|
10083
10849
|
typologyKey = 'requirement';
|
|
@@ -10131,7 +10897,9 @@ var DASHBOARD_CLIENT_SCRIPT = `
|
|
|
10131
10897
|
'use-case': '.type-use-case, .type-usecase',
|
|
10132
10898
|
'business-rule': '.type-business-rule, .type-rule',
|
|
10133
10899
|
'abuse-case': '.type-abuse-case, .type-threat-actor',
|
|
10134
|
-
'
|
|
10900
|
+
'data-asset': '.type-data-asset',
|
|
10901
|
+
'privacy-ropa': '.type-privacy-ropa',
|
|
10902
|
+
'requirement': '.type-requirement, .type-security-requirement, .type-privacy-requirement, .layer-requirement',
|
|
10135
10903
|
'architecture': '.type-component, .type-adr, .type-security-enclave, .layer-architecture',
|
|
10136
10904
|
'test': '.type-bdd-feature, .type-code-test, .layer-test'
|
|
10137
10905
|
};
|
|
@@ -10541,7 +11309,9 @@ var GRAPH_LEGEND_HTML = `
|
|
|
10541
11309
|
<div class="legend-item" data-type="use-case" onclick="handleTypologyClick(event, 'use-case')" title="Filter Use Case"><span class="legend-dot" style="background:#0369a1; border:2px solid #38bdf8;"></span><strong>Use Case</strong> (UC)</div>
|
|
10542
11310
|
<div class="legend-item" data-type="business-rule" onclick="handleTypologyClick(event, 'business-rule')" title="Filter Business Rule"><span class="legend-dot" style="background:#b45309; border:2px solid #fbbf24; transform:rotate(45deg);"></span><strong>Business Rule</strong> (BR)</div>
|
|
10543
11311
|
<div class="legend-item" data-type="abuse-case" onclick="handleTypologyClick(event, 'abuse-case')" title="Filter Abuse Case"><span class="legend-dot" style="background:#881337; border:2px solid #f43f5e;"></span><strong>Abuse Case</strong> (ABUSE)</div>
|
|
10544
|
-
<div class="legend-item" data-type="
|
|
11312
|
+
<div class="legend-item" data-type="data-asset" onclick="handleTypologyClick(event, 'data-asset')" title="Filter Data Asset"><span class="legend-dot" style="background:#134e4a; border:2px solid #5eead4;"></span><strong>Data Asset</strong> (DATA-ASSET)</div>
|
|
11313
|
+
<div class="legend-item" data-type="privacy-ropa" onclick="handleTypologyClick(event, 'privacy-ropa')" title="Filter Privacy ROPA"><span class="legend-dot" style="background:#1e3a8a; border:2px solid #60a5fa;"></span><strong>Privacy ROPA</strong> (PRIV-ROPA)</div>
|
|
11314
|
+
<div class="legend-item" data-type="requirement" onclick="handleTypologyClick(event, 'requirement')" title="Filter Requirement"><span class="legend-dot" style="background:#1e293b; border:2px solid #64748b;"></span><strong>Requirement</strong> (FR/QR/SEC/PRIV)</div>
|
|
10545
11315
|
<div class="legend-item" data-type="architecture" onclick="handleTypologyClick(event, 'architecture')" title="Filter Architecture"><span class="legend-dot" style="background:#312e81; border:2px solid #818cf8;"></span><strong>Architecture</strong> (CMP/ADR)</div>
|
|
10546
11316
|
<div class="legend-item" data-type="test" onclick="handleTypologyClick(event, 'test')" title="Filter Test"><span class="legend-dot" style="background:#047857; border:2px solid #10b981;"></span><strong>Test</strong> (BDD/Test)</div>
|
|
10547
11317
|
</div>
|
|
@@ -10582,7 +11352,7 @@ function renderGraphToolbarHtml() {
|
|
|
10582
11352
|
` <div class="graph-toolbar">`,
|
|
10583
11353
|
` <div class="tool-row"><button class="tool-btn" onclick="cyZoom(0.2)">Zoom +</button><button class="tool-btn" onclick="cyZoom(-0.2)">Zoom -</button><button class="tool-btn" onclick="cy.fit(30)">Center</button><button class="tool-btn" onclick="resetHighlight()">Reset</button></div>`,
|
|
10584
11354
|
` <div class="tool-row"><select id="layout-select" class="tool-select" onchange="applyLayout(this.value)"><option value="breadthfirst">Hierarchical (Layers)</option><option value="cose">Force-directed (COSE)</option><option value="concentric">Concentric</option><option value="circle">Circular</option></select></div>`,
|
|
10585
|
-
` <div class="tool-row"><select id="type-filter" class="tool-select" onchange="filterType(this.value)"><option value="all">All Typologies</option><option value="architecture-introduction">Vision & Goals (ARCH-INTRO)</option><option value="journey">Journeys (JRN)</option><option value="actor">Actors (ACT)</option><option value="use-case">Use Cases (UC)</option><option value="business-rule">Business Rules (BR)</option><option value="abuse-case">Abuse Cases (ABUSE)</option><option value="requirement">Requirements (FR/QR/SEC)</option><option value="architecture">Architecture (CMP/ADR)</option><option value="test">Testing (BDD/Test)</option></select></div>`,
|
|
11355
|
+
` <div class="tool-row"><select id="type-filter" class="tool-select" onchange="filterType(this.value)"><option value="all">All Typologies</option><option value="architecture-introduction">Vision & Goals (ARCH-INTRO)</option><option value="journey">Journeys (JRN)</option><option value="actor">Actors (ACT)</option><option value="use-case">Use Cases (UC)</option><option value="business-rule">Business Rules (BR)</option><option value="abuse-case">Abuse Cases (ABUSE)</option><option value="data-asset">Data Assets (DATA-ASSET)</option><option value="privacy-ropa">Privacy ROPA (PRIV-ROPA)</option><option value="requirement">Requirements (FR/QR/SEC/PRIV)</option><option value="architecture">Architecture (CMP/ADR)</option><option value="test">Testing (BDD/Test)</option></select></div>`,
|
|
10586
11356
|
` <div class="tool-row"><select id="layer-filter" class="tool-select" onchange="filterLayer(this.value)"><option value="all">All Layers</option><option value="product">Layer 1: Product (Upstream)</option><option value="requirement">Layer 2: Requirements</option><option value="architecture">Layer 3: Architecture (Midstream)</option><option value="test">Layer 4: Testing (Downstream)</option></select></div>`,
|
|
10587
11357
|
` <div class="tool-row"><select id="status-filter" class="tool-select" onchange="filterStatus(this.value)"><option value="all">All Statuses</option><option value="COMPLIANT">Only Compliant (Green)</option><option value="issues">Only Orphans / Drift (Red)</option></select></div>`,
|
|
10588
11358
|
` <div class="tool-row"><input type="text" id="node-search" class="tool-input" placeholder="Search node ID..." oninput="searchNode(this.value)"></div>`,
|
|
@@ -11359,7 +12129,32 @@ var SPECIALIZED_AGENT_TEMPLATES = [
|
|
|
11359
12129
|
- In the **Technical Security Feedback Loop** (arriving from \`agent-system-architect\`), analyze infrastructure, persistence, middleware, and API decisions to issue system/software-level \`ACT-THREAT-*\` and \`SEC-REQ-*\`.
|
|
11360
12130
|
- Every \`SEC-REQ-*\` must include negative BDD attack and rejection scenarios tagged \`@security @mitigation\`.
|
|
11361
12131
|
- Run \`pnpm run verify:schemas\` before delivering the draft.
|
|
11362
|
-
- If autonomy is $\\ge$ \`HUMAN_REVIEW_PLAN\`, conclude by emitting the Workflow Handoff block (\`templates/workflow/agent-handoff.template.md\`) suggesting \`agent-system-architect\`
|
|
12132
|
+
- If autonomy is $\\ge$ \`HUMAN_REVIEW_PLAN\`, conclude by emitting the Workflow Handoff block (\`templates/workflow/agent-handoff.template.md\`) suggesting \`agent-privacy-officer\` (to model LINDDUN privacy threats, \`DATA-ASSET-*\`, \`PRIV-ROPA-*\`, and \`PRIV-REQ-*\` before \`agent-system-architect\` or \`agent-qa-engineer\`) and opening the Human Action Window. In \`AUTONOMOUS\` mode, omit interactive handoff.`
|
|
12133
|
+
},
|
|
12134
|
+
{
|
|
12135
|
+
id: "agent-privacy-officer",
|
|
12136
|
+
title: "Data Protection & Privacy-by-Design Specialist",
|
|
12137
|
+
description: "Model personal data assets (DATA-ASSET-*), GDPR Art. 30 records of processing (PRIV-ROPA-*), and LINDDUN/ISO 27701 privacy requirements (PRIV-REQ-*) on handoff from cybersecurity, and audit code diffs against privacy-policy.yaml.",
|
|
12138
|
+
globs: "privacy/**, specs/privacy/**, privacy-policy.yaml, templates/privacy/**, schemas/privacy/**",
|
|
12139
|
+
body: `## Role & Mission
|
|
12140
|
+
- **Role**: Data Protection & Privacy-by-Design Specialist Agent (\`agent-privacy-officer\`).
|
|
12141
|
+
- **Mission**: Receive the handoff from \`agent-threat-modeler\` to model personal data assets (\`DATA-ASSET-*\`), GDPR Art. 30 records of processing (\`PRIV-ROPA-*\`), and LINDDUN / GDPR Art. 25 / ISO 27701 privacy requirements (\`PRIV-REQ-*\`), and audit code changes in Pre-Merge against \`privacy-policy.yaml\`.
|
|
12142
|
+
|
|
12143
|
+
## Operational Directives & Guardrails
|
|
12144
|
+
- Operate under bimodal discipline depending on the lifecycle phase:
|
|
12145
|
+
1. **Shift-Left Design Mode (Post-Cybersecurity Handoff)**:
|
|
12146
|
+
- Inspect \`UC-*\`, \`FR-*\`, \`ABUSE-*\`, and \`SEC-REQ-*\` (and \`CMP-*\` during the technical security/privacy feedback loop from \`agent-system-architect\`).
|
|
12147
|
+
- Apply **LINDDUN** (Linkability, Identifiability, Non-repudiation, Detectability, Disclosure of information, Unawareness, Non-compliance) and **GDPR / LOPDGDD / ISO 27701** to generate the PDaC privacy triad in \`specs/privacy/\` conforming to \`schemas/privacy/\`:
|
|
12148
|
+
- \`DATA-ASSET-*\` (\`type: data-asset\`): personal data inventory classifying fields (\`PUBLIC\`, \`INTERNAL\`, \`CONFIDENTIAL_PII\`, \`RESTRICTED_SENSITIVE_PII\`), retention (\`retention-period\`), and erasure strategy (\`CRYPTO_SHREDDING\`, \`HARD_DELETE\`, \`ANONYMIZATION\`, \`RETENTION_LOCK\`).
|
|
12149
|
+
- \`PRIV-ROPA-*\` (\`type: privacy-ropa\`): GDPR Art. 30 Record of Processing Activity linking \`processes-use-cases\` (\`UC-*\`), \`data-assets\` (\`DATA-ASSET-*\`), \`lawful-basis\` (Art. 6), \`special-category-basis\` (Art. 9), and \`cross-border-transfer\`.
|
|
12150
|
+
- \`PRIV-REQ-*\` (\`type: privacy-requirement\`): technical and organizational privacy requirements (minimization, pseudonymization, masking in logs/LLM prompts, ARCO+/GDPR Art. 15\u201322 rights, retention/erasure) with Gherkin scenarios tagged \`@<PRIV-REQ-ID> @privacy @gdpr @automated @regression\`.
|
|
12151
|
+
- \`status\` ALWAYS starts as \`draft\`.
|
|
12152
|
+
- **DPIA Escalation Gate**: If \`RESTRICTED_SENSITIVE_PII\` (GDPR Art. 9 special categories), biometric/health data, systematic profiling, or unapproved cross-border transfers are detected, generate a \`DPIA-*\` request (\`templates/privacy/dpia-request.template.md\`), set \`dpia-required: true\`, and block autonomous progression until the human DPO / Legal Counsel approves.
|
|
12153
|
+
2. **Pre-Merge Privacy Audit Mode (Downstream / PR Gate)**:
|
|
12154
|
+
- Execute deterministic verification via \`pnpm run verify:privacy\` (\`npx aisdlc verify privacy\`) and inspect PR diffs for PII leaks in logs/telemetry (\`PRIV-001\`), unmasked PII in external LLM prompts (\`PRIV-002\`), missing retention/erasure on PII assets (\`PRIV-003\`), hardcoded real PII in tests/seeds (\`PRIV-004\`), unregistered ROPA (\`PRIV-005\`), or unapproved subprocessors (\`PRIV-007\`).
|
|
12155
|
+
- Block any PR with \`CRITICAL\` or \`HIGH\` privacy violations (exit code \`5\`).
|
|
12156
|
+
- Run \`pnpm run verify:schemas\` and \`pnpm run verify:privacy\` before delivering artifacts or audit verdicts.
|
|
12157
|
+
- If autonomy is $\\ge$ \`HUMAN_REVIEW_PLAN\`, conclude by emitting the Workflow Handoff block (\`templates/workflow/agent-handoff.template.md\`) suggesting \`agent-system-architect\` (or \`agent-qa-engineer\` after technical loop, or the human Tech Lead / DPO in Pre-Merge) and opening the Human Action Window. In \`AUTONOMOUS\` mode, omit interactive handoff.`
|
|
11363
12158
|
},
|
|
11364
12159
|
{
|
|
11365
12160
|
id: "agent-system-architect",
|
|
@@ -11371,22 +12166,22 @@ var SPECIALIZED_AGENT_TEMPLATES = [
|
|
|
11371
12166
|
- **Mission**: Translate approved product definition into a modular technical architecture based on arc42 enriched with NAF v4.
|
|
11372
12167
|
|
|
11373
12168
|
## Operational Directives & Guardrails
|
|
11374
|
-
- Decompose the system into building blocks \`CMP-*\` ensuring each component declares which use cases \`UC-*\` it implements and which requirements (\`FR-*\`, \`QR-*\`, \`SEC-REQ-*\`) it fulfills under \`satisfies-requirements\`.
|
|
12169
|
+
- Decompose the system into building blocks \`CMP-*\` ensuring each component declares which use cases \`UC-*\` it implements and which requirements (\`FR-*\`, \`QR-*\`, \`SEC-REQ-*\`, \`PRIV-REQ-*\`) it fulfills under \`satisfies-requirements\`.
|
|
11375
12170
|
- **Contract-First Full-Stack Integration**: Whenever a feature or change spans Frontend (UI) and Backend (API/services), define an explicit shared typed contract (Zod schemas, shared TypeScript DTOs, or OpenAPI specification) in \`design.md\` before implementation so both layers compile against a single source of truth.
|
|
11376
12171
|
- Generate interaction and sequence diagrams in native Mermaid syntax.
|
|
11377
12172
|
- Document critical technological decisions using immutable \`ADR-*\` records conforming to \`schemas/architecture/adr.schema.json\`.
|
|
11378
|
-
- Validate that architectural choices comply with legal constraints in \`license-policy.yaml\`.
|
|
11379
|
-
- **Technical Security Feedback Loop**: If architectural decisions (databases, queues, distributed caching, third-party APIs, authentication schemes) introduce new attack vectors, emit a return handoff to \`agent-threat-modeler\` for technical modeling prior to the testing phase.
|
|
11380
|
-
- If autonomy is $\\ge$ \`HUMAN_REVIEW_PLAN\`, conclude by emitting the Workflow Handoff block (\`templates/workflow/agent-handoff.template.md\`) suggesting \`agent-qa-engineer\` (or \`agent-threat-modeler\` if technical security loop is required) and opening the Human Action Window. In \`AUTONOMOUS\` mode, omit interactive handoff.`
|
|
12173
|
+
- Validate that architectural choices comply with legal constraints in \`license-policy.yaml\` and data protection constraints in \`privacy-policy.yaml\`.
|
|
12174
|
+
- **Technical Security & Privacy Feedback Loop**: If architectural decisions (databases, queues, distributed caching, third-party APIs, LLM providers, authentication schemes) introduce new attack vectors or PII data flows, emit a return handoff to \`agent-threat-modeler\` (which chains to \`agent-privacy-officer\`) for technical modeling prior to the testing phase.
|
|
12175
|
+
- If autonomy is $\\ge$ \`HUMAN_REVIEW_PLAN\`, conclude by emitting the Workflow Handoff block (\`templates/workflow/agent-handoff.template.md\`) suggesting \`agent-qa-engineer\` (or \`agent-threat-modeler\` if technical security/privacy loop is required) and opening the Human Action Window. In \`AUTONOMOUS\` mode, omit interactive handoff.`
|
|
11381
12176
|
},
|
|
11382
12177
|
{
|
|
11383
12178
|
id: "agent-qa-engineer",
|
|
11384
12179
|
title: "QA Engineer and SDET",
|
|
11385
|
-
description: "Translate approved requirements (FR-*, SEC-REQ-*, QR-*) into comprehensive FAILING (red) BDD/Gherkin, End-to-End (E2E), UI, and unit test suites before production code is written.",
|
|
12180
|
+
description: "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 production code is written.",
|
|
11386
12181
|
globs: "tests/**, specs/changes/**/spec.md",
|
|
11387
12182
|
body: `## Role & Mission
|
|
11388
12183
|
- **Role**: QA Engineer and SDET (Software Development Engineer in Test) Agent (\`agent-qa-engineer\`).
|
|
11389
|
-
- **Mission**: Translate approved requirements (\`FR-*\`, \`SEC-REQ-*\`, \`QR-*\`) into comprehensive FAILING (red) BDD/Gherkin, End-to-End (E2E), UI, and unit test suites before \`agent-developer\` writes a single line of production code.
|
|
12184
|
+
- **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 a single line of production code.
|
|
11390
12185
|
|
|
11391
12186
|
## Operational Directives & Guardrails
|
|
11392
12187
|
- Read exclusively requirements cited in the \`handoff.yaml\` sidecar (\`HOF-*\`) and their referenced artifacts.
|
|
@@ -11401,7 +12196,7 @@ var SPECIALIZED_AGENT_TEMPLATES = [
|
|
|
11401
12196
|
2. **Boundary Cases** (\`@boundary\` \`Scenario Outline\` + \`Examples\` table): values at the extremes of the accepted range.
|
|
11402
12197
|
3. **Out-of-Range / Invalid Cases** (\`@invalid\` \`Scenario Outline\` + \`Examples\` table): null, empty, wrong types, values exceeding bounds.
|
|
11403
12198
|
- **Use Case Variant Coverage**: Inspect every \`UC-*\` in \`handoff.yaml\` and generate BDD scenarios covering 100% of its \`alternative-flows\` and \`exception-flows\`.
|
|
11404
|
-
- Apply conditional categories when applicable: Security (\`@security @mitigation\`), Performance (\`@performance\`), Idempotency (\`@idempotence\`), Postconditions, and Interface Contracts.
|
|
12199
|
+
- Apply conditional categories when applicable: Security (\`@security @mitigation\`), Privacy (\`@privacy @gdpr\`), Performance (\`@performance\`), Idempotency (\`@idempotence\`), Postconditions, and Interface Contracts.
|
|
11405
12200
|
- **Zero-Mock Integration Rule**: When an \`FR-*\` spans UI and Backend, unit tests mocking \`fetch\`/HTTP in isolation are insufficient; include integration/contract or E2E test scenarios verifying real request/response wiring and UI state transitions (\`Loading\`, \`Empty\`, \`Error\`, \`Nominal\`).
|
|
11406
12201
|
- Tag all scenarios with \`@<FR-ID> @automated @regression\`.
|
|
11407
12202
|
- **STRICTLY FORBIDDEN**: Including production code, suggesting implementation, or anticipating technical solutions.
|
|
@@ -11430,16 +12225,16 @@ Execute every implementation task following this strict sequential order:
|
|
|
11430
12225
|
|
|
11431
12226
|
## Operational Directives & Guardrails
|
|
11432
12227
|
- Respect the autonomy mode assigned to each task in \`tasks.md\` (\`AUTONOMOUS\`, \`HUMAN_REVIEW_PLAN\`, \`AMBIGUOUS\`, \`HIGH_RISK_MANUAL\`).
|
|
11433
|
-
- **100% Design & Handoff Scope Coverage in Tasks**: Ensure every task in \`tasks.md\` declares \`implements-components\` (\`CMP-*\`), \`satisfies-requirements\` (\`FR-*\`, \`SEC-REQ-*\`), and \`implements-contracts\` so 100% of \`design.md\` and \`handoff.yaml\` is mapped and implemented.
|
|
12228
|
+
- **100% Design & Handoff Scope Coverage in Tasks**: Ensure every task in \`tasks.md\` declares \`implements-components\` (\`CMP-*\`), \`satisfies-requirements\` (\`FR-*\`, \`SEC-REQ-*\`, \`PRIV-REQ-*\`), and \`implements-contracts\` so 100% of \`design.md\` and \`handoff.yaml\` is mapped and implemented.
|
|
11434
12229
|
- Apply Test-Driven Development (TDD): make failing tests delivered by \`agent-qa-engineer\` pass green without altering tests to accommodate buggy code, and write direct unit tests in \`tests/unit/\` for every exported function and contract method declared in \`design.md\` or implemented in \`src/\`.
|
|
11435
|
-
- Cite implemented \`FR
|
|
12230
|
+
- Cite implemented \`FR-*\`, \`SEC-REQ-*\`, or \`PRIV-REQ-*\` IDs in test header comments to maintain 360\xB0 reverse traceability.
|
|
11436
12231
|
- **Zero Fake-Wiring Guardrail**: Strictly forbidden from marking a task \`COMPLETED\` with hardcoded \`mockData\` arrays in production views, \`setTimeout\` simulating network calls, or empty UI event handlers (\`onClick={() => {}}\`, \`onSubmit={() => {}}\`). Frontend components must wire directly to the shared contract and real Backend endpoints.
|
|
11437
12232
|
- **Mandatory 4 UI States Matrix**: Every data-driven UI component or screen must explicitly implement all 4 usability states: \`Loading\` (spinner/skeleton + disabled submit), \`Empty\` (clear message + CTA), \`Error\` (visible error recovery banner, never silent failure), and \`Nominal/Success\` (accessible semantic DOM + keyboard navigation).
|
|
11438
12233
|
- **Live Runtime Smoke Verification**: For tasks touching UI or UI-to-Backend integration, unit tests alone are insufficient. Before emitting handoff, boot the real Backend and Frontend servers and verify (via Playwright E2E or Chrome DevTools MCP) that browser \`console.error\` and \`pageerror\` counts are \`0\` and API calls return real \`2xx\` responses without CORS or schema mismatches.
|
|
11439
12234
|
- Before adding any external dependency, verify its SPDX license is permitted in \`license-policy.yaml\`.
|
|
11440
12235
|
- Respect non-negotiable \`quality-policy.yaml\` thresholds: Cyclomatic Complexity $\\le 10$, Cognitive Complexity $\\le 15$, Maintainability Index $\\ge 50$, Function Length $\\le 40$ lines.
|
|
11441
12236
|
- Run unified pre-flight with auto-fix (\`pnpm run check:fix\`) and full verification (\`pnpm run verify:all\`).
|
|
11442
|
-
- Upon completing green implementation, suggest handoff to \`agent-expert-user\` for Post-Development Functional Validation prior to security audit.`
|
|
12237
|
+
- Upon completing green implementation, suggest handoff to \`agent-expert-user\` for Post-Development Functional Validation prior to security and privacy audit.`
|
|
11443
12238
|
},
|
|
11444
12239
|
{
|
|
11445
12240
|
id: "agent-security-auditor",
|
|
@@ -11486,7 +12281,7 @@ Execute every implementation task following this strict sequential order:
|
|
|
11486
12281
|
1. **Design Mode (Upstream)**: Adopt the primary actor persona under real-world field conditions (stress, latency, constrained viewports). Separate strict Minimum Viable Product (MVP) core from future roadmap ideas using \`templates/product/user-design-feedback.template.md\`.
|
|
11487
12282
|
2. **Functional Validation Mode (Downstream / Pre-PR / Post-Development Functional Validation)**: Inspect \`agent-developer\` deliverables once unit tests pass green by executing the real application (via Playwright or Chrome DevTools MCP when UI is present). Contrast actual UI, CLI, and API behavior against approved \`UC-*\` and \`FR-*\` criteria, verifying real Backend connectivity, the 4 UI usability states (\`Loading\`, \`Empty\`, \`Error\`, \`Nominal\`), keyboard/ARIA accessibility, and \`0\` browser \`console.error\` / network failures.
|
|
11488
12283
|
- Formulate decisive questions under \`open-questions\` for the human Product Owner.
|
|
11489
|
-
- Emit handoff block suggesting the Pre-Merge Audit Triad (\`agent-code-reviewer\`, \`agent-security-auditor\`, \`agent-compliance-checker\`) if compliant, or return to \`agent-developer\` on functional drift or fake-wiring.`
|
|
12284
|
+
- Emit handoff block suggesting the Pre-Merge Audit Triad (\`agent-code-reviewer\`, \`agent-security-auditor\`, \`agent-privacy-officer\`, \`agent-compliance-checker\`) if compliant, or return to \`agent-developer\` on functional drift or fake-wiring.`
|
|
11490
12285
|
},
|
|
11491
12286
|
{
|
|
11492
12287
|
id: "agent-code-reviewer",
|
|
@@ -11502,7 +12297,7 @@ Execute every implementation task following this strict sequential order:
|
|
|
11502
12297
|
- Detect improper coupling, code smells, magic numbers, ambiguous identifiers, and encapsulation breaches.
|
|
11503
12298
|
- Flag premature abstractions and speculative code violating YAGNI.
|
|
11504
12299
|
- **Block Fake-Wiring & Disconnected UI**: Flag as \`[BLOCKING]\` any production UI component containing hardcoded mock data (\`mockData\`), empty event handlers (\`onClick={() => {}}\`), missing error/loading state handling, or API calls bypassing shared contracts.
|
|
11505
|
-
- Coordinate Pre-Merge Audit Triad with \`agent-security-auditor\` and \`agent-compliance-checker\`.
|
|
12300
|
+
- Coordinate Pre-Merge Audit Triad with \`agent-security-auditor\`, \`agent-privacy-officer\`, and \`agent-compliance-checker\`.
|
|
11506
12301
|
- Categorize findings into: \`[BLOCKING]\` (quality violation or broken pattern), \`[CLEAN_CODE_SUGGESTION]\` (non-blocking improvement), and \`[COMPLIANT]\`.
|
|
11507
12302
|
- If autonomy is $\\ge$ \`HUMAN_REVIEW_PLAN\`, conclude by emitting the Workflow Handoff block (\`templates/workflow/agent-handoff.template.md\`) to the human Tech Lead for final approval and merge, opening the Human Action Window. In \`AUTONOMOUS\` mode, omit interactive handoff.`
|
|
11508
12303
|
},
|
|
@@ -11582,16 +12377,16 @@ var LIFECYCLE_SKILL_TEMPLATES = [
|
|
|
11582
12377
|
id: "aisdlc-greenfield",
|
|
11583
12378
|
title: "Greenfield Project Inception & Delivery Playbook",
|
|
11584
12379
|
description: "Orchestrate end-to-end AI-SDLC onboarding and Phase 0 Inception for brand-new (Greenfield) projects, from repository initialization (aisdlc init) and NAF v4 Vision (ARCH-INTRO-*) through ProductShape, STRIDE Threat Modeling, arc42 Architecture, and initial SDD increment delivery.",
|
|
11585
|
-
references: "[`process/02_product_definition.md`](../../process/02_product_definition.md), [`process/05_architecture_arc42_nafv4.md`](../../process/05_architecture_arc42_nafv4.md), [`process/06_spec_driven_development.md`](../../process/06_spec_driven_development.md), and [`process/09_agent_protocols.md`](../../process/09_agent_protocols.md).",
|
|
12380
|
+
references: "[`process/02_product_definition.md`](../../process/02_product_definition.md), [`process/04b_data_protection_and_privacy.md`](../../process/04b_data_protection_and_privacy.md), [`process/05_architecture_arc42_nafv4.md`](../../process/05_architecture_arc42_nafv4.md), [`process/06_spec_driven_development.md`](../../process/06_spec_driven_development.md), and [`process/09_agent_protocols.md`](../../process/09_agent_protocols.md).",
|
|
11586
12381
|
body: `## Purpose & Trigger
|
|
11587
|
-
Use this skill when starting a **brand-new software project from scratch (Greenfield)** or when \`specs/product/\` has no canonical baseline yet. It coordinates the sequential execution of AI-SDLC MCP/CLI tools and specialized role agents so no code is written before product vision, security enclaves, and architecture contracts exist.
|
|
12382
|
+
Use this skill when starting a **brand-new software project from scratch (Greenfield)** or when \`specs/product/\` has no canonical baseline yet. It coordinates the sequential execution of AI-SDLC MCP/CLI tools and specialized role agents so no code is written before product vision, security enclaves, privacy-by-design controls, and architecture contracts exist.
|
|
11588
12383
|
|
|
11589
12384
|
## End-to-End Execution Playbook
|
|
11590
12385
|
|
|
11591
12386
|
### Step 1: Repository Turnkey Initialization
|
|
11592
12387
|
1. If the workspace has not been initialized with AI-SDLC schemas, policies, and templates, run MCP tool \`new\` (or CLI \`npx @aisdlc/cli init\`).
|
|
11593
12388
|
2. Install the Git telemetry hook via \`npx aisdlc git hook install\` (\`pnpm run git:hook:install\`).
|
|
11594
|
-
3. Verify \`quality-policy.yaml\` and \`
|
|
12389
|
+
3. Verify \`quality-policy.yaml\`, \`license-policy.yaml\`, and \`privacy-policy.yaml\` are present in the repository root.
|
|
11595
12390
|
|
|
11596
12391
|
### Step 2: Phase 0 Product Inception (\`agent-product-analyst\`)
|
|
11597
12392
|
1. Delegate to or adopt [\`agent-product-analyst\`](../agent-product-analyst/SKILL.md).
|
|
@@ -11606,19 +12401,21 @@ Use this skill when starting a **brand-new software project from scratch (Greenf
|
|
|
11606
12401
|
5. Validate schemas and duplicates via MCP tools \`verify_schemas\` and \`verify_duplicates\` (or \`npx aisdlc check --fix\`).
|
|
11607
12402
|
6. **Mandatory Upstream UX & MVP Boundary Gate (\`agent-expert-user\`)**: Invoke [\`agent-expert-user\`](../agent-expert-user/SKILL.md) in **Design Mode** to stress-test the proposed workflows, enforce strict MVP boundaries, and separate core MVP \`UC-*\` from future roadmap backlog (\`templates/product/user-design-feedback.template.md\`).
|
|
11608
12403
|
|
|
11609
|
-
### Step 3: Shift-Left Cybersecurity &
|
|
12404
|
+
### Step 3: Shift-Left Cybersecurity & Privacy-by-Design (\`agent-threat-modeler\` \u2794 \`agent-privacy-officer\`)
|
|
11610
12405
|
1. Delegate to or adopt [\`agent-threat-modeler\`](../agent-threat-modeler/SKILL.md).
|
|
11611
12406
|
2. Analyze every \`UC-*\` and \`FR-*\` using STRIDE and OWASP ASVS to create in \`specs/security/\`:
|
|
11612
12407
|
- Threat Actors (\`ACT-THREAT-*\`)
|
|
11613
12408
|
- Abuse Cases (\`ABUSE-*\` targeting \`UC-*\`)
|
|
11614
12409
|
- Security Requirements (\`SEC-REQ-*\` with \`@security @mitigation\` negative Gherkin scenarios and \`SEC-ENC-*\` Zero Trust enclave bindings).
|
|
11615
|
-
3.
|
|
12410
|
+
3. Hand off to [\`agent-privacy-officer\`](../agent-privacy-officer/SKILL.md) to apply LINDDUN and GDPR/LOPDGDD/ISO 27701 in \`specs/privacy/\`:
|
|
12411
|
+
- Personal Data Assets (\`DATA-ASSET-*\`), GDPR Art. 30 Records of Processing (\`PRIV-ROPA-*\`), and Privacy Requirements (\`PRIV-REQ-*\` with \`@privacy @gdpr\` Gherkin scenarios).
|
|
12412
|
+
4. Run \`verify_schemas\` and \`verify_privacy\` (\`npx aisdlc verify privacy\`).
|
|
11616
12413
|
|
|
11617
12414
|
### Step 4: Modular Systems Architecture (\`agent-system-architect\`)
|
|
11618
12415
|
1. Delegate to or adopt [\`agent-system-architect\`](../agent-system-architect/SKILL.md).
|
|
11619
|
-
2. Define building blocks (\`CMP-*\`) and Architectural Decision Records (\`ADR-*\`) in \`specs/architecture/\` using \`templates/architecture/\`, ensuring every \`CMP-*\` cites \`implements-use-cases\` (\`UC-*\`) and \`satisfies-requirements\` (\`FR-*\`, \`QR-*\`, \`SEC-REQ-*\`).
|
|
11620
|
-
3. Inspect third-party stack choices against \`license-policy.yaml\` via \`verify_licenses\`.
|
|
11621
|
-
4. **Technical Security Feedback Loop**: If new infrastructure, persistence, or auth decisions introduce attack vectors, return to \`agent-threat-modeler\` to add technical \`SEC-REQ-*\` mitigations before coding.
|
|
12416
|
+
2. Define building blocks (\`CMP-*\`) and Architectural Decision Records (\`ADR-*\`) in \`specs/architecture/\` using \`templates/architecture/\`, ensuring every \`CMP-*\` cites \`implements-use-cases\` (\`UC-*\`) and \`satisfies-requirements\` (\`FR-*\`, \`QR-*\`, \`SEC-REQ-*\`, \`PRIV-REQ-*\`).
|
|
12417
|
+
3. Inspect third-party stack choices against \`license-policy.yaml\` via \`verify_licenses\` and subprocessors against \`privacy-policy.yaml\` via \`verify_privacy\`.
|
|
12418
|
+
4. **Technical Security & Privacy Feedback Loop**: If new infrastructure, persistence, LLM, or auth decisions introduce attack vectors or PII flows, return to \`agent-threat-modeler\` \u2794 \`agent-privacy-officer\` to add technical \`SEC-REQ-*\` and \`PRIV-REQ-*\` mitigations before coding.
|
|
11622
12419
|
|
|
11623
12420
|
### Step 5: Release Milestone & Topological Wave SDD Plan (\`1 UC-* = 1 CHG-*\`)
|
|
11624
12421
|
1. **Open Release Milestone (\`Tier 2: release/v1.0.0\`)**: Group the approved MVP Use Cases (\`UC-001\`, \`UC-002\`, ...) under the initial release milestone (\`release/v1.0.0\`) and visualize the branch hierarchy via \`npx aisdlc git plan\`.
|
|
@@ -11637,29 +12434,30 @@ Use this skill when starting a **brand-new software project from scratch (Greenf
|
|
|
11637
12434
|
id: "aisdlc-legacy-onboarding",
|
|
11638
12435
|
title: "Legacy / Brownfield Retro-Inception Playbook",
|
|
11639
12436
|
description: "Orchestrate progressive AI-SDLC adoption and Brownfield retro-inception on existing or legacy repositories without breaking production code, reverse-engineering architecture (ARCH-INTRO-*, CMP-*) and establishing baseline quality, security, and license audits before new SDD increments.",
|
|
11640
|
-
references: "[`process/02_product_definition.md`](../../process/02_product_definition.md), [`process/04_open_source_license_compliance.md`](../../process/04_open_source_license_compliance.md), [`process/05_architecture_arc42_nafv4.md`](../../process/05_architecture_arc42_nafv4.md), [`process/10_quality_management_and_release_gates.md`](../../process/10_quality_management_and_release_gates.md), and [`process/09_agent_protocols.md`](../../process/09_agent_protocols.md).",
|
|
12437
|
+
references: "[`process/02_product_definition.md`](../../process/02_product_definition.md), [`process/04_open_source_license_compliance.md`](../../process/04_open_source_license_compliance.md), [`process/04b_data_protection_and_privacy.md`](../../process/04b_data_protection_and_privacy.md), [`process/05_architecture_arc42_nafv4.md`](../../process/05_architecture_arc42_nafv4.md), [`process/10_quality_management_and_release_gates.md`](../../process/10_quality_management_and_release_gates.md), and [`process/09_agent_protocols.md`](../../process/09_agent_protocols.md).",
|
|
11641
12438
|
body: `## Purpose & Trigger
|
|
11642
|
-
Use this skill when **adopting AI-SDLC in an existing or legacy codebase (Brownfield)** that already has production source code (\`src/\`, \`packages/\`, etc.) but lacks canonical PDaC specifications, arc42 architecture views, or deterministic quality/license gates.
|
|
12439
|
+
Use this skill when **adopting AI-SDLC in an existing or legacy codebase (Brownfield)** that already has production source code (\`src/\`, \`packages/\`, etc.) but lacks canonical PDaC specifications, arc42 architecture views, or deterministic quality/license/privacy gates.
|
|
11643
12440
|
|
|
11644
12441
|
## End-to-End Execution Playbook
|
|
11645
12442
|
|
|
11646
12443
|
### Step 1: Non-Destructive Framework Scaffolding
|
|
11647
12444
|
1. Run MCP tool \`new\` (or CLI \`npx @aisdlc/cli init\`) on the existing repository.
|
|
11648
|
-
- AI-SDLC enforces strict **no-clobber protection**: existing \`package.json\`, \`CLAUDE.md\`, or CI pipelines are preserved while injecting missing schemas (\`schemas/\`), templates (\`templates/\`), policies (\`quality-policy.yaml\`, \`license-policy.yaml\`), and MCP configs.
|
|
12445
|
+
- AI-SDLC enforces strict **no-clobber protection**: existing \`package.json\`, \`CLAUDE.md\`, or CI pipelines are preserved while injecting missing schemas (\`schemas/\`), templates (\`templates/\`), policies (\`quality-policy.yaml\`, \`license-policy.yaml\`, \`privacy-policy.yaml\`), and MCP configs.
|
|
11649
12446
|
2. Install the Git commit trailer hook via \`npx aisdlc git hook install\`.
|
|
11650
12447
|
|
|
11651
12448
|
### Step 2: Baseline Diagnostic Audit (Read-Only Assessment)
|
|
11652
|
-
Before modifying any code or creating SDD changes, run diagnostic verifiers to quantify existing technical, legal, and security debt:
|
|
12449
|
+
Before modifying any code or creating SDD changes, run diagnostic verifiers to quantify existing technical, legal, privacy, and security debt:
|
|
11653
12450
|
1. **License & Dependency Audit (\`agent-compliance-checker\`)**: Run MCP tool \`verify_licenses\` (\`npx aisdlc verify licenses\`). Identify any viral (\`GPL\`/\`AGPL\`) or commercial (\`BSL\`/\`SSPL\`) dependencies already present in the lockfile and document exceptions or remediation plans.
|
|
11654
12451
|
2. **Shift-Left Security Scan (\`agent-security-auditor\`)**: Run MCP tool \`verify_security\` (\`npx aisdlc verify security\`) to detect hardcoded secrets (Gate 11) or OWASP SAST vulnerabilities in legacy files.
|
|
11655
|
-
3. **
|
|
12452
|
+
3. **Privacy & PII Scan (\`agent-privacy-officer\`)**: Run MCP tool \`verify_privacy\` (\`npx aisdlc verify privacy\`) to detect PII in logs/telemetry or hardcoded real PII in legacy tests/seeds.
|
|
12453
|
+
4. **AST Code Quality Baseline (\`agent-code-reviewer\`)**: Run MCP tool \`report_quality\` (\`npx aisdlc report quality\`) to generate \`reports/QUALITY_REPORT.md\` and identify legacy hotspots exceeding Cyclomatic Complexity ($\\le 10$), Cognitive Complexity ($\\le 15$), or Maintainability Index ($\\ge 50$).
|
|
11656
12454
|
|
|
11657
12455
|
### Step 3: Brownfield Retro-Inception (\`agent-system-architect\` & \`agent-product-analyst\`)
|
|
11658
12456
|
Instead of attempting to document 100% of a legacy monolith upfront, apply **bounded retro-inception** focused on the system boundary and the domain areas under active evolution:
|
|
11659
12457
|
1. **System Vision & Context (\`ARCH-INTRO-001\`)**: Use [\`agent-product-analyst\`](../agent-product-analyst/SKILL.md) to document the current system's mission, primary actors (\`ACT-*\`), and top quality goals (\`QR-*\`) in \`specs/architecture/ARCH-INTRO-001.md\`.
|
|
11660
12458
|
2. **As-Is Component Mapping (\`CMP-*\` & \`ADR-*\`)**: Use [\`agent-system-architect\`](../agent-system-architect/SKILL.md) to map existing core modules/services into \`specs/architecture/CMP-*.md\` and capture historical architectural constraints (\`CON-*\`, \`ADR-*\`).
|
|
11661
12459
|
3. **Core Use Cases Extraction (\`UC-*\`, \`FR-*\`)**: Extract canonical \`UC-*\` and \`FR-*\` artifacts in \`specs/product/\` for the specific bounded context or module that will be modified or extended next, including Gherkin acceptance scenarios reflecting current expected behavior (characterization specs).
|
|
11662
|
-
4. **Threat &
|
|
12460
|
+
4. **Threat & Privacy Boundary Mapping (\`agent-threat-modeler\` \u2794 \`agent-privacy-officer\`)**: Map existing trust zones (\`SEC-ENC-*\`), active threat vectors (\`ACT-THREAT-*\`, \`ABUSE-*\`, \`SEC-REQ-*\`), and personal data inventories (\`DATA-ASSET-*\`, \`PRIV-ROPA-*\`, \`PRIV-REQ-*\`) on the target module.
|
|
11663
12461
|
|
|
11664
12462
|
### Step 4: Characterization Testing & Synchronization
|
|
11665
12463
|
1. Run MCP tool \`sdd_check_fix\` (\`npx aisdlc check --fix\`) to extract \`.feature\` files and compute canonical SHA-256 digests.
|
|
@@ -11679,16 +12477,17 @@ Once the target domain's baseline artifacts (\`ARCH-INTRO-*\`, \`UC-*\`, \`FR-*\
|
|
|
11679
12477
|
description: "Orchestrate the complete Spec-Driven Development (SDD) lifecycle for bounded feature increments, enhancements, and bugfixes (CHG-* / TSK-*), from upstream requirement derivation and 4-tier Git branching through Red-Green-Refactor TDD, Pre-Merge Audit Triad, all 11 Quality Gates, and canonical baseline integration.",
|
|
11680
12478
|
references: "[`process/06_spec_driven_development.md`](../../process/06_spec_driven_development.md), [`process/08_citation_contract_and_drift.md`](../../process/08_citation_contract_and_drift.md), [`process/10_quality_management_and_release_gates.md`](../../process/10_quality_management_and_release_gates.md), [`process/11_git_branching_and_lifecycle.md`](../../process/11_git_branching_and_lifecycle.md), and [`process/09_agent_protocols.md`](../../process/09_agent_protocols.md).",
|
|
11681
12479
|
body: `## Purpose & Trigger
|
|
11682
|
-
Use this skill for **every evolutionary increment (new feature, enhancement, refactoring, or bugfix)** on a project that already has an AI-SDLC baseline. It enforces strict 360\xB0 traceability from upstream ProductShape (\`UC-*\`, \`FR-*\`) through SDD (\`CHG-*\`, \`HOF-*\`, \`TSK-*\`), TDD implementation, the
|
|
12480
|
+
Use this skill for **every evolutionary increment (new feature, enhancement, refactoring, or bugfix)** on a project that already has an AI-SDLC baseline. It enforces strict 360\xB0 traceability from upstream ProductShape (\`UC-*\`, \`FR-*\`) through SDD (\`CHG-*\`, \`HOF-*\`, \`TSK-*\`), TDD implementation, the 12 Quality Gates, and baseline promotion.
|
|
11683
12481
|
|
|
11684
12482
|
## End-to-End Execution Playbook
|
|
11685
12483
|
|
|
11686
|
-
### Step 1: Upstream Product &
|
|
12484
|
+
### Step 1: Upstream Product, Security & Privacy Delta (\`agent-product-analyst\`, \`agent-threat-modeler\` & \`agent-privacy-officer\`)
|
|
11687
12485
|
1. Inspect active changes via MCP tool \`get_active_handoff\` and verify whether the target Use Case (\`UC-*\`) or Requirement (\`FR-*\`) already exists in \`specs/product/\`.
|
|
11688
12486
|
2. If the increment introduces new behavior or modifies business rules:
|
|
11689
12487
|
- Use [\`agent-product-analyst\`](../agent-product-analyst/SKILL.md) to create or update the \`UC-*\`, \`BR-*\`, and \`FR-*\` (with \`@nominal\`, \`@boundary\`, \`@invalid\` Gherkin scenarios).
|
|
11690
12488
|
- Run MCP tool \`verify_duplicates\` (\`npx aisdlc verify duplicates\`) to block lexical or functional collisions early.
|
|
11691
12489
|
- Use [\`agent-threat-modeler\`](../agent-threat-modeler/SKILL.md) to model any new \`ABUSE-*\` and \`SEC-REQ-*\` mitigations.
|
|
12490
|
+
- Hand off to [\`agent-privacy-officer\`](../agent-privacy-officer/SKILL.md) to model any personal data assets (\`DATA-ASSET-*\`), GDPR Art. 30 processing activities (\`PRIV-ROPA-*\`), and privacy requirements (\`PRIV-REQ-*\`).
|
|
11692
12491
|
3. Run \`sdd_check_fix\` (\`npx aisdlc check --fix\`) to sync Gherkin \`.feature\` files and validate schemas.
|
|
11693
12492
|
|
|
11694
12493
|
### Step 2: SDD Change Scaffolding & Architectural Design (\`agent-system-architect\`)
|
|
@@ -11715,7 +12514,7 @@ Use this skill for **every evolutionary increment (new feature, enhancement, ref
|
|
|
11715
12514
|
1. Delegate to or adopt [\`agent-developer\`](../agent-developer/SKILL.md).
|
|
11716
12515
|
2. Execute the **Mandatory 4-Step Implementation Order**:
|
|
11717
12516
|
- (1) Clean Architecture boundaries, (2) Inter-module interfaces first, (3) Concrete component implementation (zero fake-wiring; all 4 UI states \`Loading\`, \`Empty\`, \`Error\`, \`Nominal\`), (4) Exhaustive per-function unit tests in \`tests/unit/\` (Happy Path, Sad Path, Boundary, Null/Empty).
|
|
11718
|
-
3. Verify any new dependency against \`license-policy.yaml\` via \`verify_licenses\`.
|
|
12517
|
+
3. Verify any new dependency against \`license-policy.yaml\` via \`verify_licenses\` and PII handling against \`privacy-policy.yaml\` via \`verify_privacy\`.
|
|
11719
12518
|
4. Run \`sdd_check_fix\` (\`npx aisdlc check --fix\`) and \`verify_quality\` (\`npx aisdlc verify quality\`) until Cyclomatic Complexity $\\le 10$, Cognitive $\\le 15$, Maintainability $\\ge 50$, and Function Length $\\le 40$ lines pass with zero violations.
|
|
11720
12519
|
|
|
11721
12520
|
### Step 6: Post-Development Functional Validation & Pre-Merge Audit Triad
|
|
@@ -11723,11 +12522,12 @@ Use this skill for **every evolutionary increment (new feature, enhancement, ref
|
|
|
11723
12522
|
2. **Pre-Merge Audit Triad**: Execute concurrent review across:
|
|
11724
12523
|
- [\`agent-code-reviewer\`](../agent-code-reviewer/SKILL.md) (SOLID, DRY, YAGNI, AST thresholds, zero fake-wiring)
|
|
11725
12524
|
- [\`agent-security-auditor\`](../agent-security-auditor/SKILL.md) (\`verify_security\`: Gitleaks secrets + OWASP SAST)
|
|
12525
|
+
- [\`agent-privacy-officer\`](../agent-privacy-officer/SKILL.md) (\`verify_privacy\`: GDPR/LOPDGDD ROPA + PII-SAST)
|
|
11726
12526
|
- [\`agent-compliance-checker\`](../agent-compliance-checker/SKILL.md) (\`verify_licenses\`: SPDX & SBOM compliance)
|
|
11727
|
-
3. **Consolidated Release Gate**: Run MCP tool \`verify\` (\`npx aisdlc verify all\`) and confirm all **
|
|
12527
|
+
3. **Consolidated Release Gate**: Run MCP tool \`verify\` (\`npx aisdlc verify all\`) and confirm all **12 Quality Gates** pass green.
|
|
11728
12528
|
|
|
11729
12529
|
### Step 7: Human PR Sign-Off, Baseline Integration & Release Closure
|
|
11730
|
-
1. **Feature Merge (\`feat/CHG-*\` \u2794 \`release/vX.Y.Z\`)**: Present the PR, KPI summary (\`kpi_pr\`), and autogenerated reports (\`reports/QUALITY_REPORT.md\`, \`reports/TRACEABILITY_MATRIX.md\`) to the human Tech Lead for review and approval (never auto-approve or auto-merge).
|
|
12530
|
+
1. **Feature Merge (\`feat/CHG-*\` \u2794 \`release/vX.Y.Z\`)**: Present the PR, KPI summary (\`kpi_pr\`), and autogenerated reports (\`reports/QUALITY_REPORT.md\`, \`reports/TRACEABILITY_MATRIX.md\`, \`reports/ROPA_INVENTORY.md\`) to the human Tech Lead for review and approval (never auto-approve or auto-merge).
|
|
11731
12531
|
2. **Canonical Baseline Promotion**: Once tasks in \`tasks.md\` are marked \`COMPLETED\` and approved, promote the change into the canonical baseline via MCP tool \`sdd_integrate\` (\`npx aisdlc sdd integrate --auto\`), which promotes \`FR-*\` to \`active\`, links \`CMP-*\`, and archives the change under \`specs/changes/completed/\`.
|
|
11732
12532
|
3. **Release Milestone Closure (\`release/vX.Y.Z\` \u2794 \`main\`)**: When all \`CHG-*\` increments planned for \`release/vX.Y.Z\` are integrated:
|
|
11733
12533
|
- Run full verification (\`verify\`), generate CycloneDX SBOM & legal notices (\`npx aisdlc verify licenses --sbom reports/sbom.cdx.json --notices THIRD_PARTY_NOTICES.md\`), compute release telemetry (\`kpi_release\` / \`npx aisdlc kpi release --release release/vX.Y.Z\`), and refresh the interactive dashboard (\`report_dashboard\`).
|
|
@@ -11735,7 +12535,7 @@ Use this skill for **every evolutionary increment (new feature, enhancement, ref
|
|
|
11735
12535
|
|
|
11736
12536
|
## Non-Negotiable Guardrails
|
|
11737
12537
|
- **Single-Use-Case Scope (\`1 UC-* = 1 CHG-*\`)**: Each SDD change (\`CHG-*\`) must deliver at most 1 Use Case (\`UC-*\`). Bundling multiple \`UC-*\` into one \`handoff.yaml\` is blocked by \`verify_governance\` (\`Greenfield monolith detected\`). Scale throughput via parallel \`CHG-*\` branches/worktrees, not monolithic changes.
|
|
11738
|
-
- **100% Design & Handoff Coverage in \`tasks.md\`**: Every \`CMP-*\`, \`FR-*\`, and \`
|
|
12538
|
+
- **100% Design & Handoff Coverage in \`tasks.md\`**: Every \`CMP-*\`, \`FR-*\`, \`SEC-REQ-*\`, and \`PRIV-REQ-*\` declared in \`design.md\` and \`handoff.yaml\` must be explicitly assigned to at least one \`TSK-*\` in \`tasks.md\`.`
|
|
11739
12539
|
}
|
|
11740
12540
|
];
|
|
11741
12541
|
function renderAntigravitySkillFile(skill) {
|
|
@@ -11765,7 +12565,7 @@ This file defines the operational rules and specialized role mappings for Google
|
|
|
11765
12565
|
1. **FORBIDDEN TO AUTO-APPROVE OR AUTO-MERGE | PROHIBIDO AUTO-APROBAR O AUTO-FUSIONAR**: No agent may auto-approve PRs or perform direct merges to protected branches (\`main\`, \`release/*\`). Only a human engineer may approve or merge.
|
|
11766
12566
|
2. **FORBIDDEN TO INVENT PRODUCT OR ARCHITECTURE DECISIONS**: When facing ambiguous requirements, formulate clarifying questions (\`open-questions\`). Never assume unspecified intentions.
|
|
11767
12567
|
3. **FORBIDDEN TO INTRODUCE DEPENDENCIES WITHOUT LICENSE INSPECTION**: Always consult \`license-policy.yaml\`. Dependencies with viral licenses (\`GPL\`/\`AGPL\`) or commercial paid licenses (\`BSL\`/\`SSPL\`) are strictly forbidden without authorization.
|
|
11768
|
-
4. **FORBIDDEN TO IGNORE CYBERSECURITY (SECURITY-BY-DEFAULT)**: Validate inputs, sanitize data, and add mitigation tests (\`SEC-TEST
|
|
12568
|
+
4. **FORBIDDEN TO IGNORE CYBERSECURITY & PRIVACY (SECURITY-BY-DEFAULT & PRIVACY-BY-DEFAULT)**: Validate inputs, sanitize data, protect PII according to \`privacy-policy.yaml\`, and add mitigation tests (\`SEC-TEST-*\`, \`@privacy\`). Disabling linters or suppressing typing errors is prohibited.
|
|
11769
12569
|
5. **MANDATORY CRYPTOGRAPHIC CITATION**: Every derived artifact must cite upstream artifacts using canonical identifiers and their Unix LF-normalized SHA-256 cryptographic hashes.
|
|
11770
12570
|
|
|
11771
12571
|
---
|
|
@@ -11786,23 +12586,31 @@ This file defines the operational rules and specialized role mappings for Google
|
|
|
11786
12586
|
### 2. \`agent-threat-modeler\` (Threat Modeler and Security Specialist)
|
|
11787
12587
|
- **Mission**: Analyze use cases and proactively model adversaries, STRIDE attack vectors, and OWASP ASVS mitigations, both at product level and in the technical security feedback loop over architecture.
|
|
11788
12588
|
- **Input**: Use cases \`UC-*\`, functional requirements \`FR-*\`, or architecture components (\`CMP-*\`, Mermaid diagrams, ADRs).
|
|
11789
|
-
- **Output**: Cybersecurity triad (\`ACT-THREAT-*\`, \`ABUSE-*\`, \`SEC-REQ-*\`) compliant with \`schemas/security
|
|
12589
|
+
- **Output**: Cybersecurity triad (\`ACT-THREAT-*\`, \`ABUSE-*\`, \`SEC-REQ-*\`) compliant with \`schemas/security/\`, followed by handoff to \`agent-privacy-officer\`.
|
|
11790
12590
|
- **Guardrails**:
|
|
11791
12591
|
- \`status\` always starts in \`draft\`.
|
|
11792
12592
|
- Negative BDD attack and rejection scenarios tagged with \`@security @mitigation\`.
|
|
11793
12593
|
- Assignment of Zero Trust enclaves \`SEC-ENC-*\`.
|
|
11794
12594
|
|
|
11795
|
-
### 3. \`agent-
|
|
12595
|
+
### 3. \`agent-privacy-officer\` (Data Protection & Privacy-by-Design Specialist)
|
|
12596
|
+
- **Mission**: Receive handoff from \`agent-threat-modeler\` to model personal data assets (\`DATA-ASSET-*\`), GDPR Art. 30 processing activities (\`PRIV-ROPA-*\`), and LINDDUN / GDPR / ISO 27701 privacy requirements (\`PRIV-REQ-*\`), and audit PR diffs against \`privacy-policy.yaml\`.
|
|
12597
|
+
- **Output**: Privacy triad (\`DATA-ASSET-*\`, \`PRIV-ROPA-*\`, \`PRIV-REQ-*\`) in \`specs/privacy/\` compliant with \`schemas/privacy/\`, and \`DPIA-*\` requests when Art. 9 sensitive data is detected.
|
|
12598
|
+
- **Guardrails**:
|
|
12599
|
+
- \`status\` always starts in \`draft\`.
|
|
12600
|
+
- Every \`PRIV-REQ-*\` includes Gherkin scenarios tagged with \`@<PRIV-REQ-ID> @privacy @gdpr @automated @regression\`.
|
|
12601
|
+
- Run \`pnpm run verify:privacy\` to block PII in logs/prompts and enforce ROPA & retention/erasure policies.
|
|
12602
|
+
|
|
12603
|
+
### 4. \`agent-system-architect\` (System Architect)
|
|
11796
12604
|
- **Mission**: Translate the approved product definition into a modular technical architecture based on arc42 enriched with NAF v4.
|
|
11797
12605
|
- **Output**: Architecture components (\`CMP-*\`), Mermaid diagrams, and immutable \`ADR-*\` records compliant with \`schemas/architecture/\`.
|
|
11798
12606
|
- **Guardrails**:
|
|
11799
|
-
- Every \`CMP-*\` must declare \`satisfies-requirements\` linking \`FR-*\`, \`QR-*\`, and \`
|
|
11800
|
-
- Emit a return handoff to \`agent-threat-modeler\` in the technical security feedback loop when infrastructure or persistence decisions introduce new attack vectors.
|
|
12607
|
+
- Every \`CMP-*\` must declare \`satisfies-requirements\` linking \`FR-*\`, \`QR-*\`, \`SEC-REQ-*\`, and \`PRIV-REQ-*\`.
|
|
12608
|
+
- Emit a return handoff to \`agent-threat-modeler\` (chaining to \`agent-privacy-officer\`) in the technical security/privacy feedback loop when infrastructure or persistence decisions introduce new attack vectors or PII flows.
|
|
11801
12609
|
|
|
11802
|
-
###
|
|
11803
|
-
- **Mission**: Translate approved requirements (\`FR-*\`, \`SEC-REQ-*\`, \`QR-*\`) into comprehensive FAILING (red) BDD/Gherkin, End-to-End (E2E), UI, and unit test suites, before \`agent-developer\` writes production code.
|
|
12610
|
+
### 5. \`agent-qa-engineer\` (QA Engineer and SDET)
|
|
12611
|
+
- **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.
|
|
11804
12612
|
- **Input**: Approved requirements from the \`handoff.yaml\` sidecar (\`HOF-*\`).
|
|
11805
|
-
- **Output**: Failing Gherkin, E2E, and UI test suites covering: nominal case, boundary cases, out-of-range cases, per-interactive-element tests (Happy Path, Sad Path, Boundary Values), and conditional categories (security, performance, idempotency, postconditions, interface contract).
|
|
12613
|
+
- **Output**: Failing Gherkin, E2E, and UI test suites covering: nominal case, boundary cases, out-of-range cases, per-interactive-element tests (Happy Path, Sad Path, Boundary Values), and conditional categories (security, privacy, performance, idempotency, postconditions, interface contract).
|
|
11806
12614
|
- **Guardrails**:
|
|
11807
12615
|
- FORBIDDEN to include production code or anticipate implementations.
|
|
11808
12616
|
- **Agreed Project Technology**: Always use the testing frameworks, E2E/UI runners, and technology stack agreed upon for the project (if any), without requiring the user to specify it in the prompt.
|
|
@@ -11812,7 +12620,7 @@ This file defines the operational rules and specialized role mappings for Google
|
|
|
11812
12620
|
- Mandatory tags: \`@<FR-ID> @automated @regression\`.
|
|
11813
12621
|
- Run \`pnpm run verify:testing\` before emitting handoff.
|
|
11814
12622
|
|
|
11815
|
-
###
|
|
12623
|
+
### 6. \`agent-developer\` (Software Developer)
|
|
11816
12624
|
- **Mission**: Implement atomic tasks from SDD specifications (\`tasks.md\`) with clean, strictly typed code and thorough tests.
|
|
11817
12625
|
- **Directives**:
|
|
11818
12626
|
- **Mandatory 4-Step Implementation Order**: (1) Define/refine Clean Architecture layers & boundaries, (2) Define interfaces/ports for all inter-module interactions to avoid direct module coupling, (3) Implement components consuming/fulfilling those interfaces, (4) Write unit tests for every function covering Happy Path, Sad Path, Boundary Values, and Unexpected/Null/Empty values.
|
|
@@ -11820,36 +12628,36 @@ This file defines the operational rules and specialized role mappings for Google
|
|
|
11820
12628
|
- Make tests delivered by \`agent-qa-engineer\` pass green without altering them to accommodate code.
|
|
11821
12629
|
- Respect \`quality-policy.yaml\` thresholds: CC $\\le 10$, Cognitive $\\le 15$, MI $\\ge 50$, LOC $\\le 40$.
|
|
11822
12630
|
- Run pre-flight with auto-fix: \`pnpm run check:fix\` and full verification: \`pnpm run verify:all\`.
|
|
11823
|
-
- Upon completing green implementation, suggest handoff to \`agent-expert-user\` for post-development functional validation prior to security audit.
|
|
12631
|
+
- Upon completing green implementation, suggest handoff to \`agent-expert-user\` for post-development functional validation prior to security and privacy audit.
|
|
11824
12632
|
|
|
11825
|
-
###
|
|
12633
|
+
### 7. \`agent-security-auditor\` (Adversarial Code Auditor)
|
|
11826
12634
|
- **Mission**: Rigorously examine Pull Requests for business logic vulnerabilities, injection vectors, secret leaks, and authorization flaws as part of the Pre-Merge Audit Triad.
|
|
11827
12635
|
- **Directives**:
|
|
11828
12636
|
- Analyze code diffs with an attacker mindset and run \`pnpm run verify:security\`.
|
|
11829
12637
|
- Issue findings with CVSS v3.1 severity scoring and block any PR introducing CRITICAL or HIGH security risks.
|
|
11830
12638
|
|
|
11831
|
-
###
|
|
12639
|
+
### 8. \`agent-compliance-checker\` (Open Source License Compliance Auditor)
|
|
11832
12640
|
- **Mission**: Audit dependency manifests and ensure every direct and transitive third-party package complies with \`license-policy.yaml\` as part of the Pre-Merge Audit Triad.
|
|
11833
12641
|
- **Directives**:
|
|
11834
12642
|
- Verify SPDX identifiers via \`pnpm run verify:licenses\`, immediately blocking viral (\`GPL\`, \`AGPL\`) or unapproved commercial (\`BSL\`, \`SSPL\`) licenses.
|
|
11835
12643
|
|
|
11836
|
-
###
|
|
12644
|
+
### 9. \`agent-expert-user\` (Expert User and Domain Evaluator)
|
|
11837
12645
|
- **Mission**: Contrast design and specifications (design phase) and functionally validate finished software against \`UC-*\` and \`FR-*\` (post-development phase).
|
|
11838
12646
|
- **Directives**:
|
|
11839
12647
|
- Design mode (upstream): Adopt the primary actor's profile under stressful field conditions, applying bimodal discrimination (strict MVP core vs. roadmap suggestion backlog in \`templates/product/user-design-feedback.template.md\`).
|
|
11840
12648
|
- Functional validation mode (downstream / pre-PR / post-development functional validation): Thoroughly contrast interface and actual CLI execution against \`UC-*\` and \`FR-*\` acceptance criteria before pre-merge security audit.
|
|
11841
|
-
- Emit handoff block suggesting \`agent-code-reviewer\` / \`agent-security-auditor\` if compliant, or return to \`agent-developer\` on functional drift.
|
|
12649
|
+
- Emit handoff block suggesting \`agent-code-reviewer\` / \`agent-security-auditor\` / \`agent-privacy-officer\` if compliant, or return to \`agent-developer\` on functional drift.
|
|
11842
12650
|
|
|
11843
|
-
###
|
|
12651
|
+
### 10. \`agent-code-reviewer\` (Technical and Architectural Code Reviewer)
|
|
11844
12652
|
- **Mission**: Audit Pull Requests evaluating code cleanliness, adherence to SOLID, DRY, YAGNI principles, design patterns, and respect for complexity and maintainability thresholds (\`quality-policy.yaml\`), forming part of the Pre-Merge Audit Triad.
|
|
11845
12653
|
- **Directives**:
|
|
11846
12654
|
- Respect \`quality-policy.yaml\` thresholds: CC $\\le 10$, Cognitive $\\le 15$, MI $\\ge 50$, LOC $\\le 40$.
|
|
11847
12655
|
- Detect improper coupling, code smells, magic numbers, ambiguous names, and encapsulation violations.
|
|
11848
12656
|
- Flag premature abstractions and speculative code violating YAGNI.
|
|
11849
|
-
- Coordinate Pre-Merge Audit Triad with \`agent-security-auditor\` and \`agent-compliance-checker\`.
|
|
12657
|
+
- Coordinate Pre-Merge Audit Triad with \`agent-security-auditor\`, \`agent-privacy-officer\`, and \`agent-compliance-checker\`.
|
|
11850
12658
|
- Classify findings into: \`[BLOCKING]\` (quality violation or broken pattern), \`[CLEAN_CODE_SUGGESTION]\` (non-blocking improvement), and \`[COMPLIANT]\`.
|
|
11851
12659
|
|
|
11852
|
-
###
|
|
12660
|
+
### 11. \`agent-devops\` (Automation and Infrastructure Engineer)
|
|
11853
12661
|
- **Mission**: Maintain, evolve, and audit automated project infrastructure: CI/CD workflows, Docker containers, IaC manifests, and support scripts.
|
|
11854
12662
|
- **Directives**:
|
|
11855
12663
|
- Strict infrastructure domain: Operates exclusively in \`.github/workflows/\`, \`Dockerfile*\`, \`docker-compose*.yml\`, IaC manifests, and \`scripts/\`.
|
|
@@ -11875,7 +12683,7 @@ This file defines the operational rules and specialized role mappings for Google
|
|
|
11875
12683
|
- **Conditional Activation Rule by Autonomy**:
|
|
11876
12684
|
- \u{1F7E2} **\`AUTONOMOUS\`** (or exclusive final supervision in PR/CI): **OMITTED**. Do not request or emit interactive handoff to avoid interrupting unattended execution.
|
|
11877
12685
|
- \u{1F7E1} **Autonomy $\\ge$ \`HUMAN_REVIEW_PLAN\`** (\`HUMAN_REVIEW_PLAN\`, \`AMBIGUOUS\`, \`HIGH_RISK_MANUAL\`): **MANDATORY**. Emit the Workflow Handoff block compliant with [\`templates/workflow/agent-handoff.template.md\`](../../templates/workflow/agent-handoff.template.md) and **STOP**.
|
|
11878
|
-
- **Block Contents**: Declare produced deliverables, recommend the next role in workflow (\`agent-threat-modeler\`, \`agent-system-architect\`, \`agent-qa-engineer\`, \`agent-developer\`, \`agent-expert-user\`, \`agent-code-reviewer\`, \`agent-security-auditor\`, \`agent-compliance-checker\`, \`agent-devops\`, etc.), provide suggested invocation prompt, and keep **the Human Action Window open at all times for the human user to take action** (review, edit by hand, pause/reroute, or delegate).
|
|
12686
|
+
- **Block Contents**: Declare produced deliverables, recommend the next role in workflow (\`agent-threat-modeler\`, \`agent-privacy-officer\`, \`agent-system-architect\`, \`agent-qa-engineer\`, \`agent-developer\`, \`agent-expert-user\`, \`agent-code-reviewer\`, \`agent-security-auditor\`, \`agent-compliance-checker\`, \`agent-devops\`, etc.), provide suggested invocation prompt, and keep **the Human Action Window open at all times for the human user to take action** (review, edit by hand, pause/reroute, or delegate).
|
|
11879
12687
|
`;
|
|
11880
12688
|
var STARTER_CURSOR_CORE_RULES = `---
|
|
11881
12689
|
description: Global canonical directives, 5 unbreakable commandments, and AI-SDLC pre-flight
|
|
@@ -11892,7 +12700,7 @@ Every agent operating in this repository must strictly observe the following gua
|
|
|
11892
12700
|
1. **FORBIDDEN TO AUTO-APPROVE OR AUTO-MERGE | PROHIBIDO AUTO-APROBAR O AUTO-FUSIONAR**: Do not approve PRs or execute direct merges to protected branches (\`main\`, \`release/*\`). Approval is exclusively reserved for human reviewers.
|
|
11893
12701
|
2. **FORBIDDEN TO INVENT PRODUCT OR ARCHITECTURE DECISIONS**: When facing ambiguity, formulate open questions (\`open-questions\`). Never assume undocumented requirements.
|
|
11894
12702
|
3. **FORBIDDEN TO INTRODUCE DEPENDENCIES WITHOUT LICENSE INSPECTION**: Always verify \`license-policy.yaml\`. Viral dependencies (GPL/AGPL) or commercial paid dependencies (BSL/SSPL) are strictly forbidden without explicit human approval.
|
|
11895
|
-
4. **FORBIDDEN TO IGNORE CYBERSECURITY (SECURITY-BY-DEFAULT)**: Validate inputs, apply least privilege, and accompany every change with security tests (\`SEC-TEST
|
|
12703
|
+
4. **FORBIDDEN TO IGNORE CYBERSECURITY & PRIVACY (SECURITY-BY-DEFAULT & PRIVACY-BY-DEFAULT)**: Validate inputs, apply least privilege, protect PII according to \`privacy-policy.yaml\`, and accompany every change with security and privacy tests (\`SEC-TEST-*\`, \`@privacy\`). Suppressing linters or tests to force a green pipeline is prohibited.
|
|
11896
12704
|
5. **MANDATORY CRYPTOGRAPHIC CITATION**: Link specifications using immutable identifiers and Unix LF-normalized SHA-256 hashes.
|
|
11897
12705
|
|
|
11898
12706
|
## 2. Pre-Flight Verification Commands
|
|
@@ -11912,7 +12720,8 @@ Before finalizing changes or proposing commits:
|
|
|
11912
12720
|
| Role | Mission (summary) |
|
|
11913
12721
|
| :--- | :--- |
|
|
11914
12722
|
| \`agent-product-analyst\` | Phase 0 NAF v4 Enterprise & Capability Vision (\`ARCH-INTRO-*\`, 3\u20135 question interview) + ProductShape artifacts (\`ACT-*\`, \`UC-*\`, \`FR-*\`, \`QR-*\`, \`BR-*\`); status starts \`draft\`. |
|
|
11915
|
-
| \`agent-threat-modeler\` | STRIDE/OWASP threat triad (\`ACT-THREAT-*\`, \`ABUSE-*\`, \`SEC-REQ-*\`)
|
|
12723
|
+
| \`agent-threat-modeler\` | STRIDE/OWASP threat triad (\`ACT-THREAT-*\`, \`ABUSE-*\`, \`SEC-REQ-*\`); hands off to \`agent-privacy-officer\`. |
|
|
12724
|
+
| \`agent-privacy-officer\` | LINDDUN & GDPR/LOPDGDD privacy triad (\`DATA-ASSET-*\`, \`PRIV-ROPA-*\`, \`PRIV-REQ-*\`) + Pre-Merge \`verify:privacy\`. |
|
|
11916
12725
|
| \`agent-system-architect\` | Modular arc42 + NAF v4 architecture (\`CMP-*\`, Mermaid diagrams, \`ADR-*\`). |
|
|
11917
12726
|
| \`agent-qa-engineer\` | FAILING BDD/Gherkin, E2E, and UI suites (using agreed project tech; Happy Path, Sad Path & Boundary Values per interactive UI element) before \`agent-developer\` writes code. |
|
|
11918
12727
|
| \`agent-developer\` | Atomic tasks from \`tasks.md\`; respects autonomy mode; runs \`pnpm run check:fix\` + \`pnpm run verify:all\`. |
|
|
@@ -11935,8 +12744,8 @@ Before finalizing changes or proposing commits:
|
|
|
11935
12744
|
- **Content**: Declare completed deliverables, recommend next role(s), provide suggested invocation prompt, and **keep the Human Action Window open for the human user to take action** (review, edit by hand, pause/reroute, or delegate).
|
|
11936
12745
|
`;
|
|
11937
12746
|
var STARTER_CURSOR_PRODUCT_RULES = `---
|
|
11938
|
-
description: Directives for SDD specifications editing, ProductShape artifacts, and
|
|
11939
|
-
globs: specs/**, templates/**, product/**, security/**
|
|
12747
|
+
description: Directives for SDD specifications editing, ProductShape artifacts, Cybersecurity, and Privacy
|
|
12748
|
+
globs: specs/**, templates/**, product/**, security/**, privacy/**
|
|
11940
12749
|
alwaysApply: false
|
|
11941
12750
|
---
|
|
11942
12751
|
|
|
@@ -11955,14 +12764,17 @@ Every generated or modified artifact must follow canonical naming and satisfy it
|
|
|
11955
12764
|
- Threat Actors: \`ACT-THREAT-[SUFFIX]\` (\`schemas/security/threat-actor.schema.json\`)
|
|
11956
12765
|
- Abuse Cases: \`ABUSE-[SUFFIX]\` (\`schemas/security/abuse-case.schema.json\`)
|
|
11957
12766
|
- Security Requirements: \`SEC-REQ-[SUFFIX]\` (\`schemas/security/security-req.schema.json\`)
|
|
12767
|
+
- Data Assets: \`DATA-ASSET-[SUFFIX]\` (\`schemas/privacy/data-asset.schema.json\`)
|
|
12768
|
+
- Processing Activities (ROPA): \`PRIV-ROPA-[SUFFIX]\` (\`schemas/privacy/privacy-ropa.schema.json\`)
|
|
12769
|
+
- Privacy Requirements: \`PRIV-REQ-[SUFFIX]\` (\`schemas/privacy/privacy-req.schema.json\`)
|
|
11958
12770
|
|
|
11959
12771
|
## 2. "AI as Scribe" Protocol Rules
|
|
11960
12772
|
- **Phase 0 (New Product Inception)**: When starting a new product, conduct a 3\u20135 question discovery interview, instantiate \`ARCH-INTRO-001\` (\`naf-perspective: "Enterprise & Capability"\`) in \`draft\`, and derive \`ACT-*\`, \`UC-*\`, \`BR-*\`, \`FR-*\`, and \`QR-*\`.
|
|
11961
12773
|
- **Initial Status**: Every new artifact strictly starts with \`status: draft\`. Creating artifacts directly as \`active\` or \`approved\` is forbidden.
|
|
11962
12774
|
- **Gherkin Acceptance Criteria**: In every \`FR-*\` requirement, include a \`\`\`gherkin block with tags \`@<ID> @automated @regression\` and at least one \`Scenario Outline\` with an \`Examples\` data table.
|
|
11963
|
-
- **Security Mitigations**: Every \`SEC-REQ-*\` must include negative Gherkin tests (\`@security @mitigation\`).
|
|
12775
|
+
- **Security & Privacy Mitigations**: Every \`SEC-REQ-*\` must include negative Gherkin tests (\`@security @mitigation\`) and every \`PRIV-REQ-*\` must include Gherkin privacy scenarios (\`@privacy @gdpr\`).
|
|
11964
12776
|
- **Use Cases (User Story Structure)**: In every \`UC-*\`, the \`1. Intent and Outcome\` section must be written using the standard English structure: \`As a <ACT-ID>... I want <action>... To <outcome>...\`.
|
|
11965
|
-
- **Deterministic Validation**: Run \`pnpm run verify:schemas\` and \`pnpm run verify:
|
|
12777
|
+
- **Deterministic Validation**: Run \`pnpm run verify:schemas\`, \`pnpm run verify:duplicates\`, and \`pnpm run verify:privacy\` before presenting the draft to the human reviewer.
|
|
11966
12778
|
`;
|
|
11967
12779
|
var STARTER_CURSOR_QUALITY_RULES = `---
|
|
11968
12780
|
description: Directives for code quality, architecture, TDD, and complexity limits
|
|
@@ -11984,7 +12796,7 @@ Canonical Reference: [\`process/09_agent_protocols.md\`](process/09_agent_protoc
|
|
|
11984
12796
|
## 2. TDD Methodology, Clean Architecture & Unit Testing
|
|
11985
12797
|
- **Mandatory 4-Step Implementation Order**: (1) Define/refine Clean Architecture layers & boundaries, (2) Define interfaces/ports for all inter-module interactions to avoid direct module coupling, (3) Implement components consuming/fulfilling those interfaces, (4) Write unit tests for every function covering Happy Path, Sad Path, Boundary Values, and Unexpected/Null/Empty values.
|
|
11986
12798
|
- Apply Test-Driven Development: generate unit tests before or alongside component logic.
|
|
11987
|
-
- Tag tests linked to requirements with header comments citing the ID (\`FR
|
|
12799
|
+
- Tag tests linked to requirements with header comments citing the ID (\`FR-*\`, \`SEC-REQ-*\`, or \`PRIV-REQ-*\`) to enable reverse traceability.
|
|
11988
12800
|
- Suppressing types (\`any\`), linter rules (\`eslint-disable\`), or unit tests to force pipeline passage is prohibited.
|
|
11989
12801
|
|
|
11990
12802
|
## 3. Open Source License Policy (\`license-policy.yaml\`)
|
|
@@ -11999,7 +12811,7 @@ var STARTER_CLAUDE_RULES = `# Claude Code Instructions - AI-SDLC Monorepo
|
|
|
11999
12811
|
|
|
12000
12812
|
Canonical Reference: [\`process/09_agent_protocols.md\`](process/09_agent_protocols.md) and [\`process/01_governance_and_roles.md\`](process/01_governance_and_roles.md).
|
|
12001
12813
|
|
|
12002
|
-
This repository implements the **AI-SDLC** framework (Spec-Driven Development, deterministic quality governance, and OSS license compliance for human-agent collaboration).
|
|
12814
|
+
This repository implements the **AI-SDLC** framework (Spec-Driven Development, deterministic quality governance, Privacy-by-Design, and OSS license compliance for human-agent collaboration).
|
|
12003
12815
|
|
|
12004
12816
|
---
|
|
12005
12817
|
|
|
@@ -12008,7 +12820,7 @@ This repository implements the **AI-SDLC** framework (Spec-Driven Development, d
|
|
|
12008
12820
|
1. **FORBIDDEN TO AUTO-APPROVE OR AUTO-MERGE | PROHIBIDO AUTO-APROBAR O AUTO-FUSIONAR**: Never approve PRs or merge directly to \`main\` or protected branches. Approval is exclusively a human prerogative.
|
|
12009
12821
|
2. **FORBIDDEN TO INVENT PRODUCT OR ARCHITECTURE DECISIONS**: When facing ambiguous requirements, formulate open questions (\`open-questions\`). Never assume undocumented behaviors.
|
|
12010
12822
|
3. **FORBIDDEN TO INTRODUCE DEPENDENCIES WITHOUT LICENSE INSPECTION**: Always validate the SPDX identifier against \`license-policy.yaml\`. Viral libraries (\`GPL\`/\`AGPL\`) or paid commercial libraries (\`BSL\`/\`SSPL\`) are strictly forbidden without formal human approval.
|
|
12011
|
-
4. **FORBIDDEN TO IGNORE CYBERSECURITY (SECURITY-BY-DEFAULT)**: Validate inputs, sanitize data, and include mitigation tests (\`SEC-TEST
|
|
12823
|
+
4. **FORBIDDEN TO IGNORE CYBERSECURITY & PRIVACY (SECURITY-BY-DEFAULT & PRIVACY-BY-DEFAULT)**: Validate inputs, sanitize data, protect PII according to \`privacy-policy.yaml\`, and include mitigation tests (\`SEC-TEST-*\`, \`@privacy\`). Disabling linters or suppressing typing errors (\`any\`, \`@ts-ignore\`) is prohibited.
|
|
12012
12824
|
5. **MANDATORY CRYPTOGRAPHIC CITATION**: Every spec or sidecar must cite immutable identifiers and Unix LF-normalized SHA-256 digests.
|
|
12013
12825
|
|
|
12014
12826
|
---
|
|
@@ -12019,7 +12831,7 @@ This repository implements the **AI-SDLC** framework (Spec-Driven Development, d
|
|
|
12019
12831
|
# 1. Pre-flight with deterministic auto-fix (Gherkin & SHA-256 digests)
|
|
12020
12832
|
pnpm run check:fix
|
|
12021
12833
|
|
|
12022
|
-
# 2. Complete verification across all Quality Gates (Quality, RTM, Governance, Testing, Licenses, PDaC, Schemas, Duplicates, Security)
|
|
12834
|
+
# 2. Complete verification across all Quality Gates (Quality, RTM, Governance, Testing, Licenses, PDaC, Schemas, Duplicates, Security, Privacy)
|
|
12023
12835
|
pnpm run verify:all
|
|
12024
12836
|
|
|
12025
12837
|
# 3. Complete automated test suite (Vitest)
|
|
@@ -12047,37 +12859,41 @@ npx tsx packages/cli/src/index.ts sdd integrate --change <chg-id>
|
|
|
12047
12859
|
- **Guardrails**: \`status\` always starts in \`draft\`. Mandatory Gherkin criteria with \`@<ID> @automated @regression\`.
|
|
12048
12860
|
|
|
12049
12861
|
### 2. \`agent-threat-modeler\` (Threat Modeler and Security Specialist)
|
|
12050
|
-
- **Mission**: Analyze use cases and proactively model adversaries, STRIDE attack vectors, and OWASP ASVS mitigations, both at product level and in the technical security feedback loop over architecture
|
|
12862
|
+
- **Mission**: Analyze use cases and proactively model adversaries, STRIDE attack vectors, and OWASP ASVS mitigations, both at product level and in the technical security feedback loop over architecture, handing off to \`agent-privacy-officer\`.
|
|
12051
12863
|
- **Output**: Cybersecurity triad (\`ACT-THREAT-*\`, \`ABUSE-*\`, \`SEC-REQ-*\`) compliant with \`schemas/security/\`.
|
|
12052
12864
|
|
|
12053
|
-
### 3. \`agent-
|
|
12865
|
+
### 3. \`agent-privacy-officer\` (Data Protection & Privacy-by-Design Specialist)
|
|
12866
|
+
- **Mission**: Receive handoff from \`agent-threat-modeler\` to model personal data assets (\`DATA-ASSET-*\`), GDPR Art. 30 records of processing (\`PRIV-ROPA-*\`), and LINDDUN / GDPR / ISO 27701 privacy requirements (\`PRIV-REQ-*\`), and audit code diffs against \`privacy-policy.yaml\`.
|
|
12867
|
+
- **Directives**: Run \`pnpm run verify:privacy\`, enforce PII masking in logs/LLM prompts, and trigger \`DPIA-*\` requests on Art. 9 sensitive data.
|
|
12868
|
+
|
|
12869
|
+
### 4. \`agent-system-architect\` (System Architect)
|
|
12054
12870
|
- **Mission**: Translate the approved product definition into a modular technical architecture based on arc42 enriched with NAF v4 (\`CMP-*\`, Mermaid diagrams, \`ADR-*\`).
|
|
12055
|
-
- **Guardrails**: Declare \`satisfies-requirements\` on every \`CMP-*\` and trigger the technical security feedback loop toward \`agent-threat-modeler\` when infrastructure decisions introduce new attack vectors.
|
|
12871
|
+
- **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.
|
|
12056
12872
|
|
|
12057
|
-
###
|
|
12058
|
-
- **Mission**: Translate approved requirements (\`FR-*\`, \`SEC-REQ-*\`, \`QR-*\`) into comprehensive FAILING (red) BDD/Gherkin, End-to-End (E2E), UI, and unit test suites, before \`agent-developer\` writes production code.
|
|
12873
|
+
### 5. \`agent-qa-engineer\` (QA Engineer and SDET)
|
|
12874
|
+
- **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.
|
|
12059
12875
|
- **Guardrails**: Always use the agreed project technology/testing stack (if any). Never omit End-to-End (E2E) and UI tests. Create specific tests for every interactive UI element covering Happy Path, Sad Path, and Boundary Values. FORBIDDEN to include production code. Mandatory tags: \`@<FR-ID> @automated @regression\`.
|
|
12060
12876
|
|
|
12061
|
-
###
|
|
12877
|
+
### 6. \`agent-developer\` (Software Developer)
|
|
12062
12878
|
- **Mission**: Implement atomic tasks from SDD specifications (\`tasks.md\`) with clean, strictly typed code and thorough tests.
|
|
12063
12879
|
- **Directives**: Execute the mandatory 4-step order: (1) Clean Architecture definition/redefinition, (2) Inter-module interfaces first, (3) Component implementation, (4) Per-function unit tests (Happy Path, Sad Path, Boundary Values, Unexpected/Null/Empty values). Respect the autonomy mode. Make tests delivered by \`agent-qa-engineer\` pass green. Run \`pnpm run check:fix\` and \`pnpm run verify:all\`.
|
|
12064
12880
|
|
|
12065
|
-
###
|
|
12881
|
+
### 7. \`agent-security-auditor\` (Adversarial Code Auditor)
|
|
12066
12882
|
- **Mission**: Examine Pull Requests for business logic vulnerabilities, injection vectors, secret leaks, and authorization flaws as part of the Pre-Merge Audit Triad.
|
|
12067
12883
|
- **Directives**: Run \`pnpm run verify:security\`, evaluate CVSS v3.1 severity, and block CRITICAL/HIGH risks.
|
|
12068
12884
|
|
|
12069
|
-
###
|
|
12885
|
+
### 8. \`agent-compliance-checker\` (Open Source License Compliance Auditor)
|
|
12070
12886
|
- **Mission**: Audit dependency manifests against \`license-policy.yaml\` as part of the Pre-Merge Audit Triad.
|
|
12071
12887
|
- **Directives**: Run \`pnpm run verify:licenses\`, blocking viral (\`GPL\`, \`AGPL\`) or unapproved commercial (\`BSL\`, \`SSPL\`) packages.
|
|
12072
12888
|
|
|
12073
|
-
###
|
|
12889
|
+
### 9. \`agent-expert-user\` (Expert User and Domain Evaluator)
|
|
12074
12890
|
- **Mission**: Contrast design and specifications (design phase) and functionally validate finished software against \`UC-*\` and \`FR-*\` (post-development functional validation phase).
|
|
12075
12891
|
|
|
12076
|
-
###
|
|
12892
|
+
### 10. \`agent-code-reviewer\` (Technical and Architectural Code Reviewer)
|
|
12077
12893
|
- **Mission**: Audit Pull Requests evaluating code cleanliness, adherence to SOLID, DRY, YAGNI principles, and respect for \`quality-policy.yaml\` thresholds, forming part of the Pre-Merge Audit Triad.
|
|
12078
12894
|
- **Findings classification**: \`[BLOCKING]\`, \`[CLEAN_CODE_SUGGESTION]\`, \`[COMPLIANT]\`.
|
|
12079
12895
|
|
|
12080
|
-
###
|
|
12896
|
+
### 11. \`agent-devops\` (Automation and Infrastructure Engineer)
|
|
12081
12897
|
- **Mission**: Maintain, evolve, and audit automated project infrastructure: CI/CD workflows, Docker containers, IaC manifests, and support scripts.
|
|
12082
12898
|
- **NON-INVASION GUARDRAIL**: STRICTLY FORBIDDEN from modifying application source code (\`src/\`, \`packages/*/src/\`).
|
|
12083
12899
|
|
|
@@ -12148,8 +12964,8 @@ You operate as an assistant agent in the **AI-SDLC** repository. You are not a s
|
|
|
12148
12964
|
- If a requirement is ambiguous or incomplete, formulate open questions (\`open-questions\`) to the human user. Guessing undocumented intentions is forbidden.
|
|
12149
12965
|
3. **FORBIDDEN TO INTRODUCE DEPENDENCIES WITHOUT LICENSE INSPECTION**:
|
|
12150
12966
|
- Before suggesting or adding dependencies to manifests (\`package.json\`, etc.), validate their SPDX identifier against \`license-policy.yaml\`. Adding viral (\`GPL\`, \`AGPL\`) or commercial paid (\`BSL\`, \`SSPL\`) licenses without human authorization is prohibited.
|
|
12151
|
-
4. **FORBIDDEN TO IGNORE CYBERSECURITY (SECURITY-BY-DEFAULT)**:
|
|
12152
|
-
- All code must enforce least privilege, sanitize external inputs, and include mitigation tests (\`SEC-TEST
|
|
12967
|
+
4. **FORBIDDEN TO IGNORE CYBERSECURITY & PRIVACY (SECURITY-BY-DEFAULT & PRIVACY-BY-DEFAULT)**:
|
|
12968
|
+
- All code must enforce least privilege, sanitize external inputs, protect PII according to \`privacy-policy.yaml\`, and include mitigation tests (\`SEC-TEST-*\`, \`@privacy\`). Suppressing types (\`any\`), linters, or tests to force a green pipeline is prohibited.
|
|
12153
12969
|
5. **MANDATORY CRYPTOGRAPHIC CITATION**:
|
|
12154
12970
|
- Every specification, design, or sidecar must reference canonical identifiers and their Unix LF-normalized SHA-256 digests.
|
|
12155
12971
|
|
|
@@ -12194,7 +13010,7 @@ Non-Negotiable Quality Thresholds (\`quality-policy.yaml\`):
|
|
|
12194
13010
|
- **Conditional Activation**:
|
|
12195
13011
|
* \u{1F7E2} **\`AUTONOMOUS\` Mode** (or PR/CI final supervision): **OMITTED**. Do not interrupt unattended execution.
|
|
12196
13012
|
* \u{1F7E1} **Autonomy $\\ge$ \`HUMAN_REVIEW_PLAN\`** (\`HUMAN_REVIEW_PLAN\`, \`AMBIGUOUS\`, \`HIGH_RISK_MANUAL\`): **MANDATORY**. Emit Workflow Handoff block compliant with [\`templates/workflow/agent-handoff.template.md\`](../templates/workflow/agent-handoff.template.md) and **STOP**.
|
|
12197
|
-
- **Components**: Declare completed deliverables, recommend next roles (\`agent-threat-modeler\`, \`agent-system-architect\`, \`agent-developer\`, \`agent-security-auditor\`), provide suggested invocation prompt, and **keep the Human Action Window open at all times for the user to take action** (review, edit by hand, pause/reroute, or delegate).
|
|
13013
|
+
- **Components**: Declare completed deliverables, recommend next roles (\`agent-threat-modeler\`, \`agent-privacy-officer\`, \`agent-system-architect\`, \`agent-developer\`, \`agent-security-auditor\`), provide suggested invocation prompt, and **keep the Human Action Window open at all times for the user to take action** (review, edit by hand, pause/reroute, or delegate).
|
|
12198
13014
|
|
|
12199
13015
|
---
|
|
12200
13016
|
|
|
@@ -12203,7 +13019,8 @@ Non-Negotiable Quality Thresholds (\`quality-policy.yaml\`):
|
|
|
12203
13019
|
| Role | Mission (summary) |
|
|
12204
13020
|
| :--- | :--- |
|
|
12205
13021
|
| \`agent-product-analyst\` | Phase 0 NAF v4 Enterprise & Capability Vision (\`ARCH-INTRO-*\`, 3\u20135 question interview) + ProductShape artifacts (\`ACT-*\`, \`UC-*\`, \`FR-*\`, \`QR-*\`, \`BR-*\`); \`status\` starts \`draft\`. |
|
|
12206
|
-
| \`agent-threat-modeler\` | STRIDE/OWASP threat triad (\`ACT-THREAT-*\`, \`ABUSE-*\`, \`SEC-REQ-*\`)
|
|
13022
|
+
| \`agent-threat-modeler\` | STRIDE/OWASP threat triad (\`ACT-THREAT-*\`, \`ABUSE-*\`, \`SEC-REQ-*\`); hands off to \`agent-privacy-officer\`. |
|
|
13023
|
+
| \`agent-privacy-officer\` | LINDDUN & GDPR/LOPDGDD privacy triad (\`DATA-ASSET-*\`, \`PRIV-ROPA-*\`, \`PRIV-REQ-*\`) + Pre-Merge \`verify:privacy\`. |
|
|
12207
13024
|
| \`agent-system-architect\` | Modular arc42 + NAF v4 architecture (\`CMP-*\`, Mermaid diagrams, \`ADR-*\`). |
|
|
12208
13025
|
| \`agent-qa-engineer\` | FAILING BDD/Gherkin, E2E, and UI suites (using agreed project tech; Happy Path, Sad Path & Boundary Values per interactive UI element) before \`agent-developer\` writes production code. |
|
|
12209
13026
|
| \`agent-developer\` | Atomic tasks from \`tasks.md\`; autonomy mode must be respected; runs \`pnpm run check:fix\` + \`pnpm run verify:all\`. |
|
|
@@ -13265,6 +14082,10 @@ var STARTER_TEMPLATES_CI_GITHUB_WORKFLOWS_SDD_INTEGRATE_ON_MERGE_YML = 'name: SD
|
|
|
13265
14082
|
var STARTER_TEMPLATES_COMPLIANCE_COMMERCIAL_ACQUISITION_REQUEST_TEMPLATE_MD = '---\r\nid: REQ-LIC-ACQUISITION-001\r\ntype: license-acquisition-request\r\ntitle: Commercial License Acquisition Request for [Library]\r\nstatus: pending-approval # pending-approval, approved, rejected\r\nrequested-package: "@vendor/commercial-package"\r\nspdx-license: "BSL-1.1" # or Commercial, SSPL-1.0\r\nlicense-category: commercial_acquisition_required\r\nestimated-cost: "$1,200 / year"\r\nbusiness-justification: "Accelerates critical telemetry module development avoiding 4 months of in-house implementation."\r\n---\r\n\r\n# Commercial License Acquisition Request\r\n\r\n## 1. Package and Vendor\r\n- **Package**: `@vendor/commercial-package`\r\n- **Version**: `2.4.0`\r\n- **License Type**: BSL 1.1 / Commercial\r\n- **Official Website**: `https://vendor.example.com`\r\n\r\n## 2. Technical Justification and Evaluated Alternatives\r\n- **Why a permissive alternative (MIT/Apache 2.0) is not used**:\r\n - Open-source alternatives lack required hardware encryption protocol support.\r\n- **Impact of not acquiring the license**:\r\n - 4-month delay on product delivery milestone.\r\n\r\n## 3. Human Authorization Signatures\r\n- [ ] Tech Lead: Technical approval\r\n- [ ] Legal / IP Counsel: EULA clauses validation\r\n- [ ] Procurement / Budget Owner: Payment authorization\r\n';
|
|
13266
14083
|
var STARTER_TEMPLATES_MANUALS_PRODUCTION_MANUAL_TEMPLATE_MD = '---\r\nid: MAN-PROD-001\r\ntype: production-manual\r\ntitle: "Production & Operations Manual: Application Name"\r\nstatus: draft\r\nversion: "1.0.0"\r\nschema-version: "1.0"\r\napplies-to-version: "v1.0.0"\r\ntarget-audience:\r\n - devops-engineer\r\n - sre-engineer\r\n - release-manager\r\n - secops\r\ncomponents-covered:\r\n - CMP-NAME-001\r\nenclaves-involved:\r\n - SEC-ENC-DMZ-001\r\nsupersedes: null\r\nsuperseded-by: null\r\n---\r\n\r\n# MAN-PROD-001: Production & Operations Manual - Application Name\r\n\r\n## 1. Deterministic Release Regeneration (Reproducible Builds)\r\n\r\nThis section contains the specifications and directives required to deterministically reproduce identical bit-by-bit application artifacts or releases from their Git tag.\r\n\r\n### 1.1 Source Code Baseline\r\n\r\n- **Canonical Repository**: `https://github.com/organization/repo-name.git`\r\n- **Immutable Git Release Tag**: `v1.0.0`\r\n- **Commit SHA-256 / SHA-1**: `[VERIFIED_HEXADECIMAL_COMMIT_SHA]`\r\n- **Clean Checkout Command**:\r\n ```bash\r\n git clone --recurse-submodules https://github.com/organization/repo-name.git\r\n cd repo-name\r\n git checkout tags/v1.0.0\r\n git submodule update --init --recursive\r\n ```\r\n\r\n### 1.2 Frozen Toolchains and Build Tool Matrix\r\n\r\nTo prevent discrepancies in binary or package generation, strict usage of pinned versions of the following utilities is enforced:\r\n\r\n| Tool / Runtime | Exact Version | Toolchain Checksum / Digest | Purpose |\r\n| :--- | :--- | :--- | :--- |\r\n| **Node.js LTS** | `v22.12.0` | `sha256:node-v22.12.0-linux-x64.tar.xz` | Execution and transpilation runtime |\r\n| **pnpm** | `9.15.0` | `sha256:pnpm-v9.15.0` | Deterministic monorepo package manager |\r\n| **TypeScript (tsc)** | `5.7.2` | Pinned in `devDependencies` | Strict ECMAScript compiler |\r\n| **Docker BuildKit** | `v0.18.0` | `moby/buildkit:v0.18.0` | Hermetic OCI packaging engine |\r\n\r\n### 1.3 Libraries, Dependencies, and Vertex Graph\r\n\r\n- **Immutable Lockfile**: `pnpm-lock.yaml` (or `Cargo.lock`, `go.sum`, `requirements.lock`). Installations with open resolution are forbidden (`pnpm install --frozen-lockfile` mandatory).\r\n- **SBOM (Software Bill of Materials) Inventory**:\r\n - Format: CycloneDX JSON v1.5 / SPDX v2.3.\r\n - Compiled SBOM path: `reports/sbom-cyclonedx.json`.\r\n- **OSS License Governance**:\r\n - Binding policy: `license-policy.yaml`.\r\n - Library vertex pre-verification:\r\n ```bash\r\n pnpm verify:licenses\r\n ```\r\n\r\n### 1.4 Step-by-Step Deterministic Build Procedure\r\n\r\n1. **Step 1: Hermetic Dependency Installation**\r\n ```bash\r\n pnpm install --frozen-lockfile --ignore-scripts\r\n ```\r\n\r\n2. **Step 2: Integrity and Strict Type Checking**\r\n ```bash\r\n pnpm typecheck\r\n ```\r\n\r\n3. **Step 3: Artifact Compilation**\r\n ```bash\r\n export SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct)\r\n pnpm build\r\n ```\r\n\r\n4. **Step 4: Cryptographic Verification of Generated Artifact**\r\n ```bash\r\n sha256sum dist/app.bundle.js\r\n # Compare against the canonical checksum registered in official release:\r\n # Expected: [CANONICAL_SHA256_CHECKSUM]\r\n ```\r\n\r\n---\r\n\r\n## 2. Version, Infrastructure, and Migration Compatibility Matrix\r\n\r\nThis section defines technical interoperability boundaries between the release version and the deployment ecosystem, ensuring safe Zero-Downtime transitions.\r\n\r\n### 2.1 Platform and Execution Runtime Compatibility\r\n\r\n| Infrastructure Component | Approved Version Range | Recommended Version | Support Status |\r\n| :--- | :--- | :--- | :---: |\r\n| **Kubernetes Cluster (K8s)** | `>= 1.28` and `<= 1.31` | `1.30.2` | \u2705 Certified |\r\n| **Container Runtime (CRI)** | containerd `>= 1.7` / CRI-O `>= 1.28` | containerd `1.7.15` | \u2705 Certified |\r\n| **Base Operating System (Host)** | Ubuntu 22.04 LTS / RHEL 9.2+ | Ubuntu 22.04 LTS (Kernel 6.x) | \u2705 Homologated |\r\n| **Language Runtime (Production)** | Node.js `>= 20.x` and `<= 22.x` | `v22.12.0 LTS` | \u2705 Hermetic |\r\n\r\n### 2.2 Data Schema and Migration Compatibility (N-1 Support)\r\n\r\nTo enable Canary or Blue-Green continuous deployments without transaction loss:\r\n\r\n| Release Version | DB Schema Version | Compatible with $N-1$ Code | Schema Migration Status |\r\n| :---: | :---: | :---: | :--- |\r\n| **`v1.0.0`** (Current) | `SCHEMA-v1.0` | \u2705 Yes (supports `v0.9.x` code) | Non-destructive additive migration (no column renaming). |\r\n| **`v0.9.x`** | `SCHEMA-v0.9` | \u2705 Previous baseline | Fully compatible during Canary drain period. |\r\n\r\n### 2.3 Interoperability Between Architecture Components (`CMP-*`)\r\n\r\n| Dependent Component | Consumed Component | Minimum Compatible Versions | Binding Protocol / Contract |\r\n| :--- | :--- | :---: | :--- |\r\n| `CMP-NAME-001` (Gateway) | `CMP-NAME-002` (Backend) | `>= v1.0.0` | gRPC / Protobuf v3 (`contract_spec.proto`) |\r\n| `CMP-NAME-001` (Gateway) | Messaging Bus / Kafka | `>= 3.5.0` | Kafka v2 Protocol with TLS mTLS |\r\n\r\n### 2.4 Homologated Upgrade & Rollback Paths\r\n\r\n| Source Version | Direct Jump to `v1.0.0` | Intermediate Migration Required | Direct Rollback Procedure |\r\n| :---: | :---: | :---: | :---: |\r\n| **`v0.9.1`** | \u2705 Allowed | \u274C Not required | `kubectl rollout undo` without data loss. |\r\n| **`v0.9.0`** | \u2705 Allowed | \u274C Not required | `kubectl rollout undo` without data loss. |\r\n| **`< v0.9.0`** | \u274C Blocked | \u2705 Must upgrade to `v0.9.1` first | Requires restore from backup snapshot. |\r\n\r\n---\r\n\r\n## 3. CI/CD Architecture and Pipelines\r\n\r\n### 3.1 Hierarchical Branching Model and Integration Triggers\r\n\r\nFollowing the AI-SDLC 4-tier standard:\r\n\r\n```text\r\nTIER 1: main (Production)\r\n \u25B2\r\n \u2514\u2500\u2500 PR Release Gate (Manual Tech Lead / Release Manager Approval)\r\n \u2502\r\nTIER 2: release/v1.0.0 (Open Version Branch)\r\n \u25B2\r\n \u2514\u2500\u2500 PR Feature Gate (Lint + Tests + Quality Gate + SAST + SBOM)\r\n \u2502\r\nTIER 3: feat/CHG-001-* (Feature / Bug)\r\n```\r\n\r\n- **Pull Request Trigger**: Executes linters, full test battery, and governance verifications without deployment.\r\n- **Release Tag Trigger (`v*.*.*`)**: Executes the full hermetic build pipeline, image signing, and continuous deployment.\r\n\r\n### 3.2 CI/CD Pipeline Flowchart\r\n\r\n```mermaid\r\nflowchart LR\r\n A["Git Push / Tag v1.0.0"] --> B["Hermetic Checkout"]\r\n B --> C["Linters & Typecheck"]\r\n C --> D["Vitest: Unit & BDD"]\r\n D --> E["Quality Gate: CC & MI"]\r\n E --> F["SAST & Secret Scan"]\r\n F --> G["SBOM & License Gate"]\r\n G --> H["Deterministic Build"]\r\n H --> I["Cosign / SLSA Signing"]\r\n I --> J["Push to OCI Registry"]\r\n J --> K["Deploy to DMZ Enclave"]\r\n```\r\n\r\n### 3.3 Release Gate Contracts and Thresholds\r\n\r\n| Quality Gate | Tool / Command | Required Threshold | Action on Non-Compliance |\r\n| :--- | :--- | :--- | :--- |\r\n| **Lint & Typecheck** | `pnpm typecheck` | Zero errors, zero `any` | **Immediate failure** |\r\n| **Automated Tests** | `pnpm test:all` | 100% passed, Coverage >= 85% | **Immediate failure** |\r\n| **Cyclomatic Complexity** | `aisdlc verify quality` | CC <= 10 per function | **Release blocked** |\r\n| **Maintainability Index** | `aisdlc verify quality` | MI >= 50.0 / 100 | **Release blocked** |\r\n| **360\xB0 Traceability** | `aisdlc verify traceability` | 100% of requirements linked | **Release blocked** |\r\n| **OSS Licenses** | `aisdlc verify licenses` | Zero forbidden/viral licenses | **Release blocked** |\r\n| **Cryptographic Signature** | `cosign verify` | Valid signature from Corporate CA | **Deployment rejected** |\r\n\r\n---\r\n\r\n## 4. Production Deployment Strategy and Procedure\r\n\r\n### 4.1 Infrastructure Prerequisites and Network Enclaves\r\n\r\n- **Target Enclave**: `SEC-ENC-DMZ-001` (Strict segmentation without direct uncontrolled outbound internet access).\r\n- **Enabled Network Ports**:\r\n - Port `8443/TCP`: Secure WebSocket ingestion with mutual TLS (mTLS) authentication.\r\n - Port `9090/TCP`: Prometheus metrics (internal management network only).\r\n- **Secrets and Certificate Management**:\r\n - Server TLS and client root CA certificates mounted via immutable secret at `/etc/pki/tls/`.\r\n - Embedding cryptographic keys in environment variables or images is strictly forbidden.\r\n\r\n### 4.2 Rollout Strategy\r\n\r\nA **Canary strategy with progressive telemetry metrics analysis** is utilized:\r\n1. 10% of traffic is routed to the new version for 15 minutes.\r\n2. If the 5xx error rate is `<= 0.01%` and p99 latency is `<= 50ms`, traffic is promoted to 100%.\r\n\r\n### 4.3 Step-by-Step Deployment Procedure\r\n\r\n1. **Step 1: Pre-deployment and State Snapshot**\r\n ```bash\r\n # Check cluster health and record baseline\r\n kubectl get pods -n production -l app=system\r\n kubectl exec -it system-db-0 -- /backup/create-snapshot.sh\r\n ```\r\n\r\n2. **Step 2: Deployment Manifest Application**\r\n ```bash\r\n kubectl apply -f deploy/production/canary-deployment.yaml\r\n kubectl rollout status deployment/system-service -n production --timeout=180s\r\n ```\r\n\r\n3. **Step 3: Health Verification and Smoke Tests**\r\n ```bash\r\n curl -f --cacert /etc/pki/tls/ca.crt https://127.0.0.1:8443/healthz\r\n curl -f --cacert /etc/pki/tls/ca.crt https://127.0.0.1:8443/readyz\r\n pnpm test:example\r\n ```\r\n\r\n### 4.4 Rollback Plan (Immediate Rollback)\r\n\r\n- **Objective Rollback Activation Criteria**:\r\n - mTLS handshake failure rate `> 1.0%`.\r\n - Ingestion p99 latency `> 100ms` for 2 continuous minutes.\r\n - Critical `CrashLoopBackOff` alert on more than 20% of instances.\r\n- **Rollback Execution Command**:\r\n ```bash\r\n kubectl rollout undo deployment/system-service -n production\r\n kubectl rollout status deployment/system-service -n production\r\n ```\r\n\r\n---\r\n\r\n## 5. Likely Errors Resolution and Troubleshooting (Runbooks)\r\n\r\nThis section documents the most frequent runtime and deployment failures along with diagnosis and immediate mitigation procedures.\r\n\r\n### 5.1 Frequent Incidents and Solutions Matrix\r\n\r\n#### Incident 1: Dependency Vertex Inconsistency or Drift (Build Failure)\r\n- **Symptom**: `pnpm install --frozen-lockfile` command fails in CI with error `ERR_PNPM_LOCKFILE_OUTDATED`.\r\n- **Root Cause**: `package.json` was modified without updating `pnpm-lock.yaml`.\r\n- **Diagnosis**:\r\n ```bash\r\n git diff HEAD^ package.json pnpm-lock.yaml\r\n ```\r\n- **Mitigation**:\r\n 1. On the feature branch, run `pnpm install` locally to regenerate the deterministic lockfile.\r\n 2. Verify no restricted-license dependencies were introduced via `pnpm verify:licenses`.\r\n 3. Commit both files together in an atomic commit.\r\n\r\n---\r\n\r\n#### Incident 2: mTLS Handshake Failure or Enclave Certificate Rejected\r\n- **Symptom**: Clients receive error `ERR_TLS_CERT_ALTNAME_INVALID` or connection closed with TLS alert `certificate_unknown (46)`.\r\n- **Root Cause**: Internal root CA mounted on server does not match the client certificate issuer CA, or certificate expired.\r\n- **Diagnosis**:\r\n ```bash\r\n openssl s_client -connect 127.0.0.1:8443 -CAfile /etc/pki/tls/ca.crt -cert /etc/pki/tls/client.crt -key /etc/pki/tls/client.key\r\n openssl x509 -in /etc/pki/tls/ca.crt -noout -dates -issuer -subject\r\n ```\r\n- **Mitigation**:\r\n 1. Verify expiration date of certificate mounted in cluster Secret.\r\n 2. If expired, rotate the certificate by injecting the new pair from HSM / Vault storage.\r\n 3. Orderly restart pods with `kubectl rollout restart deployment/system-service`.\r\n\r\n---\r\n\r\n#### Incident 3: Release Gate Rejection in CI/CD Due to Quality Metrics\r\n- **Symptom**: Pipeline aborts with verdict `Quality Gate REJECTED` (Cyclomatic Complexity > 10 or Maintainability < 50).\r\n- **Root Cause**: Introduction of complex nested logic (multiple `if/else`, extensive `switch`, or branching loops).\r\n- **Diagnosis**:\r\n ```bash\r\n pnpm verify:quality\r\n ```\r\n- **Mitigation**:\r\n 1. Inspect the violation report in `reports/QUALITY_GATE_REPORT.md` to identify the offending function.\r\n 2. Decompose function into cohesive private helper methods following the rule of maximum 40 lines per function.\r\n 3. Re-run `pnpm verify:quality` until green verdict is confirmed. Adding suppression comments (`// @ts-ignore`) is forbidden.\r\n\r\n---\r\n\r\n#### Incident 4: CrashLoopBackOff Due to Memory Leak or Connection Limit\r\n- **Symptom**: Pod is terminated with exit code `ExitCode: 137` (`OOMKilled`) after a load spike.\r\n- **Root Cause**: Undrained socket buffer accumulation during high-frequency bursts.\r\n- **Diagnosis**:\r\n ```bash\r\n kubectl describe pod system-service-xxx -n production | grep -i oom\r\n kubectl logs system-service-xxx -n production --previous\r\n ```\r\n- **Mitigation**:\r\n 1. Temporarily adjust memory limits in Kubernetes manifest (`resources.limits.memory`) if the load burst is legitimate.\r\n 2. Apply backpressure or discard expired packets in accordance with business rules (`BR-*`).\r\n 3. Run local benchmark with `pnpm test:all` to audit memory consumption.\r\n\r\n---\r\n\r\n### 5.2 Escalation Protocol and Critical Incident Management\r\n\r\n| Severity Level | Impact Criterion | Maximum Response Time | Roles Involved |\r\n| :--- | :--- | :---: | :--- |\r\n| **SEV-1 (Critical)** | Complete service outage or security breach in enclave. | 15 minutes | On-call SRE + Lead Architect + SecOps |\r\n| **SEV-2 (Major)** | Severe service degradation, massive retries without outage. | 1 hour | On-call SRE + Tech Lead |\r\n| **SEV-3 (Minor)** | Isolated node incident without global SLA impact. | 4 hours | Support Engineer / DevOps |\r\n\r\n---\r\n\r\n## 6. Revision History and Version Control\r\n\r\n| Version | Date | Author / Agent | Change Description | Change Reference (Change/PR) |\r\n| :--- | :--- | :--- | :--- | :--- |\r\n| **1.0.0** | 2026-09-15 | Operations & DevOps Team | Initial Production Manual generation | CHG-009 |\r\n';
|
|
13267
14084
|
var STARTER_TEMPLATES_MANUALS_USER_MANUAL_TEMPLATE_MD = '---\r\nid: MAN-USER-001\r\ntype: user-manual\r\ntitle: "User Manual: Application Name"\r\nstatus: draft\r\nversion: "1.0.0"\r\nschema-version: "1.0"\r\napplies-to-version: "v1.0.0"\r\ntarget-audience:\r\n - ACT-ROLE-USER-001\r\n - ACT-OPERATOR-002\r\nallowed-roles:\r\n - ACT-ROLE-USER-001\r\n - ACT-OPERATOR-002\r\njourneys-covered:\r\n - JRN-JOURNEY-001\r\nuse-cases-covered:\r\n - UC-ACTION-001\r\nsupersedes: null\r\nsuperseded-by: null\r\n---\r\n\r\n# MAN-USER-001: User Manual - Application Name\r\n\r\n## 1. System Purpose and Audience\r\n\r\nConcisely describes the software\'s purpose, the operational value it delivers to end users, and the general context in which it operates.\r\n\r\n- **Application / System**: `[System Name or Bounded Context]`\r\n- **Software Version**: `v1.0.0`\r\n- **Target Audience**: `[Functional roles and user profiles addressed]`\r\n\r\n---\r\n\r\n## 2. User Role Catalog and Permissions Matrix (RBAC)\r\n\r\nThis section formally defines the roles authorized to access and operate the application, as well as the privileges assigned to each.\r\n\r\n### 2.1 Authorized Role Catalog\r\n\r\n| Role Identifier | Role Name | Associated Actor | Description & Responsibility | Enclave / Access Level |\r\n| :--- | :--- | :--- | :--- | :--- |\r\n| **`ROLE_USER`** | Standard User | `ACT-ROLE-USER-001` | Data queries and nominal business flow execution. | Corporate Network / Web UI |\r\n| **`ROLE_OPERATOR`** | System Operator | `ACT-OPERATOR-002` | Streaming supervision, alert management, and command control. | DMZ Enclave / Operational Console |\r\n\r\n### 2.2 Access and Capabilities Matrix by Role\r\n\r\n| Application Capability / Module | `ROLE_USER` | `ROLE_OPERATOR` | Authentication Mode |\r\n| :--- | :---: | :---: | :--- |\r\n| Status Query and Dashboard Visualizations | \u2705 Allowed | \u2705 Allowed | Bearer Token (OIDC/JWT) |\r\n| Business Journey Execution (`JRN-JOURNEY-001`) | \u2705 Allowed | \u2705 Allowed | Bearer Token (OIDC/JWT) |\r\n| Real-Time Streaming and Operational Control | \u274C Denied | \u2705 Allowed | mTLS + Device X.509 Certificate |\r\n| Global Parameters Configuration & Connectivity | \u274C Denied | \u2705 Allowed | Administrator Credential |\r\n\r\n---\r\n\r\n## 3. Version and User Platform Compatibility Matrix\r\n\r\nThis section specifies cross-compatibility between the current application version and user environments, clients, and formats.\r\n\r\n### 3.1 Client-Server Compatibility (APIs and SDKs)\r\n\r\n| Application Version (Backend) | Compatible CLI Version | Compatible SDK Version | Compatibility Status | Migration Notes |\r\n| :---: | :---: | :---: | :---: | :--- |\r\n| **`v1.0.0`** (Current) | `>= v1.0.0` | `>= v1.0.0` | \u2705 Fully Supported | Active canonical version. |\r\n| **`v1.0.0`** (Current) | `v0.9.x` | `v0.9.x` | \u26A0\uFE0F Degraded Mode | Requires upgrade before next minor. |\r\n| **`v1.0.0`** (Current) | `< v0.9.0` | `< v0.9.0` | \u274C Incompatible / Deprecated | Legacy endpoints decommissioned. |\r\n\r\n### 3.2 Homologated Browsers and Client Platforms\r\n\r\n| Platform / Environment | Minimum Supported Versions | Support Level | Known Constraints |\r\n| :--- | :--- | :---: | :--- |\r\n| **Google Chrome / Chromium** | Version `>= 120` | Tier 1 (Official) | Optimal WebSockets and WebGL performance. |\r\n| **Mozilla Firefox** | Version `>= 115 ESR` | Tier 1 (Official) | Full client certificate support. |\r\n| **Safari / WebKit** | Version `>= 17.0` | Tier 2 (Functional) | Requires explicit mTLS enablement in macOS Keychain. |\r\n| **Terminal / CLI (Linux / macOS / Windows)** | Node.js `>= 18` or Bash `>= 5.0` | Tier 1 (Official) | Full support on PowerShell 7+ and bash. |\r\n\r\n### 3.3 Configuration Files and Data Formats Compatibility\r\n\r\n| Format / Artifact | Source Version Supported | Automatic Conversion | User Action Required |\r\n| :--- | :---: | :---: | :--- |\r\n| **`config.yaml`** | `v0.9.x` | \u2705 Yes | None. Application migrates deprecated keys on startup. |\r\n| **Export Profiles (`.json`)** | `v0.9.x` | \u2705 Yes | 100% backward compatible. |\r\n\r\n---\r\n\r\n## 4. Application Installation, Access, and Configuration\r\n\r\n### 4.1 Access Channels and Prerequisites\r\n\r\n- **Web Portal / UI**: Access URL (e.g., `https://app.system.internal`).\r\n- **Command Line (CLI)**: Executable binary or package (e.g., `npx system-cli` or `./system-client`).\r\n- **Supported Browsers or Platforms**: Chrome >= 120, Firefox >= 120, Linux/macOS/Windows terminal.\r\n\r\n### 4.2 Client Configuration and Environment Variables\r\n\r\nThe application allows parameterizing its behavior via environment variables or local configuration files:\r\n\r\n| Parameter / Variable | Type | Default Value | Required | Description |\r\n| :--- | :--- | :--- | :---: | :--- |\r\n| `API_ENDPOINT` | URL | `https://api.system.internal/v1` | Yes | Base backend API endpoint. |\r\n| `WS_STREAM_URL` | WSS URL | `wss://stream.system.internal/telemetry` | No | Real-time telemetry or notifications socket. |\r\n| `CLIENT_TIMEOUT_MS` | Integer | `5000` | No | Network response timeout in milliseconds. |\r\n| `AUTH_PROFILE` | String | `production` | No | Active authentication profile (`development`, `staging`, `production`). |\r\n\r\n### 4.3 Local Configuration File (`config.yaml` / `.env`)\r\n\r\nExample recommended configuration for operator workstations:\r\n\r\n```yaml\r\n# Client configuration file: config.yaml\r\nprofile: production\r\nnetwork:\r\n api_endpoint: "https://api.system.internal/v1"\r\n stream_url: "wss://stream.system.internal/telemetry"\r\n timeout_ms: 5000\r\n retry_attempts: 3\r\n\r\nsecurity:\r\n tls_verify: true\r\n client_cert_path: "/etc/pki/client/operator.crt"\r\n client_key_path: "/etc/pki/client/operator.key"\r\n\r\nui:\r\n theme: "dark"\r\n refresh_interval_sec: 1\r\n```\r\n\r\n---\r\n\r\n## 5. Step-by-Step Journey Execution Guide (`JRN-*`)\r\n\r\nEach subsection documents an end-to-end Journey, specifying authorized execution roles, starting conditions, and the step-by-step operating procedure.\r\n\r\n### 5.1 `JRN-JOURNEY-001`: User Journey Name\r\n\r\n- **Linked Use Case**: `UC-ACTION-001`\r\n- **Primary Actor**: `ACT-ROLE-USER-001`\r\n- **Authorized Roles**: `ROLE_USER`, `ROLE_OPERATOR`\r\n- **Required Execution Enclave**: Corporate Intranet or VPN access\r\n\r\n#### A. Preconditions\r\n1. User must have an active and authenticated session with their authorized role.\r\n2. The base entity or resource must be in `ACTIVE` state.\r\n\r\n#### B. Step-by-Step Procedure\r\n\r\n1. **Step 1: Operation Initiation**\r\n - **Action**: User navigates to the execution section or invokes the corresponding command:\r\n ```bash\r\n system-cli execute --journey JRN-JOURNEY-001 --input payload.json\r\n ```\r\n - **Required Input**: Resource identifier and validated parameters.\r\n - **Expected On-Screen Response**: System displays confirmation dialog with operation summary.\r\n\r\n2. **Step 2: Validation and Submission**\r\n - **Action**: User reviews parameters and confirms execution.\r\n - **System Behavior**: Client locally validates data schema and transmits signed request.\r\n\r\n3. **Step 3: Observable Outcome Verification**\r\n - **Success Outcome**: Console / interface displays success message `MSG-SUCCESS-001` with generated unique transaction ID.\r\n - **Final State**: Resource transitions to `PROCESSED` state.\r\n\r\n#### C. Alternative Flows and Exception Handling\r\n- **Unauthorized Access**: If an unauthorized role attempts to invoke the journey, the system blocks the action, outputs code `MSG-ERR-AUTH-403`, and records the access attempt in the audit trail.\r\n- **Connection Loss in Transit**: If connection is lost during step 2, client retries with exponential backoff up to 3 times before notifying user.\r\n\r\n---\r\n\r\n## 6. System Messages Catalog and Response Codes\r\n\r\nStructured matrix of key informational, warning, and error messages emitted by the application during its operational lifecycle:\r\n\r\n| Code | Severity | Literal Screen Message | Trigger / Context | Meaning for User | Recommended Corrective Action |\r\n| :--- | :--- | :--- | :--- | :--- | :--- |\r\n| **`MSG-SYS-100`** | `INFO` | `"Connection established successfully with server"` | Successful network handshake upon initializing session. | Application is online and ready to process commands. | None. Normal operation. |\r\n| **`MSG-SYS-200`** | `INFO` | `"Operation completed successfully. Transaction ID: [TX-ID]"` | Successful completion of a Journey or Use Case. | Transaction was persisted and acknowledged by backend. | Save `TX-ID` for tracking if required. |\r\n| **`MSG-WARN-301`** | `WARN` | `"High link latency (>500ms). Degraded mode active"` | Response metric exceeds real-time threshold. | Screen data may experience slight refresh delays. | Check network connection quality or bandwidth. |\r\n| **`MSG-WARN-302`** | `WARN` | `"Session expiring in 5 minutes"` | Authentication token approaching TTL expiry. | User will be logged out unless credential is refreshed. | Renew session by clicking alert or re-authenticating. |\r\n| **`MSG-ERR-401`** | `ERR-USER` | `"Invalid credentials or expired token. Access denied"` | Login authentication failure or expired token. | User identity could not be validated. | Re-enter credentials or request a new token. |\r\n| **`MSG-ERR-403`** | `ERR-USER` | `"Unauthorized action for assigned role [ROLE]"` | Attempted execution of Journey or command outside RBAC. | User role lacks permissions for this resource. | Contact administrator to request permission expansion. |\r\n| **`MSG-ERR-422`** | `ERR-USER` | `"Invalid payload: field [FIELD] does not match schema"` | Syntactic validation or business rule (`BR-*`) failure. | User-supplied data is invalid. | Correct indicated fields according to business rule. |\r\n| **`MSG-ERR-503`** | `ERR-SYS` | `"Service temporarily unavailable. Retrying..."` | Backend gateway unreachable or under scheduled maintenance. | Central server is not responding to requests. | Await automatic retries or check system status page. |\r\n\r\n---\r\n\r\n## 7. Frequently Asked Questions (FAQ) and Support\r\n\r\n- **What should I do if I lose connectivity while executing a Journey?** \r\n The application implements idempotency mechanisms. Once network connectivity is restored, verify resource status before retrying to prevent duplicate transactions.\r\n- **How do I request a user role change?** \r\n Contact the Security Administrator (`SecOps`) referencing your user ID and operational justification for the role change.\r\n\r\n---\r\n\r\n## 8. Revision History and Version Control\r\n\r\n| Version | Date | Author / Agent | Change Description | Change Reference (Change/PR) |\r\n| :--- | :--- | :--- | :--- | :--- |\r\n| **1.0.0** | 2026-09-15 | Documentation & Product Team | Initial User Manual generation | CHG-009 |\r\n';
|
|
14085
|
+
var STARTER_TEMPLATES_PRIVACY_DATA_ASSET_TEMPLATE_MD = '---\nid: DATA-ASSET-USER-PROFILE-001\ntype: data-asset\ntitle: User Profile & Identity Personal Data Asset\nstatus: draft\nversion: "1.0.0"\nschema-version: "1.0"\nclassification: confidential-pii # public, internal, confidential-pii, special-category-sensitive\npii-categories:\n - identifiers\n - contact\ndata-subjects:\n - ACT-USER-001\nfields:\n - name: email\n sensitivity: pii\n masking-strategy: sha256-salt\n - name: phone_number\n sensitivity: pii\n masking-strategy: redact\n - name: operator_callsign\n sensitivity: internal\n masking-strategy: none\nretention-period: 365d\nerasure-method: crypto-shredding\nowner-bounded-context: CMP-IDENTITY-SERVICE-001\nsupersedes: null\nsuperseded-by: null\n---\n\n# DATA-ASSET-USER-PROFILE-001: User Profile & Identity Personal Data Asset\n\n## 1. Data Asset Inventory & Purpose\nDescribes the structure, storage medium, and operational boundary of the personal data asset governed under GDPR / ISO 27701.\n\n## 2. Field-Level Sensitivity & Masking Policy\n\n| Field Name | Sensitivity | Masking / Pseudonymization Strategy | Allowed in Logs | Allowed in AI Prompts |\n| :--- | :--- | :--- | :---: | :---: |\n| `email` | `pii` | `sha256-salt` | \u274C No | \u274C No |\n| `phone_number` | `pii` | `redact` | \u274C No | \u274C No |\n| `operator_callsign` | `internal` | `none` | \u2705 Yes | \u2705 Yes |\n\n## 3. Storage Limitation & Right to Erasure (GDPR Art. 17)\n- **Maximum Retention TTL**: `365d` after account deactivation.\n- **Erasure Mechanism**: `crypto-shredding` (destruction of per-subject encryption key and PII column purge).\n\n---\n\n## 4. Revision History and Version Control\n\n| Version | Date | Author / Agent | Change Description | Change Reference (Change/PR) |\n| :--- | :--- | :--- | :--- | :--- |\n| **1.0.0** | 2026-10-17 | Privacy Officer (`agent-privacy-officer`) | Initial personal data asset inventory | CHG-PRIV-001 |\n';
|
|
14086
|
+
var STARTER_TEMPLATES_PRIVACY_DPIA_REQUEST_TEMPLATE_MD = '---\nid: DPIA-ASSESSMENT-001\ntype: dpia-request\ntitle: Data Protection Impact Assessment (DPIA / EIPD) Request\nstatus: pending-dpo-approval # pending-dpo-approval, approved, rejected\nversion: "1.0.0"\nschema-version: "1.0"\nropa-reference: PRIV-ROPA-USER-AUTH-001\ndata-assets:\n - DATA-ASSET-USER-PROFILE-001\nspecial-category-triggers:\n - "GDPR Art. 9 Special Category Data or Automated Profiling"\nresidual-risk-level: MEDIUM # LOW, MEDIUM, HIGH\n---\n\n# Data Protection Impact Assessment (DPIA / EIPD \u2014 GDPR Art. 35)\n\n## 1. Trigger & Necessity Assessment\n- **Associated ROPA**: `PRIV-ROPA-USER-AUTH-001`\n- **Data Assets Affected**: `DATA-ASSET-USER-PROFILE-001`\n- **Why a DPIA is Mandatory**: Processing involves `special_category_sensitive` data (biometrics, health, precise geolocation) or systematic automated profiling under GDPR Art. 35.\n\n## 2. Necessity, Proportionality & LINDDUN Risk Matrix\n\n| LINDDUN Threat Category | Identified Privacy Risk | Intrinsic Risk | Technical Mitigation (`PRIV-REQ-*`) | Residual Risk |\n| :--- | :--- | :---: | :--- | :---: |\n| **Identifiability** | Re-identification of operator from telemetry streams | HIGH | `PRIV-REQ-MASKING-001` (SHA-256 salted pseudonymization) | LOW |\n| **Disclosure of Information** | Plaintext PII leakage in error logs | HIGH | `PRIV-REQ-MASKING-001` (Redaction middleware) | LOW |\n\n## 3. Mandatory Human Sovereign Signatures (DPO & Legal)\n- [ ] **Data Protection Officer (DPO)**: Necessity, proportionality, and GDPR Art. 35 validation\n- [ ] **Legal / Privacy Counsel**: Lawful basis and cross-border transfer clauses verified\n- [ ] **Security Officer (CISO) / System Architect**: Cryptographic and enclave controls verified\n';
|
|
14087
|
+
var STARTER_TEMPLATES_PRIVACY_PRIVACY_REQ_TEMPLATE_MD = '---\nid: PRIV-REQ-MASKING-001\ntype: privacy-requirement\ntitle: Mandatory Pseudonymization and Log Redaction of Operator PII\nstatus: draft\nversion: "1.0.0"\nschema-version: "1.0"\nprivacy-principle: data-minimization # data-minimization, purpose-limitation, storage-limitation, accuracy, integrity-and-confidentiality, transparency-and-consent, data-subject-rights-arco, pseudonymization-anonymization\nlinddun-category: identifiability # linkability, identifiability, non-repudiation, detectability, disclosure-of-information, unawareness, non-compliance\ngoverns-ropa:\n - PRIV-ROPA-USER-AUTH-001\nprotects-data-assets:\n - DATA-ASSET-USER-PROFILE-001\nenforced-in-enclave: SEC-ENC-DMZ-001\ncompliance-references:\n - "GDPR-Art-25-Privacy-by-Design"\n - "GDPR-Art-32-Pseudonymization"\n - "ISO-27701-A.7.4"\nacceptance-format: gherkin\ncucumber-tags:\n - "@PRIV-REQ-MASKING-001"\n - "@privacy"\n - "@linddun"\nsupersedes: null\nsuperseded-by: null\n---\n\n# PRIV-REQ-MASKING-001: Mandatory Pseudonymization and Log Redaction of Operator PII\n\n## 1. Technical Privacy Control Statement\nThe system MUST pseudonymize or redact all `confidential-pii` fields (`email`, `phone_number`) prior to emitting structured application logs, telemetry traces, or external AI prompts, and MUST enforce automated TTL purge after `365d`.\n\n---\n\n## 2. Upstream Privacy Traceability (PDaC)\n\n| Dimension | Link / Artifact | Relationship Type | Status |\n| :--- | :--- | :--- | :--- |\n| **Record of Processing (ROPA)** | `PRIV-ROPA-USER-AUTH-001` | Governs Processing Activity | Validated |\n| **Protected Data Asset** | `DATA-ASSET-USER-PROFILE-001` | Enforces Field Masking & TTL | Validated |\n\n---\n\n## 3. Privacy Verification Criteria in Gherkin Format (Cucumber Privacy Tests)\n\n```gherkin\n@PRIV-REQ-MASKING-001 @privacy @linddun\nFeature: Personal Data Pseudonymization and Zero-PII Telemetry Logging\n As a Data Protection Officer (DPO)\n I want all personal identifiers to be redacted or salted-hashed before logging\n So that application logs and telemetry never expose raw personal data\n\n Scenario: Structured logger redacts PII fields automatically (Nominal Privacy Control)\n Given an authenticated operator session with email "operator@example.com" and phone "+34600112233"\n When the telemetry ingestion service emits an audit log entry\n Then the serialized log payload must not contain the literal string "operator@example.com"\n And the serialized log payload must not contain the literal string "+34600112233"\n And the email field must be replaced by a deterministic SHA-256 salted pseudonym\n\n Scenario: Right to erasure purges expired or revoked subject records\n Given a personal data record for subject "ACT-USER-001" exceeding the "365d" retention TTL\n When the automated retention enforcement job executes\n Then the personal data fields must be irreversibly erased via crypto-shredding\n```\n\n---\n\n## 4. Revision History and Version Control\n\n| Version | Date | Author / Agent | Change Description | Change Reference (Change/PR) |\n| :--- | :--- | :--- | :--- | :--- |\n| **1.0.0** | 2026-10-17 | Privacy Officer (`agent-privacy-officer`) | Initial privacy control specification | CHG-PRIV-001 |\n';
|
|
14088
|
+
var STARTER_TEMPLATES_PRIVACY_PRIVACY_ROPA_TEMPLATE_MD = '---\nid: PRIV-ROPA-USER-AUTH-001\ntype: privacy-ropa\ntitle: Record of Processing Activity for Operator Authentication and Session Audit\nstatus: draft\nversion: "1.0.0"\nschema-version: "1.0"\nlawful-basis: contract # consent, contract, legal-obligation, vital-interests, public-task, legitimate-interests\nspecial-category-condition: null\nprocessing-purpose: "Authenticate authorized operators and maintain tamper-evident operational session audit trails."\nuse-cases:\n - UC-ACTION-001\ndata-assets:\n - DATA-ASSET-USER-PROFILE-001\ndata-subjects:\n - ACT-USER-001\nretention-ttl: 365d\ncross-border-transfer: false\ntransfer-safeguards: null\nsubprocessors: []\ndpia-required: false\ndpia-reference: null\nmitigated-by:\n - PRIV-REQ-MASKING-001\nsupersedes: null\nsuperseded-by: null\n---\n\n# PRIV-ROPA-USER-AUTH-001: Record of Processing Activity (GDPR Art. 30)\n\n## 1. Processing Activity Summary & Lawful Basis\n- **Lawful Basis (GDPR Art. 6.1)**: `contract` \u2014 Necessary for the performance of the operator service agreement.\n- **Purpose of Processing**: Authenticate authorized operators and maintain tamper-evident operational session audit trails.\n\n## 2. Linked Product & Data Artifacts\n\n| Dimension | Artifact ID | Relationship |\n| :--- | :--- | :--- |\n| **Triggering Use Cases** | `UC-ACTION-001` | Initiates personal data collection/processing |\n| **Data Assets Processed** | `DATA-ASSET-USER-PROFILE-001` | Personal data fields subject to minimization |\n| **Data Subjects** | `ACT-USER-001` | Natural persons whose data is processed |\n| **Governing Privacy Controls** | `PRIV-REQ-MASKING-001` | Technical privacy-by-design controls |\n\n## 3. International Transfers & Subprocessors\n- **Cross-Border Transfer Outside EEA**: `false`\n- **Authorized Subprocessors**: None (In-house processing within `SEC-ENC-DMZ-001`).\n\n---\n\n## 4. Revision History and Version Control\n\n| Version | Date | Author / Agent | Change Description | Change Reference (Change/PR) |\n| :--- | :--- | :--- | :--- | :--- |\n| **1.0.0** | 2026-10-17 | Privacy Officer (`agent-privacy-officer`) | Initial GDPR Art. 30 ROPA entry | CHG-PRIV-001 |\n';
|
|
13268
14089
|
var STARTER_TEMPLATES_PRODUCT_ACTOR_TEMPLATE_MD = '---\r\nid: ACT-NAME-001\r\ntype: actor\r\ntitle: Descriptive Actor Title\r\nstatus: draft\r\nversion: "1.0.0"\r\nschema-version: "1.0"\r\nrole-type: human-user # human-user, ai-agent, external-system, sensor-iot\r\ndescription: One-sentence summary of the role this actor performs in the system.\r\nsupersedes: null\r\nsuperseded-by: null\r\n---\r\n\r\n# ACT-NAME-001: Descriptive Actor Title\r\n\r\n## 1. Profile and Responsibility\r\nDescribes who this actor is, their operational context, and what goals they pursue when interacting with the product.\r\n\r\n## 2. System Touchpoints\r\n- Interaction channels (Web UI, REST API, WebSocket, Messaging).\r\n- Privilege level and latency/availability expectations.\r\n\r\n---\r\n\r\n## 3. Revision History and Version Control\r\n\r\n| Version | Date | Author / Agent | Change Description | Change Reference (Change/PR) |\r\n| :--- | :--- | :--- | :--- | :--- |\r\n| **1.0.0** | 2026-09-03 | Product Owner / Analyst | Initial actor profile creation | CHG-INIT-001 |\r\n';
|
|
13269
14090
|
var STARTER_TEMPLATES_PRODUCT_BUSINESS_RULE_TEMPLATE_MD = '---\r\nid: BR-DOMAIN-001\r\ntype: business-rule\r\ntitle: Business Rule Name\r\nstatus: draft\r\nversion: "1.0.0"\r\nschema-version: "1.0"\r\nenforcement-level: strict-invariant # strict-invariant, override-with-approval, guideline\r\ndefined-in: BC-CONTEXT-001\r\nuses-terms:\r\n - TERM-TERM-001\r\nsupersedes: null\r\nsuperseded-by: null\r\n---\r\n\r\n# BR-DOMAIN-001: Business Rule Name\r\n\r\n## 1. Rule Definition\r\nFormally establishes the business invariant that must not be violated under any circumstance.\r\n\r\n## 2. Business Rationale and Consequences\r\n- **Why it exists**: Economic, regulatory, or technical justification for the constraint.\r\n- **Action upon violation**: Immediate transaction rejection with a formal error code.\r\n\r\n---\r\n\r\n## 3. Revision History and Version Control\r\n\r\n| Version | Date | Author / Agent | Change Description | Change Reference (Change/PR) |\r\n| :--- | :--- | :--- | :--- | :--- |\r\n| **1.0.0** | 2026-09-03 | Product Owner / Analyst | Initial business rule definition | CHG-INIT-001 |\r\n';
|
|
13270
14091
|
var STARTER_TEMPLATES_PRODUCT_JOURNEY_TEMPLATE_MD = '---\r\nid: JRN-NAME-001\r\ntype: journey\r\ntitle: Descriptive User or Operator Journey Title\r\nstatus: draft\r\nversion: "1.0.0"\r\nschema-version: "1.0"\r\npersona: ACT-OPERATOR-001\r\nstages:\r\n - "Discovery and Planning"\r\n - "Configuration and Pre-flight"\r\n - "Mission Execution"\r\n - "Post-Analysis and Wrap-up"\r\ntouchpoints:\r\n - "Mission planning web portal"\r\n - "Ground control station (GCS)"\r\n - "Real-time telemetry dashboard"\r\n - "Flight report exporter"\r\nrelated-use-cases:\r\n - UC-PLAN-MISSION-001\r\n - UC-MONITOR-FLIGHT-001\r\npain-points:\r\n - "Latency when loading offline navigation maps"\r\n - "Complexity in manual flight plan reconciliation"\r\nsupersedes: null\r\nsuperseded-by: null\r\n---\r\n\r\n# JRN-NAME-001: Descriptive User or Operator Journey Title\r\n\r\n## 1. Actor / Primary Persona Profile\r\n- **Protagonist Actor**: `ACT-OPERATOR-001`\r\n- **Main Goal**: Complete operational workflow with high efficiency, safety, and real-time visibility.\r\n\r\n---\r\n\r\n## 2. Journey Stages Map\r\n\r\n| Stage | User Goal | Touchpoints | Frictions / Pain Points |\r\n| :--- | :--- | :--- | :--- |\r\n| **1. Discovery and Planning** | Design route and validate operational constraints | Mission planning web portal | Complexity in manual flight plan reconciliation |\r\n| **2. Configuration and Pre-flight** | Verify subsystem health and link integrity | Ground control station (GCS) | Latency when loading offline navigation maps |\r\n| **3. Mission Execution** | Supervise telemetry and respond to alerts | Real-time telemetry dashboard | None detected in nominal flow |\r\n| **4. Post-Analysis and Wrap-up** | Export mission logs and performance metrics | Flight report exporter | Telemetry consolidation latency |\r\n\r\n---\r\n\r\n## 3. Traceability to Use Cases and Product\r\n\r\n- `UC-PLAN-MISSION-001`: Planning and validation of safe corridors.\r\n- `UC-MONITOR-FLIGHT-001`: Ingestion and visualization of real-time telemetry.\r\n\r\n---\r\n\r\n## 4. Revision History\r\n\r\n| Version | Date | Author / Agent | Change Description | Change Reference (Change/PR) |\r\n| :--- | :--- | :--- | :--- | :--- |\r\n| **1.0.0** | 2026-09-23 | Product Manager / UX Lead | Initial operator journey definition | CHG-INIT-001 |\r\n';
|
|
@@ -13316,10 +14137,10 @@ Describes the adversary's profile, technical skill level, available resources, a
|
|
|
13316
14137
|
| :--- | :--- | :--- | :--- | :--- |\r
|
|
13317
14138
|
| **1.0.0** | 2026-09-03 | Security Officer / Threat Modeler | Initial threat profile characterization | CHG-SEC-001 |\r
|
|
13318
14139
|
`;
|
|
13319
|
-
var STARTER_TEMPLATES_WORKFLOW_AGENT_HANDOFF_TEMPLATE_MD = '# Workflow Handoff Template\r\n\r\n> **Canonical reference:** [`process/09_agent_protocols.md`](../../process/09_agent_protocols.md) and [`process/01_governance_and_roles.md`](../../process/01_governance_and_roles.md).\r\n>\r\n> **Activation Criterion by Autonomy Mode:**\r\n> - \u{1F7E2} **`AUTONOMOUS` (or exclusive supervision at the end in PR/CI):** OMITTED. The agent executes and delivers without interrupting the user with this handoff block.\r\n> - \u{1F7E1} **`HUMAN_REVIEW_PLAN` | \u{1F7E0} `AMBIGUOUS` | \u{1F534} `HIGH_RISK_MANUAL`:** MANDATORY. Upon completing the phase or proposal, the agent emits this block and **halts**, granting visibility to the user and relinquishing control.\r\n\r\n---\r\n\r\n### \u{1F504} Workflow Handoff\r\n\r\n- **Completed Phase / Activity**: `[Current phase, e.g. Product Definition / Threat Modeling / Architecture / SDD Implementation]`\r\n- **Acting Role**: `[agent-product-analyst | agent-threat-modeler | agent-system-architect | agent-developer | agent-expert-user | agent-security-auditor | agent-compliance-checker]`\r\n- **Task Autonomy Mode**: `[HUMAN_REVIEW_PLAN | AMBIGUOUS | HIGH_RISK_MANUAL]`\r\n- **Produced Deliverables**:\r\n - [x] `[Path or ID of generated artifact, e.g. specs/product/uc-mission.md]`\r\n - [x] `[Path or ID of generated artifact, e.g. quality-report.md]`\r\n\r\n- **Recommended Next Role(s) in Workflow**:\r\n - `[Suggested role name, e.g. agent-threat-modeler]`: `[Technical rationale, e.g. Model STRIDE adversaries and mitigate abuse cases]`\r\n - *(Optional)* `[Alternative role, e.g. agent-expert-user]`: `[Technical rationale, e.g. Evaluate UX and MVP boundary]`\r\n\r\n- **Suggested Invocation Prompt**:\r\n > "Act as `[next-role]` and proceed with the `[next phase]` phase on the generated deliverables: `[key artifacts]`."\r\n\r\n- **Human Action Window (User Sovereignty and Priority)**:\r\n - \u270B **Review and Validate**: Inspect generated artifacts and validate alignment with project vision before proceeding.\r\n - \u270F\uFE0F **Edit Directly**: Modify requirements, code, or acceptance criteria directly at any time.\r\n - \u{1F6D1} **Pause, Divert, or Discard**: Freeze workflow, redirect toward another goal, or discard proposal.\r\n - \u25B6\uFE0F **Delegate to Next Agent**: If satisfied with output, execute suggested prompt to continue the chain.\r\n\r\n---\r\n';
|
|
14140
|
+
var STARTER_TEMPLATES_WORKFLOW_AGENT_HANDOFF_TEMPLATE_MD = '# Workflow Handoff Template\r\n\r\n> **Canonical reference:** [`process/09_agent_protocols.md`](../../process/09_agent_protocols.md) and [`process/01_governance_and_roles.md`](../../process/01_governance_and_roles.md).\r\n>\r\n> **Activation Criterion by Autonomy Mode:**\r\n> - \u{1F7E2} **`AUTONOMOUS` (or exclusive supervision at the end in PR/CI):** OMITTED. The agent executes and delivers without interrupting the user with this handoff block.\r\n> - \u{1F7E1} **`HUMAN_REVIEW_PLAN` | \u{1F7E0} `AMBIGUOUS` | \u{1F534} `HIGH_RISK_MANUAL`:** MANDATORY. Upon completing the phase or proposal, the agent emits this block and **halts**, granting visibility to the user and relinquishing control.\r\n\r\n---\r\n\r\n### \u{1F504} Workflow Handoff\r\n\r\n- **Completed Phase / Activity**: `[Current phase, e.g. Product Definition / Threat Modeling / Privacy Modeling / Architecture / SDD Implementation]`\r\n- **Acting Role**: `[agent-product-analyst | agent-threat-modeler | agent-privacy-officer | agent-system-architect | agent-developer | agent-expert-user | agent-security-auditor | agent-compliance-checker]`\r\n- **Task Autonomy Mode**: `[HUMAN_REVIEW_PLAN | AMBIGUOUS | HIGH_RISK_MANUAL]`\r\n- **Produced Deliverables**:\r\n - [x] `[Path or ID of generated artifact, e.g. specs/product/uc-mission.md]`\r\n - [x] `[Path or ID of generated artifact, e.g. quality-report.md]`\r\n\r\n- **Recommended Next Role(s) in Workflow**:\r\n - `[Suggested role name, e.g. agent-threat-modeler]`: `[Technical rationale, e.g. Model STRIDE adversaries and mitigate abuse cases]`\r\n - *(Optional)* `[Alternative role, e.g. agent-expert-user]`: `[Technical rationale, e.g. Evaluate UX and MVP boundary]`\r\n\r\n- **Suggested Invocation Prompt**:\r\n > "Act as `[next-role]` and proceed with the `[next phase]` phase on the generated deliverables: `[key artifacts]`."\r\n\r\n- **Human Action Window (User Sovereignty and Priority)**:\r\n - \u270B **Review and Validate**: Inspect generated artifacts and validate alignment with project vision before proceeding.\r\n - \u270F\uFE0F **Edit Directly**: Modify requirements, code, or acceptance criteria directly at any time.\r\n - \u{1F6D1} **Pause, Divert, or Discard**: Freeze workflow, redirect toward another goal, or discard proposal.\r\n - \u25B6\uFE0F **Delegate to Next Agent**: If satisfied with output, execute suggested prompt to continue the chain.\r\n\r\n---\r\n';
|
|
13320
14141
|
var STARTER__GITHUB_PULL_REQUEST_TEMPLATE_MD = "## 1. SDD Identification and Traceability\r\n\r\n- **SDD Change Specification**: `specs/changes/active/<change-id>/` <!-- Link to active change directory -->\r\n- **PDaC Handoff Sidecar**: `specs/changes/active/<change-id>/handoff.yaml` <!-- ID: HOF-* -->\r\n- **Git Hierarchy Tier (4 Tiers)**:\r\n - [ ] Tier 4: `task/<PARENT-ID>/<TSK-ID>-<slug>` \u2794 `feat/<PARENT-ID>-<slug>`\r\n - [ ] Tier 3: `feat/<FEAT-ID>-<slug>` \u2794 `release/vX.Y.Z`\r\n - [ ] Tier 2: `release/vX.Y.Z` \u2794 `main`\r\n- **Linked Issues**: Closes #... / Refs #...\r\n\r\n---\r\n\r\n## 2. \u{1F4CB} Plan Execution Matrix and Testing Status (`X` vs `O`)\r\n\r\n> [!IMPORTANT]\r\n> **Non-Negotiable Total Exhaustiveness Rule**:\r\n> This table must include **each and every item identified for implementation** in the delivery plan (originating from `tasks.md`, the SDD specification, or issue criteria), without omitting any or creating abstract groupings.\r\n>\r\n> **Mandatory Marking Convention**:\r\n> - **`[X]` (Completed and Tested)**: Item is 100% implemented and has verifiable automated tests on disk (`tests/` or `.feature`) passing green.\r\n> - **`[O]` (Problem / Blocked)**: If there was any issue, technical limitation, failing test, or deferred scope, it must be marked with `[O]` and **full mandatory justification is required**:\r\n> 1. **Technical root cause** or encountered limitation.\r\n> 2. **Impact** on increment or system.\r\n> 3. **Mitigation** or rationale for deferral.\r\n> 4. **Formal reference** to tracking issue (GitHub Issue or `ADR-TECH-DEBT-*`).\r\n>\r\n> *Any PR with omitted planned items or unjustified `[O]` will be immediately blocked and rejected by the Tech Lead.*\r\n\r\n| Task / Item ID | Planned Description | Status (`[X]` / `[O]`) | Test Evidence on Disk or Mandatory Justification of `[O]` |\r\n| :--- | :--- | :---: | :--- |\r\n| `TSK-001` | <!-- e.g. Contract DTOs and Interfaces Definition --> | **[X]** | Covered in `tests/unit/dto.spec.ts` (100% pass) |\r\n| `TSK-002` | <!-- e.g. Network disconnection resilience --> | **[O]** | **Root cause:** TCP socket mock exhibits race conditions in CI.<br>**Impact:** Low in prod, flaky test.<br>**Mitigation:** Temporary extended timeout; tracked in issue #... |\r\n\r\n---\r\n\r\n## 3. \u{1F5FA}\uFE0F Weak Points Map and Risk Hotspots (Weak Points Hotspots)\r\n\r\n### A. Complexity Hotspots\r\n<!-- Record functions nearing quality-policy.yaml thresholds: CC > 7 (max 10), Cognitive > 10 (max 15), LOC > 30 (max 40), MI < 70 (min 50/65) -->\r\n| File | Function / Module | Metrics (CC / Cognitive / LOC / MI) | Technical Maintainability Justification |\r\n| :--- | :--- | :---: | :--- |\r\n| <!-- e.g. src/engine.ts --> | <!-- parsePayload() --> | CC: 8, Cog: 11, LOC: 32, MI: 72 | Deterministic parser without recursion; exhaustively tested. |\r\n\r\n### B. Edge Cases and Blind Spots\r\n<!-- Scenarios not covered by automated unit tests (concurrency, network timeouts, memory, jitter) -->\r\n- [ ] **Edge Case 1**: <!-- Scenario description, estimated risk, and operational mitigation -->\r\n- [ ] **Edge Case 2**: <!-- Scenario description, estimated risk, and operational mitigation -->\r\n\r\n### C. AI Assumptions\r\n<!-- Behaviors or heuristics assumed by the agent during implementation that require critical human review -->\r\n- [ ] **Assumption 1**: <!-- e.g. Assumed payload always arrives pre-parsed in UTF-8 -->\r\n- [ ] **Assumption 2**: <!-- e.g. Default timeout set to 5000ms as not stipulated in spec -->\r\n\r\n---\r\n\r\n## 4. \u{1F6E1}\uFE0F Attack Surface and Cybersecurity (STRIDE / Zero Trust)\r\n\r\n- [ ] **New External Channels**: Does it introduce HTTP endpoints, sockets, IPC channels, or brokers?\r\n- [ ] **Sanitization and Inputs**: Are all external inputs validated with strict typing schemas (Zod/JSON Schema)?\r\n- [ ] **Insecure Serialization**: Is polymorphic deserialization or dynamic code evaluation avoided?\r\n- [ ] **Secrets and Enclaves**: Are cryptographic keys, credentials, sensitive env vars, or enclaves (`SEC-ENC-*`) handled?\r\n- [ ] **Mitigated Security Requirements**: Implemented IDs (e.g. `SEC-REQ-*`) and associated tests (`SEC-TEST-*` or `.feature`).\r\n\r\n---\r\n\r\n## 5. \u{1F4E6} Dependencies and Licenses Inspection\r\n\r\n- **New Dependencies Added**:\r\n | Package | Version | License Type | `license-policy.yaml` Verification |\r\n | :--- | :---: | :---: | :---: |\r\n | <!-- e.g. zod --> | <!-- ^3.22.4 --> | <!-- MIT --> | <!-- \u2714 Compliant (Permissive) --> |\r\n- [ ] Zero dependencies with prohibited licenses (GPLv3/AGPL/unapproved commercial).\r\n- [ ] Verification executed successfully (`pnpm run verify:licenses`).\r\n\r\n---\r\n\r\n## 6. \u2705 Deterministic Pre-Flight Checklist (Release Gates)\r\n\r\n- [ ] **Strict Typing and Linter**: `pnpm run typecheck` (zero errors, zero unjustified suppressions).\r\n- [ ] **Quality Gate**: `pnpm run verify:quality` (CC $\\le 10$, Cognitive $\\le 15$, MI $\\ge 50$, LOC $\\le 40$).\r\n- [ ] **BDD / Unit Tests**: `pnpm run verify:testing` (Gherkin scenarios synchronized and 100% passing).\r\n- [ ] **360\xB0 Traceability**: `pnpm run verify:traceability` (no orphan requirements).\r\n- [ ] **Open Source Licenses**: `pnpm run verify:licenses` (strict policy compliance).\r\n- [ ] **Schema Compliance**: `pnpm run verify:schemas` (100% of artifacts conform to JSON Schema).\r\n- [ ] **Full Test Suite**: `pnpm run test:all` / `pnpm run verify:all` (general green CI approval).\r\n\r\n---\r\n\r\n## 7. \u{1F6A8} Contingency Plan, Observability, and Rollback\r\n\r\n- **Observability Metrics and Alarms**: <!-- What metrics (p99 latency, 5xx error rate, memory) or logs should be monitored post-deployment? -->\r\n- **Rollback Procedure**: <!-- Exact command or procedure to revert change without collateral impact (e.g. git revert -m 1 <sha>) -->\r\n\r\n---\r\n\r\n## 8. \u{1F4CA} AI-SDLC: Aggregated KPIs Summary\r\n\r\n<!-- AI-SDLC-KPI-SUMMARY-START -->\r\n| Metric | Human | Total PR |\r\n| :--- | :---: | :---: |\r\n| **Commits Made** | - | **-** |\r\n| **Lines Added / Modif.** | - | **-** |\r\n| **Active Development Time** | - | **-** |\r\n| **Consumed Tokens (In+Out)** | - | **-** |\r\n| **Estimated Cost (\u20AC/$)** | \u2014 (Labor) | **-** |\r\n\r\n> *This block is updated automatically via `aisdlc kpi pr` or the CI workflow.*\r\n<!-- AI-SDLC-KPI-SUMMARY-END -->\r\n";
|
|
13321
14142
|
var STARTER_COMPLIANCE_LICENSE_MANIFEST_YAML = '# ==============================================================================\r\n# AI-SDLC: Manifiesto de Cumplimiento de Licencias Evaluadas\r\n# ==============================================================================\r\n# Verificado contra: /license-policy.yaml\r\n# ==============================================================================\r\n\r\nevaluated_dependencies:\r\n - package: "@modelcontextprotocol/sdk"\r\n version: "1.0.4"\r\n spdx_license: "MIT"\r\n category: "permissive_free"\r\n status: "APPROVED"\r\n usage: "SDK oficial para servidor Model Context Protocol."\r\n commercial_payment_required: false\r\n\r\n - package: "commander"\r\n version: "12.1.0"\r\n spdx_license: "MIT"\r\n category: "permissive_free"\r\n status: "APPROVED"\r\n usage: "Parser de l\xEDnea de comandos para @ai-sdlc/cli."\r\n commercial_payment_required: false\r\n\r\n - package: "zod"\r\n version: "3.23.8"\r\n spdx_license: "MIT"\r\n category: "permissive_free"\r\n status: "APPROVED"\r\n usage: "Validaci\xF3n de esquemas y tipos en runtime."\r\n commercial_payment_required: false\r\n\r\n - package: "js-yaml"\r\n version: "4.1.0"\r\n spdx_license: "MIT"\r\n category: "permissive_free"\r\n status: "APPROVED"\r\n usage: "Parser y serializador YAML para especificaciones y frontmatter."\r\n commercial_payment_required: false\r\n\r\n - package: "chalk"\r\n version: "5.3.0"\r\n spdx_license: "MIT"\r\n category: "permissive_free"\r\n status: "APPROVED"\r\n usage: "Estilizado de salida en terminal para comandos CLI."\r\n commercial_payment_required: false\r\n\r\n - package: "ajv"\r\n version: "8.17.1"\r\n spdx_license: "MIT"\r\n category: "permissive_free"\r\n status: "APPROVED"\r\n usage: "Validador JSON Schema para ProductShape, arc42 y SDD."\r\n commercial_payment_required: false\r\n';
|
|
13322
|
-
var STARTER_PROCESS_README = "# AI-SDLC: Process & Governance Framework\n\nThis directory hosts the deterministic governance, verification gates, and lifecycle protocols for AI-assisted software development.\n\n## Core Protocols & Lifecycle\n- **Phase 0 (Product Definition)**: `specs/product/` (Requirements `FR-*`, Use Cases `UC-*`, Actors `ACT-*`, Rules `BR-*`).\n- **Phase 1 (System Architecture)**: `templates/architecture/` (arc42 + NAF v4, `CMP-*`, Decisions `ADR-*`).\n- **Phase 2 (Cybersecurity Triad)**: `templates/security/` (Threat Actors `ACT-THREAT-*`, Abuse Cases `ABUSE-*`, Security Reqs `SEC-REQ-*`).\n- **Phase 3 (Spec-Driven Delivery - SDD)**: `specs/changes/active/<change-id>/` (`proposal.md`, `spec.md`, `design.md`, `tasks.md`, `handoff.yaml`).\n- **Phase 4 (Continuous Quality Gates & Verification)**:\n - Quality Gate: `npx aisdlc verify quality` (CC $\\le 10$, MI $\\ge 50$, LOC $\\le 40$)\n - BDD Testing: `npx aisdlc verify testing`\n - Traceability: `npx aisdlc verify traceability`\n - Licenses: `npx aisdlc verify licenses`\n - Schemas: `npx aisdlc verify schemas`\n - Release Gates: `npx aisdlc check` / `npx aisdlc verify all`\n";
|
|
14143
|
+
var STARTER_PROCESS_README = "# AI-SDLC: Process & Governance Framework\n\nThis directory hosts the deterministic governance, verification gates, and lifecycle protocols for AI-assisted software development.\n\n## Core Protocols & Lifecycle\n- **Phase 0 (Product Definition)**: `specs/product/` (Requirements `FR-*`, Use Cases `UC-*`, Actors `ACT-*`, Rules `BR-*`).\n- **Phase 1 (System Architecture)**: `templates/architecture/` (arc42 + NAF v4, `CMP-*`, Decisions `ADR-*`).\n- **Phase 2 (Cybersecurity Triad)**: `templates/security/` (Threat Actors `ACT-THREAT-*`, Abuse Cases `ABUSE-*`, Security Reqs `SEC-REQ-*`).\n- **Phase 2b (Privacy-by-Design as Code)**: `templates/privacy/` (Data Assets `DATA-ASSET-*`, ROPA `PRIV-ROPA-*`, Privacy Reqs `PRIV-REQ-*`).\n- **Phase 3 (Spec-Driven Delivery - SDD)**: `specs/changes/active/<change-id>/` (`proposal.md`, `spec.md`, `design.md`, `tasks.md`, `handoff.yaml`).\n- **Phase 4 (Continuous Quality Gates & Verification)**:\n - Quality Gate: `npx aisdlc verify quality` (CC $\\le 10$, MI $\\ge 50$, LOC $\\le 40$)\n - BDD Testing: `npx aisdlc verify testing`\n - Traceability: `npx aisdlc verify traceability`\n - Licenses: `npx aisdlc verify licenses`\n - Privacy & Data Protection: `npx aisdlc verify privacy`\n - Schemas: `npx aisdlc verify schemas`\n - Release Gates: `npx aisdlc check` / `npx aisdlc verify all`\n";
|
|
13323
14144
|
var STARTER_BASE_TEMPLATES = [
|
|
13324
14145
|
{ relPath: "templates/ci/.gitlab-ci.yml", content: STARTER_TEMPLATES_CI__GITLAB_CI_YML },
|
|
13325
14146
|
{ relPath: "templates/ci/azure-pipelines.yml", content: STARTER_TEMPLATES_CI_AZURE_PIPELINES_YML },
|
|
@@ -13331,6 +14152,10 @@ var STARTER_BASE_TEMPLATES = [
|
|
|
13331
14152
|
{ relPath: "templates/compliance/commercial-acquisition-request.template.md", content: STARTER_TEMPLATES_COMPLIANCE_COMMERCIAL_ACQUISITION_REQUEST_TEMPLATE_MD },
|
|
13332
14153
|
{ relPath: "templates/manuals/production-manual.template.md", content: STARTER_TEMPLATES_MANUALS_PRODUCTION_MANUAL_TEMPLATE_MD },
|
|
13333
14154
|
{ relPath: "templates/manuals/user-manual.template.md", content: STARTER_TEMPLATES_MANUALS_USER_MANUAL_TEMPLATE_MD },
|
|
14155
|
+
{ relPath: "templates/privacy/data-asset.template.md", content: STARTER_TEMPLATES_PRIVACY_DATA_ASSET_TEMPLATE_MD },
|
|
14156
|
+
{ relPath: "templates/privacy/dpia-request.template.md", content: STARTER_TEMPLATES_PRIVACY_DPIA_REQUEST_TEMPLATE_MD },
|
|
14157
|
+
{ relPath: "templates/privacy/privacy-req.template.md", content: STARTER_TEMPLATES_PRIVACY_PRIVACY_REQ_TEMPLATE_MD },
|
|
14158
|
+
{ relPath: "templates/privacy/privacy-ropa.template.md", content: STARTER_TEMPLATES_PRIVACY_PRIVACY_ROPA_TEMPLATE_MD },
|
|
13334
14159
|
{ relPath: "templates/product/actor.template.md", content: STARTER_TEMPLATES_PRODUCT_ACTOR_TEMPLATE_MD },
|
|
13335
14160
|
{ relPath: "templates/product/business-rule.template.md", content: STARTER_TEMPLATES_PRODUCT_BUSINESS_RULE_TEMPLATE_MD },
|
|
13336
14161
|
{ relPath: "templates/product/journey.template.md", content: STARTER_TEMPLATES_PRODUCT_JOURNEY_TEMPLATE_MD },
|
|
@@ -13448,6 +14273,52 @@ categories:
|
|
|
13448
14273
|
- "SSPL-1.0"
|
|
13449
14274
|
- "BSL-1.1"
|
|
13450
14275
|
`;
|
|
14276
|
+
var STARTER_PRIVACY_POLICY = `# ==============================================================================
|
|
14277
|
+
# AI-SDLC: Data Protection & Privacy-by-Design Governance Policy (PDaC)
|
|
14278
|
+
# ==============================================================================
|
|
14279
|
+
version: "1.0"
|
|
14280
|
+
project: "Standard AI-SDLC Project"
|
|
14281
|
+
regulatory_frameworks:
|
|
14282
|
+
- "GDPR"
|
|
14283
|
+
- "LOPDGDD"
|
|
14284
|
+
- "ISO-27701"
|
|
14285
|
+
default_pii_action: "DENY_UNCLASSIFIED"
|
|
14286
|
+
|
|
14287
|
+
classification_levels:
|
|
14288
|
+
PUBLIC:
|
|
14289
|
+
encryption_at_rest: false
|
|
14290
|
+
encryption_in_transit: true
|
|
14291
|
+
allow_in_logs: true
|
|
14292
|
+
allow_in_llm_prompts: true
|
|
14293
|
+
INTERNAL:
|
|
14294
|
+
encryption_at_rest: true
|
|
14295
|
+
encryption_in_transit: true
|
|
14296
|
+
allow_in_logs: true
|
|
14297
|
+
allow_in_llm_prompts: true
|
|
14298
|
+
CONFIDENTIAL_PII:
|
|
14299
|
+
encryption_at_rest: true
|
|
14300
|
+
encryption_in_transit: true
|
|
14301
|
+
allow_in_logs: false
|
|
14302
|
+
masking_in_logs: "HASH_OR_REDACT"
|
|
14303
|
+
allow_in_llm_prompts: false
|
|
14304
|
+
require_retention_policy: true
|
|
14305
|
+
require_erasure_mechanism: true
|
|
14306
|
+
RESTRICTED_SENSITIVE_PII:
|
|
14307
|
+
encryption_at_rest: true
|
|
14308
|
+
field_level_encryption: true
|
|
14309
|
+
encryption_in_transit: true
|
|
14310
|
+
allow_in_logs: false
|
|
14311
|
+
allow_in_llm_prompts: false
|
|
14312
|
+
require_dpia_approval: true
|
|
14313
|
+
require_explicit_consent_or_art9_basis: true
|
|
14314
|
+
|
|
14315
|
+
cross_border_transfers:
|
|
14316
|
+
allowed_regions:
|
|
14317
|
+
- "EU"
|
|
14318
|
+
- "EEA"
|
|
14319
|
+
require_scc_for_external: true
|
|
14320
|
+
approved_subprocessors: []
|
|
14321
|
+
`;
|
|
13451
14322
|
var STARTER_TASK_TEMPLATE = `---
|
|
13452
14323
|
tasks:
|
|
13453
14324
|
- id: "TSK-001-setup"
|
|
@@ -13501,8 +14372,8 @@ var STARTER_WORKFLOW_HANDOFF_TEMPLATE = `# Workflow Handoff Template
|
|
|
13501
14372
|
|
|
13502
14373
|
### \u{1F504} Workflow Handoff
|
|
13503
14374
|
|
|
13504
|
-
- **Completed Phase / Activity**: \`[Current phase, e.g. Product Definition / Threat Modeling / Architecture / SDD Implementation]\`
|
|
13505
|
-
- **Acting Role**: \`[agent-product-analyst | agent-threat-modeler | agent-system-architect | agent-developer | agent-expert-user | agent-security-auditor | agent-compliance-checker]\`
|
|
14375
|
+
- **Completed Phase / Activity**: \`[Current phase, e.g. Product Definition / Threat Modeling / Privacy Modeling / Architecture / SDD Implementation]\`
|
|
14376
|
+
- **Acting Role**: \`[agent-product-analyst | agent-threat-modeler | agent-privacy-officer | agent-system-architect | agent-developer | agent-expert-user | agent-security-auditor | agent-compliance-checker]\`
|
|
13506
14377
|
- **Task Autonomy Mode**: \`[HUMAN_REVIEW_PLAN | AMBIGUOUS | HIGH_RISK_MANUAL]\`
|
|
13507
14378
|
- **Produced Deliverables**:
|
|
13508
14379
|
- [x] \`[Path or ID of generated artifact, e.g. specs/product/uc-mission.md]\`
|
|
@@ -14089,6 +14960,7 @@ var BASE_DIRECTORIES = [
|
|
|
14089
14960
|
"compliance",
|
|
14090
14961
|
"schemas/product",
|
|
14091
14962
|
"schemas/security",
|
|
14963
|
+
"schemas/privacy",
|
|
14092
14964
|
"schemas/compliance",
|
|
14093
14965
|
"schemas/architecture",
|
|
14094
14966
|
"schemas/safety",
|
|
@@ -14098,6 +14970,7 @@ var BASE_DIRECTORIES = [
|
|
|
14098
14970
|
"schemas/ide",
|
|
14099
14971
|
"templates/product",
|
|
14100
14972
|
"templates/security",
|
|
14973
|
+
"templates/privacy",
|
|
14101
14974
|
"templates/compliance",
|
|
14102
14975
|
"templates/architecture",
|
|
14103
14976
|
"templates/safety",
|
|
@@ -14142,6 +15015,7 @@ function collectStarterFiles(ciProvider, agentFiles = [], archGranularity = "min
|
|
|
14142
15015
|
const files = [
|
|
14143
15016
|
{ relPath: "quality-policy.yaml", content: STARTER_QUALITY_POLICY },
|
|
14144
15017
|
{ relPath: "license-policy.yaml", content: STARTER_LICENSE_POLICY },
|
|
15018
|
+
{ relPath: "privacy-policy.yaml", content: STARTER_PRIVACY_POLICY },
|
|
14145
15019
|
...STARTER_BASE_TEMPLATES,
|
|
14146
15020
|
...STARTER_SCHEMAS.map((s) => ({ relPath: s.relPath, content: s.content })),
|
|
14147
15021
|
...getCiWorkflowFiles(ciProvider),
|
|
@@ -14163,6 +15037,7 @@ var STANDARD_AISDLC_SCRIPTS = {
|
|
|
14163
15037
|
check: "aisdlc check",
|
|
14164
15038
|
"check:fix": "aisdlc check --fix",
|
|
14165
15039
|
"verify:quality": "aisdlc verify quality",
|
|
15040
|
+
"verify:privacy": "aisdlc verify privacy",
|
|
14166
15041
|
"verify:all": "aisdlc verify all",
|
|
14167
15042
|
"change:new": "aisdlc change new"
|
|
14168
15043
|
};
|
|
@@ -14265,6 +15140,6 @@ function initProject(options = {}) {
|
|
|
14265
15140
|
);
|
|
14266
15141
|
}
|
|
14267
15142
|
|
|
14268
|
-
export { ALL_ARCHITECTURE_TEMPLATES, BRANCH_PATTERNS, DEFAULT_EXCLUDED_PATTERNS, DEFAULT_EXCLUDES, DEFAULT_EXTENSIONS, DEFAULT_SAST_EXCLUDES, GENERAL_SOURCE_EXTENSIONS, KPI_SUMMARY_END_TAG, KPI_SUMMARY_START_TAG, LIFECYCLE_SKILL_TEMPLATES, OpenSpecAdapter, PREPARE_COMMIT_MSG_SCRIPT, PROMPT_INJECTION_SIGNATURES, PROTECTED_BYPASS_PATTERNS, SAST_RULES, SCHEMA_SCHEMAS_ARCHITECTURE_ADR_SCHEMA_JSON, SCHEMA_SCHEMAS_ARCHITECTURE_COMPONENT_SCHEMA_JSON, SCHEMA_SCHEMAS_ARCHITECTURE_INTRODUCTION_AND_GOALS_SCHEMA_JSON, SCHEMA_SCHEMAS_COMPLIANCE_LICENSE_MANIFEST_SCHEMA_JSON, SCHEMA_SCHEMAS_COMPLIANCE_LICENSE_POLICY_SCHEMA_JSON, SCHEMA_SCHEMAS_COMPLIANCE_QUALITY_POLICY_SCHEMA_JSON, SCHEMA_SCHEMAS_IDE_MCP_CONFIG_SCHEMA_JSON, SCHEMA_SCHEMAS_MANUALS_PRODUCTION_MANUAL_SCHEMA_JSON, SCHEMA_SCHEMAS_MANUALS_USER_MANUAL_SCHEMA_JSON, SCHEMA_SCHEMAS_PRODUCT_ACTOR_SCHEMA_JSON, SCHEMA_SCHEMAS_PRODUCT_BUSINESS_RULE_SCHEMA_JSON, SCHEMA_SCHEMAS_PRODUCT_JOURNEY_SCHEMA_JSON, SCHEMA_SCHEMAS_PRODUCT_REQUIREMENT_SCHEMA_JSON, SCHEMA_SCHEMAS_PRODUCT_TERM_SCHEMA_JSON, SCHEMA_SCHEMAS_PRODUCT_USE_CASE_SCHEMA_JSON, SCHEMA_SCHEMAS_SAFETY_HAZARD_SCHEMA_JSON, SCHEMA_SCHEMAS_SAFETY_SAFETY_REQ_SCHEMA_JSON, SCHEMA_SCHEMAS_SDD_DESIGN_SCHEMA_JSON, SCHEMA_SCHEMAS_SDD_HANDOFF_SCHEMA_JSON, SCHEMA_SCHEMAS_SDD_PROPOSAL_SCHEMA_JSON, SCHEMA_SCHEMAS_SDD_RELEASE_KPIS_SCHEMA_JSON, SCHEMA_SCHEMAS_SDD_SESSION_TELEMETRY_SCHEMA_JSON, SCHEMA_SCHEMAS_SDD_SPEC_SCHEMA_JSON, SCHEMA_SCHEMAS_SDD_TASKS_SCHEMA_JSON, SCHEMA_SCHEMAS_SECURITY_ABUSE_CASE_SCHEMA_JSON, SCHEMA_SCHEMAS_SECURITY_ENCLAVE_SCHEMA_JSON, SCHEMA_SCHEMAS_SECURITY_SECURITY_REQ_SCHEMA_JSON, SCHEMA_SCHEMAS_SECURITY_THREAT_ACTOR_SCHEMA_JSON, SCHEMA_SCHEMAS_WORKFLOW_AGENT_HANDOFF_SCHEMA_JSON, SECRET_RULES, SPECIALIZED_AGENT_TEMPLATES, STARTER_ANTIGRAVITY_MCP, STARTER_ANTIGRAVITY_RULES, STARTER_ARCH_ADR, STARTER_ARCH_ARCHITECTURE_CONSTRAINTS, STARTER_ARCH_COMPONENT, STARTER_ARCH_CONTEXT_AND_SCOPE, STARTER_ARCH_CROSS_CUTTING_CONCEPTS, STARTER_ARCH_DEPLOYMENT_VIEW, STARTER_ARCH_GLOSSARY, STARTER_ARCH_INTRODUCTION_AND_GOALS, STARTER_ARCH_LEVEL_1_WHITEBOX, STARTER_ARCH_QUALITY_REQUIREMENTS, STARTER_ARCH_RISKS_AND_TECHNICAL_DEBT, STARTER_ARCH_RUNTIME_VIEW, STARTER_ARCH_SOLUTION_STRATEGY, STARTER_AZURE_PIPELINES, STARTER_BASE_TEMPLATES, STARTER_BITBUCKET_PIPELINES, STARTER_CLAUDE_RULES, STARTER_COMPLIANCE_LICENSE_MANIFEST_YAML, STARTER_COPILOT_RULES, STARTER_CURSOR_CORE_RULES, STARTER_CURSOR_MCP, STARTER_CURSOR_PRODUCT_RULES, STARTER_CURSOR_QUALITY_RULES, STARTER_GITHUB_CI, STARTER_GITHUB_DEPLOY_DASHBOARD, STARTER_GITHUB_PR_KPI, STARTER_GITHUB_PULL_REQUEST_TEMPLATE, STARTER_GITHUB_SDD_INTEGRATE, STARTER_GITLAB_CI, STARTER_LICENSE_POLICY, STARTER_PROCESS_README, STARTER_PULL_REQUEST_TEMPLATE, STARTER_QUALITY_POLICY, STARTER_REQUIREMENT_TEMPLATE, STARTER_SCHEMAS, STARTER_SCHEMAS_MAP, STARTER_TASK_TEMPLATE, STARTER_TEMPLATES_CI_AZURE_PIPELINES_YML, STARTER_TEMPLATES_CI_BITBUCKET_PIPELINES_YML, STARTER_TEMPLATES_CI_GITHUB_WORKFLOWS_CI_YML, STARTER_TEMPLATES_CI_GITHUB_WORKFLOWS_DEPLOY_DASHBOARD_YML, STARTER_TEMPLATES_CI_GITHUB_WORKFLOWS_PR_KPI_SUMMARY_YML, STARTER_TEMPLATES_CI_GITHUB_WORKFLOWS_SDD_INTEGRATE_ON_MERGE_YML, STARTER_TEMPLATES_CI__GITLAB_CI_YML, STARTER_TEMPLATES_COMPLIANCE_COMMERCIAL_ACQUISITION_REQUEST_TEMPLATE_MD, STARTER_TEMPLATES_MANUALS_PRODUCTION_MANUAL_TEMPLATE_MD, STARTER_TEMPLATES_MANUALS_USER_MANUAL_TEMPLATE_MD, STARTER_TEMPLATES_PRODUCT_ACTOR_TEMPLATE_MD, STARTER_TEMPLATES_PRODUCT_BUSINESS_RULE_TEMPLATE_MD, STARTER_TEMPLATES_PRODUCT_JOURNEY_TEMPLATE_MD, STARTER_TEMPLATES_PRODUCT_REQUIREMENT_TEMPLATE_MD, STARTER_TEMPLATES_PRODUCT_TERM_TEMPLATE_MD, STARTER_TEMPLATES_PRODUCT_USER_DESIGN_FEEDBACK_TEMPLATE_MD, STARTER_TEMPLATES_PRODUCT_USE_CASE_TEMPLATE_MD, STARTER_TEMPLATES_SAFETY_HAZARD_TEMPLATE_MD, STARTER_TEMPLATES_SAFETY_SAFETY_REQ_TEMPLATE_MD, STARTER_TEMPLATES_SDD_DESIGN_TEMPLATE_MD, STARTER_TEMPLATES_SDD_HANDOFF_TEMPLATE_YAML, STARTER_TEMPLATES_SDD_PROPOSAL_TEMPLATE_MD, STARTER_TEMPLATES_SDD_PULL_REQUEST_TEMPLATE_MD, STARTER_TEMPLATES_SDD_SPEC_TEMPLATE_MD, STARTER_TEMPLATES_SDD_TASKS_TEMPLATE_MD, STARTER_TEMPLATES_SECURITY_ABUSE_CASE_TEMPLATE_MD, STARTER_TEMPLATES_SECURITY_ENCLAVE_TEMPLATE_MD, STARTER_TEMPLATES_SECURITY_SECURITY_REQ_TEMPLATE_MD, STARTER_TEMPLATES_SECURITY_THREAT_ACTOR_TEMPLATE_MD, STARTER_TEMPLATES_WORKFLOW_AGENT_HANDOFF_TEMPLATE_MD, STARTER_VSCODE_MCP, STARTER_WORKFLOW_HANDOFF_TEMPLATE, STARTER__GITHUB_PULL_REQUEST_TEMPLATE_MD, SpecKitAdapter, TYPE_TO_SCHEMA_MAP, VALID_AGENT_TARGETS, VALID_ARCHITECTURE_GRANULARITIES, VALID_AUTONOMY_MODES, VALID_CHANGE_PROFILES, VALID_CI_PROVIDERS, aggregateCommitKpiRecords, aggregatePrKpis, aggregateReleaseKpis, analyzeBddVariantsForRequirement, appendRevisionHistoryRow, buildCycloneDxComponent, buildFeatureFileContent, buildGraphElements, calculateJaccardSimilarity, calculateMetrics, calculateRating, calculateShannonEntropy, checkGherkinInSync, checkoutTaskBranch, classifyBranch, collectAgentFiles, collectDashboardMetrics, collectHistoricalKpis, computeCanonicalSha256, computeSha256, createDefaultQualityPolicy, depositProductHandoffSidecar, detectActiveChangeForIntegration, detectAuthorIdentity, detectLanguage, detectProfileFromChange, detectPromptInjection, emitCiOutput, evaluateCompoundLicense, evaluateSingleDependency, extractCitations, extractCommitKpisFromRange, extractDirectDepNames, extractFeatureTags, extractFrontmatter, extractFunctions, extractFunctionsBraceLanguages, extractFunctionsPolyglot, extractFunctionsPython, extractFunctionsTypeScriptAst, extractGherkinBlock, extractGherkinFeatures, extractNormativeText, findChangeWorkspaceDir, findLicenseFile, formatCommitTrailers, formatPrKpiMarkdown, formatReleaseKpiMarkdown, generateBranchHierarchyPlan, generateCycloneDxSbom, generateDashboardReport, generateDuplicatesReportMarkdown, generateGovernanceReportMarkdown, generateLicenseReportMarkdown, generatePdacReportMarkdown, generateQualityReport, generateSastReportMarkdown, generateSecretsReportMarkdown, generateTestingCoverageReportMarkdown, generateThirdPartyNotices, generateTraceabilityReportMarkdown, getArchitectureTemplates, getCytoscapeScript, getGitDiffLines, getNextCorrelativeNumber, getSddAdapter, inferArtifactTypeFromId, inferMissingTrailers, initProject, injectKpisIntoPrBody, installGitHooks, integrateSddChange, isGitleaksInstalled, isPathProtectedFromPatch, isPlaceholderOrIgnored, isRequirementArtifact2 as isRequirementArtifact, isSemgrepInstalled, isToolAvailable, loadProductHandoffSidecar, locateTaskInActiveChanges, maskSecret, normalizeSpdxLicense, parseCommitTrailers, parseFrontmatter, parseFrontmatterId, parseGenericDoc, parseLicensePolicy, parseMarkdownFrontmatter, parseQualityPolicy, parseRequirementFile, parseSpecCatalogScope, parseTasksDoc, parseTasksFromContent, processPackageDir, readCodeCoverageSummary, readPackageJson, renderAntigravityAgentFile, renderAntigravitySkillFile, renderAutonomyModeSection, renderClaudeAgentFile, renderCopilotAgentFile, renderCursorAgentFile, renderDashboardHtml, renderManualsTab, resolveAgentTargets, resolveBranchHierarchy, resolveCiEnvironment, resolveCytoscapePath, resolveFeatureFilePath, resolveGitRef, resolveLicenseFromFile, resolveSchemaForArtifact, resolveTargetFiles, runGitleaksCli, runSemgrepCli, scaffoldSddChange, scanAllProductHandoffs, scanAllTestArtifacts, scanContentForSecrets, scanFileForSast, scanInstalledLicenses, scanManualsInWorkspace, scanPnpmStore, scanSubdirectories, scanWithNativeFs, scanWithSyft, scanWithTrivy, slugify, syncPdacDigests, tokenizeTitle, updateCitationsInContent, validateAgainstSchema, validateArtifactSchema, verifyArtifactDuplicates, verifyArtifactsSchemas, verifyLicenses, verifyManuals, verifyPdacGraph, verifyProgressiveFriction, verifyQualityGate, verifySast, verifySddIntegration, verifySecrets, verifyTasksGovernance, verifyTestingCoverage, verifyTraceability, walkDir, walkMdFiles, walkProjectFiles, walkSourceFiles, walkTaskFiles, writeCycloneDxSbom, writeReleaseKpiReport, writeThirdPartyNotices };
|
|
15143
|
+
export { ALL_ARCHITECTURE_TEMPLATES, BRANCH_PATTERNS, DEFAULT_EXCLUDED_PATTERNS, DEFAULT_EXCLUDES, DEFAULT_EXTENSIONS, DEFAULT_PRIVACY_POLICY, DEFAULT_SAST_EXCLUDES, GENERAL_SOURCE_EXTENSIONS, KPI_SUMMARY_END_TAG, KPI_SUMMARY_START_TAG, LIFECYCLE_SKILL_TEMPLATES, OpenSpecAdapter, PII_SAST_RULES, PREPARE_COMMIT_MSG_SCRIPT, PROMPT_INJECTION_SIGNATURES, PROTECTED_BYPASS_PATTERNS, SAST_RULES, SCHEMA_SCHEMAS_ARCHITECTURE_ADR_SCHEMA_JSON, SCHEMA_SCHEMAS_ARCHITECTURE_COMPONENT_SCHEMA_JSON, SCHEMA_SCHEMAS_ARCHITECTURE_INTRODUCTION_AND_GOALS_SCHEMA_JSON, SCHEMA_SCHEMAS_COMPLIANCE_LICENSE_MANIFEST_SCHEMA_JSON, SCHEMA_SCHEMAS_COMPLIANCE_LICENSE_POLICY_SCHEMA_JSON, SCHEMA_SCHEMAS_COMPLIANCE_QUALITY_POLICY_SCHEMA_JSON, SCHEMA_SCHEMAS_IDE_MCP_CONFIG_SCHEMA_JSON, SCHEMA_SCHEMAS_MANUALS_PRODUCTION_MANUAL_SCHEMA_JSON, SCHEMA_SCHEMAS_MANUALS_USER_MANUAL_SCHEMA_JSON, SCHEMA_SCHEMAS_PRIVACY_DATA_ASSET_SCHEMA_JSON, SCHEMA_SCHEMAS_PRIVACY_PRIVACY_POLICY_SCHEMA_JSON, SCHEMA_SCHEMAS_PRIVACY_PRIVACY_REQ_SCHEMA_JSON, SCHEMA_SCHEMAS_PRIVACY_PRIVACY_ROPA_SCHEMA_JSON, SCHEMA_SCHEMAS_PRODUCT_ACTOR_SCHEMA_JSON, SCHEMA_SCHEMAS_PRODUCT_BUSINESS_RULE_SCHEMA_JSON, SCHEMA_SCHEMAS_PRODUCT_JOURNEY_SCHEMA_JSON, SCHEMA_SCHEMAS_PRODUCT_REQUIREMENT_SCHEMA_JSON, SCHEMA_SCHEMAS_PRODUCT_TERM_SCHEMA_JSON, SCHEMA_SCHEMAS_PRODUCT_USE_CASE_SCHEMA_JSON, SCHEMA_SCHEMAS_SAFETY_HAZARD_SCHEMA_JSON, SCHEMA_SCHEMAS_SAFETY_SAFETY_REQ_SCHEMA_JSON, SCHEMA_SCHEMAS_SDD_DESIGN_SCHEMA_JSON, SCHEMA_SCHEMAS_SDD_HANDOFF_SCHEMA_JSON, SCHEMA_SCHEMAS_SDD_PROPOSAL_SCHEMA_JSON, SCHEMA_SCHEMAS_SDD_RELEASE_KPIS_SCHEMA_JSON, SCHEMA_SCHEMAS_SDD_SESSION_TELEMETRY_SCHEMA_JSON, SCHEMA_SCHEMAS_SDD_SPEC_SCHEMA_JSON, SCHEMA_SCHEMAS_SDD_TASKS_SCHEMA_JSON, SCHEMA_SCHEMAS_SECURITY_ABUSE_CASE_SCHEMA_JSON, SCHEMA_SCHEMAS_SECURITY_ENCLAVE_SCHEMA_JSON, SCHEMA_SCHEMAS_SECURITY_SECURITY_REQ_SCHEMA_JSON, SCHEMA_SCHEMAS_SECURITY_THREAT_ACTOR_SCHEMA_JSON, SCHEMA_SCHEMAS_WORKFLOW_AGENT_HANDOFF_SCHEMA_JSON, SECRET_RULES, SPECIALIZED_AGENT_TEMPLATES, STARTER_ANTIGRAVITY_MCP, STARTER_ANTIGRAVITY_RULES, STARTER_ARCH_ADR, STARTER_ARCH_ARCHITECTURE_CONSTRAINTS, STARTER_ARCH_COMPONENT, STARTER_ARCH_CONTEXT_AND_SCOPE, STARTER_ARCH_CROSS_CUTTING_CONCEPTS, STARTER_ARCH_DEPLOYMENT_VIEW, STARTER_ARCH_GLOSSARY, STARTER_ARCH_INTRODUCTION_AND_GOALS, STARTER_ARCH_LEVEL_1_WHITEBOX, STARTER_ARCH_QUALITY_REQUIREMENTS, STARTER_ARCH_RISKS_AND_TECHNICAL_DEBT, STARTER_ARCH_RUNTIME_VIEW, STARTER_ARCH_SOLUTION_STRATEGY, STARTER_AZURE_PIPELINES, STARTER_BASE_TEMPLATES, STARTER_BITBUCKET_PIPELINES, STARTER_CLAUDE_RULES, STARTER_COMPLIANCE_LICENSE_MANIFEST_YAML, STARTER_COPILOT_RULES, STARTER_CURSOR_CORE_RULES, STARTER_CURSOR_MCP, STARTER_CURSOR_PRODUCT_RULES, STARTER_CURSOR_QUALITY_RULES, STARTER_GITHUB_CI, STARTER_GITHUB_DEPLOY_DASHBOARD, STARTER_GITHUB_PR_KPI, STARTER_GITHUB_PULL_REQUEST_TEMPLATE, STARTER_GITHUB_SDD_INTEGRATE, STARTER_GITLAB_CI, STARTER_LICENSE_POLICY, STARTER_PRIVACY_POLICY, STARTER_PROCESS_README, STARTER_PULL_REQUEST_TEMPLATE, STARTER_QUALITY_POLICY, STARTER_REQUIREMENT_TEMPLATE, STARTER_SCHEMAS, STARTER_SCHEMAS_MAP, STARTER_TASK_TEMPLATE, STARTER_TEMPLATES_CI_AZURE_PIPELINES_YML, STARTER_TEMPLATES_CI_BITBUCKET_PIPELINES_YML, STARTER_TEMPLATES_CI_GITHUB_WORKFLOWS_CI_YML, STARTER_TEMPLATES_CI_GITHUB_WORKFLOWS_DEPLOY_DASHBOARD_YML, STARTER_TEMPLATES_CI_GITHUB_WORKFLOWS_PR_KPI_SUMMARY_YML, STARTER_TEMPLATES_CI_GITHUB_WORKFLOWS_SDD_INTEGRATE_ON_MERGE_YML, STARTER_TEMPLATES_CI__GITLAB_CI_YML, STARTER_TEMPLATES_COMPLIANCE_COMMERCIAL_ACQUISITION_REQUEST_TEMPLATE_MD, STARTER_TEMPLATES_MANUALS_PRODUCTION_MANUAL_TEMPLATE_MD, STARTER_TEMPLATES_MANUALS_USER_MANUAL_TEMPLATE_MD, STARTER_TEMPLATES_PRIVACY_DATA_ASSET_TEMPLATE_MD, STARTER_TEMPLATES_PRIVACY_DPIA_REQUEST_TEMPLATE_MD, STARTER_TEMPLATES_PRIVACY_PRIVACY_REQ_TEMPLATE_MD, STARTER_TEMPLATES_PRIVACY_PRIVACY_ROPA_TEMPLATE_MD, STARTER_TEMPLATES_PRODUCT_ACTOR_TEMPLATE_MD, STARTER_TEMPLATES_PRODUCT_BUSINESS_RULE_TEMPLATE_MD, STARTER_TEMPLATES_PRODUCT_JOURNEY_TEMPLATE_MD, STARTER_TEMPLATES_PRODUCT_REQUIREMENT_TEMPLATE_MD, STARTER_TEMPLATES_PRODUCT_TERM_TEMPLATE_MD, STARTER_TEMPLATES_PRODUCT_USER_DESIGN_FEEDBACK_TEMPLATE_MD, STARTER_TEMPLATES_PRODUCT_USE_CASE_TEMPLATE_MD, STARTER_TEMPLATES_SAFETY_HAZARD_TEMPLATE_MD, STARTER_TEMPLATES_SAFETY_SAFETY_REQ_TEMPLATE_MD, STARTER_TEMPLATES_SDD_DESIGN_TEMPLATE_MD, STARTER_TEMPLATES_SDD_HANDOFF_TEMPLATE_YAML, STARTER_TEMPLATES_SDD_PROPOSAL_TEMPLATE_MD, STARTER_TEMPLATES_SDD_PULL_REQUEST_TEMPLATE_MD, STARTER_TEMPLATES_SDD_SPEC_TEMPLATE_MD, STARTER_TEMPLATES_SDD_TASKS_TEMPLATE_MD, STARTER_TEMPLATES_SECURITY_ABUSE_CASE_TEMPLATE_MD, STARTER_TEMPLATES_SECURITY_ENCLAVE_TEMPLATE_MD, STARTER_TEMPLATES_SECURITY_SECURITY_REQ_TEMPLATE_MD, STARTER_TEMPLATES_SECURITY_THREAT_ACTOR_TEMPLATE_MD, STARTER_TEMPLATES_WORKFLOW_AGENT_HANDOFF_TEMPLATE_MD, STARTER_VSCODE_MCP, STARTER_WORKFLOW_HANDOFF_TEMPLATE, STARTER__GITHUB_PULL_REQUEST_TEMPLATE_MD, SpecKitAdapter, TYPE_TO_SCHEMA_MAP, VALID_AGENT_TARGETS, VALID_ARCHITECTURE_GRANULARITIES, VALID_AUTONOMY_MODES, VALID_CHANGE_PROFILES, VALID_CI_PROVIDERS, aggregateCommitKpiRecords, aggregatePrKpis, aggregateReleaseKpis, analyzeBddVariantsForRequirement, appendRevisionHistoryRow, buildCycloneDxComponent, buildFeatureFileContent, buildGraphElements, calculateJaccardSimilarity, calculateMetrics, calculateRating, calculateShannonEntropy, checkGherkinInSync, checkoutTaskBranch, classifyBranch, collectAgentFiles, collectDashboardMetrics, collectHistoricalKpis, computeCanonicalSha256, computeSha256, createDefaultQualityPolicy, depositProductHandoffSidecar, detectActiveChangeForIntegration, detectAuthorIdentity, detectLanguage, detectProfileFromChange, detectPromptInjection, emitCiOutput, evaluateCompoundLicense, evaluateSingleDependency, extractCitations, extractCommitKpisFromRange, extractDirectDepNames, extractFeatureTags, extractFrontmatter, extractFunctions, extractFunctionsBraceLanguages, extractFunctionsPolyglot, extractFunctionsPython, extractFunctionsTypeScriptAst, extractGherkinBlock, extractGherkinFeatures, extractNormativeText, findChangeWorkspaceDir, findLicenseFile, formatCommitTrailers, formatPrKpiMarkdown, formatReleaseKpiMarkdown, generateBranchHierarchyPlan, generateCycloneDxSbom, generateDashboardReport, generateDuplicatesReportMarkdown, generateGovernanceReportMarkdown, generateLicenseReportMarkdown, generatePdacReportMarkdown, generatePrivacyReportMarkdown, generateQualityReport, generateRopaInventoryMarkdown, generateSastReportMarkdown, generateSecretsReportMarkdown, generateTestingCoverageReportMarkdown, generateThirdPartyNotices, generateTraceabilityReportMarkdown, getArchitectureTemplates, getCytoscapeScript, getGitDiffLines, getNextCorrelativeNumber, getSddAdapter, inferArtifactTypeFromId, inferMissingTrailers, initProject, injectKpisIntoPrBody, installGitHooks, integrateSddChange, isGitleaksInstalled, isPathProtectedFromPatch, isPlaceholderOrIgnored, isRequirementArtifact2 as isRequirementArtifact, isSemgrepInstalled, isToolAvailable, loadPrivacyPolicy, loadProductHandoffSidecar, locateTaskInActiveChanges, maskSecret, normalizeSpdxLicense, parseCommitTrailers, parseFrontmatter, parseFrontmatterId, parseGenericDoc, parseLicensePolicy, parseMarkdownFrontmatter, parseQualityPolicy, parseRequirementFile, parseSpecCatalogScope, parseTasksDoc, parseTasksFromContent, processPackageDir, readCodeCoverageSummary, readPackageJson, renderAntigravityAgentFile, renderAntigravitySkillFile, renderAutonomyModeSection, renderClaudeAgentFile, renderCopilotAgentFile, renderCursorAgentFile, renderDashboardHtml, renderManualsTab, resolveAgentTargets, resolveBranchHierarchy, resolveCiEnvironment, resolveCytoscapePath, resolveFeatureFilePath, resolveGitRef, resolveLicenseFromFile, resolveSchemaForArtifact, resolveTargetFiles, runGitleaksCli, runSemgrepCli, scaffoldSddChange, scanAllProductHandoffs, scanAllTestArtifacts, scanContentForSecrets, scanFileForPrivacyViolations, scanFileForSast, scanInstalledLicenses, scanManualsInWorkspace, scanPnpmStore, scanSubdirectories, scanWithNativeFs, scanWithSyft, scanWithTrivy, slugify, syncPdacDigests, tokenizeTitle, updateCitationsInContent, validateAgainstSchema, validateArtifactSchema, verifyArtifactDuplicates, verifyArtifactsSchemas, verifyLicenses, verifyManuals, verifyPdacGraph, verifyPrivacy, verifyProgressiveFriction, verifyQualityGate, verifySast, verifySddIntegration, verifySecrets, verifyTasksGovernance, verifyTestingCoverage, verifyTraceability, walkDir, walkMdFiles, walkProjectFiles, walkSourceFiles, walkTaskFiles, writeCycloneDxSbom, writeReleaseKpiReport, writeThirdPartyNotices };
|
|
14269
15144
|
//# sourceMappingURL=index.js.map
|
|
14270
15145
|
//# sourceMappingURL=index.js.map
|