@ghostbyte/agent-docs-kit 4.0.3 → 5.0.1

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 (120) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/README.md +43 -38
  3. package/SECURITY.md +11 -0
  4. package/content/catalog.json +191 -22
  5. package/content/documentation/01-system-documentation.md +13 -0
  6. package/content/documentation/02-project-governance.md +13 -0
  7. package/content/documentation/03-development-records.md +13 -0
  8. package/content/documentation/04-testing-evidence.md +13 -0
  9. package/content/documentation/05-operations-runbooks.md +13 -0
  10. package/content/documentation/06-future-proposals.md +13 -0
  11. package/content/documentation/07-archive-governance.md +13 -0
  12. package/content/documentation/full-reference.md +24 -0
  13. package/content/engineering/01-query-performance.md +17 -27
  14. package/content/engineering/02-networking-fundamentals.md +17 -27
  15. package/content/engineering/03-rate-limiting-algorithms.md +18 -28
  16. package/content/engineering/04-production-debugging.md +17 -27
  17. package/content/engineering/05-code-review-practices.md +17 -27
  18. package/content/engineering/06-data-modeling.md +17 -27
  19. package/content/engineering/07-cloud-cost-saving.md +17 -27
  20. package/content/engineering/08-testing-types.md +17 -27
  21. package/content/engineering/09-message-queues.md +17 -27
  22. package/content/engineering/10-api-design-compatibility.md +14 -0
  23. package/content/engineering/11-reliability-slos.md +14 -0
  24. package/content/engineering/12-observability-telemetry.md +14 -0
  25. package/content/engineering/13-deployment-change-safety.md +14 -0
  26. package/content/engineering/14-capacity-concurrency.md +14 -0
  27. package/content/engineering/full-reference.md +24 -144
  28. package/content/security/01-design-architecture.md +11 -19
  29. package/content/security/02-local-development.md +13 -21
  30. package/content/security/03-database-backend.md +18 -26
  31. package/content/security/04-api-layer.md +23 -31
  32. package/content/security/05-frontend-ui.md +16 -24
  33. package/content/security/06-application-security-testing.md +22 -28
  34. package/content/security/07-cicd-release-engineering.md +13 -21
  35. package/content/security/08-cloud-infrastructure.md +17 -25
  36. package/content/security/09-edge-cdn-dns.md +16 -24
  37. package/content/security/10-release-rollout.md +13 -21
  38. package/content/security/11-post-release-monitoring-ir.md +15 -23
  39. package/content/security/12-ongoing-operations.md +24 -32
  40. package/content/security/full-reference.md +30 -3163
  41. package/docs/ARCHITECTURE.md +32 -91
  42. package/docs/CONTENT_MAINTENANCE.md +5 -1
  43. package/docs/GITHUB_AND_NPM_SETUP.md +1 -1
  44. package/docs/RELEASE_PROCESS.md +6 -6
  45. package/docs/SECURITY_MODEL.md +2 -0
  46. package/package.json +20 -7
  47. package/scripts/build-site.mjs +13 -0
  48. package/scripts/build-skill.mjs +24 -0
  49. package/scripts/check-links.mjs +56 -0
  50. package/scripts/check-review-dates.mjs +21 -0
  51. package/scripts/preview-site.mjs +43 -0
  52. package/scripts/smoke-package.mjs +82 -0
  53. package/scripts/validate-content.mjs +97 -0
  54. package/site/app.js +121 -0
  55. package/site/index.html +346 -0
  56. package/site/styles.css +159 -0
  57. package/skills/manage-project-quality/SKILL.md +18 -2
  58. package/skills/manage-project-quality/assets/documentation-report.md +3 -3
  59. package/skills/manage-project-quality/assets/engineering-report.md +3 -3
  60. package/skills/manage-project-quality/assets/security-report.md +3 -3
  61. package/skills/manage-project-quality/references/documentation-01-system-documentation.md +13 -0
  62. package/skills/manage-project-quality/references/documentation-02-project-governance.md +13 -0
  63. package/skills/manage-project-quality/references/documentation-03-development-records.md +13 -0
  64. package/skills/manage-project-quality/references/documentation-04-testing-evidence.md +13 -0
  65. package/skills/manage-project-quality/references/documentation-05-operations-runbooks.md +13 -0
  66. package/skills/manage-project-quality/references/documentation-06-future-proposals.md +13 -0
  67. package/skills/manage-project-quality/references/documentation-07-archive-governance.md +13 -0
  68. package/skills/manage-project-quality/references/documentation-full-reference.md +24 -0
  69. package/skills/manage-project-quality/references/documentation-governance.md +2 -2
  70. package/skills/manage-project-quality/references/engineering-01-query-performance.md +17 -27
  71. package/skills/manage-project-quality/references/engineering-02-networking-fundamentals.md +17 -27
  72. package/skills/manage-project-quality/references/engineering-03-rate-limiting-algorithms.md +18 -28
  73. package/skills/manage-project-quality/references/engineering-04-production-debugging.md +17 -27
  74. package/skills/manage-project-quality/references/engineering-05-code-review-practices.md +17 -27
  75. package/skills/manage-project-quality/references/engineering-06-data-modeling.md +17 -27
  76. package/skills/manage-project-quality/references/engineering-07-cloud-cost-saving.md +17 -27
  77. package/skills/manage-project-quality/references/engineering-08-testing-types.md +17 -27
  78. package/skills/manage-project-quality/references/engineering-09-message-queues.md +17 -27
  79. package/skills/manage-project-quality/references/engineering-10-api-design-compatibility.md +14 -0
  80. package/skills/manage-project-quality/references/engineering-11-reliability-slos.md +14 -0
  81. package/skills/manage-project-quality/references/engineering-12-observability-telemetry.md +14 -0
  82. package/skills/manage-project-quality/references/engineering-13-deployment-change-safety.md +14 -0
  83. package/skills/manage-project-quality/references/engineering-14-capacity-concurrency.md +14 -0
  84. package/skills/manage-project-quality/references/engineering-full-reference.md +24 -144
  85. package/skills/manage-project-quality/references/engineering-protocol.md +1 -1
  86. package/skills/manage-project-quality/references/security-01-design-architecture.md +11 -19
  87. package/skills/manage-project-quality/references/security-02-local-development.md +13 -21
  88. package/skills/manage-project-quality/references/security-03-database-backend.md +18 -26
  89. package/skills/manage-project-quality/references/security-04-api-layer.md +23 -31
  90. package/skills/manage-project-quality/references/security-05-frontend-ui.md +16 -24
  91. package/skills/manage-project-quality/references/security-06-application-security-testing.md +22 -28
  92. package/skills/manage-project-quality/references/security-07-cicd-release-engineering.md +13 -21
  93. package/skills/manage-project-quality/references/security-08-cloud-infrastructure.md +17 -25
  94. package/skills/manage-project-quality/references/security-09-edge-cdn-dns.md +16 -24
  95. package/skills/manage-project-quality/references/security-10-release-rollout.md +13 -21
  96. package/skills/manage-project-quality/references/security-11-post-release-monitoring-ir.md +15 -23
  97. package/skills/manage-project-quality/references/security-12-ongoing-operations.md +24 -32
  98. package/skills/manage-project-quality/references/security-full-reference.md +30 -3163
  99. package/skills/manage-project-quality/scripts/check-report.mjs +67 -16
  100. package/src/api/index.mjs +3 -0
  101. package/src/cli/arguments.mjs +27 -3
  102. package/src/cli/help.mjs +37 -17
  103. package/src/cli/main.mjs +64 -10
  104. package/src/commands/audit.mjs +146 -31
  105. package/src/commands/doctor.mjs +1 -1
  106. package/src/commands/guide.mjs +12 -0
  107. package/src/commands/list.mjs +1 -1
  108. package/src/commands/setup.mjs +9 -4
  109. package/src/commands/skill.mjs +1 -0
  110. package/src/commands/template.mjs +32 -0
  111. package/src/commands/validate.mjs +36 -4
  112. package/src/core/config.mjs +61 -0
  113. package/src/core/files.mjs +68 -6
  114. package/templates/adr.md +20 -0
  115. package/templates/change-record.md +18 -0
  116. package/templates/incident-review.md +20 -0
  117. package/templates/runbook.md +18 -0
  118. package/templates/test-evidence.md +18 -0
  119. package/tests/cli.test.mjs +242 -0
  120. package/tests/content.test.mjs +18 -0
