@torka/claude-workflows 0.7.1 → 0.9.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.
@@ -12,12 +12,27 @@ Create custom Claude Code sub-agents tailored to your project's needs. All agent
12
12
 
13
13
  **All created agents are story-focused by default.** This means:
14
14
  1. Every agent accepts a **story identifier** as input (story number or name)
15
- 2. Every agent **must invoke `/dev-story`** as their first action when launched
15
+ 2. Every agent uses **smart routing** to auto-detect story type and invoke the correct workflow
16
16
  3. The story context drives all agent work
17
17
 
18
+ ### Smart Workflow Routing
19
+
20
+ Agents analyze story tasks and automatically route to the appropriate workflow:
21
+
22
+ | Story Contains | Routes To |
23
+ |----------------|-----------|
24
+ | Only UI keywords | `/dev-story-ui` |
25
+ | Only Backend keywords | `/dev-story-backend` |
26
+ | Both or unclear | `/dev-story-fullstack` |
27
+
28
+ **Detection Keywords:**
29
+ - **UI**: component, page, layout, visual, form, button, modal, card, dialog, toast, responsive, CSS, Tailwind, shadcn, MagicPatterns, screenshot
30
+ - **Backend**: API, endpoint, database, service, migration, auth, middleware, validation, schema, query, route handler, Drizzle, ORM
31
+
18
32
  ### Why Story-Based?
19
33
  - Ensures traceability from story → implementation
20
34
  - Provides clear scope boundaries for the agent
35
+ - Smart routing picks the right workflow automatically
21
36
  - Maintains sprint tracking via `sprint-status.yaml`
22
37
  - Aligns with BMAD Method workflows
23
38
 
@@ -88,20 +103,17 @@ Present findings to user:
88
103
 
89
104
  Based on context, design the agent architecture:
90
105
 
91
- ### Common Agent Patterns (All Story-Based)
106
+ ### Story Agent Pattern (Default)
92
107
 
93
- All agents below accept a story identifier and invoke `/dev-story`. The specialty provides context.
108
+ All story agents use the **universal template** with smart routing:
94
109
 
95
- | Agent Type | Specialty Focus | Notes |
96
- |------------|-----------------|-------|
97
- | `frontend` | UI/React component stories | May use ShadCN, MagicPatterns MCPs |
98
- | `backend` | API/server-side stories | May use database MCPs |
99
- | `fullstack` | End-to-end feature stories | Broad MCP access beneficial |
100
- | `tester` | Test-focused stories | May use Playwright MCP |
101
- | `database` | Schema/migration stories | May use database MCPs |
102
- | `api-integrator` | External API integration stories | May use Context7 MCP for docs |
110
+ | Agent Examples | Specialty Focus |
111
+ |----------------|-----------------|
112
+ | `frontend`, `react-dev`, `ui-specialist` | Frontend/React expertise |
113
+ | `api-dev`, `db-specialist`, `auth-dev` | Backend/API expertise |
114
+ | `feature-dev`, `saas-dev`, `nextjs-fullstack` | Full-stack expertise |
103
115
 
104
- **Note**: Agents inherit all available tools by default (including MCPs). Only use `disallowedTools` when explicit restrictions are needed.
116
+ **Note**: Agents inherit all available tools by default (including MCPs). The agent auto-detects story type and routes to the correct workflow.
105
117
 
106
118
  ### Non-Story Agent Patterns (Rare - Only When Explicitly Requested)
107
119
 
@@ -111,26 +123,49 @@ All agents below accept a story identifier and invoke `/dev-story`. The specialt
111
123
  | `documenter` | Documentation-only updates | None (inherits all) |
112
124
 
113
125
  ### Design Considerations
114
- - **Story-first**: Default to story-based agents that invoke `/dev-story`
126
+ - **Universal template**: All story agents use the same template with smart routing
127
+ - **Persona-focused**: Agent creation is about defining expertise and approach
128
+ - **Auto-routing**: Story type detection happens at execution time, not creation time
115
129
  - **Single responsibility**: Each agent has one specialty focus
116
- - **Minimal wrapper**: Agents delegate to `/dev-story` for all implementation
130
+ - **Minimal wrapper**: Agents are persona + handoff only; workflows handle all logic
117
131
  - **Model selection**: Use `sonnet` for story agents (complex reasoning needed)
118
132
  - **Tool inheritance**: Omit `tools:` field so agents inherit all tools including MCPs
119
- - **MCP-aware**: Agents should check MCP availability and escalate if critical MCPs are missing
133
+ - **No MCP checks in agents**: Workflows handle MCP availability checks
120
134
 
121
135
  ### CHECKPOINT 2
122
136
  Present agent design to user:
123
137
  - List of proposed agents with names and descriptions
124
- - Each agent's specialty and tool access
138
+ - Each agent's specialty/persona focus
125
139
  - How agents will collaborate (if applicable)
126
140
 
127
141
  **Wait for user approval before proceeding.**
128
142
 
129
143
  ## Step 3: Community Research
130
144
 
