azcodr 1.3.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/.agents/hooks.json.example +42 -0
  2. package/.agents/mcp_config.json.example +24 -0
  3. package/.agents/scripts/safety_guard.sh +16 -0
  4. package/.agents/scripts/verify_completion.sh +13 -0
  5. package/.agents/skills/agentic-architect/SKILL.md +15 -8
  6. package/.agents/skills/agentic-architect/references/agents_md_template.md +6 -3
  7. package/.agents/skills/agentic-architect/references/skill_architecture_inquiry.md +1 -1
  8. package/.agents/skills/agentic-architect/references/skill_template.md +2 -1
  9. package/.agents/skills/agentic-architect/scripts/validate_agentic_configs.sh +189 -6
  10. package/.agents/skills/clean-code-refactor/SKILL.md +6 -6
  11. package/.agents/skills/compliance-audit/SKILL.md +1 -1
  12. package/.agents/skills/lets-build/SKILL.md +22 -7
  13. package/.agents/skills/lets-build/references/architecture_interview_matrix.md +8 -2
  14. package/.agents/skills/lets-build/references/hexagonal_bootstrap_scaffolds.md +53 -6
  15. package/.agents/skills/lets-build/references/project_readme_template.md +4 -4
  16. package/.agents/skills/lets-build/scripts/bootstrap_workspace.sh +181 -36
  17. package/.agents/skills/product-analyst/SKILL.md +13 -2
  18. package/.agents/skills/relentless-questioner/SKILL.md +13 -5
  19. package/.agents/skills/relentless-questioner/references/adaptive_question_trees.md +18 -0
  20. package/.gitignore +2 -0
  21. package/AGENTS.md +25 -40
  22. package/README.md +27 -40
  23. package/bin/azcodr.js +9 -4
  24. package/docs/rules/agentic_configuration.md +123 -32
  25. package/docs/rules/api_architecture.md +179 -0
  26. package/docs/rules/caching.md +30 -13
  27. package/docs/rules/cloud_native.md +10 -12
  28. package/docs/rules/cqrs.md +203 -0
  29. package/docs/rules/database_design.md +125 -0
  30. package/docs/rules/database_operations.md +56 -14
  31. package/docs/rules/design_patterns.md +18 -11
  32. package/docs/rules/devops_ci_cd.md +76 -0
  33. package/docs/rules/domain_driven_design.md +17 -13
  34. package/docs/rules/feature_flags.md +21 -4
  35. package/docs/rules/frontend_architecture.md +157 -0
  36. package/docs/rules/multitenancy_architecture.md +98 -0
  37. package/docs/rules/product_ownership.md +22 -27
  38. package/docs/rules/relentless_questioning.md +4 -0
  39. package/docs/rules/requirements_engineering.md +16 -14
  40. package/docs/rules/security_compliance.md +53 -0
  41. package/docs/rules/server_driven_ui.md +20 -3
  42. package/docs/rules/test_driven_development.md +119 -62
  43. package/docs/rules/type_safety.md +65 -0
  44. package/docs/rules/ui_ux_architecture.md +33 -30
  45. package/docs/rules/workflow_state_machines.md +20 -3
  46. package/lib/scaffold.js +117 -5
  47. package/memory.md +12 -131
  48. package/package.json +2 -2
  49. package/docs/rules/accessibility.md +0 -31
  50. package/docs/rules/advanced_api_patterns.md +0 -104
  51. package/docs/rules/api_versioning.md +0 -113
  52. package/docs/rules/application_security.md +0 -23
  53. package/docs/rules/architecture_decision_records.md +0 -42
  54. package/docs/rules/compliance.md +0 -25
  55. package/docs/rules/container_infrastructure.md +0 -32
  56. package/docs/rules/continuous_deployment.md +0 -24
  57. package/docs/rules/continuous_integration.md +0 -20
  58. package/docs/rules/continuous_learning.md +0 -29
  59. package/docs/rules/database_integrity.md +0 -80
  60. package/docs/rules/database_migrations.md +0 -41
  61. package/docs/rules/database_performance.md +0 -44
  62. package/docs/rules/database_transactions.md +0 -81
  63. package/docs/rules/devsecops.md +0 -33
  64. package/docs/rules/multitenancy_isolation.md +0 -88
  65. package/docs/rules/react.md +0 -78
  66. package/docs/rules/rest_api_conventions.md +0 -46
  67. package/docs/rules/tenant_dynamic_schemas.md +0 -88
  68. package/docs/rules/tenant_pluggable_logic.md +0 -59
  69. package/docs/rules/test_isolation.md +0 -26
  70. package/docs/rules/typescript.md +0 -55
  71. package/docs/rules/ui_navigation.md +0 -20
  72. package/docs/rules/workspace_isolation.md +0 -25
@@ -6,20 +6,29 @@
6
6
 
7
7
  ## 1. Universal Directory Topology
8
8
 
9
- Regardless of language, all bootstrapped projects must follow this high-level separation:
9
+ Depending on whether the project target is a **Fullstack Web SaaS** (Frontend + Backend) or a **Headless Service** (API only), projects follow these standard layouts:
10
10
 
11
+ ### Fullstack Web SaaS Topology (Web Frontend + Hexagonal Backend)
11
12
  ```
12
13
  <project-root>/
13
14
  ├── .agents/skills/ # Specialized agentic workflows (carried from azcodr template)
14
15
  ├── docs/
15
16
  │ ├── knowledge/ # Domain knowledge & living ubiquitous language glossary
16
- │ └── rules/ # 41 atomic single-responsibility domain rules
17
+ │ └── rules/ # 28 cohesive single-responsibility domain rules
17
18
  ├── specs/ # Canonical contract specifications
18
- │ ├── protobuf/ # gRPC service definitions (*.proto)
19
19
  │ ├── openapi/ # OpenAPI 3.1 REST specifications (*.yaml)
20
20
  │ ├── schemas/ # Universal JSON Schema Draft 2020-12 (*.json)
21
21
  │ └── tokens/ # W3C DTCG Design Tokens (tokens.json)
22
- ├── src/ # Application source code
22
+ ├── client/ # Web Frontend Application (Vite + React / SPA)
23
+ │ ├── src/
24
+ │ │ ├── components/
25
+ │ │ │ ├── layout/ # Persistent Shell (Sidebar, Header, Breadcrumbs)
26
+ │ │ │ └── ui/ # Accessible Headless Primitives (Radix / shadcn)
27
+ │ │ ├── pages/ # Dynamic Canvas Route Views
28
+ │ │ ├── hooks/ # Server-State Cache & URL State Synchronization
29
+ │ │ └── services/ # Inbound API Client Adapters
30
+ │ └── public/ # Static web assets
31
+ ├── src/ # Backend Application (Hexagonal Architecture)
23
32
  │ ├── domain/ # Core Invariant Domain (Entities, Value Objects, Invariants)
24
33
  │ ├── ports/ # Primary (driving) and Secondary (driven) Ports
25
34
  │ │ ├── primary/ # Inbound Use Cases, Commands, and Queries
@@ -31,6 +40,7 @@ Regardless of language, all bootstrapped projects must follow this high-level se
31
40
  │ ├── unit/ # Fast unit tests using test doubles
32
41
  │ ├── integration/ # Adapter integration tests with transactional rollback
33
42
  │ ├── contracts/ # Pact / OpenAPI contract verification
43
+ │ ├── client/ # Frontend component and interaction tests
34
44
  │ └── acceptance/ # BDD Gherkin / Cucumber end-to-end features
35
45
  ├── deploy/ # Deployment & Infrastructure as Code
36
46
  │ ├── docker/ # Minimal OCI Distroless/Scratch Dockerfiles
@@ -43,10 +53,46 @@ Regardless of language, all bootstrapped projects must follow this high-level se
43
53
  └── README.md # Project documentation
44
54
  ```
