@aisdlc/core 4.3.1 → 4.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +690 -376
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +68 -45
- package/dist/index.d.ts +68 -45
- package/dist/index.js +681 -377
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1168,6 +1168,51 @@ var DEFAULT_TEST_ARTIFACT_PATTERNS = [
|
|
|
1168
1168
|
"**/*.feature",
|
|
1169
1169
|
...DEFAULT_UNIT_TEST_PATTERNS
|
|
1170
1170
|
];
|
|
1171
|
+
var DEFAULT_UI_COMPONENT_PATTERNS = [
|
|
1172
|
+
"**/components/**",
|
|
1173
|
+
"**/views/**",
|
|
1174
|
+
"**/pages/**",
|
|
1175
|
+
"**/screens/**",
|
|
1176
|
+
"**/windows/**",
|
|
1177
|
+
"**/dialogs/**",
|
|
1178
|
+
"**/tui/**",
|
|
1179
|
+
"**/widgets/**",
|
|
1180
|
+
"**/*.tsx",
|
|
1181
|
+
"**/*.jsx",
|
|
1182
|
+
"**/*.vue",
|
|
1183
|
+
"**/*.svelte",
|
|
1184
|
+
"**/*Window.cs",
|
|
1185
|
+
"**/*View.cs",
|
|
1186
|
+
"**/*Form.cs",
|
|
1187
|
+
"**/*Dialog.cs",
|
|
1188
|
+
"**/*Page.cs",
|
|
1189
|
+
"**/*UserControl.cs",
|
|
1190
|
+
"**/*Screen.kt",
|
|
1191
|
+
"**/*Activity.kt",
|
|
1192
|
+
"**/*Fragment.kt",
|
|
1193
|
+
"**/*ViewController.swift",
|
|
1194
|
+
"**/*Screen.dart"
|
|
1195
|
+
];
|
|
1196
|
+
var DEFAULT_UI_TEST_PATTERNS = [
|
|
1197
|
+
"tests/e2e/**",
|
|
1198
|
+
"tests/ui/**",
|
|
1199
|
+
"tests/desktop/**",
|
|
1200
|
+
"tests/mobile/**",
|
|
1201
|
+
"tests/cli/**",
|
|
1202
|
+
"**/*.e2e.ts",
|
|
1203
|
+
"**/*.e2e.js",
|
|
1204
|
+
"**/*.ui.spec.ts",
|
|
1205
|
+
"**/*.ui.test.ts",
|
|
1206
|
+
"**/*UiTest.cs",
|
|
1207
|
+
"**/*UITest.cs",
|
|
1208
|
+
"**/*UiTests.cs",
|
|
1209
|
+
"**/*UITests.cs",
|
|
1210
|
+
"**/*FlaUI*.cs",
|
|
1211
|
+
"**/*E2ETest.java",
|
|
1212
|
+
"**/*UITest.swift",
|
|
1213
|
+
"**/test_ui_*.py",
|
|
1214
|
+
"**/*_ui_test.py"
|
|
1215
|
+
];
|
|
1171
1216
|
function escapeRegexChars(raw) {
|
|
1172
1217
|
return raw.replace(/[.+^${}()|[\]\\]/g, "\\$&");
|
|
1173
1218
|
}
|
|
@@ -1202,6 +1247,28 @@ function isPolyglotUnitTestFile(filePath, customPatterns) {
|
|
|
1202
1247
|
function isPolyglotTestArtifact(filePath, customPatterns) {
|
|
1203
1248
|
return compileTestPatterns(customPatterns, true).matches(filePath);
|
|
1204
1249
|
}
|
|
1250
|
+
function compilePatternList(patterns) {
|
|
1251
|
+
const regexes = patterns.map(globToRegex);
|
|
1252
|
+
return {
|
|
1253
|
+
matches: (filePath) => {
|
|
1254
|
+
const norm = filePath.replace(/\\/g, "/").replace(/^\.\//, "");
|
|
1255
|
+
return regexes.some((re) => re.test(norm));
|
|
1256
|
+
}
|
|
1257
|
+
};
|
|
1258
|
+
}
|
|
1259
|
+
var NON_COMPONENT_UI_FILES = /(?:^|\/)(?:index|types|constants|styles|main|app|setup)\.[jt]sx?$/i;
|
|
1260
|
+
function isUiComponentFile(filePath, customPatterns) {
|
|
1261
|
+
const norm = filePath.replace(/\\/g, "/").replace(/^\.\//, "");
|
|
1262
|
+
if (isPolyglotUnitTestFile(norm) || norm.endsWith(".d.ts") || NON_COMPONENT_UI_FILES.test(norm)) {
|
|
1263
|
+
return false;
|
|
1264
|
+
}
|
|
1265
|
+
const patterns = customPatterns && customPatterns.length > 0 ? customPatterns : DEFAULT_UI_COMPONENT_PATTERNS;
|
|
1266
|
+
return compilePatternList(patterns).matches(norm);
|
|
1267
|
+
}
|
|
1268
|
+
function isUiTestFile(filePath, customPatterns) {
|
|
1269
|
+
const patterns = customPatterns && customPatterns.length > 0 ? [...DEFAULT_UI_TEST_PATTERNS, ...customPatterns] : DEFAULT_UI_TEST_PATTERNS;
|
|
1270
|
+
return compilePatternList(patterns).matches(filePath);
|
|
1271
|
+
}
|
|
1205
1272
|
var BddStepRegistry = class {
|
|
1206
1273
|
definitions = [];
|
|
1207
1274
|
register(pattern, handler) {
|
|
@@ -1687,21 +1754,24 @@ function collectUniqueSteps(doc) {
|
|
|
1687
1754
|
return unique;
|
|
1688
1755
|
}
|
|
1689
1756
|
function renderTsFallback(relFeature, steps) {
|
|
1690
|
-
const
|
|
1757
|
+
const entries = steps.map((st) => ` ['${mapStepKeyword(st.keyword)}', "${escapeDoubleQuotes(st.text)}"],`);
|
|
1758
|
+
return [
|
|
1691
1759
|
`// AUTO-GENERATED RED BDD STEP DEFINITIONS (${relFeature})`,
|
|
1692
1760
|
`import { BddStepRegistry } from '@aisdlc/core';`,
|
|
1693
1761
|
``,
|
|
1694
|
-
`
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1762
|
+
`const STEP_SPECS: ReadonlyArray<readonly ['given' | 'when' | 'then', string]> = [`,
|
|
1763
|
+
...entries,
|
|
1764
|
+
`];`,
|
|
1765
|
+
``,
|
|
1766
|
+
`export function registerSteps(registry: BddStepRegistry): void {`,
|
|
1767
|
+
` for (const [method, text] of STEP_SPECS) {`,
|
|
1768
|
+
` registry[method](text, () => {`,
|
|
1769
|
+
` throw new Error(\`RED: Step not implemented: \${text}\`);`,
|
|
1770
|
+
` });`,
|
|
1771
|
+
` }`,
|
|
1772
|
+
`}`,
|
|
1773
|
+
``
|
|
1774
|
+
].join("\n");
|
|
1705
1775
|
}
|
|
1706
1776
|
function renderPyFallback(relFeature, steps) {
|
|
1707
1777
|
const lines = [
|
|
@@ -2045,39 +2115,85 @@ function extractGherkinFeatures(options = {}) {
|
|
|
2045
2115
|
}
|
|
2046
2116
|
return { success: true, features, totalScenarios };
|
|
2047
2117
|
}
|
|
2118
|
+
function walkFeatureFiles(dir, fileList = []) {
|
|
2119
|
+
if (!fs12.existsSync(dir)) return fileList;
|
|
2120
|
+
for (const entry of fs12.readdirSync(dir).sort(canonicalSort)) {
|
|
2121
|
+
const fullPath = path14.join(dir, entry);
|
|
2122
|
+
if (fs12.statSync(fullPath).isDirectory()) {
|
|
2123
|
+
walkFeatureFiles(fullPath, fileList);
|
|
2124
|
+
} else if (entry.endsWith(".feature")) {
|
|
2125
|
+
fileList.push(fullPath);
|
|
2126
|
+
}
|
|
2127
|
+
}
|
|
2128
|
+
return fileList;
|
|
2129
|
+
}
|
|
2130
|
+
function hasDeterministicStepFile(rootDir, featureFullPath) {
|
|
2131
|
+
return Object.values(GHERKIN_GENERATOR_SPECS).some((spec) => {
|
|
2132
|
+
const stepPath = spec.resolveOutputPath(rootDir, featureFullPath);
|
|
2133
|
+
return fs12.existsSync(stepPath) && fs12.statSync(stepPath).size > 0;
|
|
2134
|
+
});
|
|
2135
|
+
}
|
|
2136
|
+
function findOrphanFeatureFiles(rootDir, expectedRelPaths) {
|
|
2137
|
+
const featuresDir = path14.join(rootDir, "tests", "features");
|
|
2138
|
+
const orphans = [];
|
|
2139
|
+
for (const fp of walkFeatureFiles(featuresDir)) {
|
|
2140
|
+
const rel = path14.relative(rootDir, fp).replace(/\\/g, "/");
|
|
2141
|
+
if (!expectedRelPaths.has(rel)) {
|
|
2142
|
+
orphans.push(rel);
|
|
2143
|
+
}
|
|
2144
|
+
}
|
|
2145
|
+
return orphans;
|
|
2146
|
+
}
|
|
2147
|
+
function verifyExistingFeatureFile(rootDir, targetPath, expectedContent, relTarget, state) {
|
|
2148
|
+
const actualContent = fs12.readFileSync(targetPath, "utf-8");
|
|
2149
|
+
if (actualContent.replace(/\r\n/g, "\n") !== expectedContent.replace(/\r\n/g, "\n")) {
|
|
2150
|
+
state.outOfSyncFiles.push(relTarget);
|
|
2151
|
+
}
|
|
2152
|
+
if (!hasDeterministicStepFile(rootDir, targetPath)) {
|
|
2153
|
+
state.missingStepFiles.push(relTarget);
|
|
2154
|
+
}
|
|
2155
|
+
}
|
|
2156
|
+
function checkSingleMarkdownFeatureSync(rootDir, filePath, state) {
|
|
2157
|
+
const { frontmatter, body } = parseMarkdownFrontmatter(fs12.readFileSync(filePath, "utf-8"));
|
|
2158
|
+
const gherkinBlocks = extractGherkinBlock(body);
|
|
2159
|
+
if (gherkinBlocks.length === 0) return;
|
|
2160
|
+
state.totalFeatures++;
|
|
2161
|
+
const id = frontmatter.id || path14.basename(filePath, path14.extname(filePath));
|
|
2162
|
+
const targetPath = resolveFeatureFilePath(rootDir, filePath, id, frontmatter["cucumber-feature-file"]);
|
|
2163
|
+
const relTarget = path14.relative(rootDir, targetPath).replace(/\\/g, "/");
|
|
2164
|
+
state.expectedRelPaths.add(relTarget);
|
|
2165
|
+
if (!fs12.existsSync(targetPath)) {
|
|
2166
|
+
state.missingFiles.push(relTarget);
|
|
2167
|
+
return;
|
|
2168
|
+
}
|
|
2169
|
+
const expectedContent = buildFeatureFileContent(rootDir, filePath, id, frontmatter.version, gherkinBlocks);
|
|
2170
|
+
verifyExistingFeatureFile(rootDir, targetPath, expectedContent, relTarget, state);
|
|
2171
|
+
}
|
|
2048
2172
|
function checkGherkinInSync(options = {}) {
|
|
2049
2173
|
const rootDir = options.rootDir || process.cwd();
|
|
2050
2174
|
const targetFiles = resolveTargetFiles(rootDir, options.targetPath);
|
|
2051
|
-
const
|
|
2052
|
-
|
|
2053
|
-
|
|
2175
|
+
const state = {
|
|
2176
|
+
outOfSyncFiles: [],
|
|
2177
|
+
missingFiles: [],
|
|
2178
|
+
missingStepFiles: [],
|
|
2179
|
+
expectedRelPaths: /* @__PURE__ */ new Set(),
|
|
2180
|
+
totalFeatures: 0
|
|
2181
|
+
};
|
|
2054
2182
|
for (const filePath of targetFiles) {
|
|
2055
2183
|
try {
|
|
2056
|
-
|
|
2057
|
-
const { frontmatter, body } = parseMarkdownFrontmatter(content);
|
|
2058
|
-
const gherkinBlocks = extractGherkinBlock(body);
|
|
2059
|
-
if (gherkinBlocks.length === 0) continue;
|
|
2060
|
-
totalFeatures++;
|
|
2061
|
-
const id = frontmatter.id || path14.basename(filePath, path14.extname(filePath));
|
|
2062
|
-
const targetPath = resolveFeatureFilePath(rootDir, filePath, id, frontmatter["cucumber-feature-file"]);
|
|
2063
|
-
const relTarget = path14.relative(rootDir, targetPath).replace(/\\/g, "/");
|
|
2064
|
-
if (!fs12.existsSync(targetPath)) {
|
|
2065
|
-
missingFiles.push(relTarget);
|
|
2066
|
-
continue;
|
|
2067
|
-
}
|
|
2068
|
-
const expectedContent = buildFeatureFileContent(rootDir, filePath, id, frontmatter.version, gherkinBlocks);
|
|
2069
|
-
const actualContent = fs12.readFileSync(targetPath, "utf-8");
|
|
2070
|
-
if (actualContent.replace(/\r\n/g, "\n") !== expectedContent.replace(/\r\n/g, "\n")) {
|
|
2071
|
-
outOfSyncFiles.push(relTarget);
|
|
2072
|
-
}
|
|
2184
|
+
checkSingleMarkdownFeatureSync(rootDir, filePath, state);
|
|
2073
2185
|
} catch {
|
|
2074
2186
|
}
|
|
2075
2187
|
}
|
|
2188
|
+
const orphanFeatureFiles = options.targetPath ? [] : findOrphanFeatureFiles(rootDir, state.expectedRelPaths);
|
|
2189
|
+
const inSync = state.missingFiles.length === 0 && state.outOfSyncFiles.length === 0 && orphanFeatureFiles.length === 0 && state.missingStepFiles.length === 0;
|
|
2076
2190
|
return {
|
|
2077
|
-
inSync
|
|
2078
|
-
outOfSyncFiles,
|
|
2079
|
-
missingFiles,
|
|
2080
|
-
|
|
2191
|
+
inSync,
|
|
2192
|
+
outOfSyncFiles: state.outOfSyncFiles,
|
|
2193
|
+
missingFiles: state.missingFiles,
|
|
2194
|
+
orphanFeatureFiles,
|
|
2195
|
+
missingStepFiles: state.missingStepFiles,
|
|
2196
|
+
totalFeatures: state.totalFeatures
|
|
2081
2197
|
};
|
|
2082
2198
|
}
|
|
2083
2199
|
|
|
@@ -2703,21 +2819,42 @@ function applyCoverageThresholds(policy, covRaw) {
|
|
|
2703
2819
|
policy.min_function_coverage = Number(cov.min_function_coverage_percent);
|
|
2704
2820
|
}
|
|
2705
2821
|
}
|
|
2822
|
+
function applyTestEnforcement(policy, raw) {
|
|
2823
|
+
if (!raw || typeof raw !== "object") return;
|
|
2824
|
+
const enf = raw;
|
|
2825
|
+
if (typeof enf.require_function_unit_tests === "boolean") {
|
|
2826
|
+
policy.require_function_unit_tests = enf.require_function_unit_tests;
|
|
2827
|
+
}
|
|
2828
|
+
if (typeof enf.require_ui_component_tests === "boolean") {
|
|
2829
|
+
policy.require_ui_component_tests = enf.require_ui_component_tests;
|
|
2830
|
+
}
|
|
2831
|
+
if (Array.isArray(enf.ui_component_patterns)) {
|
|
2832
|
+
policy.ui_component_patterns = enf.ui_component_patterns.map(String);
|
|
2833
|
+
}
|
|
2834
|
+
if (Array.isArray(enf.ui_test_patterns)) {
|
|
2835
|
+
policy.ui_test_patterns = enf.ui_test_patterns.map(String);
|
|
2836
|
+
}
|
|
2837
|
+
}
|
|
2838
|
+
function applySectionThresholds(policy, s) {
|
|
2839
|
+
const cc = s.cyclomatic_complexity?.max_per_function;
|
|
2840
|
+
const cog = s.cognitive_complexity?.max_per_function;
|
|
2841
|
+
const mi = s.maintainability_index?.min_acceptable_score;
|
|
2842
|
+
const loc = s.function_length?.max_function_lines;
|
|
2843
|
+
if (cc !== void 0) policy.max_cyclomatic = Number(cc);
|
|
2844
|
+
if (cog !== void 0) policy.max_cognitive = Number(cog);
|
|
2845
|
+
if (mi !== void 0) policy.min_maintainability = Number(mi);
|
|
2846
|
+
if (loc !== void 0) policy.max_function_lines = Number(loc);
|
|
2847
|
+
applyCoverageThresholds(policy, s.test_coverage);
|
|
2848
|
+
applyTestEnforcement(policy, s.test_enforcement);
|
|
2849
|
+
}
|
|
2706
2850
|
function applyDocThresholds(policy, doc) {
|
|
2707
2851
|
const sections = [doc.release_thresholds, doc.thresholds].filter(
|
|
2708
2852
|
(s) => Boolean(s && typeof s === "object")
|
|
2709
2853
|
);
|
|
2710
2854
|
for (const s of sections) {
|
|
2711
|
-
|
|
2712
|
-
const cog = s.cognitive_complexity?.max_per_function;
|
|
2713
|
-
const mi = s.maintainability_index?.min_acceptable_score;
|
|
2714
|
-
const loc = s.function_length?.max_function_lines;
|
|
2715
|
-
if (cc !== void 0) policy.max_cyclomatic = Number(cc);
|
|
2716
|
-
if (cog !== void 0) policy.max_cognitive = Number(cog);
|
|
2717
|
-
if (mi !== void 0) policy.min_maintainability = Number(mi);
|
|
2718
|
-
if (loc !== void 0) policy.max_function_lines = Number(loc);
|
|
2719
|
-
applyCoverageThresholds(policy, s.test_coverage);
|
|
2855
|
+
applySectionThresholds(policy, s);
|
|
2720
2856
|
}
|
|
2857
|
+
applyTestEnforcement(policy, doc.test_enforcement);
|
|
2721
2858
|
const codingRules = doc.coding_rules;
|
|
2722
2859
|
const rules = codingRules?.rules;
|
|
2723
2860
|
if (rules?.max_function_lines !== void 0) {
|
|
@@ -2986,6 +3123,61 @@ function auditUnitTestsPerFunction(results, rootDir, testPatterns) {
|
|
|
2986
3123
|
}
|
|
2987
3124
|
return untested;
|
|
2988
3125
|
}
|
|
3126
|
+
var UI_COMPONENT_EXTENSIONS = [
|
|
3127
|
+
...DEFAULT_EXTENSIONS,
|
|
3128
|
+
".vue",
|
|
3129
|
+
".svelte",
|
|
3130
|
+
".kt",
|
|
3131
|
+
".swift",
|
|
3132
|
+
".dart"
|
|
3133
|
+
];
|
|
3134
|
+
var UI_TEST_EXTENSIONS = [
|
|
3135
|
+
...UI_COMPONENT_EXTENSIONS,
|
|
3136
|
+
".yaml",
|
|
3137
|
+
".yml"
|
|
3138
|
+
];
|
|
3139
|
+
function collectUiTestFiles(rootDir, customPatterns) {
|
|
3140
|
+
const allFiles = walkDir(rootDir, UI_TEST_EXTENSIONS, DEFAULT_EXCLUDES);
|
|
3141
|
+
const uiTests = [];
|
|
3142
|
+
for (const tf of allFiles) {
|
|
3143
|
+
const relPath = path14.relative(rootDir, tf).replace(/\\/g, "/");
|
|
3144
|
+
if (!isUiTestFile(relPath, customPatterns)) continue;
|
|
3145
|
+
try {
|
|
3146
|
+
uiTests.push({ relPath, content: fs12.readFileSync(tf, "utf-8") });
|
|
3147
|
+
} catch {
|
|
3148
|
+
}
|
|
3149
|
+
}
|
|
3150
|
+
return uiTests;
|
|
3151
|
+
}
|
|
3152
|
+
function extractUiComponentName(relPath) {
|
|
3153
|
+
const base = path14.basename(relPath);
|
|
3154
|
+
return base.replace(/\.(?:xaml\.cs|component\.ts|vue|svelte|tsx?|jsx?|py|cs|java|kt|swift|dart)$/i, "");
|
|
3155
|
+
}
|
|
3156
|
+
function buildComponentNameVariants(componentName) {
|
|
3157
|
+
const kebab = componentName.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
3158
|
+
const snake = kebab.replace(/-/g, "_");
|
|
3159
|
+
return Array.from(/* @__PURE__ */ new Set([componentName, kebab, snake]));
|
|
3160
|
+
}
|
|
3161
|
+
function isUiComponentTested(componentName, uiTests) {
|
|
3162
|
+
const variants = buildComponentNameVariants(componentName);
|
|
3163
|
+
const patterns = variants.map((v) => new RegExp(`\\b${v.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}\\b`, "i"));
|
|
3164
|
+
return uiTests.some((t) => patterns.some((re) => re.test(t.relPath) || re.test(t.content)));
|
|
3165
|
+
}
|
|
3166
|
+
function auditUiComponents(rootDir, policy) {
|
|
3167
|
+
const uiPolicy = { ...policy, supported_extensions: [...UI_COMPONENT_EXTENSIONS] };
|
|
3168
|
+
const candidateFiles = collectFilesToScan(rootDir, uiPolicy);
|
|
3169
|
+
const uiTests = collectUiTestFiles(rootDir, policy.ui_test_patterns);
|
|
3170
|
+
const untested = [];
|
|
3171
|
+
for (const file of candidateFiles) {
|
|
3172
|
+
const relPath = path14.relative(rootDir, file).replace(/\\/g, "/");
|
|
3173
|
+
if (!isUiComponentFile(relPath, policy.ui_component_patterns)) continue;
|
|
3174
|
+
const componentName = extractUiComponentName(relPath);
|
|
3175
|
+
if (!isUiComponentTested(componentName, uiTests)) {
|
|
3176
|
+
untested.push({ file: relPath, componentName });
|
|
3177
|
+
}
|
|
3178
|
+
}
|
|
3179
|
+
return untested;
|
|
3180
|
+
}
|
|
2989
3181
|
function checkCoverageThreshold(label, actual, min, out) {
|
|
2990
3182
|
if (actual < min) {
|
|
2991
3183
|
out.push(`${label} coverage ${actual}% is below minimum threshold of ${min}%`);
|
|
@@ -3128,27 +3320,33 @@ function evaluateRatchetIfActive(results, baselineFile, isActive) {
|
|
|
3128
3320
|
baselineViolationsCount: baseline.totalViolations
|
|
3129
3321
|
};
|
|
3130
3322
|
}
|
|
3131
|
-
function
|
|
3323
|
+
function computeGateSummaryCounts(results, coverageViolations, untestedUi, policy, baselineUpdated) {
|
|
3132
3324
|
const failCount = results.filter((r) => r.status === "FAIL").length;
|
|
3133
3325
|
const passCount = results.length - failCount;
|
|
3134
|
-
const violationsCount = results.reduce((acc, r) => acc + r.violations.length, 0) + coverageViolations.length;
|
|
3135
|
-
const hasFailures = failCount > 0 || coverageViolations.length > 0;
|
|
3136
|
-
const success =
|
|
3326
|
+
const violationsCount = results.reduce((acc, r) => acc + r.violations.length, 0) + coverageViolations.length + untestedUi.length;
|
|
3327
|
+
const hasFailures = failCount > 0 || coverageViolations.length > 0 || untestedUi.length > 0;
|
|
3328
|
+
const success = baselineUpdated ? true : policy.enforce_mode === "STRICT" ? !hasFailures : true;
|
|
3329
|
+
return { failCount, passCount, violationsCount, success };
|
|
3330
|
+
}
|
|
3331
|
+
function buildQualityGateResult(results, totalFiles, policy, coverageViolations, untestedFunctions, baselineMeta) {
|
|
3332
|
+
const untestedUi = baselineMeta?.untestedUiComponents ?? [];
|
|
3333
|
+
const counts = computeGateSummaryCounts(
|
|
3334
|
+
results,
|
|
3335
|
+
coverageViolations,
|
|
3336
|
+
untestedUi,
|
|
3337
|
+
policy,
|
|
3338
|
+
baselineMeta?.baselineUpdated
|
|
3339
|
+
);
|
|
3137
3340
|
return {
|
|
3138
|
-
|
|
3341
|
+
...counts,
|
|
3139
3342
|
totalFiles,
|
|
3140
3343
|
totalFunctions: results.length,
|
|
3141
|
-
passCount,
|
|
3142
|
-
failCount,
|
|
3143
|
-
violationsCount,
|
|
3144
3344
|
results,
|
|
3145
3345
|
policy,
|
|
3146
3346
|
coverageViolations,
|
|
3147
3347
|
untestedFunctions,
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
toleratedViolationsCount: baselineMeta?.toleratedViolationsCount,
|
|
3151
|
-
newViolationsCount: baselineMeta?.newViolationsCount
|
|
3348
|
+
untestedUiComponents: untestedUi,
|
|
3349
|
+
...baselineMeta
|
|
3152
3350
|
};
|
|
3153
3351
|
}
|
|
3154
3352
|
function verifyQualityGate(options = {}) {
|
|
@@ -3162,7 +3360,10 @@ function verifyQualityGate(options = {}) {
|
|
|
3162
3360
|
} catch {
|
|
3163
3361
|
}
|
|
3164
3362
|
}
|
|
3165
|
-
const
|
|
3363
|
+
const requireUnitTests = Boolean(options.requireFunctionUnitTests ?? policy.require_function_unit_tests);
|
|
3364
|
+
const requireUiTests = Boolean(options.requireUiComponentTests ?? policy.require_ui_component_tests);
|
|
3365
|
+
const untestedFunctions = requireUnitTests ? auditUnitTestsPerFunction(results, rootDir, policy.test_patterns) : [];
|
|
3366
|
+
const untestedUiComponents = requireUiTests ? auditUiComponents(rootDir, policy) : [];
|
|
3166
3367
|
const coverageViolations = evaluateCoverageThresholds(rootDir, policy, options.requireCoverageReport);
|
|
3167
3368
|
const baselineFile = resolveBaselineFilePath(rootDir, options);
|
|
3168
3369
|
if (options.updateBaseline) {
|
|
@@ -3170,7 +3371,8 @@ function verifyQualityGate(options = {}) {
|
|
|
3170
3371
|
writeQualityBaseline(baselineFile, entries);
|
|
3171
3372
|
return buildQualityGateResult(results, allFiles.length, policy, coverageViolations, untestedFunctions, {
|
|
3172
3373
|
baselineUpdated: true,
|
|
3173
|
-
baselineViolationsCount: entries.length
|
|
3374
|
+
baselineViolationsCount: entries.length,
|
|
3375
|
+
untestedUiComponents
|
|
3174
3376
|
});
|
|
3175
3377
|
}
|
|
3176
3378
|
const baselineExists = fs12.existsSync(baselineFile);
|
|
@@ -3179,7 +3381,8 @@ function verifyQualityGate(options = {}) {
|
|
|
3179
3381
|
return buildQualityGateResult(results, allFiles.length, policy, coverageViolations, untestedFunctions, {
|
|
3180
3382
|
baselineViolationsCount: ratchetEval.baselineViolationsCount,
|
|
3181
3383
|
toleratedViolationsCount: ratchetEval.toleratedViolationsCount,
|
|
3182
|
-
newViolationsCount: ratchetEval.newViolationsCount
|
|
3384
|
+
newViolationsCount: ratchetEval.newViolationsCount,
|
|
3385
|
+
untestedUiComponents
|
|
3183
3386
|
});
|
|
3184
3387
|
}
|
|
3185
3388
|
function normalizeHandoffPayload(handoff, changeId) {
|
|
@@ -4883,140 +5086,163 @@ function detectActiveChangeForIntegration(options = {}) {
|
|
|
4883
5086
|
}
|
|
4884
5087
|
|
|
4885
5088
|
// src/init/starter-schemas.ts
|
|
4886
|
-
var SCHEMA_SCHEMAS_ARCHITECTURE_ADR_SCHEMA_JSON = '{\
|
|
4887
|
-
var SCHEMA_SCHEMAS_ARCHITECTURE_COMPONENT_SCHEMA_JSON = '{\
|
|
4888
|
-
var SCHEMA_SCHEMAS_ARCHITECTURE_INTRODUCTION_AND_GOALS_SCHEMA_JSON = '{\
|
|
4889
|
-
var SCHEMA_SCHEMAS_COMPLIANCE_LICENSE_MANIFEST_SCHEMA_JSON = '{\
|
|
4890
|
-
var SCHEMA_SCHEMAS_COMPLIANCE_LICENSE_POLICY_SCHEMA_JSON = '{\
|
|
4891
|
-
var SCHEMA_SCHEMAS_COMPLIANCE_QUALITY_POLICY_SCHEMA_JSON = '{\
|
|
4892
|
-
var SCHEMA_SCHEMAS_IDE_MCP_CONFIG_SCHEMA_JSON = '{\
|
|
4893
|
-
var SCHEMA_SCHEMAS_MANUALS_PRODUCTION_MANUAL_SCHEMA_JSON = '{\
|
|
4894
|
-
var SCHEMA_SCHEMAS_MANUALS_USER_MANUAL_SCHEMA_JSON = '{\
|
|
4895
|
-
var SCHEMA_SCHEMAS_PRIVACY_DATA_ASSET_SCHEMA_JSON = '{\
|
|
4896
|
-
var SCHEMA_SCHEMAS_PRIVACY_PRIVACY_POLICY_SCHEMA_JSON = '{\
|
|
4897
|
-
var SCHEMA_SCHEMAS_PRIVACY_PRIVACY_REQ_SCHEMA_JSON = '{\
|
|
4898
|
-
var SCHEMA_SCHEMAS_PRIVACY_PRIVACY_ROPA_SCHEMA_JSON = '{\
|
|
4899
|
-
var SCHEMA_SCHEMAS_PRODUCT_ACTOR_SCHEMA_JSON = '{\
|
|
4900
|
-
var SCHEMA_SCHEMAS_PRODUCT_BOUNDED_CONTEXT_SCHEMA_JSON = '{\
|
|
4901
|
-
var SCHEMA_SCHEMAS_PRODUCT_BUSINESS_RULE_SCHEMA_JSON = '{\
|
|
4902
|
-
var SCHEMA_SCHEMAS_PRODUCT_JOURNEY_SCHEMA_JSON = '{\
|
|
4903
|
-
var SCHEMA_SCHEMAS_PRODUCT_REQUIREMENT_SCHEMA_JSON = '{\
|
|
4904
|
-
var SCHEMA_SCHEMAS_PRODUCT_TERM_SCHEMA_JSON = '{\
|
|
4905
|
-
var SCHEMA_SCHEMAS_PRODUCT_USE_CASE_SCHEMA_JSON = '{\
|
|
4906
|
-
var SCHEMA_SCHEMAS_SAFETY_HAZARD_SCHEMA_JSON = '{\
|
|
4907
|
-
var SCHEMA_SCHEMAS_SAFETY_SAFETY_REQ_SCHEMA_JSON = '{\
|
|
4908
|
-
var SCHEMA_SCHEMAS_SDD_DESIGN_SCHEMA_JSON = '{\
|
|
4909
|
-
var SCHEMA_SCHEMAS_SDD_HANDOFF_SCHEMA_JSON = '{\
|
|
4910
|
-
var SCHEMA_SCHEMAS_SDD_PROPOSAL_SCHEMA_JSON = '{\
|
|
4911
|
-
var SCHEMA_SCHEMAS_SDD_RELEASE_KPIS_SCHEMA_JSON = '{\
|
|
4912
|
-
var SCHEMA_SCHEMAS_SDD_SESSION_TELEMETRY_SCHEMA_JSON = '{\
|
|
4913
|
-
var SCHEMA_SCHEMAS_SDD_SPEC_SCHEMA_JSON = '{\
|
|
4914
|
-
var SCHEMA_SCHEMAS_SDD_TASKS_SCHEMA_JSON = '{\
|
|
4915
|
-
var SCHEMA_SCHEMAS_SECURITY_ABUSE_CASE_SCHEMA_JSON = '{\
|
|
4916
|
-
var SCHEMA_SCHEMAS_SECURITY_ENCLAVE_SCHEMA_JSON = `{
|
|
4917
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema"
|
|
4918
|
-
"$id": "https://ai-sdlc.org/schemas/security/enclave.schema.json"
|
|
4919
|
-
"title": "Security Enclave Schema (Zero Trust Architecture Boundary)"
|
|
4920
|
-
"type": "object"
|
|
4921
|
-
"required": [
|
|
4922
|
-
"id"
|
|
4923
|
-
"type"
|
|
4924
|
-
"title"
|
|
4925
|
-
"status"
|
|
4926
|
-
"version"
|
|
4927
|
-
"trust-zone"
|
|
4928
|
-
"perimeter-rules"
|
|
4929
|
-
"allowed-inbound"
|
|
4930
|
-
"allowed-outbound"
|
|
4931
|
-
]
|
|
4932
|
-
"properties": {
|
|
4933
|
-
"id": {
|
|
4934
|
-
"type": "string"
|
|
4935
|
-
"pattern": "^SEC-ENC-[A-Z0-9]+(-[A-Z0-9]+)*$"
|
|
4936
|
-
}
|
|
4937
|
-
"type": {
|
|
4938
|
-
"type": "string"
|
|
4939
|
-
"const": "security-enclave"
|
|
4940
|
-
}
|
|
4941
|
-
"version": {
|
|
4942
|
-
"type": "string"
|
|
4943
|
-
"pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$"
|
|
4944
|
-
"description": "Security enclave semantic version (SemVer)."
|
|
4945
|
-
}
|
|
4946
|
-
"schema-version": {
|
|
4947
|
-
"type": "string"
|
|
4948
|
-
}
|
|
4949
|
-
"title": {
|
|
4950
|
-
"type": "string"
|
|
4951
|
-
"minLength": 3
|
|
4952
|
-
}
|
|
4953
|
-
"status": {
|
|
4954
|
-
"type": "string"
|
|
4955
|
-
"enum": [
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
}
|
|
4962
|
-
"trust-
|
|
4963
|
-
"type": "string"
|
|
4964
|
-
"
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
4972
|
-
"
|
|
4973
|
-
|
|
4974
|
-
|
|
4975
|
-
|
|
4976
|
-
"description": "
|
|
4977
|
-
}
|
|
4978
|
-
"
|
|
4979
|
-
"type": "
|
|
4980
|
-
"
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
"
|
|
4985
|
-
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
"
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
"
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
"
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
"
|
|
5001
|
-
|
|
5002
|
-
|
|
5003
|
-
|
|
5004
|
-
"
|
|
5005
|
-
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
"
|
|
5009
|
-
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
5089
|
+
var SCHEMA_SCHEMAS_ARCHITECTURE_ADR_SCHEMA_JSON = '{\n "$schema": "https://json-schema.org/draft/2020-12/schema",\n "$id": "https://ai-sdlc.org/schemas/architecture/adr.schema.json",\n "title": "Architecture Decision Record Schema (Versionable)",\n "type": "object",\n "required": [\n "id",\n "type",\n "title",\n "status",\n "version",\n "deciders",\n "decision-date"\n ],\n "properties": {\n "id": {\n "type": "string",\n "pattern": "^ADR-[0-9]{3,4}(-[A-Z0-9]+)*$"\n },\n "type": {\n "type": "string",\n "const": "architecture-decision-record"\n },\n "version": {\n "type": "string",\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$",\n "description": "Decision 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": [\n "proposed",\n "accepted",\n "rejected",\n "deprecated",\n "superseded"\n ]\n },\n "deciders": {\n "type": "array",\n "minItems": 1,\n "items": {\n "type": "string"\n }\n },\n "decision-date": {\n "type": "string",\n "format": "date"\n },\n "affects-components": {\n "type": "array",\n "items": {\n "type": "string",\n "pattern": "^CMP-[A-Z0-9]+(-[A-Z0-9]+)*$"\n }\n },\n "supersedes": {\n "type": [\n "string",\n "null"\n ],\n "pattern": "^ADR-[0-9]{3,4}(-[A-Z0-9]+)*$"\n },\n "superseded-by": {\n "type": [\n "string",\n "null"\n ],\n "pattern": "^ADR-[0-9]{3,4}(-[A-Z0-9]+)*$"\n }\n },\n "additionalProperties": false\n}';
|
|
5090
|
+
var SCHEMA_SCHEMAS_ARCHITECTURE_COMPONENT_SCHEMA_JSON = '{\n "$schema": "https://json-schema.org/draft/2020-12/schema",\n "$id": "https://ai-sdlc.org/schemas/architecture/component.schema.json",\n "title": "NAF v4 / arc42 Architecture Component Schema (Multilevel)",\n "type": "object",\n "required": [\n "id",\n "type",\n "title",\n "status",\n "version",\n "level",\n "implementation-type",\n "implements-use-cases"\n ],\n "properties": {\n "id": {\n "type": "string",\n "pattern": "^CMP-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "type": {\n "type": "string",\n "const": "component"\n },\n "version": {\n "type": "string",\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$",\n "description": "Architecture component 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": [\n "proposed",\n "accepted",\n "deprecated",\n "retired"\n ]\n },\n "level": {\n "type": "integer",\n "minimum": 1,\n "description": "Hierarchical architecture level (1: Bounded Context / Root System, 2: Subsystem / Container, 3: Executable Unit / DLL / Function)."\n },\n "bounded-context": {\n "type": "string",\n "description": "Domain-Driven Design (DDD) Bounded Context name this component belongs to."\n },\n "parent-component": {\n "type": [\n "string",\n "null"\n ],\n "pattern": "^CMP-[A-Z0-9]+(-[A-Z0-9]+)*$",\n "description": "Parent component identifier (null if Level 1)."\n },\n "implementation-type": {\n "type": "string",\n "enum": [\n "service",\n "dll",\n "function",\n "composite"\n ],\n "description": "Technical implementation paradigm: distributed service (service), dynamic/native library (dll), in-process module/function (function), or logical aggregator/Bounded Context (composite)."\n },\n "implements-use-cases": {\n "type": "array",\n "minItems": 1,\n "items": {\n "type": "string",\n "pattern": "^UC-[A-Z0-9]+(-[A-Z0-9]+)*$"\n }\n },\n "satisfies-requirements": {\n "type": "array",\n "items": {\n "type": "string",\n "pattern": "^(FR|QR|CON|SEC-REQ|SAF-REQ|PRIV-REQ)-[A-Z0-9]+(-[A-Z0-9]+)*$"\n }\n },\n "hosted-in-enclave": {\n "type": "string",\n "pattern": "^SEC-ENC-[A-Z0-9]+(-[A-Z0-9]+)*$",\n "description": "Security enclave where the component resides (optional for DLLs or in-process functions)."\n },\n "interfaces": {\n "type": "array",\n "items": {\n "type": "object",\n "required": [\n "name",\n "protocol"\n ],\n "properties": {\n "name": {\n "type": "string"\n },\n "protocol": {\n "type": "string",\n "enum": [\n "REST/HTTP",\n "gRPC",\n "WebSocket",\n "Kafka",\n "MQTT",\n "C-ABI",\n "Native-ABI",\n "FFI",\n "In-Process API",\n "Function-Call",\n "CLI",\n "GUI",\n "IPC"\n ]\n },\n "contract-spec": {\n "type": "string"\n }\n }\n }\n },\n "supersedes": {\n "type": [\n "string",\n "null"\n ],\n "pattern": "^CMP-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "superseded-by": {\n "type": [\n "string",\n "null"\n ],\n "pattern": "^CMP-[A-Z0-9]+(-[A-Z0-9]+)*$"\n }\n },\n "additionalProperties": false\n}';
|
|
5091
|
+
var SCHEMA_SCHEMAS_ARCHITECTURE_INTRODUCTION_AND_GOALS_SCHEMA_JSON = '{\n "$schema": "https://json-schema.org/draft/2020-12/schema",\n "$id": "https://ai-sdlc.org/schemas/architecture/introduction-and-goals.schema.json",\n "title": "NAF v4 Enterprise & Capability / arc42 Introduction and System Goals Schema",\n "type": "object",\n "required": [\n "id",\n "type",\n "title",\n "status",\n "version",\n "naf-perspective",\n "cites-product-actors",\n "cites-quality-goals",\n "cites-journeys"\n ],\n "properties": {\n "id": {\n "type": "string",\n "pattern": "^ARCH-INTRO-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "type": {\n "type": "string",\n "const": "architecture-introduction"\n },\n "version": {\n "type": "string",\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$",\n "description": "Artifact 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": [\n "draft",\n "proposed",\n "accepted",\n "approved",\n "deprecated",\n "superseded"\n ]\n },\n "owner": {\n "type": "string"\n },\n "arc42-section": {\n "type": "integer",\n "const": 1\n },\n "naf-perspective": {\n "type": "string",\n "const": "Enterprise & Capability"\n },\n "cites-product-actors": {\n "type": "array",\n "minItems": 1,\n "items": {\n "type": "string",\n "pattern": "^ACT-[A-Z0-9]+(-[A-Z0-9]+)*$"\n }\n },\n "cites-quality-goals": {\n "type": "array",\n "minItems": 1,\n "items": {\n "type": "string",\n "pattern": "^(QR|SEC-REQ|PRIV-REQ)-[A-Z0-9]+(-[A-Z0-9]+)*$"\n }\n },\n "cites-journeys": {\n "type": "array",\n "minItems": 1,\n "items": {\n "type": "string",\n "pattern": "^JRN-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "description": "Product journey identifiers (JRN-*) envisioned in this system capability scope."\n },\n "supersedes": {\n "type": [\n "string",\n "null"\n ],\n "pattern": "^ARCH-INTRO-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "superseded-by": {\n "type": [\n "string",\n "null"\n ],\n "pattern": "^ARCH-INTRO-[A-Z0-9]+(-[A-Z0-9]+)*$"\n }\n },\n "additionalProperties": false\n}';
|
|
5092
|
+
var SCHEMA_SCHEMAS_COMPLIANCE_LICENSE_MANIFEST_SCHEMA_JSON = '{\n "$schema": "https://json-schema.org/draft/2020-12/schema",\n "$id": "https://ai-sdlc.org/schemas/compliance/license-manifest.schema.json",\n "title": "Static Dependencies License Manifest Schema",\n "type": "object",\n "required": [\n "evaluated_dependencies"\n ],\n "properties": {\n "id": {\n "type": "string",\n "pattern": "^(MAN-LIC|LIC-MAN|LIC)-[A-Z0-9]+(-[A-Z0-9]+)*$",\n "description": "Optional canonical artifact identifier."\n },\n "type": {\n "type": "string",\n "const": "license-manifest"\n },\n "version": {\n "type": "string",\n "pattern": "^[0-9]+\\\\.[0-9]+(\\\\.[0-9]+)?(-[0-9A-Za-z.-]+)?$",\n "description": "Manifest format version."\n },\n "schema-version": {\n "type": "string"\n },\n "description": {\n "type": "string"\n },\n "generated_at": {\n "type": "string"\n },\n "evaluated_dependencies": {\n "type": "array",\n "minItems": 1,\n "items": {\n "type": "object",\n "required": [\n "package",\n "version",\n "spdx_license",\n "status"\n ],\n "properties": {\n "package": {\n "type": "string",\n "minLength": 1\n },\n "version": {\n "type": "string",\n "minLength": 1\n },\n "spdx_license": {\n "type": "string",\n "minLength": 1\n },\n "status": {\n "type": "string",\n "enum": [\n "APPROVED",\n "REJECTED",\n "REVIEW_REQUIRED",\n "COMMERCIAL_APPROVAL_REQUIRED",\n "PENDING"\n ]\n },\n "reason": {\n "type": "string"\n },\n "approved_by": {\n "type": "string"\n }\n },\n "additionalProperties": false\n }\n }\n },\n "additionalProperties": false\n}';
|
|
5093
|
+
var SCHEMA_SCHEMAS_COMPLIANCE_LICENSE_POLICY_SCHEMA_JSON = '{\n "$schema": "https://json-schema.org/draft/2020-12/schema",\n "$id": "https://ai-sdlc.org/schemas/compliance/license-policy.schema.json",\n "title": "Open Source License Policy Schema",\n "type": "object",\n "required": [\n "version",\n "project",\n "default_action",\n "categories",\n "agent_guardrails",\n "ci_gates"\n ],\n "properties": {\n "version": {\n "type": "string"\n },\n "project": {\n "type": "string"\n },\n "default_action": {\n "type": "string",\n "enum": [\n "ALLOW",\n "DENY",\n "REVIEW_REQUIRED"\n ]\n },\n "categories": {\n "type": "object"\n },\n "agent_guardrails": {\n "type": "object",\n "required": [\n "enforce_pre_check",\n "reject_unknown_licenses"\n ],\n "properties": {\n "enforce_pre_check": {\n "type": "boolean"\n },\n "reject_unknown_licenses": {\n "type": "boolean"\n },\n "auto_reject_categories": {\n "type": "array",\n "items": {\n "type": "string"\n }\n },\n "on_commercial_detected": {\n "type": "object"\n }\n }\n },\n "ci_gates": {\n "type": "object",\n "required": [\n "fail_on_denied",\n "generate_sbom"\n ],\n "properties": {\n "fail_on_denied": {\n "type": "boolean"\n },\n "fail_on_missing_license": {\n "type": "boolean"\n },\n "generate_sbom": {\n "type": "boolean"\n },\n "sbom_format": {\n "type": "string"\n },\n "output_notices_file": {\n "type": "string"\n },\n "allowed_depth": {\n "type": "string",\n "enum": [\n "DIRECT",\n "TRANSITIVE"\n ]\n }\n }\n }\n },\n "additionalProperties": false\n}';
|
|
5094
|
+
var SCHEMA_SCHEMAS_COMPLIANCE_QUALITY_POLICY_SCHEMA_JSON = '{\n "$schema": "https://json-schema.org/draft/2020-12/schema",\n "$id": "https://ai-sdlc.org/schemas/compliance/quality-policy.schema.json",\n "title": "Software Quality Policy Schema (Polyglot)",\n "type": "object",\n "required": [\n "version",\n "project",\n "enforcement_mode",\n "coding_rules",\n "release_thresholds",\n "agent_guardrails"\n ],\n "properties": {\n "version": {\n "type": "string"\n },\n "project": {\n "type": "string"\n },\n "enforcement_mode": {\n "type": "string",\n "enum": [\n "STRICT",\n "PERMISSIVE"\n ]\n },\n "ratchet_mode": {\n "type": "boolean"\n },\n "scope": {\n "type": "object",\n "properties": {\n "target_directories": {\n "type": "array",\n "items": {\n "type": "string"\n }\n },\n "supported_extensions": {\n "type": "array",\n "items": {\n "type": "string"\n }\n },\n "exclude_patterns": {\n "type": "array",\n "items": {\n "type": "string"\n }\n }\n }\n },\n "language_toolchains": {\n "type": "object"\n },\n "coding_rules": {\n "type": "object",\n "required": [\n "standards",\n "enforce_formatting",\n "rules"\n ],\n "properties": {\n "standards": {\n "type": "array",\n "items": {\n "type": "string"\n }\n },\n "enforce_formatting": {\n "type": "boolean"\n },\n "formatting_engine": {\n "type": "string"\n },\n "linter_engine": {\n "type": "string"\n },\n "rules": {\n "type": "object"\n }\n }\n },\n "release_thresholds": {\n "type": "object",\n "required": [\n "cyclomatic_complexity",\n "cognitive_complexity",\n "maintainability_index",\n "code_duplication",\n "test_coverage"\n ],\n "properties": {\n "cyclomatic_complexity": {\n "type": "object",\n "required": [\n "max_per_function",\n "action_on_breach"\n ],\n "properties": {\n "max_per_function": {\n "type": "integer"\n },\n "warning_at": {\n "type": "integer"\n },\n "action_on_breach": {\n "type": "string"\n }\n }\n },\n "cognitive_complexity": {\n "type": "object",\n "required": [\n "max_per_function",\n "action_on_breach"\n ],\n "properties": {\n "max_per_function": {\n "type": "integer"\n },\n "warning_at": {\n "type": "integer"\n },\n "action_on_breach": {\n "type": "string"\n }\n }\n },\n "maintainability_index": {\n "type": "object",\n "required": [\n "min_acceptable_score",\n "action_on_breach"\n ],\n "properties": {\n "min_acceptable_score": {\n "type": "number"\n },\n "target_score": {\n "type": "number"\n },\n "action_on_breach": {\n "type": "string"\n }\n }\n },\n "code_duplication": {\n "type": "object",\n "required": [\n "max_percentage",\n "action_on_breach"\n ],\n "properties": {\n "max_percentage": {\n "type": "number"\n },\n "action_on_breach": {\n "type": "string"\n }\n }\n },\n "test_coverage": {\n "type": "object",\n "required": [\n "min_line_coverage_percent",\n "action_on_breach"\n ],\n "properties": {\n "min_line_coverage_percent": {\n "type": "number"\n },\n "min_branch_coverage_percent": {\n "type": "number"\n },\n "min_function_coverage_percent": {\n "type": "number"\n },\n "action_on_breach": {\n "type": "string"\n }\n }\n },\n "technical_debt": {\n "type": "object"\n }\n }\n },\n "agent_guardrails": {\n "type": "object",\n "required": [\n "enforce_pre_commit_linter",\n "prevent_suppression_comments"\n ],\n "properties": {\n "enforce_pre_commit_linter": {\n "type": "boolean"\n },\n "prevent_suppression_comments": {\n "type": "boolean"\n },\n "auto_refactor_on_high_complexity": {\n "type": "boolean"\n }\n }\n }\n },\n "additionalProperties": false\n}';
|
|
5095
|
+
var SCHEMA_SCHEMAS_IDE_MCP_CONFIG_SCHEMA_JSON = '{\n "$schema": "https://json-schema.org/draft/2020-12/schema",\n "$id": "https://ai-sdlc.org/schemas/ide/mcp-config.schema.json",\n "title": "IDE MCP Configuration Schema (Cursor, Antigravity, VS Code)",\n "type": "object",\n "properties": {\n "$schema": {\n "type": "string"\n },\n "id": {\n "type": "string",\n "pattern": "^(MCP-CFG|IDE-MCP|MCP)-[A-Z0-9]+(-[A-Z0-9]+)*$",\n "description": "Optional identifier for MCP configuration artifact."\n },\n "type": {\n "type": "string",\n "const": "mcp-config"\n },\n "mcpServers": {\n "type": "object",\n "additionalProperties": {\n "type": "object",\n "required": [\n "command"\n ],\n "properties": {\n "command": {\n "type": "string",\n "minLength": 1\n },\n "args": {\n "type": "array",\n "items": {\n "type": "string"\n }\n },\n "env": {\n "type": "object"\n },\n "disabled": {\n "type": "boolean"\n },\n "alwaysAllow": {\n "type": "array",\n "items": {\n "type": "string"\n }\n }\n },\n "additionalProperties": false\n },\n "description": "MCP server registry format for Cursor and Antigravity."\n },\n "servers": {\n "type": "object",\n "additionalProperties": {\n "type": "object",\n "required": [\n "command"\n ],\n "properties": {\n "command": {\n "type": "string",\n "minLength": 1\n },\n "args": {\n "type": "array",\n "items": {\n "type": "string"\n }\n },\n "env": {\n "type": "object"\n },\n "disabled": {\n "type": "boolean"\n },\n "alwaysAllow": {\n "type": "array",\n "items": {\n "type": "string"\n }\n }\n },\n "additionalProperties": false\n },\n "description": "MCP server registry format for VS Code."\n }\n },\n "additionalProperties": false\n}';
|
|
5096
|
+
var SCHEMA_SCHEMAS_MANUALS_PRODUCTION_MANUAL_SCHEMA_JSON = '{\n "$schema": "https://json-schema.org/draft/2020-12/schema",\n "$id": "https://ai-sdlc.org/schemas/manuals/production-manual.schema.json",\n "title": "AI-SDLC Production & Operations Manual Schema",\n "type": "object",\n "required": [\n "id",\n "type",\n "title",\n "status",\n "version",\n "applies-to-version",\n "target-audience"\n ],\n "properties": {\n "id": {\n "type": "string",\n "pattern": "^MAN-PROD-[A-Z0-9]+(-[A-Z0-9]+)*$",\n "description": "Immutable production manual identifier (e.g. MAN-PROD-SENTINELCORE)."\n },\n "type": {\n "type": "string",\n "const": "production-manual"\n },\n "version": {\n "type": "string",\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$",\n "description": "Document semantic version (SemVer)."\n },\n "schema-version": {\n "type": "string",\n "description": "Template schema version."\n },\n "title": {\n "type": "string",\n "minLength": 3,\n "description": "Descriptive title of the production manual."\n },\n "status": {\n "type": "string",\n "enum": [\n "draft",\n "active",\n "deprecated",\n "retired"\n ]\n },\n "applies-to-version": {\n "type": "string",\n "description": "Software version or release this production manual applies to (e.g. v1.0.0)."\n },\n "target-audience": {\n "type": "array",\n "items": {\n "type": "string"\n },\n "minItems": 1,\n "description": "Target technical profiles (e.g. DevOps, SRE, Release Manager, SecOps)."\n },\n "components-covered": {\n "type": "array",\n "items": {\n "type": "string",\n "pattern": "^CMP-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "description": "Architecture components (CMP-*) deployed and covered by the manual."\n },\n "enclaves-involved": {\n "type": "array",\n "items": {\n "type": "string",\n "pattern": "^SEC-ENC-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "description": "Security enclaves (SEC-ENC-*) in which deployment executes."\n },\n "supersedes": {\n "type": [\n "string",\n "null"\n ],\n "pattern": "^MAN-PROD-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "superseded-by": {\n "type": [\n "string",\n "null"\n ],\n "pattern": "^MAN-PROD-[A-Z0-9]+(-[A-Z0-9]+)*$"\n }\n },\n "additionalProperties": false\n}';
|
|
5097
|
+
var SCHEMA_SCHEMAS_MANUALS_USER_MANUAL_SCHEMA_JSON = '{\n "$schema": "https://json-schema.org/draft/2020-12/schema",\n "$id": "https://ai-sdlc.org/schemas/manuals/user-manual.schema.json",\n "title": "AI-SDLC User Manual Schema",\n "type": "object",\n "required": [\n "id",\n "type",\n "title",\n "status",\n "version",\n "target-audience",\n "allowed-roles",\n "applies-to-version"\n ],\n "properties": {\n "id": {\n "type": "string",\n "pattern": "^MAN-USER-[A-Z0-9]+(-[A-Z0-9]+)*$",\n "description": "Immutable user manual identifier (e.g. MAN-USER-SENTINELCORE)."\n },\n "type": {\n "type": "string",\n "const": "user-manual"\n },\n "version": {\n "type": "string",\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$",\n "description": "Document semantic version (SemVer)."\n },\n "schema-version": {\n "type": "string",\n "description": "Template schema version."\n },\n "title": {\n "type": "string",\n "minLength": 3,\n "description": "Descriptive title of the user manual."\n },\n "status": {\n "type": "string",\n "enum": [\n "draft",\n "active",\n "deprecated",\n "retired"\n ]\n },\n "applies-to-version": {\n "type": "string",\n "description": "Software version or release this manual applies to (e.g. v1.0.0)."\n },\n "target-audience": {\n "type": "array",\n "items": {\n "type": "string"\n },\n "minItems": 1,\n "description": "Target user profiles or roles for the manual."\n },\n "allowed-roles": {\n "type": "array",\n "items": {\n "type": "string"\n },\n "minItems": 1,\n "description": "Formal catalog of authorized roles to operate the application (linked to ACT-*)."\n },\n "journeys-covered": {\n "type": "array",\n "items": {\n "type": "string",\n "pattern": "^JRN-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "description": "Product journey identifiers (JRN-*) covered in the manual."\n },\n "use-cases-covered": {\n "type": "array",\n "items": {\n "type": "string",\n "pattern": "^UC-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "description": "Use case identifiers (UC-*) implemented across journeys."\n },\n "supersedes": {\n "type": [\n "string",\n "null"\n ],\n "pattern": "^MAN-USER-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "superseded-by": {\n "type": [\n "string",\n "null"\n ],\n "pattern": "^MAN-USER-[A-Z0-9]+(-[A-Z0-9]+)*$"\n }\n },\n "additionalProperties": false\n}';
|
|
5098
|
+
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": [\n "draft",\n "active",\n "deprecated",\n "retired"\n ]\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": [\n "name",\n "sensitivity",\n "masking-strategy"\n ],\n "properties": {\n "name": {\n "type": "string",\n "minLength": 1\n },\n "sensitivity": {\n "type": "string",\n "enum": [\n "public",\n "internal",\n "pii",\n "special-category"\n ]\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": [\n "string",\n "null"\n ],\n "pattern": "^DATA-ASSET-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "superseded-by": {\n "type": [\n "string",\n "null"\n ],\n "pattern": "^DATA-ASSET-[A-Z0-9]+(-[A-Z0-9]+)*$"\n }\n },\n "additionalProperties": false\n}';
|
|
5099
|
+
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": [\n "GDPR",\n "LOPDGDD",\n "ISO-27701",\n "CCPA",\n "HIPAA",\n "LGPD"\n ]\n }\n },\n "default_action": {\n "type": "string",\n "enum": [\n "DENY_UNREGISTERED_PII",\n "ALLOW",\n "REVIEW_REQUIRED"\n ]\n },\n "classifications": {\n "type": "object",\n "required": [\n "public",\n "internal",\n "confidential_pii",\n "special_category_sensitive"\n ],\n "additionalProperties": {\n "type": "object",\n "required": [\n "action",\n "encryption_at_rest",\n "encryption_in_transit",\n "allow_in_logs",\n "allow_in_ai_prompts"\n ],\n "properties": {\n "action": {\n "type": "string",\n "enum": [\n "ALLOW",\n "STRICT_GOVERNANCE",\n "DPIA_APPROVAL_REQUIRED",\n "DENY"\n ]\n },\n "description": {\n "type": "string"\n },\n "exception_requires": {\n "type": "string"\n },\n "require_ropa_entry": {\n "type": "boolean"\n },\n "require_dpia_artifact": {\n "type": "boolean"\n },\n "encryption_at_rest": {\n "type": "boolean"\n },\n "encryption_in_transit": {\n "type": "boolean"\n },\n "require_field_level_encryption": {\n "type": "boolean"\n },\n "allow_in_logs": {\n "type": "boolean"\n },\n "log_masking_strategy": {\n "type": "string"\n },\n "allow_in_ai_prompts": {\n "type": "boolean"\n },\n "max_retention_days": {\n "type": "integer",\n "minimum": 1\n },\n "require_right_to_erasure": {\n "type": "boolean"\n }\n },\n "additionalProperties": false\n }\n },\n "cross_border_transfers": {\n "type": "object",\n "properties": {\n "allowed_regions": {\n "type": "array",\n "items": {\n "type": "string"\n }\n },\n "require_scc_for_third_countries": {\n "type": "boolean"\n },\n "approved_subprocessors": {\n "type": "array",\n "items": {\n "type": "string"\n }\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": {\n "type": "boolean"\n },\n "forbid_pii_in_console_or_logger": {\n "type": "boolean"\n },\n "require_dto_projection_for_pii": {\n "type": "boolean"\n },\n "on_special_category_detected": {\n "type": "object",\n "required": [\n "action",\n "notification_tag",\n "message"\n ],\n "properties": {\n "action": {\n "type": "string"\n },\n "notification_tag": {\n "type": "string"\n },\n "message": {\n "type": "string"\n }\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": {\n "type": "boolean"\n },\n "fail_on_pii_in_logs": {\n "type": "boolean"\n },\n "fail_on_missing_retention_policy": {\n "type": "boolean"\n },\n "fail_on_unapproved_subprocessor": {\n "type": "boolean"\n },\n "generate_ropa_inventory": {\n "type": "boolean"\n },\n "output_ropa_file": {\n "type": "string"\n },\n "output_privacy_report": {\n "type": "string"\n }\n },\n "additionalProperties": false\n }\n },\n "additionalProperties": false\n}';
|
|
5100
|
+
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": [\n "draft",\n "active",\n "deprecated",\n "retired"\n ]\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": [\n "gherkin",\n "declarative-prose"\n ]\n },\n "cucumber-tags": {\n "type": "array",\n "items": {\n "type": "string",\n "pattern": "^@[a-zA-Z0-9_-]+$"\n }\n },\n "supersedes": {\n "type": [\n "string",\n "null"\n ],\n "pattern": "^PRIV-REQ-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "superseded-by": {\n "type": [\n "string",\n "null"\n ],\n "pattern": "^PRIV-REQ-[A-Z0-9]+(-[A-Z0-9]+)*$"\n }\n },\n "additionalProperties": false\n}';
|
|
5101
|
+
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": [\n "draft",\n "active",\n "deprecated",\n "retired"\n ]\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": [\n "string",\n "null"\n ],\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": [\n "string",\n "null"\n ],\n "enum": [\n null,\n "adequacy-decision",\n "scc",\n "bcr",\n "derogation"\n ]\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": [\n "string",\n "null"\n ],\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": [\n "string",\n "null"\n ],\n "pattern": "^PRIV-ROPA-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "superseded-by": {\n "type": [\n "string",\n "null"\n ],\n "pattern": "^PRIV-ROPA-[A-Z0-9]+(-[A-Z0-9]+)*$"\n }\n },\n "additionalProperties": false\n}';
|
|
5102
|
+
var SCHEMA_SCHEMAS_PRODUCT_ACTOR_SCHEMA_JSON = '{\n "$schema": "https://json-schema.org/draft/2020-12/schema",\n "$id": "https://ai-sdlc.org/schemas/product/actor.schema.json",\n "title": "ProductShape Actor Schema (Versionable)",\n "type": "object",\n "required": [\n "id",\n "type",\n "title",\n "status",\n "version",\n "role-type"\n ],\n "properties": {\n "id": {\n "type": "string",\n "pattern": "^ACT-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "type": {\n "type": "string",\n "const": "actor"\n },\n "version": {\n "type": "string",\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$",\n "description": "Artifact semantic version (SemVer)."\n },\n "schema-version": {\n "type": "string",\n "description": "Schema specification version used."\n },\n "title": {\n "type": "string",\n "minLength": 3\n },\n "status": {\n "type": "string",\n "enum": [\n "draft",\n "active",\n "deprecated",\n "retired"\n ]\n },\n "role-type": {\n "type": "string",\n "enum": [\n "human-user",\n "ai-agent",\n "external-system",\n "sensor-iot"\n ]\n },\n "description": {\n "type": "string"\n },\n "supersedes": {\n "type": [\n "string",\n "null"\n ],\n "pattern": "^ACT-[A-Z0-9]+(-[A-Z0-9]+)*$",\n "description": "Identifier of the actor superseded by this version or artifact."\n },\n "superseded-by": {\n "type": [\n "string",\n "null"\n ],\n "pattern": "^ACT-[A-Z0-9]+(-[A-Z0-9]+)*$",\n "description": "Identifier of the new actor superseding this one upon deprecation/retirement."\n }\n },\n "additionalProperties": false\n}';
|
|
5103
|
+
var SCHEMA_SCHEMAS_PRODUCT_BOUNDED_CONTEXT_SCHEMA_JSON = '{\n "$schema": "https://json-schema.org/draft/2020-12/schema",\n "$id": "https://ai-sdlc.org/schemas/product/bounded-context.schema.json",\n "title": "Domain-Driven Design (DDD) Bounded Context Schema",\n "type": "object",\n "required": [\n "id",\n "type",\n "title",\n "status",\n "version",\n "domain-type",\n "responsibilities"\n ],\n "properties": {\n "id": {\n "type": "string",\n "pattern": "^BC-[A-Z0-9]+(-[A-Z0-9]+)*$",\n "description": "Immutable Bounded Context identifier (e.g. BC-AI-SDLC-GOVERNANCE)."\n },\n "type": {\n "type": "string",\n "const": "bounded-context"\n },\n "version": {\n "type": "string",\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$",\n "description": "Bounded context document semantic version (SemVer)."\n },\n "schema-version": {\n "type": "string",\n "description": "Template schema version."\n },\n "title": {\n "type": "string",\n "minLength": 3,\n "description": "Descriptive title of the Bounded Context."\n },\n "status": {\n "type": "string",\n "enum": [\n "draft",\n "active",\n "deprecated",\n "retired"\n ]\n },\n "domain-type": {\n "type": "string",\n "enum": [\n "core",\n "supporting",\n "generic"\n ],\n "description": "DDD subdomain classification: core differentiator, supporting capability, or generic commodity."\n },\n "strategic-classification": {\n "type": "object",\n "properties": {\n "evolutionary-stage": {\n "type": "string",\n "enum": [\n "genesis",\n "custom-built",\n "product-rental",\n "commodity"\n ]\n },\n "business-model-role": {\n "type": "string",\n "enum": [\n "differentiator",\n "operational",\n "enabler"\n ]\n }\n },\n "additionalProperties": false\n },\n "responsibilities": {\n "type": "array",\n "items": {\n "type": "string",\n "minLength": 3\n },\n "minItems": 1,\n "description": "List of functional boundaries and core domain responsibilities encapsulated within this context."\n },\n "ubiquitous-language-terms": {\n "type": "array",\n "items": {\n "type": "string",\n "pattern": "^TERM-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "description": "Ubiquitous language terms (TERM-*) governed within this bounded context."\n },\n "context-mapping": {\n "type": "object",\n "properties": {\n "upstream-dependencies": {\n "type": "array",\n "items": {\n "type": "string"\n }\n },\n "downstream-dependents": {\n "type": "array",\n "items": {\n "type": "string"\n }\n },\n "integration-patterns": {\n "type": "array",\n "items": {\n "type": "object",\n "properties": {\n "pattern": {\n "type": "string"\n },\n "related-context": {\n "type": "string"\n }\n },\n "additionalProperties": false\n }\n }\n },\n "additionalProperties": false\n },\n "components-involved": {\n "type": "array",\n "items": {\n "type": "string",\n "pattern": "^CMP-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "description": "Architecture components (CMP-*) implementing this bounded context."\n },\n "supersedes": {\n "type": [\n "string",\n "null"\n ],\n "pattern": "^BC-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "superseded-by": {\n "type": [\n "string",\n "null"\n ],\n "pattern": "^BC-[A-Z0-9]+(-[A-Z0-9]+)*$"\n }\n },\n "additionalProperties": false\n}';
|
|
5104
|
+
var SCHEMA_SCHEMAS_PRODUCT_BUSINESS_RULE_SCHEMA_JSON = '{\n "$schema": "https://json-schema.org/draft/2020-12/schema",\n "$id": "https://ai-sdlc.org/schemas/product/business-rule.schema.json",\n "title": "ProductShape Business Rule Schema (Versionable)",\n "type": "object",\n "required": [\n "id",\n "type",\n "title",\n "status",\n "version",\n "enforcement-level"\n ],\n "properties": {\n "id": {\n "type": "string",\n "pattern": "^BR-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "type": {\n "type": "string",\n "const": "business-rule"\n },\n "version": {\n "type": "string",\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$",\n "description": "Business rule 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": [\n "draft",\n "active",\n "deprecated",\n "retired"\n ]\n },\n "enforcement-level": {\n "type": "string",\n "enum": [\n "strict-invariant",\n "override-with-approval",\n "guideline"\n ]\n },\n "defined-in": {\n "type": "string",\n "pattern": "^BC-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "uses-terms": {\n "type": "array",\n "items": {\n "type": "string",\n "pattern": "^TERM-[A-Z0-9]+(-[A-Z0-9]+)*$"\n }\n },\n "supersedes": {\n "type": [\n "string",\n "null"\n ],\n "pattern": "^BR-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "superseded-by": {\n "type": [\n "string",\n "null"\n ],\n "pattern": "^BR-[A-Z0-9]+(-[A-Z0-9]+)*$"\n }\n },\n "additionalProperties": false\n}';
|
|
5105
|
+
var SCHEMA_SCHEMAS_PRODUCT_JOURNEY_SCHEMA_JSON = '{\n "$schema": "https://json-schema.org/draft/2020-12/schema",\n "$id": "https://ai-sdlc.org/schemas/product/journey.schema.json",\n "title": "Customer / Operator Journey Schema",\n "type": "object",\n "required": [\n "id",\n "type",\n "title",\n "status",\n "version",\n "persona",\n "stages",\n "touchpoints"\n ],\n "properties": {\n "id": {\n "type": "string",\n "pattern": "^JRN-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "type": {\n "type": "string",\n "const": "journey"\n },\n "version": {\n "type": "string",\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$",\n "description": "Journey 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": [\n "draft",\n "active",\n "deprecated",\n "retired"\n ]\n },\n "persona": {\n "type": "string",\n "pattern": "^ACT-[A-Z0-9]+(-[A-Z0-9]+)*$",\n "description": "Actor (persona) starring in this journey."\n },\n "stages": {\n "type": "array",\n "minItems": 1,\n "items": {\n "type": "string"\n },\n "description": "Sequential journey stages (e.g. Awareness, Onboarding, Activation, Retention)."\n },\n "touchpoints": {\n "type": "array",\n "minItems": 1,\n "items": {\n "type": "string"\n },\n "description": "Touchpoints between persona and system at each stage."\n },\n "related-use-cases": {\n "type": "array",\n "items": {\n "type": "string",\n "pattern": "^UC-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "description": "System use cases related to this journey."\n },\n "pain-points": {\n "type": "array",\n "items": {\n "type": "string"\n },\n "description": "Frictions or issues detected along the user journey."\n },\n "supersedes": {\n "type": [\n "string",\n "null"\n ]\n },\n "superseded-by": {\n "type": [\n "string",\n "null"\n ]\n }\n },\n "additionalProperties": false\n}';
|
|
5106
|
+
var SCHEMA_SCHEMAS_PRODUCT_REQUIREMENT_SCHEMA_JSON = '{\n "$schema": "https://json-schema.org/draft/2020-12/schema",\n "$id": "https://ai-sdlc.org/schemas/product/requirement.schema.json",\n "title": "ProductShape Requirement Schema (Strict Test Validation Enforced)",\n "type": "object",\n "required": [\n "id",\n "type",\n "title",\n "status",\n "version",\n "category",\n "derives-from",\n "verifiable-by"\n ],\n "properties": {\n "id": {\n "type": "string",\n "pattern": "^(FR|QR|CON)-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "type": {\n "type": "string",\n "const": "requirement"\n },\n "version": {\n "type": "string",\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$",\n "description": "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": [\n "draft",\n "active",\n "deprecated",\n "retired"\n ]\n },\n "category": {\n "type": "string",\n "enum": [\n "functional",\n "quality",\n "constraint"\n ]\n },\n "derives-from": {\n "type": "array",\n "minItems": 1,\n "items": {\n "type": "string",\n "pattern": "^(UC|BR|CON|CAP|GOAL)-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "description": "Product Traceability: Origin Use Cases, Rules, Constraints, or Capabilities."\n },\n "verifiable-by": {\n "type": "string",\n "enum": [\n "cucumber-bdd",\n "automated-unit-test",\n "integration-test",\n "performance-benchmark",\n "security-audit",\n "inspection"\n ],\n "description": "Mandatory formal verification method."\n },\n "acceptance-format": {\n "type": "string",\n "enum": [\n "gherkin",\n "declarative-prose"\n ],\n "description": "Acceptance criteria format."\n },\n "cucumber-tags": {\n "type": "array",\n "items": {\n "type": "string",\n "pattern": "^@[a-zA-Z0-9_-]+$"\n },\n "description": "Cucumber tags for filtering and executing BDD tests."\n },\n "enforce-bdd-variants": {\n "type": "boolean",\n "description": "When true, enforces all 3 BDD scenario categories (@nominal, @boundary, @invalid)."\n },\n "supersedes": {\n "type": [\n "string",\n "null"\n ],\n "pattern": "^(FR|QR|CON)-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "superseded-by": {\n "type": [\n "string",\n "null"\n ],\n "pattern": "^(FR|QR|CON)-[A-Z0-9]+(-[A-Z0-9]+)*$"\n }\n },\n "additionalProperties": false\n}';
|
|
5107
|
+
var SCHEMA_SCHEMAS_PRODUCT_TERM_SCHEMA_JSON = '{\n "$schema": "https://json-schema.org/draft/2020-12/schema",\n "$id": "https://ai-sdlc.org/schemas/product/term.schema.json",\n "title": "Domain Glossary Term Schema (Ubiquitous Language)",\n "type": "object",\n "required": [\n "id",\n "type",\n "title",\n "status",\n "version",\n "definition",\n "bounded-context"\n ],\n "properties": {\n "id": {\n "type": "string",\n "pattern": "^TERM-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "type": {\n "type": "string",\n "const": "term"\n },\n "version": {\n "type": "string",\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$",\n "description": "Term semantic version (SemVer)."\n },\n "schema-version": {\n "type": "string"\n },\n "title": {\n "type": "string",\n "minLength": 2,\n "description": "Canonical name of the term in the domain ubiquitous language."\n },\n "status": {\n "type": "string",\n "enum": [\n "draft",\n "active",\n "deprecated",\n "retired"\n ]\n },\n "definition": {\n "type": "string",\n "minLength": 10,\n "description": "Precise and unambiguous definition of the term in the domain context."\n },\n "bounded-context": {\n "type": "string",\n "description": "DDD Bounded Context this term belongs to (e.g. FlightControl, Telemetry, Billing)."\n },\n "synonyms": {\n "type": "array",\n "items": {\n "type": "string"\n },\n "description": "Synonyms or alternative terms used colloquially that map to this canonical term."\n },\n "anti-terms": {\n "type": "array",\n "items": {\n "type": "string"\n },\n "description": "Incorrect or ambiguous terms that MUST NOT be used for this concept."\n },\n "related-terms": {\n "type": "array",\n "items": {\n "type": "string",\n "pattern": "^TERM-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "description": "Glossary terms semantically related."\n },\n "supersedes": {\n "type": [\n "string",\n "null"\n ]\n },\n "superseded-by": {\n "type": [\n "string",\n "null"\n ]\n }\n },\n "additionalProperties": false\n}';
|
|
5108
|
+
var SCHEMA_SCHEMAS_PRODUCT_USE_CASE_SCHEMA_JSON = '{\n "$schema": "https://json-schema.org/draft/2020-12/schema",\n "$id": "https://ai-sdlc.org/schemas/product/use-case.schema.json",\n "title": "ProductShape Use Case Schema (Versionable)",\n "type": "object",\n "required": [\n "id",\n "type",\n "title",\n "status",\n "version",\n "primary-actor"\n ],\n "properties": {\n "id": {\n "type": "string",\n "pattern": "^UC-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "type": {\n "type": "string",\n "const": "use-case"\n },\n "version": {\n "type": "string",\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$",\n "description": "Use case semantic version (SemVer)."\n },\n "schema-version": {\n "type": "string",\n "description": "Template schema version."\n },\n "title": {\n "type": "string",\n "minLength": 3\n },\n "status": {\n "type": "string",\n "enum": [\n "draft",\n "active",\n "deprecated",\n "retired"\n ]\n },\n "primary-actor": {\n "type": "string",\n "pattern": "^ACT-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "supporting-actors": {\n "type": "array",\n "items": {\n "type": "string",\n "pattern": "^ACT-[A-Z0-9]+(-[A-Z0-9]+)*$"\n }\n },\n "governed-by": {\n "type": "array",\n "items": {\n "type": "string",\n "pattern": "^BR-[A-Z0-9]+(-[A-Z0-9]+)*$"\n }\n },\n "uses-terms": {\n "type": "array",\n "items": {\n "type": "string",\n "pattern": "^TERM-[A-Z0-9]+(-[A-Z0-9]+)*$"\n }\n },\n "in-context": {\n "type": "string",\n "pattern": "^BC-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "alternative-flows": {\n "type": "array",\n "items": {\n "oneOf": [\n {\n "type": "string",\n "minLength": 1\n },\n {\n "type": "object",\n "properties": {\n "id": {\n "type": "string"\n },\n "name": {\n "type": "string"\n },\n "description": {\n "type": "string"\n }\n },\n "additionalProperties": false\n }\n ]\n },\n "description": "Declared alternative flows that must be covered by tests."\n },\n "exception-flows": {\n "type": "array",\n "items": {\n "oneOf": [\n {\n "type": "string",\n "minLength": 1\n },\n {\n "type": "object",\n "properties": {\n "id": {\n "type": "string"\n },\n "name": {\n "type": "string"\n },\n "description": {\n "type": "string"\n }\n },\n "additionalProperties": false\n }\n ]\n },\n "description": "Declared exception flows that must be covered by tests."\n },\n "supersedes": {\n "type": [\n "string",\n "null"\n ],\n "pattern": "^UC-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "superseded-by": {\n "type": [\n "string",\n "null"\n ],\n "pattern": "^UC-[A-Z0-9]+(-[A-Z0-9]+)*$"\n }\n },\n "additionalProperties": false\n}';
|
|
5109
|
+
var SCHEMA_SCHEMAS_SAFETY_HAZARD_SCHEMA_JSON = '{\n "$schema": "https://json-schema.org/draft/2020-12/schema",\n "$id": "https://ai-sdlc.org/schemas/safety/hazard.schema.json",\n "title": "Hazard Schema (Operational Hazard & Safety Risk Analysis)",\n "type": "object",\n "required": [\n "id",\n "type",\n "title",\n "status",\n "version",\n "severity",\n "probability",\n "fault-tolerance-time-ms",\n "mitigated-by"\n ],\n "properties": {\n "id": {\n "type": "string",\n "pattern": "^HAZ-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "type": {\n "type": "string",\n "const": "hazard"\n },\n "version": {\n "type": "string",\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$",\n "description": "Hazard 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": [\n "draft",\n "active",\n "deprecated",\n "retired"\n ]\n },\n "severity": {\n "type": "string",\n "enum": [\n "catastrophic",\n "critical",\n "major",\n "minor",\n "negligible"\n ],\n "description": "Hazard severity per functional safety classification (DO-178C / ISO 26262)."\n },\n "probability": {\n "type": "string",\n "enum": [\n "frequent",\n "probable",\n "occasional",\n "remote",\n "improbable",\n "extremely-improbable"\n ],\n "description": "Probability of operational hazard occurrence."\n },\n "fault-tolerance-time-ms": {\n "type": "number",\n "minimum": 0,\n "description": "Fault tolerance time interval (FTTI) limit in milliseconds before entering safe state."\n },\n "mitigated-by": {\n "type": "array",\n "minItems": 1,\n "items": {\n "type": "string",\n "pattern": "^SAF-REQ-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "description": "Safety requirements mitigating this hazard."\n },\n "hazardous-condition": {\n "type": "string",\n "description": "Description of the dangerous operational condition."\n },\n "potential-effect": {\n "type": "string",\n "description": "Potential effect on people, aircraft, or environment if hazard materializes."\n },\n "supersedes": {\n "type": [\n "string",\n "null"\n ]\n },\n "superseded-by": {\n "type": [\n "string",\n "null"\n ]\n }\n },\n "additionalProperties": false\n}';
|
|
5110
|
+
var SCHEMA_SCHEMAS_SAFETY_SAFETY_REQ_SCHEMA_JSON = '{\n "$schema": "https://json-schema.org/draft/2020-12/schema",\n "$id": "https://ai-sdlc.org/schemas/safety/safety-req.schema.json",\n "title": "Safety Requirement Schema (Functional Safety & Hazard Mitigation)",\n "type": "object",\n "required": [\n "id",\n "type",\n "title",\n "status",\n "version",\n "safety-domain",\n "safety-integrity-level",\n "mitigates-hazard",\n "fail-safe-action"\n ],\n "properties": {\n "id": {\n "type": "string",\n "pattern": "^SAF-REQ-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "type": {\n "type": "string",\n "const": "safety-requirement"\n },\n "version": {\n "type": "string",\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$",\n "description": "Safety 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": [\n "draft",\n "active",\n "deprecated",\n "retired"\n ]\n },\n "safety-domain": {\n "type": "string",\n "enum": [\n "flight-control",\n "collision-avoidance",\n "energy-management",\n "emergency-recovery",\n "sensor-integrity",\n "propulsion",\n "telemetry"\n ],\n "description": "Operational safety domain."\n },\n "safety-integrity-level": {\n "type": "string",\n "description": "Safety integrity level (e.g. DAL-A..D, ASIL-A..D, SIL-1..4)."\n },\n "mitigates-hazard": {\n "type": "array",\n "minItems": 1,\n "items": {\n "type": "string",\n "pattern": "^HAZ-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "description": "Operational hazards mitigated by safety control."\n },\n "fail-safe-action": {\n "type": "string",\n "description": "Automatic action or contingency maneuver to enter safe state."\n },\n "fault-tolerance-time-ms": {\n "type": "number",\n "description": "Fault tolerance time interval limit in milliseconds (FTTI)."\n },\n "acceptance-format": {\n "type": "string",\n "enum": [\n "gherkin",\n "declarative-prose"\n ]\n },\n "cucumber-tags": {\n "type": "array",\n "items": {\n "type": "string"\n }\n },\n "supersedes": {\n "type": [\n "string",\n "null"\n ]\n },\n "superseded-by": {\n "type": [\n "string",\n "null"\n ]\n }\n },\n "additionalProperties": false\n}';
|
|
5111
|
+
var SCHEMA_SCHEMAS_SDD_DESIGN_SCHEMA_JSON = '{\n "$schema": "https://json-schema.org/draft/2020-12/schema",\n "$id": "https://ai-sdlc.org/schemas/sdd/design.schema.json",\n "title": "Spec-Driven Development Technical Design Schema (DSG-*)",\n "type": "object",\n "required": [\n "id",\n "type",\n "title"\n ],\n "properties": {\n "id": {\n "type": "string",\n "pattern": "^(DSG-[A-Z0-9]+(-[A-Z0-9]+)*|CHG-[A-Z0-9]+-DESIGN|[A-Z0-9]+(-[A-Z0-9]+)*)$",\n "description": "Unique identifier of the technical design specification."\n },\n "type": {\n "type": "string",\n "enum": [\n "spec-design",\n "spec-change-design",\n "design"\n ]\n },\n "change-id": {\n "type": "string",\n "pattern": "^(CHG|FEAT|PATCH)-[A-Z0-9]+(-[A-Z0-9]+)*$",\n "description": "Parent change identifier associated with this design."\n },\n "title": {\n "type": "string",\n "minLength": 3\n },\n "version": {\n "type": "string",\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$",\n "description": "Semantic versioning (SemVer)."\n },\n "schema-version": {\n "type": "string"\n },\n "handoff": {\n "type": "string",\n "pattern": "^HOF-[A-Z0-9]+(-[A-Z0-9]+)*$",\n "description": "Reference to the HOF-* sidecar."\n },\n "architecture-component": {\n "type": "string",\n "pattern": "^CMP-[A-Z0-9]+(-[A-Z0-9]+)*$",\n "description": "Associated architecture component."\n },\n "architecture-components": {\n "type": "array",\n "items": {\n "type": "string",\n "pattern": "^CMP-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "description": "List of architecture components covered by this technical design."\n },\n "enclave": {\n "type": "string",\n "pattern": "^(SEC-ENC-)?[A-Z0-9]+(-[A-Z0-9]+)*$",\n "description": "Zero trust security enclave."\n },\n "status": {\n "type": "string",\n "enum": [\n "draft",\n "proposed",\n "review",\n "approved",\n "active",\n "completed",\n "deprecated"\n ]\n },\n "author": {\n "type": "string"\n },\n "date": {\n "type": "string"\n },\n "contracts": {\n "type": "array",\n "description": "Explicit contract interfaces and methods designed for implementation and unit testing.",\n "items": {\n "oneOf": [\n {\n "type": "string",\n "minLength": 1\n },\n {\n "type": "object",\n "required": [\n "methods"\n ],\n "properties": {\n "component": {\n "type": "string"\n },\n "interface": {\n "type": "string"\n },\n "methods": {\n "type": "array",\n "minItems": 1,\n "items": {\n "type": "string",\n "minLength": 1\n }\n }\n },\n "additionalProperties": false\n }\n ]\n }\n },\n "citations": {\n "type": "array",\n "items": {\n "type": "object",\n "required": [\n "id"\n ],\n "properties": {\n "id": {\n "type": "string"\n },\n "digest": {\n "type": "string"\n },\n "comment": {\n "type": "string"\n },\n "anchor": {\n "type": "string"\n }\n },\n "additionalProperties": false\n }\n }\n },\n "additionalProperties": false\n}';
|
|
5112
|
+
var SCHEMA_SCHEMAS_SDD_HANDOFF_SCHEMA_JSON = '{\n "$schema": "https://json-schema.org/draft/2020-12/schema",\n "$id": "https://ai-sdlc.org/schemas/sdd/handoff.schema.json",\n "title": "PDaC Product Handoff Sidecar Schema (HOF-*)",\n "type": "object",\n "required": [\n "id",\n "type",\n "changeId",\n "subgraph"\n ],\n "properties": {\n "id": {\n "type": "string",\n "pattern": "^HOF-[A-Z0-9]+(-[A-Z0-9]+)*$",\n "description": "Immutable identifier emitted by PDaC handoff."\n },\n "type": {\n "type": "string",\n "enum": [\n "handoff",\n "product-handoff"\n ]\n },\n "title": {\n "type": "string",\n "minLength": 3\n },\n "changeId": {\n "type": "string",\n "pattern": "^(CHG|FEAT)-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "version": {\n "type": "string",\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$"\n },\n "createdAt": {\n "type": "string"\n },\n "subgraph": {\n "type": "object",\n "required": [\n "requirements"\n ],\n "properties": {\n "requirements": {\n "type": "array",\n "minItems": 1,\n "items": {\n "type": "string"\n }\n },\n "useCases": {\n "type": "array",\n "items": {\n "type": "string"\n }\n },\n "businessRules": {\n "type": "array",\n "items": {\n "type": "string"\n }\n },\n "securityRequirements": {\n "type": "array",\n "items": {\n "type": "string"\n }\n },\n "abuseCases": {\n "type": "array",\n "items": {\n "type": "string"\n }\n },\n "privacyRequirements": {\n "type": "array",\n "items": {\n "type": "string"\n }\n },\n "dataAssets": {\n "type": "array",\n "items": {\n "type": "string"\n }\n },\n "privacyRopa": {\n "type": "array",\n "items": {\n "type": "string"\n }\n },\n "actors": {\n "type": "array",\n "items": {\n "type": "string"\n }\n }\n },\n "additionalProperties": true\n },\n "citations": {\n "type": "array",\n "items": {\n "type": "object",\n "required": [\n "id"\n ],\n "properties": {\n "id": {\n "type": "string"\n },\n "digest": {\n "type": "string"\n },\n "anchor": {\n "type": "string"\n },\n "comment": {\n "type": "string"\n }\n }\n }\n }\n },\n "additionalProperties": true\n}';
|
|
5113
|
+
var SCHEMA_SCHEMAS_SDD_PROPOSAL_SCHEMA_JSON = '{\n "$schema": "https://json-schema.org/draft/2020-12/schema",\n "$id": "https://ai-sdlc.org/schemas/sdd/proposal.schema.json",\n "title": "Spec-Driven Development Change Proposal Schema (CHG-*)",\n "type": "object",\n "required": [\n "id",\n "type",\n "title",\n "status"\n ],\n "properties": {\n "id": {\n "type": "string",\n "pattern": "^(CHG|FEAT|PATCH)-[A-Z0-9]+(-[A-Z0-9]+)*$",\n "description": "Unique identifier of the change proposal."\n },\n "type": {\n "type": "string",\n "enum": [\n "spec-change-proposal",\n "proposal"\n ]\n },\n "title": {\n "type": "string",\n "minLength": 3\n },\n "status": {\n "type": "string",\n "enum": [\n "draft",\n "proposed",\n "review",\n "approved",\n "applied",\n "active",\n "completed",\n "rejected"\n ]\n },\n "author": {\n "type": "string"\n },\n "version": {\n "type": "string",\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$",\n "description": "Semantic versioning (SemVer)."\n },\n "schema-version": {\n "type": "string"\n },\n "date": {\n "type": "string"\n },\n "handoff": {\n "type": "string",\n "description": "Associated handoff sidecar reference."\n },\n "sdd-framework-compat": {\n "type": "array",\n "items": {\n "type": "string"\n },\n "description": "Supported SDD framework adapters."\n },\n "citations": {\n "type": "array",\n "items": {\n "type": "object",\n "required": [\n "id"\n ],\n "properties": {\n "id": {\n "type": "string"\n },\n "digest": {\n "type": "string"\n },\n "comment": {\n "type": "string"\n },\n "anchor": {\n "type": "string"\n }\n },\n "additionalProperties": false\n }\n }\n },\n "additionalProperties": false\n}';
|
|
5114
|
+
var SCHEMA_SCHEMAS_SDD_RELEASE_KPIS_SCHEMA_JSON = '{\n "$schema": "https://json-schema.org/draft/2020-12/schema",\n "$id": "https://ai-sdlc.org/schemas/sdd/release-kpis.schema.json",\n "title": "Release Consolidated KPIs & Attribution Telemetry Schema",\n "type": "object",\n "required": [\n "releaseBranch",\n "baseBranch",\n "generatedAt",\n "totalCommits",\n "totalLinesAdded",\n "totalLinesDeleted",\n "totalKloc",\n "totalBugs",\n "globalDefectDensity",\n "totalTimeSeconds",\n "totalTokens",\n "totalCostUsd",\n "authorStats",\n "bugList"\n ],\n "properties": {\n "id": {\n "type": "string",\n "pattern": "^(KPI-REL|REL-KPI)-[A-Z0-9]+(-[A-Z0-9]+)*$",\n "description": "Optional artifact identifier."\n },\n "type": {\n "type": "string",\n "const": "release-kpis"\n },\n "releaseBranch": {\n "type": "string"\n },\n "baseBranch": {\n "type": "string"\n },\n "generatedAt": {\n "type": "string"\n },\n "totalCommits": {\n "type": "integer",\n "minimum": 0\n },\n "totalLinesAdded": {\n "type": "integer",\n "minimum": 0\n },\n "totalLinesDeleted": {\n "type": "integer",\n "minimum": 0\n },\n "totalKloc": {\n "type": "number",\n "minimum": 0\n },\n "totalBugs": {\n "type": "integer",\n "minimum": 0\n },\n "globalDefectDensity": {\n "type": "number",\n "minimum": 0\n },\n "totalTimeSeconds": {\n "type": "number",\n "minimum": 0\n },\n "totalTokens": {\n "type": "integer",\n "minimum": 0\n },\n "totalCostUsd": {\n "type": "number",\n "minimum": 0\n },\n "reworkTimeSeconds": {\n "type": "number",\n "minimum": 0\n },\n "reworkTokens": {\n "type": "integer",\n "minimum": 0\n },\n "reworkCostUsd": {\n "type": "number",\n "minimum": 0\n },\n "reworkTimePercent": {\n "type": "number",\n "minimum": 0\n },\n "reworkTokensPercent": {\n "type": "number",\n "minimum": 0\n },\n "reworkCostPercent": {\n "type": "number",\n "minimum": 0\n },\n "authorStats": {\n "type": "array",\n "items": {\n "type": "object",\n "required": [\n "authorOrModel",\n "isAgent",\n "commits",\n "linesAdded",\n "linesDeleted",\n "klocProduced",\n "bugsInjected",\n "defectInjectionRate",\n "totalTimeSeconds",\n "totalTokens",\n "estimatedCostUsd"\n ],\n "properties": {\n "authorOrModel": {\n "type": "string"\n },\n "isAgent": {\n "type": "boolean"\n },\n "commits": {\n "type": "integer",\n "minimum": 0\n },\n "linesAdded": {\n "type": "integer",\n "minimum": 0\n },\n "linesDeleted": {\n "type": "integer",\n "minimum": 0\n },\n "klocProduced": {\n "type": "number",\n "minimum": 0\n },\n "bugsInjected": {\n "type": "integer",\n "minimum": 0\n },\n "defectInjectionRate": {\n "type": "number",\n "minimum": 0\n },\n "totalTimeSeconds": {\n "type": "number",\n "minimum": 0\n },\n "totalTokens": {\n "type": "integer",\n "minimum": 0\n },\n "estimatedCostUsd": {\n "type": "number",\n "minimum": 0\n }\n },\n "additionalProperties": false\n }\n },\n "bugList": {\n "type": "array",\n "items": {\n "type": "object",\n "required": [\n "sha",\n "subject",\n "author",\n "timeSeconds",\n "tokens"\n ],\n "properties": {\n "sha": {\n "type": "string"\n },\n "subject": {\n "type": "string"\n },\n "author": {\n "type": "string"\n },\n "parentRef": {\n "type": "string"\n },\n "timeSeconds": {\n "type": "number",\n "minimum": 0\n },\n "tokens": {\n "type": "integer",\n "minimum": 0\n }\n },\n "additionalProperties": false\n }\n }\n },\n "additionalProperties": false\n}';
|
|
5115
|
+
var SCHEMA_SCHEMAS_SDD_SESSION_TELEMETRY_SCHEMA_JSON = '{\n "$schema": "https://json-schema.org/draft/2020-12/schema",\n "$id": "https://ai-sdlc.org/schemas/sdd/session-telemetry.schema.json",\n "title": "Agent Session Telemetry Schema (.ai-sdlc/session-telemetry.json)",\n "type": "object",\n "required": [\n "model",\n "promptTokens",\n "completionTokens",\n "activeTimeSeconds"\n ],\n "properties": {\n "id": {\n "type": "string",\n "pattern": "^(TEL-SES|SES-TEL|TEL)-[A-Z0-9]+(-[A-Z0-9]+)*$",\n "description": "Optional telemetry session identifier."\n },\n "type": {\n "type": "string",\n "const": "session-telemetry"\n },\n "model": {\n "type": "string",\n "minLength": 1,\n "description": "AI model name or identifier."\n },\n "promptTokens": {\n "type": "integer",\n "minimum": 0,\n "description": "Total prompt tokens consumed."\n },\n "completionTokens": {\n "type": "integer",\n "minimum": 0,\n "description": "Total completion tokens generated."\n },\n "activeTimeSeconds": {\n "type": "number",\n "minimum": 0,\n "description": "Active session development duration in seconds."\n },\n "author": {\n "type": "string"\n },\n "authorType": {\n "type": "string",\n "enum": [\n "agent",\n "human"\n ]\n },\n "sessionId": {\n "type": "string"\n },\n "timestamp": {\n "type": "string"\n },\n "provider": {\n "type": "string"\n },\n "confidence": {\n "type": "string",\n "enum": [\n "HIGH",\n "MEDIUM",\n "LOW"\n ]\n },\n "source": {\n "type": "string"\n }\n },\n "additionalProperties": false\n}';
|
|
5116
|
+
var SCHEMA_SCHEMAS_SDD_SPEC_SCHEMA_JSON = '{\n "$schema": "https://json-schema.org/draft/2020-12/schema",\n "$id": "https://ai-sdlc.org/schemas/sdd/spec.schema.json",\n "title": "Spec-Driven Development Delivery Specification Schema (SPEC-*)",\n "type": "object",\n "required": [\n "id",\n "type",\n "change-id"\n ],\n "properties": {\n "id": {\n "type": "string",\n "pattern": "^SPEC-(CHG|FEAT|PATCH)-[A-Z0-9]+(-[A-Z0-9]+)*$",\n "description": "Unique identifier of the delivery specification."\n },\n "type": {\n "type": "string",\n "enum": [\n "delivery-spec",\n "spec"\n ]\n },\n "change-id": {\n "type": "string",\n "pattern": "^(CHG|FEAT|PATCH)-[A-Z0-9]+(-[A-Z0-9]+)*$",\n "description": "Parent change identifier associated with this specification."\n },\n "profile": {\n "type": "string",\n "enum": [\n "patch",\n "standard",\n "critical"\n ],\n "description": "Risk and governance profile of the change."\n },\n "title": {\n "type": "string",\n "minLength": 3\n },\n "version": {\n "type": "string",\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$",\n "description": "Semantic versioning (SemVer)."\n },\n "schema-version": {\n "type": "string"\n },\n "handoff": {\n "type": "string",\n "description": "Associated handoff sidecar reference."\n },\n "status": {\n "type": "string",\n "enum": [\n "draft",\n "proposed",\n "review",\n "approved",\n "active",\n "completed",\n "deprecated"\n ]\n },\n "verification": {\n "type": "object",\n "properties": {\n "method": {\n "type": "string"\n },\n "command": {\n "type": "string"\n },\n "target": {\n "type": "string"\n }\n },\n "additionalProperties": true\n },\n "citations": {\n "type": "array",\n "items": {\n "type": "object",\n "required": [\n "id"\n ],\n "properties": {\n "id": {\n "type": "string"\n },\n "digest": {\n "type": "string"\n },\n "comment": {\n "type": "string"\n },\n "anchor": {\n "type": "string"\n }\n },\n "additionalProperties": false\n }\n },\n "acceptance-format": {\n "type": "string",\n "enum": [\n "gherkin"\n ],\n "description": "Formato de aceptaci\xF3n BDD obligatorio para especificaciones de entrega SDD."\n },\n "cucumber-tags": {\n "type": "array",\n "items": {\n "type": "string",\n "pattern": "^@[a-zA-Z0-9_-]+$"\n },\n "description": "Etiquetas de trazabilidad BDD para ejecuci\xF3n con Cucumber."\n },\n "cucumber-feature-file": {\n "type": "string",\n "description": "Ruta personalizada de extracci\xF3n del archivo .feature para Cucumber."\n }\n },\n "additionalProperties": false\n}';
|
|
5117
|
+
var SCHEMA_SCHEMAS_SDD_TASKS_SCHEMA_JSON = '{\n "$schema": "https://json-schema.org/draft/2020-12/schema",\n "$id": "https://ai-sdlc.org/schemas/sdd/tasks.schema.json",\n "title": "Verifiable Tasks & Human Autonomy Governance Schema",\n "type": "object",\n "required": [\n "id",\n "type",\n "change-id",\n "version",\n "tasks"\n ],\n "properties": {\n "id": {\n "type": "string",\n "pattern": "^TSK-PLAN-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "type": {\n "type": "string",\n "const": "task-plan"\n },\n "change-id": {\n "type": "string",\n "pattern": "^(CHG|FEAT)-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "version": {\n "type": "string",\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$"\n },\n "schema-version": {\n "type": "string"\n },\n "title": {\n "type": "string",\n "minLength": 5\n },\n "status": {\n "type": "string",\n "enum": [\n "draft",\n "approved",\n "in-progress",\n "completed",\n "blocked"\n ]\n },\n "governance-summary": {\n "type": "object",\n "properties": {\n "autonomous-tasks-count": {\n "type": "integer",\n "minimum": 0\n },\n "human-review-plan-count": {\n "type": "integer",\n "minimum": 0\n },\n "ambiguous-count": {\n "type": "integer",\n "minimum": 0\n },\n "high-risk-manual-count": {\n "type": "integer",\n "minimum": 0\n }\n }\n },\n "tasks": {\n "type": "array",\n "minItems": 1,\n "items": {\n "type": "object",\n "required": [\n "id",\n "title",\n "complexity",\n "risk-level",\n "autonomy-mode",\n "verification",\n "assigned-to",\n "status"\n ],\n "properties": {\n "id": {\n "type": "string",\n "pattern": "^TSK-[0-9]{3,}$"\n },\n "title": {\n "type": "string",\n "minLength": 5\n },\n "complexity": {\n "type": "string",\n "enum": [\n "LOW",\n "MEDIUM",\n "HIGH"\n ]\n },\n "risk-level": {\n "type": "string",\n "enum": [\n "LOW",\n "MEDIUM",\n "HIGH",\n "CRITICAL"\n ]\n },\n "autonomy-mode": {\n "type": "string",\n "enum": [\n "AUTONOMOUS",\n "HUMAN_REVIEW_PLAN",\n "AMBIGUOUS",\n "HIGH_RISK_MANUAL"\n ],\n "description": "AI agent human governance and supervision mode."\n },\n "verification": {\n "type": "object",\n "required": [\n "method",\n "command-or-criteria"\n ],\n "properties": {\n "method": {\n "type": "string",\n "enum": [\n "automated-unit-test",\n "cucumber-bdd",\n "quality-gate",\n "license-audit",\n "sast-scan",\n "privacy-audit",\n "manual-inspection",\n "smoke-test"\n ]\n },\n "command-or-criteria": {\n "type": "string",\n "minLength": 5\n }\n }\n },\n "assigned-to": {\n "type": "string",\n "enum": [\n "agent-developer",\n "agent-security-auditor",\n "agent-compliance-checker",\n "agent-privacy-officer",\n "agent-qa",\n "human-engineer",\n "human-architect",\n "pair-human-agent"\n ]\n },\n "status": {\n "type": "string",\n "enum": [\n "PENDING",\n "IN_PROGRESS",\n "COMPLETED",\n "BLOCKED"\n ]\n },\n "blocking-reason": {\n "type": "string"\n },\n "implements-components": {\n "type": "array",\n "items": {\n "type": "string",\n "pattern": "^CMP-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "description": "Architecture components (CMP-*) implemented by this atomic task."\n },\n "satisfies-requirements": {\n "type": "array",\n "items": {\n "type": "string",\n "pattern": "^(FR|QR|CON|SEC-REQ|SAF-REQ|PRIV-REQ)-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "description": "Requirements satisfied by this atomic task."\n },\n "implements-contracts": {\n "type": "array",\n "items": {\n "type": "string",\n "minLength": 1\n },\n "description": "Explicit interface or method contracts from design.md implemented by this task."\n }\n },\n "additionalProperties": false\n }\n },\n "supersedes": {\n "type": [\n "string",\n "null"\n ]\n },\n "superseded-by": {\n "type": [\n "string",\n "null"\n ]\n }\n },\n "additionalProperties": false\n}';
|
|
5118
|
+
var SCHEMA_SCHEMAS_SECURITY_ABUSE_CASE_SCHEMA_JSON = '{\n "$schema": "https://json-schema.org/draft/2020-12/schema",\n "$id": "https://ai-sdlc.org/schemas/security/abuse-case.schema.json",\n "title": "Abuse Case Schema (Versionable)",\n "type": "object",\n "required": [\n "id",\n "type",\n "title",\n "status",\n "version",\n "primary-threat-actor",\n "targets-use-case",\n "stride-category",\n "mitigated-by"\n ],\n "properties": {\n "id": {\n "type": "string",\n "pattern": "^ABUSE-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "type": {\n "type": "string",\n "const": "abuse-case"\n },\n "version": {\n "type": "string",\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$",\n "description": "Abuse case 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": [\n "draft",\n "active",\n "deprecated",\n "retired"\n ]\n },\n "primary-threat-actor": {\n "type": "string",\n "pattern": "^ACT-THREAT-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "targets-use-case": {\n "type": "string",\n "pattern": "^UC-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "stride-category": {\n "type": "string",\n "enum": [\n "spoofing",\n "tampering",\n "repudiation",\n "information-disclosure",\n "denial-of-service",\n "elevation-of-privilege"\n ]\n },\n "mitigated-by": {\n "type": "array",\n "minItems": 1,\n "items": {\n "type": "string",\n "pattern": "^SEC-REQ-[A-Z0-9]+(-[A-Z0-9]+)*$"\n }\n },\n "asvs-controls": {\n "type": "array",\n "items": {\n "type": "string"\n }\n },\n "supersedes": {\n "type": [\n "string",\n "null"\n ],\n "pattern": "^ABUSE-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "superseded-by": {\n "type": [\n "string",\n "null"\n ],\n "pattern": "^ABUSE-[A-Z0-9]+(-[A-Z0-9]+)*$"\n }\n },\n "additionalProperties": false\n}';
|
|
5119
|
+
var SCHEMA_SCHEMAS_SECURITY_ENCLAVE_SCHEMA_JSON = `{
|
|
5120
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
5121
|
+
"$id": "https://ai-sdlc.org/schemas/security/enclave.schema.json",
|
|
5122
|
+
"title": "Security Enclave Schema (Zero Trust Architecture Boundary)",
|
|
5123
|
+
"type": "object",
|
|
5124
|
+
"required": [
|
|
5125
|
+
"id",
|
|
5126
|
+
"type",
|
|
5127
|
+
"title",
|
|
5128
|
+
"status",
|
|
5129
|
+
"version",
|
|
5130
|
+
"trust-zone",
|
|
5131
|
+
"perimeter-rules",
|
|
5132
|
+
"allowed-inbound",
|
|
5133
|
+
"allowed-outbound"
|
|
5134
|
+
],
|
|
5135
|
+
"properties": {
|
|
5136
|
+
"id": {
|
|
5137
|
+
"type": "string",
|
|
5138
|
+
"pattern": "^SEC-ENC-[A-Z0-9]+(-[A-Z0-9]+)*$"
|
|
5139
|
+
},
|
|
5140
|
+
"type": {
|
|
5141
|
+
"type": "string",
|
|
5142
|
+
"const": "security-enclave"
|
|
5143
|
+
},
|
|
5144
|
+
"version": {
|
|
5145
|
+
"type": "string",
|
|
5146
|
+
"pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$",
|
|
5147
|
+
"description": "Security enclave semantic version (SemVer)."
|
|
5148
|
+
},
|
|
5149
|
+
"schema-version": {
|
|
5150
|
+
"type": "string"
|
|
5151
|
+
},
|
|
5152
|
+
"title": {
|
|
5153
|
+
"type": "string",
|
|
5154
|
+
"minLength": 3
|
|
5155
|
+
},
|
|
5156
|
+
"status": {
|
|
5157
|
+
"type": "string",
|
|
5158
|
+
"enum": [
|
|
5159
|
+
"draft",
|
|
5160
|
+
"active",
|
|
5161
|
+
"deprecated",
|
|
5162
|
+
"retired"
|
|
5163
|
+
]
|
|
5164
|
+
},
|
|
5165
|
+
"trust-zone": {
|
|
5166
|
+
"type": "string",
|
|
5167
|
+
"enum": [
|
|
5168
|
+
"untrusted",
|
|
5169
|
+
"semi-trusted",
|
|
5170
|
+
"trusted",
|
|
5171
|
+
"highly-trusted",
|
|
5172
|
+
"dmz",
|
|
5173
|
+
"zero-trust-boundary"
|
|
5174
|
+
],
|
|
5175
|
+
"description": "Zero Trust confidence zone assigned to enclave."
|
|
5176
|
+
},
|
|
5177
|
+
"trust-level": {
|
|
5178
|
+
"type": "string",
|
|
5179
|
+
"description": "Descriptive Zero Trust confidence level."
|
|
5180
|
+
},
|
|
5181
|
+
"isolation": {
|
|
5182
|
+
"type": "string",
|
|
5183
|
+
"description": "Technical perimeter isolation mechanism."
|
|
5184
|
+
},
|
|
5185
|
+
"perimeter-rules": {
|
|
5186
|
+
"type": "array",
|
|
5187
|
+
"minItems": 1,
|
|
5188
|
+
"items": {
|
|
5189
|
+
"type": "string"
|
|
5190
|
+
},
|
|
5191
|
+
"description": "Perimeter rules defining enclave security boundary (e.g. mTLS, IP allowlist)."
|
|
5192
|
+
},
|
|
5193
|
+
"allowed-inbound": {
|
|
5194
|
+
"type": "array",
|
|
5195
|
+
"items": {
|
|
5196
|
+
"type": "string",
|
|
5197
|
+
"pattern": "^(CMP|SEC-ENC)-[A-Z0-9]+(-[A-Z0-9]+)*$"
|
|
5198
|
+
},
|
|
5199
|
+
"description": "Components or enclaves authorized to initiate inbound connections."
|
|
5200
|
+
},
|
|
5201
|
+
"allowed-outbound": {
|
|
5202
|
+
"type": "array",
|
|
5203
|
+
"items": {
|
|
5204
|
+
"type": "string",
|
|
5205
|
+
"pattern": "^(CMP|SEC-ENC)-[A-Z0-9]+(-[A-Z0-9]+)*$"
|
|
5206
|
+
},
|
|
5207
|
+
"description": "Components or enclaves this enclave can connect to."
|
|
5208
|
+
},
|
|
5209
|
+
"enforced-by": {
|
|
5210
|
+
"type": "array",
|
|
5211
|
+
"items": {
|
|
5212
|
+
"type": "string",
|
|
5213
|
+
"pattern": "^SEC-REQ-[A-Z0-9]+(-[A-Z0-9]+)*$"
|
|
5214
|
+
},
|
|
5215
|
+
"description": "Security requirements enforcing this enclave's rules."
|
|
5216
|
+
},
|
|
5217
|
+
"authentication-mechanism": {
|
|
5218
|
+
"type": "string",
|
|
5219
|
+
"enum": [
|
|
5220
|
+
"mtls",
|
|
5221
|
+
"jwt",
|
|
5222
|
+
"api-key",
|
|
5223
|
+
"oauth2",
|
|
5224
|
+
"none"
|
|
5225
|
+
],
|
|
5226
|
+
"description": "Authentication mechanism required at enclave perimeter."
|
|
5227
|
+
},
|
|
5228
|
+
"supersedes": {
|
|
5229
|
+
"type": [
|
|
5230
|
+
"string",
|
|
5231
|
+
"null"
|
|
5232
|
+
]
|
|
5233
|
+
},
|
|
5234
|
+
"superseded-by": {
|
|
5235
|
+
"type": [
|
|
5236
|
+
"string",
|
|
5237
|
+
"null"
|
|
5238
|
+
]
|
|
5239
|
+
}
|
|
5240
|
+
},
|
|
5241
|
+
"additionalProperties": false
|
|
5242
|
+
}`;
|
|
5243
|
+
var SCHEMA_SCHEMAS_SECURITY_SECURITY_REQ_SCHEMA_JSON = '{\n "$schema": "https://json-schema.org/draft/2020-12/schema",\n "$id": "https://ai-sdlc.org/schemas/security/security-req.schema.json",\n "title": "Security Requirement Schema (Strict Test Validation Enforced)",\n "type": "object",\n "required": [\n "id",\n "type",\n "title",\n "status",\n "version",\n "security-domain",\n "mitigates-abuse-case"\n ],\n "properties": {\n "id": {\n "type": "string",\n "pattern": "^SEC-REQ-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "type": {\n "type": "string",\n "const": "security-requirement"\n },\n "version": {\n "type": "string",\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$",\n "description": "Security 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": [\n "draft",\n "active",\n "deprecated",\n "retired"\n ]\n },\n "security-domain": {\n "type": "string",\n "enum": [\n "authentication",\n "authorization",\n "cryptography",\n "input-validation",\n "audit-logging",\n "communication-security",\n "data-protection"\n ]\n },\n "mitigates-abuse-case": {\n "type": "array",\n "minItems": 1,\n "items": {\n "type": "string",\n "pattern": "^ABUSE-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "description": "Product/Security Traceability: Abuse case or threat this control neutralizes."\n },\n "enforced-in-enclave": {\n "type": "string",\n "pattern": "^SEC-ENC-[A-Z0-9]+(-[A-Z0-9]+)*$",\n "description": "Architecture Traceability: Perimeter or internal security enclave."\n },\n "compliance-references": {\n "type": "array",\n "items": {\n "type": "string"\n }\n },\n "acceptance-format": {\n "type": "string",\n "enum": [\n "gherkin",\n "declarative-prose"\n ],\n "description": "Mitigation criteria format."\n },\n "cucumber-tags": {\n "type": "array",\n "items": {\n "type": "string",\n "pattern": "^@[a-zA-Z0-9_-]+$"\n }\n },\n "supersedes": {\n "type": [\n "string",\n "null"\n ],\n "pattern": "^SEC-REQ-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "superseded-by": {\n "type": [\n "string",\n "null"\n ],\n "pattern": "^SEC-REQ-[A-Z0-9]+(-[A-Z0-9]+)*$"\n }\n },\n "additionalProperties": false\n}';
|
|
5244
|
+
var SCHEMA_SCHEMAS_SECURITY_THREAT_ACTOR_SCHEMA_JSON = '{\n "$schema": "https://json-schema.org/draft/2020-12/schema",\n "$id": "https://ai-sdlc.org/schemas/security/threat-actor.schema.json",\n "title": "Threat Actor Schema (Versionable)",\n "type": "object",\n "required": [\n "id",\n "type",\n "title",\n "status",\n "version",\n "threat-capability",\n "motivation"\n ],\n "properties": {\n "id": {\n "type": "string",\n "pattern": "^ACT-THREAT-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "type": {\n "type": "string",\n "const": "threat-actor"\n },\n "version": {\n "type": "string",\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$",\n "description": "Threat profile 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": [\n "draft",\n "active",\n "deprecated",\n "retired"\n ]\n },\n "threat-capability": {\n "type": "string",\n "enum": [\n "script-kiddie",\n "advanced-persistent-threat",\n "insider-threat",\n "automated-botnet",\n "supply-chain-attacker"\n ]\n },\n "motivation": {\n "type": "string",\n "enum": [\n "financial-gain",\n "espionage",\n "sabotage",\n "data-theft",\n "reputational-damage"\n ]\n },\n "attack-surfaces": {\n "type": "array",\n "items": {\n "type": "string"\n }\n },\n "supersedes": {\n "type": [\n "string",\n "null"\n ],\n "pattern": "^ACT-THREAT-[A-Z0-9]+(-[A-Z0-9]+)*$"\n },\n "superseded-by": {\n "type": [\n "string",\n "null"\n ],\n "pattern": "^ACT-THREAT-[A-Z0-9]+(-[A-Z0-9]+)*$"\n }\n },\n "additionalProperties": false\n}';
|
|
5245
|
+
var SCHEMA_SCHEMAS_WORKFLOW_AGENT_HANDOFF_SCHEMA_JSON = '{\n "$schema": "https://json-schema.org/draft/2020-12/schema",\n "$id": "https://ai-sdlc.org/schemas/workflow/agent-handoff.schema.json",\n "title": "Agent Workflow Handoff Block Schema",\n "type": "object",\n "required": [\n "id",\n "type",\n "completed-phase",\n "acting-role",\n "autonomy-mode",\n "deliverables",\n "suggested-prompt"\n ],\n "properties": {\n "id": {\n "type": "string",\n "pattern": "^(AHOF|HOF-WORKFLOW|HOF)-[A-Z0-9]+(-[A-Z0-9]+)*$",\n "description": "Unique workflow handoff identifier."\n },\n "type": {\n "type": "string",\n "const": "agent-handoff"\n },\n "title": {\n "type": "string",\n "minLength": 3\n },\n "version": {\n "type": "string",\n "pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$",\n "description": "Semantic versioning (SemVer)."\n },\n "schema-version": {\n "type": "string"\n },\n "status": {\n "type": "string",\n "enum": [\n "draft",\n "active",\n "completed",\n "transferred"\n ]\n },\n "completed-phase": {\n "type": "string",\n "minLength": 2,\n "description": "Name of the completed lifecycle phase or activity."\n },\n "acting-role": {\n "type": "string",\n "enum": [\n "agent-product-analyst",\n "agent-threat-modeler",\n "agent-privacy-officer",\n "agent-system-architect",\n "agent-qa-engineer",\n "agent-developer",\n "agent-expert-user",\n "agent-security-auditor",\n "agent-compliance-checker",\n "agent-code-reviewer",\n "agent-devops",\n "human-dev",\n "tech-lead",\n "release-manager",\n "dpo"\n ],\n "description": "Specialized role executing the handoff."\n },\n "autonomy-mode": {\n "type": "string",\n "enum": [\n "AUTONOMOUS",\n "HUMAN_REVIEW_PLAN",\n "AMBIGUOUS",\n "HIGH_RISK_MANUAL"\n ],\n "description": "Autonomy level under which the task was executed."\n },\n "deliverables": {\n "type": "array",\n "minItems": 1,\n "items": {\n "type": "string"\n },\n "description": "Paths or IDs of artifacts produced during the phase."\n },\n "recommended-next-roles": {\n "type": "array",\n "items": {\n "type": "object",\n "required": [\n "role",\n "rationale"\n ],\n "properties": {\n "role": {\n "type": "string"\n },\n "rationale": {\n "type": "string"\n }\n },\n "additionalProperties": false\n },\n "description": "Recommended downstream specialist roles and technical justifications."\n },\n "suggested-prompt": {\n "type": "string",\n "minLength": 5,\n "description": "Suggested invocation prompt to initiate the next agent."\n },\n "human-action-window": {\n "type": "object",\n "properties": {\n "review-and-validate": {\n "type": "boolean"\n },\n "edit-directly": {\n "type": "boolean"\n },\n "pause-or-divert": {\n "type": "boolean"\n },\n "delegate": {\n "type": "boolean"\n }\n },\n "additionalProperties": false,\n "description": "Actions available to the human engineer within the sovereign action window."\n }\n },\n "additionalProperties": false\n}';
|
|
5020
5246
|
var STARTER_SCHEMAS_MAP = {
|
|
5021
5247
|
"schemas/architecture/adr.schema.json": JSON.parse(SCHEMA_SCHEMAS_ARCHITECTURE_ADR_SCHEMA_JSON),
|
|
5022
5248
|
"schemas/architecture/component.schema.json": JSON.parse(SCHEMA_SCHEMAS_ARCHITECTURE_COMPONENT_SCHEMA_JSON),
|
|
@@ -6571,11 +6797,13 @@ function sanitizeDlpPayload(payload, policy = createDefaultDlpPolicy()) {
|
|
|
6571
6797
|
// src/adapters/sdd/review-report.ts
|
|
6572
6798
|
var REVIEW_VERDICTS = ["COMPLIANT", "SUGGESTIONS", "BLOCKING"];
|
|
6573
6799
|
var REVIEWER_ROLES = [
|
|
6800
|
+
"agent-auditor",
|
|
6801
|
+
"agent-adversary",
|
|
6802
|
+
"agent-privacy-officer",
|
|
6803
|
+
"agent-expert-user",
|
|
6574
6804
|
"agent-code-reviewer",
|
|
6575
6805
|
"agent-security-auditor",
|
|
6576
6806
|
"agent-compliance-checker",
|
|
6577
|
-
"agent-privacy-officer",
|
|
6578
|
-
"agent-expert-user",
|
|
6579
6807
|
"auditor",
|
|
6580
6808
|
"reviewer"
|
|
6581
6809
|
];
|
|
@@ -18542,7 +18770,7 @@ var SPECIALIZED_AGENT_TEMPLATES = [
|
|
|
18542
18770
|
|
|
18543
18771
|
## Phase 0: Greenfield Product Inception (New Product Intent)
|
|
18544
18772
|
- **Trigger**: When the user expresses intent to create a new product from scratch with the framework (or when \`specs/product/\` has no baseline product model yet), initiate **Phase 0** before any SDD change (\`change:new\`) or implementation:
|
|
18545
|
-
1. **Iterative Discovery Interview (Up to 15 Questions or Until Product is Crystal Clear)**: Conduct an iterative discovery interview (up to 15 questions, grouped logically in conversational rounds until zero product ambiguities remain) before drafting specs, clarifying: (a) core problem and mission statement, (b) primary actors/stakeholders (\`ACT-*\`), authentication/role model, and **target user interface modality** (e.g., Web UI, Desktop GUI, Console/TUI/CLI, Mobile app, or headless API/SDK), (c) **modern visual aesthetic & styling standard** (Bootstrap 5-style clean responsive web design with cards/tables/badges, Fluent/modern desktop aesthetic with rounded corners/elevated panels, or colorized rich terminal console with ANSI palettes/status badges), (d) **User Journeys (\`JRN-*\`) to generate** \u2014 asking in plain, non-technical language which end-to-end user workflows to model and explicitly guiding the user on the 5 pieces of information needed to build each journey properly: *(1) Who is the protagonist user (\`persona\` / \`ACT-*\`) and their main goal, (2) What are the step-by-step stages from start to finish (\`stages\`), (3) Which screens, channels, or interfaces the user interacts with at each step (\`touchpoints\`), (4) What current obstacles, frustrations, or risks they face (\`pain-points\`), and (5) Which concrete actions or capabilities the system must provide along the journey (\`related-use-cases\` / \`UC-*\`)*, (
|
|
18773
|
+
1. **Iterative Discovery Interview (Up to 15 Questions or Until Product is Crystal Clear)**: Conduct an iterative discovery interview (up to 15 questions, grouped logically in conversational rounds until zero product ambiguities remain) before drafting specs, clarifying: (a) core problem and mission statement, (b) primary actors/stakeholders (\`ACT-*\`), authentication/role model, and **target user interface modality** (e.g., Web UI, Desktop GUI, Console/TUI/CLI, Mobile app, or headless API/SDK), (c) **modern visual aesthetic & styling standard** (Bootstrap 5-style clean responsive web design with cards/tables/badges, Fluent/modern desktop aesthetic with rounded corners/elevated panels, or colorized rich terminal console with ANSI palettes/status badges), (d) **delivery & operation model** (in plain business terms: Cloud SaaS, Self-Hosted/On-Premise, Local Desktop/CLI binary, or Library/SDK package, plus any data-residency or SLA constraints), (e) **User Journeys (\`JRN-*\`) to generate** \u2014 asking in plain, non-technical language which end-to-end user workflows to model and explicitly guiding the user on the 5 pieces of information needed to build each journey properly: *(1) Who is the protagonist user (\`persona\` / \`ACT-*\`) and their main goal, (2) What are the step-by-step stages from start to finish (\`stages\`), (3) Which screens, channels, or interfaces the user interacts with at each step (\`touchpoints\`), (4) What current obstacles, frustrations, or risks they face (\`pain-points\`), and (5) Which concrete actions or capabilities the system must provide along the journey (\`related-use-cases\` / \`UC-*\`)*, (f) foundational master entities/catalogs and CRUD flows required to operate the system, (g) essential MVP capabilities/use cases (\`UC-*\`) and business rules/invariants (\`BR-*\`) vs. future roadmap, and (h) top 3\u20135 priority quality goals and constraints (\`QR-*\`, \`CON-*\`). Do not proceed to draft artifacts until the product scope is completely clear.
|
|
18546
18774
|
2. **Enterprise & Capability Vision (\`ARCH-INTRO-001\`)**: Draft the root vision artifact (\`type: architecture-introduction\`, \`naf-perspective: "Enterprise & Capability"\`, \`status: draft\`) using \`templates/architecture/introduction-and-goals.template.md\` (\`schemas/architecture/introduction-and-goals.schema.json\`), explicitly recording the agreed UI/interaction modality.
|
|
18547
18775
|
3. **ProductShape Derivation**: Derive the initial draft artifacts (\`ACT-*\`, \`JRN-*\`, \`UC-*\`, \`BR-*\`, \`FR-*\`, \`QR-*\` with \`status: draft\`) in \`specs/product/\` linked to \`ARCH-INTRO-001\` for human Product Owner review.
|
|
18548
18776
|
4. **Mandatory End-to-End Presentation Interface & Master Data Prerequisite Rule (ANTI-LIBRARY-ONLY MVP)**: Whenever primary actors (\`ACT-*\`) are human users, the MVP ProductShape baseline MUST include: (a) an explicit presentation/interaction requirement (\`FR-*\`) or vertical UI/CLI acceptance criteria matching the modality agreed in Step 1 (Web UI, Desktop GUI, or Console/TUI/CLI \u2014 never proposing a library-only/in-memory MVP without a runnable entry point), (b) user authentication/session access when multi-role actors exist, and (c) CRUD/configuration flows for foundational master entities (e.g., rooms, staff, students, catalogs) required to operate the core business flows without manual database intervention.
|
|
@@ -18630,10 +18858,11 @@ var SPECIALIZED_AGENT_TEMPLATES = [
|
|
|
18630
18858
|
- **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.
|
|
18631
18859
|
- **No Orphan Presentation Components (\`CMP-WEB-*\` / \`CMP-UI-*\` / \`CMP-CLI-*\`)**: When modeling architecture for a system with human actors (\`ACT-*\`), never leave the agreed presentation/driving adapter (Web UI, Desktop GUI, or Console/CLI) as an unmapped \`proposed\` spec while scheduling only backend class-library tasks in \`tasks.md\`. Wave 0 (\`CHG-001\`) MUST bootstrap the runnable presentation host shell matching the modality defined in Inception, and every subsequent \`CHG-*\` for a human-facing \`UC-*\` must include tasks (\`TSK-*\`) implementing its corresponding views/screens/commands and E2E tests as a complete vertical slice.
|
|
18632
18860
|
- Generate interaction and sequence diagrams in native Mermaid syntax.
|
|
18861
|
+
- **Deployment Topology (\`ARCH-DEP-001\`)**: Translate the product delivery and operation model recorded in \`ARCH-INTRO-001\` / \`CON-*\` into an arc42 Section 7 Deployment View (\`templates/architecture/deployment-view.template.md\`) mapping components (\`CMP-*\`) to execution nodes (\`RES-*\`) and network enclaves (\`SEC-ENC-*\`).
|
|
18633
18862
|
- Document critical technological decisions using immutable \`ADR-*\` records conforming to \`schemas/architecture/adr.schema.json\`.
|
|
18634
18863
|
- Validate that architectural choices comply with legal constraints in \`license-policy.yaml\` and data protection constraints in \`privacy-policy.yaml\`.
|
|
18635
18864
|
- **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.
|
|
18636
|
-
- **Mandatory Observability Component (\`CMP-OBSERVABILITY\`)**: In every system architecture modeled under arc42/NAF v4, the system architect MUST define an explicit building block \`CMP-OBSERVABILITY\` (Level 2/3) in Section 5 alongside Section 8 Cross-Cutting Concepts (\`ARCH-CROSS-*\`) and an immutable ADR for Runtime Observability, standardizing on: (1) Structured JSON logging with configurable granularity (\`LOG_LEVEL\`), (2) Distributed tracing via OpenTelemetry with W3C Trace Context (\`traceparent\`),
|
|
18865
|
+
- **Mandatory Observability Component (\`CMP-OBSERVABILITY\`)**: In every system architecture modeled under arc42/NAF v4, the system architect MUST define an explicit building block \`CMP-OBSERVABILITY\` (Level 2/3) in Section 5 alongside Section 8 Cross-Cutting Concepts (\`ARCH-CROSS-*\`) and an immutable ADR for Runtime Observability, standardizing on: (1) Structured JSON logging with configurable granularity (\`LOG_LEVEL\`), (2) Distributed tracing via OpenTelemetry with W3C Trace Context (\`traceparent\`), (3) Operational metrics (RED: Rate, Errors, Duration) in Prometheus / OpenMetrics format, (4) Persistent local telemetry storage (\`OBS_STORAGE_PATH\`, default \`.observability/\` JSONL/OTLP/SQLite) with guaranteed shutdown \`flush()\`, and (5) An offline query/export port (\`ITelemetryExporter\`) plus optional Prometheus & Grafana stack (\`docker-compose.observability.yml\`) for deferred post-mortem or live visualization, satisfying \`QR-OBS-*\`.
|
|
18637
18866
|
- 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.`
|
|
18638
18867
|
},
|
|
18639
18868
|
{
|
|
@@ -18664,7 +18893,11 @@ var SPECIALIZED_AGENT_TEMPLATES = [
|
|
|
18664
18893
|
- **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\`).
|
|
18665
18894
|
- Tag all scenarios with \`@<FR-ID> @automated @regression\`.
|
|
18666
18895
|
- **STRICTLY FORBIDDEN**: Including production code, suggesting implementation, or anticipating technical solutions.
|
|
18667
|
-
-
|
|
18896
|
+
- **MANDATORY DETERMINISTIC GHERKIN ENGINES**:
|
|
18897
|
+
1. **NEVER** author or edit \`.feature\` files in \`tests/features/\` manually, and **NEVER** write boilerplate BDD step definition files in \`tests/steps/\` from scratch.
|
|
18898
|
+
2. Always author Gherkin scenarios inside the \`\`\`gherkin blocks of the specification Markdown (\`FR-*\`, \`SEC-REQ-*\`, \`PRIV-REQ-*\`, \`spec.md\`) and run \`npx aisdlc gherkin extract\` (or \`npx aisdlc check --fix\`) to deterministically generate \`.feature\` files.
|
|
18899
|
+
3. Always run \`npx aisdlc gherkin scaffold <feature-file> --lang <ts|py|go|rs|cs> --fallback\` (or without \`--fallback\` when native generator is installed and approved) to deterministically scaffold RED step definition skeletons in \`tests/steps/\`. Implement assertions inside those generated step files and add any extra unit/integration/E2E/UI suites in \`tests/unit/\`, \`tests/e2e/\`, etc.
|
|
18900
|
+
- Run \`npx aisdlc verify gherkin\` and \`pnpm run verify:testing\` before emitting handoff.
|
|
18668
18901
|
- If autonomy is $\\ge$ \`HUMAN_REVIEW_PLAN\`, conclude by emitting the Workflow Handoff block (\`templates/workflow/agent-handoff.template.md\`) suggesting \`agent-developer\` and opening the Human Action Window. In \`AUTONOMOUS\` mode, omit interactive handoff.`
|
|
18669
18902
|
},
|
|
18670
18903
|
{
|
|
@@ -18678,16 +18911,17 @@ var SPECIALIZED_AGENT_TEMPLATES = [
|
|
|
18678
18911
|
- **Role**: High-Precision Software Developer / Coder Agent (\`agent-developer\`).
|
|
18679
18912
|
- **Mission**: Implement atomic tasks from SDD specifications (\`tasks.md\`) delivering clean, strictly typed, and tested code.
|
|
18680
18913
|
|
|
18681
|
-
## Mandatory
|
|
18914
|
+
## Mandatory 5-Step Implementation Order
|
|
18682
18915
|
Execute every implementation task following this strict sequential order:
|
|
18683
18916
|
1. **Modular & Hexagonal Architecture (Ports & Adapters) Definition / Redefinition**: Define or refine the module structure organized by Bounded Context (\`BC-*\`) or Vertical Slice (\`UC-*\`) adhering to Hexagonal Architecture (Ports & Adapters \u2014 isolating the pure Domain/Application Core from Inbound/Outbound Adapters and Frameworks/Drivers), strictly enforcing the Dependency Rule (dependencies point inward toward the Core; avoid speculative empty layers per YAGNI).
|
|
18684
18917
|
2. **Inter-Module Interfaces First**: Define explicit interfaces/ports (contracts, DTOs, types) for all interactions across module boundaries before writing concrete logic, avoiding direct coupling between modules.
|
|
18685
18918
|
3. **Component Implementation**: Implement the concrete components, use cases, and adapters that implement and consume the defined interfaces.
|
|
18686
|
-
4. **Exhaustive Per-Function Unit Testing**: Write unit tests for every function in \`
|
|
18919
|
+
4. **Exhaustive Per-Method & Per-Function Unit Testing**: Write direct unit tests in \`tests/unit/\` for **every** method and function implemented in \`src/\` (domain, application, adapter, and helper methods \u2014 zero exceptions), always verifying:
|
|
18687
18920
|
- **Happy Path**: nominal execution with valid inputs.
|
|
18688
18921
|
- **Sad Path**: controlled error paths, rejections, and business exceptions.
|
|
18689
18922
|
- **Boundary Values**: minimum, maximum, exact limits, and off-by-one edges.
|
|
18690
18923
|
- **Unexpected, Null & Empty Values**: \`null\`, \`undefined\`, empty strings/arrays/objects, and malformed inputs.
|
|
18924
|
+
5. **Exhaustive Per-Component UI / Driving-Adapter Testing (Web, Desktop, Console/TUI & Mobile)**: For **every** UI component, view, window, screen, dialog, or interactive console/TUI command created or modified in \`src/\`, write or update a dedicated automated UI/E2E test in \`tests/e2e/\`, \`tests/ui/\`, \`tests/desktop/\`, \`tests/mobile/\`, or \`tests/cli/\` using the agreed platform runner (Playwright/Cypress for Web; FlaUI/Avalonia.Headless/pytest-qt for Desktop; Spectre.Console.Testing/node-pty/CliRunner/teatest for Console/TUI; Maestro/Appium/Detox/Espresso/XCUITest for Mobile), verifying all 4 UI states (\`Loading\`, \`Empty\`, \`Error\`, \`Nominal\`) and every interactive control (Happy Path, Sad Path, Boundary Values).
|
|
18691
18925
|
|
|
18692
18926
|
## Operational Directives & Guardrails
|
|
18693
18927
|
- Respect the autonomy mode assigned to each task in \`tasks.md\` (\`AUTONOMOUS\`, \`HUMAN_REVIEW_PLAN\`, \`AMBIGUOUS\`, \`HIGH_RISK_MANUAL\`).
|
|
@@ -18702,49 +18936,14 @@ Execute every implementation task following this strict sequential order:
|
|
|
18702
18936
|
- **Console / TUI**: Produce rich, modern terminal output with ANSI colors, status badges, formatted tables, and progress indicators (e.g., Spectre.Console, Rich, Ink, or Chalk/Picocolors) instead of plain uncolored text dumps.
|
|
18703
18937
|
- **Skills-First Implementation Directive**: When authoring or refactoring code (especially frontend, UI, styling, accessibility, or framework-specific logic), proactively inspect and leverage available specialized agent skills (e.g., modern web guidance, accessibility a11y, DevTools, framework skills) to produce standard-compliant, modern implementations rather than guessing ad-hoc patterns.
|
|
18704
18938
|
- **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.
|
|
18705
|
-
- **Mandatory Structured Logging & Observability**: Never emit unstructured console logs (\`console.log\`) in production code (\`no_console_logs_in_prod\`). Integrate
|
|
18939
|
+
- **Mandatory Structured Logging & Persistent Observability**: Never emit unstructured console logs (\`console.log\`) in production code (\`no_console_logs_in_prod\`). Integrate \`ILogger\` (configurable \`LOG_LEVEL\`), \`ITracer\` (W3C \`trace_id\`/\`traceparent\`), and \`IMetricsRegistry\` (Prometheus RED metrics) backed by persistent local sinks (\`OBS_STORAGE_PATH\`, default \`.observability/\`) with PII redaction (\`[REDACTED]\`) before persistence, guaranteed shutdown \`flush()\`, and offline export via \`ITelemetryExporter\`.
|
|
18706
18940
|
- Before adding any external dependency, verify its SPDX license is permitted in \`license-policy.yaml\`.
|
|
18707
18941
|
- Respect non-negotiable \`quality-policy.yaml\` thresholds: Cyclomatic Complexity $\\le 10$, Cognitive Complexity $\\le 15$, Maintainability Index $\\ge 50$, Function Length $\\le 40$ lines.
|
|
18708
18942
|
- Run unified pre-flight with auto-fix (\`pnpm run check:fix\`) and full verification (\`pnpm run verify:all\`).
|
|
18709
18943
|
- **Mandatory Regression Verification**: Never declare build, typecheck, or bug fixes complete without executing the relevant automated test suite (\`pnpm test\`, \`dotnet test\`) and confirming zero regressions.
|
|
18710
18944
|
- **Global Styles Protection**: When touching or refactoring frontend views, verify that global stylesheet/asset imports remain intact and that layouts suffer no visual disruption.
|
|
18711
18945
|
- **Skills-First Implementation Directive**: When authoring or refactoring code (especially frontend, UI, styling, accessibility, or framework-specific logic), proactively inspect and leverage available specialized agent skills (e.g., modern web guidance, accessibility a11y, DevTools, framework skills) to produce standard-compliant, modern implementations rather than guessing ad-hoc patterns.
|
|
18712
|
-
- Upon completing green implementation, suggest handoff to \`agent-expert-user\` for Post-Development Functional Validation prior to
|
|
18713
|
-
},
|
|
18714
|
-
{
|
|
18715
|
-
id: "agent-security-auditor",
|
|
18716
|
-
title: "Adversarial Code Auditor",
|
|
18717
|
-
description: "Examine Pull Requests and source code with an attacker mindset for business logic vulnerabilities, injection vectors, secret leaks, and authorization flaws.",
|
|
18718
|
-
globs: "src/**, packages/**, security/**",
|
|
18719
|
-
claudeTools: ["View", "GlobTool", "GrepTool", "LS", "Bash"],
|
|
18720
|
-
antigravityTools: ["read_file", "run_command", "call_mcp_tool"],
|
|
18721
|
-
body: `## Role & Mission
|
|
18722
|
-
- **Role**: Adversarial Security Auditor Agent (\`agent-security-auditor\`).
|
|
18723
|
-
- **Mission**: Rigorously examine Pull Requests and code diffs for business logic vulnerabilities, injection vectors, secret leaks, and authorization flaws as part of the Pre-Merge Audit Triad.
|
|
18724
|
-
|
|
18725
|
-
## Operational Directives & Guardrails
|
|
18726
|
-
- Analyze code diffs with an attacker mindset: How can an unauthenticated user bypass this check? Are there info leaks in exceptions? Is command, SQL, path traversal, or prompt injection possible?
|
|
18727
|
-
- Run deterministic security verification: \`pnpm run verify:security\` (secrets + shift-left SAST).
|
|
18728
|
-
- Issue a formal audit report with CVSS v3.1 severity scoring and concrete remediation proposals.
|
|
18729
|
-
- Immediately block any PR introducing CRITICAL or HIGH security risks.
|
|
18730
|
-
- 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, opening the Human Action Window. In \`AUTONOMOUS\` mode, omit interactive handoff.`
|
|
18731
|
-
},
|
|
18732
|
-
{
|
|
18733
|
-
id: "agent-compliance-checker",
|
|
18734
|
-
title: "Open Source License Compliance Auditor",
|
|
18735
|
-
description: "Audit dependency manifests and SBOMs against license-policy.yaml to block viral copyleft licenses and flag commercial license requirements.",
|
|
18736
|
-
globs: "package.json, pnpm-lock.yaml, license-policy.yaml, compliance/**",
|
|
18737
|
-
claudeTools: ["View", "GlobTool", "GrepTool", "LS", "Bash"],
|
|
18738
|
-
antigravityTools: ["read_file", "run_command", "call_mcp_tool"],
|
|
18739
|
-
body: `## Role & Mission
|
|
18740
|
-
- **Role**: Open Source License and Intellectual Property Compliance Auditor Agent (\`agent-compliance-checker\`).
|
|
18741
|
-
- **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.
|
|
18742
|
-
|
|
18743
|
-
## Operational Directives & Guardrails
|
|
18744
|
-
- Verify SPDX identifiers for every direct and transitive dependency via \`pnpm run verify:licenses\`.
|
|
18745
|
-
- Immediately block viral copyleft licenses (\`GPL-*\`, \`AGPL-*\`) and unknown/unlicensed packages.
|
|
18746
|
-
- If source-available or commercial licenses (\`BSL-1.1\`, \`SSPL-1.0\`) are detected, flag with \`COMMERCIAL_APPROVAL_REQUIRED\` and draft a request using \`templates/compliance/commercial-acquisition-request.template.md\`.
|
|
18747
|
-
- 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 or Legal counsel, opening the Human Action Window. In \`AUTONOMOUS\` mode, omit interactive handoff.`
|
|
18946
|
+
- Upon completing green implementation, suggest handoff to \`agent-expert-user\` for Post-Development Functional Validation prior to Checkpoint 2 (\`agent-auditor\` $\\parallel$ \`agent-adversary\` + \`agent-privacy-officer\`).`
|
|
18748
18947
|
},
|
|
18749
18948
|
{
|
|
18750
18949
|
id: "agent-expert-user",
|
|
@@ -18763,28 +18962,7 @@ Execute every implementation task following this strict sequential order:
|
|
|
18763
18962
|
- **FORBIDDEN Library-Only MVP for Human Actors**: Whenever primary actors (\`ACT-*\`) are human users, verify that the target interaction modality (Web UI, Desktop GUI, Console/TUI/CLI, or Mobile) was explicitly defined in \`ARCH-INTRO-*\` / \`specs/product/\`, and reject as \`[BLOCKING_DEFECT]\` any MVP proposal that defers the agreed presentation layer, role authentication (when applicable), or foundational master-entity CRUDs (e.g., creating rooms, teachers, students, schedules) to post-MVP or leaves the system operable only via unit tests/in-memory calls. An MVP for human operators must be end-to-end usable from day one via its agreed interface.
|
|
18764
18963
|
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, modern visual appearance (Bootstrap 5-style clean layouts for Web, modern styled panels for Desktop, or colorized rich terminal formatting for Console), and \`0\` browser \`console.error\` / network failures.
|
|
18765
18964
|
- Formulate decisive questions under \`open-questions\` for the human Product Owner.
|
|
18766
|
-
- Emit handoff block suggesting
|
|
18767
|
-
},
|
|
18768
|
-
{
|
|
18769
|
-
id: "agent-code-reviewer",
|
|
18770
|
-
title: "Technical and Architectural Code Reviewer",
|
|
18771
|
-
description: "Audit Pull Requests for Clean Code, SOLID, DRY, YAGNI, design patterns, and compliance with quality-policy.yaml complexity and maintainability thresholds.",
|
|
18772
|
-
globs: "src/**, packages/**, tests/**",
|
|
18773
|
-
claudeTools: ["View", "GlobTool", "GrepTool", "LS", "Bash"],
|
|
18774
|
-
antigravityTools: ["read_file", "run_command", "call_mcp_tool"],
|
|
18775
|
-
body: `## Role & Mission
|
|
18776
|
-
- **Role**: Technical and Architectural Code Reviewer Agent (\`agent-code-reviewer\`).
|
|
18777
|
-
- **Mission**: Audit Pull Requests evaluating code cleanliness, adherence to SOLID, DRY, YAGNI principles, design patterns, and compliance with complexity and maintainability thresholds (\`quality-policy.yaml\`), forming part of the Pre-Merge Audit Triad.
|
|
18778
|
-
|
|
18779
|
-
## Operational Directives & Guardrails
|
|
18780
|
-
- Analyze code diffs against \`quality-policy.yaml\` standards: Cyclomatic Complexity $\\le 10$, Cognitive Complexity $\\le 15$, Maintainability Index $\\ge 50$, Lines per Function $\\le 40$.
|
|
18781
|
-
- Detect improper coupling, code smells, magic numbers, ambiguous identifiers, and encapsulation breaches.
|
|
18782
|
-
- Flag premature abstractions and speculative code violating YAGNI.
|
|
18783
|
-
- **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.
|
|
18784
|
-
- **Block Unstyled & Non-Compliant Interfaces**: Flag as \`[BLOCKING]\` any web view lacking responsive grid and standard styling classes (such as Bootstrap 5 or project design tokens), any desktop window using raw unstyled legacy controls, or any interactive console tool emitting raw monochrome dumps without colorized badges or structured formatting. Also verify that inline manual styles (\`style="..."\`) are not used to bypass design systems.
|
|
18785
|
-
- Coordinate Pre-Merge Audit Triad with \`agent-security-auditor\`, \`agent-privacy-officer\`, and \`agent-compliance-checker\`.
|
|
18786
|
-
- Categorize findings into: \`[BLOCKING]\` (quality violation or broken pattern), \`[CLEAN_CODE_SUGGESTION]\` (non-blocking improvement), and \`[COMPLIANT]\`.
|
|
18787
|
-
- 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.`
|
|
18965
|
+
- Emit handoff block suggesting Checkpoint 2 (\`agent-auditor\` $\\parallel$ \`agent-adversary\` + \`agent-privacy-officer\`) if compliant, or return to \`agent-developer\` on functional drift, unstyled interfaces, or fake-wiring.`
|
|
18788
18966
|
},
|
|
18789
18967
|
{
|
|
18790
18968
|
id: "agent-devops",
|
|
@@ -18792,7 +18970,7 @@ Execute every implementation task following this strict sequential order:
|
|
|
18792
18970
|
description: "Maintain, evolve, and audit CI/CD workflows, Dockerfiles, IaC manifests, and support scripts under strict non-invasion guardrails on src/.",
|
|
18793
18971
|
globs: ".github/workflows/**, templates/ci/**, scripts/**, Dockerfile*",
|
|
18794
18972
|
claudeTools: ["View", "Edit", "Replace", "GlobTool", "GrepTool", "LS", "Bash"],
|
|
18795
|
-
antigravityTools: ["read_file", "edit_file", "write_file", "run_command", "call_mcp_tool"],
|
|
18973
|
+
antigravityTools: ["read_file", "edit_file", "write_file", "run_command", "call_mcp_tool", "ask_question"],
|
|
18796
18974
|
body: `## Role & Mission
|
|
18797
18975
|
- **Role**: DevOps and Infrastructure as Code (IaC) Engineer Agent (\`agent-devops\`).
|
|
18798
18976
|
- **Mission**: Maintain, evolve, and audit automated project infrastructure: CI/CD workflows, Docker containers, deployment manifests, and infrastructure scripts.
|
|
@@ -18800,7 +18978,9 @@ Execute every implementation task following this strict sequential order:
|
|
|
18800
18978
|
## Operational Directives & Guardrails
|
|
18801
18979
|
- **Strict Infrastructure Domain**: Operate exclusively on workflows (\`.github/workflows/\`, \`templates/ci/\`), container files (\`Dockerfile*\`, \`docker-compose*.yml\`), IaC manifests, and support scripts (\`scripts/\`).
|
|
18802
18980
|
- **NON-INVASION GUARDRAIL**: STRICTLY FORBIDDEN from modifying or refactoring application source code files (\`src/\`, \`packages/*/src/\`). Your responsibility is pipelines and scaffolding, never business logic.
|
|
18981
|
+
- **Deployment & CI/CD Strategy Discovery**: Before scaffolding new pipelines or deployment manifests (e.g., Wave 0 Greenfield or Legacy CI integration), read \`ARCH-INTRO-001\` / \`ARCH-DEP-001\` and clarify with the human Tech Lead: (1) target packaging & CD destination (CI-only Quality Gates, Docker/OCI image to GHCR, package registry \`npm\`/\`NuGet\`/\`PyPI\`/GitHub Releases, or PaaS/Cloud/K8s), (2) CI/CD platform (GitHub Actions, GitLab CI, Azure Pipelines), and (3) release trigger policy (on push to \`main\` vs. manual SemVer tag \`vX.Y.Z\`).
|
|
18803
18982
|
- **Infrastructure Dependency Policy**: Verify licenses of dependencies, Docker base images, and third-party CI actions against \`license-policy.yaml\`.
|
|
18983
|
+
- **Optional Observability Stack (Prometheus & Grafana)**: When scaffolding project infrastructure, provide an optional \`docker-compose.observability.yml\` (from \`templates/ci/docker-compose.observability.yml\`) with Prometheus (\`Apache-2.0\`) and Grafana (isolated as an optional visualization container with zero application code coupling per \`license-policy.yaml\`) mounting \`.observability/\` for both live scraping and offline/post-mortem visualization.
|
|
18804
18984
|
- **Gate Preservation**: Ensure any pipeline optimization keeps all existing deterministic Quality Gates intact.
|
|
18805
18985
|
- **Cross-Workflow Audit**: When fixing any CI/CD or configuration defect detected in a PR, search all \`.github/workflows/*.yml\` for the same pattern (including release, post-merge, and publishing pipelines) before declaring the fix complete.
|
|
18806
18986
|
- **Remote Verification**: Creating a PR (\`gh pr create\`) does not equal success; actively verify that remote checks pass (\`gh pr checks\`).
|
|
@@ -18809,18 +18989,23 @@ Execute every implementation task following this strict sequential order:
|
|
|
18809
18989
|
{
|
|
18810
18990
|
id: "agent-auditor",
|
|
18811
18991
|
title: "Transversal Quality and Improvement Auditor",
|
|
18812
|
-
description: "Polymorphically inspect deliverables from any AI-SDLC specialist agent on demand,
|
|
18992
|
+
description: "Polymorphically inspect deliverables from any AI-SDLC specialist agent on demand, enforcing Clean Code, SOLID, DRY, YAGNI, AST thresholds, UI design standards, and SPDX license compliance.",
|
|
18813
18993
|
globs: "**/*",
|
|
18814
18994
|
claudeTools: ["View", "GlobTool", "GrepTool", "LS", "Bash"],
|
|
18815
18995
|
antigravityTools: ["read_file", "run_command", "call_mcp_tool", "ask_question"],
|
|
18816
18996
|
body: `## Role & Mission
|
|
18817
18997
|
- **Role**: Transversal Quality and Constructive Auditor Agent (\`agent-auditor\`).
|
|
18818
|
-
- **Mission**: Inspect the output deliverables of any upstream specialist agent upon demand across any phase, identifying structural weaknesses, premature abstractions, overengineering, or blind spots, and
|
|
18998
|
+
- **Mission**: Inspect the output deliverables of any upstream specialist agent upon demand across any phase, identifying structural weaknesses, premature abstractions, overengineering, or blind spots, and enforcing Clean Code, SOLID, DRY, Simplicity First (YAGNI), \`quality-policy.yaml\` AST thresholds, and \`license-policy.yaml\` SPDX compliance.
|
|
18819
18999
|
|
|
18820
19000
|
## Operational Directives & Guardrails
|
|
18821
19001
|
- **Polymorphic On-Demand Scope**: May be invoked over deliverables from any role (\`agent-product-analyst\`, \`agent-threat-modeler\`, \`agent-privacy-officer\`, \`agent-system-architect\`, \`agent-qa-engineer\`, \`agent-developer\`, \`agent-devops\`).
|
|
18822
|
-
- **Simplicity First (YAGNI)**: Actively challenge speculative parameters, redundant interfaces, unused design patterns, and unrequested flexibility.
|
|
19002
|
+
- **Simplicity First (YAGNI) & Code Quality**: Actively challenge speculative parameters, redundant interfaces, unused design patterns, and unrequested flexibility. In code reviews (Checkpoint 2 / Legacy), enforce \`quality-policy.yaml\` thresholds (Cyclomatic Complexity $\\le 10$, Cognitive Complexity $\\le 15$, Maintainability Index $\\ge 50$, Lines per Function $\\le 40$) and Clean Code / SOLID / DRY principles.
|
|
19003
|
+
- **Block Fake-Wiring & Unstyled Interfaces**: Flag as \`[BLOCKING_DEFECT]\` any production UI component containing hardcoded mock data (\`mockData\`), empty event handlers (\`onClick={() => {}}\`), missing \`Loading\`/\`Empty\`/\`Error\` states, or API calls bypassing shared contracts. Also **Block Unstyled & Non-Compliant Interfaces**: flag as \`[BLOCKING_DEFECT]\` any web view lacking responsive grid and standard styling classes (such as Bootstrap 5 or project design tokens), any desktop window using raw unstyled legacy controls, any interactive console tool emitting raw monochrome dumps, or inline \`style="..."\` bypassing design systems.
|
|
19004
|
+
- **1:1 Method Unit Test & UI Component Test Enforcement**: Flag as \`[BLOCKING_DEFECT]\` any method or function in \`src/\` lacking a corresponding unit test in \`tests/unit/\`, and any Web, Desktop, Console/TUI, or Mobile UI component lacking a dedicated automated UI/E2E test in \`tests/e2e/\` or \`tests/ui/\` (using Playwright, FlaUI, Maestro/Appium/Detox, Spectre.Console.Testing/node-pty, or equivalent agreed platform runner).
|
|
18823
19005
|
- **End-to-End MVP Completeness Check (Anti-Library-Only Drift)**: When auditing Product (\`specs/product/\`), Architecture (\`specs/architecture/\`), or SDD change plans (\`design.md\`, \`tasks.md\`) involving human actors (\`ACT-*\`), flag as \`[BLOCKING_DEFECT]\` any scope cut that fails to define the target user interface modality at Inception or omits the runnable driving adapter (Web UI, Desktop GUI, or Console/CLI), role access/auth (when applicable), or master-data CRUD flows required to operate the use case end-to-end without manual database manipulation.
|
|
19006
|
+
- **Deterministic Gherkin Engine Enforcement**: Flag as \`[BLOCKING_DEFECT]\` any \`.feature\` file in \`tests/features/\` authored manually outside \`aisdlc gherkin extract\` or any missing step definition file in \`tests/steps/\` not scaffolded via \`aisdlc gherkin scaffold\`.
|
|
19007
|
+
- **Persistent Observability Verification**: Flag as \`[BLOCKING_DEFECT]\` any \`CMP-OBSERVABILITY\` implementation that emits only ephemeral \`stdout\`/RAM telemetry without persistent local storage (\`OBS_STORAGE_PATH\`), shutdown \`flush()\`, or offline export (\`ITelemetryExporter\`).
|
|
19008
|
+
- **License & Dependency Compliance**: Verify dependency manifests via \`pnpm run verify:licenses\` (\`npx aisdlc verify licenses\`), blocking viral copyleft licenses (\`GPL-*\`, \`AGPL-*\`) or unapproved commercial licenses (\`BSL-*\`, \`SSPL-*\`) against \`license-policy.yaml\`.
|
|
18824
19009
|
- **Classification of Findings**: Label every finding as:
|
|
18825
19010
|
* \`[BLOCKING_DEFECT]\`: Critical omission, structural debt, or standard violation that must be resolved.
|
|
18826
19011
|
* \`[SIMPLIFICATION]\`: Opportunity to remove unneeded complexity or reduce code/spec surface without loss of function.
|
|
@@ -18832,20 +19017,20 @@ Execute every implementation task following this strict sequential order:
|
|
|
18832
19017
|
{
|
|
18833
19018
|
id: "agent-adversary",
|
|
18834
19019
|
title: "Transversal Red Team and Chaos Adversary",
|
|
18835
|
-
description: "Actively attempt to break, bypass, or invalidate deliverables from any target specialist agent, providing concrete proofs-of-concept (PoC)
|
|
19020
|
+
description: "Actively attempt to break, bypass, or invalidate deliverables from any target specialist agent, auditing diffs for security vulnerabilities (CVSS v3.1) and providing concrete proofs-of-concept (PoC).",
|
|
18836
19021
|
globs: "**/*",
|
|
18837
19022
|
claudeTools: ["View", "GlobTool", "GrepTool", "LS", "Bash"],
|
|
18838
19023
|
antigravityTools: ["read_file", "run_command", "call_mcp_tool", "ask_question"],
|
|
18839
19024
|
body: `## Role & Mission
|
|
18840
19025
|
- **Role**: Transversal Red Team and Stress Adversary Agent (\`agent-adversary\`).
|
|
18841
|
-
- **Mission**: Actively attempt to break, bypass, or invalidate the deliverables of any target specialist agent across any phase, providing concrete proofs-of-concept (PoC), counterexamples, and reproduction steps for every discovered failure mode.
|
|
19026
|
+
- **Mission**: Actively attempt to break, bypass, or invalidate the deliverables of any target specialist agent across any phase (including Pre-Merge / Checkpoint 2 security diff audits), providing concrete proofs-of-concept (PoC), counterexamples, CVSS v3.1 severity scoring, and reproduction steps for every discovered failure mode.
|
|
18842
19027
|
|
|
18843
19028
|
## Operational Directives & Guardrails
|
|
18844
19029
|
- **Polymorphic On-Demand Scope**:
|
|
18845
19030
|
* **Product**: Uncover contradictory requirements, unreachable business states, and logic traps.
|
|
18846
19031
|
* **Architecture**: Simulate race conditions, cascading failures, resource exhaustion, and single points of failure (SPOFs).
|
|
18847
19032
|
* **QA**: Perform conceptual mutation testing; demonstrate how flawed or empty implementations could falsely pass tests green.
|
|
18848
|
-
* **Development**: Attack boundary inputs, concurrency race triggers,
|
|
19033
|
+
* **Development & Pre-Merge Security Audit**: Attack boundary inputs, concurrency race triggers, memory/type edge breaks, injection vectors (SQL, XSS, command, path traversal, prompt injection), secret leaks, and authorization bypasses. Run \`pnpm run verify:security\` (\`npx aisdlc verify security\`), score findings with **CVSS v3.1**, and block any PR introducing \`CRITICAL\` or \`HIGH\` security risks.
|
|
18849
19034
|
* **DevOps**: Probe pipeline isolation, credential boundaries, and cold-start/dependency outages.
|
|
18850
19035
|
- **MANDATORY PROOF-OF-BREAK**: Abstract criticism without reproducible proof is strictly forbidden. Every finding must include: (1) Target Entity ID, (2) Failure Scenario / Attack Vector, (3) Concrete PoC (input vector, sequence breakdown, or mutant code), and (4) Expected Impact.
|
|
18851
19036
|
- **NON-INVASIVE GUARDRAIL**: You do NOT patch the vulnerabilities or bugs yourself.
|
|
@@ -18923,7 +19108,7 @@ var LIFECYCLE_SKILL_TEMPLATES = [
|
|
|
18923
19108
|
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, 2-checkpoint transversal auditor/adversary verification, and topological wave SDD delivery.",
|
|
18924
19109
|
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).",
|
|
18925
19110
|
globs: "product/**, specs/product/**, architecture/**, templates/**",
|
|
18926
|
-
body: '## Purpose & Trigger\nUse 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.\n\n## Consolidated Inception Quality & Adversarial Checkpoint\nAcross Phase 0 and Inception, quality auditing and adversarial stress-testing are concentrated at the completion of Inception design (or after product shaping):\n- **Concurrent Inspection**: Concurrently invoke [`agent-auditor`](../agent-auditor/SKILL.md) (evaluating YAGNI, structural debt, and simplification) and [`agent-adversary`](../agent-adversary/SKILL.md) (stress-testing logic traps, SPOFs, attack vectors, or broken invariants) in clean, isolated context windows.\n- **Non-Invasive Review**: Neither auditor nor adversary modifies deliverables directly; both deliver structured reports citing canonical IDs and SHA-256 digests.\n- **Consolidated Remediation**: Consolidate findings and emit the Workflow Handoff back to authoring agents to resolve blocking defects and apply simplifications (max 2 correction rounds).\n- **Anti-Ping-Pong Guardrail**: Bounded strictly to maximum **1 correction round**. If non-blocking advisories remain, proceed to the downstream phase; if blocking defects persist, escalate immediately to the Human Tech Lead.\n\n## End-to-End Execution Playbook\n\n### Step 1: Repository Turnkey Initialization\n1. If the workspace has not been initialized with AI-SDLC schemas, policies, and templates, run MCP tool `new` (or CLI `npx @aisdlc/cli init`).\n2. Install the Git telemetry hook via `npx aisdlc git hook install` (`pnpm run git:hook:install`).\n3. Verify `quality-policy.yaml`, `license-policy.yaml`, and `privacy-policy.yaml` are present in the repository root.\n\n### Step 2: Phase 0 Product Inception (`agent-product-analyst`)\n1. Delegate to or adopt [`agent-product-analyst`](../agent-product-analyst/SKILL.md).\n2. **Iterative Discovery Interview (Up to 15 Questions or Until Product Scope is 100% Clear)**: Before generating artifacts, clarify with the human Product Owner in rounds of 3\u20135 questions:\n - Core mission statement and business problem.\n - Primary actors (`ACT-*`) and external systems.\n - **Target Interaction & Presentation Modality (`CON-*` / `ARCH-INTRO-001`)**: Explicitly define at inception how human actors will interact with the MVP (e.g., **Web UI**, **Desktop GUI**, **Interactive Console/TUI/CLI**, **Mobile App**, or **Headless API/SDK** if actors are exclusively external systems). Never assume a headless class library when human actors exist.\n - **Modern Aesthetic & Design System Standard (`CON-UI-*` / `ARCH-INTRO-001`)**: Explicitly define a modern, visually attractive styling standard adapted to the chosen presentation modality: (1) **Web UI**: modern responsive layouts using Bootstrap 5 utility classes and components (`card`, `table table-hover`, `badge`, `alert alert-*`, responsive grid) or modern equivalents, (2) **Desktop GUI**: modern clean design (rounded corners, elevated panels, padding, consistent typography) avoiding raw legacy unstyled windows, (3) **Console / TUI**: rich terminal interface with ANSI colors, status badges, formatted tables, and progress indicators (e.g., Spectre.Console, Rich, Ink, or Chalk/Picocolors).\n - **User Journeys (`JRN-*`) to Generate (Plain-Language Elicitation)**: Ask in simple, everyday language which end-to-end user journeys to model, explicitly indicating the 5 pieces of information needed to build each journey properly: (1) protagonist user (`persona` / `ACT-*`) and their main goal, (2) step-by-step stages from start to finish (`stages`), (3) interaction screens/channels at each stage (`touchpoints`), (4) current obstacles or pain points (`pain-points`), and (5) concrete system capabilities/use cases (`related-use-cases` / `UC-*`).\n - Essential MVP capabilities (`UC-*`) vs. future roadmap, ensuring **foundational entity CRUD / master data workflows** are explicitly included in the MVP.\n - Top 3\u20135 quality goals (`QR-*`) and regulatory/technical constraints (`CON-*`).\n3. **Enterprise & Capability Vision**: Create `specs/architecture/ARCH-INTRO-001.md` (`status: draft`, `naf-perspective: "Enterprise & Capability"`) using `templates/architecture/introduction-and-goals.template.md`, explicitly recording the chosen presentation/UI modality.\n4. **ProductShape Baseline**: Derive initial draft artifacts in `specs/product/`:\n - Actors (`ACT-*`), User Journeys (`JRN-*`), Use Cases (`UC-*`), Business Rules (`BR-*`), Functional Requirements (`FR-*` with mandatory `@nominal`, `@boundary`, `@invalid` Gherkin blocks), and Quality Requirements (`QR-*`).\n - **Vertical Slice Completeness Rule**: Every human-triggered `UC-*` in the MVP must specify observable user interaction through the agreed presentation modality and state persistence.\n5. Validate schemas and duplicates via MCP tools `verify_schemas` and `verify_duplicates` (or `npx aisdlc check --fix`).\n6. **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, reject any headless/library-only MVP when human actors exist, verify master-data CRUD prerequisites, and separate core MVP `UC-*` from future roadmap backlog.\n\n### Step 3: Shift-Left Cybersecurity & Privacy-by-Design (`agent-threat-modeler` \u2794 `agent-privacy-officer`)\n1. Delegate to or adopt [`agent-threat-modeler`](../agent-threat-modeler/SKILL.md).\n2. Analyze every `UC-*` and `FR-*` using STRIDE and OWASP ASVS to create in `specs/security/`:\n - Threat Actors (`ACT-THREAT-*`), Abuse Cases (`ABUSE-*` targeting `UC-*`), and Security Requirements (`SEC-REQ-*` with `@security @mitigation` negative Gherkin scenarios and `SEC-ENC-*` Zero Trust enclave bindings).\n3. Hand off to [`agent-privacy-officer`](../agent-privacy-officer/SKILL.md) to apply LINDDUN and GDPR/LOPDGDD/ISO 27701 in `specs/privacy/`:\n - Personal Data Assets (`DATA-ASSET-*`), GDPR Art. 30 Records of Processing (`PRIV-ROPA-*`), and Privacy Requirements (`PRIV-REQ-*` with `@privacy @gdpr` Gherkin scenarios).\n4. Run `verify_schemas` and `verify_privacy` (`npx aisdlc verify privacy`).\n\n### Step 4: Modular Systems Architecture (`agent-system-architect`)\n1. Delegate to or adopt [`agent-system-architect`](../agent-system-architect/SKILL.md).\n2. 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-*`).\n3. Inspect third-party stack choices against `license-policy.yaml` via `verify_licenses` and subprocessors against `privacy-policy.yaml` via `verify_privacy`.\n4. **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 mitigations before coding.\n\n### Checkpoint 1 (Inception Design Checkpoint): `agent-auditor` $\\parallel$ `agent-adversary`\n1. Concurrently invoke `agent-auditor` (evaluating YAGNI, architecture bloat, interface contracts) and `agent-adversary` (simulating SPOFs, race conditions, unhandled threat scenarios) in isolated context windows over all Phase 0 deliverables.\n2. Consolidate findings and remediate in authoring agents (max 2 correction rounds).\n3. **Human Approval Gate**: Present the comprehensive Inception model for Human PO & Tech Lead sign-off.\n\n### Step 5: Release Milestone & Topological Wave SDD Plan (`1 UC-* = 1 CHG-*`)\n1. **Open Release Milestone (`Tier 2: release/v1.0.0` or Streamlined `main`)**: Group approved MVP Use Cases (`UC-001`, `UC-002`, ...) and visualize execution plan.\n2. **Decompose into Topological Waves (DAG Parallelism)**:\n - **Wave 0 \u2014 Foundational Core & Executable Presentation Host (Sequential)**: Scaffold `CHG-001` via [`aisdlc-increment`](../aisdlc-increment/SKILL.md) to establish domain core, shared contracts, auth/config, and the runnable presentation host.\n - **Waves 1..N \u2014 Orthogonal End-to-End Vertical Slices (Parallel Multi-Agent)**: Once Wave 0 contracts are merged, execute independent `CHG-*` increments (`1 UC-* = 1 CHG-*`) in parallel across isolated branches/worktrees (`feat/CHG-002`, `feat/CHG-003`, ...).\n3. **Release Consolidation**: Once all MVP increments are integrated (`sdd_integrate`), run `verify` (`npx aisdlc verify all`), generate SBOM, compute release KPIs (`kpi_release`), and open the Release PR for final human approval and SemVer tagging (`v1.0.0`).\n\n## Non-Negotiable Guardrails\n- **Clean Context Window Isolation per Specialist Agent (Cross-IDE)**: Never execute two distinct specialist roles in the same conversation context window. Always spawn each specialist in a fresh isolated subagent context that reads state strictly from disk.\n- **2-Checkpoint Quality & Adversarial Protocol**: Quality auditing and adversarial testing are concentrated at the completion of Inception design and Pre-PR implementation, avoiding micro-step overhead.\n- **FORBIDDEN Library-Only MVP for Human-Facing Products**: Whenever a product defines human actors (`ACT-*`), no agent may scope the MVP as headless class libraries without an executable presentation host.\n- **FORBIDDEN Greenfield Monolith (`1 UC-* = 1 CHG-*`)**: Never bundle the entire product or multiple `UC-*` into a single SDD change (`CHG-001`). Parallelism is achieved by running **multiple bounded `CHG-*` concurrently** on separate branches/worktrees.\n- Never invoke `sdd_change_new` or write application code in `src/` on a Greenfield project before `ARCH-INTRO-001`, `agent-expert-user` MVP validation, and at least one `UC-*` and `FR-*` exist.\n- All newly drafted specifications must start with `status: draft`.'
|
|
19111
|
+
body: '## Purpose & Trigger\nUse 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.\n\n## Consolidated Inception Quality & Adversarial Checkpoint\nAcross Phase 0 and Inception, quality auditing and adversarial stress-testing are concentrated at the completion of Inception design (or after product shaping):\n- **Concurrent Inspection**: Concurrently invoke [`agent-auditor`](../agent-auditor/SKILL.md) (evaluating YAGNI, structural debt, and simplification) and [`agent-adversary`](../agent-adversary/SKILL.md) (stress-testing logic traps, SPOFs, attack vectors, or broken invariants) in clean, isolated context windows.\n- **Non-Invasive Review**: Neither auditor nor adversary modifies deliverables directly; both deliver structured reports citing canonical IDs and SHA-256 digests.\n- **Consolidated Remediation**: Consolidate findings and emit the Workflow Handoff back to authoring agents to resolve blocking defects and apply simplifications (max 2 correction rounds).\n- **Anti-Ping-Pong Guardrail**: Bounded strictly to maximum **1 correction round**. If non-blocking advisories remain, proceed to the downstream phase; if blocking defects persist, escalate immediately to the Human Tech Lead.\n\n## End-to-End Execution Playbook\n\n### Step 1: Branch-Before-Change & Repository Turnkey Initialization\n1. **Branch-Before-Change**: Verify the active branch (`git branch --show-current`). If currently on a protected branch (`main`, `master`, `release/*`), create and switch to an inception branch (e.g., `feat/inception-baseline` or `chore/aisdlc-inception`) **before** modifying or creating any files.\n2. If the workspace has not been initialized with AI-SDLC schemas, policies, and templates, run MCP tool `new` (or CLI `npx @aisdlc/cli init`).\n3. Install the Git telemetry hook via `npx aisdlc git hook install` (`pnpm run git:hook:install`).\n4. Verify `quality-policy.yaml`, `license-policy.yaml`, and `privacy-policy.yaml` are present in the repository root.\n5. Commit initial scaffolding, push (`git push -u origin <branch>`), and open a **Draft PR** (`gh pr create --draft`, with graceful fallback if no remote or CLI auth exists) so all Phase 0 Inception artifacts (`ARCH-INTRO-001`, ProductShape, Threat/Privacy, Architecture) are pushed incrementally to the Draft PR.\n\n### Step 2: Phase 0 Product Inception (`agent-product-analyst`)\n1. Delegate to or adopt [`agent-product-analyst`](../agent-product-analyst/SKILL.md).\n2. **Iterative Discovery Interview (Up to 15 Questions or Until Product Scope is 100% Clear)**: Before generating artifacts, clarify with the human Product Owner in rounds of 3\u20135 questions:\n - Core mission statement and business problem.\n - Primary actors (`ACT-*`) and external systems.\n - **Target Interaction & Presentation Modality (`CON-*` / `ARCH-INTRO-001`)**: Explicitly define at inception how human actors will interact with the MVP (e.g., **Web UI**, **Desktop GUI**, **Interactive Console/TUI/CLI**, **Mobile App**, or **Headless API/SDK** if actors are exclusively external systems). Never assume a headless class library when human actors exist.\n - **Delivery & Deployment Model (`ARCH-INTRO-001` / `CON-*` / `QR-*`)**: Clarify in business terms how the product will be delivered and operated (Cloud SaaS, Self-Hosted/On-Premise, Local Desktop/CLI binary, or Library/SDK package) along with any data-residency or availability requirements.\n - **Modern Aesthetic & Design System Standard (`CON-UI-*` / `ARCH-INTRO-001`)**: Explicitly define a modern, visually attractive styling standard adapted to the chosen presentation modality: (1) **Web UI**: modern responsive layouts using Bootstrap 5 utility classes and components (`card`, `table table-hover`, `badge`, `alert alert-*`, responsive grid) or modern equivalents, (2) **Desktop GUI**: modern clean design (rounded corners, elevated panels, padding, consistent typography) avoiding raw legacy unstyled windows, (3) **Console / TUI**: rich terminal interface with ANSI colors, status badges, formatted tables, and progress indicators (e.g., Spectre.Console, Rich, Ink, or Chalk/Picocolors).\n - **User Journeys (`JRN-*`) to Generate (Plain-Language Elicitation)**: Ask in simple, everyday language which end-to-end user journeys to model, explicitly indicating the 5 pieces of information needed to build each journey properly: (1) protagonist user (`persona` / `ACT-*`) and their main goal, (2) step-by-step stages from start to finish (`stages`), (3) interaction screens/channels at each stage (`touchpoints`), (4) current obstacles or pain points (`pain-points`), and (5) concrete system capabilities/use cases (`related-use-cases` / `UC-*`).\n - Essential MVP capabilities (`UC-*`) vs. future roadmap, ensuring **foundational entity CRUD / master data workflows** are explicitly included in the MVP.\n - Top 3\u20135 quality goals (`QR-*`) and regulatory/technical constraints (`CON-*`).\n3. **Enterprise & Capability Vision**: Create `specs/architecture/ARCH-INTRO-001.md` (`status: draft`, `naf-perspective: "Enterprise & Capability"`) using `templates/architecture/introduction-and-goals.template.md`, explicitly recording the chosen presentation/UI modality.\n4. **ProductShape Baseline**: Derive initial draft artifacts in `specs/product/`:\n - Actors (`ACT-*`), User Journeys (`JRN-*`), Use Cases (`UC-*`), Business Rules (`BR-*`), Functional Requirements (`FR-*` with mandatory `@nominal`, `@boundary`, `@invalid` Gherkin blocks), and Quality Requirements (`QR-*`).\n - **Vertical Slice Completeness Rule**: Every human-triggered `UC-*` in the MVP must specify observable user interaction through the agreed presentation modality and state persistence.\n5. Validate schemas and duplicates via MCP tools `verify_schemas` and `verify_duplicates` (or `npx aisdlc check --fix`).\n6. **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, reject any headless/library-only MVP when human actors exist, verify master-data CRUD prerequisites, and separate core MVP `UC-*` from future roadmap backlog.\n\n### Step 3: Shift-Left Cybersecurity & Privacy-by-Design (`agent-threat-modeler` \u2794 `agent-privacy-officer`)\n1. Delegate to or adopt [`agent-threat-modeler`](../agent-threat-modeler/SKILL.md).\n2. Analyze every `UC-*` and `FR-*` using STRIDE and OWASP ASVS to create in `specs/security/`:\n - Threat Actors (`ACT-THREAT-*`), Abuse Cases (`ABUSE-*` targeting `UC-*`), and Security Requirements (`SEC-REQ-*` with `@security @mitigation` negative Gherkin scenarios and `SEC-ENC-*` Zero Trust enclave bindings).\n3. Hand off to [`agent-privacy-officer`](../agent-privacy-officer/SKILL.md) to apply LINDDUN and GDPR/LOPDGDD/ISO 27701 in `specs/privacy/`:\n - Personal Data Assets (`DATA-ASSET-*`), GDPR Art. 30 Records of Processing (`PRIV-ROPA-*`), and Privacy Requirements (`PRIV-REQ-*` with `@privacy @gdpr` Gherkin scenarios).\n4. Run `verify_schemas` and `verify_privacy` (`npx aisdlc verify privacy`).\n\n### Step 4: Modular Systems Architecture (`agent-system-architect`)\n1. Delegate to or adopt [`agent-system-architect`](../agent-system-architect/SKILL.md).\n2. Define building blocks (`CMP-*`), Deployment Topology (`ARCH-DEP-001` translating the delivery model into execution nodes `RES-*` and enclaves `SEC-ENC-*`), 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-*`).\n3. Inspect third-party stack choices against `license-policy.yaml` via `verify_licenses` and subprocessors against `privacy-policy.yaml` via `verify_privacy`.\n4. **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 mitigations before coding.\n\n### Checkpoint 1 (Inception Design Checkpoint): `agent-auditor` $\\parallel$ `agent-adversary`\n1. Concurrently invoke `agent-auditor` (evaluating YAGNI, architecture bloat, interface contracts) and `agent-adversary` (simulating SPOFs, race conditions, unhandled threat scenarios) in isolated context windows over all Phase 0 deliverables.\n2. Consolidate findings and remediate in authoring agents (max 2 correction rounds), committing and pushing (`git push`) updates to the Draft PR.\n3. **Human Approval Gate**: Mark the Inception Draft PR ready (`gh pr ready`) and present the comprehensive Inception model for Human PO & Tech Lead sign-off.\n\n### Step 5: Release Milestone & Topological Wave SDD Plan (`1 UC-* = 1 CHG-*`)\n1. **Open Release Milestone (`Tier 2: release/v1.0.0` or Streamlined `main`)**: Group approved MVP Use Cases (`UC-001`, `UC-002`, ...) and visualize execution plan.\n2. **Decompose into Topological Waves (DAG Parallelism)**:\n - **Wave 0 \u2014 Foundational Core, Executable Presentation Host & CI/CD (`agent-devops`) (Sequential)**: Scaffold `CHG-001` via [`aisdlc-increment`](../aisdlc-increment/SKILL.md) to establish domain core, shared contracts, auth/config, and the runnable presentation host. Invoke [`agent-devops`](../agent-devops/SKILL.md) to clarify the technical CI/CD & packaging strategy (CI Quality Gates, Docker/GHCR, package registry, or PaaS/Cloud) and scaffold `.github/workflows/` and container manifests without modifying `src/`.\n - **Waves 1..N \u2014 Orthogonal End-to-End Vertical Slices (Parallel Multi-Agent)**: Once Wave 0 contracts are merged, execute independent `CHG-*` increments (`1 UC-* = 1 CHG-*`) in parallel across isolated branches/worktrees (`feat/CHG-002`, `feat/CHG-003`, ...).\n3. **Release Consolidation (`agent-devops`)**: Once all MVP increments are integrated (`sdd_integrate`), run `verify` (`npx aisdlc verify all`), generate SBOM, compute release KPIs (`kpi_release`), regenerate canonical reports and dashboard (`report_quality`, `report_dashboard`), verify release/publishing workflows via `agent-devops`, and open the Release PR for final human approval and SemVer tagging (`v1.0.0`). Individual `feat/CHG-*` PRs must compute reports locally without committing global `reports/` files to avoid merge conflicts.\n\n## Non-Negotiable Guardrails\n- **Clean Context Window Isolation per Specialist Agent (Cross-IDE)**: Never execute two distinct specialist roles in the same conversation context window. Always spawn each specialist in a fresh isolated subagent context that reads state strictly from disk.\n- **2-Checkpoint Quality & Adversarial Protocol**: Quality auditing and adversarial testing are concentrated at the completion of Inception design and Pre-PR implementation, avoiding micro-step overhead.\n- **FORBIDDEN Library-Only MVP for Human-Facing Products**: Whenever a product defines human actors (`ACT-*`), no agent may scope the MVP as headless class libraries without an executable presentation host.\n- **FORBIDDEN Greenfield Monolith (`1 UC-* = 1 CHG-*`)**: Never bundle the entire product or multiple `UC-*` into a single SDD change (`CHG-001`). Parallelism is achieved by running **multiple bounded `CHG-*` concurrently** on separate branches/worktrees.\n- Never invoke `sdd_change_new` or write application code in `src/` on a Greenfield project before `ARCH-INTRO-001`, `agent-expert-user` MVP validation, and at least one `UC-*` and `FR-*` exist.\n- All newly drafted specifications must start with `status: draft`.'
|
|
18927
19112
|
},
|
|
18928
19113
|
{
|
|
18929
19114
|
id: "aisdlc-legacy-onboarding",
|
|
@@ -18931,7 +19116,7 @@ var LIFECYCLE_SKILL_TEMPLATES = [
|
|
|
18931
19116
|
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-*), 2-checkpoint auditor/adversary verification, and establishing baseline quality, security, and license audits before new SDD increments.",
|
|
18932
19117
|
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), [`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).",
|
|
18933
19118
|
globs: "architecture/**, specs/**, src/**, packages/**",
|
|
18934
|
-
body: "## Purpose & Trigger\nUse this skill when onboarding an **existing codebase (Brownfield / Legacy)** that was not built with AI-SDLC. It establishes non-disruptive governance, maps existing code into canonical specifications, inventories debt across all 12 Quality Gates, and creates baseline specifications (`specs/product/`, `specs/architecture/`) before new features or refactorings are introduced.\n\n## Retro-Inception Quality & Adversarial Checkpoint\nAcross Brownfield retro-inception, quality auditing and adversarial stress-testing are concentrated at the completion of retro-inception mapping:\n- **Concurrent Inspection**: Concurrently invoke [`agent-auditor`](../agent-auditor/SKILL.md) (evaluating YAGNI, over-modeling, and debt priorities) and [`agent-adversary`](../agent-adversary/SKILL.md) (uncovering undocumented invariants, hidden failure modes, and security gaps) in clean, isolated context windows.\n- **Non-Invasive Review**: Neither auditor nor adversary modifies deliverables directly; both deliver structured reports citing canonical IDs and SHA-256 digests.\n- **Consolidated Remediation**: Consolidate findings and emit the Workflow Handoff back to authoring agents to resolve blocking defects and apply simplifications (max 2 correction rounds).\n- **Anti-Ping-Pong Guardrail**: Bounded strictly to maximum **1 correction round**. If non-blocking advisories remain, proceed to characterization; if blocking defects persist, escalate to the Human Tech Lead.\n\n## End-to-End Execution Playbook\n\n### Step 1: Turnkey Repository Scaffolding (Non-Destructive)\n1. Initialize AI-SDLC configuration without overwriting existing application files using `npx @aisdlc/cli init` (or MCP tool `new`).\
|
|
19119
|
+
body: "## Purpose & Trigger\nUse this skill when onboarding an **existing codebase (Brownfield / Legacy)** that was not built with AI-SDLC. It establishes non-disruptive governance, maps existing code into canonical specifications, inventories debt across all 12 Quality Gates, and creates baseline specifications (`specs/product/`, `specs/architecture/`) before new features or refactorings are introduced.\n\n## Retro-Inception Quality & Adversarial Checkpoint\nAcross Brownfield retro-inception, quality auditing and adversarial stress-testing are concentrated at the completion of retro-inception mapping:\n- **Concurrent Inspection**: Concurrently invoke [`agent-auditor`](../agent-auditor/SKILL.md) (evaluating YAGNI, over-modeling, and debt priorities) and [`agent-adversary`](../agent-adversary/SKILL.md) (uncovering undocumented invariants, hidden failure modes, and security gaps) in clean, isolated context windows.\n- **Non-Invasive Review**: Neither auditor nor adversary modifies deliverables directly; both deliver structured reports citing canonical IDs and SHA-256 digests.\n- **Consolidated Remediation**: Consolidate findings and emit the Workflow Handoff back to authoring agents to resolve blocking defects and apply simplifications (max 2 correction rounds).\n- **Anti-Ping-Pong Guardrail**: Bounded strictly to maximum **1 correction round**. If non-blocking advisories remain, proceed to characterization; if blocking defects persist, escalate to the Human Tech Lead.\n\n## End-to-End Execution Playbook\n\n### Step 1: Branch-Before-Change & Turnkey Repository Scaffolding (Non-Destructive)\n1. **Branch-Before-Change**: Verify the active branch (`git branch --show-current`). If currently on a protected branch (`main`, `master`, `release/*`), create and switch to an onboarding branch (e.g., `chore/aisdlc-onboarding`) **before** modifying or creating any files.\n2. Initialize AI-SDLC configuration without overwriting existing application files using `npx @aisdlc/cli init` (or MCP tool `new`).\n3. Install the Git telemetry hook via `npx aisdlc git hook install` (`pnpm run git:hook:install`).\n4. Invoke [`agent-devops`](../agent-devops/SKILL.md) to audit existing CI/CD workflows and container manifests and integrate `aisdlc verify all` into the pipeline without breaking legacy deployments.\n5. Commit initial AI-SDLC schemas and policies (`.github/`, `schemas/`, `templates/`, `*-policy.yaml`), push (`git push -u origin <branch>`), and open a **Draft PR** (`gh pr create --draft`, with graceful fallback if no remote or CLI auth exists) so subsequent retro-inception and characterization commits are pushed incrementally.\n\n### Step 2: Automated Baseline Audit & Debt Inventory (Read-Only)\nBefore modifying any code or creating SDD changes, run diagnostic verifiers to quantify existing technical, legal, privacy, and security debt:\n1. **License & AST Code Quality Baseline (`agent-auditor`)**: Run MCP tools `verify_licenses` (`npx aisdlc verify licenses`) and `report_quality` (`npx aisdlc report quality`) to identify viral (`GPL`/`AGPL`) or commercial (`BSL`/`SSPL`) dependencies and legacy hotspots exceeding Cyclomatic Complexity ($\\le 10$), Cognitive Complexity ($\\le 15$), or Maintainability Index ($\\ge 50$).\n2. **Shift-Left Security Scan (`agent-adversary`)**: Run MCP tool `verify_security` (`npx aisdlc verify security`) to detect hardcoded secrets (Gate 11) or OWASP SAST vulnerabilities in legacy files.\n3. **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.\n\n### Step 3: Brownfield Retro-Inception (`agent-system-architect` & `agent-product-analyst`)\nInstead 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:\n1. **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`.\n2. **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-*`).\n3. **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).\n4. **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.\n5. **Retro-Inception Checkpoint (`agent-auditor` $\\parallel$ `agent-adversary`)**: Concurrently inspect reverse-engineered artifacts, evaluate fidelity vs. unnecessary modeling overhead, and consolidate fixes.\n\n### Step 4: Characterization Testing & Synchronization\n1. Run MCP tool `sdd_check_fix` (`npx aisdlc check --fix`) to extract `.feature` files and compute canonical SHA-256 digests.\n2. Run `verify_schemas` and `verify_pdac` to confirm the reverse-engineered baseline graph is structurally valid and drift-free.\n3. Run `report_quality` (`npx aisdlc report quality`) and `report_dashboard` (`npx aisdlc report dashboard`) to generate the local baseline quality report and interactive dashboard for inspection (commit global `reports/` only on the onboarding baseline or post-merge on `main`, never on parallel feature PRs).\n4. Push final baseline commits (`git push`) and mark the onboarding Draft PR ready (`gh pr ready`) for human Tech Lead review before merging to `main`.\n\n### Step 5: Transition to Governed SDD Increments (Boy Scout / Strangler Rule)\nOnce the target domain's baseline artifacts (`ARCH-INTRO-*`, `UC-*`, `FR-*`, `CMP-*`) are in place, execute all new features, refactorings, or bugfixes via [`aisdlc-increment`](../aisdlc-increment/SKILL.md).\n\n## Non-Negotiable Guardrails\n- **Clean Context Window Isolation per Specialist Agent (Cross-IDE)**: Never execute two distinct specialist roles in the same conversation context window. Always spawn each specialist in a fresh isolated subagent context that reads state strictly from disk.\n- **2-Checkpoint Quality & Adversarial Protocol**: Concentrated review at the retro-inception boundary and before PR delivery prevents process friction while maintaining rigorous defect interception.\n- **Zero Drive-By Rewrites**: Never mass-refactor untouched legacy modules during onboarding. Apply the Strangler / Boy Scout rule: bring touched functions into compliance with `quality-policy.yaml` incrementally via governed SDD tasks (`TSK-*`).\n- **Characterization First**: Never alter legacy business logic without first capturing its current behavior in an `FR-*` Gherkin specification and a verifiable test suite (`agent-qa-engineer`).\n- **Immediate Secret Remediation**: If Step 2 (`verify_security`) uncovers leaked credentials (exit code 4), halt feature work and remediate/rotate secrets immediately."
|
|
18935
19120
|
},
|
|
18936
19121
|
{
|
|
18937
19122
|
id: "aisdlc-increment",
|
|
@@ -18939,7 +19124,7 @@ var LIFECYCLE_SKILL_TEMPLATES = [
|
|
|
18939
19124
|
description: "Orchestrate the complete Spec-Driven Development (SDD) lifecycle for bounded feature increments, enhancements, and bugfixes (CHG-* / TSK-*), from upstream requirement derivation and streamlined Git branching through Red-Green-Refactor TDD, 2-checkpoint transversal auditor/adversary verification, all 12 Quality Gates, and canonical baseline integration.",
|
|
18940
19125
|
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).",
|
|
18941
19126
|
globs: "specs/changes/**, src/**, packages/**, tests/**",
|
|
18942
|
-
body: '## Purpose & Trigger\nUse 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 under the **streamlined 2-checkpoint architecture**.\n\n## End-to-End Execution Playbook\n\n### Step 1: Upstream Product, Security & Privacy Delta (`agent-product-analyst`, `agent-threat-modeler` & `agent-privacy-officer`)\n1. 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/`.\n2. If the increment introduces new behavior or modifies business rules:\n - Use [`agent-product-analyst`](../agent-product-analyst/SKILL.md) to create or update the `UC-*`, `BR-*`, and `FR-*` (with `@nominal`, `@boundary`, `@invalid` Gherkin scenarios).\n - Run MCP tool `verify_duplicates` (`npx aisdlc verify duplicates`) to block lexical or functional collisions early.\n - Use [`agent-threat-modeler`](../agent-threat-modeler/SKILL.md) to model any new `ABUSE-*` and `SEC-REQ-*` mitigations.\n - 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-*`).\n3. Run `sdd_check_fix` (`npx aisdlc check --fix`) to sync Gherkin `.feature` files and validate schemas.\n\n### Step 2: SDD Change Scaffolding & Architectural Design (`agent-system-architect`)\n1. Scaffold the bounded change package and its cryptographic `handoff.yaml` sidecar (`HOF-*`) targeting **a single Use Case (`1 UC-* = 1 CHG-*`)** using MCP tool `sdd_change_new` (or CLI `npx aisdlc change new "<Title>" --from <UC-ID> --profile <patch|standard|critical>`).\n2. Use [`agent-system-architect`](../agent-system-architect/SKILL.md) to complete `specs/changes/active/<chg-id>/design.md` and `specs/architecture/CMP-*.md`:\n - Structure `CMP-*` and `design.md` around **Modular & Hexagonal Architecture (Ports & Adapters)** (Domain/Application Core + Inbound/Outbound Ports) and define **Contract-First** shared interfaces/DTOs/schemas when spanning Frontend and Backend.\n - Map 100% of `handoff.yaml` requirements and components to atomic tasks (`TSK-*`) in `tasks.md` with explicit `autonomy-mode` (`AUTONOMOUS`, `HUMAN_REVIEW_PLAN`, `HIGH_RISK_MANUAL`, `AMBIGUOUS`).\n3. Run `verify_governance` and `verify_friction` to validate task governance, 100% design/handoff scope coverage, and anti-monolith limits (`maxUseCasesPerChange = 1`).\n\n### Checkpoint 1: Specification & Design Checkpoint (`agent-auditor` $\\parallel$ `agent-adversary`)\n1. Concurrently invoke `agent-auditor` (evaluating YAGNI, interface bloat, and task completeness) and `agent-adversary` (probing contradictions, race conditions, and architecture SPOFs) in clean, isolated context windows over the combined upstream deliverables.\n2. Consolidate findings and remediate any blocking defects (max 2 correction rounds).\n3. **Human Approval Gate 1**: Present the specification and architectural design for Human Tech Lead / PO sign-off before proceeding to code.\n\n### Step 3: Streamlined Git Branch Navigation & Multi-Agent Parallelism\n1. Navigate to the working branch using `npx aisdlc git checkout <TSK-ID>` (`pnpm run git:checkout <TSK-ID>`).\n - **Default Streamlined Mode**: Switches to the working branch `feat/<CHG-ID>-<slug>` (created from `main`).\n - Granular task traceability is maintained via commit trailers (`Task-ID: TSK-*`, `Parent-Ref: CHG-*`) and commit scopes (`feat(TSK-001): ...`), enabling per-task rework KPIs without branch explosion.\n2. **Parallel Agent Execution Rules (`--parallel`)**:\n - When concurrent multi-agent implementation is configured (e.g. Backend adapter $\\parallel$ Frontend UI), `aisdlc git checkout <TSK-ID> --parallel` creates isolated worktrees (`task/<PARENT-ID>/<TSK-ID>-<slug>`).\n\n### Step 4: Red Phase \u2014 Failing Test Suites (`agent-qa-engineer`)\n1. Delegate to or adopt [`agent-qa-engineer`](../agent-qa-engineer/SKILL.md).\n2. Author FAILING (red) BDD/Gherkin step definitions, integration/contract tests, and mandatory E2E/UI tests (evaluating Happy Path, Sad Path, and Boundary Values for every interactive UI element, plus `UC-*` alternative/exception flows) in `tests/`.\n3. Commit failing test suites with trailer `Task-ID: TSK-YYY`.\n4. Run `verify_testing` (`npx aisdlc verify testing`) to confirm requirement test coverage before writing production code.\n\n### Step 5: Green & Refactor Phase \u2014 Surgical Implementation (`agent-developer`)\n1. Delegate to or adopt [`agent-developer`](../agent-developer/SKILL.md).\n2. Execute the **Mandatory 4-Step Implementation Order**:\n - (1) Modular & Hexagonal Architecture (Ports & Adapters) boundaries, (2) Inter-module interfaces/ports 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).\n3. Commit implementations with trailer `Task-ID: TSK-YYY`.\n4. Verify any new dependency against `license-policy.yaml` via `verify_licenses` and PII handling against `privacy-policy.yaml` via `verify_privacy`.\n5. 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.\n6. Run `verify` (`npx aisdlc verify all`) confirming all **12 Quality Gates** pass green.\n\n### Checkpoint 2: Implementation & Pre-PR Checkpoint (`agent-auditor` $\\parallel$ `agent-adversary`)\n1. **Functional Validation (`agent-expert-user`)**: Validate live runtime behavior against `UC-*` and `FR-*` criteria (including `0` browser `console.error`/`pageerror` on UI changes).\n2. Concurrently invoke `agent-auditor` (verifying Clean Code, SOLID, DRY, AST thresholds, and eliminating unnecessary abstractions) and `agent-adversary` (performing conceptual test mutation to verify QA tests catch defects, and attacking boundary inputs with concrete PoC breaks).\n3. Consolidate findings and remediate in `agent-developer` (max 2 correction rounds).\n4. Run `npx aisdlc verify all` to confirm final green status.\n\n### Step 6: Human PR Sign-Off, Baseline Integration & Release Closure\n1. **Feature Merge (`feat/CHG-*` \u2794 `main` or `release/vX.Y.Z`)**:\n - Present the PR, KPI summary (`kpi_pr` including per-task rework metrics), 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).\n2. **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 synchronizes the normative text and BDD Gherkin scenarios into `FR-*` / `UC-*` / `SEC-REQ-*` / `PRIV-REQ-*`, bumps minor SemVer when updating active specs, resyncs PDaC SHA-256 digests, promotes `FR-*` to `active`, links `CMP-*`, and archives the change under `specs/changes/completed/` (or `npx aisdlc sdd integrate --all` to consolidate all completed changes).\n3. **Semantic Versioning Promotion**: Tag the merge with the computed SemVer bump (`patch`, `minor`, `major`) and refresh the interactive dashboard (`report_dashboard`).\n\n## Non-Negotiable Guardrails\n- **Clean Context Window Isolation per Specialist Agent (Cross-IDE)**: Never execute two distinct specialist roles (e.g., `agent-qa-engineer` and `agent-developer`, or `agent-developer` and `agent-security-auditor`) in the same conversation context window. In subagent-capable IDEs (Antigravity `invoke_subagent`, Claude Code `Task` / `.claude/agents/`, GitHub Copilot `@agent-*`), always spawn each specialist in a fresh isolated subagent context that reads state strictly from disk (`specs/`, `handoff.yaml`, `get_active_handoff`). In chat-based IDEs (Cursor, Windsurf, Aider), persist all artifacts to disk, emit the Workflow Handoff block, and instruct the user to open a **New Chat** (or `/clear`) before running the next specialist.\n- **2-Checkpoint Quality & Adversarial Protocol**: Enforce transversal quality and red-team checks exclusively at **Checkpoint 1 (Specification & Design)** and **Checkpoint 2 (Implementation & Pre-PR)**. Enforce the **Anti-Ping-Pong Guardrail**: maximum 2 correction rounds per checkpoint; if unresolved blocking defects persist, escalate to the Human Tech Lead.\n- **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.\n- **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`.'
|
|
19127
|
+
body: '## Purpose & Trigger\nUse 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 under the **streamlined 2-checkpoint architecture**.\n\n## End-to-End Execution Playbook\n\n### Step 0: Branch-Before-Change, Friction Profile Selection & Scope Triage (`patch | standard | critical`)\n1. **Branch-Before-Change**: Verify the active branch (`git branch --show-current`). If currently on a protected branch (`main`, `master`, `release/*`), create and switch to a dedicated working branch (`feat/<CHG-ID>-<slug>` or `fix/<CHG-ID>-<slug>`) **before** modifying or creating any files.\n2. Before editing any files or running `sdd_change_new`, inspect if the user explicitly specified the friction profile (`patch`, `standard`, or `critical`). If not, analyze the requested scope and ask the user via interactive question (`ask_question`) with the recommended option first (`(Recommended)`):\n - **`patch`**: low-risk isolated bugfixes ($\\le 2$ source files, zero Anti-Bypass paths), typos, or linter fixes on `patch/*` or `fix/*` branches (`npx aisdlc change new "<Title>" --id <chg-id> --profile patch` generates `spec.md` with `profile: patch` and `verification` block only, omitting `design.md`, `tasks.md`, and `handoff.yaml`; fast-track directly to Step 3 -> Step 4 -> Step 5 -> Step 6).\n - **`standard`**: functional increments, new/updated `UC-*` or `FR-*`, or contract changes (`proposal.md`, `spec.md`, `design.md`, `tasks.md`, and `handoff.yaml`).\n - **`critical`**: changes touching security enclaves (`SEC-ENC-*`), sensitive PII (`SPECIAL_CATEGORY` / `DPIA-*`), schemas, or migrations (full `standard` artifacts + `ADR-*` + mandatory STRIDE modeling and dual human approval).\n2. **Anti-Bypass Rule**: Never recommend or allow `patch` when the change touches protected paths (`schemas/`, `specs/security/`, `specs/privacy/`, `packages/security/`, `SEC-ENC-*`, `09_decisions/`, `migrations/`, or `*-policy.yaml`).\n\n### Step 1: Upstream Product, Security & Privacy Delta (`agent-product-analyst`, `agent-threat-modeler` & `agent-privacy-officer`)\n1. 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/`.\n2. If the increment introduces new behavior or modifies business rules:\n - Use [`agent-product-analyst`](../agent-product-analyst/SKILL.md) to create or update the `UC-*`, `BR-*`, and `FR-*` (with `@nominal`, `@boundary`, `@invalid` Gherkin scenarios).\n - Run MCP tool `verify_duplicates` (`npx aisdlc verify duplicates`) to block lexical or functional collisions early.\n - Use [`agent-threat-modeler`](../agent-threat-modeler/SKILL.md) to model any new `ABUSE-*` and `SEC-REQ-*` mitigations.\n - 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-*`).\n3. Run `sdd_check_fix` (`npx aisdlc check --fix`) to sync Gherkin `.feature` files and validate schemas.\n\n### Step 2: SDD Change Scaffolding & Architectural Design (`agent-system-architect`)\n1. Scaffold the bounded change package and its cryptographic `handoff.yaml` sidecar (`HOF-*`) targeting **a single Use Case (`1 UC-* = 1 CHG-*`)** using MCP tool `sdd_change_new` (or CLI `npx aisdlc change new "<Title>" --from <UC-ID> --profile <patch|standard|critical>`).\n2. Use [`agent-system-architect`](../agent-system-architect/SKILL.md) to complete `specs/changes/active/<chg-id>/design.md` and `specs/architecture/CMP-*.md`:\n - Structure `CMP-*` and `design.md` around **Modular & Hexagonal Architecture (Ports & Adapters)** (Domain/Application Core + Inbound/Outbound Ports) and define **Contract-First** shared interfaces/DTOs/schemas when spanning Frontend and Backend.\n - Map 100% of `handoff.yaml` requirements and components to atomic tasks (`TSK-*`) in `tasks.md` with explicit `autonomy-mode` (`AUTONOMOUS`, `HUMAN_REVIEW_PLAN`, `HIGH_RISK_MANUAL`, `AMBIGUOUS`).\n3. Run `verify_governance` and `verify_friction` to validate task governance, 100% design/handoff scope coverage, and anti-monolith limits (`maxUseCasesPerChange = 1`).\n4. **Open Draft PR from Spec/Scaffolding (Option A)**: Commit the initial SDD scaffolding and specification/design artifacts on the working branch, push to remote (`git push -u origin <branch>`), and open a **Draft PR** (`gh pr create --draft --title "<type>(<CHG-ID>): <Title>" --body "..."`; graceful fallback to local-only commits if no remote or CLI auth exists). For `patch` profile increments, open the Draft PR right after scaffolding `spec.md`.\n\n### Checkpoint 1: Specification & Design Checkpoint (`agent-auditor` $\\parallel$ `agent-adversary`)\n1. Concurrently invoke `agent-auditor` (evaluating YAGNI, interface bloat, and task completeness) and `agent-adversary` (probing contradictions, race conditions, and architecture SPOFs) in clean, isolated context windows over the combined upstream deliverables.\n2. Consolidate findings and remediate any blocking defects (max 2 correction rounds), committing and pushing updates (`git push`) to the open Draft PR.\n3. **Human Approval Gate 1**: Present the specification and architectural design (reviewable directly in the Draft PR) for Human Tech Lead / PO sign-off before proceeding to code.\n\n### Step 3: Streamlined Git Branch Navigation & Multi-Agent Parallelism\n1. Confirm you are on the working branch via `npx aisdlc git checkout <TSK-ID>` (`pnpm run git:checkout <TSK-ID>`).\n - **Default Streamlined Mode**: Ensures the agent is on `feat/<CHG-ID>-<slug>` (already created in Step 0).\n - Granular task traceability is maintained via commit trailers (`Task-ID: TSK-*`, `Parent-Ref: CHG-*`) and commit scopes (`feat(TSK-001): ...`), enabling per-task rework KPIs without branch explosion.\n2. **Parallel Agent Execution Rules (`--parallel`)**:\n - When concurrent multi-agent implementation is configured (e.g. Backend adapter $\\parallel$ Frontend UI), `aisdlc git checkout <TSK-ID> --parallel` creates isolated worktrees (`task/<PARENT-ID>/<TSK-ID>-<slug>`).\n\n### Step 4: Red Phase \u2014 Failing Test Suites (`agent-qa-engineer`)\n1. Delegate to or adopt [`agent-qa-engineer`](../agent-qa-engineer/SKILL.md).\n2. Run `npx aisdlc gherkin extract` (`sdd_check_fix`) to deterministically extract `.feature` files from Markdown specifications, and run `npx aisdlc gherkin scaffold <feature-file> --lang <lang> --fallback` to scaffold RED step definitions in `tests/steps/` (never hand-author `.feature` or step skeletons).\n3. Author FAILING (red) assertions inside the scaffolded step definitions, plus integration/contract tests and mandatory E2E/UI tests (evaluating Happy Path, Sad Path, and Boundary Values for every interactive UI element, plus `UC-*` alternative/exception flows) in `tests/`.\n4. Commit failing test suites with trailer `Task-ID: TSK-YYY` and push (`git push`) to the Draft PR (CI workflows skip heavy checks while the PR is in `draft` state).\n5. Run `npx aisdlc verify gherkin` and `verify_testing` (`npx aisdlc verify testing`) to confirm deterministic Gherkin/step sync and requirement test coverage before writing production code.\n\n### Step 5: Green & Refactor Phase \u2014 Surgical Implementation (`agent-developer` / `agent-devops`)\n1. Delegate application tasks (`src/`, `tests/`) to [`agent-developer`](../agent-developer/SKILL.md). For tasks (`TSK-*`) targeting CI/CD workflows (`.github/workflows/`), `Dockerfile*`, IaC manifests, or support scripts (`scripts/`), delegate to [`agent-devops`](../agent-devops/SKILL.md) under its strict non-invasion guardrail on `src/`.\n2. Execute the **Mandatory 4-Step Implementation Order**:\n - (1) Modular & Hexagonal Architecture (Ports & Adapters) boundaries, (2) Inter-module interfaces/ports 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).\n3. Commit implementations with trailer `Task-ID: TSK-YYY` and push (`git push`) incrementally to the Draft PR.\n4. Verify any new dependency against `license-policy.yaml` via `verify_licenses` and PII handling against `privacy-policy.yaml` via `verify_privacy`.\n5. 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.\n6. Run `verify` (`npx aisdlc verify all`) confirming all **12 Quality Gates** pass green.\n\n### Checkpoint 2: Implementation & Pre-PR Checkpoint (`agent-auditor` $\\parallel$ `agent-adversary`)\n1. **Functional Validation (`agent-expert-user`)**: Validate live runtime behavior against `UC-*` and `FR-*` criteria (including `0` browser `console.error`/`pageerror` on UI changes).\n2. Concurrently invoke `agent-auditor` (verifying Clean Code, SOLID, DRY, AST thresholds, and eliminating unnecessary abstractions) and `agent-adversary` (performing conceptual test mutation to verify QA tests catch defects, and attacking boundary inputs with concrete PoC breaks).\n3. Consolidate findings and remediate in `agent-developer` (max 2 correction rounds), committing and pushing (`git push`) fixes to the Draft PR.\n4. Run `npx aisdlc verify all` to confirm final green status, then run `report_quality` (`npx aisdlc report quality`) and `report_dashboard` (`npx aisdlc report dashboard`) to compute local reports and the interactive dashboard for review (**do NOT stage or commit global `reports/*` files on `feat/CHG-*` branches** to prevent merge conflicts across parallel PRs).\n\n### Step 6: Human PR Sign-Off, Baseline Integration & Release Closure\n1. **Ready for Review & Feature Merge (`feat/CHG-*` \u2794 `main` or `release/vX.Y.Z`)**:\n - Update the Draft PR body with the Plan Execution Matrix (`[X]` vs `[O]`), KPI summary (`kpi_pr` including per-task rework metrics), and local verification/report summary (`reports/QUALITY_REPORT.md`, `reports/TRACEABILITY_MATRIX.md`, `reports/dashboard.html` inspected locally, without committing global `reports/*` to the feature PR), then run `gh pr ready` to mark the PR **Ready for Review** (triggering full CI verification) and present it to the human Tech Lead for review and approval (never auto-approve or auto-merge).\n2. **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 synchronizes the normative text and BDD Gherkin scenarios into `FR-*` / `UC-*` / `SEC-REQ-*` / `PRIV-REQ-*`, bumps minor SemVer when updating active specs, resyncs PDaC SHA-256 digests, promotes `FR-*` to `active`, links `CMP-*`, and archives the change under `specs/changes/completed/` (or `npx aisdlc sdd integrate --all` to consolidate all completed changes).\n3. **Semantic Versioning Promotion**:\n - **Profile-Driven SemVer Mapping**: Bump the version of the software under development according to the increment\'s friction profile:\n - `patch` -> bump **Patch** digit (`x.y.Z`)\n - `standard` -> bump **Minor** digit (`x.Y.0`)\n - `critical` -> bump **Major** digit (`X.0.0`)\n - **Highest-Precedence Consolidation (Multiple Pending Increments)**: When multiple pending increments exist in the active branch or release batch being integrated, apply **ONLY a single version bump corresponding to the highest rank** (`critical` / Major > `standard` / Minor > `patch` / Patch), ignoring unrelated historical directories.\n - Tag the merge with the computed SemVer bump (`patch`, `minor`, `major`) and refresh the interactive dashboard (`report_dashboard`).\n\n## Non-Negotiable Guardrails\n- **Clean Context Window Isolation per Specialist Agent (Cross-IDE)**: Never execute two distinct specialist roles (e.g., `agent-qa-engineer` and `agent-developer`, or `agent-developer` and `agent-adversary`) in the same conversation context window. In subagent-capable IDEs (Antigravity `invoke_subagent`, Claude Code `Task` / `.claude/agents/`, GitHub Copilot `@agent-*`), always spawn each specialist in a fresh isolated subagent context that reads state strictly from disk (`specs/`, `handoff.yaml`, `get_active_handoff`). In chat-based IDEs (Cursor, Windsurf, Aider), persist all artifacts to disk, emit the Workflow Handoff block, and instruct the user to open a **New Chat** (or `/clear`) before running the next specialist.\n- **2-Checkpoint Quality & Adversarial Protocol**: Enforce transversal quality and red-team checks exclusively at **Checkpoint 1 (Specification & Design)** and **Checkpoint 2 (Implementation & Pre-PR)**. Enforce the **Anti-Ping-Pong Guardrail**: maximum 2 correction rounds per checkpoint; if unresolved blocking defects persist, escalate to the Human Tech Lead.\n- **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.\n- **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`.'
|
|
18943
19128
|
}
|
|
18944
19129
|
];
|
|
18945
19130
|
function renderAntigravitySkillFile(skill) {
|
|
@@ -19078,52 +19263,33 @@ This file defines the operational rules and specialized role mappings for Google
|
|
|
19078
19263
|
- **Mandatory Regression Verification**: Never declare build, typecheck, or bug fixes complete without executing the relevant automated test suite (\`pnpm test\`, \`dotnet test\`) and confirming zero regressions.
|
|
19079
19264
|
- **Global Styles Protection**: When touching or refactoring frontend views, verify that global stylesheet/asset imports remain intact and that layouts suffer no visual disruption.
|
|
19080
19265
|
- **Skills-First Implementation Directive**: When authoring or refactoring code (especially frontend, UI, styling, accessibility, or framework-specific logic), proactively inspect and leverage available specialized agent skills (e.g., modern web guidance, accessibility a11y, DevTools, framework skills) to produce standard-compliant, modern implementations rather than guessing ad-hoc patterns.
|
|
19081
|
-
- Upon completing green implementation, suggest handoff to \`agent-expert-user\` for post-development functional validation prior to
|
|
19082
|
-
|
|
19083
|
-
### 7. \`agent-security-auditor\` (Adversarial Code Auditor)
|
|
19084
|
-
- **Mission**: Rigorously examine Pull Requests for business logic vulnerabilities, injection vectors, secret leaks, and authorization flaws as part of the Pre-Merge Audit Triad.
|
|
19085
|
-
- **Directives**:
|
|
19086
|
-
- Analyze code diffs with an attacker mindset and run \`pnpm run verify:security\`.
|
|
19087
|
-
- Issue findings with CVSS v3.1 severity scoring and block any PR introducing CRITICAL or HIGH security risks.
|
|
19088
|
-
|
|
19089
|
-
### 8. \`agent-compliance-checker\` (Open Source License Compliance Auditor)
|
|
19090
|
-
- **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.
|
|
19091
|
-
- **Directives**:
|
|
19092
|
-
- Verify SPDX identifiers via \`pnpm run verify:licenses\`, immediately blocking viral (\`GPL\`, \`AGPL\`) or unapproved commercial (\`BSL\`, \`SSPL\`) licenses.
|
|
19266
|
+
- Upon completing green implementation, suggest handoff to \`agent-expert-user\` for post-development functional validation prior to Checkpoint 2 (\`agent-auditor\` $\\parallel$ \`agent-adversary\` + \`agent-privacy-officer\`).
|
|
19093
19267
|
|
|
19094
|
-
###
|
|
19268
|
+
### 7. \`agent-expert-user\` (Expert User and Domain Evaluator)
|
|
19095
19269
|
- **Mission**: Contrast design and specifications (design phase) and functionally validate finished software against \`UC-*\` and \`FR-*\` (post-development phase).
|
|
19096
19270
|
- **Directives**:
|
|
19097
19271
|
- 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\`). Reject as \`[BLOCKING_DEFECT]\` any library-only MVP proposal for human actors that fails to define or omits the runnable presentation layer (Web, Desktop, or Console/CLI), role access, or master-data CRUD flows.
|
|
19098
|
-
- Functional validation mode (downstream / pre-PR / post-development functional validation): Thoroughly contrast interface and actual CLI execution against \`UC-*\` and \`FR-*\` acceptance criteria before
|
|
19099
|
-
- Emit handoff block suggesting \`agent-
|
|
19272
|
+
- Functional validation mode (downstream / pre-PR / post-development functional validation): Thoroughly contrast interface and actual CLI execution against \`UC-*\` and \`FR-*\` acceptance criteria before Checkpoint 2 audit.
|
|
19273
|
+
- Emit handoff block suggesting Checkpoint 2 (\`agent-auditor\` $\\parallel$ \`agent-adversary\` + \`agent-privacy-officer\`) if compliant, or return to \`agent-developer\` on functional drift.
|
|
19100
19274
|
|
|
19101
|
-
###
|
|
19102
|
-
- **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.
|
|
19103
|
-
- **Directives**:
|
|
19104
|
-
- Respect \`quality-policy.yaml\` thresholds: CC $\\le 10$, Cognitive $\\le 15$, MI $\\ge 50$, LOC $\\le 40$.
|
|
19105
|
-
- Detect improper coupling, code smells, magic numbers, ambiguous names, and encapsulation violations.
|
|
19106
|
-
- Flag premature abstractions and speculative code violating YAGNI.
|
|
19107
|
-
- Coordinate Pre-Merge Audit Triad with \`agent-security-auditor\`, \`agent-privacy-officer\`, and \`agent-compliance-checker\`.
|
|
19108
|
-
- Classify findings into: \`[BLOCKING]\` (quality violation or broken pattern), \`[CLEAN_CODE_SUGGESTION]\` (non-blocking improvement), and \`[COMPLIANT]\`.
|
|
19109
|
-
|
|
19110
|
-
### 11. \`agent-devops\` (Automation and Infrastructure Engineer)
|
|
19275
|
+
### 8. \`agent-devops\` (Automation and Infrastructure Engineer)
|
|
19111
19276
|
- **Mission**: Maintain, evolve, and audit automated project infrastructure: CI/CD workflows, Docker containers, IaC manifests, and support scripts.
|
|
19112
19277
|
- **Directives**:
|
|
19113
19278
|
- Strict infrastructure domain: Operates exclusively in \`.github/workflows/\`, \`Dockerfile*\`, \`docker-compose*.yml\`, IaC manifests, and \`scripts/\`.
|
|
19114
19279
|
- **NON-INVASION GUARDRAIL**: STRICTLY FORBIDDEN from modifying or refactoring application source code files (\`src/\`, \`packages/*/src/\`). Your responsibility is the pipeline and scaffolding, never application business logic.
|
|
19280
|
+
- **Deployment & CI/CD Strategy Discovery**: Before scaffolding new pipelines or containers, read \`ARCH-INTRO-001\` / \`ARCH-DEP-001\` and clarify packaging/CD destination, CI platform, and release trigger policy with the Tech Lead.
|
|
19115
19281
|
- Infrastructure dependency policy: Verify licenses of dependencies, base images, and third-party actions according to \`license-policy.yaml\`.
|
|
19116
19282
|
- Gate preservation: Ensure pipeline optimizations preserve all existing deterministic Quality Gates intact.
|
|
19117
19283
|
- **Cross-Workflow Audit**: When fixing any CI/CD or configuration defect detected in a PR, search all \`.github/workflows/*.yml\` for the same pattern (including release, post-merge, and publishing pipelines) before declaring the fix complete.
|
|
19118
19284
|
- **Remote Verification**: Creating a PR (\`gh pr create\`) does not equal success; actively verify that remote checks pass (\`gh pr checks\`).
|
|
19119
19285
|
|
|
19120
|
-
###
|
|
19121
|
-
- **Mission**: Polymorphically inspect deliverables from any specialist agent on demand,
|
|
19122
|
-
- **Directives**: Constructive critique; classify findings into \`[BLOCKING_DEFECT]\`, \`[SIMPLIFICATION]\`, and \`[ADVISORY]\`; non-invasive (never edit files directly); always return handoff to the audited agent (max 1 return round).
|
|
19286
|
+
### 9. \`agent-auditor\` (Transversal Quality and Improvement Auditor)
|
|
19287
|
+
- **Mission**: Polymorphically inspect deliverables from any specialist agent on demand, enforcing Clean Code, SOLID, DRY, Simplicity First (YAGNI), \`quality-policy.yaml\` AST thresholds, UI design standards, and \`license-policy.yaml\` SPDX compliance.
|
|
19288
|
+
- **Directives**: Constructive critique; block fake-wiring, unstyled interfaces, and manual \`.feature\` files; verify licenses via \`pnpm run verify:licenses\`; classify findings into \`[BLOCKING_DEFECT]\`, \`[SIMPLIFICATION]\`, and \`[ADVISORY]\`; non-invasive (never edit files directly); always return handoff to the audited agent (max 1 return round).
|
|
19123
19289
|
|
|
19124
|
-
###
|
|
19125
|
-
- **Mission**: Actively attempt to break, bypass, or invalidate deliverables from any target specialist agent,
|
|
19126
|
-
- **Directives**: Expose failure modes across Product (logic traps), Architecture (SPOF/races), QA (mutation testing/false greens),
|
|
19290
|
+
### 10. \`agent-adversary\` (Transversal Red Team and Chaos Adversary)
|
|
19291
|
+
- **Mission**: Actively attempt to break, bypass, or invalidate deliverables from any target specialist agent, including Pre-Merge / Checkpoint 2 security diff audits with CVSS v3.1 scoring and concrete proofs-of-concept (PoC).
|
|
19292
|
+
- **Directives**: Expose failure modes across Product (logic traps), Architecture (SPOF/races), QA (mutation testing/false greens), Development & Pre-Merge Security (boundary/concurrency, SAST/secrets via \`pnpm run verify:security\`, CVSS v3.1 blocking CRITICAL/HIGH), and DevOps (pipeline escape); mandatory proof-of-break; non-invasive; always return handoff to the audited agent (max 1 return round).
|
|
19127
19293
|
|
|
19128
19294
|
---
|
|
19129
19295
|
|
|
@@ -19144,7 +19310,7 @@ This file defines the operational rules and specialized role mappings for Google
|
|
|
19144
19310
|
- **Conditional Activation Rule by Autonomy**:
|
|
19145
19311
|
- \u{1F7E2} **\`AUTONOMOUS\`** (or exclusive final supervision in PR/CI): **OMITTED**. Do not request or emit interactive handoff to avoid interrupting unattended execution.
|
|
19146
19312
|
- \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**.
|
|
19147
|
-
- **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-
|
|
19313
|
+
- **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-devops\`, \`agent-auditor\`, \`agent-adversary\`, 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).
|
|
19148
19314
|
`;
|
|
19149
19315
|
var STARTER_CURSOR_CORE_RULES = `---
|
|
19150
19316
|
description: Global canonical directives, 5 unbreakable commandments, and AI-SDLC pre-flight
|
|
@@ -19186,13 +19352,10 @@ Before finalizing changes or proposing commits:
|
|
|
19186
19352
|
| \`agent-system-architect\` | Modular arc42 + NAF v4 architecture (\`CMP-*\`, Mermaid diagrams, \`ADR-*\`). |
|
|
19187
19353
|
| \`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. |
|
|
19188
19354
|
| \`agent-developer\` | Atomic tasks from \`tasks.md\`; respects autonomy mode; runs \`pnpm run check:fix\` + \`pnpm run verify:all\`. |
|
|
19189
|
-
| \`agent-security-auditor\` | Adversarial PR security audit, SAST, secrets, and CVSS v3.1 evaluation. |
|
|
19190
|
-
| \`agent-compliance-checker\` | SPDX license compliance audit against \`license-policy.yaml\`. |
|
|
19191
19355
|
| \`agent-expert-user\` | Bimodal MVP evaluation (design) and functional validation against \`UC-*\` and \`FR-*\` (pre-PR). |
|
|
19192
|
-
| \`agent-
|
|
19193
|
-
| \`agent-
|
|
19194
|
-
| \`agent-
|
|
19195
|
-
| \`agent-adversary\` | Transversal on-demand Red Team adversary; breaks deliverables with reproducible PoC & mutation tests; returns handoff to audited agent. |
|
|
19356
|
+
| \`agent-devops\` | CI/CD, Docker, IaC only \u2014 clarifies deployment/CI strategy; **FORBIDDEN** to touch \`src/\` or \`packages/*/src/\`. |
|
|
19357
|
+
| \`agent-auditor\` | Transversal auditor: YAGNI, Clean Code/SOLID/AST thresholds, UI standards, SPDX licenses (\`verify:licenses\`); returns handoff to audited agent. |
|
|
19358
|
+
| \`agent-adversary\` | Transversal Red Team adversary: PoC breaks, mutation testing & Pre-Merge security diff audit (\`verify:security\`, CVSS v3.1); returns handoff to audited agent. |
|
|
19196
19359
|
|
|
19197
19360
|
## 5. Task Autonomy Modes (\`tasks.md\`)
|
|
19198
19361
|
- \u{1F7E2} **\`AUTONOMOUS\`**: Low risk. Implement directly, omit handoff block.
|
|
@@ -19345,32 +19508,20 @@ npx tsx packages/cli/src/index.ts sdd integrate --change <chg-id>
|
|
|
19345
19508
|
- **Mission**: Implement atomic tasks from SDD specifications (\`tasks.md\`) with clean, strictly typed code and thorough tests.
|
|
19346
19509
|
- **Directives**: Execute the mandatory 4-step order: (1) Modular & Hexagonal Architecture (Ports & Adapters) 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\`. Enforce Mandatory Regression Verification (\`pnpm test\`) with zero regressions before declaring completion, and enforce Global Styles Protection on frontend views.
|
|
19347
19510
|
|
|
19348
|
-
### 7. \`agent-
|
|
19349
|
-
- **Mission**: Examine Pull Requests for business logic vulnerabilities, injection vectors, secret leaks, and authorization flaws as part of the Pre-Merge Audit Triad.
|
|
19350
|
-
- **Directives**: Run \`pnpm run verify:security\`, evaluate CVSS v3.1 severity, and block CRITICAL/HIGH risks.
|
|
19351
|
-
|
|
19352
|
-
### 8. \`agent-compliance-checker\` (Open Source License Compliance Auditor)
|
|
19353
|
-
- **Mission**: Audit dependency manifests against \`license-policy.yaml\` as part of the Pre-Merge Audit Triad.
|
|
19354
|
-
- **Directives**: Run \`pnpm run verify:licenses\`, blocking viral (\`GPL\`, \`AGPL\`) or unapproved commercial (\`BSL\`, \`SSPL\`) packages.
|
|
19355
|
-
|
|
19356
|
-
### 9. \`agent-expert-user\` (Expert User and Domain Evaluator)
|
|
19511
|
+
### 7. \`agent-expert-user\` (Expert User and Domain Evaluator)
|
|
19357
19512
|
- **Mission**: Contrast design and specifications (design phase) and functionally validate finished software against \`UC-*\` and \`FR-*\` (post-development functional validation phase).
|
|
19358
19513
|
|
|
19359
|
-
###
|
|
19360
|
-
- **Mission**:
|
|
19361
|
-
- **Findings classification**: \`[BLOCKING]\`, \`[CLEAN_CODE_SUGGESTION]\`, \`[COMPLIANT]\`.
|
|
19362
|
-
|
|
19363
|
-
### 11. \`agent-devops\` (Automation and Infrastructure Engineer)
|
|
19364
|
-
- **Mission**: Maintain, evolve, and audit automated project infrastructure: CI/CD workflows, Docker containers, IaC manifests, and support scripts.
|
|
19514
|
+
### 8. \`agent-devops\` (Automation and Infrastructure Engineer)
|
|
19515
|
+
- **Mission**: Maintain, evolve, and audit automated project infrastructure: CI/CD workflows, Docker containers, IaC manifests, and support scripts. Clarifies packaging/CD strategy against \`ARCH-INTRO-001\` / \`ARCH-DEP-001\`.
|
|
19365
19516
|
- **NON-INVASION GUARDRAIL**: STRICTLY FORBIDDEN from modifying application source code (\`src/\`, \`packages/*/src/\`).
|
|
19366
19517
|
|
|
19367
|
-
###
|
|
19368
|
-
- **Mission**: Polymorphically inspect deliverables from any specialist agent on demand,
|
|
19518
|
+
### 9. \`agent-auditor\` (Transversal Quality and Improvement Auditor)
|
|
19519
|
+
- **Mission**: Polymorphically inspect deliverables from any specialist agent on demand, enforcing Clean Code, SOLID, DRY, YAGNI, \`quality-policy.yaml\` AST thresholds, UI design standards, and \`license-policy.yaml\` SPDX compliance (\`pnpm run verify:licenses\`).
|
|
19369
19520
|
- **Directives**: Constructive critique; classify findings into \`[BLOCKING_DEFECT]\`, \`[SIMPLIFICATION]\`, and \`[ADVISORY]\`; non-invasive (never edit files directly); always return handoff to the audited agent (max 1 return round).
|
|
19370
19521
|
|
|
19371
|
-
###
|
|
19372
|
-
- **Mission**: Actively attempt to break, bypass, or invalidate deliverables from any target specialist agent, providing concrete proofs-of-concept (PoC), counterexamples, and reproduction steps.
|
|
19373
|
-
- **Directives**: Expose failure modes across Product (logic traps), Architecture (SPOF/races), QA (mutation testing/false greens),
|
|
19522
|
+
### 10. \`agent-adversary\` (Transversal Red Team and Chaos Adversary)
|
|
19523
|
+
- **Mission**: Actively attempt to break, bypass, or invalidate deliverables from any target specialist agent, including Pre-Merge / Checkpoint 2 security diff audits (\`pnpm run verify:security\`, CVSS v3.1), providing concrete proofs-of-concept (PoC), counterexamples, and reproduction steps.
|
|
19524
|
+
- **Directives**: Expose failure modes across Product (logic traps), Architecture (SPOF/races), QA (mutation testing/false greens), Development & Pre-Merge Security (boundary/concurrency, CVSS v3.1), and DevOps (pipeline escape); mandatory proof-of-break; non-invasive; always return handoff to the audited agent (max 1 return round).
|
|
19374
19525
|
|
|
19375
19526
|
---
|
|
19376
19527
|
|
|
@@ -19487,7 +19638,7 @@ Non-Negotiable Quality Thresholds (\`quality-policy.yaml\`):
|
|
|
19487
19638
|
- **Conditional Activation**:
|
|
19488
19639
|
* \u{1F7E2} **\`AUTONOMOUS\` Mode** (or PR/CI final supervision): **OMITTED**. Do not interrupt unattended execution.
|
|
19489
19640
|
* \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**.
|
|
19490
|
-
- **Components**: Declare completed deliverables, recommend next roles (\`agent-threat-modeler\`, \`agent-privacy-officer\`, \`agent-system-architect\`, \`agent-developer\`, \`agent-
|
|
19641
|
+
- **Components**: Declare completed deliverables, recommend next roles (\`agent-threat-modeler\`, \`agent-privacy-officer\`, \`agent-system-architect\`, \`agent-developer\`, \`agent-devops\`, \`agent-auditor\`, \`agent-adversary\`), 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).
|
|
19491
19642
|
|
|
19492
19643
|
---
|
|
19493
19644
|
|
|
@@ -19495,19 +19646,16 @@ Non-Negotiable Quality Thresholds (\`quality-policy.yaml\`):
|
|
|
19495
19646
|
|
|
19496
19647
|
| Role | Mission (summary) |
|
|
19497
19648
|
| :--- | :--- |
|
|
19498
|
-
| \`agent-product-analyst\` | Phase 0 NAF v4 Enterprise & Capability Vision (\`ARCH-INTRO-*\`, up to 15-question discovery interview defining UI modality & CRUD prerequisites) + ProductShape artifacts (\`ACT-*\`, \`UC-*\`, \`FR-*\`, \`QR-*\`, \`BR-*\`); \`status\` starts \`draft\`. |
|
|
19649
|
+
| \`agent-product-analyst\` | Phase 0 NAF v4 Enterprise & Capability Vision (\`ARCH-INTRO-*\`, up to 15-question discovery interview defining UI modality, delivery model & CRUD prerequisites) + ProductShape artifacts (\`ACT-*\`, \`UC-*\`, \`FR-*\`, \`QR-*\`, \`BR-*\`); \`status\` starts \`draft\`. |
|
|
19499
19650
|
| \`agent-threat-modeler\` | STRIDE/OWASP threat triad (\`ACT-THREAT-*\`, \`ABUSE-*\`, \`SEC-REQ-*\`); hands off to \`agent-privacy-officer\`. |
|
|
19500
19651
|
| \`agent-privacy-officer\` | LINDDUN & GDPR/LOPDGDD privacy triad (\`DATA-ASSET-*\`, \`PRIV-ROPA-*\`, \`PRIV-REQ-*\`) + Pre-Merge \`verify:privacy\`. |
|
|
19501
|
-
| \`agent-system-architect\` | Modular arc42 + NAF v4 architecture (\`CMP-*\`, Mermaid diagrams, \`ADR-*\`). |
|
|
19652
|
+
| \`agent-system-architect\` | Modular arc42 + NAF v4 architecture (\`CMP-*\`, \`ARCH-DEP-001\`, Mermaid diagrams, \`ADR-*\`). |
|
|
19502
19653
|
| \`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. |
|
|
19503
19654
|
| \`agent-developer\` | Atomic tasks from \`tasks.md\`; autonomy mode must be respected; runs \`pnpm run check:fix\` + \`pnpm run verify:all\`. |
|
|
19504
|
-
| \`agent-security-auditor\` | Adversarial PR security audit, SAST, secrets, and CVSS v3.1 evaluation. |
|
|
19505
|
-
| \`agent-compliance-checker\` | SPDX license compliance audit against \`license-policy.yaml\`. |
|
|
19506
19655
|
| \`agent-expert-user\` | Bimodal MVP evaluation (design) and functional validation against \`UC-*\` and \`FR-*\` (pre-PR). |
|
|
19507
|
-
| \`agent-
|
|
19508
|
-
| \`agent-
|
|
19509
|
-
| \`agent-
|
|
19510
|
-
| \`agent-adversary\` | Transversal on-demand Red Team adversary; breaks deliverables with reproducible PoC & mutation tests; returns handoff to audited agent. |
|
|
19656
|
+
| \`agent-devops\` | CI/CD, Docker, IaC only \u2014 clarifies deployment/CI strategy; **FORBIDDEN** to touch \`src/\` or \`packages/*/src/\`. |
|
|
19657
|
+
| \`agent-auditor\` | Transversal auditor: YAGNI, Clean Code/SOLID/AST thresholds, UI standards, SPDX licenses (\`verify:licenses\`); returns handoff to audited agent. |
|
|
19658
|
+
| \`agent-adversary\` | Transversal Red Team adversary: PoC breaks, mutation testing & Pre-Merge security diff audit (\`verify:security\`, CVSS v3.1); returns handoff to audited agent. |
|
|
19511
19659
|
|
|
19512
19660
|
---
|
|
19513
19661
|
|
|
@@ -19812,10 +19960,11 @@ Specifies exchange schemas and canonical interfaces:
|
|
|
19812
19960
|
|
|
19813
19961
|
---
|
|
19814
19962
|
|
|
19815
|
-
## 3. Observability,
|
|
19816
|
-
- **Distributed Tracing**: W3C Trace Context (\`traceparent\`) injection via OpenTelemetry.
|
|
19817
|
-
- **Operational Metrics**: Prometheus RED metrics exposition (Rate, Errors, Duration).
|
|
19818
|
-
- **Structured Logging**: Deterministic
|
|
19963
|
+
## 3. Observability, Persistent Telemetry, and Immutable Auditing
|
|
19964
|
+
- **Distributed Tracing**: W3C Trace Context (\`traceparent\`) injection via OpenTelemetry with persistent span export (\`.observability/traces/traces.otlp.jsonl\`).
|
|
19965
|
+
- **Operational Metrics**: Prometheus RED metrics exposition (Rate, Errors, Duration) with periodic local snapshots (\`.observability/metrics/metrics.prom\`) for offline backfill and optional Grafana dashboards.
|
|
19966
|
+
- **Structured Logging**: Deterministic JSONL format with mandatory fields (\`timestamp\`, \`level\`, \`trace_id\`, \`component_id\`), PII redaction, and rolling local persistence (\`OBS_STORAGE_PATH\`).
|
|
19967
|
+
- **Offline Export & Shutdown Flush**: Guaranteed \`ITelemetryStore.flush()\` on process exit and \`ITelemetryExporter\` supporting JSONL, CSV, OpenMetrics, and OTLP exports without requiring a live collector.
|
|
19819
19968
|
|
|
19820
19969
|
---
|
|
19821
19970
|
|
|
@@ -20563,10 +20712,15 @@ pipelines:\r
|
|
|
20563
20712
|
- step: *build-and-verify\r
|
|
20564
20713
|
- step: *sdd-integrate\r
|
|
20565
20714
|
`;
|
|
20566
|
-
var
|
|
20715
|
+
var STARTER_TEMPLATES_CI_DOCKER_COMPOSE_OBSERVABILITY_YML = '# ==============================================================================\n# AI-SDLC: Optional Local & Post-Mortem Observability Stack\n# Provides Prometheus (Apache-2.0) and Grafana (isolated optional UI container)\n# mounting local persistent telemetry stored under ./.observability/\n#\n# Usage:\n# docker compose -f templates/ci/docker-compose.observability.yml up -d\n# ==============================================================================\nservices:\n prometheus:\n image: prom/prometheus:v2.54.1\n container_name: aisdlc-prometheus\n command:\n - "--config.file=/etc/prometheus/prometheus.yml"\n - "--storage.tsdb.path=/prometheus"\n - "--storage.tsdb.retention.time=30d"\n - "--web.enable-admin-api"\n ports:\n - "9090:9090"\n volumes:\n - ./observability/prometheus.yml:/etc/prometheus/prometheus.yml:ro\n - ../../.observability:/observability:ro\n - prometheus_data:/prometheus\n extra_hosts:\n - "host.docker.internal:host-gateway"\n restart: unless-stopped\n\n grafana:\n image: grafana/grafana:11.2.2\n container_name: aisdlc-grafana\n ports:\n - "3000:3000"\n environment:\n - GF_SECURITY_ADMIN_USER=${GRAFANA_ADMIN_USER:-admin}\n - GF_SECURITY_ADMIN_PASSWORD=${GRAFANA_ADMIN_PASSWORD:-admin}\n - GF_USERS_ALLOW_SIGN_UP=false\n volumes:\n - ./observability/grafana-datasources.yml:/etc/grafana/provisioning/datasources/datasources.yml:ro\n - ../../.observability:/observability:ro\n - grafana_data:/var/lib/grafana\n depends_on:\n - prometheus\n restart: unless-stopped\n\nvolumes:\n prometheus_data:\n grafana_data:\n';
|
|
20716
|
+
var STARTER_TEMPLATES_CI_GITHUB_WORKFLOWS_CI_YML = "name: CI - AI-SDLC Quality Gates & Testing\r\n\r\non:\r\n push:\r\n branches: [ main ]\r\n pull_request:\r\n branches: [ main ]\r\n types: [ opened, synchronize, reopened, ready_for_review ]\r\n\r\njobs:\r\n verify-and-test:\r\n if: github.event_name != 'pull_request' || github.event.pull_request.draft == false\r\n runs-on: ubuntu-latest\r\n strategy:\r\n matrix:\r\n node-version: [ 20.x, 22.x ]\r\n\r\n steps:\r\n - name: Checkout Code\r\n uses: actions/checkout@v4\r\n\r\n - name: Install pnpm\r\n uses: pnpm/action-setup@v4\r\n with:\r\n version: 10\r\n\r\n - name: Setup Node.js ${{ matrix.node-version }}\r\n uses: actions/setup-node@v4\r\n with:\r\n node-version: ${{ matrix.node-version }}\r\n\r\n - name: Install Dependencies\r\n run: |\r\n pnpm install --frozen-lockfile\r\n pnpm approve-builds --all\r\n\r\n - name: Build Packages\r\n run: pnpm run build\r\n\r\n - name: Run Vitest Unit & Integration Suites\r\n run: pnpm test\r\n\r\n - name: AI-SDLC Quality Gate & Full Verification\r\n run: npx @aisdlc/cli verify all\r\n";
|
|
20567
20717
|
var STARTER_TEMPLATES_CI_GITHUB_WORKFLOWS_DEPLOY_DASHBOARD_YML = 'name: Deploy AI-SDLC Dashboard to GitHub Pages\r\n\r\non:\r\n push:\r\n branches:\r\n - main\r\n workflow_dispatch:\r\n\r\npermissions:\r\n contents: read\r\n pages: write\r\n id-token: write\r\n\r\nconcurrency:\r\n group: pages\r\n cancel-in-progress: false\r\n\r\njobs:\r\n deploy-dashboard:\r\n name: Build & Publish Interactive Dashboard\r\n runs-on: ubuntu-latest\r\n environment:\r\n name: github-pages\r\n url: ${{ steps.deployment.outputs.page_url }}\r\n\r\n steps:\r\n - name: Checkout Code\r\n uses: actions/checkout@v4\r\n with:\r\n fetch-depth: 0 # Full git history required for historical KPIs and telemetry\r\n\r\n - name: Setup Node.js\r\n uses: actions/setup-node@v4\r\n with:\r\n node-version: 20\r\n\r\n - name: Generate AI-SDLC Interactive Dashboard\r\n run: |\r\n mkdir -p reports\r\n npx --yes @aisdlc/cli report dashboard --output reports/index.html\r\n cp reports/index.html reports/dashboard.html\r\n touch reports/.nojekyll\r\n\r\n - name: Setup GitHub Pages\r\n uses: actions/configure-pages@v5\r\n\r\n - name: Upload Pages Artifact\r\n uses: actions/upload-pages-artifact@v3\r\n with:\r\n path: reports\r\n\r\n - name: Deploy to GitHub Pages\r\n id: deployment\r\n uses: actions/deploy-pages@v4\r\n\r\n - name: Emit Summary to GitHub Actions\r\n if: always() && steps.deployment.outcome == \'success\'\r\n run: |\r\n echo "### \u{1F310} AI-SDLC Interactive Dashboard Published" >> $GITHUB_STEP_SUMMARY\r\n echo "" >> $GITHUB_STEP_SUMMARY\r\n echo "The interactive PDaC / RTM graph, Quality Gate telemetry, and release metrics are live at:" >> $GITHUB_STEP_SUMMARY\r\n echo "" >> $GITHUB_STEP_SUMMARY\r\n echo "\u{1F449} **[Open Live Dashboard](${{ steps.deployment.outputs.page_url }})**" >> $GITHUB_STEP_SUMMARY\r\n';
|
|
20568
|
-
var STARTER_TEMPLATES_CI_GITHUB_WORKFLOWS_PR_KPI_SUMMARY_YML = "name: AI-SDLC PR KPI Aggregator\r\n\r\non:\r\n pull_request:\r\n types: [opened, synchronize, reopened]\r\n\r\npermissions:\r\n contents: read\r\n pull-requests: write\r\n\r\njobs:\r\n aggregate-kpis:\r\n name: Aggregate PR KPIs & Telemetry\r\n runs-on: ubuntu-latest\r\n\r\n steps:\r\n - name: Checkout Repository\r\n uses: actions/checkout@v4\r\n with:\r\n fetch-depth: 0\r\n\r\n - name: Install pnpm\r\n uses: pnpm/action-setup@v4\r\n with:\r\n version: 10\r\n\r\n - name: Setup Node.js\r\n uses: actions/setup-node@v4\r\n with:\r\n node-version: 20\r\n\r\n - name: Install Dependencies\r\n run: |\r\n pnpm install --frozen-lockfile\r\n\r\n - name: Calculate and Emit PR KPIs\r\n id: kpi\r\n run: |\r\n npx @aisdlc/cli kpi pr --base origin/${{ github.base_ref }} --head HEAD >> $GITHUB_STEP_SUMMARY\r\n";
|
|
20718
|
+
var STARTER_TEMPLATES_CI_GITHUB_WORKFLOWS_PR_KPI_SUMMARY_YML = "name: AI-SDLC PR KPI Aggregator\r\n\r\non:\r\n pull_request:\r\n types: [opened, synchronize, reopened, ready_for_review]\r\n\r\npermissions:\r\n contents: read\r\n pull-requests: write\r\n\r\njobs:\r\n aggregate-kpis:\r\n if: github.event.pull_request.draft == false\r\n name: Aggregate PR KPIs & Telemetry\r\n runs-on: ubuntu-latest\r\n\r\n steps:\r\n - name: Checkout Repository\r\n uses: actions/checkout@v4\r\n with:\r\n fetch-depth: 0\r\n\r\n - name: Install pnpm\r\n uses: pnpm/action-setup@v4\r\n with:\r\n version: 10\r\n\r\n - name: Setup Node.js\r\n uses: actions/setup-node@v4\r\n with:\r\n node-version: 20\r\n\r\n - name: Install Dependencies\r\n run: |\r\n pnpm install --frozen-lockfile\r\n\r\n - name: Calculate and Emit PR KPIs\r\n id: kpi\r\n run: |\r\n npx @aisdlc/cli kpi pr --base origin/${{ github.base_ref }} --head HEAD >> $GITHUB_STEP_SUMMARY\r\n";
|
|
20569
20719
|
var STARTER_TEMPLATES_CI_GITHUB_WORKFLOWS_SDD_INTEGRATE_ON_MERGE_YML = 'name: SDD Canonical Integration on Merge\r\n\r\non:\r\n pull_request:\r\n types: [closed]\r\n branches:\r\n - main\r\n - \'release/**\'\r\n workflow_dispatch:\r\n inputs:\r\n change_id:\r\n description: \'SDD change ID to integrate manually (e.g. chg-001-telemetry)\'\r\n required: false\r\n type: string\r\n\r\npermissions:\r\n contents: write\r\n pull-requests: read\r\n\r\nconcurrency:\r\n group: sdd-integrate-${{ github.event.pull_request.base.ref || github.ref_name }}\r\n cancel-in-progress: false\r\n\r\njobs:\r\n integrate-sdd:\r\n name: SDD Canonical Integration\r\n if: github.event.pull_request.merged == true || github.event_name == \'workflow_dispatch\'\r\n runs-on: ubuntu-latest\r\n\r\n steps:\r\n - name: Checkout Repository\r\n uses: actions/checkout@v4\r\n with:\r\n ref: ${{ github.event.pull_request.base.ref || github.ref_name }}\r\n fetch-depth: 0\r\n token: ${{ secrets.GITHUB_TOKEN }}\r\n\r\n - name: Install pnpm\r\n uses: pnpm/action-setup@v4\r\n with:\r\n version: 10\r\n\r\n - name: Setup Node.js\r\n uses: actions/setup-node@v4\r\n with:\r\n node-version: 20\r\n\r\n - name: Install Dependencies\r\n run: |\r\n pnpm install --frozen-lockfile\r\n pnpm approve-builds --all\r\n\r\n - name: Build Packages\r\n run: pnpm run build\r\n\r\n - name: Detect and Integrate SDD Change\r\n id: integrate\r\n env:\r\n PR_HEAD_REF: ${{ github.event.pull_request.head.ref }}\r\n PR_TITLE: ${{ github.event.pull_request.title }}\r\n PR_BODY: ${{ github.event.pull_request.body }}\r\n MANUAL_CHANGE_ID: ${{ github.event.inputs.change_id }}\r\n run: |\r\n npx @aisdlc/cli sdd integrate --auto || true\r\n\r\n - name: Commit and Push Canonical Baseline Changes\r\n run: |\r\n git config user.name "github-actions[bot]"\r\n git config user.email "github-actions[bot]@users.noreply.github.com"\r\n git add -A\r\n if ! git diff --cached --quiet; then\r\n git commit -m "chore(sdd): integrate changes into canonical baseline [skip ci]"\r\n TARGET_BRANCH="${{ github.event.pull_request.base.ref || github.ref_name }}"\r\n MAX_RETRIES=3\r\n RETRY_COUNT=0\r\n DELAY=2\r\n\r\n while [ $RETRY_COUNT -lt $MAX_RETRIES ]; do\r\n echo "Synchronizing with remote branch $TARGET_BRANCH (pull --rebase)..."\r\n git pull --rebase origin "$TARGET_BRANCH"\r\n if git push origin "$TARGET_BRANCH"; then\r\n echo "\u2714 Canonical integration committed and synchronized to repository."\r\n exit 0\r\n fi\r\n RETRY_COUNT=$((RETRY_COUNT + 1))\r\n if [ $RETRY_COUNT -lt $MAX_RETRIES ]; then\r\n echo "\u26A0 Push rejected (concurrency detected). Retrying in ${DELAY}s (attempt $RETRY_COUNT/$MAX_RETRIES)..."\r\n sleep $DELAY\r\n DELAY=$((DELAY * 2))\r\n fi\r\n done\r\n\r\n echo "\u274C Error: Failed to push canonical integration after $MAX_RETRIES attempts."\r\n exit 1\r\n else\r\n echo "\u2139 No pending changes generated in working tree."\r\n fi\r\n';
|
|
20720
|
+
var STARTER_TEMPLATES_CI_OBSERVABILITY_GRAFANA_DATASOURCES_YML = "# ==============================================================================\n# AI-SDLC: Grafana Pre-Provisioned Datasources\n# ==============================================================================\napiVersion: 1\n\ndatasources:\n - name: Prometheus\n type: prometheus\n access: proxy\n url: http://prometheus:9090\n isDefault: true\n editable: true\n";
|
|
20721
|
+
var STARTER_TEMPLATES_CI_OBSERVABILITY_PROMETHEUS_YML = '# ==============================================================================\n# AI-SDLC: Prometheus Configuration (Live Scraping + Persistent TSDB)\n# For offline/post-mortem backfill from OpenMetrics snapshots:\n# docker exec aisdlc-prometheus promtool tsdb create-blocks-from openmetrics /observability/metrics/metrics.prom /prometheus\n# ==============================================================================\nglobal:\n scrape_interval: 15s\n evaluation_interval: 15s\n\nscrape_configs:\n - job_name: "prometheus"\n static_configs:\n - targets: ["localhost:9090"]\n\n - job_name: "app-runtime"\n metrics_path: "/metrics"\n static_configs:\n - targets: ["host.docker.internal:9464"]\n';
|
|
20722
|
+
var STARTER_TEMPLATES_CODING_RULES_GO__GOLANGCI_YML = '# AI-SDLC: Immutable Go & Testing Linter Guardrails\nrun:\n tests: true\n\nissues:\n max-issues-per-linter: 0\n max-same-issues: 0\n\nlinters:\n enable:\n - errcheck\n - govet\n - staticcheck\n - unused\n - ineffassign\n - testifylint\n - thelper\n - forbidigo\n\nlinters-settings:\n testifylint:\n enable-all: true\n forbidigo:\n analyze-types: true\n forbid:\n - p: ^testing\\.T\\.Skip.*$\n msg: "Skipping unit tests with t.Skip() is forbidden by AI-SDLC."\n';
|
|
20723
|
+
var STARTER_TEMPLATES_CODING_RULES_KOTLIN_DETEKT_YML = "# AI-SDLC: Immutable Detekt Rules for Kotlin & Unit Tests\nbuild:\n maxIssues: 0\n\npotential-bugs:\n active: true\n IgnoredReturnValue:\n active: true\n UnreachableCode:\n active: true\n\nexceptions:\n active: true\n SwallowedException:\n active: true\n EmptyCatchBlock:\n active: true\n\nstyle:\n active: true\n ForbiddenAnnotation:\n active: true\n annotations:\n - 'org.junit.jupiter.api.Disabled'\n - 'org.junit.Ignore'\n - 'kotlin.test.Ignore'\n";
|
|
20570
20724
|
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';
|
|
20571
20725
|
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\n5. **Step 5: Sigstore / Cosign Signature and SLSA Provenance Verification**\r\n ```bash\r\n # Verify npm package provenance from registry\r\n npm audit signatures\r\n\r\n # Verify package tarball with Sigstore / Cosign (Keyless via OIDC identity)\r\n cosign verify-blob \\\r\n --bundle release-artifacts/package.tgz.bundle \\\r\n --certificate-identity-regexp "^https://github.com/organization/repo-name/.*$" \\\r\n --certificate-oidc-issuer "https://token.actions.githubusercontent.com" \\\r\n release-artifacts/package.tgz\r\n\r\n # Verify SLSA Build Provenance Attestation using GitHub CLI\r\n gh attestation verify release-artifacts/package.tgz --repo organization/repo-name\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 & SLSA** | `cosign verify-blob` / `gh attestation verify` | Valid signature and SLSA provenance from GitHub Actions OIDC | **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';
|
|
20572
20726
|
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';
|
|
@@ -20634,10 +20788,15 @@ var STARTER_BASE_TEMPLATES = [
|
|
|
20634
20788
|
{ relPath: "templates/ci/.gitlab-ci.yml", content: STARTER_TEMPLATES_CI__GITLAB_CI_YML },
|
|
20635
20789
|
{ relPath: "templates/ci/azure-pipelines.yml", content: STARTER_TEMPLATES_CI_AZURE_PIPELINES_YML },
|
|
20636
20790
|
{ relPath: "templates/ci/bitbucket-pipelines.yml", content: STARTER_TEMPLATES_CI_BITBUCKET_PIPELINES_YML },
|
|
20791
|
+
{ relPath: "templates/ci/docker-compose.observability.yml", content: STARTER_TEMPLATES_CI_DOCKER_COMPOSE_OBSERVABILITY_YML },
|
|
20637
20792
|
{ relPath: "templates/ci/github-workflows/ci.yml", content: STARTER_TEMPLATES_CI_GITHUB_WORKFLOWS_CI_YML },
|
|
20638
20793
|
{ relPath: "templates/ci/github-workflows/deploy-dashboard.yml", content: STARTER_TEMPLATES_CI_GITHUB_WORKFLOWS_DEPLOY_DASHBOARD_YML },
|
|
20639
20794
|
{ relPath: "templates/ci/github-workflows/pr-kpi-summary.yml", content: STARTER_TEMPLATES_CI_GITHUB_WORKFLOWS_PR_KPI_SUMMARY_YML },
|
|
20640
20795
|
{ relPath: "templates/ci/github-workflows/sdd-integrate-on-merge.yml", content: STARTER_TEMPLATES_CI_GITHUB_WORKFLOWS_SDD_INTEGRATE_ON_MERGE_YML },
|
|
20796
|
+
{ relPath: "templates/ci/observability/grafana-datasources.yml", content: STARTER_TEMPLATES_CI_OBSERVABILITY_GRAFANA_DATASOURCES_YML },
|
|
20797
|
+
{ relPath: "templates/ci/observability/prometheus.yml", content: STARTER_TEMPLATES_CI_OBSERVABILITY_PROMETHEUS_YML },
|
|
20798
|
+
{ relPath: "templates/coding-rules/go/.golangci.yml", content: STARTER_TEMPLATES_CODING_RULES_GO__GOLANGCI_YML },
|
|
20799
|
+
{ relPath: "templates/coding-rules/kotlin/detekt.yml", content: STARTER_TEMPLATES_CODING_RULES_KOTLIN_DETEKT_YML },
|
|
20641
20800
|
{ relPath: "templates/compliance/commercial-acquisition-request.template.md", content: STARTER_TEMPLATES_COMPLIANCE_COMMERCIAL_ACQUISITION_REQUEST_TEMPLATE_MD },
|
|
20642
20801
|
{ relPath: "templates/manuals/production-manual.template.md", content: STARTER_TEMPLATES_MANUALS_PRODUCTION_MANUAL_TEMPLATE_MD },
|
|
20643
20802
|
{ relPath: "templates/manuals/user-manual.template.md", content: STARTER_TEMPLATES_MANUALS_USER_MANUAL_TEMPLATE_MD },
|
|
@@ -20923,12 +21082,14 @@ require('../../scripts/guard-branch.cjs');
|
|
|
20923
21082
|
`;
|
|
20924
21083
|
var STARTER_GUARD_BRANCH_CJS = `#!/usr/bin/env node
|
|
20925
21084
|
/**
|
|
20926
|
-
* AI-SDLC: Antigravity PreToolUse Branch &
|
|
21085
|
+
* AI-SDLC: Antigravity PreToolUse Branch, Coding Rules & SDD Increment Guard Hook
|
|
20927
21086
|
* 1. Prevents AI agents from modifying or writing files directly on protected branches (main, master, release/*).
|
|
20928
21087
|
* 2. Prevents AI agents from modifying or weakening deployed coding rules files once created.
|
|
21088
|
+
* 3. Enforces an active SDD increment in specs/changes/active/ before modifying source, test, or Anti-Bypass paths.
|
|
20929
21089
|
*/
|
|
20930
21090
|
|
|
20931
21091
|
const { execSync } = require('child_process');
|
|
21092
|
+
const fs = require('fs');
|
|
20932
21093
|
const path = require('path');
|
|
20933
21094
|
|
|
20934
21095
|
const PROTECTED_CODING_RULES_FILES = [
|
|
@@ -20946,6 +21107,25 @@ const PROTECTED_CODING_RULES_FILES = [
|
|
|
20946
21107
|
'.github/CODEOWNERS',
|
|
20947
21108
|
];
|
|
20948
21109
|
|
|
21110
|
+
const PROTECTED_BYPASS_PATTERNS = [
|
|
21111
|
+
/^schemas\\//i,
|
|
21112
|
+
/^examples\\/security\\//i,
|
|
21113
|
+
/^specs\\/security\\//i,
|
|
21114
|
+
/^specs\\/privacy\\//i,
|
|
21115
|
+
/^packages\\/security\\//i,
|
|
21116
|
+
/enclaves?\\//i,
|
|
21117
|
+
/SEC-ENC-/,
|
|
21118
|
+
/quality-policy\\.ya?ml$/i,
|
|
21119
|
+
/license-policy\\.ya?ml$/i,
|
|
21120
|
+
/privacy-policy\\.ya?ml$/i,
|
|
21121
|
+
/08_security_concept\\.md$/i,
|
|
21122
|
+
/09_decisions\\//i,
|
|
21123
|
+
/migrations?\\//i,
|
|
21124
|
+
/^\\.github\\/CODEOWNERS$/,
|
|
21125
|
+
];
|
|
21126
|
+
|
|
21127
|
+
const STANDARD_SDD_ARTIFACTS = ['spec.md', 'design.md', 'tasks.md', 'handoff.yaml'];
|
|
21128
|
+
|
|
20949
21129
|
function getWorkingBranch(cwd) {
|
|
20950
21130
|
try {
|
|
20951
21131
|
const sym = execSync('git symbolic-ref --short HEAD', {
|
|
@@ -20970,18 +21150,134 @@ function getWorkingBranch(cwd) {
|
|
|
20970
21150
|
function isProtectedCodingRulesTarget(targetPath, cwd) {
|
|
20971
21151
|
if (!targetPath) return false;
|
|
20972
21152
|
const resolved = path.resolve(cwd, targetPath);
|
|
20973
|
-
|
|
20974
21153
|
const norm = resolved.replace(/\\\\/g, '/');
|
|
20975
21154
|
const rel = path.relative(cwd, resolved).replace(/\\\\/g, '/');
|
|
20976
|
-
return
|
|
20977
|
-
|
|
20978
|
-
|
|
21155
|
+
return (
|
|
21156
|
+
PROTECTED_CODING_RULES_FILES.some(
|
|
21157
|
+
(ruleFile) => rel === ruleFile || norm.endsWith('/' + ruleFile)
|
|
21158
|
+
) || rel.startsWith('templates/coding-rules/')
|
|
21159
|
+
);
|
|
21160
|
+
}
|
|
21161
|
+
|
|
21162
|
+
function isSourceOrTestTarget(relPath) {
|
|
21163
|
+
if (!relPath) return false;
|
|
21164
|
+
return /^(src|lib|packages|tests)\\//.test(relPath.replace(/\\\\/g, '/'));
|
|
21165
|
+
}
|
|
21166
|
+
|
|
21167
|
+
function isProtectedBypassPath(relPath) {
|
|
21168
|
+
if (!relPath) return false;
|
|
21169
|
+
const norm = relPath.replace(/\\\\/g, '/');
|
|
21170
|
+
return PROTECTED_BYPASS_PATTERNS.some((re) => re.test(norm));
|
|
21171
|
+
}
|
|
21172
|
+
|
|
21173
|
+
function detectChangeDirProfile(changeDir) {
|
|
21174
|
+
for (const fileName of ['spec.md', 'proposal.md', 'handoff.yaml']) {
|
|
21175
|
+
const fullPath = path.join(changeDir, fileName);
|
|
21176
|
+
if (!fs.existsSync(fullPath)) continue;
|
|
21177
|
+
try {
|
|
21178
|
+
const content = fs.readFileSync(fullPath, 'utf-8');
|
|
21179
|
+
const match = content.match(/^\\s*profile:\\s*['"]?(patch|standard|critical)['"]?\\s*$/m);
|
|
21180
|
+
if (match) return match[1];
|
|
21181
|
+
} catch {}
|
|
21182
|
+
}
|
|
21183
|
+
return 'standard';
|
|
21184
|
+
}
|
|
21185
|
+
|
|
21186
|
+
function extractBranchChangePrefix(branch) {
|
|
21187
|
+
if (!branch) return '';
|
|
21188
|
+
const match = String(branch).match(/((?:chg|patch)-\\d+)/i);
|
|
21189
|
+
return match ? match[1].toLowerCase() : '';
|
|
21190
|
+
}
|
|
21191
|
+
|
|
21192
|
+
function matchesBranchPrefix(dirName, branchPrefix) {
|
|
21193
|
+
if (!branchPrefix) return true;
|
|
21194
|
+
const lower = dirName.toLowerCase();
|
|
21195
|
+
return lower === branchPrefix || lower.startsWith(branchPrefix + '-');
|
|
21196
|
+
}
|
|
21197
|
+
|
|
21198
|
+
function listActiveChangeDirs(activeRoot, branchPrefix) {
|
|
21199
|
+
if (!fs.existsSync(activeRoot)) return [];
|
|
21200
|
+
try {
|
|
21201
|
+
return fs
|
|
21202
|
+
.readdirSync(activeRoot, { withFileTypes: true })
|
|
21203
|
+
.filter((entry) => entry.isDirectory() && matchesBranchPrefix(entry.name, branchPrefix))
|
|
21204
|
+
.map((entry) => path.join(activeRoot, entry.name));
|
|
21205
|
+
} catch {
|
|
21206
|
+
return [];
|
|
21207
|
+
}
|
|
21208
|
+
}
|
|
21209
|
+
|
|
21210
|
+
function isSatisfiedChangeDir(changeDir, requiresFullSdd) {
|
|
21211
|
+
const profile = detectChangeDirProfile(changeDir);
|
|
21212
|
+
if (profile === 'patch') {
|
|
21213
|
+
return !requiresFullSdd && fs.existsSync(path.join(changeDir, 'spec.md'));
|
|
21214
|
+
}
|
|
21215
|
+
return STANDARD_SDD_ARTIFACTS.every((f) => fs.existsSync(path.join(changeDir, f)));
|
|
21216
|
+
}
|
|
21217
|
+
|
|
21218
|
+
function validateProtectedBypassOnly(candidateDirs, relTargetPath) {
|
|
21219
|
+
const hasPatchCandidate = candidateDirs.some(
|
|
21220
|
+
(dir) => detectChangeDirProfile(dir) === 'patch'
|
|
21221
|
+
);
|
|
21222
|
+
if (hasPatchCandidate) {
|
|
21223
|
+
return {
|
|
21224
|
+
valid: false,
|
|
21225
|
+
reason: \`\u274C [AI-SDLC Anti-Bypass Guard] BLOCKED: Active SDD increment uses 'patch' profile, but '\${relTargetPath}' is a protected Anti-Bypass path. Protected paths require a 'standard' or 'critical' SDD increment in specs/changes/active/ (run aisdlc-increment).\`,
|
|
21226
|
+
};
|
|
21227
|
+
}
|
|
21228
|
+
return { valid: true };
|
|
21229
|
+
}
|
|
21230
|
+
|
|
21231
|
+
function validateSourceOrTestEdit(candidateDirs, branchPrefix, relTargetPath, isBypass) {
|
|
21232
|
+
if (candidateDirs.length === 0) {
|
|
21233
|
+
const prefixHint = branchPrefix ? \` matching '\${branchPrefix}'\` : '';
|
|
21234
|
+
return {
|
|
21235
|
+
valid: false,
|
|
21236
|
+
reason: \`\u274C [AI-SDLC SDD Increment Guard] BLOCKED: Cannot modify '\${relTargetPath}' without an active SDD increment\${prefixHint} in specs/changes/active/. Run the 'aisdlc-increment' skill (Step 0 -> sdd_change_new) first.\`,
|
|
21237
|
+
};
|
|
21238
|
+
}
|
|
21239
|
+
if (candidateDirs.some((dir) => isSatisfiedChangeDir(dir, isBypass))) {
|
|
21240
|
+
return { valid: true };
|
|
21241
|
+
}
|
|
21242
|
+
if (isBypass) {
|
|
21243
|
+
return {
|
|
21244
|
+
valid: false,
|
|
21245
|
+
reason: \`\u274C [AI-SDLC Anti-Bypass Guard] BLOCKED: Protected Anti-Bypass path '\${relTargetPath}' cannot be modified under a 'patch' increment. A 'standard' or 'critical' SDD increment with spec.md, design.md, tasks.md, and handoff.yaml in specs/changes/active/ is required (aisdlc-increment).\`,
|
|
21246
|
+
};
|
|
21247
|
+
}
|
|
21248
|
+
return {
|
|
21249
|
+
valid: false,
|
|
21250
|
+
reason: \`\u274C [AI-SDLC SDD Increment Guard] BLOCKED: Active SDD increment in specs/changes/active/ is incomplete for standard/critical profile (requires spec.md, design.md, tasks.md, and handoff.yaml) before editing '\${relTargetPath}'. Complete SDD scaffolding via aisdlc-increment first.\`,
|
|
21251
|
+
};
|
|
21252
|
+
}
|
|
21253
|
+
|
|
21254
|
+
function hasValidActiveSddIncrement(cwd, branch = '', relTargetPath = 'src/') {
|
|
21255
|
+
if (!relTargetPath || relTargetPath.startsWith('..')) return { valid: true };
|
|
21256
|
+
if (!fs.existsSync(path.join(cwd, 'specs', 'changes'))) return { valid: true };
|
|
21257
|
+
|
|
21258
|
+
const isSourceOrTest = isSourceOrTestTarget(relTargetPath);
|
|
21259
|
+
const isBypass = isProtectedBypassPath(relTargetPath);
|
|
21260
|
+
if (!isSourceOrTest && !isBypass) return { valid: true };
|
|
21261
|
+
|
|
21262
|
+
const branchPrefix = extractBranchChangePrefix(branch);
|
|
21263
|
+
const activeRoot = path.join(cwd, 'specs', 'changes', 'active');
|
|
21264
|
+
const candidateDirs = listActiveChangeDirs(activeRoot, branchPrefix);
|
|
21265
|
+
|
|
21266
|
+
if (!isSourceOrTest) return validateProtectedBypassOnly(candidateDirs, relTargetPath);
|
|
21267
|
+
return validateSourceOrTestEdit(candidateDirs, branchPrefix, relTargetPath, isBypass);
|
|
21268
|
+
}
|
|
21269
|
+
|
|
21270
|
+
function isEphemeralPath(normPath) {
|
|
21271
|
+
return (
|
|
21272
|
+
normPath.includes('/.gemini/') ||
|
|
21273
|
+
normPath.includes('/brain/') ||
|
|
21274
|
+
normPath.includes('/scratch/')
|
|
21275
|
+
);
|
|
20979
21276
|
}
|
|
20980
21277
|
|
|
20981
21278
|
function evaluateGuardDecision(payload) {
|
|
20982
21279
|
const targetPath = payload.toolCall?.args?.Path || '';
|
|
20983
|
-
const
|
|
20984
|
-
const cwd = workspacePaths[0] || process.cwd();
|
|
21280
|
+
const cwd = (payload.workspacePaths || [])[0] || process.cwd();
|
|
20985
21281
|
const resolvedPath = targetPath ? path.resolve(cwd, targetPath) : '';
|
|
20986
21282
|
const normPath = resolvedPath.replace(/\\\\/g, '/');
|
|
20987
21283
|
|
|
@@ -20991,14 +21287,7 @@ function evaluateGuardDecision(payload) {
|
|
|
20991
21287
|
reason: \`\u274C [AI-SDLC Immutable Coding Rules Guard] BLOCKED: AI agents are forbidden from modifying protected coding rules file '\${path.basename(targetPath)}'. Fix the source or test code to satisfy the compiler/linter rules instead of altering the rule configuration.\`,
|
|
20992
21288
|
};
|
|
20993
21289
|
}
|
|
20994
|
-
|
|
20995
|
-
if (
|
|
20996
|
-
normPath.includes('/.gemini/') ||
|
|
20997
|
-
normPath.includes('/brain/') ||
|
|
20998
|
-
normPath.includes('/scratch/')
|
|
20999
|
-
) {
|
|
21000
|
-
return { decision: 'allow' };
|
|
21001
|
-
}
|
|
21290
|
+
if (isEphemeralPath(normPath)) return { decision: 'allow' };
|
|
21002
21291
|
|
|
21003
21292
|
const branch = getWorkingBranch(cwd);
|
|
21004
21293
|
if (/^(main|master|release\\/.*)$/.test(branch)) {
|
|
@@ -21008,6 +21297,10 @@ function evaluateGuardDecision(payload) {
|
|
|
21008
21297
|
};
|
|
21009
21298
|
}
|
|
21010
21299
|
|
|
21300
|
+
const relPath = resolvedPath ? path.relative(cwd, resolvedPath).replace(/\\\\/g, '/') : '';
|
|
21301
|
+
const sddCheck = hasValidActiveSddIncrement(cwd, branch, relPath);
|
|
21302
|
+
if (!sddCheck.valid) return { decision: 'deny', reason: sddCheck.reason };
|
|
21303
|
+
|
|
21011
21304
|
return { decision: 'allow' };
|
|
21012
21305
|
}
|
|
21013
21306
|
|
|
@@ -21027,7 +21320,18 @@ function main() {
|
|
|
21027
21320
|
});
|
|
21028
21321
|
}
|
|
21029
21322
|
|
|
21030
|
-
main
|
|
21323
|
+
if (require.main === module) {
|
|
21324
|
+
main();
|
|
21325
|
+
}
|
|
21326
|
+
|
|
21327
|
+
module.exports = {
|
|
21328
|
+
evaluateGuardDecision,
|
|
21329
|
+
hasValidActiveSddIncrement,
|
|
21330
|
+
detectChangeDirProfile,
|
|
21331
|
+
isSourceOrTestTarget,
|
|
21332
|
+
isProtectedBypassPath,
|
|
21333
|
+
isProtectedCodingRulesTarget,
|
|
21334
|
+
};
|
|
21031
21335
|
`;
|
|
21032
21336
|
var STACK_FILE_MAP = {
|
|
21033
21337
|
dotnet: [{ relPath: "Directory.Build.props", content: DOTNET_DIRECTORY_BUILD_PROPS }],
|
|
@@ -21233,6 +21537,9 @@ thresholds:
|
|
|
21233
21537
|
min_acceptable_score: 50.0
|
|
21234
21538
|
function_length:
|
|
21235
21539
|
max_function_lines: 40
|
|
21540
|
+
test_enforcement:
|
|
21541
|
+
require_function_unit_tests: true
|
|
21542
|
+
require_ui_component_tests: true
|
|
21236
21543
|
`;
|
|
21237
21544
|
var STARTER_LICENSE_POLICY = `# ==============================================================================
|
|
21238
21545
|
# AI-SDLC: Open Source License Compliance & Governance Policy
|
|
@@ -23950,23 +24257,8 @@ var TimestampedBackupManagerAdapter = class {
|
|
|
23950
24257
|
fs12.mkdirSync(targetBackupDir, { recursive: true, mode: 448 });
|
|
23951
24258
|
const manifestEntries = [];
|
|
23952
24259
|
for (const relPath of filesToBackup) {
|
|
23953
|
-
const
|
|
23954
|
-
if (
|
|
23955
|
-
const destFile = path14.resolve(targetBackupDir, relPath);
|
|
23956
|
-
const destDir = path14.dirname(destFile);
|
|
23957
|
-
if (!fs12.existsSync(destDir)) {
|
|
23958
|
-
fs12.mkdirSync(destDir, { recursive: true });
|
|
23959
|
-
}
|
|
23960
|
-
const content = fs12.readFileSync(srcFile, "utf-8");
|
|
23961
|
-
fs12.writeFileSync(destFile, content, "utf-8");
|
|
23962
|
-
const digest = this.diffDetector.computeDigest(content);
|
|
23963
|
-
const stats = fs12.statSync(destFile);
|
|
23964
|
-
manifestEntries.push({
|
|
23965
|
-
path: relPath,
|
|
23966
|
-
sha256: digest,
|
|
23967
|
-
bytes: stats.size
|
|
23968
|
-
});
|
|
23969
|
-
}
|
|
24260
|
+
const entry = this.backupSingleFile(resolvedRoot, targetBackupDir, relPath);
|
|
24261
|
+
if (entry) manifestEntries.push(entry);
|
|
23970
24262
|
}
|
|
23971
24263
|
const manifest = {
|
|
23972
24264
|
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
@@ -23979,6 +24271,18 @@ var TimestampedBackupManagerAdapter = class {
|
|
|
23979
24271
|
);
|
|
23980
24272
|
return targetBackupDir;
|
|
23981
24273
|
}
|
|
24274
|
+
backupSingleFile(resolvedRoot, targetBackupDir, relPath) {
|
|
24275
|
+
const srcFile = path14.resolve(resolvedRoot, relPath);
|
|
24276
|
+
if (!fs12.existsSync(srcFile)) return null;
|
|
24277
|
+
const destFile = path14.resolve(targetBackupDir, relPath);
|
|
24278
|
+
const destDir = path14.dirname(destFile);
|
|
24279
|
+
if (!fs12.existsSync(destDir)) fs12.mkdirSync(destDir, { recursive: true });
|
|
24280
|
+
const content = fs12.readFileSync(srcFile, "utf-8");
|
|
24281
|
+
fs12.writeFileSync(destFile, content, "utf-8");
|
|
24282
|
+
const digest = this.diffDetector.computeDigest(content);
|
|
24283
|
+
const stats = fs12.statSync(destFile);
|
|
24284
|
+
return { path: relPath, sha256: digest, bytes: stats.size };
|
|
24285
|
+
}
|
|
23982
24286
|
async restoreBackup(repoRoot, backupPath) {
|
|
23983
24287
|
const resolvedRoot = path14.resolve(repoRoot);
|
|
23984
24288
|
const manifestPath = path14.join(backupPath, "manifest.json");
|
|
@@ -24404,6 +24708,6 @@ var MigrationService = class {
|
|
|
24404
24708
|
}
|
|
24405
24709
|
};
|
|
24406
24710
|
|
|
24407
|
-
export { ALL_ARCHITECTURE_TEMPLATES, ALL_QUALITY_GATES, BRANCH_PATTERNS, BddStepRegistry, BranchSafetyCheck, CPP_CLANG_TIDY, CPP_CMAKE_STRICT, DEFAULT_DLP_RULES, DEFAULT_EXCLUDED_PATTERNS, DEFAULT_EXCLUDES, DEFAULT_EXCLUDE_DIRS, DEFAULT_EXTENSIONS, DEFAULT_PRIVACY_POLICY, DEFAULT_SAST_EXCLUDES, DEFAULT_TEST_ARTIFACT_PATTERNS, DEFAULT_UNIT_TEST_PATTERNS, DOTNET_DIRECTORY_BUILD_PROPS, DiffDetector, DlpSanitizer, DoctorOrchestrator, DoctorReporter, DoctorService, FileSystemJailAdapter, GENERAL_SOURCE_EXTENSIONS, GHERKIN_GENERATOR_SPECS, GO_GOLANGCI_YML, GRADLE_STRICT_INIT_KTS, GitHooksHealthCheck, InTotoAttestationBuilder, JAVA_PMD_RULESET_XML, KOTLIN_DETEKT_YML, KPI_SUMMARY_END_TAG, KPI_SUMMARY_START_TAG, LIFECYCLE_SKILL_TEMPLATES, MAX_SARIF_BYTES, MAX_SARIF_JSON_DEPTH, MAX_SARIF_RESULTS, MigrationOrchestrator, MigrationReporter, MigrationService, NativeFileSystemProbeAdapter, OpenSpecAdapter, OscalAssessmentBuilder, OverrideAnalyzer, PII_SAST_RULES, PREPARE_COMMIT_MSG_SCRIPT, PRE_COMMIT_SCRIPT, PROMPT_INJECTION_SIGNATURES, PROTECTED_BYPASS_PATTERNS, PROTECTED_CODING_RULES_FILES, PolicyRatchetEnforcer, REVIEWER_ROLES, REVIEW_VERDICTS, RUST_CARGO_CONFIG_TOML, RUST_CLIPPY_TOML, RegulatoryControlMapper, SARIF_SCHEMA_2_1_0, SARIF_VERSION, 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_BOUNDED_CONTEXT_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, SEVERITY_RANK2 as SEVERITY_RANK, SPECIALIZED_AGENT_TEMPLATES, STARTER_AGENT_GUARD_WRAPPER_CJS, STARTER_ANTIGRAVITY_HOOKS_JSON, 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_GUARD_BRANCH_CJS, 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_BOUNDED_CONTEXT_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, SUPPORTED_COVERAGE_FORMATS_HINT, SafeProcessRunnerAdapter, SarifIngestionError, ScaSbomError, SchemasPdacHealthCheck, SecurityToolsHealthCheck, SignatureReadinessCheck, SpecKitAdapter, TOOL_INSTALL_ALLOWLIST, TS_ESLINT_CONFIG_MJS, TS_STRICT_TSCONFIG, TYPE_TO_SCHEMA_MAP, TimestampedBackupManagerAdapter, ToolchainHealthCheck, TransactionManager, UNIT_TEST_SUFFIXES, VALID_AGENT_TARGETS, VALID_ARCHITECTURE_GRANULARITIES, VALID_AUTONOMY_MODES, VALID_CHANGE_PROFILES, VALID_CI_PROVIDERS, VALID_CODING_RULE_STACKS, WIN_CMD_META_RE, accumulateTaskSummaries, aggregateCommitKpiRecords, aggregatePrKpis, aggregateReleaseKpis, analyzeBddVariantsForRequirement, appendRevisionHistoryRow, applyRatchetMode, buildCycloneDxComponent, buildCycloneDxVulnerabilities, buildFeatureFileContent, buildGraphElements, buildSafeEnvironment, calculateJaccardSimilarity, calculateMetrics, calculateRating, calculateShannonEntropy, canonicalSort, canonicalizeJson, checkGherkinInSync, checkoutTaskBranch, classifyBranch, classifyMetricFromMessage, collectAgentFiles, collectDashboardMetrics, collectHistoricalKpis, compileTestPatterns, computeAgentPerformanceKpis, computeCanonicalSha256, computeLfSha256, computeRawSha256, computeSha256, computeViolationSignature, createDefaultDlpPolicy, createDefaultQualityPolicy, deduplicateAndSortPrivacyViolations, deduplicateAndSortSastViolations, deduplicateAndSortViolations, depositProductHandoffSidecar, detectActiveChangeForIntegration, detectAuthorIdentity, detectLanguage, detectPolyglotLoggerCall, detectProfileFromChange, detectProjectEcosystems, detectProjectStacks, detectPromptInjection, emitCiOutput, ensureToolAvailable, ensureTrivyAvailable, evaluateCompoundLicense, evaluateSingleDependency, evaluateVulnerabilityThresholds, executeBddFeature, extractAllRepoCommitKpis, extractBaselineEntriesFromResults, extractCitations, extractCommitKpisFromRange, extractDirectDepNames, extractFeatureTags, extractFrontmatter, extractFunctions, extractFunctionsBraceLanguages, extractFunctionsPolyglot, extractFunctionsPython, extractFunctionsPythonAst, extractFunctionsTypeScriptAst, extractGherkinBlock, extractGherkinFeatures, extractNormativeText, extractPythonFunctionsPolyglot, extractSemanticContent, findChangeWorkspaceDir, findLicenseFile, formatAgentKpisMarkdownSection, formatCommitTrailers, formatInspectResultMarkdown, formatPrKpiMarkdown, formatReleaseKpiMarkdown, formatTaskKpiRows, generateBranchHierarchyPlan, generateComplianceEvidenceBundle, generateComplianceEvidenceBundleSync, generateCycloneDxSbom, generateDashboardReport, generateDeterministicUuidV5, generateDuplicatesReportMarkdown, generateGovernanceReportMarkdown, generateLicenseReportMarkdown, generatePdacReportMarkdown, generatePrivacyReportMarkdown, generateQualityReport, generateRopaInventoryMarkdown, generateSastReportMarkdown, generateSecretsReportMarkdown, generateSecuritySarifReport, generateSuppressionsAuditReport, generateTestingCoverageReportMarkdown, generateThirdPartyNotices, generateTraceabilityReportMarkdown, getArchitectureTemplates, getCodingRulesFilesForStacks, getCytoscapeScript, getGitDiffLines, getNextCorrelativeNumber, getReferenceCodingRulesTemplates, getSddAdapter, getToolInstallSpec, inferArtifactTypeFromId, inferMissingTrailers, ingestSarifFiles, ingestSbomFile, initProject, injectKpisIntoPrBody, inspectElement, installGitHooks, integrateAllSddChanges, integrateSddChange, isCliInstalled, isFunctionReferencedInTests, isGitleaksInstalled, isMetricWorsened, isPathOutsideRoot, isPathProtectedFromPatch, isPlaceholderOrIgnored, isPolyglotTestArtifact, isPolyglotUnitTestFile, isProtectedCodingRulesFile, isReportContentSemanticallyEqual, isRequirementArtifact2 as isRequirementArtifact, isReviewerRole, isSemgrepInstalled, isToolAvailable, isToolInstalled, isUncOrEmptyPath, loadDlpPolicy, loadPrivacyPolicy, loadProductHandoffSidecar, loadQualityBaseline, locateTaskInActiveChanges, mapSastSeverityToSarifLevel, maskSecret, mergeSbomGaps, normalizeIdentifierToSnakeCase, normalizePath, normalizeScaffoldLanguages, normalizeSpdxLicense, normalizeUri, normalizeWinDrive, orchestrateNativeAstAnalysis, orchestratePolyglotSast, parseCoberturaXmlCoverage, parseCommitTrailers, parseDataAsset, parseDlpPolicy, parseFeatureDocument, parseFrontmatter, parseFrontmatterId, parseGenericDoc, parseGoCoverProfile, parseIngestedSbom, parseIstanbulCoverageSummary, parseJacocoXmlCoverage, parseLcovCoverage, parseLicensePolicy, parseLlvmCovJson, parseMarkdownFrontmatter, parseQualityPolicy, parseRequirementFile, parseSarifDocument, parseSarifDocuments, parseSecuritySuppression, parseSpecCatalogScope, parseStrictPurl, parseSyftOutput, parseTasksDoc, parseTasksFromContent, parseTrivyOutput, parseTrivyVulnerabilities, processPackageDir, readCodeCoverageSummary, readFailOnMissingToolFromQualityPolicy, readNormalizedCoverage, readPackageJson, redactSensitiveDiagnostics, renderAntigravityAgentFile, renderAntigravitySkillFile, renderAutonomyModeSection, renderClaudeAgentFile, renderClaudeSkillFile, renderCopilotAgentFile, renderCopilotSkillFile, renderCursorAgentFile, renderCursorSkillFile, renderDashboardHtml, renderManualsTab, resolveAgentTargets, resolveBranchHierarchy, resolveCiEnvironment, resolveCodingRuleStacks, resolveCurrentGitCommit, resolveCytoscapePath, resolveDefaultBranchBase, resolveDeterministicDate, resolveDisallowedLogFields, resolveFeatureFilePath, resolveGitRef, resolveLicenseFromFile, resolveReleaseBaseBranch, resolveSastCwe, resolveSastOwasp, resolveSchemaForArtifact, resolveTargetFiles, resolveTrustedBinaryPath, resolveWinCmdSpawn, runGitleaksCli, runSemgrepCli, sanitizeDlpPayload, sanitizeDlpText, sanitizeSarifText, sanitizeSbomLicense, sanitizeTestCorpus, scaffoldGherkinSteps, scaffoldSddChange, scanAllProductHandoffs, scanAllTestArtifacts, scanContentForSecrets, scanFileForPrivacyViolations, scanFileForSast, scanGoDependencies, scanInstalledLicenses, scanManualsInWorkspace, scanMavenDependencies, scanPnpmStore, scanPythonDependencies, scanRustDependencies, scanSubdirectories, scanWithNativeFs, scanWithSbom, scanWithSyft, scanWithTrivy, scanWithTrivyAsync, serializeSarifDocument, slugify2 as slugify, spawnTrustedBinary, stripMaskingCalls, stripVolatileReportMetadata, submitReviewReport, syncPdacDigests, tokenizeTitle, updateCitationsInContent, validateAgainstSchema, validateAnchorExistence, validateArtifactSchema, verifyArtifactDuplicates, verifyArtifactsSchemas, verifyBddReportAttestation, verifyLicenses, verifyLicensesAsync, verifyManuals, verifyPdacGraph, verifyPrivacy, verifyProgressiveFriction, verifyQualityGate, verifySast, verifySastAsync, verifySddIntegration, verifySecrets, verifyTasksGovernance, verifyTestingCoverage, verifyTraceability, walkDir, walkMdFiles, walkProjectFiles, walkSourceFiles, walkTaskFiles, writeCucumberJsonReport, writeCycloneDxSbom, writeQualityBaseline, writeReleaseKpiReport, writeReportFileIfChanged, writeSecuritySarifReport, writeThirdPartyNotices };
|
|
24711
|
+
export { ALL_ARCHITECTURE_TEMPLATES, ALL_QUALITY_GATES, BRANCH_PATTERNS, BddStepRegistry, BranchSafetyCheck, CPP_CLANG_TIDY, CPP_CMAKE_STRICT, DEFAULT_DLP_RULES, DEFAULT_EXCLUDED_PATTERNS, DEFAULT_EXCLUDES, DEFAULT_EXCLUDE_DIRS, DEFAULT_EXTENSIONS, DEFAULT_PRIVACY_POLICY, DEFAULT_SAST_EXCLUDES, DEFAULT_TEST_ARTIFACT_PATTERNS, DEFAULT_UI_COMPONENT_PATTERNS, DEFAULT_UI_TEST_PATTERNS, DEFAULT_UNIT_TEST_PATTERNS, DOTNET_DIRECTORY_BUILD_PROPS, DiffDetector, DlpSanitizer, DoctorOrchestrator, DoctorReporter, DoctorService, FileSystemJailAdapter, GENERAL_SOURCE_EXTENSIONS, GHERKIN_GENERATOR_SPECS, GO_GOLANGCI_YML, GRADLE_STRICT_INIT_KTS, GitHooksHealthCheck, InTotoAttestationBuilder, JAVA_PMD_RULESET_XML, KOTLIN_DETEKT_YML, KPI_SUMMARY_END_TAG, KPI_SUMMARY_START_TAG, LIFECYCLE_SKILL_TEMPLATES, MAX_SARIF_BYTES, MAX_SARIF_JSON_DEPTH, MAX_SARIF_RESULTS, MigrationOrchestrator, MigrationReporter, MigrationService, NativeFileSystemProbeAdapter, OpenSpecAdapter, OscalAssessmentBuilder, OverrideAnalyzer, PII_SAST_RULES, PREPARE_COMMIT_MSG_SCRIPT, PRE_COMMIT_SCRIPT, PROMPT_INJECTION_SIGNATURES, PROTECTED_BYPASS_PATTERNS, PROTECTED_CODING_RULES_FILES, PolicyRatchetEnforcer, REVIEWER_ROLES, REVIEW_VERDICTS, RUST_CARGO_CONFIG_TOML, RUST_CLIPPY_TOML, RegulatoryControlMapper, SARIF_SCHEMA_2_1_0, SARIF_VERSION, 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_BOUNDED_CONTEXT_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, SEVERITY_RANK2 as SEVERITY_RANK, SPECIALIZED_AGENT_TEMPLATES, STARTER_AGENT_GUARD_WRAPPER_CJS, STARTER_ANTIGRAVITY_HOOKS_JSON, 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_GUARD_BRANCH_CJS, 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_DOCKER_COMPOSE_OBSERVABILITY_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_OBSERVABILITY_GRAFANA_DATASOURCES_YML, STARTER_TEMPLATES_CI_OBSERVABILITY_PROMETHEUS_YML, STARTER_TEMPLATES_CI__GITLAB_CI_YML, STARTER_TEMPLATES_CODING_RULES_GO__GOLANGCI_YML, STARTER_TEMPLATES_CODING_RULES_KOTLIN_DETEKT_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_BOUNDED_CONTEXT_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, SUPPORTED_COVERAGE_FORMATS_HINT, SafeProcessRunnerAdapter, SarifIngestionError, ScaSbomError, SchemasPdacHealthCheck, SecurityToolsHealthCheck, SignatureReadinessCheck, SpecKitAdapter, TOOL_INSTALL_ALLOWLIST, TS_ESLINT_CONFIG_MJS, TS_STRICT_TSCONFIG, TYPE_TO_SCHEMA_MAP, TimestampedBackupManagerAdapter, ToolchainHealthCheck, TransactionManager, UNIT_TEST_SUFFIXES, VALID_AGENT_TARGETS, VALID_ARCHITECTURE_GRANULARITIES, VALID_AUTONOMY_MODES, VALID_CHANGE_PROFILES, VALID_CI_PROVIDERS, VALID_CODING_RULE_STACKS, WIN_CMD_META_RE, accumulateTaskSummaries, aggregateCommitKpiRecords, aggregatePrKpis, aggregateReleaseKpis, analyzeBddVariantsForRequirement, appendRevisionHistoryRow, applyRatchetMode, buildCycloneDxComponent, buildCycloneDxVulnerabilities, buildFeatureFileContent, buildGraphElements, buildSafeEnvironment, calculateJaccardSimilarity, calculateMetrics, calculateRating, calculateShannonEntropy, canonicalSort, canonicalizeJson, checkGherkinInSync, checkoutTaskBranch, classifyBranch, classifyMetricFromMessage, collectAgentFiles, collectDashboardMetrics, collectHistoricalKpis, compilePatternList, compileTestPatterns, computeAgentPerformanceKpis, computeCanonicalSha256, computeLfSha256, computeRawSha256, computeSha256, computeViolationSignature, createDefaultDlpPolicy, createDefaultQualityPolicy, deduplicateAndSortPrivacyViolations, deduplicateAndSortSastViolations, deduplicateAndSortViolations, depositProductHandoffSidecar, detectActiveChangeForIntegration, detectAuthorIdentity, detectLanguage, detectPolyglotLoggerCall, detectProfileFromChange, detectProjectEcosystems, detectProjectStacks, detectPromptInjection, emitCiOutput, ensureToolAvailable, ensureTrivyAvailable, evaluateCompoundLicense, evaluateSingleDependency, evaluateVulnerabilityThresholds, executeBddFeature, extractAllRepoCommitKpis, extractBaselineEntriesFromResults, extractCitations, extractCommitKpisFromRange, extractDirectDepNames, extractFeatureTags, extractFrontmatter, extractFunctions, extractFunctionsBraceLanguages, extractFunctionsPolyglot, extractFunctionsPython, extractFunctionsPythonAst, extractFunctionsTypeScriptAst, extractGherkinBlock, extractGherkinFeatures, extractNormativeText, extractPythonFunctionsPolyglot, extractSemanticContent, findChangeWorkspaceDir, findLicenseFile, formatAgentKpisMarkdownSection, formatCommitTrailers, formatInspectResultMarkdown, formatPrKpiMarkdown, formatReleaseKpiMarkdown, formatTaskKpiRows, generateBranchHierarchyPlan, generateComplianceEvidenceBundle, generateComplianceEvidenceBundleSync, generateCycloneDxSbom, generateDashboardReport, generateDeterministicUuidV5, generateDuplicatesReportMarkdown, generateGovernanceReportMarkdown, generateLicenseReportMarkdown, generatePdacReportMarkdown, generatePrivacyReportMarkdown, generateQualityReport, generateRopaInventoryMarkdown, generateSastReportMarkdown, generateSecretsReportMarkdown, generateSecuritySarifReport, generateSuppressionsAuditReport, generateTestingCoverageReportMarkdown, generateThirdPartyNotices, generateTraceabilityReportMarkdown, getArchitectureTemplates, getCodingRulesFilesForStacks, getCytoscapeScript, getGitDiffLines, getNextCorrelativeNumber, getReferenceCodingRulesTemplates, getSddAdapter, getToolInstallSpec, inferArtifactTypeFromId, inferMissingTrailers, ingestSarifFiles, ingestSbomFile, initProject, injectKpisIntoPrBody, inspectElement, installGitHooks, integrateAllSddChanges, integrateSddChange, isCliInstalled, isFunctionReferencedInTests, isGitleaksInstalled, isMetricWorsened, isPathOutsideRoot, isPathProtectedFromPatch, isPlaceholderOrIgnored, isPolyglotTestArtifact, isPolyglotUnitTestFile, isProtectedCodingRulesFile, isReportContentSemanticallyEqual, isRequirementArtifact2 as isRequirementArtifact, isReviewerRole, isSemgrepInstalled, isToolAvailable, isToolInstalled, isUiComponentFile, isUiTestFile, isUncOrEmptyPath, loadDlpPolicy, loadPrivacyPolicy, loadProductHandoffSidecar, loadQualityBaseline, locateTaskInActiveChanges, mapSastSeverityToSarifLevel, maskSecret, mergeSbomGaps, normalizeIdentifierToSnakeCase, normalizePath, normalizeScaffoldLanguages, normalizeSpdxLicense, normalizeUri, normalizeWinDrive, orchestrateNativeAstAnalysis, orchestratePolyglotSast, parseCoberturaXmlCoverage, parseCommitTrailers, parseDataAsset, parseDlpPolicy, parseFeatureDocument, parseFrontmatter, parseFrontmatterId, parseGenericDoc, parseGoCoverProfile, parseIngestedSbom, parseIstanbulCoverageSummary, parseJacocoXmlCoverage, parseLcovCoverage, parseLicensePolicy, parseLlvmCovJson, parseMarkdownFrontmatter, parseQualityPolicy, parseRequirementFile, parseSarifDocument, parseSarifDocuments, parseSecuritySuppression, parseSpecCatalogScope, parseStrictPurl, parseSyftOutput, parseTasksDoc, parseTasksFromContent, parseTrivyOutput, parseTrivyVulnerabilities, processPackageDir, readCodeCoverageSummary, readFailOnMissingToolFromQualityPolicy, readNormalizedCoverage, readPackageJson, redactSensitiveDiagnostics, renderAntigravityAgentFile, renderAntigravitySkillFile, renderAutonomyModeSection, renderClaudeAgentFile, renderClaudeSkillFile, renderCopilotAgentFile, renderCopilotSkillFile, renderCursorAgentFile, renderCursorSkillFile, renderDashboardHtml, renderManualsTab, resolveAgentTargets, resolveBranchHierarchy, resolveCiEnvironment, resolveCodingRuleStacks, resolveCurrentGitCommit, resolveCytoscapePath, resolveDefaultBranchBase, resolveDeterministicDate, resolveDisallowedLogFields, resolveFeatureFilePath, resolveGitRef, resolveLicenseFromFile, resolveReleaseBaseBranch, resolveSastCwe, resolveSastOwasp, resolveSchemaForArtifact, resolveTargetFiles, resolveTrustedBinaryPath, resolveWinCmdSpawn, runGitleaksCli, runSemgrepCli, sanitizeDlpPayload, sanitizeDlpText, sanitizeSarifText, sanitizeSbomLicense, sanitizeTestCorpus, scaffoldGherkinSteps, scaffoldSddChange, scanAllProductHandoffs, scanAllTestArtifacts, scanContentForSecrets, scanFileForPrivacyViolations, scanFileForSast, scanGoDependencies, scanInstalledLicenses, scanManualsInWorkspace, scanMavenDependencies, scanPnpmStore, scanPythonDependencies, scanRustDependencies, scanSubdirectories, scanWithNativeFs, scanWithSbom, scanWithSyft, scanWithTrivy, scanWithTrivyAsync, serializeSarifDocument, slugify2 as slugify, spawnTrustedBinary, stripMaskingCalls, stripVolatileReportMetadata, submitReviewReport, syncPdacDigests, tokenizeTitle, updateCitationsInContent, validateAgainstSchema, validateAnchorExistence, validateArtifactSchema, verifyArtifactDuplicates, verifyArtifactsSchemas, verifyBddReportAttestation, verifyLicenses, verifyLicensesAsync, verifyManuals, verifyPdacGraph, verifyPrivacy, verifyProgressiveFriction, verifyQualityGate, verifySast, verifySastAsync, verifySddIntegration, verifySecrets, verifyTasksGovernance, verifyTestingCoverage, verifyTraceability, walkDir, walkMdFiles, walkProjectFiles, walkSourceFiles, walkTaskFiles, writeCucumberJsonReport, writeCycloneDxSbom, writeQualityBaseline, writeReleaseKpiReport, writeReportFileIfChanged, writeSecuritySarifReport, writeThirdPartyNotices };
|
|
24408
24712
|
//# sourceMappingURL=index.js.map
|
|
24409
24713
|
//# sourceMappingURL=index.js.map
|