@torka/claude-workflows 0.12.0 → 0.13.2

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 (39) hide show
  1. package/.claude-plugin/plugin.json +8 -0
  2. package/README.md +52 -5
  3. package/bmad-workflows/bmm/workflows/4-implementation/implement-epic-with-subagents/steps/step-01b-continue.md +9 -2
  4. package/bmad-workflows/bmm/workflows/4-implementation/implement-epic-with-subagents/steps/step-02-orchestrate.md +108 -2
  5. package/bmad-workflows/bmm/workflows/4-implementation/implement-epic-with-subagents/steps/step-03-complete.md +35 -1
  6. package/commands/deep-audit.md +530 -0
  7. package/commands/dev-story-backend.md +12 -11
  8. package/commands/dev-story-fullstack.md +6 -2
  9. package/commands/dev-story-ui.md +4 -4
  10. package/commands/github-pr-resolve.md +132 -24
  11. package/commands/plan-parallelization.md +20 -3
  12. package/examples/settings.local.example.json +17 -0
  13. package/install.js +14 -3
  14. package/package.json +1 -1
  15. package/skills/deep-audit/INSPIRATIONS.md +26 -0
  16. package/skills/deep-audit/SKILL.md +313 -0
  17. package/skills/deep-audit/agents/api-contract-reviewer.md +42 -0
  18. package/skills/deep-audit/agents/architecture-and-complexity.md +59 -0
  19. package/skills/deep-audit/agents/code-health.md +55 -0
  20. package/skills/deep-audit/agents/data-layer-reviewer.md +50 -0
  21. package/skills/deep-audit/agents/documentation-health.md +44 -0
  22. package/skills/deep-audit/agents/performance-profiler.md +42 -0
  23. package/skills/deep-audit/agents/refactoring-planner.md +161 -0
  24. package/skills/deep-audit/agents/security-and-error-handling.md +56 -0
  25. package/skills/deep-audit/agents/seo-accessibility-auditor.md +53 -0
  26. package/skills/deep-audit/agents/test-strategy-analyst.md +61 -0
  27. package/skills/deep-audit/agents/type-design-analyzer.md +49 -0
  28. package/skills/deep-audit/templates/report-template.md +152 -0
  29. package/skills/designer-founder/SKILL.md +8 -7
  30. package/skills/designer-founder/steps/step-01-context.md +94 -45
  31. package/skills/designer-founder/steps/step-02-scope.md +6 -23
  32. package/skills/designer-founder/steps/step-03-design.md +29 -58
  33. package/skills/designer-founder/steps/step-04-artifacts.md +137 -113
  34. package/skills/designer-founder/steps/step-05-epic-linking.md +81 -53
  35. package/skills/designer-founder/steps/step-06-validate.md +181 -0
  36. package/skills/designer-founder/templates/component-strategy.md +4 -0
  37. package/skills/designer-founder/tools/magicpatterns.md +52 -19
  38. package/skills/designer-founder/tools/stitch.md +97 -67
  39. package/uninstall.js +24 -0
@@ -18,6 +18,10 @@
18
18
  {
19
19
  "name": "github-pr-resolve",
20
20
  "description": "Assess open PRs, handle review comments, run CI, and merge"
21
+ },
22
+ {
23
+ "name": "deep-audit",
24
+ "description": "Multi-agent codebase audit across security, architecture, error handling, and more"
21
25
  }
22
26
  ],
23
27
  "agents": [
@@ -38,6 +42,10 @@
38
42
  {
39
43
  "name": "product-architect",
40
44
  "description": "Agent team that creates PRD + Architecture from product notes. PM and Architect collaborate, escalating only for key decisions."
45
+ },
46
+ {
47
+ "name": "deep-audit",
48
+ "description": "Agent prompts and templates for the deep-audit codebase audit"
41
49
  }
42
50
  ],
