dsh-ecc-skills 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (278) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +99 -0
  3. package/cordis.patch.yml +5 -0
  4. package/lib/index.js +195 -0
  5. package/package.json +46 -0
  6. package/skills/accessibility/SKILL.md +147 -0
  7. package/skills/agent-architecture-audit/SKILL.md +257 -0
  8. package/skills/agent-eval/SKILL.md +147 -0
  9. package/skills/agent-harness-construction/SKILL.md +74 -0
  10. package/skills/agent-introspection-debugging/SKILL.md +154 -0
  11. package/skills/agent-payment-x402/SKILL.md +225 -0
  12. package/skills/agent-self-evaluation/SKILL.md +182 -0
  13. package/skills/agent-sort/SKILL.md +216 -0
  14. package/skills/agentic-engineering/SKILL.md +64 -0
  15. package/skills/agentic-os/SKILL.md +388 -0
  16. package/skills/ai-first-engineering/SKILL.md +52 -0
  17. package/skills/ai-regression-testing/SKILL.md +386 -0
  18. package/skills/android-clean-architecture/SKILL.md +340 -0
  19. package/skills/angular-developer/SKILL.md +155 -0
  20. package/skills/api-connector-builder/SKILL.md +121 -0
  21. package/skills/api-design/SKILL.md +524 -0
  22. package/skills/architecture-decision-records/SKILL.md +180 -0
  23. package/skills/article-writing/SKILL.md +80 -0
  24. package/skills/automation-audit-ops/SKILL.md +143 -0
  25. package/skills/autonomous-agent-harness/SKILL.md +274 -0
  26. package/skills/autonomous-loops/SKILL.md +611 -0
  27. package/skills/backend-patterns/SKILL.md +562 -0
  28. package/skills/benchmark/SKILL.md +95 -0
  29. package/skills/benchmark-methodology/SKILL.md +191 -0
  30. package/skills/benchmark-optimization-loop/SKILL.md +71 -0
  31. package/skills/blender-motion-state-inspection/SKILL.md +165 -0
  32. package/skills/blueprint/SKILL.md +106 -0
  33. package/skills/brand-discovery/SKILL.md +145 -0
  34. package/skills/brand-voice/SKILL.md +98 -0
  35. package/skills/browser-qa/SKILL.md +105 -0
  36. package/skills/bun-runtime/SKILL.md +85 -0
  37. package/skills/canary-watch/SKILL.md +108 -0
  38. package/skills/carrier-relationship-management/SKILL.md +212 -0
  39. package/skills/cisco-ios-patterns/SKILL.md +164 -0
  40. package/skills/ck/SKILL.md +148 -0
  41. package/skills/claude-devfleet/SKILL.md +112 -0
  42. package/skills/click-path-audit/SKILL.md +245 -0
  43. package/skills/clickhouse-io/SKILL.md +445 -0
  44. package/skills/code-tour/SKILL.md +254 -0
  45. package/skills/codebase-onboarding/SKILL.md +234 -0
  46. package/skills/codehealth-mcp/SKILL.md +167 -0
  47. package/skills/coding-standards/SKILL.md +551 -0
  48. package/skills/competitive-platform-analysis/SKILL.md +214 -0
  49. package/skills/competitive-report-structure/SKILL.md +162 -0
  50. package/skills/compose-multiplatform-patterns/SKILL.md +300 -0
  51. package/skills/config-gc/SKILL.md +120 -0
  52. package/skills/configure-ecc/SKILL.md +206 -0
  53. package/skills/connections-optimizer/SKILL.md +190 -0
  54. package/skills/content-engine/SKILL.md +132 -0
  55. package/skills/content-hash-cache-pattern/SKILL.md +162 -0
  56. package/skills/context-budget/SKILL.md +136 -0
  57. package/skills/continuous-agent-loop/SKILL.md +46 -0
  58. package/skills/contract-first/SKILL.md +287 -0
  59. package/skills/cost-aware-llm-pipeline/SKILL.md +184 -0
  60. package/skills/cost-tracking/SKILL.md +97 -0
  61. package/skills/council/SKILL.md +204 -0
  62. package/skills/council-multi-model/SKILL.md +167 -0
  63. package/skills/cpp-coding-standards/SKILL.md +724 -0
  64. package/skills/cpp-testing/SKILL.md +325 -0
  65. package/skills/crosspost/SKILL.md +112 -0
  66. package/skills/csharp-testing/SKILL.md +322 -0
  67. package/skills/customer-billing-ops/SKILL.md +141 -0
  68. package/skills/customs-trade-compliance/SKILL.md +263 -0
  69. package/skills/dart-flutter-patterns/SKILL.md +564 -0
  70. package/skills/dashboard-builder/SKILL.md +109 -0
  71. package/skills/data-scraper-agent/SKILL.md +765 -0
  72. package/skills/data-throughput-accelerator/SKILL.md +74 -0
  73. package/skills/database-migrations/SKILL.md +430 -0
  74. package/skills/deep-research/SKILL.md +160 -0
  75. package/skills/defi-amm-security/SKILL.md +167 -0
  76. package/skills/delivery-gate/SKILL.md +126 -0
  77. package/skills/deployment-patterns/SKILL.md +428 -0
  78. package/skills/design-system/SKILL.md +83 -0
  79. package/skills/dev-team/SKILL.md +203 -0
  80. package/skills/django-celery/SKILL.md +458 -0
  81. package/skills/django-patterns/SKILL.md +735 -0
  82. package/skills/django-security/SKILL.md +644 -0
  83. package/skills/django-tdd/SKILL.md +730 -0
  84. package/skills/django-verification/SKILL.md +470 -0
  85. package/skills/dmux-workflows/SKILL.md +192 -0
  86. package/skills/docker-patterns/SKILL.md +520 -0
  87. package/skills/documentation-lookup/SKILL.md +91 -0
  88. package/skills/dotnet-patterns/SKILL.md +322 -0
  89. package/skills/dynamic-workflow-mode/SKILL.md +124 -0
  90. package/skills/e2e-testing/SKILL.md +327 -0
  91. package/skills/ecc-tools-cost-audit/SKILL.md +161 -0
  92. package/skills/email-ops/SKILL.md +122 -0
  93. package/skills/energy-procurement/SKILL.md +228 -0
  94. package/skills/enterprise-agent-ops/SKILL.md +51 -0
  95. package/skills/error-handling/SKILL.md +377 -0
  96. package/skills/eval-harness/SKILL.md +271 -0
  97. package/skills/evm-token-decimals/SKILL.md +131 -0
  98. package/skills/exa-search/SKILL.md +108 -0
  99. package/skills/fal-ai-media/SKILL.md +289 -0
  100. package/skills/fastapi-patterns/SKILL.md +514 -0
  101. package/skills/finance-billing-ops/SKILL.md +128 -0
  102. package/skills/flox-environments/SKILL.md +497 -0
  103. package/skills/flutter-dart-code-review/SKILL.md +436 -0
  104. package/skills/foundation-models-on-device/SKILL.md +243 -0
  105. package/skills/frontend-a11y/SKILL.md +446 -0
  106. package/skills/frontend-design-direction/SKILL.md +93 -0
  107. package/skills/frontend-patterns/SKILL.md +657 -0
  108. package/skills/fsharp-testing/SKILL.md +281 -0
  109. package/skills/gan-style-harness/SKILL.md +279 -0
  110. package/skills/generating-python-installer/SKILL.md +820 -0
  111. package/skills/git-workflow/SKILL.md +716 -0
  112. package/skills/github-ops/SKILL.md +145 -0
  113. package/skills/golang-patterns/SKILL.md +676 -0
  114. package/skills/golang-testing/SKILL.md +721 -0
  115. package/skills/google-workspace-ops/SKILL.md +96 -0
  116. package/skills/growth-log/SKILL.md +128 -0
  117. package/skills/healthcare-cdss-patterns/SKILL.md +246 -0
  118. package/skills/healthcare-emr-patterns/SKILL.md +160 -0
  119. package/skills/healthcare-eval-harness/SKILL.md +208 -0
  120. package/skills/healthcare-phi-compliance/SKILL.md +146 -0
  121. package/skills/hermes-imports/SKILL.md +89 -0
  122. package/skills/hexagonal-architecture/SKILL.md +277 -0
  123. package/skills/hipaa-compliance/SKILL.md +79 -0
  124. package/skills/homelab-network-readiness/SKILL.md +170 -0
  125. package/skills/homelab-network-setup/SKILL.md +130 -0
  126. package/skills/homelab-pihole-dns/SKILL.md +275 -0
  127. package/skills/homelab-vlan-segmentation/SKILL.md +312 -0
  128. package/skills/homelab-wireguard-vpn/SKILL.md +306 -0
  129. package/skills/hookify-rules/SKILL.md +128 -0
  130. package/skills/inherit-legacy-style/SKILL.md +157 -0
  131. package/skills/intent-driven-development/SKILL.md +360 -0
  132. package/skills/inventory-demand-planning/SKILL.md +247 -0
  133. package/skills/investor-materials/SKILL.md +97 -0
  134. package/skills/investor-outreach/SKILL.md +92 -0
  135. package/skills/ios-icon-gen/SKILL.md +158 -0
  136. package/skills/iterative-retrieval/SKILL.md +212 -0
  137. package/skills/ito-baskets/SKILL.md +263 -0
  138. package/skills/ito-compute/SKILL.md +151 -0
  139. package/skills/ito-inference/SKILL.md +119 -0
  140. package/skills/ito-training/SKILL.md +123 -0
  141. package/skills/java-coding-standards/SKILL.md +384 -0
  142. package/skills/jira-integration/SKILL.md +303 -0
  143. package/skills/jpa-patterns/SKILL.md +152 -0
  144. package/skills/knowledge-ops/SKILL.md +155 -0
  145. package/skills/kotlin-coroutines-flows/SKILL.md +285 -0
  146. package/skills/kotlin-exposed-patterns/SKILL.md +720 -0
  147. package/skills/kotlin-ktor-patterns/SKILL.md +690 -0
  148. package/skills/kotlin-patterns/SKILL.md +712 -0
  149. package/skills/kotlin-testing/SKILL.md +825 -0
  150. package/skills/kubernetes-patterns/SKILL.md +756 -0
  151. package/skills/laravel-patterns/SKILL.md +416 -0
  152. package/skills/laravel-plugin-discovery/SKILL.md +230 -0
  153. package/skills/laravel-security/SKILL.md +948 -0
  154. package/skills/laravel-tdd/SKILL.md +675 -0
  155. package/skills/laravel-verification/SKILL.md +180 -0
  156. package/skills/latency-critical-systems/SKILL.md +75 -0
  157. package/skills/lead-intelligence/SKILL.md +322 -0
  158. package/skills/liquid-glass-design/SKILL.md +279 -0
  159. package/skills/living-docs-governance/SKILL.md +137 -0
  160. package/skills/llm-trading-agent-security/SKILL.md +147 -0
  161. package/skills/logistics-exception-management/SKILL.md +222 -0
  162. package/skills/loop-design-check/SKILL.md +143 -0
  163. package/skills/mailtrap-email-integration/SKILL.md +77 -0
  164. package/skills/make-interfaces-feel-better/SKILL.md +152 -0
  165. package/skills/manim-video/SKILL.md +90 -0
  166. package/skills/market-research/SKILL.md +76 -0
  167. package/skills/marketing-campaign/SKILL.md +114 -0
  168. package/skills/mcp-server-patterns/SKILL.md +70 -0
  169. package/skills/messages-ops/SKILL.md +105 -0
  170. package/skills/ml-adoption-playbook/SKILL.md +57 -0
  171. package/skills/mle-workflow/SKILL.md +348 -0
  172. package/skills/motion-advanced/SKILL.md +597 -0
  173. package/skills/motion-foundations/SKILL.md +300 -0
  174. package/skills/motion-patterns/SKILL.md +435 -0
  175. package/skills/motion-ui/SKILL.md +576 -0
  176. package/skills/mysql-patterns/SKILL.md +413 -0
  177. package/skills/nanoclaw-repl/SKILL.md +34 -0
  178. package/skills/nasiko-control-plane/SKILL.md +49 -0
  179. package/skills/nestjs-patterns/SKILL.md +231 -0
  180. package/skills/netmiko-ssh-automation/SKILL.md +174 -0
  181. package/skills/network-bgp-diagnostics/SKILL.md +168 -0
  182. package/skills/network-config-validation/SKILL.md +211 -0
  183. package/skills/network-interface-health/SKILL.md +153 -0
  184. package/skills/nextjs-turbopack/SKILL.md +58 -0
  185. package/skills/nodejs-keccak256/SKILL.md +103 -0
  186. package/skills/nutrient-document-processing/SKILL.md +168 -0
  187. package/skills/nuxt4-patterns/SKILL.md +101 -0
  188. package/skills/opensource-pipeline/SKILL.md +256 -0
  189. package/skills/orch-add-feature/SKILL.md +45 -0
  190. package/skills/orch-build-mvp/SKILL.md +49 -0
  191. package/skills/orch-change-feature/SKILL.md +43 -0
  192. package/skills/orch-fix-defect/SKILL.md +43 -0
  193. package/skills/orch-pipeline/SKILL.md +121 -0
  194. package/skills/orch-refine-code/SKILL.md +44 -0
  195. package/skills/parallel-execution-optimizer/SKILL.md +74 -0
  196. package/skills/perl-patterns/SKILL.md +505 -0
  197. package/skills/perl-security/SKILL.md +504 -0
  198. package/skills/perl-testing/SKILL.md +476 -0
  199. package/skills/plan-canvas/SKILL.md +196 -0
  200. package/skills/plankton-code-quality/SKILL.md +237 -0
  201. package/skills/postgres-patterns/SKILL.md +148 -0
  202. package/skills/prediction-market-oracle-research/SKILL.md +64 -0
  203. package/skills/prediction-market-risk-review/SKILL.md +61 -0
  204. package/skills/prisma-patterns/SKILL.md +401 -0
  205. package/skills/product-capability/SKILL.md +142 -0
  206. package/skills/product-lens/SKILL.md +93 -0
  207. package/skills/production-audit/SKILL.md +207 -0
  208. package/skills/production-scheduling/SKILL.md +238 -0
  209. package/skills/project-flow-ops/SKILL.md +112 -0
  210. package/skills/prompt-optimizer/SKILL.md +398 -0
  211. package/skills/python-patterns/SKILL.md +751 -0
  212. package/skills/python-testing/SKILL.md +817 -0
  213. package/skills/pytorch-patterns/SKILL.md +397 -0
  214. package/skills/quality-nonconformance/SKILL.md +260 -0
  215. package/skills/quarkus-patterns/SKILL.md +723 -0
  216. package/skills/quarkus-security/SKILL.md +468 -0
  217. package/skills/quarkus-tdd/SKILL.md +812 -0
  218. package/skills/quarkus-verification/SKILL.md +481 -0
  219. package/skills/ralphinho-rfc-pipeline/SKILL.md +68 -0
  220. package/skills/react-native-patterns/SKILL.md +326 -0
  221. package/skills/react-patterns/SKILL.md +342 -0
  222. package/skills/react-performance/SKILL.md +575 -0
  223. package/skills/react-testing/SKILL.md +424 -0
  224. package/skills/recsys-pipeline-architect/SKILL.md +115 -0
  225. package/skills/recursive-decision-ledger/SKILL.md +81 -0
  226. package/skills/redis-patterns/SKILL.md +404 -0
  227. package/skills/regex-vs-llm-structured-text/SKILL.md +221 -0
  228. package/skills/remotion-video-creation/SKILL.md +43 -0
  229. package/skills/repo-scan/SKILL.md +170 -0
  230. package/skills/research-ops/SKILL.md +113 -0
  231. package/skills/returns-reverse-logistics/SKILL.md +240 -0
  232. package/skills/rules-distill/SKILL.md +265 -0
  233. package/skills/rust-patterns/SKILL.md +500 -0
  234. package/skills/rust-testing/SKILL.md +501 -0
  235. package/skills/safety-guard/SKILL.md +76 -0
  236. package/skills/santa-method/SKILL.md +307 -0
  237. package/skills/scientific-db-pubmed-database/SKILL.md +176 -0
  238. package/skills/scientific-db-uspto-database/SKILL.md +178 -0
  239. package/skills/scientific-pkg-gget/SKILL.md +167 -0
  240. package/skills/scientific-thinking-literature-review/SKILL.md +193 -0
  241. package/skills/scientific-thinking-scholar-evaluation/SKILL.md +161 -0
  242. package/skills/search-first/SKILL.md +183 -0
  243. package/skills/security-bounty-hunter/SKILL.md +100 -0
  244. package/skills/security-scan/SKILL.md +166 -0
  245. package/skills/seo/SKILL.md +155 -0
  246. package/skills/skill-scout/SKILL.md +141 -0
  247. package/skills/skill-stocktake/SKILL.md +195 -0
  248. package/skills/social-graph-ranker/SKILL.md +155 -0
  249. package/skills/social-publisher/SKILL.md +130 -0
  250. package/skills/springboot-patterns/SKILL.md +315 -0
  251. package/skills/springboot-security/SKILL.md +273 -0
  252. package/skills/springboot-tdd/SKILL.md +159 -0
  253. package/skills/springboot-verification/SKILL.md +232 -0
  254. package/skills/swift-actor-persistence/SKILL.md +144 -0
  255. package/skills/swift-concurrency-6-2/SKILL.md +216 -0
  256. package/skills/swift-protocol-di-testing/SKILL.md +191 -0
  257. package/skills/swiftui-patterns/SKILL.md +259 -0
  258. package/skills/taste/SKILL.md +264 -0
  259. package/skills/tdd-workflow/SKILL.md +583 -0
  260. package/skills/team-agent-orchestration/SKILL.md +111 -0
  261. package/skills/team-builder/SKILL.md +169 -0
  262. package/skills/terminal-opener/SKILL.md +55 -0
  263. package/skills/terminal-ops/SKILL.md +110 -0
  264. package/skills/tinystruct-patterns/SKILL.md +279 -0
  265. package/skills/token-budget-advisor/SKILL.md +134 -0
  266. package/skills/ui-demo/SKILL.md +466 -0
  267. package/skills/ui-to-vue/SKILL.md +135 -0
  268. package/skills/uncloud/SKILL.md +344 -0
  269. package/skills/unified-memory/SKILL.md +170 -0
  270. package/skills/unified-notifications-ops/SKILL.md +188 -0
  271. package/skills/verification-loop/SKILL.md +129 -0
  272. package/skills/video-editing/SKILL.md +311 -0
  273. package/skills/videodb/SKILL.md +375 -0
  274. package/skills/vite-patterns/SKILL.md +450 -0
  275. package/skills/vue-patterns/SKILL.md +471 -0
  276. package/skills/windows-desktop-e2e/SKILL.md +888 -0
  277. package/skills/workspace-surface-audit/SKILL.md +126 -0
  278. package/skills/x-api/SKILL.md +235 -0