@@ -1,48 +1,38 @@
1
1
  # Rate Limiting Algorithm Choices
2
2
 
3
- # Engineering Topic 3: Rate Limiting Algorithm Choices
3
+ ## Engineering Topic 3: Rate Limiting Algorithm Choices
4
4
 
5
- **When to run this:** When designing or reviewing a rate limiter — this is a companion to the security check in security-gate/SECURITY_CHECKLIST.md → 01_API_Security/01_rate_limiting.md, focused on picking the right algorithm rather than confirming a limiter exists.
5
+ **When to run this:** When designing or reviewing a rate limiter. This topic focuses on selecting the appropriate algorithm; the API security phase separately verifies that protective limits exist and are effective.
6
6
 
7
7
  **Goal of this pass:** Make sure the chosen algorithm actually matches the traffic pattern being protected against, instead of defaulting to whatever's easiest to implement.
8
8
 
9
- ## Files in this folder
9
+ ## How to use this reference
10
10
 
11
- | File | Purpose |
12
- |---|---|
13
- | `CHECKLIST.md` | The reference list of concepts for this topic — what each one is, why it matters, and the self-check question to ask. Doesn't get filled in; copy `RESULTS_TEMPLATE.md` to record a real pass. |
14
- | `RESULTS_TEMPLATE.md` | Fillable version of the same list, with a Status column and notes. Copy this file per pass (e.g. `RESULTS_2026-08-29.md`) so history isn't overwritten. |
15
-
16
- Full source list lives in `../ENGINEERING_REFERENCE.md`. Unlike
17
- `../../security-gate/phases/`, this is knowledge/practice review, not pass/fail security
18
- testing — there's no severity rating, and "Fail" isn't the right framing.
19
- Use the Status options in `RESULTS_TEMPLATE.md` instead: Applied, Partial,
20
- Should adopt, or Not applicable.
11
+ Use each stable practice ID in a generated engineering worksheet. Record concrete evidence and choose Applied, Partial, Recommended, Unverified, or N/A. Preserve each dated worksheet as review history.
21
12
 
22
13
  ## Wrap-up
23
14
 
24
15
  - This isn't a gate — nothing here blocks a release the way
25
- Critical/High security items in `../../security-gate/phases/` do.
16
+ Critical/High security items in security phase reviews do.
26
17
  - Total concepts in this topic: 10
27
18
  - Useful as an onboarding read-through, a periodic self-audit, or context
28
19
  to hand an agent before it reviews related code.
29
20
 
30
21
  ---
31
22
 
32
- # Concepts — Topic 3: Rate Limiting Algorithm Choices
23
+ ## Concepts — Topic 3: Rate Limiting Algorithm Choices
33
24
 
34
- Reference list only — no status column. Use `RESULTS_TEMPLATE.md` in
35
- this same folder to actually record a pass.
25
+ Use the applicable practices below to populate the worksheet findings table.
36
26
 
37
- | # | Concept | Why it matters | Self-check |
27
+ | Practice ID | Practice | Why it matters | Evidence question |
38
28
  |---|---|---|---|
39
- | 1 | Fixed window | Simple to implement but allows a burst of 2x the limit right at the window boundary. | If fixed window is used, is the boundary-burst behavior acceptable for this endpoint? |
40
- | 2 | Sliding window log | Precise (tracks every request timestamp) but memory-heavy at scale. | If precision matters and volume is low/medium, is sliding window log a better fit than fixed window? |
41
- | 3 | Sliding window counter | Approximates the sliding log with much less memory by weighting two adjacent fixed windows. | For high-volume endpoints needing better accuracy than fixed window, is sliding window counter being used instead of the log variant? |
42
- | 4 | Token bucket | Allows controlled bursts up to the bucket size while enforcing a steady refill rate — good for bursty-but-bounded traffic. | Does the traffic pattern need to allow short bursts, and if so, is token bucket the chosen algorithm? |
43
- | 5 | Leaky bucket | Smooths bursty input into a constant output rate — good for protecting a downstream system that can't handle spikes at all. | Is there a downstream system that needs a strictly constant request rate, and if so, is leaky bucket used to enforce it? |
44
- | 6 | Distributed rate limiting | A per-instance limiter is meaningless behind a load balancer with multiple app servers — limits get multiplied by instance count. | If the app runs on more than one instance, is the rate limit state shared (e.g. via Redis) rather than per-instance? |
45
- | 7 | Client-side throttling | Reduces wasted requests and improves UX, but is never sufficient alone since a client can be bypassed or malicious. | Does the client throttle its own request rate, and is server-side enforcement still present as the actual control? |
46
- | 8 | Adaptive rate limiting | Static limits can be too strict in quiet periods or too loose under load; adaptive limits adjust to current system health. | Does the limiter adjust based on current load/error rate, or is it a single static number regardless of system state? |
47
- | 9 | Concurrency limiting | Limits in-flight requests, not just requests-per-second — protects against slow requests piling up and exhausting resources. | Is there a cap on concurrent in-flight requests per client, separate from the requests-per-second limit? |
48
- | 10 | Back pressure | Signals upstream to slow down instead of silently dropping or queuing indefinitely when a system is overloaded. | When downstream capacity is exceeded, does the system push back (429/503, queue limits) rather than accepting unbounded work? |
29
+ | ENG-03-01 | Fixed window | Simple to implement but allows a burst of 2x the limit right at the window boundary. | If fixed window is used, is the boundary-burst behavior acceptable for this endpoint? |
30
+ | ENG-03-02 | Sliding window log | Precise (tracks every request timestamp) but memory-heavy at scale. | If precision matters and volume is low/medium, is sliding window log a better fit than fixed window? |
31
+ | ENG-03-03 | Sliding window counter | Approximates the sliding log with much less memory by weighting two adjacent fixed windows. | For high-volume endpoints needing better accuracy than fixed window, is sliding window counter being used instead of the log variant? |
32
+ | ENG-03-04 | Token bucket | Allows controlled bursts up to the bucket size while enforcing a steady refill rate — good for bursty-but-bounded traffic. | Does the traffic pattern need to allow short bursts, and if so, is token bucket the chosen algorithm? |
33
+ | ENG-03-05 | Leaky bucket | Smooths bursty input into a constant output rate — good for protecting a downstream system that can't handle spikes at all. | Is there a downstream system that needs a strictly constant request rate, and if so, is leaky bucket used to enforce it? |
34
+ | ENG-03-06 | Distributed rate limiting | A per-instance limiter is meaningless behind a load balancer with multiple app servers — limits get multiplied by instance count. | If the app runs on more than one instance, is the rate limit state shared (e.g. via Redis) rather than per-instance? |
35
+ | ENG-03-07 | Client-side throttling | Reduces wasted requests and improves UX, but is never sufficient alone since a client can be bypassed or malicious. | Does the client throttle its own request rate, and is server-side enforcement still present as the actual control? |
36
+ | ENG-03-08 | Adaptive rate limiting | Static limits can be too strict in quiet periods or too loose under load; adaptive limits adjust to current system health. | Does the limiter adjust based on current load/error rate, or is it a single static number regardless of system state? |
37
+ | ENG-03-09 | Concurrency limiting | Limits in-flight requests, not just requests-per-second — protects against slow requests piling up and exhausting resources. | Is there a cap on concurrent in-flight requests per client, separate from the requests-per-second limit? |
38
+ | ENG-03-10 | Back pressure | Signals upstream to slow down instead of silently dropping or queuing indefinitely when a system is overloaded. | When downstream capacity is exceeded, does the system push back (429/503, queue limits) rather than accepting unbounded work? |
@@ -1,48 +1,38 @@
1
1
  # Production Debugging
2
2
 
3
- # Engineering Topic 4: Debugging Production Issues
3
+ ## Engineering Topic 4: Debugging Production Issues
4
4
 
5
5
  **When to run this:** Before an incident happens — this is about having the right tooling and habits in place, not what to do during a live fire.
6
6
 
7
7
  **Goal of this pass:** Confirm the team has the observability primitives needed to actually diagnose a production issue quickly, not just react to alerts.
8
8
 
9
- ## Files in this folder
9
+ ## How to use this reference
10
10
 
