@cliangdev/flux-plugin 0.0.0-dev.df9c61f → 0.1.0-dev.588ae42
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 +8 -4
- package/bin/install.cjs +158 -24
- package/commands/flux.md +127 -84
- package/commands/linear.md +171 -0
- package/package.json +10 -12
- package/skills/flux-orchestrator/SKILL.md +58 -76
- package/src/__tests__/version.test.ts +37 -0
- package/src/adapters/local/.gitkeep +0 -0
- package/src/server/__tests__/config.test.ts +163 -0
- package/src/server/adapters/__tests__/a-client-linear.test.ts +197 -0
- package/src/server/adapters/__tests__/adapter-factory.test.ts +230 -0
- package/src/server/adapters/__tests__/dependency-ops.test.ts +395 -0
- package/src/server/adapters/__tests__/document-ops.test.ts +306 -0
- package/src/server/adapters/__tests__/linear-adapter.test.ts +91 -0
- package/src/server/adapters/__tests__/linear-config.test.ts +425 -0
- package/src/server/adapters/__tests__/linear-criteria-parser.test.ts +287 -0
- package/src/server/adapters/__tests__/linear-description-test.ts +238 -0
- package/src/server/adapters/__tests__/linear-epic-crud.test.ts +496 -0
- package/src/server/adapters/__tests__/linear-mappers-description.test.ts +276 -0
- package/src/server/adapters/__tests__/linear-mappers-epic.test.ts +294 -0
- package/src/server/adapters/__tests__/linear-mappers-prd.test.ts +300 -0
- package/src/server/adapters/__tests__/linear-mappers-task.test.ts +197 -0
- package/src/server/adapters/__tests__/linear-prd-crud.test.ts +620 -0
- package/src/server/adapters/__tests__/linear-stats.test.ts +450 -0
- package/src/server/adapters/__tests__/linear-task-crud.test.ts +534 -0
- package/src/server/adapters/__tests__/linear-types.test.ts +243 -0
- package/src/server/adapters/__tests__/status-ops.test.ts +441 -0
- package/src/server/adapters/factory.ts +90 -0
- package/src/server/adapters/index.ts +9 -0
- package/src/server/adapters/linear/adapter.ts +1136 -0
- package/src/server/adapters/linear/client.ts +169 -0
- package/src/server/adapters/linear/config.ts +152 -0
- package/src/server/adapters/linear/helpers/criteria-parser.ts +197 -0
- package/src/server/adapters/linear/helpers/index.ts +7 -0
- package/src/server/adapters/linear/index.ts +16 -0
- package/src/server/adapters/linear/mappers/description.ts +136 -0
- package/src/server/adapters/linear/mappers/epic.ts +81 -0
- package/src/server/adapters/linear/mappers/index.ts +27 -0
- package/src/server/adapters/linear/mappers/prd.ts +178 -0
- package/src/server/adapters/linear/mappers/task.ts +82 -0
- package/src/server/adapters/linear/types.ts +264 -0
- package/src/server/adapters/local-adapter.ts +968 -0
- package/src/server/adapters/types.ts +293 -0
- package/src/server/config.ts +73 -0
- package/src/server/db/__tests__/queries.test.ts +472 -0
- package/src/server/db/ids.ts +17 -0
- package/src/server/db/index.ts +69 -0
- package/src/server/db/queries.ts +142 -0
- package/src/server/db/refs.ts +60 -0
- package/src/server/db/schema.ts +88 -0
- package/src/server/db/sqlite.ts +10 -0
- package/src/server/index.ts +83 -0
- package/src/server/tools/__tests__/crud.test.ts +301 -0
- package/src/server/tools/__tests__/get-version.test.ts +27 -0
- package/src/server/tools/__tests__/mcp-interface.test.ts +388 -0
- package/src/server/tools/__tests__/query.test.ts +353 -0
- package/src/server/tools/__tests__/z-configure-linear.test.ts +511 -0
- package/src/server/tools/__tests__/z-get-linear-url.test.ts +108 -0
- package/src/server/tools/configure-linear.ts +373 -0
- package/src/server/tools/create-epic.ts +35 -0
- package/src/server/tools/create-prd.ts +31 -0
- package/src/server/tools/create-task.ts +38 -0
- package/src/server/tools/criteria.ts +50 -0
- package/src/server/tools/delete-entity.ts +76 -0
- package/src/server/tools/dependencies.ts +55 -0
- package/src/server/tools/get-entity.ts +238 -0
- package/src/server/tools/get-linear-url.ts +28 -0
- package/src/server/tools/get-project-context.ts +33 -0
- package/src/server/tools/get-stats.ts +52 -0
- package/src/server/tools/get-version.ts +20 -0
- package/src/server/tools/index.ts +114 -0
- package/src/server/tools/init-project.ts +108 -0
- package/src/server/tools/query-entities.ts +167 -0
- package/src/server/tools/render-status.ts +201 -0
- package/src/server/tools/update-entity.ts +140 -0
- package/src/server/tools/update-status.ts +166 -0
- package/src/server/utils/__tests__/mcp-response.test.ts +331 -0
- package/src/server/utils/logger.ts +9 -0
- package/src/server/utils/mcp-response.ts +254 -0
- package/src/server/utils/status-transitions.ts +160 -0
- package/src/status-line/__tests__/status-line.test.ts +215 -0
- package/src/status-line/index.ts +147 -0
- package/src/utils/__tests__/chalk-import.test.ts +32 -0
- package/src/utils/__tests__/display.test.ts +97 -0
- package/src/utils/__tests__/status-renderer.test.ts +310 -0
- package/src/utils/display.ts +62 -0
- package/src/utils/status-renderer.ts +188 -0
- package/src/version.ts +5 -0
- package/dist/server/index.js +0 -86958
package/README.md
CHANGED
|
@@ -2,10 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
Agent-orchestrated, spec-driven workflow for Claude Code.
|
|
4
4
|
|
|
5
|
+
## Prerequisites
|
|
6
|
+
|
|
7
|
+
This plugin requires [Bun](https://bun.sh). If you don't have Bun installed, the installer will offer to install it for you.
|
|
8
|
+
|
|
5
9
|
## Installation
|
|
6
10
|
|
|
7
11
|
```bash
|
|
8
|
-
|
|
12
|
+
bunx @cliangdev/flux-plugin
|
|
9
13
|
```
|
|
10
14
|
|
|
11
15
|
This installs:
|
|
@@ -16,8 +20,8 @@ This installs:
|
|
|
16
20
|
### Options
|
|
17
21
|
|
|
18
22
|
```bash
|
|
19
|
-
|
|
20
|
-
|
|
23
|
+
bunx @cliangdev/flux-plugin --global # Install to ~/.claude (all projects)
|
|
24
|
+
bunx @cliangdev/flux-plugin --local # Install to ./.claude (current project)
|
|
21
25
|
```
|
|
22
26
|
|
|
23
27
|
### What Gets Configured
|
|
@@ -121,7 +125,7 @@ your-project/
|
|
|
121
125
|
To update to the latest version, simply re-run the installer:
|
|
122
126
|
|
|
123
127
|
```bash
|
|
124
|
-
|
|
128
|
+
bunx @cliangdev/flux-plugin@latest --global
|
|
125
129
|
```
|
|
126
130
|
|
|
127
131
|
This will:
|
package/bin/install.cjs
CHANGED
|
@@ -4,22 +4,45 @@ const fs = require("fs");
|
|
|
4
4
|
const path = require("path");
|
|
5
5
|
const os = require("os");
|
|
6
6
|
const readline = require("readline");
|
|
7
|
+
const { execSync, spawn } = require("child_process");
|
|
7
8
|
|
|
8
9
|
const args = process.argv.slice(2);
|
|
9
10
|
|
|
10
11
|
if (args[0] === "serve") {
|
|
11
|
-
|
|
12
|
+
const serverSrc = path.join(__dirname, "..", "src", "server", "index.ts");
|
|
13
|
+
const bunPath = getBunPath();
|
|
14
|
+
if (!bunPath) {
|
|
15
|
+
console.error("Failed to start Flux MCP server: Bun is required but not found");
|
|
16
|
+
process.exit(1);
|
|
17
|
+
}
|
|
18
|
+
const child = spawn(bunPath, ["run", serverSrc], { stdio: "inherit" });
|
|
19
|
+
child.on("error", (err) => {
|
|
12
20
|
console.error("Failed to start Flux MCP server:", err.message);
|
|
13
21
|
process.exit(1);
|
|
14
22
|
});
|
|
23
|
+
child.on("close", (code) => process.exit(code || 0));
|
|
15
24
|
} else {
|
|
16
25
|
runInstaller();
|
|
17
26
|
}
|
|
18
27
|
|
|
28
|
+
function getBunPath() {
|
|
29
|
+
const bunDir = path.join(os.homedir(), ".bun", "bin");
|
|
30
|
+
const bunBinary = process.platform === "win32" ? "bun.exe" : "bun";
|
|
31
|
+
const localBunPath = path.join(bunDir, bunBinary);
|
|
32
|
+
if (fs.existsSync(localBunPath)) return localBunPath;
|
|
33
|
+
try {
|
|
34
|
+
execSync("bun --version", { stdio: "ignore" });
|
|
35
|
+
return "bun";
|
|
36
|
+
} catch {
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
19
41
|
function runInstaller() {
|
|
20
42
|
const cyan = "\x1b[36m";
|
|
21
43
|
const green = "\x1b[32m";
|
|
22
44
|
const yellow = "\x1b[33m";
|
|
45
|
+
const red = "\x1b[31m";
|
|
23
46
|
const dim = "\x1b[2m";
|
|
24
47
|
const reset = "\x1b[0m";
|
|
25
48
|
const pkg = require("../package.json");
|
|
@@ -43,7 +66,7 @@ ${cyan} ███████╗██╗ ██╗ ██╗██╗
|
|
|
43
66
|
console.log(banner);
|
|
44
67
|
|
|
45
68
|
if (hasHelp) {
|
|
46
|
-
console.log(` ${yellow}Usage:${reset}
|
|
69
|
+
console.log(` ${yellow}Usage:${reset} bunx @cliangdev/flux-plugin [options]
|
|
47
70
|
|
|
48
71
|
${yellow}Options:${reset}
|
|
49
72
|
${cyan}-g, --global${reset} Install globally (to ~/.claude)
|
|
@@ -52,17 +75,123 @@ ${cyan} ███████╗██╗ ██╗ ██╗██╗
|
|
|
52
75
|
|
|
53
76
|
${yellow}Examples:${reset}
|
|
54
77
|
${dim}# Interactive installation${reset}
|
|
55
|
-
|
|
78
|
+
bunx @cliangdev/flux-plugin
|
|
56
79
|
|
|
57
80
|
${dim}# Install globally (all projects)${reset}
|
|
58
|
-
|
|
81
|
+
bunx @cliangdev/flux-plugin --global
|
|
59
82
|
|
|
60
83
|
${dim}# Install locally (current project only)${reset}
|
|
61
|
-
|
|
84
|
+
bunx @cliangdev/flux-plugin --local
|
|
85
|
+
|
|
86
|
+
${yellow}Note:${reset} This plugin requires Bun. Install from https://bun.sh
|
|
62
87
|
`);
|
|
63
88
|
process.exit(0);
|
|
64
89
|
}
|
|
65
90
|
|
|
91
|
+
function isBunInstalled() {
|
|
92
|
+
const bunDir = path.join(os.homedir(), ".bun", "bin");
|
|
93
|
+
const envPath = process.env.PATH || "";
|
|
94
|
+
const pathWithBun = envPath.includes(bunDir)
|
|
95
|
+
? envPath
|
|
96
|
+
: `${bunDir}${path.delimiter}${envPath}`;
|
|
97
|
+
|
|
98
|
+
try {
|
|
99
|
+
execSync("bun --version", {
|
|
100
|
+
stdio: "ignore",
|
|
101
|
+
env: { ...process.env, PATH: pathWithBun },
|
|
102
|
+
});
|
|
103
|
+
return true;
|
|
104
|
+
} catch {
|
|
105
|
+
return false;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
function installBun() {
|
|
110
|
+
return new Promise((resolve, reject) => {
|
|
111
|
+
const platform = os.platform();
|
|
112
|
+
const installCmd = platform === "win32" ? "powershell" : "/bin/sh";
|
|
113
|
+
const installArgs = platform === "win32"
|
|
114
|
+
? ["-c", "irm bun.sh/install.ps1 | iex"]
|
|
115
|
+
: ["-c", "curl -fsSL https://bun.sh/install | bash"];
|
|
116
|
+
|
|
117
|
+
console.log(`\n ${cyan}Installing Bun...${reset}\n`);
|
|
118
|
+
|
|
119
|
+
const child = spawn(installCmd, installArgs, {
|
|
120
|
+
stdio: "inherit",
|
|
121
|
+
shell: false,
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
child.on("close", (code) => {
|
|
125
|
+
if (code === 0) {
|
|
126
|
+
console.log(`\n ${green}✓${reset} Bun installed successfully\n`);
|
|
127
|
+
resolve(true);
|
|
128
|
+
} else {
|
|
129
|
+
reject(new Error(`Installation exited with code ${code}`));
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
child.on("error", (err) => {
|
|
134
|
+
reject(err);
|
|
135
|
+
});
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
function showBunInstallInstructions() {
|
|
140
|
+
console.log(`
|
|
141
|
+
${yellow}Bun is required but not installed.${reset}
|
|
142
|
+
|
|
143
|
+
Install Bun manually:
|
|
144
|
+
|
|
145
|
+
${cyan}macOS/Linux:${reset}
|
|
146
|
+
curl -fsSL https://bun.sh/install | bash
|
|
147
|
+
|
|
148
|
+
${cyan}Windows:${reset}
|
|
149
|
+
powershell -c "irm bun.sh/install.ps1 | iex"
|
|
150
|
+
|
|
151
|
+
Then restart your terminal and run this installer again.
|
|
152
|
+
|
|
153
|
+
${dim}Learn more: https://bun.sh${reset}
|
|
154
|
+
`);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
async function checkBunAndContinue(callback) {
|
|
158
|
+
if (isBunInstalled()) {
|
|
159
|
+
callback();
|
|
160
|
+
return;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
const rl = readline.createInterface({
|
|
164
|
+
input: process.stdin,
|
|
165
|
+
output: process.stdout,
|
|
166
|
+
});
|
|
167
|
+
|
|
168
|
+
console.log(` ${yellow}Bun is required but not installed.${reset}\n`);
|
|
169
|
+
|
|
170
|
+
rl.question(` Install Bun now? ${dim}[Y/n]${reset}: `, async (answer) => {
|
|
171
|
+
rl.close();
|
|
172
|
+
const shouldInstall = answer.trim().toLowerCase() !== "n";
|
|
173
|
+
|
|
174
|
+
if (shouldInstall) {
|
|
175
|
+
try {
|
|
176
|
+
await installBun();
|
|
177
|
+
if (isBunInstalled()) {
|
|
178
|
+
callback();
|
|
179
|
+
} else {
|
|
180
|
+
console.log(` ${yellow}Please restart your terminal to use Bun, then run the installer again.${reset}\n`);
|
|
181
|
+
process.exit(0);
|
|
182
|
+
}
|
|
183
|
+
} catch (err) {
|
|
184
|
+
console.log(`\n ${red}Failed to install Bun:${reset} ${err.message}\n`);
|
|
185
|
+
showBunInstallInstructions();
|
|
186
|
+
process.exit(1);
|
|
187
|
+
}
|
|
188
|
+
} else {
|
|
189
|
+
showBunInstallInstructions();
|
|
190
|
+
process.exit(1);
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
|
|
66
195
|
function copyDir(src, dest) {
|
|
67
196
|
fs.mkdirSync(dest, { recursive: true });
|
|
68
197
|
const entries = fs.readdirSync(src, { withFileTypes: true });
|
|
@@ -167,24 +296,25 @@ ${cyan} ███████╗██╗ ██╗ ██╗██╗
|
|
|
167
296
|
}
|
|
168
297
|
}
|
|
169
298
|
|
|
170
|
-
const
|
|
299
|
+
const mcpConfigPath = isGlobal
|
|
171
300
|
? path.join(os.homedir(), ".claude.json")
|
|
172
|
-
: path.join(process.cwd(), ".
|
|
301
|
+
: path.join(process.cwd(), ".mcp.json");
|
|
173
302
|
|
|
174
|
-
const
|
|
303
|
+
const mcpConfig = readJson(mcpConfigPath);
|
|
175
304
|
|
|
176
|
-
if (!
|
|
177
|
-
|
|
305
|
+
if (!mcpConfig.mcpServers) {
|
|
306
|
+
mcpConfig.mcpServers = {};
|
|
178
307
|
}
|
|
179
308
|
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
309
|
+
const versionTag = pkg.version.includes("-dev.") ? "latest" : pkg.version;
|
|
310
|
+
mcpConfig.mcpServers.flux = {
|
|
311
|
+
command: "bunx",
|
|
312
|
+
args: [`@cliangdev/flux-plugin@${versionTag}`, "serve"],
|
|
183
313
|
};
|
|
184
314
|
|
|
185
|
-
writeJson(
|
|
315
|
+
writeJson(mcpConfigPath, mcpConfig);
|
|
186
316
|
console.log(
|
|
187
|
-
` ${green}✓${reset} Configured MCP server in ${isGlobal ? "~/.claude.json" : "./.
|
|
317
|
+
` ${green}✓${reset} Configured MCP server in ${isGlobal ? "~/.claude.json" : "./.mcp.json"}`
|
|
188
318
|
);
|
|
189
319
|
|
|
190
320
|
const versionFile = path.join(claudeDir, "flux-version");
|
|
@@ -222,14 +352,18 @@ ${cyan} ███████╗██╗ ██╗ ██╗██╗
|
|
|
222
352
|
});
|
|
223
353
|
}
|
|
224
354
|
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
355
|
+
function startInstallation() {
|
|
356
|
+
if (hasGlobal && hasLocal) {
|
|
357
|
+
console.error(` ${yellow}Cannot specify both --global and --local${reset}`);
|
|
358
|
+
process.exit(1);
|
|
359
|
+
} else if (hasGlobal) {
|
|
360
|
+
install(true);
|
|
361
|
+
} else if (hasLocal) {
|
|
362
|
+
install(false);
|
|
363
|
+
} else {
|
|
364
|
+
promptLocation();
|
|
365
|
+
}
|
|
234
366
|
}
|
|
367
|
+
|
|
368
|
+
checkBunAndContinue(startInstallation);
|
|
235
369
|
}
|
package/commands/flux.md
CHANGED
|
@@ -1,113 +1,156 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: flux
|
|
3
3
|
description: AI-first workflow orchestration for spec-driven development
|
|
4
|
-
allowed-tools:
|
|
4
|
+
allowed-tools: mcp__plugin_flux_flux__*, AskUserQuestion, Read, Write
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
# Flux
|
|
7
|
+
# Flux Command
|
|
8
|
+
|
|
9
|
+
You are the Flux orchestrator. Detect project state and guide the user to the appropriate next action.
|
|
10
|
+
|
|
11
|
+
## Subcommands
|
|
8
12
|
|
|
9
|
-
|
|
13
|
+
- `/flux version` - Show plugin version (call `get_version`)
|
|
14
|
+
- `/flux linear` - Connect to Linear (delegate to `/flux:linear`)
|
|
10
15
|
|
|
11
|
-
##
|
|
16
|
+
## Main Flow
|
|
17
|
+
|
|
18
|
+
### Step 1: Get Project Context
|
|
12
19
|
|
|
13
|
-
|
|
14
|
-
- `/flux version` - Show version information
|
|
20
|
+
Call `get_project_context` to check project state.
|
|
15
21
|
|
|
16
|
-
|
|
22
|
+
### Step 2: Route Based on State
|
|
17
23
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
```
|
|
21
|
-
Flux Plugin v{version}
|
|
22
|
-
Package: @cliangdev/{name}
|
|
23
|
-
```
|
|
24
|
-
3. Exit (do not proceed to project state check)
|
|
24
|
+
**If `initialized: false`:**
|
|
25
|
+
→ Guide through initialization (see Initialization Flow below)
|
|
25
26
|
|
|
26
|
-
|
|
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)
|
|
27
30
|
|
|
28
|
-
|
|
31
|
+
## Initialization Flow
|
|
29
32
|
|
|
30
|
-
|
|
33
|
+
Use the `AskUserQuestion` tool for all questions during initialization.
|
|
31
34
|
|
|
32
|
-
###
|
|
35
|
+
### Step 1: Confirm Initialization
|
|
33
36
|
|
|
34
|
-
|
|
37
|
+
Use AskUserQuestion:
|
|
38
|
+
```json
|
|
39
|
+
{
|
|
40
|
+
"questions": [{
|
|
41
|
+
"question": "No Flux project found. Would you like to initialize one?",
|
|
42
|
+
"header": "Initialize",
|
|
43
|
+
"options": [
|
|
44
|
+
{"label": "Yes", "description": "Create a new Flux project in this directory"},
|
|
45
|
+
{"label": "No", "description": "Cancel initialization"}
|
|
46
|
+
],
|
|
47
|
+
"multiSelect": false
|
|
48
|
+
}]
|
|
49
|
+
}
|
|
50
|
+
```
|
|
35
51
|
|
|
36
|
-
|
|
37
|
-
- If no, end with: "Run `/flux` when you're ready to set up Flux."
|
|
52
|
+
If "No", exit with: "Run `/flux` when you're ready to set up Flux."
|
|
38
53
|
|
|
39
|
-
2
|
|
40
|
-
- Wait for response
|
|
54
|
+
### Step 2: Collect Project Details
|
|
41
55
|
|
|
42
|
-
|
|
43
|
-
|
|
56
|
+
Use AskUserQuestion with text input (user will select "Other" to type):
|
|
57
|
+
- Ask for project name
|
|
58
|
+
- Ask for project vision (brief description)
|
|
44
59
|
|
|
45
|
-
|
|
60
|
+
### Step 3: Select Storage Backend
|
|
46
61
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
62
|
+
Use AskUserQuestion:
|
|
63
|
+
```json
|
|
64
|
+
{
|
|
65
|
+
"questions": [{
|
|
66
|
+
"question": "Where should Flux store data?",
|
|
67
|
+
"header": "Storage",
|
|
68
|
+
"options": [
|
|
69
|
+
{"label": "Local (Recommended)", "description": "SQLite database in .flux/ - offline-first, no setup required"},
|
|
70
|
+
{"label": "Linear", "description": "Sync with Linear for team collaboration and issue tracking"}
|
|
71
|
+
],
|
|
72
|
+
"multiSelect": false
|
|
73
|
+
}]
|
|
74
|
+
}
|
|
75
|
+
```
|
|
50
76
|
|
|
51
|
-
|
|
52
|
-
Vision: {vision}
|
|
53
|
-
Reference prefix: {ref_prefix}
|
|
77
|
+
### Step 4: Ask About Tool Permissions
|
|
54
78
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
79
|
+
Use AskUserQuestion:
|
|
80
|
+
```json
|
|
81
|
+
{
|
|
82
|
+
"questions": [{
|
|
83
|
+
"question": "Add Flux tools to allow list? This prevents permission prompts for Flux operations.",
|
|
84
|
+
"header": "Permissions",
|
|
85
|
+
"options": [
|
|
86
|
+
{"label": "Yes (Recommended)", "description": "Allow all Flux MCP tools without prompting"},
|
|
87
|
+
{"label": "No", "description": "Ask for permission each time"}
|
|
88
|
+
],
|
|
89
|
+
"multiSelect": false
|
|
90
|
+
}]
|
|
91
|
+
}
|
|
92
|
+
```
|
|
58
93
|
|
|
59
|
-
|
|
60
|
-
```
|
|
94
|
+
If "Yes", update the settings file:
|
|
61
95
|
|
|
62
|
-
|
|
96
|
+
1. Read `.claude/settings.local.json` (create if doesn't exist)
|
|
97
|
+
2. Parse JSON (or start with `{"permissions": {"allow": []}}` if empty/missing)
|
|
98
|
+
3. Add `"mcp__plugin_flux_flux__*"` to `permissions.allow` array if not already present
|
|
99
|
+
4. Write back to `.claude/settings.local.json`
|
|
63
100
|
|
|
64
|
-
|
|
101
|
+
Example result:
|
|
102
|
+
```json
|
|
103
|
+
{
|
|
104
|
+
"permissions": {
|
|
105
|
+
"allow": ["mcp__plugin_flux_flux__*"]
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
```
|
|
65
109
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
> "All tasks complete! Review your work and create a PR."
|
|
110
|
+
Confirm to user: "Flux tools added to allow list. No more permission prompts for Flux operations."
|
|
111
|
+
|
|
112
|
+
### Step 5: Initialize Project
|
|
113
|
+
|
|
114
|
+
Call `init_project` with collected values:
|
|
115
|
+
- `name`: project name
|
|
116
|
+
- `vision`: project vision
|
|
117
|
+
- `adapter`: "local" or "linear"
|
|
118
|
+
|
|
119
|
+
### Step 6: Next Steps
|
|
120
|
+
|
|
121
|
+
Display success message, then:
|
|
122
|
+
|
|
123
|
+
- **If Local**: "Project initialized! Run `/flux:prd` to create your first PRD."
|
|
124
|
+
- **If Linear**: "Project initialized! Now run `/flux:linear` to connect to Linear."
|
|
125
|
+
|
|
126
|
+
## Workflow States
|
|
127
|
+
|
|
128
|
+
Detect current state and suggest the appropriate next action:
|
|
129
|
+
|
|
130
|
+
| State | Detection | Next Action |
|
|
131
|
+
|-------|-----------|-------------|
|
|
132
|
+
| No PRDs | `prds.total == 0` | `/flux:prd` to create first PRD |
|
|
133
|
+
| Draft PRDs | PRDs in DRAFT | Review and refine or submit for review |
|
|
134
|
+
| Pending Review | PRDs in PENDING_REVIEW | Critique agent will analyze |
|
|
135
|
+
| Reviewed | PRDs in REVIEWED | Address feedback, approve or revise |
|
|
136
|
+
| Approved | PRDs in APPROVED, no epics | `/flux:breakdown` to create epics |
|
|
137
|
+
| Breakdown Ready | PRDs in BREAKDOWN_READY | `/flux:implement` to start coding |
|
|
138
|
+
| In Progress | Tasks IN_PROGRESS | Continue with `/flux:implement` |
|
|
139
|
+
| Complete | All tasks COMPLETED | Create PR |
|
|
140
|
+
|
|
141
|
+
## Confidence-Based Autonomy
|
|
142
|
+
|
|
143
|
+
When determining actions:
|
|
144
|
+
|
|
145
|
+
| Confidence | Behavior |
|
|
146
|
+
|------------|----------|
|
|
147
|
+
| > 80% | Auto-execute, inform user |
|
|
148
|
+
| 50-80% | Suggest action, wait for confirmation |
|
|
149
|
+
| < 50% | Ask clarifying question |
|
|
107
150
|
|
|
108
151
|
## Guidelines
|
|
109
152
|
|
|
110
|
-
-
|
|
111
|
-
-
|
|
112
|
-
-
|
|
113
|
-
-
|
|
153
|
+
- Use `AskUserQuestion` tool for all user choices during initialization
|
|
154
|
+
- Be concise - show status and one clear next action
|
|
155
|
+
- Use `render_status` for visual project overview
|
|
156
|
+
- Apply confidence-based autonomy for decisions
|