azcodr 1.5.0 β 1.5.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/.agents/hooks.json +42 -0
- package/.agents/hooks.json.example +42 -42
- package/.agents/mcp_config.json.example +6 -1
- package/.agents/scripts/safety_guard.sh +34 -16
- package/.agents/scripts/verify_completion.sh +27 -13
- package/.agents/skills/agentic-architect/SKILL.md +125 -125
- package/.agents/skills/agentic-architect/references/agents_md_template.md +62 -62
- package/.agents/skills/agentic-architect/references/refinement_workflow.md +32 -32
- package/.agents/skills/agentic-architect/references/skill_architecture_inquiry.md +63 -63
- package/.agents/skills/agentic-architect/references/skill_template.md +56 -56
- package/.agents/skills/agentic-architect/scripts/validate_agentic_configs.sh +401 -362
- package/.agents/skills/clean-code-refactor/SKILL.md +91 -91
- package/.agents/skills/clean-code-refactor/references/clean_code_smells.md +27 -27
- package/.agents/skills/clean-code-refactor/references/design_patterns_ts.md +65 -65
- package/.agents/skills/compliance-audit/SKILL.md +120 -120
- package/.agents/skills/compliance-audit/references/owasp_top10_controls.md +16 -16
- package/.agents/skills/compliance-audit/references/soc2_iso_controls.md +28 -28
- package/.agents/skills/lets-build/SKILL.md +173 -172
- package/.agents/skills/lets-build/references/architecture_interview_matrix.md +115 -115
- package/.agents/skills/lets-build/references/hexagonal_bootstrap_scaffolds.md +160 -160
- package/.agents/skills/lets-build/references/project_readme_template.md +79 -79
- package/.agents/skills/lets-build/scripts/bootstrap_workspace.sh +255 -253
- package/.agents/skills/product-analyst/SKILL.md +154 -154
- package/.agents/skills/product-analyst/references/backlog_ordering_techniques.md +107 -107
- package/.agents/skills/product-analyst/references/gherkin_patterns.md +46 -46
- package/.agents/skills/product-analyst/references/invest_checklist.md +38 -38
- package/.agents/skills/product-analyst/references/okr_alignment_guide.md +76 -76
- package/.agents/skills/product-analyst/references/smart_tasks.md +59 -59
- package/.agents/skills/relentless-questioner/SKILL.md +128 -128
- package/.agents/skills/relentless-questioner/references/adaptive_question_trees.md +102 -102
- package/.editorconfig +19 -19
- package/.github/copilot-instructions.md +1 -0
- package/.github/workflows/ci.yml +56 -0
- package/.gitignore +25 -25
- package/AGENTS.md +102 -102
- package/LICENSE +21 -21
- package/README.md +154 -154
- package/bin/azcodr.js +228 -228
- package/data/.gitkeep +0 -0
- package/docs/knowledge/ubiquitous_language.md +18 -18
- package/docs/rules/agentic_configuration.md +259 -259
- package/docs/rules/api_architecture.md +179 -179
- package/docs/rules/authentication.md +76 -76
- package/docs/rules/authorization.md +75 -75
- package/docs/rules/caching.md +69 -69
- package/docs/rules/clean_code.md +62 -62
- package/docs/rules/cloud_native.md +41 -41
- package/docs/rules/cqrs.md +203 -203
- package/docs/rules/database_design.md +125 -125
- package/docs/rules/database_operations.md +69 -69
- package/docs/rules/design_patterns.md +98 -98
- package/docs/rules/devops_ci_cd.md +76 -76
- package/docs/rules/domain_driven_design.md +122 -122
- package/docs/rules/error_handling.md +52 -52
- package/docs/rules/feature_flags.md +59 -59
- package/docs/rules/frontend_architecture.md +157 -157
- package/docs/rules/multitenancy_architecture.md +98 -98
- package/docs/rules/product_ownership.md +127 -127
- package/docs/rules/project_management.md +49 -49
- package/docs/rules/relentless_questioning.md +52 -52
- package/docs/rules/requirements_engineering.md +98 -98
- package/docs/rules/security_compliance.md +53 -53
- package/docs/rules/server_driven_ui.md +88 -88
- package/docs/rules/test_driven_development.md +185 -185
- package/docs/rules/transactional_email.md +27 -27
- package/docs/rules/type_safety.md +65 -65
- package/docs/rules/ui_ux_architecture.md +150 -150
- package/docs/rules/workflow_state_machines.md +117 -117
- package/lib/index.d.ts +134 -123
- package/lib/index.js +5 -5
- package/lib/scaffold.js +399 -351
- package/memory.md +36 -36
- package/package.json +62 -59
- package/scripts/test_coverage.js +38 -0
- package/scripts/validate.js +246 -0
package/README.md
CHANGED
|
@@ -1,154 +1,154 @@
|
|
|
1
|
-
# azcodr: Enterprise Architecture & Agentic Engineering Starter Template
|
|
2
|
-
|
|
3
|
-
> **Production-ready, battle-tested software architecture governed by problem-first topology alignment, strict systemic atomicity, evolutionary architecture tipping points, 100% open-source standards, true incremental TDD nano-cycles, and zero speculative bloat.**
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## π Architectural Pillars
|
|
8
|
-
|
|
9
|
-
1. **Problem-First & Topology Alignment**: Architecture emerges strictly from problem constraints and execution targets (Problem-First; zero preemptive tool bias). Architectural styles match the problem topology: Hexagonal for enterprise backends, Platform Scripting for extensions, Data-Oriented Design for game engines, Command Pipeline for CLIs, and Game Loop for canvas games.
|
|
10
|
-
2. **Systemic Atomicity**: Every rule, skill, database transaction, and code unit adheres to the Single Responsibility Principle (SRP)βindivisible, self-contained, orthogonal, and composable with zero conjunction naming.
|
|
11
|
-
3. **Evolutionary Architecture & Refactor-Before-Add**: To eliminate AI-accelerated architectural drift, code graduates across 5 deterministic tipping points. Refactor structure first under existing green tests before implementing new features. Never append code into rotting files.
|
|
12
|
-
4. **True Incremental TDD & Nano-Cycles**: Prohibit batch-test dumps ("Test-First Waterfall"). Follow Uncle Bob's Three Laws: write one micro-assertion at a time, verify RED failure output, write minimal code to turn GREEN, and refactor under green with Ping-Pong pair programming.
|
|
13
|
-
5. **100% Open-Source & Open Standards**: Standardized exclusively on open-source solutions and vendor-neutral specifications (OpenTelemetry, OPA, OpenFGA, Protocol Buffers, OpenAPI 3.1, JSON Schema Draft 2020-12, CloudEvents, Semgrep, Trivy, Gitleaks, Cosign).
|
|
14
|
-
6. **Zero-Assumption Framework**: Ground truth is established solely through workspace configurations, code evidence, or direct user confirmation.
|
|
15
|
-
7. **Hardened Multi-Tenancy (When Applicable)**: 4 interchangeable isolation models (AST query interceptor filtering, schema-per-tenant, database-per-tenant, transparent storage proxy) backed by transaction-scoped session context.
|
|
16
|
-
8. **Dynamic Extensibility Without Code Branching**:
|
|
17
|
-
- Custom tables and columns via hybrid core relational/document models and validated JSON Schema.
|
|
18
|
-
- Pluggable business logic via Common Expression Language (CEL), GoF Strategy registries, and WebAssembly (Wasm) micro-sandboxes.
|
|
19
|
-
- Tenant lifecycles via durable workflows (Temporal / BPMN 2.0 / statecharts).
|
|
20
|
-
- Server-Driven UI (SDUI) component registries and W3C Design Tokens Community Group (DTCG) theming.
|
|
21
|
-
9. **Resilient Database Architecture**: Full ACID atomicity, Transactional Outbox pattern eliminating dual-writes, declarative expand-contract zero-downtime migrations, and continuous Point-In-Time Recovery (PITR).
|
|
22
|
-
10. **Workspace Knowledge Hub & Token Economy**: In-workspace system knowledge graphs and Lightweight Architectural Decision Records (ADRs) to eliminate repetitive token-expensive discovery loops.
|
|
23
|
-
|
|
24
|
-
---
|
|
25
|
-
|
|
26
|
-
## ποΈ Workspace Architecture
|
|
27
|
-
|
|
28
|
-
```
|
|
29
|
-
.
|
|
30
|
-
βββ .agents/
|
|
31
|
-
β βββ skills/ # Specialized on-demand agentic workflows
|
|
32
|
-
β βββ agentic-architect/ # Authoring & auditing agent configurations
|
|
33
|
-
β βββ clean-code-refactor/ # Refactoring code smells with GoF & Clean Code
|
|
34
|
-
β βββ compliance-audit/ # SOC 2, ISO 27001 & OWASP open-source audits
|
|
35
|
-
β βββ lets-build/ # Architecture interview & project bootstrapper
|
|
36
|
-
β βββ product-analyst/ # INVEST user stories & Gherkin criteria
|
|
37
|
-
β βββ relentless-questioner/ # Context-aware dynamic interrogation loop
|
|
38
|
-
βββ docs/
|
|
39
|
-
β βββ knowledge/ # Institutional knowledge & domain contracts
|
|
40
|
-
β β βββ ubiquitous_language.md # Living Ubiquitous Language glossary template
|
|
41
|
-
β βββ rules/ # 28 cohesive single-responsibility domain rules
|
|
42
|
-
βββ AGENTS.md # Lean root agentic configuration (< 120 lines)
|
|
43
|
-
βββ CLAUDE.md -> AGENTS.md # Filesystem symlink for harness parity (Claude Code)
|
|
44
|
-
βββ agents.md -> AGENTS.md # Filesystem symlink for harness parity (Codex / Standard)
|
|
45
|
-
βββ GEMINI.md -> AGENTS.md # Filesystem symlink for harness parity (Antigravity / Gemini)
|
|
46
|
-
βββ .cursorrules -> AGENTS.md # Filesystem symlink for harness parity (Cursor)
|
|
47
|
-
βββ .windsurfrules -> AGENTS.md # Filesystem symlink for harness parity (Windsurf)
|
|
48
|
-
βββ memory.md # Master memory hub & Lightweight ADR ledger
|
|
49
|
-
βββ README.md # Project documentation
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
---
|
|
53
|
-
|
|
54
|
-
## π Progressive Disclosure Rules Catalog (`docs/rules/`)
|
|
55
|
-
|
|
56
|
-
The architecture enforces 28 cohesive, single-responsibility domain rules. Read on demand to prevent prompt context bloat:
|
|
57
|
-
|
|
58
|
-
| Domain | Rule Reference File | Key Focus & Invariants |
|
|
59
|
-
|---|---|---|
|
|
60
|
-
| **TDD & Isolation** | [`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
|
-
| **Clean Code** | [`clean_code.md`](./docs/rules/clean_code.md) | Naming, small functions, CQS, SLAP, DRY, DbC, zero side-effects. |
|
|
62
|
-
| **Design Patterns** | [`design_patterns.md`](./docs/rules/design_patterns.md) | Adapter, Factory, Strategy, Result `<T, E>`, and GoF pattern catalog. |
|
|
63
|
-
| **Type Safety** | [`type_safety.md`](./docs/rules/type_safety.md) | Compiler strictness, branded nominal types, type discriminators across polyglot languages. |
|
|
64
|
-
| **Authentication** | [`authentication.md`](./docs/rules/authentication.md) | In-memory access tokens, refresh token rotation (RTR), WebAuthn passkeys. |
|
|
65
|
-
| **Authorization** | [`authorization.md`](./docs/rules/authorization.md) | CASL, OPA Rego policy engines, OpenFGA ReBAC, server guards. |
|
|
66
|
-
| **Multi-Tenancy** | [`multitenancy_architecture.md`](./docs/rules/multitenancy_architecture.md) | Tenant context, 4 isolation models, RLS, dynamic schemas, pluggable logic & YAGNI gates. |
|
|
67
|
-
| **API Architecture** | [`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** | [`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** | [`database_design.md`](./docs/rules/database_design.md) | Relational integrity, FKs, CHECK constraints, Canonical 6 audit fields, ACID transactions, Outbox CDC. |
|
|
70
|
-
| **Database Operations** | [`database_operations.md`](./docs/rules/database_operations.md) | Zero-downtime expand-contract migrations, N+1 elimination, DataLoader, indexing, pooling, PITR. |
|
|
71
|
-
| **Caching** | [`caching.md`](./docs/rules/caching.md) | Cache Port semantics, Cache-Aside, jittered TTLs, XFetch stampede defense & YAGNI gate. |
|
|
72
|
-
| **Security & Compliance** | [`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** | [`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** | [`cloud_native.md`](./docs/rules/cloud_native.md) | 12-Factor (2026 Edition), OpenTelemetry (OTel), stateless isolates. |
|
|
75
|
-
| **Error Architecture** | [`error_handling.md`](./docs/rules/error_handling.md) | Fail-fast schema validation, structured OTel/Pino tracing, RFC 7807 envelopes. |
|
|
76
|
-
| **Feature Flags** | [`feature_flags.md`](./docs/rules/feature_flags.md) | OpenFeature standard, Flipt/Unleash backends, targeting, kill switches & YAGNI gate. |
|
|
77
|
-
| **Transactional Email** | [`transactional_email.md`](./docs/rules/transactional_email.md) | Declarative templates (MJML/JSON), safe interpolation, SMTP integration testing. |
|
|
78
|
-
| **UI/UX Architecture** | [`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** | [`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. |
|
|
80
|
-
| **Requirements Engineering** | [`requirements_engineering.md`](./docs/rules/requirements_engineering.md) | User stories vs requirements, 3 C's, INVEST vertical cake slicing, Gherkin. |
|
|
81
|
-
| **Product Ownership** | [`product_ownership.md`](./docs/rules/product_ownership.md) | Product Backlog Management, OKRs, Kano/MoSCoW/RICE, Product Value, empiricism. |
|
|
82
|
-
| **Project Management** | [`project_management.md`](./docs/rules/project_management.md) | Work-In-Progress limits (WIP = 1), SMART developer tasks, Definition of Done. |
|
|
83
|
-
| **Domain-Driven Design** | [`domain_driven_design.md`](./docs/rules/domain_driven_design.md) | Ubiquitous Language, Bounded Contexts, Aggregates, Capability Mapping. |
|
|
84
|
-
| **CQRS & Projections** | [`cqrs.md`](./docs/rules/cqrs.md) | Evolutionary CQRS spectrum, YAGNI defense, read projections, outbox CDC. |
|
|
85
|
-
| **Workflow State Machines** | [`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** | [`agentic_configuration.md`](./docs/rules/agentic_configuration.md) | Progressive disclosure, ADR ledger, workspace sovereignty, continuous learning, YAGNI gate triad. |
|
|
87
|
-
| **Relentless Questioning** | [`relentless_questioning.md`](./docs/rules/relentless_questioning.md) | Dynamic context-aware interrogation loops, adaptive decision trees. |
|
|
88
|
-
|
|
89
|
-
---
|
|
90
|
-
|
|
91
|
-
## π οΈ Specialized Skills Catalog (`.agents/skills/`)
|
|
92
|
-
|
|
93
|
-
- [`agentic-architect`](.agents/skills/agentic-architect/SKILL.md): Authoring, auditing, and modularizing agent configurations and skills.
|
|
94
|
-
- [`clean-code-refactor`](.agents/skills/clean-code-refactor/SKILL.md): Refactoring code smells with Clean Code, SOLID, and modern design patterns.
|
|
95
|
-
- [`compliance-audit`](.agents/skills/compliance-audit/SKILL.md): Conducting SOC 2, ISO 27001, and OWASP audits using open-source scanners.
|
|
96
|
-
- [`lets-build`](.agents/skills/lets-build/SKILL.md): Conducting architecture interviews to finalize stack, frameworks, package managers, and bootstrapping projects.
|
|
97
|
-
- [`product-analyst`](.agents/skills/product-analyst/SKILL.md): Aligning OKRs, backlog ordering (Kano/MoSCoW/RICE), INVEST stories, and Gherkin criteria.
|
|
98
|
-
- [`relentless-questioner`](.agents/skills/relentless-questioner/SKILL.md): Dynamic context-aware interrogation loops before planning and coding.
|
|
99
|
-
|
|
100
|
-
---
|
|
101
|
-
|
|
102
|
-
## π Starting a New Project with `/lets-build`
|
|
103
|
-
|
|
104
|
-
This repository serves as an **enterprise architectural starter template**. When beginning a new software project:
|
|
105
|
-
|
|
106
|
-
### Step 1: Initialize Workspace with npx
|
|
107
|
-
Pull and scaffold the complete enterprise architectural template into your project directory using `npx`:
|
|
108
|
-
```bash
|
|
109
|
-
npx azcodr my-new-project
|
|
110
|
-
cd my-new-project
|
|
111
|
-
```
|
|
112
|
-
*(Or run `npx azcodr` directly inside your target directory).*
|
|
113
|
-
|
|
114
|
-
### Step 2: Invoke the `/lets-build` Skill
|
|
115
|
-
In your AI coding assistant (Google Antigravity, Claude Code, Cursor, or OpenHands), trigger the workflow:
|
|
116
|
-
```
|
|
117
|
-
/lets-build
|
|
118
|
-
```
|
|
119
|
-
*(Or simply prompt: "Let's build a new project from this template.")*
|
|
120
|
-
|
|
121
|
-
### Step 3: The Problem-First Architectural Interview
|
|
122
|
-
The agent will execute a deep research loop and systematically derive your technical stack strictly from problem constraints (with zero preemptive tool bias) across 5 tiered dimensions:
|
|
123
|
-
|
|
124
|
-
1. **Problem Space & Topology Classification**: What real-world problem is being solved? What data moves and transforms? Classifies the system topology:
|
|
125
|
-
- *Topology A: Web SaaS / Cloud Microservices*
|
|
126
|
-
- *Topology B: Browser Extension (Manifest V3)*
|
|
127
|
-
- *Topology C: Game Engine / High-Performance Simulator (Bare metal, GPU)*
|
|
128
|
-
- *Topology D: Browser / Canvas Game (HTML5 Canvas / WebGL / WebGPU)*
|
|
129
|
-
- *Topology E: Desktop Application / CLI Utility (Native POSIX/Windows)*
|
|
130
|
-
- *Topology F: Systems / Embedded / Cryptographic Library*
|
|
131
|
-
2. **Physical & Operational Constraints**: Latency budget (hard real-time <16.6ms frame loop vs interactive low-latency vs batch), memory model & GC tolerance (zero-GC pause tolerance vs managed throughput GC vs single-threaded event loop), and concurrency topology.
|
|
132
|
-
3. **Architectural Style Derivation**: Matches style strictly to topology (Hexagonal for enterprise backends, Platform Scripting for extensions, Data-Oriented Design for game engines, Game Loop for canvas games, Command Pipeline for CLIs).
|
|
133
|
-
4. **Emergent Stack & Toolchain**: Derives the optimal language (C, Rust, TypeScript, Go, Java, C#, Python), package manager, and build system strictly from the verified constraints.
|
|
134
|
-
5. **Targeted Invariants (Strictly Topology-Scoped)**: Inquires *only* into the dimensions relevant to the selected topology (e.g. database migrations for web backends, content script isolation for extensions, CLI flags for CLIs; zero Docker, Kubernetes, or OpenAPI bloat for non-backend projects).
|
|
135
|
-
|
|
136
|
-
### Step 4: Blueprint Synthesis & Explicit Approval
|
|
137
|
-
The agent consolidates all your choices into a formal **Architectural Specification & Technology Blueprint** and records a formal ADR in [`memory.md`](./memory.md).
|
|
138
|
-
**The agent will stop and ask for your explicit confirmation before generating any code.**
|
|
139
|
-
|
|
140
|
-
### Step 5: Deterministic Topology Scaffolding (Strict YAGNI)
|
|
141
|
-
Once confirmed, the agent automatically executes:
|
|
142
|
-
1. Topology-aware directory scaffolding via `bootstrap_workspace.sh . <topology> <language>`, generating **0 speculative folders** (e.g. extensions get no Kubernetes or OpenAPI specs; CLIs get no Dockerfiles).
|
|
143
|
-
2. Targeted contract and entrypoint generation matching the derived topology.
|
|
144
|
-
3. Build manifests, strict linter/formatter configurations, and boundary smoke test (`scripts/smoke_test.sh`).
|
|
145
|
-
4. **Project-Specific README Generation**: Completely replaces the starter template `README.md` with clean, project-specific documentation (mission, stack highlights, quickstart setup, build/test commands, and directory structure), preserving links to `docs/rules/`.
|
|
146
|
-
5. Deterministic validation via `validate_agentic_configs.sh` and initial smoke test execution.
|
|
147
|
-
6. **Handover Gate to Domain Analysis**: Halts technical scaffolding and instructs the user to invoke `product-analyst` and `relentless-questioner` for domain modeling.
|
|
148
|
-
|
|
149
|
-
---
|
|
150
|
-
|
|
151
|
-
## ποΈ Workspace Memory & Knowledge Hub
|
|
152
|
-
|
|
153
|
-
- π **[Living Ubiquitous Language Glossary](./docs/knowledge/ubiquitous_language.md)**: Authoritative domain vocabulary contract.
|
|
154
|
-
- π **[Lightweight ADR Ledger](./memory.md)**: Formal Architectural Decision Records and governing rules.
|
|
1
|
+
# azcodr: Enterprise Architecture & Agentic Engineering Starter Template
|
|
2
|
+
|
|
3
|
+
> **Production-ready, battle-tested software architecture governed by problem-first topology alignment, strict systemic atomicity, evolutionary architecture tipping points, 100% open-source standards, true incremental TDD nano-cycles, and zero speculative bloat.**
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## π Architectural Pillars
|
|
8
|
+
|
|
9
|
+
1. **Problem-First & Topology Alignment**: Architecture emerges strictly from problem constraints and execution targets (Problem-First; zero preemptive tool bias). Architectural styles match the problem topology: Hexagonal for enterprise backends, Platform Scripting for extensions, Data-Oriented Design for game engines, Command Pipeline for CLIs, and Game Loop for canvas games.
|
|
10
|
+
2. **Systemic Atomicity**: Every rule, skill, database transaction, and code unit adheres to the Single Responsibility Principle (SRP)βindivisible, self-contained, orthogonal, and composable with zero conjunction naming.
|
|
11
|
+
3. **Evolutionary Architecture & Refactor-Before-Add**: To eliminate AI-accelerated architectural drift, code graduates across 5 deterministic tipping points. Refactor structure first under existing green tests before implementing new features. Never append code into rotting files.
|
|
12
|
+
4. **True Incremental TDD & Nano-Cycles**: Prohibit batch-test dumps ("Test-First Waterfall"). Follow Uncle Bob's Three Laws: write one micro-assertion at a time, verify RED failure output, write minimal code to turn GREEN, and refactor under green with Ping-Pong pair programming.
|
|
13
|
+
5. **100% Open-Source & Open Standards**: Standardized exclusively on open-source solutions and vendor-neutral specifications (OpenTelemetry, OPA, OpenFGA, Protocol Buffers, OpenAPI 3.1, JSON Schema Draft 2020-12, CloudEvents, Semgrep, Trivy, Gitleaks, Cosign).
|
|
14
|
+
6. **Zero-Assumption Framework**: Ground truth is established solely through workspace configurations, code evidence, or direct user confirmation.
|
|
15
|
+
7. **Hardened Multi-Tenancy (When Applicable)**: 4 interchangeable isolation models (AST query interceptor filtering, schema-per-tenant, database-per-tenant, transparent storage proxy) backed by transaction-scoped session context.
|
|
16
|
+
8. **Dynamic Extensibility Without Code Branching**:
|
|
17
|
+
- Custom tables and columns via hybrid core relational/document models and validated JSON Schema.
|
|
18
|
+
- Pluggable business logic via Common Expression Language (CEL), GoF Strategy registries, and WebAssembly (Wasm) micro-sandboxes.
|
|
19
|
+
- Tenant lifecycles via durable workflows (Temporal / BPMN 2.0 / statecharts).
|
|
20
|
+
- Server-Driven UI (SDUI) component registries and W3C Design Tokens Community Group (DTCG) theming.
|
|
21
|
+
9. **Resilient Database Architecture**: Full ACID atomicity, Transactional Outbox pattern eliminating dual-writes, declarative expand-contract zero-downtime migrations, and continuous Point-In-Time Recovery (PITR).
|
|
22
|
+
10. **Workspace Knowledge Hub & Token Economy**: In-workspace system knowledge graphs and Lightweight Architectural Decision Records (ADRs) to eliminate repetitive token-expensive discovery loops.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## ποΈ Workspace Architecture
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
.
|
|
30
|
+
βββ .agents/
|
|
31
|
+
β βββ skills/ # Specialized on-demand agentic workflows
|
|
32
|
+
β βββ agentic-architect/ # Authoring & auditing agent configurations
|
|
33
|
+
β βββ clean-code-refactor/ # Refactoring code smells with GoF & Clean Code
|
|
34
|
+
β βββ compliance-audit/ # SOC 2, ISO 27001 & OWASP open-source audits
|
|
35
|
+
β βββ lets-build/ # Architecture interview & project bootstrapper
|
|
36
|
+
β βββ product-analyst/ # INVEST user stories & Gherkin criteria
|
|
37
|
+
β βββ relentless-questioner/ # Context-aware dynamic interrogation loop
|
|
38
|
+
βββ docs/
|
|
39
|
+
β βββ knowledge/ # Institutional knowledge & domain contracts
|
|
40
|
+
β β βββ ubiquitous_language.md # Living Ubiquitous Language glossary template
|
|
41
|
+
β βββ rules/ # 28 cohesive single-responsibility domain rules
|
|
42
|
+
βββ AGENTS.md # Lean root agentic configuration (< 120 lines)
|
|
43
|
+
βββ CLAUDE.md -> AGENTS.md # Filesystem symlink for harness parity (Claude Code)
|
|
44
|
+
βββ agents.md -> AGENTS.md # Filesystem symlink for harness parity (Codex / Standard)
|
|
45
|
+
βββ GEMINI.md -> AGENTS.md # Filesystem symlink for harness parity (Antigravity / Gemini)
|
|
46
|
+
βββ .cursorrules -> AGENTS.md # Filesystem symlink for harness parity (Cursor)
|
|
47
|
+
βββ .windsurfrules -> AGENTS.md # Filesystem symlink for harness parity (Windsurf)
|
|
48
|
+
βββ memory.md # Master memory hub & Lightweight ADR ledger
|
|
49
|
+
βββ README.md # Project documentation
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## π Progressive Disclosure Rules Catalog (`docs/rules/`)
|
|
55
|
+
|
|
56
|
+
The architecture enforces 28 cohesive, single-responsibility domain rules. Read on demand to prevent prompt context bloat:
|
|
57
|
+
|
|
58
|
+
| Domain | Rule Reference File | Key Focus & Invariants |
|
|
59
|
+
|---|---|---|
|
|
60
|
+
| **TDD & Isolation** | [`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
|
+
| **Clean Code** | [`clean_code.md`](./docs/rules/clean_code.md) | Naming, small functions, CQS, SLAP, DRY, DbC, zero side-effects. |
|
|
62
|
+
| **Design Patterns** | [`design_patterns.md`](./docs/rules/design_patterns.md) | Adapter, Factory, Strategy, Result `<T, E>`, and GoF pattern catalog. |
|
|
63
|
+
| **Type Safety** | [`type_safety.md`](./docs/rules/type_safety.md) | Compiler strictness, branded nominal types, type discriminators across polyglot languages. |
|
|
64
|
+
| **Authentication** | [`authentication.md`](./docs/rules/authentication.md) | In-memory access tokens, refresh token rotation (RTR), WebAuthn passkeys. |
|
|
65
|
+
| **Authorization** | [`authorization.md`](./docs/rules/authorization.md) | CASL, OPA Rego policy engines, OpenFGA ReBAC, server guards. |
|
|
66
|
+
| **Multi-Tenancy** | [`multitenancy_architecture.md`](./docs/rules/multitenancy_architecture.md) | Tenant context, 4 isolation models, RLS, dynamic schemas, pluggable logic & YAGNI gates. |
|
|
67
|
+
| **API Architecture** | [`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** | [`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** | [`database_design.md`](./docs/rules/database_design.md) | Relational integrity, FKs, CHECK constraints, Canonical 6 audit fields, ACID transactions, Outbox CDC. |
|
|
70
|
+
| **Database Operations** | [`database_operations.md`](./docs/rules/database_operations.md) | Zero-downtime expand-contract migrations, N+1 elimination, DataLoader, indexing, pooling, PITR. |
|
|
71
|
+
| **Caching** | [`caching.md`](./docs/rules/caching.md) | Cache Port semantics, Cache-Aside, jittered TTLs, XFetch stampede defense & YAGNI gate. |
|
|
72
|
+
| **Security & Compliance** | [`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** | [`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** | [`cloud_native.md`](./docs/rules/cloud_native.md) | 12-Factor (2026 Edition), OpenTelemetry (OTel), stateless isolates. |
|
|
75
|
+
| **Error Architecture** | [`error_handling.md`](./docs/rules/error_handling.md) | Fail-fast schema validation, structured OTel/Pino tracing, RFC 7807 envelopes. |
|
|
76
|
+
| **Feature Flags** | [`feature_flags.md`](./docs/rules/feature_flags.md) | OpenFeature standard, Flipt/Unleash backends, targeting, kill switches & YAGNI gate. |
|
|
77
|
+
| **Transactional Email** | [`transactional_email.md`](./docs/rules/transactional_email.md) | Declarative templates (MJML/JSON), safe interpolation, SMTP integration testing. |
|
|
78
|
+
| **UI/UX Architecture** | [`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** | [`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. |
|
|
80
|
+
| **Requirements Engineering** | [`requirements_engineering.md`](./docs/rules/requirements_engineering.md) | User stories vs requirements, 3 C's, INVEST vertical cake slicing, Gherkin. |
|
|
81
|
+
| **Product Ownership** | [`product_ownership.md`](./docs/rules/product_ownership.md) | Product Backlog Management, OKRs, Kano/MoSCoW/RICE, Product Value, empiricism. |
|
|
82
|
+
| **Project Management** | [`project_management.md`](./docs/rules/project_management.md) | Work-In-Progress limits (WIP = 1), SMART developer tasks, Definition of Done. |
|
|
83
|
+
| **Domain-Driven Design** | [`domain_driven_design.md`](./docs/rules/domain_driven_design.md) | Ubiquitous Language, Bounded Contexts, Aggregates, Capability Mapping. |
|
|
84
|
+
| **CQRS & Projections** | [`cqrs.md`](./docs/rules/cqrs.md) | Evolutionary CQRS spectrum, YAGNI defense, read projections, outbox CDC. |
|
|
85
|
+
| **Workflow State Machines** | [`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** | [`agentic_configuration.md`](./docs/rules/agentic_configuration.md) | Progressive disclosure, ADR ledger, workspace sovereignty, continuous learning, YAGNI gate triad. |
|
|
87
|
+
| **Relentless Questioning** | [`relentless_questioning.md`](./docs/rules/relentless_questioning.md) | Dynamic context-aware interrogation loops, adaptive decision trees. |
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## π οΈ Specialized Skills Catalog (`.agents/skills/`)
|
|
92
|
+
|
|
93
|
+
- [`agentic-architect`](.agents/skills/agentic-architect/SKILL.md): Authoring, auditing, and modularizing agent configurations and skills.
|
|
94
|
+
- [`clean-code-refactor`](.agents/skills/clean-code-refactor/SKILL.md): Refactoring code smells with Clean Code, SOLID, and modern design patterns.
|
|
95
|
+
- [`compliance-audit`](.agents/skills/compliance-audit/SKILL.md): Conducting SOC 2, ISO 27001, and OWASP audits using open-source scanners.
|
|
96
|
+
- [`lets-build`](.agents/skills/lets-build/SKILL.md): Conducting architecture interviews to finalize stack, frameworks, package managers, and bootstrapping projects.
|
|
97
|
+
- [`product-analyst`](.agents/skills/product-analyst/SKILL.md): Aligning OKRs, backlog ordering (Kano/MoSCoW/RICE), INVEST stories, and Gherkin criteria.
|
|
98
|
+
- [`relentless-questioner`](.agents/skills/relentless-questioner/SKILL.md): Dynamic context-aware interrogation loops before planning and coding.
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## π Starting a New Project with `/lets-build`
|
|
103
|
+
|
|
104
|
+
This repository serves as an **enterprise architectural starter template**. When beginning a new software project:
|
|
105
|
+
|
|
106
|
+
### Step 1: Initialize Workspace with npx
|
|
107
|
+
Pull and scaffold the complete enterprise architectural template into your project directory using `npx`:
|
|
108
|
+
```bash
|
|
109
|
+
npx azcodr my-new-project
|
|
110
|
+
cd my-new-project
|
|
111
|
+
```
|
|
112
|
+
*(Or run `npx azcodr` directly inside your target directory).*
|
|
113
|
+
|
|
114
|
+
### Step 2: Invoke the `/lets-build` Skill
|
|
115
|
+
In your AI coding assistant (Google Antigravity, Claude Code, Cursor, or OpenHands), trigger the workflow:
|
|
116
|
+
```
|
|
117
|
+
/lets-build
|
|
118
|
+
```
|
|
119
|
+
*(Or simply prompt: "Let's build a new project from this template.")*
|
|
120
|
+
|
|
121
|
+
### Step 3: The Problem-First Architectural Interview
|
|
122
|
+
The agent will execute a deep research loop and systematically derive your technical stack strictly from problem constraints (with zero preemptive tool bias) across 5 tiered dimensions:
|
|
123
|
+
|
|
124
|
+
1. **Problem Space & Topology Classification**: What real-world problem is being solved? What data moves and transforms? Classifies the system topology:
|
|
125
|
+
- *Topology A: Web SaaS / Cloud Microservices*
|
|
126
|
+
- *Topology B: Browser Extension (Manifest V3)*
|
|
127
|
+
- *Topology C: Game Engine / High-Performance Simulator (Bare metal, GPU)*
|
|
128
|
+
- *Topology D: Browser / Canvas Game (HTML5 Canvas / WebGL / WebGPU)*
|
|
129
|
+
- *Topology E: Desktop Application / CLI Utility (Native POSIX/Windows)*
|
|
130
|
+
- *Topology F: Systems / Embedded / Cryptographic Library*
|
|
131
|
+
2. **Physical & Operational Constraints**: Latency budget (hard real-time <16.6ms frame loop vs interactive low-latency vs batch), memory model & GC tolerance (zero-GC pause tolerance vs managed throughput GC vs single-threaded event loop), and concurrency topology.
|
|
132
|
+
3. **Architectural Style Derivation**: Matches style strictly to topology (Hexagonal for enterprise backends, Platform Scripting for extensions, Data-Oriented Design for game engines, Game Loop for canvas games, Command Pipeline for CLIs).
|
|
133
|
+
4. **Emergent Stack & Toolchain**: Derives the optimal language (C, Rust, TypeScript, Go, Java, C#, Python), package manager, and build system strictly from the verified constraints.
|
|
134
|
+
5. **Targeted Invariants (Strictly Topology-Scoped)**: Inquires *only* into the dimensions relevant to the selected topology (e.g. database migrations for web backends, content script isolation for extensions, CLI flags for CLIs; zero Docker, Kubernetes, or OpenAPI bloat for non-backend projects).
|
|
135
|
+
|
|
136
|
+
### Step 4: Blueprint Synthesis & Explicit Approval
|
|
137
|
+
The agent consolidates all your choices into a formal **Architectural Specification & Technology Blueprint** and records a formal ADR in [`memory.md`](./memory.md).
|
|
138
|
+
**The agent will stop and ask for your explicit confirmation before generating any code.**
|
|
139
|
+
|
|
140
|
+
### Step 5: Deterministic Topology Scaffolding (Strict YAGNI)
|
|
141
|
+
Once confirmed, the agent automatically executes:
|
|
142
|
+
1. Topology-aware directory scaffolding via `bootstrap_workspace.sh . <topology> <language>`, generating **0 speculative folders** (e.g. extensions get no Kubernetes or OpenAPI specs; CLIs get no Dockerfiles).
|
|
143
|
+
2. Targeted contract and entrypoint generation matching the derived topology.
|
|
144
|
+
3. Build manifests, strict linter/formatter configurations, and boundary smoke test (`scripts/smoke_test.sh`).
|
|
145
|
+
4. **Project-Specific README Generation**: Completely replaces the starter template `README.md` with clean, project-specific documentation (mission, stack highlights, quickstart setup, build/test commands, and directory structure), preserving links to `docs/rules/`.
|
|
146
|
+
5. Deterministic validation via `validate_agentic_configs.sh` and initial smoke test execution.
|
|
147
|
+
6. **Handover Gate to Domain Analysis**: Halts technical scaffolding and instructs the user to invoke `product-analyst` and `relentless-questioner` for domain modeling.
|
|
148
|
+
|
|
149
|
+
---
|
|
150
|
+
|
|
151
|
+
## ποΈ Workspace Memory & Knowledge Hub
|
|
152
|
+
|
|
153
|
+
- π **[Living Ubiquitous Language Glossary](./docs/knowledge/ubiquitous_language.md)**: Authoritative domain vocabulary contract.
|
|
154
|
+
- π **[Lightweight ADR Ledger](./memory.md)**: Formal Architectural Decision Records and governing rules.
|