arsenals 1.0.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.
@@ -0,0 +1,446 @@
1
+ ---
2
+ name: jira-to-code
3
+ description: >
4
+ Use this skill whenever the user wants to implement a Jira ticket, story, task, or bug into actual code.
5
+ Triggers when a user mentions a Jira ticket ID (e.g. PROJ-123), pastes a Jira description, says "implement this ticket",
6
+ "work on this story", "code this task", "build this feature from Jira", or shares acceptance criteria from a ticket.
7
+ Also triggers for phrases like "read my Jira and implement", "analyze the ticket and write code", or
8
+ "implement based on the requirements". Always use this skill when the workflow involves reading a Jira ticket
9
+ AND producing code — even if the user doesn't explicitly say "skill".
10
+ ---
11
+
12
+ # Jira-to-Code Skill
13
+
14
+ A structured agentic workflow that reads a Jira ticket, deeply understands the codebase, then produces a precise, ready-to-execute implementation plan and code — all grounded in both the ticket's intent and the project's actual patterns.
15
+
16
+ ---
17
+
18
+ ## Phase Overview
19
+
20
+ ```
21
+ Phase 1: INGEST → Read & parse the Jira ticket
22
+ ↓ CHECKPOINT: show parse output, wait for user confirmation
23
+ Phase 2: EXPLORE → Scan the repository/project folder (git-aware)
24
+ Phase 3: RECONCILE → Cross-reference ticket intent with codebase reality
25
+ ↓ CHECKPOINT: show complexity score + risks, wait for user confirmation
26
+ Phase 4: PLAN → Produce a concrete, ordered implementation plan
27
+ ↓ CHECKPOINT: present plan, wait for approval before writing any code
28
+ Phase 5: IMPLEMENT → Write the code (or hand off the plan to the agent)
29
+ ↓ OUTPUT: Implementation summary + PR description
30
+ ```
31
+
32
+ > **Checkpoint rule:** At each ↓ CHECKPOINT, stop, display the output, and explicitly ask:
33
+ > *"Does this look right? Should I proceed to [next phase]?"*
34
+ > Do not continue until the user confirms. This prevents compounding errors from a misread ticket or wrong file exploration.
35
+
36
+ ---
37
+
38
+ ## Phase 1: INGEST — Read & Parse the Jira Ticket
39
+
40
+ **Goal:** Extract every meaningful signal from the ticket before touching any code.
41
+
42
+ ### What to extract:
43
+
44
+ ```
45
+ TICKET PARSE OUTPUT
46
+ ───────────────────
47
+ Ticket ID : e.g. PROJ-123
48
+ Type : Bug | Feature | Task | Story | Spike
49
+ Title : One-line summary
50
+ Priority : Critical / High / Medium / Low
51
+ Labels/Tags : (if any — e.g. "backend", "auth", "v2")
52
+ Linked tickets : blocks: [IDs] | blocked by: [IDs] | relates to: [IDs]
53
+
54
+ DESCRIPTION
55
+ - Core problem or feature request (1–3 sentences in your own words)
56
+ - Stated root cause (if bug)
57
+ - Stakeholder / user impact
58
+
59
+ ACCEPTANCE CRITERIA (AC)
60
+ - List each criterion explicitly, numbered
61
+ - Flag any AC that is vague or untestable → mark as [NEEDS CLARIFICATION]
62
+
63
+ TECHNICAL NOTES (if any in ticket)
64
+ - Mentioned files, endpoints, methods, components
65
+ - Linked PRs, design docs, Confluence pages
66
+ - Suggested approach from the author
67
+
68
+ TICKET DEPENDENCIES (if any)
69
+ - [TICKET-ID] → [blocks this / blocked by this / relates to this]
70
+ - ⚠️ Flag any dependency that may conflict with or be required before this work
71
+
72
+ OUT OF SCOPE (explicit or implied)
73
+ - What this ticket explicitly does NOT include
74
+ ```
75
+
76
+ ### Ticket-type behavior:
77
+ Adjust the workflow based on ticket type:
78
+
79
+ | Type | Special behavior |
80
+ |---|---|
81
+ | **Bug** | Phase 3 must include root cause analysis. Test plan must include a regression test. |
82
+ | **Feature** | Phase 3 must check API contract & backward compatibility. Plan must note any breaking changes. |
83
+ | **Task** | Standard flow. |
84
+ | **Story** | Break down into sub-tasks in the plan. Each sub-task gets its own Step entry. |
85
+ | **Spike** | Do NOT produce code. Output a findings/research document instead of an implementation plan. |
86
+
87
+ ### Rules:
88
+ - Do not interpret or assume intent yet — just extract faithfully.
89
+ - If the ticket is missing AC, note it explicitly: "⚠️ No acceptance criteria found — will infer from description."
90
+ - If ticket references external links/docs, flag them for the user to provide if needed.
91
+ - If linked tickets are present, flag them: "⚠️ This ticket blocks/is blocked by [ID] — verify that work is complete or compatible before proceeding."
92
+
93
+ ### ✋ CHECKPOINT 1
94
+ Display the full Ticket Parse Output above, then ask:
95
+ > *"Does this capture the ticket correctly? Any corrections before I explore the codebase?"*
96
+ Wait for confirmation before proceeding to Phase 2.
97
+
98
+ ---
99
+
100
+ ## Phase 2: EXPLORE — Scan the Repository
101
+
102
+ **Goal:** Understand the project's architecture, conventions, relevant code, and current git state before writing a single line.
103
+
104
+ ### Step 1: Git state (run first)
105
+
106
+ ```bash
107
+ # Current branch and status
108
+ git branch --show-current
109
+ git status --short
110
+
111
+ # Recent commits for context
112
+ git log --oneline -15
113
+
114
+ # Files changed in recent commits (to detect active work areas)
115
+ git diff --name-only HEAD~5 HEAD 2>/dev/null || echo "Not enough history"
116
+ ```
117
+
118
+ Record:
119
+ - Current branch name
120
+ - Any uncommitted changes (warn if dirty working tree)
121
+ - Files recently modified (flag if they overlap with ticket's likely touch points)
122
+ - Any open work that might conflict
123
+
124
+ ### Step 2: Top-level scan
125
+
126
+ ```bash
127
+ # Directory tree — stop at 2 levels; go deeper only into relevant modules
128
+ find . -maxdepth 2 \
129
+ -not -path '*/node_modules/*' -not -path '*/.git/*' \
130
+ -not -path '*/__pycache__/*' -not -path '*/dist/*' \
131
+ -not -path '*/build/*' -not -path '*/.next/*' \
132
+ -not -path '*/coverage/*'
133
+ ```
134
+
135
+ > **Large repo rule:** If the top-level scan reveals >200 files or a monorepo structure (multiple `package.json` / `pyproject.toml` at subdirectory level), stop and ask:
136
+ > *"This looks like a large/mono repo. Which package or module is this ticket relevant to?"*
137
+ > Then scope all further exploration to that subdirectory.
138
+
139
+ ### Step 3: Identify the stack
140
+
141
+ Detect and record:
142
+ - **Language(s)**: TypeScript, Python, Go, Java, etc.
143
+ - **Framework(s)**: React, Next.js, FastAPI, Spring, Rails, etc.
144
+ - **Test framework**: Jest, Pytest, RSpec, Vitest, etc.
145
+ - **Package manager**: npm/yarn/pnpm, pip, cargo, etc.
146
+ - **Key config files**: `tsconfig.json`, `pyproject.toml`, `.eslintrc`, `Dockerfile`, etc.
147
+
148
+ ### Step 4: Environment & feature flag awareness
149
+
150
+ ```bash
151
+ # Check for env variable definitions
152
+ cat .env.example 2>/dev/null || cat .env.sample 2>/dev/null || echo "No .env example found"
153
+
154
+ # Check for feature flag files or config
155
+ find . -maxdepth 3 -name "flags*" -o -name "features*" -o -name "toggles*" 2>/dev/null | head -10
156
+ ```
157
+
158
+ Record:
159
+ - Environment variables relevant to the ticket's area (e.g. if ticket touches auth, note `AUTH_*` vars)
160
+ - Any feature flags wrapping the code being changed — the plan must account for flag state
161
+
162
+ ### Step 5: Targeted exploration based on ticket signals
163
+
164
+ Use the parsed ticket (Phase 1) to guide what to read:
165
+
166
+ | Ticket mentions | → Explore |
167
+ |---|---|
168
+ | An endpoint / route | Router files, controller/handler, middleware |
169
+ | A UI component | Component file, styles, props types, parent usage |
170
+ | A database model | Model/schema file, migration history, related queries |
171
+ | Auth / permissions | Auth middleware, guards, role definitions |
172
+ | A bug in feature X | The feature's files + `git log -p -- [file]` for recent changes |
173
+ | Performance issue | The slow path — query, loop, or render + any existing profiling notes |
174
+ | A named class/service | `grep -r "ClassName" --include="*.ts" -l` to find all usages |
175
+
176
+ ### Step 6: Collision detection
177
+
178
+ Before naming any new files, classes, or services, verify they don't already exist:
179
+
180
+ ```bash
181
+ # Example: checking if a service name is already taken
182
+ grep -r "UserNotificationService" --include="*.ts" -l 2>/dev/null
183
+ grep -r "UserNotificationService" --include="*.py" -l 2>/dev/null
184
+ ```
185
+
186
+ Run this for every new symbol the ticket implies creating. Flag any collision.
187
+
188
+ ### Step 7: Document findings
189
+
190
+ ```
191
+ CODEBASE SUMMARY
192
+ ────────────────
193
+ Stack : [language] / [framework]
194
+ Test framework : [framework]
195
+ Entry point : [file]
196
+ Branch : [current branch]
197
+ Git status : [clean | dirty — list changed files]
198
+ Recently touched: [files changed in last 5 commits that overlap with ticket]
199
+
200
+ Relevant files :
201
+ - [path] → [why it matters]
202
+ - [path] → [why it matters]
203
+
204
+ Env vars in scope:
205
+ - [VAR_NAME] → [what it controls, relevant to ticket]
206
+
207
+ Feature flags in scope:
208
+ - [flag name / file] → [current state / what it gates]
209
+
210
+ Patterns observed:
211
+ - [e.g. "Services use repository pattern with dependency injection"]
212
+ - [e.g. "All API responses wrapped in { data, error, meta }"]
213
+ - [e.g. "Components use named exports, no default exports"]
214
+
215
+ Existing tests for this area:
216
+ - [path] → [what they cover]
217
+
218
+ Collision check:
219
+ - [symbol name] → [Not found ✅ | Already exists at path ⚠️]
220
+
221
+ Potential conflicts / risks:
222
+ - [e.g. "UserService is currently being refactored in branch feature/user-v2"]
223
+ - [e.g. "NOTIFICATION_ENABLED feature flag is currently OFF in .env.example"]
224
+ ```
225
+
226
+ ---
227
+
228
+ ## Phase 3: RECONCILE — Cross-Reference Ticket with Codebase
229
+
230
+ **Goal:** Resolve the gap between what the ticket *asks for* and what the codebase *currently does*. Produce a complexity score.
231
+
232
+ ### AC gap analysis
233
+
234
+ Go through each Acceptance Criterion from Phase 1 and answer:
235
+
236
+ ```
237
+ AC #1: [criterion text]
238
+ Current state : [what the code does today]
239
+ Gap : [what needs to change]
240
+ Risk : [None / Low / Medium / High] — reason
241
+ Rollback note : [how to revert this change if it causes issues in prod]
242
+ Files touched : [list]
243
+
244
+ AC #2: ...
245
+ ```
246
+
247
+ ### Additional checks:
248
+ - Are there existing utilities, helpers, or abstractions this ticket should reuse?
249
+ - Are there tests that will break and need to be updated?
250
+ - Are there any AC that are already partially or fully implemented?
251
+ - Are there dependencies between ACs (do some need to happen before others)?
252
+ - For **Bug** tickets: What is the confirmed root cause? Which line/condition is the defect?
253
+ - For **Feature** tickets: Does this change any public API, event schema, or DB schema? If yes, flag as breaking change.
254
+
255
+ ### Complexity Score
256
+
257
+ After the AC analysis, assign a complexity estimate:
258
+
259
+ ```
260
+ COMPLEXITY: [S / M / L / XL]
261
+ ─────────────────────────────
262
+ S = 1–2 files, 1–3 AC, no schema/API changes, low risk
263
+ M = 3–5 files, 3–6 AC, minor API or schema changes, medium risk
264
+ L = 6–10 files, many AC, API/schema changes, cross-service impact
265
+ XL = 10+ files, breaking changes, high risk, needs team review before proceeding
266
+
267
+ Score : [S / M / L / XL]
268
+ Reasoning : [1–2 sentences explaining the score]
269
+ ```
270
+
271
+ > **XL rule:** If complexity is XL, pause and say:
272
+ > *"This ticket is rated XL complexity. It's recommended to review the plan with your team before implementation. I'll produce the plan, but recommend not proceeding to Phase 5 without sign-off."*
273
+
274
+ ### ✋ CHECKPOINT 2
275
+ Display the full Reconcile output (AC gap analysis + complexity score), then ask:
276
+ > *"Does this analysis look accurate? Any risks I missed before I write the implementation plan?"*
277
+ Wait for confirmation before proceeding to Phase 4.
278
+
279
+ ---
280
+
281
+ ## Phase 4: PLAN — Produce the Implementation Plan
282
+
283
+ **Goal:** A precise, ordered, agent-executable plan. No ambiguity. No hand-waving.
284
+
285
+ ### Format:
286
+
287
+ ```
288
+ IMPLEMENTATION PLAN — [TICKET-ID]: [Title]
289
+ ══════════════════════════════════════════
290
+ Complexity : [S / M / L / XL]
291
+ Type : [Bug | Feature | Task | Story]
292
+
293
+ SUMMARY
294
+ [2–3 sentence plain English summary of what will be built/changed and why]
295
+
296
+ LINKED TICKET NOTES (if any)
297
+ - [TICKET-ID] [blocks/blocked by/relates to] → [impact on this plan]
298
+
299
+ STEPS
300
+ Each step follows this format:
301
+
302
+ Step N — [Step Title]
303
+ ├── File(s) : [exact file paths]
304
+ ├── Action : [Create | Modify | Delete | Rename]
305
+ ├── What : [Precise description of the change]
306
+ ├── Pattern : [Reference to observed codebase pattern to follow]
307
+ ├── AC refs : [Which AC(s) this step satisfies]
308
+ ├── Rollback : [How to revert this step if needed]
309
+ └── Notes : [Edge cases, gotchas, collision checks, decisions made]
310
+
311
+ TEST PLAN
312
+ Step T1 — [Test description]
313
+ ├── File : [test file path — new or existing]
314
+ ├── Type : [Unit | Integration | E2E]
315
+ ├── Covers : [Which AC or step this validates]
316
+ └── What : [What to assert — for Bug tickets, include a regression test]
317
+
318
+ OPEN QUESTIONS (if any)
319
+ - [Question 1] → [Suggested default if proceeding without answer]
320
+ - [Question 2] → [Suggested default]
321
+
322
+ DEFINITION OF DONE
323
+ ☐ All AC satisfied (see mapping above)
324
+ ☐ Tests written and passing
325
+ ☐ No regressions in existing tests
326
+ ☐ Code follows existing project patterns
327
+ ☐ No new dependencies introduced unless listed in plan
328
+ ☐ Feature flags / env vars accounted for
329
+ ☐ [Any ticket-specific requirement]
330
+ ```
331
+
332
+ ### Rules for a good plan:
333
+ - Steps must be in dependency order (no step assumes a later step is done)
334
+ - Every AC must map to at least one step
335
+ - Never say "update X accordingly" — say exactly what to change
336
+ - If a design decision is needed, state the chosen option and why
337
+ - Keep each step small enough that it can be reviewed independently
338
+ - Every new symbol (class, service, file) must have passed the collision check from Phase 2
339
+
340
+ ### ✋ CHECKPOINT 3
341
+ Display the full implementation plan, then ask:
342
+ > *"Does this plan look right? Approve to begin implementation, or let me know what to adjust."*
343
+ Do not write any code until the user explicitly approves.
344
+
345
+ ---
346
+
347
+ ## Phase 5: IMPLEMENT — Write the Code
348
+
349
+ After plan approval (or if the user says "just do it"), proceed to implementation following the plan exactly.
350
+
351
+ ### Per step:
352
+ 1. Read the target file(s) before editing
353
+ 2. Follow the exact pattern documented in Phase 2
354
+ 3. Write the code change
355
+ 4. Immediately write or update the corresponding test
356
+ 5. Verify the change satisfies its linked AC(s)
357
+
358
+ ### Code quality rules:
359
+ - Match the existing code style exactly (indentation, naming, import order)
360
+ - Do not introduce new dependencies unless the plan explicitly calls for it
361
+ - Do not refactor unrelated code (out of scope)
362
+ - Add inline comments only where the logic is non-obvious
363
+ - If you find a bug outside the ticket scope, note it in the summary but do not fix it
364
+ - Honor feature flag state — do not remove or bypass existing flags
365
+
366
+ ### After all steps:
367
+ Run the test suite if a run command is available, then produce:
368
+
369
+ ```
370
+ IMPLEMENTATION SUMMARY — [TICKET-ID]
371
+ ══════════════════════════════════════
372
+ Files changed : [list with type: created/modified/deleted]
373
+ Tests added : [list]
374
+ AC coverage : [each AC → Satisfied ✅ / Partial ⚠️ / Not addressed ❌]
375
+ Out-of-scope bugs found : [list — not fixed, just noted]
376
+ Notes : [anything the reviewer should know]
377
+ ```
378
+
379
+ Then produce a PR description:
380
+
381
+ ```
382
+ PR DESCRIPTION — [TICKET-ID]: [Title]
383
+ ══════════════════════════════════════
384
+ ## What
385
+ [1–2 sentences: what this PR does]
386
+
387
+ ## Why
388
+ [1–2 sentences: the problem it solves, linked to ticket]
389
+
390
+ ## Changes
391
+ - [file or area] — [what changed and why]
392
+ - [file or area] — [what changed and why]
393
+
394
+ ## Testing
395
+ - [ ] Unit tests added/updated: [list]
396
+ - [ ] Integration tests added/updated: [list]
397
+ - [ ] Manually tested: [describe scenario]
398
+
399
+ ## Rollback
400
+ [How to revert if this causes issues — reference the rollback notes from the plan]
401
+
402
+ ## Notes for reviewer
403
+ [Decisions made, trade-offs, anything non-obvious]
404
+
405
+ Closes [TICKET-ID]
406
+ ```
407
+
408
+ ---
409
+
410
+ ## Handoff Mode (Plan-Only)
411
+
412
+ If the user wants the plan fed to another agent rather than implementing directly, output only Phases 1–4 in a clean markdown block, then say:
413
+
414
+ > "Plan ready. Pass this to your agent with the instruction: **Follow this implementation plan exactly, respecting all file paths, patterns, AC mappings, and rollback notes.**"
415
+
416
+ ---
417
+
418
+ ## Error Handling
419
+
420
+ | Situation | Action |
421
+ |---|---|
422
+ | Ticket has no AC | Infer AC from description, mark as `[INFERRED]`, confirm at Checkpoint 1 |
423
+ | Relevant file not found | State the missing file, ask user or make a best guess with `[ASSUMPTION]` tag |
424
+ | Ticket references a Jira link/doc not accessible | Flag it, note what info is missing, proceed with what's available |
425
+ | Ambiguous requirement | State both interpretations, pick the safer/simpler one, mark as `[DECISION]` |
426
+ | Conflicting patterns in codebase | Pick the more recent/dominant pattern, document the choice |
427
+ | Dirty git working tree | Warn: "⚠️ Working tree has uncommitted changes — recommend committing or stashing before proceeding" |
428
+ | Symbol collision detected | Stop, flag it: "⚠️ [Name] already exists at [path] — plan needs to be adjusted" |
429
+ | Ticket type is Spike | Skip Phases 4–5. Output a findings document instead. |
430
+ | Complexity is XL | Produce plan but recommend team review before Phase 5 |
431
+ | Linked ticket blocks this work | Flag: "⚠️ This ticket is blocked by [ID] — confirm that work is done before implementing" |
432
+
433
+ ---
434
+
435
+ ## Quick Reference Cheatsheet
436
+
437
+ ```
438
+ Phase 1 → Parse ticket → extract AC, type, dependencies
439
+ ✋ CHECKPOINT: confirm parse before exploring code
440
+ Phase 2 → Scan repo → git state, stack, env vars, feature flags, collision check
441
+ Phase 3 → Reconcile → AC gaps, complexity score (S/M/L/XL), rollback notes
442
+ ✋ CHECKPOINT: confirm analysis before planning
443
+ Phase 4 → Plan → ordered steps, file paths, patterns, AC refs, rollback per step
444
+ ✋ CHECKPOINT: approve plan before writing any code
445
+ Phase 5 → Implement → code + tests + implementation summary + PR description
446
+ ```
package/package.json ADDED
@@ -0,0 +1,21 @@
1
+ {
2
+ "name": "arsenals",
3
+ "version": "1.0.0",
4
+ "description": "Claude Code skills installer",
5
+ "bin": {
6
+ "arsenals": "bin/arsenals.js"
7
+ },
8
+ "files": [
9
+ "bin",
10
+ "cybersecurity-agent",
11
+ "jira-to-code",
12
+ "skill-seekers",
13
+ "ticket-writer"
14
+ ],
15
+ "keywords": [
16
+ "claude-code",
17
+ "skills",
18
+ "ai"
19
+ ],
20
+ "license": "MIT"
21
+ }