azcodr 1.3.0 → 1.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/.agents/hooks.json.example +42 -0
  2. package/.agents/mcp_config.json.example +24 -0
  3. package/.agents/scripts/safety_guard.sh +16 -0
  4. package/.agents/scripts/verify_completion.sh +13 -0
  5. package/.agents/skills/agentic-architect/SKILL.md +15 -8
  6. package/.agents/skills/agentic-architect/references/agents_md_template.md +6 -3
  7. package/.agents/skills/agentic-architect/references/skill_architecture_inquiry.md +1 -1
  8. package/.agents/skills/agentic-architect/references/skill_template.md +2 -1
  9. package/.agents/skills/agentic-architect/scripts/validate_agentic_configs.sh +189 -6
  10. package/.agents/skills/clean-code-refactor/SKILL.md +6 -6
  11. package/.agents/skills/compliance-audit/SKILL.md +1 -1
  12. package/.agents/skills/lets-build/SKILL.md +22 -7
  13. package/.agents/skills/lets-build/references/architecture_interview_matrix.md +8 -2
  14. package/.agents/skills/lets-build/references/hexagonal_bootstrap_scaffolds.md +53 -6
  15. package/.agents/skills/lets-build/references/project_readme_template.md +4 -4
  16. package/.agents/skills/lets-build/scripts/bootstrap_workspace.sh +181 -36
  17. package/.agents/skills/product-analyst/SKILL.md +13 -2
  18. package/.agents/skills/relentless-questioner/SKILL.md +13 -5
  19. package/.agents/skills/relentless-questioner/references/adaptive_question_trees.md +18 -0
  20. package/.gitignore +2 -0
  21. package/AGENTS.md +25 -40
  22. package/README.md +27 -40
  23. package/bin/azcodr.js +9 -4
  24. package/docs/rules/agentic_configuration.md +123 -32
  25. package/docs/rules/api_architecture.md +179 -0
  26. package/docs/rules/caching.md +30 -13
  27. package/docs/rules/cloud_native.md +10 -12
  28. package/docs/rules/cqrs.md +203 -0
  29. package/docs/rules/database_design.md +125 -0
  30. package/docs/rules/database_operations.md +56 -14
  31. package/docs/rules/design_patterns.md +18 -11
  32. package/docs/rules/devops_ci_cd.md +76 -0
  33. package/docs/rules/domain_driven_design.md +17 -13
  34. package/docs/rules/feature_flags.md +21 -4
  35. package/docs/rules/frontend_architecture.md +157 -0
  36. package/docs/rules/multitenancy_architecture.md +98 -0
  37. package/docs/rules/product_ownership.md +22 -27
  38. package/docs/rules/relentless_questioning.md +4 -0
  39. package/docs/rules/requirements_engineering.md +16 -14
  40. package/docs/rules/security_compliance.md +53 -0
  41. package/docs/rules/server_driven_ui.md +20 -3
  42. package/docs/rules/test_driven_development.md +119 -62
  43. package/docs/rules/type_safety.md +65 -0
  44. package/docs/rules/ui_ux_architecture.md +33 -30
  45. package/docs/rules/workflow_state_machines.md +20 -3
  46. package/lib/scaffold.js +117 -5
  47. package/memory.md +12 -131
  48. package/package.json +2 -2
  49. package/docs/rules/accessibility.md +0 -31
  50. package/docs/rules/advanced_api_patterns.md +0 -104
  51. package/docs/rules/api_versioning.md +0 -113
  52. package/docs/rules/application_security.md +0 -23
  53. package/docs/rules/architecture_decision_records.md +0 -42
  54. package/docs/rules/compliance.md +0 -25
  55. package/docs/rules/container_infrastructure.md +0 -32
  56. package/docs/rules/continuous_deployment.md +0 -24
  57. package/docs/rules/continuous_integration.md +0 -20
  58. package/docs/rules/continuous_learning.md +0 -29
  59. package/docs/rules/database_integrity.md +0 -80
  60. package/docs/rules/database_migrations.md +0 -41
  61. package/docs/rules/database_performance.md +0 -44
  62. package/docs/rules/database_transactions.md +0 -81
  63. package/docs/rules/devsecops.md +0 -33
  64. package/docs/rules/multitenancy_isolation.md +0 -88
  65. package/docs/rules/react.md +0 -78
  66. package/docs/rules/rest_api_conventions.md +0 -46
  67. package/docs/rules/tenant_dynamic_schemas.md +0 -88
  68. package/docs/rules/tenant_pluggable_logic.md +0 -59
  69. package/docs/rules/test_isolation.md +0 -26
  70. package/docs/rules/typescript.md +0 -55
  71. package/docs/rules/ui_navigation.md +0 -20
  72. package/docs/rules/workspace_isolation.md +0 -25
