@aisdlc/core 2.2.0 → 2.2.1

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 CHANGED
@@ -12838,6 +12838,7 @@ var SPECIALIZED_AGENT_TEMPLATES = [
12838
12838
 
12839
12839
  ## Operational Directives & Guardrails
12840
12840
  - 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\`.
12841
+ - **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).
12841
12842
  - **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.
12842
12843
  - Generate interaction and sequence diagrams in native Mermaid syntax.
12843
12844
  - Document critical technological decisions using immutable \`ADR-*\` records conforming to \`schemas/architecture/adr.schema.json\`.
@@ -12885,7 +12886,7 @@ var SPECIALIZED_AGENT_TEMPLATES = [
12885
12886
 
12886
12887
  ## Mandatory 4-Step Implementation Order
12887
12888
  Execute every implementation task following this strict sequential order:
12888
- 1. **Clean Architecture Definition / Redefinition**: Define or refine the module/layer architecture adhering to Clean Architecture patterns (Domain/Entities, Application/Use Cases, Interface Adapters, Frameworks/Drivers), strictly enforcing the Dependency Rule (dependencies point inward toward the domain).
12889
+ 1. **Modular & Hexagonal Architecture (Ports & Adapters) Definition / Redefinition**: Define or refine the module structure organized by Bounded Context (\`BC-*\`) or Vertical Slice (\`UC-*\`) adhering to Hexagonal Architecture (Ports & Adapters \u2014 isolating the pure Domain/Application Core from Inbound/Outbound Adapters and Frameworks/Drivers), strictly enforcing the Dependency Rule (dependencies point inward toward the Core; avoid speculative empty layers per YAGNI).
12889
12890
  2. **Inter-Module Interfaces First**: Define explicit interfaces/ports (contracts, DTOs, types) for all interactions across module boundaries before writing concrete logic, avoiding direct coupling between modules.
12890
12891
  3. **Component Implementation**: Implement the concrete components, use cases, and adapters that implement and consume the defined interfaces.
12891
12892
  4. **Exhaustive Per-Function Unit Testing**: Write unit tests for every function in \`tests/unit/\`, always verifying:
@@ -13164,7 +13165,7 @@ Use this skill for **every evolutionary increment (new feature, enhancement, ref
13164
13165
  ### Step 2: SDD Change Scaffolding & Architectural Design (\`agent-system-architect\`)
13165
13166
  1. Scaffold the bounded change package and its cryptographic \`handoff.yaml\` sidecar (\`HOF-*\`) targeting **a single Use Case (\`1 UC-* = 1 CHG-*\`)** using MCP tool \`sdd_change_new\` (or CLI \`npx aisdlc change new "<Title>" --from <UC-ID> --profile <patch|standard|critical>\`).
13166
13167
  2. Use [\`agent-system-architect\`](../agent-system-architect/SKILL.md) to complete \`specs/changes/active/<chg-id>/design.md\` and \`specs/architecture/CMP-*.md\`:
13167
- - Define **Contract-First** shared interfaces/DTOs/schemas when spanning Frontend and Backend.
13168
+ - 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.
13168
13169
  - 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\`).
13169
13170
  3. Run \`verify_governance\` and \`verify_friction\` to validate task governance, 100% design/handoff scope coverage, and anti-monolith limits (\`maxUseCasesPerChange = 1\`).
13170
13171
 
@@ -13184,7 +13185,7 @@ Use this skill for **every evolutionary increment (new feature, enhancement, ref
13184
13185
  ### Step 5: Green & Refactor Phase \u2014 Surgical Implementation (\`agent-developer\`)
13185
13186
  1. Delegate to or adopt [\`agent-developer\`](../agent-developer/SKILL.md).
13186
13187
  2. Execute the **Mandatory 4-Step Implementation Order**:
13187
- - (1) Clean Architecture boundaries, (2) Inter-module interfaces 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).
13188
+ - (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).
13188
13189
  3. Verify any new dependency against \`license-policy.yaml\` via \`verify_licenses\` and PII handling against \`privacy-policy.yaml\` via \`verify_privacy\`.
13189
13190
  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.
13190
13191
 
@@ -13275,7 +13276,7 @@ This file defines the operational rules and specialized role mappings for Google
13275
13276
  - **Mission**: Translate the approved product definition into a modular technical architecture based on arc42 enriched with NAF v4.
13276
13277
  - **Output**: Architecture components (\`CMP-*\`), Mermaid diagrams, and immutable \`ADR-*\` records compliant with \`schemas/architecture/\`.
13277
13278
  - **Guardrails**:
13278
- - Every \`CMP-*\` must declare \`satisfies-requirements\` linking \`FR-*\`, \`QR-*\`, \`SEC-REQ-*\`, and \`PRIV-REQ-*\`.
13279
+ - 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).
13279
13280
  - 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.
13280
13281
 
13281
13282
  ### 5. \`agent-qa-engineer\` (QA Engineer and SDET)
@@ -13294,7 +13295,7 @@ This file defines the operational rules and specialized role mappings for Google
13294
13295
  ### 6. \`agent-developer\` (Software Developer)
13295
13296
  - **Mission**: Implement atomic tasks from SDD specifications (\`tasks.md\`) with clean, strictly typed code and thorough tests.
13296
13297
  - **Directives**:
13297
- - **Mandatory 4-Step Implementation Order**: (1) Define/refine Clean Architecture layers & boundaries, (2) Define interfaces/ports for all inter-module interactions to avoid direct module coupling, (3) Implement components consuming/fulfilling those interfaces, (4) Write unit tests for every function covering Happy Path, Sad Path, Boundary Values, and Unexpected/Null/Empty values.
13298
+ - **Mandatory 4-Step Implementation Order**: (1) Define/refine Modular & Hexagonal Architecture (Ports & Adapters) module boundaries, (2) Define interfaces/ports for all inter-module interactions to avoid direct module coupling, (3) Implement components consuming/fulfilling those interfaces, (4) Write unit tests for every function covering Happy Path, Sad Path, Boundary Values, and Unexpected/Null/Empty values.
13298
13299
  - Respect the autonomy mode assigned in \`tasks.md\` (\`AUTONOMOUS\`, \`HUMAN_REVIEW_PLAN\`, \`AMBIGUOUS\`, \`HIGH_RISK_MANUAL\`).
13299
13300
  - Make tests delivered by \`agent-qa-engineer\` pass green without altering them to accommodate code.
13300
13301
  - Respect \`quality-policy.yaml\` thresholds: CC $\\le 10$, Cognitive $\\le 15$, MI $\\ge 50$, LOC $\\le 40$.
@@ -13464,8 +13465,8 @@ Canonical Reference: [\`process/09_agent_protocols.md\`](process/09_agent_protoc
13464
13465
  - **Function Length**: $\\le 40$ lines (warning if $> 30$).
13465
13466
  - If a function exceeds these limits, decompose logic into cohesive helper functions before completing the task.
13466
13467
 
13467
- ## 2. TDD Methodology, Clean Architecture & Unit Testing
13468
- - **Mandatory 4-Step Implementation Order**: (1) Define/refine Clean Architecture layers & boundaries, (2) Define interfaces/ports for all inter-module interactions to avoid direct module coupling, (3) Implement components consuming/fulfilling those interfaces, (4) Write unit tests for every function covering Happy Path, Sad Path, Boundary Values, and Unexpected/Null/Empty values.
13468
+ ## 2. TDD Methodology, Modular & Hexagonal Architecture (Ports & Adapters) & Unit Testing
13469
+ - **Mandatory 4-Step Implementation Order**: (1) Define/refine Modular & Hexagonal Architecture (Ports & Adapters) module boundaries, (2) Define interfaces/ports for all inter-module interactions to avoid direct module coupling, (3) Implement components consuming/fulfilling those interfaces, (4) Write unit tests for every function covering Happy Path, Sad Path, Boundary Values, and Unexpected/Null/Empty values.
13469
13470
  - Apply Test-Driven Development: generate unit tests before or alongside component logic.
13470
13471
  - Tag tests linked to requirements with header comments citing the ID (\`FR-*\`, \`SEC-REQ-*\`, or \`PRIV-REQ-*\`) to enable reverse traceability.
13471
13472
  - Suppressing types (\`any\`), linter rules (\`eslint-disable\`), or unit tests to force pipeline passage is prohibited.
@@ -13539,7 +13540,7 @@ npx tsx packages/cli/src/index.ts sdd integrate --change <chg-id>
13539
13540
 
13540
13541
  ### 4. \`agent-system-architect\` (System Architect)
13541
13542
  - **Mission**: Translate the approved product definition into a modular technical architecture based on arc42 enriched with NAF v4 (\`CMP-*\`, Mermaid diagrams, \`ADR-*\`).
13542
- - **Guardrails**: Declare \`satisfies-requirements\` on every \`CMP-*\` (including \`PRIV-REQ-*\`), instantiate mandatory building block \`CMP-OBSERVABILITY\` (Level 2/3) alongside Section 8 and an ADR for runtime telemetry, and trigger the technical security/privacy feedback loop toward \`agent-threat-modeler\` \u2794 \`agent-privacy-officer\` when infrastructure decisions introduce new attack vectors or PII flows.
13543
+ - **Guardrails**: Declare \`satisfies-requirements\` on every \`CMP-*\` (including \`PRIV-REQ-*\`), structure components following **Modular & Hexagonal Architecture (Ports & Adapters)** (Domain/Application Core + Inbound/Outbound Ports), instantiate mandatory building block \`CMP-OBSERVABILITY\` (Level 2/3) alongside Section 8 and an ADR for runtime telemetry, and trigger the technical security/privacy feedback loop toward \`agent-threat-modeler\` \u2794 \`agent-privacy-officer\` when infrastructure decisions introduce new attack vectors or PII flows.
13543
13544
 
13544
13545
  ### 5. \`agent-qa-engineer\` (QA Engineer and SDET)
13545
13546
  - **Mission**: Translate approved requirements (\`FR-*\`, \`SEC-REQ-*\`, \`PRIV-REQ-*\`, \`QR-*\`) into comprehensive FAILING (red) BDD/Gherkin, End-to-End (E2E), UI, and unit test suites, before \`agent-developer\` writes production code.
@@ -13547,7 +13548,7 @@ npx tsx packages/cli/src/index.ts sdd integrate --change <chg-id>
13547
13548
 
13548
13549
  ### 6. \`agent-developer\` (Software Developer)
13549
13550
  - **Mission**: Implement atomic tasks from SDD specifications (\`tasks.md\`) with clean, strictly typed code and thorough tests.
13550
- - **Directives**: Execute the mandatory 4-step order: (1) Clean Architecture definition/redefinition, (2) Inter-module interfaces first, (3) Component implementation, (4) Per-function unit tests (Happy Path, Sad Path, Boundary Values, Unexpected/Null/Empty values). Respect the autonomy mode. Make tests delivered by \`agent-qa-engineer\` pass green. Run \`pnpm run check:fix\` and \`pnpm run verify:all\`.
13551
+ - **Directives**: Execute the mandatory 4-step order: (1) Modular & Hexagonal Architecture (Ports & Adapters) definition/redefinition, (2) Inter-module interfaces first, (3) Component implementation, (4) Per-function unit tests (Happy Path, Sad Path, Boundary Values, Unexpected/Null/Empty values). Respect the autonomy mode. Make tests delivered by \`agent-qa-engineer\` pass green. Run \`pnpm run check:fix\` and \`pnpm run verify:all\`.
13551
13552
 
13552
13553
  ### 7. \`agent-security-auditor\` (Adversarial Code Auditor)
13553
13554
  - **Mission**: Examine Pull Requests for business logic vulnerabilities, injection vectors, secret leaks, and authorization flaws as part of the Pre-Merge Audit Triad.