@rashidee/co2 1.2.5

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 (190) hide show
  1. package/dist/index.js +25449 -0
  2. package/drizzle/0000_remarkable_charles_xavier.sql +210 -0
  3. package/drizzle/0001_wise_wolf_cub.sql +13 -0
  4. package/drizzle/0002_secret_spyke.sql +16 -0
  5. package/drizzle/0003_workspace_config_singleton.sql +16 -0
  6. package/drizzle/0004_terminal_claim_v120.sql +11 -0
  7. package/drizzle/0005_brainstorm_v124.sql +10 -0
  8. package/drizzle/0006_project_v140.sql +6 -0
  9. package/drizzle/0007_prd_wizard_v124.sql +14 -0
  10. package/drizzle/0008_workflow_artifact_v126.sql +24 -0
  11. package/drizzle/0009_project_import_v150.sql +7 -0
  12. package/drizzle/0010_quality_v151.sql +3 -0
  13. package/drizzle/meta/0000_snapshot.json +1335 -0
  14. package/drizzle/meta/0001_snapshot.json +1416 -0
  15. package/drizzle/meta/0002_snapshot.json +1510 -0
  16. package/drizzle/meta/_journal.json +83 -0
  17. package/package.json +41 -0
  18. package/plugin/.claude-plugin/marketplace.json +36 -0
  19. package/plugin/.claude-plugin/plugin.json +22 -0
  20. package/plugin/README.md +625 -0
  21. package/plugin/SKILLS.md +350 -0
  22. package/plugin/co2.svg +5 -0
  23. package/plugin/commands/brainstorm-loop.md +129 -0
  24. package/plugin/skills/conductor-defect/SKILL.md +898 -0
  25. package/plugin/skills/conductor-feature-develop/SKILL.md +1383 -0
  26. package/plugin/skills/conductor-feature-develop/references/implementation-domain-template.md +131 -0
  27. package/plugin/skills/conductor-feature-develop/references/implementation-master-template.md +89 -0
  28. package/plugin/skills/conductor-feature-develop/references/playwright-setup.md +224 -0
  29. package/plugin/skills/conductor-feature-prepare/SKILL.md +604 -0
  30. package/plugin/skills/depgen-k8s/SKILL.md +468 -0
  31. package/plugin/skills/depgen-k8s/references/dockerfile-laravel.md +197 -0
  32. package/plugin/skills/depgen-k8s/references/dockerfile-nodejs.md +163 -0
  33. package/plugin/skills/depgen-k8s/references/dockerfile-spring-boot.md +174 -0
  34. package/plugin/skills/depgen-k8s/references/k8s-patterns.md +869 -0
  35. package/plugin/skills/mockgen-shadcn/SKILL.md +1067 -0
  36. package/plugin/skills/mockgen-shadcn/references/admin-layout-template.md +1467 -0
  37. package/plugin/skills/mockgen-shadcn/references/mockup-hub-template.md +498 -0
  38. package/plugin/skills/mockgen-shadcn/references/mockup-index-template.md +216 -0
  39. package/plugin/skills/mockgen-tailwind/SKILL.md +904 -0
  40. package/plugin/skills/mockgen-tailwind/references/admin-layout-template.md +720 -0
  41. package/plugin/skills/mockgen-tailwind/references/mockup-hub-template.md +498 -0
  42. package/plugin/skills/mockgen-tailwind/references/mockup-index-template.md +190 -0
  43. package/plugin/skills/modelgen-nosql/SKILL.md +617 -0
  44. package/plugin/skills/modelgen-nosql/references/model-extraction-methodology.md +497 -0
  45. package/plugin/skills/modelgen-nosql/references/nosql-design-guide.md +258 -0
  46. package/plugin/skills/modelgen-relational/SKILL.md +707 -0
  47. package/plugin/skills/modelgen-relational/references/model-extraction-methodology.md +499 -0
  48. package/plugin/skills/specgen-flutter-riverpod/SKILL.md +898 -0
  49. package/plugin/skills/specgen-flutter-riverpod/references/component-patterns.md +971 -0
  50. package/plugin/skills/specgen-flutter-riverpod/references/notification-patterns.md +457 -0
  51. package/plugin/skills/specgen-flutter-riverpod/references/routing-patterns.md +362 -0
  52. package/plugin/skills/specgen-flutter-riverpod/references/security-patterns.md +709 -0
  53. package/plugin/skills/specgen-flutter-riverpod/references/spec-template.md +1566 -0
  54. package/plugin/skills/specgen-flutter-riverpod/references/state-patterns.md +518 -0
  55. package/plugin/skills/specgen-flutter-riverpod/references/storage-patterns.md +370 -0
  56. package/plugin/skills/specgen-laravel-eloquent-bladehtmx/SKILL.md +984 -0
  57. package/plugin/skills/specgen-laravel-eloquent-bladehtmx/references/batch-patterns.md +359 -0
  58. package/plugin/skills/specgen-laravel-eloquent-bladehtmx/references/messaging-patterns.md +468 -0
  59. package/plugin/skills/specgen-laravel-eloquent-bladehtmx/references/modulith-patterns.md +461 -0
  60. package/plugin/skills/specgen-laravel-eloquent-bladehtmx/references/reporting-patterns.md +803 -0
  61. package/plugin/skills/specgen-laravel-eloquent-bladehtmx/references/security-patterns.md +501 -0
  62. package/plugin/skills/specgen-laravel-eloquent-bladehtmx/references/spec-template.md +1268 -0
  63. package/plugin/skills/specgen-laravel-eloquent-bladehtmx/references/web-patterns.md +301 -0
  64. package/plugin/skills/specgen-node-cli-web/SKILL.md +561 -0
  65. package/plugin/skills/specgen-node-cli-web/references/auth-patterns.md +293 -0
  66. package/plugin/skills/specgen-node-cli-web/references/cli-packaging-patterns.md +250 -0
  67. package/plugin/skills/specgen-node-cli-web/references/server-patterns.md +247 -0
  68. package/plugin/skills/specgen-node-cli-web/references/spec-template.md +401 -0
  69. package/plugin/skills/specgen-node-cli-web/references/testing-patterns.md +174 -0
  70. package/plugin/skills/specgen-react-mui/SKILL.md +789 -0
  71. package/plugin/skills/specgen-react-mui/references/component-patterns.md +1077 -0
  72. package/plugin/skills/specgen-react-mui/references/reporting-patterns.md +1998 -0
  73. package/plugin/skills/specgen-react-mui/references/routing-patterns.md +461 -0
  74. package/plugin/skills/specgen-react-mui/references/security-patterns.md +599 -0
  75. package/plugin/skills/specgen-react-mui/references/spec-template.md +1030 -0
  76. package/plugin/skills/specgen-react-mui/references/state-patterns.md +327 -0
  77. package/plugin/skills/specgen-react-tailwind/SKILL.md +859 -0
  78. package/plugin/skills/specgen-react-tailwind/references/component-patterns.md +1212 -0
  79. package/plugin/skills/specgen-react-tailwind/references/reporting-patterns.md +1529 -0
  80. package/plugin/skills/specgen-react-tailwind/references/routing-patterns.md +669 -0
  81. package/plugin/skills/specgen-react-tailwind/references/security-patterns.md +656 -0
  82. package/plugin/skills/specgen-react-tailwind/references/spec-template.md +1237 -0
  83. package/plugin/skills/specgen-react-tailwind/references/state-patterns.md +327 -0
  84. package/plugin/skills/specgen-sdk-java/SKILL.md +933 -0
  85. package/plugin/skills/specgen-sdk-java/references/api-extraction-patterns.md +247 -0
  86. package/plugin/skills/specgen-sdk-java/references/http-client-patterns.md +495 -0
  87. package/plugin/skills/specgen-sdk-java/references/packaging-patterns.md +366 -0
  88. package/plugin/skills/specgen-sdk-java/references/spec-template.md +956 -0
  89. package/plugin/skills/specgen-spring-jpa-jtehtmx/SKILL.md +1284 -0
  90. package/plugin/skills/specgen-spring-jpa-jtehtmx/references/batch-patterns.md +1224 -0
  91. package/plugin/skills/specgen-spring-jpa-jtehtmx/references/jasper-patterns.md +1638 -0
  92. package/plugin/skills/specgen-spring-jpa-jtehtmx/references/messaging-patterns.md +512 -0
  93. package/plugin/skills/specgen-spring-jpa-jtehtmx/references/modulith-patterns.md +354 -0
  94. package/plugin/skills/specgen-spring-jpa-jtehtmx/references/security-patterns.md +551 -0
  95. package/plugin/skills/specgen-spring-jpa-jtehtmx/references/spec-template.md +2502 -0
  96. package/plugin/skills/specgen-spring-jpa-jtehtmx/references/web-patterns.md +503 -0
  97. package/plugin/skills/specgen-spring-jpa-restapi/SKILL.md +990 -0
  98. package/plugin/skills/specgen-spring-jpa-restapi/references/batch-patterns.md +1224 -0
  99. package/plugin/skills/specgen-spring-jpa-restapi/references/messaging-patterns.md +512 -0
  100. package/plugin/skills/specgen-spring-jpa-restapi/references/modulith-patterns.md +279 -0
  101. package/plugin/skills/specgen-spring-jpa-restapi/references/reporting-patterns.md +1536 -0
  102. package/plugin/skills/specgen-spring-jpa-restapi/references/restapi-patterns.md +722 -0
  103. package/plugin/skills/specgen-spring-jpa-restapi/references/security-patterns.md +351 -0
  104. package/plugin/skills/specgen-spring-jpa-restapi/references/spec-template.md +553 -0
  105. package/plugin/skills/specgen-ts-cli/SKILL.md +861 -0
  106. package/plugin/skills/specgen-ts-cli/references/async-patterns.md +1101 -0
  107. package/plugin/skills/specgen-ts-cli/references/command-patterns.md +383 -0
  108. package/plugin/skills/specgen-ts-cli/references/config-patterns.md +430 -0
  109. package/plugin/skills/specgen-ts-cli/references/database-patterns.md +750 -0
  110. package/plugin/skills/specgen-ts-cli/references/packaging-patterns.md +426 -0
  111. package/plugin/skills/specgen-ts-cli/references/spec-template.md +1391 -0
  112. package/plugin/skills/specgen-ts-cli/references/testing-patterns.md +909 -0
  113. package/plugin/skills/testgen-functional/SKILL.md +1381 -0
  114. package/plugin/skills/tracegen-matrix/SKILL.md +243 -0
  115. package/plugin/skills/util-preparek8senv/SKILL.md +422 -0
  116. package/plugin/skills/util-projectinit/SKILL.md +307 -0
  117. package/plugin/skills/util-projectinit/reference/brainstorm-loop.md +129 -0
  118. package/plugin/skills/util-projectinit/reference/brainstorm-protocol.md +144 -0
  119. package/plugin/skills/util-projectinit/reference/brainstorm-setup-guide.md +153 -0
  120. package/plugin/skills/util-projectinit/reference/brainstorm-template-appdev.md +87 -0
  121. package/plugin/skills/util-projectinit/reference/co2-context-generation-guide.md +761 -0
  122. package/plugin/skills/util-projectsync/SKILL.md +501 -0
  123. package/plugin/skills/util-updprd/SKILL.md +324 -0
  124. package/plugin/skills/util-usanalyzer/SKILL.md +307 -0
  125. package/plugin/skills/util-ustagger/SKILL.md +154 -0
  126. package/static/assets/abnfDiagram-VRR7QNED-DvPuwyCV.js +1 -0
  127. package/static/assets/arc-DRKw7sjs.js +1 -0
  128. package/static/assets/architectureDiagram-ZJ3FMSHR-CaNcxUbC.js +36 -0
  129. package/static/assets/blockDiagram-677ZJIJ3-Demd4AOK.js +132 -0
  130. package/static/assets/c4Diagram-LMCZKHZV-PVKUfc2x.js +10 -0
  131. package/static/assets/channel-C2nVbuwv.js +1 -0
  132. package/static/assets/chunk-2Q5K7J3B-CExf8ww_.js +1 -0
  133. package/static/assets/chunk-32BRIVSS-CFPaoONF.js +1 -0
  134. package/static/assets/chunk-5VM5RSS4-DE2esM67.js +15 -0
  135. package/static/assets/chunk-EX3LRPZG-SON_YdDG.js +231 -0
  136. package/static/assets/chunk-JWPE2WC7-Qxah8LNr.js +1 -0
  137. package/static/assets/chunk-MOJQB5TN-BcWGQV3j.js +88 -0
  138. package/static/assets/chunk-RYQCIY6F-DkDj-OR5.js +1 -0
  139. package/static/assets/chunk-V7JOEXUC-BlI1Mrah.js +206 -0
  140. package/static/assets/chunk-VR4S4FIN-Agf__duj.js +1 -0
  141. package/static/assets/chunk-XXDRQBXY-B5CfAh85.js +1 -0
  142. package/static/assets/classDiagram-OUVF2IWQ-DXJIljsR.js +1 -0
  143. package/static/assets/classDiagram-v2-EOCWNBFH-DXJIljsR.js +1 -0
  144. package/static/assets/cose-bilkent-JH36ORCC-DO0cQkcy.js +1 -0
  145. package/static/assets/cynefin-VYW2F7L2-CfOnsnXc.js +178 -0
  146. package/static/assets/cynefinDiagram-TSTJHNR4-BJ8tULAv.js +62 -0
  147. package/static/assets/cytoscape.esm-DTSO7Bv0.js +331 -0
  148. package/static/assets/dagre-VKFMJZFB-DfjwzHqP.js +4 -0
  149. package/static/assets/defaultLocale-DX6XiGOO.js +1 -0
  150. package/static/assets/diagram-FQU43EPY-CndSOIIM.js +3 -0
  151. package/static/assets/diagram-G47NLZAW-Czf5hN0Z.js +24 -0
  152. package/static/assets/diagram-NH7WQ7WH-COAyojGh.js +24 -0
  153. package/static/assets/diagram-OA4YK3LP-H8PoiN2m.js +30 -0
  154. package/static/assets/diagram-WEI45ONY-DzcaVzjp.js +41 -0
  155. package/static/assets/ebnfDiagram-CCIWWBDH-DPazGYLJ.js +1 -0
  156. package/static/assets/erDiagram-Q63AITRT-Bo-fubgF.js +85 -0
  157. package/static/assets/flowDiagram-23GEKE2U-CSvxUDwh.js +156 -0
  158. package/static/assets/ganttDiagram-NO4QXBWP-DnBveWX6.js +292 -0
  159. package/static/assets/gitGraphDiagram-IHSO6WYX-B3rVL8c-.js +106 -0
  160. package/static/assets/graph-C9eacEi8.js +1 -0
  161. package/static/assets/index-LZSQkLE2.css +41 -0
  162. package/static/assets/index-y7XDSgMG.js +495 -0
  163. package/static/assets/infoDiagram-FWYZ7A6U-CvWV9yy2.js +2 -0
  164. package/static/assets/init-Gi6I4Gst.js +1 -0
  165. package/static/assets/ishikawaDiagram-FXEZZL3T-DF28a1N6.js +70 -0
  166. package/static/assets/journeyDiagram-5HDEW3XC-CB6CugYk.js +139 -0
  167. package/static/assets/kanban-definition-HUTT4EX6-ResSLF6d.js +89 -0
  168. package/static/assets/katex-C5jXJg4s.js +257 -0
  169. package/static/assets/layout-DEXfKzaS.js +1 -0
  170. package/static/assets/linear-CLO--ryk.js +1 -0
  171. package/static/assets/map-Czzmt4hB.js +1 -0
  172. package/static/assets/mindmap-definition-LN4V7U3C-BvW3EbxX.js +96 -0
  173. package/static/assets/ordinal-Cboi1Yqb.js +1 -0
  174. package/static/assets/pegDiagram-2B236MQR-BHCgqrrM.js +1 -0
  175. package/static/assets/pieDiagram-ENE6RG2P-DVmCQ5FA.js +39 -0
  176. package/static/assets/quadrantDiagram-ABIIQ3AL-B3e5KR52.js +7 -0
  177. package/static/assets/railroadDiagram-RFXS5EU6-Csv5ysLc.js +1 -0
  178. package/static/assets/requirementDiagram-TGXJPOKE-DOMVzvnB.js +84 -0
  179. package/static/assets/sankeyDiagram-HTMAVEWB-B1dcTOvy.js +40 -0
  180. package/static/assets/sequenceDiagram-DBY2YBRQ-BY414yeO.js +162 -0
  181. package/static/assets/sizeCapture-X5ZJPWSS-CuJfrfBN.js +1 -0
  182. package/static/assets/stateDiagram-2N3HPSRC-FX4rJkzV.js +1 -0
  183. package/static/assets/stateDiagram-v2-6OUMAXLB-BVufbO_H.js +1 -0
  184. package/static/assets/swimlanes-5IMT3BWC-Sfy58mmv.js +2 -0
  185. package/static/assets/swimlanesDiagram-G3AALYLV-wDCDw08H.js +8 -0
  186. package/static/assets/timeline-definition-FHXFAJF6-CmV7by8p.js +120 -0
  187. package/static/assets/vennDiagram-L72KCM5P-FqIyFZFt.js +34 -0
  188. package/static/assets/wardleyDiagram-EHGQE667-BZ06O45i.js +78 -0
  189. package/static/assets/xychartDiagram-FW5EYKEG-BOkffR06.js +7 -0
  190. package/static/index.html +24 -0
