@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,553 @@
1
+ # Specification Template — REST API
2
+
3
+ This is the authoritative template for the generated specification. The specification is
4
+ split into **two types of files**:
5
+
6
+ 1. **`SPECIFICATION.md`** (root) — Table of Contents, shared infrastructure, and all
7
+ application-level sections. Generated once per application.
8
+ 2. **`<module>/SPEC.md`** (per-module) — Self-contained module blueprint.
9
+ Generated once per module from PRD.md.
10
+
11
+ ```
12
+ spec/
13
+ ├── SPECIFICATION.md
14
+ ├── job-demand/
15
+ │ └── SPEC.md
16
+ ├── candidate-registration/
17
+ │ └── SPEC.md
18
+ └── ...
19
+ ```
20
+
21
+ Placeholders use `{{VARIABLE}}` syntax and must be replaced with actual values gathered
22
+ from context files.
23
+
24
+ Sections marked **[CONDITIONAL]** should only be included when the corresponding
25
+ integration is selected.
26
+
27
+ **CRITICAL: Sample code requirement.** Every component in the spec MUST include a complete,
28
+ continuous code sample in a fenced code block (Java, YAML, or JSON). The code must be
29
+ self-explanatory and directly usable as a reference for a coding agent. Do not describe
30
+ components with bullet points alone — always accompany descriptions with full code.
31
+
32
+ ---
33
+
34
+ # Part A: Root SPECIFICATION.md
35
+
36
+ Everything from this point until "Part B" goes into the root `SPECIFICATION.md` file.
37
+ A coding agent implements these shared sections **first**, before any module work.
38
+
39
+ ---
40
+
41
+ ## Table of Contents
42
+
43
+ Generate a TOC with clickable Markdown anchor links to every H2 and H3 section in this
44
+ file. Additionally, include a **Modules** section in the TOC that links to each
45
+ module's `SPEC.md` file:
46
+
47
+ ```markdown
48
+ ## Table of Contents
49
+
50
+ ### Shared Infrastructure
51
+ - [1. Project Overview](#1-project-overview)
52
+ - [2. Maven Configuration](#2-maven-configuration)
53
+ - ...all shared sections...
54
+
55
+ ### Modules
56
+ - [Job Demand](job-demand/SPEC.md)
57
+ - [Candidate Registration](candidate-registration/SPEC.md)
58
+ - ...(one link per module)...
59
+ ```
60
+
61
+ ---
62
+
63
+ ## Section 1: Project Overview
64
+
65
+ ```
66
+ # {{APPLICATION_NAME}} — Technical Specification
67
+
68
+ ## 1. Project Overview
69
+
70
+ **Application Name**: {{APPLICATION_NAME}}
71
+ **Artifact ID**: {{ARTIFACT_ID}}
72
+ **Group ID**: com.bestinet.urp
73
+ **Base Package**: {{BASE_PACKAGE}}
74
+ **Java Version**: 21
75
+ **Spring Boot Version**: 3.5.7
76
+ **Description**: {{APP_DESCRIPTION}}
77
+ **Versions Covered**: v1.0.0 — v{{LATEST_VERSION}}
78
+ **API Version Prefix**: /api/v1
79
+
80
+ ### Optional Components (Auto-Determined)
81
+ **Database**: {{DATABASE}}
82
+ **Authentication**: {{AUTH}}
83
+ **Scheduling**: {{SCHEDULING}}
84
+ **Messaging**: {{MESSAGING}}
85
+
86
+ ### Technology Stack
87
+ (Render the core stack version table from SKILL.md, plus selected optional integration versions)
88
+
89
+ ### API Consumers / Roles
90
+ (List each role that consumes this API, with a role-to-module mapping table.)
91
+
92
+ | Role | Modules | Spring Security Role |
93
+ |------|---------|---------------------|
94
+ | HC Employer Portal | Job Demand, Employer, ... | Internal service (no role) |
95
+ | Hub Middleware | All | `HUB_SERVICE` |
96
+
97
+ ### Modules
98
+ | Module | Type | Stories | Versions | Spec |
99
+ |--------|------|---------|----------|------|
100
+ | Job Demand | Business | 12 | 1.0.0 | [SPEC](job-demand/SPEC.md) |
101
+ | ... | ... | ... | ... | ... |
102
+
103
+ ### Input Sources
104
+ - CLAUDE.md: {{path}}
105
+ - PRD.md: {{path}}
106
+ - Module Model: {{path to MODEL.md}}
107
+ ```
108
+
109
+ ---
110
+
111
+ ## Section 2: Maven Configuration
112
+
113
+ Generate a complete `pom.xml` inside a code block. Include:
114
+ - Parent: `spring-boot-starter-parent` 3.5.7
115
+ - Properties: java version, mapstruct version, lombok-mapstruct-binding version, springdoc version
116
+ - Dependencies:
117
+ - **Web**: `spring-boot-starter-web`
118
+ - **[If Database = MongoDB]** `spring-boot-starter-data-mongodb`
119
+ - **[If Database = PostgreSQL]** `spring-boot-starter-data-jpa`, `org.postgresql:postgresql`, `org.flywaydb:flyway-core`
120
+ - **[If Database = MySQL]** `spring-boot-starter-data-jpa`, `com.mysql:mysql-connector-j`, `org.flywaydb:flyway-core`, `org.flywaydb:flyway-mysql`
121
+ - **[If Auth = Keycloak]** `spring-boot-starter-security`, `spring-boot-starter-oauth2-resource-server`
122
+ - **[If Auth = JWT]** `spring-boot-starter-security`, `io.jsonwebtoken:jjwt-api/impl/jackson`
123
+ - **Modulith**: `spring-modulith-starter-core`, `spring-modulith-events-api`
124
+ - **[If Database = MongoDB]** `spring-modulith-starter-mongodb`
125
+ - **[If Database = PostgreSQL/MySQL]** `spring-modulith-starter-jpa`
126
+ - **[If Scheduling = yes]** `spring-boot-starter-quartz`
127
+ - **[If Messaging = yes]** `spring-boot-starter-amqp`
128
+ - **API Documentation**: `org.springdoc:springdoc-openapi-starter-webmvc-ui`
129
+ - **Utilities**: `lombok`, `mapstruct`, `mapstruct-processor`
130
+ - **DevTools**: `spring-boot-devtools` (runtime scope)
131
+ - **Testing**: `spring-boot-starter-test`, `spring-modulith-starter-test`
132
+ - **[If Auth = Keycloak or JWT]** `spring-security-test`
133
+ - Build plugins:
134
+ - `spring-boot-maven-plugin`
135
+ - `maven-compiler-plugin` with annotation processor paths for Lombok + MapStruct
136
+
137
+ Specify the `dependencyManagement` section for Spring Modulith BOM.
138
+
139
+ ---
140
+
141
+ ## Section 3: Application Configuration
142
+
143
+ ### application.yml (default profile)
144
+
145
+ **IMPORTANT: Environment variable externalization.** All configuration values that may
146
+ change between environments (ports, hostnames, credentials, URIs) MUST use Spring's
147
+ `${ENV_VAR:default}` syntax. This ensures the application works out-of-the-box in local
148
+ development while allowing production deployments to override via environment variables.
149
+
150
+ **Always include:**
151
+ ```yaml
152
+ server:
153
+ port: ${SERVER_PORT:{{SERVER_PORT}}}
154
+
155
+ spring:
156
+ application:
157
+ name: {{ARTIFACT_ID}}
158
+ modulith:
159
+ events:
160
+ republish-outstanding-events-on-restart: true
161
+ jackson:
162
+ default-property-inclusion: non_null
163
+ serialization:
164
+ write-dates-as-timestamps: false
165
+
166
+ springdoc:
167
+ api-docs:
168
+ path: /api-docs
169
+ swagger-ui:
170
+ path: /swagger-ui.html
171
+ operations-sorter: method
172
+ tags-sorter: alpha
173
+
174
+ app:
175
+ cors:
176
+ allowed-origins: ${APP_CORS_ALLOWED_ORIGINS:http://localhost:3000}
177
+
178
+ logging:
179
+ level:
180
+ root: ${LOG_LEVEL_ROOT:WARN}
181
+ {{BASE_PACKAGE}}: ${LOG_LEVEL_APP:INFO}
182
+ pattern:
183
+ console: "%d{yyyy-MM-dd HH:mm:ss} [%thread] [%X{correlationId}] %-5level %logger{36} - %msg%n"
184
+ ```
185
+
186
+ **[If Database = MongoDB] add:**
187
+ ```yaml
188
+ spring:
189
+ data:
190
+ mongodb:
191
+ uri: ${MONGODB_URI:mongodb://localhost:27017/{{DB_NAME}}}
192
+ auto-index-creation: true
193
+ ```
194
+
195
+ **[If Database = MySQL] add:**
196
+ ```yaml
197
+ spring:
198
+ datasource:
199
+ url: ${DB_URL:jdbc:mysql://localhost:3306/{{DB_NAME}}}
200
+ username: ${DB_USERNAME:{{DB_USER}}}
201
+ password: ${DB_PASSWORD:{{DB_PASSWORD}}}
202
+ driver-class-name: com.mysql.cj.jdbc.Driver
203
+ jpa:
204
+ hibernate:
205
+ ddl-auto: validate
206
+ open-in-view: false
207
+ properties:
208
+ hibernate:
209
+ dialect: org.hibernate.dialect.MySQLDialect
210
+ flyway:
211
+ enabled: true
212
+ locations: classpath:db/migration
213
+ ```
214
+
215
+ **[If Auth = Keycloak] add:**
216
+ ```yaml
217
+ spring:
218
+ security:
219
+ oauth2:
220
+ resourceserver:
221
+ jwt:
222
+ issuer-uri: ${KEYCLOAK_ISSUER_URI:{{KEYCLOAK_ISSUER_URI}}}
223
+ jwk-set-uri: ${KEYCLOAK_JWK_SET_URI:${KEYCLOAK_ISSUER_URI:{{KEYCLOAK_ISSUER_URI}}}/protocol/openid-connect/certs}
224
+
225
+ app:
226
+ security:
227
+ keycloak-client-id: ${KEYCLOAK_CLIENT_ID:{{KEYCLOAK_CLIENT_ID}}}
228
+ public-paths:
229
+ - /api-docs/**
230
+ - /swagger-ui/**
231
+ - /swagger-ui.html
232
+ - /actuator/health
233
+ - /error
234
+ ```
235
+
236
+ **[If Messaging = yes] add:**
237
+ ```yaml
238
+ spring:
239
+ rabbitmq:
240
+ host: ${RABBITMQ_HOST:localhost}
241
+ port: ${RABBITMQ_PORT:5672}
242
+ username: ${RABBITMQ_USERNAME:guest}
243
+ password: ${RABBITMQ_PASSWORD:guest}
244
+ virtual-host: ${RABBITMQ_VHOST:/}
245
+
246
+ app:
247
+ messaging:
248
+ events-exchange: app.events.exchange
249
+ commands-exchange: app.commands.exchange
250
+ dead-letter-exchange: app.dlx.exchange
251
+ ```
252
+
253
+ ### application-dev.yml
254
+ Debug log levels, relaxed CORS.
255
+
256
+ ### application-prod.yml
257
+ Externalize all sensitive config via environment variables, set conservative log levels.
258
+
259
+ ---
260
+
261
+ ## Section 4: `.gitignore`
262
+
263
+ ```gitignore
264
+ # Build output
265
+ target/
266
+
267
+ # IDE
268
+ .idea/
269
+ *.iml
270
+ .vscode/
271
+ .settings/
272
+ .project
273
+ .classpath
274
+ *.swp
275
+ *~
276
+
277
+ # OS
278
+ .DS_Store
279
+ Thumbs.db
280
+
281
+ # Spring Modulith generated
282
+ **/build/generated-spring-modulith/
283
+
284
+ # Logs
285
+ *.log
286
+ logs/
287
+
288
+ # Environment
289
+ .env
290
+ .env.*
291
+ ```
292
+
293
+ ---
294
+
295
+ ## Section 5: Package Structure
296
+
297
+ ```
298
+ src/
299
+ ├── main/
300
+ │ ├── java/
301
+ │ │ └── {{BASE_PACKAGE}}/
302
+ │ │ ├── Application.java
303
+ │ │ ├── config/
304
+ │ │ │ ├── JacksonConfig.java
305
+ │ │ │ ├── CorsConfig.java
306
+ │ │ │ ├── OpenApiConfig.java
307
+ │ │ │ ├── [If Auth = Keycloak] SecurityConfig.java
308
+ │ │ │ ├── [If Auth = Keycloak] KeycloakJwtGrantedAuthoritiesConverter.java
309
+ │ │ │ ├── [If Database = MongoDB] MongoConfig.java
310
+ │ │ │ ├── [If Database = PostgreSQL/MySQL] JpaConfig.java
311
+ │ │ │ ├── [If Scheduling = yes] QuartzConfig.java
312
+ │ │ │ └── [If Messaging = yes] RabbitMQConfig.java
313
+ │ │ ├── shared/
314
+ │ │ │ ├── exception/
315
+ │ │ │ │ ├── GlobalExceptionHandler.java
316
+ │ │ │ │ ├── ApiError.java
317
+ │ │ │ │ ├── ResourceNotFoundException.java
318
+ │ │ │ │ └── ConflictException.java
319
+ │ │ │ ├── model/
320
+ │ │ │ │ ├── [If Database = MongoDB] BaseDocument.java
321
+ │ │ │ │ └── [If Database = PostgreSQL/MySQL] BaseEntity.java
322
+ │ │ │ ├── security/ # [If Auth != none]
323
+ │ │ │ │ ├── SecurityContextUtil.java
324
+ │ │ │ │ └── Roles.java
325
+ │ │ │ ├── filter/
326
+ │ │ │ │ └── CorrelationIdFilter.java
327
+ │ │ │ ├── audit/ # [If Database != none]
328
+ │ │ │ │ └── AuditAwareImpl.java
329
+ │ │ │ ├── dto/
330
+ │ │ │ │ └── PageResponse.java # Optional simplified page DTO
331
+ │ │ │ └── [If Messaging = yes] messaging/ # INFRASTRUCTURE ONLY — no @RabbitListener here
332
+ │ │ │ ├── RabbitMQMessagingConfig.java # Exchange/queue/binding declarations
333
+ │ │ │ ├── RabbitMQPublisher.java # Generic publisher service
334
+ │ │ │ ├── MessageConverterConfig.java # Jackson2JsonMessageConverter bean
335
+ │ │ │ └── (event/command DTOs shared across modules, e.g., OrderExportedEvent.java)
336
+ │ │ │
337
+ │ │ ├── {{module1}}/ # Module — PUBLIC API
338
+ │ │ │ ├── {{Module1}}Service.java # Public service interface
339
+ │ │ │ ├── {{Module1}}DTO.java # Response DTO (record)
340
+ │ │ │ ├── Create{{Module1}}Request.java # Request DTO (record + validation)
341
+ │ │ │ ├── Update{{Module1}}Request.java # Request DTO (record + validation)
342
+ │ │ │ ├── {{Module1}}Exception.java # Public exception class
343
+ │ │ │ └── internal/ # INTERNAL
344
+ │ │ │ ├── {{Module1}}ServiceImpl.java # Service implementation
345
+ │ │ │ ├── [If Database = MongoDB] {{Module1}}Repository.java
346
+ │ │ │ ├── [If Database = MongoDB] {{Module1}}Document.java
347
+ │ │ │ ├── [If Database = PostgreSQL/MySQL] {{Module1}}Repository.java
348
+ │ │ │ ├── [If Database = PostgreSQL/MySQL] {{Module1}}Entity.java
349
+ │ │ │ ├── {{Module1}}Mapper.java # MapStruct mapper
350
+ │ │ │ ├── {{Module1}}Controller.java # @RestController (HTTP inbound adapter)
351
+ │ │ │ └── [If Messaging = yes] {{Module1}}EventConsumer.java # @RabbitListener (MQ inbound adapter — ALWAYS in module's internal/)
352
+ │ │ │
353
+ │ │ ├── {{module2}}/
354
+ │ │ │ └── (same public/internal structure)
355
+ │ │ │
356
+ │ │ └── [If Scheduling = yes] scheduling/
357
+ │ │ ├── internal/
358
+ │ │ │ └── job/
359
+ │ │ │ └── SampleQuartzJob.java
360
+ │ │ └── SchedulingService.java
361
+ │ │
362
+ │ └── resources/
363
+ │ ├── application.yml
364
+ │ ├── application-dev.yml
365
+ │ ├── application-prod.yml
366
+ │ ├── logback-spring.xml
367
+ │ ├── [If Database = PostgreSQL/MySQL] db/migration/
368
+ │ │ └── V1__initial_schema.sql
369
+ │ └── static/ # (empty, for future static assets)
370
+
371
+ └── test/
372
+ └── java/
373
+ └── {{BASE_PACKAGE}}/
374
+ └── (test classes)
375
+ ```
376
+
377
+ ---
378
+
379
+ ## Section 6: Security Configuration [CONDITIONAL]
380
+
381
+ Refer to `references/security-patterns.md` for the complete content to include.
382
+
383
+ **[If Auth = Keycloak (Resource Server)]:**
384
+ - `SecurityConfig.java` — `SecurityFilterChain` with `oauth2ResourceServer(jwt -> ...)`
385
+ - `KeycloakJwtGrantedAuthoritiesConverter.java` — extracting roles from JWT claims
386
+ - `SecurityContextUtil.java` — extracting user info from JWT
387
+ - `Roles.java` — role constants
388
+ - Stateless session policy, CORS, CSRF disabled
389
+ - Public vs. secured endpoint rules
390
+
391
+ ---
392
+
393
+ ## Sections 7-9: REST API Conventions, Error Handling, Pagination
394
+
395
+ Refer to `references/restapi-patterns.md` for the complete content to include.
396
+
397
+ Must cover:
398
+ - REST controller pattern with OpenAPI annotations
399
+ - Request/Response DTO patterns (Java records)
400
+ - Standardized `ApiError` response envelope
401
+ - `GlobalExceptionHandler` with `@RestControllerAdvice`
402
+ - `ResourceNotFoundException`, `ConflictException`
403
+ - Pagination with `Pageable` and `Page<T>` response
404
+ - Correlation ID filter
405
+ - Jackson configuration
406
+ - CORS configuration
407
+ - OpenAPI/SpringDoc configuration
408
+
409
+ ---
410
+
411
+ ## Sections 10-17: Data Access, API Docs, Logging, Scheduling, Events, Messaging, MapStruct, Testing
412
+
413
+ These sections follow the same patterns as the JTE variant where applicable. The key
414
+ differences are:
415
+
416
+ - **No frontend build tooling** (no Vite, Tailwind, Alpine.js, htmx)
417
+ - **No JTE templates** (no layouts, fragments, or view models)
418
+ - **No UI components** (no buttons, cards, tables, etc.)
419
+ - **Testing uses MockMvc** with JSON assertions instead of HTML/view assertions
420
+ - **API documentation** via SpringDoc OpenAPI (replaces HTML mockup screens)
421
+
422
+ ---
423
+
424
+ # Part B: Module SPEC.md Template
425
+
426
+ Everything below is the template for each **`<module>/SPEC.md`** file. Generate one
427
+ file per module from PRD.md and MODEL.md.
428
+
429
+ Each module SPEC.md is **self-contained** — a coding agent picks it up and implements
430
+ the entire module independently (after the shared infrastructure from
431
+ `SPECIFICATION.md` is in place).
432
+
433
+ ---
434
+
435
+ ## Module SPEC.md Structure
436
+
437
+ ```markdown
438
+ # {{ModuleName}} Module — Specification
439
+
440
+ > Part of [{{APPLICATION_NAME}} Technical Specification](../SPECIFICATION.md)
441
+
442
+ ## Overview
443
+
444
+ **Module:** {{ModuleName}}
445
+ **Package:** {{BASE_PACKAGE}}.{{modulename}}
446
+ **Type:** {{System Module | Business Module}}
447
+ **API Base Path:** /api/v1/{{resource-plural}}
448
+ ```
449
+
450
+ ### Traceability
451
+
452
+ List all tagged IDs this module implements:
453
+
454
+ ```markdown
455
+ ## Traceability
456
+
457
+ ### User Stories
458
+ | ID | Version | Description |
459
+ |---|---|---|
460
+ | USHC00012 | v1.0.0 | View list of job demands |
461
+
462
+ ### Non-Functional Requirements
463
+ | ID | Version | Description |
464
+ |---|---|---|
465
+ | NFRHC0006 | v1.0.0 | Store in staging database |
466
+
467
+ ### Constraints
468
+ | ID | Version | Description |
469
+ |---|---|---|
470
+ | CONSHC003 | v1.0.0 | Only ISO3 country codes |
471
+
472
+ ### Removed / Replaced
473
+ | ID | Type | Removed In | Replaced By | Reason |
474
+ |---|---|---|---|---|
475
+ | _None._ | | | | |
476
+
477
+ ### Tables / Collections
478
+ (flat list of table or collection names used by this module)
479
+ ```
480
+
481
+ ### API Endpoints
482
+
483
+ List all REST endpoints for this module:
484
+
485
+ ```markdown
486
+ ## API Endpoints
487
+
488
+ | Method | Path | Description | Auth |
489
+ |--------|------|-------------|------|
490
+ | GET | /api/v1/job-demands | List job demands (paginated) | Authenticated |
491
+ | GET | /api/v1/job-demands/{id} | Get job demand by ID | Authenticated |
492
+ | POST | /api/v1/job-demands | Create a new job demand | ADMIN |
493
+ | PUT | /api/v1/job-demands/{id} | Update a job demand | ADMIN |
494
+ | DELETE | /api/v1/job-demands/{id} | Delete a job demand | ADMIN |
495
+ ```
496
+
497
+ ### Public API
498
+
499
+ Include complete code samples for:
500
+
501
+ - **Service Interface** — `{{ModuleName}}Service.java`
502
+ Methods derived from user stories
503
+ - **Response DTO** — `{{ModuleName}}DTO.java` (Java record)
504
+ Fields from `model/<module>/model.md`
505
+ - **Request DTOs** — `Create{{ModuleName}}Request.java`, `Update{{ModuleName}}Request.java`
506
+ Java records with Bean Validation
507
+ - **Exception** — `{{ModuleName}}Exception.java`
508
+ Module-specific exception with NotFound inner class
509
+
510
+ ### Internal Implementation
511
+
512
+ Include complete code samples for:
513
+
514
+ - **[If MongoDB] Document** — `{{ModuleName}}Document.java`
515
+ - **[If PostgreSQL/MySQL] Entity** — `{{ModuleName}}Entity.java`
516
+ - **Repository** — `{{ModuleName}}Repository.java` with query methods
517
+ - **Mapper** — `{{ModuleName}}Mapper.java` with `@Mapper(componentModel = "spring")`
518
+ - **Service Implementation** — `{{ModuleName}}ServiceImpl.java` with full CRUD logic
519
+ - **REST Controller** — `{{ModuleName}}Controller.java` with all endpoints
520
+
521
+ ### Critical Rules for Module SPEC.md
522
+
523
+ 1. Use actual field names from module model files
524
+ 2. Use actual table/collection names
525
+ 3. Define service methods mapping to actual user stories (by tag ID)
526
+ 4. Define REST endpoints mapping to actual user stories
527
+ 5. List user story IDs, NFR IDs, and constraint IDs with versions
528
+ 6. Include complete, continuous code samples
529
+ 7. Follow all constraints (constructor injection, `@Getter @Setter` not `@Data`, records for DTOs, MapStruct, paginated lists)
530
+ 8. Include "Removed / Replaced" subsection
531
+
532
+ **REST API URI rules:**
533
+ - Resource names are plural and kebab-case: `/api/v1/job-demands`
534
+ - Controller: `@RequestMapping("/api/v1/job-demands")`
535
+ - Role-based access via `@PreAuthorize` on controller class or methods
536
+ - `201 Created` with `Location` header for POST
537
+ - `204 No Content` for DELETE
538
+
539
+ ```java
540
+ @RestController
541
+ @RequestMapping("/api/v1/job-demands")
542
+ @RequiredArgsConstructor
543
+ @Tag(name = "Job Demands", description = "Job demand management operations")
544
+ @PreAuthorize("hasRole('OPERATOR')")
545
+ class JobDemandController {
546
+ // ...
547
+ }
548
+ ```
549
+
550
+ If a module is accessible by multiple roles:
551
+ ```java
552
+ @PreAuthorize("hasAnyRole('ADMIN', 'OPERATOR')")
553
+ ```