@patricio0312rev/skillset 0.1.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 (115) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/LICENSE +21 -0
  3. package/README.md +176 -0
  4. package/bin/cli.js +37 -0
  5. package/package.json +55 -0
  6. package/src/commands/init.js +301 -0
  7. package/src/index.js +168 -0
  8. package/src/lib/config.js +200 -0
  9. package/src/lib/generator.js +166 -0
  10. package/src/utils/display.js +95 -0
  11. package/src/utils/readme.js +196 -0
  12. package/src/utils/tool-specific.js +233 -0
  13. package/templates/ai-engineering/agent-orchestration-planner/ SKILL.md +266 -0
  14. package/templates/ai-engineering/cost-latency-optimizer/ SKILL.md +270 -0
  15. package/templates/ai-engineering/doc-to-vector-dataset-generator/ SKILL.md +239 -0
  16. package/templates/ai-engineering/evaluation-harness/ SKILL.md +219 -0
  17. package/templates/ai-engineering/guardrails-safety-filter-builder/ SKILL.md +226 -0
  18. package/templates/ai-engineering/llm-debugger/ SKILL.md +283 -0
  19. package/templates/ai-engineering/prompt-regression-tester/ SKILL.md +216 -0
  20. package/templates/ai-engineering/prompt-template-builder/ SKILL.md +393 -0
  21. package/templates/ai-engineering/rag-pipeline-builder/ SKILL.md +244 -0
  22. package/templates/ai-engineering/tool-function-schema-designer/ SKILL.md +219 -0
  23. package/templates/architecture/adr-writer/ SKILL.md +250 -0
  24. package/templates/architecture/api-versioning-deprecation-planner/ SKILL.md +331 -0
  25. package/templates/architecture/domain-model-boundaries-mapper/ SKILL.md +300 -0
  26. package/templates/architecture/migration-planner/ SKILL.md +376 -0
  27. package/templates/architecture/performance-budget-setter/ SKILL.md +318 -0
  28. package/templates/architecture/reliability-strategy-builder/ SKILL.md +286 -0
  29. package/templates/architecture/rfc-generator/ SKILL.md +362 -0
  30. package/templates/architecture/scalability-playbook/ SKILL.md +279 -0
  31. package/templates/architecture/system-design-generator/ SKILL.md +339 -0
  32. package/templates/architecture/tech-debt-prioritizer/ SKILL.md +329 -0
  33. package/templates/backend/api-contract-normalizer/ SKILL.md +487 -0
  34. package/templates/backend/api-endpoint-generator/ SKILL.md +415 -0
  35. package/templates/backend/auth-module-builder/ SKILL.md +99 -0
  36. package/templates/backend/background-jobs-designer/ SKILL.md +166 -0
  37. package/templates/backend/caching-strategist/ SKILL.md +190 -0
  38. package/templates/backend/error-handling-standardizer/ SKILL.md +174 -0
  39. package/templates/backend/rate-limiting-abuse-protection/ SKILL.md +147 -0
  40. package/templates/backend/rbac-permissions-builder/ SKILL.md +158 -0
  41. package/templates/backend/service-layer-extractor/ SKILL.md +269 -0
  42. package/templates/backend/webhook-receiver-hardener/ SKILL.md +211 -0
  43. package/templates/ci-cd/artifact-sbom-publisher/ SKILL.md +236 -0
  44. package/templates/ci-cd/caching-strategy-optimizer/ SKILL.md +195 -0
  45. package/templates/ci-cd/deployment-checklist-generator/ SKILL.md +381 -0
  46. package/templates/ci-cd/github-actions-pipeline-creator/ SKILL.md +348 -0
  47. package/templates/ci-cd/monorepo-ci-optimizer/ SKILL.md +298 -0
  48. package/templates/ci-cd/preview-environments-builder/ SKILL.md +187 -0
  49. package/templates/ci-cd/quality-gates-enforcer/ SKILL.md +342 -0
  50. package/templates/ci-cd/release-automation-builder/ SKILL.md +281 -0
  51. package/templates/ci-cd/rollback-workflow-builder/ SKILL.md +372 -0
  52. package/templates/ci-cd/secrets-env-manager/ SKILL.md +242 -0
  53. package/templates/db-management/backup-restore-runbook-generator/ SKILL.md +505 -0
  54. package/templates/db-management/data-integrity-auditor/ SKILL.md +505 -0
  55. package/templates/db-management/data-retention-archiving-planner/ SKILL.md +430 -0
  56. package/templates/db-management/data-seeding-fixtures-builder/ SKILL.md +375 -0
  57. package/templates/db-management/db-performance-watchlist/ SKILL.md +425 -0
  58. package/templates/db-management/etl-sync-job-builder/ SKILL.md +457 -0
  59. package/templates/db-management/multi-tenant-safety-checker/ SKILL.md +398 -0
  60. package/templates/db-management/prisma-migration-assistant/ SKILL.md +379 -0
  61. package/templates/db-management/schema-consistency-checker/ SKILL.md +440 -0
  62. package/templates/db-management/sql-query-optimizer/ SKILL.md +324 -0
  63. package/templates/foundation/changelog-writer/ SKILL.md +431 -0
  64. package/templates/foundation/code-formatter-installer/ SKILL.md +320 -0
  65. package/templates/foundation/codebase-summarizer/ SKILL.md +360 -0
  66. package/templates/foundation/dependency-doctor/ SKILL.md +163 -0
  67. package/templates/foundation/dev-environment-bootstrapper/ SKILL.md +259 -0
  68. package/templates/foundation/dev-onboarding-builder/ SKILL.md +556 -0
  69. package/templates/foundation/docs-starter-kit/ SKILL.md +574 -0
  70. package/templates/foundation/explaining-code/SKILL.md +13 -0
  71. package/templates/foundation/git-hygiene-enforcer/ SKILL.md +455 -0
  72. package/templates/foundation/project-scaffolder/ SKILL.md +65 -0
  73. package/templates/foundation/project-scaffolder/references/templates.md +126 -0
  74. package/templates/foundation/repo-structure-linter/ SKILL.md +0 -0
  75. package/templates/foundation/repo-structure-linter/references/conventions.md +98 -0
  76. package/templates/frontend/animation-micro-interaction-pack/ SKILL.md +41 -0
  77. package/templates/frontend/component-scaffold-generator/ SKILL.md +562 -0
  78. package/templates/frontend/design-to-component-translator/ SKILL.md +547 -0
  79. package/templates/frontend/form-wizard-builder/ SKILL.md +553 -0
  80. package/templates/frontend/frontend-refactor-planner/ SKILL.md +37 -0
  81. package/templates/frontend/i18n-frontend-implementer/ SKILL.md +44 -0
  82. package/templates/frontend/modal-drawer-system/ SKILL.md +377 -0
  83. package/templates/frontend/page-layout-builder/ SKILL.md +630 -0
  84. package/templates/frontend/state-ux-flow-builder/ SKILL.md +23 -0
  85. package/templates/frontend/table-builder/ SKILL.md +350 -0
  86. package/templates/performance/alerting-dashboard-builder/ SKILL.md +162 -0
  87. package/templates/performance/backend-latency-profiler-helper/ SKILL.md +108 -0
  88. package/templates/performance/caching-cdn-strategy-planner/ SKILL.md +150 -0
  89. package/templates/performance/capacity-planning-helper/ SKILL.md +242 -0
  90. package/templates/performance/core-web-vitals-tuner/ SKILL.md +126 -0
  91. package/templates/performance/incident-runbook-generator/ SKILL.md +162 -0
  92. package/templates/performance/load-test-scenario-builder/ SKILL.md +256 -0
  93. package/templates/performance/observability-setup/ SKILL.md +232 -0
  94. package/templates/performance/postmortem-writer/ SKILL.md +203 -0
  95. package/templates/performance/structured-logging-standardizer/ SKILL.md +122 -0
  96. package/templates/security/auth-security-reviewer/ SKILL.md +428 -0
  97. package/templates/security/dependency-vulnerability-triage/ SKILL.md +495 -0
  98. package/templates/security/input-validation-sanitization-auditor/ SKILL.md +76 -0
  99. package/templates/security/pii-redaction-logging-policy-builder/ SKILL.md +65 -0
  100. package/templates/security/rbac-policy-tester/ SKILL.md +80 -0
  101. package/templates/security/secrets-scanner/ SKILL.md +462 -0
  102. package/templates/security/secure-headers-csp-builder/ SKILL.md +404 -0
  103. package/templates/security/security-incident-playbook-generator/ SKILL.md +76 -0
  104. package/templates/security/security-pr-checklist-skill/ SKILL.md +62 -0
  105. package/templates/security/threat-model-generator/ SKILL.md +394 -0
  106. package/templates/testing/contract-testing-builder/ SKILL.md +492 -0
  107. package/templates/testing/coverage-strategist/ SKILL.md +436 -0
  108. package/templates/testing/e2e-test-builder/ SKILL.md +382 -0
  109. package/templates/testing/flaky-test-detective/ SKILL.md +416 -0
  110. package/templates/testing/integration-test-builder/ SKILL.md +525 -0
  111. package/templates/testing/mocking-assistant/ SKILL.md +383 -0
  112. package/templates/testing/snapshot-test-refactorer/ SKILL.md +375 -0
  113. package/templates/testing/test-data-factory-builder/ SKILL.md +449 -0
  114. package/templates/testing/test-reporting-triage-skill/ SKILL.md +469 -0
  115. package/templates/testing/unit-test-generator/ SKILL.md +548 -0
