@aisdlc/core 3.1.0 → 3.3.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.js CHANGED
@@ -5057,6 +5057,256 @@ function emitCiOutput(key, value, env = process.env) {
5057
5057
  writeEnvOutputFile(envOutputFile, key, value);
5058
5058
  }
5059
5059
  }
5060
+ var DEFAULT_DLP_RULES = [
5061
+ {
5062
+ id: "DLP-001-PRIVATE-KEY",
5063
+ description: "PEM / RSA / EC / OPENSSH Private Key Block",
5064
+ pattern: "-----BEGIN (?:[A-Z0-9_-]+ )?PRIVATE KEY-----[\\s\\S]*?-----END (?:[A-Z0-9_-]+ )?PRIVATE KEY-----",
5065
+ replacement: "[REDACTED:PRIVATE_KEY]",
5066
+ enabled: true
5067
+ },
5068
+ {
5069
+ id: "DLP-002-API-TOKEN",
5070
+ description: "Cloud, GitHub, Slack, OpenAI, Stripe, and AWS Access Tokens",
5071
+ pattern: "\\b(?:gh[pousr]_[A-Za-z0-9_]{36,255}|github_pat_[0-9a-zA-Z_]{82}|sk-(?:proj-|live-)?[a-zA-Z0-9_-]{32,}|AKIA[0-9A-Z]{16}|xox[baprs]-[0-9]{10,13}-[0-9]{10,13}[a-zA-Z0-9-]*|(?:sk|rk)_(?:live|test)_[0-9a-zA-Z]{24,99})\\b",
5072
+ replacement: "[REDACTED:API_TOKEN]",
5073
+ enabled: true
5074
+ },
5075
+ {
5076
+ id: "DLP-003-JWT",
5077
+ description: "Plaintext JSON Web Token (JWT)",
5078
+ pattern: "\\beyJ[A-Za-z0-9_-]{10,}\\.eyJ[A-Za-z0-9_-]{10,}\\.[A-Za-z0-9_-]{10,}\\b",
5079
+ replacement: "[REDACTED:JWT_TOKEN]",
5080
+ enabled: true
5081
+ },
5082
+ {
5083
+ id: "DLP-004-CREDIT-CARD",
5084
+ description: "Payment Card Number (13-19 digits formatted)",
5085
+ pattern: "\\b(?:\\d{4}[- ]\\d{4}[- ]\\d{4}[- ]\\d{4}|\\d{16})\\b",
5086
+ replacement: "[REDACTED:CREDIT_CARD]",
5087
+ enabled: true
5088
+ },
5089
+ {
5090
+ id: "DLP-005-EMAIL",
5091
+ description: "Personal or Corporate Email Address",
5092
+ pattern: "\\b[A-Za-z0-9._%+-]+@(?!example\\.com|localhost|test\\.local)[A-Za-z0-9.-]+\\.[A-Za-z]{2,}\\b",
5093
+ replacement: "[REDACTED:EMAIL]",
5094
+ enabled: true
5095
+ },
5096
+ {
5097
+ id: "DLP-006-INTERNAL-URL",
5098
+ description: "Internal Intranet / Corp Service URL",
5099
+ pattern: "https?://(?:[A-Za-z0-9._-]+:[A-Za-z0-9._-]+@|[A-Za-z0-9.-]+\\.(?:internal|corp|intranet|local)\\b)[^\\s\"'`<>]*",
5100
+ replacement: "[REDACTED:INTERNAL_URL]",
5101
+ enabled: true
5102
+ }
5103
+ ];
5104
+ function createDefaultDlpPolicy() {
5105
+ return {
5106
+ version: "1.0",
5107
+ enabled: true,
5108
+ zero_data_retention_required: true,
5109
+ rules: [...DEFAULT_DLP_RULES]
5110
+ };
5111
+ }
5112
+ function normalizeParsedRule(raw, idx) {
5113
+ if (typeof raw.pattern !== "string" || !raw.pattern) return null;
5114
+ return {
5115
+ id: typeof raw.id === "string" ? raw.id : `DLP-CUSTOM-${idx + 1}`,
5116
+ description: typeof raw.description === "string" ? raw.description : "Custom DLP rule",
5117
+ pattern: raw.pattern,
5118
+ replacement: typeof raw.replacement === "string" ? raw.replacement : "[REDACTED]",
5119
+ enabled: raw.enabled !== false
5120
+ };
5121
+ }
5122
+ function parseDlpDoc(yamlContent) {
5123
+ let doc;
5124
+ try {
5125
+ doc = yaml3.load(yamlContent);
5126
+ } catch (err) {
5127
+ throw new Error(`[AI-SDLC Fail-Closed] Invalid YAML in dlp-policy: ${err instanceof Error ? err.message : String(err)}`);
5128
+ }
5129
+ if (!doc || typeof doc !== "object" || Array.isArray(doc)) {
5130
+ throw new Error(`[AI-SDLC Fail-Closed] Invalid dlp-policy structure: root must be a YAML mapping`);
5131
+ }
5132
+ const record = doc;
5133
+ if (record.rules !== void 0 && !Array.isArray(record.rules)) {
5134
+ throw new Error(`[AI-SDLC Fail-Closed] Invalid dlp-policy: rules must be an array`);
5135
+ }
5136
+ return record;
5137
+ }
5138
+ function parseDlpPolicy(yamlContent) {
5139
+ const fallback = createDefaultDlpPolicy();
5140
+ if (!yamlContent || !yamlContent.trim()) return fallback;
5141
+ const record = parseDlpDoc(yamlContent);
5142
+ const rawRules = Array.isArray(record.rules) ? record.rules : [];
5143
+ const parsedRules = rawRules.map((r, i) => normalizeParsedRule(r, i)).filter((r) => r !== null);
5144
+ return {
5145
+ version: typeof record.version === "string" ? record.version : "1.0",
5146
+ enabled: record.enabled !== false,
5147
+ zero_data_retention_required: Boolean(record.zero_data_retention_required ?? true),
5148
+ rules: parsedRules.length > 0 ? parsedRules : fallback.rules
5149
+ };
5150
+ }
5151
+ function loadDlpPolicy(rootDir, customPolicyPath) {
5152
+ const base = rootDir || process.cwd();
5153
+ const filePath = customPolicyPath ? path5.isAbsolute(customPolicyPath) ? customPolicyPath : path5.join(base, customPolicyPath) : path5.join(base, "dlp-policy.yaml");
5154
+ if (!fs8.existsSync(filePath)) return createDefaultDlpPolicy();
5155
+ return parseDlpPolicy(fs8.readFileSync(filePath, "utf-8"));
5156
+ }
5157
+ function applySingleDlpRule(text, rule) {
5158
+ if (rule.enabled === false) return { output: text, matches: 0 };
5159
+ try {
5160
+ const regex = new RegExp(rule.pattern, "g");
5161
+ let matches = 0;
5162
+ const output = text.replace(regex, () => {
5163
+ matches++;
5164
+ return rule.replacement;
5165
+ });
5166
+ return { output, matches };
5167
+ } catch {
5168
+ return { output: text, matches: 0 };
5169
+ }
5170
+ }
5171
+ function sanitizeDlpText(text, policy = createDefaultDlpPolicy()) {
5172
+ if (!policy.enabled || !text) {
5173
+ return { sanitizedText: text, redactionCount: 0, triggeredRuleIds: [] };
5174
+ }
5175
+ let current = text;
5176
+ let totalRedactions = 0;
5177
+ const triggered = [];
5178
+ for (const rule of policy.rules) {
5179
+ const res = applySingleDlpRule(current, rule);
5180
+ if (res.matches > 0) {
5181
+ current = res.output;
5182
+ totalRedactions += res.matches;
5183
+ triggered.push(rule.id);
5184
+ }
5185
+ }
5186
+ return {
5187
+ sanitizedText: current,
5188
+ redactionCount: totalRedactions,
5189
+ triggeredRuleIds: triggered
5190
+ };
5191
+ }
5192
+ function sanitizeDlpPayload(payload, policy = createDefaultDlpPolicy()) {
5193
+ if (!policy.enabled || payload === null || payload === void 0) return payload;
5194
+ if (typeof payload === "string") {
5195
+ return sanitizeDlpText(payload, policy).sanitizedText;
5196
+ }
5197
+ const serialized = JSON.stringify(payload);
5198
+ const { sanitizedText } = sanitizeDlpText(serialized, policy);
5199
+ try {
5200
+ return JSON.parse(sanitizedText);
5201
+ } catch {
5202
+ return payload;
5203
+ }
5204
+ }
5205
+
5206
+ // src/adapters/sdd/review-report.ts
5207
+ var REVIEW_VERDICTS = ["COMPLIANT", "SUGGESTIONS", "BLOCKING"];
5208
+ var REVIEWER_ROLES = [
5209
+ "agent-code-reviewer",
5210
+ "agent-security-auditor",
5211
+ "agent-compliance-checker",
5212
+ "agent-privacy-officer",
5213
+ "agent-expert-user",
5214
+ "auditor",
5215
+ "reviewer"
5216
+ ];
5217
+ function isReviewerRole(role) {
5218
+ if (!role || typeof role !== "string") return false;
5219
+ const normalized = role.toLowerCase().trim();
5220
+ return REVIEWER_ROLES.includes(normalized);
5221
+ }
5222
+ function validateChangeId(changeId, rootDir) {
5223
+ if (!changeId || typeof changeId !== "string") {
5224
+ return { ok: false, error: "Missing changeId for review report submission" };
5225
+ }
5226
+ const rawChange = changeId.trim();
5227
+ if (rawChange.includes("..") || rawChange.includes("/") || rawChange.includes("\\") || !/^[a-zA-Z0-9_\-.]+$/.test(rawChange)) {
5228
+ return { ok: false, error: `Invalid changeId: path traversal or invalid characters detected '${rawChange}'` };
5229
+ }
5230
+ const activeChangeDir = path5.join(rootDir, "specs", "changes", "active", rawChange);
5231
+ if (!fs8.existsSync(activeChangeDir)) {
5232
+ return { ok: false, error: `Active change not found in specs/changes/active: '${rawChange}'` };
5233
+ }
5234
+ return { ok: true, changeDir: activeChangeDir, rawChange };
5235
+ }
5236
+ function validateReviewer(reviewer) {
5237
+ if (!reviewer || typeof reviewer !== "string") {
5238
+ return { ok: false, error: "Reviewer role is required" };
5239
+ }
5240
+ const rawReviewer = reviewer.trim().toLowerCase();
5241
+ if (rawReviewer.includes("..") || rawReviewer.includes("/") || rawReviewer.includes("\\")) {
5242
+ return { ok: false, error: `Invalid reviewer name: path traversal detected '${rawReviewer}'` };
5243
+ }
5244
+ if (!isReviewerRole(rawReviewer)) {
5245
+ return {
5246
+ ok: false,
5247
+ error: `Role '${reviewer}' is not an authorized reviewer role. Authorized roles: ${REVIEWER_ROLES.join(", ")}`
5248
+ };
5249
+ }
5250
+ return { ok: true, rawReviewer };
5251
+ }
5252
+ function validateVerdictAndBody(verdict, body) {
5253
+ if (!verdict || !REVIEW_VERDICTS.includes(verdict)) {
5254
+ return {
5255
+ ok: false,
5256
+ error: `Invalid verdict '${verdict}'. Allowed verdicts: ${REVIEW_VERDICTS.join(", ")}`
5257
+ };
5258
+ }
5259
+ if (!body || typeof body !== "string" || !body.trim()) {
5260
+ return { ok: false, error: "Review report body cannot be empty" };
5261
+ }
5262
+ return { ok: true };
5263
+ }
5264
+ function buildReportMarkdown(change, reviewer, verdict, body, date) {
5265
+ return [
5266
+ `# Review Report: ${reviewer}`,
5267
+ "",
5268
+ `- change: ${change}`,
5269
+ `- reviewer: ${reviewer}`,
5270
+ `- verdict: ${verdict}`,
5271
+ `- date: ${date}`,
5272
+ "",
5273
+ "## Findings",
5274
+ "",
5275
+ body,
5276
+ ""
5277
+ ].join("\n");
5278
+ }
5279
+ function persistReportFile(changeDir, rawReviewer, content) {
5280
+ const reviewsDir = path5.join(changeDir, "reviews");
5281
+ if (!fs8.existsSync(reviewsDir)) {
5282
+ fs8.mkdirSync(reviewsDir, { recursive: true });
5283
+ }
5284
+ const reportFileName = `${rawReviewer}.md`;
5285
+ fs8.writeFileSync(path5.join(reviewsDir, reportFileName), content, "utf-8");
5286
+ return crypto3.createHash("sha256").update(content.replace(/\r\n/g, "\n")).digest("hex");
5287
+ }
5288
+ function submitReviewReport(options) {
5289
+ const root = options.rootDir || process.cwd();
5290
+ const changeCheck = validateChangeId(options.changeId, root);
5291
+ if (!changeCheck.ok) return { success: false, error: changeCheck.error };
5292
+ const reviewerCheck = validateReviewer(options.reviewer);
5293
+ if (!reviewerCheck.ok) return { success: false, error: reviewerCheck.error };
5294
+ const contentCheck = validateVerdictAndBody(options.verdict, options.body);
5295
+ if (!contentCheck.ok) return { success: false, error: contentCheck.error };
5296
+ const rawChange = changeCheck.rawChange;
5297
+ const rawReviewer = reviewerCheck.rawReviewer;
5298
+ const dlpPolicy = loadDlpPolicy(root);
5299
+ const sanitizedBody = sanitizeDlpText(options.body.trim(), dlpPolicy).sanitizedText;
5300
+ const date = options.date || (/* @__PURE__ */ new Date()).toISOString();
5301
+ const reportContent = buildReportMarkdown(rawChange, rawReviewer, options.verdict, sanitizedBody, date);
5302
+ const digest = persistReportFile(changeCheck.changeDir, rawReviewer, reportContent);
5303
+ return {
5304
+ success: true,
5305
+ reportPath: `specs/changes/active/${rawChange}/reviews/${rawReviewer}.md`,
5306
+ digest,
5307
+ verdict: options.verdict
5308
+ };
5309
+ }
5060
5310
 
5061
5311
  // src/adapters/sdd/index.ts