@@ -0,0 +1,131 @@
1
+ # IMPLEMENTATION_MODULE.md Template
2
+
3
+ Use this template when creating per-module implementation tracking files in Phase 3.
4
+
5
+ ---
6
+
7
+ ```markdown
8
+ # Implementation - {Module Name}
9
+
10
+ **Module**: {Module Name}
11
+ **Layer**: {Layer}
12
+ **Status**: IN PROGRESS
13
+ **Started**: {YYYY-MM-DD}
14
+ **Completed**: -
15
+
16
+ ---
17
+
18
+ ## Resources
19
+
20
+ | Resource | Path |
21
+ |----------|------|
22
+ | User Stories | {Comma-separated IDs} |
23
+ | Model | `model/{module-slug}/model.md` |
24
+ | Schema | `model/{module-slug}/schemas.json` |
25
+ | Specification | `specification/{module-slug}/SPEC.md` |
26
+ | Test Spec | `test/{module-slug}/TEST_SPEC.md` |
27
+ | Mockup | `mockup/{role}/content/{screen}.html` |
28
+
29
+ ---
30
+
31
+ ## Implementation Checklist
32
+
33
+ - [ ] 1. Read and analyze module resources
34
+ - [ ] 2. Implement document/entity classes
35
+ - [ ] 3. Implement repository layer
36
+ - [ ] 4. Implement service layer
37
+ - [ ] 5. Implement MapStruct mappers (if applicable)
38
+ - [ ] 6. Implement controller layer
39
+ - [ ] 7. Implement JTE view templates
40
+ - [ ] 8. Implement message listeners (if applicable)
41
+ - [ ] 9. Implement scheduled jobs (if applicable)
42
+ - [ ] 10. Write Playwright E2E tests
43
+ - [ ] 11. Run E2E tests and verify
44
+ - [ ] 12. Visual consistency testing (mockup vs application)
45
+ - [ ] 13. Fix visual deviations (if any)
46
+ - [ ] 14. Update tracking files
47
+
48
+ ---
49
+
50
+ ## Source Files Created
51
+
52
+ | File | Purpose |
53
+ |------|---------|
54
+ {Populated as files are created during implementation}
55
+
56
+ ---
57
+
58
+ ## Implementation Log
59
+
60
+ {Append entries as work progresses}
61
+
62
+ ### Step 1: Analyze Module Resources
63
+ **{timestamp}** - Started
64
+
65
+ Findings:
66
+ - Collections: {list}
67
+ - Key entities: {list}
68
+ - User stories covered: {IDs}
69
+ - Test scenarios count: {count}
70
+ - Dependencies satisfied: {Yes/No — list any missing}
71
+
72
+ ---
73
+
74
+ ### Step 2: Document/Entity Classes
75
+ **{timestamp}** - Started
76
+
77
+ Files created:
78
+ - `{package}/{ModuleEntity}.java`
79
+ ...
80
+
81
+ ---
82
+
83
+ {Continue for each step...}
84
+
85
+ ### Step 11: E2E Test Results
86
+ **{timestamp}** - Executed
87
+
88
+ ```
89
+ Test results:
90
+ {count} passed
91
+ {count} failed
92
+ {count} skipped
93
+
94
+ Failed tests (if any):
95
+ - {test name}: {failure reason}
96
+ ```
97
+
98
+ ### Resolution (if tests failed)
99
+ **{timestamp}** - Fixed
100
+
101
+ - Issue: {description}
102
+ - Fix: {what was changed}
103
+ - Re-run result: {pass/fail}
104
+
105
+ ---
106
+
107
+ ### Step 12: Visual Consistency Testing
108
+ **{timestamp}** - Executed
109
+
110
+ Screens compared against mockup baselines:
111
+
112
+ | Screen | Mockup Source | App Route | Result | Notes |
113
+ |--------|--------------|-----------|--------|-------|
114
+ | {screen-name} | `mockup/{role}/content/{file}.html` | `/{app-route}` | PASS/FAIL | {deviation details if any} |
115
+
116
+ Aesthetic checks:
117
+ - [ ] Color scheme matches (backgrounds, borders, text, buttons)
118
+ - [ ] Spacing/alignment matches (padding, margins, gaps)
119
+ - [ ] Layout structure matches (grid/flex, sidebar/header/content)
120
+ - [ ] Typography matches (font sizes, weights, line heights)
121
+ - [ ] Component styling matches (buttons, tables, forms, cards)
122
+
123
+ ### Step 13: Visual Deviation Fixes (if any)
124
+ **{timestamp}** - Fixed
125
+
126
+ | Deviation | File Changed | Fix Applied |
127
+ |-----------|-------------|-------------|
128
+ | {e.g. "button color mismatch"} | `{jte/css file}` | {what was changed} |
129
+
130
+ Re-run result: {pass/fail}
131
+ ```
@@ -0,0 +1,89 @@
1
+ # IMPLEMENTATION_MASTER.md Template
2
+
3
+ Use this template when creating the master implementation tracking file in Phase 1.
4
+
5
+ ---
6
+
7
+ ```markdown
8
+ # Implementation Master - {Application Name}
9
+
10
+ **Started**: {YYYY-MM-DD}
11
+ **Source Code**: `{source-code-path}/`
12
+ **Context**: `{context-path}/`
13
+ **Status**: IN PROGRESS
14
+
15
+ ---
16
+
17
+ ## Execution Order
18
+
19
+ {Copy verbatim from TEST_PLAN.md Section 5 "Execution Order"}
20
+
21
+ ---
22
+
23
+ ## Pre-Implementation (Scaffolding)
24
+
25
+ | Task | Status | Notes |
26
+ |------|--------|-------|
27
+ | Project skeleton (Maven/Gradle) | PENDING | |
28
+ | Build configuration (pom.xml) | PENDING | |
29
+ | Application configuration (YAML) | PENDING | |
30
+ | Security configuration (Keycloak) | PENDING | |
31
+ | JTE layouts + shared partials | PENDING | |
32
+ | UI components (Tailwind) | PENDING | |
33
+ | JS + CSS structure | PENDING | |
34
+ | Data access configuration | PENDING | |
35
+ | Error handling | PENDING | |
36
+ | Theming | PENDING | |
37
+ | Pagination support | PENDING | |
38
+ | Messaging (RabbitMQ) config | PENDING | |
39
+ | Scheduling (Quartz/Batch) config | PENDING | |
40
+ | Playwright E2E project setup | PENDING | |
41
+ | Application compiles + starts | PENDING | |
42
+
43
+ ---
44
+
45
+ ## Module Implementation Status
46
+
47
+ | # | Module | Layer | Status | Started | Completed | Notes |
48
+ |---|--------|-------|--------|---------|-----------|-------|
49
+ {For each module in execution order:}
50
+ | {n} | {Module Name} | {Layer} | PENDING | - | - | |
51
+
52
+ ---
53
+
54
+ ## Module Details
55
+
56
+ {For each module in execution order:}
57
+
58
+ ### {n}. {Module Name}
59
+
60
+ **Layer**: {Layer}
61
+ **Dependencies**: {List from TEST_PLAN.md}
62
+
63
+ **Resources**:
64
+
65
+ | Resource | Path | Exists |
66
+ |----------|------|--------|
67
+ | User Stories | {IDs} | Yes |
68
+ | Model | `model/{module-slug}/model.md` | {Yes/No} |
69
+ | Schema | `model/{module-slug}/schemas.json` | {Yes/No} |
70
+ | Specification | `specification/{module-slug}/SPEC.md` | {Yes/No} |
71
+ | Test Spec | `test/{module-slug}/TEST_SPEC.md` | {Yes/No} |
72
+ | Mockup | `mockup/{role}/content/{screen}.html` | {Yes/No} |
73
+
74
+ **Test Summary** (from TEST_SPEC.md):
75
+ - Total scenarios: {count}
76
+ - Seeding strategy: {strategy from TEST_PLAN.md}
77
+
78
+ ---
79
+ ```
80
+
81
+ ## Status Values
82
+
83
+ | Status | Meaning |
84
+ |--------|---------|
85
+ | PENDING | Not yet started |
86
+ | IN PROGRESS | Currently being implemented |
87
+ | COMPLETED | Implementation done, tests passing |
88
+ | BLOCKED | Cannot proceed due to dependency or issue |
89
+ | FAILED | Tests failing, needs investigation |
@@ -0,0 +1,224 @@
1
+ # Playwright E2E Test Setup Reference
2
+
3
+ ## Project Initialization
4
+
5
+ ```bash
6
+ mkdir -p <source-code-path>/e2e
7
+ cd <source-code-path>/e2e
8
+ npm init -y
9
+ npm install -D @playwright/test
10
+ npx playwright install chromium
11
+ ```
12
+
13
+ ## playwright.config.ts
14
+
15
+ ```typescript
16
+ import { defineConfig } from '@playwright/test';
17
+
18
+ export default defineConfig({
19
+ testDir: './tests',
20
+ fullyParallel: false, // Sequential — module order matters
21
+ forbidOnly: true,
22
+ retries: 1,
23
+ workers: 1, // Single worker — tests share state
24
+ reporter: [['html'], ['list']],
25
+ use: {
26
+ baseURL: 'http://localhost:8080',
27
+ trace: 'on-first-retry',
28
+ screenshot: 'only-on-failure',
29
+ },
30
+ projects: [
31
+ {
32
+ name: 'chromium',
33
+ use: { browserName: 'chromium' },
34
+ },
35
+ ],
36
+ });
37
+ ```
38
+
39
+ ## Helper: Login Utility
40
+
41
+ ```typescript
42
+ // e2e/helpers/auth.ts
43
+ import { Page } from '@playwright/test';
44
+
45
+ export async function login(page: Page, username: string, password: string) {
46
+ await page.goto('/');
47
+ // Keycloak login page
48
+ await page.fill('#username', username);
49
+ await page.fill('#password', password);
50
+ await page.click('#kc-login');
51
+ await page.waitForURL('**/dashboard**');
52
+ }
53
+ ```
54
+
55
+ ## Helper: Data Seeding via CLI
56
+
57
+ ```typescript
58
+ // e2e/helpers/seed.ts
59
+ import { execSync } from 'child_process';
60
+
61
+ export function seedMongo(script: string) {
62
+ execSync(`mongosh "mongodb://localhost:27017/urp-hub-middleware" --eval '${script}'`, {
63
+ timeout: 30000,
64
+ });
65
+ }
66
+
67
+ export function publishRabbitMQ(exchange: string, routingKey: string, payload: object) {
68
+ const json = JSON.stringify(payload).replace(/'/g, "'\\''");
69
+ execSync(
70
+ `rabbitmqadmin --host=localhost --port=15672 --username=guest --password=guest ` +
71
+ `publish exchange=${exchange} routing_key=${routingKey} payload='${json}'`,
72
+ { timeout: 30000 }
73
+ );
74
+ }
75
+
76
+ export function keycloakAdmin(command: string) {
77
+ execSync(`hub_single_sign_on/kcadm.bat ${command}`, { timeout: 30000 });
78
+ }
79
+ ```
80
+
81
+ ## Test File Pattern
82
+
83
+ ```typescript
84
+ // e2e/tests/<module-slug>.spec.ts
85
+ import { test, expect } from '@playwright/test';
86
+ import { login } from '../helpers/auth';
87
+ import { seedMongo } from '../helpers/seed';
88
+
89
+ test.describe('<Module Name>', () => {
90
+
91
+ test.beforeAll(async () => {
92
+ // Run seeding script from TEST_SPEC.md Section 4
93
+ seedMongo(`
94
+ db.<collection>.insertMany([...]);
95
+ `);
96
+ });
97
+
98
+ // NO afterAll cleanup — test data persists for downstream modules
99
+
100
+ test('<SCENARIO-ID>: <description>', async ({ page }) => {
101
+ await login(page, 'hub_admin_test', 'Test@1234');
102
+ // Steps from TEST_SPEC.md scenarios
103
+ });
104
+ });
105
+ ```
106
+
107
+ ## Helper: Visual Comparison Utilities
108
+
109
+ ```typescript
110
+ // e2e/helpers/visual.ts
111
+ import { Page, expect } from '@playwright/test';
112
+ import { execSync } from 'child_process';
113
+ import path from 'path';
114
+
115
+ // The shared Mockup Hub serves ALL applications' mockups from <root>/mockup.
116
+ // Screens live under /{app_slug}/{role}/{page}. The hub port is configurable
117
+ // (PORT env / mockup.config.json), so read the base URL from config.
118
+ // TEST_MOCKUP_BASE_URL example: http://localhost:3000/hub_middleware
119
+ const MOCKUP_BASE_URL = process.env.TEST_MOCKUP_BASE_URL || 'http://localhost:3000/<app_slug>';
120
+ const VISUAL_BASELINES_DIR = path.resolve(__dirname, '..', 'visual-baselines');
121
+
122
+ /**
123
+ * Start the shared Mockup Hub in the background.
124
+ * hubDir is <root>/mockup — the hub is zero-dependency (no npm install needed).
125
+ * Call this in beforeAll of visual tests if baselines need capturing.
126
+ */
127
+ export function startMockupServer(hubDir: string): void {
128
+ // Start in background — the hub stays alive for the test suite
129
+ execSync(`cd "${hubDir}" && npm start &`, { timeout: 10000 });
130
+ // Give the hub time to start
131
+ execSync('sleep 2');
132
+ }
133
+
134
+ /**
135
+ * Capture a baseline screenshot from the Mockup Hub.
136
+ * The hub must be running (default port 3000) and MOCKUP_BASE_URL must include
137
+ * the app slug prefix.
138
+ */
139
+ export async function captureMockupBaseline(
140
+ page: Page,
141
+ mockupRoute: string,
142
+ module: string,
143
+ screenName: string
144
+ ): Promise<void> {
145
+ await page.goto(`${MOCKUP_BASE_URL}${mockupRoute}`);
146
+ await page.waitForLoadState('networkidle');
147
+
148
+ const screenshotPath = path.join(VISUAL_BASELINES_DIR, module, `${screenName}.png`);
149
+ await page.screenshot({ path: screenshotPath, fullPage: true });
150
+ }
151
+
152
+ /**
153
+ * Compare the Spring application screen against a mockup baseline.
154
+ * Uses Playwright's toHaveScreenshot with relaxed thresholds to allow
155
+ * content differences while catching aesthetic deviations (colors,
156
+ * alignment, padding, margins, layout structure).
157
+ */
158
+ export async function compareWithMockup(
159
+ page: Page,
160
+ appRoute: string,
161
+ snapshotName: string
162
+ ): Promise<void> {
163
+ await page.goto(appRoute);
164
+ await page.waitForLoadState('networkidle');
165
+
166
+ await expect(page).toHaveScreenshot(snapshotName, {
167
+ maxDiffPixelRatio: 0.15, // Up to 15% pixel difference (content varies)
168
+ threshold: 0.3, // Per-pixel color threshold (0=exact, 1=any)
169
+ animations: 'disabled',
170
+ fullPage: true,
171
+ });
172
+ }
173
+ ```
174
+
175
+ ## Visual Test File Pattern
176
+
177
+ ```typescript
178
+ // e2e/tests/<module-slug>.visual.spec.ts
179
+ import { test, expect } from '@playwright/test';
180
+ import { loginAs } from '../helpers/auth';
181
+
182
+ test.describe('<Module Name> - Visual Consistency', () => {
183
+
184
+ test('<screen-name> layout matches mockup', async ({ page }) => {
185
+ await loginAs(page, '<role>');
186
+ await page.goto('<app-route>');
187
+ await page.waitForLoadState('networkidle');
188
+
189
+ // Compares against snapshot — on first run, generates baseline
190
+ // Threshold allows content differences but catches styling issues:
191
+ // - Colors (backgrounds, borders, text, buttons)
192
+ // - Spacing (padding, margins, gaps)
193
+ // - Layout (grid/flex arrangement, proportions)
194
+ // - Typography (font sizes, weights — relative, not exact)
195
+ await expect(page).toHaveScreenshot('<module>-<screen>.png', {
196
+ maxDiffPixelRatio: 0.15,
197
+ threshold: 0.3,
198
+ animations: 'disabled',
199
+ });
200
+ });
201
+ });
202
+ ```
203
+
204
+ ## Running Tests
205
+
206
+ ```bash
207
+ # Run specific module functional tests
208
+ cd <source-code-path>/e2e && npx playwright test tests/<module-slug>.spec.ts
209
+
210
+ # Run specific module visual tests
211
+ cd <source-code-path>/e2e && npx playwright test tests/<module-slug>.visual.spec.ts
212
+
213
+ # Run all tests in order
214
+ cd <source-code-path>/e2e && npx playwright test
215
+
216
+ # Update visual snapshots (after reviewing and approving changes)
217
+ cd <source-code-path>/e2e && npx playwright test tests/<module-slug>.visual.spec.ts --update-snapshots
218
+
219
+ # Run with headed browser (for debugging)
220
+ cd <source-code-path>/e2e && npx playwright test tests/<module-slug>.spec.ts --headed
221
+
222
+ # View HTML report
223
+ cd <source-code-path>/e2e && npx playwright show-report
224
+ ```