11
- | File | Purpose |
12
- |---|---|
13
- | `CHECKLIST.md` | The reference list of concepts for this topic — what each one is, why it matters, and the self-check question to ask. Doesn't get filled in; copy `RESULTS_TEMPLATE.md` to record a real pass. |
14
- | `RESULTS_TEMPLATE.md` | Fillable version of the same list, with a Status column and notes. Copy this file per pass (e.g. `RESULTS_2026-08-29.md`) so history isn't overwritten. |
15
-
16
- Full source list lives in `../ENGINEERING_REFERENCE.md`. Unlike
17
- `../../security-gate/phases/`, this is knowledge/practice review, not pass/fail security
18
- testing — there's no severity rating, and "Fail" isn't the right framing.
19
- Use the Status options in `RESULTS_TEMPLATE.md` instead: Applied, Partial,
20
- Should adopt, or Not applicable.
11
+ Use each stable practice ID in a generated engineering worksheet. Record concrete evidence and choose Applied, Partial, Recommended, Unverified, or N/A. Preserve each dated worksheet as review history.
21
12
 
22
13
  ## Wrap-up
23
14
 
24
15
  - This isn't a gate — nothing here blocks a release the way
25
- Critical/High security items in `../../security-gate/phases/` do.
16
+ Critical/High security items in security phase reviews do.
26
17
  - Total concepts in this topic: 10
27
18
  - Useful as an onboarding read-through, a periodic self-audit, or context
28
19
  to hand an agent before it reviews related code.
29
20
 
30
21
  ---
31
22
 
32
- # Concepts — Topic 4: Debugging Production Issues
23
+ ## Concepts — Topic 4: Debugging Production Issues
33
24
 
34
- Reference list only — no status column. Use `RESULTS_TEMPLATE.md` in
35
- this same folder to actually record a pass.
25
+ Use the applicable practices below to populate the worksheet findings table.
36
26
 
37
- | # | Concept | Why it matters | Self-check |
27
+ | Practice ID | Practice | Why it matters | Evidence question |
38
28
  |---|---|---|---|
39
- | 1 | Correlation IDs | Without a shared ID, tracing one user's request across multiple services means grepping logs by timestamp and guessing. | Does every request get a correlation/request ID that's propagated across all services it touches and included in every log line? |
40
- | 2 | Distributed tracing | Shows exactly where time is spent across a multi-service call chain — impossible to reconstruct from logs alone at scale. | Is distributed tracing (e.g. OpenTelemetry) instrumented across service boundaries? |
41
- | 3 | Feature flag rollback | Turning off a bad feature via flag is faster and safer than a code rollback/redeploy under incident pressure. | Can the riskiest recent features be disabled via flag without a deploy? |
42
- | 4 | Canary analysis | Rolling out to a small subset first catches regressions before they hit 100% of traffic. | Are risky changes rolled out to a canary/subset with automated comparison against the baseline before full rollout? |
43
- | 5 | Replay traffic | Re-running real production requests against a fix confirms it actually resolves the issue, not just a synthetic test case. | Is there a way to replay real production traffic (or a sample) against a candidate fix before it ships? |
44
- | 6 | Heap dumps | A heap dump is often the only way to root-cause a memory leak instead of guessing from symptoms. | Is heap-dump capture available (manually or via crash trigger) for services with memory-related symptoms? |
45
- | 7 | Chaos testing | Deliberately injecting failure in a controlled way surfaces weaknesses before real, uncontrolled failure does. | Has chaos testing (killing instances, injecting latency/errors) been run against critical paths? |
46
- | 8 | Synthetic monitoring | Catches outages and regressions from the outside, the way a real user would experience them, independent of internal metrics. | Are synthetic checks running against critical user journeys from outside the infrastructure? |
47
- | 9 | Error budgets | Gives a quantified, agreed-upon threshold for how much unreliability is acceptable, so incident response isn't a judgment call every time. | Is there an agreed error budget per service, and does exceeding it trigger a defined response (e.g. freeze on new features)? |
48
- | 10 | Postmortems | Without a blameless, written record, the same class of incident tends to recur because the lesson isn't institutionalized. | Does every significant incident get a blameless postmortem with concrete follow-up actions that are actually tracked to completion? |
29
+ | ENG-04-01 | Correlation IDs | Without a shared ID, tracing one user's request across multiple services means grepping logs by timestamp and guessing. | Does every request get a correlation/request ID that's propagated across all services it touches and included in every log line? |
30
+ | ENG-04-02 | Distributed tracing | Shows exactly where time is spent across a multi-service call chain — impossible to reconstruct from logs alone at scale. | Is distributed tracing (e.g. OpenTelemetry) instrumented across service boundaries? |
31
+ | ENG-04-03 | Feature flag rollback | Turning off a bad feature via flag is faster and safer than a code rollback/redeploy under incident pressure. | Can the riskiest recent features be disabled via flag without a deploy? |
32
+ | ENG-04-04 | Canary analysis | Rolling out to a small subset first catches regressions before they hit 100% of traffic. | Are risky changes rolled out to a canary/subset with automated comparison against the baseline before full rollout? |
33
+ | ENG-04-05 | Replay traffic | Re-running real production requests against a fix confirms it actually resolves the issue, not just a synthetic test case. | Is there a way to replay real production traffic (or a sample) against a candidate fix before it ships? |
34
+ | ENG-04-06 | Heap dumps | A heap dump is often the only way to root-cause a memory leak instead of guessing from symptoms. | Is heap-dump capture available (manually or via crash trigger) for services with memory-related symptoms? |
35
+ | ENG-04-07 | Chaos testing | Deliberately injecting failure in a controlled way surfaces weaknesses before real, uncontrolled failure does. | Has chaos testing (killing instances, injecting latency/errors) been run against critical paths? |
36
+ | ENG-04-08 | Synthetic monitoring | Catches outages and regressions from the outside, the way a real user would experience them, independent of internal metrics. | Are synthetic checks running against critical user journeys from outside the infrastructure? |
37
+ | ENG-04-09 | Error budgets | Gives a quantified, agreed-upon threshold for how much unreliability is acceptable, so incident response isn't a judgment call every time. | Is there an agreed error budget per service, and does exceeding it trigger a defined response (e.g. freeze on new features)? |
38
+ | ENG-04-10 | Postmortems | Without a blameless, written record, the same class of incident tends to recur because the lesson isn't institutionalized. | Does every significant incident get a blameless postmortem with concrete follow-up actions that are actually tracked to completion? |
@@ -1,48 +1,38 @@
1
1
  # Code Review Practices
2
2
 
3
- # Engineering Topic 5: Code Review Practices
3
+ ## Engineering Topic 5: Code Review Practices
4
4
 
5
5
  **When to run this:** Ongoing — use this to periodically check whether the team's actual review habits match its stated process, not just once.
6
6
 
7
7
  **Goal of this pass:** Keep review effective and fast rather than either a rubber stamp or a bottleneck.
8
8
 
9
- ## Files in this folder
9
+ ## How to use this reference
10
10
 
11
- | File | Purpose |
12
- |---|---|
13
- | `CHECKLIST.md` | The reference list of concepts for this topic — what each one is, why it matters, and the self-check question to ask. Doesn't get filled in; copy `RESULTS_TEMPLATE.md` to record a real pass. |
14
- | `RESULTS_TEMPLATE.md` | Fillable version of the same list, with a Status column and notes. Copy this file per pass (e.g. `RESULTS_2026-08-29.md`) so history isn't overwritten. |
15
-
16
- Full source list lives in `../ENGINEERING_REFERENCE.md`. Unlike
17
- `../../security-gate/phases/`, this is knowledge/practice review, not pass/fail security
18
- testing — there's no severity rating, and "Fail" isn't the right framing.
19
- Use the Status options in `RESULTS_TEMPLATE.md` instead: Applied, Partial,
20
- Should adopt, or Not applicable.
11
+ Use each stable practice ID in a generated engineering worksheet. Record concrete evidence and choose Applied, Partial, Recommended, Unverified, or N/A. Preserve each dated worksheet as review history.
21
12
 
22
13
  ## Wrap-up
23
14
 
24
15
  - This isn't a gate — nothing here blocks a release the way