@@ -0,0 +1,384 @@
1
+ ---
2
+ name: java-coding-standards
3
+ description: "Java coding standards for Spring Boot and Quarkus services: naming, immutability, Optional usage, streams, exceptions, generics, CDI, reactive patterns, and project layout. Automatically applies framework-specific conventions. Use when writing or reviewing Java in a Spring Boot or Quarkus service."
4
+ metadata:
5
+ origin: ECC
6
+ ---
7
+
8
+ # Java Coding Standards
9
+
10
+ Standards for readable, maintainable Java (17+) code in Spring Boot and Quarkus services.
11
+
12
+ ## When to Use
13
+
14
+ - Writing or reviewing Java code in Spring Boot or Quarkus projects
15
+ - Enforcing naming, immutability, or exception handling conventions
16
+ - Working with records, sealed classes, or pattern matching (Java 17+)
17
+ - Reviewing use of Optional, streams, or generics
18
+ - Structuring packages and project layout
19
+ - **[QUARKUS]**: Working with CDI scopes, Panache entities, or reactive pipelines
20
+
21
+ ## How It Works
22
+
23
+ ### Framework Detection
24
+
25
+ Before applying standards, determine the framework from the build file:
26
+
27
+ - Build file contains `quarkus` → apply **[QUARKUS]** conventions
28
+ - Build file contains `spring-boot` → apply **[SPRING]** conventions
29
+ - Neither detected → apply shared conventions only
30
+
31
+ ## Core Principles
32
+
33
+ - Prefer clarity over cleverness
34
+ - Immutable by default; minimize shared mutable state
35
+ - Fail fast with meaningful exceptions
36
+ - Consistent naming and package structure
37
+ - **[QUARKUS]**: Favor build-time over runtime processing; avoid runtime reflection where possible
38
+
39
+ ## Examples
40
+
41
+ The sections below show concrete Spring Boot, Quarkus, and shared Java examples
42
+ for naming, immutability, dependency injection, reactive code, exceptions,
43
+ project layout, logging, configuration, and tests.
44
+
45
+ ## Naming
46
+
47
+ ```java
48
+ // PASS: Classes/Records: PascalCase
49
+ public class MarketService {}
50
+ public record Money(BigDecimal amount, Currency currency) {}
51
+
52
+ // PASS: Methods/fields: camelCase
53
+ private final MarketRepository marketRepository;
54
+ public Market findBySlug(String slug) {}
55
+
56
+ // PASS: Constants: UPPER_SNAKE_CASE
57
+ private static final int MAX_PAGE_SIZE = 100;
58
+
59
+ // PASS: [QUARKUS] JAX-RS resources named as *Resource, not *Controller
60
+ public class MarketResource {}
61
+
62
+ // PASS: [SPRING] REST controllers named as *Controller
63
+ public class MarketController {}
64
+ ```
65
+
66
+ ## Immutability
67
+
68
+ ```java
69
+ // PASS: Favor records and final fields
70
+ public record MarketDto(Long id, String name, MarketStatus status) {}
71
+
72
+ public class Market {
73
+ private final Long id;
74
+ private final String name;
75
+ // getters only, no setters
76
+ }
77
+
78
+ // PASS: [QUARKUS] Panache active-record entities use public fields (Quarkus convention)
79
+ @Entity
80
+ public class Market extends PanacheEntity {
81
+ public String name;
82
+ public MarketStatus status;
83
+ // Panache generates accessors at build time; public fields are idiomatic here
84
+ }
85
+
86
+ // PASS: [QUARKUS] Panache MongoDB entities
87
+ @MongoEntity(collection = "markets")
88
+ public class Market extends PanacheMongoEntity {
89
+ public String name;
90
+ public MarketStatus status;
91
+ }
92
+ ```
93
+
94
+ ## Optional Usage
95
+
96
+ ```java
97
+ // PASS: Return Optional from find* methods
98
+ // [SPRING]
99
+ Optional<Market> market = marketRepository.findBySlug(slug);
100
+
101
+ // [QUARKUS] Panache
102
+ Optional<Market> market = Market.find("slug", slug).firstResultOptional();
103
+
104
+ // PASS: Map/flatMap instead of get()
105
+ return market
106
+ .map(MarketResponse::from)
107
+ .orElseThrow(() -> new EntityNotFoundException("Market not found"));
108
+ ```
109
+
110
+ ## Streams Best Practices
111
+
112
+ ```java
113
+ // PASS: Use streams for transformations, keep pipelines short
114
+ List<String> names = markets.stream()
115
+ .map(Market::name)
116
+ .filter(Objects::nonNull)
117
+ .toList();
118
+
119
+ // FAIL: Avoid complex nested streams; prefer loops for clarity
120
+ ```
121
+
122
+ ## Dependency Injection
123
+
124
+ ```java
125
+ // PASS: [SPRING] Constructor injection (preferred over @Autowired on fields)
126
+ @Service
127
+ public class MarketService {
128
+ private final MarketRepository marketRepository;
129
+
130
+ public MarketService(MarketRepository marketRepository) {
131
+ this.marketRepository = marketRepository;
132
+ }
133
+ }
134
+
135
+ // PASS: [QUARKUS] Constructor injection
136
+ @ApplicationScoped
137
+ public class MarketService {
138
+ private final MarketRepository marketRepository;
139
+
140
+ @Inject
141
+ public MarketService(MarketRepository marketRepository) {
142
+ this.marketRepository = marketRepository;
143
+ }
144
+ }
145
+
146
+ // PASS: [QUARKUS] Package-private field injection (acceptable in Quarkus — avoids proxy issues)
147
+ @ApplicationScoped
148
+ public class MarketService {
149
+ @Inject
150
+ MarketRepository marketRepository;
151
+ }
152
+
153
+ // FAIL: [SPRING] Field injection with @Autowired
154
+ @Autowired
155
+ private MarketRepository marketRepository; // use constructor injection
156
+
157
+ // FAIL: [QUARKUS] @Singleton when interception or lazy init is needed
158
+ @Singleton // non-proxyable — use @ApplicationScoped instead
159
+ public class MarketService {}
160
+ ```
161
+
162
+ ## Reactive Patterns [QUARKUS]
163
+
164
+ ```java
165
+ // PASS: Return Uni/Multi from reactive endpoints
166
+ @GET
167
+ @Path("/{slug}")
168
+ public Uni<Market> findBySlug(@PathParam("slug") String slug) {
169
+ return Market.find("slug", slug)
170
+ .<Market>firstResult()
171
+ .onItem().ifNull().failWith(() -> new MarketNotFoundException(slug));
172
+ }
173
+
174
+ // PASS: Non-blocking pipeline composition
175
+ public Uni<OrderConfirmation> placeOrder(OrderRequest req) {
176
+ return validateOrder(req)
177
+ .chain(valid -> persistOrder(valid))
178
+ .chain(order -> notifyFulfillment(order));
179
+ }
180
+
181
+ // FAIL: Blocking call inside a Uni/Multi pipeline
182
+ public Uni<Market> find(String slug) {
183
+ Market m = Market.find("slug", slug).firstResult(); // BLOCKING — breaks event loop
184
+ return Uni.createFrom().item(m);
185
+ }
186
+
187
+ // FAIL: Subscribing more than once to a shared Uni
188
+ Uni<Market> shared = fetchMarket(slug);
189
+ shared.subscribe().with(m -> log(m));
190
+ shared.subscribe().with(m -> cache(m)); // double subscribe — use Uni.memoize()
191
+ ```
192
+
193
+ ## Exceptions
194
+
195
+ - Use unchecked exceptions for domain errors; wrap technical exceptions with context
196
+ - Create domain-specific exceptions (e.g., `MarketNotFoundException`)
197
+ - Avoid broad `catch (Exception ex)` unless rethrowing/logging centrally
198
+
199
+ ```java
200
+ throw new MarketNotFoundException(slug);
201
+ ```
202
+
203
+ ### Centralised Exception Handling
204
+
205
+ ```java
206
+ // [SPRING]
207
+ @RestControllerAdvice
208
+ public class GlobalExceptionHandler {
209
+ @ExceptionHandler(MarketNotFoundException.class)
210
+ public ResponseEntity<ErrorResponse> handle(MarketNotFoundException ex) {
211
+ return ResponseEntity.status(404).body(ErrorResponse.from(ex));
212
+ }
213
+ }
214
+
215
+ // [QUARKUS] Option A: ExceptionMapper
216
+ @Provider
217
+ public class MarketNotFoundMapper implements ExceptionMapper<MarketNotFoundException> {
218
+ @Override
219
+ public Response toResponse(MarketNotFoundException ex) {
220
+ return Response.status(404).entity(ErrorResponse.from(ex)).build();
221
+ }
222
+ }
223
+
224
+ // [QUARKUS] Option B: @ServerExceptionMapper (RESTEasy Reactive)
225
+ @ServerExceptionMapper
226
+ public RestResponse<ErrorResponse> handle(MarketNotFoundException ex) {
227
+ return RestResponse.status(Status.NOT_FOUND, ErrorResponse.from(ex));
228
+ }
229
+ ```
230
+
231
+ ## Generics and Type Safety
232
+
233
+ - Avoid raw types; declare generic parameters
234
+ - Prefer bounded generics for reusable utilities
235
+
236
+ ```java
237
+ public <T extends Identifiable> Map<Long, T> indexById(Collection<T> items) { ... }
238
+ ```
239
+
240
+ ## Project Structure
241
+
242
+ ### [SPRING] Maven/Gradle
243
+
244
+ ```
245
+ src/main/java/com/example/app/
246
+ config/
247
+ controller/
248
+ service/
249
+ repository/
250
+ domain/
251
+ dto/
252
+ util/
253
+ src/main/resources/
254
+ application.yml
255
+ src/test/java/... (mirrors main)
256
+ ```
257
+
258
+ ### [QUARKUS] Maven/Gradle
259
+
260
+ ```
261
+ src/main/java/com/example/app/
262
+ config/ # @ConfigMapping, @ConfigProperty beans, Producers
263
+ resource/ # JAX-RS resources (not "controller")
264
+ service/
265
+ repository/ # PanacheRepository implementations (if not using active record)
266
+ domain/ # JPA/Panache entities, MongoDB entities
267
+ dto/
268
+ util/
269
+ mapper/ # MapStruct mappers (if used)
270
+ src/main/resources/
271
+ application.properties # Quarkus convention (YAML supported with quarkus-config-yaml)
272
+ import.sql # Hibernate auto-import for dev/test
273
+ src/test/java/... (mirrors main)
274
+ ```
275
+
276
+ ## Formatting and Style
277
+
278
+ - Use 2 or 4 spaces consistently (project standard)
279
+ - One public top-level type per file
280
+ - Keep methods short and focused; extract helpers
281
+ - Order members: constants, fields, constructors, public methods, protected, private
282
+
283
+ ## Code Smells to Avoid
284
+
285
+ - Long parameter lists → use DTO/builders
286
+ - Deep nesting → early returns
287
+ - Magic numbers → named constants
288
+ - Static mutable state → prefer dependency injection
289
+ - Silent catch blocks → log and act or rethrow
290
+ - **[QUARKUS]**: `@Singleton` where `@ApplicationScoped` is intended — breaks proxying and interception
291
+ - **[QUARKUS]**: Mixing `quarkus-resteasy-reactive` and `quarkus-resteasy` (classic) — pick one stack
292
+ - **[QUARKUS]**: Panache active-record + repository pattern in the same bounded context — pick one
293
+
294
+ ## Logging
295
+
296
+ ```java
297
+ // [SPRING] SLF4J
298
+ private static final Logger log = LoggerFactory.getLogger(MarketService.class);
299
+ log.info("fetch_market slug={}", slug);
300
+ log.error("failed_fetch_market slug={}", slug, ex);
301
+
302
+ // [QUARKUS] JBoss Logging (default, zero-cost at build time)
303
+ private static final Logger log = Logger.getLogger(MarketService.class);
304
+ log.infof("fetch_market slug=%s", slug);
305
+ log.errorf(ex, "failed_fetch_market slug=%s", slug);
306
+
307
+ // [QUARKUS] Alternative: simplified logging with @Inject
308
+ @Inject
309
+ Logger log; // CDI-injected, scoped to declaring class
310
+ ```
311
+
312
+ ## Null Handling
313
+
314
+ - Accept `@Nullable` only when unavoidable; otherwise use `@NonNull`
315
+ - Use Bean Validation (`@NotNull`, `@NotBlank`) on inputs
316
+ - **[QUARKUS]**: Apply `@Valid` on `@BeanParam`, `@RestForm`, and request body parameters
317
+
318
+ ## Configuration
319
+
320
+ ```java
321
+ // [SPRING] @ConfigurationProperties
322
+ @ConfigurationProperties(prefix = "market")
323
+ public record MarketProperties(int maxPageSize, Duration cacheTtl) {}
324
+
325
+ // [QUARKUS] @ConfigMapping (type-safe, build-time validated)
326
+ @ConfigMapping(prefix = "market")
327
+ public interface MarketConfig {
328
+ int maxPageSize();
329
+ Duration cacheTtl();
330
+ }
331
+
332
+ // [QUARKUS] Simple values with @ConfigProperty
333
+ @ConfigProperty(name = "market.max-page-size", defaultValue = "100")
334
+ int maxPageSize;
335
+ ```
336
+
337
+ ## Testing Expectations
338
+
339
+ ### Shared
340
+ - JUnit 5 + AssertJ for fluent assertions
341
+ - Mockito for mocking; avoid partial mocks where possible
342
+ - Favor deterministic tests; no hidden sleeps
343
+
344
+ ### [SPRING]
345
+ - `@WebMvcTest` for controller slices, `@DataJpaTest` for repository slices
346
+ - `@SpringBootTest` reserved for full integration tests
347
+ - `@MockBean` for replacing beans in Spring context
348
+
349
+ ### [QUARKUS]
350
+ - Plain JUnit 5 + Mockito for unit tests (no `@QuarkusTest`)
351
+ - `@QuarkusTest` reserved for CDI integration tests
352
+ - `@InjectMock` for replacing CDI beans in integration tests
353
+ - Dev Services for database/Kafka/Redis — avoid manual Testcontainers setup when Dev Services suffice
354
+ - `@QuarkusTestResource` for custom external service lifecycle
355
+
356
+ ```java
357
+ // [SPRING] Controller test
358
+ @WebMvcTest(MarketController.class)
359
+ class MarketControllerTest {
360
+ @Autowired MockMvc mockMvc;
361
+ @MockBean MarketService marketService;
362
+ }
363
+
364
+ // [QUARKUS] Integration test
365
+ @QuarkusTest
366
+ class MarketResourceTest {
367
+ @InjectMock
368
+ MarketService marketService;
369
+
370
+ @Test
371
+ void should_return_404_when_market_not_found() {
372
+ given().when().get("/markets/unknown").then().statusCode(404);
373
+ }
374
+ }
375
+
376
+ // [QUARKUS] Unit test (no CDI, no @QuarkusTest)
377
+ @ExtendWith(MockitoExtension.class)
378
+ class MarketServiceTest {
379
+ @Mock MarketRepository marketRepository;
380
+ @InjectMocks MarketService marketService;
381
+ }
382
+ ```
383
+
384
+ **Remember**: Keep code intentional, typed, and observable. Optimize for maintainability over micro-optimizations unless proven necessary.
@@ -0,0 +1,303 @@
1
+ ---
2
+ name: jira-integration
3
+ description: Use this skill when retrieving Jira tickets, analyzing requirements, updating ticket status, adding comments, or transitioning issues. Provides Jira API patterns via MCP or direct REST calls.
4
+ metadata:
5
+ origin: ECC
6
+ ---
7
+
8
+ # Jira Integration Skill
9
+
10
+ Retrieve, analyze, and update Jira tickets directly from your AI coding workflow. Supports both **MCP-based** (recommended) and **direct REST API** approaches.
11
+
12
+ ## When to Activate
13
+
14
+ - Fetching a Jira ticket to understand requirements
15
+ - Extracting testable acceptance criteria from a ticket
16
+ - Adding progress comments to a Jira issue
17
+ - Transitioning a ticket status (To Do → In Progress → Done)
18
+ - Linking merge requests or branches to a Jira issue
19
+ - Searching for issues by JQL query
20
+
21
+ ## Prerequisites
22
+
23
+ ### Option A: MCP Server (Recommended)
24
+
25
+ Install the `mcp-atlassian` MCP server. This exposes Jira tools directly to your AI agent.
26
+
27
+ **Requirements:**
28
+ - Python 3.10+
29
+ - `uvx` (from `uv`), installed via your package manager or the official `uv` installation documentation
30
+
31
+ **Add to your MCP config** (e.g., `~/.claude.json` → `mcpServers`):
32
+
33
+ ```json
34
+ {
35
+ "jira": {
36
+ "command": "uvx",
37
+ "args": ["mcp-atlassian==0.21.0"],
38
+ "env": {
39
+ "JIRA_URL": "https://YOUR_ORG.atlassian.net",
40
+ "JIRA_EMAIL": "your.email@example.com",
41
+ "JIRA_API_TOKEN": "your-api-token"
42
+ },
43
+ "description": "Jira issue tracking — search, create, update, comment, transition"
44
+ }
45
+ }
46
+ ```
47
+
48
+ > **Security:** Never hardcode secrets. Prefer setting `JIRA_URL`, `JIRA_EMAIL`, and `JIRA_API_TOKEN` in your system environment (or a secrets manager). Only use the MCP `env` block for local, uncommitted config files.
49
+
50
+ **To get a Jira API token:**
51
+ 1. Go to <https://id.atlassian.com/manage-profile/security/api-tokens>
52
+ 2. Click **Create API token**
53
+ 3. Copy the token — store it in your environment, never in source code
54
+
55
+ ### Option B: Direct REST API
56
+
57
+ If MCP is not available, use the Jira REST API v3 directly via `curl` or a helper script.
58
+
59
+ **Required environment variables:**
60
+
61
+ | Variable | Description |
62
+ |----------|-------------|
63
+ | `JIRA_URL` | Your Jira instance URL (e.g., `https://yourorg.atlassian.net`) |
64
+ | `JIRA_EMAIL` | Your Atlassian account email |
65
+ | `JIRA_API_TOKEN` | API token from id.atlassian.com |
66
+
67
+ Store these in your shell environment, secrets manager, or an untracked local env file. Do not commit them to the repo.
68
+
69
+ For direct `curl` examples, keep credentials out of command-line arguments by passing the Jira user config on stdin:
70
+
71
+ ```bash
72
+ jira_curl() {
73
+ printf 'user = "%s:%s"\n' "$JIRA_EMAIL" "$JIRA_API_TOKEN" |
74
+ curl -s -K - "$@"
75
+ }
76
+ ```
77
+
78
+ ## MCP Tools Reference
79
+
80
+ When the `mcp-atlassian` MCP server is configured, these tools are available:
81
+
82
+ | Tool | Purpose | Example |
83
+ |------|---------|---------|
84
+ | `jira_search` | JQL queries | `project = PROJ AND status = "In Progress"` |
85
+ | `jira_get_issue` | Fetch full issue details by key | `PROJ-1234` |
86
+ | `jira_create_issue` | Create issues (Task, Bug, Story, Epic) | New bug report |
87
+ | `jira_update_issue` | Update fields (summary, description, assignee) | Change assignee |
88
+ | `jira_transition_issue` | Change status | Move to "In Review" |
89
+ | `jira_add_comment` | Add comments | Progress update |
90
+ | `jira_get_sprint_issues` | List issues in a sprint | Active sprint review |
91
+ | `jira_create_issue_link` | Link issues (Blocks, Relates to) | Dependency tracking |
92
+ | `jira_get_issue_development_info` | See linked PRs, branches, commits | Dev context |
93
+
94
+ > **Tip:** Always call `jira_get_transitions` before transitioning — transition IDs vary per project workflow.
95
+
96
+ ## Direct REST API Reference
97
+
98
+ ### Fetch a Ticket
99
+
100
+ ```bash
101
+ jira_curl \
102
+ -H "Content-Type: application/json" \
103
+ "$JIRA_URL/rest/api/3/issue/PROJ-1234" | jq '{
104
+ key: .key,
105
+ summary: .fields.summary,
106
+ status: .fields.status.name,
107
+ priority: .fields.priority.name,
108
+ type: .fields.issuetype.name,
109
+ assignee: .fields.assignee.displayName,
110
+ labels: .fields.labels,
111
+ description: .fields.description
112
+ }'
113
+ ```
114
+
115
+ ### Fetch Comments
116
+
117
+ ```bash
118
+ jira_curl \
119
+ -H "Content-Type: application/json" \
120
+ "$JIRA_URL/rest/api/3/issue/PROJ-1234?fields=comment" | jq '.fields.comment.comments[] | {
121
+ author: .author.displayName,
122
+ created: .created[:10],
123
+ body: .body
124
+ }'
125
+ ```
126
+
127
+ ### Add a Comment
128
+
129
+ ```bash
130
+ jira_curl -X POST \
131
+ -H "Content-Type: application/json" \
132
+ -d '{
133
+ "body": {
134
+ "version": 1,
135
+ "type": "doc",
136
+ "content": [{
137
+ "type": "paragraph",
138
+ "content": [{"type": "text", "text": "Your comment here"}]
139
+ }]
140
+ }
141
+ }' \
142
+ "$JIRA_URL/rest/api/3/issue/PROJ-1234/comment"
143
+ ```
144
+
145
+ ### Transition a Ticket
146
+
147
+ ```bash
148
+ # 1. Get available transitions
149
+ jira_curl \
150
+ "$JIRA_URL/rest/api/3/issue/PROJ-1234/transitions" | jq '.transitions[] | {id, name: .name}'
151
+
152
+ # 2. Execute transition (replace TRANSITION_ID)
153
+ jira_curl -X POST \
154
+ -H "Content-Type: application/json" \
155
+ -d '{"transition": {"id": "TRANSITION_ID"}}' \
156
+ "$JIRA_URL/rest/api/3/issue/PROJ-1234/transitions"
157
+ ```
158
+
159
+ ### Search with JQL
160
+
161
+ ```bash
162
+ jira_curl -G \
163
+ --data-urlencode "jql=project = PROJ AND status = 'In Progress'" \
164
+ "$JIRA_URL/rest/api/3/search"
165
+ ```
166
+
167
+ ## Analyzing a Ticket
168
+
169
+ When retrieving a ticket for development or test automation, extract:
170
+
171
+ ### 1. Testable Requirements
172
+ - **Functional requirements** — What the feature does
173
+ - **Acceptance criteria** — Conditions that must be met
174
+ - **Testable behaviors** — Specific actions and expected outcomes
175
+ - **User roles** — Who uses this feature and their permissions
176
+ - **Data requirements** — What data is needed
177
+ - **Integration points** — APIs, services, or systems involved
178
+
179
+ ### 2. Test Types Needed
180
+ - **Unit tests** — Individual functions and utilities
181
+ - **Integration tests** — API endpoints and service interactions
182
+ - **E2E tests** — User-facing UI flows
183
+ - **API tests** — Endpoint contracts and error handling
184
+
185
+ ### 3. Edge Cases & Error Scenarios
186
+ - Invalid inputs (empty, too long, special characters)
187
+ - Unauthorized access
188
+ - Network failures or timeouts
189
+ - Concurrent users or race conditions
190
+ - Boundary conditions
191
+ - Missing or null data
192
+ - State transitions (back navigation, refresh, etc.)
193
+
194
+ ### 4. Structured Analysis Output
195
+
196
+ ```
197
+ Ticket: PROJ-1234
198
+ Summary: [ticket title]
199
+ Status: [current status]
200
+ Priority: [High/Medium/Low]
201
+ Test Types: Unit, Integration, E2E
202
+
203
+ Requirements:
204
+ 1. [requirement 1]
205
+ 2. [requirement 2]
206
+
207
+ Acceptance Criteria:
208
+ - [ ] [criterion 1]
209
+ - [ ] [criterion 2]
210
+
211
+ Test Scenarios:
212
+ - Happy Path: [description]
213
+ - Error Case: [description]
214
+ - Edge Case: [description]
215
+
216
+ Test Data Needed:
217
+ - [data item 1]
218
+ - [data item 2]
219
+
220
+ Dependencies:
221
+ - [dependency 1]
222
+ - [dependency 2]
223
+ ```
224
+
225
+ ## Updating Tickets
226
+
227
+ ### When to Update
228
+
229
+ | Workflow Step | Jira Update |
230
+ |---|---|
231
+ | Start work | Transition to "In Progress" |
232
+ | Tests written | Comment with test coverage summary |
233
+ | Branch created | Comment with branch name |
234
+ | PR/MR created | Comment with link, link issue |
235
+ | Tests passing | Comment with results summary |
236
+ | PR/MR merged | Transition to "Done" or "In Review" |
237
+
238
+ ### Comment Templates
239
+
240
+ **Starting Work:**
241
+ ```
242
+ Starting implementation for this ticket.
243
+ Branch: feat/PROJ-1234-feature-name
244
+ ```
245
+
246
+ **Tests Implemented:**
247
+ ```
248
+ Automated tests implemented:
249
+
250
+ Unit Tests:
251
+ - [test file 1] — [what it covers]
252
+ - [test file 2] — [what it covers]
253
+
254
+ Integration Tests:
255
+ - [test file] — [endpoints/flows covered]
256
+
257
+ All tests passing locally. Coverage: XX%
258
+ ```
259
+
260
+ **PR Created:**
261
+ ```
262
+ Pull request created:
263
+ [PR Title](https://github.com/org/repo/pull/XXX)
264
+
265
+ Ready for review.
266
+ ```
267
+
268
+ **Work Complete:**
269
+ ```
270
+ Implementation complete.
271
+
272
+ PR merged: [link]
273
+ Test results: All passing (X/Y)
274
+ Coverage: XX%
275
+ ```
276
+
277
+ ## Security Guidelines
278
+
279
+ - **Never hardcode** Jira API tokens in source code or skill files
280
+ - **Always use** environment variables or a secrets manager
281
+ - **Add `.env`** to `.gitignore` in every project
282
+ - **Rotate tokens** immediately if exposed in git history
283
+ - **Use least-privilege** API tokens scoped to required projects
284
+ - **Validate** that credentials are set before making API calls — fail fast with a clear message
285
+
286
+ ## Troubleshooting
287
+
288
+ | Error | Cause | Fix |
289
+ |---|---|---|
290
+ | `401 Unauthorized` | Invalid or expired API token | Regenerate at id.atlassian.com |
291
+ | `403 Forbidden` | Token lacks project permissions | Check token scopes and project access |
292
+ | `404 Not Found` | Wrong ticket key or base URL | Verify `JIRA_URL` and ticket key |
293
+ | `spawn uvx ENOENT` | IDE cannot find `uvx` on PATH | Use full path (e.g., `~/.local/bin/uvx`) or set PATH in `~/.zprofile` |
294
+ | Connection timeout | Network/VPN issue | Check VPN connection and firewall rules |
295
+
296
+ ## Best Practices
297
+
298
+ - Update Jira as you go, not all at once at the end
299
+ - Keep comments concise but informative
300
+ - Link rather than copy — point to PRs, test reports, and dashboards
301
+ - Use @mentions if you need input from others
302
+ - Check linked issues to understand full feature scope before starting
303
+ - If acceptance criteria are vague, ask for clarification before writing code