newaflux 1.1.0 → 1.3.0
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 +65 -27
- package/agents/fluxn-executor.md +3 -0
- package/agents/fluxn-researcher.md +3 -0
- package/agents/fluxn-verifier.md +3 -0
- package/bin/install.js +87 -2
- package/commands/fluxn/execute.md +16 -3
- package/commands/fluxn/go.md +43 -4
- package/commands/fluxn/init.md +11 -1
- package/commands/fluxn/language.md +52 -0
- package/commands/fluxn/plan.md +19 -6
- package/commands/fluxn/profile.md +83 -0
- package/commands/fluxn/research.md +46 -1
- package/commands/fluxn/verify.md +120 -13
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Newa Flux
|
|
2
2
|
|
|
3
3
|
Simplified multi-agent workflow framework for [Claude Code](https://claude.com/claude-code).
|
|
4
4
|
|
|
5
|
-
**3 agents +
|
|
5
|
+
**3 agents + 7 commands = 10 files.** That's it.
|
|
6
6
|
|
|
7
7
|
## Why?
|
|
8
8
|
|
|
@@ -10,11 +10,11 @@ Complex workflow frameworks turn a 1-hour bug fix into a 6-hour ordeal. Newa Flu
|
|
|
10
10
|
|
|
11
11
|
| | Complex Frameworks | Newa Flux |
|
|
12
12
|
|---|---|---|
|
|
13
|
-
| Commands | 30+ | **
|
|
13
|
+
| Commands | 30+ | **7** |
|
|
14
14
|
| Agents | 10+ | **3** |
|
|
15
15
|
| Config files | Many | **0** |
|
|
16
16
|
| CLI tools | Yes | **0** |
|
|
17
|
-
| Total files | ~100+ | **
|
|
17
|
+
| Total files | ~100+ | **10** |
|
|
18
18
|
|
|
19
19
|
## Install
|
|
20
20
|
|
|
@@ -33,20 +33,21 @@ npx newaflux --uninstall # Remove
|
|
|
33
33
|
|
|
34
34
|
| Command | What it does |
|
|
35
35
|
|---------|-------------|
|
|
36
|
-
| `/fluxn:init` | Map your project with 4 parallel researchers
|
|
36
|
+
| `/fluxn:init` | Map your project with 4 parallel researchers -> `PROJECT.md` |
|
|
37
37
|
| `/fluxn:research <task>` | Research a task with 4 focused agents |
|
|
38
38
|
| `/fluxn:plan` | Synthesize research into phased execution plan |
|
|
39
39
|
| `/fluxn:execute [phase]` | Execute phases with atomic commits |
|
|
40
40
|
| `/fluxn:verify` | Read-only verification of implementation vs plan |
|
|
41
41
|
| `/fluxn:go <task>` | Research + Plan in one shot |
|
|
42
|
+
| `/fluxn:language <code>` | Set output language for all user-facing messages |
|
|
42
43
|
|
|
43
44
|
## Workflow
|
|
44
45
|
|
|
45
46
|
```
|
|
46
|
-
/fluxn:init
|
|
47
|
-
/fluxn:go <task>
|
|
48
|
-
/fluxn:execute all
|
|
49
|
-
/fluxn:verify
|
|
47
|
+
/fluxn:init -> Maps your project (run once)
|
|
48
|
+
/fluxn:go <task> -> Research + Plan (or run separately)
|
|
49
|
+
/fluxn:execute all -> Execute all phases
|
|
50
|
+
/fluxn:verify -> Verify everything works
|
|
50
51
|
```
|
|
51
52
|
|
|
52
53
|
Or step by step:
|
|
@@ -60,25 +61,52 @@ Or step by step:
|
|
|
60
61
|
/fluxn:verify
|
|
61
62
|
```
|
|
62
63
|
|
|
64
|
+
## Features
|
|
65
|
+
|
|
66
|
+
### Language Support
|
|
67
|
+
|
|
68
|
+
Set a preferred language for all user-facing output (progress messages, confirmations, reports):
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
/fluxn:language pt
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Supports any valid language code (`en`, `pt`, `es`, `fr`, `de`, `ja`, `ko`, `zh`, etc.). Internal workflow files (research, plans, phase reports) remain in English for consistency. The preference is stored in `.fluxn/config.md` and respected by all commands and agents.
|
|
75
|
+
|
|
76
|
+
### Clarifying Questions
|
|
77
|
+
|
|
78
|
+
During the research phase (`/fluxn:research` or `/fluxn:go`), the framework asks clarifying questions based on the task type:
|
|
79
|
+
|
|
80
|
+
- **New project**: 5 questions about scope, audience, tech stack, must-have features, and constraints
|
|
81
|
+
- **Feature**: 4 questions about expected behavior, existing patterns, acceptance criteria, and scope boundaries
|
|
82
|
+
- **Bug fix**: Skips questions entirely to get to the fix faster
|
|
83
|
+
|
|
84
|
+
You can type `skip` to bypass questions and proceed directly. Answers are stored in `STATE.md` and used to inform the execution plan.
|
|
85
|
+
|
|
86
|
+
### Milestone Archiving
|
|
87
|
+
|
|
88
|
+
When `/fluxn:verify` passes, the entire workflow (plan, research, phases, verification) is automatically archived to `.fluxn/milestones/YYYY-MM-DD-<slug>/`. This keeps a full history of completed tasks without cluttering the working directory. An append-only `INDEX.md` in the milestones folder tracks all archived milestones.
|
|
89
|
+
|
|
63
90
|
## Architecture
|
|
64
91
|
|
|
65
92
|
```
|
|
66
93
|
Commands (orchestrators) Agents (specialized workers)
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
94
|
+
+---------------------+ +----------------------+
|
|
95
|
+
| /fluxn:init |-------->| fluxn-researcher (x4)|
|
|
96
|
+
| /fluxn:research |-------->| fluxn-researcher (x4)|
|
|
97
|
+
| /fluxn:plan | inline | |
|
|
98
|
+
| /fluxn:execute |-------->| fluxn-executor (x1)|
|
|
99
|
+
| /fluxn:verify |-------->| fluxn-verifier (x1)|
|
|
100
|
+
| /fluxn:go |-------->| researcher + inline |
|
|
101
|
+
| /fluxn:language | inline | |
|
|
102
|
+
+---------------------+ +----------------------+
|
|
75
103
|
```
|
|
76
104
|
|
|
77
105
|
### Agents
|
|
78
106
|
|
|
79
|
-
- **fluxn-researcher**
|
|
80
|
-
- **fluxn-executor**
|
|
81
|
-
- **fluxn-verifier**
|
|
107
|
+
- **fluxn-researcher** -- Explores codebase and web. Used by `init`, `research`, and `go`. Has WebSearch/WebFetch.
|
|
108
|
+
- **fluxn-executor** -- Implements one phase with atomic commits. Has all editing tools. Follows commit protocol.
|
|
109
|
+
- **fluxn-verifier** -- Read-only verification. No Edit tool. Cannot modify code to "pass" checks.
|
|
82
110
|
|
|
83
111
|
### Project Files
|
|
84
112
|
|
|
@@ -86,13 +114,23 @@ All workflow state lives in `.fluxn/` at your project root:
|
|
|
86
114
|
|
|
87
115
|
```
|
|
88
116
|
.fluxn/
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
117
|
+
+-- PROJECT.md # Project map (persistent)
|
|
118
|
+
+-- STATE.md # Current workflow state
|
|
119
|
+
+-- config.md # User preferences (language, etc.)
|
|
120
|
+
+-- research/ # Research findings
|
|
121
|
+
+-- PLAN.md # Execution plan with phases
|
|
122
|
+
+-- phases/ # Phase completion reports
|
|
123
|
+
+-- VERIFICATION.md # Verification results
|
|
124
|
+
+-- MILESTONE.md # Task summary for future sessions
|
|
125
|
+
+-- milestones/ # Archived milestones
|
|
126
|
+
+-- INDEX.md # Append-only milestone index
|
|
127
|
+
+-- YYYY-MM-DD-slug/ # One folder per completed task
|
|
128
|
+
+-- PLAN.md
|
|
129
|
+
+-- VERIFICATION.md
|
|
130
|
+
+-- MILESTONE.md
|
|
131
|
+
+-- STATE.md
|
|
132
|
+
+-- research/
|
|
133
|
+
+-- phases/
|
|
96
134
|
```
|
|
97
135
|
|
|
98
136
|
## Requirements
|
package/agents/fluxn-executor.md
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
name: fluxn-executor
|
|
3
3
|
description: Executa fases do plano Newa Flux com commits atômicos. Spawned por /fluxn:execute.
|
|
4
4
|
tools: Read, Write, Edit, Bash, Grep, Glob, WebSearch, WebFetch
|
|
5
|
+
permissionMode: acceptEdits
|
|
5
6
|
color: green
|
|
6
7
|
---
|
|
7
8
|
|
|
@@ -178,4 +179,6 @@ Before writing the phase report, verify:
|
|
|
178
179
|
- **Build breaks** → Fix before proceeding. Never leave a broken build for the next phase.
|
|
179
180
|
- **Unfamiliar pattern** → Read existing similar code in the project, follow the same pattern.
|
|
180
181
|
|
|
182
|
+
**Language check:** Read `.fluxn/config.md` if it exists. If it contains a `**Language:**` setting, write this return summary in that language. Internal files (phase reports, code, commits) remain in English.
|
|
183
|
+
|
|
181
184
|
Return a brief summary (~10 lines) to the orchestrator after writing the report.
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
name: fluxn-researcher
|
|
3
3
|
description: Pesquisa codebase e web para Newa Flux. Spawned por /fluxn:init e /fluxn:research.
|
|
4
4
|
tools: Read, Bash, Grep, Glob, Write, WebSearch, WebFetch
|
|
5
|
+
permissionMode: acceptEdits
|
|
5
6
|
color: cyan
|
|
6
7
|
---
|
|
7
8
|
|
|
@@ -116,6 +117,8 @@ Before writing your output file, verify:
|
|
|
116
117
|
|
|
117
118
|
# Return Message
|
|
118
119
|
|
|
120
|
+
**Language check:** Read `.fluxn/config.md` if it exists. If it contains a `**Language:**` setting, write this return message in that language. The output file itself (research findings) remains in English.
|
|
121
|
+
|
|
119
122
|
After writing the file, return ONLY a brief confirmation (~5-10 lines):
|
|
120
123
|
```
|
|
121
124
|
File written: [path]
|
package/agents/fluxn-verifier.md
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
name: fluxn-verifier
|
|
3
3
|
description: Verificação READ-ONLY de implementação vs plano. Spawned por /fluxn:verify.
|
|
4
4
|
tools: Read, Write, Bash, Grep, Glob
|
|
5
|
+
permissionMode: acceptEdits
|
|
5
6
|
color: yellow
|
|
6
7
|
---
|
|
7
8
|
|
|
@@ -168,4 +169,6 @@ Before writing reports, verify your own work:
|
|
|
168
169
|
- **Files exist but appear empty/wrong** → Read and report actual state, compare to plan
|
|
169
170
|
- **Ambiguous completion criterion** → Interpret strictly, note ambiguity
|
|
170
171
|
|
|
172
|
+
**Language check:** Read `.fluxn/config.md` if it exists. If it contains a `**Language:**` setting, write this return summary in that language. Internal files (VERIFICATION.md, MILESTONE.md) remain in English.
|
|
173
|
+
|
|
171
174
|
Return a brief summary (~10 lines) to the orchestrator with the overall result.
|
package/bin/install.js
CHANGED
|
@@ -4,8 +4,8 @@ const fs = require("fs");
|
|
|
4
4
|
const path = require("path");
|
|
5
5
|
const os = require("os");
|
|
6
6
|
|
|
7
|
-
const VERSION = "1.0.0";
|
|
8
7
|
const PACKAGE_DIR = path.resolve(__dirname, "..");
|
|
8
|
+
const VERSION = require(path.join(PACKAGE_DIR, "package.json")).version;
|
|
9
9
|
|
|
10
10
|
// --- Colors ---
|
|
11
11
|
const c = {
|
|
@@ -32,6 +32,27 @@ function error(msg) {
|
|
|
32
32
|
log(`${c.red} ✗${c.reset} ${msg}`);
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
+
// --- Recommended permissions ---
|
|
36
|
+
const RECOMMENDED_PERMISSIONS = [
|
|
37
|
+
"WebSearch",
|
|
38
|
+
"WebFetch",
|
|
39
|
+
"Task(fluxn-researcher)",
|
|
40
|
+
"Task(fluxn-executor)",
|
|
41
|
+
"Task(fluxn-verifier)",
|
|
42
|
+
"Bash(mkdir -p *)",
|
|
43
|
+
"Bash(rm -f .fluxn/*)",
|
|
44
|
+
"Bash(rm -rf .fluxn/init)",
|
|
45
|
+
"Bash(cp *)",
|
|
46
|
+
"Bash(ls *)",
|
|
47
|
+
"Bash(git status)",
|
|
48
|
+
"Bash(git log *)",
|
|
49
|
+
"Bash(git diff *)",
|
|
50
|
+
"Bash(git show *)",
|
|
51
|
+
"Bash(git add *)",
|
|
52
|
+
"Bash(git commit *)",
|
|
53
|
+
"Bash(npx *)",
|
|
54
|
+
];
|
|
55
|
+
|
|
35
56
|
// --- Args ---
|
|
36
57
|
const args = process.argv.slice(2);
|
|
37
58
|
const flags = new Set(args.map((a) => a.toLowerCase()));
|
|
@@ -39,6 +60,7 @@ const flags = new Set(args.map((a) => a.toLowerCase()));
|
|
|
39
60
|
const isUninstall = flags.has("--uninstall") || flags.has("-u");
|
|
40
61
|
const isLocal = flags.has("--local") || flags.has("-l");
|
|
41
62
|
const isGlobal = flags.has("--global") || flags.has("-g");
|
|
63
|
+
const isOptimized = flags.has("--optimized") || flags.has("-o");
|
|
42
64
|
const isHelp = flags.has("--help") || flags.has("-h");
|
|
43
65
|
|
|
44
66
|
if (isHelp) {
|
|
@@ -49,12 +71,14 @@ Simplified multi-agent workflow for Claude Code.
|
|
|
49
71
|
${c.bold}Usage:${c.reset}
|
|
50
72
|
npx newaflux Install globally (default)
|
|
51
73
|
npx newaflux --local Install in current project
|
|
74
|
+
npx newaflux --optimized Install with optimized model profile
|
|
52
75
|
npx newaflux --uninstall Remove installation
|
|
53
76
|
npx newaflux --help Show this help
|
|
54
77
|
|
|
55
78
|
${c.bold}Options:${c.reset}
|
|
56
79
|
-g, --global Install to ~/.claude/ (all projects)
|
|
57
80
|
-l, --local Install to ./.claude/ (current project)
|
|
81
|
+
-o, --optimized Set optimized model profile (sonnet/opus routing)
|
|
58
82
|
-u, --uninstall Remove Newa Flux files
|
|
59
83
|
-h, --help Show help
|
|
60
84
|
`);
|
|
@@ -82,6 +106,8 @@ const COMMANDS = [
|
|
|
82
106
|
"execute.md",
|
|
83
107
|
"verify.md",
|
|
84
108
|
"go.md",
|
|
109
|
+
"language.md",
|
|
110
|
+
"profile.md",
|
|
85
111
|
];
|
|
86
112
|
|
|
87
113
|
// --- Copy helper ---
|
|
@@ -136,13 +162,70 @@ function install() {
|
|
|
136
162
|
copied++;
|
|
137
163
|
}
|
|
138
164
|
|
|
165
|
+
// Set optimized profile if requested
|
|
166
|
+
if (isOptimized) {
|
|
167
|
+
const fluxnDir = path.join(process.cwd(), ".fluxn");
|
|
168
|
+
if (!fs.existsSync(fluxnDir)) {
|
|
169
|
+
fs.mkdirSync(fluxnDir, { recursive: true });
|
|
170
|
+
}
|
|
171
|
+
const configPath = path.join(fluxnDir, "config.md");
|
|
172
|
+
let configContent = "# Newa Flux Config\n\n**Model Profile:** optimized\n";
|
|
173
|
+
if (fs.existsSync(configPath)) {
|
|
174
|
+
const existing = fs.readFileSync(configPath, "utf8");
|
|
175
|
+
const langMatch = existing.match(/^\*\*Language:\*\*.*$/m);
|
|
176
|
+
if (langMatch) {
|
|
177
|
+
configContent = "# Newa Flux Config\n\n" + langMatch[0] + "\n\n**Model Profile:** optimized\n";
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
fs.writeFileSync(configPath, configContent, "utf8");
|
|
181
|
+
success("Optimized profile set: researchers=sonnet, executor=opus, verifier=sonnet");
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
// Merge recommended permissions into settings.json
|
|
185
|
+
const settingsDir = isLocal
|
|
186
|
+
? path.join(process.cwd(), ".claude")
|
|
187
|
+
: path.join(os.homedir(), ".claude");
|
|
188
|
+
const settingsPath = path.join(settingsDir, "settings.json");
|
|
189
|
+
let rulesAdded = 0;
|
|
190
|
+
|
|
191
|
+
try {
|
|
192
|
+
if (!fs.existsSync(settingsDir)) {
|
|
193
|
+
fs.mkdirSync(settingsDir, { recursive: true });
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
let settings = { permissions: { allow: [] } };
|
|
197
|
+
if (fs.existsSync(settingsPath)) {
|
|
198
|
+
const raw = fs.readFileSync(settingsPath, "utf8");
|
|
199
|
+
settings = JSON.parse(raw);
|
|
200
|
+
if (!settings.permissions) {
|
|
201
|
+
settings.permissions = {};
|
|
202
|
+
}
|
|
203
|
+
if (!Array.isArray(settings.permissions.allow)) {
|
|
204
|
+
settings.permissions.allow = [];
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
const existingRules = new Set(settings.permissions.allow);
|
|
209
|
+
for (const rule of RECOMMENDED_PERMISSIONS) {
|
|
210
|
+
if (!existingRules.has(rule)) {
|
|
211
|
+
settings.permissions.allow.push(rule);
|
|
212
|
+
rulesAdded++;
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2) + "\n", "utf8");
|
|
217
|
+
success(`${rulesAdded} permission rules configured`);
|
|
218
|
+
} catch (err) {
|
|
219
|
+
warn(`Could not update settings.json: ${err.message}`);
|
|
220
|
+
}
|
|
221
|
+
|
|
139
222
|
// Write version file
|
|
140
223
|
const versionFile = path.join(targetDir, "newaflux-version.txt");
|
|
141
224
|
fs.writeFileSync(versionFile, VERSION, "utf8");
|
|
142
225
|
|
|
143
226
|
log("");
|
|
144
227
|
log(
|
|
145
|
-
` ${c.green}${c.bold}Done!${c.reset} ${copied}
|
|
228
|
+
` ${c.green}${c.bold}Done!${c.reset} ${copied}/${AGENTS.length + COMMANDS.length} files installed.`
|
|
146
229
|
);
|
|
147
230
|
log("");
|
|
148
231
|
log(` ${c.bold}Commands available:${c.reset}`);
|
|
@@ -152,6 +235,8 @@ function install() {
|
|
|
152
235
|
log(` ${c.cyan}/fluxn:execute${c.reset} Execute phases`);
|
|
153
236
|
log(` ${c.cyan}/fluxn:verify${c.reset} Verify implementation`);
|
|
154
237
|
log(` ${c.cyan}/fluxn:go${c.reset} Research + Plan in one shot`);
|
|
238
|
+
log(` ${c.cyan}/fluxn:language${c.reset} Set output language`);
|
|
239
|
+
log(` ${c.cyan}/fluxn:profile${c.reset} Switch model profile`);
|
|
155
240
|
log("");
|
|
156
241
|
log(
|
|
157
242
|
` ${c.dim}Start with: /fluxn:init in Claude Code${c.reset}`
|
|
@@ -11,10 +11,13 @@ You are the **execution orchestrator** for Newa Flux. Your job: spawn a fresh `f
|
|
|
11
11
|
|
|
12
12
|
## Step 1: Load Context
|
|
13
13
|
|
|
14
|
+
**Language check:** Read `.fluxn/config.md` if it exists. If it contains a `**Language:**` setting, use that language for ALL user-facing output (questions, confirmations, progress messages, routing messages). Internal files (STATE.md, phase reports) remain in English.
|
|
15
|
+
|
|
14
16
|
Read these files:
|
|
15
|
-
1. `.fluxn/
|
|
16
|
-
2. `.fluxn/
|
|
17
|
-
3. `.fluxn/
|
|
17
|
+
1. `.fluxn/config.md` — language preference (if exists)
|
|
18
|
+
2. `.fluxn/PROJECT.md` — project map
|
|
19
|
+
3. `.fluxn/STATE.md` — current state
|
|
20
|
+
4. `.fluxn/PLAN.md` — the execution plan (must exist)
|
|
18
21
|
|
|
19
22
|
If PLAN.md doesn't exist, tell the user to run `/fluxn:plan` first.
|
|
20
23
|
|
|
@@ -40,6 +43,11 @@ mkdir -p .fluxn/phases
|
|
|
40
43
|
|
|
41
44
|
## Step 4: Execute Phase
|
|
42
45
|
|
|
46
|
+
### Model Resolution
|
|
47
|
+
Read `.fluxn/config.md`. If it contains `**Model Profile:** optimized`:
|
|
48
|
+
- Add `model: "opus"` to the executor Task tool call below
|
|
49
|
+
If `default` or no Model Profile line: do not pass model parameter.
|
|
50
|
+
|
|
43
51
|
For the target phase, spawn ONE `fluxn-executor` agent:
|
|
44
52
|
|
|
45
53
|
```
|
|
@@ -94,10 +102,15 @@ Phases: [completed]/[total]
|
|
|
94
102
|
|
|
95
103
|
## Last Milestone
|
|
96
104
|
[keep existing or "None"]
|
|
105
|
+
|
|
106
|
+
## Milestone History
|
|
107
|
+
[preserve existing Milestone History from previous STATE.md, or "None" if no history]
|
|
97
108
|
```
|
|
98
109
|
|
|
99
110
|
## Step 6: Route Next
|
|
100
111
|
|
|
112
|
+
All routing messages below should be in the configured language from `.fluxn/config.md`, or English if not set.
|
|
113
|
+
|
|
101
114
|
**If executing `all` and more phases remain:**
|
|
102
115
|
- Read the phase-done.md just written (for context passing)
|
|
103
116
|
- Go back to Step 4 for the next phase
|
package/commands/fluxn/go.md
CHANGED
|
@@ -19,7 +19,10 @@ If no arguments were provided, ask the user what they want to work on.
|
|
|
19
19
|
|
|
20
20
|
### 1.1: Load Context
|
|
21
21
|
|
|
22
|
+
**Language check:** Read `.fluxn/config.md` if it exists. If it contains a `**Language:**` setting, use that language for ALL user-facing output (questions, confirmations, progress messages, the final report). Internal files (PLAN.md, STATE.md, research files) remain in English.
|
|
23
|
+
|
|
22
24
|
Read these files if they exist:
|
|
25
|
+
- `.fluxn/config.md` — language preference
|
|
23
26
|
- `.fluxn/PROJECT.md` — project map (if missing, warn but continue)
|
|
24
27
|
- `.fluxn/STATE.md` — current state
|
|
25
28
|
|
|
@@ -32,6 +35,33 @@ Classify based on the task description:
|
|
|
32
35
|
|
|
33
36
|
Default to **feature** if ambiguous.
|
|
34
37
|
|
|
38
|
+
### 1.2.5: Ask Clarifying Questions
|
|
39
|
+
|
|
40
|
+
**If task type is `bug`:** skip this step entirely — proceed to 1.3.
|
|
41
|
+
|
|
42
|
+
**If task type is `new-project`:** ask the user these questions (present them in the configured language):
|
|
43
|
+
1. What is the scope of this project? (MVP, prototype, production-ready)
|
|
44
|
+
2. Who are the target users or audience?
|
|
45
|
+
3. Do you have a preferred tech stack or any technology constraints?
|
|
46
|
+
4. What are the must-have features for the first version?
|
|
47
|
+
5. Are there any hard constraints? (timeline, budget, platform, compliance)
|
|
48
|
+
|
|
49
|
+
**If task type is `feature`:** ask the user these questions (present them in the configured language):
|
|
50
|
+
1. What is the expected behavior of this feature? Describe the user flow or system behavior.
|
|
51
|
+
2. Are there existing patterns or similar features in the codebase to follow?
|
|
52
|
+
3. What are the acceptance criteria — how will you know this feature is done?
|
|
53
|
+
4. What is the scope boundary — what should this feature explicitly NOT do?
|
|
54
|
+
|
|
55
|
+
If PROJECT.md content is available, reference it to make questions more context-specific (e.g., mention existing tech stack, existing features, project conventions).
|
|
56
|
+
|
|
57
|
+
After presenting the questions, tell the user: **"Type 'skip' to proceed without answering, or answer the questions above."**
|
|
58
|
+
|
|
59
|
+
Wait for the user's response. Then:
|
|
60
|
+
- If the user types "skip" (case-insensitive), set `userRequirements` to "User skipped clarifying questions." and proceed.
|
|
61
|
+
- Otherwise, capture the user's answers as `userRequirements`.
|
|
62
|
+
|
|
63
|
+
Store the answers — they will be written into STATE.md in 1.5 and passed to researcher agents in 1.4.
|
|
64
|
+
|
|
35
65
|
### 1.3: Setup
|
|
36
66
|
|
|
37
67
|
```bash
|
|
@@ -41,6 +71,11 @@ rm -f .fluxn/research/agent-*.md
|
|
|
41
71
|
|
|
42
72
|
### 1.4: Launch 4 Researchers in Parallel
|
|
43
73
|
|
|
74
|
+
### Model Resolution
|
|
75
|
+
Read `.fluxn/config.md`. If it contains `**Model Profile:** optimized`:
|
|
76
|
+
- Add `model: "sonnet"` to each researcher Task tool call below
|
|
77
|
+
If `default` or no Model Profile line: do not pass model parameter.
|
|
78
|
+
|
|
44
79
|
Spawn 4 `fluxn-researcher` agents using the Task tool, ALL IN PARALLEL.
|
|
45
80
|
|
|
46
81
|
**If new-project:**
|
|
@@ -78,15 +113,19 @@ TYPE: [codebase | web | hybrid]
|
|
|
78
113
|
PROJECT CONTEXT:
|
|
79
114
|
[PROJECT.md content or "No PROJECT.md — explore from scratch"]
|
|
80
115
|
|
|
116
|
+
USER REQUIREMENTS:
|
|
117
|
+
[paste userRequirements from 1.2.5, or "None — bug task, no clarifying questions asked."]
|
|
118
|
+
|
|
81
119
|
SPECIFIC INSTRUCTIONS:
|
|
82
120
|
[Investigation items for this focus area]
|
|
121
|
+
[Incorporate any relevant user requirements into the investigation scope]
|
|
83
122
|
|
|
84
123
|
Write findings to [file path]
|
|
85
124
|
```
|
|
86
125
|
|
|
87
126
|
### 1.5: Update STATE.md (after agents complete)
|
|
88
127
|
|
|
89
|
-
Update `.fluxn/STATE.md` with status: researching, task info.
|
|
128
|
+
Update `.fluxn/STATE.md` with status: researching, task info. Include a `## User Requirements` section with the `userRequirements` from 1.2.5 (the user's answers to clarifying questions, or "User skipped clarifying questions." if skipped, or "N/A — bug task." if task type is bug). Preserve the existing `## Milestone History` section from the previous STATE.md (or write "None" if no history exists).
|
|
90
129
|
|
|
91
130
|
---
|
|
92
131
|
|
|
@@ -98,7 +137,7 @@ Read all `.fluxn/research/agent-*.md` files that the researchers just created.
|
|
|
98
137
|
|
|
99
138
|
### 2.2: Synthesize and Plan
|
|
100
139
|
|
|
101
|
-
From research findings, extract key decisions, approach, risks, dependencies.
|
|
140
|
+
From research findings and the `## User Requirements` section in STATE.md (collected in 1.2.5), extract key decisions, approach, risks, dependencies. Use the user requirements to inform priorities, scope boundaries, and acceptance criteria in the plan.
|
|
102
141
|
|
|
103
142
|
Break work into 2-6 phases following the same rules as `/fluxn:plan`:
|
|
104
143
|
- Each phase completable by a fresh agent
|
|
@@ -158,13 +197,13 @@ Write `.fluxn/PLAN.md` using the standard plan template:
|
|
|
158
197
|
|
|
159
198
|
### 2.4: Update STATE.md
|
|
160
199
|
|
|
161
|
-
Update `.fluxn/STATE.md` with status: planned, phase count.
|
|
200
|
+
Update `.fluxn/STATE.md` with status: planned, phase count. Preserve the existing `## User Requirements` section and the existing `## Milestone History` section from the previous STATE.md (or write "None" if not present).
|
|
162
201
|
|
|
163
202
|
---
|
|
164
203
|
|
|
165
204
|
## PART 3: Report
|
|
166
205
|
|
|
167
|
-
Tell the user:
|
|
206
|
+
Tell the user (in the configured language from `.fluxn/config.md`, or English if not set):
|
|
168
207
|
- Research + plan complete for: [task description]
|
|
169
208
|
- Task type: [type]
|
|
170
209
|
- Plan: [N] phases
|
package/commands/fluxn/init.md
CHANGED
|
@@ -9,6 +9,8 @@ You are the **init orchestrator** for Newa Flux. Your job: map the current proje
|
|
|
9
9
|
|
|
10
10
|
## Step 1: Check Existing State
|
|
11
11
|
|
|
12
|
+
**Language check:** Read `.fluxn/config.md` if it exists. If it contains a `**Language:**` setting, use that language for ALL user-facing output (questions, confirmations, progress messages, the final report). Internal files (PROJECT.md, STATE.md, research files) remain in English.
|
|
13
|
+
|
|
12
14
|
Check if `.fluxn/PROJECT.md` already exists.
|
|
13
15
|
|
|
14
16
|
**If it exists:** Ask the user:
|
|
@@ -26,6 +28,11 @@ mkdir -p .fluxn/init
|
|
|
26
28
|
|
|
27
29
|
## Step 3: Launch 4 Researchers in Parallel
|
|
28
30
|
|
|
31
|
+
### Model Resolution
|
|
32
|
+
Read `.fluxn/config.md`. If it contains `**Model Profile:** optimized`:
|
|
33
|
+
- Add `model: "sonnet"` to each researcher Task tool call below
|
|
34
|
+
If `default` or no Model Profile line: do not pass model parameter.
|
|
35
|
+
|
|
29
36
|
Spawn 4 `fluxn-researcher` agents using the Task tool, ALL IN PARALLEL (same message, 4 tool calls):
|
|
30
37
|
|
|
31
38
|
### Agent 1 — Tech Stack
|
|
@@ -204,6 +211,9 @@ None.
|
|
|
204
211
|
|
|
205
212
|
## Last Milestone
|
|
206
213
|
None.
|
|
214
|
+
|
|
215
|
+
## Milestone History
|
|
216
|
+
None.
|
|
207
217
|
```
|
|
208
218
|
|
|
209
219
|
## Step 6: Cleanup
|
|
@@ -214,7 +224,7 @@ rm -rf .fluxn/init
|
|
|
214
224
|
|
|
215
225
|
## Step 7: Report
|
|
216
226
|
|
|
217
|
-
Tell the user:
|
|
227
|
+
Tell the user (in the configured language from `.fluxn/config.md`, or English if not set):
|
|
218
228
|
- Project mapped successfully
|
|
219
229
|
- Summary: [project name], [stack], [N concerns found]
|
|
220
230
|
- Next step: Use `/fluxn:research <task description>` to start working on something, or `/fluxn:go <task>` for research + planning in one shot.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Set language preference for Newa Flux output: /fluxn:language <language-code>"
|
|
3
|
+
allowed-tools: Read, Write, Bash
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /fluxn:language — Set Language Preference
|
|
7
|
+
|
|
8
|
+
$ARGUMENTS
|
|
9
|
+
|
|
10
|
+
You are the **language configuration handler** for Newa Flux. Your job: set the user's preferred language for all user-facing output.
|
|
11
|
+
|
|
12
|
+
## Step 1: Parse Argument
|
|
13
|
+
|
|
14
|
+
The language code comes from the user's arguments: **$ARGUMENTS**
|
|
15
|
+
|
|
16
|
+
If no arguments were provided, ask the user which language they want. Provide examples:
|
|
17
|
+
- `en` — English
|
|
18
|
+
- `pt` — Portuguese
|
|
19
|
+
- `es` — Spanish
|
|
20
|
+
- `fr` — French
|
|
21
|
+
- `de` — German
|
|
22
|
+
- `ja` — Japanese
|
|
23
|
+
- `ko` — Korean
|
|
24
|
+
- `zh` — Chinese
|
|
25
|
+
- Or any valid language code
|
|
26
|
+
|
|
27
|
+
## Step 2: Validate
|
|
28
|
+
|
|
29
|
+
The argument should be a valid language code (e.g., `en`, `pt`, `es`, `fr`, `de`, `ja`, `ko`, `zh`). Accept any reasonable language code the user provides.
|
|
30
|
+
|
|
31
|
+
## Step 3: Write Config
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
mkdir -p .fluxn
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Write or update `.fluxn/config.md`:
|
|
38
|
+
|
|
39
|
+
```markdown
|
|
40
|
+
# Newa Flux Config
|
|
41
|
+
**Language:** [language-code]
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
If `.fluxn/config.md` already exists, read it first and preserve any other settings. Only update the `**Language:**` line.
|
|
45
|
+
|
|
46
|
+
## Step 4: Confirm
|
|
47
|
+
|
|
48
|
+
Respond to the user **in the chosen language** confirming:
|
|
49
|
+
- Language preference has been set to `[language-code]`
|
|
50
|
+
- All future Newa Flux user-facing output will use this language
|
|
51
|
+
- Internal files (research, plans, phase reports) remain in English
|
|
52
|
+
- To change the language later, run `/fluxn:language <code>` again
|
package/commands/fluxn/plan.md
CHANGED
|
@@ -9,22 +9,29 @@ You are the **plan orchestrator** for Newa Flux. This runs INLINE (no sub-agents
|
|
|
9
9
|
|
|
10
10
|
## Step 1: Load All Context
|
|
11
11
|
|
|
12
|
+
**Language check:** Read `.fluxn/config.md` if it exists. If it contains a `**Language:**` setting, use that language for ALL user-facing output (questions, confirmations, progress messages, the final report). Internal files (PLAN.md, STATE.md) remain in English.
|
|
13
|
+
|
|
12
14
|
Read these files in order:
|
|
13
|
-
1.
|
|
14
|
-
2.
|
|
15
|
-
3. `.fluxn/
|
|
16
|
-
4.
|
|
15
|
+
1. `.fluxn/config.md` — language preference (if exists)
|
|
16
|
+
2. `CLAUDE.md` — project rules (if exists)
|
|
17
|
+
3. `.fluxn/PROJECT.md` — project map (if exists)
|
|
18
|
+
4. `.fluxn/STATE.md` — current state (must exist, should show status: researching)
|
|
19
|
+
5. ALL files matching `.fluxn/research/agent-*.md` — research findings
|
|
20
|
+
|
|
21
|
+
From STATE.md, extract the `## User Requirements` section if it exists. These are the user's answers to clarifying questions asked during the research phase. They will be used as additional context during synthesis in Step 2 to inform priorities, scope, and acceptance criteria.
|
|
17
22
|
|
|
18
23
|
If no research files exist, tell the user to run `/fluxn:research <task>` first.
|
|
19
24
|
|
|
20
25
|
## Step 2: Synthesize Research
|
|
21
26
|
|
|
22
|
-
From all research findings, extract:
|
|
27
|
+
From all research findings and the **User Requirements** (extracted from STATE.md in Step 1), extract:
|
|
23
28
|
- **Key decisions** already made (e.g., "use library X", "follow pattern Y")
|
|
24
29
|
- **Implementation approach** — the high-level strategy
|
|
25
30
|
- **Risk areas** — what could go wrong
|
|
26
31
|
- **Dependencies** — what needs to happen in order
|
|
27
32
|
|
|
33
|
+
Use the User Requirements to inform priorities, scope boundaries, and acceptance criteria. If the user specified constraints (tech stack, timeline, must-have features), ensure the plan respects them.
|
|
34
|
+
|
|
28
35
|
## Step 3: Break Into Phases
|
|
29
36
|
|
|
30
37
|
Divide the work into **2-6 phases**. Rules:
|
|
@@ -120,16 +127,22 @@ Update `.fluxn/STATE.md`:
|
|
|
120
127
|
Type: [type]
|
|
121
128
|
Phases: [N]
|
|
122
129
|
|
|
130
|
+
## User Requirements
|
|
131
|
+
[preserve existing User Requirements from previous STATE.md, or "None" if not present]
|
|
132
|
+
|
|
123
133
|
## Blockers
|
|
124
134
|
None.
|
|
125
135
|
|
|
126
136
|
## Last Milestone
|
|
127
137
|
[keep existing or "None"]
|
|
138
|
+
|
|
139
|
+
## Milestone History
|
|
140
|
+
[preserve existing Milestone History from previous STATE.md, or "None" if no history]
|
|
128
141
|
```
|
|
129
142
|
|
|
130
143
|
## Step 6: Report
|
|
131
144
|
|
|
132
|
-
Present to the user:
|
|
145
|
+
Present to the user (in the configured language from `.fluxn/config.md`, or English if not set):
|
|
133
146
|
- Plan created with [N] phases
|
|
134
147
|
- Brief summary of each phase (1 line each)
|
|
135
148
|
- The checkpoint summary table
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: "Switch model profile (default/optimized): /fluxn:profile [default | optimized]"
|
|
3
|
+
allowed-tools: Read, Write, Edit, Bash, Grep, Glob
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# /fluxn:profile — Model Profile Configuration
|
|
7
|
+
|
|
8
|
+
$ARGUMENTS
|
|
9
|
+
|
|
10
|
+
You are the **model profile handler** for Newa Flux. Your job: show or switch the active model profile that controls which AI models are assigned to each agent.
|
|
11
|
+
|
|
12
|
+
## Step 1: Load Context
|
|
13
|
+
|
|
14
|
+
**Language check:** Read `.fluxn/config.md` if it exists. If it contains a `**Language:**` setting, use that language for ALL user-facing output (confirmations, tables, status messages). Internal files (config.md) remain in English.
|
|
15
|
+
|
|
16
|
+
Read `.fluxn/config.md` if it exists. Look for the `**Model Profile:**` line to determine the current profile.
|
|
17
|
+
|
|
18
|
+
If the file does not exist or has no `**Model Profile:**` line, the current profile is `default`.
|
|
19
|
+
|
|
20
|
+
## Step 2: Parse Argument
|
|
21
|
+
|
|
22
|
+
The profile argument comes from the user's arguments: **$ARGUMENTS**
|
|
23
|
+
|
|
24
|
+
Valid values:
|
|
25
|
+
- `default` — all agents inherit the parent model (no model parameter passed)
|
|
26
|
+
- `optimized` — assigns specific models per agent for cost/speed optimization
|
|
27
|
+
|
|
28
|
+
If the argument is not `default` or `optimized` and is not empty, tell the user the argument is invalid and show the two valid options.
|
|
29
|
+
|
|
30
|
+
## Step 3: Show or Update
|
|
31
|
+
|
|
32
|
+
### If no argument was provided
|
|
33
|
+
|
|
34
|
+
Show the current profile status and the model assignment table for that profile. Do not modify any files.
|
|
35
|
+
|
|
36
|
+
### If an argument was provided
|
|
37
|
+
|
|
38
|
+
Update `.fluxn/config.md`:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
mkdir -p .fluxn
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
- If `.fluxn/config.md` does not exist, create it with the profile setting.
|
|
45
|
+
- If it exists, read it first and add or replace the `**Model Profile:**` line. Preserve all other settings (e.g., `**Language:**`).
|
|
46
|
+
|
|
47
|
+
The `**Model Profile:**` line format:
|
|
48
|
+
```
|
|
49
|
+
**Model Profile:** [default | optimized]
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Step 4: Display Profile Table
|
|
53
|
+
|
|
54
|
+
Show the user (in the configured language) the model assignment table for the active profile:
|
|
55
|
+
|
|
56
|
+
### Default Profile
|
|
57
|
+
|
|
58
|
+
| Role | Agent | Model |
|
|
59
|
+
|------|-------|-------|
|
|
60
|
+
| Researcher | fluxn-researcher | inherit (parent model) |
|
|
61
|
+
| Executor | fluxn-executor | inherit (parent model) |
|
|
62
|
+
| Verifier | fluxn-verifier | inherit (parent model) |
|
|
63
|
+
| Plan | inline (orchestrator) | inherit (parent model) |
|
|
64
|
+
|
|
65
|
+
All agents use the same model as the parent Claude Code session. No `model` parameter is passed to Task tool calls.
|
|
66
|
+
|
|
67
|
+
### Optimized Profile
|
|
68
|
+
|
|
69
|
+
| Role | Agent | Model |
|
|
70
|
+
|------|-------|-------|
|
|
71
|
+
| Researcher | fluxn-researcher | sonnet |
|
|
72
|
+
| Executor | fluxn-executor | opus |
|
|
73
|
+
| Verifier | fluxn-verifier | sonnet |
|
|
74
|
+
| Plan | inline (orchestrator) | inherit (parent model) |
|
|
75
|
+
|
|
76
|
+
Researchers and verifier use Sonnet for speed and cost savings. Executor uses Opus for maximum code quality. Planning runs inline and inherits the parent model.
|
|
77
|
+
|
|
78
|
+
## Step 5: Confirm
|
|
79
|
+
|
|
80
|
+
Tell the user (in the configured language):
|
|
81
|
+
- Current profile: `[profile name]`
|
|
82
|
+
- If they just changed it: "Profile updated. The new model assignments will apply to all future agent spawns."
|
|
83
|
+
- If they just viewed it: "To switch profiles, run `/fluxn:profile default` or `/fluxn:profile optimized`."
|
|
@@ -11,7 +11,10 @@ You are the **research orchestrator** for Newa Flux. Your job: classify the task
|
|
|
11
11
|
|
|
12
12
|
## Step 1: Load Context
|
|
13
13
|
|
|
14
|
+
**Language check:** Read `.fluxn/config.md` if it exists. If it contains a `**Language:**` setting, use that language for ALL user-facing output (questions, confirmations, progress messages, the final report). Internal files (STATE.md, research files) remain in English.
|
|
15
|
+
|
|
14
16
|
Read these files if they exist:
|
|
17
|
+
- `.fluxn/config.md` — language preference
|
|
15
18
|
- `.fluxn/PROJECT.md` — project map (if missing, suggest running `/fluxn:init` first)
|
|
16
19
|
- `.fluxn/STATE.md` — current state
|
|
17
20
|
|
|
@@ -28,6 +31,33 @@ Based on the task description, classify as one of:
|
|
|
28
31
|
|
|
29
32
|
If ambiguous, default to **feature**.
|
|
30
33
|
|
|
34
|
+
## Step 2.5: Ask Clarifying Questions
|
|
35
|
+
|
|
36
|
+
**If task type is `bug`:** skip this step entirely — proceed to Step 3.
|
|
37
|
+
|
|
38
|
+
**If task type is `new-project`:** ask the user these questions (present them in the configured language):
|
|
39
|
+
1. What is the scope of this project? (MVP, prototype, production-ready)
|
|
40
|
+
2. Who are the target users or audience?
|
|
41
|
+
3. Do you have a preferred tech stack or any technology constraints?
|
|
42
|
+
4. What are the must-have features for the first version?
|
|
43
|
+
5. Are there any hard constraints? (timeline, budget, platform, compliance)
|
|
44
|
+
|
|
45
|
+
**If task type is `feature`:** ask the user these questions (present them in the configured language):
|
|
46
|
+
1. What is the expected behavior of this feature? Describe the user flow or system behavior.
|
|
47
|
+
2. Are there existing patterns or similar features in the codebase to follow?
|
|
48
|
+
3. What are the acceptance criteria — how will you know this feature is done?
|
|
49
|
+
4. What is the scope boundary — what should this feature explicitly NOT do?
|
|
50
|
+
|
|
51
|
+
If PROJECT.md content is available, reference it to make questions more context-specific (e.g., mention existing tech stack, existing features, project conventions).
|
|
52
|
+
|
|
53
|
+
After presenting the questions, tell the user: **"Type 'skip' to proceed without answering, or answer the questions above."**
|
|
54
|
+
|
|
55
|
+
Wait for the user's response. Then:
|
|
56
|
+
- If the user types "skip" (case-insensitive), set `userRequirements` to "User skipped clarifying questions." and proceed.
|
|
57
|
+
- Otherwise, capture the user's answers as `userRequirements`.
|
|
58
|
+
|
|
59
|
+
Store the answers — they will be written into STATE.md in Step 5 and passed to researcher agents in Step 4.
|
|
60
|
+
|
|
31
61
|
## Step 3: Setup
|
|
32
62
|
|
|
33
63
|
```bash
|
|
@@ -41,6 +71,11 @@ rm -f .fluxn/research/agent-*.md
|
|
|
41
71
|
|
|
42
72
|
## Step 4: Launch 4 Researchers in Parallel
|
|
43
73
|
|
|
74
|
+
### Model Resolution
|
|
75
|
+
Read `.fluxn/config.md`. If it contains `**Model Profile:** optimized`:
|
|
76
|
+
- Add `model: "sonnet"` to each researcher Task tool call below
|
|
77
|
+
If `default` or no Model Profile line: do not pass model parameter.
|
|
78
|
+
|
|
44
79
|
Spawn 4 `fluxn-researcher` agents using the Task tool, ALL IN PARALLEL.
|
|
45
80
|
|
|
46
81
|
Each agent receives PROJECT.md content as base context in their prompt.
|
|
@@ -88,8 +123,12 @@ TYPE: [codebase | web | hybrid]
|
|
|
88
123
|
PROJECT CONTEXT:
|
|
89
124
|
[paste PROJECT.md content here, or "No PROJECT.md yet — explore from scratch"]
|
|
90
125
|
|
|
126
|
+
USER REQUIREMENTS:
|
|
127
|
+
[paste userRequirements from Step 2.5, or "None — bug task, no clarifying questions asked."]
|
|
128
|
+
|
|
91
129
|
SPECIFIC INSTRUCTIONS:
|
|
92
130
|
[Specific investigation items for this focus area based on the task]
|
|
131
|
+
[Incorporate any relevant user requirements into the investigation scope]
|
|
93
132
|
|
|
94
133
|
Write your findings to [output file path]
|
|
95
134
|
```
|
|
@@ -112,16 +151,22 @@ Update `.fluxn/STATE.md`:
|
|
|
112
151
|
Type: [new-project | bug | feature]
|
|
113
152
|
Research agents: 4 (parallel)
|
|
114
153
|
|
|
154
|
+
## User Requirements
|
|
155
|
+
[paste userRequirements from Step 2.5 here — the user's answers to clarifying questions, or "User skipped clarifying questions." if skipped, or "N/A — bug task." if task type is bug]
|
|
156
|
+
|
|
115
157
|
## Blockers
|
|
116
158
|
None.
|
|
117
159
|
|
|
118
160
|
## Last Milestone
|
|
119
161
|
[keep existing or "None"]
|
|
162
|
+
|
|
163
|
+
## Milestone History
|
|
164
|
+
[preserve existing Milestone History from previous STATE.md, or "None" if no history]
|
|
120
165
|
```
|
|
121
166
|
|
|
122
167
|
## Step 6: Report
|
|
123
168
|
|
|
124
|
-
After all 4 agents complete, tell the user:
|
|
169
|
+
After all 4 agents complete, tell the user (in the configured language from `.fluxn/config.md`, or English if not set):
|
|
125
170
|
- Research complete for: [task description]
|
|
126
171
|
- Task type: [type]
|
|
127
172
|
- 4 research documents in `.fluxn/research/`
|
package/commands/fluxn/verify.md
CHANGED
|
@@ -9,17 +9,25 @@ You are the **verification orchestrator** for Newa Flux. Your job: spawn a read-
|
|
|
9
9
|
|
|
10
10
|
## Step 1: Load Context
|
|
11
11
|
|
|
12
|
+
**Language check:** Read `.fluxn/config.md` if it exists. If it contains a `**Language:**` setting, use that language for ALL user-facing output (questions, confirmations, result reports). Internal files (VERIFICATION.md, MILESTONE.md, STATE.md) remain in English.
|
|
13
|
+
|
|
12
14
|
Read these files:
|
|
13
|
-
1. `.fluxn/
|
|
14
|
-
2. `.fluxn/
|
|
15
|
-
3. `.fluxn/
|
|
16
|
-
4.
|
|
15
|
+
1. `.fluxn/config.md` — language preference (if exists)
|
|
16
|
+
2. `.fluxn/PLAN.md` — the plan (must exist)
|
|
17
|
+
3. `.fluxn/PROJECT.md` — project map
|
|
18
|
+
4. `.fluxn/STATE.md` — current state
|
|
19
|
+
5. All `.fluxn/phases/phase-*-done.md` files — phase reports
|
|
17
20
|
|
|
18
21
|
If PLAN.md doesn't exist, tell the user there's nothing to verify.
|
|
19
22
|
If no phase-done.md files exist, tell the user to run `/fluxn:execute` first.
|
|
20
23
|
|
|
21
24
|
## Step 2: Spawn Verifier
|
|
22
25
|
|
|
26
|
+
### Model Resolution
|
|
27
|
+
Read `.fluxn/config.md`. If it contains `**Model Profile:** optimized`:
|
|
28
|
+
- Add `model: "sonnet"` to the verifier Task tool call below
|
|
29
|
+
If `default` or no Model Profile line: do not pass model parameter.
|
|
30
|
+
|
|
23
31
|
Spawn ONE `fluxn-verifier` agent:
|
|
24
32
|
|
|
25
33
|
```
|
|
@@ -47,9 +55,106 @@ prompt: |
|
|
|
47
55
|
5. Return: overall result (PASSED/WARNINGS/FAILED) and key findings
|
|
48
56
|
```
|
|
49
57
|
|
|
50
|
-
## Step 3:
|
|
58
|
+
## Step 3: Archive Milestone
|
|
59
|
+
|
|
60
|
+
**Only run this step if verification result is PASSED or PASSED WITH WARNINGS.** Skip entirely on FAILED.
|
|
61
|
+
|
|
62
|
+
### 3.1: Create Archive Folder
|
|
63
|
+
|
|
64
|
+
1. Create `.fluxn/milestones/` directory if it doesn't exist
|
|
65
|
+
2. Generate a timestamped archive folder name: `.fluxn/milestones/YYYY-MM-DD-<slug>/`
|
|
66
|
+
- `YYYY-MM-DD` = today's date
|
|
67
|
+
- `<slug>` = task description from STATE.md, kebab-cased (lowercase, spaces/special chars to hyphens), max 40 characters, trimmed at word boundary
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
mkdir -p .fluxn/milestones/YYYY-MM-DD-<slug>
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### 3.2: Copy Artifacts to Archive
|
|
74
|
+
|
|
75
|
+
Copy the following files into the archive folder:
|
|
76
|
+
- `.fluxn/PLAN.md` → archive folder
|
|
77
|
+
- `.fluxn/VERIFICATION.md` → archive folder
|
|
78
|
+
- `.fluxn/MILESTONE.md` → archive folder
|
|
79
|
+
- `.fluxn/STATE.md` → archive folder (as a snapshot of the final state)
|
|
80
|
+
- All files from `.fluxn/research/` → `archive-folder/research/`
|
|
81
|
+
- All files from `.fluxn/phases/` → `archive-folder/phases/`
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
cp .fluxn/PLAN.md .fluxn/milestones/YYYY-MM-DD-<slug>/
|
|
85
|
+
cp .fluxn/VERIFICATION.md .fluxn/milestones/YYYY-MM-DD-<slug>/
|
|
86
|
+
cp .fluxn/MILESTONE.md .fluxn/milestones/YYYY-MM-DD-<slug>/
|
|
87
|
+
cp .fluxn/STATE.md .fluxn/milestones/YYYY-MM-DD-<slug>/
|
|
88
|
+
mkdir -p .fluxn/milestones/YYYY-MM-DD-<slug>/research
|
|
89
|
+
cp .fluxn/research/* .fluxn/milestones/YYYY-MM-DD-<slug>/research/ 2>/dev/null || true
|
|
90
|
+
mkdir -p .fluxn/milestones/YYYY-MM-DD-<slug>/phases
|
|
91
|
+
cp .fluxn/phases/* .fluxn/milestones/YYYY-MM-DD-<slug>/phases/ 2>/dev/null || true
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### 3.3: Update INDEX.md
|
|
95
|
+
|
|
96
|
+
Append an entry to `.fluxn/milestones/INDEX.md` (create the file with a header if it doesn't exist):
|
|
97
|
+
|
|
98
|
+
If the file doesn't exist yet, write:
|
|
99
|
+
```markdown
|
|
100
|
+
# Milestone Index
|
|
101
|
+
|
|
102
|
+
| Date | Task | Result | Archive Path |
|
|
103
|
+
|------|------|--------|--------------|
|
|
104
|
+
| YYYY-MM-DD | [task description] | [PASSED/PASSED WITH WARNINGS] | `.fluxn/milestones/YYYY-MM-DD-<slug>/` |
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
If the file already exists, append a new row to the table:
|
|
108
|
+
```
|
|
109
|
+
| YYYY-MM-DD | [task description] | [PASSED/PASSED WITH WARNINGS] | `.fluxn/milestones/YYYY-MM-DD-<slug>/` |
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### 3.4: Clean Working Files
|
|
113
|
+
|
|
114
|
+
Remove the working files that have been archived:
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
rm -f .fluxn/PLAN.md
|
|
118
|
+
rm -f .fluxn/VERIFICATION.md
|
|
119
|
+
rm -f .fluxn/MILESTONE.md
|
|
120
|
+
rm -f .fluxn/research/*
|
|
121
|
+
rm -f .fluxn/phases/*
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Keep the empty `.fluxn/research/` and `.fluxn/phases/` directories — do NOT delete them.
|
|
125
|
+
|
|
126
|
+
## Step 4: Update STATE.md
|
|
127
|
+
|
|
128
|
+
After verifier completes (and after archiving if applicable), update `.fluxn/STATE.md`.
|
|
129
|
+
|
|
130
|
+
Read `.fluxn/milestones/INDEX.md` if it exists to build the Milestone History section.
|
|
131
|
+
|
|
132
|
+
**If verification PASSED or PASSED WITH WARNINGS** (archive was created):
|
|
133
|
+
|
|
134
|
+
```markdown
|
|
135
|
+
# Newa Flux State
|
|
136
|
+
**Project:** [project name]
|
|
137
|
+
**Task:** None
|
|
138
|
+
**Status:** idle
|
|
139
|
+
**Phase:** N/A
|
|
140
|
+
**Last activity:** [today's date] — Verification: [PASSED|PASSED WITH WARNINGS]
|
|
141
|
+
|
|
142
|
+
## Current Task
|
|
143
|
+
No active task.
|
|
144
|
+
|
|
145
|
+
## Blockers
|
|
146
|
+
None.
|
|
51
147
|
|
|
52
|
-
|
|
148
|
+
## Last Milestone
|
|
149
|
+
[today's date] — [task description] — [result]
|
|
150
|
+
Archived to `.fluxn/milestones/YYYY-MM-DD-<slug>/`
|
|
151
|
+
|
|
152
|
+
## Milestone History
|
|
153
|
+
[Copy ALL rows from `.fluxn/milestones/INDEX.md` table here, or list each entry as:]
|
|
154
|
+
- YYYY-MM-DD — [task] — [result] — `.fluxn/milestones/YYYY-MM-DD-<slug>/`
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
**If verification FAILED** (no archive created):
|
|
53
158
|
|
|
54
159
|
```markdown
|
|
55
160
|
# Newa Flux State
|
|
@@ -57,7 +162,7 @@ After verifier completes, update `.fluxn/STATE.md`:
|
|
|
57
162
|
**Task:** [task description]
|
|
58
163
|
**Status:** idle
|
|
59
164
|
**Phase:** [completed]/[total]
|
|
60
|
-
**Last activity:** [today's date] — Verification:
|
|
165
|
+
**Last activity:** [today's date] — Verification: FAILED
|
|
61
166
|
|
|
62
167
|
## Current Task
|
|
63
168
|
Completed: [task description]
|
|
@@ -66,15 +171,17 @@ Completed: [task description]
|
|
|
66
171
|
None.
|
|
67
172
|
|
|
68
173
|
## Last Milestone
|
|
69
|
-
[
|
|
70
|
-
|
|
174
|
+
[keep existing from previous STATE.md]
|
|
175
|
+
|
|
176
|
+
## Milestone History
|
|
177
|
+
[preserve existing Milestone History from previous STATE.md, or "None" if empty]
|
|
71
178
|
```
|
|
72
179
|
|
|
73
|
-
## Step
|
|
180
|
+
## Step 5: Report
|
|
74
181
|
|
|
75
|
-
Tell the user:
|
|
182
|
+
Tell the user (in the configured language from `.fluxn/config.md`, or English if not set):
|
|
76
183
|
- **Result**: PASSED / PASSED WITH WARNINGS / FAILED
|
|
77
184
|
- **Summary**: Key findings from the verification (read from verifier's return message)
|
|
78
|
-
- **If PASSED**: "Task complete! Milestone
|
|
79
|
-
- **If WARNINGS**: List warnings. "Task
|
|
185
|
+
- **If PASSED**: "Task complete! Milestone archived to `.fluxn/milestones/YYYY-MM-DD-<slug>/`. Start a new task with `/fluxn:research <task>` or `/fluxn:go <task>`."
|
|
186
|
+
- **If WARNINGS**: List warnings. "Task archived to `.fluxn/milestones/YYYY-MM-DD-<slug>/` with warnings. Review details in the archive's VERIFICATION.md."
|
|
80
187
|
- **If FAILED**: List failures. "Some criteria were not met. Review `.fluxn/VERIFICATION.md` for details. Fix issues and re-run `/fluxn:execute` for failed phases, then `/fluxn:verify` again."
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "newaflux",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Simplified multi-agent workflow framework for Claude Code. 3 agents +
|
|
3
|
+
"version": "1.3.0",
|
|
4
|
+
"description": "Simplified multi-agent workflow framework for Claude Code. 3 agents + 7 commands = 10 files.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"newaflux": "bin/install.js"
|
|
7
7
|
},
|