azcodr 1.2.2 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/.agents/hooks.json.example +42 -0
  2. package/.agents/mcp_config.json.example +24 -0
  3. package/.agents/skills/agentic-architect/SKILL.md +14 -7
  4. package/.agents/skills/agentic-architect/references/agents_md_template.md +6 -3
  5. package/.agents/skills/agentic-architect/references/skill_architecture_inquiry.md +1 -1
  6. package/.agents/skills/agentic-architect/references/skill_template.md +2 -1
  7. package/.agents/skills/agentic-architect/scripts/validate_agentic_configs.sh +156 -4
  8. package/.agents/skills/clean-code-refactor/SKILL.md +6 -6
  9. package/.agents/skills/compliance-audit/SKILL.md +1 -1
  10. package/.agents/skills/lets-build/SKILL.md +12 -4
  11. package/.agents/skills/lets-build/references/hexagonal_bootstrap_scaffolds.md +1 -1
  12. package/.agents/skills/lets-build/references/project_readme_template.md +4 -4
  13. package/.agents/skills/lets-build/scripts/bootstrap_workspace.sh +63 -35
  14. package/.agents/skills/relentless-questioner/SKILL.md +10 -5
  15. package/AGENTS.md +25 -41
  16. package/README.md +27 -43
  17. package/bin/azcodr.js +3 -82
  18. package/docs/knowledge/ubiquitous_language.md +1 -6
  19. package/docs/rules/agentic_configuration.md +120 -32
  20. package/docs/rules/api_architecture.md +179 -0
  21. package/docs/rules/caching.md +30 -13
  22. package/docs/rules/cloud_native.md +10 -12
  23. package/docs/rules/cqrs.md +203 -0
  24. package/docs/rules/database_design.md +125 -0
  25. package/docs/rules/database_operations.md +56 -14
  26. package/docs/rules/design_patterns.md +18 -11
  27. package/docs/rules/devops_ci_cd.md +76 -0
  28. package/docs/rules/domain_driven_design.md +17 -13
  29. package/docs/rules/feature_flags.md +21 -4
  30. package/docs/rules/frontend_architecture.md +157 -0
  31. package/docs/rules/multitenancy_architecture.md +98 -0
  32. package/docs/rules/product_ownership.md +22 -27
  33. package/docs/rules/requirements_engineering.md +16 -14
  34. package/docs/rules/security_compliance.md +53 -0
  35. package/docs/rules/server_driven_ui.md +20 -3
  36. package/docs/rules/test_driven_development.md +118 -62
  37. package/docs/rules/type_safety.md +65 -0
  38. package/docs/rules/ui_ux_architecture.md +33 -30
  39. package/docs/rules/workflow_state_machines.md +20 -3
  40. package/lib/index.d.ts +0 -30
  41. package/lib/scaffold.js +9 -46
  42. package/memory.md +158 -14
  43. package/package.json +2 -3
  44. package/changes.md +0 -79
  45. package/docs/rules/accessibility.md +0 -31
  46. package/docs/rules/advanced_api_patterns.md +0 -104
  47. package/docs/rules/api_versioning.md +0 -113
  48. package/docs/rules/application_security.md +0 -23
  49. package/docs/rules/architecture_decision_records.md +0 -42
  50. package/docs/rules/compliance.md +0 -25
  51. package/docs/rules/container_infrastructure.md +0 -32
  52. package/docs/rules/continuous_deployment.md +0 -24
  53. package/docs/rules/continuous_integration.md +0 -20
  54. package/docs/rules/continuous_learning.md +0 -29
  55. package/docs/rules/database_integrity.md +0 -80
  56. package/docs/rules/database_migrations.md +0 -41
  57. package/docs/rules/database_performance.md +0 -44
  58. package/docs/rules/database_transactions.md +0 -81
  59. package/docs/rules/devsecops.md +0 -33
  60. package/docs/rules/multitenancy_isolation.md +0 -88
  61. package/docs/rules/react.md +0 -78
  62. package/docs/rules/rest_api_conventions.md +0 -46
  63. package/docs/rules/tenant_dynamic_schemas.md +0 -88
  64. package/docs/rules/tenant_pluggable_logic.md +0 -59
  65. package/docs/rules/test_isolation.md +0 -26
  66. package/docs/rules/typescript.md +0 -55
  67. package/docs/rules/ui_navigation.md +0 -20
  68. package/docs/rules/upstream_synchronization.md +0 -53
  69. package/docs/rules/workspace_isolation.md +0 -25
