@aisdlc/core 3.4.1 → 4.0.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 +265 -327
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +25 -22
- package/dist/index.d.ts +25 -22
- package/dist/index.js +263 -328
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -23,7 +23,7 @@ function canonicalSort(a, b) {
|
|
|
23
23
|
function normalizePath(p) {
|
|
24
24
|
return p.normalize("NFC").replace(/\\/g, "/");
|
|
25
25
|
}
|
|
26
|
-
|
|
26
|
+
var DEFAULT_EXCLUDE_DIRS = [
|
|
27
27
|
"node_modules",
|
|
28
28
|
".git",
|
|
29
29
|
"dist",
|
|
@@ -47,7 +47,8 @@ function walkMdFiles(dir, fileList = [], excludeDirs = [
|
|
|
47
47
|
".vscode",
|
|
48
48
|
".vs",
|
|
49
49
|
".idea"
|
|
50
|
-
]
|
|
50
|
+
];
|
|
51
|
+
function walkMdFiles(dir, fileList = [], excludeDirs = DEFAULT_EXCLUDE_DIRS) {
|
|
51
52
|
try {
|
|
52
53
|
if (!fs9.existsSync(dir)) return fileList;
|
|
53
54
|
const files = fs9.readdirSync(dir).sort(canonicalSort);
|
|
@@ -10624,48 +10625,69 @@ function ensureBranchInCascade(branch, parentBranch, rootDir) {
|
|
|
10624
10625
|
}
|
|
10625
10626
|
return true;
|
|
10626
10627
|
}
|
|
10628
|
+
function switchBranch(branch, rootDir) {
|
|
10629
|
+
execFileSync("git", ["checkout", branch], { cwd: rootDir, stdio: ["pipe", "pipe", "pipe"] });
|
|
10630
|
+
}
|
|
10631
|
+
function cascadeBranchCheckout(hierarchy, rootDir, created, streamlined) {
|
|
10632
|
+
if (streamlined) {
|
|
10633
|
+
if (ensureBranchInCascade(hierarchy.featureBranch, hierarchy.baseBranch, rootDir)) created.push(hierarchy.featureBranch);
|
|
10634
|
+
switchBranch(hierarchy.featureBranch, rootDir);
|
|
10635
|
+
return hierarchy.featureBranch;
|
|
10636
|
+
}
|
|
10637
|
+
if (ensureBranchInCascade(hierarchy.releaseBranch, hierarchy.baseBranch, rootDir)) created.push(hierarchy.releaseBranch);
|
|
10638
|
+
if (ensureBranchInCascade(hierarchy.featureBranch, hierarchy.releaseBranch, rootDir)) created.push(hierarchy.featureBranch);
|
|
10639
|
+
if (ensureBranchInCascade(hierarchy.taskBranch, hierarchy.featureBranch, rootDir)) created.push(hierarchy.taskBranch);
|
|
10640
|
+
switchBranch(hierarchy.taskBranch, rootDir);
|
|
10641
|
+
return hierarchy.taskBranch;
|
|
10642
|
+
}
|
|
10643
|
+
function buildCheckoutErrorResult(match, hierarchy, created, err) {
|
|
10644
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
10645
|
+
return {
|
|
10646
|
+
success: false,
|
|
10647
|
+
taskId: match.taskId,
|
|
10648
|
+
changeId: match.changeId,
|
|
10649
|
+
releaseBranch: hierarchy.releaseBranch,
|
|
10650
|
+
featureBranch: hierarchy.featureBranch,
|
|
10651
|
+
taskBranch: hierarchy.taskBranch,
|
|
10652
|
+
createdBranches: created,
|
|
10653
|
+
error: `Error durante la creaci\xF3n o checkout de ramas Git: ${message}`
|
|
10654
|
+
};
|
|
10655
|
+
}
|
|
10656
|
+
function buildLocateFailureResult(taskId, locateRes) {
|
|
10657
|
+
return {
|
|
10658
|
+
success: false,
|
|
10659
|
+
taskId,
|
|
10660
|
+
createdBranches: [],
|
|
10661
|
+
error: locateRes.error,
|
|
10662
|
+
availableTasks: locateRes.availableTasks
|
|
10663
|
+
};
|
|
10664
|
+
}
|
|
10665
|
+
function buildCheckoutSuccessResult(match, hierarchy, created, switchedBranch, streamlined) {
|
|
10666
|
+
return {
|
|
10667
|
+
success: true,
|
|
10668
|
+
taskId: match.taskId,
|
|
10669
|
+
changeId: match.changeId,
|
|
10670
|
+
releaseBranch: hierarchy.releaseBranch,
|
|
10671
|
+
featureBranch: hierarchy.featureBranch,
|
|
10672
|
+
taskBranch: streamlined ? void 0 : hierarchy.taskBranch,
|
|
10673
|
+
createdBranches: created,
|
|
10674
|
+
switchedBranch
|
|
10675
|
+
};
|
|
10676
|
+
}
|
|
10627
10677
|
function checkoutTaskBranch(taskId, options = {}) {
|
|
10628
10678
|
const rootDir = options.rootDir || process.cwd();
|
|
10629
10679
|
const locateRes = locateTaskInActiveChanges(taskId, rootDir);
|
|
10630
10680
|
if (!locateRes.found || !locateRes.match) {
|
|
10631
|
-
return
|
|
10632
|
-
success: false,
|
|
10633
|
-
taskId,
|
|
10634
|
-
createdBranches: [],
|
|
10635
|
-
error: locateRes.error,
|
|
10636
|
-
availableTasks: locateRes.availableTasks
|
|
10637
|
-
};
|
|
10681
|
+
return buildLocateFailureResult(taskId, locateRes);
|
|
10638
10682
|
}
|
|
10639
10683
|
const match = locateRes.match;
|
|
10640
|
-
const
|
|
10641
|
-
const
|
|
10684
|
+
const hierarchy = resolveBranchHierarchy(match, rootDir);
|
|
10685
|
+
const created = [];
|
|
10642
10686
|
try {
|
|
10643
|
-
|
|
10644
|
-
|
|
10645
|
-
if (ensureBranchInCascade(taskBranch, featureBranch, rootDir)) createdBranches.push(taskBranch);
|
|
10646
|
-
execFileSync("git", ["checkout", taskBranch], { cwd: rootDir, stdio: ["pipe", "pipe", "pipe"] });
|
|
10647
|
-
return {
|
|
10648
|
-
success: true,
|
|
10649
|
-
taskId: match.taskId,
|
|
10650
|
-
changeId: match.changeId,
|
|
10651
|
-
releaseBranch,
|
|
10652
|
-
featureBranch,
|
|
10653
|
-
taskBranch,
|
|
10654
|
-
createdBranches,
|
|
10655
|
-
switchedBranch: taskBranch
|
|
10656
|
-
};
|
|
10687
|
+
const switched = cascadeBranchCheckout(hierarchy, rootDir, created, options.streamlined);
|
|
10688
|
+
return buildCheckoutSuccessResult(match, hierarchy, created, switched, options.streamlined);
|
|
10657
10689
|
} catch (err) {
|
|
10658
|
-
|
|
10659
|
-
return {
|
|
10660
|
-
success: false,
|
|
10661
|
-
taskId: match.taskId,
|
|
10662
|
-
changeId: match.changeId,
|
|
10663
|
-
releaseBranch,
|
|
10664
|
-
featureBranch,
|
|
10665
|
-
taskBranch,
|
|
10666
|
-
createdBranches,
|
|
10667
|
-
error: `Error durante la creaci\xF3n o checkout de ramas Git: ${message}`
|
|
10668
|
-
};
|
|
10690
|
+
return buildCheckoutErrorResult(match, hierarchy, created, err);
|
|
10669
10691
|
}
|
|
10670
10692
|
}
|
|
10671
10693
|
var TRAILER_REGEXES = {
|
|
@@ -10691,18 +10713,21 @@ function resolveAuthorType(authorTypeMatch, aiModelMatch) {
|
|
|
10691
10713
|
}
|
|
10692
10714
|
return "human";
|
|
10693
10715
|
}
|
|
10716
|
+
function resolveTrailerOrScope(match, text, fallbackRegex) {
|
|
10717
|
+
if (match) return match[1].trim();
|
|
10718
|
+
const subMatch = text.match(fallbackRegex);
|
|
10719
|
+
return subMatch ? subMatch[1].toUpperCase() : void 0;
|
|
10720
|
+
}
|
|
10694
10721
|
function parseCommitTrailers(rawMessage) {
|
|
10695
10722
|
const text = rawMessage || "";
|
|
10696
|
-
const taskIdMatch = text.match(TRAILER_REGEXES.taskId);
|
|
10697
|
-
const parentRefMatch = text.match(TRAILER_REGEXES.parentRef);
|
|
10698
10723
|
const authorTypeMatch = text.match(TRAILER_REGEXES.authorType);
|
|
10699
10724
|
const aiModelMatch = text.match(TRAILER_REGEXES.aiModel);
|
|
10700
10725
|
const authorType = resolveAuthorType(authorTypeMatch, aiModelMatch);
|
|
10701
10726
|
const rawModel = aiModelMatch ? aiModelMatch[1].trim() : void 0;
|
|
10702
10727
|
const aiModel = rawModel && rawModel !== "n/a" ? rawModel : void 0;
|
|
10703
10728
|
return {
|
|
10704
|
-
taskId:
|
|
10705
|
-
parentRef:
|
|
10729
|
+
taskId: resolveTrailerOrScope(text.match(TRAILER_REGEXES.taskId), text, /\b(TSK-[0-9A-Za-z_-]+)\b/i),
|
|
10730
|
+
parentRef: resolveTrailerOrScope(text.match(TRAILER_REGEXES.parentRef), text, /\b((?:CHG|FEAT|BUG|FIX|PATCH)-[0-9A-Za-z_-]+)\b/i),
|
|
10706
10731
|
authorType,
|
|
10707
10732
|
aiModel,
|
|
10708
10733
|
promptTokens: parseTrailerInt(text.match(TRAILER_REGEXES.promptTokens)),
|
|
@@ -11105,7 +11130,17 @@ fi
|
|
|
11105
11130
|
# Extract Task-ID and Parent-Ref from 4-tier branch hierarchy
|
|
11106
11131
|
# Patterns: task/<PARENT-ID>/<TSK-ID>-slug | feat/<FEAT-ID>-slug | bug/<BUG-ID>-slug
|
|
11107
11132
|
TASK_ID=$(echo "$CURRENT_BRANCH" | grep -oE "TSK-[0-9A-Za-z-]+" || echo "")
|
|
11133
|
+
if [ -z "$TASK_ID" ]; then
|
|
11134
|
+
TASK_ID=$(head -n 1 "$COMMIT_MSG_FILE" 2>/dev/null | grep -oE "TSK-[0-9A-Za-z_-]+" | head -n 1 || echo "")
|
|
11135
|
+
fi
|
|
11136
|
+
if [ -z "$TASK_ID" ] && [ -f "$TELEMETRY_FILE" ]; then
|
|
11137
|
+
TASK_ID=$(grep -oE '"taskId"s*:s*"[^"]+"' "$TELEMETRY_FILE" 2>/dev/null | sed -E 's/.*"taskId"s*:s*"([^"]+)".*/\\1/' || echo "")
|
|
11138
|
+
fi
|
|
11139
|
+
|
|
11108
11140
|
PARENT_REF=$(echo "$CURRENT_BRANCH" | grep -oE "(CHG|FEAT|BUG|FIX|PATCH)-[0-9A-Za-z-]+" | head -n 1 || echo "")
|
|
11141
|
+
if [ -z "$PARENT_REF" ]; then
|
|
11142
|
+
PARENT_REF=$(head -n 1 "$COMMIT_MSG_FILE" 2>/dev/null | grep -oE "(CHG|FEAT|BUG|FIX|PATCH)-[0-9A-Za-z_-]+" | head -n 1 || echo "")
|
|
11143
|
+
fi
|
|
11109
11144
|
|
|
11110
11145
|
TELEMETRY_FILE=".ai-sdlc/session-telemetry.json"
|
|
11111
11146
|
AUTHOR_TYPE="human"
|
|
@@ -11245,51 +11280,105 @@ function accumulateRecord(target, record) {
|
|
|
11245
11280
|
target.completionTokens += record.trailers.completionTokens;
|
|
11246
11281
|
target.estimatedCostUsd = calculateEstimatedCost(target.promptTokens, target.completionTokens);
|
|
11247
11282
|
}
|
|
11248
|
-
function
|
|
11249
|
-
|
|
11250
|
-
|
|
11251
|
-
let
|
|
11252
|
-
let
|
|
11253
|
-
let
|
|
11254
|
-
let totalPrompt = 0;
|
|
11255
|
-
let totalCompletion = 0;
|
|
11283
|
+
function accumulateAuthorSummaries(records, humanSummary, byModel) {
|
|
11284
|
+
let linesAdded = 0;
|
|
11285
|
+
let linesDeleted = 0;
|
|
11286
|
+
let activeTime = 0;
|
|
11287
|
+
let prompt = 0;
|
|
11288
|
+
let completion = 0;
|
|
11256
11289
|
let isBugPr = false;
|
|
11257
11290
|
for (const record of records) {
|
|
11258
|
-
|
|
11259
|
-
|
|
11260
|
-
|
|
11261
|
-
|
|
11262
|
-
|
|
11291
|
+
linesAdded += record.linesAdded;
|
|
11292
|
+
linesDeleted += record.linesDeleted;
|
|
11293
|
+
activeTime += record.trailers.activeTimeSeconds;
|
|
11294
|
+
prompt += record.trailers.promptTokens;
|
|
11295
|
+
completion += record.trailers.completionTokens;
|
|
11263
11296
|
if (record.isBugFix) isBugPr = true;
|
|
11264
11297
|
if (record.trailers.authorType === "agent") {
|
|
11265
11298
|
const modelName = record.trailers.aiModel || "agent-generic";
|
|
11266
|
-
if (!byModel[modelName])
|
|
11267
|
-
byModel[modelName] = createEmptySummary();
|
|
11268
|
-
}
|
|
11299
|
+
if (!byModel[modelName]) byModel[modelName] = createEmptySummary();
|
|
11269
11300
|
accumulateRecord(byModel[modelName], record);
|
|
11270
11301
|
} else {
|
|
11271
11302
|
accumulateRecord(humanSummary, record);
|
|
11272
11303
|
}
|
|
11273
11304
|
}
|
|
11274
|
-
|
|
11275
|
-
|
|
11305
|
+
return { linesAdded, linesDeleted, activeTime, prompt, completion, isBugPr };
|
|
11306
|
+
}
|
|
11307
|
+
function initTaskKpi(taskId) {
|
|
11308
|
+
return {
|
|
11309
|
+
taskId,
|
|
11310
|
+
commits: 0,
|
|
11311
|
+
fixCommits: 0,
|
|
11312
|
+
linesAdded: 0,
|
|
11313
|
+
linesDeleted: 0,
|
|
11314
|
+
codeChurnPercent: 0,
|
|
11315
|
+
totalTokens: 0,
|
|
11316
|
+
activeTimeSeconds: 0,
|
|
11317
|
+
reworkTokens: 0,
|
|
11318
|
+
reworkTokensPercent: 0,
|
|
11319
|
+
reworkTimeSeconds: 0,
|
|
11320
|
+
reworkTimePercent: 0,
|
|
11321
|
+
isFirstTimeRight: true
|
|
11322
|
+
};
|
|
11323
|
+
}
|
|
11324
|
+
function processTaskCommit(tStat, record) {
|
|
11325
|
+
const recTokens = record.trailers.promptTokens + record.trailers.completionTokens;
|
|
11326
|
+
tStat.commits += 1;
|
|
11327
|
+
tStat.linesAdded += record.linesAdded;
|
|
11328
|
+
tStat.linesDeleted += record.linesDeleted;
|
|
11329
|
+
tStat.totalTokens += recTokens;
|
|
11330
|
+
tStat.activeTimeSeconds += record.trailers.activeTimeSeconds;
|
|
11331
|
+
const isRework = record.isBugFix || /^(fix|bug|remediate|refactor)(([^)]+))?:/i.test((record.subject || "").trim());
|
|
11332
|
+
if (isRework) {
|
|
11333
|
+
tStat.fixCommits += 1;
|
|
11334
|
+
tStat.reworkTokens += recTokens;
|
|
11335
|
+
tStat.reworkTimeSeconds += record.trailers.activeTimeSeconds;
|
|
11336
|
+
}
|
|
11337
|
+
}
|
|
11338
|
+
function accumulateTaskSummaries(records) {
|
|
11339
|
+
const byTask = {};
|
|
11340
|
+
for (const record of records) {
|
|
11341
|
+
const tid = record.trailers.taskId || record.subject.match(/\b(TSK-[0-9A-Za-z_-]+)\b/i)?.[1]?.toUpperCase();
|
|
11342
|
+
if (!tid) continue;
|
|
11343
|
+
if (!byTask[tid]) byTask[tid] = initTaskKpi(tid);
|
|
11344
|
+
processTaskCommit(byTask[tid], record);
|
|
11345
|
+
}
|
|
11346
|
+
for (const t of Object.values(byTask)) {
|
|
11347
|
+
const churn = t.linesAdded > 0 ? t.linesDeleted / t.linesAdded * 100 : 0;
|
|
11348
|
+
t.codeChurnPercent = Math.round(Math.min(churn, 100) * 10) / 10;
|
|
11349
|
+
t.reworkTokensPercent = t.totalTokens > 0 ? Math.round(t.reworkTokens / t.totalTokens * 1e3) / 10 : 0;
|
|
11350
|
+
t.reworkTimePercent = t.activeTimeSeconds > 0 ? Math.round(t.reworkTimeSeconds / t.activeTimeSeconds * 1e3) / 10 : 0;
|
|
11351
|
+
t.isFirstTimeRight = t.fixCommits === 0 && t.codeChurnPercent < 25;
|
|
11352
|
+
}
|
|
11353
|
+
return byTask;
|
|
11354
|
+
}
|
|
11355
|
+
function assemblePrKpiAggregation(baseRef, headRef, records, totals, humanSummary, byModel, byTask) {
|
|
11356
|
+
const totalTokens = totals.prompt + totals.completion;
|
|
11276
11357
|
return {
|
|
11277
11358
|
baseRef,
|
|
11278
11359
|
headRef,
|
|
11279
11360
|
totalCommits: records.length,
|
|
11280
|
-
linesAdded:
|
|
11281
|
-
linesDeleted:
|
|
11282
|
-
totalActiveTimeSeconds:
|
|
11283
|
-
totalPromptTokens:
|
|
11284
|
-
totalCompletionTokens:
|
|
11361
|
+
linesAdded: totals.linesAdded,
|
|
11362
|
+
linesDeleted: totals.linesDeleted,
|
|
11363
|
+
totalActiveTimeSeconds: totals.activeTime,
|
|
11364
|
+
totalPromptTokens: totals.prompt,
|
|
11365
|
+
totalCompletionTokens: totals.completion,
|
|
11285
11366
|
totalTokens,
|
|
11286
|
-
estimatedCostUsd,
|
|
11367
|
+
estimatedCostUsd: calculateEstimatedCost(totals.prompt, totals.completion),
|
|
11287
11368
|
humanSummary,
|
|
11288
11369
|
byModel,
|
|
11289
|
-
isBugPr,
|
|
11290
|
-
commitRecords: records
|
|
11370
|
+
isBugPr: totals.isBugPr,
|
|
11371
|
+
commitRecords: records,
|
|
11372
|
+
byTask
|
|
11291
11373
|
};
|
|
11292
11374
|
}
|
|
11375
|
+
function aggregateCommitKpiRecords(records, baseRef = "main", headRef = "HEAD") {
|
|
11376
|
+
const humanSummary = createEmptySummary();
|
|
11377
|
+
const byModel = {};
|
|
11378
|
+
const totals = accumulateAuthorSummaries(records, humanSummary, byModel);
|
|
11379
|
+
const byTask = accumulateTaskSummaries(records);
|
|
11380
|
+
return assemblePrKpiAggregation(baseRef, headRef, records, totals, humanSummary, byModel, byTask);
|
|
11381
|
+
}
|
|
11293
11382
|
function aggregatePrKpis(baseRef, headRef = "HEAD", options = {}) {
|
|
11294
11383
|
const records = extractCommitKpisFromRange(baseRef, headRef, options);
|
|
11295
11384
|
return aggregateCommitKpiRecords(records, baseRef, headRef);
|
|
@@ -11298,12 +11387,7 @@ function formatMinutes(seconds) {
|
|
|
11298
11387
|
const mins = Math.round(seconds / 60);
|
|
11299
11388
|
return mins > 0 ? `${mins} min` : `${seconds}s`;
|
|
11300
11389
|
}
|
|
11301
|
-
function
|
|
11302
|
-
const models = Object.keys(kpi.byModel);
|
|
11303
|
-
const modelHeaders = models.map((m) => `Agent (${m})`).join(" | ");
|
|
11304
|
-
const modelSeparator = models.map(() => ":---:").join(" | ");
|
|
11305
|
-
const headers = `| Metric | Human |${models.length > 0 ? ` ${modelHeaders} |` : ""} Total PR |`;
|
|
11306
|
-
const sep2 = `| :--- | :---: |${models.length > 0 ? ` ${modelSeparator} |` : ""} :---: |`;
|
|
11390
|
+
function buildPrKpiRows(kpi, models) {
|
|
11307
11391
|
const human = kpi.humanSummary;
|
|
11308
11392
|
const commitCols = models.map((m) => kpi.byModel[m].commits).join(" | ");
|
|
11309
11393
|
const linesCols = models.map((m) => `+${kpi.byModel[m].linesAdded} / -${kpi.byModel[m].linesDeleted}`).join(" | ");
|
|
@@ -11314,13 +11398,41 @@ function formatPrKpiMarkdown(kpi) {
|
|
|
11314
11398
|
const totalTime = formatMinutes(kpi.totalActiveTimeSeconds);
|
|
11315
11399
|
const totalTokensStr = `${kpi.totalTokens.toLocaleString("en-US")} tokens`;
|
|
11316
11400
|
const totalCostStr = `$${kpi.estimatedCostUsd.toFixed(2)} USD`;
|
|
11317
|
-
|
|
11401
|
+
return [
|
|
11318
11402
|
`| **Commits** | ${human.commits} |${models.length > 0 ? ` ${commitCols} |` : ""} **${kpi.totalCommits}** |`,
|
|
11319
11403
|
`| **Lines Added / Deleted** | +${human.linesAdded} / -${human.linesDeleted} |${models.length > 0 ? ` ${linesCols} |` : ""} **${totalLines}** |`,
|
|
11320
11404
|
`| **Active Development Time** | ${formatMinutes(human.activeTimeSeconds)} |${models.length > 0 ? ` ${timeCols} |` : ""} **${totalTime}** |`,
|
|
11321
11405
|
`| **Tokens Consumed (In+Out)** | 0 |${models.length > 0 ? ` ${tokenCols} |` : ""} **${totalTokensStr}** |`,
|
|
11322
11406
|
`| **Estimated Cost (USD)** | \u2014 (Human labor) |${models.length > 0 ? ` ${costCols} |` : ""} **${totalCostStr}** |`
|
|
11323
11407
|
];
|
|
11408
|
+
}
|
|
11409
|
+
function formatTaskKpiRows(byTask) {
|
|
11410
|
+
const taskIds = Object.keys(byTask || {});
|
|
11411
|
+
if (taskIds.length === 0) return [];
|
|
11412
|
+
const rows = [
|
|
11413
|
+
"",
|
|
11414
|
+
"#### \u{1F4CB} Task-Level Rework & Code Churn Breakdown",
|
|
11415
|
+
"",
|
|
11416
|
+
"| Task ID | Commits (Total / Fix) | Lines (+ / -) | Code Churn % | Rework Tokens % | Rework Time % | Status |",
|
|
11417
|
+
"| :--- | :---: | :---: | :---: | :---: | :---: | :---: |"
|
|
11418
|
+
];
|
|
11419
|
+
for (const tid of taskIds) {
|
|
11420
|
+
const t = byTask[tid];
|
|
11421
|
+
const statusLabel = t.isFirstTimeRight ? "\u2714 First-Time-Right" : `\u26A0 ${t.fixCommits} rework commit${t.fixCommits === 1 ? "" : "s"}`;
|
|
11422
|
+
rows.push(
|
|
11423
|
+
`| \`${t.taskId}\` | ${t.commits} (${t.fixCommits} fix) | +${t.linesAdded} / -${t.linesDeleted} | ${t.codeChurnPercent}% | ${t.reworkTokensPercent}% | ${t.reworkTimePercent}% | ${statusLabel} |`
|
|
11424
|
+
);
|
|
11425
|
+
}
|
|
11426
|
+
return rows;
|
|
11427
|
+
}
|
|
11428
|
+
function formatPrKpiMarkdown(kpi) {
|
|
11429
|
+
const models = Object.keys(kpi.byModel);
|
|
11430
|
+
const modelHeaders = models.map((m) => `Agent (${m})`).join(" | ");
|
|
11431
|
+
const modelSeparator = models.map(() => ":---:").join(" | ");
|
|
11432
|
+
const headers = `| Metric | Human |${models.length > 0 ? ` ${modelHeaders} |` : ""} Total PR |`;
|
|
11433
|
+
const sep2 = `| :--- | :---: |${models.length > 0 ? ` ${modelSeparator} |` : ""} :---: |`;
|
|
11434
|
+
const rows = buildPrKpiRows(kpi, models);
|
|
11435
|
+
const taskRowsList = formatTaskKpiRows(kpi.byTask);
|
|
11324
11436
|
return [
|
|
11325
11437
|
KPI_SUMMARY_START_TAG,
|
|
11326
11438
|
"### \u{1F4CA} AI-SDLC: Aggregated PR KPI Summary",
|
|
@@ -11328,6 +11440,7 @@ function formatPrKpiMarkdown(kpi) {
|
|
|
11328
11440
|
headers,
|
|
11329
11441
|
sep2,
|
|
11330
11442
|
...rows,
|
|
11443
|
+
...taskRowsList,
|
|
11331
11444
|
"",
|
|
11332
11445
|
`> **Branch Attribution:** ${kpi.isBugPr ? "\u{1F6A8} *Defect Fix / Bugfix*" : "\u2728 *New Feature*"} (Range: \`${kpi.baseRef}..${kpi.headRef}\`)`,
|
|
11333
11446
|
KPI_SUMMARY_END_TAG
|
|
@@ -11456,6 +11569,31 @@ function resolveReleaseBaseBranch(release, explicitBase, options = {}) {
|
|
|
11456
11569
|
}
|
|
11457
11570
|
return release;
|
|
11458
11571
|
}
|
|
11572
|
+
function assembleReleaseReport(refs, totals, costs, stats) {
|
|
11573
|
+
return {
|
|
11574
|
+
releaseBranch: refs.release,
|
|
11575
|
+
baseBranch: refs.base,
|
|
11576
|
+
generatedAt: (/* @__PURE__ */ new Date()).toISOString(),
|
|
11577
|
+
totalCommits: refs.commitCount,
|
|
11578
|
+
totalLinesAdded: totals.linesAdded,
|
|
11579
|
+
totalLinesDeleted: totals.linesDeleted,
|
|
11580
|
+
totalKloc: stats.totalKloc,
|
|
11581
|
+
totalBugs: stats.bugList.length,
|
|
11582
|
+
globalDefectDensity: stats.globalDefectDensity,
|
|
11583
|
+
totalTimeSeconds: totals.time,
|
|
11584
|
+
totalTokens: totals.tokens,
|
|
11585
|
+
totalCostUsd: costs.totalCost,
|
|
11586
|
+
reworkTimeSeconds: totals.reworkTime,
|
|
11587
|
+
reworkTokens: totals.reworkTokens,
|
|
11588
|
+
reworkCostUsd: costs.reworkCost,
|
|
11589
|
+
reworkTimePercent: costs.ratios.timePercent,
|
|
11590
|
+
reworkTokensPercent: costs.ratios.tokensPercent,
|
|
11591
|
+
reworkCostPercent: costs.ratios.costPercent,
|
|
11592
|
+
authorStats: stats.authorStats,
|
|
11593
|
+
bugList: stats.bugList,
|
|
11594
|
+
taskReworkStats: Object.values(stats.taskMap)
|
|
11595
|
+
};
|
|
11596
|
+
}
|
|
11459
11597
|
function aggregateReleaseKpis(releaseBranch, baseBranch, options = {}) {
|
|
11460
11598
|
const cwd = options.cwd || process.cwd();
|
|
11461
11599
|
const effectiveBase = resolveReleaseBaseBranch(releaseBranch, baseBranch, { cwd });
|
|
@@ -11470,38 +11608,48 @@ function aggregateReleaseKpis(releaseBranch, baseBranch, options = {}) {
|
|
|
11470
11608
|
}
|
|
11471
11609
|
const authorStats = finalizeAuthorStats(statsMap);
|
|
11472
11610
|
const totalKloc = Math.round((totals.linesAdded + totals.linesDeleted) / 1e3 * 100) / 100;
|
|
11473
|
-
const
|
|
11474
|
-
const
|
|
11475
|
-
const
|
|
11476
|
-
const
|
|
11477
|
-
const
|
|
11478
|
-
return
|
|
11479
|
-
|
|
11480
|
-
|
|
11481
|
-
|
|
11482
|
-
|
|
11483
|
-
|
|
11484
|
-
totalLinesDeleted: totals.linesDeleted,
|
|
11485
|
-
totalKloc,
|
|
11486
|
-
totalBugs,
|
|
11487
|
-
globalDefectDensity,
|
|
11488
|
-
totalTimeSeconds: totals.time,
|
|
11489
|
-
totalTokens: totals.tokens,
|
|
11490
|
-
totalCostUsd,
|
|
11491
|
-
reworkTimeSeconds: totals.reworkTime,
|
|
11492
|
-
reworkTokens: totals.reworkTokens,
|
|
11493
|
-
reworkCostUsd,
|
|
11494
|
-
reworkTimePercent: ratios.timePercent,
|
|
11495
|
-
reworkTokensPercent: ratios.tokensPercent,
|
|
11496
|
-
reworkCostPercent: ratios.costPercent,
|
|
11497
|
-
authorStats,
|
|
11498
|
-
bugList
|
|
11499
|
-
};
|
|
11611
|
+
const globalDefectDensity = totalKloc > 0 ? Math.round(bugList.length / totalKloc * 100) / 100 : bugList.length;
|
|
11612
|
+
const totalCost = calculateCost(totals.tokens * 0.8, totals.tokens * 0.2);
|
|
11613
|
+
const reworkCost = calculateCost(totals.reworkTokens * 0.8, totals.reworkTokens * 0.2);
|
|
11614
|
+
const ratios = computeReworkRatios(totals.time, totals.tokens, totalCost, totals.reworkTime, totals.reworkTokens, reworkCost);
|
|
11615
|
+
const taskMap = accumulateTaskSummaries(records);
|
|
11616
|
+
return assembleReleaseReport(
|
|
11617
|
+
{ release: resolvedRelease, base: resolvedBase, commitCount: records.length },
|
|
11618
|
+
totals,
|
|
11619
|
+
{ totalCost, reworkCost, ratios },
|
|
11620
|
+
{ authorStats, bugList, taskMap, totalKloc, globalDefectDensity }
|
|
11621
|
+
);
|
|
11500
11622
|
}
|
|
11501
11623
|
function formatHours(seconds) {
|
|
11502
11624
|
const hours = (seconds / 3600).toFixed(1);
|
|
11503
11625
|
return `${hours}h (${Math.round(seconds / 60)} min)`;
|
|
11504
11626
|
}
|
|
11627
|
+
function buildTaskReworkSection(taskReworkStats) {
|
|
11628
|
+
if (!taskReworkStats || taskReworkStats.length === 0) return [];
|
|
11629
|
+
const rows = taskReworkStats.map((t) => {
|
|
11630
|
+
const status = t.isFirstTimeRight ? "\u2714 First-Time-Right" : `\u26A0 ${t.fixCommits} fix commit${t.fixCommits === 1 ? "" : "s"}`;
|
|
11631
|
+
return `| \`${t.taskId}\` | ${t.commits} (${t.fixCommits} fix) | +${t.linesAdded} / -${t.linesDeleted} | ${t.codeChurnPercent}% | ${t.reworkTokensPercent}% | ${t.reworkTimePercent}% | ${status} |`;
|
|
11632
|
+
});
|
|
11633
|
+
return [
|
|
11634
|
+
"",
|
|
11635
|
+
"## 4. Granular Rework & Code Churn Breakdown per Task (TSK-*)",
|
|
11636
|
+
"",
|
|
11637
|
+
"| Task ID | Commits (Total / Fix) | Lines (+ / -) | Code Churn % | Rework Tokens % | Rework Time % | Status |",
|
|
11638
|
+
"| :--- | :---: | :---: | :---: | :---: | :---: | :---: |",
|
|
11639
|
+
...rows
|
|
11640
|
+
];
|
|
11641
|
+
}
|
|
11642
|
+
function buildReworkMetricsSection(report) {
|
|
11643
|
+
return [
|
|
11644
|
+
"## 3. Rework Metrics & Cost of Defect Remediation",
|
|
11645
|
+
"",
|
|
11646
|
+
"| Rework Dimension | Absolute Rework | Total Release Value | Rework Ratio (%) |",
|
|
11647
|
+
"| :--- | :---: | :---: | :---: |",
|
|
11648
|
+
`| **Rework Engineering Time** | ${formatHours(report.reworkTimeSeconds)} | ${formatHours(report.totalTimeSeconds)} | **${report.reworkTimePercent}%** |`,
|
|
11649
|
+
`| **Rework Token Consumption** | ${report.reworkTokens.toLocaleString("en-US")} tokens | ${report.totalTokens.toLocaleString("en-US")} tokens | **${report.reworkTokensPercent}%** |`,
|
|
11650
|
+
`| **Estimated Rework Cost (USD)** | $${report.reworkCostUsd.toFixed(2)} | $${report.totalCostUsd.toFixed(2)} | **${report.reworkCostPercent}%** |`
|
|
11651
|
+
];
|
|
11652
|
+
}
|
|
11505
11653
|
function formatReleaseKpiMarkdown(report) {
|
|
11506
11654
|
const authorRows = report.authorStats.map((stat) => {
|
|
11507
11655
|
return `| **${stat.authorOrModel}** | ${stat.commits} | ${stat.klocProduced} | ${stat.bugsInjected} | **${stat.defectInjectionRate}** | ${formatHours(stat.totalTimeSeconds)} | ${stat.totalTokens.toLocaleString("en-US")} | $${stat.estimatedCostUsd.toFixed(2)} |`;
|
|
@@ -11524,23 +11672,17 @@ function formatReleaseKpiMarkdown(report) {
|
|
|
11524
11672
|
...authorRows,
|
|
11525
11673
|
`| **TOTAL RELEASE** | **${report.totalCommits}** | **${report.totalKloc}** | **${report.totalBugs}** | **${report.globalDefectDensity}** | **${formatHours(report.totalTimeSeconds)}** | **${report.totalTokens.toLocaleString("en-US")}** | **$${report.totalCostUsd.toFixed(2)} USD** |`,
|
|
11526
11674
|
"",
|
|
11527
|
-
"
|
|
11675
|
+
"## 2. Injected Defects Catalog & Root Cause Traceability",
|
|
11528
11676
|
"",
|
|
11529
|
-
"
|
|
11677
|
+
"| Commit SHA | Defect Subject / Description | Injected By | Parent Feature | Remediation Time | Rework Tokens |",
|
|
11678
|
+
"| :--- | :--- | :---: | :---: | :---: | :---: |",
|
|
11679
|
+
...bugRows,
|
|
11530
11680
|
"",
|
|
11531
|
-
|
|
11532
|
-
|
|
11533
|
-
`| **Cycle Time** | ${formatHours(report.totalTimeSeconds)} | ${formatHours(report.reworkTimeSeconds)} | **${report.reworkTimePercent}%** | ${report.reworkTimePercent <= 10 ? "\u{1F7E2} OPTIMAL (\u226410%)" : "\u{1F7E1} ALERT (>10%)"} |`,
|
|
11534
|
-
`| **AI Tokens** | ${report.totalTokens.toLocaleString("en-US")} tokens | ${report.reworkTokens.toLocaleString("en-US")} tokens | **${report.reworkTokensPercent}%** | ${report.reworkTokensPercent <= 10 ? "\u{1F7E2} OPTIMAL (\u226410%)" : "\u{1F7E1} ALERT (>10%)"} |`,
|
|
11535
|
-
`| **Computational Cost ($)** | $${report.totalCostUsd.toFixed(2)} USD | $${report.reworkCostUsd.toFixed(2)} USD | **${report.reworkCostPercent}%** | ${report.reworkCostPercent <= 10 ? "\u{1F7E2} OPTIMAL (\u226410%)" : "\u{1F7E1} ALERT (>10%)"} |`,
|
|
11681
|
+
...buildReworkMetricsSection(report),
|
|
11682
|
+
...buildTaskReworkSection(report.taskReworkStats),
|
|
11536
11683
|
"",
|
|
11537
11684
|
"---",
|
|
11538
|
-
""
|
|
11539
|
-
"## 3. Defects and Fix Commits Breakdown",
|
|
11540
|
-
"",
|
|
11541
|
-
"| Commit SHA | Description | Attribution | Reference | Fix Time | Fix Tokens |",
|
|
11542
|
-
"| :--- | :--- | :--- | :--- | :---: | :---: |",
|
|
11543
|
-
...bugRows
|
|
11685
|
+
"*Report dynamically generated by AI-SDLC KPI & Release Governance Engine.*"
|
|
11544
11686
|
].join("\n");
|
|
11545
11687
|
}
|
|
11546
11688
|
function writeReleaseKpiReport(report, options = {}) {
|
|
@@ -14829,233 +14971,26 @@ var LIFECYCLE_SKILL_TEMPLATES = [
|
|
|
14829
14971
|
{
|
|
14830
14972
|
id: "aisdlc-greenfield",
|
|
14831
14973
|
title: "Greenfield Project Inception & Delivery Playbook",
|
|
14832
|
-
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, transversal auditor/adversary verification
|
|
14974
|
+
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.",
|
|
14833
14975
|
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).",
|
|
14834
14976
|
globs: "product/**, specs/product/**, architecture/**, templates/**",
|
|
14835
|
-
body:
|
|
14836
|
-
Use this skill when starting a **brand-new software project from scratch (Greenfield)** or when \`specs/product/\` has no canonical baseline yet. It coordinates the sequential execution of AI-SDLC MCP/CLI tools and specialized role agents so no code is written before product vision, security enclaves, privacy-by-design controls, and architecture contracts exist.
|
|
14837
|
-
|
|
14838
|
-
## Mandatory Transversal Quality & Adversarial Protocol
|
|
14839
|
-
Every authoring agent deliverable across Phase 0 and Inception undergoes mandatory quality auditing and adversarial stress-testing before downstream progression:
|
|
14840
|
-
- **Concurrent Inspection**: Immediately following the execution of any authoring agent (\`agent-product-analyst\`, \`agent-threat-modeler\`, \`agent-privacy-officer\`, \`agent-system-architect\`), 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) **concurrently** in clean, isolated context windows.
|
|
14841
|
-
- **Non-Invasive Review**: Neither auditor nor adversary modifies deliverables directly; both deliver structured reports citing canonical IDs and SHA-256 digests.
|
|
14842
|
-
- **Consolidated Remediation Re-Execution**: Consolidate findings and emit the Workflow Handoff back to the authoring agent, who is re-executed to resolve blocking defects and apply simplifications.
|
|
14843
|
-
- **Anti-Ping-Pong Guardrail (Max 2 Rounds)**: Bounded strictly to a maximum of **2 correction rounds** per phase/deliverable. If non-blocking advisories remain after round 2, proceed to the downstream phase; if blocking defects persist after round 2, escalate immediately to the Human Tech Lead.
|
|
14844
|
-
- **Exclusion of Downstream Review & Validation Roles**: Review and validation agents (\`agent-expert-user\`, \`agent-code-reviewer\`, \`agent-security-auditor\`, \`agent-compliance-checker\`) evaluate finished deliverables and are excluded from being audited by this loop.
|
|
14845
|
-
|
|
14846
|
-
## End-to-End Execution Playbook
|
|
14847
|
-
|
|
14848
|
-
### Step 1: Repository Turnkey Initialization
|
|
14849
|
-
1. If the workspace has not been initialized with AI-SDLC schemas, policies, and templates, run MCP tool \`new\` (or CLI \`npx @aisdlc/cli init\`).
|
|
14850
|
-
2. Install the Git telemetry hook via \`npx aisdlc git hook install\` (\`pnpm run git:hook:install\`).
|
|
14851
|
-
3. Verify \`quality-policy.yaml\`, \`license-policy.yaml\`, and \`privacy-policy.yaml\` are present in the repository root.
|
|
14852
|
-
|
|
14853
|
-
### Step 2: Phase 0 Product Inception (\`agent-product-analyst\`)
|
|
14854
|
-
1. Delegate to or adopt [\`agent-product-analyst\`](../agent-product-analyst/SKILL.md).
|
|
14855
|
-
2. **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 (up to **15 questions maximum**, stopping earlier as soon as the product is clear):
|
|
14856
|
-
- Core mission statement and business problem.
|
|
14857
|
-
- Primary actors (\`ACT-*\`) and external systems.
|
|
14858
|
-
- **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 C#/TS class library when human actors exist.
|
|
14859
|
-
- **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-*\`).
|
|
14860
|
-
- Essential MVP capabilities (\`UC-*\`) vs. future roadmap, ensuring **foundational entity CRUD / master data workflows** (creating/managing core domain entities before executing transactions on them) are explicitly included in the MVP.
|
|
14861
|
-
- Top 3\u20135 quality goals (\`QR-*\`) and regulatory/technical constraints (\`CON-*\`).
|
|
14862
|
-
3. **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.
|
|
14863
|
-
4. **ProductShape Baseline**: Derive initial draft artifacts in \`specs/product/\`:
|
|
14864
|
-
- 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-*\`).
|
|
14865
|
-
- **Vertical Slice Completeness Rule**: Every human-triggered \`UC-*\` in the MVP must specify observable user interaction through the agreed presentation modality (Web screens/forms, Desktop views, or Console commands/menus) and state persistence\u2014never stop at internal library/service method calls.
|
|
14866
|
-
5. Validate schemas and duplicates via MCP tools \`verify_schemas\` and \`verify_duplicates\` (or \`npx aisdlc check --fix\`).
|
|
14867
|
-
6. **Mandatory Upstream UX & MVP Boundary Gate (\`agent-expert-user\`)**: Invoke [\`agent-expert-user\`](../agent-expert-user/SKILL.md) in **Design Mode** to stress-test the proposed workflows, enforce strict MVP boundaries, reject any headless/library-only MVP when human actors exist, verify master-data CRUD prerequisites, and separate core MVP \`UC-*\` from future roadmap backlog (\`templates/product/user-design-feedback.template.md\`).
|
|
14868
|
-
7. **Transversal Quality & Adversarial Loop (\`agent-product-analyst\`)**:
|
|
14869
|
-
- Concurrently invoke \`agent-auditor\` and \`agent-adversary\` on the draft product artifacts in isolated context windows.
|
|
14870
|
-
- Consolidate findings and hand off back to \`agent-product-analyst\` to re-execute and remediate issues (max 2 correction rounds).
|
|
14871
|
-
|
|
14872
|
-
### Step 3: Shift-Left Cybersecurity & Privacy-by-Design (\`agent-threat-modeler\` \u2794 \`agent-privacy-officer\`)
|
|
14873
|
-
1. Delegate to or adopt [\`agent-threat-modeler\`](../agent-threat-modeler/SKILL.md).
|
|
14874
|
-
2. Analyze every \`UC-*\` and \`FR-*\` using STRIDE and OWASP ASVS to create in \`specs/security/\`:
|
|
14875
|
-
- Threat Actors (\`ACT-THREAT-*\`)
|
|
14876
|
-
- Abuse Cases (\`ABUSE-*\` targeting \`UC-*\`)
|
|
14877
|
-
- Security Requirements (\`SEC-REQ-*\` with \`@security @mitigation\` negative Gherkin scenarios and \`SEC-ENC-*\` Zero Trust enclave bindings).
|
|
14878
|
-
3. **Transversal Quality & Adversarial Loop (\`agent-threat-modeler\`)**:
|
|
14879
|
-
- Concurrently invoke \`agent-auditor\` and \`agent-adversary\` over the security threat models.
|
|
14880
|
-
- Consolidate findings and return handoff to \`agent-threat-modeler\` to re-execute and remediate (max 2 correction rounds).
|
|
14881
|
-
4. Hand off to [\`agent-privacy-officer\`](../agent-privacy-officer/SKILL.md) to apply LINDDUN and GDPR/LOPDGDD/ISO 27701 in \`specs/privacy/\`:
|
|
14882
|
-
- Personal Data Assets (\`DATA-ASSET-*\`), GDPR Art. 30 Records of Processing (\`PRIV-ROPA-*\`), and Privacy Requirements (\`PRIV-REQ-*\` with \`@privacy @gdpr\` Gherkin scenarios).
|
|
14883
|
-
5. **Transversal Quality & Adversarial Loop (\`agent-privacy-officer\`)**:
|
|
14884
|
-
- Concurrently invoke \`agent-auditor\` and \`agent-adversary\` over the privacy records and requirements.
|
|
14885
|
-
- Consolidate findings and return handoff to \`agent-privacy-officer\` to re-execute and remediate (max 2 correction rounds).
|
|
14886
|
-
6. Run \`verify_schemas\` and \`verify_privacy\` (\`npx aisdlc verify privacy\`).
|
|
14887
|
-
|
|
14888
|
-
### Step 4: Modular Systems Architecture (\`agent-system-architect\`)
|
|
14889
|
-
1. Delegate to or adopt [\`agent-system-architect\`](../agent-system-architect/SKILL.md).
|
|
14890
|
-
2. Define building blocks (\`CMP-*\`) and Architectural Decision Records (\`ADR-*\`) in \`specs/architecture/\` using \`templates/architecture/\`, ensuring every \`CMP-*\` cites \`implements-use-cases\` (\`UC-*\`) and \`satisfies-requirements\` (\`FR-*\`, \`QR-*\`, \`SEC-REQ-*\`, \`PRIV-REQ-*\`).
|
|
14891
|
-
3. Inspect third-party stack choices against \`license-policy.yaml\` via \`verify_licenses\` and subprocessors against \`privacy-policy.yaml\` via \`verify_privacy\`.
|
|
14892
|
-
4. **Technical Security & Privacy Feedback Loop**: If new infrastructure, persistence, LLM, or auth decisions introduce attack vectors or PII flows, return to \`agent-threat-modeler\` \u2794 \`agent-privacy-officer\` to add technical \`SEC-REQ-*\` and \`PRIV-REQ-*\` mitigations before coding.
|
|
14893
|
-
5. **Transversal Quality & Adversarial Loop (\`agent-system-architect\`)**:
|
|
14894
|
-
- Concurrently invoke \`agent-auditor\` (evaluating YAGNI, architecture bloat, Ports & Adapters interfaces) and \`agent-adversary\` (simulating SPOFs, race conditions, cascading outages) in isolated context windows.
|
|
14895
|
-
- Consolidate findings and return handoff to \`agent-system-architect\` to re-execute and remediate (max 2 correction rounds).
|
|
14896
|
-
|
|
14897
|
-
### Step 5: Release Milestone & Topological Wave SDD Plan (\`1 UC-* = 1 CHG-*\`)
|
|
14898
|
-
1. **Open Release Milestone (\`Tier 2: release/v1.0.0\`)**: Group the approved MVP Use Cases (\`UC-001\`, \`UC-002\`, ...) under the initial release milestone (\`release/v1.0.0\`) and visualize the branch hierarchy via \`npx aisdlc git plan\`.
|
|
14899
|
-
2. **Decompose into Topological Waves (DAG Parallelism)**:
|
|
14900
|
-
- **Wave 0 \u2014 Foundational Core & Executable Presentation Host (Sequential)**: Identify the foundational \`UC-*\` (core domain entities, shared contracts, auth/config, **plus the runnable application host/shell for the agreed UI modality**\u2014e.g., Web server + layout, Desktop shell, or CLI entrypoint + DB bootstrap) and deliver it first as \`CHG-001\` via [\`aisdlc-increment\`](../aisdlc-increment/SKILL.md) so the product is immediately executable and downstream agents share locked interfaces.
|
|
14901
|
-
- **Waves 1..N \u2014 Orthogonal End-to-End Vertical Slices (Parallel Multi-Agent)**: Once Wave 0 contracts and host shell are merged into \`release/v1.0.0\`, scaffold independent \`CHG-*\` increments (\`1 UC-* = 1 CHG-*\`) and execute them **in parallel** across isolated branches/worktrees (\`feat/CHG-002\`, \`feat/CHG-003\`, ...) whenever they target distinct components (\`CMP-*\`) or bounded contexts (\`BC-*\`). Every \`CHG-*\` implementing a human \`UC-*\` must deliver its complete vertical slice (Domain + Persistence + UI/CLI presentation view/command + E2E test).
|
|
14902
|
-
3. **Release Consolidation (\`release/v1.0.0\` \u2794 \`main\`)**: Once all MVP \`CHG-*\` increments are integrated (\`sdd_integrate\`), run \`verify\` (\`npx aisdlc verify all\`), generate SBOM (\`npx aisdlc verify licenses --sbom reports/sbom.cdx.json --notices THIRD_PARTY_NOTICES.md\`), compute release KPIs (\`kpi_release\`), and open the Release PR into \`main\` for human Product Owner & Release Manager sign-off.
|
|
14903
|
-
|
|
14904
|
-
## Non-Negotiable Guardrails
|
|
14905
|
-
- **Clean Context Window Isolation per Specialist Agent (Cross-IDE)**: Never execute two distinct specialist roles 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.
|
|
14906
|
-
- **Mandatory Transversal Quality & Adversarial Loop**: Every authoring agent deliverable must undergo concurrent inspection by \`agent-auditor\` and \`agent-adversary\` in isolated context windows, followed by a re-execution of the authoring agent to remediate findings. To prevent infinite cycles, enforce the **Anti-Ping-Pong Guardrail**: maximum 2 correction rounds per phase; if unresolved blocking defects persist after round 2, escalate to the Human Tech Lead.
|
|
14907
|
-
- **FORBIDDEN Library-Only MVP for Human-Facing Products**: Whenever a product defines human actors (\`ACT-*\`), no agent may scope the MVP (\`release/v1.0.0\`) as headless class libraries or in-memory-only modules without an executable presentation host. The target interaction modality (Web UI, Desktop GUI, Console/TUI/CLI, or Mobile) must be explicitly agreed with the user during Phase 0 Inception and delivered as a runnable end-to-end application across the MVP waves.
|
|
14908
|
-
- **FORBIDDEN Greenfield Monolith (\`1 UC-* = 1 CHG-*\`)**: Never bundle the entire product or multiple \`UC-*\` into a single SDD change (\`CHG-001\`). Deterministic Gate 3 (\`verify_governance\`) blocks any \`handoff.yaml\` containing $> 1$ Use Case (\`Greenfield monolith detected\`). Parallelism is achieved by running **multiple bounded \`CHG-*\` concurrently** on separate branches/worktrees, never by stuffing multiple \`UC-*\` into one \`CHG-*\`.
|
|
14909
|
-
- 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.
|
|
14910
|
-
- All newly drafted specifications must start with \`status: draft\`.
|
|
14911
|
-
- Respect the Workflow Handoff Protocol (\`templates/workflow/agent-handoff.template.md\`) whenever task autonomy is $\\ge$ \`HUMAN_REVIEW_PLAN\`.`
|
|
14977
|
+
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 - **User Journeys (`JRN-*`) to Generate (Plain-Language Elicitation)**: Ask in simple, everyday language which end-to-end user journeys to model, explicitly indicating the 5 pieces of information needed to build each journey properly: (1) protagonist user (`persona` / `ACT-*`) and their main goal, (2) step-by-step stages from start to finish (`stages`), (3) interaction screens/channels at each stage (`touchpoints`), (4) current obstacles or pain points (`pain-points`), and (5) concrete system capabilities/use cases (`related-use-cases` / `UC-*`).\n - Essential MVP capabilities (`UC-*`) vs. future roadmap, ensuring **foundational entity CRUD / master data workflows** are explicitly included in the MVP.\n - Top 3\u20135 quality goals (`QR-*`) and regulatory/technical constraints (`CON-*`).\n3. **Enterprise & Capability Vision**: Create `specs/architecture/ARCH-INTRO-001.md` (`status: draft`, `naf-perspective: "Enterprise & Capability"`) using `templates/architecture/introduction-and-goals.template.md`, explicitly recording the chosen presentation/UI modality.\n4. **ProductShape Baseline**: Derive initial draft artifacts in `specs/product/`:\n - Actors (`ACT-*`), User Journeys (`JRN-*`), Use Cases (`UC-*`), Business Rules (`BR-*`), Functional Requirements (`FR-*` with mandatory `@nominal`, `@boundary`, `@invalid` Gherkin blocks), and Quality Requirements (`QR-*`).\n - **Vertical Slice Completeness Rule**: Every human-triggered `UC-*` in the MVP must specify observable user interaction through the agreed presentation modality and state persistence.\n5. Validate schemas and duplicates via MCP tools `verify_schemas` and `verify_duplicates` (or `npx aisdlc check --fix`).\n6. **Mandatory Upstream UX & MVP Boundary Gate (`agent-expert-user`)**: Invoke [`agent-expert-user`](../agent-expert-user/SKILL.md) in **Design Mode** to stress-test the proposed workflows, enforce strict MVP boundaries, reject any headless/library-only MVP when human actors exist, verify master-data CRUD prerequisites, and separate core MVP `UC-*` from future roadmap backlog.\n\n### Step 3: Shift-Left Cybersecurity & Privacy-by-Design (`agent-threat-modeler` \u2794 `agent-privacy-officer`)\n1. Delegate to or adopt [`agent-threat-modeler`](../agent-threat-modeler/SKILL.md).\n2. Analyze every `UC-*` and `FR-*` using STRIDE and OWASP ASVS to create in `specs/security/`:\n - Threat Actors (`ACT-THREAT-*`), Abuse Cases (`ABUSE-*` targeting `UC-*`), and Security Requirements (`SEC-REQ-*` with `@security @mitigation` negative Gherkin scenarios and `SEC-ENC-*` Zero Trust enclave bindings).\n3. Hand off to [`agent-privacy-officer`](../agent-privacy-officer/SKILL.md) to apply LINDDUN and GDPR/LOPDGDD/ISO 27701 in `specs/privacy/`:\n - Personal Data Assets (`DATA-ASSET-*`), GDPR Art. 30 Records of Processing (`PRIV-ROPA-*`), and Privacy Requirements (`PRIV-REQ-*` with `@privacy @gdpr` Gherkin scenarios).\n4. Run `verify_schemas` and `verify_privacy` (`npx aisdlc verify privacy`).\n\n### Step 4: Modular Systems Architecture (`agent-system-architect`)\n1. Delegate to or adopt [`agent-system-architect`](../agent-system-architect/SKILL.md).\n2. Define building blocks (`CMP-*`) and Architectural Decision Records (`ADR-*`) in `specs/architecture/` using `templates/architecture/`, ensuring every `CMP-*` cites `implements-use-cases` (`UC-*`) and `satisfies-requirements` (`FR-*`, `QR-*`, `SEC-REQ-*`, `PRIV-REQ-*`).\n3. Inspect third-party stack choices against `license-policy.yaml` via `verify_licenses` and subprocessors against `privacy-policy.yaml` via `verify_privacy`.\n4. **Technical Security & Privacy Feedback Loop**: If new infrastructure, persistence, LLM, or auth decisions introduce attack vectors or PII flows, return to `agent-threat-modeler` \u2794 `agent-privacy-officer` to add technical mitigations before coding.\n\n### Checkpoint 1 (Inception Design Checkpoint): `agent-auditor` $\\parallel$ `agent-adversary`\n1. Concurrently invoke `agent-auditor` (evaluating YAGNI, architecture bloat, interface contracts) and `agent-adversary` (simulating SPOFs, race conditions, unhandled threat scenarios) in isolated context windows over all Phase 0 deliverables.\n2. Consolidate findings and remediate in authoring agents (max 2 correction rounds).\n3. **Human Approval Gate**: Present the comprehensive Inception model for Human PO & Tech Lead sign-off.\n\n### Step 5: Release Milestone & Topological Wave SDD Plan (`1 UC-* = 1 CHG-*`)\n1. **Open Release Milestone (`Tier 2: release/v1.0.0` or Streamlined `main`)**: Group approved MVP Use Cases (`UC-001`, `UC-002`, ...) and visualize execution plan.\n2. **Decompose into Topological Waves (DAG Parallelism)**:\n - **Wave 0 \u2014 Foundational Core & Executable Presentation Host (Sequential)**: Scaffold `CHG-001` via [`aisdlc-increment`](../aisdlc-increment/SKILL.md) to establish domain core, shared contracts, auth/config, and the runnable presentation host.\n - **Waves 1..N \u2014 Orthogonal End-to-End Vertical Slices (Parallel Multi-Agent)**: Once Wave 0 contracts are merged, execute independent `CHG-*` increments (`1 UC-* = 1 CHG-*`) in parallel across isolated branches/worktrees (`feat/CHG-002`, `feat/CHG-003`, ...).\n3. **Release Consolidation**: Once all MVP increments are integrated (`sdd_integrate`), run `verify` (`npx aisdlc verify all`), generate SBOM, compute release KPIs (`kpi_release`), and open the Release PR for final human approval and SemVer tagging (`v1.0.0`).\n\n## Non-Negotiable Guardrails\n- **Clean Context Window Isolation per Specialist Agent (Cross-IDE)**: Never execute two distinct specialist roles in the same conversation context window. Always spawn each specialist in a fresh isolated subagent context that reads state strictly from disk.\n- **2-Checkpoint Quality & Adversarial Protocol**: Quality auditing and adversarial testing are concentrated at the completion of Inception design and Pre-PR implementation, avoiding micro-step overhead.\n- **FORBIDDEN Library-Only MVP for Human-Facing Products**: Whenever a product defines human actors (`ACT-*`), no agent may scope the MVP as headless class libraries without an executable presentation host.\n- **FORBIDDEN Greenfield Monolith (`1 UC-* = 1 CHG-*`)**: Never bundle the entire product or multiple `UC-*` into a single SDD change (`CHG-001`). Parallelism is achieved by running **multiple bounded `CHG-*` concurrently** on separate branches/worktrees.\n- Never invoke `sdd_change_new` or write application code in `src/` on a Greenfield project before `ARCH-INTRO-001`, `agent-expert-user` MVP validation, and at least one `UC-*` and `FR-*` exist.\n- All newly drafted specifications must start with `status: draft`.'
|
|
14912
14978
|
},
|
|
14913
14979
|
{
|
|
14914
14980
|
id: "aisdlc-legacy-onboarding",
|
|
14915
14981
|
title: "Legacy / Brownfield Retro-Inception Playbook",
|
|
14916
|
-
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-*),
|
|
14917
|
-
references: "[`process/02_product_definition.md`](../../process/02_product_definition.md), [`process/
|
|
14982
|
+
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.",
|
|
14983
|
+
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).",
|
|
14918
14984
|
globs: "architecture/**, specs/**, src/**, packages/**",
|
|
14919
|
-
body:
|
|
14920
|
-
Use this skill when **adopting AI-SDLC in an existing or legacy codebase (Brownfield)** that already has production source code (\`src/\`, \`packages/\`, etc.) but lacks canonical PDaC specifications, arc42 architecture views, or deterministic quality/license/privacy gates.
|
|
14921
|
-
|
|
14922
|
-
## Mandatory Transversal Quality & Adversarial Protocol
|
|
14923
|
-
Every authoring agent deliverable during Brownfield retro-inception undergoes mandatory quality auditing and adversarial stress-testing before downstream progression:
|
|
14924
|
-
- **Concurrent Inspection**: Immediately following the execution of any authoring agent (\`agent-product-analyst\`, \`agent-system-architect\`, \`agent-threat-modeler\`, \`agent-privacy-officer\`), invoke [\`agent-auditor\`](../agent-auditor/SKILL.md) (evaluating YAGNI, over-specification, and structural clarity) and [\`agent-adversary\`](../agent-adversary/SKILL.md) (uncovering hidden assumptions, boundary breaks, and contradictory legacy rules) **concurrently** in clean, isolated context windows.
|
|
14925
|
-
- **Non-Invasive Review**: Neither auditor nor adversary modifies deliverables directly; both deliver structured reports citing canonical IDs and SHA-256 digests.
|
|
14926
|
-
- **Consolidated Remediation Re-Execution**: Consolidate findings and emit the Workflow Handoff back to the authoring agent, who is re-executed to resolve blocking defects and apply simplifications.
|
|
14927
|
-
- **Anti-Ping-Pong Guardrail (Max 2 Rounds)**: Bounded strictly to a maximum of **2 correction rounds** per phase/deliverable. If non-blocking advisories remain after round 2, proceed to the downstream phase; if blocking defects persist after round 2, escalate immediately to the Human Tech Lead.
|
|
14928
|
-
- **Exclusion of Diagnostic/Review Roles**: Read-only baseline verifiers and diagnostic review roles (\`agent-compliance-checker\`, \`agent-security-auditor\`, \`agent-code-reviewer\`) assess pre-existing code and are excluded from being audited by this loop.
|
|
14929
|
-
|
|
14930
|
-
## End-to-End Execution Playbook
|
|
14931
|
-
|
|
14932
|
-
### Step 1: Non-Destructive Framework Scaffolding
|
|
14933
|
-
1. Run MCP tool \`new\` (or CLI \`npx @aisdlc/cli init\`) on the existing repository.
|
|
14934
|
-
- AI-SDLC enforces strict **no-clobber protection**: existing \`package.json\`, \`CLAUDE.md\`, or CI pipelines are preserved while injecting missing schemas (\`schemas/\`), templates (\`templates/\`), policies (\`quality-policy.yaml\`, \`license-policy.yaml\`, \`privacy-policy.yaml\`), and MCP configs.
|
|
14935
|
-
2. Install the Git commit trailer hook via \`npx aisdlc git hook install\`.
|
|
14936
|
-
|
|
14937
|
-
### Step 2: Baseline Diagnostic Audit (Read-Only Assessment)
|
|
14938
|
-
Before modifying any code or creating SDD changes, run diagnostic verifiers to quantify existing technical, legal, privacy, and security debt:
|
|
14939
|
-
1. **License & Dependency Audit (\`agent-compliance-checker\`)**: Run MCP tool \`verify_licenses\` (\`npx aisdlc verify licenses\`). Identify any viral (\`GPL\`/\`AGPL\`) or commercial (\`BSL\`/\`SSPL\`) dependencies already present in the lockfile and document exceptions or remediation plans.
|
|
14940
|
-
2. **Shift-Left Security Scan (\`agent-security-auditor\`)**: Run MCP tool \`verify_security\` (\`npx aisdlc verify security\`) to detect hardcoded secrets (Gate 11) or OWASP SAST vulnerabilities in legacy files.
|
|
14941
|
-
3. **Privacy & PII Scan (\`agent-privacy-officer\`)**: Run MCP tool \`verify_privacy\` (\`npx aisdlc verify privacy\`) to detect PII in logs/telemetry or hardcoded real PII in legacy tests/seeds.
|
|
14942
|
-
4. **AST Code Quality Baseline (\`agent-code-reviewer\`)**: Run MCP tool \`report_quality\` (\`npx aisdlc report quality\`) to generate \`reports/QUALITY_REPORT.md\` and identify legacy hotspots exceeding Cyclomatic Complexity ($\\le 10$), Cognitive Complexity ($\\le 15$), or Maintainability Index ($\\ge 50$).
|
|
14943
|
-
|
|
14944
|
-
### Step 3: Brownfield Retro-Inception (\`agent-system-architect\` & \`agent-product-analyst\`)
|
|
14945
|
-
Instead of attempting to document 100% of a legacy monolith upfront, apply **bounded retro-inception** focused on the system boundary and the domain areas under active evolution:
|
|
14946
|
-
1. **System Vision & Context (\`ARCH-INTRO-001\`)**: Use [\`agent-product-analyst\`](../agent-product-analyst/SKILL.md) to document the current system's mission, primary actors (\`ACT-*\`), and top quality goals (\`QR-*\`) in \`specs/architecture/ARCH-INTRO-001.md\`.
|
|
14947
|
-
- **Transversal Loop**: Concurrently invoke \`agent-auditor\` and \`agent-adversary\` over \`ARCH-INTRO-001\`. Consolidate findings and return handoff to \`agent-product-analyst\` to re-execute and remediate (max 2 correction rounds).
|
|
14948
|
-
2. **As-Is Component Mapping (\`CMP-*\` & \`ADR-*\`)**: Use [\`agent-system-architect\`](../agent-system-architect/SKILL.md) to map existing core modules/services into \`specs/architecture/CMP-*.md\` and capture historical architectural constraints (\`CON-*\`, \`ADR-*\`).
|
|
14949
|
-
- **Transversal Loop**: Concurrently invoke \`agent-auditor\` and \`agent-adversary\` over component models. Consolidate findings and return handoff to \`agent-system-architect\` to re-execute and remediate (max 2 correction rounds).
|
|
14950
|
-
3. **Core Use Cases Extraction (\`UC-*\`, \`FR-*\`)**: Extract canonical \`UC-*\` and \`FR-*\` artifacts in \`specs/product/\` for the specific bounded context or module that will be modified or extended next, including Gherkin acceptance scenarios reflecting current expected behavior (characterization specs).
|
|
14951
|
-
- **Transversal Loop**: Concurrently invoke \`agent-auditor\` and \`agent-adversary\` over extracted \`UC-*\`/\`FR-*\`. Consolidate findings and return handoff to \`agent-product-analyst\` to re-execute and remediate (max 2 correction rounds).
|
|
14952
|
-
4. **Threat & Privacy Boundary Mapping (\`agent-threat-modeler\` \u2794 \`agent-privacy-officer\`)**: Map existing trust zones (\`SEC-ENC-*\`), active threat vectors (\`ACT-THREAT-*\`, \`ABUSE-*\`, \`SEC-REQ-*\`), and personal data inventories (\`DATA-ASSET-*\`, \`PRIV-ROPA-*\`, \`PRIV-REQ-*\`) on the target module.
|
|
14953
|
-
- **Transversal Loop**: Concurrently invoke \`agent-auditor\` and \`agent-adversary\` over threat and privacy models. Consolidate findings and return handoff to \`agent-threat-modeler\` and \`agent-privacy-officer\` to re-execute and remediate (max 2 correction rounds).
|
|
14954
|
-
|
|
14955
|
-
### Step 4: Characterization Testing & Synchronization
|
|
14956
|
-
1. Run MCP tool \`sdd_check_fix\` (\`npx aisdlc check --fix\`) to extract \`.feature\` files and compute canonical SHA-256 digests.
|
|
14957
|
-
2. Run \`verify_schemas\` and \`verify_pdac\` to confirm the reverse-engineered baseline graph is structurally valid and drift-free.
|
|
14958
|
-
|
|
14959
|
-
### Step 5: Transition to Governed SDD Increments (Boy Scout / Strangler Rule)
|
|
14960
|
-
Once 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).
|
|
14961
|
-
|
|
14962
|
-
## Non-Negotiable Guardrails
|
|
14963
|
-
- **Clean Context Window Isolation per Specialist Agent (Cross-IDE)**: Never execute two distinct specialist roles 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.
|
|
14964
|
-
- **Mandatory Transversal Quality & Adversarial Loop**: Every authoring agent deliverable must undergo concurrent inspection by \`agent-auditor\` and \`agent-adversary\` in isolated context windows, followed by a re-execution of the authoring agent to remediate findings. To prevent infinite cycles, enforce the **Anti-Ping-Pong Guardrail**: maximum 2 correction rounds per phase; if unresolved blocking defects persist after round 2, escalate to the Human Tech Lead.
|
|
14965
|
-
- **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-*\`).
|
|
14966
|
-
- **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\`).
|
|
14967
|
-
- **Immediate Secret Remediation**: If Step 2 (\`verify_security\`) uncovers leaked credentials (exit code 4), halt feature work and remediate/rotate secrets immediately.`
|
|
14985
|
+
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`).\n2. Install the Git telemetry hook via `npx aisdlc git hook install` (`pnpm run git:hook:install`).\n3. Commit initial AI-SDLC schemas and policies (`.github/`, `schemas/`, `templates/`, `*-policy.yaml`).\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 & Dependency Audit (`agent-compliance-checker`)**: Run MCP tool `verify_licenses` (`npx aisdlc verify licenses`). Identify any viral (`GPL`/`AGPL`) or commercial (`BSL`/`SSPL`) dependencies already present in the lockfile and document exceptions or remediation plans.\n2. **Shift-Left Security Scan (`agent-security-auditor`)**: Run MCP tool `verify_security` (`npx aisdlc verify security`) to detect hardcoded secrets (Gate 11) or OWASP SAST vulnerabilities in legacy files.\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.\n4. **AST Code Quality Baseline (`agent-code-reviewer`)**: Run MCP tool `report_quality` (`npx aisdlc report quality`) to generate `reports/QUALITY_REPORT.md` and identify legacy hotspots exceeding Cyclomatic Complexity ($\\le 10$), Cognitive Complexity ($\\le 15$), or Maintainability Index ($\\ge 50$).\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.\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."
|
|
14968
14986
|
},
|
|
14969
14987
|
{
|
|
14970
14988
|
id: "aisdlc-increment",
|
|
14971
14989
|
title: "Bounded SDD Feature & Bugfix Delivery Playbook",
|
|
14972
|
-
description: "Orchestrate the complete Spec-Driven Development (SDD) lifecycle for bounded feature increments, enhancements, and bugfixes (CHG-* / TSK-*), from upstream requirement derivation and
|
|
14990
|
+
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.",
|
|
14973
14991
|
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).",
|
|
14974
14992
|
globs: "specs/changes/**, src/**, packages/**, tests/**",
|
|
14975
|
-
body:
|
|
14976
|
-
Use this skill for **every evolutionary increment (new feature, enhancement, refactoring, or bugfix)** on a project that already has an AI-SDLC baseline. It enforces strict 360\xB0 traceability from upstream ProductShape (\`UC-*\`, \`FR-*\`) through SDD (\`CHG-*\`, \`HOF-*\`, \`TSK-*\`), TDD implementation, the 12 Quality Gates, and baseline promotion.
|
|
14977
|
-
|
|
14978
|
-
## End-to-End Execution Playbook
|
|
14979
|
-
|
|
14980
|
-
### Step 1: Upstream Product, Security & Privacy Delta (\`agent-product-analyst\`, \`agent-threat-modeler\` & \`agent-privacy-officer\`)
|
|
14981
|
-
1. Inspect active changes via MCP tool \`get_active_handoff\` and verify whether the target Use Case (\`UC-*\`) or Requirement (\`FR-*\`) already exists in \`specs/product/\`.
|
|
14982
|
-
2. If the increment introduces new behavior or modifies business rules:
|
|
14983
|
-
- Use [\`agent-product-analyst\`](../agent-product-analyst/SKILL.md) to create or update the \`UC-*\`, \`BR-*\`, and \`FR-*\` (with \`@nominal\`, \`@boundary\`, \`@invalid\` Gherkin scenarios).
|
|
14984
|
-
- **Transversal Loop (\`agent-product-analyst\`)**: Concurrently invoke \`agent-auditor\` and \`agent-adversary\` over updated specs. Consolidate findings and return handoff to \`agent-product-analyst\` to re-execute and remediate (max 2 correction rounds).
|
|
14985
|
-
- Run MCP tool \`verify_duplicates\` (\`npx aisdlc verify duplicates\`) to block lexical or functional collisions early.
|
|
14986
|
-
- Use [\`agent-threat-modeler\`](../agent-threat-modeler/SKILL.md) to model any new \`ABUSE-*\` and \`SEC-REQ-*\` mitigations.
|
|
14987
|
-
- **Transversal Loop (\`agent-threat-modeler\`)**: Concurrently invoke \`agent-auditor\` and \`agent-adversary\` over security models. Consolidate findings and return handoff to \`agent-threat-modeler\` to re-execute and remediate (max 2 correction rounds).
|
|
14988
|
-
- 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-*\`).
|
|
14989
|
-
- **Transversal Loop (\`agent-privacy-officer\`)**: Concurrently invoke \`agent-auditor\` and \`agent-adversary\` over privacy models. Consolidate findings and return handoff to \`agent-privacy-officer\` to re-execute and remediate (max 2 correction rounds).
|
|
14990
|
-
3. Run \`sdd_check_fix\` (\`npx aisdlc check --fix\`) to sync Gherkin \`.feature\` files and validate schemas.
|
|
14991
|
-
|
|
14992
|
-
### Step 2: SDD Change Scaffolding & Architectural Design (\`agent-system-architect\`)
|
|
14993
|
-
1. 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>\`).
|
|
14994
|
-
2. Use [\`agent-system-architect\`](../agent-system-architect/SKILL.md) to complete \`specs/changes/active/<chg-id>/design.md\` and \`specs/architecture/CMP-*.md\`:
|
|
14995
|
-
- 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.
|
|
14996
|
-
- 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\`).
|
|
14997
|
-
3. **Transversal Loop (\`agent-system-architect\`)**:
|
|
14998
|
-
- Concurrently invoke \`agent-auditor\` (evaluating YAGNI, interface bloat, task completeness) and \`agent-adversary\` (probing race conditions, contract drift, SPOFs) in isolated context windows.
|
|
14999
|
-
- Consolidate findings and return handoff to \`agent-system-architect\` to re-execute and remediate (max 2 correction rounds).
|
|
15000
|
-
4. Run \`verify_governance\` and \`verify_friction\` to validate task governance, 100% design/handoff scope coverage, and anti-monolith limits (\`maxUseCasesPerChange = 1\`).
|
|
15001
|
-
|
|
15002
|
-
### Step 3: 4-Tier Git Branch Navigation & Multi-Agent Parallelism
|
|
15003
|
-
1. Navigate to the task branch using \`npx aisdlc git checkout <TSK-ID>\` (\`pnpm run git:checkout <TSK-ID>\`), which cascade-creates:
|
|
15004
|
-
\`main\` \u2794 \`release/vX.Y.Z\` \u2794 \`feat/CHG-XXX\` \u2794 \`task/CHG-XXX/TSK-YYY-<slug>\`.
|
|
15005
|
-
2. Validate branch naming compliance via \`npx aisdlc git validate <branch>\`.
|
|
15006
|
-
3. **Parallel Agent Execution Rules**:
|
|
15007
|
-
- **Inter-Feature Parallelism (\`feat/CHG-001\` $\\parallel$ \`feat/CHG-002\`)**: Multiple agents may execute different \`CHG-*\` increments concurrently in isolated branches/worktrees (\`specs/changes/active/chg-XXX/\`) when their target \`CMP-*\` / \`UC-*\` have no blocking dependencies.
|
|
15008
|
-
- **Intra-Feature Parallelism (\`task/CHG-X/TSK-002\` $\\parallel$ \`task/CHG-X/TSK-003\`)**: Once \`TSK-001\` (Contract-First shared interfaces/DTOs) is merged into \`feat/CHG-X\`, multiple \`agent-developer\` subagents may implement independent tasks (e.g., Backend adapter vs. Frontend UI) concurrently on their respective \`task/*\` branches.
|
|
15009
|
-
|
|
15010
|
-
### Step 4: Red Phase \u2014 Failing Test Suites (\`agent-qa-engineer\`)
|
|
15011
|
-
1. Delegate to or adopt [\`agent-qa-engineer\`](../agent-qa-engineer/SKILL.md).
|
|
15012
|
-
2. Author FAILING (red) BDD/Gherkin step definitions, integration/contract tests, and mandatory E2E/UI tests (evaluating Happy Path, Sad Path, and Boundary Values for every interactive UI element, plus \`UC-*\` alternative/exception flows) in \`tests/\`.
|
|
15013
|
-
3. **Transversal Loop (\`agent-qa-engineer\`)**:
|
|
15014
|
-
- Concurrently invoke \`agent-auditor\` (checking test overengineering, brittle assertions) and \`agent-adversary\` (running conceptual mutation testing to prove whether trivial or empty implementations could falsely pass tests green) in isolated context windows.
|
|
15015
|
-
- Consolidate findings and return handoff to \`agent-qa-engineer\` to re-execute and harden test suites (max 2 correction rounds).
|
|
15016
|
-
4. Run \`verify_testing\` (\`npx aisdlc verify testing\`) to confirm requirement test coverage before writing production code.
|
|
15017
|
-
|
|
15018
|
-
### Step 5: Green & Refactor Phase \u2014 Surgical Implementation (\`agent-developer\`)
|
|
15019
|
-
1. Delegate to or adopt [\`agent-developer\`](../agent-developer/SKILL.md).
|
|
15020
|
-
2. Execute the **Mandatory 4-Step Implementation Order**:
|
|
15021
|
-
- (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).
|
|
15022
|
-
3. Verify any new dependency against \`license-policy.yaml\` via \`verify_licenses\` and PII handling against \`privacy-policy.yaml\` via \`verify_privacy\`.
|
|
15023
|
-
4. Run \`sdd_check_fix\` (\`npx aisdlc check --fix\`) and \`verify_quality\` (\`npx aisdlc verify quality\`) until Cyclomatic Complexity $\\le 10$, Cognitive $\\le 15$, Maintainability $\\ge 50$, and Function Length $\\le 40$ lines pass with zero violations.
|
|
15024
|
-
5. **Transversal Loop (\`agent-developer\`)**:
|
|
15025
|
-
- Concurrently invoke \`agent-auditor\` (detecting overengineering, speculative parameters, AST complexity) and \`agent-adversary\` (attacking boundary inputs, concurrency races, type edge breaks with concrete PoCs) in isolated context windows.
|
|
15026
|
-
- Consolidate findings and return handoff to \`agent-developer\` to re-execute and remediate (max 2 correction rounds).
|
|
15027
|
-
|
|
15028
|
-
### Mandatory Transversal Quality & Adversarial Protocol
|
|
15029
|
-
- **Systematic Post-Agent Execution**: Immediately following the execution of any authoring agent (\`agent-product-analyst\`, \`agent-threat-modeler\`, \`agent-privacy-officer\`, \`agent-system-architect\`, \`agent-qa-engineer\`, \`agent-developer\`, \`agent-devops\`), invoke \`agent-auditor\` and \`agent-adversary\` concurrently in clean, isolated context windows over that agent's deliverables.
|
|
15030
|
-
- **Concurrent Inspection**:
|
|
15031
|
-
* [\`agent-auditor\`](../agent-auditor/SKILL.md) inspects deliverables for structural debt, premature generalizations, or unneeded complexity (YAGNI).
|
|
15032
|
-
* [\`agent-adversary\`](../agent-adversary/SKILL.md) actively stress-tests deliverables: uncovers requirement contradictions, simulates architectural race conditions/SPOFs, conducts conceptual mutation testing on QA suites, or crafts breaking boundary payloads for code with mandatory proof-of-break.
|
|
15033
|
-
- **Non-Invasive Guardrail**: Neither auditor nor adversary edits files directly. Both emit structured findings citing canonical IDs and SHA-256 hashes.
|
|
15034
|
-
- **Consolidated Handoff & Remediation Re-Execution**: Consolidate findings and emit the Workflow Handoff back to the audited authoring agent, who is re-executed to resolve the findings.
|
|
15035
|
-
- **Anti-Ping-Pong Guardrail (Max 2 Rounds)**: Enforce a strict boundary of maximum **2 correction rounds** per phase/deliverable. If non-blocking advisories remain after round 2, proceed downstream; if blocking defects persist after round 2, escalate to the Human Tech Lead.
|
|
15036
|
-
- **Exclusion of Downstream Review & Validation Roles**: Pre-merge review agents (\`agent-code-reviewer\`, \`agent-security-auditor\`, \`agent-compliance-checker\`) and validation agents (\`agent-expert-user\`) evaluate finished deliverables and are excluded from being audited by this loop.
|
|
15037
|
-
|
|
15038
|
-
### Step 6: Post-Development Functional Validation & Pre-Merge Audit Triad
|
|
15039
|
-
1. **Functional Validation (\`agent-expert-user\`)**: Validate live runtime behavior against \`UC-*\` and \`FR-*\` criteria (including \`0\` browser \`console.error\`/\`pageerror\` on UI changes).
|
|
15040
|
-
2. **Pre-Merge Audit Triad**: Execute concurrent review across:
|
|
15041
|
-
- [\`agent-code-reviewer\`](../agent-code-reviewer/SKILL.md) (SOLID, DRY, YAGNI, AST thresholds, zero fake-wiring)
|
|
15042
|
-
- [\`agent-security-auditor\`](../agent-security-auditor/SKILL.md) (\`verify_security\`: Gitleaks secrets + OWASP SAST)
|
|
15043
|
-
- [\`agent-privacy-officer\`](../agent-privacy-officer/SKILL.md) (\`verify_privacy\`: GDPR/LOPDGDD ROPA + PII-SAST)
|
|
15044
|
-
- [\`agent-compliance-checker\`](../agent-compliance-checker/SKILL.md) (\`verify_licenses\`: SPDX & SBOM compliance)
|
|
15045
|
-
3. **Consolidated Release Gate**: Run MCP tool \`verify\` (\`npx aisdlc verify all\`) and confirm all **12 Quality Gates** pass green.
|
|
15046
|
-
|
|
15047
|
-
### Step 7: Human PR Sign-Off, Baseline Integration & Release Closure
|
|
15048
|
-
1. **Feature Merge (\`feat/CHG-*\` \u2794 \`release/vX.Y.Z\`)**: Present the PR, KPI summary (\`kpi_pr\`), and autogenerated reports (\`reports/QUALITY_REPORT.md\`, \`reports/TRACEABILITY_MATRIX.md\`, \`reports/ROPA_INVENTORY.md\`) to the human Tech Lead for review and approval (never auto-approve or auto-merge).
|
|
15049
|
-
2. **Canonical Baseline Promotion**: Once tasks in \`tasks.md\` are marked \`COMPLETED\` and approved, promote the change into the canonical baseline via MCP tool \`sdd_integrate\` (\`npx aisdlc sdd integrate --auto\`, or \`npx aisdlc sdd integrate --all\` to consolidate all completed changes), 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/\`.
|
|
15050
|
-
3. **Release Milestone Closure (\`release/vX.Y.Z\` \u2794 \`main\`)**: When all \`CHG-*\` increments planned for \`release/vX.Y.Z\` are integrated:
|
|
15051
|
-
- Run full verification (\`verify\`), generate CycloneDX SBOM & legal notices (\`npx aisdlc verify licenses --sbom reports/sbom.cdx.json --notices THIRD_PARTY_NOTICES.md\`), compute release telemetry (\`kpi_release\` / \`npx aisdlc kpi release --release release/vX.Y.Z\`), and refresh the interactive dashboard (\`report_dashboard\`).
|
|
15052
|
-
- Open the Release PR from \`release/vX.Y.Z\` to \`main\` for final human Product Owner and Release Manager approval and semantic Git tagging (\`vX.Y.Z\`).
|
|
15053
|
-
|
|
15054
|
-
## Non-Negotiable Guardrails
|
|
15055
|
-
- **Clean Context Window Isolation per Specialist Agent (Cross-IDE)**: Never execute two distinct specialist roles (e.g., \`agent-qa-engineer\` and \`agent-developer\`, or \`agent-developer\` and \`agent-security-auditor\`) in the same conversation context window. In subagent-capable IDEs (Antigravity \`invoke_subagent\`, Claude Code \`Task\` / \`.claude/agents/\`, GitHub Copilot \`@agent-*\`), always spawn each specialist in a fresh isolated subagent context that reads state strictly from disk (\`specs/\`, \`handoff.yaml\`, \`get_active_handoff\`). In chat-based IDEs (Cursor, Windsurf, Aider), persist all artifacts to disk, emit the Workflow Handoff block, and instruct the user to open a **New Chat** (or \`/clear\`) before running the next specialist.
|
|
15056
|
-
- **Mandatory Transversal Quality & Adversarial Loop**: Every authoring agent deliverable must undergo concurrent inspection by \`agent-auditor\` and \`agent-adversary\` in isolated context windows, followed by a re-execution of the authoring agent to remediate findings. To prevent infinite cycles, enforce the **Anti-Ping-Pong Guardrail**: maximum 2 correction rounds per phase; if unresolved blocking defects persist after round 2, escalate to the Human Tech Lead.
|
|
15057
|
-
- **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.
|
|
15058
|
-
- **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\`.`
|
|
14993
|
+
body: '## Purpose & Trigger\nUse this skill for **every evolutionary increment (new feature, enhancement, refactoring, or bugfix)** on a project that already has an AI-SDLC baseline. It enforces strict 360\xB0 traceability from upstream ProductShape (`UC-*`, `FR-*`) through SDD (`CHG-*`, `HOF-*`, `TSK-*`), TDD implementation, the 12 Quality Gates, and baseline promotion under the **streamlined 2-checkpoint architecture**.\n\n## End-to-End Execution Playbook\n\n### Step 1: Upstream Product, Security & Privacy Delta (`agent-product-analyst`, `agent-threat-modeler` & `agent-privacy-officer`)\n1. Inspect active changes via MCP tool `get_active_handoff` and verify whether the target Use Case (`UC-*`) or Requirement (`FR-*`) already exists in `specs/product/`.\n2. If the increment introduces new behavior or modifies business rules:\n - Use [`agent-product-analyst`](../agent-product-analyst/SKILL.md) to create or update the `UC-*`, `BR-*`, and `FR-*` (with `@nominal`, `@boundary`, `@invalid` Gherkin scenarios).\n - Run MCP tool `verify_duplicates` (`npx aisdlc verify duplicates`) to block lexical or functional collisions early.\n - Use [`agent-threat-modeler`](../agent-threat-modeler/SKILL.md) to model any new `ABUSE-*` and `SEC-REQ-*` mitigations.\n - Hand off to [`agent-privacy-officer`](../agent-privacy-officer/SKILL.md) to model any personal data assets (`DATA-ASSET-*`), GDPR Art. 30 processing activities (`PRIV-ROPA-*`), and privacy requirements (`PRIV-REQ-*`).\n3. Run `sdd_check_fix` (`npx aisdlc check --fix`) to sync Gherkin `.feature` files and validate schemas.\n\n### Step 2: SDD Change Scaffolding & Architectural Design (`agent-system-architect`)\n1. Scaffold the bounded change package and its cryptographic `handoff.yaml` sidecar (`HOF-*`) targeting **a single Use Case (`1 UC-* = 1 CHG-*`)** using MCP tool `sdd_change_new` (or CLI `npx aisdlc change new "<Title>" --from <UC-ID> --profile <patch|standard|critical>`).\n2. Use [`agent-system-architect`](../agent-system-architect/SKILL.md) to complete `specs/changes/active/<chg-id>/design.md` and `specs/architecture/CMP-*.md`:\n - Structure `CMP-*` and `design.md` around **Modular & Hexagonal Architecture (Ports & Adapters)** (Domain/Application Core + Inbound/Outbound Ports) and define **Contract-First** shared interfaces/DTOs/schemas when spanning Frontend and Backend.\n - Map 100% of `handoff.yaml` requirements and components to atomic tasks (`TSK-*`) in `tasks.md` with explicit `autonomy-mode` (`AUTONOMOUS`, `HUMAN_REVIEW_PLAN`, `HIGH_RISK_MANUAL`, `AMBIGUOUS`).\n3. Run `verify_governance` and `verify_friction` to validate task governance, 100% design/handoff scope coverage, and anti-monolith limits (`maxUseCasesPerChange = 1`).\n\n### Checkpoint 1: Specification & Design Checkpoint (`agent-auditor` $\\parallel$ `agent-adversary`)\n1. Concurrently invoke `agent-auditor` (evaluating YAGNI, interface bloat, and task completeness) and `agent-adversary` (probing contradictions, race conditions, and architecture SPOFs) in clean, isolated context windows over the combined upstream deliverables.\n2. Consolidate findings and remediate any blocking defects (max 2 correction rounds).\n3. **Human Approval Gate 1**: Present the specification and architectural design for Human Tech Lead / PO sign-off before proceeding to code.\n\n### Step 3: Streamlined Git Branch Navigation & Multi-Agent Parallelism\n1. Navigate to the working branch using `npx aisdlc git checkout <TSK-ID>` (`pnpm run git:checkout <TSK-ID>`).\n - **Default Streamlined Mode**: Switches to the working branch `feat/<CHG-ID>-<slug>` (created from `main`).\n - Granular task traceability is maintained via commit trailers (`Task-ID: TSK-*`, `Parent-Ref: CHG-*`) and commit scopes (`feat(TSK-001): ...`), enabling per-task rework KPIs without branch explosion.\n2. **Parallel Agent Execution Rules (`--parallel`)**:\n - When concurrent multi-agent implementation is configured (e.g. Backend adapter $\\parallel$ Frontend UI), `aisdlc git checkout <TSK-ID> --parallel` creates isolated worktrees (`task/<PARENT-ID>/<TSK-ID>-<slug>`).\n\n### Step 4: Red Phase \u2014 Failing Test Suites (`agent-qa-engineer`)\n1. Delegate to or adopt [`agent-qa-engineer`](../agent-qa-engineer/SKILL.md).\n2. Author FAILING (red) BDD/Gherkin step definitions, integration/contract tests, and mandatory E2E/UI tests (evaluating Happy Path, Sad Path, and Boundary Values for every interactive UI element, plus `UC-*` alternative/exception flows) in `tests/`.\n3. Commit failing test suites with trailer `Task-ID: TSK-YYY`.\n4. Run `verify_testing` (`npx aisdlc verify testing`) to confirm requirement test coverage before writing production code.\n\n### Step 5: Green & Refactor Phase \u2014 Surgical Implementation (`agent-developer`)\n1. Delegate to or adopt [`agent-developer`](../agent-developer/SKILL.md).\n2. Execute the **Mandatory 4-Step Implementation Order**:\n - (1) Modular & Hexagonal Architecture (Ports & Adapters) boundaries, (2) Inter-module interfaces/ports first, (3) Concrete component implementation (zero fake-wiring; all 4 UI states `Loading`, `Empty`, `Error`, `Nominal`), (4) Exhaustive per-function unit tests in `tests/unit/` (Happy Path, Sad Path, Boundary, Null/Empty).\n3. Commit implementations with trailer `Task-ID: TSK-YYY`.\n4. Verify any new dependency against `license-policy.yaml` via `verify_licenses` and PII handling against `privacy-policy.yaml` via `verify_privacy`.\n5. Run `sdd_check_fix` (`npx aisdlc check --fix`) and `verify_quality` (`npx aisdlc verify quality`) until Cyclomatic Complexity $\\le 10$, Cognitive $\\le 15$, Maintainability $\\ge 50$, and Function Length $\\le 40$ lines pass with zero violations.\n6. Run `verify` (`npx aisdlc verify all`) confirming all **12 Quality Gates** pass green.\n\n### Checkpoint 2: Implementation & Pre-PR Checkpoint (`agent-auditor` $\\parallel$ `agent-adversary`)\n1. **Functional Validation (`agent-expert-user`)**: Validate live runtime behavior against `UC-*` and `FR-*` criteria (including `0` browser `console.error`/`pageerror` on UI changes).\n2. Concurrently invoke `agent-auditor` (verifying Clean Code, SOLID, DRY, AST thresholds, and eliminating unnecessary abstractions) and `agent-adversary` (performing conceptual test mutation to verify QA tests catch defects, and attacking boundary inputs with concrete PoC breaks).\n3. Consolidate findings and remediate in `agent-developer` (max 2 correction rounds).\n4. Run `npx aisdlc verify all` to confirm final green status.\n\n### Step 6: Human PR Sign-Off, Baseline Integration & Release Closure\n1. **Feature Merge (`feat/CHG-*` \u2794 `main` or `release/vX.Y.Z`)**:\n - Present the PR, KPI summary (`kpi_pr` including per-task rework metrics), and autogenerated reports (`reports/QUALITY_REPORT.md`, `reports/TRACEABILITY_MATRIX.md`, `reports/ROPA_INVENTORY.md`) to the human Tech Lead for review and approval (never auto-approve or auto-merge).\n2. **Canonical Baseline Promotion**: Once tasks in `tasks.md` are marked `COMPLETED` and approved, promote the change into the canonical baseline via MCP tool `sdd_integrate` (`npx aisdlc sdd integrate --auto`), which synchronizes the normative text and BDD Gherkin scenarios into `FR-*` / `UC-*` / `SEC-REQ-*` / `PRIV-REQ-*`, bumps minor SemVer when updating active specs, resyncs PDaC SHA-256 digests, promotes `FR-*` to `active`, links `CMP-*`, and archives the change under `specs/changes/completed/` (or `npx aisdlc sdd integrate --all` to consolidate all completed changes).\n3. **Semantic Versioning Promotion**: Tag the merge with the computed SemVer bump (`patch`, `minor`, `major`) and refresh the interactive dashboard (`report_dashboard`).\n\n## Non-Negotiable Guardrails\n- **Clean Context Window Isolation per Specialist Agent (Cross-IDE)**: Never execute two distinct specialist roles (e.g., `agent-qa-engineer` and `agent-developer`, or `agent-developer` and `agent-security-auditor`) in the same conversation context window. In subagent-capable IDEs (Antigravity `invoke_subagent`, Claude Code `Task` / `.claude/agents/`, GitHub Copilot `@agent-*`), always spawn each specialist in a fresh isolated subagent context that reads state strictly from disk (`specs/`, `handoff.yaml`, `get_active_handoff`). In chat-based IDEs (Cursor, Windsurf, Aider), persist all artifacts to disk, emit the Workflow Handoff block, and instruct the user to open a **New Chat** (or `/clear`) before running the next specialist.\n- **2-Checkpoint Quality & Adversarial Protocol**: Enforce transversal quality and red-team checks exclusively at **Checkpoint 1 (Specification & Design)** and **Checkpoint 2 (Implementation & Pre-PR)**. Enforce the **Anti-Ping-Pong Guardrail**: maximum 2 correction rounds per checkpoint; if unresolved blocking defects persist, escalate to the Human Tech Lead.\n- **Single-Use-Case Scope (`1 UC-* = 1 CHG-*`)**: Each SDD change (`CHG-*`) must deliver at most 1 Use Case (`UC-*`). Bundling multiple `UC-*` into one `handoff.yaml` is blocked by `verify_governance` (`Greenfield monolith detected`). Scale throughput via parallel `CHG-*` branches/worktrees, not monolithic changes.\n- **100% Design & Handoff Coverage in `tasks.md`**: Every `CMP-*`, `FR-*`, `SEC-REQ-*`, and `PRIV-REQ-*` declared in `design.md` and `handoff.yaml` must be explicitly assigned to at least one `TSK-*` in `tasks.md`.'
|
|
15059
14994
|
}
|
|
15060
14995
|
];
|
|
15061
14996
|
function renderAntigravitySkillFile(skill) {
|
|
@@ -18814,6 +18749,6 @@ function formatInspectResultMarkdown(result) {
|
|
|
18814
18749
|
return lines.join("\n");
|
|
18815
18750
|
}
|
|
18816
18751
|
|
|
18817
|
-
export { ALL_ARCHITECTURE_TEMPLATES, BRANCH_PATTERNS, BddStepRegistry, CPP_CLANG_TIDY, CPP_CMAKE_STRICT, DEFAULT_DLP_RULES, DEFAULT_EXCLUDED_PATTERNS, DEFAULT_EXCLUDES, DEFAULT_EXTENSIONS, DEFAULT_PRIVACY_POLICY, DEFAULT_SAST_EXCLUDES, DOTNET_DIRECTORY_BUILD_PROPS, GENERAL_SOURCE_EXTENSIONS, GO_GOLANGCI_YML, GRADLE_STRICT_INIT_KTS, JAVA_PMD_RULESET_XML, KOTLIN_DETEKT_YML, KPI_SUMMARY_END_TAG, KPI_SUMMARY_START_TAG, LIFECYCLE_SKILL_TEMPLATES, OpenSpecAdapter, PII_SAST_RULES, PREPARE_COMMIT_MSG_SCRIPT, PRE_COMMIT_SCRIPT, PROMPT_INJECTION_SIGNATURES, PROTECTED_BYPASS_PATTERNS, PROTECTED_CODING_RULES_FILES, REVIEWER_ROLES, REVIEW_VERDICTS, RUST_CARGO_CONFIG_TOML, RUST_CLIPPY_TOML, SARIF_SCHEMA_2_1_0, SARIF_VERSION, SAST_RULES, SCHEMA_SCHEMAS_ARCHITECTURE_ADR_SCHEMA_JSON, SCHEMA_SCHEMAS_ARCHITECTURE_COMPONENT_SCHEMA_JSON, SCHEMA_SCHEMAS_ARCHITECTURE_INTRODUCTION_AND_GOALS_SCHEMA_JSON, SCHEMA_SCHEMAS_COMPLIANCE_LICENSE_MANIFEST_SCHEMA_JSON, SCHEMA_SCHEMAS_COMPLIANCE_LICENSE_POLICY_SCHEMA_JSON, SCHEMA_SCHEMAS_COMPLIANCE_QUALITY_POLICY_SCHEMA_JSON, SCHEMA_SCHEMAS_IDE_MCP_CONFIG_SCHEMA_JSON, SCHEMA_SCHEMAS_MANUALS_PRODUCTION_MANUAL_SCHEMA_JSON, SCHEMA_SCHEMAS_MANUALS_USER_MANUAL_SCHEMA_JSON, SCHEMA_SCHEMAS_PRIVACY_DATA_ASSET_SCHEMA_JSON, SCHEMA_SCHEMAS_PRIVACY_PRIVACY_POLICY_SCHEMA_JSON, SCHEMA_SCHEMAS_PRIVACY_PRIVACY_REQ_SCHEMA_JSON, SCHEMA_SCHEMAS_PRIVACY_PRIVACY_ROPA_SCHEMA_JSON, SCHEMA_SCHEMAS_PRODUCT_ACTOR_SCHEMA_JSON, SCHEMA_SCHEMAS_PRODUCT_BOUNDED_CONTEXT_SCHEMA_JSON, SCHEMA_SCHEMAS_PRODUCT_BUSINESS_RULE_SCHEMA_JSON, SCHEMA_SCHEMAS_PRODUCT_JOURNEY_SCHEMA_JSON, SCHEMA_SCHEMAS_PRODUCT_REQUIREMENT_SCHEMA_JSON, SCHEMA_SCHEMAS_PRODUCT_TERM_SCHEMA_JSON, SCHEMA_SCHEMAS_PRODUCT_USE_CASE_SCHEMA_JSON, SCHEMA_SCHEMAS_SAFETY_HAZARD_SCHEMA_JSON, SCHEMA_SCHEMAS_SAFETY_SAFETY_REQ_SCHEMA_JSON, SCHEMA_SCHEMAS_SDD_DESIGN_SCHEMA_JSON, SCHEMA_SCHEMAS_SDD_HANDOFF_SCHEMA_JSON, SCHEMA_SCHEMAS_SDD_PROPOSAL_SCHEMA_JSON, SCHEMA_SCHEMAS_SDD_RELEASE_KPIS_SCHEMA_JSON, SCHEMA_SCHEMAS_SDD_SESSION_TELEMETRY_SCHEMA_JSON, SCHEMA_SCHEMAS_SDD_SPEC_SCHEMA_JSON, SCHEMA_SCHEMAS_SDD_TASKS_SCHEMA_JSON, SCHEMA_SCHEMAS_SECURITY_ABUSE_CASE_SCHEMA_JSON, SCHEMA_SCHEMAS_SECURITY_ENCLAVE_SCHEMA_JSON, SCHEMA_SCHEMAS_SECURITY_SECURITY_REQ_SCHEMA_JSON, SCHEMA_SCHEMAS_SECURITY_THREAT_ACTOR_SCHEMA_JSON, SCHEMA_SCHEMAS_WORKFLOW_AGENT_HANDOFF_SCHEMA_JSON, SECRET_RULES, SPECIALIZED_AGENT_TEMPLATES, STARTER_AGENT_GUARD_WRAPPER_CJS, STARTER_ANTIGRAVITY_HOOKS_JSON, STARTER_ANTIGRAVITY_MCP, STARTER_ANTIGRAVITY_RULES, STARTER_ARCH_ADR, STARTER_ARCH_ARCHITECTURE_CONSTRAINTS, STARTER_ARCH_COMPONENT, STARTER_ARCH_CONTEXT_AND_SCOPE, STARTER_ARCH_CROSS_CUTTING_CONCEPTS, STARTER_ARCH_DEPLOYMENT_VIEW, STARTER_ARCH_GLOSSARY, STARTER_ARCH_INTRODUCTION_AND_GOALS, STARTER_ARCH_LEVEL_1_WHITEBOX, STARTER_ARCH_QUALITY_REQUIREMENTS, STARTER_ARCH_RISKS_AND_TECHNICAL_DEBT, STARTER_ARCH_RUNTIME_VIEW, STARTER_ARCH_SOLUTION_STRATEGY, STARTER_AZURE_PIPELINES, STARTER_BASE_TEMPLATES, STARTER_BITBUCKET_PIPELINES, STARTER_CLAUDE_RULES, STARTER_COMPLIANCE_LICENSE_MANIFEST_YAML, STARTER_COPILOT_RULES, STARTER_CURSOR_CORE_RULES, STARTER_CURSOR_MCP, STARTER_CURSOR_PRODUCT_RULES, STARTER_CURSOR_QUALITY_RULES, STARTER_GITHUB_CI, STARTER_GITHUB_DEPLOY_DASHBOARD, STARTER_GITHUB_PR_KPI, STARTER_GITHUB_PULL_REQUEST_TEMPLATE, STARTER_GITHUB_SDD_INTEGRATE, STARTER_GITLAB_CI, STARTER_GUARD_BRANCH_CJS, STARTER_LICENSE_POLICY, STARTER_PRIVACY_POLICY, STARTER_PROCESS_README, STARTER_PULL_REQUEST_TEMPLATE, STARTER_QUALITY_POLICY, STARTER_REQUIREMENT_TEMPLATE, STARTER_SCHEMAS, STARTER_SCHEMAS_MAP, STARTER_TASK_TEMPLATE, STARTER_TEMPLATES_CI_AZURE_PIPELINES_YML, STARTER_TEMPLATES_CI_BITBUCKET_PIPELINES_YML, STARTER_TEMPLATES_CI_GITHUB_WORKFLOWS_CI_YML, STARTER_TEMPLATES_CI_GITHUB_WORKFLOWS_DEPLOY_DASHBOARD_YML, STARTER_TEMPLATES_CI_GITHUB_WORKFLOWS_PR_KPI_SUMMARY_YML, STARTER_TEMPLATES_CI_GITHUB_WORKFLOWS_SDD_INTEGRATE_ON_MERGE_YML, STARTER_TEMPLATES_CI__GITLAB_CI_YML, STARTER_TEMPLATES_COMPLIANCE_COMMERCIAL_ACQUISITION_REQUEST_TEMPLATE_MD, STARTER_TEMPLATES_MANUALS_PRODUCTION_MANUAL_TEMPLATE_MD, STARTER_TEMPLATES_MANUALS_USER_MANUAL_TEMPLATE_MD, STARTER_TEMPLATES_PRIVACY_DATA_ASSET_TEMPLATE_MD, STARTER_TEMPLATES_PRIVACY_DPIA_REQUEST_TEMPLATE_MD, STARTER_TEMPLATES_PRIVACY_PRIVACY_REQ_TEMPLATE_MD, STARTER_TEMPLATES_PRIVACY_PRIVACY_ROPA_TEMPLATE_MD, STARTER_TEMPLATES_PRODUCT_ACTOR_TEMPLATE_MD, STARTER_TEMPLATES_PRODUCT_BOUNDED_CONTEXT_TEMPLATE_MD, STARTER_TEMPLATES_PRODUCT_BUSINESS_RULE_TEMPLATE_MD, STARTER_TEMPLATES_PRODUCT_JOURNEY_TEMPLATE_MD, STARTER_TEMPLATES_PRODUCT_REQUIREMENT_TEMPLATE_MD, STARTER_TEMPLATES_PRODUCT_TERM_TEMPLATE_MD, STARTER_TEMPLATES_PRODUCT_USER_DESIGN_FEEDBACK_TEMPLATE_MD, STARTER_TEMPLATES_PRODUCT_USE_CASE_TEMPLATE_MD, STARTER_TEMPLATES_SAFETY_HAZARD_TEMPLATE_MD, STARTER_TEMPLATES_SAFETY_SAFETY_REQ_TEMPLATE_MD, STARTER_TEMPLATES_SDD_DESIGN_TEMPLATE_MD, STARTER_TEMPLATES_SDD_HANDOFF_TEMPLATE_YAML, STARTER_TEMPLATES_SDD_PROPOSAL_TEMPLATE_MD, STARTER_TEMPLATES_SDD_PULL_REQUEST_TEMPLATE_MD, STARTER_TEMPLATES_SDD_SPEC_TEMPLATE_MD, STARTER_TEMPLATES_SDD_TASKS_TEMPLATE_MD, STARTER_TEMPLATES_SECURITY_ABUSE_CASE_TEMPLATE_MD, STARTER_TEMPLATES_SECURITY_ENCLAVE_TEMPLATE_MD, STARTER_TEMPLATES_SECURITY_SECURITY_REQ_TEMPLATE_MD, STARTER_TEMPLATES_SECURITY_THREAT_ACTOR_TEMPLATE_MD, STARTER_TEMPLATES_WORKFLOW_AGENT_HANDOFF_TEMPLATE_MD, STARTER_VSCODE_MCP, STARTER_WORKFLOW_HANDOFF_TEMPLATE, STARTER__GITHUB_PULL_REQUEST_TEMPLATE_MD, SpecKitAdapter, TS_ESLINT_CONFIG_MJS, TS_STRICT_TSCONFIG, TYPE_TO_SCHEMA_MAP, UNIT_TEST_SUFFIXES, VALID_AGENT_TARGETS, VALID_ARCHITECTURE_GRANULARITIES, VALID_AUTONOMY_MODES, VALID_CHANGE_PROFILES, VALID_CI_PROVIDERS, VALID_CODING_RULE_STACKS, aggregateCommitKpiRecords, aggregatePrKpis, aggregateReleaseKpis, analyzeBddVariantsForRequirement, appendRevisionHistoryRow, applyRatchetMode, buildCycloneDxComponent, buildCycloneDxVulnerabilities, buildFeatureFileContent, buildGraphElements, calculateJaccardSimilarity, calculateMetrics, calculateRating, calculateShannonEntropy, canonicalSort, checkGherkinInSync, checkoutTaskBranch, classifyBranch, classifyMetricFromMessage, collectAgentFiles, collectDashboardMetrics, collectHistoricalKpis, computeCanonicalSha256, computeRawSha256, computeSha256, computeViolationSignature, createDefaultDlpPolicy, createDefaultQualityPolicy, depositProductHandoffSidecar, detectActiveChangeForIntegration, detectAuthorIdentity, detectLanguage, detectProfileFromChange, detectProjectStacks, detectPromptInjection, emitCiOutput, evaluateCompoundLicense, evaluateSingleDependency, evaluateVulnerabilityThresholds, executeBddFeature, extractAllRepoCommitKpis, extractBaselineEntriesFromResults, extractCitations, extractCommitKpisFromRange, extractDirectDepNames, extractFeatureTags, extractFrontmatter, extractFunctions, extractFunctionsBraceLanguages, extractFunctionsPolyglot, extractFunctionsPython, extractFunctionsPythonAst, extractFunctionsTypeScriptAst, extractGherkinBlock, extractGherkinFeatures, extractNormativeText, extractPythonFunctionsPolyglot, extractSemanticContent, findChangeWorkspaceDir, findLicenseFile, formatCommitTrailers, formatInspectResultMarkdown, formatPrKpiMarkdown, formatReleaseKpiMarkdown, generateBranchHierarchyPlan, generateCycloneDxSbom, generateDashboardReport, generateDeterministicUuidV5, generateDuplicatesReportMarkdown, generateGovernanceReportMarkdown, generateLicenseReportMarkdown, generatePdacReportMarkdown, generatePrivacyReportMarkdown, generateQualityReport, generateRopaInventoryMarkdown, generateSastReportMarkdown, generateSecretsReportMarkdown, generateSecuritySarifReport, generateSuppressionsAuditReport, generateTestingCoverageReportMarkdown, generateThirdPartyNotices, generateTraceabilityReportMarkdown, getArchitectureTemplates, getCodingRulesFilesForStacks, getCytoscapeScript, getGitDiffLines, getNextCorrelativeNumber, getReferenceCodingRulesTemplates, getSddAdapter, inferArtifactTypeFromId, inferMissingTrailers, initProject, injectKpisIntoPrBody, inspectElement, installGitHooks, integrateAllSddChanges, integrateSddChange, isCliInstalled, isFunctionReferencedInTests, isGitleaksInstalled, isMetricWorsened, isPathProtectedFromPatch, isPlaceholderOrIgnored, isProtectedCodingRulesFile, isReportContentSemanticallyEqual, isRequirementArtifact2 as isRequirementArtifact, isReviewerRole, isSemgrepInstalled, isToolAvailable, loadDlpPolicy, loadPrivacyPolicy, loadProductHandoffSidecar, loadQualityBaseline, locateTaskInActiveChanges, mapSastSeverityToSarifLevel, maskSecret, normalizePath, normalizeSpdxLicense, normalizeUri, orchestrateNativeAstAnalysis, parseCommitTrailers, parseDlpPolicy, parseFeatureDocument, parseFrontmatter, parseFrontmatterId, parseGenericDoc, parseLicensePolicy, parseMarkdownFrontmatter, parseQualityPolicy, parseRequirementFile, parseSecuritySuppression, parseSpecCatalogScope, parseTasksDoc, parseTasksFromContent, parseTrivyVulnerabilities, processPackageDir, readCodeCoverageSummary, readPackageJson, renderAntigravityAgentFile, renderAntigravitySkillFile, renderAutonomyModeSection, renderClaudeAgentFile, renderClaudeSkillFile, renderCopilotAgentFile, renderCopilotSkillFile, renderCursorAgentFile, renderCursorSkillFile, renderDashboardHtml, renderManualsTab, resolveAgentTargets, resolveBranchHierarchy, resolveCiEnvironment, resolveCodingRuleStacks, resolveCytoscapePath, resolveDefaultBranchBase, resolveDeterministicDate, resolveFeatureFilePath, resolveGitRef, resolveLicenseFromFile, resolveReleaseBaseBranch, resolveSastCwe, resolveSastOwasp, resolveSchemaForArtifact, resolveTargetFiles, runGitleaksCli, runSemgrepCli, sanitizeDlpPayload, sanitizeDlpText, sanitizeTestCorpus, scaffoldSddChange, scanAllProductHandoffs, scanAllTestArtifacts, scanContentForSecrets, scanFileForPrivacyViolations, scanFileForSast, scanGoDependencies, scanInstalledLicenses, scanManualsInWorkspace, scanMavenDependencies, scanPnpmStore, scanPythonDependencies, scanRustDependencies, scanSubdirectories, scanWithNativeFs, scanWithSyft, scanWithTrivy, serializeSarifDocument, slugify2 as slugify, stripVolatileReportMetadata, submitReviewReport, syncPdacDigests, tokenizeTitle, updateCitationsInContent, validateAgainstSchema, validateAnchorExistence, validateArtifactSchema, verifyArtifactDuplicates, verifyArtifactsSchemas, verifyLicenses, verifyManuals, verifyPdacGraph, verifyPrivacy, verifyProgressiveFriction, verifyQualityGate, verifySast, verifySddIntegration, verifySecrets, verifyTasksGovernance, verifyTestingCoverage, verifyTraceability, walkDir, walkMdFiles, walkProjectFiles, walkSourceFiles, walkTaskFiles, writeCucumberJsonReport, writeCycloneDxSbom, writeQualityBaseline, writeReleaseKpiReport, writeReportFileIfChanged, writeSecuritySarifReport, writeThirdPartyNotices };
|
|
18752
|
+
export { ALL_ARCHITECTURE_TEMPLATES, BRANCH_PATTERNS, BddStepRegistry, CPP_CLANG_TIDY, CPP_CMAKE_STRICT, DEFAULT_DLP_RULES, DEFAULT_EXCLUDED_PATTERNS, DEFAULT_EXCLUDES, DEFAULT_EXCLUDE_DIRS, DEFAULT_EXTENSIONS, DEFAULT_PRIVACY_POLICY, DEFAULT_SAST_EXCLUDES, DOTNET_DIRECTORY_BUILD_PROPS, GENERAL_SOURCE_EXTENSIONS, GO_GOLANGCI_YML, GRADLE_STRICT_INIT_KTS, JAVA_PMD_RULESET_XML, KOTLIN_DETEKT_YML, KPI_SUMMARY_END_TAG, KPI_SUMMARY_START_TAG, LIFECYCLE_SKILL_TEMPLATES, OpenSpecAdapter, PII_SAST_RULES, PREPARE_COMMIT_MSG_SCRIPT, PRE_COMMIT_SCRIPT, PROMPT_INJECTION_SIGNATURES, PROTECTED_BYPASS_PATTERNS, PROTECTED_CODING_RULES_FILES, REVIEWER_ROLES, REVIEW_VERDICTS, RUST_CARGO_CONFIG_TOML, RUST_CLIPPY_TOML, SARIF_SCHEMA_2_1_0, SARIF_VERSION, SAST_RULES, SCHEMA_SCHEMAS_ARCHITECTURE_ADR_SCHEMA_JSON, SCHEMA_SCHEMAS_ARCHITECTURE_COMPONENT_SCHEMA_JSON, SCHEMA_SCHEMAS_ARCHITECTURE_INTRODUCTION_AND_GOALS_SCHEMA_JSON, SCHEMA_SCHEMAS_COMPLIANCE_LICENSE_MANIFEST_SCHEMA_JSON, SCHEMA_SCHEMAS_COMPLIANCE_LICENSE_POLICY_SCHEMA_JSON, SCHEMA_SCHEMAS_COMPLIANCE_QUALITY_POLICY_SCHEMA_JSON, SCHEMA_SCHEMAS_IDE_MCP_CONFIG_SCHEMA_JSON, SCHEMA_SCHEMAS_MANUALS_PRODUCTION_MANUAL_SCHEMA_JSON, SCHEMA_SCHEMAS_MANUALS_USER_MANUAL_SCHEMA_JSON, SCHEMA_SCHEMAS_PRIVACY_DATA_ASSET_SCHEMA_JSON, SCHEMA_SCHEMAS_PRIVACY_PRIVACY_POLICY_SCHEMA_JSON, SCHEMA_SCHEMAS_PRIVACY_PRIVACY_REQ_SCHEMA_JSON, SCHEMA_SCHEMAS_PRIVACY_PRIVACY_ROPA_SCHEMA_JSON, SCHEMA_SCHEMAS_PRODUCT_ACTOR_SCHEMA_JSON, SCHEMA_SCHEMAS_PRODUCT_BOUNDED_CONTEXT_SCHEMA_JSON, SCHEMA_SCHEMAS_PRODUCT_BUSINESS_RULE_SCHEMA_JSON, SCHEMA_SCHEMAS_PRODUCT_JOURNEY_SCHEMA_JSON, SCHEMA_SCHEMAS_PRODUCT_REQUIREMENT_SCHEMA_JSON, SCHEMA_SCHEMAS_PRODUCT_TERM_SCHEMA_JSON, SCHEMA_SCHEMAS_PRODUCT_USE_CASE_SCHEMA_JSON, SCHEMA_SCHEMAS_SAFETY_HAZARD_SCHEMA_JSON, SCHEMA_SCHEMAS_SAFETY_SAFETY_REQ_SCHEMA_JSON, SCHEMA_SCHEMAS_SDD_DESIGN_SCHEMA_JSON, SCHEMA_SCHEMAS_SDD_HANDOFF_SCHEMA_JSON, SCHEMA_SCHEMAS_SDD_PROPOSAL_SCHEMA_JSON, SCHEMA_SCHEMAS_SDD_RELEASE_KPIS_SCHEMA_JSON, SCHEMA_SCHEMAS_SDD_SESSION_TELEMETRY_SCHEMA_JSON, SCHEMA_SCHEMAS_SDD_SPEC_SCHEMA_JSON, SCHEMA_SCHEMAS_SDD_TASKS_SCHEMA_JSON, SCHEMA_SCHEMAS_SECURITY_ABUSE_CASE_SCHEMA_JSON, SCHEMA_SCHEMAS_SECURITY_ENCLAVE_SCHEMA_JSON, SCHEMA_SCHEMAS_SECURITY_SECURITY_REQ_SCHEMA_JSON, SCHEMA_SCHEMAS_SECURITY_THREAT_ACTOR_SCHEMA_JSON, SCHEMA_SCHEMAS_WORKFLOW_AGENT_HANDOFF_SCHEMA_JSON, SECRET_RULES, SPECIALIZED_AGENT_TEMPLATES, STARTER_AGENT_GUARD_WRAPPER_CJS, STARTER_ANTIGRAVITY_HOOKS_JSON, STARTER_ANTIGRAVITY_MCP, STARTER_ANTIGRAVITY_RULES, STARTER_ARCH_ADR, STARTER_ARCH_ARCHITECTURE_CONSTRAINTS, STARTER_ARCH_COMPONENT, STARTER_ARCH_CONTEXT_AND_SCOPE, STARTER_ARCH_CROSS_CUTTING_CONCEPTS, STARTER_ARCH_DEPLOYMENT_VIEW, STARTER_ARCH_GLOSSARY, STARTER_ARCH_INTRODUCTION_AND_GOALS, STARTER_ARCH_LEVEL_1_WHITEBOX, STARTER_ARCH_QUALITY_REQUIREMENTS, STARTER_ARCH_RISKS_AND_TECHNICAL_DEBT, STARTER_ARCH_RUNTIME_VIEW, STARTER_ARCH_SOLUTION_STRATEGY, STARTER_AZURE_PIPELINES, STARTER_BASE_TEMPLATES, STARTER_BITBUCKET_PIPELINES, STARTER_CLAUDE_RULES, STARTER_COMPLIANCE_LICENSE_MANIFEST_YAML, STARTER_COPILOT_RULES, STARTER_CURSOR_CORE_RULES, STARTER_CURSOR_MCP, STARTER_CURSOR_PRODUCT_RULES, STARTER_CURSOR_QUALITY_RULES, STARTER_GITHUB_CI, STARTER_GITHUB_DEPLOY_DASHBOARD, STARTER_GITHUB_PR_KPI, STARTER_GITHUB_PULL_REQUEST_TEMPLATE, STARTER_GITHUB_SDD_INTEGRATE, STARTER_GITLAB_CI, STARTER_GUARD_BRANCH_CJS, STARTER_LICENSE_POLICY, STARTER_PRIVACY_POLICY, STARTER_PROCESS_README, STARTER_PULL_REQUEST_TEMPLATE, STARTER_QUALITY_POLICY, STARTER_REQUIREMENT_TEMPLATE, STARTER_SCHEMAS, STARTER_SCHEMAS_MAP, STARTER_TASK_TEMPLATE, STARTER_TEMPLATES_CI_AZURE_PIPELINES_YML, STARTER_TEMPLATES_CI_BITBUCKET_PIPELINES_YML, STARTER_TEMPLATES_CI_GITHUB_WORKFLOWS_CI_YML, STARTER_TEMPLATES_CI_GITHUB_WORKFLOWS_DEPLOY_DASHBOARD_YML, STARTER_TEMPLATES_CI_GITHUB_WORKFLOWS_PR_KPI_SUMMARY_YML, STARTER_TEMPLATES_CI_GITHUB_WORKFLOWS_SDD_INTEGRATE_ON_MERGE_YML, STARTER_TEMPLATES_CI__GITLAB_CI_YML, STARTER_TEMPLATES_COMPLIANCE_COMMERCIAL_ACQUISITION_REQUEST_TEMPLATE_MD, STARTER_TEMPLATES_MANUALS_PRODUCTION_MANUAL_TEMPLATE_MD, STARTER_TEMPLATES_MANUALS_USER_MANUAL_TEMPLATE_MD, STARTER_TEMPLATES_PRIVACY_DATA_ASSET_TEMPLATE_MD, STARTER_TEMPLATES_PRIVACY_DPIA_REQUEST_TEMPLATE_MD, STARTER_TEMPLATES_PRIVACY_PRIVACY_REQ_TEMPLATE_MD, STARTER_TEMPLATES_PRIVACY_PRIVACY_ROPA_TEMPLATE_MD, STARTER_TEMPLATES_PRODUCT_ACTOR_TEMPLATE_MD, STARTER_TEMPLATES_PRODUCT_BOUNDED_CONTEXT_TEMPLATE_MD, STARTER_TEMPLATES_PRODUCT_BUSINESS_RULE_TEMPLATE_MD, STARTER_TEMPLATES_PRODUCT_JOURNEY_TEMPLATE_MD, STARTER_TEMPLATES_PRODUCT_REQUIREMENT_TEMPLATE_MD, STARTER_TEMPLATES_PRODUCT_TERM_TEMPLATE_MD, STARTER_TEMPLATES_PRODUCT_USER_DESIGN_FEEDBACK_TEMPLATE_MD, STARTER_TEMPLATES_PRODUCT_USE_CASE_TEMPLATE_MD, STARTER_TEMPLATES_SAFETY_HAZARD_TEMPLATE_MD, STARTER_TEMPLATES_SAFETY_SAFETY_REQ_TEMPLATE_MD, STARTER_TEMPLATES_SDD_DESIGN_TEMPLATE_MD, STARTER_TEMPLATES_SDD_HANDOFF_TEMPLATE_YAML, STARTER_TEMPLATES_SDD_PROPOSAL_TEMPLATE_MD, STARTER_TEMPLATES_SDD_PULL_REQUEST_TEMPLATE_MD, STARTER_TEMPLATES_SDD_SPEC_TEMPLATE_MD, STARTER_TEMPLATES_SDD_TASKS_TEMPLATE_MD, STARTER_TEMPLATES_SECURITY_ABUSE_CASE_TEMPLATE_MD, STARTER_TEMPLATES_SECURITY_ENCLAVE_TEMPLATE_MD, STARTER_TEMPLATES_SECURITY_SECURITY_REQ_TEMPLATE_MD, STARTER_TEMPLATES_SECURITY_THREAT_ACTOR_TEMPLATE_MD, STARTER_TEMPLATES_WORKFLOW_AGENT_HANDOFF_TEMPLATE_MD, STARTER_VSCODE_MCP, STARTER_WORKFLOW_HANDOFF_TEMPLATE, STARTER__GITHUB_PULL_REQUEST_TEMPLATE_MD, SpecKitAdapter, TS_ESLINT_CONFIG_MJS, TS_STRICT_TSCONFIG, TYPE_TO_SCHEMA_MAP, UNIT_TEST_SUFFIXES, VALID_AGENT_TARGETS, VALID_ARCHITECTURE_GRANULARITIES, VALID_AUTONOMY_MODES, VALID_CHANGE_PROFILES, VALID_CI_PROVIDERS, VALID_CODING_RULE_STACKS, accumulateTaskSummaries, aggregateCommitKpiRecords, aggregatePrKpis, aggregateReleaseKpis, analyzeBddVariantsForRequirement, appendRevisionHistoryRow, applyRatchetMode, buildCycloneDxComponent, buildCycloneDxVulnerabilities, buildFeatureFileContent, buildGraphElements, calculateJaccardSimilarity, calculateMetrics, calculateRating, calculateShannonEntropy, canonicalSort, checkGherkinInSync, checkoutTaskBranch, classifyBranch, classifyMetricFromMessage, collectAgentFiles, collectDashboardMetrics, collectHistoricalKpis, computeCanonicalSha256, computeRawSha256, computeSha256, computeViolationSignature, createDefaultDlpPolicy, createDefaultQualityPolicy, depositProductHandoffSidecar, detectActiveChangeForIntegration, detectAuthorIdentity, detectLanguage, detectProfileFromChange, detectProjectStacks, detectPromptInjection, emitCiOutput, evaluateCompoundLicense, evaluateSingleDependency, evaluateVulnerabilityThresholds, executeBddFeature, extractAllRepoCommitKpis, extractBaselineEntriesFromResults, extractCitations, extractCommitKpisFromRange, extractDirectDepNames, extractFeatureTags, extractFrontmatter, extractFunctions, extractFunctionsBraceLanguages, extractFunctionsPolyglot, extractFunctionsPython, extractFunctionsPythonAst, extractFunctionsTypeScriptAst, extractGherkinBlock, extractGherkinFeatures, extractNormativeText, extractPythonFunctionsPolyglot, extractSemanticContent, findChangeWorkspaceDir, findLicenseFile, formatCommitTrailers, formatInspectResultMarkdown, formatPrKpiMarkdown, formatReleaseKpiMarkdown, formatTaskKpiRows, generateBranchHierarchyPlan, generateCycloneDxSbom, generateDashboardReport, generateDeterministicUuidV5, generateDuplicatesReportMarkdown, generateGovernanceReportMarkdown, generateLicenseReportMarkdown, generatePdacReportMarkdown, generatePrivacyReportMarkdown, generateQualityReport, generateRopaInventoryMarkdown, generateSastReportMarkdown, generateSecretsReportMarkdown, generateSecuritySarifReport, generateSuppressionsAuditReport, generateTestingCoverageReportMarkdown, generateThirdPartyNotices, generateTraceabilityReportMarkdown, getArchitectureTemplates, getCodingRulesFilesForStacks, getCytoscapeScript, getGitDiffLines, getNextCorrelativeNumber, getReferenceCodingRulesTemplates, getSddAdapter, inferArtifactTypeFromId, inferMissingTrailers, initProject, injectKpisIntoPrBody, inspectElement, installGitHooks, integrateAllSddChanges, integrateSddChange, isCliInstalled, isFunctionReferencedInTests, isGitleaksInstalled, isMetricWorsened, isPathProtectedFromPatch, isPlaceholderOrIgnored, isProtectedCodingRulesFile, isReportContentSemanticallyEqual, isRequirementArtifact2 as isRequirementArtifact, isReviewerRole, isSemgrepInstalled, isToolAvailable, loadDlpPolicy, loadPrivacyPolicy, loadProductHandoffSidecar, loadQualityBaseline, locateTaskInActiveChanges, mapSastSeverityToSarifLevel, maskSecret, normalizePath, normalizeSpdxLicense, normalizeUri, orchestrateNativeAstAnalysis, parseCommitTrailers, parseDlpPolicy, parseFeatureDocument, parseFrontmatter, parseFrontmatterId, parseGenericDoc, parseLicensePolicy, parseMarkdownFrontmatter, parseQualityPolicy, parseRequirementFile, parseSecuritySuppression, parseSpecCatalogScope, parseTasksDoc, parseTasksFromContent, parseTrivyVulnerabilities, processPackageDir, readCodeCoverageSummary, readPackageJson, renderAntigravityAgentFile, renderAntigravitySkillFile, renderAutonomyModeSection, renderClaudeAgentFile, renderClaudeSkillFile, renderCopilotAgentFile, renderCopilotSkillFile, renderCursorAgentFile, renderCursorSkillFile, renderDashboardHtml, renderManualsTab, resolveAgentTargets, resolveBranchHierarchy, resolveCiEnvironment, resolveCodingRuleStacks, resolveCytoscapePath, resolveDefaultBranchBase, resolveDeterministicDate, resolveFeatureFilePath, resolveGitRef, resolveLicenseFromFile, resolveReleaseBaseBranch, resolveSastCwe, resolveSastOwasp, resolveSchemaForArtifact, resolveTargetFiles, runGitleaksCli, runSemgrepCli, sanitizeDlpPayload, sanitizeDlpText, sanitizeTestCorpus, scaffoldSddChange, scanAllProductHandoffs, scanAllTestArtifacts, scanContentForSecrets, scanFileForPrivacyViolations, scanFileForSast, scanGoDependencies, scanInstalledLicenses, scanManualsInWorkspace, scanMavenDependencies, scanPnpmStore, scanPythonDependencies, scanRustDependencies, scanSubdirectories, scanWithNativeFs, scanWithSyft, scanWithTrivy, serializeSarifDocument, slugify2 as slugify, stripVolatileReportMetadata, submitReviewReport, syncPdacDigests, tokenizeTitle, updateCitationsInContent, validateAgainstSchema, validateAnchorExistence, validateArtifactSchema, verifyArtifactDuplicates, verifyArtifactsSchemas, verifyLicenses, verifyManuals, verifyPdacGraph, verifyPrivacy, verifyProgressiveFriction, verifyQualityGate, verifySast, verifySddIntegration, verifySecrets, verifyTasksGovernance, verifyTestingCoverage, verifyTraceability, walkDir, walkMdFiles, walkProjectFiles, walkSourceFiles, walkTaskFiles, writeCucumberJsonReport, writeCycloneDxSbom, writeQualityBaseline, writeReleaseKpiReport, writeReportFileIfChanged, writeSecuritySarifReport, writeThirdPartyNotices };
|
|
18818
18753
|
//# sourceMappingURL=index.js.map
|
|
18819
18754
|
//# sourceMappingURL=index.js.map
|