45
55
 
56
+ ### Headless Service Topology (Backend API Only)
57
+ ```
58
+ <project-root>/
59
+ ├── .agents/skills/ # Specialized agentic workflows
60
+ ├── docs/ # Domain knowledge & 28 domain rules
61
+ ├── specs/ # OpenAPI 3.1 & Schema contracts
62
+ ├── src/ # Domain, Ports, Adapters
63
+ ├── tests/ # Unit, Integration, Contracts, Acceptance
64
+ ├── deploy/ # Docker, Compose
65
+ ├── AGENTS.md
66
+ └── memory.md
67
+ ```
68
+
46
69
  ---
47
70
 
48
71
  ## 2. Language-Specific Source Layouts
49
72
 
73
+ ### TypeScript Fullstack Scaffold (`client/` + `src/` via `package.json` / `pnpm`)
74
+ ```
75
+ client/ # Web Frontend (Vite + React / Vue / Svelte)
76
+ ├── src/
77
+ │ ├── components/
78
+ │ │ ├── layout/ # Persistent App Shell (Header, Collapsible Sidebar)
79
+ │ │ └── ui/ # Accessible Headless Primitives (Radix / shadcn)
80
+ │ ├── pages/ # Dynamic Canvas Route Views
81
+ │ ├── hooks/ # Server-State Cache & URL State Synchronization
82
+ │ └── services/ # Inbound API Client Adapters
83
+ └── public/
84
+ src/ # Core Backend (Hexagonal Ports & Adapters)
85
+ ├── domain/
86
+ │ ├── entities/user.ts
87
+ │ └── value-objects/tenant-id.ts
88
+ ├── ports/
89
+ │ ├── primary/create-user.usecase.ts
90
+ │ └── secondary/user-repository.port.ts
91
+ └── adapters/
92
+ ├── primary/fastify-router.ts
93
+ └── secondary/kysely-user-repository.ts
94
+ ```
95
+
50
96
  ### Go Scaffold (`go.mod`)
51
97
  ```
52
98
  src/
@@ -89,7 +135,7 @@ src/
89
135
  └── secondary/asyncpg_repository.py
90
136
  ```
91
137
 
92
- ### TypeScript Scaffold (`package.json` / `pnpm`)
138
+ ### TypeScript Backend-Only Scaffold (`package.json` / `pnpm`)
93
139
  ```
94
140
  src/
95
141
  ├── domain/
@@ -107,7 +153,8 @@ src/
107
153
 
108
154
  ## 3. Foundational Scaffold Invariants
109
155
 
110
- 1. **Domain Isolation**: Code in `src/domain/` must have **zero imports** from `src/adapters/`, external web frameworks, or database drivers.
156
+ 1. **Domain Isolation**: Code in `src/domain/` must have **zero imports** from `src/adapters/`, `client/`, external web frameworks, or database drivers.
111
157
  2. **Ports as Pure Contracts**: Code in `src/ports/` contains abstract interfaces, Command DTOs, Query DTOs, and Result containers.
112
158
  3. **Adapters Depend on Ports**: `src/adapters/` implements ports defined in `src/ports/`. Adapters never depend directly on other adapters.
113
159
  4. **Contract-First Synchronization**: Whenever an API or event interface changes, the canonical contract in `specs/` must be updated and validated before adapter code is generated or modified.
160
+ 5. **Frontend Decoupling via Contract**: The frontend in `client/` consumes backend driving ports strictly via canonical OpenAPI contracts (`specs/openapi`) and W3C Design Tokens (`specs/tokens/tokens.json`). It follows the 7-Pillar Design Architecture Triage Gate ([docs/rules/ui_ux_architecture.md](../../../../docs/rules/ui_ux_architecture.md)) and accessible headless primitives ([docs/rules/frontend_architecture.md](../../../../docs/rules/frontend_architecture.md)).
@@ -37,7 +37,7 @@
37
37
  │ ├── contracts/ # Consumer contract tests (Pact)
38
38
  │ └── acceptance/ # BDD Gherkin / Cucumber features
39
39
  ├── deploy/ # OCI Distroless Dockerfiles & Compose manifests
40
- ├── docs/rules/ # 41 atomic single-responsibility architectural rules
40
+ ├── docs/rules/ # 28 cohesive single-responsibility architectural rules
41
41
  ├── memory.md # Master memory hub & Lightweight ADR ledger
42
42
  └── AGENTS.md # Lean agentic directives (< 120 lines)
43
43
  ```
@@ -74,6 +74,6 @@ cp .env.example .env
74
74
 
75
75
  ## 🏛️ Architecture Governance & Decisions
76
76
 
77
- This project is governed by the **41 Atomic Domain Rules** located in [`docs/rules/`](./docs/rules/) and Architectural Decision Records in [`memory.md`](./memory.md):
78
- - **ADR Ledger:** See [`memory.md`](./memory.md) for ADR-001 through ADR-006.
79
- - **Architectural Rules:** See [`docs/rules/`](./docs/rules/) for TDD, Clean Code, Multi-Tenancy, Database Integrity, and DevSecOps directives.
77
+ This project is governed by the **28 Cohesive Domain Rules** located in `docs/rules/` and Architectural Decision Records in `memory.md`:
78
+ - **ADR Ledger:** See `memory.md` for project-specific Architectural Decision Records.
79
+ - **Architectural Rules:** See `docs/rules/` for TDD, Clean Code, Multi-Tenancy, Database Design, and DevSecOps directives.
@@ -15,66 +15,129 @@ echo "🏗️ Target Topology: ${TOPOLOGY}"
15
15
  echo "📦 Target Language Profile: ${LANGUAGE}"
16
16
  echo "--------------------------------------------------------------"
17
17
 
18
+ # Helper to create leaf directory with .gitkeep to ensure Git tracks empty structures
19
+ create_leaf() {
20
+ local dir="$1"
21
+ mkdir -p "${dir}"
22
+ if [[ -z "$(ls -A "${dir}" 2>/dev/null)" ]]; then
23
+ touch "${dir}/.gitkeep"
24
+ fi
25
+ }
26
+
18
27
  case "${TOPOLOGY}" in