@@ -15,66 +15,75 @@ 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
64
  backend|web|saas)
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"
64
73
 
65
74
  echo "2. Scaffolding Specifications (specs/)..."
66
- mkdir -p "${WORKSPACE_ROOT}/specs/openapi"
67
- mkdir -p "${WORKSPACE_ROOT}/specs/tokens"
75
+ create_leaf "${WORKSPACE_ROOT}/specs/openapi"
76
+ create_leaf "${WORKSPACE_ROOT}/specs/tokens"
68
77
 
69
78
  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"
79
+ create_leaf "${WORKSPACE_ROOT}/tests/unit"
80
+ create_leaf "${WORKSPACE_ROOT}/tests/integration"
81
+ create_leaf "${WORKSPACE_ROOT}/tests/contracts"
82
+ create_leaf "${WORKSPACE_ROOT}/tests/acceptance"
74
83
 
75
84
  echo "4. Scaffolding Deployment Infrastructure (deploy/)..."
76
- mkdir -p "${WORKSPACE_ROOT}/deploy/docker"
77
- mkdir -p "${WORKSPACE_ROOT}/deploy/compose"
85
+ create_leaf "${WORKSPACE_ROOT}/deploy/docker"
86
+ create_leaf "${WORKSPACE_ROOT}/deploy/compose"
78
87
 
79
88
  TOKEN_SPEC="${WORKSPACE_ROOT}/specs/tokens/tokens.json"
80
89
  if [[ ! -f "${TOKEN_SPEC}" ]]; then
@@ -99,10 +108,29 @@ EOF
99
108
 
100
109
  *)
101
110
  echo "1. Scaffolding Generic / Library Source Tree (src/)..."
102
- mkdir -p "${WORKSPACE_ROOT}/src"
103
- mkdir -p "${WORKSPACE_ROOT}/tests/unit"
111
+ create_leaf "${WORKSPACE_ROOT}/src"
112
+ create_leaf "${WORKSPACE_ROOT}/tests/unit"
104
113
  ;;
105
114
  esac
106
115
 
116
+ # Deterministically generate boundary verification smoke test script (Phase 5 requirement)
117
+ SMOKE_TEST="${WORKSPACE_ROOT}/scripts/smoke_test.sh"
118
+ if [[ ! -f "${SMOKE_TEST}" ]]; then
119
+ echo "5. Generating boundary smoke test verification script (scripts/smoke_test.sh)..."
120
+ mkdir -p "${WORKSPACE_ROOT}/scripts"
121
+ cat << 'EOF' > "${SMOKE_TEST}"
122
+ #!/usr/bin/env bash
123
+ # ==============================================================================
124
+ # Boundary Verification Smoke Test (Phase 5 Verification Gate)
125
+ # ==============================================================================
126
+ set -euo pipefail
127
+
128
+ echo "Running boundary smoke verification..."
129
+ # Extend with project-specific runtime health checks (e.g. ping health endpoint, CLI --help)
130
+ echo "āœ… Boundary smoke verification passed!"
131
+ EOF
132
+ chmod +x "${SMOKE_TEST}"
133
+ fi
134
+
107
135
  echo "--------------------------------------------------------------"
108
136
  echo "āœ… Topology '${TOPOLOGY}' scaffolded with strict YAGNI (0 speculative folders)!"
@@ -58,10 +58,10 @@ Do NOT dump a massive 20-question static checklist. Execute the interview in **d
58
58
  ---
59
59
 
60
60
  ### 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)).
61
+ Check the user's proposed answers against the **28 Cohesive 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_design.md`](../../../docs/rules/database_design.md)).
63
+ - 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)).
64
+ - 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)).
65
65
  - Reconcile the conflict collaboratively before proceeding.
66
66
 
67
67
  ---
