You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4468d8d
Browse filesBrowse the repository at this point in the historyBrowse files
Fold maintainability practices into the skill: a Design section in
SKILL.md (ownership, boundaries, effects, failure, dependencies, change
surface, tests, plus a conflict priority order), domain-specific items
in the matching quality-gate rows, and a review-questions list applied
to Substantial work and above. README mirrors the new behavior.
Copy file name to clipboardExpand all lines: references/quality-gates.md
+24-5Lines changed: 24 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,15 +6,15 @@ Apply only the rows the change touches. Use the repository's own commands. A gat
6
6
| Surface | Requirements | Evidence |
7
7
| --- | --- | --- |
8
8
| Architecture | Preserve dependency direction; one owner per invariant and state transition; explicit, cohesive interfaces; no speculative abstraction. | Trace entry points and callers; check the final diff for duplicated policy or dead wiring. |
9
-
| APIs and inputs | Validate type, size, range, encoding, ownership; preserve error semantics and compatibility; bound pagination and uploads. | Malformed, oversized, empty, and boundary inputs; consumer compatibility; unauthorized and cross-tenant access. |
9
+
| APIs and inputs | Validate type, size, range, encoding, ownership; preserve error semantics and compatibility; keep public contracts (schemas, interfaces, event and persisted formats, command behavior) stable and version incompatible changes explicitly; bound pagination and uploads. | Malformed, oversized, empty, and boundary inputs; consumer compatibility; unauthorized and cross-tenant access. |
10
10
| State and persistence | Atomicity, constraints, uniqueness, and concurrency control; exact representations where required. | Duplicate requests, lost updates, partial failure, recovery, realistic migration data. |
11
-
| Concurrency | Clear ownership of shared state; atomic check-then-act; cancellation and deadlines propagate; ordering assumptions stated; operations idempotent where retried or redelivered. | Races, duplicate and out-of-order delivery, retry exhaustion, cancellation mid-operation, shutdown, deadlock. |
11
+
| Concurrency | Clear ownership of shared state; atomic check-then-act; cancellation and deadlines propagate; ordering assumptions stated; operations idempotent where retried or redelivered; locks released before network, disk, inference, subprocess, or callback work; immutable values, message passing, and ownership transfer over shared mutable state. | Races, duplicate and out-of-order delivery, retry exhaustion, cancellation mid-operation, shutdown, deadlock. |
12
12
| Resources | Pair acquisition with release; bound memory, files, sockets, tasks, queues, and pools. | Cleanup on error and cancel, repeated runs, leak checks. |
13
-
| Security and privacy | Least privilege; authorize each sensitive operation; safe parsing and encoding; no embedded secrets; minimal sensitive data in logs. | Negative access tests; injection, path traversal, SSRF where relevant; log redaction. |
13
+
| Security and privacy | Least privilege; secure defaults; authorize each sensitive operation in one central place regardless of entry interface; stronger validation on delete, overwrite, publish, and charge than on reads; safe parsing and encoding; no embedded secrets; minimal sensitive data in logs. | Negative access tests; injection, path traversal, SSRF where relevant; log redaction. |
14
14
| UI and accessibility | Semantic controls, keyboard and focus, labels, responsive layout; loading, empty, error, success states; no duplicate destructive submits. | Component or browser tests, keyboard checks, supported viewports, accessibility tooling. |
15
-
| Performance | Find the bottleneck before optimizing; keep correctness checks alongside speed. | Before/after on a representative workload with warmup, repetitions, variance, and comparable hardware and versions. |
15
+
| Performance | Find the bottleneck before optimizing; algorithmic and architectural wins before micro-optimizations; optimize behind existing interfaces, with every fast path keeping a correct generic fallback; keep correctness checks alongside speed. | Before/after on a representative workload with warmup, repetitions, variance, and comparable hardware and versions. |
| Operations |Actionable config errors; defined rollout and rollback; no secrets or unbounded cardinality in telemetry. | Health checks, structured errors, metrics or traces, rollback steps. |
17
+
| Operations |Typed configuration loaded and validated once at startup, with business logic receiving values rather than reading the environment; actionable config errors; defined rollout and rollback; structured logs and metrics designed with the feature that report decisions without determining them; no secrets or unbounded cardinality in telemetry. | Health checks, structured errors, metrics or traces, rollback steps. |
18
18
19
19
## Migration and rollback
20
20
@@ -28,3 +28,22 @@ credential changes, or deployments without explicit authorization.
28
28
29
29
Characterize existing behavior before changing it. Map each affected package to its own
30
30
toolchain; a green root command may not cover every package.
31
+
32
+
## Review questions
33
+
34
+
For Substantial work and above, answer each against the final diff:
35
+
36
+
1. What responsibility changed, where does it live, and does another part of the code
37
+
already know the same rule?
38
+
2. Does the change stay local, with dependencies pointing inward and no external
39
+
representation leaking into core logic?
40
+
3. Which additions are policy and which are mechanism, and are they kept apart?
41
+
4. What new invariant exists, and what invalid states are now possible?
42
+
5. What happens on failure, timeout, cancellation, and duplicate execution?
43
+
6. Who owns cleanup, what can grow without a bound, and what happens under concurrency?
44
+
7. Is each interface smaller and more stable than its implementation, and does each
45
+
abstraction remove knowledge from callers?
46
+
8. Does this make the next related change easier, and can obsolete code now be deleted?
47
+
9. Do tests protect behavior rather than implementation details?
48
+
10. Is the complexity justified by a real requirement, and would another engineer know
49
+
where to modify this behavior six months from now?
0 commit comments