@groupby/ai-dev 0.5.15 → 0.5.17
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.
- package/package.json +1 -1
- package/teams/fhr-orchestration/skills/create-jira/SKILL.md +47 -0
- package/teams/fhr-orchestration/skills/create-jira/TEMPLATE.md +10 -0
- package/teams/fhr-orchestration/skills/create-plan/SKILL.md +48 -0
- package/teams/fhr-orchestration/skills/create-plan/TEMPLATE.md +13 -0
- package/teams/fhr-orchestration/skills/init-harness/SKILL.md +164 -0
- package/teams/fhr-orchestration/skills/init-harness/assets/TEMPLATE.CLAUDE.md +88 -0
- package/teams/fhr-orchestration/skills/init-harness/assets/TEMPLATE.architecture.md +152 -0
- package/teams/fhr-orchestration/skills/init-harness/assets/TEMPLATE.coding-guidelines.md +320 -0
- package/teams/fhr-orchestration/skills/init-harness/assets/TEMPLATE.glossary.md +55 -0
- package/teams/fhr-orchestration/skills/init-harness/assets/TEMPLATE.harness-gap-log.md +59 -0
- package/teams/fhr-orchestration/skills/use-case-writer/SKILL.md +123 -0
- package/teams/fhr-orchestration/skills/use-case-writer/TEMPLATE.md +39 -0
- package/teams/fhr-orchestration/skills/write-spec/SKILL.md +56 -0
- package/teams/fhr-orchestration/skills/write-spec/TEMPLATE.md +29 -0
- package/teams/firstspirit-caas/mcp/jira-tools.py +2122 -0
- package/teams/firstspirit-caas/mcp/test_bamboo_artifacts.py +315 -0
- package/teams/firstspirit-caas/mcp/test_jira_links.py +192 -0
- package/teams/firstspirit-caas/mcp/test_update_jira_ticket.py +161 -0
- package/teams/firstspirit-caas/resources/mcp-setup.md +57 -0
- package/teams/firstspirit-caas/skills/chronicle/SKILL.md +105 -0
- package/teams/firstspirit-caas/skills/create-jira-ticket/SKILL.md +183 -0
- package/teams/firstspirit-caas/skills/get-jira-ticket/SKILL.md +125 -0
- package/teams/firstspirit-caas/skills/handle-red-cve-plan/SKILL.md +316 -0
- package/teams/firstspirit-caas/skills/handle-red-cve-plan/references/suppression.md +79 -0
- package/teams/firstspirit-caas/skills/handle-red-cve-plan/scripts/gen_suppression.py +116 -0
- package/teams/firstspirit-caas/skills/handle-red-cve-plan/scripts/parse_json_report.py +183 -0
- package/teams/firstspirit-caas/skills/handle-red-cve-plan/scripts/parse_report.py +255 -0
- package/teams/firstspirit-caas/skills/handle-red-cve-plan/scripts/test_gen_suppression.py +171 -0
- package/teams/firstspirit-caas/skills/handle-red-cve-plan/scripts/test_parse_json_report.py +244 -0
- package/teams/firstspirit-caas/skills/handle-red-cve-plan/scripts/test_parse_report.py +464 -0
- package/teams/firstspirit-caas/skills/handle-red-cve-plan/scripts/testdata/sample-report.html +39 -0
- package/teams/firstspirit-caas/skills/handle-red-cve-plan/scripts/testdata/sample-report.json +76 -0
- package/teams/firstspirit-caas/skills/handle-weekly-cve-plans/SKILL.md +238 -0
- package/teams/firstspirit-caas/skills/retrospect/SKILL.md +94 -0
- package/teams/firstspirit-caas/skills/retrospect/extract_prompts.py +392 -0
- package/teams/firstspirit-caas/skills/review/SKILL.md +131 -0
- package/teams/firstspirit-caas/skills/review-finalize/SKILL.md +103 -0
- package/teams/firstspirit-caas/skills/specify/SKILL.md +239 -0
- package/teams/firstspirit-caas/skills/summarise-for-jira-comment/SKILL.md +162 -0
- package/teams/firstspirit-caas/skills/write-releasenotes/SKILL.md +177 -0
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
# Coding Guidelines — {{SERVICE_NAME}}
|
|
2
|
+
|
|
3
|
+
*Last updated: {{DATE}}*
|
|
4
|
+
*Owner: {{TEAM_NAME}}*
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## §1 Project Structure
|
|
9
|
+
|
|
10
|
+
### Convention: Package layout follows strict layer boundaries
|
|
11
|
+
|
|
12
|
+
The root package is `{{ROOT_PACKAGE}}`. Every class lives in exactly one named sub-package that matches its architectural role. {{REMOTE_INTEGRATION_PACKAGE_NOTE — FILL IN: describe how integrations are grouped, e.g. "Remote integrations are grouped under `remote/{integration-name}`" or remove if not applicable}}.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
### Convention: Class naming encodes layer and purpose
|
|
17
|
+
|
|
18
|
+
<!-- FILL IN: scan src/main/java/{{ROOT_PACKAGE}}/ and extract the actual naming patterns present in this repo.
|
|
19
|
+
Add one row per layer found. Remove layers that do not exist in this codebase. -->
|
|
20
|
+
|
|
21
|
+
| Layer | Pattern | Examples |
|
|
22
|
+
|-------|---------|---------|
|
|
23
|
+
| {{layer}} | `{{NamingPattern}}` | {{ActualClassExamples}} |
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## §2 Spring Boot Patterns
|
|
28
|
+
|
|
29
|
+
<!-- FILL IN or REMOVE: only if repo uses Spring Boot. If not, replace with the equivalent framework's conventions or remove. -->
|
|
30
|
+
|
|
31
|
+
### Convention: `@Bean` in `@Configuration` classes for all infrastructure beans
|
|
32
|
+
|
|
33
|
+
Beans that require parameters, conditionals, or custom construction are declared as `@Bean` methods inside a `@Configuration` class. No infrastructure bean is created via `@Component` constructor alone.
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
### Convention: `@Service` / `@Component` for business-logic beans
|
|
38
|
+
|
|
39
|
+
Service classes and standalone components (not requiring conditional creation) use stereotype annotations directly. Always paired with `@RequiredArgsConstructor`.
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
### Convention: Runtime bean switching
|
|
44
|
+
|
|
45
|
+
{{BEAN_SWITCHING_NOTE}}
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
### Convention: All custom properties injected with `@Value` and a default
|
|
50
|
+
|
|
51
|
+
Properties are always injected with `@Value("${...}")`. Every optional property includes a colon-separated default value. {{CONFIGURATION_PROPERTIES_NOTE}}.
|
|
52
|
+
|
|
53
|
+
---
|
|
54
|
+
|
|
55
|
+
### Convention: Custom property namespace is `{{PROPERTY_PREFIX}}.*`
|
|
56
|
+
|
|
57
|
+
All application-specific properties are nested under the `{{PROPERTY_PREFIX}}` prefix in `application.yaml`. Spring-managed namespaces (`spring.*`, `management.*`) are used unmodified.
|
|
58
|
+
|
|
59
|
+
---
|
|
60
|
+
|
|
61
|
+
### Convention: Spring profile usage
|
|
62
|
+
|
|
63
|
+
{{PROFILE_NOTE}}
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## §3 Error Handling
|
|
68
|
+
|
|
69
|
+
<!-- FILL IN or REMOVE: only if service exposes HTTP endpoints. -->
|
|
70
|
+
|
|
71
|
+
### Convention: Custom exception hierarchy
|
|
72
|
+
|
|
73
|
+
{{EXCEPTION_HIERARCHY_NOTE}}
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
### Convention: All HTTP error mapping is centralised in a single `@ControllerAdvice` class
|
|
78
|
+
|
|
79
|
+
There is a single `@ControllerAdvice` class (`{{EXCEPTION_HANDLER_CLASS}}`). Services throw unchecked exceptions; they do not produce `ResponseEntity` or set HTTP status codes. Error mapping happens only in `{{EXCEPTION_HANDLER_CLASS}}`.
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
### Convention: Error response body format
|
|
84
|
+
|
|
85
|
+
{{ERROR_RESPONSE_FORMAT}}
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
### Convention: Exception handler logging
|
|
90
|
+
|
|
91
|
+
{{EXCEPTION_HANDLER_LOGGING_NOTE}}
|
|
92
|
+
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## §4 Logging
|
|
96
|
+
|
|
97
|
+
### Convention: Logger declaration
|
|
98
|
+
|
|
99
|
+
{{LOGGER_DECLARATION_NOTE}}
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
### Convention: Log levels
|
|
104
|
+
|
|
105
|
+
{{LOG_LEVEL_CONVENTIONS}}
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
### Convention: MDC usage
|
|
110
|
+
|
|
111
|
+
{{MDC_NOTE}}
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## §5 Testing
|
|
116
|
+
|
|
117
|
+
### Convention: Test approach
|
|
118
|
+
|
|
119
|
+
{{TEST_APPROACH_NOTE}}
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
### Convention: Test infrastructure
|
|
124
|
+
|
|
125
|
+
{{TEST_INFRA_NOTE}}
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
### Convention: Test infrastructure wiring
|
|
130
|
+
|
|
131
|
+
{{TEST_WIRING_NOTE}}
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
### Convention: Test interaction style
|
|
136
|
+
|
|
137
|
+
{{TEST_INTERACTION_NOTE}}
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
<!-- FILL IN or REMOVE: include BDD sub-section only if a BDD framework is detected. -->
|
|
142
|
+
|
|
143
|
+
### BDD Conventions ({{FRAMEWORK_NAME}})
|
|
144
|
+
|
|
145
|
+
{{BDD_CONVENTIONS — document stage/step patterns, naming, state sharing}}
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
## §6 API Layer
|
|
150
|
+
|
|
151
|
+
<!-- FILL IN or REMOVE: only if service exposes a REST API. -->
|
|
152
|
+
|
|
153
|
+
### Convention: Controller return types
|
|
154
|
+
|
|
155
|
+
{{CONTROLLER_RETURN_NOTE}}
|
|
156
|
+
|
|
157
|
+
---
|
|
158
|
+
|
|
159
|
+
### Convention: Base URL path pattern
|
|
160
|
+
|
|
161
|
+
{{BASE_URL_PATTERN}}
|
|
162
|
+
|
|
163
|
+
---
|
|
164
|
+
|
|
165
|
+
### Convention: Request validation approach
|
|
166
|
+
|
|
167
|
+
{{VALIDATION_NOTE}}
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
### Convention: Model / DTO class construction
|
|
172
|
+
|
|
173
|
+
{{DTO_CONSTRUCTION_NOTE}}
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
## §7 Data Access
|
|
178
|
+
|
|
179
|
+
<!-- FILL IN or REMOVE: only if service owns or accesses a database. -->
|
|
180
|
+
|
|
181
|
+
### Convention: Data access approach
|
|
182
|
+
|
|
183
|
+
{{DATA_ACCESS_NOTE}}
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
### Convention: SQL / query storage
|
|
188
|
+
|
|
189
|
+
<!-- FILL IN or REMOVE: include only if the service uses raw SQL. -->
|
|
190
|
+
|
|
191
|
+
{{SQL_STORAGE_NOTE — describe where queries live, e.g. "Simple queries are inline `private static final String` constants. Complex queries live in external `.sql` files under `src/main/resources/` loaded via `{{SQL_LOADER_CLASS}}`."}}
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
### Convention: Transactions
|
|
196
|
+
|
|
197
|
+
<!-- FILL IN or REMOVE: include only if the service owns a database. -->
|
|
198
|
+
|
|
199
|
+
{{TRANSACTION_NOTE}}
|
|
200
|
+
|
|
201
|
+
---
|
|
202
|
+
|
|
203
|
+
## §8 Inter-Service Communication
|
|
204
|
+
|
|
205
|
+
<!-- FILL IN or REMOVE: include only if service communicates with other services. -->
|
|
206
|
+
|
|
207
|
+
### Convention: Outbound HTTP client
|
|
208
|
+
|
|
209
|
+
<!-- FILL IN or REMOVE: include only if service makes outbound HTTP calls. -->
|
|
210
|
+
|
|
211
|
+
{{OUTBOUND_HTTP_NOTE}}
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
### Convention: Async messaging
|
|
216
|
+
|
|
217
|
+
<!-- FILL IN or REMOVE: include only if service produces or consumes async messages. -->
|
|
218
|
+
|
|
219
|
+
{{ASYNC_MESSAGING_NOTE — describe producer pattern, consumer pattern, error handling, topic naming.}}
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
## §9 Secret Management
|
|
224
|
+
|
|
225
|
+
### Convention: No secrets in source code or config files
|
|
226
|
+
|
|
227
|
+
`application.yaml` (or equivalent) contains only local development defaults. Production values are injected at runtime.
|
|
228
|
+
|
|
229
|
+
{{RUNTIME_SECRET_INJECTION_NOTE — FILL IN from repo scan + engineer confirmation: describe how runtime secrets are injected, e.g. "Kubernetes secret mounts", "AWS Secrets Manager", "environment variables set by the deployment pipeline".}}
|
|
230
|
+
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
### Convention: Build-time secret handling
|
|
234
|
+
|
|
235
|
+
<!-- FILL IN or REMOVE: include only if CI pipeline files exist in this repo. -->
|
|
236
|
+
|
|
237
|
+
{{BUILD_SECRET_NOTE}}
|
|
238
|
+
|
|
239
|
+
---
|
|
240
|
+
|
|
241
|
+
## §10 Dependency Management
|
|
242
|
+
|
|
243
|
+
### Convention: Parent POM / BOM
|
|
244
|
+
|
|
245
|
+
{{PARENT_POM_NOTE}}
|
|
246
|
+
|
|
247
|
+
---
|
|
248
|
+
|
|
249
|
+
### Convention: Dependency version pinning
|
|
250
|
+
|
|
251
|
+
{{VERSION_PINNING_NOTE}}
|
|
252
|
+
|
|
253
|
+
---
|
|
254
|
+
|
|
255
|
+
### Convention: Image / artefact build
|
|
256
|
+
|
|
257
|
+
{{BUILD_TOOL_NOTE}}
|
|
258
|
+
|
|
259
|
+
---
|
|
260
|
+
|
|
261
|
+
## §11 CI / CD
|
|
262
|
+
|
|
263
|
+
<!-- FILL IN or REMOVE: include only if CI pipeline files exist in this repo. -->
|
|
264
|
+
|
|
265
|
+
### Convention: CI tooling
|
|
266
|
+
|
|
267
|
+
{{CI_TOOL_NOTE}}
|
|
268
|
+
|
|
269
|
+
---
|
|
270
|
+
|
|
271
|
+
## §12 High-Risk Areas
|
|
272
|
+
|
|
273
|
+
AI may make changes anywhere in this repo. All code is reviewed before merge. The areas below are high-risk: the cost of a wrong change is high and not always visible to AI. For each, follow the specific rule and flag the change in the PR description. If a change is not clearly justified by the spec, stop and confirm with the engineer first.
|
|
274
|
+
|
|
275
|
+
### High-Risk Area {{N}} — {{Name}}
|
|
276
|
+
|
|
277
|
+
**What:** {{specific files, packages, or patterns}}
|
|
278
|
+
**Why:** {{the failure mode if AI gets this wrong}}
|
|
279
|
+
**Rule:** {{specific constraint to follow}}
|
|
280
|
+
|
|
281
|
+
---
|
|
282
|
+
|
|
283
|
+
## Convention Gaps
|
|
284
|
+
|
|
285
|
+
<!-- FILL IN: document every inconsistency found during the codebase scan.
|
|
286
|
+
If no gaps exist, write "No convention gaps identified." and remove this comment.
|
|
287
|
+
Use the format below for each gap found. -->
|
|
288
|
+
|
|
289
|
+
{{CONVENTION_GAPS_OR_NONE — for each gap found, use this format:
|
|
290
|
+
|
|
291
|
+
### Gap: <short description>
|
|
292
|
+
|
|
293
|
+
**Type:** Decision needed | AI hallucination risk | Intentional — needs documenting
|
|
294
|
+
|
|
295
|
+
**Description:** <what is inconsistent and where it appears>
|
|
296
|
+
|
|
297
|
+
**Examples of conflict:**
|
|
298
|
+
- `ClassA.method` — does X
|
|
299
|
+
- `ClassB.method` — does Y
|
|
300
|
+
|
|
301
|
+
**Jira ticket:** <link or leave blank>
|
|
302
|
+
|
|
303
|
+
---
|
|
304
|
+
}}
|
|
305
|
+
|
|
306
|
+
---
|
|
307
|
+
|
|
308
|
+
## AI Usage Notes
|
|
309
|
+
|
|
310
|
+
**Patterns AI must always follow:**
|
|
311
|
+
|
|
312
|
+
{{GENERATE: one rule per confirmed convention — reference the section above}}
|
|
313
|
+
|
|
314
|
+
**Patterns AI must never use:**
|
|
315
|
+
|
|
316
|
+
{{GENERATE: one anti-pattern per confirmed absence or prohibition — state why (e.g. "not present in this codebase", "violates free zone", "contradicts convention in §X")}}
|
|
317
|
+
|
|
318
|
+
**Things that contradict common defaults or conventions:**
|
|
319
|
+
|
|
320
|
+
{{GENERATE: surprises a competent developer would not expect — things AI is likely to get wrong without being told explicitly}}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Glossary — {{SERVICE_NAME}}
|
|
2
|
+
|
|
3
|
+
*Last updated: {{DATE}}*
|
|
4
|
+
*Owner: {{TEAM_NAME}}*
|
|
5
|
+
|
|
6
|
+
Domain terms used consistently in this service. Use these exact terms in code, specs, and documentation; do not introduce synonyms.
|
|
7
|
+
|
|
8
|
+
Only include terms where the meaning is specific to this service or where the code uses a different word than the business/product team. Generic terms ('microservice,' 'API') do not belong here.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## Core Concepts
|
|
13
|
+
|
|
14
|
+
**{{PrimaryDomainObject}}**
|
|
15
|
+
{{Definition: What it is, what it represents, who submits it, what happens to it.}}
|
|
16
|
+
|
|
17
|
+
**{{SecondaryDomainObject}}**
|
|
18
|
+
{{Definition.}}
|
|
19
|
+
|
|
20
|
+
**{{KeyIdentifier}}**
|
|
21
|
+
{{Definition: e.g. "A UUID assigned at creation time. Uniquely identifies a {{object}} across its full lifecycle."}}
|
|
22
|
+
|
|
23
|
+
<!-- Add more core concept entries as needed -->
|
|
24
|
+
|
|
25
|
+
<!-- OPTIONAL: If this service has a state machine or enum that constrains valid values:
|
|
26
|
+
|
|
27
|
+
## {{Object}} States
|
|
28
|
+
|
|
29
|
+
| State | Meaning |
|
|
30
|
+
|-------|---------|
|
|
31
|
+
| `{{STATE}}` | {{when this state applies}} |
|
|
32
|
+
|
|
33
|
+
These are the ONLY valid states. Do not introduce new states without engineer confirmation. -->
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## External Services
|
|
38
|
+
|
|
39
|
+
**{{ExternalServiceName}}**
|
|
40
|
+
{{What it is, what role it plays relative to this service, how this service calls it.}}
|
|
41
|
+
|
|
42
|
+
**{{ExternalServiceName}}** *(also known as: {{CodebaseName}})*
|
|
43
|
+
{{What it is. Note: code uses "{{CodebaseName}}" (e.g. package names, class names); the canonical domain name is "{{ExternalServiceName}}". Use the canonical name in new code and docs.}}
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## Infrastructure Terms
|
|
48
|
+
|
|
49
|
+
<!-- Only include infrastructure terms that have domain-level significance — things that appear in specs, ADRs, or conversations with engineers, not just implementation details. -->
|
|
50
|
+
|
|
51
|
+
**{{InfrastructureTerm}}**
|
|
52
|
+
{{Definition: e.g. "The external_events_outbox table used to reliably publish status updates. Events are written transactionally alongside state changes and processed asynchronously."}}
|
|
53
|
+
|
|
54
|
+
**{{InfrastructureTerm}}**
|
|
55
|
+
{{Definition.}}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
# harness-gap-log.md — {{SERVICE_NAME}}
|
|
2
|
+
|
|
3
|
+
*Last updated: {{DATE}}*
|
|
4
|
+
*Owner: {{TEAM_NAME}}*
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Purpose
|
|
9
|
+
|
|
10
|
+
Post-generation review found a problem rooted in a harness gap. Log it here with a workaround so the agent avoids repeating it.
|
|
11
|
+
|
|
12
|
+
Agent: check Active entries in the relevant area before generating. Apply the corrective action.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Active Gaps
|
|
17
|
+
|
|
18
|
+
*Most recent first.*
|
|
19
|
+
|
|
20
|
+
<!-- ENTRY FORMAT:
|
|
21
|
+
|
|
22
|
+
### {{YYYY-MM-DD}} — {{short description}}
|
|
23
|
+
|
|
24
|
+
**Area:** {{package, class, or concern area}}
|
|
25
|
+
**Exposed by:** {{spec or ticket where the problem surfaced}}
|
|
26
|
+
**What happened:** {{What did the generated code get wrong?}}
|
|
27
|
+
**Root cause:** {{Why did the harness fail to prevent this?}}
|
|
28
|
+
**Interim instruction:** {{What the agent must do differently until fixed permanently}}
|
|
29
|
+
**Fix required:** {{Which harness file needs what change}}
|
|
30
|
+
**Reached main?:** {{Yes / No}}
|
|
31
|
+
**Status:** Active
|
|
32
|
+
**Ticket:** {{link}}
|
|
33
|
+
|
|
34
|
+
Only log entries where:
|
|
35
|
+
- The root cause is a harness gap (not a spec error or random one-off)
|
|
36
|
+
- The interim instruction changes agent behaviour (if it doesn't, track in Jira only)
|
|
37
|
+
|
|
38
|
+
-->
|
|
39
|
+
|
|
40
|
+
*No active gaps.*
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## Resolved Gaps
|
|
45
|
+
|
|
46
|
+
*Moved here once the harness fix is merged.*
|
|
47
|
+
|
|
48
|
+
<!-- ENTRY FORMAT:
|
|
49
|
+
|
|
50
|
+
### {{YYYY-MM-DD}} — {{short description}}
|
|
51
|
+
|
|
52
|
+
**Area:** {{area}}
|
|
53
|
+
**What happened:** {{what the generated code got wrong}}
|
|
54
|
+
**Propagated to:** {{which harness file was updated to fix this permanently}}
|
|
55
|
+
**Status:** Closed
|
|
56
|
+
|
|
57
|
+
-->
|
|
58
|
+
|
|
59
|
+
*No resolved gaps.*
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: use-case-writer
|
|
3
|
+
description: 'Produce a structured test plan from a PRD, spec file, Jira ticket, or plain description. Tags each test case by type (E2E / acceptance / contract / lint) so it can be handed directly to the matching writer skill. Use when: "write test cases for...", "plan the tests for...", "what tests do we need for...", "test plan for this feature".'
|
|
4
|
+
argument-hint: "Path to a PRD or spec (.md/.txt), a Jira key (FHR-XXXX), or a plain-English feature description"
|
|
5
|
+
user-invocable: true
|
|
6
|
+
allowed-tools: [Read, Grep, Glob, Bash, Write]
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# /use-case-writer — Test case planner for Titan services
|
|
10
|
+
|
|
11
|
+
Produces a test plan file (`test-plan-{slug}.md`) with test cases tagged by type.
|
|
12
|
+
Each test case maps directly to a writer skill:
|
|
13
|
+
|
|
14
|
+
| Tag | Writer skill |
|
|
15
|
+
|---|---|
|
|
16
|
+
| `[E2E]` | _dev-owned — no automated writer; author these manually in `titan-e2e-tests`_ |
|
|
17
|
+
| `[acceptance]` | `/acceptance-tests-writer` |
|
|
18
|
+
| `[contract]` | `/contract-tests-writer` |
|
|
19
|
+
| `[lint]` | `/lint-tests-writer` |
|
|
20
|
+
|
|
21
|
+
**Nothing is invented.** Test cases are derived from the input and verified against
|
|
22
|
+
the actual service code and docs. Ambiguous assertions go in the "open questions"
|
|
23
|
+
section — not into a test case.
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Step 0 — Detect input type
|
|
28
|
+
|
|
29
|
+
Check `$ARGUMENTS`:
|
|
30
|
+
|
|
31
|
+
- **File path ending in `.md` or `.txt`** → read it as a PRD or spec
|
|
32
|
+
- **`FHR-XXXX` pattern** → fetch the Jira ticket (if Atlassian MCP is connected) or ask the user to paste the description
|
|
33
|
+
- **Anything else** → treat as a plain-English description of the feature or change
|
|
34
|
+
|
|
35
|
+
If `$ARGUMENTS` is empty → ask: "Paste a PRD, a Jira ticket ID, or describe the feature."
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## Step 1 — Read context sources
|
|
40
|
+
|
|
41
|
+
Read the relevant files for whichever services the feature touches:
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
team-config.yaml # testing stack + repo list
|
|
45
|
+
titan-e2e-tests/docs/architecture.md # deployment topology
|
|
46
|
+
titan-e2e-tests/TESTING_GAPS.md # known gaps — don't plan tests that duplicate open gaps
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
For `csp-apigateway`:
|
|
50
|
+
- `csp-apigateway/docs/` — existing specs/ADRs
|
|
51
|
+
- `csp-apigateway/apigateway-tests/src/test/java/.../tests/` — existing acceptance tests (don't plan duplicates)
|
|
52
|
+
|
|
53
|
+
For `csp-trigger-scheduler`:
|
|
54
|
+
- `csp-trigger-scheduler/src/test/java/.../integration/` — existing integration tests
|
|
55
|
+
|
|
56
|
+
For `fas-argo-deployment` / `titan-argo-deployment`:
|
|
57
|
+
- `charts/` — chart structure (for lint scope)
|
|
58
|
+
|
|
59
|
+
Only read what's relevant. Skip repos the feature doesn't touch.
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Step 2 — Extract functional requirements
|
|
64
|
+
|
|
65
|
+
From the input, list every distinct behaviour the feature introduces or changes:
|
|
66
|
+
|
|
67
|
+
- What does the system do (happy path)?
|
|
68
|
+
- What does it reject or handle differently (error / boundary cases)?
|
|
69
|
+
- What does it emit (Kafka messages, state changes)?
|
|
70
|
+
- What crosses a service boundary?
|
|
71
|
+
- What is deployed via Helm/Argo?
|
|
72
|
+
|
|
73
|
+
Group requirements by service boundary. Each requirement is a candidate test case.
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Step 3 — Assign test types
|
|
78
|
+
|
|
79
|
+
For each requirement, assign one type using these rules:
|
|
80
|
+
|
|
81
|
+
| Requirement type | Test type |
|
|
82
|
+
|---|---|
|
|
83
|
+
| Full flow across multiple services (apigw → scheduler → curator → Kafka) | `E2E` |
|
|
84
|
+
| Single service HTTP API behaviour in isolation | `acceptance` |
|
|
85
|
+
| Message schema / structure on a Kafka topic between two services | `contract` |
|
|
86
|
+
| Helm chart validity, template rendering, required fields | `lint` |
|
|
87
|
+
| Unit-level logic | *(skip — dev responsibility, out of QA AI scope)* |
|
|
88
|
+
|
|
89
|
+
A single feature may produce test cases of multiple types.
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## Step 4 — Write the test plan
|
|
94
|
+
|
|
95
|
+
Create `titan-e2e-tests/docs/test-plan-{slug}.md` where `{slug}` is a kebab-case summary
|
|
96
|
+
of the feature (e.g. `test-plan-load-xml-e2e`, `test-plan-fas-healthcheck`).
|
|
97
|
+
|
|
98
|
+
Follow the structure in `skills/use-case-writer/TEMPLATE.md` — one entry per test case,
|
|
99
|
+
numbered sequentially and grouped by type (E2E → acceptance → contract → lint).
|
|
100
|
+
|
|
101
|
+
For each TC, populate the plain-English fields:
|
|
102
|
+
|
|
103
|
+
- **Why this matters:** one sentence naming what's at risk in production if this scenario fails. Derive from the ticket, the PRD, or the wording of the Expected outcome. If nothing in the input suggests a risk, write `TBD — engineer to fill` and note it in the Open questions table.
|
|
104
|
+
- **How this is verified:** one or two plain-English sentences translating the `**Assertion layer:**` value into what actually happens at runtime. Example: `Assertion layer: JGiven` → `The test sends a real HTTP request via the JGiven stages and asserts against the response and any Kafka messages produced.` Do not skip this field just because the assertion layer is obvious to a developer.
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Step 5 — Summarise open questions
|
|
109
|
+
|
|
110
|
+
Collect open questions in the bottom table of `TEMPLATE.md`. These must be resolved
|
|
111
|
+
before the corresponding writer skill is run.
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
## Step 6 — Present the output
|
|
116
|
+
|
|
117
|
+
Show:
|
|
118
|
+
1. Path to the generated test plan file
|
|
119
|
+
2. Summary table: test case count per type
|
|
120
|
+
3. List of open questions
|
|
121
|
+
4. Suggested next step: "Run `/{writer-skill} path/to/test-plan-{slug}.md` to generate code for each type."
|
|
122
|
+
|
|
123
|
+
Do not generate test code in this skill — that is the writer skills' job.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Test plan: {Feature name}
|
|
2
|
+
|
|
3
|
+
## Test cases
|
|
4
|
+
|
|
5
|
+
Number sequentially. Group by type: E2E first, then acceptance, then contract, then lint.
|
|
6
|
+
|
|
7
|
+
## TC-{NNN} [{type}] {title}
|
|
8
|
+
|
|
9
|
+
**Service(s):** {comma-separated list}
|
|
10
|
+
**Jira:** {FHR-XXXX or n/a}
|
|
11
|
+
|
|
12
|
+
**Why this matters:** {one plain-English sentence — what's at risk in production if this scenario fails}
|
|
13
|
+
|
|
14
|
+
**Preconditions:**
|
|
15
|
+
- {what must be true before this test runs}
|
|
16
|
+
|
|
17
|
+
**Steps:**
|
|
18
|
+
1. {action}
|
|
19
|
+
2. {action}
|
|
20
|
+
|
|
21
|
+
**Expected outcome:**
|
|
22
|
+
- {observable result — HTTP status, Kafka message field, K8s state, etc.}
|
|
23
|
+
|
|
24
|
+
**How this is verified:** {plain-English description of the mechanism — example: "The test sends a real HTTP POST to the running apigateway, then checks the JSON body of the response and reads the message the service publishes to Kafka to confirm it matches the expected shape."}
|
|
25
|
+
|
|
26
|
+
**Assertion layer:** {RestAssured / JGiven / JSON Schema / helm lint}
|
|
27
|
+
|
|
28
|
+
**Writer skill:** `/{skill-name}`
|
|
29
|
+
|
|
30
|
+
**Open questions:**
|
|
31
|
+
- {anything that must be confirmed from the code before this can be implemented}
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Open questions
|
|
36
|
+
|
|
37
|
+
| # | Question | Blocks |
|
|
38
|
+
|---|---|---|
|
|
39
|
+
| 1 | {question} | TC-{NNN} |
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: write-spec
|
|
3
|
+
description: Generate a complete implementation spec from a Jira ticket. Accepts a Jira key (e.g. FHR-1234) or a feature description. Fetches ticket details via Atlassian MCP, investigates the codebase, and produces a spec an AI coding agent can execute without further clarification. Outputs docs/specs/FHR-XXXX/SPEC.md. Run from the target service repo. Use when asked to write or generate a spec for a ticket or feature.
|
|
4
|
+
argument-hint: "Jira key (e.g. FHR-1234) or feature description"
|
|
5
|
+
user-invocable: true
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# /write-spec
|
|
9
|
+
|
|
10
|
+
Produces a clear, actionable spec that an AI coding agent can execute without further clarification. The output is the source of truth for plan generation.
|
|
11
|
+
|
|
12
|
+
## Trigger
|
|
13
|
+
|
|
14
|
+
`/write-spec` followed by either:
|
|
15
|
+
- A JIRA ticket key (e.g. `FHR-1234`)
|
|
16
|
+
- A feature description
|
|
17
|
+
If missing, ask.
|
|
18
|
+
|
|
19
|
+
## Input Resolution
|
|
20
|
+
|
|
21
|
+
1. If a JIRA key is provided, attempt to fetch via MCP. If MCP is unavailable or fails, ask the user to paste the ticket content.
|
|
22
|
+
2. Read `docs/specs/{JIRA-ID}/TICKET.md` if it exists.
|
|
23
|
+
3. Read repository markdown files (architecture docs, glossary, coding guidelines) for context.
|
|
24
|
+
4. Search codebase for components, tests, models, and contracts relevant to the feature.
|
|
25
|
+
|
|
26
|
+
## Process
|
|
27
|
+
|
|
28
|
+
1. **Gather context** - read the ticket, repository docs, and search the codebase for relevant files.
|
|
29
|
+
2. **Clarify** unknowns before writing.
|
|
30
|
+
- Group related questions into a single message to minimize round-trips.
|
|
31
|
+
- Do not produce the spec until the user has explicitly answered all questions. A response about something else (e.g. "I don't see the file") is NOT permission to proceed — re-ask the questions.
|
|
32
|
+
- Never add assumptions in place of asking. If something is unknown, ask. Do not write the spec with assumptions documented inline.
|
|
33
|
+
- Never ask about information already present in the ticket or codebase.
|
|
34
|
+
- Only proceed without asking if the user explicitly says to (e.g. "proceed", "write what you have").
|
|
35
|
+
3. **Write** the spec. Be concrete: exact file paths, method names, field names, types.
|
|
36
|
+
4. **Validate** before presenting:
|
|
37
|
+
- Goal is concrete, not a placeholder.
|
|
38
|
+
- At least one G/W/T requirement exists.
|
|
39
|
+
- No unresolved unknowns remain.
|
|
40
|
+
5. **Present** a short summary of what the spec covers and whether `/grill-with-docs` is recommended.
|
|
41
|
+
|
|
42
|
+
## Output
|
|
43
|
+
|
|
44
|
+
- Template: `skills/write-spec/TEMPLATE.md`
|
|
45
|
+
- Write to: `docs/specs/{JIRA-ID}/SPEC.md`
|
|
46
|
+
|
|
47
|
+
## Rules
|
|
48
|
+
|
|
49
|
+
- Use exactly the section names from the template.
|
|
50
|
+
- Requirements use Given/When/Then format. Edge cases are inline with the requirement they belong to.
|
|
51
|
+
- Context table lists key files with their roles (Read / Modify / Create), up to 8.
|
|
52
|
+
- Technical constraints are derived from the ticket and codebase, not invented.
|
|
53
|
+
- Omit sections that don't apply.
|
|
54
|
+
- NFRs cover performance, observability, and security — omit if none apply.
|
|
55
|
+
- Use only terms from the repository glossary if one exists.
|
|
56
|
+
- Write the spec to the output file; confirm only the file path.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# {JIRA-ID}: {Title}
|
|
2
|
+
|
|
3
|
+
## Goal
|
|
4
|
+
|
|
5
|
+
{One or two sentences. What does this change achieve and why.}
|
|
6
|
+
|
|
7
|
+
## Context
|
|
8
|
+
|
|
9
|
+
| Reference | Role |
|
|
10
|
+
|-----------|------|
|
|
11
|
+
| `path/to/file` | Read / Modify / Create |
|
|
12
|
+
|
|
13
|
+
## Requirements
|
|
14
|
+
|
|
15
|
+
### FR-1: {Name}
|
|
16
|
+
|
|
17
|
+
**Given** ...
|
|
18
|
+
**When** ...
|
|
19
|
+
**Then** ...
|
|
20
|
+
|
|
21
|
+
**Edge case:** ...
|
|
22
|
+
|
|
23
|
+
### NFR-1: {Name}
|
|
24
|
+
|
|
25
|
+
{Description.}
|
|
26
|
+
|
|
27
|
+
## Technical Constraints
|
|
28
|
+
|
|
29
|
+
{Constraints relevant to this feature, derived from the ticket and codebase.}
|