131
- **IMPORTANT: Reference the detailed guide at `.claude/skills/agent-creator/COMMUNITY-REPOS.md`**
145
+ ### Action 1: Check Pre-Built Expertise Profiles (Do This First)
146
+
147
+ **Read the profile index at `.claude/skills/agent-creator/expertise/INDEX.md`**
148
+
149
+ Most agents fit one of these pre-built profiles:
150
+
151
+ | Profile | Use For |
152
+ |---------|---------|
153
+ | `react-frontend.md` | UI components, forms, modals, accessibility |
154
+ | `backend-api.md` | API routes, auth, validation, error handling |
155
+ | `nextjs-fullstack.md` | Pages, layouts, Server Components, App Router |
156
+ | `testing.md` | Unit tests, E2E tests, coverage, fixtures |
157
+ | `database-orm.md` | Schema, migrations, Drizzle queries |
158
+ | `devops-ci.md` | CI/CD, deployment, secrets, GitHub Actions |
159
+
160
+ **If a profile matches 80%+**: Extract keywords, competencies, and anti-patterns. Skip repo research.
161
+
162
+ **If no good match**: Proceed to Action 2.
132
163
 
133
- ### Research Limits (Mandatory)
164
+ ### Action 2: Repo Research (Only If Needed)
165
+
166
+ **Reference the detailed guide at `.claude/skills/agent-creator/COMMUNITY-REPOS.md`**
167
+
168
+ #### Research Limits (Mandatory)
134
169
 
135
170
  | Activity | Maximum |
136
171
  |----------|---------|
@@ -139,7 +174,7 @@ Present agent design to user:
139
174
  | Web searches | 2 queries |
140
175
  | Total research time | 10 minutes |
141
176
 
142
- ### Curated Repos (Check First)
177
+ #### Curated Repos (Check First)
143
178
 
144
179
  | Repository | URL |
145
180
  |------------|-----|
@@ -151,7 +186,16 @@ Present agent design to user:
151
186
  | compound-engineering-plugin | https://github.com/EveryInc/compound-engineering-plugin |
152
187
  | claude-code-workflows | https://github.com/OneRedOak/claude-code-workflows |
153
188
 
154
- ### Evaluation Criteria
189
+ #### Research Questions
190
+
191
+ When reviewing repos, answer these questions (see COMMUNITY-REPOS.md for details):
192
+ 1. What problem does this agent solve?
193
+ 2. What expertise does it encode?
194
+ 3. What patterns can be reused?
195
+ 4. What limitations does it have?
196
+ 5. How should it be adapted?
197
+
198
+ #### Evaluation Criteria
155
199
 
156
200
  Before using patterns from a repo, verify:
157
201
  1. **Recent Activity**: Last commit < 30 days (ideal) or < 90 days (acceptable)
@@ -168,8 +212,9 @@ gh repo view {owner}/{repo} --json stargazerCount,pushedAt
168
212
 
169
213
  ### CHECKPOINT 3
170
214
  Share research findings:
171
- - Which repos were checked (max 5)
172
- - Relevant patterns found
215
+ - Profile(s) used (if applicable)
216
+ - Which repos were checked (max 5, if Action 2 was needed)
217
+ - Key patterns/competencies extracted
173
218
  - Adaptations proposed for this project
174
219
 
175
220
  **Wait for user approval before proceeding.**
@@ -180,11 +225,16 @@ Create agent files following Claude Code's native format.
180
225
 
181
226
  ### Templates
182
227
 
183
- **Use the template files for full specifications:**
184
- - **Story-Based (Default)**: `.claude/skills/agent-creator/STORY-AGENT-TEMPLATE.md`
185
- - **Non-Story (Rare)**: `.claude/skills/agent-creator/NON-STORY-AGENT-TEMPLATE.md`
228
+ **Use the universal template for all story agents:**
229
+
230
+ | Agent Type | Template File |
231
+ |------------|---------------|
232
+ | **Story Agents** (default) | `.claude/skills/agent-creator/STORY-AGENT-TEMPLATE.md` |
233
+ | **Non-Story** (rare) | `.claude/skills/agent-creator/NON-STORY-AGENT-TEMPLATE.md` |
186
234
 
187
- Read the appropriate template file before creating agents.
235
+ The universal template includes smart routing logic - agents auto-detect story type and route to the correct workflow (`/dev-story-ui`, `/dev-story-backend`, or `/dev-story-fullstack`).
236
+
237
+ Read the template file before creating agents.
188
238
 
189
239
  ### File Naming Convention
190
240
  - Location: `.claude/agents/vt-bmad-dev-agents/{name}.md`
@@ -213,15 +263,13 @@ Before presenting to user, validate each agent:
213
263
  6. **Story-based validation** (for story agents):
214
264
  - Description mentions story input requirement
215
265
  - Content includes "Required Input" section for story identifier