@@ -1,26 +0,0 @@
1
- # Test Coverage, Isolation & Determinism
2
-
3
- > **Core Mandate:** Enforce 100.00% test coverage thresholds, transactional database rollback per test, deterministic data factories, and zero-sleep flakiness elimination across all test suites.
4
-
5
- ---
6
-
7
- ## 1. Mandatory 100.00% Test Coverage Thresholds
8
-
9
- - **Strict Coverage Thresholds**: Maintain line, function, branch, and statement test coverage at **100.00%** across all backend domain logic, adapters, contracts, and frontend suites. Strictly enforce 100% threshold failure gates in CI pipelines.
10
- - **Exhaustive Status Codes & Error Branches**: Explicitly test all HTTP/gRPC response codes:
11
- - Success: `200 OK`, `201 Created`, `204 No Content`
12
- - Client Errors: `400 Bad Request`, `401 Unauthorized`, `403 Forbidden`, `404 Not Found`, `409 Conflict`, `422 Unprocessable Entity`, `429 Too Many Requests`
13
- - Server Failures: `500 Internal Server Error`, `503 Service Unavailable`
14
- - **UI Interaction States & Edge Cases**: Fully assert all presentation states (loading spinners, disabled controls, error banners, success feedback, empty states) across suites.
15
-
16
- ---
17
-
18
- ## 2. Database Test Isolation & Zero Flakiness
19
-
20
- - **Transactional Rollback per Integration Test**:
21
- - Every integration test that interacts with persistence must execute within a scoped transaction that is rolled back upon test completion (`afterEach` rollback) or use ephemeral, disposable database isolates. Never leave mutated rows that pollute subsequent tests.
22
- - **Deterministic Test Data Factories**:
23
- - Utilize strongly-typed test data factories (`buildUser()`, `buildOrder()`) with randomized unique identifiers rather than hardcoded magic strings or fixed database IDs.
24
- - **Zero Sleep / Flakiness Elimination**:
25
- - Strictly forbid arbitrary `sleep()` or timeout pauses in tests.
26
- - Rely exclusively on deterministic condition polling (`waitFor(condition)`) or reactive event promises to eliminate test flakiness.
@@ -1,55 +0,0 @@
1
- # Static Type Safety & Sound Type Systems
2
-
3
- > **Core Mandate:** Enforce maximum compiler strictness, branded nominal typing for domain identifiers, strict prohibition of untyped escape hatches, and automated pre-commit quality guardrails across polyglot implementations.
4
-
5
- ---
6
-
7
- ## 1. Maximum Compiler Strictness & Soundness
8
-
9
- Regardless of the execution language chosen for an adapter or service, enforce maximum compiler rigor to eliminate runtime null pointer exceptions, unhandled type cases, and memory errors at compile time:
10
-
11
- - **TypeScript**: Enable all strict compiler flags (`strict: true`, `noImplicitAny: true`, `strictNullChecks: true`, `noUncheckedIndexedAccess: true`).
12
- - **Rust**: Enable `#![deny(clippy::all)]` and `#![deny(missing_docs)]` with zero `unsafe` blocks.
13
- - **Go**: Enable comprehensive static analysis (`golangci-lint` with `errcheck`, `govet`, `staticcheck`).
14
- - **Python**: Enforce strict type checking (`mypy --strict` or `pyright`).
15
-
16
- ---
17
-
18
- ## 2. Branded Nominal Typing & Primitive Obsession Elimination
19
-
20
- Prevent accidental mixing of raw primitive identifiers (e.g. passing an arbitrary `string` representing a `TenantId` where a `UserId` is expected) by enforcing nominal types:
21
-
22
- ```
23
- ┌────────────────────────────────────────────────────────┐
24
- │ Nominal Domain Identifier Pattern (Polyglot) │
25
- ├────────────────────────────────────────────────────────┤
26
- │ Rust: struct TenantId(String); │
27
- │ struct UserId(String); │
28
- │ Go: type TenantId string │
29
- │ type UserId string │
30
- │ TypeScript: type TenantId = Brand<string, 'TenantId'>; │
31
- │ type UserId = Brand<string, 'UserId'>; │
32
- │ Python: TenantId = NewType('TenantId', str) │
33
- │ UserId = NewType('UserId', str) │
34
- └────────────────────────────────────────────────────────┘
35
- ```
36
-
37
- Domain functions must accept and return branded types rather than raw primitive strings or integers.
38
-
39
- ---
40
-
41
- ## 3. Strict Prohibition of Untyped Escape Hatches
42
-
43
- - **Zero Tolerance for Unsound Types**: Strictly prohibit `any` in TypeScript, raw `interface{}` / `any` without type assertion checks in Go, raw `Any` in Python, or unchecked casts in Java/Rust.
44
- - **Runtime Validation at Boundaries**: External payloads (network requests, message queues, disk files) must be parsed and narrowed into strongly-typed domain structures before passing to application services.
45
- - **Commit Guardrails**: Enforce Conventional Commits via commit linters. Never bypass pre-commit hooks running static type checking, formatting, and linters.
46
-
47
- ---
48
-
49
- ## 4. Module Path Aliases & Relative Traversal Elimination
50
-
51
- - **Path Alias Mandate (`@/*`)**: All TypeScript packages in the workspace must configure and standardize on `@/*` mapped to `./src/*` across `tsconfig.json` (`"baseUrl": "."`, `"paths": { "@/*": ["./src/*"] }`), bundlers (Vite `resolve.alias`), and test runners (Vitest `resolve.alias`).
52
- - **Strict Prohibition of Deep Relative Traversal**: Never use deep relative traversals (`../../../..`, `../../..`, `../..`) across layers or contexts. Deep relative paths create fragile coupling, impair refactoring, and obscure domain layer boundaries.
53
- - **Node.js ESM Production Resolution**: In backend environments executing compiled JavaScript under Node.js ESM (`node dist/index.js`), use `tsc-alias` post-compilation (`tsc && tsc-alias`) to resolve path aliases in `dist/` to valid relative paths without introducing runtime loader overhead.
54
- - **Scope of Sibling Imports**: Local relative imports (`./file.js`) are permitted only for immediate siblings within the identical directory. Any import traversing up a directory hierarchy or crossing architectural boundaries (domain, ports, adapters, components, context) MUST resolve via `@/*`.
55
-
@@ -1,20 +0,0 @@
1
- # UI Navigation & URL State Synchronization
2
-
3
- > **Core Mandate:** Enforce bidirectional URL state synchronization for all interactive view states, preserving deep linkability, bookmarkability, and native browser navigation.
4
-
5
- ---
6
-
7
- ## 1. Bidirectional URL State Synchronization
8
-
9
- Every view state that represents navigation, active tab, filtering, sorting, pagination, or search query must synchronize bidirectionally with URL search parameters (`useSearchParams`):
10
- - **Bookmarkability**: A user copying the browser URL must be able to restore the exact view, active tab, filter selections, and pagination page on any device.
11
- - **Browser History Integration**: The browser's back and forward buttons must navigate between state transitions smoothly without triggering full page reloads.
12
-
13
- ---
14
-
15
- ## 2. Deep Linking Standards
16
-
17
- - **Tabbed Interfaces**: Encode active tab keys in query params (e.g. `?tab=security` or `/settings/security`).
18
- - **Data Tables & Lists**: Preserve table states in URL parameters:
19
- - `?page=2&limit=25&sort=createdAt&order=desc&status=ACTIVE`
20
- - **Modal & Drawer States**: If a modal or drawer represents an actionable sub-view (e.g. `?modal=edit-user&userId=123`), synchronize it with the URL so direct links open the intended context.
@@ -1,25 +0,0 @@
1
- # Workspace Isolation & Zero Global Context Interference
2
-
3
- > **Core Mandate:** Enforce strict workspace containment within the workspace root (`./`), strictly prohibiting any leakage, interference, or unverified assumptions from global configurations, external directories, or sibling projects.
4
-
5
- ---
6
-
7
- ## 1. Principle of Workspace Sovereignty
8
-
9
- - **Ground Truth Boundary**: Only files, dependencies, configuration files (`package.json`, `tsconfig.json`, `docker-compose.yml`), and verified command executions within the local workspace (`./`) constitute project truth.
10
- - **Zero Global Contamination**: Never import, execute, or assume tools, environment variables, or conventions from global system directories (e.g. `~/.config`, `/tmp`, `~/.gemini/antigravity-cli`, or parent directories) unless explicitly defined within local workspace configuration.
11
- - **Sibling Project Isolation**: Strictly ignore all external or legacy projects. Do not read from or write to directories outside the local repository (`./`).
12
-
13
- ---
14
-
15
- ## 2. Dependency & Tooling Isolation
16
-
17
- - **Local Package Manager**: Standardize strictly on local workspace dependencies managed via `npm` within this workspace. Never rely on global npm packages (`npm install -g`).
18
- - **Container Network Containment**: All Docker containers and bridge networks must be named and scoped specifically to this project (e.g. `azcodr_network`, `azcodr_postgres`) to prevent port collisions or cross-project data leakage.
19
-
20
- ---
21
-
22
- ## 3. Subagent & Execution Context Sandboxing
23
-
24
- - When spawning subagents or executing commands, ensure the working directory (`Cwd`) is anchored strictly to the workspace root (`./`).
25
- - Subagents must never carry over assumptions from other workspaces or global memory pools.