@torka/claude-workflows 0.2.0 → 0.3.1
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.
- package/bmad-workflows/bmm/workflows/4-implementation/implement-epic-with-subagents/completion-summary-implement-epic-with-subagents.md +103 -0
- package/bmad-workflows/bmm/workflows/4-implementation/implement-epic-with-subagents/steps/step-01-init.md +250 -0
- package/bmad-workflows/bmm/workflows/4-implementation/implement-epic-with-subagents/steps/step-01b-continue.md +305 -0
- package/bmad-workflows/bmm/workflows/4-implementation/implement-epic-with-subagents/steps/step-01c-new.md +434 -0
- package/bmad-workflows/bmm/workflows/4-implementation/implement-epic-with-subagents/steps/step-02-orchestrate.md +440 -0
- package/bmad-workflows/bmm/workflows/4-implementation/implement-epic-with-subagents/steps/step-03-complete.md +476 -0
- package/bmad-workflows/bmm/workflows/4-implementation/implement-epic-with-subagents/templates/epic-completion-report.md +62 -0
- package/bmad-workflows/bmm/workflows/4-implementation/implement-epic-with-subagents/validation/checklist.md +121 -0
- package/bmad-workflows/bmm/workflows/4-implementation/implement-epic-with-subagents/workflow-plan-implement-epic-with-subagents.md +758 -0
- package/bmad-workflows/bmm/workflows/4-implementation/implement-epic-with-subagents/workflow.md +101 -0
- package/bmad-workflows/bmm/workflows/4-implementation/implement-epic-with-subagents/workflow.yaml +87 -0
- package/install.js +12 -5
- package/package.json +2 -1
- package/uninstall.js +57 -0
package/bmad-workflows/bmm/workflows/4-implementation/implement-epic-with-subagents/workflow.md
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: implement-epic-with-subagents
|
|
3
|
+
description: "Automate entire epic execution by orchestrating sub-agents to execute all stories sequentially with minimal human intervention"
|
|
4
|
+
web_bundle: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Implement Epic with Sub-Agents
|
|
8
|
+
|
|
9
|
+
**Goal:** Automate entire epic execution by orchestrating specialized sub-agents to implement all stories sequentially, with minimal human intervention. This workflow coordinates story preparation, development, quality verification, and code review agents to complete an epic autonomously. Supports optional git worktree isolation for parallel development.
|
|
10
|
+
|
|
11
|
+
**Your Role:** In addition to your name, communication_style, and persona, you are also an Epic Execution Orchestrator collaborating with developers and project managers. This is a partnership, not a client-vendor relationship. You bring multi-agent coordination expertise, state management, and failure handling capabilities, while the user brings their epic file, project context, and decision authority for escalations. Work together as equals.
|
|
12
|
+
|
|
13
|
+
> **Meta-Workflow Notice:** This is an autonomous orchestration workflow designed for minimal human intervention during execution. Unlike standard BMAD workflows that use frequent user checkpoints, this workflow operates autonomously once initiated, only pausing for critical escalations or failures. This is an intentional design choice for the meta-workflow/orchestrator pattern.
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## WORKFLOW ARCHITECTURE
|
|
18
|
+
|
|
19
|
+
This uses **step-file architecture** with autonomous execution patterns:
|
|
20
|
+
|
|
21
|
+
### Core Principles
|
|
22
|
+
|
|
23
|
+
- **Micro-file Design**: Each step is a self-contained instruction file that is part of an overall workflow that must be followed exactly
|
|
24
|
+
- **Just-In-Time Loading**: Only the current step file is in memory - never load future step files until directed
|
|
25
|
+
- **Sequential Enforcement**: Sequence within step files must be completed in order, no skipping or optimization allowed
|
|
26
|
+
- **State Tracking**: Document progress in epic-specific sidecar state files (`epic-{N}-state.yaml`) for execution tracking and resumption
|
|
27
|
+
- **Append-Only Building**: Build completion reports by appending content as directed to output files
|
|
28
|
+
|
|
29
|
+
### Step Processing Rules
|
|
30
|
+
|
|
31
|
+
1. **READ COMPLETELY**: Always read the entire step file before taking any action
|
|
32
|
+
2. **FOLLOW SEQUENCE**: Execute all numbered sections in order, never deviate
|
|
33
|
+
3. **WAIT FOR INPUT**: At initialization and escalation points, halt and wait for user input
|
|
34
|
+
4. **CHECK CONTINUATION**: Proceed to next step only when current step logic completes
|
|
35
|
+
5. **SAVE STATE**: Update sidecar state file before transitioning between steps or phases
|
|
36
|
+
6. **LOAD NEXT**: When directed, load, read entire file, then execute the next step file
|
|
37
|
+
|
|
38
|
+
### Critical Rules (NO EXCEPTIONS)
|
|
39
|
+
|
|
40
|
+
- **NEVER** load multiple step files simultaneously
|
|
41
|
+
- **ALWAYS** read entire step file before execution
|
|
42
|
+
- **NEVER** skip steps or optimize the sequence
|
|
43
|
+
- **ALWAYS** update sidecar state after every phase completion
|
|
44
|
+
- **ALWAYS** follow the exact instructions in the step file
|
|
45
|
+
- **ALWAYS** halt at escalation points and wait for user input
|
|
46
|
+
- **NEVER** proceed after quality gate failure without retry or escalation
|
|
47
|
+
|
|
48
|
+
### Autonomous Execution Pattern
|
|
49
|
+
|
|
50
|
+
This workflow uses an **autonomous loop pattern** in step-02-orchestrate:
|
|
51
|
+
- Stories are processed sequentially without user confirmation between stories
|
|
52
|
+
- User intervention occurs only at: initialization, failures, escalations, and completion
|
|
53
|
+
- Progress is reported after each story completion
|
|
54
|
+
- State is persisted to allow resumption if interrupted
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## INITIALIZATION SEQUENCE
|
|
59
|
+
|
|
60
|
+
### 1. Configuration Loading
|
|
61
|
+
|
|
62
|
+
Load and read full config from `{project-root}/_bmad/bmm/config.yaml` and resolve:
|
|
63
|
+
|
|
64
|
+
- `output_folder`, `user_name`, `communication_language`, `document_output_language`, `implementation_artifacts`
|
|
65
|
+
|
|
66
|
+
Additional configuration is available in `workflow.yaml` including:
|
|
67
|
+
- Agent references (story-prep, quality-gate, code-reviewer, specialists)
|
|
68
|
+
- Execution settings (coverage threshold, max retries, auto-commit)
|
|
69
|
+
- Input/output file paths
|
|
70
|
+
|
|
71
|
+
### 2. First Step Execution
|
|
72
|
+
|
|
73
|
+
Load, read the full file and then execute `{workflow_path}/steps/step-01-init.md` to begin the workflow.
|
|
74
|
+
|
|
75
|
+
If a sidecar state file exists with pending work, step-01 will automatically route to `step-01b-continue.md` for resumption.
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## WORKFLOW STEPS
|
|
80
|
+
|
|
81
|
+
| Step | File | Purpose |
|
|
82
|
+
|------|------|---------|
|
|
83
|
+
| 1 | step-01-init.md | Entry router - detect context (worktree/main), discover sidecars, route to appropriate step |
|
|
84
|
+
| 1b | step-01b-continue.md | Resume from previous session using sidecar state |
|
|
85
|
+
| 1c | step-01c-new.md | New epic setup - mode selection, worktree creation, prerequisites, agent creation |
|
|
86
|
+
| 2 | step-02-orchestrate.md | Main autonomous loop - execute all stories with sub-agents |
|
|
87
|
+
| 3 | step-03-complete.md | Generate completion report, create PR, handle worktree cleanup |
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## AGENT COORDINATION
|
|
92
|
+
|
|
93
|
+
This workflow orchestrates three specialized agents per story:
|
|
94
|
+
|
|
95
|
+
| Agent | Purpose | Handoff |
|
|
96
|
+
|-------|---------|---------|
|
|
97
|
+
| **story-prep-master** | Create developer-ready story file from epic | Story file path |
|
|
98
|
+
| **specialist/dev agent** | Implement story with tests (TDD) | Files changed, coverage, test results |
|
|
99
|
+
| **principal-code-reviewer** | Code review, quality assessment, auto-fixes | Approval status, findings |
|
|
100
|
+
|
|
101
|
+
Each agent receives fresh context and returns structured handoff messages for orchestration.
|
package/bmad-workflows/bmm/workflows/4-implementation/implement-epic-with-subagents/workflow.yaml
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
name: implement-epic-with-subagents
|
|
2
|
+
description: "Automate entire epic execution by orchestrating sub-agents to execute all stories sequentially with minimal human intervention"
|
|
3
|
+
author: "BMad"
|
|
4
|
+
web_bundle: true
|
|
5
|
+
|
|
6
|
+
# Critical variables from config
|
|
7
|
+
config_source: "{project-root}/_bmad/bmm/config.yaml"
|
|
8
|
+
output_folder: "{config_source}:output_folder"
|
|
9
|
+
user_name: "{config_source}:user_name"
|
|
10
|
+
communication_language: "{config_source}:communication_language"
|
|
11
|
+
document_output_language: "{config_source}:document_output_language"
|
|
12
|
+
implementation_artifacts: "{config_source}:implementation_artifacts"
|
|
13
|
+
date: system-generated
|
|
14
|
+
|
|
15
|
+
# Workflow components
|
|
16
|
+
installed_path: "{project-root}/_bmad/bmm/workflows/4-implementation/implement-epic-with-subagents"
|
|
17
|
+
workflow_file: "{installed_path}/workflow.yaml"
|
|
18
|
+
first_step: "{installed_path}/steps/step-01-init.md"
|
|
19
|
+
|
|
20
|
+
# Input files
|
|
21
|
+
epic_file: "" # User provides or auto-discover
|
|
22
|
+
sprint_status: "{implementation_artifacts}/sprint-status.yaml"
|
|
23
|
+
project_context: "**/project-context.md"
|
|
24
|
+
|
|
25
|
+
# Output files (legacy - kept for reference, see sidecar_folder below)
|
|
26
|
+
# sidecar_file: "{output_folder}/epic-execution-state.yaml" # DEPRECATED
|
|
27
|
+
completion_report: "{output_folder}/epic-reports/epic-completion-{epic_name}-{date}.md"
|
|
28
|
+
|
|
29
|
+
# Agent references
|
|
30
|
+
story_prep_agent: ".claude/agents/story-prep-master.md"
|
|
31
|
+
code_review_agent: ".claude/agents/principal-code-reviewer.md"
|
|
32
|
+
specialist_agents_folder: ".claude/agents/vt-bmad-dev-agents/"
|
|
33
|
+
fallback_dev_agent: "_bmad/bmm/agents/dev.md"
|
|
34
|
+
|
|
35
|
+
# Execution configuration
|
|
36
|
+
coverage_threshold: 80
|
|
37
|
+
max_retries: 3
|
|
38
|
+
auto_commit: true
|
|
39
|
+
|
|
40
|
+
# Git workflow settings
|
|
41
|
+
feature_branch_prefix: "feature/epic-"
|
|
42
|
+
auto_create_branch: true
|
|
43
|
+
base_branch: "main"
|
|
44
|
+
|
|
45
|
+
# Agent creation settings
|
|
46
|
+
agent_creator_skill: ".claude/skills/agent-creator/SKILL.md"
|
|
47
|
+
specialist_agents_created: [] # Populated by init step
|
|
48
|
+
|
|
49
|
+
# PR settings
|
|
50
|
+
auto_create_pr: true
|
|
51
|
+
pr_base_branch: "main"
|
|
52
|
+
|
|
53
|
+
# Retrospective settings
|
|
54
|
+
retrospective_workflow: "_bmad/bmm/workflows/4-implementation/retrospective"
|
|
55
|
+
|
|
56
|
+
standalone: true
|
|
57
|
+
|
|
58
|
+
# ═══════════════════════════════════════════
|
|
59
|
+
# WORKTREE CONFIGURATION
|
|
60
|
+
# ═══════════════════════════════════════════
|
|
61
|
+
|
|
62
|
+
# Worktree mode: "ask" | "always" | "never"
|
|
63
|
+
# ask - Prompt user each time (default)
|
|
64
|
+
# always - Always use worktree, skip prompt
|
|
65
|
+
# never - Never use worktree, classic behavior
|
|
66
|
+
worktree_mode: "ask"
|
|
67
|
+
|
|
68
|
+
# Directory pattern for worktrees (relative to main repo parent)
|
|
69
|
+
# Available variables: {project_name}, {epic_number}, {epic_name_sanitized}
|
|
70
|
+
worktree_directory_pattern: "../{project_name}-epic-{epic_number}-{epic_name_sanitized}"
|
|
71
|
+
|
|
72
|
+
# Branch pattern for worktree branches
|
|
73
|
+
worktree_branch_pattern: "feature/epic-{epic_number}-{epic_name_sanitized}"
|
|
74
|
+
|
|
75
|
+
# Dependency installation command (auto-detected if empty)
|
|
76
|
+
# Examples: "npm install", "yarn", "pnpm install", "bun install"
|
|
77
|
+
dependency_command: ""
|
|
78
|
+
|
|
79
|
+
# ═══════════════════════════════════════════
|
|
80
|
+
# SIDECAR CONFIGURATION
|
|
81
|
+
# ═══════════════════════════════════════════
|
|
82
|
+
|
|
83
|
+
# Sidecar storage folder (will be gitignored)
|
|
84
|
+
sidecar_folder: "{output_folder}/epic-executions"
|
|
85
|
+
|
|
86
|
+
# Sidecar file pattern
|
|
87
|
+
sidecar_file_pattern: "epic-{epic_number}-state.yaml"
|
package/install.js
CHANGED
|
@@ -129,10 +129,17 @@ function install() {
|
|
|
129
129
|
};
|
|
130
130
|
|
|
131
131
|
// Define what to copy and where
|
|
132
|
+
// Note: dest is relative to targetBase (.claude/)
|
|
133
|
+
// Use '../' to go to project root for _bmad/ paths
|
|
132
134
|
const mappings = [
|
|
133
135
|
{ src: 'commands', dest: 'commands' },
|
|
134
136
|
{ src: 'agents', dest: 'agents' },
|
|
135
137
|
{ src: 'skills', dest: 'skills' },
|
|
138
|
+
// BMAD workflows (installed to project root, not .claude/)
|
|
139
|
+
{
|
|
140
|
+
src: 'bmad-workflows/bmm/workflows/4-implementation/implement-epic-with-subagents',
|
|
141
|
+
dest: '../_bmad/bmm/workflows/4-implementation/implement-epic-with-subagents',
|
|
142
|
+
},
|
|
136
143
|
];
|
|
137
144
|
|
|
138
145
|
for (const { src, dest } of mappings) {
|
|
@@ -156,13 +163,13 @@ function install() {
|
|
|
156
163
|
log(' 2. Try /designer-founder for UI/UX design workflows\n');
|
|
157
164
|
|
|
158
165
|
// Note about BMAD dependencies
|
|
159
|
-
log(colors.yellow + '⚠️ Note: Some components
|
|
160
|
-
log(' -
|
|
161
|
-
log(' -
|
|
162
|
-
log('
|
|
163
|
-
log('\n Standalone components work without dependencies:');
|
|
166
|
+
log(colors.yellow + '⚠️ Note: Some components work better with BMAD Method installed:' + colors.reset);
|
|
167
|
+
log(' - principal-code-reviewer (uses BMAD code-review workflow)');
|
|
168
|
+
log(' - story-prep-master (uses BMAD story workflows)');
|
|
169
|
+
log('\n Fully included (no external dependencies):');
|
|
164
170
|
log(' ✓ git-cleanup-and-merge');
|
|
165
171
|
log(' ✓ plan-parallelization');
|
|
172
|
+
log(' ✓ implement-epic-with-subagents (workflow files included)');
|
|
166
173
|
log(' ✓ agent-creator skill');
|
|
167
174
|
log(' ✓ designer-founder skill\n');
|
|
168
175
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@torka/claude-workflows",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "Claude Code workflow helpers: epic automation, git cleanup, agents, and design workflows",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"claude-code",
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"commands",
|
|
23
23
|
"agents",
|
|
24
24
|
"skills",
|
|
25
|
+
"bmad-workflows",
|
|
25
26
|
"examples",
|
|
26
27
|
".claude-plugin",
|
|
27
28
|
"install.js",
|
package/uninstall.js
CHANGED
|
@@ -80,6 +80,32 @@ const INSTALLED_FILES = {
|
|
|
80
80
|
],
|
|
81
81
|
};
|
|
82
82
|
|
|
83
|
+
/**
|
|
84
|
+
* BMAD workflow files installed to _bmad/ (relative to project root)
|
|
85
|
+
* These use ../ from .claude/ to reach project root
|
|
86
|
+
*/
|
|
87
|
+
const BMAD_INSTALLED_FILES = {
|
|
88
|
+
'../_bmad/bmm/workflows/4-implementation/implement-epic-with-subagents': [
|
|
89
|
+
'workflow.md',
|
|
90
|
+
'workflow.yaml',
|
|
91
|
+
'workflow-plan-implement-epic-with-subagents.md',
|
|
92
|
+
'completion-summary-implement-epic-with-subagents.md',
|
|
93
|
+
],
|
|
94
|
+
'../_bmad/bmm/workflows/4-implementation/implement-epic-with-subagents/steps': [
|
|
95
|
+
'step-01-init.md',
|
|
96
|
+
'step-01b-continue.md',
|
|
97
|
+
'step-01c-new.md',
|
|
98
|
+
'step-02-orchestrate.md',
|
|
99
|
+
'step-03-complete.md',
|
|
100
|
+
],
|
|
101
|
+
'../_bmad/bmm/workflows/4-implementation/implement-epic-with-subagents/templates': [
|
|
102
|
+
'epic-completion-report.md',
|
|
103
|
+
],
|
|
104
|
+
'../_bmad/bmm/workflows/4-implementation/implement-epic-with-subagents/validation': [
|
|
105
|
+
'checklist.md',
|
|
106
|
+
],
|
|
107
|
+
};
|
|
108
|
+
|
|
83
109
|
/**
|
|
84
110
|
* Determine the target .claude directory based on installation context
|
|
85
111
|
*/
|
|
@@ -181,6 +207,37 @@ function uninstall() {
|
|
|
181
207
|
}
|
|
182
208
|
}
|
|
183
209
|
|
|
210
|
+
// Remove BMAD workflow files (installed to _bmad/ relative to project root)
|
|
211
|
+
log('\n' + colors.bold + 'BMAD Workflows' + colors.reset);
|
|
212
|
+
for (const [dir, files] of Object.entries(BMAD_INSTALLED_FILES)) {
|
|
213
|
+
const displayDir = dir.replace('../', '');
|
|
214
|
+
log(`\n${colors.bold}${displayDir}/${colors.reset}`);
|
|
215
|
+
for (const file of files) {
|
|
216
|
+
const filePath = path.join(targetBase, dir, file);
|
|
217
|
+
removeFile(filePath, stats);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
// Try to remove empty directories
|
|
221
|
+
const dirPath = path.join(targetBase, dir);
|
|
222
|
+
if (removeEmptyDir(dirPath)) {
|
|
223
|
+
log(` ○ Removed empty directory: ${displayDir}/`, 'yellow');
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
// Clean up empty BMAD directories (from deepest to shallowest)
|
|
228
|
+
const bmadDirs = [
|
|
229
|
+
'../_bmad/bmm/workflows/4-implementation/implement-epic-with-subagents/validation',
|
|
230
|
+
'../_bmad/bmm/workflows/4-implementation/implement-epic-with-subagents/templates',
|
|
231
|
+
'../_bmad/bmm/workflows/4-implementation/implement-epic-with-subagents/steps',
|
|
232
|
+
'../_bmad/bmm/workflows/4-implementation/implement-epic-with-subagents',
|
|
233
|
+
];
|
|
234
|
+
for (const bmadSubDir of bmadDirs) {
|
|
235
|
+
const dirPath = path.join(targetBase, bmadSubDir);
|
|
236
|
+
if (removeEmptyDir(dirPath)) {
|
|
237
|
+
log(` ○ Removed empty directory: ${bmadSubDir.replace('../', '')}/`, 'yellow');
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
184
241
|
// Try to remove skill directories if empty
|
|
185
242
|
const skillDirs = [
|
|
186
243
|
'skills/designer-founder/tools/superdesign-assets',
|