@relipa/ai-flow-kit 0.0.6 → 0.0.7-beta.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 +33 -13
- package/bin/aiflow.js +58 -2
- package/custom/mcp-presets/gitnexus.json +8 -0
- package/custom/skills/generate-spec/SKILL.md +7 -0
- package/custom/skills/impact-analysis/SKILL.md +10 -0
- package/custom/skills/read-study-requirement/SKILL.md +11 -0
- package/custom/skills/review-plan/SKILL.md +15 -0
- package/docs/common/AIFLOW.md +12 -6
- package/docs/common/CHANGELOG.md +49 -5
- package/docs/common/QUICK_START.md +13 -11
- package/docs/common/cli-reference.md +23 -0
- package/package.json +2 -7
- package/scripts/checkpoint.js +46 -0
- package/scripts/doctor.js +111 -8
- package/scripts/gitnexus-worker.js +94 -0
- package/scripts/guide.js +42 -51
- package/scripts/hooks/session-start.js +35 -5
- package/scripts/hooks/session-stop.js +55 -0
- package/scripts/init.js +293 -18
- package/scripts/prompt.js +2 -2
- package/scripts/remove.js +54 -0
- package/scripts/task.js +62 -0
- package/scripts/update.js +14 -4
- package/scripts/use.js +41 -0
- package/upstream/.claude-plugin/marketplace.json +4 -4
- package/upstream/.claude-plugin/plugin.json +2 -4
- package/upstream/.cursor-plugin/plugin.json +2 -4
- package/upstream/docs/plans/2025-11-22-opencode-support-design.md +1 -1
- package/upstream/docs/plans/2025-11-28-skills-improvements-from-user-feedback.md +2 -2
- package/upstream/docs/testing.md +2 -2
- package/upstream/skills/subagent-driven-development/SKILL.md +5 -6
- package/upstream/skills/subagent-driven-development/implementer-prompt.md +2 -3
- package/upstream/skills/systematic-debugging/CREATION-LOG.md +1 -1
- package/upstream/skills/systematic-debugging/root-cause-tracing.md +1 -1
- package/upstream/skills/tdd-lean/SKILL.md +127 -0
- package/upstream/skills/using-git-worktrees/SKILL.md +4 -5
- package/upstream/skills/writing-plans/SKILL.md +3 -9
- package/upstream/tests/brainstorm-server/package-lock.json +36 -0
package/README.md
CHANGED
|
@@ -23,11 +23,11 @@ Developers only need a single command to load ticket context → AI automaticall
|
|
|
23
23
|
> [!TIP]
|
|
24
24
|
> After running `aiflow init`, documentation files are automatically copied to `.aiflow/docs/` in your project for easy access.
|
|
25
25
|
|
|
26
|
-
- **[Quick Start Guide](https://
|
|
27
|
-
- **[Full Workflow (5 Gates)](https://
|
|
28
|
-
- **[Troubleshooting](https://
|
|
29
|
-
- **[Integration Guide](https://
|
|
30
|
-
- **[Changelog](https://
|
|
26
|
+
- **[Quick Start Guide](https://github.com/example/ai-flow-kit/blob/main/docs/common/QUICK_START.md)** — Step-by-step instructions for developers.
|
|
27
|
+
- **[Full Workflow (5 Gates)](https://github.com/example/ai-flow-kit/blob/main/docs/common/AIFLOW.md)** — In-depth look at the Gate process.
|
|
28
|
+
- **[Troubleshooting](https://github.com/example/ai-flow-kit/blob/main/docs/common/troubleshooting.md)** — Common issues and fixes.
|
|
29
|
+
- **[Integration Guide](https://github.com/example/ai-flow-kit/blob/main/docs/common/ai-integration.md)** — Advanced tool setup (Claude, Cursor, Gemini).
|
|
30
|
+
- **[Changelog](https://github.com/example/ai-flow-kit/blob/main/docs/common/CHANGELOG.md)** — Version history and release notes.
|
|
31
31
|
|
|
32
32
|
---
|
|
33
33
|
|
|
@@ -52,7 +52,7 @@ PM writes ticket on Backlog/Jira
|
|
|
52
52
|
▼
|
|
53
53
|
⛩️ GATE 3 — Code Generation (TDD) [AI]
|
|
54
54
|
AI writes tests first → implement → tests pass
|
|
55
|
-
|
|
55
|
+
Verify implementation works
|
|
56
56
|
│ Code done
|
|
57
57
|
▼
|
|
58
58
|
⛩️ GATE 4 — AI Self-Review [AI + DEV]
|
|
@@ -74,13 +74,13 @@ PM writes ticket on Backlog/Jira
|
|
|
74
74
|
|
|
75
75
|
```bash
|
|
76
76
|
# Stable version
|
|
77
|
-
npm install -g
|
|
77
|
+
npm install -g ai-flow-kit
|
|
78
78
|
|
|
79
79
|
# Beta version (recommend for newest features)
|
|
80
|
-
npm install -g
|
|
80
|
+
npm install -g ai-flow-kit@beta
|
|
81
81
|
|
|
82
82
|
# Uninstall
|
|
83
|
-
npm uninstall -g
|
|
83
|
+
npm uninstall -g ai-flow-kit
|
|
84
84
|
```
|
|
85
85
|
|
|
86
86
|
---
|
|
@@ -93,6 +93,7 @@ npm uninstall -g @relipa/ai-flow-kit
|
|
|
93
93
|
| `aiflow use <ticket>` | Load ticket context (Backlog/Jira). |
|
|
94
94
|
| `aiflow task` | Manage multiple tasks — pause, switch, resume. |
|
|
95
95
|
| `aiflow prompt` | Generate tool-optimized prompts (`--env cursor`). |
|
|
96
|
+
| `aiflow sync-skills` | Manually synchronize AI Instruction files with local custom skills. |
|
|
96
97
|
| `aiflow telemetry` | Manage telemetry tracking (enable/disable/status). |
|
|
97
98
|
| `aiflow guide` | View integrated multi-AI integration guide. |
|
|
98
99
|
|
|
@@ -104,8 +105,10 @@ Initial setup for the project. Run once per project.
|
|
|
104
105
|
# Single framework + adapter
|
|
105
106
|
aiflow init --framework spring-boot --adapter backlog
|
|
106
107
|
|
|
107
|
-
#
|
|
108
|
-
aiflow init --with-rtk
|
|
108
|
+
# Enable token savings tools
|
|
109
|
+
aiflow init --with-rtk # RTK: compress bash outputs (60–90% reduction)
|
|
110
|
+
# aiflow init --with-gitnexus # GitNexus: code intelligence (waits for index)
|
|
111
|
+
# aiflow init --with-gitnexus --no-wait # GitNexus: index in background
|
|
109
112
|
|
|
110
113
|
# Multiple frameworks and adapters
|
|
111
114
|
aiflow init --framework spring-boot,reactjs --adapter backlog,jira
|
|
@@ -126,6 +129,21 @@ aiflow init --framework spring-boot,reactjs --adapter backlog,jira
|
|
|
126
129
|
|
|
127
130
|
---
|
|
128
131
|
|
|
132
|
+
### `aiflow sync-skills`
|
|
133
|
+
|
|
134
|
+
Synchronize AI instruction files (`CLAUDE.md`, `GEMINI.md`, etc.) and Skills without upgrading the package version.
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
aiflow sync-skills
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
**Features:**
|
|
141
|
+
- Intelligent marker-based updates (`<!-- aiflow-kit-start -->`)
|
|
142
|
+
- Confirmation prompts before overwriting custom rules
|
|
143
|
+
- English notifications and status reports
|
|
144
|
+
|
|
145
|
+
---
|
|
146
|
+
|
|
129
147
|
### `aiflow use <ticket>`
|
|
130
148
|
|
|
131
149
|
Load ticket context into `.aiflow/context/current.json`.
|
|
@@ -179,6 +197,8 @@ aiflow task switch PROJ-99 # pause current + switch to another task
|
|
|
179
197
|
aiflow task resume PROJ-33 # resume a paused task (restores context + gate state)
|
|
180
198
|
aiflow task reset PROJ-33 # reset to Gate 1 (keeps ticket context, clears progress)
|
|
181
199
|
aiflow task remove PROJ-33 # permanently delete all saved data for the task
|
|
200
|
+
aiflow task next # approve current gate + prepare for fresh session
|
|
201
|
+
aiflow task next --ticket PROJ-33 # same, but specify ticket explicitly
|
|
182
202
|
```
|
|
183
203
|
|
|
184
204
|
**Use case — switching tasks mid-flow:**
|
|
@@ -337,7 +357,7 @@ ai-flow-kit/
|
|
|
337
357
|
|
|
338
358
|
**Custom skill:** create `custom/skills/<name>/SKILL.md`
|
|
339
359
|
|
|
340
|
-
Then run `aiflow update` to apply.
|
|
360
|
+
Then run `aiflow update` or `aiflow sync-skills` to apply.
|
|
341
361
|
|
|
342
362
|
---
|
|
343
363
|
|
|
@@ -355,7 +375,7 @@ Then run `aiflow update` to apply.
|
|
|
355
375
|
|
|
356
376
|
**`aiflow` not found:**
|
|
357
377
|
```bash
|
|
358
|
-
npm install -g
|
|
378
|
+
npm install -g ai-flow-kit
|
|
359
379
|
```
|
|
360
380
|
|
|
361
381
|
**Backlog load fails:**
|
package/bin/aiflow.js
CHANGED
|
@@ -16,6 +16,7 @@ const removeCommand = require('../scripts/remove');
|
|
|
16
16
|
const guideCommand = require('../scripts/guide');
|
|
17
17
|
const telemetryCommand= require('../scripts/telemetry/cli');
|
|
18
18
|
const taskCommand = require('../scripts/task');
|
|
19
|
+
const checkpointCommand = require('../scripts/checkpoint');
|
|
19
20
|
const { record } = require('../scripts/telemetry/record');
|
|
20
21
|
|
|
21
22
|
program
|
|
@@ -63,6 +64,8 @@ program
|
|
|
63
64
|
.option('-e, --env <types>', 'AI environment(s)/tool(s), comma-separated (e.g. cursor,gemini,copilot)')
|
|
64
65
|
.option('--with-rtk', 'force enable RTK token compression hook')
|
|
65
66
|
.option('--no-rtk', 'skip RTK setup even if RTK is detected')
|
|
67
|
+
// .option('--with-gitnexus', 'enable GitNexus code intelligence (indexes in background)')
|
|
68
|
+
// .option('--wait', 'wait for GitNexus indexing to complete before exiting')
|
|
66
69
|
.action((options) => {
|
|
67
70
|
options.frameworks = options.framework
|
|
68
71
|
? options.framework.split(',').map(s => s.trim()).filter(Boolean)
|
|
@@ -162,6 +165,15 @@ taskCmd
|
|
|
162
165
|
.description('Permanently delete all saved data for a task')
|
|
163
166
|
.action((ticketId) => { record('command.invoked', { command: 'task.remove' }); taskCommand('remove', { taskId: ticketId }); });
|
|
164
167
|
|
|
168
|
+
taskCmd
|
|
169
|
+
.command('next')
|
|
170
|
+
.description('Approve current gate and prepare next session (saves state for resume)')
|
|
171
|
+
.option('-t, --ticket <id>', 'ticket ID (defaults to active task)')
|
|
172
|
+
.action((opts) => {
|
|
173
|
+
record('command.invoked', { command: 'task.next' });
|
|
174
|
+
taskCommand('next', { taskId: opts.ticket });
|
|
175
|
+
});
|
|
176
|
+
|
|
165
177
|
// ── context ───────────────────────────────────────────────────
|
|
166
178
|
program
|
|
167
179
|
.command('context [action]')
|
|
@@ -176,6 +188,19 @@ program
|
|
|
176
188
|
contextCommand(action, options);
|
|
177
189
|
});
|
|
178
190
|
|
|
191
|
+
// ── checkpoint ────────────────────────────────────────────────
|
|
192
|
+
program
|
|
193
|
+
.command('checkpoint')
|
|
194
|
+
.description('Record token usage checkpoint (called by AI during gate work)')
|
|
195
|
+
.requiredOption('--gate <n>', 'gate number (1–5)', parseInt)
|
|
196
|
+
.requiredOption('--step <name>', 'step name (e.g. "tests-written")')
|
|
197
|
+
.requiredOption('--tokens <n>', 'estimated token count', parseInt)
|
|
198
|
+
.option('-t, --ticket <id>', 'ticket ID (defaults to active task)')
|
|
199
|
+
.action((opts) => {
|
|
200
|
+
record('command.invoked', { command: 'checkpoint' });
|
|
201
|
+
checkpointCommand({ gate: opts.gate, step: opts.step, tokens: opts.tokens, ticket: opts.ticket });
|
|
202
|
+
});
|
|
203
|
+
|
|
179
204
|
// ── validate ──────────────────────────────────────────────────
|
|
180
205
|
program
|
|
181
206
|
.command('validate <file>')
|
|
@@ -276,14 +301,45 @@ program
|
|
|
276
301
|
updateCommand(options);
|
|
277
302
|
});
|
|
278
303
|
|
|
304
|
+
// ── sync-skills ───────────────────────────────────────────────
|
|
305
|
+
program
|
|
306
|
+
.command('sync-skills')
|
|
307
|
+
.description('Manually synchronize AI Instruction files with local custom skills')
|
|
308
|
+
.action(async () => {
|
|
309
|
+
record('command.invoked', { command: 'sync-skills' });
|
|
310
|
+
const projectDir = process.cwd();
|
|
311
|
+
const { setupFramework, AI_TOOL_FILES, ensureAiflowGitignored } = require('../scripts/init');
|
|
312
|
+
const fs = require('fs-extra');
|
|
313
|
+
const path = require('path');
|
|
314
|
+
const chalk = require('chalk');
|
|
315
|
+
|
|
316
|
+
const stateFile = path.join(projectDir, '.aiflow', 'state.json');
|
|
317
|
+
if (!(await fs.pathExists(stateFile))) {
|
|
318
|
+
console.log(chalk.red('Project is not initialized. Please run `aiflow init` first.'));
|
|
319
|
+
return;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
const state = await fs.readJson(stateFile);
|
|
323
|
+
const frameworks = state.frameworks || [];
|
|
324
|
+
const selectedTools = state.aiTools || Object.keys(AI_TOOL_FILES);
|
|
325
|
+
|
|
326
|
+
console.log(chalk.cyan('⟳ Syncing AI Instruction files...'));
|
|
327
|
+
for (const fw of frameworks) {
|
|
328
|
+
await setupFramework(projectDir, fw, frameworks.length > 1, selectedTools);
|
|
329
|
+
}
|
|
330
|
+
await ensureAiflowGitignored(projectDir);
|
|
331
|
+
console.log(chalk.green('✨ Sync completed!'));
|
|
332
|
+
});
|
|
333
|
+
|
|
279
334
|
// ── doctor ────────────────────────────────────────────────────
|
|
280
335
|
program
|
|
281
336
|
.command('doctor')
|
|
282
337
|
.description('Health check of AI Flow Kit setup')
|
|
338
|
+
.option('-t, --ticket <id>', 'show token breakdown for specific ticket')
|
|
283
339
|
.option('-v, --verbose', 'detailed output')
|
|
284
|
-
.action(() => {
|
|
340
|
+
.action((opts) => {
|
|
285
341
|
record('command.invoked', { command: 'doctor' });
|
|
286
|
-
doctorCommand();
|
|
342
|
+
doctorCommand({ ticket: opts.ticket, verbose: opts.verbose });
|
|
287
343
|
});
|
|
288
344
|
|
|
289
345
|
// ── telemetry ──────────────────────────────────────────────────
|
|
@@ -17,6 +17,13 @@ keywords: spec, plan, implementation, tdd, coding plan
|
|
|
17
17
|
- ✅ Gate 1 APPROVED — `plan/[ticket-id]/requirement.md` reviewed and approved by DEV
|
|
18
18
|
- ✅ Requirement document includes: requirements, solution, impact analysis, estimate
|
|
19
19
|
|
|
20
|
+
## Fast Mode Output Rules (CRITICAL)
|
|
21
|
+
|
|
22
|
+
When updating `plan/[ticket-id]/summary.md` in **fast mode**:
|
|
23
|
+
- **Keep it extremely short.**
|
|
24
|
+
- Add a bullet point indicating Gate 2 plan is ready.
|
|
25
|
+
- **DO NOT copy the entire plan.md into summary.md.**
|
|
26
|
+
|
|
20
27
|
---
|
|
21
28
|
|
|
22
29
|
## Process
|
|
@@ -20,6 +20,16 @@ keywords: impact, refactor, breaking change, scope
|
|
|
20
20
|
|
|
21
21
|
### Step 1: Find all usage (Dependency Map)
|
|
22
22
|
|
|
23
|
+
**Preferred — If GitNexus MCP is available** (`.mcp.json` has `gitnexus` entry):
|
|
24
|
+
```
|
|
25
|
+
impact("ClassName") → structured blast radius: callers, dependents, risk score
|
|
26
|
+
detect_changes() → reads current git diff, maps changed lines → affected symbols
|
|
27
|
+
```
|
|
28
|
+
- Use `impact()` when you know the class/function name being modified.
|
|
29
|
+
- Use `detect_changes()` when starting Gate 4 review — it auto-detects what changed from git diff without needing to specify names.
|
|
30
|
+
- One call replaces all grep commands below. Proceed directly to Step 2 with the result.
|
|
31
|
+
|
|
32
|
+
**Fallback — grep manually** (if GitNexus not configured):
|
|
23
33
|
```bash
|
|
24
34
|
# Find all files importing/calling the class/function being modified
|
|
25
35
|
grep -r "ClassName\|functionName\|methodName" --include="*.php" .
|
|
@@ -28,6 +28,13 @@ Check `mode` in `.aiflow/context/current.json` before starting:
|
|
|
28
28
|
|
|
29
29
|
> Target: Gate 1 complete in **< 5 minutes**, minimum token usage.
|
|
30
30
|
|
|
31
|
+
## Fast Mode Output Rules (CRITICAL)
|
|
32
|
+
|
|
33
|
+
When creating `plan/[ticket-id]/summary.md` during Gate 1:
|
|
34
|
+
- You must create the `summary.md` file after Gate 1 is APPROVED, to track session progress.
|
|
35
|
+
- Keep `summary.md` concise. Only include short bullet points tracking Gates.
|
|
36
|
+
- Do not write verbose implementation details in `summary.md` at Gate 1.
|
|
37
|
+
|
|
31
38
|
1. Read `.aiflow/context/current.json` — ticket title, description, acceptance criteria
|
|
32
39
|
2. Identify **directly affected files** from ticket text and file names only.
|
|
33
40
|
DO NOT trace data flow or read unrelated source files.
|
|
@@ -73,6 +80,10 @@ Check `mode` in `.aiflow/context/current.json` before starting:
|
|
|
73
80
|
1. Read `.aiflow/context/current.json` — ticket info from Backlog/Jira
|
|
74
81
|
2. Read `CLAUDE.md` — understand project architecture, tech stack, conventions
|
|
75
82
|
3. Read related source files — trace data flow, identify patterns, dependencies
|
|
83
|
+
- **If GitNexus MCP is available** (`.mcp.json` has `gitnexus` entry): invoke GitNexus MCP tools instead of reading files directly — one call returns full context without multi-file exploration:
|
|
84
|
+
- `gitnexus: context("ClassName")` → 360° view of a symbol (dependencies, callers, methods)
|
|
85
|
+
- `gitnexus: query("keyword or description")` → hybrid search across codebase
|
|
86
|
+
- Saves ~50% of token cost at this step vs reading files manually
|
|
76
87
|
- **If task is a Bug Fix:** Invoke `superpowers:systematic-debugging` to trace root cause before proposing fixes.
|
|
77
88
|
4. Read ticket comments — additional context from PM/team
|
|
78
89
|
|
|
@@ -41,6 +41,21 @@ Assess impact by reasoning about the changed files only:
|
|
|
41
41
|
- [ ] No hardcoded credentials or secrets
|
|
42
42
|
- [ ] No SQL injection risk in new queries
|
|
43
43
|
|
|
44
|
+
## Fast Mode Output Rules (CRITICAL)
|
|
45
|
+
|
|
46
|
+
When creating `plan/[ticket-id]/summary.md` in **fast mode**:
|
|
47
|
+
- **Do not write long explanations or descriptions.**
|
|
48
|
+
- **List format only:** Bullet points with `[NEW]`, `[MODIFIED]`, `[DELETED]`.
|
|
49
|
+
- **Purpose:** Next to each file, write exactly 1 sentence explaining the *purpose* (the "why"), not the implementation details.
|
|
50
|
+
|
|
51
|
+
**Example summary.md block:**
|
|
52
|
+
```markdown
|
|
53
|
+
### Gate 3 — Code
|
|
54
|
+
- ✅ **Implemented batch endpoints**
|
|
55
|
+
- \`[NEW] src/controllers/BatchController.ts\`: Handle bulk export requests
|
|
56
|
+
- \`[MODIFIED] src/services/ExportService.ts\`: Added S3 upload integration
|
|
57
|
+
```
|
|
58
|
+
|
|
44
59
|
---
|
|
45
60
|
|
|
46
61
|
## Process
|
package/docs/common/AIFLOW.md
CHANGED
|
@@ -28,7 +28,7 @@ PM writes ticket on Backlog/Jira
|
|
|
28
28
|
▼
|
|
29
29
|
⛩️ GATE 3 — Code Generation (TDD) [AI]
|
|
30
30
|
AI writes tests first → implement → tests pass
|
|
31
|
-
|
|
31
|
+
Verify implementation works
|
|
32
32
|
│ Code done
|
|
33
33
|
▼
|
|
34
34
|
⛩️ GATE 4 — AI Self-Review [AI + DEV]
|
|
@@ -65,6 +65,7 @@ AI Flow Kit allows you to manage multiple tasks in the same repository without l
|
|
|
65
65
|
- **`aiflow task pause`**: Save current context and gate progress to `.aiflow/tasks/<taskId>/`.
|
|
66
66
|
- **`aiflow task switch <id>`**: Pause current task and switch to another.
|
|
67
67
|
- **`aiflow task resume <id>`**: Restore context and gate state. AI auto-resumes from the correct gate.
|
|
68
|
+
- **`aiflow task next`**: Approve the current gate, clear context, and prepare the task for a fresh session (saves tokens).
|
|
68
69
|
|
|
69
70
|
---
|
|
70
71
|
|
|
@@ -182,7 +183,7 @@ Summary:
|
|
|
182
183
|
1. Read the approved requirement document
|
|
183
184
|
2. **Invoke** `superpowers:writing-plans` → create detailed implementation plan
|
|
184
185
|
3. Break down into TDD tasks: test first → implement → verify
|
|
185
|
-
4. Define
|
|
186
|
+
4. Define verification strategy (evidence before claims)
|
|
186
187
|
5. Present plan and wait for APPROVED
|
|
187
188
|
|
|
188
189
|
**Implementation Plan Structure:**
|
|
@@ -193,7 +194,6 @@ Summary:
|
|
|
193
194
|
│ ├── Task 2: Implement [component]
|
|
194
195
|
│ ├── Task 3: Write test for [next scenario]
|
|
195
196
|
│ └── ...
|
|
196
|
-
├── Commit Strategy
|
|
197
197
|
└── Test Commands
|
|
198
198
|
```
|
|
199
199
|
|
|
@@ -202,7 +202,7 @@ Summary:
|
|
|
202
202
|
```
|
|
203
203
|
⏸️ GATE 2: IMPLEMENTATION PLAN READY
|
|
204
204
|
|
|
205
|
-
Tasks: [N] |
|
|
205
|
+
Tasks: [N] | Verification: [N] | Test-first tasks: [N]
|
|
206
206
|
|
|
207
207
|
→ Type APPROVED to start coding
|
|
208
208
|
→ Or provide feedback to adjust
|
|
@@ -227,7 +227,7 @@ Tasks: [N] | Commits: [N] | Test-first tasks: [N]
|
|
|
227
227
|
2. `superpowers:test-driven-development` — write tests FIRST
|
|
228
228
|
3. Run tests → confirm FAIL
|
|
229
229
|
4. Implement code → tests PASS
|
|
230
|
-
5.
|
|
230
|
+
5. Verify implementation works
|
|
231
231
|
|
|
232
232
|
#### Bug fix task (extra):
|
|
233
233
|
1. `superpowers:systematic-debugging` — trace root cause, NO guessing
|
|
@@ -238,10 +238,16 @@ Tasks: [N] | Commits: [N] | Test-first tasks: [N]
|
|
|
238
238
|
1. Ensure tests cover current behavior
|
|
239
239
|
2. Refactor in small steps — keep tests green continuously
|
|
240
240
|
|
|
241
|
+
**Fast Mode (tdd-lean):**
|
|
242
|
+
In fast mode, AI uses the `tdd-lean` skill instead of per-test TDD to save massive token costs:
|
|
243
|
+
1. **Batch Red:** Write ALL tests at once. Run once. (Confirm all fail).
|
|
244
|
+
2. **Batch Green:** Implement ALL code at once. Run once. (Confirm all pass).
|
|
245
|
+
3. **Discipline:** After every run, discard full stack traces and keep ONLY the summary line.
|
|
246
|
+
|
|
241
247
|
**Gate 3 Output:**
|
|
242
248
|
- Code implementation finished
|
|
243
249
|
- All tests PASS
|
|
244
|
-
-
|
|
250
|
+
- Verified (evidence provided)
|
|
245
251
|
|
|
246
252
|
---
|
|
247
253
|
|
package/docs/common/CHANGELOG.md
CHANGED
|
@@ -1,15 +1,42 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
All notable changes to
|
|
3
|
+
All notable changes to **ai-flow-kit** will be documented in this file.
|
|
4
4
|
|
|
5
5
|
Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|
6
6
|
Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
## [0.0.7] - 2026-05-07
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **Intelligent AI Instruction Synchronization** — Marker-based (`<!-- aiflow-kit-start -->`) block updates for `CLAUDE.md`, `GEMINI.md`, and `.cursorrules`.
|
|
15
|
+
- **Interactive Instruction Safety** — Granular confirmation prompts for all instruction file modifications (update block, overwrite, or create new).
|
|
16
|
+
- **Automated Repository Hygiene** — Generated files and folders (`.aiflow/`, `plan/`, `.claude/`, `.rules/`, `.mcp.json`, and instruction files) are now automatically managed in `.gitignore`.
|
|
17
|
+
- **`aiflow sync-skills` command** — Lightweight command to synchronize Skill Registry and Instruction files without a full version upgrade.
|
|
18
|
+
- **Enhanced `aiflow guide --flow`** — Now dynamically displays the `## Workflow Overview` section directly from `AIFLOW.md` for up-to-date documentation.
|
|
19
|
+
- **Token savings dashboard in `aiflow doctor`** — new "Token savings" section shows RTK status and estimated 60–90% reduction on bash outputs.
|
|
20
|
+
|
|
21
|
+
### Changed
|
|
22
|
+
|
|
23
|
+
- **`aiflow update` efficiency** — Now automatically performs skill and instruction synchronization even if the version is unchanged (removes the need for `--force`).
|
|
24
|
+
- **Safety First Development** — Removed all automatic `git commit` instructions from AI skills (`subagent-driven-development`, `using-git-worktrees`, `writing-plans`) to ensure developer-led commit management.
|
|
25
|
+
- **Localized CLI** — All interactive prompts and confirmation messages translated to English for consistency.
|
|
26
|
+
- **`aiflow init` RTK entry** — flag description updated to clarify RTK saves bash output tokens (60–90%).
|
|
27
|
+
- **`aiflow doctor`** — RTK section merged into new "Token savings" section.
|
|
28
|
+
- **README.md / QUICK_START.md** — Updated to reflect `sync-skills` and improved update flow.
|
|
29
|
+
|
|
30
|
+
### Fixed
|
|
31
|
+
|
|
32
|
+
- Fixed `.github/copilot-instructions.md` not being included in automated `.gitignore` rules.
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
10
36
|
## [0.0.6] - 2026-04-29
|
|
11
37
|
|
|
12
38
|
### Added
|
|
39
|
+
|
|
13
40
|
- **Global Fast Mode (Default)** — Optimize AI efficiency by prioritizing speed and minimizing token usage.
|
|
14
41
|
- Gate 1: Fast track scan with max 1 clarifying question.
|
|
15
42
|
- Gate 3: Disable subagents by default; implement all tasks in a single session.
|
|
@@ -25,6 +52,7 @@ Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
25
52
|
- **Spring Boot code examples extracted** — Java code examples moved to separate files to reduce `CLAUDE.md` size.
|
|
26
53
|
|
|
27
54
|
### Changed
|
|
55
|
+
|
|
28
56
|
- **Default mode** for all new tasks is now `fast` instead of `auto`.
|
|
29
57
|
- **`aiflow init` improvements** — Supports multi-select framework and protects existing instruction files from being overwritten.
|
|
30
58
|
- **CLAUDE.md Optimization** — Reduced Spring Boot template size by ~70%, saving ~3-5k tokens per session.
|
|
@@ -32,18 +60,20 @@ Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
32
60
|
- **Automatic Task Pausing** — When loading a new ticket, the current task is automatically paused and its state is saved.
|
|
33
61
|
|
|
34
62
|
### Fixed
|
|
35
|
-
- Broken 404 documentation links on the npmjs.com page.
|
|
36
63
|
|
|
64
|
+
- Broken 404 documentation links on the npmjs.com page.
|
|
37
65
|
|
|
38
66
|
---
|
|
39
67
|
|
|
40
68
|
## [0.0.4-beta.5] - 2026-04-21
|
|
41
69
|
|
|
42
70
|
### Added
|
|
71
|
+
|
|
43
72
|
- Created a dedicated `docs/` folder to house all developer-facing documentation.
|
|
44
73
|
- Integrated AI Skill Registry into all tool templates (Claude, Cursor, Gemini, Copilot) for better skill discovery.
|
|
45
74
|
|
|
46
75
|
### Changed
|
|
76
|
+
|
|
47
77
|
- Moved `README.md`, `QUICK_START.md`, `AIFLOW.md`, `CHANGELOG.md`, and `IMPLEMENTATION_SUMMARY.md` into the `docs/` directory.
|
|
48
78
|
- Updated `package.json` to exclude internal-only files (`CONTRIBUTING.md`, `plan.md`) from the NPM package distribution.
|
|
49
79
|
- Updated `scripts/init.js` to source documentation from the new `docs/` location.
|
|
@@ -54,11 +84,13 @@ Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
54
84
|
## [0.0.5-beta.0] - 2026-04-23
|
|
55
85
|
|
|
56
86
|
### Added
|
|
87
|
+
|
|
57
88
|
- **`aiflow gate <n> <action>` command** — Called automatically by AI during gate transitions. Supports `start` and `approved` actions for gates 1-5. Options: `--ticket <id>`, `--ai-tool <tool>`.
|
|
58
89
|
- **Telemetry gate logging** — Gate workflow templates now emit `aiflow gate N start/approved --ticket [id]` telemetry calls at each gate transition for usage metrics.
|
|
59
90
|
- **`aiflow telemetry flush` command** — Force-sends buffered telemetry events immediately.
|
|
60
91
|
|
|
61
92
|
### Changed
|
|
93
|
+
|
|
62
94
|
- **`aiflow init` safe overwrite flow** — When a project already has `CLAUDE.md`, `GEMINI.md`, `.cursorrules`, etc., `aiflow init` now prompts before overwriting:
|
|
63
95
|
- **No (default):** keeps existing file untouched; saves the aiflow template to `.aiflow/reference/<file>` for manual comparison/merge.
|
|
64
96
|
- **Yes:** backs up the existing file to `.aiflow/backup/<file>` before overwriting — nothing is permanently lost.
|
|
@@ -73,7 +105,8 @@ Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
73
105
|
## [0.0.5] - 2026-04-23
|
|
74
106
|
|
|
75
107
|
### Added
|
|
76
|
-
|
|
108
|
+
|
|
109
|
+
- **Telemetry System (MVP)**: Added anonymous usage tracking to measure command metrics and user adoption.
|
|
77
110
|
- `aiflow telemetry enable/disable/status` commands to easily opt-in or opt-out.
|
|
78
111
|
- Automatically captures environment metadata and Git email via `git config --global user.email`.
|
|
79
112
|
- Secure payload signing natively using Node `crypto` HMAC-SHA256 to ensure data authenticity.
|
|
@@ -81,6 +114,7 @@ Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
81
114
|
- Support tracking for multiple AI platforms including Cursor and Gemini via Command Execution events and the new Telemetry SDK.
|
|
82
115
|
|
|
83
116
|
### Security
|
|
117
|
+
|
|
84
118
|
- **Strict Privacy**: Explicitly removed all prompt content and chat history tracking to ensure 100% confidentiality of company code and PII.
|
|
85
119
|
|
|
86
120
|
---
|
|
@@ -88,14 +122,18 @@ Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
88
122
|
## [Unreleased]
|
|
89
123
|
|
|
90
124
|
## [0.0.3-beta.0] - 2026-04-13
|
|
125
|
+
|
|
91
126
|
### Security
|
|
127
|
+
|
|
92
128
|
- Removed internal GitLab repository links and tracking information.
|
|
93
129
|
- Cleaned `.npmrc` configuration.
|
|
94
130
|
- Added helper scripts for beta and stable releases.
|
|
95
131
|
|
|
96
132
|
## [0.0.2] - 2026-04-13
|
|
133
|
+
|
|
97
134
|
### Changed
|
|
98
|
-
|
|
135
|
+
|
|
136
|
+
- Updated package name in documentation and configuration.
|
|
99
137
|
- Fixed installation guides in README and QUICK_START.
|
|
100
138
|
|
|
101
139
|
## [0.0.1] - 2026-04-13 — Initial Release
|
|
@@ -103,6 +141,7 @@ Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
103
141
|
### Added
|
|
104
142
|
|
|
105
143
|
#### CLI (`aiflow`)
|
|
144
|
+
|
|
106
145
|
- `aiflow init` — scaffold AI workflow config into any project
|
|
107
146
|
(supports `--framework` spring-boot/reactjs, `--adapter` jira/backlog)
|
|
108
147
|
- `aiflow use <skill>` — activate a custom skill in the current project
|
|
@@ -113,6 +152,7 @@ Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
113
152
|
- `aiflow --version` — print installed version
|
|
114
153
|
|
|
115
154
|
#### 5-Gate AI Workflow
|
|
155
|
+
|
|
116
156
|
- **Gate 1 — AI Analyze Requirement**: Auto-starts when a ticket context exists
|
|
117
157
|
in `.aiflow/context/current.json`; outputs `plan/[ticket-id]/requirement.md`
|
|
118
158
|
- **Gate 2 — Implementation Plan**: TDD plan generation, gated by `APPROVED`
|
|
@@ -121,6 +161,7 @@ Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
121
161
|
- **Gate 5 — Peer Review & PR**: Guided PR creation via `requesting-code-review` skill
|
|
122
162
|
|
|
123
163
|
#### Custom Skills (7 skills)
|
|
164
|
+
|
|
124
165
|
- `read-study-requirement` — Gate 1 requirement analysis with clarifying Q&A loop
|
|
125
166
|
- `generate-spec` — Gate 2 TDD implementation spec generator
|
|
126
167
|
- `impact-analysis` — breaking-change and dependency impact assessment
|
|
@@ -130,17 +171,20 @@ Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
130
171
|
- `figma-to-component` — Figma design → UI component code generator
|
|
131
172
|
|
|
132
173
|
#### Multi-AI Support
|
|
174
|
+
|
|
133
175
|
- **Claude Code** integration via `CLAUDE.md` + `.claude/` directory structure
|
|
134
176
|
- **Gemini CLI** integration via `GEMINI.md`
|
|
135
177
|
- **GitHub Copilot** integration via agents config
|
|
136
178
|
- Superpowers skill library bundled as `upstream/` (pinned to v5.0.5)
|
|
137
179
|
|
|
138
180
|
#### Project Templates
|
|
181
|
+
|
|
139
182
|
- `AIFLOW.md` — team workflow reference document
|
|
140
183
|
- `QUICK_START.md` — 5-minute setup guide
|
|
141
184
|
- `.aiflowrc.json.example` — configuration file reference
|
|
142
185
|
|
|
143
186
|
### Architecture Notes
|
|
187
|
+
|
|
144
188
|
- Stateless per-ticket design — no persistent memory across sessions (planned: v0.1.x)
|
|
145
189
|
- Manual skill sync model via `aiflow use` (managed `aiflow skill` CLI planned: v0.1.x)
|
|
146
190
|
- Spring Boot (Java 17+) used as the reference framework in `CLAUDE.md` coding rules
|
|
@@ -150,7 +194,7 @@ Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
150
194
|
## How to upgrade
|
|
151
195
|
|
|
152
196
|
```bash
|
|
153
|
-
npm install -g
|
|
197
|
+
npm install -g ai-flow-kit@latest
|
|
154
198
|
aiflow --version
|
|
155
199
|
```
|
|
156
200
|
|
|
@@ -7,17 +7,16 @@
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
|
|
11
|
-
npm install -g @relipa/ai-flow-kit
|
|
10
|
+
npm install -g ai-flow-kit
|
|
12
11
|
|
|
13
12
|
# Beta version (recommend for newest features)
|
|
14
|
-
npm install -g
|
|
13
|
+
npm install -g ai-flow-kit@beta
|
|
15
14
|
|
|
16
15
|
# Verification
|
|
17
16
|
aiflow --version
|
|
18
17
|
|
|
19
18
|
# Uninstall
|
|
20
|
-
npm uninstall -g
|
|
19
|
+
npm uninstall -g ai-flow-kit
|
|
21
20
|
```
|
|
22
21
|
|
|
23
22
|
---
|
|
@@ -146,7 +145,7 @@ APPROVED
|
|
|
146
145
|
|
|
147
146
|
AI outputs:
|
|
148
147
|
- TDD task breakdown (test first → implement → verify)
|
|
149
|
-
-
|
|
148
|
+
- Verification strategy (evidence before claims)
|
|
150
149
|
- Test commands
|
|
151
150
|
|
|
152
151
|
**Your action:**
|
|
@@ -166,7 +165,7 @@ APPROVED
|
|
|
166
165
|
|
|
167
166
|
- Writes tests FIRST → runs → confirms FAIL
|
|
168
167
|
- Implements code → tests PASS
|
|
169
|
-
-
|
|
168
|
+
- Verifies implementation works
|
|
170
169
|
|
|
171
170
|
**Your action:** Monitor. No action needed unless AI asks a question.
|
|
172
171
|
|
|
@@ -256,7 +255,7 @@ Developer AI Peer
|
|
|
256
255
|
│ "APPROVED" ──────────────────►│ │
|
|
257
256
|
│ │ │
|
|
258
257
|
│ GATE 3 │ Write tests → implement │
|
|
259
|
-
│ (monitor) │
|
|
258
|
+
│ (monitor) │ Verify implementation works │
|
|
260
259
|
│ │ │
|
|
261
260
|
│ ─── GATE 4 ──────────────────►│ │
|
|
262
261
|
│ │ Self-review + summary │
|
|
@@ -317,10 +316,13 @@ claude # AI auto-starts: map dependencies → ass
|
|
|
317
316
|
```bash
|
|
318
317
|
# Setup
|
|
319
318
|
aiflow init --framework nestjs --adapter backlog
|
|
320
|
-
aiflow init --framework spring-boot --with-rtk
|
|
321
|
-
aiflow init --
|
|
319
|
+
aiflow init --framework spring-boot --with-rtk # RTK: bash output compression (60–90%)
|
|
320
|
+
# aiflow init --framework spring-boot --with-gitnexus # GitNexus: waits for index to complete
|
|
321
|
+
# aiflow init --framework spring-boot --with-gitnexus --no-wait # GitNexus: index in background
|
|
322
|
+
aiflow init --no-rtk # skip RTK setup
|
|
322
323
|
aiflow doctor # health check
|
|
323
324
|
aiflow guide # multi-tool guide
|
|
325
|
+
aiflow sync-skills # manually sync AI instruction files
|
|
324
326
|
|
|
325
327
|
# Per task
|
|
326
328
|
aiflow use PROJ-33 # load context (Fast Mode, default)
|
|
@@ -366,7 +368,7 @@ aiflow guide --commands # command reference
|
|
|
366
368
|
aiflow remove # remove from project
|
|
367
369
|
aiflow remove --global # uninstall globally (npm uninstall -g)
|
|
368
370
|
aiflow remove --version 1.0.0 # remove cached version from .aiflow/
|
|
369
|
-
npm uninstall -g
|
|
371
|
+
npm uninstall -g ai-flow-kit # standard npm uninstall
|
|
370
372
|
```
|
|
371
373
|
|
|
372
374
|
---
|
|
@@ -405,7 +407,7 @@ aiflow guide
|
|
|
405
407
|
|
|
406
408
|
**`aiflow` not found:**
|
|
407
409
|
```bash
|
|
408
|
-
npm install -g
|
|
410
|
+
npm install -g ai-flow-kit
|
|
409
411
|
```
|
|
410
412
|
|
|
411
413
|
**Incorrect credentials:**
|
|
@@ -399,6 +399,29 @@ You can switch back with: aiflow use 1.0.0
|
|
|
399
399
|
✨ Update completed!
|
|
400
400
|
```
|
|
401
401
|
|
|
402
|
+
## sync-skills
|
|
403
|
+
|
|
404
|
+
Manually synchronize AI Instruction files with local custom skills.
|
|
405
|
+
|
|
406
|
+
```bash
|
|
407
|
+
# Sync AI Instruction files
|
|
408
|
+
aiflow sync-skills
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
**What it does:**
|
|
412
|
+
1. Reads all active local skills and upstream skills
|
|
413
|
+
2. Generates the updated AI Skill Registry table
|
|
414
|
+
3. Safely updates the AI Instruction blocks (`<!-- aiflow-kit-start -->`) in your project's `CLAUDE.md`, `GEMINI.md`, or `.cursorrules` without wiping your custom rules
|
|
415
|
+
4. If no marker blocks are found, it asks for confirmation to overwrite with the correct structure
|
|
416
|
+
|
|
417
|
+
**Example:**
|
|
418
|
+
```bash
|
|
419
|
+
$ aiflow sync-skills
|
|
420
|
+
⟳ Syncing AI Instruction files...
|
|
421
|
+
✓ Updated AI Flow block in CLAUDE.md
|
|
422
|
+
✨ Sync completed!
|
|
423
|
+
```
|
|
424
|
+
|
|
402
425
|
## doctor
|
|
403
426
|
|
|
404
427
|
Health check for your setup.
|