25
- Critical/High security items in `../../security-gate/phases/` do.
16
+ Critical/High security items in security phase reviews do.
26
17
  - Total concepts in this topic: 10
27
18
  - Useful as an onboarding read-through, a periodic self-audit, or context
28
19
  to hand an agent before it reviews related code.
29
20
 
30
21
  ---
31
22
 
32
- # Concepts — Topic 5: Code Review Practices
23
+ ## Concepts — Topic 5: Code Review Practices
33
24
 
34
- Reference list only — no status column. Use `RESULTS_TEMPLATE.md` in
35
- this same folder to actually record a pass.
25
+ Use the applicable practices below to populate the worksheet findings table.
36
26
 
37
- | # | Concept | Why it matters | Self-check |
27
+ | Practice ID | Practice | Why it matters | Evidence question |
38
28
  |---|---|---|---|
39
- | 1 | Small PRs | Large PRs get worse review (reviewers skim or rubber-stamp) and take longer to land. | Is there a rough size norm for PRs, and are oversized PRs flagged for splitting? |
40
- | 2 | Clear description | A reviewer without context re-derives the 'why' from the diff alone, which is slower and more error-prone than being told. | Does every PR description explain what changed and why, not just restate the diff? |
41
- | 3 | Constructive feedback | Feedback that reads as personal or vague either gets ignored or damages the reviewer/author relationship over time. | Is feedback phrased around the code/tradeoff rather than the author, with a suggested direction, not just a criticism? |
42
- | 4 | Nitpick vs blocker | Without this distinction, minor style opinions can block a merge as if they were correctness issues. | Are non-blocking comments explicitly labeled (e.g. 'nit:') so the author knows what's optional vs required? |
43
- | 5 | Fast turnaround | A PR that sits for days loses context for both author and reviewer and blocks downstream work. | Is there a target turnaround time for first review, and is it generally being met? |
44
- | 6 | Automated checks first | Humans shouldn't spend review time on things a linter/CI can catch automatically. | Do lint, format, and test checks run and pass before a human reviews the PR? |
45
- | 7 | Context before code | Reviewing code without understanding the surrounding system leads to reviews that miss integration-level problems. | Does the reviewer understand the relevant part of the system before diving into line-by-line comments? |
46
- | 8 | Approve vs request changes | Conflating 'I have a question' with 'this is blocked' slows things down or sends mixed signals. | Is the approve/comment/request-changes distinction used deliberately, not defaulted to whichever is habit? |
47
- | 9 | Self-review first | Authors catch a meaningful fraction of their own issues by re-reading the diff before asking someone else to. | Does the author review their own diff (and leave self-notes where useful) before requesting review? |
48
- | 10 | Learning from reviews | Review comments that aren't retained just repeat themselves across future PRs instead of becoming shared knowledge. | Do recurring review comments get turned into a lint rule, style-guide entry, or documented convention? |
29
+ | ENG-05-01 | Small PRs | Large PRs get worse review (reviewers skim or rubber-stamp) and take longer to land. | Is there a rough size norm for PRs, and are oversized PRs flagged for splitting? |
30
+ | ENG-05-02 | Clear description | A reviewer without context re-derives the 'why' from the diff alone, which is slower and more error-prone than being told. | Does every PR description explain what changed and why, not just restate the diff? |
31
+ | ENG-05-03 | Constructive feedback | Feedback that reads as personal or vague either gets ignored or damages the reviewer/author relationship over time. | Is feedback phrased around the code/tradeoff rather than the author, with a suggested direction, not just a criticism? |
32
+ | ENG-05-04 | Nitpick vs blocker | Without this distinction, minor style opinions can block a merge as if they were correctness issues. | Are non-blocking comments explicitly labeled (e.g. 'nit:') so the author knows what's optional vs required? |
33
+ | ENG-05-05 | Fast turnaround | A PR that sits for days loses context for both author and reviewer and blocks downstream work. | Is there a target turnaround time for first review, and is it generally being met? |
34
+ | ENG-05-06 | Automated checks first | Humans shouldn't spend review time on things a linter/CI can catch automatically. | Do lint, format, and test checks run and pass before a human reviews the PR? |
35
+ | ENG-05-07 | Context before code | Reviewing code without understanding the surrounding system leads to reviews that miss integration-level problems. | Does the reviewer understand the relevant part of the system before diving into line-by-line comments? |
36
+ | ENG-05-08 | Approve vs request changes | Conflating 'I have a question' with 'this is blocked' slows things down or sends mixed signals. | Is the approve/comment/request-changes distinction used deliberately, not defaulted to whichever is habit? |
37
+ | ENG-05-09 | Self-review first | Authors catch a meaningful fraction of their own issues by re-reading the diff before asking someone else to. | Does the author review their own diff (and leave self-notes where useful) before requesting review? |
38
+ | ENG-05-10 | Learning from reviews | Review comments that aren't retained just repeat themselves across future PRs instead of becoming shared knowledge. | Do recurring review comments get turned into a lint rule, style-guide entry, or documented convention? |
@@ -1,48 +1,38 @@
1
1
  # Data Modeling
2
2
 
3
- # Engineering Topic 6: Data Modeling Concepts
3
+ ## Engineering Topic 6: Data Modeling Concepts
4
4
 
5
5
  **When to run this:** When designing a new schema, adding a table/relationship to an existing one, or reviewing a migration before it ships.
6
6
 
7
7
  **Goal of this pass:** Confirm the schema decisions are deliberate — the right relationship type, the right key strategy, the right precision — rather than whatever the ORM defaulted to.
8
8
 
9
- ## Files in this folder
9
+ ## How to use this reference
10
10
 
11
- | File | Purpose |
12
- |---|---|
13
- | `CHECKLIST.md` | The reference list of concepts for this topic — what each one is, why it matters, and the self-check question to ask. Doesn't get filled in; copy `RESULTS_TEMPLATE.md` to record a real pass. |
14
- | `RESULTS_TEMPLATE.md` | Fillable version of the same list, with a Status column and notes. Copy this file per pass (e.g. `RESULTS_2026-08-29.md`) so history isn't overwritten. |
15
-
16
- Full source list lives in `../ENGINEERING_REFERENCE.md`. Unlike
17
- `../../security-gate/phases/`, this is knowledge/practice review, not pass/fail security
18
- testing — there's no severity rating, and "Fail" isn't the right framing.
19
- Use the Status options in `RESULTS_TEMPLATE.md` instead: Applied, Partial,
20
- Should adopt, or Not applicable.
11
+ Use each stable practice ID in a generated engineering worksheet. Record concrete evidence and choose Applied, Partial, Recommended, Unverified, or N/A. Preserve each dated worksheet as review history.
21
12
 
22
13
  ## Wrap-up
23
14
 
24
15
  - This isn't a gate — nothing here blocks a release the way
25
- Critical/High security items in `../../security-gate/phases/` do.
16
+ Critical/High security items in security phase reviews do.
26
17
  - Total concepts in this topic: 10
27
18
  - Useful as an onboarding read-through, a periodic self-audit, or context
28
19
  to hand an agent before it reviews related code.
29
20
 
30
21
  ---
31
22
 
32
- # Concepts — Topic 6: Data Modeling Concepts
23
+ ## Concepts — Topic 6: Data Modeling Concepts
33
24
 
34
- Reference list only — no status column. Use `RESULTS_TEMPLATE.md` in
35
- this same folder to actually record a pass.
25
+ Use the applicable practices below to populate the worksheet findings table.
36
26
 
37
- | # | Concept | Why it matters | Self-check |
27
+ | Practice ID | Practice | Why it matters | Evidence question |
38
28
  |---|---|---|---|
