@jamie-tam/forge 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (213) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +389 -0
  3. package/agents/architect.md +92 -0
  4. package/agents/builder.md +122 -0
  5. package/agents/code-reviewer.md +107 -0
  6. package/agents/concept-designer.md +207 -0
  7. package/agents/craft-reviewer.md +132 -0
  8. package/agents/critic.md +130 -0
  9. package/agents/doc-writer.md +85 -0
  10. package/agents/dreamer.md +129 -0
  11. package/agents/e2e-runner.md +89 -0
  12. package/agents/gotcha-hunter.md +127 -0
  13. package/agents/prototype-builder.md +193 -0
  14. package/agents/prototype-codifier.md +204 -0
  15. package/agents/prototype-reviewer.md +163 -0
  16. package/agents/security-reviewer.md +108 -0
  17. package/agents/spec-reviewer.md +94 -0
  18. package/agents/tracer.md +98 -0
  19. package/agents/wireframer.md +109 -0
  20. package/commands/abort.md +25 -0
  21. package/commands/bugfix.md +151 -0
  22. package/commands/evolve.md +118 -0
  23. package/commands/feature.md +236 -0
  24. package/commands/forge.md +100 -0
  25. package/commands/greenfield.md +185 -0
  26. package/commands/hotfix.md +98 -0
  27. package/commands/refactor.md +147 -0
  28. package/commands/resume.md +25 -0
  29. package/commands/setup.md +201 -0
  30. package/commands/status.md +27 -0
  31. package/commands/task-force.md +110 -0
  32. package/commands/validate.md +12 -0
  33. package/dist/__tests__/active-manifest.test.js +272 -0
  34. package/dist/__tests__/copy.test.js +96 -0
  35. package/dist/__tests__/gate-check.test.js +384 -0
  36. package/dist/__tests__/wiki.test.js +472 -0
  37. package/dist/__tests__/work-manifest.test.js +304 -0
  38. package/dist/active-manifest.js +229 -0
  39. package/dist/cli.js +158 -0
  40. package/dist/copy.js +124 -0
  41. package/dist/gate-check.js +326 -0
  42. package/dist/hooks.js +60 -0
  43. package/dist/init.js +140 -0
  44. package/dist/manifest.js +90 -0
  45. package/dist/merge.js +77 -0
  46. package/dist/paths.js +36 -0
  47. package/dist/uninstall.js +216 -0
  48. package/dist/update.js +158 -0
  49. package/dist/verify-manifest.js +65 -0
  50. package/dist/verify.js +98 -0
  51. package/dist/wiki-ui.js +310 -0
  52. package/dist/wiki.js +364 -0
  53. package/dist/work-manifest.js +798 -0
  54. package/hooks/config/gate-requirements.json +79 -0
  55. package/hooks/hooks.json +143 -0
  56. package/hooks/scripts/analyze-telemetry.sh +114 -0
  57. package/hooks/scripts/gate-enforcer.sh +164 -0
  58. package/hooks/scripts/pre-compact.sh +90 -0
  59. package/hooks/scripts/session-start.sh +81 -0
  60. package/hooks/scripts/telemetry.sh +41 -0
  61. package/hooks/scripts/wiki-lint.sh +87 -0
  62. package/hooks/templates/AGENTS.md.template +48 -0
  63. package/hooks/templates/CLAUDE.md.template +45 -0
  64. package/package.json +55 -0
  65. package/protocols/README.md +40 -0
  66. package/protocols/codex.md +151 -0
  67. package/protocols/graphify.md +156 -0
  68. package/references/common/agent-coordination.md +65 -0
  69. package/references/common/coding-standards.md +54 -0
  70. package/references/common/feature-tracking.md +21 -0
  71. package/references/common/io-protocol.md +36 -0
  72. package/references/common/phases.md +57 -0
  73. package/references/common/quality-gates.md +130 -0
  74. package/references/common/skill-authoring.md +154 -0
  75. package/references/common/skill-compliance.md +30 -0
  76. package/references/python/standards.md +44 -0
  77. package/references/react/standards.md +61 -0
  78. package/references/typescript/standards.md +42 -0
  79. package/rules/common/forge-system.md +59 -0
  80. package/rules/common/git-workflow.md +40 -0
  81. package/rules/common/guardrails.md +37 -0
  82. package/rules/common/quality-gates.md +18 -0
  83. package/rules/common/security.md +50 -0
  84. package/rules/common/skill-selection.md +78 -0
  85. package/rules/common/testing.md +58 -0
  86. package/rules/common/verification.md +39 -0
  87. package/skills/build-pr-workflow/SKILL.md +301 -0
  88. package/skills/build-pr-workflow/references/pr-template.md +62 -0
  89. package/skills/build-pr-workflow/references/subagent-merge.md +47 -0
  90. package/skills/build-pr-workflow/references/worktree-setup.md +125 -0
  91. package/skills/build-prototype/SKILL.md +264 -0
  92. package/skills/build-scaffold/SKILL.md +340 -0
  93. package/skills/build-tdd/SKILL.md +89 -0
  94. package/skills/build-wireframe/SKILL.md +110 -0
  95. package/skills/build-wireframe/assets/baseline-template.html +486 -0
  96. package/skills/build-wireframe/references/demo-walkthroughs.md +170 -0
  97. package/skills/build-wireframe/references/gotchas.md +188 -0
  98. package/skills/build-wireframe/references/legend-lines.md +141 -0
  99. package/skills/concept-slides/SKILL.md +192 -0
  100. package/skills/deliver-db-migration/SKILL.md +466 -0
  101. package/skills/deliver-deploy/SKILL.md +407 -0
  102. package/skills/deliver-onboarding/SKILL.md +198 -0
  103. package/skills/deliver-onboarding/references/document-templates.md +393 -0
  104. package/skills/deliver-onboarding/templates/getting-started.md +122 -0
  105. package/skills/discover-codebase-analysis/SKILL.md +448 -0
  106. package/skills/discover-requirements/SKILL.md +418 -0
  107. package/skills/discover-requirements/templates/prd.md +99 -0
  108. package/skills/discover-requirements/templates/technical-spec.md +123 -0
  109. package/skills/discover-requirements/templates/user-stories.md +76 -0
  110. package/skills/harden/SKILL.md +214 -0
  111. package/skills/iterate-prototype/SKILL.md +241 -0
  112. package/skills/plan-architecture/SKILL.md +457 -0
  113. package/skills/plan-architecture/templates/adr-template.md +52 -0
  114. package/skills/plan-architecture/templates/api-contract.md +99 -0
  115. package/skills/plan-architecture/templates/db-schema.md +81 -0
  116. package/skills/plan-architecture/templates/system-design.md +111 -0
  117. package/skills/plan-brainstorm/SKILL.md +433 -0
  118. package/skills/plan-design-system/SKILL.md +279 -0
  119. package/skills/plan-task-decompose/SKILL.md +454 -0
  120. package/skills/quality-code-review/SKILL.md +286 -0
  121. package/skills/quality-security-audit/SKILL.md +292 -0
  122. package/skills/quality-security-audit/references/audit-report-template.md +89 -0
  123. package/skills/quality-security-audit/references/owasp-checks.md +178 -0
  124. package/skills/quality-test-execution/SKILL.md +435 -0
  125. package/skills/quality-test-plan/SKILL.md +297 -0
  126. package/skills/quality-test-plan/references/test-type-guide.md +263 -0
  127. package/skills/quality-test-plan/templates/e2e-test-plan.md +72 -0
  128. package/skills/quality-test-plan/templates/integration-test-plan.md +74 -0
  129. package/skills/quality-test-plan/templates/load-test-plan.md +111 -0
  130. package/skills/quality-test-plan/templates/smoke-test-plan.md +68 -0
  131. package/skills/quality-test-plan/templates/unit-test-plan.md +56 -0
  132. package/skills/quality-uiux/SKILL.md +481 -0
  133. package/skills/support-debug/SKILL.md +464 -0
  134. package/skills/support-dream/SKILL.md +213 -0
  135. package/skills/support-gotcha/SKILL.md +249 -0
  136. package/skills/support-runtime-reachability/SKILL.md +190 -0
  137. package/skills/support-runtime-reachability/scripts/__fixtures__/case-01-passes-app-use/src/app.ts +7 -0
  138. package/skills/support-runtime-reachability/scripts/__fixtures__/case-01-passes-app-use/src/handlers/cases.ts +7 -0
  139. package/skills/support-runtime-reachability/scripts/__fixtures__/case-02-orphan-no-app-use/src/app.ts +8 -0
  140. package/skills/support-runtime-reachability/scripts/__fixtures__/case-02-orphan-no-app-use/src/handlers/cases.ts +7 -0
  141. package/skills/support-runtime-reachability/scripts/__fixtures__/case-03-orphan-import-only/src/App.tsx +5 -0
  142. package/skills/support-runtime-reachability/scripts/__fixtures__/case-03-orphan-import-only/src/components/RingingBanner.tsx +7 -0
  143. package/skills/support-runtime-reachability/scripts/__fixtures__/case-03-orphan-import-only/src/hooks/useTwilio.ts +6 -0
  144. package/skills/support-runtime-reachability/scripts/__fixtures__/case-04-jsx-component-rendered/src/App.tsx +5 -0
  145. package/skills/support-runtime-reachability/scripts/__fixtures__/case-04-jsx-component-rendered/src/components/MyComp.tsx +3 -0
  146. package/skills/support-runtime-reachability/scripts/__fixtures__/case-05-jsx-component-not-rendered/src/App.tsx +3 -0
  147. package/skills/support-runtime-reachability/scripts/__fixtures__/case-05-jsx-component-not-rendered/src/components/Orphan.tsx +3 -0
  148. package/skills/support-runtime-reachability/scripts/__fixtures__/case-06-class-instantiated/src/lib/Service.ts +6 -0
  149. package/skills/support-runtime-reachability/scripts/__fixtures__/case-06-class-instantiated/src/main.ts +4 -0
  150. package/skills/support-runtime-reachability/scripts/__fixtures__/case-07-class-not-instantiated/src/lib/Lonely.ts +5 -0
  151. package/skills/support-runtime-reachability/scripts/__fixtures__/case-07-class-not-instantiated/src/main.ts +2 -0
  152. package/skills/support-runtime-reachability/scripts/__fixtures__/case-08-default-export-imported-and-called/src/handler.ts +3 -0
  153. package/skills/support-runtime-reachability/scripts/__fixtures__/case-08-default-export-imported-and-called/src/main.ts +3 -0
  154. package/skills/support-runtime-reachability/scripts/__fixtures__/case-09-default-export-orphan/src/handler.ts +3 -0
  155. package/skills/support-runtime-reachability/scripts/__fixtures__/case-09-default-export-orphan/src/main.ts +2 -0
  156. package/skills/support-runtime-reachability/scripts/__fixtures__/case-10-aliased-named-export/src/lib.ts +5 -0
  157. package/skills/support-runtime-reachability/scripts/__fixtures__/case-10-aliased-named-export/src/main.ts +3 -0
  158. package/skills/support-runtime-reachability/scripts/__fixtures__/case-11-re-export-chain/src/lib/index.ts +1 -0
  159. package/skills/support-runtime-reachability/scripts/__fixtures__/case-11-re-export-chain/src/lib/internal.ts +3 -0
  160. package/skills/support-runtime-reachability/scripts/__fixtures__/case-11-re-export-chain/src/main.ts +3 -0
  161. package/skills/support-runtime-reachability/scripts/__fixtures__/case-12-test-only-caller/src/util.test.ts +5 -0
  162. package/skills/support-runtime-reachability/scripts/__fixtures__/case-12-test-only-caller/src/util.ts +3 -0
  163. package/skills/support-runtime-reachability/scripts/__fixtures__/case-13-gated-pending-annotation/src/future.ts +4 -0
  164. package/skills/support-runtime-reachability/scripts/__fixtures__/case-14-untraceable-annotation/src/decorated.ts +4 -0
  165. package/skills/support-runtime-reachability/scripts/__fixtures__/case-15-untraceable-empty/src/lazy.ts +4 -0
  166. package/skills/support-runtime-reachability/scripts/__fixtures__/case-16-python-module/src/lib.py +15 -0
  167. package/skills/support-runtime-reachability/scripts/__fixtures__/case-16-python-module/src/main.py +5 -0
  168. package/skills/support-runtime-reachability/scripts/__fixtures__/case-17-router-use/src/parent.ts +5 -0
  169. package/skills/support-runtime-reachability/scripts/__fixtures__/case-17-router-use/src/routes/cases.ts +5 -0
  170. package/skills/support-runtime-reachability/scripts/__fixtures__/case-18-shadowed-name-fp/src/lib/foo.ts +3 -0
  171. package/skills/support-runtime-reachability/scripts/__fixtures__/case-18-shadowed-name-fp/src/other.ts +8 -0
  172. package/skills/support-runtime-reachability/scripts/__fixtures__/case-19-same-name-different-module/src/handlers/cases.ts +4 -0
  173. package/skills/support-runtime-reachability/scripts/__fixtures__/case-19-same-name-different-module/src/handlers/users.ts +4 -0
  174. package/skills/support-runtime-reachability/scripts/__fixtures__/case-19-same-name-different-module/src/main.ts +5 -0
  175. package/skills/support-runtime-reachability/scripts/__fixtures__/case-20-aliased-import-usage/src/handlers/cases.ts +3 -0
  176. package/skills/support-runtime-reachability/scripts/__fixtures__/case-20-aliased-import-usage/src/main.ts +4 -0
  177. package/skills/support-runtime-reachability/scripts/__fixtures__/case-21-mixed-default-and-named/src/lib.ts +5 -0
  178. package/skills/support-runtime-reachability/scripts/__fixtures__/case-21-mixed-default-and-named/src/main.ts +5 -0
  179. package/skills/support-runtime-reachability/scripts/__fixtures__/case-22-dynamic-import-then-caller/src/lib.ts +3 -0
  180. package/skills/support-runtime-reachability/scripts/__fixtures__/case-22-dynamic-import-then-caller/src/main.ts +8 -0
  181. package/skills/support-runtime-reachability/scripts/__fixtures__/case-23-dynamic-import-with-space/src/lib.ts +3 -0
  182. package/skills/support-runtime-reachability/scripts/__fixtures__/case-23-dynamic-import-with-space/src/main.ts +7 -0
  183. package/skills/support-runtime-reachability/scripts/check.mjs +638 -0
  184. package/skills/support-runtime-reachability/scripts/check.test.mjs +244 -0
  185. package/skills/support-skill-validator/SKILL.md +194 -0
  186. package/skills/support-skill-validator/references/false-positives.md +59 -0
  187. package/skills/support-skill-validator/references/validation-checks.md +280 -0
  188. package/skills/support-system-guide/SKILL.md +311 -0
  189. package/skills/support-task-force/SKILL.md +265 -0
  190. package/skills/support-task-force/references/dispatch-pattern.md +178 -0
  191. package/skills/support-task-force/references/synthesis-template.md +126 -0
  192. package/skills/support-wiki-bootstrap/SKILL.md +37 -0
  193. package/skills/support-wiki-lint/SKILL.md +196 -0
  194. package/skills/support-wiki-lint/scripts/lint.mjs +488 -0
  195. package/skills/support-wiki-lint/scripts/lint.test.mjs +196 -0
  196. package/templates/README.md +23 -0
  197. package/templates/aiwiki/CLAUDE.md.template +78 -0
  198. package/templates/aiwiki/schemas/architecture.md +118 -0
  199. package/templates/aiwiki/schemas/convention.md +112 -0
  200. package/templates/aiwiki/schemas/decision.md +144 -0
  201. package/templates/aiwiki/schemas/gotcha.md +118 -0
  202. package/templates/aiwiki/schemas/oracle.md +105 -0
  203. package/templates/aiwiki/schemas/session.md +125 -0
  204. package/templates/manifests/bugfix.yaml +41 -0
  205. package/templates/manifests/feature.yaml +69 -0
  206. package/templates/manifests/greenfield.yaml +61 -0
  207. package/templates/manifests/hotfix.yaml +45 -0
  208. package/templates/manifests/refactor.yaml +44 -0
  209. package/templates/manifests/v5/SCHEMA.md +327 -0
  210. package/templates/manifests/v5/feature.yaml +77 -0
  211. package/templates/manifests/v6/SCHEMA.md +199 -0
  212. package/templates/wiki-html/dream-detail.html +378 -0
  213. package/templates/wiki-html/dreams-list.html +155 -0