19
28
  extension)
20
29
  echo "1. Scaffolding Browser Extension Source Tree (src/)..."
21
- mkdir -p "${WORKSPACE_ROOT}/src/background"
22
- mkdir -p "${WORKSPACE_ROOT}/src/content"
23
- mkdir -p "${WORKSPACE_ROOT}/src/popup"
24
- mkdir -p "${WORKSPACE_ROOT}/src/shared"
25
- mkdir -p "${WORKSPACE_ROOT}/public"
30
+ create_leaf "${WORKSPACE_ROOT}/src/background"
31
+ create_leaf "${WORKSPACE_ROOT}/src/content"
32
+ create_leaf "${WORKSPACE_ROOT}/src/popup"
33
+ create_leaf "${WORKSPACE_ROOT}/src/shared"
34
+ create_leaf "${WORKSPACE_ROOT}/public"
26
35
 
27
36
  echo "2. Scaffolding Extension Test Suites (tests/)..."
28
- mkdir -p "${WORKSPACE_ROOT}/tests/unit"
29
- mkdir -p "${WORKSPACE_ROOT}/tests/e2e"
37
+ create_leaf "${WORKSPACE_ROOT}/tests/unit"
38
+ create_leaf "${WORKSPACE_ROOT}/tests/e2e"
30
39
  ;;
31
40
 
32
41
  game|engine)
33
42
  echo "1. Scaffolding Game/Engine Source Tree (src/)..."
34
- mkdir -p "${WORKSPACE_ROOT}/src/core"
35
- mkdir -p "${WORKSPACE_ROOT}/src/ecs"
36
- mkdir -p "${WORKSPACE_ROOT}/src/renderer"
37
- mkdir -p "${WORKSPACE_ROOT}/src/assets"
43
+ create_leaf "${WORKSPACE_ROOT}/src/core"
44
+ create_leaf "${WORKSPACE_ROOT}/src/ecs"
45
+ create_leaf "${WORKSPACE_ROOT}/src/renderer"
46
+ create_leaf "${WORKSPACE_ROOT}/src/assets"
38
47
 
39
48
  echo "2. Scaffolding Game/Engine Test Suites (tests/)..."
40
- mkdir -p "${WORKSPACE_ROOT}/tests/unit"
41
- mkdir -p "${WORKSPACE_ROOT}/tests/benchmarks"
49
+ create_leaf "${WORKSPACE_ROOT}/tests/unit"
50
+ create_leaf "${WORKSPACE_ROOT}/tests/benchmarks"
42
51
  ;;
43
52
 
44
53
  cli)
45
54
  echo "1. Scaffolding CLI Source Tree (src/)..."
46
- mkdir -p "${WORKSPACE_ROOT}/src/cmd"
47
- mkdir -p "${WORKSPACE_ROOT}/src/core"
48
- mkdir -p "${WORKSPACE_ROOT}/src/io"
55
+ create_leaf "${WORKSPACE_ROOT}/src/cmd"
56
+ create_leaf "${WORKSPACE_ROOT}/src/core"
57
+ create_leaf "${WORKSPACE_ROOT}/src/io"
49
58
 
50
59
  echo "2. Scaffolding CLI Test Suites (tests/)..."
51
- mkdir -p "${WORKSPACE_ROOT}/tests/unit"
52
- mkdir -p "${WORKSPACE_ROOT}/tests/integration"
60
+ create_leaf "${WORKSPACE_ROOT}/tests/unit"
61
+ create_leaf "${WORKSPACE_ROOT}/tests/integration"
53
62
  ;;
54
63
 
55
- backend|web|saas)
64
+ web|saas|fullstack)
56
65
  echo "1. Scaffolding Backend / Enterprise Source Tree (src/)..."
57
- mkdir -p "${WORKSPACE_ROOT}/src/domain/entities"
58
- mkdir -p "${WORKSPACE_ROOT}/src/domain/value_objects"
59
- mkdir -p "${WORKSPACE_ROOT}/src/domain/services"
60
- mkdir -p "${WORKSPACE_ROOT}/src/ports/primary"
61
- mkdir -p "${WORKSPACE_ROOT}/src/ports/secondary"
62
- mkdir -p "${WORKSPACE_ROOT}/src/adapters/primary"
63
- mkdir -p "${WORKSPACE_ROOT}/src/adapters/secondary"
66
+ create_leaf "${WORKSPACE_ROOT}/src/domain/entities"
67
+ create_leaf "${WORKSPACE_ROOT}/src/domain/value_objects"
68
+ create_leaf "${WORKSPACE_ROOT}/src/domain/services"
69
+ create_leaf "${WORKSPACE_ROOT}/src/ports/primary"
70
+ create_leaf "${WORKSPACE_ROOT}/src/ports/secondary"
71
+ create_leaf "${WORKSPACE_ROOT}/src/adapters/primary"
72
+ create_leaf "${WORKSPACE_ROOT}/src/adapters/secondary"
73
+
74
+ echo "2. Scaffolding Web Frontend Client Source Tree (client/)..."
75
+ create_leaf "${WORKSPACE_ROOT}/client/src/components/layout"
76
+ create_leaf "${WORKSPACE_ROOT}/client/src/components/ui"
77
+ create_leaf "${WORKSPACE_ROOT}/client/src/pages"
78
+ create_leaf "${WORKSPACE_ROOT}/client/src/hooks"
79
+ create_leaf "${WORKSPACE_ROOT}/client/src/services"
80
+ create_leaf "${WORKSPACE_ROOT}/client/public"
81
+
82
+ echo "3. Scaffolding Specifications (specs/)..."
83
+ create_leaf "${WORKSPACE_ROOT}/specs/openapi"
84
+ create_leaf "${WORKSPACE_ROOT}/specs/tokens"
85
+
86
+ echo "4. Scaffolding Fullstack Test Suites (tests/)..."
87
+ create_leaf "${WORKSPACE_ROOT}/tests/unit"
88
+ create_leaf "${WORKSPACE_ROOT}/tests/integration"
89
+ create_leaf "${WORKSPACE_ROOT}/tests/contracts"
90
+ create_leaf "${WORKSPACE_ROOT}/tests/client"
91
+ create_leaf "${WORKSPACE_ROOT}/tests/acceptance"
92
+
93
+ echo "5. Scaffolding Deployment Infrastructure (deploy/)..."
94
+ create_leaf "${WORKSPACE_ROOT}/deploy/docker"
95
+ create_leaf "${WORKSPACE_ROOT}/deploy/compose"
96
+
97
+ TOKEN_SPEC="${WORKSPACE_ROOT}/specs/tokens/tokens.json"
98
+ if [[ ! -f "${TOKEN_SPEC}" ]]; then
99
+ cat << 'EOF' > "${TOKEN_SPEC}"
100
+ {
101
+ "color": {
102
+ "brand": {
103
+ "primary": { "$value": "#2563eb", "$type": "color" },
104
+ "secondary": { "$value": "#475569", "$type": "color" },
105
+ "accent": { "$value": "#f59e0b", "$type": "color" }
106
+ }
107
+ },
108
+ "dimension": {
109
+ "radius": {
110
+ "base": { "$value": "6px", "$type": "dimension" }
111
+ }
112
+ }
113
+ }
114
+ EOF
115
+ fi
116
+ ;;
117
+
118
+ backend)
119
+ echo "1. Scaffolding Headless Backend Source Tree (src/)..."
120
+ create_leaf "${WORKSPACE_ROOT}/src/domain/entities"
121
+ create_leaf "${WORKSPACE_ROOT}/src/domain/value_objects"
122
+ create_leaf "${WORKSPACE_ROOT}/src/domain/services"
123
+ create_leaf "${WORKSPACE_ROOT}/src/ports/primary"
124
+ create_leaf "${WORKSPACE_ROOT}/src/ports/secondary"
125
+ create_leaf "${WORKSPACE_ROOT}/src/adapters/primary"
126
+ create_leaf "${WORKSPACE_ROOT}/src/adapters/secondary"
64
127
 
