@relipa/ai-flow-kit 0.0.5 → 0.0.6-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 +81 -69
- package/bin/aiflow.js +46 -2
- package/custom/rules/java/spring-boot-examples.md +329 -0
- package/custom/skills/read-study-requirement/SKILL.md +54 -0
- package/custom/skills/review-plan/SKILL.md +21 -0
- package/custom/templates/shared/gate-workflow.md +88 -88
- package/custom/templates/spring-boot.md +224 -523
- package/docs/common/AIFLOW.md +501 -462
- package/docs/common/CHANGELOG.md +162 -132
- package/docs/common/QUICK_START.md +44 -12
- package/docs/common/cli-reference.md +115 -6
- package/docs/common/getting-started.md +3 -0
- package/docs/project/ARCHITECTURE.md +28 -28
- package/package.json +6 -1
- package/scripts/doctor.js +89 -48
- package/scripts/guide.js +28 -5
- package/scripts/hooks/session-start.js +144 -45
- package/scripts/init.js +109 -50
- package/scripts/prompt.js +431 -431
- package/scripts/task.js +384 -0
- package/scripts/telemetry/cli.js +243 -243
- package/scripts/telemetry/config.js +91 -91
- package/scripts/telemetry/crypto.js +20 -20
- package/scripts/telemetry/flush.js +162 -162
- package/scripts/telemetry/record.js +138 -138
- package/scripts/use.js +94 -2
package/docs/common/CHANGELOG.md
CHANGED
|
@@ -1,132 +1,162 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to **@relipa/ai-flow-kit** will be documented in this file.
|
|
4
|
-
|
|
5
|
-
Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|
6
|
-
Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
-
|
|
8
|
-
---
|
|
9
|
-
|
|
10
|
-
## [0.0.
|
|
11
|
-
|
|
12
|
-
### Added
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
- **
|
|
29
|
-
- **`aiflow
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
###
|
|
62
|
-
-
|
|
63
|
-
-
|
|
64
|
-
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
-
|
|
69
|
-
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
-
|
|
77
|
-
|
|
78
|
-
-
|
|
79
|
-
-
|
|
80
|
-
-
|
|
81
|
-
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
-
|
|
99
|
-
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
- `
|
|
110
|
-
- `
|
|
111
|
-
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
-
|
|
116
|
-
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to **@relipa/ai-flow-kit** will be documented in this file.
|
|
4
|
+
|
|
5
|
+
Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|
6
|
+
Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## [0.0.6] - 2026-04-29
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
- **Global Fast Mode (Default)** — Optimize AI efficiency by prioritizing speed and minimizing token usage.
|
|
14
|
+
- Gate 1: Fast track scan with max 1 clarifying question.
|
|
15
|
+
- Gate 3: Disable subagents by default; implement all tasks in a single session.
|
|
16
|
+
- Gate 4: Quick scan impact analysis based on git diffs; simplified review checklist.
|
|
17
|
+
- **Improved `--file` loader** — `aiflow use --file` now supports plain-text files (JSON no longer required).
|
|
18
|
+
- Auto-detects Ticket ID and Title from the text content.
|
|
19
|
+
- **Gate-aware Injection** — Enhanced `session-start.js` hook to inject gate-appropriate "Fast Track" instructions during task resumption.
|
|
20
|
+
- **Full Mode flag** — Added `--full` flag to bypass Fast mode optimizations for complex tasks.
|
|
21
|
+
- **`aiflow task` command group** — Manage multiple tasks in the same repository without losing progress.
|
|
22
|
+
- `aiflow task status`, `list`, `pause`, `switch`, `resume`.
|
|
23
|
+
- **RTK token compression integration** — `aiflow init` automatically configures the RTK hook for 60–90% token savings on shell commands.
|
|
24
|
+
- **`aiflow use --fast` / `--full` flags** — Control Gate 1 analysis depth per ticket.
|
|
25
|
+
- **Spring Boot code examples extracted** — Java code examples moved to separate files to reduce `CLAUDE.md` size.
|
|
26
|
+
|
|
27
|
+
### Changed
|
|
28
|
+
- **Default mode** for all new tasks is now `fast` instead of `auto`.
|
|
29
|
+
- **`aiflow init` improvements** — Supports multi-select framework and protects existing instruction files from being overwritten.
|
|
30
|
+
- **CLAUDE.md Optimization** — Reduced Spring Boot template size by ~70%, saving ~3-5k tokens per session.
|
|
31
|
+
- **Documentation Synchronization** — Fixed all documentation links on npmjs.com and updated Overview Flow in README.
|
|
32
|
+
- **Automatic Task Pausing** — When loading a new ticket, the current task is automatically paused and its state is saved.
|
|
33
|
+
|
|
34
|
+
### Fixed
|
|
35
|
+
- Broken 404 documentation links on the npmjs.com page.
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## [0.0.4-beta.5] - 2026-04-21
|
|
41
|
+
|
|
42
|
+
### Added
|
|
43
|
+
- Created a dedicated `docs/` folder to house all developer-facing documentation.
|
|
44
|
+
- Integrated AI Skill Registry into all tool templates (Claude, Cursor, Gemini, Copilot) for better skill discovery.
|
|
45
|
+
|
|
46
|
+
### Changed
|
|
47
|
+
- Moved `README.md`, `QUICK_START.md`, `AIFLOW.md`, `CHANGELOG.md`, and `IMPLEMENTATION_SUMMARY.md` into the `docs/` directory.
|
|
48
|
+
- Updated `package.json` to exclude internal-only files (`CONTRIBUTING.md`, `plan.md`) from the NPM package distribution.
|
|
49
|
+
- Updated `scripts/init.js` to source documentation from the new `docs/` location.
|
|
50
|
+
- Updated all internal documentation links to reflect the new directory structure.
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## [0.0.5-beta.0] - 2026-04-23
|
|
55
|
+
|
|
56
|
+
### Added
|
|
57
|
+
- **`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
|
+
- **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
|
+
- **`aiflow telemetry flush` command** — Force-sends buffered telemetry events immediately.
|
|
60
|
+
|
|
61
|
+
### Changed
|
|
62
|
+
- **`aiflow init` safe overwrite flow** — When a project already has `CLAUDE.md`, `GEMINI.md`, `.cursorrules`, etc., `aiflow init` now prompts before overwriting:
|
|
63
|
+
- **No (default):** keeps existing file untouched; saves the aiflow template to `.aiflow/reference/<file>` for manual comparison/merge.
|
|
64
|
+
- **Yes:** backs up the existing file to `.aiflow/backup/<file>` before overwriting — nothing is permanently lost.
|
|
65
|
+
- **`aiflow use --manual` pre-fill (Edit mode)** — Re-running `aiflow use --manual` when context already exists now pre-fills all fields (Ticket ID, Title, Description, Task type) with the current values; press Enter on any field to keep it unchanged.
|
|
66
|
+
- **Fix TEAM_SECRET input** — Replaced `password()` prompt with `input()` using a masked hint `[Reli***!@#]`; pressing Enter retains the existing value.
|
|
67
|
+
- **Fix Apps Script URL input** — Same pattern as TEAM_SECRET: masked hint `[https://script.google.com/macros/s/AKfy***xxxx/exec]`; pressing Enter retains the existing value.
|
|
68
|
+
- **Downgrade dependencies for Node >=16 compatibility** — `@inquirer/prompts` downgraded from `^8.3.2` to `^3.0.0`; `commander` downgraded from `^14.0.3` to `^11.0.0`.
|
|
69
|
+
- **`engines.node`** updated from `>=14.0.0` to `>=16.0.0`.
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## [0.0.5] - 2026-04-23
|
|
74
|
+
|
|
75
|
+
### Added
|
|
76
|
+
- **Telemetry System (MVP)**: Added anonymous usage tracking to measure command metrics and user adoption.
|
|
77
|
+
- `aiflow telemetry enable/disable/status` commands to easily opt-in or opt-out.
|
|
78
|
+
- Automatically captures environment metadata and Git email via `git config --global user.email`.
|
|
79
|
+
- Secure payload signing natively using Node `crypto` HMAC-SHA256 to ensure data authenticity.
|
|
80
|
+
- Asynchronous payload flusher to ensure zero impact on command execution time (`< 5ms` overhead).
|
|
81
|
+
- Support tracking for multiple AI platforms including Cursor and Gemini via Command Execution events and the new Telemetry SDK.
|
|
82
|
+
|
|
83
|
+
### Security
|
|
84
|
+
- **Strict Privacy**: Explicitly removed all prompt content and chat history tracking to ensure 100% confidentiality of company code and PII.
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## [Unreleased]
|
|
89
|
+
|
|
90
|
+
## [0.0.3-beta.0] - 2026-04-13
|
|
91
|
+
### Security
|
|
92
|
+
- Removed internal GitLab repository links and tracking information.
|
|
93
|
+
- Cleaned `.npmrc` configuration.
|
|
94
|
+
- Added helper scripts for beta and stable releases.
|
|
95
|
+
|
|
96
|
+
## [0.0.2] - 2026-04-13
|
|
97
|
+
### Changed
|
|
98
|
+
- Updated package to scoped name `@relipa/ai-flow-kit` in documentation and configuration.
|
|
99
|
+
- Fixed installation guides in README and QUICK_START.
|
|
100
|
+
|
|
101
|
+
## [0.0.1] - 2026-04-13 — Initial Release
|
|
102
|
+
|
|
103
|
+
### Added
|
|
104
|
+
|
|
105
|
+
#### CLI (`aiflow`)
|
|
106
|
+
- `aiflow init` — scaffold AI workflow config into any project
|
|
107
|
+
(supports `--framework` spring-boot/reactjs, `--adapter` jira/backlog)
|
|
108
|
+
- `aiflow use <skill>` — activate a custom skill in the current project
|
|
109
|
+
- `aiflow remove` — cleanly remove `ai-flow-kit` scaffolding from a project
|
|
110
|
+
- `aiflow guide` — interactive onboarding guide
|
|
111
|
+
- `aiflow update` — sync upstream skill/hook updates
|
|
112
|
+
- `aiflow doctor` — validate config, detect missing keys, report issues
|
|
113
|
+
- `aiflow --version` — print installed version
|
|
114
|
+
|
|
115
|
+
#### 5-Gate AI Workflow
|
|
116
|
+
- **Gate 1 — AI Analyze Requirement**: Auto-starts when a ticket context exists
|
|
117
|
+
in `.aiflow/context/current.json`; outputs `plan/[ticket-id]/requirement.md`
|
|
118
|
+
- **Gate 2 — Implementation Plan**: TDD plan generation, gated by `APPROVED`
|
|
119
|
+
- **Gate 3 — Code Generation**: TDD-only, test-first discipline enforced
|
|
120
|
+
- **Gate 4 — AI Self-Review**: Verification + impact analysis + checklist, gated by `APPROVED`
|
|
121
|
+
- **Gate 5 — Peer Review & PR**: Guided PR creation via `requesting-code-review` skill
|
|
122
|
+
|
|
123
|
+
#### Custom Skills (7 skills)
|
|
124
|
+
- `read-study-requirement` — Gate 1 requirement analysis with clarifying Q&A loop
|
|
125
|
+
- `generate-spec` — Gate 2 TDD implementation spec generator
|
|
126
|
+
- `impact-analysis` — breaking-change and dependency impact assessment
|
|
127
|
+
- `investigate-bug` — systematic bug investigation (reproduce → root cause → fix)
|
|
128
|
+
- `report-customer` — customer-facing incident report generator
|
|
129
|
+
- `review-plan` — Gate 4 self-review orchestrator
|
|
130
|
+
- `figma-to-component` — Figma design → UI component code generator
|
|
131
|
+
|
|
132
|
+
#### Multi-AI Support
|
|
133
|
+
- **Claude Code** integration via `CLAUDE.md` + `.claude/` directory structure
|
|
134
|
+
- **Gemini CLI** integration via `GEMINI.md`
|
|
135
|
+
- **GitHub Copilot** integration via agents config
|
|
136
|
+
- Superpowers skill library bundled as `upstream/` (pinned to v5.0.5)
|
|
137
|
+
|
|
138
|
+
#### Project Templates
|
|
139
|
+
- `AIFLOW.md` — team workflow reference document
|
|
140
|
+
- `QUICK_START.md` — 5-minute setup guide
|
|
141
|
+
- `.aiflowrc.json.example` — configuration file reference
|
|
142
|
+
|
|
143
|
+
### Architecture Notes
|
|
144
|
+
- Stateless per-ticket design — no persistent memory across sessions (planned: v0.1.x)
|
|
145
|
+
- Manual skill sync model via `aiflow use` (managed `aiflow skill` CLI planned: v0.1.x)
|
|
146
|
+
- Spring Boot (Java 17+) used as the reference framework in `CLAUDE.md` coding rules
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
## How to upgrade
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
npm install -g @relipa/ai-flow-kit@latest
|
|
154
|
+
aiflow --version
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
After upgrading, run `aiflow update` inside your project to sync the latest skills and hooks:
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
cd your-project
|
|
161
|
+
aiflow update
|
|
162
|
+
```
|
|
@@ -79,6 +79,9 @@ aiflow use PROJ-33 --comments-last 5
|
|
|
79
79
|
|
|
80
80
|
# Manual input (no Backlog/Jira)
|
|
81
81
|
aiflow use --manual
|
|
82
|
+
|
|
83
|
+
# Load from local file (JSON or plain text)
|
|
84
|
+
aiflow use --file task-description.txt
|
|
82
85
|
```
|
|
83
86
|
|
|
84
87
|
Output:
|
|
@@ -109,6 +112,10 @@ claude # AI auto-starts Gate 1 immediately
|
|
|
109
112
|
|
|
110
113
|
**What happens:** AI reads your ticket + source code + asks questions.
|
|
111
114
|
|
|
115
|
+
> [!NOTE]
|
|
116
|
+
> **Fast Mode** is now the default. AI aims for a quick scan and minimal Q&A to get you coding in < 5 mins.
|
|
117
|
+
> Use `aiflow use TICKET --full` if you want the AI to perform a deep, exhaustive analysis (Gate 1 Full).
|
|
118
|
+
|
|
112
119
|
When you open Claude, AI will **automatically** start analyzing:
|
|
113
120
|
|
|
114
121
|
1. **Read ticket** from `.aiflow/context/current.json`
|
|
@@ -208,10 +215,23 @@ git push origin feature/PROJ-33-description
|
|
|
208
215
|
|
|
209
216
|
Ask a teammate to review. They can use `superpowers:receiving-code-review` skill.
|
|
210
217
|
|
|
211
|
-
### Step 8: Done!
|
|
212
|
-
|
|
213
218
|
After peer reviewer approves → merge → task complete.
|
|
214
219
|
|
|
220
|
+
### Step 9: Task Management (Context Switching)
|
|
221
|
+
|
|
222
|
+
If you need to switch to another task mid-flow:
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
# Pause current task (saves gate progress)
|
|
226
|
+
aiflow task pause --note "Waiting for PM clarification"
|
|
227
|
+
|
|
228
|
+
# List all tasks
|
|
229
|
+
aiflow task list
|
|
230
|
+
|
|
231
|
+
# Resume a previously paused task
|
|
232
|
+
aiflow task resume PROJ-33
|
|
233
|
+
```
|
|
234
|
+
|
|
215
235
|
---
|
|
216
236
|
|
|
217
237
|
## Workflow Summary Diagram
|
|
@@ -297,18 +317,30 @@ claude # AI auto-starts: map dependencies → ass
|
|
|
297
317
|
```bash
|
|
298
318
|
# Setup
|
|
299
319
|
aiflow init --framework nestjs --adapter backlog
|
|
300
|
-
aiflow init --framework spring-boot --
|
|
301
|
-
aiflow
|
|
302
|
-
aiflow
|
|
320
|
+
aiflow init --framework spring-boot --with-rtk # force enable RTK compression
|
|
321
|
+
aiflow init --no-rtk # skip RTK setup
|
|
322
|
+
aiflow doctor # health check
|
|
323
|
+
aiflow guide # multi-tool guide
|
|
303
324
|
|
|
304
325
|
# Per task
|
|
305
|
-
aiflow use PROJ-33
|
|
306
|
-
aiflow use PROJ-33 --
|
|
307
|
-
aiflow use
|
|
308
|
-
aiflow use --
|
|
309
|
-
aiflow
|
|
310
|
-
aiflow
|
|
311
|
-
aiflow prompt
|
|
326
|
+
aiflow use PROJ-33 # load context (Fast Mode, default)
|
|
327
|
+
aiflow use PROJ-33 --full # load context (Full Mode)
|
|
328
|
+
aiflow use --file task.md # load from local text/json file
|
|
329
|
+
aiflow use PROJ-33 --with-comments # load with comments
|
|
330
|
+
aiflow use PROJ-33 --comments-last 5 # newest 5 comments
|
|
331
|
+
aiflow use --manual # manual input
|
|
332
|
+
aiflow prompt bug-fix # generate prompt
|
|
333
|
+
aiflow prompt feature --output p.md # save prompt to file
|
|
334
|
+
aiflow prompt --list # list all prompt types
|
|
335
|
+
|
|
336
|
+
# Task management
|
|
337
|
+
aiflow task status # show active and pending tasks
|
|
338
|
+
aiflow task list # list all saved tasks
|
|
339
|
+
aiflow task pause # pause current task
|
|
340
|
+
aiflow task switch PROJ-99 # switch to another task
|
|
341
|
+
aiflow task resume PROJ-33 # resume a paused task
|
|
342
|
+
aiflow task reset PROJ-33 # reset to Gate 1 (keeps context)
|
|
343
|
+
aiflow task remove PROJ-33 # permanently delete all task data
|
|
312
344
|
|
|
313
345
|
# Context management
|
|
314
346
|
aiflow context show # view active context
|
|
@@ -28,17 +28,23 @@ aiflow init --framework laravel --adapter jira
|
|
|
28
28
|
```
|
|
29
29
|
|
|
30
30
|
**Options:**
|
|
31
|
-
- `-f, --framework <
|
|
32
|
-
- `-a, --adapter <
|
|
33
|
-
- `-e, --env <types>` — AI tools to configure (cursor, gemini, copilot)
|
|
31
|
+
- `-f, --framework <types>` — Framework templates, comma-separated (e.g. `spring-boot,reactjs`)
|
|
32
|
+
- `-a, --adapter <types>` — MCP adapters (jira, backlog, google-sheets)
|
|
33
|
+
- `-e, --env <types>` — AI tools to configure (cursor, gemini, copilot, generic). Default excludes `generic`.
|
|
34
|
+
- `--with-rtk` — Force enable RTK token compression hook
|
|
35
|
+
- `--no-rtk` — Skip RTK setup even if RTK is detected
|
|
34
36
|
|
|
35
37
|
**What it does:**
|
|
36
38
|
1. Creates `.claude/skills/` with all available skills
|
|
37
|
-
2. Creates `.rules/` with team rules
|
|
39
|
+
2. Creates `.rules/` with team rules (including `java/spring-boot-examples.md` for Spring Boot projects)
|
|
38
40
|
3. Creates `.aiflow/` with version tracking
|
|
39
|
-
4.
|
|
41
|
+
4. Sets up framework instruction file (`CLAUDE.md`, `.cursorrules`, etc.):
|
|
42
|
+
- **File already exists** → saves aiflow template to `.aiflow/reference/<file>` for comparison. Your existing file is untouched — you own it.
|
|
43
|
+
- **File does not exist** → creates it in the project root.
|
|
40
44
|
5. Optionally configures MCP adapter
|
|
41
45
|
|
|
46
|
+
> **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.
|
|
47
|
+
|
|
42
48
|
**Example:**
|
|
43
49
|
```bash
|
|
44
50
|
$ aiflow init --framework laravel --adapter jira
|
|
@@ -62,6 +68,12 @@ aiflow use JIRA-2024-123
|
|
|
62
68
|
# Load from Backlog
|
|
63
69
|
aiflow use BACKLOG-456
|
|
64
70
|
|
|
71
|
+
# Fast mode — lite Gate 1 (< 5 min, no Q&A)
|
|
72
|
+
aiflow use BACKLOG-456 --fast
|
|
73
|
+
|
|
74
|
+
# Full mode — force complete analysis
|
|
75
|
+
aiflow use BACKLOG-456 --full
|
|
76
|
+
|
|
65
77
|
# Manual entry
|
|
66
78
|
aiflow use --manual
|
|
67
79
|
|
|
@@ -80,11 +92,13 @@ aiflow use 1.0.0
|
|
|
80
92
|
- `--with-comments` — Include all ticket comments
|
|
81
93
|
- `--comments-last <n>` — Only fetch last N comments
|
|
82
94
|
- `--comments-from <n>` — Fetch comments starting from comment N
|
|
95
|
+
- `--fast` — Fast mode: AI skips Q&A, outputs lite 3-section requirement doc (< 5 min Gate 1). Best for clear tickets with ≥ 3 measurable AC.
|
|
96
|
+
- `--full` — Full mode: force complete Gate 1 analysis with Q&A regardless of ticket clarity.
|
|
83
97
|
|
|
84
98
|
**What it does:**
|
|
85
99
|
1. Fetches context from MCP adapter (if applicable)
|
|
86
100
|
2. Parses and validates context
|
|
87
|
-
3. Saves to `.aiflow/context/current.json`
|
|
101
|
+
3. Saves to `.aiflow/context/current.json` (including `mode` field for Gate 1 behaviour)
|
|
88
102
|
4. Updates state tracking
|
|
89
103
|
|
|
90
104
|
**Example:**
|
|
@@ -99,6 +113,101 @@ Fetching context from Jira...
|
|
|
99
113
|
Ready to prompt! Run: aiflow prompt bug-fix
|
|
100
114
|
```
|
|
101
115
|
|
|
116
|
+
## task
|
|
117
|
+
|
|
118
|
+
Manage multiple tasks — pause, switch, and resume while preserving gate progress.
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
# Show active task + pending list
|
|
122
|
+
aiflow task status
|
|
123
|
+
|
|
124
|
+
# List all saved tasks
|
|
125
|
+
aiflow task list
|
|
126
|
+
|
|
127
|
+
# Pause current task (saves context + gate progress)
|
|
128
|
+
aiflow task pause
|
|
129
|
+
aiflow task pause --note "waiting for API spec from PM"
|
|
130
|
+
|
|
131
|
+
# Pause current + switch to another task
|
|
132
|
+
aiflow task switch PROJ-99
|
|
133
|
+
|
|
134
|
+
# Resume a paused task
|
|
135
|
+
aiflow task resume PROJ-33
|
|
136
|
+
|
|
137
|
+
# Reset task to Gate 1 (keeps ticket context, clears gate progress)
|
|
138
|
+
aiflow task reset PROJ-33
|
|
139
|
+
|
|
140
|
+
# Permanently delete all saved data for a task
|
|
141
|
+
aiflow task remove PROJ-33
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
**Sub-commands:**
|
|
145
|
+
- `status` — Show active task and all pending tasks
|
|
146
|
+
- `list` — List all saved tasks with gate state
|
|
147
|
+
- `pause [--note <text>]` — Save current progress and clear active task
|
|
148
|
+
- `switch <ticket-id>` — Pause current task + load/switch to another
|
|
149
|
+
- `resume <ticket-id>` — Restore a paused task as active
|
|
150
|
+
- `reset <ticket-id>` — Reset gate progress to Gate 1 (keeps ticket context); prompts to optionally delete `plan/<id>/` files
|
|
151
|
+
- `remove <ticket-id>` — Permanently delete all saved data for the task (state, context snapshot, plan files)
|
|
152
|
+
|
|
153
|
+
**What it does:**
|
|
154
|
+
1. Saves a snapshot of the current context (`current.json`) to `.aiflow/tasks/<taskId>/context.json`
|
|
155
|
+
2. Detects current gate from `plan/` artifacts (`requirement.md`, `plan.md`, `summary.md`)
|
|
156
|
+
3. Writes `.aiflow/tasks/<taskId>/task-state.json` with status, gate, and approvals
|
|
157
|
+
4. On resume: restores context as `current.json` and sets status back to `active`
|
|
158
|
+
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
|
|
159
|
+
|
|
160
|
+
**Gate detection from `plan/` files:**
|
|
161
|
+
| File present | Inferred gate |
|
|
162
|
+
|---|---|
|
|
163
|
+
| (none) | Gate 1 |
|
|
164
|
+
| `plan/<id>/requirement.md` | Gate 2 |
|
|
165
|
+
| `plan/<id>/plan.md` | Gate 3 |
|
|
166
|
+
| `plan/<id>/summary.md` | Gate 5 |
|
|
167
|
+
|
|
168
|
+
**Example workflow:**
|
|
169
|
+
```bash
|
|
170
|
+
# Mid-task on PROJ-33 (Gate 2 in progress)...
|
|
171
|
+
aiflow task pause --note "waiting for DB schema confirmation"
|
|
172
|
+
# ✓ Task PROJ-33 paused at Gate 2.
|
|
173
|
+
|
|
174
|
+
aiflow use PROJ-99 # load urgent task
|
|
175
|
+
claude # AI auto-starts Gate 1 for PROJ-99
|
|
176
|
+
|
|
177
|
+
# Back to PROJ-33
|
|
178
|
+
aiflow task resume PROJ-33
|
|
179
|
+
# ✓ Resumed task: PROJ-33
|
|
180
|
+
# Gate: 2 (Implementation Plan)
|
|
181
|
+
|
|
182
|
+
claude # AI resumes from Gate 2 — no restart
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
**Reset workflow** — run a task from scratch after deleting generated code:
|
|
186
|
+
```bash
|
|
187
|
+
aiflow task reset PROJ-33
|
|
188
|
+
# Reset task: PROJ-33
|
|
189
|
+
# • .aiflow/tasks/PROJ-33/task-state.json (Gate 3 → 1, approvals cleared)
|
|
190
|
+
# ? Also delete 2 plan file(s) in plan/PROJ-33/? › No
|
|
191
|
+
# ? Proceed with reset? › Yes
|
|
192
|
+
# ✓ Task PROJ-33 reset to Gate 1.
|
|
193
|
+
|
|
194
|
+
claude # AI auto-starts Gate 1 as if the task is brand new
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
**Remove workflow** — permanently clean up a cancelled task:
|
|
198
|
+
```bash
|
|
199
|
+
aiflow task remove PROJ-33
|
|
200
|
+
# Remove task: PROJ-33
|
|
201
|
+
# • .aiflow/tasks/PROJ-33/ (context snapshot + gate state)
|
|
202
|
+
# • .aiflow/context/current.json (this is the active task)
|
|
203
|
+
# • plan/PROJ-33/ (2 files):
|
|
204
|
+
# - plan/PROJ-33/requirement.md
|
|
205
|
+
# - plan/PROJ-33/plan.md
|
|
206
|
+
# ? This cannot be undone. Proceed? › No
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
---
|
|
210
|
+
|
|
102
211
|
## prompt
|
|
103
212
|
|
|
104
213
|
Generate an AI prompt with context, rules, and template.
|
|
@@ -99,6 +99,9 @@ This pulls:
|
|
|
99
99
|
- Acceptance criteria
|
|
100
100
|
- Related files/links
|
|
101
101
|
|
|
102
|
+
> [!TIP]
|
|
103
|
+
> **Fast Mode** is now the default. AI Flow Kit will prioritize speed and minimal Q&A so you can start coding in < 5 mins. Use `--full` if you need deep analysis.
|
|
104
|
+
|
|
102
105
|
**2. Generate a prompt:**
|
|
103
106
|
```bash
|
|
104
107
|
aiflow prompt bug-fix
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
# Architecture Overview
|
|
2
|
-
|
|
3
|
-
> **Template file** — Replace this with your project's actual architecture.
|
|
4
|
-
|
|
5
|
-
## System Architecture
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
[Describe your system layers here]
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## Tech Stack
|
|
12
|
-
|
|
13
|
-
| Layer | Technology |
|
|
14
|
-
|-------|-----------|
|
|
15
|
-
| Backend | |
|
|
16
|
-
| Frontend | |
|
|
17
|
-
| Database | |
|
|
18
|
-
| Infrastructure | |
|
|
19
|
-
|
|
20
|
-
## Key Components
|
|
21
|
-
|
|
22
|
-
-
|
|
23
|
-
|
|
24
|
-
## Data Flow
|
|
25
|
-
|
|
26
|
-
```
|
|
27
|
-
[Describe main data flows]
|
|
28
|
-
```
|
|
1
|
+
# Architecture Overview
|
|
2
|
+
|
|
3
|
+
> **Template file** — Replace this with your project's actual architecture.
|
|
4
|
+
|
|
5
|
+
## System Architecture
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
[Describe your system layers here]
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Tech Stack
|
|
12
|
+
|
|
13
|
+
| Layer | Technology |
|
|
14
|
+
|-------|-----------|
|
|
15
|
+
| Backend | |
|
|
16
|
+
| Frontend | |
|
|
17
|
+
| Database | |
|
|
18
|
+
| Infrastructure | |
|
|
19
|
+
|
|
20
|
+
## Key Components
|
|
21
|
+
|
|
22
|
+
-
|
|
23
|
+
|
|
24
|
+
## Data Flow
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
[Describe main data flows]
|
|
28
|
+
```
|
package/package.json
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@relipa/ai-flow-kit",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6-beta.0",
|
|
4
4
|
"description": "All-in-one AI Flow Kit for team development with Claude AI - skills, templates, and MCP adapters",
|
|
5
5
|
"author": "Relipa AI Team",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://gitlab.relipa.vn/ai/ai-flow-kit.git"
|
|
9
|
+
},
|
|
10
|
+
"homepage": "https://gitlab.relipa.vn/ai/ai-flow-kit#readme",
|
|
6
11
|
"publishConfig": {
|
|
7
12
|
"access": "public",
|
|
8
13
|
"registry": "https://registry.npmjs.com/"
|