@relipa/ai-flow-kit 0.1.0 → 0.1.1-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 +497 -497
- package/bin/aiflow.js +525 -525
- package/custom/skills/figma-to-component/SKILL.md +294 -207
- package/custom/skills/read-study-requirement/SKILL.md +334 -334
- package/custom/templates/shared/gate-workflow.md +91 -91
- package/docs/common/CHANGELOG.md +334 -334
- package/docs/common/QUICK_START.md +537 -537
- package/docs/common/cli-reference.md +657 -657
- package/package.json +68 -67
- package/scripts/doctor.js +26 -0
- package/scripts/guide.js +314 -314
- package/scripts/hooks/session-start.js +315 -315
- package/scripts/prompt.js +95 -9
- package/scripts/score_members.js +320 -0
- package/scripts/use.js +1162 -1162
|
@@ -1,657 +1,657 @@
|
|
|
1
|
-
# CLI Reference
|
|
2
|
-
|
|
3
|
-
Complete reference for all `ak` / `aiflow` commands.
|
|
4
|
-
|
|
5
|
-
> **Short alias:** `ak` is the preferred short form of `aiflow`. Every command also has a short alias shown in the format `command|alias`.
|
|
6
|
-
|
|
7
|
-
## Commands Overview
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
ak --help # Show all commands
|
|
11
|
-
ak <command> --help # Show command help
|
|
12
|
-
ak <alias> --help # Also works with aliases
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
### Quick Alias Reference
|
|
16
|
-
|
|
17
|
-
| Full command | Short | Full command | Short |
|
|
18
|
-
|---|---|---|---|
|
|
19
|
-
| `ak init` | `ak i` | `ak use` | `ak u` |
|
|
20
|
-
| `ak prompt` | `ak p` | `ak detect` | `ak d` |
|
|
21
|
-
| `ak task` | `ak t` | `ak context` | `ak ctx` |
|
|
22
|
-
| `ak checkpoint` | `ak cp` | `ak validate` | `ak vl` |
|
|
23
|
-
| `ak memory` | `ak mem` | `ak guide` | `ak g` |
|
|
24
|
-
| `ak remove` | `ak rm` | `ak update` | `ak up` |
|
|
25
|
-
| `ak sync-skills` | `ak sync` | `ak doctor` | `ak dr` |
|
|
26
|
-
| `ak telemetry` | `ak tel` | | |
|
|
27
|
-
|
|
28
|
-
| `task` sub-command | Short | `memory` sub-command | Short |
|
|
29
|
-
|---|---|---|---|
|
|
30
|
-
| `ak t status` | `ak t st` | `ak mem save` | `ak mem s` |
|
|
31
|
-
| `ak t list` | `ak t ls` | `ak mem get` | `ak mem g` |
|
|
32
|
-
| `ak t pause` | `ak t p` | `ak mem list` | `ak mem ls` |
|
|
33
|
-
| `ak t switch` | `ak t sw` | `ak mem search` | `ak mem sr` |
|
|
34
|
-
| `ak t resume` | `ak t r` | `ak mem delete` | `ak mem d` |
|
|
35
|
-
| `ak t reset` | `ak t rst` | `ak mem clear` | `ak mem cl` |
|
|
36
|
-
| `ak t remove` | `ak t rm` | | |
|
|
37
|
-
| `ak t next` | `ak t n` | | |
|
|
38
|
-
|
|
39
|
-
## init
|
|
40
|
-
|
|
41
|
-
Initialize AI Flow Kit in your project.
|
|
42
|
-
|
|
43
|
-
```bash
|
|
44
|
-
ak init # basic initialization
|
|
45
|
-
ak init -f laravel # with framework (--framework)
|
|
46
|
-
ak init -a jira # with adapter (--adapter)
|
|
47
|
-
ak init -f laravel -a jira # full setup
|
|
48
|
-
ak init -f spring-boot --with-rtk # enable RTK compression
|
|
49
|
-
ak init --no-rtk # skip RTK setup
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
**Options:**
|
|
53
|
-
- `-f, --framework <types>` (alias: `--fw`) — Framework templates, comma-separated (e.g. `spring-boot,reactjs`)
|
|
54
|
-
- `-a, --adapter <types>` — MCP adapters (jira, backlog, google-sheets)
|
|
55
|
-
- `-e, --env <types>` — AI tools to configure (cursor, gemini, copilot, generic). Default excludes `generic`.
|
|
56
|
-
- `--with-rtk` — Force enable RTK token compression hook
|
|
57
|
-
- `--no-rtk` — Skip RTK setup even if RTK is detected
|
|
58
|
-
|
|
59
|
-
**What it does:**
|
|
60
|
-
1. Creates `.claude/skills/` with all available skills
|
|
61
|
-
2. Creates `.rules/` with team rules (including `java/spring-boot-examples.md` for Spring Boot projects)
|
|
62
|
-
3. Creates `.aiflow/` with version tracking
|
|
63
|
-
4. Sets up framework instruction file (`CLAUDE.md`, `.cursorrules`, etc.):
|
|
64
|
-
- **File already exists** → saves aiflow template to `.aiflow/reference/<file>` for comparison. Your existing file is untouched — you own it.
|
|
65
|
-
- **File does not exist** → creates it in the project root.
|
|
66
|
-
5. Optionally configures MCP adapter
|
|
67
|
-
|
|
68
|
-
> **Note:** `CLAUDE.md` and other AI instruction files are project files — commit them to your repo. Run `aiflow init` once to generate them, then maintain them yourself. On subsequent `aiflow init` runs they will not be overwritten.
|
|
69
|
-
|
|
70
|
-
**Example:**
|
|
71
|
-
```bash
|
|
72
|
-
$ aiflow init --framework laravel --adapter jira
|
|
73
|
-
Initializing ai-flow-kit (v1.0.0)...
|
|
74
|
-
✓ Copied skills to .claude/skills
|
|
75
|
-
✓ Copied rules to .rules
|
|
76
|
-
✓ Set up CLAUDE.md for framework: laravel
|
|
77
|
-
✓ Updated MCP configuration for jira
|
|
78
|
-
|
|
79
|
-
✨ Initialized AI Flow Kit successfully!
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
## use
|
|
83
|
-
|
|
84
|
-
Load context from one or more tickets, files, or manual entry. **Accepts variadic targets** (v0.1.0+) — the first target is the primary context (drives Gate 1); any additional targets are appended as `supplementaryContext[]`.
|
|
85
|
-
|
|
86
|
-
```bash
|
|
87
|
-
ak use JIRA-123 # single target — load from Jira
|
|
88
|
-
ak use BACKLOG-456 # single target — load from Backlog
|
|
89
|
-
ak use PROJ-33 PROJ-10 docs/arch.md # multi-target — primary + supplementary (v0.1.0+)
|
|
90
|
-
ak use BACKLOG-456 -F # fast mode (--fast)
|
|
91
|
-
ak use BACKLOG-456 -U # full mode (--full)
|
|
92
|
-
ak use -m # manual entry (--manual)
|
|
93
|
-
ak use -f path/to/context.json # load from file (--file)
|
|
94
|
-
ak use BACKLOG-456 -c # load with all comments (--coms)
|
|
95
|
-
ak use BACKLOG-456 --clast 5 # last 5 comments
|
|
96
|
-
ak use BACKLOG-456 --cid 42 # specific comment
|
|
97
|
-
ak use 1.0.0 # switch between versions
|
|
98
|
-
```
|
|
99
|
-
|
|
100
|
-
**Arguments:**
|
|
101
|
-
- `[targets...]` — One or more targets. Each target can be a ticket ID (`PROJ-33`), a Backlog/Jira URL, or a local file path. First target = primary; rest = supplementary.
|
|
102
|
-
|
|
103
|
-
**Options:**
|
|
104
|
-
- `-m, --manual` — Manual context entry
|
|
105
|
-
- `-f, --file <path>` — Load from file (JSON or plain text)
|
|
106
|
-
- `-s, --save <name>` — Save as named context
|
|
107
|
-
- `-c, --coms` — Load all comments (alias for `--with-comments`)
|
|
108
|
-
- `--with-comments` — Include all ticket comments
|
|
109
|
-
- `--cid <id>` — Load a specific comment by ID
|
|
110
|
-
- `--clast <n>` — Only fetch last N comments
|
|
111
|
-
- `--cfrom <id>` — Fetch comments from ID N onward
|
|
112
|
-
- `--cto <id>` — Fetch comments up to ID N
|
|
113
|
-
- `-F, --fast` — Fast mode: AI skips Q&A, lite 3-section requirement doc (< 5 min Gate 1)
|
|
114
|
-
- `-U, --full` — Full mode: force complete Gate 1 analysis with Q&A
|
|
115
|
-
|
|
116
|
-
**Auto link resolution (v0.1.0+):** When the primary ticket description contains Backlog/Jira URLs, `ak use` auto-fetches them and appends to `supplementaryContext[]`. Comment URLs (`#comment-456` or `?focusedCommentId=456`) resolve to **that single comment only**. Capped at 5 auto-resolved links per `use`; per-link errors are logged without aborting the command.
|
|
117
|
-
|
|
118
|
-
**`supplementaryContext[]` schema** (persisted in `.aiflow/context/current.json`):
|
|
119
|
-
|
|
120
|
-
```json
|
|
121
|
-
{
|
|
122
|
-
"sourceType": "ticket | comment | file | text",
|
|
123
|
-
"sourceUrl": "https://...",
|
|
124
|
-
"sourcePath": "docs/arch.md",
|
|
125
|
-
"ticketId": "PROJ-10",
|
|
126
|
-
"commentId": "456",
|
|
127
|
-
"title": "...",
|
|
128
|
-
"description": "...",
|
|
129
|
-
"content": "...",
|
|
130
|
-
"author": "...",
|
|
131
|
-
"date": "..."
|
|
132
|
-
}
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
**What it does:**
|
|
136
|
-
1. Loads the first target as primary context (fetches from MCP adapter / file / manual entry)
|
|
137
|
-
2. Loads each remaining target as a supplementary item
|
|
138
|
-
3. Scans the primary description for Backlog/Jira URLs and auto-resolves them
|
|
139
|
-
4. Saves the merged context (including `mode` and `supplementaryContext[]`) to `.aiflow/context/current.json`
|
|
140
|
-
5. Updates state tracking
|
|
141
|
-
|
|
142
|
-
**Example:**
|
|
143
|
-
```bash
|
|
144
|
-
$ aiflow use JIRA-123
|
|
145
|
-
Fetching context from Jira...
|
|
146
|
-
✓ Title: Fix payment processing error
|
|
147
|
-
✓ Description: 2000+ words pulled
|
|
148
|
-
✓ Acceptance criteria: 3 items
|
|
149
|
-
✓ Saved to .aiflow/context/current.json
|
|
150
|
-
|
|
151
|
-
Ready to prompt! Run: aiflow prompt bug-fix
|
|
152
|
-
|
|
153
|
-
$ aiflow use PROJ-33 PROJ-10 docs/arch.md
|
|
154
|
-
✓ Loaded primary: PROJ-33
|
|
155
|
-
✓ Supplementary: PROJ-10 (ticket), docs/arch.md (file)
|
|
156
|
-
✓ Auto-resolved 2 link(s) from description
|
|
157
|
-
```
|
|
158
|
-
|
|
159
|
-
## fetch-links
|
|
160
|
-
|
|
161
|
-
Fetch a single Backlog/Jira URL and print a `SupplementaryContext` JSON object to stdout. Intended for AI runtime use inside the `read-study-requirement` skill — when AI encounters a link in the ticket description that wasn't already resolved by `ak use`, it can call this command and integrate the JSON output.
|
|
162
|
-
|
|
163
|
-
```bash
|
|
164
|
-
ak fetch-links "https://company.backlog.com/view/PROJ-10" # full ticket
|
|
165
|
-
ak fetch-links "https://company.backlog.com/view/PROJ-10#comment-456" # single comment
|
|
166
|
-
ak fetch-links "https://company.atlassian.net/browse/PROJ-10" # Jira ticket
|
|
167
|
-
ak fetch-links "https://company.atlassian.net/browse/PROJ-10?focusedCommentId=789" # Jira comment
|
|
168
|
-
```
|
|
169
|
-
|
|
170
|
-
**Arguments:**
|
|
171
|
-
- `<url>` — Backlog or Jira URL (ticket or comment)
|
|
172
|
-
|
|
173
|
-
**What it does:**
|
|
174
|
-
1. Loads stored credentials from `.aiflow/credentials.json`
|
|
175
|
-
2. Classifies the URL (Backlog vs Jira, ticket vs comment)
|
|
176
|
-
3. Fetches via the appropriate adapter API
|
|
177
|
-
4. Prints the resulting `SupplementaryContext` JSON to stdout
|
|
178
|
-
|
|
179
|
-
**Exit codes:**
|
|
180
|
-
- `0` — Success, JSON written to stdout
|
|
181
|
-
- `1` — URL not recognised as Backlog/Jira, or fetch failed (error message on stderr)
|
|
182
|
-
|
|
183
|
-
## task (alias: `t`)
|
|
184
|
-
|
|
185
|
-
Manage multiple tasks — pause, switch, and resume while preserving gate progress.
|
|
186
|
-
|
|
187
|
-
```bash
|
|
188
|
-
ak t st # show active + pending (task status)
|
|
189
|
-
ak t ls # list all saved tasks (task list)
|
|
190
|
-
ak t p # pause current task (task pause)
|
|
191
|
-
ak t p -n "waiting for API spec from PM" # pause with note (--note)
|
|
192
|
-
ak t sw PROJ-99 # switch to another task (task switch)
|
|
193
|
-
ak t r PROJ-33 # resume a paused task (task resume)
|
|
194
|
-
ak t rst PROJ-33 # reset to Gate 1 (task reset)
|
|
195
|
-
ak t rm PROJ-33 # delete all task data (task remove)
|
|
196
|
-
ak t n # approve gate & prep next session (task next)
|
|
197
|
-
ak t n -t PROJ-33 # specify ticket (--ticket)
|
|
198
|
-
```
|
|
199
|
-
|
|
200
|
-
**Sub-commands (with aliases):**
|
|
201
|
-
- `status|st` — Show active task and all pending tasks
|
|
202
|
-
- `list|ls` — List all saved tasks with gate state
|
|
203
|
-
- `pause|p [-n <text>]` — Save current progress and clear active task
|
|
204
|
-
- `switch|sw <ticket-id>` — Pause current task + load/switch to another
|
|
205
|
-
- `resume|r <ticket-id>` — Restore a paused task as active
|
|
206
|
-
- `reset|rst <ticket-id>` — Reset gate progress to Gate 1; prompts to optionally delete `plan/<id>/` files
|
|
207
|
-
- `remove|rm <ticket-id>` — Permanently delete all saved data for the task
|
|
208
|
-
- `next|n [-t <id>]` — Approve current gate and prepare next session
|
|
209
|
-
|
|
210
|
-
**What it does:**
|
|
211
|
-
1. Saves a snapshot of the current context (`current.json`) to `.aiflow/tasks/<taskId>/context.json`
|
|
212
|
-
2. Detects current gate from `plan/` artifacts (`requirement.md`, `plan.md`, `summary.md`)
|
|
213
|
-
3. Writes `.aiflow/tasks/<taskId>/task-state.json` with status, gate, and approvals
|
|
214
|
-
4. On resume: restores context as `current.json` and sets status back to `active`
|
|
215
|
-
5. The **SessionStart hook** reads `task-state.json` on next `claude` launch and injects gate-aware instructions — Claude resumes from the correct gate instead of restarting Gate 1
|
|
216
|
-
|
|
217
|
-
**Gate detection from `plan/` files:**
|
|
218
|
-
| File present | Inferred gate |
|
|
219
|
-
|---|---|
|
|
220
|
-
| (none) | Gate 1 |
|
|
221
|
-
| `plan/<id>/requirement.md` | Gate 2 |
|
|
222
|
-
| `plan/<id>/plan.md` | Gate 3 |
|
|
223
|
-
| `plan/<id>/summary.md` | Gate 5 |
|
|
224
|
-
|
|
225
|
-
**Example workflow:**
|
|
226
|
-
```bash
|
|
227
|
-
# Mid-task on PROJ-33 (Gate 2 in progress)...
|
|
228
|
-
aiflow task pause --note "waiting for DB schema confirmation"
|
|
229
|
-
# ✓ Task PROJ-33 paused at Gate 2.
|
|
230
|
-
|
|
231
|
-
aiflow use PROJ-99 # load urgent task
|
|
232
|
-
claude # AI auto-starts Gate 1 for PROJ-99
|
|
233
|
-
|
|
234
|
-
# Back to PROJ-33
|
|
235
|
-
aiflow task resume PROJ-33
|
|
236
|
-
# ✓ Resumed task: PROJ-33
|
|
237
|
-
# Gate: 2 (Implementation Plan)
|
|
238
|
-
|
|
239
|
-
claude # AI resumes from Gate 2 — no restart
|
|
240
|
-
```
|
|
241
|
-
|
|
242
|
-
**Reset workflow** — run a task from scratch after deleting generated code:
|
|
243
|
-
```bash
|
|
244
|
-
aiflow task reset PROJ-33
|
|
245
|
-
# Reset task: PROJ-33
|
|
246
|
-
# • .aiflow/tasks/PROJ-33/task-state.json (Gate 3 → 1, approvals cleared)
|
|
247
|
-
# ? Also delete 2 plan file(s) in plan/PROJ-33/? › No
|
|
248
|
-
# ? Proceed with reset? › Yes
|
|
249
|
-
# ✓ Task PROJ-33 reset to Gate 1.
|
|
250
|
-
|
|
251
|
-
claude # AI auto-starts Gate 1 as if the task is brand new
|
|
252
|
-
```
|
|
253
|
-
|
|
254
|
-
**Remove workflow** — permanently clean up a cancelled task:
|
|
255
|
-
```bash
|
|
256
|
-
aiflow task remove PROJ-33
|
|
257
|
-
# Remove task: PROJ-33
|
|
258
|
-
# • .aiflow/tasks/PROJ-33/ (context snapshot + gate state)
|
|
259
|
-
# • .aiflow/context/current.json (this is the active task)
|
|
260
|
-
# • plan/PROJ-33/ (2 files):
|
|
261
|
-
# - plan/PROJ-33/requirement.md
|
|
262
|
-
# - plan/PROJ-33/plan.md
|
|
263
|
-
# ? This cannot be undone. Proceed? › No
|
|
264
|
-
```
|
|
265
|
-
|
|
266
|
-
---
|
|
267
|
-
|
|
268
|
-
## prompt (alias: `p`)
|
|
269
|
-
|
|
270
|
-
Generate an AI prompt with context, rules, and template.
|
|
271
|
-
|
|
272
|
-
```bash
|
|
273
|
-
ak p bug-fix # generate bug fix prompt
|
|
274
|
-
ak p feature # generate feature prompt
|
|
275
|
-
ak p investigation # generate investigation prompt
|
|
276
|
-
ak p refactor # generate refactor prompt
|
|
277
|
-
ak p impact # generate impact analysis prompt
|
|
278
|
-
ak p -l # list all prompt types (--list)
|
|
279
|
-
ak p bug-fix -o p.md # save to file (--output)
|
|
280
|
-
ak p bug-fix -L vietnamese # Vietnamese language (--lang)
|
|
281
|
-
ak p bug-fix -d comprehensive # comprehensive detail (--detail)
|
|
282
|
-
```
|
|
283
|
-
|
|
284
|
-
**Options:**
|
|
285
|
-
- `<type>` — Prompt type (bug-fix, feature, investigation, refactor, impact, docs)
|
|
286
|
-
- `-l, --list` — List available prompt types
|
|
287
|
-
- `-o, --output <file>` — Save to file instead of printing
|
|
288
|
-
- `-L, --lang <lang>` — Language (english, vietnamese)
|
|
289
|
-
- `-d, --detail <level>` — Detail level (minimal, standard, comprehensive)
|
|
290
|
-
|
|
291
|
-
**What it does:**
|
|
292
|
-
1. Loads current context (from `aiflow use`)
|
|
293
|
-
2. Loads prompt template for the type
|
|
294
|
-
3. Loads framework rules
|
|
295
|
-
4. Loads team rules and best practices
|
|
296
|
-
5. Merges everything into a complete prompt
|
|
297
|
-
6. Prints to console (or saves/copies)
|
|
298
|
-
|
|
299
|
-
**Example:**
|
|
300
|
-
```bash
|
|
301
|
-
$ aiflow prompt bug-fix
|
|
302
|
-
═══════════════════════════════════════════════════════════════
|
|
303
|
-
BUG FIX INVESTIGATION PROMPT
|
|
304
|
-
═══════════════════════════════════════════════════════════════
|
|
305
|
-
|
|
306
|
-
## Context
|
|
307
|
-
Title: Payment processing fails on checkout
|
|
308
|
-
Description: Users report seeing payment error when... [2000+ words]
|
|
309
|
-
|
|
310
|
-
## Framework Rules (Laravel)
|
|
311
|
-
- Use Laravel's built-in tools...
|
|
312
|
-
- Keep Controllers thin...
|
|
313
|
-
|
|
314
|
-
## Team Rules
|
|
315
|
-
- Use strict typing...
|
|
316
|
-
- Follow PSR-12 styling...
|
|
317
|
-
|
|
318
|
-
## Task
|
|
319
|
-
Investigate the bug following this process:
|
|
320
|
-
1. Understand the error context...
|
|
321
|
-
[Complete prompt ready to copy to Claude]
|
|
322
|
-
```
|
|
323
|
-
|
|
324
|
-
## detect (alias: `d`)
|
|
325
|
-
|
|
326
|
-
Auto-detect task type from a description.
|
|
327
|
-
|
|
328
|
-
```bash
|
|
329
|
-
ak d "Payment integration is broken" # detect from description
|
|
330
|
-
ak d # detect from current context
|
|
331
|
-
ak d "Add new feature" -v # show confidence (--verbose)
|
|
332
|
-
ak d "description" -t 90 # set threshold (--threshold)
|
|
333
|
-
```
|
|
334
|
-
|
|
335
|
-
**Options:**
|
|
336
|
-
- `<description>` — Description to analyze
|
|
337
|
-
- `-v, --verbose` — Show detection reasoning
|
|
338
|
-
- `-t, --threshold <number>` — Confidence threshold (0-100)
|
|
339
|
-
|
|
340
|
-
**What it does:**
|
|
341
|
-
1. Analyzes description for keywords
|
|
342
|
-
2. Classifies as bug-fix, feature, refactor, investigation, etc
|
|
343
|
-
3. Shows confidence score
|
|
344
|
-
4. Suggests appropriate skill
|
|
345
|
-
|
|
346
|
-
**Example:**
|
|
347
|
-
```bash
|
|
348
|
-
$ aiflow detect "Users can't save their orders"
|
|
349
|
-
🐛 Bug Fix (98% confidence)
|
|
350
|
-
|
|
351
|
-
Detected keywords:
|
|
352
|
-
- "can't save" → bug pattern
|
|
353
|
-
- Specific area → likely regression
|
|
354
|
-
|
|
355
|
-
Suggested skill: investigate-bug
|
|
356
|
-
|
|
357
|
-
Next: aiflow prompt bug-fix
|
|
358
|
-
```
|
|
359
|
-
|
|
360
|
-
## context (alias: `ctx`)
|
|
361
|
-
|
|
362
|
-
Manage task contexts (save, load, list, delete).
|
|
363
|
-
|
|
364
|
-
```bash
|
|
365
|
-
ak ctx list # list saved contexts
|
|
366
|
-
ak ctx -s "checkout-fix" # save current context (--save)
|
|
367
|
-
ak ctx -l "checkout-fix" # load saved context (--load)
|
|
368
|
-
ak ctx -d "checkout-fix" # delete saved context (--delete)
|
|
369
|
-
ak ctx clear # clear all contexts
|
|
370
|
-
ak ctx show # show current context
|
|
371
|
-
```
|
|
372
|
-
|
|
373
|
-
**Options:**
|
|
374
|
-
- `-s, --save <name>` — Save current context
|
|
375
|
-
- `-l, --load <name>` — Load saved context
|
|
376
|
-
- `-d, --delete <name>` — Delete saved context
|
|
377
|
-
- `--clear` — Clear all contexts
|
|
378
|
-
- `--show` — Show current context details
|
|
379
|
-
|
|
380
|
-
**What it does:**
|
|
381
|
-
1. Lists, saves, loads, or deletes contexts
|
|
382
|
-
2. Manages context history in `.aiflow/context/history/`
|
|
383
|
-
3. Makes it easy to switch between tasks
|
|
384
|
-
|
|
385
|
-
**Example:**
|
|
386
|
-
```bash
|
|
387
|
-
$ aiflow context --list
|
|
388
|
-
Saved contexts:
|
|
389
|
-
1. checkout-fix (saved 2 hours ago)
|
|
390
|
-
2. payment-integration (saved yesterday)
|
|
391
|
-
3. user-auth-bug (saved 3 days ago)
|
|
392
|
-
|
|
393
|
-
$ aiflow context --load checkout-fix
|
|
394
|
-
✓ Loaded: checkout-fix
|
|
395
|
-
✓ Ready to prompt!
|
|
396
|
-
```
|
|
397
|
-
|
|
398
|
-
## update (alias: `up`)
|
|
399
|
-
|
|
400
|
-
Update to the latest version.
|
|
401
|
-
|
|
402
|
-
```bash
|
|
403
|
-
ak up # update to latest
|
|
404
|
-
ak up -f # force update (--force)
|
|
405
|
-
```
|
|
406
|
-
|
|
407
|
-
**Options:**
|
|
408
|
-
- `-f, --force` — Force update even if already latest
|
|
409
|
-
|
|
410
|
-
**What it does:**
|
|
411
|
-
1. Checks for newer version
|
|
412
|
-
2. Downloads assets (skills, rules, templates)
|
|
413
|
-
3. Updates `.claude/` and `.rules/`
|
|
414
|
-
4. Optionally deletes old version
|
|
415
|
-
5. Updates state tracking
|
|
416
|
-
|
|
417
|
-
**Example:**
|
|
418
|
-
```bash
|
|
419
|
-
$ aiflow update
|
|
420
|
-
Updating from v1.0.0 to v1.1.0...
|
|
421
|
-
✓ Downloaded skills for v1.1.0
|
|
422
|
-
✓ Downloaded rules for v1.1.0
|
|
423
|
-
|
|
424
|
-
Keep old version (v1.0.0)? (y/n) y
|
|
425
|
-
✓ Kept v1.0.0
|
|
426
|
-
|
|
427
|
-
You can switch back with: aiflow use 1.0.0
|
|
428
|
-
|
|
429
|
-
✨ Update completed!
|
|
430
|
-
```
|
|
431
|
-
|
|
432
|
-
## sync-skills (alias: `sync`)
|
|
433
|
-
|
|
434
|
-
Manually synchronize AI Instruction files with local custom skills.
|
|
435
|
-
|
|
436
|
-
```bash
|
|
437
|
-
ak sync # sync AI Instruction files
|
|
438
|
-
```
|
|
439
|
-
|
|
440
|
-
**What it does:**
|
|
441
|
-
1. Reads all active local skills and upstream skills
|
|
442
|
-
2. Generates the updated AI Skill Registry table
|
|
443
|
-
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
|
|
444
|
-
4. If no marker blocks are found, it asks for confirmation to overwrite with the correct structure
|
|
445
|
-
|
|
446
|
-
**Example:**
|
|
447
|
-
```bash
|
|
448
|
-
$ aiflow sync-skills
|
|
449
|
-
⟳ Syncing AI Instruction files...
|
|
450
|
-
✓ Updated AI Flow block in CLAUDE.md
|
|
451
|
-
✨ Sync completed!
|
|
452
|
-
```
|
|
453
|
-
|
|
454
|
-
## doctor (alias: `dr`)
|
|
455
|
-
|
|
456
|
-
Health check for your setup.
|
|
457
|
-
|
|
458
|
-
```bash
|
|
459
|
-
ak dr # run health check
|
|
460
|
-
ak dr -v # verbose output (--verbose)
|
|
461
|
-
ak dr -t PROJ-33 # token breakdown for ticket (--ticket)
|
|
462
|
-
```
|
|
463
|
-
|
|
464
|
-
**Options:**
|
|
465
|
-
- `-t, --ticket <id>` — Show token breakdown for specific ticket
|
|
466
|
-
- `-v, --verbose` — Show detailed checks
|
|
467
|
-
|
|
468
|
-
**What it does:**
|
|
469
|
-
1. Checks for required directories
|
|
470
|
-
2. Validates configuration files
|
|
471
|
-
3. Checks MCP adapter setup
|
|
472
|
-
4. Verifies framework template
|
|
473
|
-
5. Reports issues and fixes
|
|
474
|
-
|
|
475
|
-
**Example:**
|
|
476
|
-
```bash
|
|
477
|
-
$ aiflow doctor
|
|
478
|
-
Running health check for AI Flow Kit...
|
|
479
|
-
|
|
480
|
-
✓ .claude/skills exists
|
|
481
|
-
✓ .rules exists
|
|
482
|
-
✓ CLAUDE.md exists
|
|
483
|
-
✓ Version tracking active (v1.0.0)
|
|
484
|
-
✓ Jira adapter configured
|
|
485
|
-
✓ Laravel framework template loaded
|
|
486
|
-
|
|
487
|
-
✨ Everything looks healthy! You are ready to fly.
|
|
488
|
-
```
|
|
489
|
-
|
|
490
|
-
## validate (alias: `vl`)
|
|
491
|
-
|
|
492
|
-
Validate AI output against team rules and quality standards.
|
|
493
|
-
|
|
494
|
-
```bash
|
|
495
|
-
ak vl output.php # validate a file
|
|
496
|
-
ak vl output.php -r strict # strict rule set (--ruleset)
|
|
497
|
-
ak vl output.php -v # detailed report (--verbose)
|
|
498
|
-
ak vl output.php -x # auto-fix trailing whitespace (--fix)
|
|
499
|
-
```
|
|
500
|
-
|
|
501
|
-
**Options:**
|
|
502
|
-
- `<file>` — File to validate
|
|
503
|
-
- `-r, --ruleset <set>` — Rule set (default, strict, lenient)
|
|
504
|
-
- `-v, --verbose` — Detailed report
|
|
505
|
-
- `-x, --fix` — Auto-fix trailing whitespace
|
|
506
|
-
|
|
507
|
-
**What it does:**
|
|
508
|
-
1. Loads validation rules from `custom/rules/`
|
|
509
|
-
2. Checks code style, naming, security, etc
|
|
510
|
-
3. Reports violations
|
|
511
|
-
4. Optionally suggests fixes
|
|
512
|
-
|
|
513
|
-
**Example:**
|
|
514
|
-
```bash
|
|
515
|
-
$ aiflow validate src/Payment.php
|
|
516
|
-
Validating against ruleset: default
|
|
517
|
-
|
|
518
|
-
✓ Code style: OK
|
|
519
|
-
⚠ Naming: Variable $p should be $payment
|
|
520
|
-
✓ Security: OK
|
|
521
|
-
✗ Testing: Missing test file
|
|
522
|
-
|
|
523
|
-
Issues found: 2 warnings, 1 error
|
|
524
|
-
Suggestions: Add test case, rename variable
|
|
525
|
-
```
|
|
526
|
-
|
|
527
|
-
## telemetry (alias: `tel`)
|
|
528
|
-
|
|
529
|
-
Manage usage telemetry.
|
|
530
|
-
|
|
531
|
-
```bash
|
|
532
|
-
ak tel status # view status, buffer size, last flush
|
|
533
|
-
ak tel enable # interactive setup (URL, secret, email)
|
|
534
|
-
ak tel disable # disable tracking (config retained)
|
|
535
|
-
ak tel flush # force-send buffered events now
|
|
536
|
-
```
|
|
537
|
-
|
|
538
|
-
**Sub-commands:**
|
|
539
|
-
- `status` — View current status, buffer size, last flush time
|
|
540
|
-
- `enable` — Interactive setup (Apps Script URL, team secret, email)
|
|
541
|
-
- `disable` — Disable tracking; configuration is retained
|
|
542
|
-
- `flush` — Force-send all buffered events immediately
|
|
543
|
-
|
|
544
|
-
---
|
|
545
|
-
|
|
546
|
-
## memory (alias: `mem`)
|
|
547
|
-
|
|
548
|
-
Manage team knowledge and context memory.
|
|
549
|
-
|
|
550
|
-
```bash
|
|
551
|
-
ak mem s "payment-flow" "Process: 1. Validate, 2. Call Stripe, 3. Update DB" # save
|
|
552
|
-
ak mem g "payment-flow" # retrieve (memory get)
|
|
553
|
-
ak mem ls # list all (memory list)
|
|
554
|
-
ak mem sr "validation" # search (memory search)
|
|
555
|
-
ak mem d "old-memory" # delete (memory delete)
|
|
556
|
-
ak mem cl # clear all (memory clear)
|
|
557
|
-
```
|
|
558
|
-
|
|
559
|
-
**Sub-commands (with aliases):**
|
|
560
|
-
- `save|s <key> <value>` — Save a note
|
|
561
|
-
- `get|g <key>` — Read a note
|
|
562
|
-
- `list|ls` — List all notes
|
|
563
|
-
- `search|sr <query>` — Search notes
|
|
564
|
-
- `delete|d <key>` — Delete a note
|
|
565
|
-
- `clear|cl` — Clear all notes
|
|
566
|
-
|
|
567
|
-
**What it does:**
|
|
568
|
-
1. Stores team knowledge in `.aiflow/memory/`
|
|
569
|
-
2. Makes knowledge discoverable across the team
|
|
570
|
-
|
|
571
|
-
**Example:**
|
|
572
|
-
```bash
|
|
573
|
-
$ aiflow memory save "payment-flow" "Process: 1. Validate amount, 2. Call Stripe API, 3. Update DB"
|
|
574
|
-
✓ Saved: payment-flow
|
|
575
|
-
|
|
576
|
-
$ aiflow memory search "payment"
|
|
577
|
-
Found 3 memories matching "payment":
|
|
578
|
-
1. payment-flow
|
|
579
|
-
2. payment-error-handling
|
|
580
|
-
3. payment-tests
|
|
581
|
-
```
|
|
582
|
-
|
|
583
|
-
## guide (alias: `g`)
|
|
584
|
-
|
|
585
|
-
Show quickstart guide.
|
|
586
|
-
|
|
587
|
-
```bash
|
|
588
|
-
ak g # full guide
|
|
589
|
-
ak g -f # architecture & flow only (--flow)
|
|
590
|
-
ak g -c # command reference only (--commands)
|
|
591
|
-
```
|
|
592
|
-
|
|
593
|
-
**Options:**
|
|
594
|
-
- `-f, --flow` — Show architecture & flow diagram only
|
|
595
|
-
- `-c, --commands` — Show command reference only
|
|
596
|
-
|
|
597
|
-
---
|
|
598
|
-
|
|
599
|
-
## gate (AI workflow logging)
|
|
600
|
-
|
|
601
|
-
Called automatically by AI during gate workflow — not intended for manual use.
|
|
602
|
-
|
|
603
|
-
```bash
|
|
604
|
-
# Log gate N started
|
|
605
|
-
aiflow gate <n> start --ticket <id>
|
|
606
|
-
|
|
607
|
-
# Log gate N approved
|
|
608
|
-
aiflow gate <n> approved --ticket <id>
|
|
609
|
-
```
|
|
610
|
-
|
|
611
|
-
**Arguments:**
|
|
612
|
-
- `<n>` — Gate number (1-5)
|
|
613
|
-
- `<action>` — `start` or `approved`
|
|
614
|
-
|
|
615
|
-
**Options:**
|
|
616
|
-
- `--ticket <id>` — Ticket ID associated with the gate transition
|
|
617
|
-
- `--ai-tool <tool>` — AI tool that triggered the gate (e.g. claude, cursor, gemini)
|
|
618
|
-
|
|
619
|
-
---
|
|
620
|
-
|
|
621
|
-
## remove (alias: `rm`)
|
|
622
|
-
|
|
623
|
-
Remove ai-flow-kit from project, a cached version, or uninstall globally.
|
|
624
|
-
|
|
625
|
-
```bash
|
|
626
|
-
ak rm # remove from project
|
|
627
|
-
ak rm -g # uninstall globally (--global)
|
|
628
|
-
ak rm --version 1.0.0 # remove cached version from .aiflow/
|
|
629
|
-
```
|
|
630
|
-
|
|
631
|
-
**Options:**
|
|
632
|
-
- `--version <ver>` — Remove a specific cached version from `.aiflow/versions/`
|
|
633
|
-
- `-g, --global` — Uninstall the global npm package (removes `aiflow` command)
|
|
634
|
-
|
|
635
|
-
---
|
|
636
|
-
|
|
637
|
-
## Global Options
|
|
638
|
-
|
|
639
|
-
These work with any command:
|
|
640
|
-
|
|
641
|
-
```bash
|
|
642
|
-
ak --version # Show installed version (-v, -V)
|
|
643
|
-
ak <command> --help # Show help for a command (-h)
|
|
644
|
-
```
|
|
645
|
-
|
|
646
|
-
## Exit Codes
|
|
647
|
-
|
|
648
|
-
- `0` — Success
|
|
649
|
-
- `1` — General error
|
|
650
|
-
- `2` — Command not found
|
|
651
|
-
- `3` — Invalid arguments
|
|
652
|
-
- `4` — Configuration error
|
|
653
|
-
- `5` — MCP adapter error
|
|
654
|
-
|
|
655
|
-
---
|
|
656
|
-
|
|
657
|
-
See [Getting Started](./getting-started.md) for tutorials and [Configuration](./configuration.md) for detailed options.
|
|
1
|
+
# CLI Reference
|
|
2
|
+
|
|
3
|
+
Complete reference for all `ak` / `aiflow` commands.
|
|
4
|
+
|
|
5
|
+
> **Short alias:** `ak` is the preferred short form of `aiflow`. Every command also has a short alias shown in the format `command|alias`.
|
|
6
|
+
|
|
7
|
+
## Commands Overview
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
ak --help # Show all commands
|
|
11
|
+
ak <command> --help # Show command help
|
|
12
|
+
ak <alias> --help # Also works with aliases
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
### Quick Alias Reference
|
|
16
|
+
|
|
17
|
+
| Full command | Short | Full command | Short |
|
|
18
|
+
|---|---|---|---|
|
|
19
|
+
| `ak init` | `ak i` | `ak use` | `ak u` |
|
|
20
|
+
| `ak prompt` | `ak p` | `ak detect` | `ak d` |
|
|
21
|
+
| `ak task` | `ak t` | `ak context` | `ak ctx` |
|
|
22
|
+
| `ak checkpoint` | `ak cp` | `ak validate` | `ak vl` |
|
|
23
|
+
| `ak memory` | `ak mem` | `ak guide` | `ak g` |
|
|
24
|
+
| `ak remove` | `ak rm` | `ak update` | `ak up` |
|
|
25
|
+
| `ak sync-skills` | `ak sync` | `ak doctor` | `ak dr` |
|
|
26
|
+
| `ak telemetry` | `ak tel` | | |
|
|
27
|
+
|
|
28
|
+
| `task` sub-command | Short | `memory` sub-command | Short |
|
|
29
|
+
|---|---|---|---|
|
|
30
|
+
| `ak t status` | `ak t st` | `ak mem save` | `ak mem s` |
|
|
31
|
+
| `ak t list` | `ak t ls` | `ak mem get` | `ak mem g` |
|
|
32
|
+
| `ak t pause` | `ak t p` | `ak mem list` | `ak mem ls` |
|
|
33
|
+
| `ak t switch` | `ak t sw` | `ak mem search` | `ak mem sr` |
|
|
34
|
+
| `ak t resume` | `ak t r` | `ak mem delete` | `ak mem d` |
|
|
35
|
+
| `ak t reset` | `ak t rst` | `ak mem clear` | `ak mem cl` |
|
|
36
|
+
| `ak t remove` | `ak t rm` | | |
|
|
37
|
+
| `ak t next` | `ak t n` | | |
|
|
38
|
+
|
|
39
|
+
## init
|
|
40
|
+
|
|
41
|
+
Initialize AI Flow Kit in your project.
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
ak init # basic initialization
|
|
45
|
+
ak init -f laravel # with framework (--framework)
|
|
46
|
+
ak init -a jira # with adapter (--adapter)
|
|
47
|
+
ak init -f laravel -a jira # full setup
|
|
48
|
+
ak init -f spring-boot --with-rtk # enable RTK compression
|
|
49
|
+
ak init --no-rtk # skip RTK setup
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
**Options:**
|
|
53
|
+
- `-f, --framework <types>` (alias: `--fw`) — Framework templates, comma-separated (e.g. `spring-boot,reactjs`)
|
|
54
|
+
- `-a, --adapter <types>` — MCP adapters (jira, backlog, google-sheets)
|
|
55
|
+
- `-e, --env <types>` — AI tools to configure (cursor, gemini, copilot, generic). Default excludes `generic`.
|
|
56
|
+
- `--with-rtk` — Force enable RTK token compression hook
|
|
57
|
+
- `--no-rtk` — Skip RTK setup even if RTK is detected
|
|
58
|
+
|
|
59
|
+
**What it does:**
|
|
60
|
+
1. Creates `.claude/skills/` with all available skills
|
|
61
|
+
2. Creates `.rules/` with team rules (including `java/spring-boot-examples.md` for Spring Boot projects)
|
|
62
|
+
3. Creates `.aiflow/` with version tracking
|
|
63
|
+
4. Sets up framework instruction file (`CLAUDE.md`, `.cursorrules`, etc.):
|
|
64
|
+
- **File already exists** → saves aiflow template to `.aiflow/reference/<file>` for comparison. Your existing file is untouched — you own it.
|
|
65
|
+
- **File does not exist** → creates it in the project root.
|
|
66
|
+
5. Optionally configures MCP adapter
|
|
67
|
+
|
|
68
|
+
> **Note:** `CLAUDE.md` and other AI instruction files are project files — commit them to your repo. Run `aiflow init` once to generate them, then maintain them yourself. On subsequent `aiflow init` runs they will not be overwritten.
|
|
69
|
+
|
|
70
|
+
**Example:**
|
|
71
|
+
```bash
|
|
72
|
+
$ aiflow init --framework laravel --adapter jira
|
|
73
|
+
Initializing ai-flow-kit (v1.0.0)...
|
|
74
|
+
✓ Copied skills to .claude/skills
|
|
75
|
+
✓ Copied rules to .rules
|
|
76
|
+
✓ Set up CLAUDE.md for framework: laravel
|
|
77
|
+
✓ Updated MCP configuration for jira
|
|
78
|
+
|
|
79
|
+
✨ Initialized AI Flow Kit successfully!
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## use
|
|
83
|
+
|
|
84
|
+
Load context from one or more tickets, files, or manual entry. **Accepts variadic targets** (v0.1.0+) — the first target is the primary context (drives Gate 1); any additional targets are appended as `supplementaryContext[]`.
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
ak use JIRA-123 # single target — load from Jira
|
|
88
|
+
ak use BACKLOG-456 # single target — load from Backlog
|
|
89
|
+
ak use PROJ-33 PROJ-10 docs/arch.md # multi-target — primary + supplementary (v0.1.0+)
|
|
90
|
+
ak use BACKLOG-456 -F # fast mode (--fast)
|
|
91
|
+
ak use BACKLOG-456 -U # full mode (--full)
|
|
92
|
+
ak use -m # manual entry (--manual)
|
|
93
|
+
ak use -f path/to/context.json # load from file (--file)
|
|
94
|
+
ak use BACKLOG-456 -c # load with all comments (--coms)
|
|
95
|
+
ak use BACKLOG-456 --clast 5 # last 5 comments
|
|
96
|
+
ak use BACKLOG-456 --cid 42 # specific comment
|
|
97
|
+
ak use 1.0.0 # switch between versions
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
**Arguments:**
|
|
101
|
+
- `[targets...]` — One or more targets. Each target can be a ticket ID (`PROJ-33`), a Backlog/Jira URL, or a local file path. First target = primary; rest = supplementary.
|
|
102
|
+
|
|
103
|
+
**Options:**
|
|
104
|
+
- `-m, --manual` — Manual context entry
|
|
105
|
+
- `-f, --file <path>` — Load from file (JSON or plain text)
|
|
106
|
+
- `-s, --save <name>` — Save as named context
|
|
107
|
+
- `-c, --coms` — Load all comments (alias for `--with-comments`)
|
|
108
|
+
- `--with-comments` — Include all ticket comments
|
|
109
|
+
- `--cid <id>` — Load a specific comment by ID
|
|
110
|
+
- `--clast <n>` — Only fetch last N comments
|
|
111
|
+
- `--cfrom <id>` — Fetch comments from ID N onward
|
|
112
|
+
- `--cto <id>` — Fetch comments up to ID N
|
|
113
|
+
- `-F, --fast` — Fast mode: AI skips Q&A, lite 3-section requirement doc (< 5 min Gate 1)
|
|
114
|
+
- `-U, --full` — Full mode: force complete Gate 1 analysis with Q&A
|
|
115
|
+
|
|
116
|
+
**Auto link resolution (v0.1.0+):** When the primary ticket description contains Backlog/Jira URLs, `ak use` auto-fetches them and appends to `supplementaryContext[]`. Comment URLs (`#comment-456` or `?focusedCommentId=456`) resolve to **that single comment only**. Capped at 5 auto-resolved links per `use`; per-link errors are logged without aborting the command.
|
|
117
|
+
|
|
118
|
+
**`supplementaryContext[]` schema** (persisted in `.aiflow/context/current.json`):
|
|
119
|
+
|
|
120
|
+
```json
|
|
121
|
+
{
|
|
122
|
+
"sourceType": "ticket | comment | file | text",
|
|
123
|
+
"sourceUrl": "https://...",
|
|
124
|
+
"sourcePath": "docs/arch.md",
|
|
125
|
+
"ticketId": "PROJ-10",
|
|
126
|
+
"commentId": "456",
|
|
127
|
+
"title": "...",
|
|
128
|
+
"description": "...",
|
|
129
|
+
"content": "...",
|
|
130
|
+
"author": "...",
|
|
131
|
+
"date": "..."
|
|
132
|
+
}
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
**What it does:**
|
|
136
|
+
1. Loads the first target as primary context (fetches from MCP adapter / file / manual entry)
|
|
137
|
+
2. Loads each remaining target as a supplementary item
|
|
138
|
+
3. Scans the primary description for Backlog/Jira URLs and auto-resolves them
|
|
139
|
+
4. Saves the merged context (including `mode` and `supplementaryContext[]`) to `.aiflow/context/current.json`
|
|
140
|
+
5. Updates state tracking
|
|
141
|
+
|
|
142
|
+
**Example:**
|
|
143
|
+
```bash
|
|
144
|
+
$ aiflow use JIRA-123
|
|
145
|
+
Fetching context from Jira...
|
|
146
|
+
✓ Title: Fix payment processing error
|
|
147
|
+
✓ Description: 2000+ words pulled
|
|
148
|
+
✓ Acceptance criteria: 3 items
|
|
149
|
+
✓ Saved to .aiflow/context/current.json
|
|
150
|
+
|
|
151
|
+
Ready to prompt! Run: aiflow prompt bug-fix
|
|
152
|
+
|
|
153
|
+
$ aiflow use PROJ-33 PROJ-10 docs/arch.md
|
|
154
|
+
✓ Loaded primary: PROJ-33
|
|
155
|
+
✓ Supplementary: PROJ-10 (ticket), docs/arch.md (file)
|
|
156
|
+
✓ Auto-resolved 2 link(s) from description
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
## fetch-links
|
|
160
|
+
|
|
161
|
+
Fetch a single Backlog/Jira URL and print a `SupplementaryContext` JSON object to stdout. Intended for AI runtime use inside the `read-study-requirement` skill — when AI encounters a link in the ticket description that wasn't already resolved by `ak use`, it can call this command and integrate the JSON output.
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
ak fetch-links "https://company.backlog.com/view/PROJ-10" # full ticket
|
|
165
|
+
ak fetch-links "https://company.backlog.com/view/PROJ-10#comment-456" # single comment
|
|
166
|
+
ak fetch-links "https://company.atlassian.net/browse/PROJ-10" # Jira ticket
|
|
167
|
+
ak fetch-links "https://company.atlassian.net/browse/PROJ-10?focusedCommentId=789" # Jira comment
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
**Arguments:**
|
|
171
|
+
- `<url>` — Backlog or Jira URL (ticket or comment)
|
|
172
|
+
|
|
173
|
+
**What it does:**
|
|
174
|
+
1. Loads stored credentials from `.aiflow/credentials.json`
|
|
175
|
+
2. Classifies the URL (Backlog vs Jira, ticket vs comment)
|
|
176
|
+
3. Fetches via the appropriate adapter API
|
|
177
|
+
4. Prints the resulting `SupplementaryContext` JSON to stdout
|
|
178
|
+
|
|
179
|
+
**Exit codes:**
|
|
180
|
+
- `0` — Success, JSON written to stdout
|
|
181
|
+
- `1` — URL not recognised as Backlog/Jira, or fetch failed (error message on stderr)
|
|
182
|
+
|
|
183
|
+
## task (alias: `t`)
|
|
184
|
+
|
|
185
|
+
Manage multiple tasks — pause, switch, and resume while preserving gate progress.
|
|
186
|
+
|
|
187
|
+
```bash
|
|
188
|
+
ak t st # show active + pending (task status)
|
|
189
|
+
ak t ls # list all saved tasks (task list)
|
|
190
|
+
ak t p # pause current task (task pause)
|
|
191
|
+
ak t p -n "waiting for API spec from PM" # pause with note (--note)
|
|
192
|
+
ak t sw PROJ-99 # switch to another task (task switch)
|
|
193
|
+
ak t r PROJ-33 # resume a paused task (task resume)
|
|
194
|
+
ak t rst PROJ-33 # reset to Gate 1 (task reset)
|
|
195
|
+
ak t rm PROJ-33 # delete all task data (task remove)
|
|
196
|
+
ak t n # approve gate & prep next session (task next)
|
|
197
|
+
ak t n -t PROJ-33 # specify ticket (--ticket)
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
**Sub-commands (with aliases):**
|
|
201
|
+
- `status|st` — Show active task and all pending tasks
|
|
202
|
+
- `list|ls` — List all saved tasks with gate state
|
|
203
|
+
- `pause|p [-n <text>]` — Save current progress and clear active task
|
|
204
|
+
- `switch|sw <ticket-id>` — Pause current task + load/switch to another
|
|
205
|
+
- `resume|r <ticket-id>` — Restore a paused task as active
|
|
206
|
+
- `reset|rst <ticket-id>` — Reset gate progress to Gate 1; prompts to optionally delete `plan/<id>/` files
|
|
207
|
+
- `remove|rm <ticket-id>` — Permanently delete all saved data for the task
|
|
208
|
+
- `next|n [-t <id>]` — Approve current gate and prepare next session
|
|
209
|
+
|
|
210
|
+
**What it does:**
|
|
211
|
+
1. Saves a snapshot of the current context (`current.json`) to `.aiflow/tasks/<taskId>/context.json`
|
|
212
|
+
2. Detects current gate from `plan/` artifacts (`requirement.md`, `plan.md`, `summary.md`)
|
|
213
|
+
3. Writes `.aiflow/tasks/<taskId>/task-state.json` with status, gate, and approvals
|
|
214
|
+
4. On resume: restores context as `current.json` and sets status back to `active`
|
|
215
|
+
5. The **SessionStart hook** reads `task-state.json` on next `claude` launch and injects gate-aware instructions — Claude resumes from the correct gate instead of restarting Gate 1
|
|
216
|
+
|
|
217
|
+
**Gate detection from `plan/` files:**
|
|
218
|
+
| File present | Inferred gate |
|
|
219
|
+
|---|---|
|
|
220
|
+
| (none) | Gate 1 |
|
|
221
|
+
| `plan/<id>/requirement.md` | Gate 2 |
|
|
222
|
+
| `plan/<id>/plan.md` | Gate 3 |
|
|
223
|
+
| `plan/<id>/summary.md` | Gate 5 |
|
|
224
|
+
|
|
225
|
+
**Example workflow:**
|
|
226
|
+
```bash
|
|
227
|
+
# Mid-task on PROJ-33 (Gate 2 in progress)...
|
|
228
|
+
aiflow task pause --note "waiting for DB schema confirmation"
|
|
229
|
+
# ✓ Task PROJ-33 paused at Gate 2.
|
|
230
|
+
|
|
231
|
+
aiflow use PROJ-99 # load urgent task
|
|
232
|
+
claude # AI auto-starts Gate 1 for PROJ-99
|
|
233
|
+
|
|
234
|
+
# Back to PROJ-33
|
|
235
|
+
aiflow task resume PROJ-33
|
|
236
|
+
# ✓ Resumed task: PROJ-33
|
|
237
|
+
# Gate: 2 (Implementation Plan)
|
|
238
|
+
|
|
239
|
+
claude # AI resumes from Gate 2 — no restart
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
**Reset workflow** — run a task from scratch after deleting generated code:
|
|
243
|
+
```bash
|
|
244
|
+
aiflow task reset PROJ-33
|
|
245
|
+
# Reset task: PROJ-33
|
|
246
|
+
# • .aiflow/tasks/PROJ-33/task-state.json (Gate 3 → 1, approvals cleared)
|
|
247
|
+
# ? Also delete 2 plan file(s) in plan/PROJ-33/? › No
|
|
248
|
+
# ? Proceed with reset? › Yes
|
|
249
|
+
# ✓ Task PROJ-33 reset to Gate 1.
|
|
250
|
+
|
|
251
|
+
claude # AI auto-starts Gate 1 as if the task is brand new
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
**Remove workflow** — permanently clean up a cancelled task:
|
|
255
|
+
```bash
|
|
256
|
+
aiflow task remove PROJ-33
|
|
257
|
+
# Remove task: PROJ-33
|
|
258
|
+
# • .aiflow/tasks/PROJ-33/ (context snapshot + gate state)
|
|
259
|
+
# • .aiflow/context/current.json (this is the active task)
|
|
260
|
+
# • plan/PROJ-33/ (2 files):
|
|
261
|
+
# - plan/PROJ-33/requirement.md
|
|
262
|
+
# - plan/PROJ-33/plan.md
|
|
263
|
+
# ? This cannot be undone. Proceed? › No
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
---
|
|
267
|
+
|
|
268
|
+
## prompt (alias: `p`)
|
|
269
|
+
|
|
270
|
+
Generate an AI prompt with context, rules, and template.
|
|
271
|
+
|
|
272
|
+
```bash
|
|
273
|
+
ak p bug-fix # generate bug fix prompt
|
|
274
|
+
ak p feature # generate feature prompt
|
|
275
|
+
ak p investigation # generate investigation prompt
|
|
276
|
+
ak p refactor # generate refactor prompt
|
|
277
|
+
ak p impact # generate impact analysis prompt
|
|
278
|
+
ak p -l # list all prompt types (--list)
|
|
279
|
+
ak p bug-fix -o p.md # save to file (--output)
|
|
280
|
+
ak p bug-fix -L vietnamese # Vietnamese language (--lang)
|
|
281
|
+
ak p bug-fix -d comprehensive # comprehensive detail (--detail)
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
**Options:**
|
|
285
|
+
- `<type>` — Prompt type (bug-fix, feature, investigation, refactor, impact, docs)
|
|
286
|
+
- `-l, --list` — List available prompt types
|
|
287
|
+
- `-o, --output <file>` — Save to file instead of printing
|
|
288
|
+
- `-L, --lang <lang>` — Language (english, vietnamese)
|
|
289
|
+
- `-d, --detail <level>` — Detail level (minimal, standard, comprehensive)
|
|
290
|
+
|
|
291
|
+
**What it does:**
|
|
292
|
+
1. Loads current context (from `aiflow use`)
|
|
293
|
+
2. Loads prompt template for the type
|
|
294
|
+
3. Loads framework rules
|
|
295
|
+
4. Loads team rules and best practices
|
|
296
|
+
5. Merges everything into a complete prompt
|
|
297
|
+
6. Prints to console (or saves/copies)
|
|
298
|
+
|
|
299
|
+
**Example:**
|
|
300
|
+
```bash
|
|
301
|
+
$ aiflow prompt bug-fix
|
|
302
|
+
═══════════════════════════════════════════════════════════════
|
|
303
|
+
BUG FIX INVESTIGATION PROMPT
|
|
304
|
+
═══════════════════════════════════════════════════════════════
|
|
305
|
+
|
|
306
|
+
## Context
|
|
307
|
+
Title: Payment processing fails on checkout
|
|
308
|
+
Description: Users report seeing payment error when... [2000+ words]
|
|
309
|
+
|
|
310
|
+
## Framework Rules (Laravel)
|
|
311
|
+
- Use Laravel's built-in tools...
|
|
312
|
+
- Keep Controllers thin...
|
|
313
|
+
|
|
314
|
+
## Team Rules
|
|
315
|
+
- Use strict typing...
|
|
316
|
+
- Follow PSR-12 styling...
|
|
317
|
+
|
|
318
|
+
## Task
|
|
319
|
+
Investigate the bug following this process:
|
|
320
|
+
1. Understand the error context...
|
|
321
|
+
[Complete prompt ready to copy to Claude]
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
## detect (alias: `d`)
|
|
325
|
+
|
|
326
|
+
Auto-detect task type from a description.
|
|
327
|
+
|
|
328
|
+
```bash
|
|
329
|
+
ak d "Payment integration is broken" # detect from description
|
|
330
|
+
ak d # detect from current context
|
|
331
|
+
ak d "Add new feature" -v # show confidence (--verbose)
|
|
332
|
+
ak d "description" -t 90 # set threshold (--threshold)
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
**Options:**
|
|
336
|
+
- `<description>` — Description to analyze
|
|
337
|
+
- `-v, --verbose` — Show detection reasoning
|
|
338
|
+
- `-t, --threshold <number>` — Confidence threshold (0-100)
|
|
339
|
+
|
|
340
|
+
**What it does:**
|
|
341
|
+
1. Analyzes description for keywords
|
|
342
|
+
2. Classifies as bug-fix, feature, refactor, investigation, etc
|
|
343
|
+
3. Shows confidence score
|
|
344
|
+
4. Suggests appropriate skill
|
|
345
|
+
|
|
346
|
+
**Example:**
|
|
347
|
+
```bash
|
|
348
|
+
$ aiflow detect "Users can't save their orders"
|
|
349
|
+
🐛 Bug Fix (98% confidence)
|
|
350
|
+
|
|
351
|
+
Detected keywords:
|
|
352
|
+
- "can't save" → bug pattern
|
|
353
|
+
- Specific area → likely regression
|
|
354
|
+
|
|
355
|
+
Suggested skill: investigate-bug
|
|
356
|
+
|
|
357
|
+
Next: aiflow prompt bug-fix
|
|
358
|
+
```
|
|
359
|
+
|
|
360
|
+
## context (alias: `ctx`)
|
|
361
|
+
|
|
362
|
+
Manage task contexts (save, load, list, delete).
|
|
363
|
+
|
|
364
|
+
```bash
|
|
365
|
+
ak ctx list # list saved contexts
|
|
366
|
+
ak ctx -s "checkout-fix" # save current context (--save)
|
|
367
|
+
ak ctx -l "checkout-fix" # load saved context (--load)
|
|
368
|
+
ak ctx -d "checkout-fix" # delete saved context (--delete)
|
|
369
|
+
ak ctx clear # clear all contexts
|
|
370
|
+
ak ctx show # show current context
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
**Options:**
|
|
374
|
+
- `-s, --save <name>` — Save current context
|
|
375
|
+
- `-l, --load <name>` — Load saved context
|
|
376
|
+
- `-d, --delete <name>` — Delete saved context
|
|
377
|
+
- `--clear` — Clear all contexts
|
|
378
|
+
- `--show` — Show current context details
|
|
379
|
+
|
|
380
|
+
**What it does:**
|
|
381
|
+
1. Lists, saves, loads, or deletes contexts
|
|
382
|
+
2. Manages context history in `.aiflow/context/history/`
|
|
383
|
+
3. Makes it easy to switch between tasks
|
|
384
|
+
|
|
385
|
+
**Example:**
|
|
386
|
+
```bash
|
|
387
|
+
$ aiflow context --list
|
|
388
|
+
Saved contexts:
|
|
389
|
+
1. checkout-fix (saved 2 hours ago)
|
|
390
|
+
2. payment-integration (saved yesterday)
|
|
391
|
+
3. user-auth-bug (saved 3 days ago)
|
|
392
|
+
|
|
393
|
+
$ aiflow context --load checkout-fix
|
|
394
|
+
✓ Loaded: checkout-fix
|
|
395
|
+
✓ Ready to prompt!
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
## update (alias: `up`)
|
|
399
|
+
|
|
400
|
+
Update to the latest version.
|
|
401
|
+
|
|
402
|
+
```bash
|
|
403
|
+
ak up # update to latest
|
|
404
|
+
ak up -f # force update (--force)
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
**Options:**
|
|
408
|
+
- `-f, --force` — Force update even if already latest
|
|
409
|
+
|
|
410
|
+
**What it does:**
|
|
411
|
+
1. Checks for newer version
|
|
412
|
+
2. Downloads assets (skills, rules, templates)
|
|
413
|
+
3. Updates `.claude/` and `.rules/`
|
|
414
|
+
4. Optionally deletes old version
|
|
415
|
+
5. Updates state tracking
|
|
416
|
+
|
|
417
|
+
**Example:**
|
|
418
|
+
```bash
|
|
419
|
+
$ aiflow update
|
|
420
|
+
Updating from v1.0.0 to v1.1.0...
|
|
421
|
+
✓ Downloaded skills for v1.1.0
|
|
422
|
+
✓ Downloaded rules for v1.1.0
|
|
423
|
+
|
|
424
|
+
Keep old version (v1.0.0)? (y/n) y
|
|
425
|
+
✓ Kept v1.0.0
|
|
426
|
+
|
|
427
|
+
You can switch back with: aiflow use 1.0.0
|
|
428
|
+
|
|
429
|
+
✨ Update completed!
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
## sync-skills (alias: `sync`)
|
|
433
|
+
|
|
434
|
+
Manually synchronize AI Instruction files with local custom skills.
|
|
435
|
+
|
|
436
|
+
```bash
|
|
437
|
+
ak sync # sync AI Instruction files
|
|
438
|
+
```
|
|
439
|
+
|
|
440
|
+
**What it does:**
|
|
441
|
+
1. Reads all active local skills and upstream skills
|
|
442
|
+
2. Generates the updated AI Skill Registry table
|
|
443
|
+
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
|
|
444
|
+
4. If no marker blocks are found, it asks for confirmation to overwrite with the correct structure
|
|
445
|
+
|
|
446
|
+
**Example:**
|
|
447
|
+
```bash
|
|
448
|
+
$ aiflow sync-skills
|
|
449
|
+
⟳ Syncing AI Instruction files...
|
|
450
|
+
✓ Updated AI Flow block in CLAUDE.md
|
|
451
|
+
✨ Sync completed!
|
|
452
|
+
```
|
|
453
|
+
|
|
454
|
+
## doctor (alias: `dr`)
|
|
455
|
+
|
|
456
|
+
Health check for your setup.
|
|
457
|
+
|
|
458
|
+
```bash
|
|
459
|
+
ak dr # run health check
|
|
460
|
+
ak dr -v # verbose output (--verbose)
|
|
461
|
+
ak dr -t PROJ-33 # token breakdown for ticket (--ticket)
|
|
462
|
+
```
|
|
463
|
+
|
|
464
|
+
**Options:**
|
|
465
|
+
- `-t, --ticket <id>` — Show token breakdown for specific ticket
|
|
466
|
+
- `-v, --verbose` — Show detailed checks
|
|
467
|
+
|
|
468
|
+
**What it does:**
|
|
469
|
+
1. Checks for required directories
|
|
470
|
+
2. Validates configuration files
|
|
471
|
+
3. Checks MCP adapter setup
|
|
472
|
+
4. Verifies framework template
|
|
473
|
+
5. Reports issues and fixes
|
|
474
|
+
|
|
475
|
+
**Example:**
|
|
476
|
+
```bash
|
|
477
|
+
$ aiflow doctor
|
|
478
|
+
Running health check for AI Flow Kit...
|
|
479
|
+
|
|
480
|
+
✓ .claude/skills exists
|
|
481
|
+
✓ .rules exists
|
|
482
|
+
✓ CLAUDE.md exists
|
|
483
|
+
✓ Version tracking active (v1.0.0)
|
|
484
|
+
✓ Jira adapter configured
|
|
485
|
+
✓ Laravel framework template loaded
|
|
486
|
+
|
|
487
|
+
✨ Everything looks healthy! You are ready to fly.
|
|
488
|
+
```
|
|
489
|
+
|
|
490
|
+
## validate (alias: `vl`)
|
|
491
|
+
|
|
492
|
+
Validate AI output against team rules and quality standards.
|
|
493
|
+
|
|
494
|
+
```bash
|
|
495
|
+
ak vl output.php # validate a file
|
|
496
|
+
ak vl output.php -r strict # strict rule set (--ruleset)
|
|
497
|
+
ak vl output.php -v # detailed report (--verbose)
|
|
498
|
+
ak vl output.php -x # auto-fix trailing whitespace (--fix)
|
|
499
|
+
```
|
|
500
|
+
|
|
501
|
+
**Options:**
|
|
502
|
+
- `<file>` — File to validate
|
|
503
|
+
- `-r, --ruleset <set>` — Rule set (default, strict, lenient)
|
|
504
|
+
- `-v, --verbose` — Detailed report
|
|
505
|
+
- `-x, --fix` — Auto-fix trailing whitespace
|
|
506
|
+
|
|
507
|
+
**What it does:**
|
|
508
|
+
1. Loads validation rules from `custom/rules/`
|
|
509
|
+
2. Checks code style, naming, security, etc
|
|
510
|
+
3. Reports violations
|
|
511
|
+
4. Optionally suggests fixes
|
|
512
|
+
|
|
513
|
+
**Example:**
|
|
514
|
+
```bash
|
|
515
|
+
$ aiflow validate src/Payment.php
|
|
516
|
+
Validating against ruleset: default
|
|
517
|
+
|
|
518
|
+
✓ Code style: OK
|
|
519
|
+
⚠ Naming: Variable $p should be $payment
|
|
520
|
+
✓ Security: OK
|
|
521
|
+
✗ Testing: Missing test file
|
|
522
|
+
|
|
523
|
+
Issues found: 2 warnings, 1 error
|
|
524
|
+
Suggestions: Add test case, rename variable
|
|
525
|
+
```
|
|
526
|
+
|
|
527
|
+
## telemetry (alias: `tel`)
|
|
528
|
+
|
|
529
|
+
Manage usage telemetry.
|
|
530
|
+
|
|
531
|
+
```bash
|
|
532
|
+
ak tel status # view status, buffer size, last flush
|
|
533
|
+
ak tel enable # interactive setup (URL, secret, email)
|
|
534
|
+
ak tel disable # disable tracking (config retained)
|
|
535
|
+
ak tel flush # force-send buffered events now
|
|
536
|
+
```
|
|
537
|
+
|
|
538
|
+
**Sub-commands:**
|
|
539
|
+
- `status` — View current status, buffer size, last flush time
|
|
540
|
+
- `enable` — Interactive setup (Apps Script URL, team secret, email)
|
|
541
|
+
- `disable` — Disable tracking; configuration is retained
|
|
542
|
+
- `flush` — Force-send all buffered events immediately
|
|
543
|
+
|
|
544
|
+
---
|
|
545
|
+
|
|
546
|
+
## memory (alias: `mem`)
|
|
547
|
+
|
|
548
|
+
Manage team knowledge and context memory.
|
|
549
|
+
|
|
550
|
+
```bash
|
|
551
|
+
ak mem s "payment-flow" "Process: 1. Validate, 2. Call Stripe, 3. Update DB" # save
|
|
552
|
+
ak mem g "payment-flow" # retrieve (memory get)
|
|
553
|
+
ak mem ls # list all (memory list)
|
|
554
|
+
ak mem sr "validation" # search (memory search)
|
|
555
|
+
ak mem d "old-memory" # delete (memory delete)
|
|
556
|
+
ak mem cl # clear all (memory clear)
|
|
557
|
+
```
|
|
558
|
+
|
|
559
|
+
**Sub-commands (with aliases):**
|
|
560
|
+
- `save|s <key> <value>` — Save a note
|
|
561
|
+
- `get|g <key>` — Read a note
|
|
562
|
+
- `list|ls` — List all notes
|
|
563
|
+
- `search|sr <query>` — Search notes
|
|
564
|
+
- `delete|d <key>` — Delete a note
|
|
565
|
+
- `clear|cl` — Clear all notes
|
|
566
|
+
|
|
567
|
+
**What it does:**
|
|
568
|
+
1. Stores team knowledge in `.aiflow/memory/`
|
|
569
|
+
2. Makes knowledge discoverable across the team
|
|
570
|
+
|
|
571
|
+
**Example:**
|
|
572
|
+
```bash
|
|
573
|
+
$ aiflow memory save "payment-flow" "Process: 1. Validate amount, 2. Call Stripe API, 3. Update DB"
|
|
574
|
+
✓ Saved: payment-flow
|
|
575
|
+
|
|
576
|
+
$ aiflow memory search "payment"
|
|
577
|
+
Found 3 memories matching "payment":
|
|
578
|
+
1. payment-flow
|
|
579
|
+
2. payment-error-handling
|
|
580
|
+
3. payment-tests
|
|
581
|
+
```
|
|
582
|
+
|
|
583
|
+
## guide (alias: `g`)
|
|
584
|
+
|
|
585
|
+
Show quickstart guide.
|
|
586
|
+
|
|
587
|
+
```bash
|
|
588
|
+
ak g # full guide
|
|
589
|
+
ak g -f # architecture & flow only (--flow)
|
|
590
|
+
ak g -c # command reference only (--commands)
|
|
591
|
+
```
|
|
592
|
+
|
|
593
|
+
**Options:**
|
|
594
|
+
- `-f, --flow` — Show architecture & flow diagram only
|
|
595
|
+
- `-c, --commands` — Show command reference only
|
|
596
|
+
|
|
597
|
+
---
|
|
598
|
+
|
|
599
|
+
## gate (AI workflow logging)
|
|
600
|
+
|
|
601
|
+
Called automatically by AI during gate workflow — not intended for manual use.
|
|
602
|
+
|
|
603
|
+
```bash
|
|
604
|
+
# Log gate N started
|
|
605
|
+
aiflow gate <n> start --ticket <id>
|
|
606
|
+
|
|
607
|
+
# Log gate N approved
|
|
608
|
+
aiflow gate <n> approved --ticket <id>
|
|
609
|
+
```
|
|
610
|
+
|
|
611
|
+
**Arguments:**
|
|
612
|
+
- `<n>` — Gate number (1-5)
|
|
613
|
+
- `<action>` — `start` or `approved`
|
|
614
|
+
|
|
615
|
+
**Options:**
|
|
616
|
+
- `--ticket <id>` — Ticket ID associated with the gate transition
|
|
617
|
+
- `--ai-tool <tool>` — AI tool that triggered the gate (e.g. claude, cursor, gemini)
|
|
618
|
+
|
|
619
|
+
---
|
|
620
|
+
|
|
621
|
+
## remove (alias: `rm`)
|
|
622
|
+
|
|
623
|
+
Remove ai-flow-kit from project, a cached version, or uninstall globally.
|
|
624
|
+
|
|
625
|
+
```bash
|
|
626
|
+
ak rm # remove from project
|
|
627
|
+
ak rm -g # uninstall globally (--global)
|
|
628
|
+
ak rm --version 1.0.0 # remove cached version from .aiflow/
|
|
629
|
+
```
|
|
630
|
+
|
|
631
|
+
**Options:**
|
|
632
|
+
- `--version <ver>` — Remove a specific cached version from `.aiflow/versions/`
|
|
633
|
+
- `-g, --global` — Uninstall the global npm package (removes `aiflow` command)
|
|
634
|
+
|
|
635
|
+
---
|
|
636
|
+
|
|
637
|
+
## Global Options
|
|
638
|
+
|
|
639
|
+
These work with any command:
|
|
640
|
+
|
|
641
|
+
```bash
|
|
642
|
+
ak --version # Show installed version (-v, -V)
|
|
643
|
+
ak <command> --help # Show help for a command (-h)
|
|
644
|
+
```
|
|
645
|
+
|
|
646
|
+
## Exit Codes
|
|
647
|
+
|
|
648
|
+
- `0` — Success
|
|
649
|
+
- `1` — General error
|
|
650
|
+
- `2` — Command not found
|
|
651
|
+
- `3` — Invalid arguments
|
|
652
|
+
- `4` — Configuration error
|
|
653
|
+
- `5` — MCP adapter error
|
|
654
|
+
|
|
655
|
+
---
|
|
656
|
+
|
|
657
|
+
See [Getting Started](./getting-started.md) for tutorials and [Configuration](./configuration.md) for detailed options.
|