moflo 4.7.1 → 4.7.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.
- package/.claude/settings.json +1 -1
- package/.claude/skills/flo/SKILL.md +80 -58
- package/README.md +467 -452
- package/bin/setup-project.mjs +251 -251
- package/package.json +121 -121
- package/src/@claude-flow/cli/README.md +452 -452
- package/src/@claude-flow/cli/dist/src/commands/orc.d.ts +8 -4
- package/src/@claude-flow/cli/dist/src/commands/orc.js +152 -15
- package/src/@claude-flow/cli/dist/src/init/claudemd-generator.js +313 -313
- package/src/@claude-flow/cli/dist/src/init/executor.js +453 -453
- package/src/@claude-flow/cli/dist/src/init/helpers-generator.js +146 -146
- package/src/@claude-flow/cli/dist/src/runtime/headless.js +28 -28
- package/src/@claude-flow/cli/dist/src/services/headless-worker-executor.js +84 -84
- package/src/@claude-flow/cli/package.json +110 -110
package/.claude/settings.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: flo
|
|
3
3
|
description: MoFlo ticket workflow - analyze and execute GitHub issues
|
|
4
|
-
arguments: "[options] <issue-number>"
|
|
4
|
+
arguments: "[options] <issue-number | title>"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# /flo - MoFlo Ticket Workflow
|
|
8
8
|
|
|
9
|
-
Research,
|
|
9
|
+
Research, create tickets for, and execute GitHub issues automatically.
|
|
10
10
|
|
|
11
11
|
**Arguments:** $ARGUMENTS
|
|
12
12
|
|
|
@@ -14,8 +14,9 @@ Research, enhance, and execute GitHub issues automatically.
|
|
|
14
14
|
|
|
15
15
|
```
|
|
16
16
|
/flo <issue-number> # Full workflow with SWARM (default)
|
|
17
|
-
/flo -
|
|
18
|
-
/flo
|
|
17
|
+
/flo -t <issue-number> # Ticket only: research and update ticket, then STOP
|
|
18
|
+
/flo -t <title> # Create a NEW ticket with description, acceptance criteria, test cases
|
|
19
|
+
/flo --ticket <issue-number|title> # Same as -t
|
|
19
20
|
/flo -r <issue-number> # Research only: analyze issue, output findings
|
|
20
21
|
/flo --research <issue-number> # Same as -r
|
|
21
22
|
```
|
|
@@ -26,12 +27,12 @@ Also available as `/fl` (shorthand alias).
|
|
|
26
27
|
|
|
27
28
|
```
|
|
28
29
|
/flo 123 # SWARM mode (default) - multi-agent coordination
|
|
29
|
-
/flo -
|
|
30
|
-
/flo --swarm 123 # Same as -
|
|
31
|
-
/flo -
|
|
32
|
-
/flo --hive 123 # Same as -
|
|
33
|
-
/flo -n 123 #
|
|
34
|
-
/flo --
|
|
30
|
+
/flo -s 123 # SWARM mode (explicit)
|
|
31
|
+
/flo --swarm 123 # Same as -s
|
|
32
|
+
/flo -h 123 # HIVE-MIND mode - consensus-based coordination
|
|
33
|
+
/flo --hive 123 # Same as -h
|
|
34
|
+
/flo -n 123 # NORMAL mode - single Claude, no agents
|
|
35
|
+
/flo --normal 123 # Same as -n
|
|
35
36
|
```
|
|
36
37
|
|
|
37
38
|
### Epic Handling
|
|
@@ -50,7 +51,7 @@ Also available as `/fl` (shorthand alias).
|
|
|
50
51
|
**Sequential Processing:** When an epic is selected:
|
|
51
52
|
1. List all child stories/tasks (from checklist or linked issues)
|
|
52
53
|
2. Process each story **one at a time** in order
|
|
53
|
-
3. Each story goes through the full workflow (research ->
|
|
54
|
+
3. Each story goes through the full workflow (research -> ticket -> implement -> test -> PR)
|
|
54
55
|
4. After each story's PR is created, move to the next story
|
|
55
56
|
5. Continue until all stories are complete
|
|
56
57
|
|
|
@@ -59,20 +60,20 @@ Also available as `/fl` (shorthand alias).
|
|
|
59
60
|
```
|
|
60
61
|
/flo 123 # Swarm + full workflow (default) - includes ALL tests
|
|
61
62
|
/flo 42 # If #42 is epic, processes stories sequentially
|
|
62
|
-
/flo -
|
|
63
|
-
/flo -
|
|
64
|
-
/flo -n -r 123 #
|
|
65
|
-
/flo --swarm --
|
|
66
|
-
/flo -n 123 #
|
|
63
|
+
/flo -t 123 # Swarm + ticket only (no implementation)
|
|
64
|
+
/flo -h -t 123 # Hive-mind + ticket only
|
|
65
|
+
/flo -n -r 123 # Normal + research only
|
|
66
|
+
/flo --swarm --ticket 123 # Explicit swarm + ticket only
|
|
67
|
+
/flo -n 123 # Normal + full workflow (still runs all tests)
|
|
67
68
|
```
|
|
68
69
|
|
|
69
70
|
## SWARM IS MANDATORY BY DEFAULT
|
|
70
71
|
|
|
71
72
|
Even if a task "looks simple", you MUST use swarm coordination unless
|
|
72
|
-
the user explicitly passes -n/--
|
|
73
|
+
the user explicitly passes -n/--normal. "Simple" is a trap. Tasks have
|
|
73
74
|
hidden complexity. Swarm catches it.
|
|
74
75
|
|
|
75
|
-
THE ONLY WAY TO SKIP SWARM: User passes -n or --
|
|
76
|
+
THE ONLY WAY TO SKIP SWARM: User passes -n or --normal explicitly.
|
|
76
77
|
|
|
77
78
|
## COMPREHENSIVE TESTING REQUIREMENT
|
|
78
79
|
|
|
@@ -85,10 +86,10 @@ PR CANNOT BE CREATED until all relevant tests pass.
|
|
|
85
86
|
## Workflow Overview
|
|
86
87
|
|
|
87
88
|
```
|
|
88
|
-
Research ->
|
|
89
|
+
Research -> Ticket -> Execute -> Testing -> Simplify -> PR+Done
|
|
89
90
|
|
|
90
91
|
Research: Fetch issue, search memory, read guidance, find files
|
|
91
|
-
|
|
92
|
+
Ticket: Create or update GitHub issue with description, acceptance criteria, test cases
|
|
92
93
|
Execute: Assign self, create branch, implement changes
|
|
93
94
|
Testing: Unit + Integration + E2E tests (ALL MUST PASS - gate)
|
|
94
95
|
Simplify: Run /simplify on changed code (gate - must run before PR)
|
|
@@ -107,8 +108,8 @@ PR+Done: Create PR, update issue status, store learnings
|
|
|
107
108
|
| Mode | Description |
|
|
108
109
|
|------|-------------|
|
|
109
110
|
| **SWARM** (default) | Multi-agent via Task tool: researcher, coder, tester, reviewer |
|
|
110
|
-
| **HIVE-MIND** (-
|
|
111
|
-
| **
|
|
111
|
+
| **HIVE-MIND** (-h) | Consensus-based coordination for architecture decisions |
|
|
112
|
+
| **NORMAL** (-n) | Single Claude, no agent spawning. Only when user explicitly requests. |
|
|
112
113
|
|
|
113
114
|
## Phase 1: Research (-r or default first step)
|
|
114
115
|
|
|
@@ -117,10 +118,10 @@ PR+Done: Create PR, update issue status, store learnings
|
|
|
117
118
|
gh issue view <issue-number> --json number,title,body,labels,state,assignees,comments,milestone
|
|
118
119
|
```
|
|
119
120
|
|
|
120
|
-
### 1.2 Check
|
|
121
|
-
Look for `##
|
|
122
|
-
- **If present**:
|
|
123
|
-
- **If absent**: Proceed with research and
|
|
121
|
+
### 1.2 Check Ticket Status
|
|
122
|
+
Look for `## Acceptance Criteria` marker in issue body.
|
|
123
|
+
- **If present**: Ticket already enhanced, skip to execute or confirm
|
|
124
|
+
- **If absent**: Proceed with research and ticket update
|
|
124
125
|
|
|
125
126
|
### 1.3 Search Memory FIRST
|
|
126
127
|
ALWAYS search memory BEFORE reading guidance or docs files.
|
|
@@ -147,32 +148,44 @@ Use Task tool with Explore agent to find:
|
|
|
147
148
|
- Existing patterns to follow
|
|
148
149
|
- Test coverage gaps
|
|
149
150
|
|
|
150
|
-
## Phase 2:
|
|
151
|
+
## Phase 2: Ticket (-t creates or updates a ticket)
|
|
151
152
|
|
|
152
|
-
|
|
153
|
-
Compile research into structured enhancement:
|
|
153
|
+
When given an issue number, `-t` enhances the existing ticket. When given a title (non-numeric argument), `-t` creates a new GitHub issue. Either way, the ticket MUST include all three of the following sections:
|
|
154
154
|
|
|
155
|
-
|
|
155
|
+
### 2.1 Build Ticket Content
|
|
156
|
+
Compile research into a well-structured ticket. The issue MUST include all three of the following sections:
|
|
156
157
|
|
|
157
|
-
**
|
|
158
|
+
**Detailed Description** — Clear, thorough explanation of what needs to be done and why. Include:
|
|
159
|
+
- Root cause analysis (bugs) or approach rationale (features)
|
|
160
|
+
- Impact and risk factors
|
|
161
|
+
- Affected files (with line numbers), new files, deletions
|
|
162
|
+
- Implementation plan: numbered steps with clear actions, dependencies, decision points
|
|
158
163
|
|
|
159
|
-
**
|
|
164
|
+
**Acceptance Criteria** — Specific, testable conditions that must be true for this issue to be considered complete. Write as a checklist:
|
|
165
|
+
- [ ] Criterion 1 (e.g., "API returns 200 with valid token")
|
|
166
|
+
- [ ] Criterion 2 (e.g., "Error message shown when input exceeds 255 chars")
|
|
167
|
+
- [ ] ...each criterion must be independently verifiable
|
|
160
168
|
|
|
161
|
-
**Test
|
|
169
|
+
**Suggested Test Cases** — Concrete test scenarios covering happy path, edge cases, and error conditions:
|
|
170
|
+
- Test case 1: description, input, expected output
|
|
171
|
+
- Test case 2: description, input, expected output
|
|
172
|
+
- Include unit, integration, and E2E test suggestions as appropriate
|
|
162
173
|
|
|
163
|
-
|
|
174
|
+
### 2.2 Create or Update GitHub Issue
|
|
164
175
|
|
|
165
|
-
|
|
176
|
+
**If issue number was given** (update existing):
|
|
166
177
|
```bash
|
|
167
|
-
gh issue edit <issue-number> --body "<original body +
|
|
178
|
+
gh issue edit <issue-number> --body "<original body + ## Description + ## Acceptance Criteria + ## Suggested Test Cases>"
|
|
179
|
+
gh issue comment <issue-number> --body "Ticket enhanced with description, acceptance criteria, and test cases. Ready for execution."
|
|
168
180
|
```
|
|
169
181
|
|
|
170
|
-
|
|
182
|
+
**If title was given** (create new):
|
|
171
183
|
```bash
|
|
172
|
-
gh issue
|
|
184
|
+
gh issue create --title "<title>" --body "<## Description + ## Acceptance Criteria + ## Suggested Test Cases>"
|
|
173
185
|
```
|
|
186
|
+
Print the new issue URL so the user can see it.
|
|
174
187
|
|
|
175
|
-
## Phase 3: Execute (default, runs automatically after
|
|
188
|
+
## Phase 3: Execute (default, runs automatically after ticket)
|
|
176
189
|
|
|
177
190
|
### 3.1 Assign Issue and Update Status
|
|
178
191
|
```bash
|
|
@@ -188,7 +201,7 @@ git checkout -b <type>/<issue-number>-<short-desc>
|
|
|
188
201
|
Types: `feature/`, `fix/`, `refactor/`, `docs/`
|
|
189
202
|
|
|
190
203
|
### 3.3 Implement
|
|
191
|
-
Follow the implementation plan from the
|
|
204
|
+
Follow the implementation plan from the ticket. No prompts - execute all steps.
|
|
192
205
|
|
|
193
206
|
## Phase 4: Testing (MANDATORY GATE)
|
|
194
207
|
|
|
@@ -313,37 +326,46 @@ function extractStories(epicBody) {
|
|
|
313
326
|
|
|
314
327
|
```javascript
|
|
315
328
|
const args = "$ARGUMENTS".trim().split(/\s+/);
|
|
316
|
-
let workflowMode = "full"; // full,
|
|
317
|
-
let execMode = "swarm"; // swarm (default), hive,
|
|
329
|
+
let workflowMode = "full"; // full, ticket, research
|
|
330
|
+
let execMode = "swarm"; // swarm (default), hive, normal
|
|
318
331
|
let issueNumber = null;
|
|
332
|
+
let titleWords = [];
|
|
319
333
|
|
|
320
334
|
for (let i = 0; i < args.length; i++) {
|
|
321
335
|
const arg = args[i];
|
|
322
336
|
|
|
323
337
|
// Workflow mode (what to do)
|
|
324
|
-
if (arg === "-
|
|
325
|
-
workflowMode = "
|
|
338
|
+
if (arg === "-t" || arg === "--ticket") {
|
|
339
|
+
workflowMode = "ticket";
|
|
326
340
|
} else if (arg === "-r" || arg === "--research") {
|
|
327
341
|
workflowMode = "research";
|
|
328
342
|
}
|
|
329
343
|
|
|
330
344
|
// Execution mode (how to do it)
|
|
331
|
-
else if (arg === "-
|
|
345
|
+
else if (arg === "-s" || arg === "--swarm") {
|
|
332
346
|
execMode = "swarm";
|
|
333
|
-
} else if (arg === "-
|
|
347
|
+
} else if (arg === "-h" || arg === "--hive") {
|
|
334
348
|
execMode = "hive";
|
|
335
|
-
} else if (arg === "-n" || arg === "--
|
|
336
|
-
execMode = "
|
|
349
|
+
} else if (arg === "-n" || arg === "--normal") {
|
|
350
|
+
execMode = "normal";
|
|
337
351
|
}
|
|
338
352
|
|
|
339
|
-
// Issue number
|
|
353
|
+
// Issue number or title text
|
|
340
354
|
else if (/^\d+$/.test(arg)) {
|
|
341
355
|
issueNumber = arg;
|
|
356
|
+
} else {
|
|
357
|
+
// Non-flag, non-numeric argument — collect as title words
|
|
358
|
+
titleWords.push(arg);
|
|
342
359
|
}
|
|
343
360
|
}
|
|
344
361
|
|
|
345
|
-
|
|
346
|
-
|
|
362
|
+
// In ticket mode, a title can be given instead of an issue number
|
|
363
|
+
let ticketTitle = titleWords.join(" ");
|
|
364
|
+
if (!issueNumber && !ticketTitle) {
|
|
365
|
+
throw new Error("Issue number or title required. Usage: /flo <issue-number | title>");
|
|
366
|
+
}
|
|
367
|
+
if (!issueNumber && workflowMode !== "ticket") {
|
|
368
|
+
throw new Error("Issue number required for full/research mode. Use -t for new tickets.");
|
|
347
369
|
}
|
|
348
370
|
|
|
349
371
|
// Log execution mode to prevent silent skipping
|
|
@@ -361,18 +383,18 @@ console.log("SIMPLIFY: /simplify command runs on changed code before PR.");
|
|
|
361
383
|
|
|
362
384
|
| Mode | Command | Steps | Stops After |
|
|
363
385
|
|------|---------|-------|-------------|
|
|
364
|
-
| **Full** (default) | `/flo 123` | Research ->
|
|
386
|
+
| **Full** (default) | `/flo 123` | Research -> Ticket -> Implement -> Test -> Simplify -> PR | PR created |
|
|
365
387
|
| **Epic** | `/flo 42` (epic) | For each story: Full workflow sequentially | All story PRs created |
|
|
366
|
-
| **
|
|
388
|
+
| **Ticket** | `/flo -t 123` | Research -> Ticket | Issue updated |
|
|
367
389
|
| **Research** | `/flo -r 123` | Research | Findings output |
|
|
368
390
|
|
|
369
391
|
### Execution Modes (how to do it)
|
|
370
392
|
|
|
371
393
|
| Mode | Flag | Description | When to Use |
|
|
372
394
|
|------|------|-------------|-------------|
|
|
373
|
-
| **Swarm** (DEFAULT) | `-
|
|
374
|
-
| **Hive-Mind** | `-
|
|
375
|
-
| **
|
|
395
|
+
| **Swarm** (DEFAULT) | `-s`, `--swarm` | Multi-agent via Task tool | Always, unless explicitly overridden |
|
|
396
|
+
| **Hive-Mind** | `-h`, `--hive` | Consensus-based coordination | Architecture decisions, tradeoffs |
|
|
397
|
+
| **Normal** | `-n`, `--normal` | Single Claude, no agents | User explicitly wants simple mode |
|
|
376
398
|
|
|
377
399
|
## Execution Mode Details
|
|
378
400
|
|
|
@@ -406,14 +428,14 @@ Task({ prompt: "...", subagent_type: "coder", run_in_background: true })
|
|
|
406
428
|
// 4. Wait for results, synthesize, continue
|
|
407
429
|
```
|
|
408
430
|
|
|
409
|
-
### HIVE-MIND Mode (-
|
|
431
|
+
### HIVE-MIND Mode (-h, --hive)
|
|
410
432
|
|
|
411
433
|
Use for consensus-based decisions:
|
|
412
434
|
- Architecture choices
|
|
413
435
|
- Approach tradeoffs
|
|
414
436
|
- Design decisions with multiple valid options
|
|
415
437
|
|
|
416
|
-
###
|
|
438
|
+
### NORMAL Mode (-n, --normal)
|
|
417
439
|
|
|
418
440
|
**Only when user explicitly requests.** Single Claude execution without agents.
|
|
419
441
|
- Still uses Task tool for tracking
|