forgecraft-mcp 1.2.0 → 1.3.2
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/README.md +525 -525
- package/dist/cli/help.js +44 -44
- package/dist/registry/renderer-skeletons.js +92 -92
- package/dist/shared/gs-score-logger.js +6 -6
- package/dist/tools/add-module.js +123 -123
- package/dist/tools/advice-registry.js +18 -18
- package/dist/tools/check-cascade-report.js +64 -64
- package/dist/tools/configure-mcp.d.ts +3 -0
- package/dist/tools/configure-mcp.d.ts.map +1 -1
- package/dist/tools/configure-mcp.js +10 -0
- package/dist/tools/configure-mcp.js.map +1 -1
- package/dist/tools/forgecraft-dispatch.d.ts.map +1 -1
- package/dist/tools/forgecraft-dispatch.js +3 -0
- package/dist/tools/forgecraft-dispatch.js.map +1 -1
- package/dist/tools/forgecraft-schema-params.d.ts +9 -0
- package/dist/tools/forgecraft-schema-params.d.ts.map +1 -1
- package/dist/tools/forgecraft-schema-params.js +21 -0
- package/dist/tools/forgecraft-schema-params.js.map +1 -1
- package/dist/tools/forgecraft-schema.d.ts +9 -0
- package/dist/tools/forgecraft-schema.d.ts.map +1 -1
- package/dist/tools/refresh-output.js +14 -14
- package/dist/tools/scaffold-spec-stubs.js +115 -115
- package/dist/tools/scaffold-templates.js +62 -62
- package/dist/tools/setup-artifact-writers.d.ts +30 -0
- package/dist/tools/setup-artifact-writers.d.ts.map +1 -1
- package/dist/tools/setup-artifact-writers.js +120 -8
- package/dist/tools/setup-artifact-writers.js.map +1 -1
- package/dist/tools/setup-phase1.d.ts +3 -0
- package/dist/tools/setup-phase1.d.ts.map +1 -1
- package/dist/tools/setup-phase1.js +79 -35
- package/dist/tools/setup-phase1.js.map +1 -1
- package/dist/tools/setup-phase2.d.ts +2 -0
- package/dist/tools/setup-phase2.d.ts.map +1 -1
- package/dist/tools/setup-phase2.js +10 -1
- package/dist/tools/setup-phase2.js.map +1 -1
- package/dist/tools/setup-project.d.ts +18 -0
- package/dist/tools/setup-project.d.ts.map +1 -1
- package/dist/tools/setup-project.js +77 -1
- package/dist/tools/setup-project.js.map +1 -1
- package/dist/tools/spec-parser-tags.d.ts +9 -0
- package/dist/tools/spec-parser-tags.d.ts.map +1 -1
- package/dist/tools/spec-parser-tags.js +92 -0
- package/dist/tools/spec-parser-tags.js.map +1 -1
- package/package.json +89 -86
- package/templates/analytics/instructions.yaml +37 -37
- package/templates/analytics/mcp-servers.yaml +11 -11
- package/templates/analytics/structure.yaml +25 -25
- package/templates/api/instructions.yaml +231 -231
- package/templates/api/mcp-servers.yaml +22 -13
- package/templates/api/nfr.yaml +23 -23
- package/templates/api/review.yaml +103 -103
- package/templates/api/structure.yaml +34 -34
- package/templates/api/verification.yaml +132 -132
- package/templates/cli/instructions.yaml +31 -31
- package/templates/cli/mcp-servers.yaml +11 -11
- package/templates/cli/review.yaml +53 -53
- package/templates/cli/structure.yaml +16 -16
- package/templates/data-lineage/instructions.yaml +28 -28
- package/templates/data-lineage/mcp-servers.yaml +22 -22
- package/templates/data-pipeline/instructions.yaml +84 -84
- package/templates/data-pipeline/mcp-servers.yaml +13 -13
- package/templates/data-pipeline/nfr.yaml +39 -39
- package/templates/data-pipeline/structure.yaml +23 -23
- package/templates/fintech/hooks.yaml +55 -55
- package/templates/fintech/instructions.yaml +112 -112
- package/templates/fintech/mcp-servers.yaml +13 -13
- package/templates/fintech/nfr.yaml +46 -46
- package/templates/fintech/playbook.yaml +210 -210
- package/templates/fintech/verification.yaml +239 -239
- package/templates/game/instructions.yaml +289 -289
- package/templates/game/mcp-servers.yaml +38 -38
- package/templates/game/nfr.yaml +64 -64
- package/templates/game/playbook.yaml +214 -214
- package/templates/game/review.yaml +97 -97
- package/templates/game/structure.yaml +67 -67
- package/templates/game/verification.yaml +174 -174
- package/templates/healthcare/instructions.yaml +42 -42
- package/templates/healthcare/mcp-servers.yaml +13 -13
- package/templates/healthcare/nfr.yaml +47 -47
- package/templates/hipaa/instructions.yaml +41 -41
- package/templates/hipaa/mcp-servers.yaml +13 -13
- package/templates/infra/instructions.yaml +104 -104
- package/templates/infra/mcp-servers.yaml +20 -20
- package/templates/infra/nfr.yaml +46 -46
- package/templates/infra/review.yaml +65 -65
- package/templates/infra/structure.yaml +25 -25
- package/templates/library/instructions.yaml +36 -36
- package/templates/library/mcp-servers.yaml +20 -20
- package/templates/library/review.yaml +56 -56
- package/templates/library/structure.yaml +19 -19
- package/templates/medallion-architecture/instructions.yaml +41 -41
- package/templates/medallion-architecture/mcp-servers.yaml +22 -22
- package/templates/ml/instructions.yaml +85 -85
- package/templates/ml/mcp-servers.yaml +11 -11
- package/templates/ml/nfr.yaml +39 -39
- package/templates/ml/structure.yaml +25 -25
- package/templates/ml/verification.yaml +156 -156
- package/templates/mobile/instructions.yaml +44 -44
- package/templates/mobile/mcp-servers.yaml +11 -11
- package/templates/mobile/nfr.yaml +49 -49
- package/templates/mobile/structure.yaml +27 -27
- package/templates/mobile/verification.yaml +121 -121
- package/templates/observability-xray/instructions.yaml +40 -40
- package/templates/observability-xray/mcp-servers.yaml +15 -15
- package/templates/realtime/instructions.yaml +42 -42
- package/templates/realtime/mcp-servers.yaml +13 -13
- package/templates/soc2/instructions.yaml +41 -41
- package/templates/soc2/mcp-servers.yaml +24 -24
- package/templates/social/instructions.yaml +43 -43
- package/templates/social/mcp-servers.yaml +24 -24
- package/templates/state-machine/instructions.yaml +42 -42
- package/templates/state-machine/mcp-servers.yaml +11 -11
- package/templates/tools-registry.yaml +164 -164
- package/templates/universal/hooks.yaml +531 -531
- package/templates/universal/instructions.yaml +1692 -1692
- package/templates/universal/mcp-servers.yaml +50 -50
- package/templates/universal/nfr.yaml +197 -197
- package/templates/universal/reference.yaml +326 -326
- package/templates/universal/review.yaml +204 -204
- package/templates/universal/skills.yaml +262 -262
- package/templates/universal/structure.yaml +67 -67
- package/templates/universal/verification.yaml +416 -416
- package/templates/web-react/hooks.yaml +44 -44
- package/templates/web-react/instructions.yaml +207 -207
- package/templates/web-react/mcp-servers.yaml +20 -20
- package/templates/web-react/nfr.yaml +27 -27
- package/templates/web-react/review.yaml +94 -94
- package/templates/web-react/structure.yaml +46 -46
- package/templates/web-react/verification.yaml +126 -126
- package/templates/web-static/instructions.yaml +115 -115
- package/templates/web-static/mcp-servers.yaml +20 -20
- package/templates/web3/instructions.yaml +44 -44
- package/templates/web3/mcp-servers.yaml +11 -11
- package/templates/web3/verification.yaml +159 -159
- package/templates/zero-trust/instructions.yaml +41 -41
- package/templates/zero-trust/mcp-servers.yaml +15 -15
|
@@ -1,204 +1,204 @@
|
|
|
1
|
-
tag: UNIVERSAL
|
|
2
|
-
section: review
|
|
3
|
-
blocks:
|
|
4
|
-
- id: architecture-review
|
|
5
|
-
tier: core
|
|
6
|
-
dimension: architecture
|
|
7
|
-
title: "Architecture Review"
|
|
8
|
-
description: |
|
|
9
|
-
Evaluate the system's structural integrity, coupling, and scalability.
|
|
10
|
-
Focus on component boundaries, dependency flow, and failure modes.
|
|
11
|
-
checklist:
|
|
12
|
-
- id: component-boundaries
|
|
13
|
-
description: "Component boundaries are well-defined with clear public APIs (module exports)."
|
|
14
|
-
severity: critical
|
|
15
|
-
- id: dependency-graph
|
|
16
|
-
description: "Dependency graph is acyclic. No circular imports between modules."
|
|
17
|
-
severity: critical
|
|
18
|
-
- id: layer-violations
|
|
19
|
-
description: "No layer violations — dependencies point downward only. Handlers never import from infrastructure."
|
|
20
|
-
severity: critical
|
|
21
|
-
- id: coupling-concerns
|
|
22
|
-
description: "Modules communicate through interfaces, not concrete implementations."
|
|
23
|
-
severity: important
|
|
24
|
-
- id: data-flow
|
|
25
|
-
description: "Data flow patterns are clear and documented. No hidden side channels."
|
|
26
|
-
severity: important
|
|
27
|
-
- id: single-point-of-failure
|
|
28
|
-
description: "No single points of failure in critical paths. External calls have timeouts and fallbacks."
|
|
29
|
-
severity: important
|
|
30
|
-
- id: security-boundaries
|
|
31
|
-
description: "Auth, data access, and API boundaries are explicitly defined and enforced."
|
|
32
|
-
severity: critical
|
|
33
|
-
- id: hexagonal-ports
|
|
34
|
-
description: "Port interfaces (Repository, Gateway) defined in the domain layer, implemented by adapters. Adapters are swappable."
|
|
35
|
-
severity: important
|
|
36
|
-
- id: dto-boundaries
|
|
37
|
-
description: "DTOs used at layer boundaries. Domain entities never leaked to API responses or persisted directly."
|
|
38
|
-
severity: important
|
|
39
|
-
- id: bounded-contexts
|
|
40
|
-
description: "If multiple domains exist, each has its own bounded context with separate models. No shared DB tables across contexts."
|
|
41
|
-
severity: important
|
|
42
|
-
- id: domain-events-decoupling
|
|
43
|
-
description: "Cross-module communication uses domain events or defined interfaces — no direct imports between unrelated modules."
|
|
44
|
-
severity: nice-to-have
|
|
45
|
-
|
|
46
|
-
- id: code-quality-review
|
|
47
|
-
tier: core
|
|
48
|
-
dimension: code-quality
|
|
49
|
-
title: "Code Quality Review"
|
|
50
|
-
description: |
|
|
51
|
-
Evaluate code organization, DRY compliance, error handling, and technical debt.
|
|
52
|
-
Flag repetition aggressively. Call out missing edge cases explicitly.
|
|
53
|
-
checklist:
|
|
54
|
-
- id: module-structure
|
|
55
|
-
description: "Code is organized by feature, not by layer. Each module owns its models, service, and types."
|
|
56
|
-
severity: critical
|
|
57
|
-
- id: dry-violations
|
|
58
|
-
description: "No duplicated logic across modules. Shared utilities extracted to shared/."
|
|
59
|
-
severity: important
|
|
60
|
-
- id: error-handling-patterns
|
|
61
|
-
description: "Custom error hierarchy used consistently. No bare Error throws. Errors carry context (IDs, timestamps, operation)."
|
|
62
|
-
severity: critical
|
|
63
|
-
- id: missing-edge-cases
|
|
64
|
-
description: "Edge cases handled: empty inputs, null/undefined, boundary values, concurrent access."
|
|
65
|
-
severity: important
|
|
66
|
-
- id: technical-debt
|
|
67
|
-
description: "No TODO/FIXME without a tracked item. No commented-out code."
|
|
68
|
-
severity: important
|
|
69
|
-
- id: naming-quality
|
|
70
|
-
description: "All names are intention-revealing. No abbreviations except universally understood ones (id, url, http)."
|
|
71
|
-
severity: nice-to-have
|
|
72
|
-
- id: over-under-engineering
|
|
73
|
-
description: "Code is 'engineered enough' — no premature abstractions, no fragile shortcuts."
|
|
74
|
-
severity: important
|
|
75
|
-
- id: cqs-compliance
|
|
76
|
-
description: "Functions either change state (command) or return data (query), not both. Exceptions are documented."
|
|
77
|
-
severity: important
|
|
78
|
-
- id: guard-clauses
|
|
79
|
-
description: "No deep nesting. Invalid cases handled first with early returns. Happy path runs at shallowest indentation."
|
|
80
|
-
severity: important
|
|
81
|
-
- id: composition-over-inheritance
|
|
82
|
-
description: "Prefer composition via interfaces and delegation. Class inheritance used only for genuine is-a relationships."
|
|
83
|
-
severity: important
|
|
84
|
-
- id: law-of-demeter
|
|
85
|
-
description: "No long method chains through objects (a.b().c().d()). Objects expose only the information their callers need."
|
|
86
|
-
severity: nice-to-have
|
|
87
|
-
- id: immutability
|
|
88
|
-
description: "Immutable by default — prefer constants and frozen structures. Mutable state restricted to smallest possible scope."
|
|
89
|
-
severity: important
|
|
90
|
-
- id: pure-functions
|
|
91
|
-
description: "Domain logic, validation, and transformations are pure (same input → same output, no side effects). Side effects pushed to adapters."
|
|
92
|
-
severity: important
|
|
93
|
-
- id: primitive-obsession
|
|
94
|
-
description: "Domain concepts wrapped in typed Value Objects (EmailAddress, Money) instead of raw strings/numbers."
|
|
95
|
-
severity: nice-to-have
|
|
96
|
-
|
|
97
|
-
- id: test-review
|
|
98
|
-
tier: recommended
|
|
99
|
-
dimension: tests
|
|
100
|
-
title: "Test Review"
|
|
101
|
-
description: |
|
|
102
|
-
Evaluate test coverage, assertion quality, and edge case thoroughness.
|
|
103
|
-
Well-tested code is non-negotiable. Rather too many tests than too few.
|
|
104
|
-
checklist:
|
|
105
|
-
- id: coverage-gaps
|
|
106
|
-
description: "Minimum 80% line coverage overall. 90% on new/changed code. 95% on critical paths."
|
|
107
|
-
severity: critical
|
|
108
|
-
- id: test-pyramid
|
|
109
|
-
description: "Test distribution follows pyramid: 60-75% unit, 20-30% integration, 5-10% E2E."
|
|
110
|
-
severity: important
|
|
111
|
-
- id: assertion-strength
|
|
112
|
-
description: "Assertions are specific and meaningful. No assert(true), no empty catch blocks, no tests that can't fail."
|
|
113
|
-
severity: critical
|
|
114
|
-
- id: edge-case-coverage
|
|
115
|
-
description: "Tests cover edge cases: empty collections, boundary values, error paths, concurrent scenarios."
|
|
116
|
-
severity: important
|
|
117
|
-
- id: test-naming
|
|
118
|
-
description: "Every test name is a specification: 'rejects_unknown_tag' not 'test_validation'."
|
|
119
|
-
severity: nice-to-have
|
|
120
|
-
- id: failure-modes
|
|
121
|
-
description: "Failure modes and error paths are tested, not just happy paths."
|
|
122
|
-
severity: critical
|
|
123
|
-
- id: test-isolation
|
|
124
|
-
description: "Tests are independent — no shared mutable state, no order dependencies. Each test sets up its own data."
|
|
125
|
-
severity: important
|
|
126
|
-
- id: test-data-builders
|
|
127
|
-
description: "Test data constructed via factories/builders, not copy-pasted literals. Shared fixtures for common objects."
|
|
128
|
-
severity: nice-to-have
|
|
129
|
-
|
|
130
|
-
- id: performance-review
|
|
131
|
-
tier: recommended
|
|
132
|
-
dimension: performance
|
|
133
|
-
title: "Performance Review"
|
|
134
|
-
description: |
|
|
135
|
-
Evaluate query patterns, memory usage, caching opportunities, and algorithmic complexity.
|
|
136
|
-
Focus on measurable bottlenecks, not micro-optimizations.
|
|
137
|
-
checklist:
|
|
138
|
-
- id: n-plus-one
|
|
139
|
-
description: "No N+1 query or I/O patterns. Batch operations where possible."
|
|
140
|
-
severity: critical
|
|
141
|
-
- id: memory-usage
|
|
142
|
-
description: "No unbounded collections or memory leaks. Large data sets streamed, not loaded in full."
|
|
143
|
-
severity: important
|
|
144
|
-
- id: caching
|
|
145
|
-
description: "Repeated expensive operations have caching. Cache invalidation strategy documented."
|
|
146
|
-
severity: nice-to-have
|
|
147
|
-
- id: algorithmic-complexity
|
|
148
|
-
description: "No O(n²) or worse algorithms on unbounded data. Complexity documented for non-obvious paths."
|
|
149
|
-
severity: important
|
|
150
|
-
- id: startup-time
|
|
151
|
-
description: "Application startup is fast. Heavy initialization is lazy or async."
|
|
152
|
-
severity: nice-to-have
|
|
153
|
-
- id: graceful-shutdown
|
|
154
|
-
description: "Application handles SIGTERM/SIGINT gracefully: drains connections, finishes in-flight work, then exits."
|
|
155
|
-
severity: important
|
|
156
|
-
- id: ci-pipeline
|
|
157
|
-
description: "CI pipeline runs lint, type-check, tests, and build on every push. Failures block merge."
|
|
158
|
-
severity: critical
|
|
159
|
-
- id: deployment-automation
|
|
160
|
-
description: "Deploy is one command or one button. No multi-step manual runbooks. Rollback is equally simple."
|
|
161
|
-
severity: important
|
|
162
|
-
- id: environment-parity
|
|
163
|
-
description: "Staging mirrors production: same provider, same DB engine, same services. No 'works on staging' surprises."
|
|
164
|
-
severity: important
|
|
165
|
-
|
|
166
|
-
- id: artifact-completeness-review
|
|
167
|
-
tier: recommended
|
|
168
|
-
dimension: artifact-completeness
|
|
169
|
-
title: "Generative Specification Artifact Completeness"
|
|
170
|
-
description: |
|
|
171
|
-
Verify the project's generative specification grammar is complete. An absent artifact
|
|
172
|
-
is a specification gap — not documentation debt. Each item below is a production rule
|
|
173
|
-
that AI agents rely on for correct, constrained output.
|
|
174
|
-
checklist:
|
|
175
|
-
- id: architectural-constitution
|
|
176
|
-
description: "CLAUDE.md / AGENTS.md / .cursor/rules / copilot-instructions exists, is non-trivial (>50 lines), contains layered architecture description, naming conventions per layer, and at least one explicit forbidden pattern."
|
|
177
|
-
severity: critical
|
|
178
|
-
- id: adr-directory
|
|
179
|
-
description: "docs/adr/ (or docs/adrs/) exists with at least one ADR per non-obvious architectural decision. Each ADR has status, context, decision, alternatives, and consequences."
|
|
180
|
-
severity: critical
|
|
181
|
-
- id: status-file
|
|
182
|
-
description: "Status.md exists at repo root and was updated in the most recent session. Contains: completed work, current state, open questions, and next steps."
|
|
183
|
-
severity: critical
|
|
184
|
-
- id: naming-conventions
|
|
185
|
-
description: "Architectural constitution contains explicit, layer-scoped naming vocabulary. At least repository, service, and controller layers are covered. No layer uses verbs from another layer."
|
|
186
|
-
severity: important
|
|
187
|
-
- id: schema-definitions
|
|
188
|
-
description: "All DB schemas, API contracts, and inter-service event schemas are formally stated (Prisma schema, Zod schemas, OpenAPI, AsyncAPI, or equivalent). No implicit contracts."
|
|
189
|
-
severity: important
|
|
190
|
-
- id: structural-diagrams
|
|
191
|
-
description: "At least one C4 or equivalent structural diagram exists in docs/diagrams/ or rendered in a markdown file. Sequence diagrams exist for all flows crossing more than two service boundaries."
|
|
192
|
-
severity: important
|
|
193
|
-
- id: use-cases
|
|
194
|
-
description: "Critical user flows have formal use cases with precondition, trigger, main flow, and postcondition. Each use case has machine-checkable acceptance criteria."
|
|
195
|
-
severity: nice-to-have
|
|
196
|
-
- id: commit-discipline
|
|
197
|
-
description: "Git log follows conventional commits (feat|fix|refactor|docs|test|chore). Last 10 commits are atomic, scoped, and meaningful. No 'WIP', 'fix', or 'update' messages."
|
|
198
|
-
severity: important
|
|
199
|
-
- id: living-documentation
|
|
200
|
-
description: "API reference, schema docs, or component catalog is generated from code artifacts (OpenAPI, TypeDoc, Storybook), not manually authored. Documentation is derived, not maintained separately."
|
|
201
|
-
severity: nice-to-have
|
|
202
|
-
- id: wrong-spec-risk
|
|
203
|
-
description: "Architectural constitution has been revised through commit history (not written once and untouched). At least one ADR records a change to a prior architectural decision."
|
|
204
|
-
severity: nice-to-have
|
|
1
|
+
tag: UNIVERSAL
|
|
2
|
+
section: review
|
|
3
|
+
blocks:
|
|
4
|
+
- id: architecture-review
|
|
5
|
+
tier: core
|
|
6
|
+
dimension: architecture
|
|
7
|
+
title: "Architecture Review"
|
|
8
|
+
description: |
|
|
9
|
+
Evaluate the system's structural integrity, coupling, and scalability.
|
|
10
|
+
Focus on component boundaries, dependency flow, and failure modes.
|
|
11
|
+
checklist:
|
|
12
|
+
- id: component-boundaries
|
|
13
|
+
description: "Component boundaries are well-defined with clear public APIs (module exports)."
|
|
14
|
+
severity: critical
|
|
15
|
+
- id: dependency-graph
|
|
16
|
+
description: "Dependency graph is acyclic. No circular imports between modules."
|
|
17
|
+
severity: critical
|
|
18
|
+
- id: layer-violations
|
|
19
|
+
description: "No layer violations — dependencies point downward only. Handlers never import from infrastructure."
|
|
20
|
+
severity: critical
|
|
21
|
+
- id: coupling-concerns
|
|
22
|
+
description: "Modules communicate through interfaces, not concrete implementations."
|
|
23
|
+
severity: important
|
|
24
|
+
- id: data-flow
|
|
25
|
+
description: "Data flow patterns are clear and documented. No hidden side channels."
|
|
26
|
+
severity: important
|
|
27
|
+
- id: single-point-of-failure
|
|
28
|
+
description: "No single points of failure in critical paths. External calls have timeouts and fallbacks."
|
|
29
|
+
severity: important
|
|
30
|
+
- id: security-boundaries
|
|
31
|
+
description: "Auth, data access, and API boundaries are explicitly defined and enforced."
|
|
32
|
+
severity: critical
|
|
33
|
+
- id: hexagonal-ports
|
|
34
|
+
description: "Port interfaces (Repository, Gateway) defined in the domain layer, implemented by adapters. Adapters are swappable."
|
|
35
|
+
severity: important
|
|
36
|
+
- id: dto-boundaries
|
|
37
|
+
description: "DTOs used at layer boundaries. Domain entities never leaked to API responses or persisted directly."
|
|
38
|
+
severity: important
|
|
39
|
+
- id: bounded-contexts
|
|
40
|
+
description: "If multiple domains exist, each has its own bounded context with separate models. No shared DB tables across contexts."
|
|
41
|
+
severity: important
|
|
42
|
+
- id: domain-events-decoupling
|
|
43
|
+
description: "Cross-module communication uses domain events or defined interfaces — no direct imports between unrelated modules."
|
|
44
|
+
severity: nice-to-have
|
|
45
|
+
|
|
46
|
+
- id: code-quality-review
|
|
47
|
+
tier: core
|
|
48
|
+
dimension: code-quality
|
|
49
|
+
title: "Code Quality Review"
|
|
50
|
+
description: |
|
|
51
|
+
Evaluate code organization, DRY compliance, error handling, and technical debt.
|
|
52
|
+
Flag repetition aggressively. Call out missing edge cases explicitly.
|
|
53
|
+
checklist:
|
|
54
|
+
- id: module-structure
|
|
55
|
+
description: "Code is organized by feature, not by layer. Each module owns its models, service, and types."
|
|
56
|
+
severity: critical
|
|
57
|
+
- id: dry-violations
|
|
58
|
+
description: "No duplicated logic across modules. Shared utilities extracted to shared/."
|
|
59
|
+
severity: important
|
|
60
|
+
- id: error-handling-patterns
|
|
61
|
+
description: "Custom error hierarchy used consistently. No bare Error throws. Errors carry context (IDs, timestamps, operation)."
|
|
62
|
+
severity: critical
|
|
63
|
+
- id: missing-edge-cases
|
|
64
|
+
description: "Edge cases handled: empty inputs, null/undefined, boundary values, concurrent access."
|
|
65
|
+
severity: important
|
|
66
|
+
- id: technical-debt
|
|
67
|
+
description: "No TODO/FIXME without a tracked item. No commented-out code."
|
|
68
|
+
severity: important
|
|
69
|
+
- id: naming-quality
|
|
70
|
+
description: "All names are intention-revealing. No abbreviations except universally understood ones (id, url, http)."
|
|
71
|
+
severity: nice-to-have
|
|
72
|
+
- id: over-under-engineering
|
|
73
|
+
description: "Code is 'engineered enough' — no premature abstractions, no fragile shortcuts."
|
|
74
|
+
severity: important
|
|
75
|
+
- id: cqs-compliance
|
|
76
|
+
description: "Functions either change state (command) or return data (query), not both. Exceptions are documented."
|
|
77
|
+
severity: important
|
|
78
|
+
- id: guard-clauses
|
|
79
|
+
description: "No deep nesting. Invalid cases handled first with early returns. Happy path runs at shallowest indentation."
|
|
80
|
+
severity: important
|
|
81
|
+
- id: composition-over-inheritance
|
|
82
|
+
description: "Prefer composition via interfaces and delegation. Class inheritance used only for genuine is-a relationships."
|
|
83
|
+
severity: important
|
|
84
|
+
- id: law-of-demeter
|
|
85
|
+
description: "No long method chains through objects (a.b().c().d()). Objects expose only the information their callers need."
|
|
86
|
+
severity: nice-to-have
|
|
87
|
+
- id: immutability
|
|
88
|
+
description: "Immutable by default — prefer constants and frozen structures. Mutable state restricted to smallest possible scope."
|
|
89
|
+
severity: important
|
|
90
|
+
- id: pure-functions
|
|
91
|
+
description: "Domain logic, validation, and transformations are pure (same input → same output, no side effects). Side effects pushed to adapters."
|
|
92
|
+
severity: important
|
|
93
|
+
- id: primitive-obsession
|
|
94
|
+
description: "Domain concepts wrapped in typed Value Objects (EmailAddress, Money) instead of raw strings/numbers."
|
|
95
|
+
severity: nice-to-have
|
|
96
|
+
|
|
97
|
+
- id: test-review
|
|
98
|
+
tier: recommended
|
|
99
|
+
dimension: tests
|
|
100
|
+
title: "Test Review"
|
|
101
|
+
description: |
|
|
102
|
+
Evaluate test coverage, assertion quality, and edge case thoroughness.
|
|
103
|
+
Well-tested code is non-negotiable. Rather too many tests than too few.
|
|
104
|
+
checklist:
|
|
105
|
+
- id: coverage-gaps
|
|
106
|
+
description: "Minimum 80% line coverage overall. 90% on new/changed code. 95% on critical paths."
|
|
107
|
+
severity: critical
|
|
108
|
+
- id: test-pyramid
|
|
109
|
+
description: "Test distribution follows pyramid: 60-75% unit, 20-30% integration, 5-10% E2E."
|
|
110
|
+
severity: important
|
|
111
|
+
- id: assertion-strength
|
|
112
|
+
description: "Assertions are specific and meaningful. No assert(true), no empty catch blocks, no tests that can't fail."
|
|
113
|
+
severity: critical
|
|
114
|
+
- id: edge-case-coverage
|
|
115
|
+
description: "Tests cover edge cases: empty collections, boundary values, error paths, concurrent scenarios."
|
|
116
|
+
severity: important
|
|
117
|
+
- id: test-naming
|
|
118
|
+
description: "Every test name is a specification: 'rejects_unknown_tag' not 'test_validation'."
|
|
119
|
+
severity: nice-to-have
|
|
120
|
+
- id: failure-modes
|
|
121
|
+
description: "Failure modes and error paths are tested, not just happy paths."
|
|
122
|
+
severity: critical
|
|
123
|
+
- id: test-isolation
|
|
124
|
+
description: "Tests are independent — no shared mutable state, no order dependencies. Each test sets up its own data."
|
|
125
|
+
severity: important
|
|
126
|
+
- id: test-data-builders
|
|
127
|
+
description: "Test data constructed via factories/builders, not copy-pasted literals. Shared fixtures for common objects."
|
|
128
|
+
severity: nice-to-have
|
|
129
|
+
|
|
130
|
+
- id: performance-review
|
|
131
|
+
tier: recommended
|
|
132
|
+
dimension: performance
|
|
133
|
+
title: "Performance Review"
|
|
134
|
+
description: |
|
|
135
|
+
Evaluate query patterns, memory usage, caching opportunities, and algorithmic complexity.
|
|
136
|
+
Focus on measurable bottlenecks, not micro-optimizations.
|
|
137
|
+
checklist:
|
|
138
|
+
- id: n-plus-one
|
|
139
|
+
description: "No N+1 query or I/O patterns. Batch operations where possible."
|
|
140
|
+
severity: critical
|
|
141
|
+
- id: memory-usage
|
|
142
|
+
description: "No unbounded collections or memory leaks. Large data sets streamed, not loaded in full."
|
|
143
|
+
severity: important
|
|
144
|
+
- id: caching
|
|
145
|
+
description: "Repeated expensive operations have caching. Cache invalidation strategy documented."
|
|
146
|
+
severity: nice-to-have
|
|
147
|
+
- id: algorithmic-complexity
|
|
148
|
+
description: "No O(n²) or worse algorithms on unbounded data. Complexity documented for non-obvious paths."
|
|
149
|
+
severity: important
|
|
150
|
+
- id: startup-time
|
|
151
|
+
description: "Application startup is fast. Heavy initialization is lazy or async."
|
|
152
|
+
severity: nice-to-have
|
|
153
|
+
- id: graceful-shutdown
|
|
154
|
+
description: "Application handles SIGTERM/SIGINT gracefully: drains connections, finishes in-flight work, then exits."
|
|
155
|
+
severity: important
|
|
156
|
+
- id: ci-pipeline
|
|
157
|
+
description: "CI pipeline runs lint, type-check, tests, and build on every push. Failures block merge."
|
|
158
|
+
severity: critical
|
|
159
|
+
- id: deployment-automation
|
|
160
|
+
description: "Deploy is one command or one button. No multi-step manual runbooks. Rollback is equally simple."
|
|
161
|
+
severity: important
|
|
162
|
+
- id: environment-parity
|
|
163
|
+
description: "Staging mirrors production: same provider, same DB engine, same services. No 'works on staging' surprises."
|
|
164
|
+
severity: important
|
|
165
|
+
|
|
166
|
+
- id: artifact-completeness-review
|
|
167
|
+
tier: recommended
|
|
168
|
+
dimension: artifact-completeness
|
|
169
|
+
title: "Generative Specification Artifact Completeness"
|
|
170
|
+
description: |
|
|
171
|
+
Verify the project's generative specification grammar is complete. An absent artifact
|
|
172
|
+
is a specification gap — not documentation debt. Each item below is a production rule
|
|
173
|
+
that AI agents rely on for correct, constrained output.
|
|
174
|
+
checklist:
|
|
175
|
+
- id: architectural-constitution
|
|
176
|
+
description: "CLAUDE.md / AGENTS.md / .cursor/rules / copilot-instructions exists, is non-trivial (>50 lines), contains layered architecture description, naming conventions per layer, and at least one explicit forbidden pattern."
|
|
177
|
+
severity: critical
|
|
178
|
+
- id: adr-directory
|
|
179
|
+
description: "docs/adr/ (or docs/adrs/) exists with at least one ADR per non-obvious architectural decision. Each ADR has status, context, decision, alternatives, and consequences."
|
|
180
|
+
severity: critical
|
|
181
|
+
- id: status-file
|
|
182
|
+
description: "Status.md exists at repo root and was updated in the most recent session. Contains: completed work, current state, open questions, and next steps."
|
|
183
|
+
severity: critical
|
|
184
|
+
- id: naming-conventions
|
|
185
|
+
description: "Architectural constitution contains explicit, layer-scoped naming vocabulary. At least repository, service, and controller layers are covered. No layer uses verbs from another layer."
|
|
186
|
+
severity: important
|
|
187
|
+
- id: schema-definitions
|
|
188
|
+
description: "All DB schemas, API contracts, and inter-service event schemas are formally stated (Prisma schema, Zod schemas, OpenAPI, AsyncAPI, or equivalent). No implicit contracts."
|
|
189
|
+
severity: important
|
|
190
|
+
- id: structural-diagrams
|
|
191
|
+
description: "At least one C4 or equivalent structural diagram exists in docs/diagrams/ or rendered in a markdown file. Sequence diagrams exist for all flows crossing more than two service boundaries."
|
|
192
|
+
severity: important
|
|
193
|
+
- id: use-cases
|
|
194
|
+
description: "Critical user flows have formal use cases with precondition, trigger, main flow, and postcondition. Each use case has machine-checkable acceptance criteria."
|
|
195
|
+
severity: nice-to-have
|
|
196
|
+
- id: commit-discipline
|
|
197
|
+
description: "Git log follows conventional commits (feat|fix|refactor|docs|test|chore). Last 10 commits are atomic, scoped, and meaningful. No 'WIP', 'fix', or 'update' messages."
|
|
198
|
+
severity: important
|
|
199
|
+
- id: living-documentation
|
|
200
|
+
description: "API reference, schema docs, or component catalog is generated from code artifacts (OpenAPI, TypeDoc, Storybook), not manually authored. Documentation is derived, not maintained separately."
|
|
201
|
+
severity: nice-to-have
|
|
202
|
+
- id: wrong-spec-risk
|
|
203
|
+
description: "Architectural constitution has been revised through commit history (not written once and untouched). At least one ADR records a change to a prior architectural decision."
|
|
204
|
+
severity: nice-to-have
|