216
- - Content includes `/dev-story` invocation instruction
217
- - Content does NOT include direct implementation steps (only /dev-story delegation)
218
- - Content includes MCP availability check guidance
219
-
220
- 7. **MCP awareness** (for implementation agents):
221
- - Content includes MCP availability check as first action
222
- - Content includes escalation behavior for missing critical MCPs
223
- - If UI-focused: includes ShadCN demo-first pattern
224
- - If design link expected: includes MagicPatterns handling
266
+ - Content includes Execution section with routing logic (auto-detects story type)
267
+ - Content includes reference to all three workflows (`/dev-story-ui`, `/dev-story-backend`, `/dev-story-fullstack`)
268
+ - Content does NOT include:
269
+ - MCP availability checks (workflow handles this)
270
+ - Implementation steps (workflow handles this)
271
+ - Checklists (workflow handles this)
272
+ - Content includes Handoff Format section with `workflow_used` field
225
273
 
226
274
  ### CHECKPOINT 4
227
275
  For each agent, show:
@@ -293,73 +341,17 @@ disallowedTools: Bash
293
341
 
294
342
  When `tools:` is omitted, agents inherit all available tools from the main conversation, including any configured MCP tools.
295
343
 
296
- ### MCP Availability Check (Required First Step)
297
-
298
- All agents must check MCP availability before starting work:
299
-
300
- ```markdown
301
- ## First Action: MCP Availability Check
344
+ ### MCP Checks Handled by Workflows (Not Agents)
302
345
 
303
- Before proceeding with implementation:
304
- 1. Review the story/task requirements for MCP dependencies
305
- 2. If requirements mention UI components → check for ShadCN MCP
306
- 3. If requirements include a MagicPatterns link → check for MagicPatterns MCP
307
- 4. If requirements need external API docs → check for Context7 MCP
346
+ **Important**: Agents no longer include MCP availability checks. The specialized workflows handle all MCP logic:
308
347
 
309
- **If critical MCP is unavailable:**
310
- - Output: `ESCALATE: Required MCP '{mcp-name}' not available. Please enable it and retry.`
311
- - Include in handoff: `status: blocked`, `blockers: ["MCP {name} unavailable"]`
312
- - HALT - Do not attempt workarounds for critical MCPs
348
+ | Workflow | MCP Handling |
349
+ |----------|--------------|
350
+ | `/dev-story-ui` | Probes shadcn, Playwright (required); Context7, MagicPatterns (optional) |
351
+ | `/dev-story-backend` | Probes Context7, Serena (all optional with fallbacks) |
352
+ | `/dev-story-fullstack` | Combines both based on task types |
313
353
 
314
- **If optional MCP is unavailable:**
315
- - Note the limitation
316
- - Proceed with fallback approach
317
- - Document in handoff: `notes: "Built without {mcp} - manual review recommended"`
318
- ```
319
-
320
- ### ShadCN MCP Pattern
321
-
322
- When implementing UI components with ShadCN MCP available:
323
-
324
- ```markdown
325
- ## ShadCN Component Implementation
326
-
327
- **ALWAYS call demo/docs first before implementing any ShadCN component:**
328
-
329
- 1. Call the component demo tool to see usage:
330
- - Review available variants, sizes, and props
331
- - Note any required imports or dependencies
332
-
333
- 2. Implement following the exact patterns shown:
334
- - Use correct import paths
335
- - Apply proper variant props
336
- - Follow composition patterns for complex components
337
-
338
- 3. Never guess component APIs—always verify first
339
-
340
- Example flow:
341
- - Need a Button? → Call shadcn demo for Button → See variants (default, destructive, outline, etc.) → Implement with correct props
342
- ```
343
-
344
- ### MagicPatterns MCP Pattern
345
-
346
- When user provides a MagicPatterns link:
347
-
348
- ```markdown
349
- ## MagicPatterns Link Handling
350
-
351
- **NEVER build from scratch when a MagicPatterns link is provided.**
352
-
353
- 1. Extract the pattern/design ID from the link
354
- 2. Use MagicPatterns MCP to fetch the generated code
355
- 3. Adapt the fetched code for the project:
356
- - Update imports to match project structure
357
- - Apply project's styling conventions (Tailwind config, CSS variables)
358
- - Integrate with project's state management if needed
359
- - Ensure component follows project's file organization
360
-
361
- 4. The MagicPatterns design represents user's intent—preserve the design, adapt the implementation
362
- ```
354
+ If a critical MCP is unavailable, the **workflow** will escalate and halt. Agents are minimal wrappers that only provide persona context and invoke the workflow.
363
355
 
364
356
  ### Background vs Foreground Agent Warning
365
357
 
@@ -376,9 +368,9 @@ If your agent needs MCP access:
376
368
 
377
369
  ### Templates
378
370
 
379
- See the dedicated template files for full examples and minimal templates:
380
- - **Story-Based**: `STORY-AGENT-TEMPLATE.md`
381
- - **Non-Story**: `NON-STORY-AGENT-TEMPLATE.md`
371
+ See the template files for full examples and minimal templates:
372
+ - **Story Agents** (default): `STORY-AGENT-TEMPLATE.md` - Universal template with smart routing
373
+ - **Non-Story Agents** (rare): `NON-STORY-AGENT-TEMPLATE.md`
382
374
 
383
375
  ### Available Tools Reference
384
376