moflo 4.6.12 → 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.
Files changed (33) hide show
  1. package/.claude/settings.json +4 -4
  2. package/.claude/skills/flo/SKILL.md +80 -58
  3. package/.claude/workflow-state.json +1 -5
  4. package/README.md +467 -452
  5. package/bin/hooks.mjs +7 -3
  6. package/bin/setup-project.mjs +251 -251
  7. package/package.json +121 -121
  8. package/src/@claude-flow/cli/README.md +307 -7391
  9. package/src/@claude-flow/cli/dist/src/commands/doctor.js +1 -1
  10. package/src/@claude-flow/cli/dist/src/commands/embeddings.js +4 -4
  11. package/src/@claude-flow/cli/dist/src/commands/init.js +35 -8
  12. package/src/@claude-flow/cli/dist/src/commands/orc.d.ts +8 -4
  13. package/src/@claude-flow/cli/dist/src/commands/orc.js +152 -15
  14. package/src/@claude-flow/cli/dist/src/commands/swarm.js +2 -2
  15. package/src/@claude-flow/cli/dist/src/init/claudemd-generator.js +55 -33
  16. package/src/@claude-flow/cli/dist/src/init/executor.js +34 -38
  17. package/src/@claude-flow/cli/dist/src/init/helpers-generator.d.ts +0 -36
  18. package/src/@claude-flow/cli/dist/src/init/helpers-generator.js +6 -984
  19. package/src/@claude-flow/cli/dist/src/init/index.d.ts +1 -1
  20. package/src/@claude-flow/cli/dist/src/init/index.js +1 -1
  21. package/src/@claude-flow/cli/dist/src/init/moflo-init.js +78 -5
  22. package/src/@claude-flow/cli/dist/src/init/settings-generator.js +50 -120
  23. package/src/@claude-flow/cli/dist/src/mcp-tools/hooks-tools.js +275 -32
  24. package/src/@claude-flow/cli/dist/src/plugins/store/discovery.js +4 -204
  25. package/src/@claude-flow/cli/dist/src/plugins/tests/standalone-test.js +4 -4
  26. package/src/@claude-flow/cli/dist/src/runtime/headless.d.ts +3 -3
  27. package/src/@claude-flow/cli/dist/src/runtime/headless.js +3 -3
  28. package/src/@claude-flow/cli/dist/src/services/agentic-flow-bridge.d.ts +3 -3
  29. package/src/@claude-flow/cli/dist/src/services/agentic-flow-bridge.js +3 -1
  30. package/src/@claude-flow/cli/dist/src/services/headless-worker-executor.js +98 -84
  31. package/src/@claude-flow/cli/dist/src/services/workflow-gate.js +21 -1
  32. package/src/@claude-flow/cli/dist/src/transfer/store/tests/standalone-test.js +4 -4
  33. package/src/@claude-flow/cli/package.json +110 -110
@@ -165,10 +165,10 @@
165
165
  },
166
166
  "attribution": {
167
167
  "commit": "Co-Authored-By: moflo <noreply@motailz.com>",
168
- "pr": "\ud83e\udd16 Generated with [claude-flow](https://github.com/eric-cielo/moflo)"
168
+ "pr": "\ud83e\udd16 Generated with [moflo](https://github.com/eric-cielo/moflo)"
169
169
  },
