@cliangdev/flux-plugin 0.2.0-dev.dc5e2c4 → 0.2.0-dev.e34d43b

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/README.md CHANGED
@@ -36,7 +36,7 @@ The installer automatically:
36
36
  | Command | Purpose |
37
37
  |---------|---------|
38
38
  | `/flux` | Smart entry point - shows status and guides you to the next step |
39
- | `/flux:prd` | Create product requirements through guided interview |
39
+ | `/flux:prd` | Create PRDs through discovery, research, and guided writing |
40
40
  | `/flux:breakdown` | Break PRDs into epics and tasks with acceptance criteria |
41
41
  | `/flux:implement` | Implement tasks with TDD workflow |
42
42
 
@@ -143,7 +143,7 @@ Check your current version:
143
143
 
144
144
  ```bash
145
145
  rm -rf ~/.claude/commands/flux.md ~/.claude/commands/flux
146
- rm -rf ~/.claude/skills/agent-creator ~/.claude/skills/epic-template ~/.claude/skills/flux-orchestrator ~/.claude/skills/prd-template
146
+ rm -rf ~/.claude/skills/agent-creator ~/.claude/skills/epic-template ~/.claude/skills/flux-orchestrator ~/.claude/skills/prd-writer
147
147
  rm -f ~/.claude/flux-version
148
148
  # Edit ~/.claude.json and remove the "flux" entry from "mcpServers"
149
149
  ```
@@ -152,7 +152,7 @@ rm -f ~/.claude/flux-version
152
152
 
153
153
  ```bash
154
154
  rm -rf .claude/commands/flux.md .claude/commands/flux
155
- rm -rf .claude/skills/agent-creator .claude/skills/epic-template .claude/skills/flux-orchestrator .claude/skills/prd-template
155
+ rm -rf .claude/skills/agent-creator .claude/skills/epic-template .claude/skills/flux-orchestrator .claude/skills/prd-writer
156
156
  rm -f .claude/flux-version
157
157
  # Edit .claude.json and remove the "flux" entry from "mcpServers"
158
158
  ```
@@ -16,10 +16,10 @@ Check if arguments were provided:
16
16
 
17
17
  ## Pre-checks
18
18
 
19
- 1. Call `get_project_context` to ensure Flux is initialized
20
- - If not initialized, tell user: "Run `/flux` first to initialize the project."
19
+ 1. If no ref provided, call `query_entities` with type=prd, status=APPROVED
20
+ - If error with `code: "PROJECT_NOT_INITIALIZED"`, tell user: "Run `/flux` first to initialize the project." and exit.
21
21
 
22
- 2. If no ref provided, call `query_entities` with type=prd, status=APPROVED
22
+ 2. If query successful but no approved PRDs found:
23
23
  - If no approved PRDs, tell user: "No approved PRDs found. Approve a PRD first or run `/flux:prd` to create one."
24
24
  - If multiple approved PRDs, use AskUserQuestion to let user select which one
25
25
 
package/commands/flux.md CHANGED
@@ -6,27 +6,78 @@ allowed-tools: mcp__plugin_flux_flux__*, AskUserQuestion, Read, Write
6
6
 
7
7
  # Flux Command
8
8
 
9
- You are the Flux orchestrator. Detect project state and guide the user to the appropriate next action.
9
+ You are the Flux orchestrator - the main entry point for all Flux operations. Your job is to:
10
+ 1. Detect project state and guide users to the appropriate next action
11
+ 2. Route to specialized commands based on user input
12
+ 3. Provide intelligent suggestions based on workflow state
13
+
14
+ ## Available Commands
15
+
16
+ | Command | Description |
17
+ |---------|-------------|
18
+ | `/flux` | Show project status and suggest next action |
19
+ | `/flux:prd` | Create or refine PRDs through guided interview |
20
+ | `/flux:breakdown` | Break approved PRD into dependency-ordered epics and tasks |
21
+ | `/flux:implement` | Implement tasks with TDD workflow using specialized coding agents |
22
+ | `/flux:linear` | Connect Flux project to Linear for issue tracking |
23
+
24
+ ## Subcommand Routing
25
+
26
+ When user provides arguments, route to the appropriate command:
27
+
28
+ | User Input | Action |
29
+ |------------|--------|
30
+ | `/flux` | Show status (see Main Flow) |
31
+ | `/flux version` | Call `get_version` and display result |
32
+ | `/flux status` | Call `render_status` with `{view: "full"}` |
33
+ | `/flux prd` or `/flux prd ...` | Delegate to `/flux:prd` with any additional args |
34
+ | `/flux breakdown` or `/flux breakdown ...` | Delegate to `/flux:breakdown` with any additional args |
35
+ | `/flux implement` or `/flux implement ...` | Delegate to `/flux:implement` with any additional args |
36
+ | `/flux linear` | Delegate to `/flux:linear` |
37
+ | `/flux help` | Show available commands and their purposes |
38
+
39
+ ## Available MCP Tools
40
+
41
+ These tools are available for programmatic access:
42
+
43
+ **Entity Management:**
44
+ - `create_prd`, `create_epic`, `create_task` - Create entities
45
+ - `update_entity`, `update_status`, `delete_entity` - Modify entities
46
+ - `get_entity`, `query_entities` - Retrieve entities
47
+
48
+ **Project:**
49
+ - `init_project` - Initialize new Flux project
50
+ - `get_stats` - Get entity counts by status
51
+ - `get_version` - Get plugin version
52
+ - `render_status` - Visual project status with progress bars
53
+
54
+ **Relationships:**
55
+ - `add_dependency`, `remove_dependency` - Task/epic dependencies
56
+ - `add_criteria`, `mark_criteria_met` - Acceptance criteria
57
+
58
+ **Integration:**
59
+ - `configure_linear` - Connect to Linear (interactive mode supported)
10
60
 