39
- | 1 | Primary vs foreign keys | Gets the basic referential integrity of the schema right; missing FK constraints let orphaned/inconsistent data accumulate silently. | Does every relationship that should be enforced have an actual FK constraint, not just an implied convention? |
40
- | 2 | One-to-many | The most common relationship shape; modeling it as many-to-many or vice versa causes either data duplication or missing constraints. | For each relationship, has one-to-many vs many-to-many actually been verified against real-world cardinality, not assumed? |
41
- | 3 | Many-to-many | Requires a join table; skipping it (e.g. storing a comma-separated list) breaks referential integrity and queryability. | Are many-to-many relationships modeled with a proper join table rather than a denormalized list column? |
42
- | 4 | Composite keys | Sometimes the natural key is a combination of columns, not a synthetic ID — forcing a synthetic key can hide a real uniqueness constraint. | Where a natural composite key exists (e.g. user_id + role_id), is it enforced as a unique constraint even if a synthetic PK is also used? |
43
- | 5 | Soft deletes | A `deleted_at` column preserves history/auditability but means every query must remember to filter it, or leaked 'deleted' data appears. | If soft deletes are used, do all reads consistently filter them out (e.g. via a default scope), and is that not forgotten in raw queries? |
44
- | 6 | Polymorphic associations | Lets one table reference multiple other table types, but sacrifices FK constraint enforcement at the DB level — a known tradeoff, not a free pattern. | Where a polymorphic association is used, was that tradeoff (no DB-level FK) made deliberately, with integrity checks handled elsewhere? |
45
- | 7 | Enum vs lookup table | A hardcoded enum is faster to query but requires a migration/deploy to add a value; a lookup table is more flexible but adds a join. | Was the enum-vs-lookup-table choice made based on how often the value set changes, not just habit? |
46
- | 8 | Audit columns | Without created_at/updated_at/created_by-style columns, debugging 'when did this change and who did it' becomes guesswork. | Do tables that matter for debugging/compliance have consistent audit columns? |
47
- | 9 | Schema migrations | Migrations that aren't reversible or aren't tested against production-scale data can cause downtime or data loss when they run for real. | Are migrations reviewed for reversibility and tested against realistic data volume before running on production? |
48
- | 10 | Precision & data types | Using float for money, or too-small an int type for a growing counter, causes rounding errors or overflow that surface much later. | Are numeric types chosen deliberately (e.g. decimal for currency, right-sized int for counters expected to grow)? |
29
+ | ENG-06-01 | Primary vs foreign keys | Gets the basic referential integrity of the schema right; missing FK constraints let orphaned/inconsistent data accumulate silently. | Does every relationship that should be enforced have an actual FK constraint, not just an implied convention? |
30
+ | ENG-06-02 | One-to-many | The most common relationship shape; modeling it as many-to-many or vice versa causes either data duplication or missing constraints. | For each relationship, has one-to-many vs many-to-many actually been verified against real-world cardinality, not assumed? |
31
+ | ENG-06-03 | Many-to-many | Requires a join table; skipping it (e.g. storing a comma-separated list) breaks referential integrity and queryability. | Are many-to-many relationships modeled with a proper join table rather than a denormalized list column? |
32
+ | ENG-06-04 | Composite keys | Sometimes the natural key is a combination of columns, not a synthetic ID — forcing a synthetic key can hide a real uniqueness constraint. | Where a natural composite key exists (e.g. user_id + role_id), is it enforced as a unique constraint even if a synthetic PK is also used? |
33
+ | ENG-06-05 | Soft deletes | A `deleted_at` column preserves history/auditability but means every query must remember to filter it, or leaked 'deleted' data appears. | If soft deletes are used, do all reads consistently filter them out (e.g. via a default scope), and is that not forgotten in raw queries? |
34
+ | ENG-06-06 | Polymorphic associations | Lets one table reference multiple other table types, but sacrifices FK constraint enforcement at the DB level — a known tradeoff, not a free pattern. | Where a polymorphic association is used, was that tradeoff (no DB-level FK) made deliberately, with integrity checks handled elsewhere? |
35
+ | ENG-06-07 | Enum vs lookup table | A hardcoded enum is faster to query but requires a migration/deploy to add a value; a lookup table is more flexible but adds a join. | Was the enum-vs-lookup-table choice made based on how often the value set changes, not just habit? |
36
+ | ENG-06-08 | Audit columns | Without created_at/updated_at/created_by-style columns, debugging 'when did this change and who did it' becomes guesswork. | Do tables that matter for debugging/compliance have consistent audit columns? |
37
+ | ENG-06-09 | Schema migrations | Migrations that aren't reversible or aren't tested against production-scale data can cause downtime or data loss when they run for real. | Are migrations reviewed for reversibility and tested against realistic data volume before running on production? |
38
+ | ENG-06-10 | Precision & data types | Using float for money, or too-small an int type for a growing counter, causes rounding errors or overflow that surface much later. | Are numeric types chosen deliberately (e.g. decimal for currency, right-sized int for counters expected to grow)? |
@@ -1,48 +1,38 @@
1
1
  # Cloud Cost Saving
2
2
 
3
- # Engineering Topic 7: Cloud Cost-Saving Techniques
3
+ ## Engineering Topic 7: Cloud Cost-Saving Techniques
4
4
 
5
5
  **When to run this:** During a cost review, before scaling up infrastructure, or when a cloud bill increase needs investigating.
6
6
 
7
7
  **Goal of this pass:** Work through the standard cost levers systematically instead of just cutting the first expensive-looking line item.
8
8
 
9
- ## Files in this folder
9
+ ## How to use this reference
10
10
 
11
- | File | Purpose |
12
- |---|---|
13
- | `CHECKLIST.md` | The reference list of concepts for this topic — what each one is, why it matters, and the self-check question to ask. Doesn't get filled in; copy `RESULTS_TEMPLATE.md` to record a real pass. |
14
- | `RESULTS_TEMPLATE.md` | Fillable version of the same list, with a Status column and notes. Copy this file per pass (e.g. `RESULTS_2026-08-29.md`) so history isn't overwritten. |
15
-
16
- Full source list lives in `../ENGINEERING_REFERENCE.md`. Unlike
17
- `../../security-gate/phases/`, this is knowledge/practice review, not pass/fail security
18
- testing — there's no severity rating, and "Fail" isn't the right framing.
19
- Use the Status options in `RESULTS_TEMPLATE.md` instead: Applied, Partial,
20
- Should adopt, or Not applicable.
11
+ Use each stable practice ID in a generated engineering worksheet. Record concrete evidence and choose Applied, Partial, Recommended, Unverified, or N/A. Preserve each dated worksheet as review history.
21
12
 
22
13
  ## Wrap-up
23
14
 
24
15
  - This isn't a gate — nothing here blocks a release the way
25
- Critical/High security items in `../../security-gate/phases/` do.
16
+ Critical/High security items in security phase reviews do.
26
17
  - Total concepts in this topic: 10
27
18
  - Useful as an onboarding read-through, a periodic self-audit, or context
28
19
  to hand an agent before it reviews related code.
29
20
 
30
21
  ---
31
22
 
32
- # Concepts — Topic 7: Cloud Cost-Saving Techniques
23
+ ## Concepts — Topic 7: Cloud Cost-Saving Techniques
33
24
 
34
- Reference list only — no status column. Use `RESULTS_TEMPLATE.md` in
35
- this same folder to actually record a pass.
25
+ Use the applicable practices below to populate the worksheet findings table.
36
26
 
37
- | # | Concept | Why it matters | Self-check |
27
+ | Practice ID | Practice | Why it matters | Evidence question |
38
28
  |---|---|---|---|
