@aisdlc/core 3.3.0 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +112 -28
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -6
- package/dist/index.d.ts +12 -6
- package/dist/index.js +112 -29
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -5112,7 +5112,7 @@ var DEFAULT_DLP_RULES = [
|
|
|
5112
5112
|
{
|
|
5113
5113
|
id: "DLP-004-CREDIT-CARD",
|
|
5114
5114
|
description: "Payment Card Number (13-19 digits formatted)",
|
|
5115
|
-
pattern: "\\b(?:\\d{4}[- ]\\d{4}[- ]\\d{4}[- ]\\d{4}
|
|
5115
|
+
pattern: "\\b(?:\\d{4}[- ]\\d{4}[- ]\\d{4}[- ]\\d{4}|(?!9007199254740991)\\d{16})\\b",
|
|
5116
5116
|
replacement: "[REDACTED:CREDIT_CARD]",
|
|
5117
5117
|
enabled: true
|
|
5118
5118
|
},
|
|
@@ -10631,6 +10631,28 @@ function extractCommitKpisFromRange(baseRef, headRef = "HEAD", options = {}) {
|
|
|
10631
10631
|
}
|
|
10632
10632
|
return records;
|
|
10633
10633
|
}
|
|
10634
|
+
function extractAllRepoCommitKpis(options = {}) {
|
|
10635
|
+
const cwd = options.cwd || process.cwd();
|
|
10636
|
+
const format = "---AI_SDLC_COMMIT---%n%H%x1f%an%x1f%ae%x1f%aI%x1f%s%n%B%n---AI_SDLC_BODY_END---";
|
|
10637
|
+
let rawOutput = "";
|
|
10638
|
+
try {
|
|
10639
|
+
rawOutput = child_process.execFileSync("git", ["log", "--all", `--format=${format}`, "--numstat"], {
|
|
10640
|
+
cwd,
|
|
10641
|
+
encoding: "utf-8",
|
|
10642
|
+
stdio: ["pipe", "pipe", "pipe"]
|
|
10643
|
+
});
|
|
10644
|
+
} catch {
|
|
10645
|
+
return [];
|
|
10646
|
+
}
|
|
10647
|
+
if (!rawOutput) return [];
|
|
10648
|
+
const chunks = parseRawLogChunks(rawOutput);
|
|
10649
|
+
const records = [];
|
|
10650
|
+
for (const chunk of chunks) {
|
|
10651
|
+
const rec = buildCommitKpiRecord(chunk);
|
|
10652
|
+
if (rec) records.push(rec);
|
|
10653
|
+
}
|
|
10654
|
+
return records;
|
|
10655
|
+
}
|
|
10634
10656
|
var AGENT_ENV_MAPPINGS = [
|
|
10635
10657
|
{ envKey: "ANTIGRAVITY_AGENT", defaultModel: "gemini-3.8-flash", source: "antigravity" },
|
|
10636
10658
|
{ envKey: "ANTIGRAVITY_CONVERSATION_ID", defaultModel: "gemini-3.8-flash", source: "antigravity" },
|
|
@@ -11337,7 +11359,7 @@ function getCytoscapeScript() {
|
|
|
11337
11359
|
const scriptPath = resolveCytoscapePath();
|
|
11338
11360
|
if (scriptPath) {
|
|
11339
11361
|
try {
|
|
11340
|
-
cachedScript = fs8__namespace.readFileSync(scriptPath, "utf-8");
|
|
11362
|
+
cachedScript = fs8__namespace.readFileSync(scriptPath, "utf-8").replace(/\b9007199254740991\b/g, "(Math.pow(2,53)-1)");
|
|
11341
11363
|
return cachedScript;
|
|
11342
11364
|
} catch {
|
|
11343
11365
|
}
|
|
@@ -12343,7 +12365,7 @@ var DASHBOARD_CLIENT_SCRIPT = `
|
|
|
12343
12365
|
container: document.getElementById('cy'),
|
|
12344
12366
|
elements: safeElements,
|
|
12345
12367
|
boxSelectionEnabled: false,
|
|
12346
|
-
autoungrabify:
|
|
12368
|
+
autoungrabify: false,
|
|
12347
12369
|
style: [
|
|
12348
12370
|
{
|
|
12349
12371
|
selector: 'node',
|
|
@@ -12633,6 +12655,9 @@ var DASHBOARD_CLIENT_SCRIPT = `
|
|
|
12633
12655
|
}
|
|
12634
12656
|
});
|
|
12635
12657
|
|
|
12658
|
+
setTimeout(function() { if (cy) { cy.resize(); cy.fit(30); } }, 150);
|
|
12659
|
+
window.addEventListener('resize', function() { if (cy) { cy.resize(); } });
|
|
12660
|
+
|
|
12636
12661
|
cy.on('tap', 'node', function(evt) {
|
|
12637
12662
|
var node = evt.target;
|
|
12638
12663
|
var data = node.data();
|
|
@@ -13859,7 +13884,28 @@ function collectGitPrefixedBranches(rootDir) {
|
|
|
13859
13884
|
return [];
|
|
13860
13885
|
}
|
|
13861
13886
|
}
|
|
13862
|
-
function
|
|
13887
|
+
function addDefaultGitBranches(rootDir, branchSet) {
|
|
13888
|
+
for (const def of ["main", "master"]) {
|
|
13889
|
+
try {
|
|
13890
|
+
child_process.execFileSync("git", ["rev-parse", "--verify", "--quiet", def], {
|
|
13891
|
+
cwd: rootDir,
|
|
13892
|
+
stdio: ["pipe", "pipe", "pipe"]
|
|
13893
|
+
});
|
|
13894
|
+
branchSet.add(def);
|
|
13895
|
+
} catch {
|
|
13896
|
+
}
|
|
13897
|
+
}
|
|
13898
|
+
}
|
|
13899
|
+
function addCommitTrailerBranches(allRepoCommits, branchSet) {
|
|
13900
|
+
if (!allRepoCommits) return;
|
|
13901
|
+
for (const c of allRepoCommits) {
|
|
13902
|
+
const pRef = c.trailers?.parentRef;
|
|
13903
|
+
if (pRef && /^(feat|bug|task|release)\//i.test(pRef)) {
|
|
13904
|
+
branchSet.add(pRef);
|
|
13905
|
+
}
|
|
13906
|
+
}
|
|
13907
|
+
}
|
|
13908
|
+
function resolveCandidateBranches(rootDir, activeBranch, history, allRepoCommits) {
|
|
13863
13909
|
const branchSet = /* @__PURE__ */ new Set();
|
|
13864
13910
|
if (activeBranch && activeBranch !== "HEAD") {
|
|
13865
13911
|
branchSet.add(activeBranch);
|
|
@@ -13869,14 +13915,38 @@ function resolveCandidateBranches(rootDir, activeBranch, history) {
|
|
|
13869
13915
|
}
|
|
13870
13916
|
for (const b of collectGitUnmergedBranches(rootDir)) branchSet.add(b);
|
|
13871
13917
|
for (const b of collectGitPrefixedBranches(rootDir)) branchSet.add(b);
|
|
13918
|
+
addDefaultGitBranches(rootDir, branchSet);
|
|
13919
|
+
addCommitTrailerBranches(allRepoCommits, branchSet);
|
|
13872
13920
|
return Array.from(branchSet);
|
|
13873
13921
|
}
|
|
13874
|
-
function
|
|
13922
|
+
function fetchDefaultBranchKpi(rootDir, branch, allRepoCommits) {
|
|
13923
|
+
if (allRepoCommits && allRepoCommits.length > 0) {
|
|
13924
|
+
return aggregateCommitKpiRecords(allRepoCommits, branch, branch);
|
|
13925
|
+
}
|
|
13926
|
+
const base = resolveDefaultBranchBase(rootDir, branch);
|
|
13927
|
+
const kpi = aggregatePrKpis(base, branch, { cwd: rootDir });
|
|
13928
|
+
return kpi && kpi.totalCommits > 0 ? kpi : null;
|
|
13929
|
+
}
|
|
13930
|
+
function isCommitMatchingBranch(c, branch, branchBase) {
|
|
13931
|
+
const pRef = (c.trailers?.parentRef || "").toLowerCase();
|
|
13932
|
+
const bLower = branch.toLowerCase();
|
|
13933
|
+
const baseLower = branchBase.toLowerCase();
|
|
13934
|
+
return pRef === bLower || pRef === baseLower || pRef.length > 0 && bLower.includes(pRef) || c.subject.toLowerCase().includes("(" + baseLower + ")");
|
|
13935
|
+
}
|
|
13936
|
+
function fetchMergedBranchKpi(branch, allRepoCommits) {
|
|
13937
|
+
if (!allRepoCommits || allRepoCommits.length === 0) return null;
|
|
13938
|
+
const branchBase = branch.replace(/^(feat|bug|task|release)\//i, "");
|
|
13939
|
+
const matched = allRepoCommits.filter((c) => isCommitMatchingBranch(c, branch, branchBase));
|
|
13940
|
+
return matched.length > 0 ? aggregateCommitKpiRecords(matched, "main", branch) : null;
|
|
13941
|
+
}
|
|
13942
|
+
function fetchBranchKpi(rootDir, branch, allRepoCommits) {
|
|
13875
13943
|
try {
|
|
13876
|
-
|
|
13877
|
-
|
|
13878
|
-
|
|
13879
|
-
|
|
13944
|
+
if (branch === "main" || branch === "master") {
|
|
13945
|
+
return fetchDefaultBranchKpi(rootDir, branch, allRepoCommits);
|
|
13946
|
+
}
|
|
13947
|
+
const kpi = aggregatePrKpis("main", branch, { cwd: rootDir });
|
|
13948
|
+
if (kpi && kpi.totalCommits > 0) return kpi;
|
|
13949
|
+
return fetchMergedBranchKpi(branch, allRepoCommits);
|
|
13880
13950
|
} catch {
|
|
13881
13951
|
return null;
|
|
13882
13952
|
}
|
|
@@ -13885,10 +13955,10 @@ function recordBranchKpi(telemetries, commitMap, branch, kpi) {
|
|
|
13885
13955
|
telemetries[branch] = kpi;
|
|
13886
13956
|
for (const rec of kpi.commitRecords || []) commitMap.set(rec.sha, rec);
|
|
13887
13957
|
}
|
|
13888
|
-
function populateCandidateTelemetries(rootDir, candidateBranches, telemetries, commitMap) {
|
|
13958
|
+
function populateCandidateTelemetries(rootDir, candidateBranches, telemetries, commitMap, allRepoCommits) {
|
|
13889
13959
|
for (const branch of candidateBranches) {
|
|
13890
13960
|
if (telemetries[branch]) continue;
|
|
13891
|
-
const kpi = fetchBranchKpi(rootDir, branch);
|
|
13961
|
+
const kpi = fetchBranchKpi(rootDir, branch, allRepoCommits);
|
|
13892
13962
|
if (kpi) recordBranchKpi(telemetries, commitMap, branch, kpi);
|
|
13893
13963
|
}
|
|
13894
13964
|
}
|
|
@@ -13901,11 +13971,15 @@ function computeConsolidatedTelemetry(uniqueCommits, fallback) {
|
|
|
13901
13971
|
function collectAllBranchTelemetries(rootDir, activeBranch, history, activePrKpi) {
|
|
13902
13972
|
const branchTelemetries = {};
|
|
13903
13973
|
const uniqueCommits = /* @__PURE__ */ new Map();
|
|
13974
|
+
const allRepoCommits = extractAllRepoCommitKpis({ cwd: rootDir });
|
|
13975
|
+
for (const c of allRepoCommits) {
|
|
13976
|
+
uniqueCommits.set(c.sha, c);
|
|
13977
|
+
}
|
|
13904
13978
|
if (activePrKpi && activeBranch && activeBranch !== "HEAD") {
|
|
13905
13979
|
recordBranchKpi(branchTelemetries, uniqueCommits, activeBranch, activePrKpi);
|
|
13906
13980
|
}
|
|
13907
|
-
const candidateBranches = resolveCandidateBranches(rootDir, activeBranch, history);
|
|
13908
|
-
populateCandidateTelemetries(rootDir, candidateBranches, branchTelemetries, uniqueCommits);
|
|
13981
|
+
const candidateBranches = resolveCandidateBranches(rootDir, activeBranch, history, allRepoCommits);
|
|
13982
|
+
populateCandidateTelemetries(rootDir, candidateBranches, branchTelemetries, uniqueCommits, allRepoCommits);
|
|
13909
13983
|
const totalTelemetry = computeConsolidatedTelemetry(Array.from(uniqueCommits.values()), activePrKpi);
|
|
13910
13984
|
return { branchTelemetries, totalTelemetry };
|
|
13911
13985
|
}
|
|
@@ -14156,9 +14230,10 @@ var SPECIALIZED_AGENT_TEMPLATES = [
|
|
|
14156
14230
|
|
|
14157
14231
|
## Phase 0: Greenfield Product Inception (New Product Intent)
|
|
14158
14232
|
- **Trigger**: When the user expresses intent to create a new product from scratch with the framework (or when \`specs/product/\` has no baseline product model yet), initiate **Phase 0** before any SDD change (\`change:new\`) or implementation:
|
|
14159
|
-
1. **
|
|
14160
|
-
2. **Enterprise & Capability Vision (\`ARCH-INTRO-001\`)**: Draft the root vision artifact (\`type: architecture-introduction\`, \`naf-perspective: "Enterprise & Capability"\`, \`status: draft\`) using \`templates/architecture/introduction-and-goals.template.md\` (\`schemas/architecture/introduction-and-goals.schema.json\`).
|
|
14233
|
+
1. **Iterative Discovery Interview (Up to 15 Questions or Until Product is Crystal Clear)**: Conduct an iterative discovery interview (up to 15 questions, grouped logically in conversational rounds until zero product ambiguities remain) before drafting specs, clarifying: (a) core problem and mission statement, (b) primary actors/stakeholders (\`ACT-*\`), authentication/role model, and **target user interface modality** (e.g., Web UI, Desktop GUI, Console/TUI/CLI, Mobile app, or headless API/SDK), (c) foundational master entities/catalogs and CRUD flows required to operate the system, (d) essential MVP capabilities/use cases (\`UC-*\`) and business rules/invariants (\`BR-*\`) vs. future roadmap, and (e) top 3\u20135 priority quality goals and constraints (\`QR-*\`, \`CON-*\`). Do not proceed to draft artifacts until the product scope is completely clear.
|
|
14234
|
+
2. **Enterprise & Capability Vision (\`ARCH-INTRO-001\`)**: Draft the root vision artifact (\`type: architecture-introduction\`, \`naf-perspective: "Enterprise & Capability"\`, \`status: draft\`) using \`templates/architecture/introduction-and-goals.template.md\` (\`schemas/architecture/introduction-and-goals.schema.json\`), explicitly recording the agreed UI/interaction modality.
|
|
14161
14235
|
3. **ProductShape Derivation**: Derive the initial draft artifacts (\`ACT-*\`, \`UC-*\`, \`BR-*\`, \`FR-*\`, \`QR-*\` with \`status: draft\`) in \`specs/product/\` linked to \`ARCH-INTRO-001\` for human Product Owner review.
|
|
14236
|
+
4. **Mandatory End-to-End Presentation Interface & Master Data Prerequisite Rule (ANTI-LIBRARY-ONLY MVP)**: Whenever primary actors (\`ACT-*\`) are human users, the MVP ProductShape baseline MUST include: (a) an explicit presentation/interaction requirement (\`FR-*\`) or vertical UI/CLI acceptance criteria matching the modality agreed in Step 1 (Web UI, Desktop GUI, or Console/TUI/CLI \u2014 never proposing a library-only/in-memory MVP without a runnable entry point), (b) user authentication/session access when multi-role actors exist, and (c) CRUD/configuration flows for foundational master entities (e.g., rooms, staff, students, catalogs) required to operate the core business flows without manual database intervention.
|
|
14162
14237
|
|
|
14163
14238
|
## Operational Directives & Guardrails
|
|
14164
14239
|
- Every generated artifact must strictly adhere to the canonical Markdown and YAML frontmatter format in \`schemas/product/\` and \`schemas/architecture/introduction-and-goals.schema.json\`.
|
|
@@ -14235,6 +14310,7 @@ var SPECIALIZED_AGENT_TEMPLATES = [
|
|
|
14235
14310
|
- Decompose the system into building blocks \`CMP-*\` ensuring each component declares which use cases \`UC-*\` it implements and which requirements (\`FR-*\`, \`QR-*\`, \`SEC-REQ-*\`, \`PRIV-REQ-*\`) it fulfills under \`satisfies-requirements\`.
|
|
14236
14311
|
- **Modular & Hexagonal Architecture (Ports & Adapters)**: Structure building blocks (\`CMP-*\`, Level 2/3 of arc42) around Bounded Contexts (\`BC-*\`) and Vertical Slices (\`UC-*\`) following Hexagonal Architecture (Ports & Adapters). Separate the pure Domain/Application Core from Inbound/Driving Ports (API, CLI, UI handlers) and Outbound/Driven Ports (persistence, queues, external SDKs/LLMs), enforcing the Dependency Rule (dependencies point strictly inward toward the Core; avoid speculative empty layers per YAGNI and respect existing \`ADR-*\` architecture in brownfield repos).
|
|
14237
14312
|
- **Contract-First Full-Stack Integration**: Whenever a feature or change spans Frontend (UI) and Backend (API/services), define an explicit shared typed contract (Zod schemas, shared TypeScript DTOs, or OpenAPI specification) in \`design.md\` before implementation so both layers compile against a single source of truth.
|
|
14313
|
+
- **No Orphan Presentation Components (\`CMP-WEB-*\` / \`CMP-UI-*\` / \`CMP-CLI-*\`)**: When modeling architecture for a system with human actors (\`ACT-*\`), never leave the agreed presentation/driving adapter (Web UI, Desktop GUI, or Console/CLI) as an unmapped \`proposed\` spec while scheduling only backend class-library tasks in \`tasks.md\`. Wave 0 (\`CHG-001\`) MUST bootstrap the runnable presentation host shell matching the modality defined in Inception, and every subsequent \`CHG-*\` for a human-facing \`UC-*\` must include tasks (\`TSK-*\`) implementing its corresponding views/screens/commands and E2E tests as a complete vertical slice.
|
|
14238
14314
|
- Generate interaction and sequence diagrams in native Mermaid syntax.
|
|
14239
14315
|
- Document critical technological decisions using immutable \`ADR-*\` records conforming to \`schemas/architecture/adr.schema.json\`.
|
|
14240
14316
|
- Validate that architectural choices comply with legal constraints in \`license-policy.yaml\` and data protection constraints in \`privacy-policy.yaml\`.
|
|
@@ -14360,6 +14436,7 @@ Execute every implementation task following this strict sequential order:
|
|
|
14360
14436
|
## Operational Directives & Guardrails
|
|
14361
14437
|
- Operate under bimodal discipline depending on the lifecycle phase:
|
|
14362
14438
|
1. **Design Mode (Upstream)**: Adopt the primary actor persona under real-world field conditions (stress, latency, constrained viewports). Separate strict Minimum Viable Product (MVP) core from future roadmap ideas using \`templates/product/user-design-feedback.template.md\`.
|
|
14439
|
+
- **FORBIDDEN Library-Only MVP for Human Actors**: Whenever primary actors (\`ACT-*\`) are human users, verify that the target interaction modality (Web UI, Desktop GUI, Console/TUI/CLI, or Mobile) was explicitly defined in \`ARCH-INTRO-*\` / \`specs/product/\`, and reject as \`[BLOCKING_DEFECT]\` any MVP proposal that defers the agreed presentation layer, role authentication (when applicable), or foundational master-entity CRUDs (e.g., creating rooms, teachers, students, schedules) to post-MVP or leaves the system operable only via unit tests/in-memory calls. An MVP for human operators must be end-to-end usable from day one via its agreed interface.
|
|
14363
14440
|
2. **Functional Validation Mode (Downstream / Pre-PR / Post-Development Functional Validation)**: Inspect \`agent-developer\` deliverables once unit tests pass green by executing the real application (via Playwright or Chrome DevTools MCP when UI is present). Contrast actual UI, CLI, and API behavior against approved \`UC-*\` and \`FR-*\` criteria, verifying real Backend connectivity, the 4 UI usability states (\`Loading\`, \`Empty\`, \`Error\`, \`Nominal\`), keyboard/ARIA accessibility, and \`0\` browser \`console.error\` / network failures.
|
|
14364
14441
|
- Formulate decisive questions under \`open-questions\` for the human Product Owner.
|
|
14365
14442
|
- Emit handoff block suggesting the Pre-Merge Audit Triad (\`agent-code-reviewer\`, \`agent-security-auditor\`, \`agent-privacy-officer\`, \`agent-compliance-checker\`) if compliant, or return to \`agent-developer\` on functional drift or fake-wiring.`
|
|
@@ -14418,6 +14495,7 @@ Execute every implementation task following this strict sequential order:
|
|
|
14418
14495
|
## Operational Directives & Guardrails
|
|
14419
14496
|
- **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\`).
|
|
14420
14497
|
- **Simplicity First (YAGNI)**: Actively challenge speculative parameters, redundant interfaces, unused design patterns, and unrequested flexibility.
|
|
14498
|
+
- **End-to-End MVP Completeness Check (Anti-Library-Only Drift)**: When auditing Product (\`specs/product/\`), Architecture (\`specs/architecture/\`), or SDD change plans (\`design.md\`, \`tasks.md\`) involving human actors (\`ACT-*\`), flag as \`[BLOCKING_DEFECT]\` any scope cut that fails to define the target user interface modality at Inception or omits the runnable driving adapter (Web UI, Desktop GUI, or Console/CLI), role access/auth (when applicable), or master-data CRUD flows required to operate the use case end-to-end without manual database manipulation.
|
|
14421
14499
|
- **Classification of Findings**: Label every finding as:
|
|
14422
14500
|
* \`[BLOCKING_DEFECT]\`: Critical omission, structural debt, or standard violation that must be resolved.
|
|
14423
14501
|
* \`[SIMPLIFICATION]\`: Opportunity to remove unneeded complexity or reduce code/spec surface without loss of function.
|
|
@@ -14540,16 +14618,18 @@ Every authoring agent deliverable across Phase 0 and Inception undergoes mandato
|
|
|
14540
14618
|
|
|
14541
14619
|
### Step 2: Phase 0 Product Inception (\`agent-product-analyst\`)
|
|
14542
14620
|
1. Delegate to or adopt [\`agent-product-analyst\`](../agent-product-analyst/SKILL.md).
|
|
14543
|
-
2. **Discovery Interview (
|
|
14621
|
+
2. **Iterative Discovery Interview (Up to 15 Questions or Until Product Scope is 100% Clear)**: Before generating artifacts, clarify with the human Product Owner in rounds of 3\u20135 questions (up to **15 questions maximum**, stopping earlier as soon as the product is clear):
|
|
14544
14622
|
- Core mission statement and business problem.
|
|
14545
14623
|
- Primary actors (\`ACT-*\`) and external systems.
|
|
14546
|
-
-
|
|
14624
|
+
- **Target Interaction & Presentation Modality (\`CON-*\` / \`ARCH-INTRO-001\`)**: Explicitly define at inception how human actors will interact with the MVP (e.g., **Web UI**, **Desktop GUI**, **Interactive Console/TUI/CLI**, **Mobile App**, or **Headless API/SDK** if actors are exclusively external systems). Never assume a headless C#/TS class library when human actors exist.
|
|
14625
|
+
- Essential MVP capabilities (\`UC-*\`) vs. future roadmap, ensuring **foundational entity CRUD / master data workflows** (creating/managing core domain entities before executing transactions on them) are explicitly included in the MVP.
|
|
14547
14626
|
- Top 3\u20135 quality goals (\`QR-*\`) and regulatory/technical constraints (\`CON-*\`).
|
|
14548
|
-
3. **Enterprise & Capability Vision**: Create \`specs/architecture/ARCH-INTRO-001.md\` (\`status: draft\`, \`naf-perspective: "Enterprise & Capability"\`) using \`templates/architecture/introduction-and-goals.template.md
|
|
14627
|
+
3. **Enterprise & Capability Vision**: Create \`specs/architecture/ARCH-INTRO-001.md\` (\`status: draft\`, \`naf-perspective: "Enterprise & Capability"\`) using \`templates/architecture/introduction-and-goals.template.md\`, explicitly recording the chosen presentation/UI modality.
|
|
14549
14628
|
4. **ProductShape Baseline**: Derive initial draft artifacts in \`specs/product/\`:
|
|
14550
14629
|
- Actors (\`ACT-*\`), Use Cases (\`UC-*\`), Business Rules (\`BR-*\`), Functional Requirements (\`FR-*\` with mandatory \`@nominal\`, \`@boundary\`, \`@invalid\` Gherkin blocks), and Quality Requirements (\`QR-*\`).
|
|
14630
|
+
- **Vertical Slice Completeness Rule**: Every human-triggered \`UC-*\` in the MVP must specify observable user interaction through the agreed presentation modality (Web screens/forms, Desktop views, or Console commands/menus) and state persistence\u2014never stop at internal library/service method calls.
|
|
14551
14631
|
5. Validate schemas and duplicates via MCP tools \`verify_schemas\` and \`verify_duplicates\` (or \`npx aisdlc check --fix\`).
|
|
14552
|
-
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\`).
|
|
14632
|
+
6. **Mandatory Upstream UX & MVP Boundary Gate (\`agent-expert-user\`)**: Invoke [\`agent-expert-user\`](../agent-expert-user/SKILL.md) in **Design Mode** to stress-test the proposed workflows, enforce strict MVP boundaries, reject any headless/library-only MVP when human actors exist, verify master-data CRUD prerequisites, and separate core MVP \`UC-*\` from future roadmap backlog (\`templates/product/user-design-feedback.template.md\`).
|
|
14553
14633
|
7. **Transversal Quality & Adversarial Loop (\`agent-product-analyst\`)**:
|
|
14554
14634
|
- Concurrently invoke \`agent-auditor\` and \`agent-adversary\` on the draft product artifacts in isolated context windows.
|
|
14555
14635
|
- Consolidate findings and hand off back to \`agent-product-analyst\` to re-execute and remediate issues (max 2 correction rounds).
|
|
@@ -14582,13 +14662,14 @@ Every authoring agent deliverable across Phase 0 and Inception undergoes mandato
|
|
|
14582
14662
|
### Step 5: Release Milestone & Topological Wave SDD Plan (\`1 UC-* = 1 CHG-*\`)
|
|
14583
14663
|
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\`.
|
|
14584
14664
|
2. **Decompose into Topological Waves (DAG Parallelism)**:
|
|
14585
|
-
- **Wave 0 \u2014 Foundational Core (Sequential)**: Identify the foundational \`UC-*\` (core domain entities, shared contracts, auth/config) and deliver it first as \`CHG-001\` via [\`aisdlc-increment\`](../aisdlc-increment/SKILL.md) so downstream agents share locked interfaces.
|
|
14586
|
-
- **Waves 1..N \u2014 Orthogonal
|
|
14665
|
+
- **Wave 0 \u2014 Foundational Core & Executable Presentation Host (Sequential)**: Identify the foundational \`UC-*\` (core domain entities, shared contracts, auth/config, **plus the runnable application host/shell for the agreed UI modality**\u2014e.g., Web server + layout, Desktop shell, or CLI entrypoint + DB bootstrap) and deliver it first as \`CHG-001\` via [\`aisdlc-increment\`](../aisdlc-increment/SKILL.md) so the product is immediately executable and downstream agents share locked interfaces.
|
|
14666
|
+
- **Waves 1..N \u2014 Orthogonal End-to-End Vertical Slices (Parallel Multi-Agent)**: Once Wave 0 contracts and host shell are merged into \`release/v1.0.0\`, scaffold independent \`CHG-*\` increments (\`1 UC-* = 1 CHG-*\`) and execute them **in parallel** across isolated branches/worktrees (\`feat/CHG-002\`, \`feat/CHG-003\`, ...) whenever they target distinct components (\`CMP-*\`) or bounded contexts (\`BC-*\`). Every \`CHG-*\` implementing a human \`UC-*\` must deliver its complete vertical slice (Domain + Persistence + UI/CLI presentation view/command + E2E test).
|
|
14587
14667
|
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.
|
|
14588
14668
|
|
|
14589
14669
|
## Non-Negotiable Guardrails
|
|
14590
14670
|
- **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.
|
|
14591
14671
|
- **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.
|
|
14672
|
+
- **FORBIDDEN Library-Only MVP for Human-Facing Products**: Whenever a product defines human actors (\`ACT-*\`), no agent may scope the MVP (\`release/v1.0.0\`) as headless class libraries or in-memory-only modules without an executable presentation host. The target interaction modality (Web UI, Desktop GUI, Console/TUI/CLI, or Mobile) must be explicitly agreed with the user during Phase 0 Inception and delivered as a runnable end-to-end application across the MVP waves.
|
|
14592
14673
|
- **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-*\`.
|
|
14593
14674
|
- 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.
|
|
14594
14675
|
- All newly drafted specifications must start with \`status: draft\`.
|
|
@@ -14819,10 +14900,11 @@ This file defines the operational rules and specialized role mappings for Google
|
|
|
14819
14900
|
|
|
14820
14901
|
### 1. \`agent-product-analyst\` (Product Analyst / Scribe)
|
|
14821
14902
|
- **Mission**: Capture new product intent via NAF v4 Enterprise & Capability Vision (\`ARCH-INTRO-*\`) and define/refine the product model using ProductShape.
|
|
14822
|
-
- **Phase 0 (Greenfield Product Inception)**: When creating a new product from scratch (or when \`specs/product/\` has no baseline), run
|
|
14903
|
+
- **Phase 0 (Greenfield Product Inception)**: When creating a new product from scratch (or when \`specs/product/\` has no baseline), run an iterative discovery interview of **up to 15 questions (or until the product scope is 100% clear and unambiguous)** covering: mission/problem, actors \`ACT-*\`, role/auth model, **target UI/interaction modality (Web UI, Desktop GUI, Console/TUI/CLI, Mobile, or API/SDK)**, master-data CRUD prerequisites, MVP capabilities \`UC-*\`, business rules \`BR-*\`, and priority quality goals \`QR-*\`; then draft \`ARCH-INTRO-001\` (\`templates/architecture/introduction-and-goals.template.md\`), and derive initial \`ACT-*\`, \`UC-*\`, \`BR-*\`, \`FR-*\`, and \`QR-*\` drafts.
|
|
14823
14904
|
- **Input**: Business intent or natural language specification.
|
|
14824
14905
|
- **Output**: Markdown artifacts with YAML frontmatter compliant with \`schemas/architecture/introduction-and-goals.schema.json\` (\`ARCH-INTRO-*\`) and \`schemas/product/\` (\`ACT-*\`, \`UC-*\`, \`FR-*\`, \`QR-*\`, \`BR-*\`).
|
|
14825
14906
|
- **Guardrails**:
|
|
14907
|
+
- **FORBIDDEN Library-Only MVP for Human Actors**: Whenever primary actors (\`ACT-*\`) are human users, the target UI modality (Web, Desktop, Console/CLI, or Mobile) MUST be explicitly defined at Inception, and the MVP baseline MUST include a runnable presentation interface matching that modality, authentication/session access (when multi-role), and CRUD flows for foundational master entities required to execute the core business use cases without manual database seeding.
|
|
14826
14908
|
- \`status\` always starts in \`draft\`.
|
|
14827
14909
|
- In \`UC-*\`, format section \`1. Intent and Outcome\` under the standard English structure: \`As a <ACT-ID>... I want <action>... To <outcome>...\`.
|
|
14828
14910
|
- Mandatory Gherkin criteria with \`@<ID> @automated @regression\`.
|
|
@@ -14850,6 +14932,7 @@ This file defines the operational rules and specialized role mappings for Google
|
|
|
14850
14932
|
- **Output**: Architecture components (\`CMP-*\`), Mermaid diagrams, and immutable \`ADR-*\` records compliant with \`schemas/architecture/\`.
|
|
14851
14933
|
- **Guardrails**:
|
|
14852
14934
|
- Every \`CMP-*\` must declare \`satisfies-requirements\` linking \`FR-*\`, \`QR-*\`, \`SEC-REQ-*\`, and \`PRIV-REQ-*\`, and structure modules following **Modular & Hexagonal Architecture (Ports & Adapters)** (Domain/Application Core + Inbound/Outbound Ports, enforcing the Dependency Rule).
|
|
14935
|
+
- **No Orphan Presentation Components (\`CMP-WEB-*\` / \`CMP-UI-*\` / \`CMP-CLI-*\`)**: Never leave a presentation driving adapter unmapped in \`tasks.md\` while scheduling only backend class-library tasks. Wave 0 (\`CHG-001\`) must bootstrap the runnable host shell for the agreed UI modality (Web, Desktop, or Console/CLI) when human actors exist, and every human-facing \`CHG-*\` must deliver its vertical slice end-to-end (Domain + Persistence + Agreed UI/CLI Adapter + E2E).
|
|
14853
14936
|
- Emit a return handoff to \`agent-threat-modeler\` (chaining to \`agent-privacy-officer\`) in the technical security/privacy feedback loop when infrastructure or persistence decisions introduce new attack vectors or PII flows.
|
|
14854
14937
|
|
|
14855
14938
|
### 5. \`agent-qa-engineer\` (QA Engineer and SDET)
|
|
@@ -14891,7 +14974,7 @@ This file defines the operational rules and specialized role mappings for Google
|
|
|
14891
14974
|
### 9. \`agent-expert-user\` (Expert User and Domain Evaluator)
|
|
14892
14975
|
- **Mission**: Contrast design and specifications (design phase) and functionally validate finished software against \`UC-*\` and \`FR-*\` (post-development phase).
|
|
14893
14976
|
- **Directives**:
|
|
14894
|
-
- Design mode (upstream): Adopt the primary actor's profile under stressful field conditions, applying bimodal discrimination (strict MVP core vs. roadmap suggestion backlog in \`templates/product/user-design-feedback.template.md\`).
|
|
14977
|
+
- Design mode (upstream): Adopt the primary actor's profile under stressful field conditions, applying bimodal discrimination (strict MVP core vs. roadmap suggestion backlog in \`templates/product/user-design-feedback.template.md\`). Reject as \`[BLOCKING_DEFECT]\` any library-only MVP proposal for human actors that fails to define or omits the runnable presentation layer (Web, Desktop, or Console/CLI), role access, or master-data CRUD flows.
|
|
14895
14978
|
- Functional validation mode (downstream / pre-PR / post-development functional validation): Thoroughly contrast interface and actual CLI execution against \`UC-*\` and \`FR-*\` acceptance criteria before pre-merge security audit.
|
|
14896
14979
|
- Emit handoff block suggesting \`agent-code-reviewer\` / \`agent-security-auditor\` / \`agent-privacy-officer\` if compliant, or return to \`agent-developer\` on functional drift.
|
|
14897
14980
|
|
|
@@ -14977,7 +15060,7 @@ Before finalizing changes or proposing commits:
|
|
|
14977
15060
|
## 4. Specialized Roles Mapping
|
|
14978
15061
|
| Role | Mission (summary) |
|
|
14979
15062
|
| :--- | :--- |
|
|
14980
|
-
| \`agent-product-analyst\` | Phase 0 NAF v4 Enterprise & Capability Vision (\`ARCH-INTRO-*\`,
|
|
15063
|
+
| \`agent-product-analyst\` | Phase 0 NAF v4 Enterprise & Capability Vision (\`ARCH-INTRO-*\`, up to 15-question discovery interview defining UI modality & CRUD prerequisites) + ProductShape artifacts (\`ACT-*\`, \`UC-*\`, \`FR-*\`, \`QR-*\`, \`BR-*\`); status starts \`draft\`. |
|
|
14981
15064
|
| \`agent-threat-modeler\` | STRIDE/OWASP threat triad (\`ACT-THREAT-*\`, \`ABUSE-*\`, \`SEC-REQ-*\`); hands off to \`agent-privacy-officer\`. |
|
|
14982
15065
|
| \`agent-privacy-officer\` | LINDDUN & GDPR/LOPDGDD privacy triad (\`DATA-ASSET-*\`, \`PRIV-ROPA-*\`, \`PRIV-REQ-*\`) + Pre-Merge \`verify:privacy\`. |
|
|
14983
15066
|
| \`agent-system-architect\` | Modular arc42 + NAF v4 architecture (\`CMP-*\`, Mermaid diagrams, \`ADR-*\`). |
|
|
@@ -15030,7 +15113,7 @@ Every generated or modified artifact must follow canonical naming and satisfy it
|
|
|
15030
15113
|
- Privacy Requirements: \`PRIV-REQ-[SUFFIX]\` (\`schemas/privacy/privacy-req.schema.json\`)
|
|
15031
15114
|
|
|
15032
15115
|
## 2. "AI as Scribe" Protocol Rules
|
|
15033
|
-
- **Phase 0 (New Product Inception)**: When starting a new product, conduct
|
|
15116
|
+
- **Phase 0 (New Product Inception)**: When starting a new product, conduct an iterative discovery interview of up to 15 questions (or until the product scope and target UI modality \u2014 Web, Desktop, Console/CLI, Mobile, or API/SDK \u2014 are completely clear), instantiate \`ARCH-INTRO-001\` (\`naf-perspective: "Enterprise & Capability"\`) in \`draft\`, and derive \`ACT-*\`, \`UC-*\`, \`BR-*\`, \`FR-*\`, and \`QR-*\` (including runnable UI/CLI requirements and master-entity CRUD prerequisites when human actors exist).
|
|
15034
15117
|
- **Initial Status**: Every new artifact strictly starts with \`status: draft\`. Creating artifacts directly as \`active\` or \`approved\` is forbidden.
|
|
15035
15118
|
- **Gherkin Acceptance Criteria**: In every \`FR-*\` requirement, include a \`\`\`gherkin block with tags \`@<ID> @automated @regression\` and at least one \`Scenario Outline\` with an \`Examples\` data table.
|
|
15036
15119
|
- **Security & Privacy Mitigations**: Every \`SEC-REQ-*\` must include negative Gherkin tests (\`@security @mitigation\`) and every \`PRIV-REQ-*\` must include Gherkin privacy scenarios (\`@privacy @gdpr\`).
|
|
@@ -15116,10 +15199,10 @@ npx tsx packages/cli/src/index.ts sdd integrate --change <chg-id>
|
|
|
15116
15199
|
|
|
15117
15200
|
### 1. \`agent-product-analyst\` (Product Analyst / Scribe)
|
|
15118
15201
|
- **Mission**: Capture new product intent via NAF v4 Enterprise & Capability Vision (\`ARCH-INTRO-*\`) and define/refine the product model using ProductShape.
|
|
15119
|
-
- **Phase 0 (Greenfield Product Inception)**: When creating a new product from scratch (or when \`specs/product/\` has no baseline), run
|
|
15202
|
+
- **Phase 0 (Greenfield Product Inception)**: When creating a new product from scratch (or when \`specs/product/\` has no baseline), run an iterative discovery interview of **up to 15 questions (or until the product scope is 100% clear and unambiguous)** covering: mission/problem, actors \`ACT-*\`, role/auth model, **target UI/interaction modality (Web UI, Desktop GUI, Console/TUI/CLI, Mobile, or API/SDK)**, master-data CRUD prerequisites, MVP capabilities \`UC-*\`, business rules \`BR-*\`, and priority quality goals \`QR-*\`; then draft \`ARCH-INTRO-001\` (\`templates/architecture/introduction-and-goals.template.md\`), and derive initial \`ACT-*\`, \`UC-*\`, \`BR-*\`, \`FR-*\`, and \`QR-*\` drafts.
|
|
15120
15203
|
- **Input**: Business intent or natural language specification.
|
|
15121
15204
|
- **Output**: Markdown artifacts with YAML frontmatter compliant with \`schemas/architecture/introduction-and-goals.schema.json\` (\`ARCH-INTRO-*\`) and \`schemas/product/\` (\`ACT-*\`, \`UC-*\`, \`FR-*\`, \`QR-*\`, \`BR-*\`).
|
|
15122
|
-
- **Guardrails**: \`status\` always starts in \`draft\`. Mandatory Gherkin criteria with \`@<ID> @automated @regression\`.
|
|
15205
|
+
- **Guardrails**: \`status\` always starts in \`draft\`. Library-only MVPs without the agreed runnable UI/CLI entry point and master-data CRUDs for human actors are forbidden. Mandatory Gherkin criteria with \`@<ID> @automated @regression\`.
|
|
15123
15206
|
|
|
15124
15207
|
### 2. \`agent-threat-modeler\` (Threat Modeler and Security Specialist)
|
|
15125
15208
|
- **Mission**: Analyze use cases and proactively model adversaries, STRIDE attack vectors, and OWASP ASVS mitigations, both at product level and in the technical security feedback loop over architecture, handing off to \`agent-privacy-officer\`.
|
|
@@ -15291,7 +15374,7 @@ Non-Negotiable Quality Thresholds (\`quality-policy.yaml\`):
|
|
|
15291
15374
|
|
|
15292
15375
|
| Role | Mission (summary) |
|
|
15293
15376
|
| :--- | :--- |
|
|
15294
|
-
| \`agent-product-analyst\` | Phase 0 NAF v4 Enterprise & Capability Vision (\`ARCH-INTRO-*\`,
|
|
15377
|
+
| \`agent-product-analyst\` | Phase 0 NAF v4 Enterprise & Capability Vision (\`ARCH-INTRO-*\`, up to 15-question discovery interview defining UI modality & CRUD prerequisites) + ProductShape artifacts (\`ACT-*\`, \`UC-*\`, \`FR-*\`, \`QR-*\`, \`BR-*\`); \`status\` starts \`draft\`. |
|
|
15295
15378
|
| \`agent-threat-modeler\` | STRIDE/OWASP threat triad (\`ACT-THREAT-*\`, \`ABUSE-*\`, \`SEC-REQ-*\`); hands off to \`agent-privacy-officer\`. |
|
|
15296
15379
|
| \`agent-privacy-officer\` | LINDDUN & GDPR/LOPDGDD privacy triad (\`DATA-ASSET-*\`, \`PRIV-ROPA-*\`, \`PRIV-REQ-*\`) + Pre-Merge \`verify:privacy\`. |
|
|
15297
15380
|
| \`agent-system-architect\` | Modular arc42 + NAF v4 architecture (\`CMP-*\`, Mermaid diagrams, \`ADR-*\`). |
|
|
@@ -18686,6 +18769,7 @@ exports.evaluateCompoundLicense = evaluateCompoundLicense;
|
|
|
18686
18769
|
exports.evaluateSingleDependency = evaluateSingleDependency;
|
|
18687
18770
|
exports.evaluateVulnerabilityThresholds = evaluateVulnerabilityThresholds;
|
|
18688
18771
|
exports.executeBddFeature = executeBddFeature;
|
|
18772
|
+
exports.extractAllRepoCommitKpis = extractAllRepoCommitKpis;
|
|
18689
18773
|
exports.extractBaselineEntriesFromResults = extractBaselineEntriesFromResults;
|
|
18690
18774
|
exports.extractCitations = extractCitations;
|
|
18691
18775
|
exports.extractCommitKpisFromRange = extractCommitKpisFromRange;
|