@@ -0,0 +1,436 @@
1
+ ---
2
+ name: coverage-strategist
3
+ description: Defines ROI-based coverage targets with critical path identification, layer-specific targets, and explicit "don't test this" guidelines. Use for "test coverage", "coverage strategy", "test priorities", or "coverage targets".
4
+ ---
5
+
6
+ # Coverage Strategist
7
+
8
+ Define pragmatic, ROI-focused test coverage strategies.
9
+
10
+ ## Coverage Philosophy
11
+
12
+ **Goal**: Maximum confidence with minimum tests
13
+
14
+ **Principle**: 100% coverage is not the goal. Test what matters.
15
+
16
+ ## Critical Path Identification
17
+
18
+ ```typescript
19
+ // Critical paths that MUST be tested
20
+ const criticalPaths = {
21
+ authentication: {
22
+ priority: "P0",
23
+ coverage: "100%",
24
+ paths: [
25
+ "User login flow",
26
+ "User registration",
27
+ "Password reset",
28
+ "Token refresh",
29
+ "Session management",
30
+ ],
31
+ reasoning: "Security critical, impacts all users",
32
+ },
33
+
34
+ checkout: {
35
+ priority: "P0",
36
+ coverage: "100%",
37
+ paths: [
38
+ "Add to cart",
39
+ "Update cart",
40
+ "Apply coupon",
41
+ "Process payment",
42
+ "Order confirmation",
43
+ ],
44
+ reasoning: "Revenue critical, business essential",
45
+ },
46
+
47
+ dataIntegrity: {
48
+ priority: "P0",
49
+ coverage: "100%",
50
+ paths: [
51
+ "User data CRUD",
52
+ "Order creation",
53
+ "Inventory updates",
54
+ "Database transactions",
55
+ ],
56
+ reasoning: "Data corruption would be catastrophic",
57
+ },
58
+ };
59
+
60
+ // Important but not critical
61
+ const importantPaths = {
62
+ userProfile: {
63
+ priority: "P1",
64
+ coverage: "80%",
65
+ paths: ["Profile updates", "Avatar upload", "Preferences"],
66
+ reasoning: "Important UX, but not business critical",
67
+ },
68
+
69
+ search: {
70
+ priority: "P1",
71
+ coverage: "70%",
72
+ paths: ["Product search", "Filters", "Sorting"],
73
+ reasoning: "Enhances experience, not essential",
74
+ },
75
+ };
76
+ ```
77
+
78
+ ## Layer-Specific Targets
79
+
80
+ ```markdown
81
+ # Coverage Targets by Layer
82
+
83
+ ## Business Logic / Core Functions: 90-100%
84
+
85
+ **Why**: High ROI - complex logic, many edge cases
86
+ **What to test**:
87
+
88
+ - Calculations
89
+ - Validations
90
+ - State machines
91
+ - Algorithms
92
+ - Data transformations
93
+
94
+ ## API Endpoints: 80-90%
95
+
96
+ **Why**: Critical integration points
97
+ **What to test**:
98
+
99
+ - Happy paths
100
+ - Error cases
101
+ - Validation
102
+ - Authentication
103
+ - Authorization
104
+
105
+ ## Database Layer: 70-80%
106
+
107
+ **Why**: Data integrity matters
108
+ **What to test**:
109
+
110
+ - CRUD operations
111
+ - Transactions
112
+ - Constraints
113
+ - Migrations
114
+
115
+ ## UI Components: 50-70%
116
+
117
+ **Why**: Lower ROI - visual changes, less critical
118
+ **What to test**:
119
+
120
+ - User interactions
121
+ - State changes
122
+ - Error states
123
+ - Critical flows only
124
+
125
+ ## Utils/Helpers: 80-90%
126
+
127
+ **Why**: Reused everywhere, high impact
128
+ **What to test**:
129
+
130
+ - All public functions
131
+ - Edge cases
132
+ - Error handling
133
+ ```
134
+
135
+ ## "Don't Test This" List
136
+
137
+ ```typescript
138
+ // Explicit list of what NOT to test
139
+
140
+ const dontTestThese = {
141
+ externalLibraries: {
142
+ examples: ["React internals", "Next.js router", "Lodash functions"],
143
+ reasoning: "Already tested by library authors",
144
+ },
145
+
146
+ trivialCode: {
147
+ examples: [
148
+ "Simple getters/setters",
149
+ "Constants",
150
+ "Type definitions",
151
+ "Pass-through functions",
152
+ ],
153
+ reasoning: "No logic to test, waste of time",
154
+ },
155
+
156
+ presentationalComponents: {
157
+ examples: ["Simple buttons", "Icons", "Layout wrappers"],
158
+ reasoning: "Visual regression testing more appropriate",
159
+ },
160
+
161
+ configurationFiles: {
162
+ examples: ["webpack.config.js", "next.config.js"],
163
+ reasoning: "Configuration, not logic",
164
+ },
165
+
166
+ mockData: {
167
+ examples: ["Fixtures", "Test data", "Storybook stories"],
168
+ reasoning: "Not production code",
169
+ },
170
+ };
171
+
172
+ // Example: Don't test trivial code
173
+ // ❌ Don't test this
174
+ class User {
175
+ constructor(private name: string) {}
176
+ getName() {
177
+ return this.name;
178
+ } // Trivial getter
179
+ }
180
+
181
+ // ✅ But DO test this
182
+ class User {
183
+ constructor(private name: string) {}
184
+
185
+ getDisplayName() {
186
+ // Business logic
187
+ return this.name
188
+ .split(" ")
189
+ .map((n) => n.charAt(0).toUpperCase() + n.slice(1))
190
+ .join(" ");
191
+ }
192
+ }
193
+ ```
194
+
195
+ ## Test Priority Matrix
196
+
197
+ ```typescript
198
+ interface TestPriority {
199
+ feature: string;
200
+ businessImpact: "high" | "medium" | "low";
201
+ complexity: "high" | "medium" | "low";
202
+ changeFrequency: "high" | "medium" | "low";
203
+ priority: "P0" | "P1" | "P2" | "P3";
204
+ targetCoverage: string;
205
+ }
206
+
207
+ const testPriorities: TestPriority[] = [
208
+ {
209
+ feature: "Payment processing",
210
+ businessImpact: "high",
211
+ complexity: "high",
212
+ changeFrequency: "low",
213
+ priority: "P0",
214
+ targetCoverage: "100%",
215
+ },
216
+ {
217
+ feature: "User authentication",
218
+ businessImpact: "high",
219
+ complexity: "medium",
220
+ changeFrequency: "low",
221
+ priority: "P0",
222
+ targetCoverage: "100%",
223
+ },
224
+ {
225
+ feature: "Product search",
226
+ businessImpact: "medium",
227
+ complexity: "medium",
228
+ changeFrequency: "medium",
229
+ priority: "P1",
230
+ targetCoverage: "80%",
231
+ },
232
+ {
233
+ feature: "UI themes",
234
+ businessImpact: "low",
235
+ complexity: "low",
236
+ changeFrequency: "high",
237
+ priority: "P3",
238
+ targetCoverage: "30%",
239
+ },
240
+ ];
241
+
242
+ // Priority calculation
243
+ function calculatePriority(
244
+ businessImpact: number, // 1-10
245
+ complexity: number, // 1-10
246
+ changeFrequency: number // 1-10
247
+ ): number {
248
+ return businessImpact * 0.5 + complexity * 0.3 + changeFrequency * 0.2;
249
+ }
250
+ ```
251
+
252
+ ## Coverage Configuration
253
+
254
+ ```javascript
255
+ // jest.config.js
256
+ module.exports = {
257
+ collectCoverageFrom: [
258
+ "src/**/*.{ts,tsx}",
259
+ "!src/**/*.d.ts",
260
+ "!src/**/*.stories.tsx", // Don't count stories
261
+ "!src/mocks/**", // Don't count mocks
262
+ "!src/**/__tests__/**", // Don't count tests
263
+ ],
264
+
265
+ coverageThresholds: {
266
+ global: {
267
+ statements: 70,
268
+ branches: 65,
269
+ functions: 70,
270
+ lines: 70,
271
+ },
272
+ // Critical paths: 90%+
273
+ "./src/services/payment/**/*.ts": {
274
+ statements: 90,
275
+ branches: 85,
276
+ functions: 90,
277
+ lines: 90,
278
+ },
279
+ "./src/services/auth/**/*.ts": {
280
+ statements: 90,
281
+ branches: 85,
282
+ functions: 90,
283
+ lines: 90,
284
+ },
285
+ // Utils: 80%+
286
+ "./src/utils/**/*.ts": {
287
+ statements: 80,
288
+ branches: 75,
289
+ functions: 80,
290
+ lines: 80,
291
+ },
292
+ // UI components: 50%+ (lower bar)
293
+ "./src/components/**/*.tsx": {
294
+ statements: 50,
295
+ branches: 45,
296
+ functions: 50,
297
+ lines: 50,
298
+ },
299
+ },
300
+ };
301
+ ```
302
+
303
+ ## Test Investment ROI
304
+
305
+ ```typescript
306
+ // Calculate ROI of testing
307
+ interface TestROI {
308
+ feature: string;
309
+ testingCost: number; // hours
310
+ bugPreventionValue: number; // estimated $ saved
311
+ roi: number; // ratio
312
+ }
313
+
314
+ const testROI: TestROI[] = [
315
+ {
316
+ feature: "Payment processing",
317
+ testingCost: 40, // hours
318
+ bugPreventionValue: 50000, // Could lose $50k revenue
319
+ roi: 1250, // $1,250 per hour invested
320
+ },
321
+ {
322
+ feature: "Authentication",
323
+ testingCost: 20,
324
+ bugPreventionValue: 10000, // Security breach cost
325
+ roi: 500,
326
+ },
327
+ {
328
+ feature: "Theme switcher",
329
+ testingCost: 5,
330
+ bugPreventionValue: 100, // Minor UX issue
331
+ roi: 20,
332
+ },
333
+ ];
334
+
335
+ // Focus on high ROI tests
336
+ const sortedByROI = testROI.sort((a, b) => b.roi - a.roi);
337
+ ```
338
+
339
+ ## Pragmatic Testing Strategy
340
+
341
+ ```markdown
342
+ # Testing Strategy Document
343
+
344
+ ## Principles
345
+
346
+ 1. **Business value first**: Test what breaks the business
347
+ 2. **Edge cases over happy path**: Happy path is obvious
348
+ 3. **Integration over unit**: Test how pieces work together
349
+ 4. **Critical flows end-to-end**: User journeys matter most
350
+
351
+ ## Test Types Distribution
352
+
353
+ - 70% Unit tests (fast, isolated)
354
+ - 20% Integration tests (API + DB)
355
+ - 10% E2E tests (critical flows only)
356
+
357
+ ## Coverage Goals
358
+
359
+ - Overall: 70% (pragmatic goal)
360
+ - Critical business logic: 90%+
361
+ - API endpoints: 80%+
362
+ - UI components: 50%+ (user interactions only)
363
+
364
+ ## What NOT to Test
365
+
366
+ - Third-party libraries
367
+ - Trivial getters/setters
368
+ - Pure presentational components
369
+ - Configuration files
370
+ - Mock data and fixtures
371
+
372
+ ## Review Criteria
373
+
374
+ Before writing a test, ask:
375
+
376
+ 1. What bug would this test prevent?
377
+ 2. How likely is that bug?
378
+ 3. How costly would that bug be?
379
+ 4. Is this already covered by integration tests?
380
+
381
+ If ROI is low, skip the test.
382
+ ```
383
+
384
+ ## Team Guidelines
385
+
386
+ ```typescript
387
+ // Code review checklist for test coverage
388
+
389
+ const reviewChecklist = {
390
+ criticalPath: {
391
+ question: "Does this change affect a critical path?",
392
+ ifYes: "MUST have comprehensive tests (90%+)",
393
+ },
394
+
395
+ businessLogic: {
396
+ question: "Is this complex business logic?",
397
+ ifYes: "MUST have unit tests with edge cases",
398
+ },
399
+
400
+ apiEndpoint: {
401
+ question: "Is this a new API endpoint?",
402
+ ifYes: "MUST have integration tests",
403
+ },
404
+
405
+ uiComponent: {
406
+ question: "Is this a UI component?",
407
+ ifYes: "Optional - test interactions only",
408
+ },
409
+
410
+ bugFix: {
411
+ question: "Is this a bug fix?",
412
+ ifYes: "MUST have regression test",
413
+ },
414
+ };
415
+ ```
416
+
417
+ ## Best Practices
418
+
419
+ 1. **Focus on risk**: Test what could go wrong
420
+ 2. **Diminishing returns**: 100% coverage has low ROI
421
+ 3. **Integration over unit**: Test behavior, not implementation
422
+ 4. **Critical paths first**: Payment, auth, data integrity
423
+ 5. **Explicit "don't test"**: Be intentional about skipping
424
+ 6. **Review regularly**: Adjust targets quarterly
425
+ 7. **Measure bugs**: Track if tests catch real issues
426
+
427
+ ## Output Checklist
428
+
429
+ - [ ] Critical paths identified
430
+ - [ ] Layer-specific targets defined
431
+ - [ ] "Don't test this" list created
432
+ - [ ] Priority matrix established
433
+ - [ ] Coverage thresholds configured
434
+ - [ ] ROI analysis performed
435
+ - [ ] Testing strategy documented
436
+ - [ ] Team guidelines defined