azcodr 1.5.2 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/hooks.json +42 -42
- package/.agents/hooks.json.example +42 -42
- package/.agents/mcp_config.json.example +29 -29
- package/.agents/scripts/safety_guard.sh +143 -34
- package/.agents/scripts/verify_completion.sh +90 -27
- 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 +402 -402
- 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 -173
- 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 +419 -255
- 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/workflows/ci.yml +167 -78
- package/.github/workflows/publish.yml +200 -0
- package/.gitignore +40 -25
- package/AGENTS.md +103 -102
- package/LICENSE +21 -21
- package/README.md +168 -165
- package/bin/azcodr.js +14 -228
- package/docs/knowledge/ubiquitous_language.md +31 -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 +54 -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/cli-parse.js +51 -0
- package/lib/cli-target.js +109 -0
- package/lib/cli.js +180 -0
- package/lib/errors.js +28 -0
- package/lib/git.js +29 -0
- package/lib/guards.js +96 -0
- package/lib/index.d.ts +199 -134
- package/lib/index.js +5 -5
- package/lib/links.js +123 -0
- package/lib/permissions.js +44 -0
- package/lib/repo.js +90 -0
- package/lib/scaffold.js +238 -448
- package/memory.md +119 -36
- package/package.json +65 -62
- package/scripts/test_coverage.js +66 -38
- package/scripts/validate/adr.js +151 -0
- package/scripts/validate/io.js +84 -0
- package/scripts/validate/links.js +167 -0
- package/scripts/validate/parity.js +124 -0
- package/scripts/validate/root.js +184 -0
- package/scripts/validate/rules.js +44 -0
- package/scripts/validate/skills.js +96 -0
- package/scripts/validate/text.js +29 -0
- package/scripts/validate-cli.js +13 -0
- package/scripts/validate.js +140 -258
- package/.github/copilot-instructions.md +0 -1
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
# SOC 2 Type II & ISO 27001 Controls Reference
|
|
2
|
-
|
|
3
|
-
Mapping of technical compliance controls to concrete software verification steps.
|
|
4
|
-
|
|
5
|
-
---
|
|
6
|
-
|
|
7
|
-
## 1. Access Control (SOC 2 CC6.1 / ISO 27001 A.9)
|
|
8
|
-
- **Tenant Boundary Isolation**: Every database interaction must filter by the authenticated tenant ID (`where: { tenantId, ... }`). Cross-tenant access must return 403 or 404.
|
|
9
|
-
- **Role Immutability**: Built-in system roles (e.g. `SUPER_ADMIN`, `SYSTEM`) must reject modification or deletion with an explicit `403 Forbidden` response.
|
|
10
|
-
- **Session Expiry**: User access tokens must have short lifespans (15–30 minutes) stored in-memory; refresh tokens must be revoked immediately upon logout via Redis blocklist.
|
|
11
|
-
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
## 2. Audit Trails & Monitoring (SOC 2 CC7.2 / ISO 27001 A.12)
|
|
15
|
-
- **Immutable Log Storage**: All state mutations must write an audit record with:
|
|
16
|
-
- `timestamp`: ISO-8601 UTC string.
|
|
17
|
-
- `actorId`: User ID initiating the mutation.
|
|
18
|
-
- `tenantId`: Tenant context ID.
|
|
19
|
-
- `action`: e.g. `CREATE_ROLE`, `DELETE_MEMBER`, `UPDATE_PAYMENT`.
|
|
20
|
-
- `entityType` & `entityId`.
|
|
21
|
-
- `ipAddress` & `userAgent`.
|
|
22
|
-
- **Log Integrity**: Audit records must never be updated or deleted by standard application operations.
|
|
23
|
-
|
|
24
|
-
---
|
|
25
|
-
|
|
26
|
-
## 3. Cryptography & Data Protection (SOC 2 CC6.6 / ISO 27001 A.10)
|
|
27
|
-
- **In-Transit**: TLS 1.3 enforced on reverse proxy / ingress. Strict Transport Security (`HSTS`) header enabled with `max-age=31536000; includeSubDomains`.
|
|
28
|
-
- **At-Rest**: Database disks encrypted via AES-256; sensitive tokens or credentials stored as salted hashes (`argon2id` or `bcrypt`) or encrypted payloads.
|
|
1
|
+
# SOC 2 Type II & ISO 27001 Controls Reference
|
|
2
|
+
|
|
3
|
+
Mapping of technical compliance controls to concrete software verification steps.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## 1. Access Control (SOC 2 CC6.1 / ISO 27001 A.9)
|
|
8
|
+
- **Tenant Boundary Isolation**: Every database interaction must filter by the authenticated tenant ID (`where: { tenantId, ... }`). Cross-tenant access must return 403 or 404.
|
|
9
|
+
- **Role Immutability**: Built-in system roles (e.g. `SUPER_ADMIN`, `SYSTEM`) must reject modification or deletion with an explicit `403 Forbidden` response.
|
|
10
|
+
- **Session Expiry**: User access tokens must have short lifespans (15–30 minutes) stored in-memory; refresh tokens must be revoked immediately upon logout via Redis blocklist.
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## 2. Audit Trails & Monitoring (SOC 2 CC7.2 / ISO 27001 A.12)
|
|
15
|
+
- **Immutable Log Storage**: All state mutations must write an audit record with:
|
|
16
|
+
- `timestamp`: ISO-8601 UTC string.
|
|
17
|
+
- `actorId`: User ID initiating the mutation.
|
|
18
|
+
- `tenantId`: Tenant context ID.
|
|
19
|
+
- `action`: e.g. `CREATE_ROLE`, `DELETE_MEMBER`, `UPDATE_PAYMENT`.
|
|
20
|
+
- `entityType` & `entityId`.
|
|
21
|
+
- `ipAddress` & `userAgent`.
|
|
22
|
+
- **Log Integrity**: Audit records must never be updated or deleted by standard application operations.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## 3. Cryptography & Data Protection (SOC 2 CC6.6 / ISO 27001 A.10)
|
|
27
|
+
- **In-Transit**: TLS 1.3 enforced on reverse proxy / ingress. Strict Transport Security (`HSTS`) header enabled with `max-age=31536000; includeSubDomains`.
|
|
28
|
+
- **At-Rest**: Database disks encrypted via AES-256; sensitive tokens or credentials stored as salted hashes (`argon2id` or `bcrypt`) or encrypted payloads.
|
|
@@ -1,173 +1,173 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: lets-build
|
|
3
|
-
description: Use when initializing or bootstrapping a new project from this template workspace, or when the user invokes '/lets-build' to conduct deep research and relentless questioning across language, stack, frameworks, package managers, databases, and architectural layers, followed by scaffolding the finalized project. Do not use for routine bug fixing, editing existing code features, or auditing already bootstrapped projects.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Let's Build: Problem-First Architecture Research & Project Bootstrapper
|
|
7
|
-
|
|
8
|
-
> **Core Purpose:** Conduct an exhaustive, problem-first architectural interview across domain essence, physical constraints, and system topology to derive technical choices (language, runtime, frameworks, build tools, architectural style) with zero assumptions, synthesize an approved ADR, and bootstrap a lean, strictly YAGNI project foundation.
|
|
9
|
-
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
## 1. When to Use This Skill
|
|
13
|
-
|
|
14
|
-
- When the user starts a fresh project by copying this workspace into a new directory.
|
|
15
|
-
- When the user explicitly invokes `/lets-build` or asks to initialize/scaffold a new application.
|
|
16
|
-
- When transforming or re-architecting an existing project to adhere to the 28 cohesive domain rules.
|
|
17
|
-
- **Do NOT use for**:
|
|
18
|
-
- Routine bug fixes or minor edits on an already bootstrapped codebase.
|
|
19
|
-
- Adding a single endpoint or modifying an existing domain model.
|
|
20
|
-
- Running security audits (use `compliance-audit`).
|
|
21
|
-
- Refactoring existing code smells (use `clean-code-refactor`).
|
|
22
|
-
|
|
23
|
-
---
|
|
24
|
-
|
|
25
|
-
## 2. Step-by-Step Execution Workflow
|
|
26
|
-
|
|
27
|
-
Progress through five mandatory stages:
|
|
28
|
-
|
|
29
|
-
```
|
|
30
|
-
1. DISCOVER (Toolchain & Root) ──► 2. INTERROGATE (Problem-First Interview) ──► 3. SYNTHESIZE (ADR & Blueprint) ──► 4. BOOTSTRAP (Topology Scaffolding) ──► 5. VERIFY (Prove Health)
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
---
|
|
34
|
-
|
|
35
|
-
### Phase 1: Discover (Toolchain & Workspace Inspection)
|
|
36
|
-
1. Inspect the workspace root: confirm whether this is a fresh copy or an existing codebase.
|
|
37
|
-
2. Check for pre-installed development runtimes and CLI tools (`go`, `rustc`/`cargo`, `python3`/`uv`, `node`/`pnpm`, `docker`, `semgrep`).
|
|
38
|
-
3. Verify that `AGENTS.md`, `memory.md`, and `docs/rules/` exist and remain intact.
|
|
39
|
-
|
|
40
|
-
---
|
|
41
|
-
|
|
42
|
-
### Phase 2: Interrogate (The Problem-First Architecture Interview)
|
|
43
|
-
Do NOT guess or assume any technology or stack choice. Execute the relentless interrogation using [references/architecture_interview_matrix.md](./references/architecture_interview_matrix.md). Group questions logically into digestible batches:
|
|
44
|
-
|
|
45
|
-
#### Batch 1: Problem Space & System Topology
|
|
46
|
-
1. **Domain & Problem Statement:** What real-world problem or capability does this system solve? What data moves, and what transformations occur?
|
|
47
|
-
2. **System Topology Classification:** Which topology best matches the execution target?
|
|
48
|
-
- Topology A: Web SaaS / Cloud Applications (Fullstack Web App vs Headless API)
|
|
49
|
-
- Topology B: Browser Extension (Manifest V3)
|
|
50
|
-
- Topology C: Game Engine / High-Performance Simulator (Bare metal, GPU)
|
|
51
|
-
- Topology D: Browser / Canvas Game (HTML5 Canvas / WebGL / WebGPU)
|
|
52
|
-
- Topology E: Desktop Application / CLI Utility (Native POSIX/Windows)
|
|
53
|
-
- Topology F: Embedded / Systems Library
|
|
54
|
-
|
|
55
|
-
#### Batch 2: Operational & Physical Constraints (The Machine Reality)
|
|
56
|
-
3. **Latency & Time Budget:** Hard real-time (<16.6ms / <7ms frame loop), interactive low-latency (<10ms keystroke), soft service API (<200ms p99), or batch?
|
|
57
|
-
4. **Memory Management & GC Tolerance:** Zero-GC pause tolerance (demands C/C++/Rust/Zig), managed throughput GC (Go, Java 21+, C# .NET 9), or single-threaded event loop (JS/TS)?
|
|
58
|
-
5. **Concurrency & Execution Model:** Single-threaded event loop, multi-threaded worker pools with work stealing, SIMD compute shaders, or distributed actors?
|
|
59
|
-
6. **Persistence & Connectivity:** Zero persistence (in-memory only), local flat/binary files, embedded SQLite, client-side browser storage, or enterprise RDBMS (Postgres)? Zero network, WebSockets, UDP, or HTTP/REST/gRPC?
|
|
60
|
-
|
|
61
|
-
#### Batch 3: Architectural Style & Emergent Toolchain
|
|
62
|
-
7. **Architectural Style Derivation:**
|
|
63
|
-
- Web SaaS ➔ Modular Monolith / Hexagonal (Ports & Adapters)
|
|
64
|
-
- Browser Extension ➔ Platform Scripting (`background`, `content`, `popup`, `storage`)
|
|
65
|
-
- Game Engine ➔ Data-Oriented Design (DOD / ECS / Cache-friendly contiguous memory)
|
|
66
|
-
- Canvas Game ➔ Game Loop (`Input ➔ Update ➔ Render`)
|
|
67
|
-
- Desktop CLI ➔ Command Pipeline (`Arg Parser ➔ Handler ➔ Stream I/O`)
|
|
68
|
-
8. **Primary Programming Language & Runtime:** Derived strictly from the constraints above (C, Rust, TypeScript, Go, Java, C#, Python).
|
|
69
|
-
9. **Package Manager & Toolchain:** Specific package manager (`cargo`, `pnpm`, `uv`, `go modules`) and build task runner.
|
|
70
|
-
|
|
71
|
-
#### Batch 4: Targeted Invariants (Topology-Scoped, 100% YAGNI)
|
|
72
|
-
Inquire *only* into the dimensions relevant to the selected topology:
|
|
73
|
-
- *If Web SaaS / Cloud Application:*
|
|
74
|
-
- **Interface Scope:** Headless API service only vs Fullstack Web Application (API + Web Frontend).
|
|
75
|
-
- **If Fullstack Web Application:** Frontend framework & build tool (React + Vite, Vue 3, Svelte 5), styling & accessible headless component primitives (Tailwind CSS, Radix UI / shadcn/ui per [`frontend_architecture.md`](../../../docs/rules/frontend_architecture.md)), client directory structure (`client/` + `src/` backend), and persistent app shell layout per [`ui_ux_architecture.md`](../../../docs/rules/ui_ux_architecture.md).
|
|
76
|
-
- **Backend & Data:** API protocol (REST/OpenAPI 3.1 vs gRPC), DB migration engine (Atlas/Flyway), tenancy isolation model, authentication, and OCI distroless containers.
|
|
77
|
-
- *If Browser Extension:* MV3 content script isolation (IIFE bundle), `chrome.storage.sync` flow, permissions. (Zero Docker/K8s/OpenAPI!).
|
|
78
|
-
- *If Frontend-only (Topology A variant):* Framework & build tool (React + Vite, Vue 3, Svelte 5), styling & headless primitives (Tailwind + Radix/shadcn per [`frontend_architecture.md`](../../../docs/rules/frontend_architecture.md)), `src/components|pages|hooks|services` layout, app-shell triage per [`ui_ux_architecture.md`](../../../docs/rules/ui_ux_architecture.md). (Zero Docker/SQL migrations!).
|
|
79
|
-
- *If Game Engine:* Graphics backend (Vulkan/DirectX/wgpu), memory allocators (arena/frame), ECS archetype model. (Zero Docker/SQL!).
|
|
80
|
-
- *If CLI:* Arg parsing library, POSIX exit codes, streaming I/O, `--json` formatting. (Zero Docker/SQL!).
|
|
81
|
-
|
|
82
|
-
---
|
|
83
|
-
|
|
84
|
-
### Phase 3: Synthesize (Architecture Blueprint & User Sign-Off)
|
|
85
|
-
1. Consolidate the user's answers into a formal **Consolidated Architectural Blueprint** (using Section 4 template).
|
|
86
|
-
2. Author the project's foundational Architectural Decision Record in `memory.md`, strictly starting with **`ADR-001: Target Technology Stack & Scaffolding Baseline`**. For a freshly initialized or bootstrapped project, `memory.md` must be a clean slate (zero prior decisions). If `memory.md` contains any legacy template ADRs from `azcodr`, sanitize and reset them so the new project starts from `ADR-001`.
|
|
87
|
-
3. **STOP AND ASK FOR EXPLICIT CONFIRMATION**: Present the blueprint and ADR to the user. Do NOT write scaffolding code until the user approves the blueprint.
|
|
88
|
-
|
|
89
|
-
---
|
|
90
|
-
|
|
91
|
-
### Phase 4: Bootstrap (Deterministic Topology Scaffolding)
|
|
92
|
-
Upon user confirmation:
|
|
93
|
-
1. Run the topology-aware workspace initialization script:
|
|
94
|
-
```bash
|
|
95
|
-
bash .agents/skills/lets-build/scripts/bootstrap_workspace.sh . <topology> <language>
|
|
96
|
-
```
|
|
97
|
-
2. Generate base infrastructure strictly for the selected topology (zero speculative bloat) using layouts from [references/hexagonal_bootstrap_scaffolds.md](./references/hexagonal_bootstrap_scaffolds.md):
|
|
98
|
-
- *Fullstack Web SaaS:* Backend in `src/`, Web Client in `client/` (`client/src/components/layout`, `client/src/components/ui`, `client/src/pages`, `client/src/hooks`, `client/src/services`), `specs/openapi/v1/openapi.yaml`, `specs/tokens/tokens.json`, `deploy/docker`, `deploy/compose`.
|
|
99
|
-
- *Headless Backend:* `src/domain/`, `src/ports/`, `src/adapters/`, `specs/openapi/v1/openapi.yaml`, `specs/tokens/tokens.json`, `deploy/docker`, `deploy/compose`.
|
|
100
|
-
- *Extension:* `manifest.json`, `src/background/index.ts`, `src/content/index.ts`, `src/popup/index.html`.
|
|
101
|
-
- *Game / Engine:* `src/core/`, `src/ecs/`, asset manifest, frame loop entrypoint.
|
|
102
|
-
- *CLI:* `src/cmd/`, `src/core/`, CLI entrypoint with exit code handling.
|
|
103
|
-
3. Generate build manifests (`Cargo.toml`, `package.json`, `go.mod`, `pyproject.toml`), linter configurations, and boundary smoke test (`scripts/smoke_test.sh`).
|
|
104
|
-
4. **Replace Starter README with Project-Specific README**:
|
|
105
|
-
Generate a clean, project-specific `README.md` using [references/project_readme_template.md](./references/project_readme_template.md), completely replacing meta-template content with the project's actual name, mission, stack highlights, quickstart commands, and directory tree.
|
|
106
|
-
|
|
107
|
-
---
|
|
108
|
-
|
|
109
|
-
### Phase 5: Verify & Handover to Domain Analysis
|
|
110
|
-
1. Run the workspace validation script:
|
|
111
|
-
```bash
|
|
112
|
-
bash .agents/skills/agentic-architect/scripts/validate_agentic_configs.sh
|
|
113
|
-
```
|
|
114
|
-
2. Execute toolchain dependency checks, build commands, and health/smoke tests:
|
|
115
|
-
- Compile code and verify zero compiler or lint errors.
|
|
116
|
-
- Verify boundary verification smoke test (`scripts/smoke_test.sh`).
|
|
117
|
-
3. **Mandatory Handover to Domain Analysis (STOP & PIVOT):**
|
|
118
|
-
- **`lets-build` IS NOW COMPLETE.** Do NOT proceed to write domain business entities, repositories, or application features.
|
|
119
|
-
- Present the bootstrapped technical skeleton to the user.
|
|
120
|
-
- Instruct the user to invoke `product-analyst` and `relentless-questioner` to initiate the **Domain Discovery & Requirements Engineering Phase** (Ubiquitous Language, Bounded Contexts, Aggregate Boundaries, INVEST User Stories, and Gherkin Acceptance Criteria) before any domain feature code is written.
|
|
121
|
-
- For applications with a user interface (Fullstack Web SaaS, Extensions, Desktop), the handover must explicitly instruct the user and agent to execute the **7-Pillar Design Architecture Triage Gate** ([`ui_ux_architecture.md`](../../../docs/rules/ui_ux_architecture.md)) to define user personas, persistent app shell navigation, and user journeys.
|
|
122
|
-
|
|
123
|
-
---
|
|
124
|
-
|
|
125
|
-
## 3. Gotchas & What NOT to Do
|
|
126
|
-
|
|
127
|
-
- **MAJOR DONT: NEVER carry over template-internal ADRs from azcodr into a new project.** When scaffolding or bootstrapping a new project, `memory.md` must be a clean slate and start at `ADR-001`. Do NOT number the first architecture decision as ADR-025 or ADR-028 based on azcodr's template development history.
|
|
128
|
-
- **MAJOR DONT: NEVER silently drop the frontend or treat Fullstack Web SaaS as a headless backend API!** If the user selects a Fullstack Web application with a UI, you MUST scaffold both the client (`client/`) and backend (`src/`) baselines, configure build manifests for both, execute the 7-Pillar Design Architecture Triage Gate, and ensure user stories slice vertically across both UI and API layers.
|
|
129
|
-
- **MAJOR DONT: DO NOT invent, assume, or scaffold application domain entities, business logic, or feature pages during `/lets-build`.** The `lets-build` skill is strictly an infrastructure and technical stack bootstrapper. Fabricating business domain features without dedicated domain analysis and relentless questioning of the user is a fatal architectural defect.
|
|
130
|
-
- **DO NOT** assume the stack. Never start writing Go, Rust, Python, or TypeScript before asking the user.
|
|
131
|
-
- **DO NOT** scaffold universal web boilerplate (Docker, Kubernetes, OpenAPI, Postgres migrations) for non-backend projects (Browser Extensions, CLIs, Game Engines, Desktop apps).
|
|
132
|
-
- **DO NOT** force Hexagonal Architecture onto platforms where the application IS the platform integration (e.g. Browser Extensions). Match architecture to topology.
|
|
133
|
-
- **DO NOT** proceed to code generation without presenting the blueprint and receiving explicit user approval.
|
|
134
|
-
- **DO NOT** skip or delete the atomic domain rules in `docs/rules/` during bootstrapping. The rules govern the ongoing lifecycle of the newly bootstrapped project.
|
|
135
|
-
- **DO NOT** create monolithic files (> 250 lines) or large functions (> 30 lines). Maintain strict Clean Code standards.
|
|
136
|
-
|
|
137
|
-
---
|
|
138
|
-
|
|
139
|
-
## 4. Structured Output Templates
|
|
140
|
-
|
|
141
|
-
### Consolidated Architectural Blueprint Template
|
|
142
|
-
```markdown
|
|
143
|
-
# Architectural Specification & Technology Blueprint
|
|
144
|
-
|
|
145
|
-
## 1. Problem Space & Topology
|
|
146
|
-
- **Project Domain:** <domain>
|
|
147
|
-
- **System Topology:** <Web SaaS / Browser Extension / Game Engine / Canvas Game / CLI / Library>
|
|
148
|
-
- **Architectural Style:** <Hexagonal / Platform Scripting / Data-Oriented Design / Game Loop / Command Pipeline>
|
|
149
|
-
|
|
150
|
-
## 2. Core Profile & Constraints
|
|
151
|
-
- **Primary Language & Runtime:** <language / version>
|
|
152
|
-
- **Package Manager & Build Tool:** <tool>
|
|
153
|
-
- **Latency / Performance Target:** <Hard real-time / Interactive / Service / Batch>
|
|
154
|
-
- **Memory & Concurrency Model:** <Zero GC / Managed GC / Single-threaded event loop>
|
|
155
|
-
|
|
156
|
-
## 3. Interfaces & Storage
|
|
157
|
-
- **Protocols / Transports:** <REST / gRPC / WebSockets / CLI stdin-stdout / None>
|
|
158
|
-
- **Storage / Persistence:** <PostgreSQL / SQLite / chrome.storage / Flat file / In-memory>
|
|
159
|
-
- **Specifications:** <OpenAPI 3.1 / Manifest V3 / Protobuf / None>
|
|
160
|
-
|
|
161
|
-
## 4. Quality & Verification
|
|
162
|
-
- **Testing Strategy:** Outside-In TDD with Nano-Cycles (Uncle Bob's 3 Laws)
|
|
163
|
-
- **Code Health Gates:** 100.00% test coverage gate, zero lint errors
|
|
164
|
-
- **DevSecOps:** <Semgrep / Trivy / Gitleaks / None>
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
---
|
|
168
|
-
|
|
169
|
-
## 5. Subdirectories & Progressive Resources
|
|
170
|
-
- [references/architecture_interview_matrix.md](./references/architecture_interview_matrix.md): Exhaustive 5-tier problem-first architecture interview questions and branch logic.
|
|
171
|
-
- [references/hexagonal_bootstrap_scaffolds.md](./references/hexagonal_bootstrap_scaffolds.md): Standardized directory trees and foundational templates across Go, Rust, Python, and TypeScript.
|
|
172
|
-
- [references/project_readme_template.md](./references/project_readme_template.md): Boilerplate template for replacing starter documentation with project-specific README.
|
|
173
|
-
- [scripts/bootstrap_workspace.sh](./scripts/bootstrap_workspace.sh): Topology-aware deterministic workspace initialization script.
|
|
1
|
+
---
|
|
2
|
+
name: lets-build
|
|
3
|
+
description: Use when initializing or bootstrapping a new project from this template workspace, or when the user invokes '/lets-build' to conduct deep research and relentless questioning across language, stack, frameworks, package managers, databases, and architectural layers, followed by scaffolding the finalized project. Do not use for routine bug fixing, editing existing code features, or auditing already bootstrapped projects.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Let's Build: Problem-First Architecture Research & Project Bootstrapper
|
|
7
|
+
|
|
8
|
+
> **Core Purpose:** Conduct an exhaustive, problem-first architectural interview across domain essence, physical constraints, and system topology to derive technical choices (language, runtime, frameworks, build tools, architectural style) with zero assumptions, synthesize an approved ADR, and bootstrap a lean, strictly YAGNI project foundation.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## 1. When to Use This Skill
|
|
13
|
+
|
|
14
|
+
- When the user starts a fresh project by copying this workspace into a new directory.
|
|
15
|
+
- When the user explicitly invokes `/lets-build` or asks to initialize/scaffold a new application.
|
|
16
|
+
- When transforming or re-architecting an existing project to adhere to the 28 cohesive domain rules.
|
|
17
|
+
- **Do NOT use for**:
|
|
18
|
+
- Routine bug fixes or minor edits on an already bootstrapped codebase.
|
|
19
|
+
- Adding a single endpoint or modifying an existing domain model.
|
|
20
|
+
- Running security audits (use `compliance-audit`).
|
|
21
|
+
- Refactoring existing code smells (use `clean-code-refactor`).
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## 2. Step-by-Step Execution Workflow
|
|
26
|
+
|
|
27
|
+
Progress through five mandatory stages:
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
1. DISCOVER (Toolchain & Root) ──► 2. INTERROGATE (Problem-First Interview) ──► 3. SYNTHESIZE (ADR & Blueprint) ──► 4. BOOTSTRAP (Topology Scaffolding) ──► 5. VERIFY (Prove Health)
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
### Phase 1: Discover (Toolchain & Workspace Inspection)
|
|
36
|
+
1. Inspect the workspace root: confirm whether this is a fresh copy or an existing codebase.
|
|
37
|
+
2. Check for pre-installed development runtimes and CLI tools (`go`, `rustc`/`cargo`, `python3`/`uv`, `node`/`pnpm`, `docker`, `semgrep`).
|
|
38
|
+
3. Verify that `AGENTS.md`, `memory.md`, and `docs/rules/` exist and remain intact.
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
### Phase 2: Interrogate (The Problem-First Architecture Interview)
|
|
43
|
+
Do NOT guess or assume any technology or stack choice. Execute the relentless interrogation using [references/architecture_interview_matrix.md](./references/architecture_interview_matrix.md). Group questions logically into digestible batches:
|
|
44
|
+
|
|
45
|
+
#### Batch 1: Problem Space & System Topology
|
|
46
|
+
1. **Domain & Problem Statement:** What real-world problem or capability does this system solve? What data moves, and what transformations occur?
|
|
47
|
+
2. **System Topology Classification:** Which topology best matches the execution target?
|
|
48
|
+
- Topology A: Web SaaS / Cloud Applications (Fullstack Web App vs Headless API)
|
|
49
|
+
- Topology B: Browser Extension (Manifest V3)
|
|
50
|
+
- Topology C: Game Engine / High-Performance Simulator (Bare metal, GPU)
|
|
51
|
+
- Topology D: Browser / Canvas Game (HTML5 Canvas / WebGL / WebGPU)
|
|
52
|
+
- Topology E: Desktop Application / CLI Utility (Native POSIX/Windows)
|
|
53
|
+
- Topology F: Embedded / Systems Library
|
|
54
|
+
|
|
55
|
+
#### Batch 2: Operational & Physical Constraints (The Machine Reality)
|
|
56
|
+
3. **Latency & Time Budget:** Hard real-time (<16.6ms / <7ms frame loop), interactive low-latency (<10ms keystroke), soft service API (<200ms p99), or batch?
|
|
57
|
+
4. **Memory Management & GC Tolerance:** Zero-GC pause tolerance (demands C/C++/Rust/Zig), managed throughput GC (Go, Java 21+, C# .NET 9), or single-threaded event loop (JS/TS)?
|
|
58
|
+
5. **Concurrency & Execution Model:** Single-threaded event loop, multi-threaded worker pools with work stealing, SIMD compute shaders, or distributed actors?
|
|
59
|
+
6. **Persistence & Connectivity:** Zero persistence (in-memory only), local flat/binary files, embedded SQLite, client-side browser storage, or enterprise RDBMS (Postgres)? Zero network, WebSockets, UDP, or HTTP/REST/gRPC?
|
|
60
|
+
|
|
61
|
+
#### Batch 3: Architectural Style & Emergent Toolchain
|
|
62
|
+
7. **Architectural Style Derivation:**
|
|
63
|
+
- Web SaaS ➔ Modular Monolith / Hexagonal (Ports & Adapters)
|
|
64
|
+
- Browser Extension ➔ Platform Scripting (`background`, `content`, `popup`, `storage`)
|
|
65
|
+
- Game Engine ➔ Data-Oriented Design (DOD / ECS / Cache-friendly contiguous memory)
|
|
66
|
+
- Canvas Game ➔ Game Loop (`Input ➔ Update ➔ Render`)
|
|
67
|
+
- Desktop CLI ➔ Command Pipeline (`Arg Parser ➔ Handler ➔ Stream I/O`)
|
|
68
|
+
8. **Primary Programming Language & Runtime:** Derived strictly from the constraints above (C, Rust, TypeScript, Go, Java, C#, Python).
|
|
69
|
+
9. **Package Manager & Toolchain:** Specific package manager (`cargo`, `pnpm`, `uv`, `go modules`) and build task runner.
|
|
70
|
+
|
|
71
|
+
#### Batch 4: Targeted Invariants (Topology-Scoped, 100% YAGNI)
|
|
72
|
+
Inquire *only* into the dimensions relevant to the selected topology:
|
|
73
|
+
- *If Web SaaS / Cloud Application:*
|
|
74
|
+
- **Interface Scope:** Headless API service only vs Fullstack Web Application (API + Web Frontend).
|
|
75
|
+
- **If Fullstack Web Application:** Frontend framework & build tool (React + Vite, Vue 3, Svelte 5), styling & accessible headless component primitives (Tailwind CSS, Radix UI / shadcn/ui per [`frontend_architecture.md`](../../../docs/rules/frontend_architecture.md)), client directory structure (`client/` + `src/` backend), and persistent app shell layout per [`ui_ux_architecture.md`](../../../docs/rules/ui_ux_architecture.md).
|
|
76
|
+
- **Backend & Data:** API protocol (REST/OpenAPI 3.1 vs gRPC), DB migration engine (Atlas/Flyway), tenancy isolation model, authentication, and OCI distroless containers.
|
|
77
|
+
- *If Browser Extension:* MV3 content script isolation (IIFE bundle), `chrome.storage.sync` flow, permissions. (Zero Docker/K8s/OpenAPI!).
|
|
78
|
+
- *If Frontend-only (Topology A variant):* Framework & build tool (React + Vite, Vue 3, Svelte 5), styling & headless primitives (Tailwind + Radix/shadcn per [`frontend_architecture.md`](../../../docs/rules/frontend_architecture.md)), `src/components|pages|hooks|services` layout, app-shell triage per [`ui_ux_architecture.md`](../../../docs/rules/ui_ux_architecture.md). (Zero Docker/SQL migrations!).
|
|
79
|
+
- *If Game Engine:* Graphics backend (Vulkan/DirectX/wgpu), memory allocators (arena/frame), ECS archetype model. (Zero Docker/SQL!).
|
|
80
|
+
- *If CLI:* Arg parsing library, POSIX exit codes, streaming I/O, `--json` formatting. (Zero Docker/SQL!).
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
### Phase 3: Synthesize (Architecture Blueprint & User Sign-Off)
|
|
85
|
+
1. Consolidate the user's answers into a formal **Consolidated Architectural Blueprint** (using Section 4 template).
|
|
86
|
+
2. Author the project's foundational Architectural Decision Record in `memory.md`, strictly starting with **`ADR-001: Target Technology Stack & Scaffolding Baseline`**. For a freshly initialized or bootstrapped project, `memory.md` must be a clean slate (zero prior decisions). If `memory.md` contains any legacy template ADRs from `azcodr`, sanitize and reset them so the new project starts from `ADR-001`.
|
|
87
|
+
3. **STOP AND ASK FOR EXPLICIT CONFIRMATION**: Present the blueprint and ADR to the user. Do NOT write scaffolding code until the user approves the blueprint.
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
### Phase 4: Bootstrap (Deterministic Topology Scaffolding)
|
|
92
|
+
Upon user confirmation:
|
|
93
|
+
1. Run the topology-aware workspace initialization script:
|
|
94
|
+
```bash
|
|
95
|
+
bash .agents/skills/lets-build/scripts/bootstrap_workspace.sh . <topology> <language>
|
|
96
|
+
```
|
|
97
|
+
2. Generate base infrastructure strictly for the selected topology (zero speculative bloat) using layouts from [references/hexagonal_bootstrap_scaffolds.md](./references/hexagonal_bootstrap_scaffolds.md):
|
|
98
|
+
- *Fullstack Web SaaS:* Backend in `src/`, Web Client in `client/` (`client/src/components/layout`, `client/src/components/ui`, `client/src/pages`, `client/src/hooks`, `client/src/services`), `specs/openapi/v1/openapi.yaml`, `specs/tokens/tokens.json`, `deploy/docker`, `deploy/compose`.
|
|
99
|
+
- *Headless Backend:* `src/domain/`, `src/ports/`, `src/adapters/`, `specs/openapi/v1/openapi.yaml`, `specs/tokens/tokens.json`, `deploy/docker`, `deploy/compose`.
|
|
100
|
+
- *Extension:* `manifest.json`, `src/background/index.ts`, `src/content/index.ts`, `src/popup/index.html`.
|
|
101
|
+
- *Game / Engine:* `src/core/`, `src/ecs/`, asset manifest, frame loop entrypoint.
|
|
102
|
+
- *CLI:* `src/cmd/`, `src/core/`, CLI entrypoint with exit code handling.
|
|
103
|
+
3. Generate build manifests (`Cargo.toml`, `package.json`, `go.mod`, `pyproject.toml`), linter configurations, and boundary smoke test (`scripts/smoke_test.sh`).
|
|
104
|
+
4. **Replace Starter README with Project-Specific README**:
|
|
105
|
+
Generate a clean, project-specific `README.md` using [references/project_readme_template.md](./references/project_readme_template.md), completely replacing meta-template content with the project's actual name, mission, stack highlights, quickstart commands, and directory tree.
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
### Phase 5: Verify & Handover to Domain Analysis
|
|
110
|
+
1. Run the workspace validation script:
|
|
111
|
+
```bash
|
|
112
|
+
bash .agents/skills/agentic-architect/scripts/validate_agentic_configs.sh
|
|
113
|
+
```
|
|
114
|
+
2. Execute toolchain dependency checks, build commands, and health/smoke tests:
|
|
115
|
+
- Compile code and verify zero compiler or lint errors.
|
|
116
|
+
- Verify boundary verification smoke test (`scripts/smoke_test.sh`).
|
|
117
|
+
3. **Mandatory Handover to Domain Analysis (STOP & PIVOT):**
|
|
118
|
+
- **`lets-build` IS NOW COMPLETE.** Do NOT proceed to write domain business entities, repositories, or application features.
|
|
119
|
+
- Present the bootstrapped technical skeleton to the user.
|
|
120
|
+
- Instruct the user to invoke `product-analyst` and `relentless-questioner` to initiate the **Domain Discovery & Requirements Engineering Phase** (Ubiquitous Language, Bounded Contexts, Aggregate Boundaries, INVEST User Stories, and Gherkin Acceptance Criteria) before any domain feature code is written.
|
|
121
|
+
- For applications with a user interface (Fullstack Web SaaS, Extensions, Desktop), the handover must explicitly instruct the user and agent to execute the **7-Pillar Design Architecture Triage Gate** ([`ui_ux_architecture.md`](../../../docs/rules/ui_ux_architecture.md)) to define user personas, persistent app shell navigation, and user journeys.
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## 3. Gotchas & What NOT to Do
|
|
126
|
+
|
|
127
|
+
- **MAJOR DONT: NEVER carry over template-internal ADRs from azcodr into a new project.** When scaffolding or bootstrapping a new project, `memory.md` must be a clean slate and start at `ADR-001`. Do NOT number the first architecture decision as ADR-025 or ADR-028 based on azcodr's template development history.
|
|
128
|
+
- **MAJOR DONT: NEVER silently drop the frontend or treat Fullstack Web SaaS as a headless backend API!** If the user selects a Fullstack Web application with a UI, you MUST scaffold both the client (`client/`) and backend (`src/`) baselines, configure build manifests for both, execute the 7-Pillar Design Architecture Triage Gate, and ensure user stories slice vertically across both UI and API layers.
|
|
129
|
+
- **MAJOR DONT: DO NOT invent, assume, or scaffold application domain entities, business logic, or feature pages during `/lets-build`.** The `lets-build` skill is strictly an infrastructure and technical stack bootstrapper. Fabricating business domain features without dedicated domain analysis and relentless questioning of the user is a fatal architectural defect.
|
|
130
|
+
- **DO NOT** assume the stack. Never start writing Go, Rust, Python, or TypeScript before asking the user.
|
|
131
|
+
- **DO NOT** scaffold universal web boilerplate (Docker, Kubernetes, OpenAPI, Postgres migrations) for non-backend projects (Browser Extensions, CLIs, Game Engines, Desktop apps).
|
|
132
|
+
- **DO NOT** force Hexagonal Architecture onto platforms where the application IS the platform integration (e.g. Browser Extensions). Match architecture to topology.
|
|
133
|
+
- **DO NOT** proceed to code generation without presenting the blueprint and receiving explicit user approval.
|
|
134
|
+
- **DO NOT** skip or delete the atomic domain rules in `docs/rules/` during bootstrapping. The rules govern the ongoing lifecycle of the newly bootstrapped project.
|
|
135
|
+
- **DO NOT** create monolithic files (> 250 lines) or large functions (> 30 lines). Maintain strict Clean Code standards.
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## 4. Structured Output Templates
|
|
140
|
+
|
|
141
|
+
### Consolidated Architectural Blueprint Template
|
|
142
|
+
```markdown
|
|
143
|
+
# Architectural Specification & Technology Blueprint
|
|
144
|
+
|
|
145
|
+
## 1. Problem Space & Topology
|
|
146
|
+
- **Project Domain:** <domain>
|
|
147
|
+
- **System Topology:** <Web SaaS / Browser Extension / Game Engine / Canvas Game / CLI / Library>
|
|
148
|
+
- **Architectural Style:** <Hexagonal / Platform Scripting / Data-Oriented Design / Game Loop / Command Pipeline>
|
|
149
|
+
|
|
150
|
+
## 2. Core Profile & Constraints
|
|
151
|
+
- **Primary Language & Runtime:** <language / version>
|
|
152
|
+
- **Package Manager & Build Tool:** <tool>
|
|
153
|
+
- **Latency / Performance Target:** <Hard real-time / Interactive / Service / Batch>
|
|
154
|
+
- **Memory & Concurrency Model:** <Zero GC / Managed GC / Single-threaded event loop>
|
|
155
|
+
|
|
156
|
+
## 3. Interfaces & Storage
|
|
157
|
+
- **Protocols / Transports:** <REST / gRPC / WebSockets / CLI stdin-stdout / None>
|
|
158
|
+
- **Storage / Persistence:** <PostgreSQL / SQLite / chrome.storage / Flat file / In-memory>
|
|
159
|
+
- **Specifications:** <OpenAPI 3.1 / Manifest V3 / Protobuf / None>
|
|
160
|
+
|
|
161
|
+
## 4. Quality & Verification
|
|
162
|
+
- **Testing Strategy:** Outside-In TDD with Nano-Cycles (Uncle Bob's 3 Laws)
|
|
163
|
+
- **Code Health Gates:** 100.00% test coverage gate, zero lint errors
|
|
164
|
+
- **DevSecOps:** <Semgrep / Trivy / Gitleaks / None>
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
## 5. Subdirectories & Progressive Resources
|
|
170
|
+
- [references/architecture_interview_matrix.md](./references/architecture_interview_matrix.md): Exhaustive 5-tier problem-first architecture interview questions and branch logic.
|
|
171
|
+
- [references/hexagonal_bootstrap_scaffolds.md](./references/hexagonal_bootstrap_scaffolds.md): Standardized directory trees and foundational templates across Go, Rust, Python, and TypeScript.
|
|
172
|
+
- [references/project_readme_template.md](./references/project_readme_template.md): Boilerplate template for replacing starter documentation with project-specific README.
|
|
173
|
+
- [scripts/bootstrap_workspace.sh](./scripts/bootstrap_workspace.sh): Topology-aware deterministic workspace initialization script.
|