39
- | 1 | Spot instances | Substantially cheaper than on-demand, but can be reclaimed with short notice — only right for interruption-tolerant workloads. | Are interruption-tolerant workloads (batch jobs, stateless workers) running on spot instead of on-demand? |
40
- | 2 | Autoscaling | Paying for peak capacity 24/7 wastes money during predictable low-traffic periods. | Does capacity actually scale down during known low-traffic periods, not just scale up under load? |
41
- | 3 | Reserved capacity | Committing to steady-state baseline load ahead of time is cheaper than paying on-demand rates for it continuously. | Has the stable, predictable-load portion of infrastructure been covered by reserved/committed-use pricing? |
42
- | 4 | Right-sizing | Over-provisioned instances (low CPU/memory utilization) are a direct, ongoing waste that compounds over time. | Have instance sizes been checked against actual utilization recently, not just set once at launch and left alone? |
43
- | 5 | Storage tiering | Infrequently accessed data doesn't need to sit on the most expensive, fastest storage tier. | Is cold/infrequently-accessed data moved to a cheaper storage tier rather than left on the default hot tier? |
44
- | 6 | CDN offloading | Serving static/cacheable content from origin instead of a CDN costs more in bandwidth and origin load. | Is static and cacheable content served from a CDN rather than hitting origin servers for every request? |
45
- | 7 | Serverless for spiky loads | Paying for always-on servers to handle infrequent, spiky workloads is wasteful compared to pay-per-invocation. | Are low-frequency, spiky workloads running serverless rather than on dedicated always-on infrastructure? |
46
- | 8 | Idle resource cleanup | Unattached volumes, unused load balancers, and orphaned snapshots accumulate cost silently over time. | Is there a recurring process to find and remove idle/orphaned cloud resources? |
47
- | 9 | Compression | Uncompressed data transfer and storage costs more in both bandwidth and storage fees than it needs to. | Is compression enabled where it's cheap to apply (asset delivery, log storage, backups)? |
48
- | 10 | Multi-region arbitrage | Compute/storage/egress pricing varies meaningfully by region — running in the highest-cost region without a reason is avoidable spend. | Has region choice been checked against pricing, not just picked for proximity or default? |
29
+ | ENG-07-01 | Spot instances | Substantially cheaper than on-demand, but can be reclaimed with short notice — only right for interruption-tolerant workloads. | Are interruption-tolerant workloads (batch jobs, stateless workers) running on spot instead of on-demand? |
30
+ | ENG-07-02 | Autoscaling | Paying for peak capacity 24/7 wastes money during predictable low-traffic periods. | Does capacity actually scale down during known low-traffic periods, not just scale up under load? |
31
+ | ENG-07-03 | Reserved capacity | Committing to steady-state baseline load ahead of time is cheaper than paying on-demand rates for it continuously. | Has the stable, predictable-load portion of infrastructure been covered by reserved/committed-use pricing? |
32
+ | ENG-07-04 | Right-sizing | Over-provisioned instances (low CPU/memory utilization) are a direct, ongoing waste that compounds over time. | Have instance sizes been checked against actual utilization recently, not just set once at launch and left alone? |
33
+ | ENG-07-05 | Storage tiering | Infrequently accessed data doesn't need to sit on the most expensive, fastest storage tier. | Is cold/infrequently-accessed data moved to a cheaper storage tier rather than left on the default hot tier? |
34
+ | ENG-07-06 | CDN offloading | Serving static/cacheable content from origin instead of a CDN costs more in bandwidth and origin load. | Is static and cacheable content served from a CDN rather than hitting origin servers for every request? |
35
+ | ENG-07-07 | Serverless for spiky loads | Paying for always-on servers to handle infrequent, spiky workloads is wasteful compared to pay-per-invocation. | Are low-frequency, spiky workloads running serverless rather than on dedicated always-on infrastructure? |
36
+ | ENG-07-08 | Idle resource cleanup | Unattached volumes, unused load balancers, and orphaned snapshots accumulate cost silently over time. | Is there a recurring process to find and remove idle/orphaned cloud resources? |
37
+ | ENG-07-09 | Compression | Uncompressed data transfer and storage costs more in both bandwidth and storage fees than it needs to. | Is compression enabled where it's cheap to apply (asset delivery, log storage, backups)? |
38
+ | ENG-07-10 | Multi-region arbitrage | Compute/storage/egress pricing varies meaningfully by region — running in the highest-cost region without a reason is avoidable spend. | Has region choice been checked against pricing, not just picked for proximity or default? |
@@ -1,48 +1,38 @@
1
1
  # Testing Types
2
2
 
3
- # Engineering Topic 8: Types of Testing
3
+ ## Engineering Topic 8: Types of Testing
4
4
 
5
5
  **When to run this:** When designing a test strategy for a new project/feature, or auditing whether the current test suite has coverage gaps.
6
6
 
7
7
  **Goal of this pass:** Confirm the right mix of test types is in place for what's actually being built — not every project needs every type, but the choice should be deliberate.
8
8
 
9
- ## Files in this folder
9
+ ## How to use this reference
10
10
 
11
- | File | Purpose |
12
- |---|---|
13
- | `CHECKLIST.md` | The reference list of concepts for this topic — what each one is, why it matters, and the self-check question to ask. Doesn't get filled in; copy `RESULTS_TEMPLATE.md` to record a real pass. |
14
- | `RESULTS_TEMPLATE.md` | Fillable version of the same list, with a Status column and notes. Copy this file per pass (e.g. `RESULTS_2026-08-29.md`) so history isn't overwritten. |
15
-
16
- Full source list lives in `../ENGINEERING_REFERENCE.md`. Unlike
17
- `../../security-gate/phases/`, this is knowledge/practice review, not pass/fail security
18
- testing — there's no severity rating, and "Fail" isn't the right framing.
19
- Use the Status options in `RESULTS_TEMPLATE.md` instead: Applied, Partial,
20
- Should adopt, or Not applicable.
11
+ Use each stable practice ID in a generated engineering worksheet. Record concrete evidence and choose Applied, Partial, Recommended, Unverified, or N/A. Preserve each dated worksheet as review history.
21
12
 
22
13
  ## Wrap-up
23
14
 
24
15
  - This isn't a gate — nothing here blocks a release the way
25
- Critical/High security items in `../../security-gate/phases/` do.
16
+ Critical/High security items in security phase reviews do.
26
17
  - Total concepts in this topic: 10
27
18
  - Useful as an onboarding read-through, a periodic self-audit, or context
28
19
  to hand an agent before it reviews related code.
29
20
 
30
21
  ---
31
22
 
32
- # Concepts — Topic 8: Types of Testing
23
+ ## Concepts — Topic 8: Types of Testing
33
24
 
34
- Reference list only — no status column. Use `RESULTS_TEMPLATE.md` in
35
- this same folder to actually record a pass.
25
+ Use the applicable practices below to populate the worksheet findings table.
36
26
 
37
- | # | Concept | Why it matters | Self-check |
27
+ | Practice ID | Practice | Why it matters | Evidence question |
38
28
  |---|---|---|---|
39
- | 1 | Unit test | Tests one function/module in isolation — fast feedback, but doesn't catch integration problems. | Do core business-logic units have direct unit test coverage, isolated from external dependencies? |
40
- | 2 | Integration test | Tests that multiple components work together correctly (e.g. app + real DB) — catches what unit tests can't. | Are integration tests run against real (or realistic) dependencies, not just mocks, for critical paths? |
41
- | 3 | End-to-end test | Tests a full user flow through the real system — the closest simulation of actual usage, but slow and more brittle. | Do the most critical user journeys have E2E coverage, kept to a small, high-value set rather than everything? |
42
- | 4 | Snapshot test | Catches unintended changes to output (UI render, API response shape) by diffing against a saved reference. | Where snapshot tests are used, are snapshots actually reviewed on change, not blindly re-approved? |
43
- | 5 | Contract test | Verifies that a service's API still matches what its consumers expect, without needing a full integration environment. | For services with external consumers, are contract tests in place to catch breaking API changes before deploy? |
44
- | 6 | Load test | Confirms the system holds up under expected (and above-expected) traffic before it meets that traffic in production. | Has the system been load-tested at a realistic multiple of expected peak traffic? |
45
- | 7 | Chaos test | Confirms the system degrades gracefully under real failure conditions, not just happy-path load. | Has chaos testing been run against the critical paths (see also Debugging Production Issues)? |
46
- | 8 | Mutation test | Checks whether the test suite would actually catch a real bug by deliberately introducing small code mutations and seeing if tests fail. | Has mutation testing been run at least once to sanity-check that the test suite isn't just achieving coverage without catching bugs? |
47
- | 9 | Smoke test | A fast, shallow check that the basic system is up and functional — meant to catch catastrophic failures immediately after deploy. | Does every deploy run a fast smoke test before being considered successful? |
48
- | 10 | Regression test | Confirms a previously fixed bug doesn't come back — without it, the same bug can resurface silently. | Does every fixed bug get a corresponding regression test added to the suite? |
29
+ | ENG-08-01 | Unit test | Tests one function/module in isolation — fast feedback, but doesn't catch integration problems. | Do core business-logic units have direct unit test coverage, isolated from external dependencies? |
30
+ | ENG-08-02 | Integration test | Tests that multiple components work together correctly (e.g. app + real DB) — catches what unit tests can't. | Are integration tests run against real (or realistic) dependencies, not just mocks, for critical paths? |
31
+ | ENG-08-03 | End-to-end test | Tests a full user flow through the real system — the closest simulation of actual usage, but slow and more brittle. | Do the most critical user journeys have E2E coverage, kept to a small, high-value set rather than everything? |
32
+ | ENG-08-04 | Snapshot test | Catches unintended changes to output (UI render, API response shape) by diffing against a saved reference. | Where snapshot tests are used, are snapshots actually reviewed on change, not blindly re-approved? |
33
+ | ENG-08-05 | Contract test | Verifies that a service's API still matches what its consumers expect, without needing a full integration environment. | For services with external consumers, are contract tests in place to catch breaking API changes before deploy? |
34
+ | ENG-08-06 | Load test | Confirms the system holds up under expected (and above-expected) traffic before it meets that traffic in production. | Has the system been load-tested at a realistic multiple of expected peak traffic? |
35
+ | ENG-08-07 | Chaos test | Confirms the system degrades gracefully under real failure conditions, not just happy-path load. | Has chaos testing been run against the critical paths (see also Debugging Production Issues)? |
36
+ | ENG-08-08 | Mutation test | Checks whether the test suite would actually catch a real bug by deliberately introducing small code mutations and seeing if tests fail. | Has mutation testing been run at least once to sanity-check that the test suite isn't just achieving coverage without catching bugs? |
37
+ | ENG-08-09 | Smoke test | A fast, shallow check that the basic system is up and functional — meant to catch catastrophic failures immediately after deploy. | Does every deploy run a fast smoke test before being considered successful? |
38
+ | ENG-08-10 | Regression test | Confirms a previously fixed bug doesn't come back — without it, the same bug can resurface silently. | Does every fixed bug get a corresponding regression test added to the suite? |
@@ -1,48 +1,38 @@
1
1
  # Message Queues