@@ -78,7 +78,7 @@ Synthesize the answers into an unambiguous **Feature Alignment Specification (FA
78
78
  - **DO NOT** ask 10+ questions at once. Keep batches small (2–3 questions) to maintain a collaborative conversation.
79
79
  - **DO NOT** start coding or planning in parallel while the interrogation is in progress.
80
80
  - **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.
81
+ - **DO NOT** compromise on the 28 cohesive domain rules. If a user request introduces an architectural violation, surface it immediately.
82
82
 
83
83
  ---
84
84
 
@@ -118,3 +118,8 @@ Synthesize the answers into an unambiguous **Feature Alignment Specification (FA
118
118
  ```
119
119
  - **Test Strategy:** [Contract / Integration / Unit tests required for 100% coverage]
120
120
  ```
121
+
122
+ ---
123
+
124
+ ## 5. Subdirectories & Progressive Resources
125
+ - [references/adaptive_question_trees.md](./references/adaptive_question_trees.md): Contextual branching trees for state mutations, multi-tenancy, integrations, and caching.
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,51 +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
- | **Upstream Sync** | [docs/rules/upstream_synchronization.md](./docs/rules/upstream_synchronization.md) | Logging generic architecture improvements to changes.md; zero baseline pollution. |
104
88
  ---
105
89
 
106
90
  ## 4. Agent Configuration & Workspace Architecture
@@ -115,4 +99,4 @@ To prevent context bloat and keep prompt overhead minimal, detailed engineering
115
99
  - [`relentless-questioner`](.agents/skills/relentless-questioner/SKILL.md): Dynamic context-aware interrogation loops before planning and coding.
116
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`.
117
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.
118
- - **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`, and `.windsurfrules` must remain identical via filesystem symbolic links to eliminate configuration divergence across different agent harnesses.
package/README.md CHANGED
@@ -38,11 +38,13 @@
38
38
  ā”œā”€ā”€ docs/
39
39
  │ ā”œā”€ā”€ knowledge/ # Institutional knowledge & domain contracts
40
40
  │ │ └── ubiquitous_language.md # Living Ubiquitous Language glossary template
41
- │ └── rules/ # 45 atomic single-responsibility domain rules
41
+ │ └── rules/ # 28 cohesive single-responsibility domain rules
42
42
  ā”œā”€ā”€ AGENTS.md # Lean root agentic configuration (< 120 lines)
43
- ā”œā”€ā”€ CLAUDE.md -> AGENTS.md # Filesystem symlink for harness parity
44
- ā”œā”€ā”€ agents.md -> AGENTS.md # Filesystem symlink for harness parity
45
- ā”œā”€ā”€ changes.md # Upstream changes ledger
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)
46
48
  ā”œā”€ā”€ memory.md # Master memory hub & Lightweight ADR ledger
47
49
  └── README.md # Project documentation
48
50
  ```
@@ -51,55 +53,38 @@
51
53
 
52
54
  ## šŸ“‹ Progressive Disclosure Rules Catalog (`docs/rules/`)
53
55
 
54
- The architecture enforces 45 atomic, single-responsibility domain rules. Read on demand to prevent prompt context bloat:
56
+ The architecture enforces 28 cohesive, single-responsibility domain rules. Read on demand to prevent prompt context bloat:
55
57
 
56
58
  | Domain | Rule Reference File | Key Focus & Invariants |
57
59
  |---|---|---|
58
- | **TDD Double Loop** | [`test_driven_development.md`](./docs/rules/test_driven_development.md) | Uncle Bob's 3 Laws, nano-cycles, Ping-Pong pairing, outside-in double loop. |
59
- | **Test Coverage & Isolation** | [`test_isolation.md`](./docs/rules/test_isolation.md) | 100.00% full-stack coverage, status codes, transactional DB rollback. |
60
- | **Clean Code** | [`clean_code.md`](./docs/rules/clean_code.md) | 5 evolutionary tipping points, Refactor-Before-Add, CQS, SLAP, DRY, fitness functions. |
61
- | **Design Patterns** | [`design_patterns.md`](./docs/rules/design_patterns.md) | Adapter, Factory, Strategy, Result `<T, E>`, and complete 23 GoF catalog. |
62
- | **Type Safety** | [`typescript.md`](./docs/rules/typescript.md) | Compiler strictness, branded nominal types, type safety, static sound invariants. |
63
- | **ADRs** | [`architecture_decision_records.md`](./docs/rules/architecture_decision_records.md) | Authoring Lightweight Architectural Decision Records in `memory.md`. |
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
64
  | **Authentication** | [`authentication.md`](./docs/rules/authentication.md) | In-memory access tokens, refresh token rotation (RTR), WebAuthn passkeys. |
65
65
  | **Authorization** | [`authorization.md`](./docs/rules/authorization.md) | CASL, OPA Rego policy engines, OpenFGA ReBAC, server guards. |
66
- | **Multi-Tenancy Isolation** | [`multitenancy_isolation.md`](./docs/rules/multitenancy_isolation.md) | Tenant context resolution, 4 universal data isolation models, RLS/interceptor safety. |
67
- | **REST API Conventions** | [`rest_api_conventions.md`](./docs/rules/rest_api_conventions.md) | Standard HTTP status codes, enumeration masking, subresource endpoints. |
68
- | **Advanced API Patterns** | [`advanced_api_patterns.md`](./docs/rules/advanced_api_patterns.md) | Allowed Actions (`_actions`), Idempotency keys, cursor pagination, OCC. |
69
- | **API Versioning** | [`api_versioning.md`](./docs/rules/api_versioning.md) | URI versioning (`/v1/`), RFC 8594 Sunset/Deprecation headers, 90-day window. |
70
- | **Tenant Dynamic Schemas** | [`tenant_dynamic_schemas.md`](./docs/rules/tenant_dynamic_schemas.md) | Hybrid core + JSON/document storage, JSON Schema Draft 2020-12, meta-schemas. |
71
- | **Tenant Pluggable Logic** | [`tenant_pluggable_logic.md`](./docs/rules/tenant_pluggable_logic.md) | Common Expression Language (CEL), Wasm sandboxing, durable workflows (Temporal/BPMN). |
72
- | **Server-Driven UI** | [`server_driven_ui.md`](./docs/rules/server_driven_ui.md) | Client-agnostic layout schemas, multi-renderer component registries, DTCG tokens. |
73
- | **Database Transactions** | [`database_transactions.md`](./docs/rules/database_transactions.md) | ACID atomicity, isolation levels, defensive timeouts, transactional outbox. |
74
- | **Database Migrations** | [`database_migrations.md`](./docs/rules/database_migrations.md) | Declarative/versioned migrations (Atlas/Flyway), zero-downtime expand-contract. |
75
- | **Database Integrity** | [`database_integrity.md`](./docs/rules/database_integrity.md) | Foreign keys, domain CHECK constraints, interval EXCLUDE, soft-delete indexes. |
76
- | **Database Operations** | [`database_operations.md`](./docs/rules/database_operations.md) | Continuous PITR, autovacuum/defrag tuning, connection pooling, role separation. |
77
- | **Database Performance** | [`database_performance.md`](./docs/rules/database_performance.md) | Eliminating N+1 queries, DataLoader batching, composite tenant indexes. |
78
- | **Caching** | [`caching.md`](./docs/rules/caching.md) | Cache Port semantics, Cache-Aside, jittered TTLs, XFetch stampede defense. |
79
- | **Application Security** | [`application_security.md`](./docs/rules/application_security.md) | OWASP Top 10 defenses, cryptographic rigor, token bucket rate limiting. |
80
- | **Regulatory Compliance** | [`compliance.md`](./docs/rules/compliance.md) | SOC 2 Type II controls, ISO/IEC 27001 ISMS, GDPR data erasure rights. |
81
- | **DevSecOps** | [`devsecops.md`](./docs/rules/devsecops.md) | Secretlint pre-commit gating, CycloneDX SBOM generation, Trivy/Grype scanning. |
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. |
82
75
  | **Error Architecture** | [`error_handling.md`](./docs/rules/error_handling.md) | Fail-fast schema validation, structured OTel/Pino tracing, RFC 7807 envelopes. |
83
- | **Feature Flags** | [`feature_flags.md`](./docs/rules/feature_flags.md) | OpenFeature standard, Flipt/Unleash backends, targeting, kill switches. |
84
- | **Continuous Integration** | [`continuous_integration.md`](./docs/rules/continuous_integration.md) | Shift-left automated pipelines, trunk-based development, build caching. |
85
- | **Continuous Deployment** | [`continuous_deployment.md`](./docs/rules/continuous_deployment.md) | Zero-downtime rollouts, Cosign container signing, container minimization. |
86
- | **Container Infrastructure** | [`container_infrastructure.md`](./docs/rules/container_infrastructure.md) | Unified gateway, minimal OCI distroless/scratch containers, non-root user security. |
76
+ | **Feature Flags** | [`feature_flags.md`](./docs/rules/feature_flags.md) | OpenFeature standard, Flipt/Unleash backends, targeting, kill switches & YAGNI gate. |
87
77
  | **Transactional Email** | [`transactional_email.md`](./docs/rules/transactional_email.md) | Declarative templates (MJML/JSON), safe interpolation, SMTP integration testing. |
88
- | **Accessibility** | [`accessibility.md`](./docs/rules/accessibility.md) | WCAG 2.2 AA compliance, accessible primitives, focus trapping, ARIA live regions. |
89
- | **UI Navigation** | [`ui_navigation.md`](./docs/rules/ui_navigation.md) | Bidirectional URL state synchronization, deep linking, search params. |
90
- | **UI/UX Architecture** | [`ui_ux_architecture.md`](./docs/rules/ui_ux_architecture.md) | Design triage, persistent app shell, collapsible sidebar, dual-experience portals. |
91
- | **React & Frontend** | [`react.md`](./docs/rules/react.md) | Modern React, shadcn/ui, TanStack Query, React Hook Form, and Zod validation. |
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. |
92
80
  | **Requirements Engineering** | [`requirements_engineering.md`](./docs/rules/requirements_engineering.md) | User stories vs requirements, 3 C's, INVEST vertical cake slicing, Gherkin. |
93
81
  | **Product Ownership** | [`product_ownership.md`](./docs/rules/product_ownership.md) | Product Backlog Management, OKRs, Kano/MoSCoW/RICE, Product Value, empiricism. |
94
- | **Domain-Driven Design** | [`domain_driven_design.md`](./docs/rules/domain_driven_design.md) | Problem vs Solution Space, Ubiquitous Language, Aggregates, Capability Mapping. |
95
- | **Workflow State Machines** | [`workflow_state_machines.md`](./docs/rules/workflow_state_machines.md) | Configurable workflows, in-aggregate invariant FSMs, transition guards & audit logs. |
96
- | **Cloud-Native 12-Factor** | [`cloud_native.md`](./docs/rules/cloud_native.md) | 12-Factor (2026 Edition), OpenTelemetry (OTel), stateless isolates. |
97
- | **Agentic Config & Skills** | [`agentic_configuration.md`](./docs/rules/agentic_configuration.md) | Progressive disclosure architecture, skill inquiry branches, refinement loop. |
98
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. |
99
87
  | **Relentless Questioning** | [`relentless_questioning.md`](./docs/rules/relentless_questioning.md) | Dynamic context-aware interrogation loops, adaptive decision trees. |
100
- | **Workspace Isolation** | [`workspace_isolation.md`](./docs/rules/workspace_isolation.md) | Strict workspace sovereignty, zero global contamination, local ground truth. |
101
- | **Continuous Learning** | [`continuous_learning.md`](./docs/rules/continuous_learning.md) | Direct 4-step rule ingestion, root-cause analysis, dynamic invariant updates. |
102
- | **Upstream Sync** | [`upstream_synchronization.md`](./docs/rules/upstream_synchronization.md) | Logging generic architecture improvements to changes.md; zero baseline pollution. |
103
88
 
104
89
  ---
105
90
 
@@ -167,4 +152,3 @@ Once confirmed, the agent automatically executes:
167
152
 
168
153
  - šŸ“– **[Living Ubiquitous Language Glossary](./docs/knowledge/ubiquitous_language.md)**: Authoritative domain vocabulary contract.
169
154
  - šŸ“œ **[Lightweight ADR Ledger](./memory.md)**: Formal Architectural Decision Records and governing rules.
170
- - šŸ“ **[Upstream Changes Ledger](./changes.md)**: Record candidate improvements and generic patterns for the upstream azcodr template.
package/bin/azcodr.js CHANGED
@@ -4,7 +4,7 @@
4
4
  const path = require('node:path');
5
5
  const readline = require('node:readline');
6
6
  const fs = require('node:fs');
7
- const { scaffold, logChange, getTemplateDir } = require('../lib/scaffold.js');
7
+ const { scaffold, getTemplateDir } = require('../lib/scaffold.js');
8
8
  const pkg = require('../package.json');
9
9
 
10
10
  function printHelp(out = console.log) {
@@ -14,13 +14,11 @@ Enterprise Multi-Tenant Architecture & Agentic Engineering Starter Template
14
14
 
15
15
  Usage:
16
16
  npx azcodr [directory] [options]
17
- npx azcodr change <title> [options]
18
17
 
19
18
  Commands:
20
19
  [directory] Scaffold azcodr template into directory (default: current directory)
21
- change <title> Log a generic architectural change to changes.md
22
20
 
23
- Scaffold Options:
21
+ Options:
24
22
  -d, --dry-run Simulate scaffolding without modifying filesystem
25
23
  -s, --silent Suppress console output messages
26
24
  -f, --force Overwrite existing files in target directory without confirmation
@@ -28,17 +26,10 @@ Scaffold Options:
28
26
  -v, --version Display version number
29
27
  -h, --help Display this help message
30
28
 
31
- Change Options:
32
- -c, --category Category (Architecture | Rule | Skill | Infrastructure | CLI | Knowledge Hub)
33
- -f, --files Target file(s) affected (e.g. "docs/rules/caching.md")
34
- -r, --rationale Rationale for upstream template incorporation
35
- -d, --desc Detailed description of the change
36
-
37
29
  Examples:
38
30
  npx azcodr my-project
39
31
  npx azcodr . --dry-run
40
32
  npx azcodr . --force
41
- npx azcodr change "Add Wasm plugin interface" -c Architecture
42
33
  `);