43
51
  "hooks": {
package/README.md CHANGED
@@ -11,6 +11,7 @@ Claude Code workflow helpers for epic automation, git management, and developer
11
11
  | **Agent Creator** | Design and deploy custom Claude Code agents | Yes |
12
12
  | **Designer-Founder** | Transform ideas into dev-ready frontend artifacts | Yes |
13
13
  | **Epic Orchestration** | Automate multi-story epic execution with sub-agents | Requires BMAD |
14
+ | **Deep Audit** | Multi-agent codebase audit (security, architecture, performance, etc.) | Yes |
14
15
  | **Code Review Agent** | Principal-level code review automation | Requires BMM |
15
16
  | **Story Prep Agent** | Convert requirements to developer-ready specs | Requires BMM |
16
17
 
@@ -42,6 +43,36 @@ After installation, try running one of the commands to test:
42
43
  /designer-founder
43
44
  ```
44
45
 
46
+ ### Auto-Format on Edit (optional)
47
+
48
+ Auto-run linters and formatters after Claude edits files. Add to your project's `.claude/settings.local.json`:
49
+
50
+ ```json
51
+ {
52
+ "hooks": {
53
+ "PostToolUse": [
54
+ {
55
+ "matcher": "Edit|MultiEdit",
56
+ "hooks": [
57
+ {
58
+ "type": "command",
59
+ "command": "if [[ \"$CLAUDE_TOOL_FILE_PATH\" == *.js || \"$CLAUDE_TOOL_FILE_PATH\" == *.ts || \"$CLAUDE_TOOL_FILE_PATH\" == *.jsx || \"$CLAUDE_TOOL_FILE_PATH\" == *.tsx ]]; then npx eslint \"$CLAUDE_TOOL_FILE_PATH\" --fix 2>/dev/null || true; elif [[ \"$CLAUDE_TOOL_FILE_PATH\" == *.py ]]; then pylint \"$CLAUDE_TOOL_FILE_PATH\" 2>/dev/null || true; fi"
60
+ },
61
+ {
62
+ "type": "command",
63
+ "command": "if [[ \"$CLAUDE_TOOL_FILE_PATH\" == *.js || \"$CLAUDE_TOOL_FILE_PATH\" == *.ts || \"$CLAUDE_TOOL_FILE_PATH\" == *.jsx || \"$CLAUDE_TOOL_FILE_PATH\" == *.tsx || \"$CLAUDE_TOOL_FILE_PATH\" == *.json || \"$CLAUDE_TOOL_FILE_PATH\" == *.css || \"$CLAUDE_TOOL_FILE_PATH\" == *.html ]]; then npx prettier --write \"$CLAUDE_TOOL_FILE_PATH\" 2>/dev/null || true; elif [[ \"$CLAUDE_TOOL_FILE_PATH\" == *.py ]]; then black \"$CLAUDE_TOOL_FILE_PATH\" 2>/dev/null || true; elif [[ \"$CLAUDE_TOOL_FILE_PATH\" == *.go ]]; then gofmt -w \"$CLAUDE_TOOL_FILE_PATH\" 2>/dev/null || true; elif [[ \"$CLAUDE_TOOL_FILE_PATH\" == *.rs ]]; then rustfmt \"$CLAUDE_TOOL_FILE_PATH\" 2>/dev/null || true; elif [[ \"$CLAUDE_TOOL_FILE_PATH\" == *.php ]]; then php-cs-fixer fix \"$CLAUDE_TOOL_FILE_PATH\" 2>/dev/null || true; fi"
64
+ }
65
+ ]
66
+ }
67
+ ]
68
+ }
69
+ }
70
+ ```
71
+
72
+ **Supported languages:** JavaScript/TypeScript (ESLint + Prettier), Python (Pylint + Black), Go (gofmt), Rust (rustfmt), PHP (php-cs-fixer)
73
+
74
+ > **Note:** This is a project-level setting — formatter choice varies per project. Commands fail silently (`|| true`) if tools aren't installed.
75
+
45
76
  ## Usage
46
77
 
47
78
  ### Commands
@@ -83,6 +114,17 @@ Orchestrates sub-agents to execute all stories in an epic sequentially with mini
83
114
  /implement-epic-with-subagents
84
115
  ```
85
116
 
117
+ #### `/deep-audit`
118
+
119
+ Multi-agent codebase audit across security, architecture, error handling, and more:
120
+ - 9 specialized audit agents run in parallel
121
+ - Covers security, performance, code health, test coverage, accessibility, and more
122
+ - Generates a consolidated report with prioritized findings
123
+
124
+ ```
125
+ /deep-audit
126
+ ```
127
+
86
128
  ### Agents
87
129
 
88
130
  #### `principal-code-reviewer`
@@ -148,6 +190,7 @@ Some components require the [BMAD Method](https://github.com/bmad-method) workfl
148
190
  **Standalone components** (no external dependencies):
149
191
  - `/git-cleanup-and-merge`
150
192
  - `/plan-parallelization`
193
+ - `/deep-audit`
151
194
  - `/agent-creator` skill
152
195
  - `/designer-founder` skill
153
196
 
@@ -171,11 +214,15 @@ After installation, files are placed in:
171
214
  │ ├── STORY-AGENT-TEMPLATE.md
172
215
  │ ├── NON-STORY-AGENT-TEMPLATE.md
173
216
  │ └── COMMUNITY-REPOS.md
174
- └── designer-founder/
175
- ├── workflow.md
176
- ├── steps/
177
- ├── templates/
178
- └── tools/
217
+ ├── designer-founder/
218
+ ├── workflow.md
219
+ ├── steps/
220
+ ├── templates/
221
+ └── tools/
222
+ └── deep-audit/
223
+ ├── SKILL.md
224
+ ├── agents/ # 9 audit agent prompts
225
+ └── templates/
179
226
  ```
180
227
 
181
228
  ## Uninstallation
@@ -221,15 +221,22 @@ Options:
221
221
  ### 7. Handle Menu Selection
222
222
 
223
223
  #### IF C (Continue):
224
- 1. Update sidecar:
224
+ 1. CRITICAL: Execution log entries in the sidecar are **immutable history**.
225
+ When updating the sidecar, APPEND new entries to the `execution_log` array -
226
+ **never replace or truncate** the existing entries. All completed story records
227
+ must be preserved through session continuations. Use a read-modify-append
228
+ pattern: read the current execution_log, then add new entries at the end.
229
+
230
+ 2. Update sidecar (APPEND to existing execution_log):
225
231
  ```yaml
226
232
  execution_log:
233
+ # ... all existing entries preserved ...
227
234
  - event: "session_resumed"
228
235
  timestamp: "{current_timestamp}"
229
236
  from_phase: "{current_phase}"
230
237
  last_updated: "{current_timestamp}"
231
238
  ```
232
- 2. Route based on scenario:
239
+ 3. Route based on scenario:
233
240
  - Scenario A/B → load, read entire file, then execute `{nextStepFile}`
234
241
  - Scenario C → load, read entire file, then execute `{completionStepFile}`
235
242
 
@@ -67,6 +67,18 @@ To autonomously execute all pending stories in the epic by orchestrating special
67
67
  - ✅ You handle failures gracefully with retry or escalation
68
68
  - ✅ You output brief progress after each story completion
69
69
 
70
+ ### Orchestrator Tool Guidance:
71
+
72
+ As orchestrator, your primary tool is Task (spawning agents). Avoid using Edit or Bash
73
+ on source code files - delegate ALL development work to sub-agents.
74
+
75
+ When a phase produces issues that need fixing (review rejections, test failures, desk-check
76
+ changes requested), spawn the dev agent again with the fix context rather than editing
77
+ code yourself.
78
+
79
+ **Reserve direct Edit for:** sidecar files and sprint-status.yaml only.
80
+ **Reserve direct Bash for:** git commands and file existence checks only.
81
+
70
82
  ### Step-Specific Rules:
71
83
 
72
84
  - 🎯 Execute stories in linear order from pending list
@@ -130,6 +142,11 @@ Task tool:
130
142
  story_file: [path to created story]
131
143
  blockers: none | [list]
132
144
  next_action: proceed | escalate
145
+
146
+ # Retrospective (for orchestrator learning)
147
+ went_well: [what worked smoothly in this phase]
148
+ challenges: [what was difficult or didn't go well]
149
+ suggestions: [what could be improved for future stories]
133
150
  === END HANDOFF ===
134
151
  ```
135
152
 
@@ -173,6 +190,10 @@ Task tool:
173
190
  Write tests first (red-green-refactor).
174
191
  Mark tasks complete as you finish them.
175
192
 
193
+ Test Strategy: Run TARGETED tests (npm test -- --filter "{test-file}")
194
+ during development. The full test suite runs ONCE at the end of all tasks
195
+ (Step 8.1 Final Verification). Do NOT run the full suite after each task.
196
+
176
197
  Available MCP Tools (use if available):
177
198
  - Serena MCP: Code intelligence for navigation, refactoring
178
199
  - Context7 MCP: Documentation lookup
@@ -193,6 +214,11 @@ Task tool:
193
214
  blockers: none | [list]
194
215
  next_action: proceed | escalate | retry
195
216
  error_summary: null | [description]
217
+
218
+ # Retrospective (for orchestrator learning)
219
+ went_well: [what worked smoothly in this phase]
220
+ challenges: [what was difficult or didn't go well]
221
+ suggestions: [what could be improved for future stories]
196
222
  === END HANDOFF ===
197
223
  ```
198
224
 
@@ -236,12 +262,50 @@ Task tool:
236
262
  screenshots_folder: {screenshotsFolder}/story-N.M/
237
263
 
238
264
  Perform visual inspection per agent protocol.
265
+
266
+ Include these retrospective fields in your handoff:
267
+ # Retrospective (for orchestrator learning)
268
+ went_well: [what worked smoothly in this phase]
269
+ challenges: [what was difficult or didn't go well]
270
+ suggestions: [what could be improved for future stories]
271
+
239
272
  Output handoff when complete.
240
273
  ```
241
274
 
242
275
  **Parse handoff and route:**
243
276
  - `check_status: approved` → Phase D (Code Review)
244
- - `check_status: changes_requested` → Story already annotated by agent, back to Phase B
277
+ - `check_status: changes_requested` → Spawn the dev agent (Opus) to fix visual issues:
278
+
279
+ ```
280
+ Task tool:
281
+ subagent_type: "general-purpose"
282
+ model: "opus"
283
+ description: "Fix desk-check issues story N.M"
284
+ prompt: |
285
+ You are a developer agent fixing visual/desk-check issues.
286
+ Load and embody: [same specialist agent path used in Phase B]
287
+
288
+ Story file: [story_path]
289
+ IMPORTANT: Re-read the story file FIRST. The desk-check agent may have
290
+ annotated it with "Desk Check Feedback" or "Desk Check Review" sections
291
+ containing specific notes and change requests. The dev-story commands
292
+ (Step 4.2) already have review feedback detection - leverage this.
293
+
294
+ Files that were changed: [files_changed from Phase B dev handoff]
295
+
296
+ Desk-Check Findings to Fix:
297
+ [paste the desk-check handoff findings/annotations]
298
+ Screenshots: [screenshot paths if any]
299
+
300
+ Fix all visual issues identified by the desk-check agent.
301
+ Run targeted tests to verify fixes don't break anything.
302
+
303
+ Output handoff using the standard AGENT HANDOFF format.
304
+ ```
305
+
306
+ After fix completes → re-run Phase C (desk check) for verification.
307
+ Maximum desk-check fix cycles: {maxRetries}
308
+
245
309
  - `check_status: rejected` → Escalate to user with `escalation_reason`
246
310
 
247
311
  **Pass visual context to Code Review (Phase D):**
@@ -303,12 +367,49 @@ Task tool:
303
367
  suggestions: [count]
304
368
  summary: [brief summary]
305
369
  next_action: proceed | fix_required | escalate
370
+
371
+ # Retrospective (for orchestrator learning)
372
+ went_well: [what worked smoothly in this phase]
373
+ challenges: [what was difficult or didn't go well]
374
+ suggestions: [what could be improved for future stories]
306
375
  === END HANDOFF ===
307
376
  ```
308
377
 
309
378
  **Parse handoff:**
310
379
  - If review_status=approved → proceed to Phase E
311
- - If review_status=changes_requested → go back to Phase B (with review feedback)
380
+ - If review_status=changes_requested → Spawn the dev agent (Opus) to fix code issues:
381
+
382
+ ```
383
+ Task tool:
384
+ subagent_type: "general-purpose"
385
+ model: "opus"
386
+ description: "Fix review issues story N.M"
387
+ prompt: |
388
+ You are a developer agent fixing code review findings.
389
+ Load and embody: [same specialist agent path used in Phase B]
390
+
391
+ Story file: [story_path]
392
+ IMPORTANT: Re-read the story file FIRST. The code reviewer may have
393
+ annotated it with "Senior Developer Review (AI)", "Code Review", or
394
+ "Review Follow-ups (AI)" sections containing specific findings and
395
+ change requests. The dev-story commands (Step 4.2) already have
396
+ review feedback detection - leverage this.
397
+
398
+ Files that were changed: [files_changed from Phase B dev handoff]
399
+
400
+ Code Review Findings to Fix:
401
+ [paste the review findings from handoff]
402
+
403
+ Fix all critical and major findings.
404
+ Run targeted tests to verify fixes.
405
+ Run full test suite once after all fixes.
406
+
407
+ Output handoff using the standard AGENT HANDOFF format.
408
+ ```
409
+
410
+ After fix completes → re-submit to Phase D (code review) for verification.
411
+ Maximum review fix cycles: {maxRetries}
412
+
312
413
  - If review_status=rejected → escalate to user
313
414
 
314
415
  ---
@@ -322,6 +423,11 @@ last_updated: "[timestamp]"
322
423
  ```
323
424
 
324
425
  **Execute git commit:**
426
+
427
+ Pre-commit hooks run the full test suite. Do NOT run tests separately before committing -
428
+ the hook handles it. If the commit hook fails tests, investigate and fix (spawn dev agent
429
+ if needed), then re-attempt the commit.
430
+
325
431
  ```bash
326
432
  git add .
327
433
  git commit -m "feat(story-N.M): [story title]
@@ -332,7 +332,41 @@ Pull Request Created
332
332
  - Created: [timestamp]
333
333
  ```
334
334
 
335
- ### 6.5 Worktree Cleanup (Conditional)
335
+ ### 6.5 Manual Testing Recommendations
336
+
337
+ Generate a concise list of key items the user should manually test:
338
+
339
+ **Analysis approach:**
340
+ 1. For each completed story, identify the primary user-facing feature or change
341
+ 2. Prioritize items that involve:
342
+ - New user flows (registration, form submission, navigation)
343
+ - API integrations (external services, auth flows)
344
+ - Visual/UI changes (responsive design, dark mode, new pages)
345
+ - Data operations (CRUD, search, filtering)
346
+ 3. Skip items that are purely internal/infrastructure
347
+
348
+ **Display format:**
349
+ ```
350
+ ## Recommended Manual Testing
351
+
352
+ Before merging, verify these key flows:
353
+
354
+ 1. **[Feature name]** (Story N.M)
355
+ - [ ] [Specific action to test]
356
+ - [ ] [Expected result to verify]
357
+
358
+ 2. **[Feature name]** (Story N.M)
359
+ - [ ] [Specific action to test]
360
+ - [ ] [Expected result to verify]
361
+
362
+ Environment: {dev_server config}
363
+ Test credentials: {test_credentials if applicable}
364
+ ```
365
+
366
+ **Purpose:** Complement automated tests with human verification of
367
+ end-to-end user experience before PR merge.
368
+
369
+ ### 6.6 Worktree Cleanup (Conditional)
336
370
 
337
371
  **Skip this section if:**
338
372
  - `execution_mode.type` = "main" (not using worktree)