65
128
  echo "2. Scaffolding Specifications (specs/)..."
66
- mkdir -p "${WORKSPACE_ROOT}/specs/openapi"
67
- mkdir -p "${WORKSPACE_ROOT}/specs/tokens"
129
+ create_leaf "${WORKSPACE_ROOT}/specs/openapi"
130
+ create_leaf "${WORKSPACE_ROOT}/specs/tokens"
68
131
 
69
132
  echo "3. Scaffolding Backend Test Suites (tests/)..."
70
- mkdir -p "${WORKSPACE_ROOT}/tests/unit"
71
- mkdir -p "${WORKSPACE_ROOT}/tests/integration"
72
- mkdir -p "${WORKSPACE_ROOT}/tests/contracts"
73
- mkdir -p "${WORKSPACE_ROOT}/tests/acceptance"
133
+ create_leaf "${WORKSPACE_ROOT}/tests/unit"
134
+ create_leaf "${WORKSPACE_ROOT}/tests/integration"
135
+ create_leaf "${WORKSPACE_ROOT}/tests/contracts"
136
+ create_leaf "${WORKSPACE_ROOT}/tests/acceptance"
74
137
 
75
138
  echo "4. Scaffolding Deployment Infrastructure (deploy/)..."
76
- mkdir -p "${WORKSPACE_ROOT}/deploy/docker"
77
- mkdir -p "${WORKSPACE_ROOT}/deploy/compose"
139
+ create_leaf "${WORKSPACE_ROOT}/deploy/docker"
140
+ create_leaf "${WORKSPACE_ROOT}/deploy/compose"
78
141
 
79
142
  TOKEN_SPEC="${WORKSPACE_ROOT}/specs/tokens/tokens.json"
80
143
  if [[ ! -f "${TOKEN_SPEC}" ]]; then
@@ -97,12 +160,94 @@ EOF
97
160
  fi
98
161
  ;;
99
162
 
163
+ frontend)
164
+ echo "1. Scaffolding Frontend Client Source Tree (src/)..."
165
+ create_leaf "${WORKSPACE_ROOT}/src/components/layout"
166
+ create_leaf "${WORKSPACE_ROOT}/src/components/ui"
167
+ create_leaf "${WORKSPACE_ROOT}/src/pages"
168
+ create_leaf "${WORKSPACE_ROOT}/src/hooks"
169
+ create_leaf "${WORKSPACE_ROOT}/src/services"
170
+ create_leaf "${WORKSPACE_ROOT}/public"
171
+
172
+ echo "2. Scaffolding Specifications (specs/)..."
173
+ create_leaf "${WORKSPACE_ROOT}/specs/tokens"
174
+
175
+ echo "3. Scaffolding Frontend Test Suites (tests/)..."
176
+ create_leaf "${WORKSPACE_ROOT}/tests/unit"
177
+ create_leaf "${WORKSPACE_ROOT}/tests/acceptance"
178
+ ;;
179
+
100
180
  *)
101
181
  echo "1. Scaffolding Generic / Library Source Tree (src/)..."
102
- mkdir -p "${WORKSPACE_ROOT}/src"
103
- mkdir -p "${WORKSPACE_ROOT}/tests/unit"
182
+ create_leaf "${WORKSPACE_ROOT}/src"
183
+ create_leaf "${WORKSPACE_ROOT}/tests/unit"
104
184
  ;;
105
185
  esac
106
186
 
