@relipa/ai-flow-kit 0.2.0-beta.0 → 0.2.0-beta.2
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/bin/aiflow.js +64 -4
- package/custom/rules/output-language.md +36 -0
- package/custom/skills/automation-testing/SKILL.md +1 -1
- package/custom/skills/ba-skills/skill-ba-build-business-rules-v1.md +2 -0
- package/custom/skills/ba-skills/skill-ba-initial-analysis-template-v1.md +7 -5
- package/custom/skills/ba-skills/skill-ba-initial-analysis-v1.md +8 -1
- package/custom/skills/ba-skills/skill-ba-mermaid-flowchart-v1.md +2 -0
- package/custom/skills/ba-skills/skill-ba-qna-template-v1.md +6 -5
- package/custom/skills/ba-skills/skill-ba-qna-v1.md +19 -5
- package/custom/skills/ba-skills/skill-ba-ui-prototype-v1.md +2 -0
- package/custom/skills/ba-skills/skill-ba-write-uc-spec-v1.md +2 -0
- package/custom/skills/coverage-check/SKILL.md +2 -0
- package/custom/skills/create-system-requirement/SKILL.md +115 -33
- package/custom/skills/deploy-model/SKILL.md +2 -0
- package/custom/skills/design-experiment/SKILL.md +2 -0
- package/custom/skills/evaluate-model/SKILL.md +2 -0
- package/custom/skills/evidence-aggregation/SKILL.md +2 -0
- package/custom/skills/execute-flow/SKILL.md +2 -0
- package/custom/skills/explore-data/SKILL.md +2 -0
- package/custom/skills/frame-ml-problem/SKILL.md +2 -0
- package/custom/skills/gate-review/SKILL.md +2 -0
- package/custom/skills/generate-spec/SKILL.md +2 -0
- package/custom/skills/generate-test-report/SKILL.md +2 -0
- package/custom/skills/generate-testcase/SKILL.md +2 -0
- package/custom/skills/impact-analysis/SKILL.md +2 -0
- package/custom/skills/improve-algorithm/SKILL.md +2 -0
- package/custom/skills/ingest-data/SKILL.md +117 -3
- package/custom/skills/log-bug/SKILL.md +2 -0
- package/custom/skills/pr-impact-analysis/SKILL.md +2 -0
- package/custom/skills/read-study-requirement/SKILL.md +13 -7
- package/custom/skills/report-customer/SKILL.md +6 -2
- package/custom/skills/retest-orchestration/SKILL.md +2 -0
- package/custom/skills/review-plan/SKILL.md +2 -0
- package/custom/skills/script-sync/SKILL.md +1 -1
- package/custom/skills/test-analysis/SKILL.md +2 -0
- package/custom/skills/test-skills/rules/qa-writing-standards.md +2 -2
- package/custom/skills/train-model/SKILL.md +2 -0
- package/custom/templates/shared/create-spec-workflow.md +93 -31
- package/custom/templates/shared/create-testcase-workflow.md +32 -1
- package/custom/templates/shared/gate-workflow.md +15 -0
- package/docs/common/CHANGELOG.md +23 -0
- package/package.json +1 -1
- package/scripts/create-score-excel.js +4 -111
- package/scripts/init.js +24 -1
- package/scripts/link-resolver.js +101 -4
- package/scripts/task.js +25 -8
- package/scripts/ticket-writer.js +247 -0
- package/scripts/use.js +141 -0
|
@@ -73,6 +73,8 @@ An open-ended experiment loop with no stopping rule is out of scope for a gated
|
|
|
73
73
|
|
|
74
74
|
Write all of the above to `AK-Docs/04.Coding/02.Plans/[functionId]/[ticketId].md` (see `custom/rules/ml-conventions.md` — do NOT use the legacy `plan/[ticket-id]/` path). The document must be self-contained: a developer who did not attend the framing discussion should be able to reproduce the full experiment sequence from the plan alone.
|
|
75
75
|
|
|
76
|
+
Output language: auto-detect from the ticket/task input — see `custom/rules/output-language.md` (Vietnamese input → Vietnamese output; otherwise English).
|
|
77
|
+
|
|
76
78
|
---
|
|
77
79
|
|
|
78
80
|
## Completion Checklist
|
|
@@ -78,6 +78,8 @@ Output `AK-Docs/04.Coding/04.Reviews/[functionId]/[ticketId].md` (see `custom/ru
|
|
|
78
78
|
|
|
79
79
|
Draft a model card covering: intended use, training data description, evaluation metrics and their context, known limitations, and owner/contact.
|
|
80
80
|
|
|
81
|
+
Output language: auto-detect from the ticket/task input — see `custom/rules/output-language.md` (Vietnamese input → Vietnamese output; otherwise English).
|
|
82
|
+
|
|
81
83
|
---
|
|
82
84
|
|
|
83
85
|
## Completion Checklist
|
|
@@ -83,6 +83,8 @@ evidence/
|
|
|
83
83
|
|
|
84
84
|
Với mỗi TC, tạo `evidence/TC_[ID]-[scenario]/result.md`:
|
|
85
85
|
|
|
86
|
+
Ngôn ngữ output: auto-detect theo ngôn ngữ của ticket/testcase input — xem `custom/rules/output-language.md` và `custom/skills/test-skills/rules/qa-writing-standards.md` (input tiếng Việt → output tiếng Việt; ngược lại mặc định tiếng Anh; tiêu đề cột bảng vẫn giữ tiếng Anh).
|
|
87
|
+
|
|
86
88
|
**Template khi PASS:**
|
|
87
89
|
|
|
88
90
|
```markdown
|
|
@@ -213,6 +213,8 @@ Với mỗi TC:
|
|
|
213
213
|
|
|
214
214
|
Với `kebab-scenario` = Test Case Name lowercase, dấu cách thành `-`, bỏ ký tự đặc biệt.
|
|
215
215
|
|
|
216
|
+
Ngôn ngữ output: auto-detect theo ngôn ngữ của ticket/testcase input — xem `custom/rules/output-language.md` và `custom/skills/test-skills/rules/qa-writing-standards.md` (input tiếng Việt → output tiếng Việt; ngược lại mặc định tiếng Anh; tiêu đề cột bảng vẫn giữ tiếng Anh).
|
|
217
|
+
|
|
216
218
|
**Copy files từ Playwright output:**
|
|
217
219
|
- Screenshots → `step-NN-{desc}.png`
|
|
218
220
|
- Trace file → `trace.zip`
|
|
@@ -71,6 +71,8 @@ Write the EDA results into the `ml-problem.md` file created by `frame-ml-problem
|
|
|
71
71
|
- Leakage assessment — one paragraph per leakage type stating what was checked and what was found
|
|
72
72
|
- Cleaning actions required before training (drop columns, impute, clip outliers, re-encode)
|
|
73
73
|
|
|
74
|
+
Output language: auto-detect from the ticket/task input — see `custom/rules/output-language.md` (Vietnamese input → Vietnamese output; otherwise English).
|
|
75
|
+
|
|
74
76
|
---
|
|
75
77
|
|
|
76
78
|
## Completion Checklist
|
|
@@ -86,3 +86,5 @@ If any of the above cannot be answered from the ticket, ask exactly **one questi
|
|
|
86
86
|
- [ ] Success threshold quantified (not "as high as possible")
|
|
87
87
|
- [ ] Constraints listed (latency, memory, interpretability, data volume, compliance)
|
|
88
88
|
- [ ] Findings written to `AK-Docs/04.Coding/01.Requirements/[functionId]/[ticketId].md` (see `custom/rules/ml-conventions.md` — do NOT use the legacy `plan/[ticket-id]/` path)
|
|
89
|
+
|
|
90
|
+
Output language: auto-detect from the ticket/task input — see `custom/rules/output-language.md` (Vietnamese input → Vietnamese output; otherwise English).
|
|
@@ -57,6 +57,8 @@ When generating the output for a gate (e.g. `requirement.md` or `plan.md`), foll
|
|
|
57
57
|
### Step 2: Write the gate output file
|
|
58
58
|
Write the gate output file (e.g. `AK-Docs/04.Coding/01.Requirements/[functionId]/[ticketId].md`, `AK-Docs/04.Coding/02.Plans/[functionId]/[ticketId].md`, or `docs/ak-[project]/...`) as specified by the gate instructions.
|
|
59
59
|
|
|
60
|
+
Output language: auto-detect from the ticket/task input — see `custom/rules/output-language.md` (Vietnamese input → Vietnamese output; otherwise English).
|
|
61
|
+
|
|
60
62
|
### Step 3: Display gate pause message
|
|
61
63
|
|
|
62
64
|
Instruct the user to review the generated document. Tell them that they can hover over any line and add inline comments in VS Code using the native commenting UI, or edit the file to add standard HTML comments `<!-- comment -->` if they are not using the VS Code extension.
|
|
@@ -75,6 +75,8 @@ Create a detailed step-by-step plan based on the requirement document:
|
|
|
75
75
|
```
|
|
76
76
|
```
|
|
77
77
|
|
|
78
|
+
Output language: auto-detect from the ticket/task input — see `custom/rules/output-language.md` (Vietnamese input → Vietnamese output; otherwise English).
|
|
79
|
+
|
|
78
80
|
> For UI tasks, reference the exact node/component from `design-context.md` in the Task column
|
|
79
81
|
> (e.g. "Build UserCard — nodeId 78-910"). Add an image-copy task when the Image Map is non-empty.
|
|
80
82
|
>
|
|
@@ -61,6 +61,8 @@ Tổng hợp per module theo format template (R1/R2 tracking từ testcase files
|
|
|
61
61
|
|
|
62
62
|
Output: `test-plan/test-report.md`
|
|
63
63
|
|
|
64
|
+
Ngôn ngữ output: auto-detect theo ngôn ngữ của ticket/testcase input — xem `custom/rules/output-language.md` và `custom/skills/test-skills/rules/qa-writing-standards.md` (input tiếng Việt → output tiếng Việt; ngược lại mặc định tiếng Anh; tiêu đề cột bảng vẫn giữ tiếng Anh).
|
|
65
|
+
|
|
64
66
|
---
|
|
65
67
|
|
|
66
68
|
## Gate 4 Display
|
|
@@ -65,6 +65,8 @@ Xác định phạm vi ảnh hưởng thật từ code dev **trước khi** gene
|
|
|
65
65
|
|
|
66
66
|
Liệt kê scenarios theo nhóm, output vào `test-plan/checklist.md`:
|
|
67
67
|
|
|
68
|
+
Ngôn ngữ output: auto-detect theo ngôn ngữ của ticket/testcase input — xem `custom/rules/output-language.md` và `custom/skills/test-skills/rules/qa-writing-standards.md` (input tiếng Việt → output tiếng Việt; ngược lại mặc định tiếng Anh; tiêu đề cột bảng vẫn giữ tiếng Anh).
|
|
69
|
+
|
|
68
70
|
| ID | Scenario/Checklist Item | Mục đích kiểm tra | Expected Result |
|
|
69
71
|
|
|
70
72
|
**Nhóm cần cover:**
|
|
@@ -91,6 +91,8 @@ List all:
|
|
|
91
91
|
[Specific points QA should pay attention to]
|
|
92
92
|
```
|
|
93
93
|
|
|
94
|
+
Output language: auto-detect from the ticket/task input — see `custom/rules/output-language.md` (Vietnamese input → Vietnamese output; otherwise English).
|
|
95
|
+
|
|
94
96
|
---
|
|
95
97
|
|
|
96
98
|
## Completion Checklist
|
|
@@ -61,6 +61,8 @@ Revert if it does not satisfy the above. Log the failure reason; failed experime
|
|
|
61
61
|
|
|
62
62
|
Repeat steps 3–5 for the next bottleneck. Log every attempt — including reversions — so the improvement story is fully reproducible. The final state must be explainable: "we tried X (failed because Y), then tried Z (improved metric by W%)."
|
|
63
63
|
|
|
64
|
+
Output language: auto-detect from the ticket/task input — see `custom/rules/output-language.md` (Vietnamese input → Vietnamese output; otherwise English).
|
|
65
|
+
|
|
64
66
|
---
|
|
65
67
|
|
|
66
68
|
## Completion Checklist
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ingest-data
|
|
3
|
-
description: Use when taskType is "ingest-data" — PM/BrSE/Comtor ingesting customer communication (Backlog ticket/comment/Document/Wiki link, Jira link, SharePoint link, or pasted text) into AK-Docs/01.QnA/ logs. Covers fetching the source, classifying it into QnA-Log/Meetings-Log/Confirmations-Log,
|
|
4
|
-
keywords: ingest data, comtor, brse, pm workflow, meeting minutes, qna log, confirmations log, backlog document, backlog wiki, sharepoint, gate 1, gate 2
|
|
3
|
+
description: Use when taskType is "ingest-data" — PM/BrSE/Comtor ingesting customer communication (Backlog ticket/comment/Document/Wiki link, Jira link, SharePoint link, or pasted text) into AK-Docs/01.QnA/ logs. Covers fetching the source, classifying it into QnA-Log/Meetings-Log/Confirmations-Log, drafting the entry for self-review before Gate 2 opens the MR, and — auto right after Gate 2 — analyzing the entry to propose a PM-approved task list that gets created as real Backlog/Jira tickets.
|
|
4
|
+
keywords: ingest data, comtor, brse, pm workflow, meeting minutes, qna log, confirmations log, backlog document, backlog wiki, sharepoint, gate 1, gate 2, gate 3, sinh task, tạo ticket
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Ingest Data — Gate 1 (fetch/classify/draft)
|
|
@@ -16,7 +16,7 @@ keywords: ingest data, comtor, brse, pm workflow, meeting minutes, qna log, conf
|
|
|
16
16
|
| Input | Cách xử lý |
|
|
17
17
|
|---|---|
|
|
18
18
|
| Backlog ticket link (`/view/PROJ-N`) hoặc comment (`#comment-N`) | `ak fetch-links "<url>"` → JSON `{ sourceType: "ticket" \| "comment", ... }` |
|
|
19
|
-
| Backlog Document link (`/document/{id}
|
|
19
|
+
| Backlog Document link (`/document/{id}`, `/alias/document/{id}`, hoặc share link mới `/document/{PROJECT_KEY}/e/{id}`) | `ak fetch-links "<url>"` → JSON `{ sourceType: "document" \| "document-comment", ... }`. Đã xác nhận hoạt động live (2026-08-06) cho document body (`title`/`content`). ⚠️ Fetch comment trên Document (`document-comment`) vẫn chưa xác minh trên space thật — nếu lệnh trả lỗi HTTP 404 hoặc `content` rỗng, báo lại cho người dùng, đây là dấu hiệu endpoint/field cần điều chỉnh, không phải lỗi ở phía bạn. |
|
|
20
20
|
| Backlog Wiki link (`/alias/wiki/{id}`) | `ak fetch-links "<url>"` → JSON `{ sourceType: "wiki", ... }` |
|
|
21
21
|
| Jira ticket/comment link | `ak fetch-links "<url>"` → JSON `{ sourceType: "ticket" \| "comment", ... }` |
|
|
22
22
|
| SharePoint link (`*.sharepoint.com`) | `ak fetch-links "<url>"` → `{ sourceType: "unsupported", reason: "sharepoint-not-configured" }`. **Không có connector** (cần Microsoft Graph API + OAuth, xem PM Workflow doc "Vấn đề 4" — chưa làm POC). Hiển thị `message` trong JSON cho người dùng, và đề nghị: "Paste trực tiếp nội dung comment/tài liệu vào chat, mình sẽ dùng luôn." |
|
|
@@ -110,3 +110,117 @@ Sau khi fetch + phân loại, soạn đúng 1 entry theo template tương ứng
|
|
|
110
110
|
**Không tự ghi file, không tự tạo branch** ở bước này — chỉ hiển thị draft trong hội thoại. Việc ghi file + branch + MR chỉ chạy ở Gate 2, sau khi người dùng gõ **APPROVED**.
|
|
111
111
|
|
|
112
112
|
Nếu người dùng yêu cầu sửa (thêm/bớt ý, đổi log đích, sửa functionId...) → cập nhật lại draft, hiển thị lại toàn bộ, chờ APPROVED lại — lặp cho tới khi được duyệt.
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## 5. Gate 3 — Sinh & Duyệt Task List, Tạo Ticket (auto, ngay sau Gate 2)
|
|
117
|
+
|
|
118
|
+
> Implement "Vấn đề 5" trong `docs/internal/PM Workflow_v1.0.md`. **Trigger đã chốt: TỰ ĐỘNG** — chạy ngay tiếp theo Gate 2 (MR ingest vừa mở xong), không cần lệnh riêng, không chờ PM merge MR trước (merge MR là việc của PM ở luồng riêng, không block bước này).
|
|
119
|
+
> Gate mechanics chi tiết (khi nào gọi lệnh nào) nằm ở `custom/templates/shared/gate-workflow.md` § "ingest-data Task Type" → GATE 3. File này chỉ mô tả **cách phân tích và đề xuất**.
|
|
120
|
+
|
|
121
|
+
### 5.1 Bước 1 — Đọc lại entry + điều tra phạm vi ảnh hưởng
|
|
122
|
+
|
|
123
|
+
Đọc lại đúng entry vừa ghi ở Gate 2 (Meetings-Log.md / QnA-Log.md / Confirmations-Log.md — nguyên văn nội dung người dùng đã input ở Gate 1, không phải bản tóm tắt). Sau đó:
|
|
124
|
+
|
|
125
|
+
1. Xác định `functionId` liên quan (đã có trong entry, hoặc `general`).
|
|
126
|
+
2. Đọc source code + tài liệu hiện có liên quan đến `functionId` đó (UC Spec ở `AK-Docs/02.BA-Specs/04.UC-Specs/[functionId]/`, code trong repo source, `AK-Docs/04.Coding/00.Overview/_Index.md`) để hiểu **hệ thống hiện tại đang làm gì**, từ đó đánh giá nội dung mới vừa ingest tác động tới đâu.
|
|
127
|
+
3. Nếu nội dung có Action items rõ ràng trong template Meeting Minutes (mục 3.2) — đây là gợi ý mạnh cho danh sách task, không bỏ qua.
|
|
128
|
+
|
|
129
|
+
### 5.2 Bước 2 — Quyết định: có cần task hay không
|
|
130
|
+
|
|
131
|
+
**Không phải mọi entry đều sinh ra task.** Trước khi đề xuất bất kỳ task nào, tự hỏi: nội dung này có yêu cầu một hành động cụ thể (thay đổi spec, code, test, tài liệu...) hay chỉ là thông tin tham khảo/FYI (cập nhật tiến độ, thông tin không đổi hành vi hệ thống, trả lời một câu hỏi đã đóng)?
|
|
132
|
+
|
|
133
|
+
- **Chỉ là tham khảo** → hiển thị: `ℹ️ Nội dung này không phát sinh task — chỉ lưu làm tài liệu tham khảo. Gate 3 kết thúc.` rồi chạy `ak gate 3 skip --ticket [ticket-id] --reason "<1 câu lý do>"` (không cần `ak gate 3 start` trước) và dừng, không hỏi thêm. Việc này đóng gate đúng cách — dashboard (ai-flow-ex) hiển thị "⏭ Gate 3 skipped — \<lý do\>" thay vì để task treo mãi ở trạng thái "sẵn sàng chạy Gate 3".
|
|
134
|
+
- **Có hành động cụ thể** → tiếp tục Bước 3. Khi không chắc (ví dụ nội dung vừa có FYI vừa có 1 ý cần sửa code) — nghiêng về đề xuất task cho phần cần hành động, bỏ qua phần FYI, không tự bịa task cho phần không rõ.
|
|
135
|
+
|
|
136
|
+
### 5.3 Bước 3 — Đề xuất danh sách task
|
|
137
|
+
|
|
138
|
+
Mỗi task gồm:
|
|
139
|
+
|
|
140
|
+
| Trường | Ghi chú |
|
|
141
|
+
|---|---|
|
|
142
|
+
| `type` | `spec` (tạo/update UC Spec) · `coding` · `test` · `other` (update tài liệu không thuộc BA/QA/Dev, vd Rules) |
|
|
143
|
+
| `title` | Ngắn, hành động rõ (vd "Cập nhật flow OTP theo feedback khách — tăng thời hạn 30s → 90s") |
|
|
144
|
+
| `track` | BA / Dev / QA — để PM biết ai sẽ nhận task này |
|
|
145
|
+
| `description` | Theo đúng template mục 6.1 `PM Workflow_v1.0.md`: |
|
|
146
|
+
|
|
147
|
+
```text
|
|
148
|
+
## Nội dung task
|
|
149
|
+
[Mô tả task do AI đề xuất]
|
|
150
|
+
|
|
151
|
+
## Nguồn tham chiếu
|
|
152
|
+
- Văn bản gốc: [<mô tả ngắn>](<url hoặc "pasted text">)
|
|
153
|
+
- Log AK-Docs: AK-Docs/01.QnA/[QnA-Log.md | Meetings-Log.md | Confirmations-Log.md] (entry ngày <ngày>)
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Riêng task `type: "spec"` — thêm 2 mục bắt buộc theo mục 6.1, và **hỏi PM xin link hồ sơ cam kết thay đổi nếu chưa có sẵn** (không tự suy luận):
|
|
157
|
+
|
|
158
|
+
```text
|
|
159
|
+
## Tổng quan nội dung thay đổi
|
|
160
|
+
[Tóm tắt: thay đổi gì, vì sao thay đổi]
|
|
161
|
+
|
|
162
|
+
## Nguồn tham chiếu
|
|
163
|
+
- Hồ sơ cam kết thay đổi: [<mô tả ngắn>](<URL do PM cung cấp>)
|
|
164
|
+
- Log AK-Docs (nếu có): AK-Docs/01.QnA/Meetings-Log.md (entry ngày <ngày>)
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
Hiển thị toàn bộ danh sách cho PM xem — đủ cả `type`/`title`/`track`/`description`, không tóm tắt.
|
|
168
|
+
|
|
169
|
+
### 5.4 Bước 4 — PM review, sửa trực tiếp trong hội thoại
|
|
170
|
+
|
|
171
|
+
PM có thể **thêm / sửa / xoá từng task** ngay trong lượt review này (không phải chỉ APPROVED/reject toàn bộ) — cập nhật lại danh sách theo đúng yêu cầu, hiển thị lại toàn bộ, lặp lại cho tới khi PM hài lòng. Task nào type là `spec` mà thiếu "Nguồn tham chiếu" (hồ sơ cam kết thay đổi) → coi như chưa đủ điều kiện, phải hỏi PM bổ sung trước khi cho vào vòng xác nhận tạo ticket ở Bước 5.
|
|
172
|
+
|
|
173
|
+
### 5.5 Bước 5 — Điểm dừng xác nhận tạo ticket
|
|
174
|
+
|
|
175
|
+
Hỏi đúng 1 câu, không tự thêm `--yes`:
|
|
176
|
+
|
|
177
|
+
```text
|
|
178
|
+
Danh sách task như trên (N task) — đồng ý tạo trên [Backlog/Jira]?
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
- Xác định target `backlog`/`jira` theo đúng adapter của ticket/document gốc đã ingest ở Gate 1/2 (Backlog → target backlog; Jira → target jira). Nếu nguồn là pasted text/SharePoint (không rõ adapter) → hỏi PM muốn tạo trên hệ thống nào.
|
|
182
|
+
- **KHÔNG ĐỒNG Ý** → dừng, để PM tự chỉnh sửa rồi yêu cầu lại (quay lại Bước 4).
|
|
183
|
+
- **ĐỒNG Ý** → sang Bước 6.
|
|
184
|
+
|
|
185
|
+
### 5.6 Bước 6 — Xác định project đích
|
|
186
|
+
|
|
187
|
+
Check LOCAL trước, chỉ hỏi khi thật sự chưa biết (Vấn đề 5.1):
|
|
188
|
+
|
|
189
|
+
1. Backlog: kiểm tra `BACKLOG_DEFAULT_PROJECT_ID` đã lưu chưa (chạy `ak backlog-projects --json`, đọc field `defaultProjectId`). Jira: `ak jira-projects --json`, đọc `defaultProjectKey`.
|
|
190
|
+
2. Đã có → dùng luôn, hiển thị rõ cho PM biết đang dùng project nào + nguồn (đã lưu từ lần trước).
|
|
191
|
+
3. Chưa có → hiển thị danh sách project vừa fetch được, PM chọn 1 → lưu lại bằng `ak backlog-set-default-project <id> <key>` hoặc `ak jira-set-default-project <key>` — để lần sau không hỏi lại.
|
|
192
|
+
|
|
193
|
+
### 5.7 Bước 7 — Tạo ticket
|
|
194
|
+
|
|
195
|
+
1. Ghi danh sách task đã duyệt ra 1 file JSON tạm (vd `.aiflow/tmp/tasks-[ticketId].json`), đúng shape mà `ak tasks create-tickets` đọc (xem `scripts/ticket-writer.js`):
|
|
196
|
+
```json
|
|
197
|
+
{
|
|
198
|
+
"target": "backlog",
|
|
199
|
+
"tasks": [
|
|
200
|
+
{ "type": "coding", "title": "...", "description": "..." }
|
|
201
|
+
]
|
|
202
|
+
}
|
|
203
|
+
```
|
|
204
|
+
2. Chạy `ak tasks create-tickets <file> --json`.
|
|
205
|
+
3. Đọc kết quả JSON trả về:
|
|
206
|
+
- `{"error":"missing-write-credentials", "field": "...", "message": "..."}` → **đây không phải lỗi hệ thống** — hiển thị đúng `message` cho PM, hỏi PM nhập giá trị key ngay trong hội thoại (dùng luôn khung chat làm nơi PM "nhập & submit"), nhận giá trị → chạy `ak credentials set <field> "<giá trị PM vừa nhập>"` → chạy lại bước 2 (retry đúng 1 lần; nếu vẫn lỗi, báo PM key có thể sai/chưa đủ quyền, không tự thử lại vô hạn).
|
|
207
|
+
- `{"error":"missing-project", ...}` → quay lại Bước 6 (chưa xác định được project).
|
|
208
|
+
- Thành công (`ok: true`) → mỗi task có `ticketId` + `url` riêng; task nào `ok: false` (lỗi phía Backlog/Jira, vd thiếu field) → báo rõ cho PM, các task khác đã tạo vẫn giữ nguyên (không rollback).
|
|
209
|
+
|
|
210
|
+
### 5.8 Bước 8 — Ghi ngược liên kết + đóng Gate
|
|
211
|
+
|
|
212
|
+
1. Append vào cuối đúng entry gốc (Meetings-Log/QnA-Log/Confirmations-Log) 1 dòng:
|
|
213
|
+
```text
|
|
214
|
+
→ Tasks created: TICKET-101 (coding), TICKET-102 (test)
|
|
215
|
+
```
|
|
216
|
+
Việc sửa file này đi qua đúng branch đang dùng ở Gate 2 (không tạo MR riêng — gộp vào cùng thay đổi, hoặc nếu MR đã mở/merge thì tạo 1 commit nhỏ tiếp theo trên cùng branch/1 MR mới tuỳ trạng thái branch lúc đó).
|
|
217
|
+
2. Hiển thị tổng kết:
|
|
218
|
+
```text
|
|
219
|
+
✅ GATE 3 DONE — Đã tạo N/N ticket trên [Backlog/Jira]:
|
|
220
|
+
- TICKET-101 (coding) — <url>
|
|
221
|
+
- TICKET-102 (test) — <url>
|
|
222
|
+
→ Dev/QA chạy `ak use TICKET-XXX` trên từng ticket để bắt đầu Gate tương ứng (Coding/QA workflow hiện có).
|
|
223
|
+
```
|
|
224
|
+
3. Run: `ak gate 3 approved --ticket [ticket-id]`.
|
|
225
|
+
|
|
226
|
+
> **Telemetry:** Run `ak gate 3 start --ticket [ticket-id]` khi bắt đầu Bước 1 (bỏ qua nếu Bước 2 kết luận không cần task — không start gate cho trường hợp "chỉ tham khảo"). Run `ak gate 3 approved --ticket [ticket-id]` khi Bước 8 xong, HOẶC `ak gate 3 skip --ticket [ticket-id] --reason "..."` khi Bước 2 kết luận không cần task (thay cho việc không đóng gate — xem Bước 2).
|
|
@@ -44,6 +44,8 @@ Thu thập ngay khi test fail:
|
|
|
44
44
|
**File naming:** `bugs/BUG-[số thứ tự 3 chữ số]-[tên ngắn kebab-case].md`
|
|
45
45
|
**Ví dụ:** `bugs/BUG-001-login-button-not-disabled-on-submit.md`
|
|
46
46
|
|
|
47
|
+
Ngôn ngữ output: auto-detect theo ngôn ngữ của ticket/testcase input — xem `custom/rules/output-language.md` và `custom/skills/test-skills/rules/qa-writing-standards.md` (input tiếng Việt → output tiếng Việt; ngược lại mặc định tiếng Anh; tiêu đề cột bảng vẫn giữ tiếng Anh).
|
|
48
|
+
|
|
47
49
|
**Dùng template bên dưới.**
|
|
48
50
|
|
|
49
51
|
### Bước 4 — Thông báo TESTER
|
|
@@ -142,6 +142,8 @@ Ngoài TCs gốc của feature, cần test thêm:
|
|
|
142
142
|
| Verify Admin User list không bị cache stale | Shared service thay đổi |
|
|
143
143
|
```
|
|
144
144
|
|
|
145
|
+
Ngôn ngữ output: auto-detect theo ngôn ngữ của ticket/task input — xem `custom/rules/output-language.md` (input tiếng Việt → output tiếng Việt; ngược lại mặc định tiếng Anh).
|
|
146
|
+
|
|
145
147
|
---
|
|
146
148
|
|
|
147
149
|
## Guard Rails (bắt buộc)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: read-study-requirement
|
|
3
|
-
description: Gate 1 — AI reads ticket from Backlog/Jira + reads source code, then uses collaborative Q&A and solution proposal. Adds impact analysis and effort estimate. Outputs requirement.md for DEV to approve.
|
|
3
|
+
description: Gate 1 — AI reads ticket from Backlog/Jira + reads source code, then uses collaborative Q&A and solution proposal. Adds impact analysis and effort estimate. Outputs requirement.md for DEV to approve. Checks that System Requirement (bridged from UC Spec via `create-system-requirement`) exists and matches the current UC Spec version — shows a non-blocking ⚠️ warning and continues otherwise.
|
|
4
4
|
keywords: ticket, requirement, study, read, context, backlog, jira, analyze, understand, solution, estimate, system requirement, uc spec
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -12,16 +12,20 @@ keywords: ticket, requirement, study, read, context, backlog, jira, analyze, und
|
|
|
12
12
|
|
|
13
13
|
---
|
|
14
14
|
|
|
15
|
-
## Step 0: System Requirement
|
|
15
|
+
## Step 0: System Requirement Check (Pre-flight, non-blocking warning — runs before Mode Selection)
|
|
16
16
|
|
|
17
|
-
Before reading the ticket in depth, verify the bridge document from UC Spec
|
|
17
|
+
Before reading the ticket in depth, verify the bridge document from UC Spec — this applies to **every mode**, including Fast Track (it's a 2-file header check, not a heavy investigation). **This check never cancels Gate 1** — any gap only produces a ⚠️ yellow warning; Gate 1 always continues with whatever context is available:
|
|
18
18
|
|
|
19
19
|
1. Resolve `functionId` from `.aiflow/context/current.json` (or ask DEV once if absent).
|
|
20
20
|
2. Locate the current UC Spec: `AK-Docs/02.BA-Specs/04.UC-Specs/[functionId]/UC-Spec_v{N}.md` (highest non-archived version).
|
|
21
|
-
- **Not found** →
|
|
21
|
+
- **Not found** → `⚠️ CẢNH BÁO: Không tìm thấy UC Spec cho [functionId] — Gate 1 tiếp tục chỉ dựa trên ticket/source code, thiếu ngữ cảnh nghiệp vụ BA đã chốt.` Continue to step 3.
|
|
22
22
|
3. Check `AK-Docs/02.BA-Specs/00.Requirements/[functionId]/System-Requirement_v*.md`:
|
|
23
|
-
- **Missing
|
|
24
|
-
- **Exists
|
|
23
|
+
- **Missing** → `⚠️ CẢNH BÁO: Không tìm thấy System Requirement cho [functionId]. Khuyến nghị chạy "ak use" → "📐 Create System Requirement" trước ticket kế tiếp — Gate 1 vẫn tiếp tục ngay bây giờ dựa trên UC Spec/ticket.`
|
|
24
|
+
- **Exists, but its `UC-Spec-Version` header doesn't match the UC Spec found in step 2** → `⚠️ CẢNH BÁO: System Requirement đang trace theo UC Spec v[X], UC Spec hiện tại là v[Y] — nội dung có thể lỗi thời.` Treat its items as Assumption rather than Fact in Step 1.75.
|
|
25
|
+
- **Exists, matches, but its `Status` header is not `✅ Approved`** → `⚠️ CẢNH BÁO: System Requirement cho [functionId] chưa Approved (Status: [giá trị hiện tại]) — nội dung có thể còn thay đổi.`
|
|
26
|
+
- **Exists, matches, and Approved** → continue silently. Keep this file's path — Step 1 must read it as mandatory input.
|
|
27
|
+
|
|
28
|
+
Any warning raised above must also be written into this ticket's requirement doc (Section 1, Facts/Assumptions/Gaps in Step 4) — not just printed and forgotten. If DEV wants the gap closed properly, they can run `ak use` → "📐 Create System Requirement" for `[functionId]` at any point (before or after this ticket) — it's a separate 2-gate task type, not an inline sub-skill here.
|
|
25
29
|
|
|
26
30
|
---
|
|
27
31
|
|
|
@@ -88,6 +92,8 @@ When creating `AK-Docs/04.Coding/04.Reviews/[functionId]/[ticketId].md` during G
|
|
|
88
92
|
| **Total** | **S/M/L** |
|
|
89
93
|
```
|
|
90
94
|
|
|
95
|
+
Output language: auto-detect from the ticket/task input — see `custom/rules/output-language.md` (Vietnamese input → Vietnamese output; otherwise English).
|
|
96
|
+
|
|
91
97
|
5. Display Gate 1 prompt and wait for `APPROVED`.
|
|
92
98
|
|
|
93
99
|
> After APPROVED, proceed to Gate 2.
|
|
@@ -466,7 +472,7 @@ Please review the requirement document.
|
|
|
466
472
|
|
|
467
473
|
## Mandatory Rules
|
|
468
474
|
|
|
469
|
-
- ✅ **MUST** verify System Requirement exists and matches the current UC Spec version (Step 0) before proceeding —
|
|
475
|
+
- ✅ **MUST** verify System Requirement exists and matches the current UC Spec version (Step 0) before proceeding — show a ⚠️ non-blocking warning and continue otherwise (never cancels Gate 1); record the gap in the requirement doc (Step 4).
|
|
470
476
|
- ✅ **MUST** read System Requirement as mandatory input (Step 1) — not optional context.
|
|
471
477
|
- ❌ **DO NOT** restate content already covered in System Requirement — reference its item ID instead.
|
|
472
478
|
- ❌ **DO NOT** silently accept ticket scope that doesn't trace to System Requirement or UC Spec (Step 3.5) — stop and ask instead of guessing.
|
|
@@ -31,7 +31,11 @@ Fill in the structure below. **Use simple language, avoiding technical jargon.**
|
|
|
31
31
|
|
|
32
32
|
---
|
|
33
33
|
|
|
34
|
-
## Standard Structure
|
|
34
|
+
## Standard Structure
|
|
35
|
+
|
|
36
|
+
Output language: auto-detect from the ticket/task input — see `custom/rules/output-language.md`
|
|
37
|
+
(Vietnamese ticket → Vietnamese report; otherwise English). CS can request a specific language
|
|
38
|
+
explicitly, which overrides auto-detect. Structure below is shown in English.
|
|
35
39
|
|
|
36
40
|
```markdown
|
|
37
41
|
## 📋 Incident Verification Report
|
|
@@ -92,4 +96,4 @@ If problems persist, please contact our support hotline..."]
|
|
|
92
96
|
- ❌ Do not blame third parties unless certain
|
|
93
97
|
- ❌ Do not commit to specific deadlines unless certain
|
|
94
98
|
|
|
95
|
-
Present clearly and professionally
|
|
99
|
+
Present clearly and professionally, in the language determined above.
|
|
@@ -84,6 +84,8 @@ BASE_URL=<baseUrl> npx playwright test --grep "AD10_002|AD10_005" --headed
|
|
|
84
84
|
|
|
85
85
|
Invoke `evidence-aggregation` skill cho RETEST results:
|
|
86
86
|
|
|
87
|
+
Ngôn ngữ output: auto-detect theo ngôn ngữ của ticket/testcase input — xem `custom/rules/output-language.md` và `custom/skills/test-skills/rules/qa-writing-standards.md` (input tiếng Việt → output tiếng Việt; ngược lại mặc định tiếng Anh; tiêu đề cột bảng vẫn giữ tiếng Anh).
|
|
88
|
+
|
|
87
89
|
**Không xóa evidence cũ** — tạo subfolder theo run:
|
|
88
90
|
|
|
89
91
|
```
|
|
@@ -143,6 +143,8 @@ Create file `AK-Docs/04.Coding/04.Reviews/[functionId]/[ticketId].md`:
|
|
|
143
143
|
**Breaking changes:** None / [description if any]
|
|
144
144
|
```
|
|
145
145
|
|
|
146
|
+
Output language: auto-detect from the ticket/task input — see `custom/rules/output-language.md` (Vietnamese input → Vietnamese output; otherwise English).
|
|
147
|
+
|
|
146
148
|
### Step 2.5: Retrospect + propose memory drafts
|
|
147
149
|
|
|
148
150
|
Synthesize what was learned this task. **Priority order — human corrections first:** if this is a repeat pass through Gate 4 (the developer already sent "BUG: ..." at least once this task), the developer's own correction is the single highest-value lesson — scan back through this session for it and draft it even if you already drafted something for the earlier BUG at Step 4 (dedup will catch an exact repeat; don't skip capturing it out of caution). Only after that, add anything else genuinely new: architecture facts discovered, decisions made and why. For each candidate, create a **local draft** (no approval needed yet — `_pending/` is local-only, doc `docs/common/Memory-Architecture-v1.0.md`):
|
|
@@ -205,4 +205,4 @@ Trả về danh sách kết quả cho `execute-flow`:
|
|
|
205
205
|
- ❌ **Không overwrite** test block có hash match — skip hoàn toàn
|
|
206
206
|
- ✅ Ưu tiên locator: `getByRole` > `getByLabel` > `getByPlaceholder` > `getByText` > `getByTestId` > CSS
|
|
207
207
|
- ✅ Không tạo lại `BasePage.ts` / `fixtures/test.ts` nếu đã tồn tại
|
|
208
|
-
- ✅
|
|
208
|
+
- ✅ Test names/comments theo ngôn ngữ của TC input (xem `custom/rules/output-language.md`) — TC tiếng Việt → tiếng Việt, TC tiếng Anh → tiếng Anh
|
|
@@ -107,6 +107,8 @@ Dựa trên ticket/description, phân tích:
|
|
|
107
107
|
|
|
108
108
|
Tạo `test-plan/test-analysis.md`:
|
|
109
109
|
|
|
110
|
+
Ngôn ngữ output: auto-detect theo ngôn ngữ của ticket/testcase input — xem `custom/rules/output-language.md` và `custom/skills/test-skills/rules/qa-writing-standards.md` (input tiếng Việt → output tiếng Việt; ngược lại mặc định tiếng Anh; tiêu đề cột bảng vẫn giữ tiếng Anh).
|
|
111
|
+
|
|
110
112
|
```markdown
|
|
111
113
|
# Test Analysis: [Ticket ID / Feature Name]
|
|
112
114
|
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
|
|
9
9
|
## 1. Ngôn ngữ & văn phong
|
|
10
10
|
|
|
11
|
-
-
|
|
12
|
-
- **Tiêu đề cột của bảng (checklist, testcase) viết bằng tiếng Anh** theo quy ước team
|
|
11
|
+
- Ngôn ngữ nội dung mô tả/diễn giải **auto-detect theo ngôn ngữ của ticket/input** — xem `custom/rules/output-language.md`: input tiếng Việt → viết tiếng Việt (mặc định trước đây); input tiếng Anh → viết tiếng Anh.
|
|
12
|
+
- **Tiêu đề cột của bảng (checklist, testcase) luôn viết bằng tiếng Anh** theo quy ước team, bất kể ngôn ngữ nội dung ô; **nội dung trong ô theo ngôn ngữ đã xác định ở trên**.
|
|
13
13
|
- Thuật ngữ kỹ thuật/test có thể giữ tiếng Anh trong ngoặc khi cần (vd: kiểm thử biên (boundary)).
|
|
14
14
|
- Viết ngắn gọn, rõ ràng, không lan man. Ưu tiên gạch đầu dòng và bảng.
|
|
15
15
|
|
|
@@ -49,6 +49,8 @@ Log the following to MLflow or wandb for every run:
|
|
|
49
49
|
|
|
50
50
|
Do not leave runs unnamed or untracked.
|
|
51
51
|
|
|
52
|
+
Output language: auto-detect from the ticket/task input — see `custom/rules/output-language.md` (Vietnamese input → Vietnamese output; otherwise English).
|
|
53
|
+
|
|
52
54
|
### 5. Checkpointing
|
|
53
55
|
|
|
54
56
|
Save the best checkpoint by the primary validation metric (not the final epoch). Store the config file alongside the artifact so the checkpoint is self-contained. Use the model registry (MLflow Model Registry or equivalent) when available.
|