2
2
 
3
- # Engineering Topic 9: Message Queue Concepts
3
+ ## Engineering Topic 9: Message Queue Concepts
4
4
 
5
5
  **When to run this:** When designing or reviewing a system that uses a message queue/event stream (Kafka, RabbitMQ, SQS, etc.) for async communication between services.
6
6
 
7
7
  **Goal of this pass:** Confirm the delivery, ordering, and failure-handling guarantees the system actually needs match what the queue setup actually provides.
8
8
 
9
- ## Files in this folder
9
+ ## How to use this reference
10
10
 
11
- | File | Purpose |
12
- |---|---|
13
- | `CHECKLIST.md` | The reference list of concepts for this topic — what each one is, why it matters, and the self-check question to ask. Doesn't get filled in; copy `RESULTS_TEMPLATE.md` to record a real pass. |
14
- | `RESULTS_TEMPLATE.md` | Fillable version of the same list, with a Status column and notes. Copy this file per pass (e.g. `RESULTS_2026-08-29.md`) so history isn't overwritten. |
15
-
16
- Full source list lives in `../ENGINEERING_REFERENCE.md`. Unlike
17
- `../../security-gate/phases/`, this is knowledge/practice review, not pass/fail security
18
- testing — there's no severity rating, and "Fail" isn't the right framing.
19
- Use the Status options in `RESULTS_TEMPLATE.md` instead: Applied, Partial,
20
- Should adopt, or Not applicable.
11
+ Use each stable practice ID in a generated engineering worksheet. Record concrete evidence and choose Applied, Partial, Recommended, Unverified, or N/A. Preserve each dated worksheet as review history.
21
12
 
22
13
  ## Wrap-up
23
14
 
24
15
  - This isn't a gate — nothing here blocks a release the way
25
- Critical/High security items in `../../security-gate/phases/` do.
16
+ Critical/High security items in security phase reviews do.
26
17
  - Total concepts in this topic: 10
27
18
  - Useful as an onboarding read-through, a periodic self-audit, or context
28
19
  to hand an agent before it reviews related code.
29
20
 
30
21
  ---
31
22
 
32
- # Concepts — Topic 9: Message Queue Concepts
23
+ ## Concepts — Topic 9: Message Queue Concepts
33
24
 
34
- Reference list only — no status column. Use `RESULTS_TEMPLATE.md` in
35
- this same folder to actually record a pass.
25
+ Use the applicable practices below to populate the worksheet findings table.
36
26
 
37
- | # | Concept | Why it matters | Self-check |
27
+ | Practice ID | Practice | Why it matters | Evidence question |
38
28
  |---|---|---|---|
