@aisdlc/core 4.4.0 → 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 +537 -187
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +60 -40
- package/dist/index.d.ts +60 -40
- package/dist/index.js +528 -188
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1198,6 +1198,51 @@ var DEFAULT_TEST_ARTIFACT_PATTERNS = [
|
|
|
1198
1198
|
"**/*.feature",
|
|
1199
1199
|
...DEFAULT_UNIT_TEST_PATTERNS
|
|
1200
1200
|
];
|
|
1201
|
+
var DEFAULT_UI_COMPONENT_PATTERNS = [
|
|
1202
|
+
"**/components/**",
|
|
1203
|
+
"**/views/**",
|
|
1204
|
+
"**/pages/**",
|
|
1205
|
+
"**/screens/**",
|
|
1206
|
+
"**/windows/**",
|
|
1207
|
+
"**/dialogs/**",
|
|
1208
|
+
"**/tui/**",
|
|
1209
|
+
"**/widgets/**",
|
|
1210
|
+
"**/*.tsx",
|
|
1211
|
+
"**/*.jsx",
|
|
1212
|
+
"**/*.vue",
|
|
1213
|
+
"**/*.svelte",
|
|
1214
|
+
"**/*Window.cs",
|
|
1215
|
+
"**/*View.cs",
|
|
1216
|
+
"**/*Form.cs",
|
|
1217
|
+
"**/*Dialog.cs",
|
|
1218
|
+
"**/*Page.cs",
|
|
1219
|
+
"**/*UserControl.cs",
|
|
1220
|
+
"**/*Screen.kt",
|
|
1221
|
+
"**/*Activity.kt",
|
|
1222
|
+
"**/*Fragment.kt",
|
|
1223
|
+
"**/*ViewController.swift",
|
|
1224
|
+
"**/*Screen.dart"
|
|
1225
|
+
];
|
|
1226
|
+
var DEFAULT_UI_TEST_PATTERNS = [
|
|
1227
|
+
"tests/e2e/**",
|
|
1228
|
+
"tests/ui/**",
|
|
1229
|
+
"tests/desktop/**",
|
|
1230
|
+
"tests/mobile/**",
|
|
1231
|
+
"tests/cli/**",
|
|
1232
|
+
"**/*.e2e.ts",
|
|
1233
|
+
"**/*.e2e.js",
|
|
1234
|
+
"**/*.ui.spec.ts",
|
|
1235
|
+
"**/*.ui.test.ts",
|
|
1236
|
+
"**/*UiTest.cs",
|
|
1237
|
+
"**/*UITest.cs",
|
|
1238
|
+
"**/*UiTests.cs",
|
|
1239
|
+
"**/*UITests.cs",
|
|
1240
|
+
"**/*FlaUI*.cs",
|
|
1241
|
+
"**/*E2ETest.java",
|
|
1242
|
+
"**/*UITest.swift",
|
|
1243
|
+
"**/test_ui_*.py",
|
|
1244
|
+
"**/*_ui_test.py"
|
|
1245
|
+
];
|
|
1201
1246
|
function escapeRegexChars(raw) {
|
|
1202
1247
|
return raw.replace(/[.+^${}()|[\]\\]/g, "\\$&");
|
|
1203
1248
|
}
|
|
@@ -1232,6 +1277,28 @@ function isPolyglotUnitTestFile(filePath, customPatterns) {
|
|
|
1232
1277
|
function isPolyglotTestArtifact(filePath, customPatterns) {
|
|
1233
1278
|
return compileTestPatterns(customPatterns, true).matches(filePath);
|
|
1234
1279
|
}
|
|
1280
|
+
function compilePatternList(patterns) {
|
|
1281
|
+
const regexes = patterns.map(globToRegex);
|
|
1282
|
+
return {
|
|
1283
|
+
matches: (filePath) => {
|
|
1284
|
+
const norm = filePath.replace(/\\/g, "/").replace(/^\.\//, "");
|
|
1285
|
+
return regexes.some((re) => re.test(norm));
|
|
1286
|
+
}
|
|
1287
|
+
};
|
|
1288
|
+
}
|
|
1289
|
+
var NON_COMPONENT_UI_FILES = /(?:^|\/)(?:index|types|constants|styles|main|app|setup)\.[jt]sx?$/i;
|
|
1290
|
+
function isUiComponentFile(filePath, customPatterns) {
|
|
1291
|
+
const norm = filePath.replace(/\\/g, "/").replace(/^\.\//, "");
|
|
1292
|
+
if (isPolyglotUnitTestFile(norm) || norm.endsWith(".d.ts") || NON_COMPONENT_UI_FILES.test(norm)) {
|
|
1293
|
+
return false;
|
|
1294
|
+
}
|
|
1295
|
+
const patterns = customPatterns && customPatterns.length > 0 ? customPatterns : DEFAULT_UI_COMPONENT_PATTERNS;
|
|
1296
|
+
return compilePatternList(patterns).matches(norm);
|
|
1297
|
+
}
|
|
1298
|
+
function isUiTestFile(filePath, customPatterns) {
|
|
1299
|
+
const patterns = customPatterns && customPatterns.length > 0 ? [...DEFAULT_UI_TEST_PATTERNS, ...customPatterns] : DEFAULT_UI_TEST_PATTERNS;
|
|
1300
|
+
return compilePatternList(patterns).matches(filePath);
|
|
1301
|
+
}
|
|
1235
1302
|
var BddStepRegistry = class {
|
|
1236
1303
|
definitions = [];
|
|
1237
1304
|
register(pattern, handler) {
|
|
@@ -2782,21 +2849,42 @@ function applyCoverageThresholds(policy, covRaw) {
|
|
|
2782
2849
|
policy.min_function_coverage = Number(cov.min_function_coverage_percent);
|
|
2783
2850
|
}
|
|
2784
2851
|
}
|
|
2852
|
+
function applyTestEnforcement(policy, raw) {
|
|
2853
|
+
if (!raw || typeof raw !== "object") return;
|
|
2854
|
+
const enf = raw;
|
|
2855
|
+
if (typeof enf.require_function_unit_tests === "boolean") {
|
|
2856
|
+
policy.require_function_unit_tests = enf.require_function_unit_tests;
|
|
2857
|
+
}
|
|
2858
|
+
if (typeof enf.require_ui_component_tests === "boolean") {
|
|
2859
|
+
policy.require_ui_component_tests = enf.require_ui_component_tests;
|
|
2860
|
+
}
|
|
2861
|
+
if (Array.isArray(enf.ui_component_patterns)) {
|
|
2862
|
+
policy.ui_component_patterns = enf.ui_component_patterns.map(String);
|
|
2863
|
+
}
|
|
2864
|
+
if (Array.isArray(enf.ui_test_patterns)) {
|
|
2865
|
+
policy.ui_test_patterns = enf.ui_test_patterns.map(String);
|
|
2866
|
+
}
|
|
2867
|
+
}
|
|
2868
|
+
function applySectionThresholds(policy, s) {
|
|
2869
|
+
const cc = s.cyclomatic_complexity?.max_per_function;
|
|
2870
|
+
const cog = s.cognitive_complexity?.max_per_function;
|
|
2871
|
+
const mi = s.maintainability_index?.min_acceptable_score;
|
|
2872
|
+
const loc = s.function_length?.max_function_lines;
|
|
2873
|
+
if (cc !== void 0) policy.max_cyclomatic = Number(cc);
|
|
2874
|
+
if (cog !== void 0) policy.max_cognitive = Number(cog);
|
|
2875
|
+
if (mi !== void 0) policy.min_maintainability = Number(mi);
|
|
2876
|
+
if (loc !== void 0) policy.max_function_lines = Number(loc);
|
|
2877
|
+
applyCoverageThresholds(policy, s.test_coverage);
|
|
2878
|
+
applyTestEnforcement(policy, s.test_enforcement);
|
|
2879
|
+
}
|
|
2785
2880
|
function applyDocThresholds(policy, doc) {
|
|
2786
2881
|
const sections = [doc.release_thresholds, doc.thresholds].filter(
|
|
2787
2882
|
(s) => Boolean(s && typeof s === "object")
|
|
2788
2883
|
);
|
|
2789
2884
|
for (const s of sections) {
|
|
2790
|
-
|
|
2791
|
-
const cog = s.cognitive_complexity?.max_per_function;
|
|
2792
|
-
const mi = s.maintainability_index?.min_acceptable_score;
|
|
2793
|
-
const loc = s.function_length?.max_function_lines;
|
|
2794
|
-
if (cc !== void 0) policy.max_cyclomatic = Number(cc);
|
|
2795
|
-
if (cog !== void 0) policy.max_cognitive = Number(cog);
|
|
2796
|
-
if (mi !== void 0) policy.min_maintainability = Number(mi);
|
|
2797
|
-
if (loc !== void 0) policy.max_function_lines = Number(loc);
|
|
2798
|
-
applyCoverageThresholds(policy, s.test_coverage);
|
|
2885
|
+
applySectionThresholds(policy, s);
|
|
2799
2886
|
}
|
|
2887
|
+
applyTestEnforcement(policy, doc.test_enforcement);
|
|
2800
2888
|
const codingRules = doc.coding_rules;
|
|
2801
2889
|
const rules = codingRules?.rules;
|
|
2802
2890
|
if (rules?.max_function_lines !== void 0) {
|
|
@@ -3065,6 +3153,61 @@ function auditUnitTestsPerFunction(results, rootDir, testPatterns) {
|
|
|
3065
3153
|
}
|
|
3066
3154
|
return untested;
|
|
3067
3155
|
}
|
|
3156
|
+
var UI_COMPONENT_EXTENSIONS = [
|
|
3157
|
+
...DEFAULT_EXTENSIONS,
|
|
3158
|
+
".vue",
|
|
3159
|
+
".svelte",
|
|
3160
|
+
".kt",
|
|
3161
|
+
".swift",
|
|
3162
|
+
".dart"
|
|
3163
|
+
];
|
|
3164
|
+
var UI_TEST_EXTENSIONS = [
|
|
3165
|
+
...UI_COMPONENT_EXTENSIONS,
|
|
3166
|
+
".yaml",
|
|
3167
|
+
".yml"
|
|
3168
|
+
];
|
|
3169
|
+
function collectUiTestFiles(rootDir, customPatterns) {
|
|
3170
|
+
const allFiles = walkDir(rootDir, UI_TEST_EXTENSIONS, DEFAULT_EXCLUDES);
|
|
3171
|
+
const uiTests = [];
|
|
3172
|
+
for (const tf of allFiles) {
|
|
3173
|
+
const relPath = path14__namespace.relative(rootDir, tf).replace(/\\/g, "/");
|
|
3174
|
+
if (!isUiTestFile(relPath, customPatterns)) continue;
|
|
3175
|
+
try {
|
|
3176
|
+
uiTests.push({ relPath, content: fs12__namespace.readFileSync(tf, "utf-8") });
|
|
3177
|
+
} catch {
|
|
3178
|
+
}
|
|
3179
|
+
}
|
|
3180
|
+
return uiTests;
|
|
3181
|
+
}
|
|
3182
|
+
function extractUiComponentName(relPath) {
|
|
3183
|
+
const base = path14__namespace.basename(relPath);
|
|
3184
|
+
return base.replace(/\.(?:xaml\.cs|component\.ts|vue|svelte|tsx?|jsx?|py|cs|java|kt|swift|dart)$/i, "");
|
|
3185
|
+
}
|
|
3186
|
+
function buildComponentNameVariants(componentName) {
|
|
3187
|
+
const kebab = componentName.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
3188
|
+
const snake = kebab.replace(/-/g, "_");
|
|
3189
|
+
return Array.from(/* @__PURE__ */ new Set([componentName, kebab, snake]));
|
|
3190
|
+
}
|
|
3191
|
+
function isUiComponentTested(componentName, uiTests) {
|
|
3192
|
+
const variants = buildComponentNameVariants(componentName);
|
|
3193
|
+
const patterns = variants.map((v) => new RegExp(`\\b${v.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}\\b`, "i"));
|
|
3194
|
+
return uiTests.some((t) => patterns.some((re) => re.test(t.relPath) || re.test(t.content)));
|
|
3195
|
+
}
|
|
3196
|
+
function auditUiComponents(rootDir, policy) {
|
|
3197
|
+
const uiPolicy = { ...policy, supported_extensions: [...UI_COMPONENT_EXTENSIONS] };
|
|
3198
|
+
const candidateFiles = collectFilesToScan(rootDir, uiPolicy);
|
|
3199
|
+
const uiTests = collectUiTestFiles(rootDir, policy.ui_test_patterns);
|
|
3200
|
+
const untested = [];
|
|
3201
|
+
for (const file of candidateFiles) {
|
|
3202
|
+
const relPath = path14__namespace.relative(rootDir, file).replace(/\\/g, "/");
|
|
3203
|
+
if (!isUiComponentFile(relPath, policy.ui_component_patterns)) continue;
|
|
3204
|
+
const componentName = extractUiComponentName(relPath);
|
|
3205
|
+
if (!isUiComponentTested(componentName, uiTests)) {
|
|
3206
|
+
untested.push({ file: relPath, componentName });
|
|
3207
|
+
}
|
|
3208
|
+
}
|
|
3209
|
+
return untested;
|
|
3210
|
+
}
|
|
3068
3211
|
function checkCoverageThreshold(label, actual, min, out) {
|
|
3069
3212
|
if (actual < min) {
|
|
3070
3213
|
out.push(`${label} coverage ${actual}% is below minimum threshold of ${min}%`);
|
|
@@ -3207,27 +3350,33 @@ function evaluateRatchetIfActive(results, baselineFile, isActive) {
|
|
|
3207
3350
|
baselineViolationsCount: baseline.totalViolations
|
|
3208
3351
|
};
|
|
3209
3352
|
}
|
|
3210
|
-
function
|
|
3353
|
+
function computeGateSummaryCounts(results, coverageViolations, untestedUi, policy, baselineUpdated) {
|
|
3211
3354
|
const failCount = results.filter((r) => r.status === "FAIL").length;
|
|
3212
3355
|
const passCount = results.length - failCount;
|
|
3213
|
-
const violationsCount = results.reduce((acc, r) => acc + r.violations.length, 0) + coverageViolations.length;
|
|
3214
|
-
const hasFailures = failCount > 0 || coverageViolations.length > 0;
|
|
3215
|
-
const success =
|
|
3356
|
+
const violationsCount = results.reduce((acc, r) => acc + r.violations.length, 0) + coverageViolations.length + untestedUi.length;
|
|
3357
|
+
const hasFailures = failCount > 0 || coverageViolations.length > 0 || untestedUi.length > 0;
|
|
3358
|
+
const success = baselineUpdated ? true : policy.enforce_mode === "STRICT" ? !hasFailures : true;
|
|
3359
|
+
return { failCount, passCount, violationsCount, success };
|
|
3360
|
+
}
|
|
3361
|
+
function buildQualityGateResult(results, totalFiles, policy, coverageViolations, untestedFunctions, baselineMeta) {
|
|
3362
|
+
const untestedUi = baselineMeta?.untestedUiComponents ?? [];
|
|
3363
|
+
const counts = computeGateSummaryCounts(
|
|
3364
|
+
results,
|
|
3365
|
+
coverageViolations,
|
|
3366
|
+
untestedUi,
|
|
3367
|
+
policy,
|
|
3368
|
+
baselineMeta?.baselineUpdated
|
|
3369
|
+
);
|
|
3216
3370
|
return {
|
|
3217
|
-
|
|
3371
|
+
...counts,
|
|
3218
3372
|
totalFiles,
|
|
3219
3373
|
totalFunctions: results.length,
|
|
3220
|
-
passCount,
|
|
3221
|
-
failCount,
|
|
3222
|
-
violationsCount,
|
|
3223
3374
|
results,
|
|
3224
3375
|
policy,
|
|
3225
3376
|
coverageViolations,
|
|
3226
3377
|
untestedFunctions,
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
toleratedViolationsCount: baselineMeta?.toleratedViolationsCount,
|
|
3230
|
-
newViolationsCount: baselineMeta?.newViolationsCount
|
|
3378
|
+
untestedUiComponents: untestedUi,
|
|
3379
|
+
...baselineMeta
|
|
3231
3380
|
};
|
|
3232
3381
|
}
|
|
3233
3382
|
function verifyQualityGate(options = {}) {
|
|
@@ -3241,7 +3390,10 @@ function verifyQualityGate(options = {}) {
|
|
|
3241
3390
|
} catch {
|
|
3242
3391
|
}
|
|
3243
3392
|
}
|
|
3244
|
-
const
|
|
3393
|
+
const requireUnitTests = Boolean(options.requireFunctionUnitTests ?? policy.require_function_unit_tests);
|
|
3394
|
+
const requireUiTests = Boolean(options.requireUiComponentTests ?? policy.require_ui_component_tests);
|
|
3395
|
+
const untestedFunctions = requireUnitTests ? auditUnitTestsPerFunction(results, rootDir, policy.test_patterns) : [];
|
|
3396
|
+
const untestedUiComponents = requireUiTests ? auditUiComponents(rootDir, policy) : [];
|
|
3245
3397
|
const coverageViolations = evaluateCoverageThresholds(rootDir, policy, options.requireCoverageReport);
|
|
3246
3398
|
const baselineFile = resolveBaselineFilePath(rootDir, options);
|
|
3247
3399
|
if (options.updateBaseline) {
|
|
@@ -3249,7 +3401,8 @@ function verifyQualityGate(options = {}) {
|
|
|
3249
3401
|
writeQualityBaseline(baselineFile, entries);
|
|
3250
3402
|
return buildQualityGateResult(results, allFiles.length, policy, coverageViolations, untestedFunctions, {
|
|
3251
3403
|
baselineUpdated: true,
|
|
3252
|
-
baselineViolationsCount: entries.length
|
|
3404
|
+
baselineViolationsCount: entries.length,
|
|
3405
|
+
untestedUiComponents
|
|
3253
3406
|
});
|
|
3254
3407
|
}
|
|
3255
3408
|
const baselineExists = fs12__namespace.existsSync(baselineFile);
|
|
@@ -3258,7 +3411,8 @@ function verifyQualityGate(options = {}) {
|
|
|
3258
3411
|
return buildQualityGateResult(results, allFiles.length, policy, coverageViolations, untestedFunctions, {
|
|
3259
3412
|
baselineViolationsCount: ratchetEval.baselineViolationsCount,
|
|
3260
3413
|
toleratedViolationsCount: ratchetEval.toleratedViolationsCount,
|
|
3261
|
-
newViolationsCount: ratchetEval.newViolationsCount
|
|
3414
|
+
newViolationsCount: ratchetEval.newViolationsCount,
|
|
3415
|
+
untestedUiComponents
|
|
3262
3416
|
});
|
|
3263
3417
|
}
|
|
3264
3418
|
function normalizeHandoffPayload(handoff, changeId) {
|
|
@@ -4962,140 +5116,163 @@ function detectActiveChangeForIntegration(options = {}) {
|
|
|
4962
5116
|
}
|
|
4963
5117
|
|
|
4964
5118
|
// src/init/starter-schemas.ts
|
|
4965
|
-
var SCHEMA_SCHEMAS_ARCHITECTURE_ADR_SCHEMA_JSON = '{\
|
|
4966
|
-
var SCHEMA_SCHEMAS_ARCHITECTURE_COMPONENT_SCHEMA_JSON = '{\
|
|
4967
|
-
var SCHEMA_SCHEMAS_ARCHITECTURE_INTRODUCTION_AND_GOALS_SCHEMA_JSON = '{\
|
|
4968
|
-
var SCHEMA_SCHEMAS_COMPLIANCE_LICENSE_MANIFEST_SCHEMA_JSON = '{\
|
|
4969
|
-
var SCHEMA_SCHEMAS_COMPLIANCE_LICENSE_POLICY_SCHEMA_JSON = '{\
|
|
4970
|
-
var SCHEMA_SCHEMAS_COMPLIANCE_QUALITY_POLICY_SCHEMA_JSON = '{\
|
|
4971
|
-
var SCHEMA_SCHEMAS_IDE_MCP_CONFIG_SCHEMA_JSON = '{\
|
|
4972
|
-
var SCHEMA_SCHEMAS_MANUALS_PRODUCTION_MANUAL_SCHEMA_JSON = '{\
|
|
4973
|
-
var SCHEMA_SCHEMAS_MANUALS_USER_MANUAL_SCHEMA_JSON = '{\
|
|
4974
|
-
var SCHEMA_SCHEMAS_PRIVACY_DATA_ASSET_SCHEMA_JSON = '{\
|
|
4975
|
-
var SCHEMA_SCHEMAS_PRIVACY_PRIVACY_POLICY_SCHEMA_JSON = '{\
|
|
4976
|
-
var SCHEMA_SCHEMAS_PRIVACY_PRIVACY_REQ_SCHEMA_JSON = '{\
|
|
4977
|
-
var SCHEMA_SCHEMAS_PRIVACY_PRIVACY_ROPA_SCHEMA_JSON = '{\
|
|
4978
|
-
var SCHEMA_SCHEMAS_PRODUCT_ACTOR_SCHEMA_JSON = '{\
|
|
4979
|
-
var SCHEMA_SCHEMAS_PRODUCT_BOUNDED_CONTEXT_SCHEMA_JSON = '{\
|
|
4980
|
-
var SCHEMA_SCHEMAS_PRODUCT_BUSINESS_RULE_SCHEMA_JSON = '{\
|
|
4981
|
-
var SCHEMA_SCHEMAS_PRODUCT_JOURNEY_SCHEMA_JSON = '{\
|
|
4982
|
-
var SCHEMA_SCHEMAS_PRODUCT_REQUIREMENT_SCHEMA_JSON = '{\
|
|
4983
|
-
var SCHEMA_SCHEMAS_PRODUCT_TERM_SCHEMA_JSON = '{\
|
|
4984
|
-
var SCHEMA_SCHEMAS_PRODUCT_USE_CASE_SCHEMA_JSON = '{\
|
|
4985
|
-
var SCHEMA_SCHEMAS_SAFETY_HAZARD_SCHEMA_JSON = '{\
|
|
4986
|
-
var SCHEMA_SCHEMAS_SAFETY_SAFETY_REQ_SCHEMA_JSON = '{\
|
|
4987
|
-
var SCHEMA_SCHEMAS_SDD_DESIGN_SCHEMA_JSON = '{\
|
|
4988
|
-
var SCHEMA_SCHEMAS_SDD_HANDOFF_SCHEMA_JSON = '{\
|
|
4989
|
-
var SCHEMA_SCHEMAS_SDD_PROPOSAL_SCHEMA_JSON = '{\
|
|
4990
|
-
var SCHEMA_SCHEMAS_SDD_RELEASE_KPIS_SCHEMA_JSON = '{\
|
|
4991
|
-
var SCHEMA_SCHEMAS_SDD_SESSION_TELEMETRY_SCHEMA_JSON = '{\
|
|
4992
|
-
var SCHEMA_SCHEMAS_SDD_SPEC_SCHEMA_JSON = '{\
|
|
4993
|
-
var SCHEMA_SCHEMAS_SDD_TASKS_SCHEMA_JSON = '{\
|
|
4994
|
-
var SCHEMA_SCHEMAS_SECURITY_ABUSE_CASE_SCHEMA_JSON = '{\
|
|
4995
|
-
var SCHEMA_SCHEMAS_SECURITY_ENCLAVE_SCHEMA_JSON = `{
|
|
4996
|
-
"$schema": "https://json-schema.org/draft/2020-12/schema"
|
|
4997
|
-
"$id": "https://ai-sdlc.org/schemas/security/enclave.schema.json"
|
|
4998
|
-
"title": "Security Enclave Schema (Zero Trust Architecture Boundary)"
|
|
4999
|
-
"type": "object"
|
|
5000
|
-
"required": [
|
|
5001
|
-
"id"
|
|
5002
|
-
"type"
|
|
5003
|
-
"title"
|
|
5004
|
-
"status"
|
|
5005
|
-
"version"
|
|
5006
|
-
"trust-zone"
|
|
5007
|
-
"perimeter-rules"
|
|
5008
|
-
"allowed-inbound"
|
|
5009
|
-
"allowed-outbound"
|
|
5010
|
-
]
|
|
5011
|
-
"properties": {
|
|
5012
|
-
"id": {
|
|
5013
|
-
"type": "string"
|
|
5014
|
-
"pattern": "^SEC-ENC-[A-Z0-9]+(-[A-Z0-9]+)*$"
|
|
5015
|
-
}
|
|
5016
|
-
"type": {
|
|
5017
|
-
"type": "string"
|
|
5018
|
-
"const": "security-enclave"
|
|
5019
|
-
}
|
|
5020
|
-
"version": {
|
|
5021
|
-
"type": "string"
|
|
5022
|
-
"pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$"
|
|
5023
|
-
"description": "Security enclave semantic version (SemVer)."
|
|
5024
|
-
}
|
|
5025
|
-
"schema-version": {
|
|
5026
|
-
"type": "string"
|
|
5027
|
-
}
|
|
5028
|
-
"title": {
|
|
5029
|
-
"type": "string"
|
|
5030
|
-
"minLength": 3
|
|
5031
|
-
}
|
|
5032
|
-
"status": {
|
|
5033
|
-
"type": "string"
|
|
5034
|
-
"enum": [
|
|
5035
|
-
|
|
5036
|
-
|
|
5037
|
-
|
|
5038
|
-
|
|
5039
|
-
|
|
5040
|
-
}
|
|
5041
|
-
"trust-
|
|
5042
|
-
"type": "string"
|
|
5043
|
-
"
|
|
5044
|
-
|
|
5045
|
-
|
|
5046
|
-
|
|
5047
|
-
|
|
5048
|
-
|
|
5049
|
-
|
|
5050
|
-
|
|
5051
|
-
"
|
|
5052
|
-
|
|
5053
|
-
|
|
5054
|
-
|
|
5055
|
-
"description": "
|
|
5056
|
-
}
|
|
5057
|
-
"
|
|
5058
|
-
"type": "
|
|
5059
|
-
"
|
|
5060
|
-
|
|
5061
|
-
|
|
5062
|
-
|
|
5063
|
-
"
|
|
5064
|
-
|
|
5065
|
-
|
|
5066
|
-
|
|
5067
|
-
"
|
|
5068
|
-
|
|
5069
|
-
|
|
5070
|
-
|
|
5071
|
-
"
|
|
5072
|
-
|
|
5073
|
-
|
|
5074
|
-
|
|
5075
|
-
"
|
|
5076
|
-
|
|
5077
|
-
|
|
5078
|
-
|
|
5079
|
-
"
|
|
5080
|
-
|
|
5081
|
-
|
|
5082
|
-
|
|
5083
|
-
"
|
|
5084
|
-
|
|
5085
|
-
|
|
5086
|
-
|
|
5087
|
-
"
|
|
5088
|
-
|
|
5089
|
-
|
|
5090
|
-
|
|
5091
|
-
|
|
5092
|
-
|
|
5093
|
-
|
|
5094
|
-
|
|
5095
|
-
|
|
5096
|
-
|
|
5097
|
-
|
|
5098
|
-
|
|
5119
|
+
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}';
|
|
5120
|
+
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}';
|
|
5121
|
+
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}';
|
|
5122
|
+
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}';
|
|
5123
|
+
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}';
|
|
5124
|
+
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}';
|
|
5125
|
+
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}';
|
|
5126
|
+
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}';
|
|
5127
|
+
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}';
|
|
5128
|
+
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}';
|
|
5129
|
+
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}';
|
|
5130
|
+
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}';
|
|
5131
|
+
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}';
|
|
5132
|
+
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}';
|
|
5133
|
+
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}';
|
|
5134
|
+
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}';
|
|
5135
|
+
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}';
|
|
5136
|
+
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}';
|
|
5137
|
+
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}';
|
|
5138
|
+
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}';
|
|
5139
|
+
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}';
|
|
5140
|
+
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}';
|
|
5141
|
+
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}';
|
|
5142
|
+
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}';
|
|
5143
|
+
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}';
|
|
5144
|
+
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}';
|
|
5145
|
+
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}';
|
|
5146
|
+
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}';
|
|
5147
|
+
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}';
|
|
5148
|
+
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}';
|
|
5149
|
+
var SCHEMA_SCHEMAS_SECURITY_ENCLAVE_SCHEMA_JSON = `{
|
|
5150
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
5151
|
+
"$id": "https://ai-sdlc.org/schemas/security/enclave.schema.json",
|
|
5152
|
+
"title": "Security Enclave Schema (Zero Trust Architecture Boundary)",
|
|
5153
|
+
"type": "object",
|
|
5154
|
+
"required": [
|
|
5155
|
+
"id",
|
|
5156
|
+
"type",
|
|
5157
|
+
"title",
|
|
5158
|
+
"status",
|
|
5159
|
+
"version",
|
|
5160
|
+
"trust-zone",
|
|
5161
|
+
"perimeter-rules",
|
|
5162
|
+
"allowed-inbound",
|
|
5163
|
+
"allowed-outbound"
|
|
5164
|
+
],
|
|
5165
|
+
"properties": {
|
|
5166
|
+
"id": {
|
|
5167
|
+
"type": "string",
|
|
5168
|
+
"pattern": "^SEC-ENC-[A-Z0-9]+(-[A-Z0-9]+)*$"
|
|
5169
|
+
},
|
|
5170
|
+
"type": {
|
|
5171
|
+
"type": "string",
|
|
5172
|
+
"const": "security-enclave"
|
|
5173
|
+
},
|
|
5174
|
+
"version": {
|
|
5175
|
+
"type": "string",
|
|
5176
|
+
"pattern": "^[0-9]+\\\\.[0-9]+\\\\.[0-9]+(-[0-9A-Za-z.-]+)?$",
|
|
5177
|
+
"description": "Security enclave semantic version (SemVer)."
|
|
5178
|
+
},
|
|
5179
|
+
"schema-version": {
|
|
5180
|
+
"type": "string"
|
|
5181
|
+
},
|
|
5182
|
+
"title": {
|
|
5183
|
+
"type": "string",
|
|
5184
|
+
"minLength": 3
|
|
5185
|
+
},
|
|
5186
|
+
"status": {
|
|
5187
|
+
"type": "string",
|
|
5188
|
+
"enum": [
|
|
5189
|
+
"draft",
|
|
5190
|
+
"active",
|
|
5191
|
+
"deprecated",
|
|
5192
|
+
"retired"
|
|
5193
|
+
]
|
|
5194
|
+
},
|
|
5195
|
+
"trust-zone": {
|
|
5196
|
+
"type": "string",
|
|
5197
|
+
"enum": [
|
|
5198
|
+
"untrusted",
|
|
5199
|
+
"semi-trusted",
|
|
5200
|
+
"trusted",
|
|
5201
|
+
"highly-trusted",
|
|
5202
|
+
"dmz",
|
|
5203
|
+
"zero-trust-boundary"
|
|
5204
|
+
],
|
|
5205
|
+
"description": "Zero Trust confidence zone assigned to enclave."
|
|
5206
|
+
},
|
|
5207
|
+
"trust-level": {
|
|
5208
|
+
"type": "string",
|
|
5209
|
+
"description": "Descriptive Zero Trust confidence level."
|
|
5210
|
+
},
|
|
5211
|
+
"isolation": {
|
|
5212
|
+
"type": "string",
|
|
5213
|
+
"description": "Technical perimeter isolation mechanism."
|
|
5214
|
+
},
|
|
5215
|
+
"perimeter-rules": {
|
|
5216
|
+
"type": "array",
|
|
5217
|
+
"minItems": 1,
|
|
5218
|
+
"items": {
|
|
5219
|
+
"type": "string"
|
|
5220
|
+
},
|
|
5221
|
+
"description": "Perimeter rules defining enclave security boundary (e.g. mTLS, IP allowlist)."
|
|
5222
|
+
},
|
|
5223
|
+
"allowed-inbound": {
|
|
5224
|
+
"type": "array",
|
|
5225
|
+
"items": {
|
|
5226
|
+
"type": "string",
|
|
5227
|
+
"pattern": "^(CMP|SEC-ENC)-[A-Z0-9]+(-[A-Z0-9]+)*$"
|
|
5228
|
+
},
|
|
5229
|
+
"description": "Components or enclaves authorized to initiate inbound connections."
|
|
5230
|
+
},
|
|
5231
|
+
"allowed-outbound": {
|
|
5232
|
+
"type": "array",
|
|
5233
|
+
"items": {
|
|
5234
|
+
"type": "string",
|
|
5235
|
+
"pattern": "^(CMP|SEC-ENC)-[A-Z0-9]+(-[A-Z0-9]+)*$"
|
|
5236
|
+
},
|
|
5237
|
+
"description": "Components or enclaves this enclave can connect to."
|
|
5238
|
+
},
|
|
5239
|
+
"enforced-by": {
|
|
5240
|
+
"type": "array",
|
|
5241
|
+
"items": {
|
|
5242
|
+
"type": "string",
|
|
5243
|
+
"pattern": "^SEC-REQ-[A-Z0-9]+(-[A-Z0-9]+)*$"
|
|
5244
|
+
},
|
|
5245
|
+
"description": "Security requirements enforcing this enclave's rules."
|
|
5246
|
+
},
|
|
5247
|
+
"authentication-mechanism": {
|
|
5248
|
+
"type": "string",
|
|
5249
|
+
"enum": [
|
|
5250
|
+
"mtls",
|
|
5251
|
+
"jwt",
|
|
5252
|
+
"api-key",
|
|
5253
|
+
"oauth2",
|
|
5254
|
+
"none"
|
|
5255
|
+
],
|
|
5256
|
+
"description": "Authentication mechanism required at enclave perimeter."
|
|
5257
|
+
},
|
|
5258
|
+
"supersedes": {
|
|
5259
|
+
"type": [
|
|
5260
|
+
"string",
|
|
5261
|
+
"null"
|
|
5262
|
+
]
|
|
5263
|
+
},
|
|
5264
|
+
"superseded-by": {
|
|
5265
|
+
"type": [
|
|
5266
|
+
"string",
|
|
5267
|
+
"null"
|
|
5268
|
+
]
|
|
5269
|
+
}
|
|
5270
|
+
},
|
|
5271
|
+
"additionalProperties": false
|
|
5272
|
+
}`;
|
|
5273
|
+
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}';
|
|
5274
|
+
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}';
|
|
5275
|
+
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}';
|
|
5099
5276
|
var STARTER_SCHEMAS_MAP = {
|
|
5100
5277
|
"schemas/architecture/adr.schema.json": JSON.parse(SCHEMA_SCHEMAS_ARCHITECTURE_ADR_SCHEMA_JSON),
|
|
5101
5278
|
"schemas/architecture/component.schema.json": JSON.parse(SCHEMA_SCHEMAS_ARCHITECTURE_COMPONENT_SCHEMA_JSON),
|
|
@@ -18715,7 +18892,7 @@ var SPECIALIZED_AGENT_TEMPLATES = [
|
|
|
18715
18892
|
- Document critical technological decisions using immutable \`ADR-*\` records conforming to \`schemas/architecture/adr.schema.json\`.
|
|
18716
18893
|
- Validate that architectural choices comply with legal constraints in \`license-policy.yaml\` and data protection constraints in \`privacy-policy.yaml\`.
|
|
18717
18894
|
- **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.
|
|
18718
|
-
- **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\`),
|
|
18895
|
+
- **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-*\`.
|
|
18719
18896
|
- 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.`
|
|
18720
18897
|
},
|
|
18721
18898
|
{
|
|
@@ -18764,16 +18941,17 @@ var SPECIALIZED_AGENT_TEMPLATES = [
|
|
|
18764
18941
|
- **Role**: High-Precision Software Developer / Coder Agent (\`agent-developer\`).
|
|
18765
18942
|
- **Mission**: Implement atomic tasks from SDD specifications (\`tasks.md\`) delivering clean, strictly typed, and tested code.
|
|
18766
18943
|
|
|
18767
|
-
## Mandatory
|
|
18944
|
+
## Mandatory 5-Step Implementation Order
|
|
18768
18945
|
Execute every implementation task following this strict sequential order:
|
|
18769
18946
|
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).
|
|
18770
18947
|
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.
|
|
18771
18948
|
3. **Component Implementation**: Implement the concrete components, use cases, and adapters that implement and consume the defined interfaces.
|
|
18772
|
-
4. **Exhaustive Per-Function Unit Testing**: Write unit tests for every function in \`
|
|
18949
|
+
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:
|
|
18773
18950
|
- **Happy Path**: nominal execution with valid inputs.
|
|
18774
18951
|
- **Sad Path**: controlled error paths, rejections, and business exceptions.
|
|
18775
18952
|
- **Boundary Values**: minimum, maximum, exact limits, and off-by-one edges.
|
|
18776
18953
|
- **Unexpected, Null & Empty Values**: \`null\`, \`undefined\`, empty strings/arrays/objects, and malformed inputs.
|
|
18954
|
+
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).
|
|
18777
18955
|
|
|
18778
18956
|
## Operational Directives & Guardrails
|
|
18779
18957
|
- Respect the autonomy mode assigned to each task in \`tasks.md\` (\`AUTONOMOUS\`, \`HUMAN_REVIEW_PLAN\`, \`AMBIGUOUS\`, \`HIGH_RISK_MANUAL\`).
|
|
@@ -18788,7 +18966,7 @@ Execute every implementation task following this strict sequential order:
|
|
|
18788
18966
|
- **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.
|
|
18789
18967
|
- **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.
|
|
18790
18968
|
- **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.
|
|
18791
|
-
- **Mandatory Structured Logging & Observability**: Never emit unstructured console logs (\`console.log\`) in production code (\`no_console_logs_in_prod\`). Integrate
|
|
18969
|
+
- **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\`.
|
|
18792
18970
|
- Before adding any external dependency, verify its SPDX license is permitted in \`license-policy.yaml\`.
|
|
18793
18971
|
- Respect non-negotiable \`quality-policy.yaml\` thresholds: Cyclomatic Complexity $\\le 10$, Cognitive Complexity $\\le 15$, Maintainability Index $\\ge 50$, Function Length $\\le 40$ lines.
|
|
18794
18972
|
- Run unified pre-flight with auto-fix (\`pnpm run check:fix\`) and full verification (\`pnpm run verify:all\`).
|
|
@@ -18832,6 +19010,7 @@ Execute every implementation task following this strict sequential order:
|
|
|
18832
19010
|
- **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.
|
|
18833
19011
|
- **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\`).
|
|
18834
19012
|
- **Infrastructure Dependency Policy**: Verify licenses of dependencies, Docker base images, and third-party CI actions against \`license-policy.yaml\`.
|
|
19013
|
+
- **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.
|
|
18835
19014
|
- **Gate Preservation**: Ensure any pipeline optimization keeps all existing deterministic Quality Gates intact.
|
|
18836
19015
|
- **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.
|
|
18837
19016
|
- **Remote Verification**: Creating a PR (\`gh pr create\`) does not equal success; actively verify that remote checks pass (\`gh pr checks\`).
|
|
@@ -18852,8 +19031,10 @@ Execute every implementation task following this strict sequential order:
|
|
|
18852
19031
|
- **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\`).
|
|
18853
19032
|
- **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.
|
|
18854
19033
|
- **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.
|
|
19034
|
+
- **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).
|
|
18855
19035
|
- **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.
|
|
18856
19036
|
- **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\`.
|
|
19037
|
+
- **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\`).
|
|
18857
19038
|
- **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\`.
|
|
18858
19039
|
- **Classification of Findings**: Label every finding as:
|
|
18859
19040
|
* \`[BLOCKING_DEFECT]\`: Critical omission, structural debt, or standard violation that must be resolved.
|
|
@@ -18957,7 +19138,7 @@ var LIFECYCLE_SKILL_TEMPLATES = [
|
|
|
18957
19138
|
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.",
|
|
18958
19139
|
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).",
|
|
18959
19140
|
globs: "product/**, specs/product/**, architecture/**, templates/**",
|
|
18960
|
-
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 - **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).\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 & 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`), verify release/publishing workflows via `agent-devops`, 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`.'
|
|
19141
|
+
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`.'
|
|
18961
19142
|
},
|
|
18962
19143
|
{
|
|
18963
19144
|
id: "aisdlc-legacy-onboarding",
|
|
@@ -18965,7 +19146,7 @@ var LIFECYCLE_SKILL_TEMPLATES = [
|
|
|
18965
19146
|
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.",
|
|
18966
19147
|
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).",
|
|
18967
19148
|
globs: "architecture/**, specs/**, src/**, packages/**",
|
|
18968
|
-
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`).\
|
|
19149
|
+
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."
|
|
18969
19150
|
},
|
|
18970
19151
|
{
|
|
18971
19152
|
id: "aisdlc-increment",
|
|
@@ -18973,7 +19154,7 @@ var LIFECYCLE_SKILL_TEMPLATES = [
|
|
|
18973
19154
|
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.",
|
|
18974
19155
|
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).",
|
|
18975
19156
|
globs: "specs/changes/**, src/**, packages/**, tests/**",
|
|
18976
|
-
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. 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`.\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`.\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-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`.'
|
|
19157
|
+
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`.'
|
|
18977
19158
|
}
|
|
18978
19159
|
];
|
|
18979
19160
|
function renderAntigravitySkillFile(skill) {
|
|
@@ -19809,10 +19990,11 @@ Specifies exchange schemas and canonical interfaces:
|
|
|
19809
19990
|
|
|
19810
19991
|
---
|
|
19811
19992
|
|
|
19812
|
-
## 3. Observability,
|
|
19813
|
-
- **Distributed Tracing**: W3C Trace Context (\`traceparent\`) injection via OpenTelemetry.
|
|
19814
|
-
- **Operational Metrics**: Prometheus RED metrics exposition (Rate, Errors, Duration).
|
|
19815
|
-
- **Structured Logging**: Deterministic
|
|
19993
|
+
## 3. Observability, Persistent Telemetry, and Immutable Auditing
|
|
19994
|
+
- **Distributed Tracing**: W3C Trace Context (\`traceparent\`) injection via OpenTelemetry with persistent span export (\`.observability/traces/traces.otlp.jsonl\`).
|
|
19995
|
+
- **Operational Metrics**: Prometheus RED metrics exposition (Rate, Errors, Duration) with periodic local snapshots (\`.observability/metrics/metrics.prom\`) for offline backfill and optional Grafana dashboards.
|
|
19996
|
+
- **Structured Logging**: Deterministic JSONL format with mandatory fields (\`timestamp\`, \`level\`, \`trace_id\`, \`component_id\`), PII redaction, and rolling local persistence (\`OBS_STORAGE_PATH\`).
|
|
19997
|
+
- **Offline Export & Shutdown Flush**: Guaranteed \`ITelemetryStore.flush()\` on process exit and \`ITelemetryExporter\` supporting JSONL, CSV, OpenMetrics, and OTLP exports without requiring a live collector.
|
|
19816
19998
|
|
|
19817
19999
|
---
|
|
19818
20000
|
|
|
@@ -20560,10 +20742,15 @@ pipelines:\r
|
|
|
20560
20742
|
- step: *build-and-verify\r
|
|
20561
20743
|
- step: *sdd-integrate\r
|
|
20562
20744
|
`;
|
|
20563
|
-
var
|
|
20745
|
+
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';
|
|
20746
|
+
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";
|
|
20564
20747
|
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';
|
|
20565
|
-
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";
|
|
20748
|
+
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";
|
|
20566
20749
|
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';
|
|
20750
|
+
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";
|
|
20751
|
+
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';
|
|
20752
|
+
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';
|
|
20753
|
+
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";
|
|
20567
20754
|
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';
|
|
20568
20755
|
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';
|
|
20569
20756
|
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';
|
|
@@ -20631,10 +20818,15 @@ var STARTER_BASE_TEMPLATES = [
|
|
|
20631
20818
|
{ relPath: "templates/ci/.gitlab-ci.yml", content: STARTER_TEMPLATES_CI__GITLAB_CI_YML },
|
|
20632
20819
|
{ relPath: "templates/ci/azure-pipelines.yml", content: STARTER_TEMPLATES_CI_AZURE_PIPELINES_YML },
|
|
20633
20820
|
{ relPath: "templates/ci/bitbucket-pipelines.yml", content: STARTER_TEMPLATES_CI_BITBUCKET_PIPELINES_YML },
|
|
20821
|
+
{ relPath: "templates/ci/docker-compose.observability.yml", content: STARTER_TEMPLATES_CI_DOCKER_COMPOSE_OBSERVABILITY_YML },
|
|
20634
20822
|
{ relPath: "templates/ci/github-workflows/ci.yml", content: STARTER_TEMPLATES_CI_GITHUB_WORKFLOWS_CI_YML },
|
|
20635
20823
|
{ relPath: "templates/ci/github-workflows/deploy-dashboard.yml", content: STARTER_TEMPLATES_CI_GITHUB_WORKFLOWS_DEPLOY_DASHBOARD_YML },
|
|
20636
20824
|
{ relPath: "templates/ci/github-workflows/pr-kpi-summary.yml", content: STARTER_TEMPLATES_CI_GITHUB_WORKFLOWS_PR_KPI_SUMMARY_YML },
|
|
20637
20825
|
{ relPath: "templates/ci/github-workflows/sdd-integrate-on-merge.yml", content: STARTER_TEMPLATES_CI_GITHUB_WORKFLOWS_SDD_INTEGRATE_ON_MERGE_YML },
|
|
20826
|
+
{ relPath: "templates/ci/observability/grafana-datasources.yml", content: STARTER_TEMPLATES_CI_OBSERVABILITY_GRAFANA_DATASOURCES_YML },
|
|
20827
|
+
{ relPath: "templates/ci/observability/prometheus.yml", content: STARTER_TEMPLATES_CI_OBSERVABILITY_PROMETHEUS_YML },
|
|
20828
|
+
{ relPath: "templates/coding-rules/go/.golangci.yml", content: STARTER_TEMPLATES_CODING_RULES_GO__GOLANGCI_YML },
|
|
20829
|
+
{ relPath: "templates/coding-rules/kotlin/detekt.yml", content: STARTER_TEMPLATES_CODING_RULES_KOTLIN_DETEKT_YML },
|
|
20638
20830
|
{ relPath: "templates/compliance/commercial-acquisition-request.template.md", content: STARTER_TEMPLATES_COMPLIANCE_COMMERCIAL_ACQUISITION_REQUEST_TEMPLATE_MD },
|
|
20639
20831
|
{ relPath: "templates/manuals/production-manual.template.md", content: STARTER_TEMPLATES_MANUALS_PRODUCTION_MANUAL_TEMPLATE_MD },
|
|
20640
20832
|
{ relPath: "templates/manuals/user-manual.template.md", content: STARTER_TEMPLATES_MANUALS_USER_MANUAL_TEMPLATE_MD },
|
|
@@ -20920,12 +21112,14 @@ require('../../scripts/guard-branch.cjs');
|
|
|
20920
21112
|
`;
|
|
20921
21113
|
var STARTER_GUARD_BRANCH_CJS = `#!/usr/bin/env node
|
|
20922
21114
|
/**
|
|
20923
|
-
* AI-SDLC: Antigravity PreToolUse Branch &
|
|
21115
|
+
* AI-SDLC: Antigravity PreToolUse Branch, Coding Rules & SDD Increment Guard Hook
|
|
20924
21116
|
* 1. Prevents AI agents from modifying or writing files directly on protected branches (main, master, release/*).
|
|
20925
21117
|
* 2. Prevents AI agents from modifying or weakening deployed coding rules files once created.
|
|
21118
|
+
* 3. Enforces an active SDD increment in specs/changes/active/ before modifying source, test, or Anti-Bypass paths.
|
|
20926
21119
|
*/
|
|
20927
21120
|
|
|
20928
21121
|
const { execSync } = require('child_process');
|
|
21122
|
+
const fs = require('fs');
|
|
20929
21123
|
const path = require('path');
|
|
20930
21124
|
|
|
20931
21125
|
const PROTECTED_CODING_RULES_FILES = [
|
|
@@ -20943,6 +21137,25 @@ const PROTECTED_CODING_RULES_FILES = [
|
|
|
20943
21137
|
'.github/CODEOWNERS',
|
|
20944
21138
|
];
|
|
20945
21139
|
|
|
21140
|
+
const PROTECTED_BYPASS_PATTERNS = [
|
|
21141
|
+
/^schemas\\//i,
|
|
21142
|
+
/^examples\\/security\\//i,
|
|
21143
|
+
/^specs\\/security\\//i,
|
|
21144
|
+
/^specs\\/privacy\\//i,
|
|
21145
|
+
/^packages\\/security\\//i,
|
|
21146
|
+
/enclaves?\\//i,
|
|
21147
|
+
/SEC-ENC-/,
|
|
21148
|
+
/quality-policy\\.ya?ml$/i,
|
|
21149
|
+
/license-policy\\.ya?ml$/i,
|
|
21150
|
+
/privacy-policy\\.ya?ml$/i,
|
|
21151
|
+
/08_security_concept\\.md$/i,
|
|
21152
|
+
/09_decisions\\//i,
|
|
21153
|
+
/migrations?\\//i,
|
|
21154
|
+
/^\\.github\\/CODEOWNERS$/,
|
|
21155
|
+
];
|
|
21156
|
+
|
|
21157
|
+
const STANDARD_SDD_ARTIFACTS = ['spec.md', 'design.md', 'tasks.md', 'handoff.yaml'];
|
|
21158
|
+
|
|
20946
21159
|
function getWorkingBranch(cwd) {
|
|
20947
21160
|
try {
|
|
20948
21161
|
const sym = execSync('git symbolic-ref --short HEAD', {
|
|
@@ -20967,18 +21180,134 @@ function getWorkingBranch(cwd) {
|
|
|
20967
21180
|
function isProtectedCodingRulesTarget(targetPath, cwd) {
|
|
20968
21181
|
if (!targetPath) return false;
|
|
20969
21182
|
const resolved = path.resolve(cwd, targetPath);
|
|
20970
|
-
|
|
20971
21183
|
const norm = resolved.replace(/\\\\/g, '/');
|
|
20972
21184
|
const rel = path.relative(cwd, resolved).replace(/\\\\/g, '/');
|
|
20973
|
-
return
|
|
20974
|
-
|
|
20975
|
-
|
|
21185
|
+
return (
|
|
21186
|
+
PROTECTED_CODING_RULES_FILES.some(
|
|
21187
|
+
(ruleFile) => rel === ruleFile || norm.endsWith('/' + ruleFile)
|
|
21188
|
+
) || rel.startsWith('templates/coding-rules/')
|
|
21189
|
+
);
|
|
21190
|
+
}
|
|
21191
|
+
|
|
21192
|
+
function isSourceOrTestTarget(relPath) {
|
|
21193
|
+
if (!relPath) return false;
|
|
21194
|
+
return /^(src|lib|packages|tests)\\//.test(relPath.replace(/\\\\/g, '/'));
|
|
21195
|
+
}
|
|
21196
|
+
|
|
21197
|
+
function isProtectedBypassPath(relPath) {
|
|
21198
|
+
if (!relPath) return false;
|
|
21199
|
+
const norm = relPath.replace(/\\\\/g, '/');
|
|
21200
|
+
return PROTECTED_BYPASS_PATTERNS.some((re) => re.test(norm));
|
|
21201
|
+
}
|
|
21202
|
+
|
|
21203
|
+
function detectChangeDirProfile(changeDir) {
|
|
21204
|
+
for (const fileName of ['spec.md', 'proposal.md', 'handoff.yaml']) {
|
|
21205
|
+
const fullPath = path.join(changeDir, fileName);
|
|
21206
|
+
if (!fs.existsSync(fullPath)) continue;
|
|
21207
|
+
try {
|
|
21208
|
+
const content = fs.readFileSync(fullPath, 'utf-8');
|
|
21209
|
+
const match = content.match(/^\\s*profile:\\s*['"]?(patch|standard|critical)['"]?\\s*$/m);
|
|
21210
|
+
if (match) return match[1];
|
|
21211
|
+
} catch {}
|
|
21212
|
+
}
|
|
21213
|
+
return 'standard';
|
|
21214
|
+
}
|
|
21215
|
+
|
|
21216
|
+
function extractBranchChangePrefix(branch) {
|
|
21217
|
+
if (!branch) return '';
|
|
21218
|
+
const match = String(branch).match(/((?:chg|patch)-\\d+)/i);
|
|
21219
|
+
return match ? match[1].toLowerCase() : '';
|
|
21220
|
+
}
|
|
21221
|
+
|
|
21222
|
+
function matchesBranchPrefix(dirName, branchPrefix) {
|
|
21223
|
+
if (!branchPrefix) return true;
|
|
21224
|
+
const lower = dirName.toLowerCase();
|
|
21225
|
+
return lower === branchPrefix || lower.startsWith(branchPrefix + '-');
|
|
21226
|
+
}
|
|
21227
|
+
|
|
21228
|
+
function listActiveChangeDirs(activeRoot, branchPrefix) {
|
|
21229
|
+
if (!fs.existsSync(activeRoot)) return [];
|
|
21230
|
+
try {
|
|
21231
|
+
return fs
|
|
21232
|
+
.readdirSync(activeRoot, { withFileTypes: true })
|
|
21233
|
+
.filter((entry) => entry.isDirectory() && matchesBranchPrefix(entry.name, branchPrefix))
|
|
21234
|
+
.map((entry) => path.join(activeRoot, entry.name));
|
|
21235
|
+
} catch {
|
|
21236
|
+
return [];
|
|
21237
|
+
}
|
|
21238
|
+
}
|
|
21239
|
+
|
|
21240
|
+
function isSatisfiedChangeDir(changeDir, requiresFullSdd) {
|
|
21241
|
+
const profile = detectChangeDirProfile(changeDir);
|
|
21242
|
+
if (profile === 'patch') {
|
|
21243
|
+
return !requiresFullSdd && fs.existsSync(path.join(changeDir, 'spec.md'));
|
|
21244
|
+
}
|
|
21245
|
+
return STANDARD_SDD_ARTIFACTS.every((f) => fs.existsSync(path.join(changeDir, f)));
|
|
21246
|
+
}
|
|
21247
|
+
|
|
21248
|
+
function validateProtectedBypassOnly(candidateDirs, relTargetPath) {
|
|
21249
|
+
const hasPatchCandidate = candidateDirs.some(
|
|
21250
|
+
(dir) => detectChangeDirProfile(dir) === 'patch'
|
|
21251
|
+
);
|
|
21252
|
+
if (hasPatchCandidate) {
|
|
21253
|
+
return {
|
|
21254
|
+
valid: false,
|
|
21255
|
+
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).\`,
|
|
21256
|
+
};
|
|
21257
|
+
}
|
|
21258
|
+
return { valid: true };
|
|
21259
|
+
}
|
|
21260
|
+
|
|
21261
|
+
function validateSourceOrTestEdit(candidateDirs, branchPrefix, relTargetPath, isBypass) {
|
|
21262
|
+
if (candidateDirs.length === 0) {
|
|
21263
|
+
const prefixHint = branchPrefix ? \` matching '\${branchPrefix}'\` : '';
|
|
21264
|
+
return {
|
|
21265
|
+
valid: false,
|
|
21266
|
+
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.\`,
|
|
21267
|
+
};
|
|
21268
|
+
}
|
|
21269
|
+
if (candidateDirs.some((dir) => isSatisfiedChangeDir(dir, isBypass))) {
|
|
21270
|
+
return { valid: true };
|
|
21271
|
+
}
|
|
21272
|
+
if (isBypass) {
|
|
21273
|
+
return {
|
|
21274
|
+
valid: false,
|
|
21275
|
+
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).\`,
|
|
21276
|
+
};
|
|
21277
|
+
}
|
|
21278
|
+
return {
|
|
21279
|
+
valid: false,
|
|
21280
|
+
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.\`,
|
|
21281
|
+
};
|
|
21282
|
+
}
|
|
21283
|
+
|
|
21284
|
+
function hasValidActiveSddIncrement(cwd, branch = '', relTargetPath = 'src/') {
|
|
21285
|
+
if (!relTargetPath || relTargetPath.startsWith('..')) return { valid: true };
|
|
21286
|
+
if (!fs.existsSync(path.join(cwd, 'specs', 'changes'))) return { valid: true };
|
|
21287
|
+
|
|
21288
|
+
const isSourceOrTest = isSourceOrTestTarget(relTargetPath);
|
|
21289
|
+
const isBypass = isProtectedBypassPath(relTargetPath);
|
|
21290
|
+
if (!isSourceOrTest && !isBypass) return { valid: true };
|
|
21291
|
+
|
|
21292
|
+
const branchPrefix = extractBranchChangePrefix(branch);
|
|
21293
|
+
const activeRoot = path.join(cwd, 'specs', 'changes', 'active');
|
|
21294
|
+
const candidateDirs = listActiveChangeDirs(activeRoot, branchPrefix);
|
|
21295
|
+
|
|
21296
|
+
if (!isSourceOrTest) return validateProtectedBypassOnly(candidateDirs, relTargetPath);
|
|
21297
|
+
return validateSourceOrTestEdit(candidateDirs, branchPrefix, relTargetPath, isBypass);
|
|
21298
|
+
}
|
|
21299
|
+
|
|
21300
|
+
function isEphemeralPath(normPath) {
|
|
21301
|
+
return (
|
|
21302
|
+
normPath.includes('/.gemini/') ||
|
|
21303
|
+
normPath.includes('/brain/') ||
|
|
21304
|
+
normPath.includes('/scratch/')
|
|
21305
|
+
);
|
|
20976
21306
|
}
|
|
20977
21307
|
|
|
20978
21308
|
function evaluateGuardDecision(payload) {
|
|
20979
21309
|
const targetPath = payload.toolCall?.args?.Path || '';
|
|
20980
|
-
const
|
|
20981
|
-
const cwd = workspacePaths[0] || process.cwd();
|
|
21310
|
+
const cwd = (payload.workspacePaths || [])[0] || process.cwd();
|
|
20982
21311
|
const resolvedPath = targetPath ? path.resolve(cwd, targetPath) : '';
|
|
20983
21312
|
const normPath = resolvedPath.replace(/\\\\/g, '/');
|
|
20984
21313
|
|
|
@@ -20988,14 +21317,7 @@ function evaluateGuardDecision(payload) {
|
|
|
20988
21317
|
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.\`,
|
|
20989
21318
|
};
|
|
20990
21319
|
}
|
|
20991
|
-
|
|
20992
|
-
if (
|
|
20993
|
-
normPath.includes('/.gemini/') ||
|
|
20994
|
-
normPath.includes('/brain/') ||
|
|
20995
|
-
normPath.includes('/scratch/')
|
|
20996
|
-
) {
|
|
20997
|
-
return { decision: 'allow' };
|
|
20998
|
-
}
|
|
21320
|
+
if (isEphemeralPath(normPath)) return { decision: 'allow' };
|
|
20999
21321
|
|
|
21000
21322
|
const branch = getWorkingBranch(cwd);
|
|
21001
21323
|
if (/^(main|master|release\\/.*)$/.test(branch)) {
|
|
@@ -21005,6 +21327,10 @@ function evaluateGuardDecision(payload) {
|
|
|
21005
21327
|
};
|
|
21006
21328
|
}
|
|
21007
21329
|
|
|
21330
|
+
const relPath = resolvedPath ? path.relative(cwd, resolvedPath).replace(/\\\\/g, '/') : '';
|
|
21331
|
+
const sddCheck = hasValidActiveSddIncrement(cwd, branch, relPath);
|
|
21332
|
+
if (!sddCheck.valid) return { decision: 'deny', reason: sddCheck.reason };
|
|
21333
|
+
|
|
21008
21334
|
return { decision: 'allow' };
|
|
21009
21335
|
}
|
|
21010
21336
|
|
|
@@ -21024,7 +21350,18 @@ function main() {
|
|
|
21024
21350
|
});
|
|
21025
21351
|
}
|
|
21026
21352
|
|
|
21027
|
-
main
|
|
21353
|
+
if (require.main === module) {
|
|
21354
|
+
main();
|
|
21355
|
+
}
|
|
21356
|
+
|
|
21357
|
+
module.exports = {
|
|
21358
|
+
evaluateGuardDecision,
|
|
21359
|
+
hasValidActiveSddIncrement,
|
|
21360
|
+
detectChangeDirProfile,
|
|
21361
|
+
isSourceOrTestTarget,
|
|
21362
|
+
isProtectedBypassPath,
|
|
21363
|
+
isProtectedCodingRulesTarget,
|
|
21364
|
+
};
|
|
21028
21365
|
`;
|
|
21029
21366
|
var STACK_FILE_MAP = {
|
|
21030
21367
|
dotnet: [{ relPath: "Directory.Build.props", content: DOTNET_DIRECTORY_BUILD_PROPS }],
|
|
@@ -21230,6 +21567,9 @@ thresholds:
|
|
|
21230
21567
|
min_acceptable_score: 50.0
|
|
21231
21568
|
function_length:
|
|
21232
21569
|
max_function_lines: 40
|
|
21570
|
+
test_enforcement:
|
|
21571
|
+
require_function_unit_tests: true
|
|
21572
|
+
require_ui_component_tests: true
|
|
21233
21573
|
`;
|
|
21234
21574
|
var STARTER_LICENSE_POLICY = `# ==============================================================================
|
|
21235
21575
|
# AI-SDLC: Open Source License Compliance & Governance Policy
|
|
@@ -24413,6 +24753,8 @@ exports.DEFAULT_EXTENSIONS = DEFAULT_EXTENSIONS;
|
|
|
24413
24753
|
exports.DEFAULT_PRIVACY_POLICY = DEFAULT_PRIVACY_POLICY;
|
|
24414
24754
|
exports.DEFAULT_SAST_EXCLUDES = DEFAULT_SAST_EXCLUDES;
|
|
24415
24755
|
exports.DEFAULT_TEST_ARTIFACT_PATTERNS = DEFAULT_TEST_ARTIFACT_PATTERNS;
|
|
24756
|
+
exports.DEFAULT_UI_COMPONENT_PATTERNS = DEFAULT_UI_COMPONENT_PATTERNS;
|
|
24757
|
+
exports.DEFAULT_UI_TEST_PATTERNS = DEFAULT_UI_TEST_PATTERNS;
|
|
24416
24758
|
exports.DEFAULT_UNIT_TEST_PATTERNS = DEFAULT_UNIT_TEST_PATTERNS;
|
|
24417
24759
|
exports.DOTNET_DIRECTORY_BUILD_PROPS = DOTNET_DIRECTORY_BUILD_PROPS;
|
|
24418
24760
|
exports.DiffDetector = DiffDetector;
|
|
@@ -24539,11 +24881,16 @@ exports.STARTER_SCHEMAS_MAP = STARTER_SCHEMAS_MAP;
|
|
|
24539
24881
|
exports.STARTER_TASK_TEMPLATE = STARTER_TASK_TEMPLATE;
|
|
24540
24882
|
exports.STARTER_TEMPLATES_CI_AZURE_PIPELINES_YML = STARTER_TEMPLATES_CI_AZURE_PIPELINES_YML;
|
|
24541
24883
|
exports.STARTER_TEMPLATES_CI_BITBUCKET_PIPELINES_YML = STARTER_TEMPLATES_CI_BITBUCKET_PIPELINES_YML;
|
|
24884
|
+
exports.STARTER_TEMPLATES_CI_DOCKER_COMPOSE_OBSERVABILITY_YML = STARTER_TEMPLATES_CI_DOCKER_COMPOSE_OBSERVABILITY_YML;
|
|
24542
24885
|
exports.STARTER_TEMPLATES_CI_GITHUB_WORKFLOWS_CI_YML = STARTER_TEMPLATES_CI_GITHUB_WORKFLOWS_CI_YML;
|
|
24543
24886
|
exports.STARTER_TEMPLATES_CI_GITHUB_WORKFLOWS_DEPLOY_DASHBOARD_YML = STARTER_TEMPLATES_CI_GITHUB_WORKFLOWS_DEPLOY_DASHBOARD_YML;
|
|
24544
24887
|
exports.STARTER_TEMPLATES_CI_GITHUB_WORKFLOWS_PR_KPI_SUMMARY_YML = STARTER_TEMPLATES_CI_GITHUB_WORKFLOWS_PR_KPI_SUMMARY_YML;
|
|
24545
24888
|
exports.STARTER_TEMPLATES_CI_GITHUB_WORKFLOWS_SDD_INTEGRATE_ON_MERGE_YML = STARTER_TEMPLATES_CI_GITHUB_WORKFLOWS_SDD_INTEGRATE_ON_MERGE_YML;
|
|
24889
|
+
exports.STARTER_TEMPLATES_CI_OBSERVABILITY_GRAFANA_DATASOURCES_YML = STARTER_TEMPLATES_CI_OBSERVABILITY_GRAFANA_DATASOURCES_YML;
|
|
24890
|
+
exports.STARTER_TEMPLATES_CI_OBSERVABILITY_PROMETHEUS_YML = STARTER_TEMPLATES_CI_OBSERVABILITY_PROMETHEUS_YML;
|
|
24546
24891
|
exports.STARTER_TEMPLATES_CI__GITLAB_CI_YML = STARTER_TEMPLATES_CI__GITLAB_CI_YML;
|
|
24892
|
+
exports.STARTER_TEMPLATES_CODING_RULES_GO__GOLANGCI_YML = STARTER_TEMPLATES_CODING_RULES_GO__GOLANGCI_YML;
|
|
24893
|
+
exports.STARTER_TEMPLATES_CODING_RULES_KOTLIN_DETEKT_YML = STARTER_TEMPLATES_CODING_RULES_KOTLIN_DETEKT_YML;
|
|
24547
24894
|
exports.STARTER_TEMPLATES_COMPLIANCE_COMMERCIAL_ACQUISITION_REQUEST_TEMPLATE_MD = STARTER_TEMPLATES_COMPLIANCE_COMMERCIAL_ACQUISITION_REQUEST_TEMPLATE_MD;
|
|
24548
24895
|
exports.STARTER_TEMPLATES_MANUALS_PRODUCTION_MANUAL_TEMPLATE_MD = STARTER_TEMPLATES_MANUALS_PRODUCTION_MANUAL_TEMPLATE_MD;
|
|
24549
24896
|
exports.STARTER_TEMPLATES_MANUALS_USER_MANUAL_TEMPLATE_MD = STARTER_TEMPLATES_MANUALS_USER_MANUAL_TEMPLATE_MD;
|
|
@@ -24623,6 +24970,7 @@ exports.classifyMetricFromMessage = classifyMetricFromMessage;
|
|
|
24623
24970
|
exports.collectAgentFiles = collectAgentFiles;
|
|
24624
24971
|
exports.collectDashboardMetrics = collectDashboardMetrics;
|
|
24625
24972
|
exports.collectHistoricalKpis = collectHistoricalKpis;
|
|
24973
|
+
exports.compilePatternList = compilePatternList;
|
|
24626
24974
|
exports.compileTestPatterns = compileTestPatterns;
|
|
24627
24975
|
exports.computeAgentPerformanceKpis = computeAgentPerformanceKpis;
|
|
24628
24976
|
exports.computeCanonicalSha256 = computeCanonicalSha256;
|
|
@@ -24731,6 +25079,8 @@ exports.isReviewerRole = isReviewerRole;
|
|
|
24731
25079
|
exports.isSemgrepInstalled = isSemgrepInstalled;
|
|
24732
25080
|
exports.isToolAvailable = isToolAvailable;
|
|
24733
25081
|
exports.isToolInstalled = isToolInstalled;
|
|
25082
|
+
exports.isUiComponentFile = isUiComponentFile;
|
|
25083
|
+
exports.isUiTestFile = isUiTestFile;
|
|
24734
25084
|
exports.isUncOrEmptyPath = isUncOrEmptyPath;
|
|
24735
25085
|
exports.loadDlpPolicy = loadDlpPolicy;
|
|
24736
25086
|
exports.loadPrivacyPolicy = loadPrivacyPolicy;
|