5062
5312
  function getSddAdapter(framework) {
@@ -7358,6 +7608,46 @@ function verifyLicenses(options = {}) {
7358
7608
  const reportMarkdown = generateLicenseReportMarkdown(dependencies, violations, policy, artifacts.sbomPath);
7359
7609
  return assembleDynamicLicenseResult(dependencies, permittedCount, violations, reportMarkdown, artifacts, vulnData);
7360
7610
  }
7611
+ var IGNORED_DIRS = /* @__PURE__ */ new Set(["node_modules", ".git", "bin", "obj", "dist", "build", "target", "reports", "templates"]);
7612
+ var MSBUILD_WEAKENING = [
7613
+ /<TreatWarningsAsErrors>\s*false\s*<\/TreatWarningsAsErrors>/i,
7614
+ /<Nullable>\s*disable\s*<\/Nullable>/i,
7615
+ /<RunAnalyzers>\s*false\s*<\/RunAnalyzers>/i
7616
+ ];
7617
+ var TSCONFIG_WEAKENING = [/"strict"\s*:\s*false/, /"noImplicitAny"\s*:\s*false/, /"strictNullChecks"\s*:\s*false/];
7618
+ function walkFiles(dir, rootDir, out) {
7619
+ for (const entry of fs8.readdirSync(dir, { withFileTypes: true })) {
7620
+ if (entry.isDirectory() && !IGNORED_DIRS.has(entry.name)) walkFiles(path5.join(dir, entry.name), rootDir, out);
7621
+ else if (entry.isFile()) out.push(path5.relative(rootDir, path5.join(dir, entry.name)).replace(/\\/g, "/"));
7622
+ }
7623
+ return out;
7624
+ }
7625
+ function matchWeakening(rel, content, patterns) {
7626
+ return patterns.filter((p) => p.test(content)).map((p) => `[CODING-RULES-BYPASS] '${rel}' weakens the strict coding rules (${p.source}).`);
7627
+ }
7628
+ function checkMsBuildFile(rel, content) {
7629
+ const issues = matchWeakening(rel, content, MSBUILD_WEAKENING);
7630
+ const isNestedBuildProps = /(^|\/)Directory\.Build\.props$/.test(rel) && rel !== "Directory.Build.props";
7631
+ if (isNestedBuildProps && !content.includes("GetPathOfFileAbove")) {
7632
+ issues.push(`[CODING-RULES-BYPASS] Nested '${rel}' does not import the parent Directory.Build.props (GetPathOfFileAbove), silently dropping root rules.`);
7633
+ }
7634
+ return issues;
7635
+ }
7636
+ function checkFile(rel, content, hasDotnetRules, hasTsRules) {
7637
+ if (hasDotnetRules && /\.(csproj|props|targets)$/.test(rel)) return checkMsBuildFile(rel, content);
7638
+ if (hasTsRules && /(^|\/)tsconfig[^/]*\.json$/.test(rel) && !rel.endsWith("tsconfig.strict.json")) {
7639
+ return matchWeakening(rel, content, TSCONFIG_WEAKENING);
7640
+ }
7641
+ return [];
7642
+ }
7643
+ function collectCodingRulesBypassViolations(rootDir) {
7644
+ const hasDotnetRules = fs8.existsSync(path5.join(rootDir, "Directory.Build.props"));
7645
+ const hasTsRules = fs8.existsSync(path5.join(rootDir, "tsconfig.strict.json"));
7646
+ if (!hasDotnetRules && !hasTsRules) return [];
7647
+ return walkFiles(rootDir, rootDir, []).flatMap(
7648
+ (rel) => checkFile(rel, fs8.readFileSync(path5.join(rootDir, rel), "utf-8"), hasDotnetRules, hasTsRules)
7649
+ );
7650
+ }
7361
7651
  var PROTECTED_BYPASS_PATTERNS = [
7362
7652
  /^schemas[\\/]/i,
7363
7653
  /^examples[\\/]security[\\/]/i,
@@ -7368,7 +7658,8 @@ var PROTECTED_BYPASS_PATTERNS = [
7368
7658
  /license-policy\.ya?ml$/i,
7369
7659
  /08_security_concept\.md$/i,
7370
7660
  /09_decisions[\\/]/i,
7371
- /migrations?[\\/]/i
7661
+ /migrations?[\\/]/i,
7662
+ /^\.github[\\/]CODEOWNERS$/i
7372
7663
  ];
7373
7664
  function detectProfileFromChange(changeDir) {
7374
7665
  if (!fs8.existsSync(changeDir)) return "standard";
@@ -7504,7 +7795,10 @@ function verifyProgressiveFriction(options = {}) {
7504
7795
  const changeDir = resolveChangeDirectory(rootDir, options);
7505
7796
  const profile = changeDir ? detectProfileFromChange(changeDir) : "standard";
7506
7797
  const modifiedFiles = options.diffFiles || options.modifiedFiles || (profile === "patch" ? detectGitDiffFiles(rootDir) : []);
7507
- const violations = profile === "patch" ? collectPatchViolations(rootDir, modifiedFiles) : [];
7798
+ const violations = [
7799
+ ...profile === "patch" ? collectPatchViolations(rootDir, modifiedFiles) : [],
7800
+ ...collectCodingRulesBypassViolations(rootDir)
7801
+ ];
7508
7802
  const bypassed = violations.length > 0;
7509
7803
  const success = !bypassed;
7510
7804
  return {
@@ -10490,6 +10784,24 @@ if echo "$CURRENT_BRANCH" | grep -qE "^(main|master|release/.*)$"; then
10490
10784
  exit 1
10491
10785
  fi
10492
10786
 
10787
+ # Immutable Coding Rules Guard: block AI agents from adding, modifying or deleting coding rules files
10788
+ IS_AGENT=0
10789
+ if [ -n "$AI_MODEL" ] || [ -n "$AI_AGENT_NAME" ] || [ -n "$ANTIGRAVITY_AGENT" ] || [ -n "$ANTIGRAVITY_AGENT_ID" ] || [ -n "$ANTIGRAVITY_CONVERSATION_ID" ] || [ -n "$CLAUDE_CODE" ] || [ -n "$CURSOR_AGENT" ] || [ -n "$WINDSURF_AGENT" ] || [ -n "$AIDER_MODEL" ] || [ -f ".ai-sdlc/session-telemetry.json" ]; then
10790
+ IS_AGENT=1
10791
+ fi
10792
+
10793
+ if [ "$IS_AGENT" = "1" ]; then
10794
+ TAMPERED_RULES=$(git diff --cached --diff-filter=AMDR --name-only 2>/dev/null | grep -E "(^|/)(Directory\\.Build\\.props|tsconfig\\.strict\\.json|eslint\\.config\\.mjs|gradle/init\\.d/aisdlc-strict\\.init\\.gradle\\.kts|config/pmd/aisdlc-ruleset\\.xml|config/detekt/detekt\\.yml|\\.cargo/config\\.toml|\\.clippy\\.toml|\\.golangci\\.yml|\\.clang-tidy|cmake/AisdlcStrictCompiler\\.cmake|\\.github/CODEOWNERS|templates/coding-rules/.+)$" || echo "")
10795
+ if [ -n "$TAMPERED_RULES" ]; then
10796
+ echo "" >&2
10797
+ echo "\u274C [AI-SDLC Immutable Coding Rules Guard] BLOCKED: AI agents are forbidden from adding, modifying or deleting coding rules files:" >&2
10798
+ echo "$TAMPERED_RULES" >&2
10799
+ echo "Fix the source or test code to comply with the compiler/linter rules instead of altering the rule configuration." >&2
10800
+ echo "" >&2
10801
+ exit 1
10802
+ fi
10803
+ fi
10804
+
10493
10805
  exit 0
10494
10806
  `;
10495
10807
  var PREPARE_COMMIT_MSG_SCRIPT = `#!/usr/bin/env bash
@@ -10607,7 +10919,7 @@ function installGitHooks(rootDir = process.cwd()) {
10607
10919
  fs8.mkdirSync(hooksDir, { recursive: true });
10608
10920
  }
10609
10921
  const prepareCommitMsgPath = path5.join(hooksDir, "prepare-commit-msg");
10610
- const preCommitPath = path5.join(hooksDir, "pre-commit");
10922
+ const preCommitPath = path5.join(gitDir, "hooks", "pre-commit");
10611
10923
  try {
10612
10924
  fs8.writeFileSync(prepareCommitMsgPath, PREPARE_COMMIT_MSG_SCRIPT, { encoding: "utf-8", mode: 493 });
10613
10925
  fs8.writeFileSync(preCommitPath, PRE_COMMIT_SCRIPT, { encoding: "utf-8", mode: 493 });
@@ -14061,6 +14373,51 @@ Execute every implementation task following this strict sequential order:
14061
14373
  - **Cross-Workflow Audit**: When fixing any CI/CD or configuration defect detected in a PR, search all \`.github/workflows/*.yml\` for the same pattern (including release, post-merge, and publishing pipelines) before declaring the fix complete.
14062
14374
  - **Remote Verification**: Creating a PR (\`gh pr create\`) does not equal success; actively verify that remote checks pass (\`gh pr checks\`).
14063
14375
  - If autonomy is $\\ge$ \`HUMAN_REVIEW_PLAN\`, conclude by emitting the Workflow Handoff block (\`templates/workflow/agent-handoff.template.md\`) to the human Tech Lead or Release Manager, opening the Human Action Window. In \`AUTONOMOUS\` mode, omit interactive handoff.`
14376
+ },
14377
+ {
14378
+ id: "agent-auditor",
14379
+ title: "Transversal Quality and Improvement Auditor",
14380
+ description: "Polymorphically inspect deliverables from any AI-SDLC specialist agent on demand, identifying structural weaknesses, overengineering, or blind spots, and proposing concrete, minimal solutions adhering strictly to YAGNI.",
14381
+ globs: "**/*",
14382
+ claudeTools: ["View", "GlobTool", "GrepTool", "LS", "Bash"],
14383
+ antigravityTools: ["read_file", "run_command", "call_mcp_tool", "ask_question"],
14384
+ body: `## Role & Mission
14385
+ - **Role**: Transversal Quality and Constructive Auditor Agent (\`agent-auditor\`).
14386
+ - **Mission**: Inspect the output deliverables of any upstream specialist agent upon demand across any phase, identifying structural weaknesses, premature abstractions, overengineering, or blind spots, and proposing concrete, minimal, and standard solutions adhering strictly to Simplicity First (YAGNI).
14387
+
14388
+ ## Operational Directives & Guardrails
14389
+ - **Polymorphic On-Demand Scope**: May be invoked over deliverables from any role (\`agent-product-analyst\`, \`agent-threat-modeler\`, \`agent-privacy-officer\`, \`agent-system-architect\`, \`agent-qa-engineer\`, \`agent-developer\`, \`agent-devops\`).
14390
+ - **Simplicity First (YAGNI)**: Actively challenge speculative parameters, redundant interfaces, unused design patterns, and unrequested flexibility.
14391
+ - **Classification of Findings**: Label every finding as:
14392
+ * \`[BLOCKING_DEFECT]\`: Critical omission, structural debt, or standard violation that must be resolved.
14393
+ * \`[SIMPLIFICATION]\`: Opportunity to remove unneeded complexity or reduce code/spec surface without loss of function.
14394
+ * \`[ADVISORY]\`: Non-blocking observation or suggestion.
14395
+ - **NON-INVASIVE GUARDRAIL**: You do NOT modify upstream files or specifications directly.
14396
+ - **Mandatory Return Handoff**: Emit a structured report citing canonical IDs and SHA-256 digests, concluding with the canonical Workflow Handoff block (\`templates/workflow/agent-handoff.template.md\`) directed back to the audited specialist agent.
14397
+ - **ANTI-PING-PONG GUARDRAIL**: Enforce maximum 1 audit return round per increment unless blocking defects persist.`
14398
+ },
14399
+ {
14400
+ id: "agent-adversary",
14401
+ title: "Transversal Red Team and Chaos Adversary",
14402
+ description: "Actively attempt to break, bypass, or invalidate deliverables from any target specialist agent, providing concrete proofs-of-concept (PoC), counterexamples, and reproduction steps for every discovered failure mode.",
14403
+ globs: "**/*",
14404
+ claudeTools: ["View", "GlobTool", "GrepTool", "LS", "Bash"],
14405
+ antigravityTools: ["read_file", "run_command", "call_mcp_tool", "ask_question"],
14406
+ body: `## Role & Mission
14407
+ - **Role**: Transversal Red Team and Stress Adversary Agent (\`agent-adversary\`).
14408
+ - **Mission**: Actively attempt to break, bypass, or invalidate the deliverables of any target specialist agent across any phase, providing concrete proofs-of-concept (PoC), counterexamples, and reproduction steps for every discovered failure mode.
14409
+
14410
+ ## Operational Directives & Guardrails
14411
+ - **Polymorphic On-Demand Scope**:
14412
+ * **Product**: Uncover contradictory requirements, unreachable business states, and logic traps.
14413
+ * **Architecture**: Simulate race conditions, cascading failures, resource exhaustion, and single points of failure (SPOFs).
14414
+ * **QA**: Perform conceptual mutation testing; demonstrate how flawed or empty implementations could falsely pass tests green.
14415
+ * **Development**: Attack boundary inputs, concurrency race triggers, and memory/type edge breaks.
14416
+ * **DevOps**: Probe pipeline isolation, credential boundaries, and cold-start/dependency outages.
14417
+ - **MANDATORY PROOF-OF-BREAK**: Abstract criticism without reproducible proof is strictly forbidden. Every finding must include: (1) Target Entity ID, (2) Failure Scenario / Attack Vector, (3) Concrete PoC (input vector, sequence breakdown, or mutant code), and (4) Expected Impact.
14418
+ - **NON-INVASIVE GUARDRAIL**: You do NOT patch the vulnerabilities or bugs yourself.
14419
+ - **Mandatory Return Handoff**: Emit the canonical Workflow Handoff block (\`templates/workflow/agent-handoff.template.md\`) addressing the audited agent, demanding verified mitigation before downstream promotion.
14420
+ - **ANTI-PING-PONG GUARDRAIL**: Enforce maximum 1 adversarial return round per increment.`
14064
14421
  }
14065
14422
  ];
14066
14423
  function renderAntigravityAgentFile(agent) {
@@ -14130,12 +14487,20 @@ var LIFECYCLE_SKILL_TEMPLATES = [
14130
14487
  {
14131
14488
  id: "aisdlc-greenfield",
14132
14489
  title: "Greenfield Project Inception & Delivery Playbook",
14133
- description: "Orchestrate end-to-end AI-SDLC onboarding and Phase 0 Inception for brand-new (Greenfield) projects, from repository initialization (aisdlc init) and NAF v4 Vision (ARCH-INTRO-*) through ProductShape, STRIDE Threat Modeling, arc42 Architecture, and initial SDD increment delivery.",
14490
+ 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 loops, and initial SDD increment delivery.",
14134
14491
  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).",
14135
14492
  globs: "product/**, specs/product/**, architecture/**, templates/**",
14136
14493
  body: `## Purpose & Trigger
14137
14494
  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.
14138
14495
 
14496
+ ## Mandatory Transversal Quality & Adversarial Protocol
14497
+ Every authoring agent deliverable across Phase 0 and Inception undergoes mandatory quality auditing and adversarial stress-testing before downstream progression:
14498
+ - **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.
14499
+ - **Non-Invasive Review**: Neither auditor nor adversary modifies deliverables directly; both deliver structured reports citing canonical IDs and SHA-256 digests.
14500
+ - **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.
14501
+ - **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.
14502
+ - **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.
14503
+
14139
14504
  ## End-to-End Execution Playbook
14140
14505
 
14141
14506
  ### Step 1: Repository Turnkey Initialization
@@ -14155,6 +14520,9 @@ Use this skill when starting a **brand-new software project from scratch (Greenf
14155
14520
  - Actors (\`ACT-*\`), Use Cases (\`UC-*\`), Business Rules (\`BR-*\`), Functional Requirements (\`FR-*\` with mandatory \`@nominal\`, \`@boundary\`, \`@invalid\` Gherkin blocks), and Quality Requirements (\`QR-*\`).
14156
14521
  5. Validate schemas and duplicates via MCP tools \`verify_schemas\` and \`verify_duplicates\` (or \`npx aisdlc check --fix\`).
14157
14522
  6. **Mandatory Upstream UX & MVP Boundary Gate (\`agent-expert-user\`)**: Invoke [\`agent-expert-user\`](../agent-expert-user/SKILL.md) in **Design Mode** to stress-test the proposed workflows, enforce strict MVP boundaries, and separate core MVP \`UC-*\` from future roadmap backlog (\`templates/product/user-design-feedback.template.md\`).
14523
+ 7. **Transversal Quality & Adversarial Loop (\`agent-product-analyst\`)**:
14524
+ - Concurrently invoke \`agent-auditor\` and \`agent-adversary\` on the draft product artifacts in isolated context windows.
14525
+ - Consolidate findings and hand off back to \`agent-product-analyst\` to re-execute and remediate issues (max 2 correction rounds).
14158
14526
 
14159
14527
  ### Step 3: Shift-Left Cybersecurity & Privacy-by-Design (\`agent-threat-modeler\` \u2794 \`agent-privacy-officer\`)
14160
14528
  1. Delegate to or adopt [\`agent-threat-modeler\`](../agent-threat-modeler/SKILL.md).
@@ -14162,15 +14530,24 @@ Use this skill when starting a **brand-new software project from scratch (Greenf
14162
14530
  - Threat Actors (\`ACT-THREAT-*\`)
14163
14531
  - Abuse Cases (\`ABUSE-*\` targeting \`UC-*\`)
14164
14532
  - Security Requirements (\`SEC-REQ-*\` with \`@security @mitigation\` negative Gherkin scenarios and \`SEC-ENC-*\` Zero Trust enclave bindings).
14165
- 3. Hand off to [\`agent-privacy-officer\`](../agent-privacy-officer/SKILL.md) to apply LINDDUN and GDPR/LOPDGDD/ISO 27701 in \`specs/privacy/\`:
14533
+ 3. **Transversal Quality & Adversarial Loop (\`agent-threat-modeler\`)**:
14534
+ - Concurrently invoke \`agent-auditor\` and \`agent-adversary\` over the security threat models.
14535
+ - Consolidate findings and return handoff to \`agent-threat-modeler\` to re-execute and remediate (max 2 correction rounds).
14536
+ 4. Hand off to [\`agent-privacy-officer\`](../agent-privacy-officer/SKILL.md) to apply LINDDUN and GDPR/LOPDGDD/ISO 27701 in \`specs/privacy/\`:
14166
14537
  - Personal Data Assets (\`DATA-ASSET-*\`), GDPR Art. 30 Records of Processing (\`PRIV-ROPA-*\`), and Privacy Requirements (\`PRIV-REQ-*\` with \`@privacy @gdpr\` Gherkin scenarios).
14167
- 4. Run \`verify_schemas\` and \`verify_privacy\` (\`npx aisdlc verify privacy\`).
14538
+ 5. **Transversal Quality & Adversarial Loop (\`agent-privacy-officer\`)**:
14539
+ - Concurrently invoke \`agent-auditor\` and \`agent-adversary\` over the privacy records and requirements.
14540
+ - Consolidate findings and return handoff to \`agent-privacy-officer\` to re-execute and remediate (max 2 correction rounds).
14541
+ 6. Run \`verify_schemas\` and \`verify_privacy\` (\`npx aisdlc verify privacy\`).
14168
14542
 
14169
14543
  ### Step 4: Modular Systems Architecture (\`agent-system-architect\`)
14170
14544
  1. Delegate to or adopt [\`agent-system-architect\`](../agent-system-architect/SKILL.md).
14171
14545
  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-*\`).
14172
14546
  3. Inspect third-party stack choices against \`license-policy.yaml\` via \`verify_licenses\` and subprocessors against \`privacy-policy.yaml\` via \`verify_privacy\`.
14173
14547
  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.
14548
+ 5. **Transversal Quality & Adversarial Loop (\`agent-system-architect\`)**:
14549
+ - Concurrently invoke \`agent-auditor\` (evaluating YAGNI, architecture bloat, Ports & Adapters interfaces) and \`agent-adversary\` (simulating SPOFs, race conditions, cascading outages) in isolated context windows.
14550
+ - Consolidate findings and return handoff to \`agent-system-architect\` to re-execute and remediate (max 2 correction rounds).
14174
14551
 
14175
14552
  ### Step 5: Release Milestone & Topological Wave SDD Plan (\`1 UC-* = 1 CHG-*\`)
14176
14553
  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\`.
@@ -14180,6 +14557,8 @@ Use this skill when starting a **brand-new software project from scratch (Greenf
14180
14557
  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.
14181
14558
 
14182
14559
  ## Non-Negotiable Guardrails
14560
+ - **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.
14561
+ - **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.
14183
14562
  - **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-*\`.
14184
14563
  - 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.
14185
14564
  - All newly drafted specifications must start with \`status: draft\`.
@@ -14188,12 +14567,20 @@ Use this skill when starting a **brand-new software project from scratch (Greenf
14188
14567
  {
14189
14568
  id: "aisdlc-legacy-onboarding",
14190
14569
  title: "Legacy / Brownfield Retro-Inception Playbook",
14191
- description: "Orchestrate progressive AI-SDLC adoption and Brownfield retro-inception on existing or legacy repositories without breaking production code, reverse-engineering architecture (ARCH-INTRO-*, CMP-*) and establishing baseline quality, security, and license audits before new SDD increments.",
14570
+ 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-*), transversal auditor/adversary verification loops, and establishing baseline quality, security, and license audits before new SDD increments.",
14192
14571
  references: "[`process/02_product_definition.md`](../../process/02_product_definition.md), [`process/04_open_source_license_compliance.md`](../../process/04_open_source_license_compliance.md), [`process/04b_data_protection_and_privacy.md`](../../process/04b_data_protection_and_privacy.md), [`process/05_architecture_arc42_nafv4.md`](../../process/05_architecture_arc42_nafv4.md), [`process/10_quality_management_and_release_gates.md`](../../process/10_quality_management_and_release_gates.md), and [`process/09_agent_protocols.md`](../../process/09_agent_protocols.md).",
14193
14572
  globs: "architecture/**, specs/**, src/**, packages/**",
14194
14573
  body: `## Purpose & Trigger
14195
14574
  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.
14196
14575
 
14576
+ ## Mandatory Transversal Quality & Adversarial Protocol
14577
+ Every authoring agent deliverable during Brownfield retro-inception undergoes mandatory quality auditing and adversarial stress-testing before downstream progression:
14578
+ - **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.
14579
+ - **Non-Invasive Review**: Neither auditor nor adversary modifies deliverables directly; both deliver structured reports citing canonical IDs and SHA-256 digests.
14580
+ - **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.
14581
+ - **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.
14582
+ - **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.
14583
+
14197
14584
  ## End-to-End Execution Playbook
14198
14585
 
14199
14586
  ### Step 1: Non-Destructive Framework Scaffolding
@@ -14211,9 +14598,13 @@ Before modifying any code or creating SDD changes, run diagnostic verifiers to q
14211
14598
  ### Step 3: Brownfield Retro-Inception (\`agent-system-architect\` & \`agent-product-analyst\`)
14212
14599
  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:
14213
14600
  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\`.
14601
+ - **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).
14214
14602
  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-*\`).
14603
+ - **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).
14215
14604
  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).
14605
+ - **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).
14216
14606
  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.
14607
+ - **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).
14217
14608
 
14218
14609
  ### Step 4: Characterization Testing & Synchronization
14219
14610
  1. Run MCP tool \`sdd_check_fix\` (\`npx aisdlc check --fix\`) to extract \`.feature\` files and compute canonical SHA-256 digests.
@@ -14223,6 +14614,8 @@ Instead of attempting to document 100% of a legacy monolith upfront, apply **bou
14223
14614
  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).
14224
14615
 
14225
14616
  ## Non-Negotiable Guardrails
14617
+ - **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.
14618
+ - **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.
14226
14619
  - **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-*\`).
14227
14620
  - **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\`).
14228
14621
  - **Immediate Secret Remediation**: If Step 2 (\`verify_security\`) uncovers leaked credentials (exit code 4), halt feature work and remediate/rotate secrets immediately.`
@@ -14230,7 +14623,7 @@ Once the target domain's baseline artifacts (\`ARCH-INTRO-*\`, \`UC-*\`, \`FR-*\
14230
14623
  {
14231
14624
  id: "aisdlc-increment",
14232
14625
  title: "Bounded SDD Feature & Bugfix Delivery Playbook",
14233
- description: "Orchestrate the complete Spec-Driven Development (SDD) lifecycle for bounded feature increments, enhancements, and bugfixes (CHG-* / TSK-*), from upstream requirement derivation and 4-tier Git branching through Red-Green-Refactor TDD, Pre-Merge Audit Triad, all 11 Quality Gates, and canonical baseline integration.",
14626
+ description: "Orchestrate the complete Spec-Driven Development (SDD) lifecycle for bounded feature increments, enhancements, and bugfixes (CHG-* / TSK-*), from upstream requirement derivation and 4-tier Git branching through Red-Green-Refactor TDD, transversal auditor/adversary verification loops, Pre-Merge Audit Triad, all 11 Quality Gates, and canonical baseline integration.",
14234
14627
  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).",
14235
14628
  globs: "specs/changes/**, src/**, packages/**, tests/**",
14236
14629
  body: `## Purpose & Trigger
@@ -14242,9 +14635,12 @@ Use this skill for **every evolutionary increment (new feature, enhancement, ref
14242
14635
  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/\`.
14243
14636
  2. If the increment introduces new behavior or modifies business rules:
14244
14637
  - Use [\`agent-product-analyst\`](../agent-product-analyst/SKILL.md) to create or update the \`UC-*\`, \`BR-*\`, and \`FR-*\` (with \`@nominal\`, \`@boundary\`, \`@invalid\` Gherkin scenarios).
14638
+ - **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).
14245
14639
  - Run MCP tool \`verify_duplicates\` (\`npx aisdlc verify duplicates\`) to block lexical or functional collisions early.
14246
14640
  - Use [\`agent-threat-modeler\`](../agent-threat-modeler/SKILL.md) to model any new \`ABUSE-*\` and \`SEC-REQ-*\` mitigations.
14641
+ - **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).
14247
14642
  - 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-*\`).
14643
+ - **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).
14248
14644
  3. Run \`sdd_check_fix\` (\`npx aisdlc check --fix\`) to sync Gherkin \`.feature\` files and validate schemas.
14249
14645
 
14250
14646
  ### Step 2: SDD Change Scaffolding & Architectural Design (\`agent-system-architect\`)
@@ -14252,7 +14648,10 @@ Use this skill for **every evolutionary increment (new feature, enhancement, ref
14252
14648
  2. Use [\`agent-system-architect\`](../agent-system-architect/SKILL.md) to complete \`specs/changes/active/<chg-id>/design.md\` and \`specs/architecture/CMP-*.md\`:
14253
14649
  - 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.
14254
14650
  - 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\`).
14255
- 3. Run \`verify_governance\` and \`verify_friction\` to validate task governance, 100% design/handoff scope coverage, and anti-monolith limits (\`maxUseCasesPerChange = 1\`).
14651
+ 3. **Transversal Loop (\`agent-system-architect\`)**:
14652
+ - Concurrently invoke \`agent-auditor\` (evaluating YAGNI, interface bloat, task completeness) and \`agent-adversary\` (probing race conditions, contract drift, SPOFs) in isolated context windows.
14653
+ - Consolidate findings and return handoff to \`agent-system-architect\` to re-execute and remediate (max 2 correction rounds).
14654
+ 4. Run \`verify_governance\` and \`verify_friction\` to validate task governance, 100% design/handoff scope coverage, and anti-monolith limits (\`maxUseCasesPerChange = 1\`).
14256
14655
 
14257
14656
  ### Step 3: 4-Tier Git Branch Navigation & Multi-Agent Parallelism
14258
14657
  1. Navigate to the task branch using \`npx aisdlc git checkout <TSK-ID>\` (\`pnpm run git:checkout <TSK-ID>\`), which cascade-creates:
@@ -14265,7 +14664,10 @@ Use this skill for **every evolutionary increment (new feature, enhancement, ref
14265
14664
  ### Step 4: Red Phase \u2014 Failing Test Suites (\`agent-qa-engineer\`)
14266
14665
  1. Delegate to or adopt [\`agent-qa-engineer\`](../agent-qa-engineer/SKILL.md).
14267
14666
  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/\`.
14268
- 3. Run \`verify_testing\` (\`npx aisdlc verify testing\`) to confirm requirement test coverage before writing production code.
14667
+ 3. **Transversal Loop (\`agent-qa-engineer\`)**:
14668
+ - 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.
14669
+ - Consolidate findings and return handoff to \`agent-qa-engineer\` to re-execute and harden test suites (max 2 correction rounds).
14670
+ 4. Run \`verify_testing\` (\`npx aisdlc verify testing\`) to confirm requirement test coverage before writing production code.
14269
14671
 
14270
14672
  ### Step 5: Green & Refactor Phase \u2014 Surgical Implementation (\`agent-developer\`)
14271
14673
  1. Delegate to or adopt [\`agent-developer\`](../agent-developer/SKILL.md).
@@ -14273,6 +14675,19 @@ Use this skill for **every evolutionary increment (new feature, enhancement, ref
14273
14675
  - (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).
14274
14676
  3. Verify any new dependency against \`license-policy.yaml\` via \`verify_licenses\` and PII handling against \`privacy-policy.yaml\` via \`verify_privacy\`.
14275
14677
  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.
14678
+ 5. **Transversal Loop (\`agent-developer\`)**:
14679
+ - 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.
14680
+ - Consolidate findings and return handoff to \`agent-developer\` to re-execute and remediate (max 2 correction rounds).
14681
+
14682
+ ### Mandatory Transversal Quality & Adversarial Protocol
14683
+ - **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.
14684
+ - **Concurrent Inspection**:
14685
+ * [\`agent-auditor\`](../agent-auditor/SKILL.md) inspects deliverables for structural debt, premature generalizations, or unneeded complexity (YAGNI).
14686
+ * [\`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.
14687
+ - **Non-Invasive Guardrail**: Neither auditor nor adversary edits files directly. Both emit structured findings citing canonical IDs and SHA-256 hashes.
14688
+ - **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.
14689
+ - **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.
14690
+ - **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.
14276
14691
 
14277
14692
  ### Step 6: Post-Development Functional Validation & Pre-Merge Audit Triad
14278
14693
  1. **Functional Validation (\`agent-expert-user\`)**: Validate live runtime behavior against \`UC-*\` and \`FR-*\` criteria (including \`0\` browser \`console.error\`/\`pageerror\` on UI changes).
@@ -14291,6 +14706,8 @@ Use this skill for **every evolutionary increment (new feature, enhancement, ref
14291
14706
  - 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\`).
14292
14707
 
14293
14708
  ## Non-Negotiable Guardrails
14709
+ - **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.
14710
+ - **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.
14294
14711
  - **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.
14295
14712
  - **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\`.`
14296
14713
  }
@@ -14467,6 +14884,14 @@ This file defines the operational rules and specialized role mappings for Google
14467
14884
  - **Cross-Workflow Audit**: When fixing any CI/CD or configuration defect detected in a PR, search all \`.github/workflows/*.yml\` for the same pattern (including release, post-merge, and publishing pipelines) before declaring the fix complete.
14468
14885
  - **Remote Verification**: Creating a PR (\`gh pr create\`) does not equal success; actively verify that remote checks pass (\`gh pr checks\`).
14469
14886
 
14887
+ ### 12. \`agent-auditor\` (Transversal Quality and Improvement Auditor)
14888
+ - **Mission**: Polymorphically inspect deliverables from any specialist agent on demand, identifying structural weaknesses, overengineering, or blind spots, and proposing minimal solutions adhering strictly to YAGNI.
14889
+ - **Directives**: Constructive critique; classify findings into \`[BLOCKING_DEFECT]\`, \`[SIMPLIFICATION]\`, and \`[ADVISORY]\`; non-invasive (never edit files directly); always return handoff to the audited agent (max 1 return round).
14890
+
14891
+ ### 13. \`agent-adversary\` (Transversal Red Team and Chaos Adversary)
14892
+ - **Mission**: Actively attempt to break, bypass, or invalidate deliverables from any target specialist agent, providing concrete proofs-of-concept (PoC), counterexamples, and reproduction steps.
14893
+ - **Directives**: Expose failure modes across Product (logic traps), Architecture (SPOF/races), QA (mutation testing/false greens), Code (boundary/concurrency), and DevOps (pipeline escape); mandatory proof-of-break; non-invasive; always return handoff to the audited agent (max 1 return round).
14894
+
14470
14895
  ---
14471
14896
 
14472
14897
  ## 3. Git 4-Tier Hierarchy and Commit Conventions
@@ -14482,10 +14907,11 @@ This file defines the operational rules and specialized role mappings for Google
14482
14907
  ---
14483
14908
 
14484
14909
  ## 4. Workflow Handoff Protocol and Human Action Window | Ventana de Acci\xF3n Humana
14910
+ - **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 delegate each specialist phase to a fresh isolated subagent context that hydrates 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.
14485
14911
  - **Conditional Activation Rule by Autonomy**:
14486
14912
  - \u{1F7E2} **\`AUTONOMOUS\`** (or exclusive final supervision in PR/CI): **OMITTED**. Do not request or emit interactive handoff to avoid interrupting unattended execution.
14487
14913
  - \u{1F7E1} **Autonomy $\\ge$ \`HUMAN_REVIEW_PLAN\`** (\`HUMAN_REVIEW_PLAN\`, \`AMBIGUOUS\`, \`HIGH_RISK_MANUAL\`): **MANDATORY**. Emit the Workflow Handoff block compliant with [\`templates/workflow/agent-handoff.template.md\`](../../templates/workflow/agent-handoff.template.md) and **STOP**.
14488
- - **Block Contents**: Declare produced deliverables, recommend the next role in workflow (\`agent-threat-modeler\`, \`agent-privacy-officer\`, \`agent-system-architect\`, \`agent-qa-engineer\`, \`agent-developer\`, \`agent-expert-user\`, \`agent-code-reviewer\`, \`agent-security-auditor\`, \`agent-compliance-checker\`, \`agent-devops\`, etc.), provide suggested invocation prompt, and keep **the Human Action Window open at all times for the human user to take action** (review, edit by hand, pause/reroute, or delegate).
14914
+ - **Block Contents**: Declare produced deliverables, recommend the next role in workflow (\`agent-threat-modeler\`, \`agent-privacy-officer\`, \`agent-system-architect\`, \`agent-qa-engineer\`, \`agent-developer\`, \`agent-expert-user\`, \`agent-code-reviewer\`, \`agent-security-auditor\`, \`agent-compliance-checker\`, \`agent-devops\`, \`agent-auditor\`, \`agent-adversary\`, etc.), provide suggested invocation prompt, and keep **the Human Action Window open at all times for the human user to take action** (review, edit by hand, pause/reroute, or delegate).
14489
14915
  `;
14490
14916
  var STARTER_CURSOR_CORE_RULES = `---
14491
14917
  description: Global canonical directives, 5 unbreakable commandments, and AI-SDLC pre-flight
@@ -14532,6 +14958,8 @@ Before finalizing changes or proposing commits:
14532
14958
  | \`agent-expert-user\` | Bimodal MVP evaluation (design) and functional validation against \`UC-*\` and \`FR-*\` (pre-PR). |
14533
14959
  | \`agent-code-reviewer\` | PR audit (SOLID, DRY, YAGNI): \`[BLOCKING]\` / \`[CLEAN_CODE_SUGGESTION]\` / \`[COMPLIANT]\`. |
14534
14960
  | \`agent-devops\` | CI/CD, Docker, IaC only \u2014 **FORBIDDEN** to touch \`src/\` or \`packages/*/src/\`. |
14961
+ | \`agent-auditor\` | Transversal on-demand constructive auditor; identifies overengineering, blind spots & YAGNI simplifications; returns handoff to audited agent. |
14962
+ | \`agent-adversary\` | Transversal on-demand Red Team adversary; breaks deliverables with reproducible PoC & mutation tests; returns handoff to audited agent. |
14535
14963
 
14536
14964
  ## 5. Task Autonomy Modes (\`tasks.md\`)
14537
14965
  - \u{1F7E2} **\`AUTONOMOUS\`**: Low risk. Implement directly, omit handoff block.
@@ -14540,6 +14968,7 @@ Before finalizing changes or proposing commits:
14540
14968
  - \u{1F534} **\`HIGH_RISK_MANUAL\`**: Critical risk. Human-only execution.
14541
14969
 
14542
14970
  ## 6. Workflow Handoff Protocol and Human Action Window | Ventana de Acci\xF3n Humana
14971
+ - **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 delegate each specialist phase to a fresh isolated subagent context that hydrates 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.
14543
14972
  - **Conditional Activation**:
14544
14973
  * \u{1F7E2} **\`AUTONOMOUS\`** (or PR/CI supervision): **OMITTED**. Do not request or emit interactive handoff.
14545
14974
  * \u{1F7E1} **Autonomy $\\ge$ \`HUMAN_REVIEW_PLAN\`** (\`HUMAN_REVIEW_PLAN\`, \`AMBIGUOUS\`, \`HIGH_RISK_MANUAL\`): **MANDATORY**. Emit Workflow Handoff block compliant with [\`templates/workflow/agent-handoff.template.md\`](templates/workflow/agent-handoff.template.md) and **STOP**.
@@ -14701,6 +15130,14 @@ npx tsx packages/cli/src/index.ts sdd integrate --change <chg-id>
14701
15130
  - **Mission**: Maintain, evolve, and audit automated project infrastructure: CI/CD workflows, Docker containers, IaC manifests, and support scripts.
14702
15131
  - **NON-INVASION GUARDRAIL**: STRICTLY FORBIDDEN from modifying application source code (\`src/\`, \`packages/*/src/\`).
14703
15132
 
15133
+ ### 12. \`agent-auditor\` (Transversal Quality and Improvement Auditor)
15134
+ - **Mission**: Polymorphically inspect deliverables from any specialist agent on demand, identifying structural weaknesses, overengineering, or blind spots, and proposing minimal solutions adhering strictly to YAGNI.
15135
+ - **Directives**: Constructive critique; classify findings into \`[BLOCKING_DEFECT]\`, \`[SIMPLIFICATION]\`, and \`[ADVISORY]\`; non-invasive (never edit files directly); always return handoff to the audited agent (max 1 return round).
15136
+
15137
+ ### 13. \`agent-adversary\` (Transversal Red Team and Chaos Adversary)
15138
+ - **Mission**: Actively attempt to break, bypass, or invalidate deliverables from any target specialist agent, providing concrete proofs-of-concept (PoC), counterexamples, and reproduction steps.
15139
+ - **Directives**: Expose failure modes across Product (logic traps), Architecture (SPOF/races), QA (mutation testing/false greens), Code (boundary/concurrency), and DevOps (pipeline escape); mandatory proof-of-break; non-invasive; always return handoff to the audited agent (max 1 return round).
15140
+
14704
15141
  ---
14705
15142
 
14706
15143
  ## 4. Task Autonomy Modes (\`tasks.md\`)
@@ -14744,6 +15181,7 @@ Change-ID: CHG-026-AGENT-NATIVE-CONFIGS
14744
15181
  ---
14745
15182
 
14746
15183
  ## 7. Workflow Handoff Protocol and Human Action Window | Ventana de Acci\xF3n Humana
15184
+ - **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 delegate each specialist phase to a fresh isolated subagent context that hydrates 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.
14747
15185
  - **Conditional Activation**:
14748
15186
  - \u{1F7E2} **\`AUTONOMOUS\`** (or PR/CI final supervision): **OMITTED**. Uninterrupted continuous execution.
14749
15187
  - \u{1F7E1} **Autonomy $\\ge$ \`HUMAN_REVIEW_PLAN\`** (\`HUMAN_REVIEW_PLAN\`, \`AMBIGUOUS\`, \`HIGH_RISK_MANUAL\`): **MANDATORY**. Emit Workflow Handoff block ([\`templates/workflow/agent-handoff.template.md\`](templates/workflow/agent-handoff.template.md)) and **STOP**.
@@ -14811,6 +15249,7 @@ Non-Negotiable Quality Thresholds (\`quality-policy.yaml\`):
14811
15249
  ---
14812
15250
 
14813
15251
  ## 5. Workflow Handoff Protocol and Human Action Window | Ventana de Acci\xF3n Humana
15252
+ - **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 delegate each specialist phase to a fresh isolated subagent context that hydrates 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.
14814
15253
  - **Conditional Activation**:
14815
15254
  * \u{1F7E2} **\`AUTONOMOUS\` Mode** (or PR/CI final supervision): **OMITTED**. Do not interrupt unattended execution.
14816
15255
  * \u{1F7E1} **Autonomy $\\ge$ \`HUMAN_REVIEW_PLAN\`** (\`HUMAN_REVIEW_PLAN\`, \`AMBIGUOUS\`, \`HIGH_RISK_MANUAL\`): **MANDATORY**. Emit Workflow Handoff block compliant with [\`templates/workflow/agent-handoff.template.md\`](../templates/workflow/agent-handoff.template.md) and **STOP**.
@@ -14833,6 +15272,8 @@ Non-Negotiable Quality Thresholds (\`quality-policy.yaml\`):
14833
15272
  | \`agent-expert-user\` | Bimodal MVP evaluation (design) and functional validation against \`UC-*\` and \`FR-*\` (pre-PR). |
14834
15273
  | \`agent-code-reviewer\` | PR audit (SOLID, DRY, YAGNI): \`[BLOCKING]\` / \`[CLEAN_CODE_SUGGESTION]\` / \`[COMPLIANT]\`. |
14835
15274
  | \`agent-devops\` | CI/CD, Docker, IaC only \u2014 **FORBIDDEN** to touch \`src/\` or \`packages/*/src/\`. |
15275
+ | \`agent-auditor\` | Transversal on-demand constructive auditor; identifies overengineering, blind spots & YAGNI simplifications; returns handoff to audited agent. |
15276
+ | \`agent-adversary\` | Transversal on-demand Red Team adversary; breaks deliverables with reproducible PoC & mutation tests; returns handoff to audited agent. |
14836
15277
 
14837
15278
  ---
14838
15279
 
@@ -15951,7 +16392,7 @@ Describes the adversary's profile, technical skill level, available resources, a
15951
16392
  | :--- | :--- | :--- | :--- | :--- |\r
15952
16393
  | **1.0.0** | 2026-09-03 | Security Officer / Threat Modeler | Initial threat profile characterization | CHG-SEC-001 |\r
15953
16394
  `;
15954
- var STARTER_TEMPLATES_WORKFLOW_AGENT_HANDOFF_TEMPLATE_MD = '# Workflow Handoff Template\r\n\r\n> **Canonical reference:** [`process/09_agent_protocols.md`](../../process/09_agent_protocols.md) and [`process/01_governance_and_roles.md`](../../process/01_governance_and_roles.md).\r\n>\r\n> **Activation Criterion by Autonomy Mode:**\r\n> - \u{1F7E2} **`AUTONOMOUS` (or exclusive supervision at the end in PR/CI):** OMITTED. The agent executes and delivers without interrupting the user with this handoff block.\r\n> - \u{1F7E1} **`HUMAN_REVIEW_PLAN` | \u{1F7E0} `AMBIGUOUS` | \u{1F534} `HIGH_RISK_MANUAL`:** MANDATORY. Upon completing the phase or proposal, the agent emits this block and **halts**, granting visibility to the user and relinquishing control.\r\n\r\n---\r\n\r\n### \u{1F504} Workflow Handoff\r\n\r\n- **Completed Phase / Activity**: `[Current phase, e.g. Product Definition / Threat Modeling / Privacy Modeling / Architecture / SDD Implementation]`\r\n- **Acting Role**: `[agent-product-analyst | agent-threat-modeler | agent-privacy-officer | agent-system-architect | agent-developer | agent-expert-user | agent-security-auditor | agent-compliance-checker]`\r\n- **Task Autonomy Mode**: `[HUMAN_REVIEW_PLAN | AMBIGUOUS | HIGH_RISK_MANUAL]`\r\n- **Produced Deliverables**:\r\n - [x] `[Path or ID of generated artifact, e.g. specs/product/uc-mission.md]`\r\n - [x] `[Path or ID of generated artifact, e.g. quality-report.md]`\r\n\r\n- **Recommended Next Role(s) in Workflow**:\r\n - `[Suggested role name, e.g. agent-threat-modeler]`: `[Technical rationale, e.g. Model STRIDE adversaries and mitigate abuse cases]`\r\n - *(Optional)* `[Alternative role, e.g. agent-expert-user]`: `[Technical rationale, e.g. Evaluate UX and MVP boundary]`\r\n\r\n- **Suggested Invocation Prompt**:\r\n > "Act as `[next-role]` and proceed with the `[next phase]` phase on the generated deliverables: `[key artifacts]`."\r\n\r\n- **Human Action Window (User Sovereignty and Priority)**:\r\n - \u270B **Review and Validate**: Inspect generated artifacts and validate alignment with project vision before proceeding.\r\n - \u270F\uFE0F **Edit Directly**: Modify requirements, code, or acceptance criteria directly at any time.\r\n - \u{1F6D1} **Pause, Divert, or Discard**: Freeze workflow, redirect toward another goal, or discard proposal.\r\n - \u25B6\uFE0F **Delegate to Next Agent**: If satisfied with output, execute suggested prompt to continue the chain.\r\n\r\n---\r\n';
16395
+ var STARTER_TEMPLATES_WORKFLOW_AGENT_HANDOFF_TEMPLATE_MD = '# Workflow Handoff Template\r\n\r\n> **Canonical reference:** [`process/09_agent_protocols.md`](../../process/09_agent_protocols.md) and [`process/01_governance_and_roles.md`](../../process/01_governance_and_roles.md).\r\n>\r\n> **Activation Criterion by Autonomy Mode:**\r\n> - \u{1F7E2} **`AUTONOMOUS` (or exclusive supervision at the end in PR/CI):** OMITTED. The agent executes and delivers without interrupting the user with this handoff block.\r\n> - \u{1F7E1} **`HUMAN_REVIEW_PLAN` | \u{1F7E0} `AMBIGUOUS` | \u{1F534} `HIGH_RISK_MANUAL`:** MANDATORY. Upon completing the phase or proposal, the agent emits this block and **halts**, granting visibility to the user and relinquishing control.\r\n\r\n---\r\n\r\n### \u{1F504} Workflow Handoff\r\n\r\n- **Completed Phase / Activity**: `[Current phase, e.g. Product Definition / Threat Modeling / Privacy Modeling / Architecture / SDD Implementation]`\r\n- **Acting Role**: `[agent-product-analyst | agent-threat-modeler | agent-privacy-officer | agent-system-architect | agent-developer | agent-expert-user | agent-security-auditor | agent-compliance-checker]`\r\n- **Task Autonomy Mode**: `[HUMAN_REVIEW_PLAN | AMBIGUOUS | HIGH_RISK_MANUAL]`\r\n- **Produced Deliverables**:\r\n - [x] `[Path or ID of generated artifact, e.g. specs/product/uc-mission.md]`\r\n - [x] `[Path or ID of generated artifact, e.g. quality-report.md]`\r\n\r\n- **Recommended Next Role(s) in Workflow**:\r\n - `[Suggested role name, e.g. agent-threat-modeler]`: `[Technical rationale, e.g. Model STRIDE adversaries and mitigate abuse cases]`\r\n - *(Optional)* `[Alternative role, e.g. agent-expert-user]`: `[Technical rationale, e.g. Evaluate UX and MVP boundary]`\r\n\r\n- **Suggested Invocation Prompt**:\r\n > "Act as `[next-role]` and proceed with the `[next phase]` phase on the generated deliverables: `[key artifacts]`."\r\n- **Clean Context Window Execution (Cross-IDE)**:\r\n - \u{1F9F9} **Subagent-Capable IDEs (Antigravity / Claude Code / Copilot)**: Delegate automatically via subagent tool (`invoke_subagent` / `Task` / `@agent-*`) to launch a fresh context window.\r\n - \u{1F195} **Chat-Based IDEs (Cursor / Windsurf / Aider)**: Open a **New Chat (`Cmd/Ctrl + N`)** or run `/clear` before pasting the Suggested Invocation Prompt so the next specialist starts with zero context pollution and hydrates state exclusively from `handoff.yaml` / `get_active_handoff`.\r\n\r\n- **Human Action Window (User Sovereignty and Priority)**:\r\n - \u270B **Review and Validate**: Inspect generated artifacts and validate alignment with project vision before proceeding.\r\n - \u270F\uFE0F **Edit Directly**: Modify requirements, code, or acceptance criteria directly at any time.\r\n - \u{1F6D1} **Pause, Divert, or Discard**: Freeze workflow, redirect toward another goal, or discard proposal.\r\n - \u25B6\uFE0F **Delegate to Next Agent**: If satisfied with output, execute suggested prompt to continue the chain.\r\n\r\n---\r\n';
15955
16396
  var STARTER__GITHUB_PULL_REQUEST_TEMPLATE_MD = "## 1. SDD Identification and Traceability\r\n\r\n- **SDD Change Specification**: `specs/changes/active/<change-id>/` <!-- Link to active change directory -->\r\n- **PDaC Handoff Sidecar**: `specs/changes/active/<change-id>/handoff.yaml` <!-- ID: HOF-* -->\r\n- **Git Hierarchy Tier (4 Tiers)**:\r\n - [ ] Tier 4: `task/<PARENT-ID>/<TSK-ID>-<slug>` \u2794 `feat/<PARENT-ID>-<slug>`\r\n - [ ] Tier 3: `feat/<FEAT-ID>-<slug>` \u2794 `release/vX.Y.Z`\r\n - [ ] Tier 2: `release/vX.Y.Z` \u2794 `main`\r\n- **Linked Issues**: Closes #... / Refs #...\r\n\r\n---\r\n\r\n## 2. \u{1F4CB} Plan Execution Matrix and Testing Status (`X` vs `O`)\r\n\r\n> [!IMPORTANT]\r\n> **Non-Negotiable Total Exhaustiveness Rule**:\r\n> This table must include **each and every item identified for implementation** in the delivery plan (originating from `tasks.md`, the SDD specification, or issue criteria), without omitting any or creating abstract groupings.\r\n>\r\n> **Mandatory Marking Convention**:\r\n> - **`[X]` (Completed and Tested)**: Item is 100% implemented and has verifiable automated tests on disk (`tests/` or `.feature`) passing green.\r\n> - **`[O]` (Problem / Blocked)**: If there was any issue, technical limitation, failing test, or deferred scope, it must be marked with `[O]` and **full mandatory justification is required**:\r\n> 1. **Technical root cause** or encountered limitation.\r\n> 2. **Impact** on increment or system.\r\n> 3. **Mitigation** or rationale for deferral.\r\n> 4. **Formal reference** to tracking issue (GitHub Issue or `ADR-TECH-DEBT-*`).\r\n>\r\n> *Any PR with omitted planned items or unjustified `[O]` will be immediately blocked and rejected by the Tech Lead.*\r\n\r\n| Task / Item ID | Planned Description | Status (`[X]` / `[O]`) | Test Evidence on Disk or Mandatory Justification of `[O]` |\r\n| :--- | :--- | :---: | :--- |\r\n| `TSK-001` | <!-- e.g. Contract DTOs and Interfaces Definition --> | **[X]** | Covered in `tests/unit/dto.spec.ts` (100% pass) |\r\n| `TSK-002` | <!-- e.g. Network disconnection resilience --> | **[O]** | **Root cause:** TCP socket mock exhibits race conditions in CI.<br>**Impact:** Low in prod, flaky test.<br>**Mitigation:** Temporary extended timeout; tracked in issue #... |\r\n\r\n---\r\n\r\n## 3. \u{1F5FA}\uFE0F Weak Points Map and Risk Hotspots (Weak Points Hotspots)\r\n\r\n### A. Complexity Hotspots\r\n<!-- Record functions nearing quality-policy.yaml thresholds: CC > 7 (max 10), Cognitive > 10 (max 15), LOC > 30 (max 40), MI < 70 (min 50/65) -->\r\n| File | Function / Module | Metrics (CC / Cognitive / LOC / MI) | Technical Maintainability Justification |\r\n| :--- | :--- | :---: | :--- |\r\n| <!-- e.g. src/engine.ts --> | <!-- parsePayload() --> | CC: 8, Cog: 11, LOC: 32, MI: 72 | Deterministic parser without recursion; exhaustively tested. |\r\n\r\n### B. Edge Cases and Blind Spots\r\n<!-- Scenarios not covered by automated unit tests (concurrency, network timeouts, memory, jitter) -->\r\n- [ ] **Edge Case 1**: <!-- Scenario description, estimated risk, and operational mitigation -->\r\n- [ ] **Edge Case 2**: <!-- Scenario description, estimated risk, and operational mitigation -->\r\n\r\n### C. AI Assumptions\r\n<!-- Behaviors or heuristics assumed by the agent during implementation that require critical human review -->\r\n- [ ] **Assumption 1**: <!-- e.g. Assumed payload always arrives pre-parsed in UTF-8 -->\r\n- [ ] **Assumption 2**: <!-- e.g. Default timeout set to 5000ms as not stipulated in spec -->\r\n\r\n---\r\n\r\n## 4. \u{1F6E1}\uFE0F Attack Surface and Cybersecurity (STRIDE / Zero Trust)\r\n\r\n- [ ] **New External Channels**: Does it introduce HTTP endpoints, sockets, IPC channels, or brokers?\r\n- [ ] **Sanitization and Inputs**: Are all external inputs validated with strict typing schemas (Zod/JSON Schema)?\r\n- [ ] **Insecure Serialization**: Is polymorphic deserialization or dynamic code evaluation avoided?\r\n- [ ] **Secrets and Enclaves**: Are cryptographic keys, credentials, sensitive env vars, or enclaves (`SEC-ENC-*`) handled?\r\n- [ ] **Mitigated Security Requirements**: Implemented IDs (e.g. `SEC-REQ-*`) and associated tests (`SEC-TEST-*` or `.feature`).\r\n\r\n---\r\n\r\n## 5. \u{1F4E6} Dependencies and Licenses Inspection\r\n\r\n- **New Dependencies Added**:\r\n | Package | Version | License Type | `license-policy.yaml` Verification |\r\n | :--- | :---: | :---: | :---: |\r\n | <!-- e.g. zod --> | <!-- ^3.22.4 --> | <!-- MIT --> | <!-- \u2714 Compliant (Permissive) --> |\r\n- [ ] Zero dependencies with prohibited licenses (GPLv3/AGPL/unapproved commercial).\r\n- [ ] Verification executed successfully (`pnpm run verify:licenses`).\r\n\r\n---\r\n\r\n## 6. \u2705 Deterministic Pre-Flight Checklist (Release Gates)\r\n\r\n- [ ] **Strict Typing and Linter**: `pnpm run typecheck` (zero errors, zero unjustified suppressions).\r\n- [ ] **Quality Gate**: `pnpm run verify:quality` (CC $\\le 10$, Cognitive $\\le 15$, MI $\\ge 50$, LOC $\\le 40$).\r\n- [ ] **BDD / Unit Tests**: `pnpm run verify:testing` (Gherkin scenarios synchronized and 100% passing).\r\n- [ ] **360\xB0 Traceability**: `pnpm run verify:traceability` (no orphan requirements).\r\n- [ ] **Open Source Licenses**: `pnpm run verify:licenses` (strict policy compliance).\r\n- [ ] **Schema Compliance**: `pnpm run verify:schemas` (100% of artifacts conform to JSON Schema).\r\n- [ ] **Full Test Suite**: `pnpm run test:all` / `pnpm run verify:all` (general green CI approval).\r\n\r\n---\r\n\r\n## 7. \u{1F6A8} Contingency Plan, Observability, and Rollback\r\n\r\n- **Observability Metrics and Alarms**: <!-- What metrics (p99 latency, 5xx error rate, memory) or logs should be monitored post-deployment? -->\r\n- **Rollback Procedure**: <!-- Exact command or procedure to revert change without collateral impact (e.g. git revert -m 1 <sha>) -->\r\n\r\n---\r\n\r\n## 8. \u{1F4CA} AI-SDLC: Aggregated KPIs Summary\r\n\r\n<!-- AI-SDLC-KPI-SUMMARY-START -->\r\n| Metric | Human | Total PR |\r\n| :--- | :---: | :---: |\r\n| **Commits Made** | - | **-** |\r\n| **Lines Added / Modif.** | - | **-** |\r\n| **Active Development Time** | - | **-** |\r\n| **Consumed Tokens (In+Out)** | - | **-** |\r\n| **Estimated Cost (\u20AC/$)** | \u2014 (Labor) | **-** |\r\n\r\n> *This block is updated automatically via `aisdlc kpi pr` or the CI workflow.*\r\n<!-- AI-SDLC-KPI-SUMMARY-END -->\r\n";
15956
16397
  var STARTER_COMPLIANCE_LICENSE_MANIFEST_YAML = '# ==============================================================================\r\n# AI-SDLC: Manifiesto de Cumplimiento de Licencias Evaluadas\r\n# ==============================================================================\r\n# Verificado contra: /license-policy.yaml\r\n# ==============================================================================\r\n\r\nevaluated_dependencies:\r\n - package: "@modelcontextprotocol/sdk"\r\n version: "1.0.4"\r\n spdx_license: "MIT"\r\n category: "permissive_free"\r\n status: "APPROVED"\r\n usage: "SDK oficial para servidor Model Context Protocol."\r\n commercial_payment_required: false\r\n\r\n - package: "commander"\r\n version: "12.1.0"\r\n spdx_license: "MIT"\r\n category: "permissive_free"\r\n status: "APPROVED"\r\n usage: "Parser de l\xEDnea de comandos para @ai-sdlc/cli."\r\n commercial_payment_required: false\r\n\r\n - package: "zod"\r\n version: "3.23.8"\r\n spdx_license: "MIT"\r\n category: "permissive_free"\r\n status: "APPROVED"\r\n usage: "Validaci\xF3n de esquemas y tipos en runtime."\r\n commercial_payment_required: false\r\n\r\n - package: "js-yaml"\r\n version: "4.1.0"\r\n spdx_license: "MIT"\r\n category: "permissive_free"\r\n status: "APPROVED"\r\n usage: "Parser y serializador YAML para especificaciones y frontmatter."\r\n commercial_payment_required: false\r\n\r\n - package: "chalk"\r\n version: "5.3.0"\r\n spdx_license: "MIT"\r\n category: "permissive_free"\r\n status: "APPROVED"\r\n usage: "Estilizado de salida en terminal para comandos CLI."\r\n commercial_payment_required: false\r\n\r\n - package: "ajv"\r\n version: "8.17.1"\r\n spdx_license: "MIT"\r\n category: "permissive_free"\r\n status: "APPROVED"\r\n usage: "Validador JSON Schema para ProductShape, arc42 y SDD."\r\n commercial_payment_required: false\r\n';
15957
16398
  var STARTER_PROCESS_README = "# AI-SDLC: Process & Governance Framework\n\nThis directory hosts the deterministic governance, verification gates, and lifecycle protocols for AI-assisted software development.\n\n## Core Protocols & Lifecycle\n- **Phase 0 (Product Definition)**: `specs/product/` (Requirements `FR-*`, Use Cases `UC-*`, Actors `ACT-*`, Rules `BR-*`).\n- **Phase 1 (System Architecture)**: `templates/architecture/` (arc42 + NAF v4, `CMP-*`, Decisions `ADR-*`).\n- **Phase 2 (Cybersecurity Triad)**: `templates/security/` (Threat Actors `ACT-THREAT-*`, Abuse Cases `ABUSE-*`, Security Reqs `SEC-REQ-*`).\n- **Phase 2b (Privacy-by-Design as Code)**: `templates/privacy/` (Data Assets `DATA-ASSET-*`, ROPA `PRIV-ROPA-*`, Privacy Reqs `PRIV-REQ-*`).\n- **Phase 3 (Spec-Driven Delivery - SDD)**: `specs/changes/active/<change-id>/` (`proposal.md`, `spec.md`, `design.md`, `tasks.md`, `handoff.yaml`).\n- **Phase 4 (Continuous Quality Gates & Verification)**:\n - Quality Gate: `npx aisdlc verify quality` (CC $\\le 10$, MI $\\ge 50$, LOC $\\le 40$)\n - BDD Testing: `npx aisdlc verify testing`\n - Traceability: `npx aisdlc verify traceability`\n - Licenses: `npx aisdlc verify licenses`\n - Privacy & Data Protection: `npx aisdlc verify privacy`\n - Schemas: `npx aisdlc verify schemas`\n - Release Gates: `npx aisdlc check` / `npx aisdlc verify all`\n";
@@ -15994,6 +16435,522 @@ var STARTER_BASE_TEMPLATES = [
15994
16435
  { relPath: "process/README.md", content: STARTER_PROCESS_README },
15995
16436
  { relPath: "compliance/license-manifest.yaml", content: STARTER_COMPLIANCE_LICENSE_MANIFEST_YAML }
15996
16437
  ];
16438
+ var VALID_CODING_RULE_STACKS = [
16439
+ "dotnet",
16440
+ "typescript",
16441
+ "javascript",
16442
+ "angular",
16443
+ "java",
16444
+ "kotlin",
16445
+ "rust",
16446
+ "go",
16447
+ "c",
16448
+ "cpp"
16449
+ ];
16450
+ var PROTECTED_CODING_RULES_FILES = [
16451
+ "Directory.Build.props",
16452
+ "tsconfig.strict.json",
16453
+ "eslint.config.mjs",
16454
+ "gradle/init.d/aisdlc-strict.init.gradle.kts",
16455
+ "config/pmd/aisdlc-ruleset.xml",
16456
+ "config/detekt/detekt.yml",
16457
+ ".cargo/config.toml",
16458
+ ".clippy.toml",
16459
+ ".golangci.yml",
16460
+ ".clang-tidy",
16461
+ "cmake/AisdlcStrictCompiler.cmake",
16462
+ ".github/CODEOWNERS"
16463
+ ];
16464
+ var DOTNET_DIRECTORY_BUILD_PROPS = `<Project>
16465
+ <!-- 1. Global strict compiler and analyzer rules for all projects (src and tests) -->
16466
+ <PropertyGroup>
16467
+ <Nullable>enable</Nullable>
16468
+ <TreatWarningsAsErrors>true</TreatWarningsAsErrors>
16469
+ <AnalysisLevel>latest-recommended</AnalysisLevel>
16470
+ <EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
16471
+ </PropertyGroup>
16472
+
16473
+ <!-- 2. Strict unit/E2E test guardrails (xUnit, MSTest, NUnit) -->
16474
+ <PropertyGroup Condition="'$(IsTestProject)' == 'true' or $(MSBuildProjectName.EndsWith('Tests')) or $(MSBuildProjectName.EndsWith('Test'))">
16475
+ <IsTestProject>true</IsTestProject>
16476
+ <NoWarn>$(NoWarn);CA1707;CA2007</NoWarn>
16477
+ <MSTestAnalysisMode>Recommended</MSTestAnalysisMode>
16478
+ <WarningsAsErrors>$(WarningsAsErrors);S2699;S1607;MSTEST0006;MSTEST0014;MSTEST0015;MSTEST0017;MSTEST0032;xUnit1026;xUnit1013</WarningsAsErrors>
16479
+ </PropertyGroup>
16480
+
16481
+ <ItemGroup Condition="'$(IsTestProject)' == 'true' or $(MSBuildProjectName.EndsWith('Tests')) or $(MSBuildProjectName.EndsWith('Test'))">
16482
+ <PackageReference Include="SonarAnalyzer.CSharp" Version="10.*">
16483
+ <PrivateAssets>all</PrivateAssets>
16484
+ <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
16485
+ </PackageReference>
16486
+ </ItemGroup>
16487
+ </Project>
16488
+ `;
16489
+ var TS_STRICT_TSCONFIG = `{
16490
+ "$schema": "https://json.schemastore.org/tsconfig",
16491
+ "compilerOptions": {
16492
+ "strict": true,
16493
+ "allowJs": true,
16494
+ "checkJs": true,
16495
+ "noImplicitOverride": true,
16496
+ "noPropertyAccessFromIndexSignature": true,
16497
+ "noImplicitReturns": true,
16498
+ "noFallthroughCasesInSwitch": true,
16499
+ "noUnusedLocals": true,
16500
+ "noUnusedParameters": true,
16501
+ "noUncheckedIndexedAccess": true,
16502
+ "exactOptionalPropertyTypes": true,
16503
+ "forceConsistentCasingInFileNames": true
16504
+ },
16505
+ "angularCompilerOptions": {
16506
+ "strictInjectionParameters": true,
16507
+ "strictInputAccessModifiers": true,
16508
+ "strictTemplates": true,
16509
+ "strictStandalone": true,
16510
+ "extendedDiagnostics": {
16511
+ "defaultCategory": "error"
16512
+ }
16513
+ }
16514
+ }
16515
+ `;
16516
+ var TS_ESLINT_CONFIG_MJS = `// AI-SDLC: Immutable Strict Coding & Test Rules for TypeScript / JavaScript / Angular
16517
+ import tseslint from "typescript-eslint";
16518
+
16519
+ export default tseslint.config(
16520
+ {
16521
+ files: ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx"],
16522
+ extends: [...tseslint.configs.strictTypeChecked],
16523
+ languageOptions: {
16524
+ parserOptions: {
16525
+ projectService: true,
16526
+ },
16527
+ },
16528
+ rules: {
16529
+ "@typescript-eslint/no-explicit-any": "error",
16530
+ "@typescript-eslint/ban-ts-comment": "error",
16531
+ "@typescript-eslint/no-floating-promises": "error",
16532
+ "@typescript-eslint/await-thenable": "error",
16533
+ "@typescript-eslint/no-misused-promises": "error",
16534
+ "@typescript-eslint/no-unused-vars": ["error", { "argsIgnorePattern": "^_" }],
16535
+ },
16536
+ },
16537
+ {
16538
+ files: ["**/*.spec.ts", "**/*.test.ts", "**/*.spec.js", "**/*.test.js"],
16539
+ rules: {
16540
+ "no-restricted-globals": [
16541
+ "error",
16542
+ { "name": "fit", "message": "Focused tests (fit) are forbidden by AI-SDLC." },
16543
+ { "name": "fdescribe", "message": "Focused suites (fdescribe) are forbidden by AI-SDLC." },
16544
+ { "name": "xit", "message": "Skipped tests (xit) are forbidden by AI-SDLC." },
16545
+ { "name": "xdescribe", "message": "Skipped suites (xdescribe) are forbidden by AI-SDLC." }
16546
+ ]
16547
+ }
16548
+ }
16549
+ );
16550
+ `;
16551
+ var GRADLE_STRICT_INIT_KTS = `// AI-SDLC: Immutable Gradle Strict Compiler & Test Guardrails (Java & Kotlin)
16552
+ allprojects {
16553
+ tasks.withType<JavaCompile>().configureEach {
16554
+ options.compilerArgs.addAll(listOf("-Werror", "-Xlint:all", "-Xlint:-processing"))
16555
+ }
16556
+ tasks.withType<Test>().configureEach {
16557
+ useJUnitPlatform()
16558
+ failOnNoDiscoveredTests.set(true)
16559
+ }
16560
+ }
16561
+ `;
16562
+ var JAVA_PMD_RULESET_XML = `<?xml version="1.0" encoding="UTF-8"?>
16563
+ <ruleset name="AI-SDLC Strict Java &amp; JUnit Rules"
16564
+ xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
16565
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
16566
+ xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 https://pmd.github.io/schema/ruleset_2_0_0.xsd">
16567
+ <description>AI-SDLC Mandatory Java &amp; Unit Test Verification Rules</description>
16568
+ <rule ref="category/java/bestpractices.xml/JUnitTestsShouldIncludeAssert" />
16569
+ <rule ref="category/java/bestpractices.xml/UnusedLocalVariable" />
16570
+ <rule ref="category/java/bestpractices.xml/UnusedPrivateMethod" />
16571
+ <rule ref="category/java/errorprone.xml/EmptyCatchBlock" />
16572
+ </ruleset>
16573
+ `;
16574
+ var KOTLIN_DETEKT_YML = `# AI-SDLC: Immutable Detekt Rules for Kotlin & Unit Tests
16575
+ build:
16576
+ maxIssues: 0
16577
+
16578
+ potential-bugs:
16579
+ active: true
16580
+ IgnoredReturnValue:
16581
+ active: true
16582
+ UnreachableCode:
16583
+ active: true
16584
+
16585
+ exceptions:
16586
+ active: true
16587
+ SwallowedException:
16588
+ active: true
16589
+ EmptyCatchBlock:
16590
+ active: true
16591
+
16592
+ style:
16593
+ active: true
16594
+ ForbiddenAnnotation:
16595
+ active: true
16596
+ annotations:
16597
+ - 'org.junit.jupiter.api.Disabled'
16598
+ - 'org.junit.Ignore'
16599
+ - 'kotlin.test.Ignore'
16600
+ `;
16601
+ var RUST_CARGO_CONFIG_TOML = `# AI-SDLC: Immutable Rust Compiler & Clippy Guardrails
16602
+ [build]
16603
+ rustflags = [
16604
+ "-D", "warnings",
16605
+ "-D", "unused-must-use",
16606
+ "-D", "dead-code",
16607
+ "-D", "clippy::all",
16608
+ "-D", "clippy::unwrap_used",
16609
+ "-D", "clippy::todo",
16610
+ "-D", "clippy::unimplemented",
16611
+ "-D", "clippy::ignore_without_reason",
16612
+ "-D", "clippy::assertions_on_constants"
16613
+ ]
16614
+ `;
16615
+ var RUST_CLIPPY_TOML = `# AI-SDLC: Clippy configuration
16616
+ allow-unwrap-in-tests = true
16617
+ `;
16618
+ var GO_GOLANGCI_YML = `# AI-SDLC: Immutable Go & Testing Linter Guardrails
16619
+ run:
16620
+ tests: true
16621
+
16622
+ issues:
16623
+ max-issues-per-linter: 0
16624
+ max-same-issues: 0
16625
+
16626
+ linters:
16627
+ enable:
16628
+ - errcheck
16629
+ - govet
16630
+ - staticcheck
16631
+ - unused
16632
+ - ineffassign
16633
+ - testifylint
16634
+ - thelper
16635
+ - forbidigo
16636
+
16637
+ linters-settings:
16638
+ testifylint:
16639
+ enable-all: true
16640
+ forbidigo:
16641
+ analyze-types: true
16642
+ forbid:
16643
+ - p: ^testing\\.T\\.Skip.*$
16644
+ msg: "Skipping unit tests with t.Skip() is forbidden by AI-SDLC."
16645
+ `;
16646
+ var CPP_CLANG_TIDY = `# AI-SDLC: Immutable C/C++ Clang-Tidy Guardrails
16647
+ Checks: >
16648
+ -*,
16649
+ bugprone-*,
16650
+ cert-*,
16651
+ clang-analyzer-*,
16652
+ cppcoreguidelines-*,
16653
+ modernize-*,
16654
+ performance-*,
16655
+ readability-*
16656
+ WarningsAsErrors: '*'
16657
+ `;
16658
+ var CPP_CMAKE_STRICT = `# AI-SDLC: Immutable C/C++ Compiler & CTest Guardrails
16659
+ if(MSVC)
16660
+ add_compile_options(/W4 /WX /permissive-)
16661
+ else()
16662
+ add_compile_options(-Wall -Wextra -Wpedantic -Werror -Wnull-dereference -Wunused-result)
16663
+ endif()
16664
+
16665
+ set(CMAKE_CXX_CLANG_TIDY "clang-tidy")
16666
+ set(CMAKE_C_CLANG_TIDY "clang-tidy")
16667
+ `;
16668
+ var STARTER_ANTIGRAVITY_HOOKS_JSON = `{
16669
+ "branch-guard": {
16670
+ "enabled": true,
16671
+ "PreToolUse": [
16672
+ {
16673
+ "matcher": "edit_file|write_file",
16674
+ "hooks": [
16675
+ {
16676
+ "type": "command",
16677
+ "command": "node scripts/guard-branch.cjs",
16678
+ "timeout": 10
16679
+ }
16680
+ ]
16681
+ }
16682
+ ]
16683
+ }
16684
+ }
16685
+ `;
16686
+ var STARTER_AGENT_GUARD_WRAPPER_CJS = `#!/usr/bin/env node
16687
+ // Forwarding wrapper or direct execution from .agent
16688
+ require('../../scripts/guard-branch.cjs');
16689
+ `;
16690
+ var STARTER_GUARD_BRANCH_CJS = `#!/usr/bin/env node
16691
+ /**
16692
+ * AI-SDLC: Antigravity PreToolUse Branch & Immutable Coding Rules Guard Hook
16693
+ * 1. Prevents AI agents from modifying or writing files directly on protected branches (main, master, release/*).
16694
+ * 2. Prevents AI agents from modifying or weakening deployed coding rules files once created.
16695
+ */
16696
+
16697
+ const { execSync } = require('child_process');
16698
+ const path = require('path');
16699
+
16700
+ const PROTECTED_CODING_RULES_FILES = [
16701
+ 'Directory.Build.props',
16702
+ 'tsconfig.strict.json',
16703
+ 'eslint.config.mjs',
16704
+ 'gradle/init.d/aisdlc-strict.init.gradle.kts',
16705
+ 'config/pmd/aisdlc-ruleset.xml',
16706
+ 'config/detekt/detekt.yml',
16707
+ '.cargo/config.toml',
16708
+ '.clippy.toml',
16709
+ '.golangci.yml',
16710
+ '.clang-tidy',
16711
+ 'cmake/AisdlcStrictCompiler.cmake',
16712
+ '.github/CODEOWNERS',
16713
+ ];
16714
+
16715
+ function getWorkingBranch(cwd) {
16716
+ try {
16717
+ const sym = execSync('git symbolic-ref --short HEAD', {
16718
+ cwd,
16719
+ encoding: 'utf-8',
16720
+ stdio: ['pipe', 'pipe', 'ignore'],
16721
+ }).trim();
16722
+ if (sym) return sym;
16723
+ } catch {}
16724
+
16725
+ try {
16726
+ return execSync('git rev-parse --abbrev-ref HEAD', {
16727
+ cwd,
16728
+ encoding: 'utf-8',
16729
+ stdio: ['pipe', 'pipe', 'ignore'],
16730
+ }).trim();
16731
+ } catch {}
16732
+
16733
+ return '';
16734
+ }
16735
+
16736
+ function isProtectedCodingRulesTarget(targetPath, cwd) {
16737
+ if (!targetPath) return false;
16738
+ const resolved = path.resolve(cwd, targetPath);
16739
+
16740
+ const norm = resolved.replace(/\\\\/g, '/');
16741
+ const rel = path.relative(cwd, resolved).replace(/\\\\/g, '/');
16742
+ return PROTECTED_CODING_RULES_FILES.some(
16743
+ (ruleFile) => rel === ruleFile || norm.endsWith('/' + ruleFile)
16744
+ ) || rel.startsWith('templates/coding-rules/');
16745
+ }
16746
+
16747
+ function evaluateGuardDecision(payload) {
16748
+ const targetPath = payload.toolCall?.args?.Path || '';
16749
+ const workspacePaths = payload.workspacePaths || [];
16750
+ const cwd = workspacePaths[0] || process.cwd();
16751
+ const resolvedPath = targetPath ? path.resolve(cwd, targetPath) : '';
16752
+ const normPath = resolvedPath.replace(/\\\\/g, '/');
16753
+
16754
+ if (isProtectedCodingRulesTarget(resolvedPath, cwd)) {
16755
+ return {
16756
+ decision: 'deny',
16757
+ reason: \`\u274C [AI-SDLC Immutable Coding Rules Guard] BLOCKED: AI agents are forbidden from modifying protected coding rules file '\${path.basename(targetPath)}'. Fix the source or test code to satisfy the compiler/linter rules instead of altering the rule configuration.\`,
16758
+ };
16759
+ }
16760
+
16761
+ if (
16762
+ normPath.includes('/.gemini/') ||
16763
+ normPath.includes('/brain/') ||
16764
+ normPath.includes('/scratch/')
16765
+ ) {
16766
+ return { decision: 'allow' };
16767
+ }
16768
+
16769
+ const branch = getWorkingBranch(cwd);
16770
+ if (/^(main|master|release\\/.*)$/.test(branch)) {
16771
+ return {
16772
+ decision: 'deny',
16773
+ reason: \`\u274C [AI-SDLC Security Guard] BLOCKED: Direct file modifications on protected branch '\${branch}' are forbidden. You must create and checkout a new working branch first before editing files (e.g. 'git checkout -b feat/<CHG-ID>-<slug>' or 'git checkout -b task/<PARENT-ID>/<TSK-ID>-<slug>').\`,
16774
+ };
16775
+ }
16776
+
16777
+ return { decision: 'allow' };
16778
+ }
16779
+
16780
+ function main() {
16781
+ let input = '';
16782
+ process.stdin.setEncoding('utf-8');
16783
+ process.stdin.on('data', (chunk) => {
16784
+ input += chunk;
16785
+ });
16786
+ process.stdin.on('end', () => {
16787
+ try {
16788
+ const payload = input.trim() ? JSON.parse(input) : {};
16789
+ console.log(JSON.stringify(evaluateGuardDecision(payload)));
16790
+ } catch {
16791
+ console.log(JSON.stringify({ decision: 'allow' }));
16792
+ }
16793
+ });
16794
+ }
16795
+
16796
+ main();
16797
+ `;
16798
+ var STACK_FILE_MAP = {
16799
+ dotnet: [{ relPath: "Directory.Build.props", content: DOTNET_DIRECTORY_BUILD_PROPS }],
16800
+ typescript: [
16801
+ { relPath: "tsconfig.strict.json", content: TS_STRICT_TSCONFIG },
16802
+ { relPath: "eslint.config.mjs", content: TS_ESLINT_CONFIG_MJS }
16803
+ ],
16804
+ javascript: [
16805
+ { relPath: "tsconfig.strict.json", content: TS_STRICT_TSCONFIG },
16806
+ { relPath: "eslint.config.mjs", content: TS_ESLINT_CONFIG_MJS }
16807
+ ],
16808
+ angular: [
16809
+ { relPath: "tsconfig.strict.json", content: TS_STRICT_TSCONFIG },
16810
+ { relPath: "eslint.config.mjs", content: TS_ESLINT_CONFIG_MJS }
16811
+ ],
16812
+ java: [
16813
+ { relPath: "gradle/init.d/aisdlc-strict.init.gradle.kts", content: GRADLE_STRICT_INIT_KTS },
16814
+ { relPath: "config/pmd/aisdlc-ruleset.xml", content: JAVA_PMD_RULESET_XML }
16815
+ ],
16816
+ kotlin: [
16817
+ { relPath: "gradle/init.d/aisdlc-strict.init.gradle.kts", content: GRADLE_STRICT_INIT_KTS },
16818
+ { relPath: "config/detekt/detekt.yml", content: KOTLIN_DETEKT_YML }
16819
+ ],
16820
+ rust: [
16821
+ { relPath: ".cargo/config.toml", content: RUST_CARGO_CONFIG_TOML },
16822
+ { relPath: ".clippy.toml", content: RUST_CLIPPY_TOML }
16823
+ ],
16824
+ go: [{ relPath: ".golangci.yml", content: GO_GOLANGCI_YML }],
16825
+ c: [
16826
+ { relPath: ".clang-tidy", content: CPP_CLANG_TIDY },
16827
+ { relPath: "cmake/AisdlcStrictCompiler.cmake", content: CPP_CMAKE_STRICT }
16828
+ ],
16829
+ cpp: [
16830
+ { relPath: ".clang-tidy", content: CPP_CLANG_TIDY },
16831
+ { relPath: "cmake/AisdlcStrictCompiler.cmake", content: CPP_CMAKE_STRICT }
16832
+ ]
16833
+ };
16834
+ function getReferenceCodingRulesTemplates() {
16835
+ return [
16836
+ { relPath: "templates/coding-rules/dotnet/Directory.Build.props", content: DOTNET_DIRECTORY_BUILD_PROPS },
16837
+ { relPath: "templates/coding-rules/typescript/tsconfig.strict.json", content: TS_STRICT_TSCONFIG },
16838
+ { relPath: "templates/coding-rules/typescript/eslint.config.mjs", content: TS_ESLINT_CONFIG_MJS },
16839
+ { relPath: "templates/coding-rules/jvm/aisdlc-strict.init.gradle.kts", content: GRADLE_STRICT_INIT_KTS },
16840
+ { relPath: "templates/coding-rules/java/aisdlc-ruleset.xml", content: JAVA_PMD_RULESET_XML },
16841
+ { relPath: "templates/coding-rules/kotlin/detekt.yml", content: KOTLIN_DETEKT_YML },
16842
+ { relPath: "templates/coding-rules/rust/config.toml", content: RUST_CARGO_CONFIG_TOML },
16843
+ { relPath: "templates/coding-rules/rust/.clippy.toml", content: RUST_CLIPPY_TOML },
16844
+ { relPath: "templates/coding-rules/go/.golangci.yml", content: GO_GOLANGCI_YML },
16845
+ { relPath: "templates/coding-rules/cpp/.clang-tidy", content: CPP_CLANG_TIDY },
16846
+ { relPath: "templates/coding-rules/cpp/AisdlcStrictCompiler.cmake", content: CPP_CMAKE_STRICT }
16847
+ ];
16848
+ }
16849
+ function hasFileMatching(entries, suffixOrName) {
16850
+ return entries.some((e) => e === suffixOrName || e.endsWith(suffixOrName));
16851
+ }
16852
+ function detectJvmAndNativeStacks(entries, detected) {
16853
+ if (hasFileMatching(entries, "pom.xml") || hasFileMatching(entries, "build.gradle")) {
16854
+ detected.add("java");
16855
+ }
16856
+ if (hasFileMatching(entries, "build.gradle.kts")) {
16857
+ detected.add("java");
16858
+ detected.add("kotlin");
16859
+ }
16860
+ if (hasFileMatching(entries, "Cargo.toml")) detected.add("rust");
16861
+ if (hasFileMatching(entries, "go.mod")) detected.add("go");
16862
+ if (hasFileMatching(entries, "CMakeLists.txt") || hasFileMatching(entries, "Makefile")) {
16863
+ detected.add("cpp");
16864
+ }
16865
+ }
16866
+ function detectProjectStacks(targetDir) {
16867
+ if (!fs8.existsSync(targetDir)) return [];
16868
+ let entries = [];
16869
+ try {
16870
+ entries = fs8.readdirSync(targetDir);
16871
+ } catch {
16872
+ return [];
16873
+ }
16874
+ const detected = /* @__PURE__ */ new Set();
16875
+ if (hasFileMatching(entries, ".sln") || hasFileMatching(entries, ".slnx") || hasFileMatching(entries, ".csproj")) {
16876
+ detected.add("dotnet");
16877
+ }
16878
+ if (hasFileMatching(entries, "angular.json")) detected.add("angular");
16879
+ else if (hasFileMatching(entries, "tsconfig.json")) detected.add("typescript");
16880
+ else if (hasFileMatching(entries, "package.json")) detected.add("javascript");
16881
+ detectJvmAndNativeStacks(entries, detected);
16882
+ return Array.from(detected);
16883
+ }
16884
+ var STACK_ALIASES = {
16885
+ "c#": "dotnet",
16886
+ csharp: "dotnet",
16887
+ cs: "dotnet",
16888
+ net: "dotnet",
16889
+ ".net": "dotnet",
16890
+ ts: "typescript",
16891
+ js: "javascript",
16892
+ ng: "angular",
16893
+ kt: "kotlin",
16894
+ rs: "rust",
16895
+ golang: "go",
16896
+ "c++": "cpp",
16897
+ cxx: "cpp"
16898
+ };
16899
+ function parseSingleStackToken(token, out) {
16900
+ if (token === "all") {
16901
+ VALID_CODING_RULE_STACKS.forEach((s) => out.add(s));
16902
+ return true;
16903
+ }
16904
+ const mapped = STACK_ALIASES[token] || token;
16905
+ if (VALID_CODING_RULE_STACKS.includes(mapped)) {
16906
+ out.add(mapped);
16907
+ return true;
16908
+ }
16909
+ return false;
16910
+ }
16911
+ function resolveCodingRuleStacks(stackOption, targetDir) {
16912
+ if (stackOption === void 0 || stackOption === null || stackOption === "") {
16913
+ return { valid: true, stacks: detectProjectStacks(targetDir) };
16914
+ }
16915
+ const rawList = Array.isArray(stackOption) ? stackOption : String(stackOption).split(",");
16916
+ const resolved = /* @__PURE__ */ new Set();
16917
+ for (const raw of rawList) {
16918
+ const token = raw.trim().toLowerCase();
16919
+ if (!token || token === "none" || token === "false") continue;
16920
+ if (!parseSingleStackToken(token, resolved)) {
16921
+ return {
16922
+ valid: false,
16923
+ stacks: [],
16924
+ error: `Unrecognized technology stack: '${raw.trim()}'. Valid options: ${VALID_CODING_RULE_STACKS.join(", ")}, all, none.`
16925
+ };
16926
+ }
16927
+ }
16928
+ return { valid: true, stacks: Array.from(resolved) };
16929
+ }
16930
+ function getCodingRulesFilesForStacks(stacks) {
16931
+ const seen = /* @__PURE__ */ new Set();
16932
+ const files = [];
16933
+ for (const stack of stacks) {
16934
+ const entries = STACK_FILE_MAP[stack] || [];
16935
+ for (const entry of entries) {
16936
+ if (!seen.has(entry.relPath)) {
16937
+ seen.add(entry.relPath);
16938
+ files.push(entry);
16939
+ }
16940
+ }
16941
+ }
16942
+ return files;
16943
+ }
16944
+ function isProtectedCodingRulesFile(filePath, rootDir) {
16945
+ const norm = filePath.replace(/\\/g, "/").replace(/^\.\//, "");
16946
+ const rel = rootDir ? path5.relative(rootDir, path5.resolve(rootDir, filePath)).replace(/\\/g, "/") : norm;
16947
+ if (rel.startsWith("templates/coding-rules/") || norm.includes("/templates/coding-rules/")) {
16948
+ return true;
16949
+ }
16950
+ return PROTECTED_CODING_RULES_FILES.some(
16951
+ (protectedRel) => rel === protectedRel || norm === protectedRel || norm.endsWith("/" + protectedRel)
16952
+ );
16953
+ }
15997
16954
 
15998
16955
  // src/init/index.ts
15999
16956
  var VALID_CI_PROVIDERS = ["github", "gitlab", "azure", "bitbucket"];
@@ -16213,6 +17170,9 @@ var STARTER_WORKFLOW_HANDOFF_TEMPLATE = `# Workflow Handoff Template
16213
17170
 
16214
17171
  - **Suggested Invocation Prompt**:
16215
17172
  > "Act as \`[next-role]\` and proceed with the \`[next phase]\` phase on the generated deliverables: \`[key artifacts]\`."
17173
+ - **Clean Context Window Execution (Cross-IDE)**:
17174
+ - \u{1F9F9} **Subagent-Capable IDEs (Antigravity / Claude Code / Copilot)**: Delegate automatically via subagent tool (\`invoke_subagent\` / \`Task\` / \`@agent-*\`) to launch a fresh context window.
17175
+ - \u{1F195} **Chat-Based IDEs (Cursor / Windsurf / Aider)**: Open a **New Chat (\`Cmd/Ctrl + N\`)** or run \`/clear\` before pasting the Suggested Invocation Prompt so the next specialist starts with zero context pollution and hydrates state exclusively from \`handoff.yaml\` / \`get_active_handoff\`.
16216
17176
 
16217
17177
  - **Human Action Window (User Sovereignty and Priority)**:
16218
17178
  - \u270B **Review and Validate**: Inspect generated artifacts and validate alignment with project vision before proceeding.
@@ -16700,7 +17660,12 @@ function resolveAgentTargets(agents) {
16700
17660
  }
16701
17661
  function appendAntigravityFiles(dirs, files) {
16702
17662
  dirs.push(".agent/rules", ".agent/agents", ".agent/skills");
16703
- files.push({ relPath: ".agent/rules/ai-sdlc.md", content: STARTER_ANTIGRAVITY_RULES });
17663
+ files.push(
17664
+ { relPath: ".agent/rules/ai-sdlc.md", content: STARTER_ANTIGRAVITY_RULES },
17665
+ { relPath: ".agent/hooks.json", content: STARTER_ANTIGRAVITY_HOOKS_JSON },
17666
+ { relPath: ".agent/scripts/guard-branch.cjs", content: STARTER_AGENT_GUARD_WRAPPER_CJS },
17667
+ { relPath: "scripts/guard-branch.cjs", content: STARTER_GUARD_BRANCH_CJS }
17668
+ );
16704
17669
  for (const agent of SPECIALIZED_AGENT_TEMPLATES) {
16705
17670
  const content = renderAntigravityAgentFile(agent);
16706
17671
  files.push({ relPath: `.agent/agents/${agent.id}.md`, content });
@@ -16771,24 +17736,25 @@ function collectAgentFiles(targets) {
16771
17736
  appendMcpFiles(dirs, files);
16772
17737
  return { dirs, files };
16773
17738
  }
17739
+ function recordDryRunFile(exists, canOverwrite, relPath, results) {
17740
+ if (exists && canOverwrite) results.filesUpdated.push(relPath);
17741
+ else if (!exists) results.filesCreated.push(relPath);
17742
+ }
17743
+ function persistFileToDisk(fullFilePath, content, exists, relPath, results) {
17744
+ const parentDir = path5.dirname(fullFilePath);
17745
+ if (!fs8.existsSync(parentDir)) fs8.mkdirSync(parentDir, { recursive: true });
17746
+ fs8.writeFileSync(fullFilePath, content, "utf-8");
17747
+ if (exists) results.filesUpdated.push(relPath);
17748
+ else results.filesCreated.push(relPath);
17749
+ }
16774
17750
  function writeSingleFile(fullFilePath, content, relPath, opts, results) {
16775
17751
  const exists = fs8.existsSync(fullFilePath);
17752
+ const canOverwrite = Boolean(opts.force && !PROTECTED_CODING_RULES_FILES.includes(relPath));
16776
17753
  if (opts.dryRun) {
16777
- if (exists && opts.force) results.filesUpdated.push(relPath);
16778
- else if (!exists) results.filesCreated.push(relPath);
17754
+ recordDryRunFile(exists, canOverwrite, relPath, results);
16779
17755
  return;
16780
17756
  }
16781
- const parentDir = path5.dirname(fullFilePath);
16782
- if (!fs8.existsSync(parentDir)) {
16783
- fs8.mkdirSync(parentDir, { recursive: true });
16784
- }
16785
- if (!exists) {
16786
- fs8.writeFileSync(fullFilePath, content, "utf-8");
16787
- results.filesCreated.push(relPath);
16788
- } else if (opts.force) {
16789
- fs8.writeFileSync(fullFilePath, content, "utf-8");
16790
- results.filesUpdated.push(relPath);
16791
- }
17757
+ if (!exists || canOverwrite) persistFileToDisk(fullFilePath, content, exists, relPath, results);
16792
17758
  }
16793
17759
  function writeProjectFiles(destDir, files, dryRun, force) {
16794
17760
  const results = { filesCreated: [], filesUpdated: [] };
@@ -16844,6 +17810,7 @@ var BASE_DIRECTORIES = [
16844
17810
  "templates/sdd",
16845
17811
  "templates/manuals",
16846
17812
  "templates/ci",
17813
+ "templates/coding-rules",
16847
17814
  "templates/workflow",
16848
17815
  "specs",
16849
17816
  "reports",
@@ -16878,25 +17845,32 @@ function createDirectoriesOnDisk(destDir, directories, dryRun) {
16878
17845
  }
16879
17846
  return created;
16880
17847
  }
16881
- function collectStarterFiles(ciProvider, agentFiles = [], archGranularity = "minimal") {
16882
- const files = [
17848
+ function collectPolicyAndSchemaFiles() {
17849
+ return [
16883
17850
  { relPath: "quality-policy.yaml", content: STARTER_QUALITY_POLICY },
16884
17851
  { relPath: "license-policy.yaml", content: STARTER_LICENSE_POLICY },
16885
17852
  { relPath: "privacy-policy.yaml", content: STARTER_PRIVACY_POLICY },
16886
17853
  ...STARTER_BASE_TEMPLATES,
16887
17854
  ...STARTER_SCHEMAS.map((s) => ({ relPath: s.relPath, content: s.content })),
17855
+ ...getReferenceCodingRulesTemplates()
17856
+ ];
17857
+ }
17858
+ function collectArchitectureTemplateFiles(archGranularity) {
17859
+ return getArchitectureTemplates(archGranularity).map((t) => ({
17860
+ relPath: path5.join("templates", "architecture", t.filename).replace(/\\/g, "/"),
17861
+ content: t.content
17862
+ }));
17863
+ }
17864
+ function collectStarterFiles(ciProvider, agentFiles = [], archGranularity = "minimal", stacks = []) {
17865
+ const files = [
17866
+ ...collectPolicyAndSchemaFiles(),
17867
+ ...getCodingRulesFilesForStacks(stacks),
16888
17868
  ...getCiWorkflowFiles(ciProvider),
16889
17869
  ...agentFiles,
16890
- ...getArchitectureTemplates(archGranularity).map((t) => ({
16891
- relPath: path5.join("templates", "architecture", t.filename).replace(/\\/g, "/"),
16892
- content: t.content
16893
- }))
17870
+ ...collectArchitectureTemplateFiles(archGranularity)
16894
17871
  ];
16895
17872
  if (ciProvider === "github" || !ciProvider) {
16896
- files.push({
16897
- relPath: ".github/PULL_REQUEST_TEMPLATE.md",
16898
- content: STARTER_GITHUB_PULL_REQUEST_TEMPLATE
16899
- });
17873
+ files.push({ relPath: ".github/PULL_REQUEST_TEMPLATE.md", content: STARTER_GITHUB_PULL_REQUEST_TEMPLATE });
16900
17874
  }
16901
17875
  return files;
16902
17876
  }
@@ -16964,7 +17938,7 @@ function mergeDirectories(base, extra) {
16964
17938
  }
16965
17939
  return result;
16966
17940
  }
16967
- function buildInitSuccessResult(destDir, directoriesCreated, filesCreated, filesUpdated, ciProvider, agentsConfigured, architectureGranularity, gitHookInstalled) {
17941
+ function buildInitSuccessResult(destDir, directoriesCreated, filesCreated, filesUpdated, ciProvider, agentsConfigured, architectureGranularity, stacksConfigured, gitHookInstalled) {
16968
17942
  return {
16969
17943
  success: true,
16970
17944
  targetDir: destDir,
@@ -16974,6 +17948,7 @@ function buildInitSuccessResult(destDir, directoriesCreated, filesCreated, files
16974
17948
  ciProvider,
16975
17949
  agentsConfigured,
16976
17950
  architectureGranularity,
17951
+ stacksConfigured,
16977
17952
  gitHookInstalled
16978
17953
  };
16979
17954
  }
@@ -16984,182 +17959,37 @@ function validateInitOptions(options) {
16984
17959
  if (!archRes.valid) return { valid: false, archGranularity: "minimal", error: archRes.error };
16985
17960
  return { valid: true, ciProvider: ciRes.provider, archGranularity: archRes.granularity };
16986
17961
  }
16987
- function assembleScaffoldingPlan(ciProvider, agents, archGranularity) {
17962
+ function assembleScaffoldingPlan(ciProvider, agents, archGranularity, stacks = []) {
16988
17963
  const agentTargets = resolveAgentTargets(agents);
16989
17964
  const { dirs: agentDirs, files: agentFiles } = collectAgentFiles(agentTargets);
16990
17965
  const directories = mergeDirectories(getBaseDirectories(ciProvider), agentDirs);
16991
- const starterFiles = collectStarterFiles(ciProvider, agentFiles, archGranularity);
17966
+ const starterFiles = collectStarterFiles(ciProvider, agentFiles, archGranularity, stacks);
16992
17967
  return { agentTargets, directories, starterFiles };
16993
17968
  }
16994
- function initProject(options = {}) {
16995
- const destDir = path5.resolve(options.rootDir || process.cwd(), options.targetDir || ".");
16996
- const validated = validateInitOptions(options);
16997
- if (!validated.valid) return buildInitError(destDir, validated.error);
16998
- const { agentTargets, directories, starterFiles } = assembleScaffoldingPlan(
16999
- validated.ciProvider,
17000
- options.agents,
17001
- validated.archGranularity
17002
- );
17969
+ function executeScaffoldingOnDisk(destDir, options, ciProvider, archGranularity, stacks) {
17970
+ const { agentTargets, directories, starterFiles } = assembleScaffoldingPlan(ciProvider, options.agents, archGranularity, stacks);
17003
17971
  const dirsCreated = createDirectoriesOnDisk(destDir, directories, options.dryRun);
17004
17972
  const { filesCreated, filesUpdated } = writeProjectFiles(destDir, starterFiles, options.dryRun, options.force);
17005
- if (updateConsumerPackageJson(destDir, options.dryRun)) {
17006
- filesCreated.push("package.json");
17007
- }
17973
+ if (updateConsumerPackageJson(destDir, options.dryRun)) filesCreated.push("package.json");
17008
17974
  return buildInitSuccessResult(
17009
17975
  destDir,
17010
17976
  dirsCreated,
17011
17977
  filesCreated,
17012
17978
  filesUpdated,
17013
- validated.ciProvider,
17979
+ ciProvider,
17014
17980
  formatAgentsConfigured(agentTargets),
17015
- validated.archGranularity,
17981
+ archGranularity,
17982
+ stacks,
17016
17983
  tryInstallGitHook(destDir, options.dryRun)
17017
17984
  );
17018
17985
  }
17019
- var DEFAULT_DLP_RULES = [
17020
- {
17021
- id: "DLP-001-PRIVATE-KEY",
17022
- description: "PEM / RSA / EC / OPENSSH Private Key Block",
17023
- pattern: "-----BEGIN (?:[A-Z0-9_-]+ )?PRIVATE KEY-----[\\s\\S]*?-----END (?:[A-Z0-9_-]+ )?PRIVATE KEY-----",
17024
- replacement: "[REDACTED:PRIVATE_KEY]",
17025
- enabled: true
17026
- },
17027
- {
17028
- id: "DLP-002-API-TOKEN",
17029
- description: "Cloud, GitHub, Slack, OpenAI, Stripe, and AWS Access Tokens",
17030
- pattern: "\\b(?:gh[pousr]_[A-Za-z0-9_]{36,255}|github_pat_[0-9a-zA-Z_]{82}|sk-(?:proj-|live-)?[a-zA-Z0-9_-]{32,}|AKIA[0-9A-Z]{16}|xox[baprs]-[0-9]{10,13}-[0-9]{10,13}[a-zA-Z0-9-]*|(?:sk|rk)_(?:live|test)_[0-9a-zA-Z]{24,99})\\b",
17031
- replacement: "[REDACTED:API_TOKEN]",
17032
- enabled: true
17033
- },
17034
- {
17035
- id: "DLP-003-JWT",
17036
- description: "Plaintext JSON Web Token (JWT)",
17037
- pattern: "\\beyJ[A-Za-z0-9_-]{10,}\\.eyJ[A-Za-z0-9_-]{10,}\\.[A-Za-z0-9_-]{10,}\\b",
17038
- replacement: "[REDACTED:JWT_TOKEN]",
17039
- enabled: true
17040
- },
17041
- {
17042
- id: "DLP-004-CREDIT-CARD",
17043
- description: "Payment Card Number (13-19 digits formatted)",
17044
- pattern: "\\b(?:\\d{4}[- ]\\d{4}[- ]\\d{4}[- ]\\d{4}|\\d{16})\\b",
17045
- replacement: "[REDACTED:CREDIT_CARD]",
17046
- enabled: true
17047
- },
17048
- {
17049
- id: "DLP-005-EMAIL",
17050
- description: "Personal or Corporate Email Address",
17051
- pattern: "\\b[A-Za-z0-9._%+-]+@(?!example\\.com|localhost|test\\.local)[A-Za-z0-9.-]+\\.[A-Za-z]{2,}\\b",
17052
- replacement: "[REDACTED:EMAIL]",
17053
- enabled: true
17054
- },
17055
- {
17056
- id: "DLP-006-INTERNAL-URL",
17057
- description: "Internal Intranet / Corp Service URL",
17058
- pattern: "https?://(?:[A-Za-z0-9._-]+:[A-Za-z0-9._-]+@|[A-Za-z0-9.-]+\\.(?:internal|corp|intranet|local)\\b)[^\\s\"'`<>]*",
17059
- replacement: "[REDACTED:INTERNAL_URL]",
17060
- enabled: true
17061
- }
17062
- ];
17063
- function createDefaultDlpPolicy() {
17064
- return {
17065
- version: "1.0",
17066
- enabled: true,
17067
- zero_data_retention_required: true,
17068
- rules: [...DEFAULT_DLP_RULES]
17069
- };
17070
- }
17071
- function normalizeParsedRule(raw, idx) {
17072
- if (typeof raw.pattern !== "string" || !raw.pattern) return null;
17073
- return {
17074
- id: typeof raw.id === "string" ? raw.id : `DLP-CUSTOM-${idx + 1}`,
17075
- description: typeof raw.description === "string" ? raw.description : "Custom DLP rule",
17076
- pattern: raw.pattern,
17077
- replacement: typeof raw.replacement === "string" ? raw.replacement : "[REDACTED]",
17078
- enabled: raw.enabled !== false
17079
- };
17080
- }
17081
- function parseDlpDoc(yamlContent) {
17082
- let doc;
17083
- try {
17084
- doc = yaml3.load(yamlContent);
17085
- } catch (err) {
17086
- throw new Error(`[AI-SDLC Fail-Closed] Invalid YAML in dlp-policy: ${err instanceof Error ? err.message : String(err)}`);
17087
- }
17088
- if (!doc || typeof doc !== "object" || Array.isArray(doc)) {
17089
- throw new Error(`[AI-SDLC Fail-Closed] Invalid dlp-policy structure: root must be a YAML mapping`);
17090
- }
17091
- const record = doc;
17092
- if (record.rules !== void 0 && !Array.isArray(record.rules)) {
17093
- throw new Error(`[AI-SDLC Fail-Closed] Invalid dlp-policy: rules must be an array`);
17094
- }
17095
- return record;
17096
- }
17097
- function parseDlpPolicy(yamlContent) {
17098
- const fallback = createDefaultDlpPolicy();
17099
- if (!yamlContent || !yamlContent.trim()) return fallback;
17100
- const record = parseDlpDoc(yamlContent);
17101
- const rawRules = Array.isArray(record.rules) ? record.rules : [];
17102
- const parsedRules = rawRules.map((r, i) => normalizeParsedRule(r, i)).filter((r) => r !== null);
17103
- return {
17104
- version: typeof record.version === "string" ? record.version : "1.0",
17105
- enabled: record.enabled !== false,
17106
- zero_data_retention_required: Boolean(record.zero_data_retention_required ?? true),
17107
- rules: parsedRules.length > 0 ? parsedRules : fallback.rules
17108
- };
17109
- }
17110
- function loadDlpPolicy(rootDir, customPolicyPath) {
17111
- const base = rootDir || process.cwd();
17112
- const filePath = customPolicyPath ? path5.isAbsolute(customPolicyPath) ? customPolicyPath : path5.join(base, customPolicyPath) : path5.join(base, "dlp-policy.yaml");
17113
- if (!fs8.existsSync(filePath)) return createDefaultDlpPolicy();
17114
- return parseDlpPolicy(fs8.readFileSync(filePath, "utf-8"));
17115
- }
17116
- function applySingleDlpRule(text, rule) {
17117
- if (rule.enabled === false) return { output: text, matches: 0 };
17118
- try {
17119
- const regex = new RegExp(rule.pattern, "g");
17120
- let matches = 0;
17121
- const output = text.replace(regex, () => {
17122
- matches++;
17123
- return rule.replacement;
17124
- });
17125
- return { output, matches };
17126
- } catch {
17127
- return { output: text, matches: 0 };
17128
- }
17129
- }
17130
- function sanitizeDlpText(text, policy = createDefaultDlpPolicy()) {
17131
- if (!policy.enabled || !text) {
17132
- return { sanitizedText: text, redactionCount: 0, triggeredRuleIds: [] };
17133
- }
17134
- let current = text;
17135
- let totalRedactions = 0;
17136
- const triggered = [];
17137
- for (const rule of policy.rules) {
17138
- const res = applySingleDlpRule(current, rule);
17139
- if (res.matches > 0) {
17140
- current = res.output;
17141
- totalRedactions += res.matches;
17142
- triggered.push(rule.id);
17143
- }
17144
- }
17145
- return {
17146
- sanitizedText: current,
17147
- redactionCount: totalRedactions,
17148
- triggeredRuleIds: triggered
17149
- };
17150
- }
17151
- function sanitizeDlpPayload(payload, policy = createDefaultDlpPolicy()) {
17152
- if (!policy.enabled || payload === null || payload === void 0) return payload;
17153
- if (typeof payload === "string") {
17154
- return sanitizeDlpText(payload, policy).sanitizedText;
17155
- }
17156
- const serialized = JSON.stringify(payload);
17157
- const { sanitizedText } = sanitizeDlpText(serialized, policy);
17158
- try {
17159
- return JSON.parse(sanitizedText);
17160
- } catch {
17161
- return payload;
17162
- }
17986
+ function initProject(options = {}) {
17987
+ const destDir = path5.resolve(options.rootDir || process.cwd(), options.targetDir || ".");
17988
+ const validated = validateInitOptions(options);
17989
+ if (!validated.valid) return buildInitError(destDir, validated.error);
17990
+ const stackRes = resolveCodingRuleStacks(options.stack, destDir);
17991
+ if (!stackRes.valid) return buildInitError(destDir, stackRes.error);
17992
+ return executeScaffoldingOnDisk(destDir, options, validated.ciProvider, validated.archGranularity, stackRes.stacks);
17163
17993
  }
17164
17994
  var CITATION_REGEX = /\b(ARCH-INTRO|JRN|ACT-THREAT|ACT|UC|BR|BC|ABUSE|DATA-ASSET|PRIV-ROPA|HAZ|SEC-ENC|CMP|ADR|SEC-REQ|PRIV-REQ|FR|QR|CHG|TSK|HOF)-[A-Z0-9_-]+/g;
17165
17995
  function parseTasksFromDir(changeDirPath, rootDir) {
@@ -17624,6 +18454,6 @@ function formatInspectResultMarkdown(result) {
17624
18454
  return lines.join("\n");
17625
18455
  }
17626
18456
 
17627
- export { ALL_ARCHITECTURE_TEMPLATES, BRANCH_PATTERNS, BddStepRegistry, DEFAULT_DLP_RULES, DEFAULT_EXCLUDED_PATTERNS, DEFAULT_EXCLUDES, DEFAULT_EXTENSIONS, DEFAULT_PRIVACY_POLICY, DEFAULT_SAST_EXCLUDES, GENERAL_SOURCE_EXTENSIONS, KPI_SUMMARY_END_TAG, KPI_SUMMARY_START_TAG, LIFECYCLE_SKILL_TEMPLATES, OpenSpecAdapter, PII_SAST_RULES, PREPARE_COMMIT_MSG_SCRIPT, PRE_COMMIT_SCRIPT, PROMPT_INJECTION_SIGNATURES, PROTECTED_BYPASS_PATTERNS, 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_ANTIGRAVITY_MCP, STARTER_ANTIGRAVITY_RULES, STARTER_ARCH_ADR, STARTER_ARCH_ARCHITECTURE_CONSTRAINTS, STARTER_ARCH_COMPONENT, STARTER_ARCH_CONTEXT_AND_SCOPE, STARTER_ARCH_CROSS_CUTTING_CONCEPTS, STARTER_ARCH_DEPLOYMENT_VIEW, STARTER_ARCH_GLOSSARY, STARTER_ARCH_INTRODUCTION_AND_GOALS, STARTER_ARCH_LEVEL_1_WHITEBOX, STARTER_ARCH_QUALITY_REQUIREMENTS, STARTER_ARCH_RISKS_AND_TECHNICAL_DEBT, STARTER_ARCH_RUNTIME_VIEW, STARTER_ARCH_SOLUTION_STRATEGY, STARTER_AZURE_PIPELINES, STARTER_BASE_TEMPLATES, STARTER_BITBUCKET_PIPELINES, STARTER_CLAUDE_RULES, STARTER_COMPLIANCE_LICENSE_MANIFEST_YAML, STARTER_COPILOT_RULES, STARTER_CURSOR_CORE_RULES, STARTER_CURSOR_MCP, STARTER_CURSOR_PRODUCT_RULES, STARTER_CURSOR_QUALITY_RULES, STARTER_GITHUB_CI, STARTER_GITHUB_DEPLOY_DASHBOARD, STARTER_GITHUB_PR_KPI, STARTER_GITHUB_PULL_REQUEST_TEMPLATE, STARTER_GITHUB_SDD_INTEGRATE, STARTER_GITLAB_CI, STARTER_LICENSE_POLICY, STARTER_PRIVACY_POLICY, STARTER_PROCESS_README, STARTER_PULL_REQUEST_TEMPLATE, STARTER_QUALITY_POLICY, STARTER_REQUIREMENT_TEMPLATE, STARTER_SCHEMAS, STARTER_SCHEMAS_MAP, STARTER_TASK_TEMPLATE, STARTER_TEMPLATES_CI_AZURE_PIPELINES_YML, STARTER_TEMPLATES_CI_BITBUCKET_PIPELINES_YML, STARTER_TEMPLATES_CI_GITHUB_WORKFLOWS_CI_YML, STARTER_TEMPLATES_CI_GITHUB_WORKFLOWS_DEPLOY_DASHBOARD_YML, STARTER_TEMPLATES_CI_GITHUB_WORKFLOWS_PR_KPI_SUMMARY_YML, STARTER_TEMPLATES_CI_GITHUB_WORKFLOWS_SDD_INTEGRATE_ON_MERGE_YML, STARTER_TEMPLATES_CI__GITLAB_CI_YML, STARTER_TEMPLATES_COMPLIANCE_COMMERCIAL_ACQUISITION_REQUEST_TEMPLATE_MD, STARTER_TEMPLATES_MANUALS_PRODUCTION_MANUAL_TEMPLATE_MD, STARTER_TEMPLATES_MANUALS_USER_MANUAL_TEMPLATE_MD, STARTER_TEMPLATES_PRIVACY_DATA_ASSET_TEMPLATE_MD, STARTER_TEMPLATES_PRIVACY_DPIA_REQUEST_TEMPLATE_MD, STARTER_TEMPLATES_PRIVACY_PRIVACY_REQ_TEMPLATE_MD, STARTER_TEMPLATES_PRIVACY_PRIVACY_ROPA_TEMPLATE_MD, STARTER_TEMPLATES_PRODUCT_ACTOR_TEMPLATE_MD, STARTER_TEMPLATES_PRODUCT_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, TYPE_TO_SCHEMA_MAP, UNIT_TEST_SUFFIXES, VALID_AGENT_TARGETS, VALID_ARCHITECTURE_GRANULARITIES, VALID_AUTONOMY_MODES, VALID_CHANGE_PROFILES, VALID_CI_PROVIDERS, 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, detectPromptInjection, emitCiOutput, evaluateCompoundLicense, evaluateSingleDependency, evaluateVulnerabilityThresholds, executeBddFeature, 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, getCytoscapeScript, getGitDiffLines, getNextCorrelativeNumber, getSddAdapter, inferArtifactTypeFromId, inferMissingTrailers, initProject, injectKpisIntoPrBody, inspectElement, installGitHooks, integrateSddChange, isCliInstalled, isFunctionReferencedInTests, isGitleaksInstalled, isMetricWorsened, isPathProtectedFromPatch, isPlaceholderOrIgnored, isReportContentSemanticallyEqual, isRequirementArtifact2 as isRequirementArtifact, 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, 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, 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 };
18457
+ 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, 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, 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 };
17628
18458
  //# sourceMappingURL=index.js.map
17629
18459
  //# sourceMappingURL=index.js.map