39
- | 1 | Producer / consumer | The basic decoupling pattern — getting the boundary wrong (e.g. producer waiting on consumer) defeats the purpose of using a queue at all. | Are producers and consumers actually decoupled, with the producer not blocked waiting on consumer processing? |
40
- | 2 | Topic + partition | Partitioning enables parallel consumption, but choosing the wrong partition key can cause hot partitions or lost ordering guarantees. | Is the partition key chosen deliberately (e.g. by entity ID) rather than defaulted, and does it avoid hot-partitioning? |
41
- | 3 | Consumer group | Lets multiple consumer instances share the work of one topic without processing the same message redundantly (within the group). | If there are multiple consumer instances, are they correctly grouped so work is distributed, not duplicated? |
42
- | 4 | At-least-once delivery | The common default guarantee — means consumers WILL sometimes see the same message twice and must handle that. | Does every consumer assume at-least-once delivery and handle duplicate messages correctly? |
43
- | 5 | Dead letter queue | Without one, a message that repeatedly fails processing either blocks the queue or is silently dropped. | Do failed messages, after retry limits, go to a dead letter queue instead of blocking or vanishing? |
44
- | 6 | Backpressure | If consumers can't keep up, the system needs a defined behavior (slow producers, buffer, drop) rather than unbounded queue growth. | Is there a defined response when consumer lag grows unbounded, rather than assuming it will always catch up? |
45
- | 7 | Fan-out | Delivering one message to multiple independent consumers (e.g. via separate subscriptions) needs the right topology — a single queue with one consumer group won't do it. | If multiple independent services need the same message, is the topology (e.g. separate subscriptions/topics) actually set up for fan-out? |
46
- | 8 | Message ordering | Most queues only guarantee order within a partition/shard, not globally — code that assumes global order will break. | Does any consumer logic assume strict global ordering, and if so, does the actual queue setup guarantee that? |
47
- | 9 | Idempotent consumer | Given at-least-once delivery, consumers must be able to safely process the same message twice without double-effecting (e.g. double-charging). | Is consumer processing logic idempotent (e.g. keyed on a unique message/operation ID) so redelivery is safe? |
48
- | 10 | Offset commit | Committing the offset too early risks losing a message if processing then fails; committing too late risks reprocessing more than necessary. | Is the offset committed only after successful processing (not before), matching the delivery guarantee the system actually needs? |
29
+ | ENG-09-01 | Producer / consumer | The basic decoupling pattern — getting the boundary wrong (e.g. producer waiting on consumer) defeats the purpose of using a queue at all. | Are producers and consumers actually decoupled, with the producer not blocked waiting on consumer processing? |
30
+ | ENG-09-02 | Topic + partition | Partitioning enables parallel consumption, but choosing the wrong partition key can cause hot partitions or lost ordering guarantees. | Is the partition key chosen deliberately (e.g. by entity ID) rather than defaulted, and does it avoid hot-partitioning? |
31
+ | ENG-09-03 | Consumer group | Lets multiple consumer instances share the work of one topic without processing the same message redundantly (within the group). | If there are multiple consumer instances, are they correctly grouped so work is distributed, not duplicated? |
32
+ | ENG-09-04 | At-least-once delivery | The common default guarantee — means consumers WILL sometimes see the same message twice and must handle that. | Does every consumer assume at-least-once delivery and handle duplicate messages correctly? |
33
+ | ENG-09-05 | Dead letter queue | Without one, a message that repeatedly fails processing either blocks the queue or is silently dropped. | Do failed messages, after retry limits, go to a dead letter queue instead of blocking or vanishing? |
34
+ | ENG-09-06 | Backpressure | If consumers can't keep up, the system needs a defined behavior (slow producers, buffer, drop) rather than unbounded queue growth. | Is there a defined response when consumer lag grows unbounded, rather than assuming it will always catch up? |
35
+ | ENG-09-07 | Fan-out | Delivering one message to multiple independent consumers (e.g. via separate subscriptions) needs the right topology — a single queue with one consumer group won't do it. | If multiple independent services need the same message, is the topology (e.g. separate subscriptions/topics) actually set up for fan-out? |
36
+ | ENG-09-08 | Message ordering | Most queues only guarantee order within a partition/shard, not globally — code that assumes global order will break. | Does any consumer logic assume strict global ordering, and if so, does the actual queue setup guarantee that? |
37
+ | ENG-09-09 | Idempotent consumer | Given at-least-once delivery, consumers must be able to safely process the same message twice without double-effecting (e.g. double-charging). | Is consumer processing logic idempotent (e.g. keyed on a unique message/operation ID) so redelivery is safe? |
38
+ | ENG-09-10 | Offset commit | Committing the offset too early risks losing a message if processing then fails; committing too late risks reprocessing more than necessary. | Is the offset committed only after successful processing (not before), matching the delivery guarantee the system actually needs? |
@@ -0,0 +1,14 @@
1
+ # API Design and Compatibility
2
+
3
+ Use this review before introducing or changing a public, partner, or service-to-service API.
4
+
5
+ | Practice ID | Practice | Why it matters | Evidence question |
6
+ |---|---|---|---|
7
+ | ENG-10-01 | Explicit contracts | Machine-readable contracts reduce client/server drift. | Is the current request, response, and error contract versioned with the implementation? |
8
+ | ENG-10-02 | Backward compatibility | Uncoordinated breaking changes create outages. | Are removals and semantic changes gated by a documented migration window? |
9
+ | ENG-10-03 | Consistent errors | Predictable errors make clients safer and observable. | Do errors use stable codes, safe messages, and correlation identifiers? |
10
+ | ENG-10-04 | Idempotency | Retries must not duplicate important side effects. | Do retryable writes use an idempotency strategy with a defined lifetime? |
11
+ | ENG-10-05 | Pagination and limits | Unbounded reads create latency and cost failures. | Are page size, ordering, cursors, and maximum limits explicit? |
12
+ | ENG-10-06 | Deprecation telemetry | Owners need evidence before retiring a version. | Can maintainers identify remaining callers of deprecated behavior? |
13
+ | ENG-10-07 | Contract tests | Integration assumptions should fail before deployment. | Do provider and consumer tests cover critical compatibility promises? |
14
+ | ENG-10-08 | Safe defaults | Optional fields and defaults affect long-lived clients. | Can old clients ignore additions without changing behavior unexpectedly? |
@@ -0,0 +1,14 @@
1
+ # Reliability, SLOs, and Error Budgets
2
+
3
+ Use this review when defining service reliability or deciding whether delivery speed is outrunning operational health.
4
+
5
+ | Practice ID | Practice | Why it matters | Evidence question |
6
+ |---|---|---|---|
7
+ | ENG-11-01 | User-centered SLI | Reliability should represent user experience. | Does each indicator measure a user-visible success or latency outcome? |
8
+ | ENG-11-02 | Achievable SLO | A target should guide decisions, not promise perfection. | Is the objective based on business need and measured historical behavior? |
9
+ | ENG-11-03 | Error budget | Teams need a shared release-versus-reliability signal. | Is remaining error budget visible and tied to an agreed response? |
10
+ | ENG-11-04 | Multi-window alerts | Fast and slow burns require different detection windows. | Do alerts identify material budget consumption without paging on noise? |
11
+ | ENG-11-05 | Dependency objectives | Upstream limits constrain the service objective. | Are critical dependency availability and latency assumptions recorded? |
12
+ | ENG-11-06 | Graceful degradation | Partial service can preserve essential workflows. | Are noncritical features shed safely when dependencies or capacity fail? |
13
+ | ENG-11-07 | Recovery objectives | Recovery needs measurable targets. | Are RTO and RPO defined and tested for important data and workflows? |
14
+ | ENG-11-08 | Reliability review | Objectives must evolve with product behavior. | Are SLOs reviewed after incidents and material architecture changes? |
@@ -0,0 +1,14 @@
1
+ # Observability and Telemetry
2
+
3
+ Use this review when adding telemetry or when production behavior cannot be explained quickly.
4
+
5
+ | Practice ID | Practice | Why it matters | Evidence question |
6
+ |---|---|---|---|
7
+ | ENG-12-01 | Structured logs | Searchable fields beat unstructured narratives. | Do logs contain stable event names, severity, and correlation context? |
8
+ | ENG-12-02 | Useful metrics | Metrics should describe demand, errors, latency, and saturation. | Can dashboards explain whether users and resources are healthy? |
9
+ | ENG-12-03 | Distributed traces | Cross-service latency needs causal context. | Are trace identifiers propagated across supported boundaries? |
10
+ | ENG-12-04 | Cardinality control | Unbounded labels can disable or overprice monitoring. | Are user-generated and high-cardinality values excluded from metric labels? |
11
+ | ENG-12-05 | Sensitive-data controls | Telemetry is another data store. | Are secrets and personal data redacted before collection? |
12
+ | ENG-12-06 | Actionable alerts | Alerts should lead to a known response. | Does every page identify impact, owner, runbook, and escalation path? |
13
+ | ENG-12-07 | Retention and sampling | Cost controls must preserve investigation value. | Are retention and sampling choices documented by telemetry class? |
14
+ | ENG-12-08 | Instrumentation tests | Broken telemetry can hide production failures. | Do tests verify critical events and trace propagation without asserting noise? |
@@ -0,0 +1,14 @@
1
+ # Deployment and Change Safety
2
+
3
+ Use this review for release pipelines, migrations, feature rollouts, and rollback design.
4
+
5
+ | Practice ID | Practice | Why it matters | Evidence question |
6
+ |---|---|---|---|
7
+ | ENG-13-01 | Small reversible changes | Small batches limit diagnosis and rollback cost. | Can the change be disabled or reverted without unrelated work? |
8
+ | ENG-13-02 | Progressive delivery | Early signals reduce blast radius. | Is rollout staged by environment, cohort, region, or percentage? |
9
+ | ENG-13-03 | Automated verification | Human-only checks miss repeatable regressions. | Are build, test, policy, and artifact checks required before promotion? |
10
+ | ENG-13-04 | Migration compatibility | Code and data often deploy at different times. | Do schema changes support old and new application versions during rollout? |
11
+ | ENG-13-05 | Health-based rollback | Rollback decisions should use defined signals. | Are stop and rollback thresholds tied to service and business health? |
12
+ | ENG-13-06 | Artifact promotion | Rebuilding can change what was tested. | Is the verified immutable artifact promoted between environments? |
13
+ | ENG-13-07 | Change traceability | Operators need to connect behavior to releases. | Can a running version be traced to source, build, approvals, and configuration? |
14
+ | ENG-13-08 | Post-deployment observation | Success requires evidence after deployment. | Is there an owned observation window with a clear completion decision? |
@@ -0,0 +1,14 @@
1
+ # Capacity, Concurrency, and Resource Management
2
+
3
+ Use this review for load-sensitive services, shared resources, and systems with concurrent state changes.
4
+
5
+ | Practice ID | Practice | Why it matters | Evidence question |
6
+ |---|---|---|---|
7
+ | ENG-14-01 | Capacity model | Demand and limits should be explicit. | Are peak throughput, latency, storage, and headroom assumptions measured? |
8
+ | ENG-14-02 | Bounded concurrency | Unlimited work can exhaust every dependency. | Are worker, connection, and request counts bounded at each layer? |
9
+ | ENG-14-03 | Backpressure | Overload should be controlled rather than amplified. | Does the system reject, queue, or slow work using documented thresholds? |
10
+ | ENG-14-04 | Timeouts and cancellation | Abandoned work should release resources. | Are timeouts budgeted end-to-end and cancellation signals propagated? |
11
+ | ENG-14-05 | Contention testing | Shared locks and hot keys appear under load. | Do tests exercise realistic contention and skew rather than uniform traffic only? |
12
+ | ENG-14-06 | Autoscaling signals | Scaling on the wrong signal can worsen overload. | Do scaling signals lead demand and respect dependency capacity? |
13
+ | ENG-14-07 | Resource cleanup | Leaks turn normal operation into delayed failure. | Are connections, files, memory, and temporary objects bounded and observable? |
14
+ | ENG-14-08 | Degradation plan | Capacity exhaustion must preserve critical work. | Are admission control and priority rules defined for overload conditions? |