187
+ # Ensure memory.md in fresh projects starts with a clean ADR slate (ADR-001)
188
+ MEMORY_FILE="${WORKSPACE_ROOT}/memory.md"
189
+ if [[ -f "${MEMORY_FILE}" ]]; then
190
+ if grep -qE "ADR-00[2-9]|ADR-0[1-9][0-9]" "${MEMORY_FILE}"; then
191
+ echo "🧹 Sanitizing memory.md: Resetting legacy template ADRs to clean slate (ADR-001)..."
192
+ cat << 'EOF' > "${MEMORY_FILE}"
193
+ # Workspace Memory, Architecture Decisions & Knowledge Hub
194
+
195
+ > **Core Purpose:** Authoritative persistent memory ledger for the workspace repository (`./`), maintaining Lightweight Architectural Decision Records (ADRs), system topologies, and living domain contracts.
196
+
197
+ ---
198
+
199
+ ## 1. Quick Navigation & Knowledge Repositories
200
+
201
+ - 📖 **[Living Ubiquitous Language Glossary](./docs/knowledge/ubiquitous_language.md)**: Authoritative, single-name domain vocabulary contract.
202
+ - 📜 **[Lightweight ADR Master Index](#adr-master-index)**: Summary of all architectural decisions and direct links to governing rules.
203
+
204
+ ---
205
+
206
+ ## 2. Consolidated Architectural Decision Records (ADRs)
207
+
208
+ ### ADR Master Index
209
+
210
+ | ID | Title | Date | Status | Governing Rule / Skill |
211
+ |---|---|---|---|---|
212
+ | *(No decisions recorded yet)* | *Record initial architecture decisions during Phase 3 of /lets-build.* | *YYYY-MM-DD* | *ACCEPTED* | *e.g. [`clean_code.md`](./docs/rules/clean_code.md)* |
213
+
214
+ ---
215
+
216
+ ### Lightweight Decision Summaries
217
+
218
+ <!--
219
+ Record project Architectural Decision Records (ADRs) below as decisions are finalized.
220
+ Format:
221
+
222
+ #### ADR-001: [Imperative Title]
223
+ - **Date:** YYYY-MM-DD | **Status:** ACCEPTED
224
+ - **Context:** Problem space, constraints, and operational context requiring a decision.
225
+ - **Decision:** Chosen architecture, invariants, and implementation patterns.
226
+ - **Consequences:** Positive benefits and deliberate trade-offs accepted.
227
+ - **Enforced In:** Relevant rule files in docs/rules/ or code paths.
228
+ -->
229
+ EOF
230
+ fi
231
+ fi
232
+
233
+ # Deterministically generate boundary verification smoke test script (Phase 5 requirement)
234
+ SMOKE_TEST="${WORKSPACE_ROOT}/scripts/smoke_test.sh"
235
+ if [[ ! -f "${SMOKE_TEST}" ]]; then
236
+ echo "5. Generating boundary smoke test verification script (scripts/smoke_test.sh)..."
237
+ mkdir -p "${WORKSPACE_ROOT}/scripts"
238
+ cat << 'EOF' > "${SMOKE_TEST}"
239
+ #!/usr/bin/env bash
240
+ # ==============================================================================
241
+ # Boundary Verification Smoke Test (Phase 5 Verification Gate)
242
+ # ==============================================================================
243
+ set -euo pipefail
244
+
245
+ echo "Running boundary smoke verification..."
246
+ # Extend with project-specific runtime health checks (e.g. ping health endpoint, CLI --help)
247
+ echo "✅ Boundary smoke verification passed!"
248
+ EOF
249
+ chmod +x "${SMOKE_TEST}"
250
+ fi
251
+
107
252
  echo "--------------------------------------------------------------"
108
253
  echo "✅ Topology '${TOPOLOGY}' scaffolded with strict YAGNI (0 speculative folders)!"
@@ -53,7 +53,17 @@ Ensure every user story conforms to Bill Wake's **INVEST** criteria:
53
53
  - **Small:** Sized to be completable in 1–2 development days.
54
54
  - **Testable:** Accompanied by executable, unambiguous Gherkin acceptance criteria.
55
55
 
56
- **The Multi-Layer Cake Rule:** Never slice horizontally (e.g. "Create database schema only"). Always slice vertically through the full stack so that every story delivers working software.
56
+ **The Multi-Layer Cake Rule & UI Integration:**
57
+ - **Never slice horizontally** (e.g. *"Create database schema only"* or *"Create backend API only"*). Always slice vertically through the full stack so that every story delivers working software.
58
+ - **Mandatory UI/UX Triage Gate for User-Facing Applications:** If the project has a frontend or user interface (Fullstack Web SaaS, Extension, Desktop), execute the **7-Pillar Design Architecture Triage Gate** ([`ui_ux_architecture.md`](../../../docs/rules/ui_ux_architecture.md)) before finalizing stories:
59
+ 1. *Role & Identity:* Define who the user is and their operational boundary.
60
+ 2. *Information Architecture:* Define how the view fits into the Persistent App Shell vs Dynamic Canvas.
61
+ 3. *Experience Duality:* Clarify whether the screen belongs to an Enterprise Operator Workspace or Consumer Portal.
62
+ 4. *Navigation & Wayfinding:* Specify sidebar route, active tab, breadcrumbs, and command palette entries.
63
+ 5. *State & URL Synchronization:* Specify query params (`?tab=`, `?q=`, `?page=`, `?modal=`).
64
+ 6. *Access Control:* Specify route guards and permission checks.
65
+ 7. *Accessibility & Feedback:* Specify accessible notifications, focus trapping, and zero native alerts.
66
+ - **Every user-facing story MUST specify:** (1) The UI view/component & user interaction, (2) The API Command/Query DTO, (3) The core domain invariant, and (4) The persistence change.
57
67
 
58
68
  ### Step 5: Decompose Stories into SMART Developer Tasks
59
69
  For engineering execution, translate INVEST user stories into Bill Wake's **SMART** developer tasks:
@@ -71,7 +81,8 @@ Map all failure paths to HTTP status codes (`400`, `401`, `403`, `404`, `409`, `
71
81
  ## 3. Gotchas & What NOT to Do
72
82
 
73
83
  - **DO NOT** confuse output (features shipped, story points burned) with outcome (value delivered, satisfaction gap closed).
74
- - **DO NOT** write horizontal, technical user stories (e.g., *"As a developer, I want a database table"*).
84
+ - **DO NOT** write horizontal, technical user stories (e.g., *"As a developer, I want a database table"* or *"As an API, I want a REST endpoint"*).
85
+ - **DO NOT** author backend-only user stories or ignore the UI when analyzing a user-facing system. If the system has a web frontend or client interface, slicing must start with user interactions and views.
75
86
  - **DO NOT** force technical constraints, security policies, or infrastructure upgrades into user story syntax. Treat them as non-story requirements or architectural spikes.
76
87
  - **DO NOT** omit the Out-of-Scope ("Won't Have this time") section. Lack of negative boundaries causes runaway scope bloat.
77
88
  - **DO NOT** allow developer tasks to be open-ended without a measurable time-box. If a task exceeds 4 hours, it must be split or paired.
@@ -37,6 +37,7 @@ Upon receiving a user task or feature prompt, classify the functional archetype
37
37
  - **Archetype C: Asynchronous & Event Streaming** (background jobs, webhooks, queues, pub/sub)
38
38
  - **Archetype D: 3rd-Party & External Integrations** (external APIs, payment gateways, mailers)
39
39
  - **Archetype E: Read Performance & Search** (dashboards, aggregations, high-scale read traffic)
40
+ - **Archetype F: User Interface, Experience Duality & Interaction Flows** (personas, app shell, screen journeys, URL synchronization, WCAG accessibility per [`ui_ux_architecture.md`](../../../docs/rules/ui_ux_architecture.md) and [`frontend_architecture.md`](../../../docs/rules/frontend_architecture.md))
40
41
 
41
42
  ---
42
43
 
@@ -58,10 +59,12 @@ Do NOT dump a massive 20-question static checklist. Execute the interview in **d
58
59
  ---
59
60
 
60
61
  ### Phase 3: Architectural Friction & Rule Reconciliation
61
- Check the user's proposed answers against the **47 Atomic Domain Rules** in `docs/rules/`:
62
- - If the user proposes writing to the database and publishing an event sequentially ➔ **Flag the dual-write anti-pattern** and mandate the Transactional Outbox pattern ([`database_transactions.md`](../../../docs/rules/database_transactions.md)).
63
- - If the user proposes storing tenant data without an isolation mechanism ➔ **Flag the tenant leak risk** and mandate an isolation model ([`multitenancy_isolation.md`](../../../docs/rules/multitenancy_isolation.md)).
64
- - If the user proposes arbitrary untrusted script execution ➔ **Flag the host security vulnerability** and mandate Wasm sandboxing ([`tenant_pluggable_logic.md`](../../../docs/rules/tenant_pluggable_logic.md)).
62
+ Check the user's proposed answers against the **28 Cohesive Domain Rules** in `docs/rules/`:
63
+ - If the user proposes writing to the database and publishing an event sequentially ➔ **Flag the dual-write anti-pattern** and mandate the Transactional Outbox pattern ([`database_design.md`](../../../docs/rules/database_design.md)).
64
+ - If the user proposes storing tenant data without an isolation mechanism ➔ **Flag the tenant leak risk** and mandate an isolation model ([`multitenancy_architecture.md`](../../../docs/rules/multitenancy_architecture.md)).
65
+ - If the user proposes arbitrary untrusted script execution ➔ **Flag the host security vulnerability** and mandate Wasm sandboxing ([`multitenancy_architecture.md`](../../../docs/rules/multitenancy_architecture.md)).
66
+ - If the user proposes a fullstack feature but ignores user workflows or screens ➔ **Flag the Anemic Core anti-pattern** and mandate Outside-In interaction discovery ([`frontend_architecture.md`](../../../docs/rules/frontend_architecture.md)).
67
+ - If the user proposes ad-hoc modal alerts or unstructured page navigation ➔ **Flag UX debt** and enforce the 7-Pillar Design Architecture Triage Gate ([`ui_ux_architecture.md`](../../../docs/rules/ui_ux_architecture.md)).
65
68
  - Reconcile the conflict collaboratively before proceeding.
66
69
 
67
70
  ---
@@ -78,7 +81,7 @@ Synthesize the answers into an unambiguous **Feature Alignment Specification (FA
78
81
  - **DO NOT** ask 10+ questions at once. Keep batches small (2–3 questions) to maintain a collaborative conversation.
79
82
  - **DO NOT** start coding or planning in parallel while the interrogation is in progress.
80
83
  - **DO NOT** let the user bypass critical failure branches (e.g. *"we'll handle errors later"*). Insist on defining failure states.
81
- - **DO NOT** compromise on the 41 atomic rules. If a user request introduces an architectural violation, surface it immediately.
84
+ - **DO NOT** compromise on the 28 cohesive domain rules. If a user request introduces an architectural violation, surface it immediately.
82
85
 
83
86
  ---
84
87
 
@@ -118,3 +121,8 @@ Synthesize the answers into an unambiguous **Feature Alignment Specification (FA
118
121
  ```
119
122
  - **Test Strategy:** [Contract / Integration / Unit tests required for 100% coverage]
120
123
  ```
124
+
125
+ ---
126
+
127
+ ## 5. Subdirectories & Progressive Resources
128
+ - [references/adaptive_question_trees.md](./references/adaptive_question_trees.md): Contextual branching trees for state mutations, multi-tenancy, integrations, and caching.
@@ -70,6 +70,24 @@ flowchart TD
70
70
 
71
71
  ---
72
72
 
73
+ ## Decision Tree 5: User Interface, Experience Duality & Interaction Flows
74
+
75
+ ```mermaid
76
+ flowchart TD
77
+ Q1["Does the feature introduce or modify a user interface?"]
78
+ Q1 -->|Yes| Q2["Who is the primary actor and operational persona?"]
79
+
80
+ Q2 -->|Operator / Admin| Q_Op["1. Information Density: Dense tabular grid with filters?\n2. Persistent App Shell: Left collapsible sidebar route?\n3. Actions: Inline row actions or full-page drawer?"]
81
+ Q2 -->|Consumer / Member| Q_Member["1. Experience Duality: Consumer portal (/portal)?\n2. Touch Ergonomics: Clean cards & mobile drawer?\n3. Simplified self-service actions?"]
82
+
83
+ Q_Op --> Q3["Navigation & State Synchronization"]
84
+ Q_Member --> Q3
85
+
86
+ Q3 --> Q_State["1. URL State: Deep-link query params (?tab=, ?q=, ?page=, ?modal=)?\n2. Server Cache: TanStack Query hook with automated invalidation?\n3. Accessibility: Accessible headless dialogs & ARIA live regions?"]
87
+ ```
88
+
89
+ ---
90
+
73
91
  ## Contextual Follow-Up Patterns
74
92
 
75
93
  When conducting the interview, use this exact syntax pattern to chain questions adaptively:
package/.gitignore CHANGED
@@ -3,6 +3,8 @@ node_modules/
3
3
  npm-debug.log*
4
4
  yarn-debug.log*
5
5
  yarn-error.log*
6
+ *.log
7
+ *.log.*
6
8
 
7
9
  # Test coverage
8
10
  coverage/
package/AGENTS.md CHANGED
@@ -1,10 +1,11 @@
1
1
  # AGENTS.md
2
2
 
3
- > **Operating Framework & Agent Directives**
3
+ > **azcodr: Enterprise Architecture & Agentic Engineering Starter Template**
4
+ > **Workspace Mission:** Problem-first, topology-aligned production architectures governed by strict systemic atomicity, 100% open-source standards, true incremental TDD nano-cycles, and zero speculative bloat.
5
+ > **Runtime & Tools:** Node.js (`>=18.0.0`), npm (`>=10.0.0`) | `npm test` (test runner), `npm run test:coverage` (100% gate), `npm run lint`, `npm run validate`.
4
6
  > **Rule Zero:** Assume nothing. Every action must be grounded in verified evidence from this workspace or direct instructions from the user.
5
- > **Open-Source Mandate:** Always utilize 100% open-source tools, frameworks, libraries, and packages across all architectural domains.
6
- > **Atomicity Mandate:** All rules, skills, code units, migrations, and transactions must be strictly atomic (indivisible, self-contained, and composable with full ACID safety).
7
- > **Architecture Mandate:** Architecture emerges strictly from problem constraints and execution targets (Problem-First; zero tool/platform bias). Match architectural style to problem topology (Hexagonal for enterprise backends, Platform Scripting for extensions, Data-Oriented Design for game engines, Command Pipeline for CLIs, Game Loop for canvas games). Never force premature abstractions or universal templates.
7
+ > **Atomicity Mandate:** All rules, skills, code units, migrations, and transactions must be strictly atomic (indivisible, self-contained, composable with full ACID safety).
8
+ > **Architecture Mandate:** Architecture emerges strictly from problem constraints and execution targets (Problem-First; zero tool/platform bias). Match architectural style to problem topology (Hexagonal for backends, Platform Scripting for extensions, Data-Oriented Design for game engines, Command Pipeline for CLIs, Game Loop for canvas games).
8
9
 
9
10
  ---
10
11
 
@@ -56,50 +57,34 @@ To prevent context bloat and keep prompt overhead minimal, detailed engineering
56
57
 
57
58
  | Domain | Rule Reference File | When to Consult |
58
59
  |---|---|---|
59
- | **TDD Double Loop** | [docs/rules/test_driven_development.md](./docs/rules/test_driven_development.md) | Outside-In TDD (London School), collaborator discovery, mock ownership. |
60
- | **Test Coverage & Isolation** | [docs/rules/test_isolation.md](./docs/rules/test_isolation.md) | 100.00% full-stack coverage, status codes, transactional DB rollback. |
60
+ | **TDD & Isolation** | [docs/rules/test_driven_development.md](./docs/rules/test_driven_development.md) | Outside-In TDD, Uncle Bob's 3 Laws, 100% coverage, test isolation & DB rollback. |
61
61
  | **Clean Code** | [docs/rules/clean_code.md](./docs/rules/clean_code.md) | Naming, small functions, CQS, SLAP, DRY, DbC, zero side-effects. |
62
- | **Design Patterns** | [docs/rules/design_patterns.md](./docs/rules/design_patterns.md) | Adapter, Factory, Strategy, Result `<T, E>`, and complete 23 GoF catalog. |
63
- | **Type Safety** | [docs/rules/typescript.md](./docs/rules/typescript.md) | Compiler strictness, branded nominal types, type safety, static sound invariants. |
64
- | **ADRs** | [docs/rules/architecture_decision_records.md](./docs/rules/architecture_decision_records.md) | Authoring Lightweight Architectural Decision Records in `memory.md`. |
62
+ | **Design Patterns** | [docs/rules/design_patterns.md](./docs/rules/design_patterns.md) | Adapter, Factory, Strategy, Result `<T, E>`, and GoF pattern catalog. |
63
+ | **Type Safety** | [docs/rules/type_safety.md](./docs/rules/type_safety.md) | Compiler strictness, branded nominal types, type discriminators across polyglot languages. |
65
64
  | **Authentication** | [docs/rules/authentication.md](./docs/rules/authentication.md) | In-memory access tokens, refresh token rotation (RTR), WebAuthn passkeys. |
66
65
  | **Authorization** | [docs/rules/authorization.md](./docs/rules/authorization.md) | CASL, OPA Rego policy engines, OpenFGA ReBAC, server guards. |
67
- | **Multi-Tenancy Isolation** | [docs/rules/multitenancy_isolation.md](./docs/rules/multitenancy_isolation.md) | Tenant context resolution, 4 universal data isolation models, RLS/interceptor safety. |
68
- | **REST API Conventions** | [docs/rules/rest_api_conventions.md](./docs/rules/rest_api_conventions.md) | Standard HTTP status codes, enumeration masking, subresource endpoints. |
69
- | **Advanced API Patterns** | [docs/rules/advanced_api_patterns.md](./docs/rules/advanced_api_patterns.md) | Allowed Actions (`_actions`), Idempotency keys, cursor pagination, OCC. |
70
- | **API Versioning** | [docs/rules/api_versioning.md](./docs/rules/api_versioning.md) | URI versioning (`/v1/`), RFC 8594 Sunset/Deprecation headers, 90-day window. |
71
- | **Tenant Dynamic Schemas** | [docs/rules/tenant_dynamic_schemas.md](./docs/rules/tenant_dynamic_schemas.md) | Hybrid core + JSON/document storage, JSON Schema Draft 2020-12, meta-schemas. |
72
- | **Tenant Pluggable Logic** | [docs/rules/tenant_pluggable_logic.md](./docs/rules/tenant_pluggable_logic.md) | Common Expression Language (CEL), Wasm sandboxing, durable workflows (Temporal/BPMN). |
73
- | **Server-Driven UI** | [docs/rules/server_driven_ui.md](./docs/rules/server_driven_ui.md) | Client-agnostic layout schemas, multi-renderer component registries, DTCG tokens. |
74
- | **Database Transactions** | [docs/rules/database_transactions.md](./docs/rules/database_transactions.md) | ACID atomicity, isolation levels, defensive timeouts, transactional outbox. |
75
- | **Database Migrations** | [docs/rules/database_migrations.md](./docs/rules/database_migrations.md) | Declarative/versioned migrations (Atlas/Flyway), zero-downtime expand-contract. |
76
- | **Database Integrity** | [docs/rules/database_integrity.md](./docs/rules/database_integrity.md) | Foreign keys, domain CHECK constraints, interval EXCLUDE, soft-delete indexes. |
77
- | **Database Operations** | [docs/rules/database_operations.md](./docs/rules/database_operations.md) | Continuous PITR, autovacuum/defrag tuning, connection pooling, role separation. |
78
- | **Database Performance** | [docs/rules/database_performance.md](./docs/rules/database_performance.md) | Eliminating N+1 queries, DataLoader batching, composite tenant indexes. |
79
- | **Caching** | [docs/rules/caching.md](./docs/rules/caching.md) | Cache Port semantics, Cache-Aside, jittered TTLs, XFetch stampede defense. |
80
- | **Application Security** | [docs/rules/application_security.md](./docs/rules/application_security.md) | OWASP Top 10 defenses, cryptographic rigor, token bucket rate limiting. |
81
- | **Regulatory Compliance** | [docs/rules/compliance.md](./docs/rules/compliance.md) | SOC 2 Type II controls, ISO/IEC 27001 ISMS, GDPR data erasure rights. |
82
- | **DevSecOps** | [docs/rules/devsecops.md](./docs/rules/devsecops.md) | Secretlint pre-commit gating, CycloneDX SBOM generation, Trivy/Grype scanning. |
66
+ | **Multi-Tenancy** | [docs/rules/multitenancy_architecture.md](./docs/rules/multitenancy_architecture.md) | Tenant context, 4 isolation models, RLS, dynamic schemas, pluggable logic & YAGNI gates. |
67
+ | **API Architecture** | [docs/rules/api_architecture.md](./docs/rules/api_architecture.md) | HTTP status codes, sync vs async (202), `_actions`, idempotency keys, cursor pagination, OCC, versioning. |
68
+ | **Server-Driven UI** | [docs/rules/server_driven_ui.md](./docs/rules/server_driven_ui.md) | Backend-driven layout schemas, multi-renderer component registries, DTCG tokens & YAGNI gate. |
69
+ | **Database Design** | [docs/rules/database_design.md](./docs/rules/database_design.md) | Relational integrity, FKs, CHECK constraints, Canonical 6 audit fields, ACID transactions, Outbox CDC. |
70
+ | **Database Operations** | [docs/rules/database_operations.md](./docs/rules/database_operations.md) | Zero-downtime expand-contract migrations, N+1 elimination, DataLoader, indexing, pooling, PITR. |
71
+ | **Caching** | [docs/rules/caching.md](./docs/rules/caching.md) | Cache Port semantics, Cache-Aside, jittered TTLs, XFetch stampede defense & YAGNI gate. |
72
+ | **Security & Compliance** | [docs/rules/security_compliance.md](./docs/rules/security_compliance.md) | OWASP Top 10 defenses, rate limiting, crypto, SOC 2 Type II, ISO 27001, GDPR data erasure. |
73
+ | **DevOps & CI/CD** | [docs/rules/devops_ci_cd.md](./docs/rules/devops_ci_cd.md) | Shift-left trunk-based CI, OCI distroless containers, Secretlint/Trivy DevSecOps, zero-downtime CD. |
74
+ | **Cloud-Native 12-Factor** | [docs/rules/cloud_native.md](./docs/rules/cloud_native.md) | 12-Factor (2026 Edition), OpenTelemetry (OTel), stateless isolates. |
83
75
  | **Error Architecture** | [docs/rules/error_handling.md](./docs/rules/error_handling.md) | Fail-fast schema validation, structured OTel/Pino tracing, RFC 7807 envelopes. |
84
- | **Feature Flags** | [docs/rules/feature_flags.md](./docs/rules/feature_flags.md) | OpenFeature standard, Flipt/Unleash backends, targeting, kill switches. |
85
- | **Continuous Integration** | [docs/rules/continuous_integration.md](./docs/rules/continuous_integration.md) | Shift-left automated pipelines, trunk-based development, build caching. |
86
- | **Continuous Deployment** | [docs/rules/continuous_deployment.md](./docs/rules/continuous_deployment.md) | Zero-downtime rollouts, Cosign container signing, container minimization. |
87
- | **Container Infrastructure** | [docs/rules/container_infrastructure.md](./docs/rules/container_infrastructure.md) | Unified gateway, minimal OCI distroless/scratch containers, non-root user security. |
76
+ | **Feature Flags** | [docs/rules/feature_flags.md](./docs/rules/feature_flags.md) | OpenFeature standard, Flipt/Unleash backends, targeting, kill switches & YAGNI gate. |
88
77
  | **Transactional Email** | [docs/rules/transactional_email.md](./docs/rules/transactional_email.md) | Declarative templates (MJML/JSON), safe interpolation, SMTP integration testing. |
89
- | **Accessibility** | [docs/rules/accessibility.md](./docs/rules/accessibility.md) | WCAG 2.2 AA compliance, accessible primitives, focus trapping, ARIA live regions. |
90
- | **UI Navigation** | [docs/rules/ui_navigation.md](./docs/rules/ui_navigation.md) | Bidirectional URL state synchronization, deep linking, search params. |
91
- | **UI/UX Architecture** | [docs/rules/ui_ux_architecture.md](./docs/rules/ui_ux_architecture.md) | Design triage, persistent app shell, collapsible sidebar, dual-experience portals. |
92
- | **React & Frontend** | [docs/rules/react.md](./docs/rules/react.md) | Modern React, shadcn/ui, TanStack Query, React Hook Form, and Zod validation. |
78
+ | **UI/UX Architecture** | [docs/rules/ui_ux_architecture.md](./docs/rules/ui_ux_architecture.md) | Design triage gate, persistent app shell, collapsible sidebar, dual-experience portals, dev persona. |
79
+ | **Frontend Architecture** | [docs/rules/frontend_architecture.md](./docs/rules/frontend_architecture.md) | Accessible headless primitives, WCAG 2.2 AA, server cache sync, form validation, 5-tier state, URL navigation. |
93
80
  | **Requirements Engineering** | [docs/rules/requirements_engineering.md](./docs/rules/requirements_engineering.md) | User stories vs requirements, 3 C's, INVEST vertical cake slicing, Gherkin. |
94
81
  | **Product Ownership** | [docs/rules/product_ownership.md](./docs/rules/product_ownership.md) | Product Backlog Management, OKRs, Kano/MoSCoW/RICE, Product Value, empiricism. |
95
- | **Domain-Driven Design** | [docs/rules/domain_driven_design.md](./docs/rules/domain_driven_design.md) | Ubiquitous Language, Bounded Contexts, Aggregates, Capability Mapping. |
96
- | **Workflow State Machines** | [docs/rules/workflow_state_machines.md](./docs/rules/workflow_state_machines.md) | Configurable workflows, in-aggregate invariant FSMs, transition guards & audit logs. |
97
- | **Cloud-Native 12-Factor** | [docs/rules/cloud_native.md](./docs/rules/cloud_native.md) | 12-Factor (2026 Edition), OpenTelemetry (OTel), stateless isolates. |
98
- | **Agentic Config & Skills** | [docs/rules/agentic_configuration.md](./docs/rules/agentic_configuration.md) | Progressive disclosure architecture, skill inquiry branches, refinement loop. |
99
82
  | **Project Management** | [docs/rules/project_management.md](./docs/rules/project_management.md) | Work-In-Progress limits (WIP = 1), SMART developer tasks, Definition of Done. |
83
+ | **Domain-Driven Design** | [docs/rules/domain_driven_design.md](./docs/rules/domain_driven_design.md) | Ubiquitous Language, Bounded Contexts, Aggregates, Capability Mapping. |
84
+ | **CQRS & Projections** | [docs/rules/cqrs.md](./docs/rules/cqrs.md) | Evolutionary CQRS spectrum, YAGNI defense, read projections, outbox CDC. |
85
+ | **Workflow State Machines** | [docs/rules/workflow_state_machines.md](./docs/rules/workflow_state_machines.md) | Configurable workflows, in-aggregate invariant FSMs, transition guards & audit logs & YAGNI gate. |
86
+ | **Agentic Governance** | [docs/rules/agentic_configuration.md](./docs/rules/agentic_configuration.md) | Progressive disclosure, ADR ledger, workspace sovereignty, continuous learning, YAGNI gate triad. |
100
87
  | **Relentless Questioning** | [docs/rules/relentless_questioning.md](./docs/rules/relentless_questioning.md) | Dynamic context-aware interrogation loops, adaptive decision trees. |
101
- | **Workspace Isolation** | [docs/rules/workspace_isolation.md](./docs/rules/workspace_isolation.md) | Strict workspace sovereignty, zero global contamination, local ground truth. |
102
- | **Continuous Learning** | [docs/rules/continuous_learning.md](./docs/rules/continuous_learning.md) | Direct rule ingestion, root-cause analysis, dynamic invariant updates. |
103
88
  ---
104
89
 
105
90
  ## 4. Agent Configuration & Workspace Architecture
@@ -114,4 +99,4 @@ To prevent context bloat and keep prompt overhead minimal, detailed engineering
114
99
  - [`relentless-questioner`](.agents/skills/relentless-questioner/SKILL.md): Dynamic context-aware interrogation loops before planning and coding.
115
100
  - **Relentless Skill Architecture Inquiry:** Never author or update skills on assumptions. Interrogate all 7 inquiry branches (placement, trigger intent, domain truth, gotchas/anti-patterns, determinism, progressive bloat, verification loop) defined in [docs/rules/agentic_configuration.md](./docs/rules/agentic_configuration.md) before writing `SKILL.md`.
116
101
  - **Workspace Memory & Knowledge Hub:** Consult [`memory.md`](./memory.md) for ADRs, and [`docs/knowledge/ubiquitous_language.md`](./docs/knowledge/ubiquitous_language.md) for domain glossaries.
117
- - **Harness Parity & Symlinks:** `AGENTS.md`, `CLAUDE.md`, and `agents.md` must remain identical via filesystem symbolic links to eliminate configuration divergence across different agent harnesses.
102
+ - **Harness Parity & Symlinks:** `AGENTS.md`, `CLAUDE.md`, `agents.md`, `GEMINI.md`, `.cursorrules`, `.windsurfrules`, and `.github/copilot-instructions.md` must remain identical via filesystem symbolic links to eliminate configuration divergence across different agent harnesses.