170
170
  "claudeFlow": {
171
- "version": "4.6.12",
171
+ "version": "4.7.2",
172
172
  "enabled": true,
173
173
  "modelPreferences": {
174
174
  "default": "claude-opus-4-6",
@@ -275,9 +275,9 @@
275
275
  },
276
276
  "mcpServers": {
277
277
  "claude-flow": {
278
- "command": "node",
278
+ "command": "npx",
279
279
  "args": [
280
- "/workspaces/claude-flow/v3/@claude-flow/cli/bin/cli.js",
280
+ "moflo",
281
281
  "mcp",
282
282
  "start"
283
283
  ]
@@ -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, enhance, and execute GitHub issues automatically.
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 -e <issue-number> # Enhance only: research and update ticket, then STOP
18
- /flo --enhance <issue-number> # Same as -e
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 -sw 123 # SWARM mode (explicit)
30
- /flo --swarm 123 # Same as -sw
31
- /flo -hv 123 # HIVE-MIND mode - consensus-based coordination
32
- /flo --hive 123 # Same as -hv
33
- /flo -n 123 # NAKED mode - single Claude, no agents
34
- /flo --naked 123 # Same as -n
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 -> enhance -> implement -> test -> PR)
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 -e 123 # Swarm + enhance only (no implementation)
63
- /flo -hv -e 123 # Hive-mind + enhance only
64
- /flo -n -r 123 # Naked + research only
65
- /flo --swarm --enhance 123 # Explicit swarm + enhance only
66
- /flo -n 123 # Naked + full workflow (still runs all tests)
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/--naked. "Simple" is a trap. Tasks have
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 --naked explicitly.
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 -> Enhance -> Execute -> Testing -> Simplify -> PR+Done
89
+ Research -> Ticket -> Execute -> Testing -> Simplify -> PR+Done
89
90
 
90
91
  Research: Fetch issue, search memory, read guidance, find files
91
- Enhance: Update GitHub issue with tech analysis, affected files, impl plan
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** (-hv) | Consensus-based coordination for architecture decisions |
111
- | **NAKED** (-n) | Single Claude, no agent spawning. Only when user explicitly requests. |
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 Enhancement Status
121
- Look for `## Implementation Plan` marker in issue body.
122
- - **If present**: Issue already enhanced, skip to execute or confirm
123
- - **If absent**: Proceed with research and enhancement
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: Enhance (-e includes research + enhancement)
151
+ ## Phase 2: Ticket (-t creates or updates a ticket)
151
152
 
152
- ### 2.1 Build Enhancement
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
- **Technical Analysis** - Root cause (bugs) or approach (features), impact, risk factors
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
- **Affected Files** - Files to modify (with line numbers), new files, deletions
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
- **Implementation Plan** - Numbered steps with clear actions, dependencies, decision points
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 Plan** - Unit tests to add/update, integration tests needed, manual testing checklist
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
- **Estimates** - Complexity (Low/Medium/High), scope (# files, # new tests)
174
+ ### 2.2 Create or Update GitHub Issue
164
175
 
165
- ### 2.2 Update GitHub Issue
176
+ **If issue number was given** (update existing):
166
177
  ```bash
167
- gh issue edit <issue-number> --body "<original body + Technical Analysis + Affected Files + Implementation Plan + Test Plan + Estimates>"
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
- ### 2.3 Add Enhancement Comment
182
+ **If title was given** (create new):
171
183
  ```bash
172
- gh issue comment <issue-number> --body "Issue enhanced with implementation plan. Ready for execution."
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 enhance)
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 enhanced issue. No prompts - execute all steps.
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, enhance, research
317
- let execMode = "swarm"; // swarm (default), hive, naked
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 === "-e" || arg === "--enhance") {
325
- workflowMode = "enhance";
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 === "-sw" || arg === "--swarm") {
345
+ else if (arg === "-s" || arg === "--swarm") {
332
346
  execMode = "swarm";
333
- } else if (arg === "-hv" || arg === "--hive") {
347
+ } else if (arg === "-h" || arg === "--hive") {
334
348
  execMode = "hive";
335
- } else if (arg === "-n" || arg === "--naked") {
336
- execMode = "naked";
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
- if (!issueNumber) {
346
- throw new Error("Issue number required. Usage: /flo <issue-number>");
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 -> Enhance -> Implement -> Test -> Simplify -> PR | PR created |
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
- | **Enhance** | `/flo -e 123` | Research -> Enhance | Issue updated |
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) | `-sw`, `--swarm` | Multi-agent via Task tool | Always, unless explicitly overridden |
374
- | **Hive-Mind** | `-hv`, `--hive` | Consensus-based coordination | Architecture decisions, tradeoffs |
375
- | **Naked** | `-n`, `--naked` | Single Claude, no agents | User explicitly wants simple mode |
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 (-hv, --hive)
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
- ### NAKED Mode (-n, --naked)
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
@@ -1,9 +1,5 @@
1
1
  {
2
2
  "tasksCreated": false,
3
3
  "taskCount": 0,
4
- "memorySearched": false,
5
- "memoryRequired": true,
6
- "interactionCount": 10,
7
- "sessionStart": null,
8
- "lastBlockedAt": "2026-03-20T20:34:44.738Z"
4
+ "memorySearched": true
9
5
  }