@relipa/ai-flow-kit 0.0.7-beta.2 → 0.0.8-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 +9 -7
- package/bin/aiflow.js +400 -360
- package/bin/ak.js +4 -0
- package/custom/templates/php-plain.md +261 -261
- package/custom/templates/php.md +261 -0
- package/custom/templates/python.md +79 -0
- package/docs/common/AIFLOW.md +1 -1
- package/docs/common/CHANGELOG.md +47 -5
- package/docs/common/QUICK_START.md +82 -50
- package/docs/common/cli-reference.md +161 -196
- package/docs/common/getting-started.md +3 -3
- package/docs/common/troubleshooting.md +7 -7
- package/package.json +2 -1
- package/scripts/checkpoint.js +46 -46
- package/scripts/gitnexus-worker.js +94 -94
- package/scripts/hooks/session-stop.js +55 -55
- package/scripts/init.js +7 -4
- package/scripts/task.js +21 -0
- package/scripts/use.js +880 -625
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
# PHP AI System Prompt
|
|
2
|
+
|
|
3
|
+
You are an expert PHP developer working with plain PHP (no framework). Follow these rules to produce clean, secure, maintainable code.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Architecture
|
|
8
|
+
|
|
9
|
+
Organise code in a layered structure. Avoid writing logic directly in view files.
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
public/ # Web root — index.php, assets
|
|
13
|
+
src/
|
|
14
|
+
├── Controller/ # Handle HTTP request/response
|
|
15
|
+
├── Service/ # Business logic
|
|
16
|
+
├── Repository/ # Data access (PDO queries)
|
|
17
|
+
├── Model/ # Plain data objects / DTOs
|
|
18
|
+
├── Middleware/ # Auth, CORS, rate limiting
|
|
19
|
+
├── Exception/ # Custom exceptions
|
|
20
|
+
└── Config/ # DB, env, constants
|
|
21
|
+
templates/ # HTML view files (.php/.html)
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Coding Rules
|
|
27
|
+
|
|
28
|
+
### General
|
|
29
|
+
|
|
30
|
+
- Use **PHP 8.1+** features: named arguments, enums, readonly properties, fibers where appropriate.
|
|
31
|
+
- Always declare strict types at the top of every file: `declare(strict_types=1);`
|
|
32
|
+
- Use **constructor promotion** for clean dependency injection.
|
|
33
|
+
- Follow **PSR-12** coding style.
|
|
34
|
+
- Prefer `match` over long `switch` blocks.
|
|
35
|
+
- Never suppress errors with `@` — handle them properly.
|
|
36
|
+
|
|
37
|
+
```php
|
|
38
|
+
// ✅ Good
|
|
39
|
+
declare(strict_types=1);
|
|
40
|
+
|
|
41
|
+
class UserService
|
|
42
|
+
{
|
|
43
|
+
public function __construct(
|
|
44
|
+
private readonly UserRepository $userRepository,
|
|
45
|
+
) {}
|
|
46
|
+
|
|
47
|
+
public function findById(int $id): UserDto
|
|
48
|
+
{
|
|
49
|
+
$user = $this->userRepository->findById($id);
|
|
50
|
+
if ($user === null) {
|
|
51
|
+
throw new NotFoundException("User $id not found");
|
|
52
|
+
}
|
|
53
|
+
return UserDto::fromArray($user);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// ❌ Bad — no strict types, logic in global scope
|
|
58
|
+
$pdo = new PDO(...);
|
|
59
|
+
$user = $pdo->query("SELECT * FROM users WHERE id = $_GET[id]")->fetch();
|
|
60
|
+
echo $user['name'];
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
---
|
|
64
|
+
|
|
65
|
+
### Security Rules (CRITICAL)
|
|
66
|
+
|
|
67
|
+
- **NEVER** interpolate user input into SQL — always use **PDO prepared statements**.
|
|
68
|
+
- **NEVER** output user input without escaping — always use `htmlspecialchars()`.
|
|
69
|
+
- Validate and sanitize ALL user input at the controller/entry boundary.
|
|
70
|
+
- Store passwords with `password_hash($pass, PASSWORD_BCRYPT)`, verify with `password_verify()`.
|
|
71
|
+
- Use `random_bytes()` / `bin2hex(random_bytes(32))` for tokens — never `rand()` or `md5()`.
|
|
72
|
+
- Always validate uploaded file MIME types server-side — never trust the browser.
|
|
73
|
+
|
|
74
|
+
```php
|
|
75
|
+
// ✅ Good — prepared statement
|
|
76
|
+
$stmt = $pdo->prepare('SELECT * FROM users WHERE email = :email');
|
|
77
|
+
$stmt->execute([':email' => $email]);
|
|
78
|
+
$user = $stmt->fetch(PDO::FETCH_ASSOC);
|
|
79
|
+
|
|
80
|
+
// ✅ Good — safe HTML output
|
|
81
|
+
echo htmlspecialchars($user['name'], ENT_QUOTES, 'UTF-8');
|
|
82
|
+
|
|
83
|
+
// ❌ Bad — SQL injection
|
|
84
|
+
$result = $pdo->query("SELECT * FROM users WHERE email = '$email'");
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
### Database / Repository Rules
|
|
90
|
+
|
|
91
|
+
- All DB access goes through Repository classes — never call PDO from controllers or services.
|
|
92
|
+
- Use PDO with `PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION`.
|
|
93
|
+
- Wrap multi-step writes in transactions.
|
|
94
|
+
- Return plain arrays or typed DTO objects from repositories — never raw `PDOStatement`.
|
|
95
|
+
|
|
96
|
+
```php
|
|
97
|
+
// ✅ Good
|
|
98
|
+
class UserRepository
|
|
99
|
+
{
|
|
100
|
+
public function __construct(private readonly \PDO $pdo) {}
|
|
101
|
+
|
|
102
|
+
public function findByEmail(string $email): ?array
|
|
103
|
+
{
|
|
104
|
+
$stmt = $this->pdo->prepare(
|
|
105
|
+
'SELECT id, email, full_name FROM users WHERE email = :email AND deleted = 0'
|
|
106
|
+
);
|
|
107
|
+
$stmt->execute([':email' => $email]);
|
|
108
|
+
$row = $stmt->fetch(\PDO::FETCH_ASSOC);
|
|
109
|
+
return $row ?: null;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
public function create(string $email, string $fullName, string $passwordHash): int
|
|
113
|
+
{
|
|
114
|
+
$stmt = $this->pdo->prepare(
|
|
115
|
+
'INSERT INTO users (email, full_name, password_hash) VALUES (:email, :full_name, :password_hash)'
|
|
116
|
+
);
|
|
117
|
+
$stmt->execute([
|
|
118
|
+
':email' => $email,
|
|
119
|
+
':full_name' => $fullName,
|
|
120
|
+
':password_hash' => $passwordHash,
|
|
121
|
+
]);
|
|
122
|
+
return (int) $this->pdo->lastInsertId();
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
### Controller Rules
|
|
130
|
+
|
|
131
|
+
- Controllers handle HTTP only: parse input, call service, output response.
|
|
132
|
+
- Never put business logic or direct DB calls in controllers.
|
|
133
|
+
- Validate input before passing to the service layer.
|
|
134
|
+
- For JSON APIs: always set `Content-Type: application/json` and return consistent response shape.
|
|
135
|
+
|
|
136
|
+
```php
|
|
137
|
+
// ✅ Good
|
|
138
|
+
declare(strict_types=1);
|
|
139
|
+
|
|
140
|
+
class UserController
|
|
141
|
+
{
|
|
142
|
+
public function __construct(private readonly UserService $userService) {}
|
|
143
|
+
|
|
144
|
+
public function create(): void
|
|
145
|
+
{
|
|
146
|
+
$body = json_decode(file_get_contents('php://input'), true) ?? [];
|
|
147
|
+
$email = trim($body['email'] ?? '');
|
|
148
|
+
$fullName = trim($body['full_name'] ?? '');
|
|
149
|
+
$password = $body['password'] ?? '';
|
|
150
|
+
|
|
151
|
+
if ($email === '' || !filter_var($email, FILTER_VALIDATE_EMAIL)) {
|
|
152
|
+
http_response_code(400);
|
|
153
|
+
echo json_encode(['error' => 'Invalid email']);
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
$user = $this->userService->create($email, $fullName, $password);
|
|
158
|
+
http_response_code(201);
|
|
159
|
+
echo json_encode($user);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
### Error Handling
|
|
167
|
+
|
|
168
|
+
- Define custom exception classes (`NotFoundException`, `ValidationException`, etc.).
|
|
169
|
+
- Register a global exception handler via `set_exception_handler()`.
|
|
170
|
+
- Never expose stack traces or internal paths to the client.
|
|
171
|
+
- Log errors to a file/syslog with a timestamp and context.
|
|
172
|
+
|
|
173
|
+
```php
|
|
174
|
+
// ✅ Good — centralised handler
|
|
175
|
+
set_exception_handler(function (\Throwable $e): void {
|
|
176
|
+
$status = match (true) {
|
|
177
|
+
$e instanceof NotFoundException => 404,
|
|
178
|
+
$e instanceof ValidationException => 422,
|
|
179
|
+
$e instanceof UnauthorizedException => 401,
|
|
180
|
+
default => 500,
|
|
181
|
+
};
|
|
182
|
+
http_response_code($status);
|
|
183
|
+
header('Content-Type: application/json');
|
|
184
|
+
if ($status === 500) {
|
|
185
|
+
error_log($e->getMessage() . ' ' . $e->getTraceAsString());
|
|
186
|
+
echo json_encode(['error' => 'Internal server error']);
|
|
187
|
+
} else {
|
|
188
|
+
echo json_encode(['error' => $e->getMessage()]);
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
---
|
|
194
|
+
|
|
195
|
+
### Autoloading
|
|
196
|
+
|
|
197
|
+
- Use **Composer autoload** (PSR-4) — no manual `require` chains.
|
|
198
|
+
- `composer.json` minimum:
|
|
199
|
+
|
|
200
|
+
```json
|
|
201
|
+
{
|
|
202
|
+
"autoload": {
|
|
203
|
+
"psr-4": {
|
|
204
|
+
"App\\": "src/"
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
## Naming Conventions
|
|
213
|
+
|
|
214
|
+
| Element | Convention | Example |
|
|
215
|
+
|---------|-----------|---------|
|
|
216
|
+
| Class | PascalCase | `UserService`, `OrderRepository` |
|
|
217
|
+
| Method | camelCase | `findById`, `createOrder` |
|
|
218
|
+
| Variable | camelCase | `$userId`, `$orderList` |
|
|
219
|
+
| Constant | UPPER_SNAKE_CASE | `MAX_LOGIN_ATTEMPTS` |
|
|
220
|
+
| DB table | snake_case | `user_orders` |
|
|
221
|
+
| DB column | snake_case | `created_at` |
|
|
222
|
+
| File | Matches class name | `UserService.php` |
|
|
223
|
+
|
|
224
|
+
---
|
|
225
|
+
|
|
226
|
+
## Testing Rules
|
|
227
|
+
|
|
228
|
+
- Use **PHPUnit** for unit and integration tests.
|
|
229
|
+
- Test class mirrors source path: `tests/Service/UserServiceTest.php`.
|
|
230
|
+
- Mock dependencies with `$this->createMock()` or a stub.
|
|
231
|
+
- Cover: happy path, validation errors, not-found cases.
|
|
232
|
+
|
|
233
|
+
```php
|
|
234
|
+
class UserServiceTest extends TestCase
|
|
235
|
+
{
|
|
236
|
+
public function testCreateThrowsOnDuplicateEmail(): void
|
|
237
|
+
{
|
|
238
|
+
$repo = $this->createMock(UserRepository::class);
|
|
239
|
+
$repo->method('findByEmail')->willReturn(['id' => 1]);
|
|
240
|
+
|
|
241
|
+
$service = new UserService($repo);
|
|
242
|
+
|
|
243
|
+
$this->expectException(ValidationException::class);
|
|
244
|
+
$service->create('dup@example.com', 'Test', 'password');
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
```
|
|
248
|
+
|
|
249
|
+
---
|
|
250
|
+
|
|
251
|
+
## Anti-Patterns to Avoid
|
|
252
|
+
|
|
253
|
+
- ❌ Raw SQL in controllers or views
|
|
254
|
+
- ❌ User input directly in SQL / HTML output
|
|
255
|
+
- ❌ Global `$_GET` / `$_POST` access outside the controller boundary
|
|
256
|
+
- ❌ `die()` / `exit()` for error handling — use exceptions
|
|
257
|
+
- ❌ Storing plain-text passwords
|
|
258
|
+
- ❌ `include`/`require` inside business logic — use autoloading
|
|
259
|
+
- ❌ Logic-heavy view files (`.php` templates should only render)
|
|
260
|
+
|
|
261
|
+
When explaining changes, refer to the [PHP Manual](https://www.php.net/manual) and [PSR standards](https://www.php-fig.org/psr/).
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Python AI System Prompt
|
|
2
|
+
|
|
3
|
+
You are an expert Python developer. Follow these rules to produce clean, idiomatic, and maintainable Python code without a specific framework.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Project Structure
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
project/
|
|
11
|
+
├── main.py # Entry point
|
|
12
|
+
├── src/
|
|
13
|
+
│ ├── service/ # Business logic
|
|
14
|
+
│ ├── repository/ # Data access layer
|
|
15
|
+
│ ├── model/ # Data classes / domain models
|
|
16
|
+
│ └── util/ # Pure helper functions
|
|
17
|
+
├── tests/ # Pytest suite
|
|
18
|
+
├── requirements.txt
|
|
19
|
+
└── pyproject.toml
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Python Rules
|
|
25
|
+
|
|
26
|
+
- Use **type hints** on all function signatures and return types.
|
|
27
|
+
- Follow **PEP 8** and keep functions small and single-purpose.
|
|
28
|
+
- Use **dataclasses** or **NamedTuple** for value objects; avoid plain dicts for structured data.
|
|
29
|
+
- Prefer **pathlib** over `os.path`; prefer `with` statements for file/resource handling.
|
|
30
|
+
- Raise specific exceptions — never `raise Exception("message")`.
|
|
31
|
+
|
|
32
|
+
```python
|
|
33
|
+
# ✅ Good
|
|
34
|
+
from dataclasses import dataclass
|
|
35
|
+
|
|
36
|
+
@dataclass
|
|
37
|
+
class UserRequest:
|
|
38
|
+
email: str
|
|
39
|
+
full_name: str
|
|
40
|
+
|
|
41
|
+
def create_user(request: UserRequest) -> UserResponse:
|
|
42
|
+
if not request.email:
|
|
43
|
+
raise ValueError("email is required")
|
|
44
|
+
...
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
---
|
|
48
|
+
|
|
49
|
+
## Testing Rules
|
|
50
|
+
|
|
51
|
+
- Use **Pytest** for all tests.
|
|
52
|
+
- Name test functions `test_<what>_<expected_outcome>`.
|
|
53
|
+
- Use `pytest.raises` to assert exceptions.
|
|
54
|
+
|
|
55
|
+
```python
|
|
56
|
+
def test_create_user_raises_when_email_is_empty():
|
|
57
|
+
with pytest.raises(ValueError, match="email is required"):
|
|
58
|
+
create_user(UserRequest(email="", full_name="Test"))
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## Naming Conventions
|
|
64
|
+
|
|
65
|
+
| Element | Convention | Example |
|
|
66
|
+
|---------|-----------|---------|
|
|
67
|
+
| Module/package | snake_case | `user_service.py` |
|
|
68
|
+
| Class | PascalCase | `UserService` |
|
|
69
|
+
| Function/variable | snake_case | `find_by_id`, `user_id` |
|
|
70
|
+
| Constant | UPPER_SNAKE_CASE | `MAX_RETRY` |
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## Common Anti-Patterns to Avoid
|
|
75
|
+
|
|
76
|
+
- ❌ Bare `except:` — always catch a specific exception type
|
|
77
|
+
- ❌ Mutable default arguments (`def f(x=[])`) — use `None` sentinel instead
|
|
78
|
+
- ❌ Global state — pass dependencies explicitly
|
|
79
|
+
- ❌ Returning `None` implicitly on error paths — raise or return a typed result
|
package/docs/common/AIFLOW.md
CHANGED
|
@@ -33,7 +33,7 @@ PM writes ticket on Backlog/Jira
|
|
|
33
33
|
▼
|
|
34
34
|
⛩️ GATE 4 — AI Self-Review [AI + DEV]
|
|
35
35
|
AI runs: verification + impact-analysis + checklist
|
|
36
|
-
AI generates summary
|
|
36
|
+
AI generates: task-summary.md
|
|
37
37
|
DEV reviews → "APPROVED" or "BUG: [description]"
|
|
38
38
|
│ APPROVED
|
|
39
39
|
▼
|
package/docs/common/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,48 @@ Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
## [0.0.8] - 2026-05-14
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **Short-hand CLI Command `ak`** — Added `ak` as an ultra-short alias for `aiflow` for faster developer workflow.
|
|
15
|
+
- **Command Aliases** — All major commands now have short aliases to reduce keystrokes:
|
|
16
|
+
- `init` → `i` · `use` → `u` · `prompt` → `p` · `detect` → `d` · `task` → `t` · `context` → `ctx`
|
|
17
|
+
- `checkpoint` → `cp` · `validate` → `vl` · `memory` → `mem` · `guide` → `g`
|
|
18
|
+
- `remove` → `rm` · `update` → `up` · `sync-skills` → `sync` · `doctor` → `dr` · `telemetry` → `tel`
|
|
19
|
+
- **`task` sub-command aliases**: `status` → `st` · `list` → `ls` · `pause` → `p` · `switch` → `sw` · `resume` → `r` · `reset` → `rst` · `remove` → `rm` · `next` → `n`
|
|
20
|
+
- **`memory` sub-command aliases**: `save` → `s` · `get` → `g` · `list` → `ls` · `search` → `sr` · `delete` → `d` · `clear` → `cl`
|
|
21
|
+
- **New short options**:
|
|
22
|
+
- `-v` short flag for `--version` at root (works alongside legacy `-V`)
|
|
23
|
+
- `init --fw <types>` — long alias for `--framework`
|
|
24
|
+
- `use -F/--fast`, `-U/--full`
|
|
25
|
+
- `prompt -L/--lang`, `-d/--detail`
|
|
26
|
+
- `validate -x/--fix`
|
|
27
|
+
- `context -l/--load`
|
|
28
|
+
- `checkpoint -g/--gate`, `-s/--step`, `-n/--tokens`
|
|
29
|
+
- `guide -f/--flow`, `-c/--commands`
|
|
30
|
+
- `remove -g/--global`
|
|
31
|
+
- `update -f/--force`
|
|
32
|
+
- **Enhanced Comment Loading Options** — Added granular control for fetching ticket comments in `ak use`:
|
|
33
|
+
- `-c` or `--coms` — Quick alias to load all comments.
|
|
34
|
+
- `--cid <id>` — Load a specific comment by its ID.
|
|
35
|
+
- `--clast <n>` — Load only the last N comments.
|
|
36
|
+
- `--cfrom <id>` — Load comments starting from a specific ID.
|
|
37
|
+
- `--cto <id>` — Load comments up to a specific ID.
|
|
38
|
+
- **Deprecation Warning** — Added a friendly suggestion to use `ak` when the legacy `aiflow` command is invoked, preparing for future deprecation.
|
|
39
|
+
|
|
40
|
+
### Fixed
|
|
41
|
+
|
|
42
|
+
- **Backlog Comment Pagination** — Fixed a critical bug where comments were not loading due to an invalid `offset` parameter in the Backlog API. Switched to `minId`-based pagination to ensure reliable and complete comment fetching.
|
|
43
|
+
- **Robust Comment Filtering** — Centralized comment filtering logic to effectively exclude metadata-only comments (changelogs) and focus on actual discussions.
|
|
44
|
+
|
|
45
|
+
### Changed
|
|
46
|
+
|
|
47
|
+
- **CLI Consistency** — Updated all command-line help descriptions and internal mappings to support the new shortened flags while maintaining backward compatibility with legacy long-form options.
|
|
48
|
+
- **Documentation Alignment** — Updated all guides (QUICK_START, cli-reference) to reflect `ak` command and new short aliases.
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
10
52
|
## [0.0.7] - 2026-05-08
|
|
11
53
|
|
|
12
54
|
### Added
|
|
@@ -33,18 +75,18 @@ Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
33
75
|
- **Robust Gate Detection** — Refactored `detectCurrentGate` to prioritize `task-state.json` as the source of truth for task progress.
|
|
34
76
|
- **`aiflow gate approved` CLI output** — Now prints a session-refresh tip to help users maintain clean AI contexts.
|
|
35
77
|
- **`aiflow update` efficiency** — Now automatically performs skill and instruction synchronization even if the version is unchanged (removes the need for `--force`).
|
|
36
|
-
- **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.
|
|
78
|
+
- **Safety First Development** — Removed all automatic `git commit` and `git add` instructions from key AI skills (`subagent-driven-development`, `using-git-worktrees`, `writing-plans`, `generate-spec`) to ensure developer-led commit management.
|
|
37
79
|
- **Localized CLI** — All interactive prompts and confirmation messages translated to English for consistency.
|
|
38
80
|
- **`aiflow init` RTK entry** — flag description updated to clarify RTK saves bash output tokens (60–90%).
|
|
39
81
|
- **`aiflow doctor`** — RTK section merged into new "Token savings" section.
|
|
40
|
-
- **README.md / QUICK_START.md** — Updated to reflect `sync-skills` and improved update flow.
|
|
82
|
+
- **README.md / QUICK_START.md / AIFLOW.md** — Updated to reflect session continuity workflow, `sync-skills` command, and improved update flow.
|
|
41
83
|
|
|
42
84
|
### Fixed
|
|
43
85
|
|
|
44
|
-
- **Automatic Git Commits Removed** —
|
|
86
|
+
- **Automatic Git Commits Removed** — Fully disabled automated version control actions across the entire Skill Registry. Developers now have full manual control over staging and commits, preventing unintended history pollution during AI implementation.
|
|
45
87
|
- **NestJS auto-detection** — `@nestjs/core` in `package.json` was incorrectly detected as `nodejs-express`; now correctly resolves to `nestjs`.
|
|
46
88
|
- **PHP project auto-detection** — Projects with `composer.json` but no Laravel dependency now correctly auto-detect as `php-plain` instead of being skipped.
|
|
47
|
-
- Fixed `.github/copilot-instructions.md` not being included in automated `.gitignore` rules.
|
|
89
|
+
- **Instruction Safety** — Fixed `.github/copilot-instructions.md` not being included in automated `.gitignore` rules.
|
|
48
90
|
|
|
49
91
|
---
|
|
50
92
|
|
|
@@ -209,7 +251,7 @@ Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
209
251
|
## How to upgrade
|
|
210
252
|
|
|
211
253
|
```bash
|
|
212
|
-
npm install -g ai-flow-kit@latest
|
|
254
|
+
npm install -g @relipa/ai-flow-kit@latest
|
|
213
255
|
aiflow --version
|
|
214
256
|
```
|
|
215
257
|
|
|
@@ -7,16 +7,16 @@
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
npm install -g ai-flow-kit
|
|
10
|
+
npm install -g @relipa/ai-flow-kit
|
|
11
11
|
|
|
12
12
|
# Beta version (recommend for newest features)
|
|
13
|
-
npm install -g ai-flow-kit@beta
|
|
13
|
+
npm install -g @relipa/ai-flow-kit@beta
|
|
14
14
|
|
|
15
15
|
# Verification
|
|
16
|
-
aiflow --version
|
|
16
|
+
aiflow --version # or short: aiflow -v
|
|
17
17
|
|
|
18
18
|
# Uninstall
|
|
19
|
-
npm uninstall -g ai-flow-kit
|
|
19
|
+
npm uninstall -g @relipa/ai-flow-kit
|
|
20
20
|
```
|
|
21
21
|
|
|
22
22
|
---
|
|
@@ -68,13 +68,13 @@ aiflow doctor
|
|
|
68
68
|
aiflow use PROJ-33
|
|
69
69
|
|
|
70
70
|
# Load with comments (recommended for bug-fix)
|
|
71
|
-
aiflow use PROJ-33
|
|
71
|
+
aiflow use PROJ-33 -c
|
|
72
72
|
|
|
73
73
|
# Load from Backlog URL
|
|
74
74
|
aiflow use https://mycompany.backlog.com/view/PROJ-33
|
|
75
75
|
|
|
76
76
|
# Load newest 5 comments
|
|
77
|
-
aiflow use PROJ-33 --
|
|
77
|
+
aiflow use PROJ-33 --clast 5
|
|
78
78
|
|
|
79
79
|
# Manual input (no Backlog/Jira)
|
|
80
80
|
aiflow use --manual
|
|
@@ -100,6 +100,31 @@ Output:
|
|
|
100
100
|
claude # AI auto-starts Gate 1 immediately
|
|
101
101
|
```
|
|
102
102
|
|
|
103
|
+
### Step 3: Approval & Session Refresh
|
|
104
|
+
|
|
105
|
+
After the AI finishes its task at any Gate (e.g., Gate 1 Requirement Analysis), and you are ready to move to the next gate:
|
|
106
|
+
|
|
107
|
+
1. Review the output.
|
|
108
|
+
2. Type **APPROVED** to finish the current gate.
|
|
109
|
+
3. Run **`aiflow task next`**. This command will:
|
|
110
|
+
- Finalize the current gate state.
|
|
111
|
+
- Generate a `task-summary.md` report.
|
|
112
|
+
- Prepare the task for the next stage.
|
|
113
|
+
4. **Important:** Open a **fresh chat session** (new chatbox) and type `continue` to start the next gate. This ensures the AI has a clean context.
|
|
114
|
+
|
|
115
|
+
### Step 4: Resume Task
|
|
116
|
+
|
|
117
|
+
If you switched tasks or started a new session:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
# Resume the most recent task
|
|
121
|
+
aiflow task resume
|
|
122
|
+
|
|
123
|
+
# Or resume a specific task
|
|
124
|
+
aiflow task resume PROJ-33
|
|
125
|
+
```
|
|
126
|
+
Then open Claude and the AI will auto-detect the current gate and resume exactly where you left off.
|
|
127
|
+
|
|
103
128
|
> **Note:** `aiflow prompt` is optional — only needed when pasting into Claude Desktop/Web.
|
|
104
129
|
>
|
|
105
130
|
> **Multi-Tool Support:**
|
|
@@ -331,62 +356,69 @@ claude # AI auto-starts: map dependencies → ass
|
|
|
331
356
|
|
|
332
357
|
## All Commands
|
|
333
358
|
|
|
359
|
+
> **Tip:** All commands support a short alias. Use `ak` instead of `aiflow` and the alias instead of the full command name (e.g. `ak t st` = `ak task status`).
|
|
360
|
+
|
|
334
361
|
```bash
|
|
335
362
|
# Setup
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
363
|
+
ak init --framework nestjs --adapter backlog # (ak i -f nestjs -a backlog)
|
|
364
|
+
ak init --fw spring-boot --with-rtk # --fw alias for --framework, RTK: bash compression (60–90%)
|
|
365
|
+
ak init --no-rtk # skip RTK setup
|
|
366
|
+
ak dr # health check (ak doctor)
|
|
367
|
+
ak g # multi-tool guide (ak guide)
|
|
368
|
+
ak g -f # architecture diagram (ak guide --flow)
|
|
369
|
+
ak g -c # command reference (ak guide --commands)
|
|
370
|
+
ak sync # sync aiflow instruction files (ak sync-skills)
|
|
344
371
|
|
|
345
372
|
# Per task
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
373
|
+
ak use PROJ-33 # load context (Fast Mode, default) — alias: ak u PROJ-33
|
|
374
|
+
ak use PROJ-33 -F # Fast Mode explicit (--fast)
|
|
375
|
+
ak use PROJ-33 -U # Full Mode (--full)
|
|
376
|
+
ak use -f task.md # load from local file (--file)
|
|
377
|
+
ak use PROJ-33 -c # load with all comments (--coms)
|
|
378
|
+
ak use PROJ-33 --clast 5 # newest 5 comments
|
|
379
|
+
ak use -m # manual input (--manual)
|
|
380
|
+
ak p bug-fix # generate prompt (ak prompt)
|
|
381
|
+
ak p feature -o p.md # save prompt to file (--output)
|
|
382
|
+
ak p -L vietnamese # Vietnamese prompt (--lang)
|
|
383
|
+
ak p -l # list prompt types (--list)
|
|
355
384
|
|
|
356
385
|
# Task management
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
386
|
+
ak t st # show active and pending tasks (ak task status)
|
|
387
|
+
ak t ls # list all saved tasks (ak task list)
|
|
388
|
+
ak t p # pause current task (ak task pause)
|
|
389
|
+
ak t p -n "waiting for PM" # pause with note (--note)
|
|
390
|
+
ak t sw PROJ-99 # switch to another task (ak task switch)
|
|
391
|
+
ak t r PROJ-33 # resume a paused task (ak task resume)
|
|
392
|
+
ak t rst PROJ-33 # reset to Gate 1 (ak task reset)
|
|
393
|
+
ak t rm PROJ-33 # permanently delete task data (ak task remove)
|
|
394
|
+
ak t n # approve gate & prep next session (ak task next)
|
|
364
395
|
|
|
365
396
|
# Context management
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
397
|
+
ak ctx show # view active context (ak context show)
|
|
398
|
+
ak ctx list # list saved contexts
|
|
399
|
+
ak ctx save my-snapshot # save named snapshot
|
|
400
|
+
ak ctx -l my-snapshot # load named snapshot (--load)
|
|
401
|
+
ak ctx clear # clear active context
|
|
371
402
|
|
|
372
403
|
# Team knowledge
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
404
|
+
ak mem s "key" "value" # save knowledge (ak memory save)
|
|
405
|
+
ak mem g "key" # retrieve (ak memory get)
|
|
406
|
+
ak mem sr "keyword" # search (ak memory search)
|
|
407
|
+
ak mem ls # list all (ak memory list)
|
|
408
|
+
ak mem d "key" # delete (ak memory delete)
|
|
409
|
+
ak mem cl # clear all (ak memory clear)
|
|
377
410
|
|
|
378
411
|
# Utilities
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
aiflow guide --flow # architecture diagram
|
|
383
|
-
aiflow guide --commands # command reference
|
|
412
|
+
ak vl src/File.java # validate code (ak validate)
|
|
413
|
+
ak vl src/File.java -x # validate and auto-fix (--fix)
|
|
414
|
+
ak d "description" # detect task type (ak detect)
|
|
384
415
|
|
|
385
416
|
# Maintenance
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
417
|
+
ak rm # remove from project (ak remove)
|
|
418
|
+
ak rm -g # uninstall globally (--global)
|
|
419
|
+
ak up # update to latest (ak update)
|
|
420
|
+
ak up -f # force update (--force)
|
|
421
|
+
npm uninstall -g @relipa/ai-flow-kit # standard npm uninstall
|
|
390
422
|
```
|
|
391
423
|
|
|
392
424
|
---
|
|
@@ -413,7 +445,7 @@ Access docs after install:
|
|
|
413
445
|
```bash
|
|
414
446
|
# Docs are in the package directory
|
|
415
447
|
npm root -g # find global packages directory
|
|
416
|
-
# → <path
|
|
448
|
+
# → <path>/@relipa/ai-flow-kit/AIFLOW.md, QUICK_START.md, etc.
|
|
417
449
|
|
|
418
450
|
# Or use the built-in guide
|
|
419
451
|
aiflow guide
|
|
@@ -425,7 +457,7 @@ aiflow guide
|
|
|
425
457
|
|
|
426
458
|
**`aiflow` not found:**
|
|
427
459
|
```bash
|
|
428
|
-
npm install -g ai-flow-kit
|
|
460
|
+
npm install -g @relipa/ai-flow-kit
|
|
429
461
|
```
|
|
430
462
|
|
|
431
463
|
**Incorrect credentials:**
|