@@ -0,0 +1,74 @@
1
+ # Integration Test Plan
2
+
3
+ ## Integration Point: {component A} <-> {component B}
4
+
5
+ ### Test Scenario: {scenario_name}
6
+
7
+ - **Components Involved**: {list of components/services being tested together}
8
+ - **Description**: {what interaction this test verifies}
9
+
10
+ #### Setup Requirements
11
+ - {Database seeded with: specific test data}
12
+ - {Service X running on: port/URL}
13
+ - {Environment variable: VALUE}
14
+ - {External service mock: configured to return...}
15
+
16
+ #### Test Steps
17
+ 1. {Action}: {what to do}
18
+ - **Expected**: {what should happen}
19
+ 2. {Action}: {what to do}
20
+ - **Expected**: {what should happen}
21
+ 3. {Verify}: {what to check}
22
+ - **Expected**: {the final state or response}
23
+
24
+ #### Expected Behavior
25
+ - {Component A sends X to Component B}
26
+ - {Component B responds with Y}
27
+ - {Database state after: describe expected records}
28
+
29
+ #### Error Scenarios
30
+ - **{Component B is unavailable}**: {expected behavior — retry, fallback, error response}
31
+ - **{Invalid data from Component A}**: {expected behavior — validation error, rejection}
32
+ - **{Timeout}**: {expected behavior — timeout handling, circuit breaker}
33
+
34
+ #### Cleanup
35
+ - {Delete test records from database}
36
+ - {Reset external service mocks}
37
+ - {Restore original configuration}
38
+
39
+ ---
40
+
41
+ ### Test Scenario: {next_scenario_name}
42
+
43
+ - **Components Involved**: {list}
44
+ - **Description**: {what this tests}
45
+
46
+ #### Setup Requirements
47
+ - {list setup needs}
48
+
49
+ #### Test Steps
50
+ 1. {step}
51
+ 2. {step}
52
+
53
+ #### Expected Behavior
54
+ - {expected outcome}
55
+
56
+ #### Cleanup
57
+ - {cleanup steps}
58
+
59
+ ---
60
+
61
+ ## Integration Matrix
62
+
63
+ | Component A | Component B | Scenarios | Status |
64
+ |------------|------------|-----------|--------|
65
+ | {API} | {Database} | {count} | Planned |
66
+ | {API} | {Auth Service} | {count} | Planned |
67
+ | {Worker} | {Queue} | {count} | Planned |
68
+
69
+ ## Test Summary
70
+
71
+ | Integration Point | Happy Path | Error Handling | Timeout/Retry | Total |
72
+ |------------------|-----------|---------------|---------------|-------|
73
+ | {point} | {count} | {count} | {count} | {count} |
74
+ | **Total** | {count} | {count} | {count} | {count} |
@@ -0,0 +1,111 @@
1
+ # Load Test Plan
2
+
3
+ ## Scenario: {scenario_name}
4
+
5
+ ### Description
6
+ {What user behavior or system load this scenario simulates.}
7
+
8
+ ### Configuration
9
+
10
+ | Parameter | Value |
11
+ |-----------|-------|
12
+ | Virtual Users (VUs) | {number, e.g., 100} |
13
+ | Ramp-up Period | {duration, e.g., 2 minutes} |
14
+ | Sustained Duration | {duration, e.g., 10 minutes} |
15
+ | Ramp-down Period | {duration, e.g., 1 minute} |
16
+ | Total Duration | {total, e.g., 13 minutes} |
17
+
18
+ ### Load Profile
19
+ ```
20
+ VUs
21
+ ^
22
+ | _______________
23
+ | / \
24
+ | / \
25
+ | / \
26
+ | / \
27
+ |___/ \___
28
+ +------------------------------> Time
29
+ 0 2min 12min 13min
30
+ ramp sustain down
31
+ ```
32
+
33
+ ### Endpoints Under Test
34
+
35
+ | Endpoint | Method | Weight | Payload |
36
+ |----------|--------|--------|---------|
37
+ | {/path} | GET | {e.g., 60%} | — |
38
+ | {/path} | POST | {e.g., 25%} | {description of payload} |
39
+ | {/path} | GET | {e.g., 15%} | — |
40
+
41
+ ### Thresholds (Pass/Fail Criteria)
42
+
43
+ | Metric | Target | Fail If |
44
+ |--------|--------|---------|
45
+ | Throughput | {e.g., >= 500 req/s} | {< 400 req/s} |
46
+ | Latency p50 | {e.g., < 100ms} | {>= 200ms} |
47
+ | Latency p95 | {e.g., < 500ms} | {>= 1000ms} |
48
+ | Latency p99 | {e.g., < 1000ms} | {>= 3000ms} |
49
+ | Error Rate | {e.g., < 0.1%} | {>= 1%} |
50
+ | CPU Usage | {e.g., < 70%} | {>= 90%} |
51
+ | Memory Usage | {e.g., < 80%} | {>= 95%} |
52
+
53
+ ### Think Time
54
+ - Between requests: {e.g., 1-3 seconds, randomized}
55
+ - Simulates: {realistic user behavior / worst case / sustained pressure}
56
+
57
+ ---
58
+
59
+ ## Scenario: {stress_test_scenario_name}
60
+
61
+ ### Description
62
+ {Push beyond normal capacity to find breaking points.}
63
+
64
+ ### Configuration
65
+
66
+ | Parameter | Value |
67
+ |-----------|-------|
68
+ | Virtual Users (VUs) | {higher number, e.g., 500} |
69
+ | Ramp-up Period | {duration} |
70
+ | Sustained Duration | {duration} |
71
+
72
+ ### Thresholds
73
+
74
+ | Metric | Target | Notes |
75
+ |--------|--------|-------|
76
+ | Breaking point | {identify VU count where errors exceed 5%} | Document the limit |
77
+ | Recovery time | {after load drops, how fast does the system recover?} | Should be < {time} |
78
+ | Graceful degradation | {system returns errors, does not crash} | No 5xx cascades |
79
+
80
+ ---
81
+
82
+ ## Scenario Summary
83
+
84
+ | Scenario | VUs | Duration | Purpose |
85
+ |----------|-----|----------|---------|
86
+ | {normal load} | {N} | {duration} | Verify baseline performance |
87
+ | {peak load} | {N} | {duration} | Verify peak handling |
88
+ | {stress test} | {N} | {duration} | Find breaking points |
89
+ | {soak test} | {N} | {long duration} | Check for memory leaks, connection exhaustion |
90
+
91
+ ## Run Instructions
92
+
93
+ ```bash
94
+ # Run with k6
95
+ k6 run --vus {N} --duration {time} {script.js}
96
+
97
+ # Run with specific scenario
98
+ k6 run --env SCENARIO={name} {script.js}
99
+ ```
100
+
101
+ ## Results Template
102
+
103
+ After running, fill in:
104
+
105
+ | Metric | Target | Actual | Status |
106
+ |--------|--------|--------|--------|
107
+ | Throughput | {target} | {actual} | PASS / FAIL |
108
+ | p50 Latency | {target} | {actual} | PASS / FAIL |
109
+ | p95 Latency | {target} | {actual} | PASS / FAIL |
110
+ | p99 Latency | {target} | {actual} | PASS / FAIL |
111
+ | Error Rate | {target} | {actual} | PASS / FAIL |
@@ -0,0 +1,68 @@
1
+ # Smoke Test Plan
2
+
3
+ Critical paths only. Run after every deployment to verify the system is functional.
4
+
5
+ ## Test: {test_name}
6
+
7
+ - **Endpoint/Page**: {METHOD} {/path} or {URL}
8
+ - **Description**: {what critical functionality this verifies}
9
+ - **Expected Response**: {status code, key fields in response body, page element visible}
10
+ - **Max Response Time**: {e.g., 2000ms}
11
+ - **Run After Deploy**: Yes
12
+
13
+ ### Verification
14
+ ```
15
+ Request: {METHOD} {base_url}{/path}
16
+ Headers: {required headers}
17
+ Body: {request body if applicable}
18
+ Expect: Status {code}, body contains "{key field or value}"
19
+ Timeout: {max ms}
20
+ ```
21
+
22
+ ---
23
+
24
+ ## Test: {test_name}
25
+
26
+ - **Endpoint/Page**: {METHOD} {/path}
27
+ - **Description**: {what this verifies}
28
+ - **Expected Response**: {expected result}
29
+ - **Max Response Time**: {e.g., 1000ms}
30
+ - **Run After Deploy**: Yes
31
+
32
+ ### Verification
33
+ ```
34
+ Request: {METHOD} {base_url}{/path}
35
+ Expect: Status {code}
36
+ Timeout: {max ms}
37
+ ```
38
+
39
+ ---
40
+
41
+ ## Smoke Test Checklist
42
+
43
+ | # | Test | Endpoint/Page | Expected | Max Time | Status |
44
+ |---|------|--------------|----------|----------|--------|
45
+ | 1 | Health check | GET /health | 200 OK | 500ms | — |
46
+ | 2 | Homepage loads | GET / | 200, title present | 2000ms | — |
47
+ | 3 | Auth works | POST /auth/login | 200, token returned | 1000ms | — |
48
+ | 4 | Primary API works | GET /api/{resource} | 200, data returned | 1000ms | — |
49
+ | 5 | Database connected | GET /health/db | 200, connected: true | 500ms | — |
50
+ | 6 | {critical path} | {endpoint} | {expected} | {time} | — |
51
+
52
+ ## Run Instructions
53
+
54
+ ```bash
55
+ # Run all smoke tests
56
+ {command to run smoke tests}
57
+
58
+ # Run against specific environment
59
+ {command} --env={staging|production}
60
+ ```
61
+
62
+ ## Failure Protocol
63
+
64
+ If any smoke test fails after deployment:
65
+ 1. **Do NOT proceed** with further deployments
66
+ 2. Check application logs for errors
67
+ 3. If critical: initiate rollback (see deploy runbook)
68
+ 4. If non-critical: assess impact, decide rollback vs. hotfix
@@ -0,0 +1,56 @@
1
+ # Unit Test Plan
2
+
3
+ ## Module: {module/file name}
4
+
5
+ ### Function: {function_name}
6
+
7
+ #### Test: {test_name}
8
+ - **Description**: {what behavior this test verifies}
9
+ - **Input**: {input values or setup}
10
+ - **Expected Output**: {expected return value or side effect}
11
+ - **Type**: Happy path / Edge case / Error case
12
+
13
+ #### Test: {test_name} — Edge Cases
14
+ - **Description**: {what edge case this tests}
15
+ - **Input**: {edge case input — null, empty, boundary, overflow, etc.}
16
+ - **Expected Output**: {expected behavior for edge case}
17
+ - **Type**: Edge case
18
+
19
+ #### Test: {test_name} — Error Handling
20
+ - **Description**: {what error scenario this tests}
21
+ - **Input**: {invalid input or error condition}
22
+ - **Expected Output**: {expected error type, message, or behavior}
23
+ - **Type**: Error case
24
+
25
+ #### Mocking Requirements
26
+ - {Dependency to mock}: {why it needs mocking — external service, database, etc.}
27
+ - {Dependency to mock}: {why it needs mocking}
28
+
29
+ ---
30
+
31
+ ### Function: {next_function_name}
32
+
33
+ #### Test: {test_name}
34
+ - **Description**: {what behavior this test verifies}
35
+ - **Input**: {input values}
36
+ - **Expected Output**: {expected output}
37
+ - **Type**: Happy path / Edge case / Error case
38
+
39
+ #### Mocking Requirements
40
+ - {none / list dependencies}
41
+
42
+ ---
43
+
44
+ ## Coverage Targets
45
+
46
+ | Module | Target Coverage | Critical Paths (100%) |
47
+ |--------|----------------|----------------------|
48
+ | {module} | 80% | {list functions requiring 100% coverage} |
49
+ | {module} | 80% | {list functions requiring 100% coverage} |
50
+
51
+ ## Test Summary
52
+
53
+ | Module | Happy Path | Edge Cases | Error Cases | Total |
54
+ |--------|-----------|------------|-------------|-------|
55
+ | {module} | {count} | {count} | {count} | {count} |
56
+ | **Total** | {count} | {count} | {count} | {count} |