11
- ## Subcommands
61
+ ## Main Flow
12
62
 
13
- - `/flux version` - Show plugin version (call `get_version`)
14
- - `/flux linear` - Connect to Linear (delegate to `/flux:linear`)
63
+ ### Step 0: Check for Subcommands
15
64
 
16
- ## Main Flow
65
+ First, check if the user provided arguments (e.g., `/flux prd`, `/flux implement FP-T1`).
66
+ If so, route to the appropriate command as described in Subcommand Routing above.
17
67
 
18
- ### Step 1: Get Project Context
68
+ ### Step 1: Check Project State
19
69
 
20
- Call `get_project_context` to check project state.
70
+ If no subcommand, call `render_status` with `{view: "summary"}` to show current state.
21
71
 
22
- ### Step 2: Route Based on State
72
+ ### Step 2: Route Based on Response
23
73
 
24
- **If `initialized: false`:**
74
+ **If error with `code: "PROJECT_NOT_INITIALIZED"`:**
25
75
  → Guide through initialization (see Initialization Flow below)
26
76
 
27
- **If `initialized: true`:**
28
- Call `render_status` with `{view: "summary"}` to show current state
29
- Determine next action based on workflow state (see Workflow States)
77
+ **If success:**
78
+ Display the rendered status
79
+ Analyze workflow state and suggest the most appropriate next action (see Workflow States)
80
+ → If multiple actions are possible, use AskUserQuestion to let user choose
30
81
 
31
82
  ## Initialization Flow
32
83
 
@@ -148,9 +199,38 @@ When determining actions:
148
199
  | 50-80% | Suggest action, wait for confirmation |
149
200
  | < 50% | Ask clarifying question |
150
201
 
202
+ ## Help Output
203
+
204
+ When user runs `/flux help`, display:
205
+
206
+ ```
207
+ Flux - AI-first workflow orchestration
208
+
209
+ Commands:
210
+ /flux Show project status and next action
211
+ /flux:prd Create or refine PRDs
212
+ /flux:breakdown Break PRD into epics and tasks
213
+ /flux:implement Implement tasks with TDD
214
+ /flux:linear Connect to Linear
215
+
216
+ Shortcuts:
217
+ /flux prd Same as /flux:prd
218
+ /flux breakdown Same as /flux:breakdown
219
+ /flux implement Same as /flux:implement
220
+ /flux status Show detailed project status
221
+ /flux version Show plugin version
222
+
223
+ Workflow:
224
+ 1. /flux Initialize project (first time)
225
+ 2. /flux:prd Create your first PRD
226
+ 3. /flux:breakdown Break PRD into tasks
227
+ 4. /flux:implement Start coding with TDD
228
+ ```
229
+
151
230
  ## Guidelines
152
231
 
153
232
  - Use `AskUserQuestion` tool for all user choices during initialization
154
233
  - Be concise - show status and one clear next action
155
234
  - Use `render_status` for visual project overview
156
235
  - Apply confidence-based autonomy for decisions
236
+ - When user input matches a subcommand pattern, delegate immediately without calling render_status first
@@ -53,8 +53,7 @@ The orchestrator resolves all refs to tasks, builds a dependency-ordered queue,
53
53
 
54
54
  ## Pre-checks
55
55
 
56
- 1. Call `get_project_context` to ensure Flux is initialized
57
- 2. Parse arguments and resolve to tasks:
56
+ 1. Parse arguments and resolve to tasks (if any tool returns `PROJECT_NOT_INITIALIZED` error, tell user: "Run `/flux` first to initialize the project." and exit):
58
57
  - No args: Query for next PENDING task with no blockers
59
58
  - PRD ref(s): Expand to all epics → all tasks
60
59
  - Epic ref(s): Expand to all tasks
@@ -21,13 +21,14 @@ The `configure_linear` tool supports progressive discovery:
21
21
 
22
22
  ## Flow
23
23
 
24
- ### Step 1: Verify Project
24
+ ### Step 1: Verify Project & Fetch Teams
25
25
 
26
- Call `get_project_context`.
26
+ Call `configure_linear` with `{interactive: true}`.
27
27
 
28
- - If `initialized: false` → Tell user to run `/flux` first, then exit.
29
- - If `adapter.type === "linear"` and config exists Already configured, show info and exit.
30
- - OtherwiseContinue to Step 2.
28
+ - If error with `code: "PROJECT_NOT_INITIALIZED"` → Tell user to run `/flux` first, then exit.
29
+ - If error about Linear API keyShow instructions (see Step 2 error handling).
30
+ - If success with `step: "already_configured"` Already configured, show info and exit.
31
+ - Otherwise → Continue with team selection (response contains teams list).
31
32
 
32
33
  ### Step 2: Fetch Teams
33
34