43
34
  }
44
35
 
@@ -67,70 +58,6 @@ function askQuestion(query, { input = process.stdin, output = process.stdout } =
67
58
  });
68
59
  }
69
60
 
70
- async function handleLogChange(rawArgs = process.argv.slice(2), io = {}) {
71
- const {
72
- out = console.log,
73
- err = console.error,
74
- exit = process.exit,
75
- stdin = process.stdin,
76
- stdout = process.stdout,
77
- cwd = process.cwd(),
78
- logChange: logChangeFn = logChange
79
- } = io;
80
-
81
- let title = null;
82
- let category = 'Architecture';
83
- let targetFiles = 'docs/rules/';
84
- let rationale = 'Generic architectural enhancement';
85
- let description = '';
86
-
87
- for (let i = 1; i < rawArgs.length; i++) {
88
- const a = rawArgs[i];
89
- if (a === '-c' || a === '--category') {
90
- category = rawArgs[++i] || category;
91
- } else if (a === '-f' || a === '--files') {
92
- targetFiles = rawArgs[++i] || targetFiles;
93
- } else if (a === '-r' || a === '--rationale') {
94
- rationale = rawArgs[++i] || rationale;
95
- } else if (a === '-d' || a === '--desc' || a === '--description') {
96
- description = rawArgs[++i] || description;
97
- } else if (a.startsWith('-')) {
98
- err(`āŒ Error: Unknown argument '${a}'. Run 'npx azcodr --help' for available options.`);
99
- return exit(1);
100
- } else if (!title) {
101
- title = a;
102
- }
103
- }
104
-
105
- if (!title) {
106
- if (stdin.isTTY) {
107
- title = await askQuestion('? Change title: ', { input: stdin, output: stdout });
108
- }
109
- }
110
-
111
- if (!title) {
112
- err('āŒ Error: A title is required to log an upstream change.');
113
- err('Usage: npx azcodr change "<title>" [-c Category] [-f Files] [-r Rationale] [-d Description]');
114
- return exit(1);
115
- }
116
-
117
- try {
118
- const res = logChangeFn({
119
- title,
120
- category,
121
- targetFiles,
122
- rationale,
123
- description,
124
- targetDir: cwd
125
- });
126
- out(`\nāœ… Upstream change logged to ${res.filePath}\n`);
127
- return exit(0);
128
- } catch (error) {
129
- err(`\nāŒ Failed to log change: ${error.message}\n`);
130
- return exit(1);
131
- }
132
- }
133
-
134
61
  async function runCli(rawArgs = process.argv.slice(2), io = {}) {
135
62
  const {
136
63
  out = console.log,
@@ -143,10 +70,6 @@ async function runCli(rawArgs = process.argv.slice(2), io = {}) {
143
70
  scaffold: scaffoldFn = scaffold
144
71
  } = io;
145
72
 
146
- if (rawArgs[0] === 'change' || rawArgs[0] === 'log-change') {
147
- return handleLogChange(rawArgs, io);
148
- }
149
-
150
73
  let targetDir = null;
151
74
  let force = false;
152
75
  let noGit = false;
@@ -257,9 +180,8 @@ async function runCli(rawArgs = process.argv.slice(2), io = {}) {
257
180
  out(' āœ… Progressive disclosure rules copied (docs/rules/)');
258
181
  out(' āœ… Workspace knowledge hub and ADR ledger copied (docs/knowledge/, memory.md)');
259
182
  out(' āœ… Specialized agentic skills copied (.agents/skills/)');
260
- out(' āœ… Upstream changes ledger initialized (changes.md)');
261
183
  out(' āœ… Editor formatting standards initialized (.editorconfig)');
262
- out(' āœ… Agent directives and harness symlinks established (AGENTS.md, CLAUDE.md, agents.md)');
184
+ out(' āœ… Agent directives and harness symlinks established (AGENTS.md, CLAUDE.md, agents.md, GEMINI.md, .cursorrules, .windsurfrules)');
263
185
  if (result.gitInitialized) {
264
186
  out(' āœ… Git repository initialized');
265
187
  }
@@ -294,7 +216,6 @@ if (require.main === module) {
294
216
 
295
217
  module.exports = {
296
218
  runCli,
297
- handleLogChange,
298
219
  askQuestion,
299
220
  printHelp,
300
221
  printVersion,
@@ -8,12 +8,7 @@
8
8
 
9
9
  | Canonical Term | Business Definition | Bounded Context | Forbidden Synonyms | Code & Database Identifiers |
10
10
  |---|---|---|---|---|
11
- | **Organization** | The top-level administrative and multi-tenant isolation container. | Multi-Tenancy & Identity | Account, Company, Workspace, TenantGroup | `Organization`, `organizationId`, `organizations` table |
12
- | **User** | A human actor authenticated with verified credentials across the platform. | Identity & Access | Member (when unauthenticated), Account, Login | `User`, `userId`, `users` table |
13
- | **Membership** | The formal association connecting a User to an Organization with assigned roles. | Authorization & RBAC | UserOrg, Seat, PermissionAssignment | `Membership`, `membershipId`, `memberships` table |
14
- | **Role** | A named set of granular `<entity>:<action>` permissions within an organization. | Authorization | Group, Profile, Level | `Role`, `roleId`, `roles` table |
15
- | **Resource** | The primary business entity managed within the domain core. | Core Domain | Item, Object, Record, Entity | `Resource`, `resourceId`, `resources` table |
16
- | **Ledger Entry** | An immutable audit record detailing a financial or transactional state change. | Finance & Accounting | TransactionRow, MoneyLog, BillEntry | `LedgerEntry`, `ledgerEntryId`, `ledger_entries` table |
11
+ | *(No domain terms defined yet)* | *Define business meaning during Phase 1 Domain Discovery.* | *e.g. Core Domain* | *Synonyms strictly forbidden across code & UI.* | *Exact type, class, or table name.* |
17
12
 
18
13
  ---
19
14