@relipa/ai-flow-kit 0.1.2 → 0.1.4-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 +139 -0
- package/bin/aiflow.js +89 -2
- package/custom/harness/playwright/.env.example +10 -0
- package/custom/harness/playwright/playwright.config.ts +34 -0
- package/custom/harness/playwright/tests/e2e/auth.setup.ts +25 -0
- package/custom/harness/playwright/tests/e2e/fixtures/test.ts +6 -0
- package/custom/harness/playwright/tests/e2e/pages/BasePage.ts +9 -0
- package/custom/harness/playwright/tests/e2e/support/auth.ts +5 -0
- package/custom/mcp-presets/playwright.json +8 -0
- package/custom/rules/test-patterns.md +70 -0
- package/custom/skills/automation-testing/SKILL.md +239 -0
- package/custom/skills/automation-testing/templates/BasePage.ts +29 -0
- package/custom/skills/automation-testing/templates/PageObject.example.ts +29 -0
- package/custom/skills/automation-testing/templates/playwright.config.ts +39 -0
- package/custom/skills/automation-testing/templates/spec.example.ts +29 -0
- package/custom/skills/ba-skills/skill-ba-phan-tich-ban-dau-v1.md +44 -0
- package/custom/skills/ba-skills/skill-ba-prototype-v1.md +35 -0
- package/custom/skills/ba-skills/skill-ba-qa-template-v1.md +21 -0
- package/custom/skills/ba-skills/skill-ba-qa-v1.md +35 -0
- package/custom/skills/ba-skills/skill-ba-template-phan-tich-ban-dau-v1.md +30 -0
- package/custom/skills/ba-skills/skill-ba-template-uc-v1.md +83 -0
- package/custom/skills/ba-skills/skill-ba-ve-luong-mermaid-v1.md +35 -0
- package/custom/skills/ba-skills/skill-ba-viet-spec-uc-v1.md +38 -0
- package/custom/skills/ba-skills/skill-ba-xay-dung-business-rules-v1.md +39 -0
- package/custom/skills/coverage-check/SKILL.md +202 -0
- package/custom/skills/evidence-aggregation/SKILL.md +246 -0
- package/custom/skills/execute-flow/SKILL.md +499 -0
- package/custom/skills/execute-flow/templates/playwright.config.ts +39 -0
- package/custom/skills/gate-review/SKILL.md +195 -0
- package/custom/skills/generate-test-report/SKILL.md +99 -0
- package/custom/skills/generate-test-report/templates/test-report.md +58 -0
- package/custom/skills/generate-testcase/SKILL.md +350 -0
- package/custom/skills/generate-testcase/templates/testcase.md +88 -0
- package/custom/skills/log-bug/SKILL.md +131 -0
- package/custom/skills/pr-impact-analysis/SKILL.md +180 -0
- package/custom/skills/retest-orchestration/SKILL.md +191 -0
- package/custom/skills/script-sync/SKILL.md +208 -0
- package/custom/skills/test-analysis/SKILL.md +300 -0
- package/custom/skills/test-skills/categories/00-core/00.01.requirement-analysis.md +111 -0
- package/custom/skills/test-skills/categories/00-core/00.02.risk-analysis.md +24 -0
- package/custom/skills/test-skills/categories/00-core/00.03.test-scenario-builder.md +90 -0
- package/custom/skills/test-skills/categories/00-core/00.04.testcase-review.md +68 -0
- package/custom/skills/test-skills/categories/01-test-design/01.01.boundary-value-analysis.md +30 -0
- package/custom/skills/test-skills/categories/01-test-design/01.02.equivalence.partitioning.md +27 -0
- package/custom/skills/test-skills/categories/01-test-design/01.03.decision-table.md +26 -0
- package/custom/skills/test-skills/categories/01-test-design/01.04.state.transition.md +26 -0
- package/custom/skills/test-skills/categories/01-test-design/01.05.pairwise.md +25 -0
- package/custom/skills/test-skills/categories/01-test-design/01.06.error-guessing.md +28 -0
- package/custom/skills/test-skills/categories/02-ui-testing/02.01.UI-layout.md +29 -0
- package/custom/skills/test-skills/categories/02-ui-testing/02.02.form-validation.md +57 -0
- package/custom/skills/test-skills/categories/02-ui-testing/02.03.navigation.md +27 -0
- package/custom/skills/test-skills/categories/02-ui-testing/02.04.localization.md +27 -0
- package/custom/skills/test-skills/categories/02-ui-testing/02.05.accessibility.md +27 -0
- package/custom/skills/test-skills/categories/03-business-testing/03.01.CRUD-testing.md +51 -0
- package/custom/skills/test-skills/categories/03-business-testing/03.02.workflow-testing.md +44 -0
- package/custom/skills/test-skills/categories/03-business-testing/03.03.permission-testing.md +41 -0
- package/custom/skills/test-skills/categories/03-business-testing/03.04.dependency-validation.md +40 -0
- package/custom/skills/test-skills/categories/03-business-testing/03.05.notification-testing.md +43 -0
- package/custom/skills/test-skills/categories/03-business-testing/03.06.calculation.testing.md +44 -0
- package/custom/skills/test-skills/categories/04-data-testing/04.01.database-testing.md +43 -0
- package/custom/skills/test-skills/categories/04-data-testing/04.02.import-export-testing.md +43 -0
- package/custom/skills/test-skills/categories/04-data-testing/04.03.data-mapping.md +39 -0
- package/custom/skills/test-skills/categories/04-data-testing/04.04.duplicate-handling.md +39 -0
- package/custom/skills/test-skills/categories/04-data-testing/04.05.migration.md +42 -0
- package/custom/skills/test-skills/categories/05-integration/05.01.API-testing.md +37 -0
- package/custom/skills/test-skills/categories/05-integration/05.02.third-party-integration.md +36 -0
- package/custom/skills/test-skills/categories/05-integration/05.03.batch-processing.md +38 -0
- package/custom/skills/test-skills/categories/05-integration/05.04.file-upload-download.md +40 -0
- package/custom/skills/test-skills/categories/08-domain-skills/CMS.md +34 -0
- package/custom/skills/test-skills/categories/08-domain-skills/Ecommerce.md +35 -0
- package/custom/skills/test-skills/categories/99-review/99.01.coverage-review.md +35 -0
- package/custom/skills/test-skills/categories/99-review/99.02.knowledge-learning.md +34 -0
- package/custom/skills/test-skills/categories/99-review/99.03.repository-update.md +33 -0
- package/custom/skills/test-skills/categories/99-review/99.04.change-history.md +38 -0
- package/custom/skills/test-skills/rules/Directory_and_Naming_Convention.md +257 -0
- package/custom/skills/test-skills/rules/QA_Writing_Standards.md +49 -0
- package/custom/skills/test-skills/template/template_testcase.md +92 -0
- package/custom/templates/shared/create-spec-workflow.md +441 -0
- package/custom/templates/shared/create-testcase-workflow.md +470 -0
- package/custom/templates/shared/gate-workflow.md +421 -11
- package/docs/common/CHANGELOG.md +52 -0
- package/docs/common/QUICK_START.md +30 -0
- package/docs/common/cli-reference.md +48 -7
- package/package.json +2 -2
- package/scripts/create-score-excel.js +37 -14
- package/scripts/detect.js +10 -0
- package/scripts/guide.js +9 -0
- package/scripts/init.js +48 -1
- package/scripts/prompt.js +36 -0
- package/scripts/review.js +91 -0
- package/scripts/scaffold-playwright.js +106 -0
- package/scripts/task.js +21 -7
- package/scripts/update.js +127 -124
- package/scripts/use.js +36 -12
|
@@ -5,12 +5,30 @@
|
|
|
5
5
|
|
|
6
6
|
You have superpowers. When a ticket context exists in `.aiflow/context/current.json`:
|
|
7
7
|
- **Consult the "AI Skill Registry"** below to find instructions for each skill (`SKILL.md`).
|
|
8
|
-
- **AUTO-START Gate 1 immediately** — do NOT wait
|
|
9
|
-
- Read
|
|
8
|
+
- **AUTO-START Gate 1 immediately** — do NOT wait to be asked.
|
|
9
|
+
- Read the context, **check `taskType`**, and follow the matching workflow — NO EXCEPTIONS.
|
|
10
10
|
- **PROJECT CONVENTIONS:** Before writing any output file (plan, requirement, summary), read `custom/rules/project-conventions.md`. These rules override upstream skill defaults.
|
|
11
11
|
|
|
12
|
+
### Workflow Selection
|
|
13
|
+
|
|
14
|
+
Read `.aiflow/context/current.json` → check the `taskType` field:
|
|
15
|
+
|
|
16
|
+
| `taskType` value | Workflow to follow |
|
|
17
|
+
|---|---|
|
|
18
|
+
| `testing` | **[TESTER] 4-Gate Testing Workflow** (below) |
|
|
19
|
+
| `execute` | **[EXECUTE] Executing Flow** (below) |
|
|
20
|
+
| `feature`, `bug-fix`, `refactor`, `investigation`, `documentation` | **[DEV] 5-Gate Development Workflow** (below) |
|
|
21
|
+
| `create-spec` | **[BA] 4-Gate Spec Creation Workflow** (below) |
|
|
22
|
+
| `create-testcase` | **[QA] 4-Gate TestCase Creation Workflow** (below) |
|
|
23
|
+
|
|
24
|
+
If `taskType` is missing or unrecognized, default to the DEV workflow and ask ONE clarifying question.
|
|
25
|
+
|
|
12
26
|
---
|
|
13
27
|
|
|
28
|
+
## [DEV] 5-Gate Development Workflow
|
|
29
|
+
|
|
30
|
+
> **For:** `feature` · `bug-fix` · `refactor` · `investigation` · `documentation`
|
|
31
|
+
|
|
14
32
|
### GATE 1 — AI Analyze Requirement (auto-start)
|
|
15
33
|
|
|
16
34
|
**INVOKE:** `read-study-requirement` skill
|
|
@@ -24,14 +42,20 @@ AI actively reads ticket + source code to understand the requirement:
|
|
|
24
42
|
- Requirements summary, source code analysis
|
|
25
43
|
- Proposed solution and approach
|
|
26
44
|
- Impact analysis, effort estimate, testing plan
|
|
27
|
-
6.
|
|
45
|
+
6. **INVOKE** `gate-review` skill (generate mode) — write `.aiflow/review/gate-1-[ticket-id].md`
|
|
46
|
+
7. Display gate pause message from `gate-review` skill — wait for **APPROVED**
|
|
47
|
+
|
|
48
|
+
**When APPROVED received:**
|
|
49
|
+
→ **INVOKE** `gate-review` skill (verify mode) — run `ak review check --gate 1 --ticket [ticket-id]`
|
|
50
|
+
→ If passed: run `ak gate 1 approved --ticket [ticket-id]` → proceed to Gate 2
|
|
51
|
+
→ If blocked: follow gate-review skill response protocol
|
|
28
52
|
|
|
29
53
|
> **Tip:** If auto-start doesn't trigger, the developer can start this gate by typing: **"start"**, **"Gate 1"** or **"Analyze ticket"**.
|
|
30
54
|
|
|
31
55
|
DO NOT just check format — **understand the content and propose solutions**.
|
|
32
56
|
|
|
33
57
|
> **Telemetry:** Run `ak gate 1 start --ticket [ticket-id]` when starting this gate (auto-start or when developer types "start"/"Gate 1"). Run as-is — do NOT append shell redirects like `2>$null` or `>/dev/null`.
|
|
34
|
-
> Run `ak gate 1 approved --ticket [ticket-id]`
|
|
58
|
+
> Run `ak gate 1 approved --ticket [ticket-id]` after gate-review verify passes (see When APPROVED received block above). Run as-is — do NOT append shell redirects.
|
|
35
59
|
|
|
36
60
|
---
|
|
37
61
|
|
|
@@ -41,11 +65,16 @@ DO NOT just check format — **understand the content and propose solutions**.
|
|
|
41
65
|
|
|
42
66
|
- Create a detailed TDD implementation plan based on the approved requirement.
|
|
43
67
|
- Output `plan/[ticket-id]/plan.md` with the detailed TDD implementation plan.
|
|
44
|
-
-
|
|
45
|
-
- CODE WILL NOT BE GENERATED until
|
|
68
|
+
- **INVOKE** `gate-review` skill (generate mode) — write `.aiflow/review/gate-2-[ticket-id].md`
|
|
69
|
+
- Display gate pause message from `gate-review` skill — CODE WILL NOT BE GENERATED until all items checked and APPROVED received.
|
|
70
|
+
|
|
71
|
+
**When APPROVED received:**
|
|
72
|
+
→ **INVOKE** `gate-review` skill (verify mode) — run `ak review check --gate 2 --ticket [ticket-id]`
|
|
73
|
+
→ If passed: run `ak gate 2 approved --ticket [ticket-id]` → proceed to Gate 3
|
|
74
|
+
→ If blocked: follow gate-review skill response protocol
|
|
46
75
|
|
|
47
76
|
> **Telemetry:** Run `ak gate 2 start --ticket [ticket-id]` when starting this gate. Run as-is — do NOT append shell redirects.
|
|
48
|
-
> Run `ak gate 2 approved --ticket [ticket-id]`
|
|
77
|
+
> Run `ak gate 2 approved --ticket [ticket-id]` after gate-review verify passes (see When APPROVED received block above). Run as-is — do NOT append shell redirects.
|
|
49
78
|
|
|
50
79
|
---
|
|
51
80
|
|
|
@@ -72,12 +101,21 @@ Mandatory order:
|
|
|
72
101
|
3. Tick `custom/rules/review-checklist.md`
|
|
73
102
|
4. Create `plan/[ticket-id]/summary.md`
|
|
74
103
|
|
|
75
|
-
Then:
|
|
76
|
-
-
|
|
77
|
-
-
|
|
104
|
+
Then:
|
|
105
|
+
- **INVOKE** `gate-review` skill (generate mode) — write `.aiflow/review/gate-4-[ticket-id].md`
|
|
106
|
+
- Display gate pause message from `gate-review` skill. Also accepts `BUG: [description]` (bypasses review check — goes directly to fix cycle).
|
|
107
|
+
|
|
108
|
+
**When APPROVED received:**
|
|
109
|
+
→ **INVOKE** `gate-review` skill (verify mode) — run `ak review check --gate 4 --ticket [ticket-id]`
|
|
110
|
+
→ If passed: run `ak gate 4 approved --ticket [ticket-id]` → proceed to Gate 5
|
|
111
|
+
→ If blocked: follow gate-review skill response protocol
|
|
112
|
+
|
|
113
|
+
**When BUG: [description] received (no review check needed):**
|
|
114
|
+
- Coding bug → fix → repeat Gate 4 (re-generate review file)
|
|
115
|
+
- Requirement bug → return to Gate 1
|
|
78
116
|
|
|
79
117
|
> **Telemetry:** Run `ak gate 4 start --ticket [ticket-id]` when starting this gate. Run as-is — do NOT append shell redirects.
|
|
80
|
-
> Run `ak gate 4 approved --ticket [ticket-id]`
|
|
118
|
+
> Run `ak gate 4 approved --ticket [ticket-id]` after gate-review verify passes (see When APPROVED received block above). Run as-is — do NOT append shell redirects.
|
|
81
119
|
|
|
82
120
|
---
|
|
83
121
|
|
|
@@ -89,3 +127,375 @@ Only runs after Gate 4 has been APPROVED.
|
|
|
89
127
|
Guide on creating a Pull Request with the ticket link.
|
|
90
128
|
|
|
91
129
|
> **Telemetry:** Run `ak gate 5 start --ticket [ticket-id]` when starting this gate. Run as-is — do NOT append shell redirects.
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## [TESTER] 4-Gate Testing Workflow
|
|
134
|
+
|
|
135
|
+
> **For:** `testing`
|
|
136
|
+
> **Interaction Rules:** Ask ONE clarifying question at a time — wait for TESTER reply before proceeding. NEVER batch questions.
|
|
137
|
+
|
|
138
|
+
### GATE 1 — Phân tích & Confirm (auto-start)
|
|
139
|
+
|
|
140
|
+
**INVOKE:** `test-analysis` skill
|
|
141
|
+
|
|
142
|
+
1. Read `.aiflow/context/current.json` — ticket title, description, acceptance criteria
|
|
143
|
+
2. Fetch linked docs if URLs present in description (`ak fetch-links <url>`)
|
|
144
|
+
3. Analyze scope, functional flows, non-functional requirements, risks
|
|
145
|
+
4. Ask clarifying questions — **ONE at a time**, wait for reply
|
|
146
|
+
5. Write `test-plan/test-analysis.md`
|
|
147
|
+
6. **INVOKE** `gate-review` skill (generate mode) — write `.aiflow/review/gate-1-[ticket-id].md`
|
|
148
|
+
7. Display gate pause message from `gate-review` skill — wait for **APPROVED**
|
|
149
|
+
|
|
150
|
+
> **Tip:** TESTER can trigger with: **"start"**, **"Gate 1"** or **"Analyze ticket"**.
|
|
151
|
+
|
|
152
|
+
```
|
|
153
|
+
⏸️ GATE 1: TEST ANALYSIS READY
|
|
154
|
+
→ Review: [test-plan/test-analysis.md](test-plan/test-analysis.md)
|
|
155
|
+
→ Type APPROVED to proceed to Gate 2
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
**When APPROVED received:**
|
|
159
|
+
→ **INVOKE** `gate-review` skill (verify mode) — `ak review check --gate 1 --ticket [ticket-id]`
|
|
160
|
+
→ If passed: `ak gate 1 approved --ticket [ticket-id]` → Gate 2
|
|
161
|
+
→ If blocked: follow gate-review skill response protocol
|
|
162
|
+
|
|
163
|
+
> **Telemetry:** Run `ak gate 1 start --ticket [ticket-id]` when starting this gate. Run as-is — do NOT append shell redirects.
|
|
164
|
+
> Run `ak gate 1 approved --ticket [ticket-id]` after gate-review verify passes (see When APPROVED received block above). Run as-is — do NOT append shell redirects.
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
### GATE 2 — Lập Kế Hoạch Test (4 phases, each needs APPROVED)
|
|
169
|
+
|
|
170
|
+
Only runs after Gate 1 APPROVED.
|
|
171
|
+
|
|
172
|
+
> **Rule:** TESTER must approve each phase before AI moves to the next. Never merge phases.
|
|
173
|
+
|
|
174
|
+
> **Telemetry:** Run `ak gate 2 start --ticket [ticket-id]` when starting Phase 2a. Run as-is — do NOT append shell redirects.
|
|
175
|
+
|
|
176
|
+
#### Phase 2a — Scenarios & Checklist
|
|
177
|
+
|
|
178
|
+
**INVOKE:** `generate-testcase` skill (Phase 2a)
|
|
179
|
+
|
|
180
|
+
- If TESTER declared `PR: <url>` → **INVOKE** `pr-impact-analysis` skill (Dev Artifacts Check) first
|
|
181
|
+
- Generate test scenarios/checklist TABLE covering: Happy Path, Negative, Validation, Boundary, Edge Cases, State Transitions, Role-based, Accessibility, Compatibility, Data Integrity, Integration, Exploratory
|
|
182
|
+
- Save `test-plan/checklist.md`
|
|
183
|
+
- **INVOKE** `gate-review` skill (generate mode) — write `.aiflow/review/gate-2a-[ticket-id].md`
|
|
184
|
+
- Display gate pause message from `gate-review` skill — wait for **APPROVED**
|
|
185
|
+
|
|
186
|
+
```
|
|
187
|
+
⏸️ GATE 2a: SCENARIOS READY
|
|
188
|
+
→ Type APPROVED to generate test cases
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
**When APPROVED received:**
|
|
192
|
+
→ **INVOKE** `gate-review` skill (verify mode) — `ak review check --gate 2a --ticket [ticket-id]`
|
|
193
|
+
→ If passed: `ak gate 2a approved --ticket [ticket-id]` → Phase 2b
|
|
194
|
+
→ If blocked: follow gate-review skill response protocol
|
|
195
|
+
|
|
196
|
+
#### Phase 2b — Generate Test Cases
|
|
197
|
+
|
|
198
|
+
**INVOKE:** `generate-testcase` skill (Phase 2b)
|
|
199
|
+
|
|
200
|
+
- Generate detailed test cases TABLE from Phase 2a checklist: `TC_ID | Scenario | Preconditions | Test Steps | Test Data | Expected Result`
|
|
201
|
+
- TC_ID format: `TC_[Module]_[NNN]` (e.g. `TC_Login_001`)
|
|
202
|
+
- Expected result ONLY from ticket/spec — never from PR/dev description
|
|
203
|
+
- Save `test-plan/test-cases/`
|
|
204
|
+
- **INVOKE** `gate-review` skill (generate mode) — write `.aiflow/review/gate-2b-[ticket-id].md`
|
|
205
|
+
- Display gate pause message from `gate-review` skill — wait for **APPROVED**
|
|
206
|
+
|
|
207
|
+
```
|
|
208
|
+
⏸️ GATE 2b: TEST CASES READY
|
|
209
|
+
→ Type APPROVED to proceed to review
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
**When APPROVED received:**
|
|
213
|
+
→ **INVOKE** `gate-review` skill (verify mode) — `ak review check --gate 2b --ticket [ticket-id]`
|
|
214
|
+
→ If passed: `ak gate 2b approved --ticket [ticket-id]` → Phase 2c
|
|
215
|
+
→ If blocked: follow gate-review skill response protocol
|
|
216
|
+
|
|
217
|
+
#### Phase 2c — Review & Optimize
|
|
218
|
+
|
|
219
|
+
**INVOKE:** `generate-testcase` skill (Phase 2c)
|
|
220
|
+
|
|
221
|
+
- Self-review: check duplicates, problematic TCs (vague steps, unmeasurable expected result), missing TCs, coverage gaps, accessibility/compatibility coverage
|
|
222
|
+
- Output `test-plan/review-report.md` with action items
|
|
223
|
+
- **INVOKE** `gate-review` skill (generate mode) — write `.aiflow/review/gate-2c-[ticket-id].md`
|
|
224
|
+
- Display gate pause message from `gate-review` skill — wait for **APPROVED**
|
|
225
|
+
|
|
226
|
+
```
|
|
227
|
+
⏸️ GATE 2c: REVIEW COMPLETE
|
|
228
|
+
→ Type APPROVED to finalize and generate scripts
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
**When APPROVED received:**
|
|
232
|
+
→ **INVOKE** `gate-review` skill (verify mode) — `ak review check --gate 2c --ticket [ticket-id]`
|
|
233
|
+
→ If passed: `ak gate 2c approved --ticket [ticket-id]` → Phase 2d
|
|
234
|
+
→ If blocked: follow gate-review skill response protocol
|
|
235
|
+
|
|
236
|
+
#### Phase 2d — Coverage Check & Playwright Scripts
|
|
237
|
+
|
|
238
|
+
**INVOKE:** `coverage-check` skill
|
|
239
|
+
|
|
240
|
+
- Apply all action items from Phase 2c
|
|
241
|
+
- Generate coverage matrix (requirement → TC IDs)
|
|
242
|
+
- Export final test case set to `test-plan/test-cases/final-testcases.md`
|
|
243
|
+
- **INVOKE** `automation-testing` skill → generate Playwright scripts to `test-plan/test-scripts/`
|
|
244
|
+
- **INVOKE** `gate-review` skill (generate mode) — write `.aiflow/review/gate-2d-[ticket-id].md`
|
|
245
|
+
- Display gate pause message from `gate-review` skill — wait for **APPROVED**
|
|
246
|
+
|
|
247
|
+
```
|
|
248
|
+
⏸️ GATE 2: TEST PLAN READY
|
|
249
|
+
Test cases: [N] total ([N] manual / [N] automation)
|
|
250
|
+
Coverage: [N]% requirements covered
|
|
251
|
+
Scripts: [N] Playwright specs generated
|
|
252
|
+
→ Type APPROVED to proceed to Gate 3 (execution)
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
**When APPROVED received:**
|
|
256
|
+
→ **INVOKE** `gate-review` skill (verify mode) — `ak review check --gate 2d --ticket [ticket-id]`
|
|
257
|
+
→ If passed: `ak gate 2 approved --ticket [ticket-id]` → Gate 3
|
|
258
|
+
→ If blocked: follow gate-review skill response protocol
|
|
259
|
+
|
|
260
|
+
> **Telemetry:** Run `ak gate 2 approved --ticket [ticket-id]` after gate-review verify passes (see When APPROVED received block above). Run as-is — do NOT append shell redirects.
|
|
261
|
+
|
|
262
|
+
---
|
|
263
|
+
|
|
264
|
+
### GATE 3 — Thực Thi & Evidence
|
|
265
|
+
|
|
266
|
+
Only runs after Gate 2 APPROVED.
|
|
267
|
+
|
|
268
|
+
**Step 3.1 — Dev Artifacts Check (Gate 3 entry)**
|
|
269
|
+
|
|
270
|
+
**INVOKE:** `pr-impact-analysis` skill — check for new commits since Gate 2. If delta found → propose TC additions → TESTER approves delta only before proceeding.
|
|
271
|
+
|
|
272
|
+
**Step 3.2 — Execute Playwright**
|
|
273
|
+
|
|
274
|
+
```bash
|
|
275
|
+
BASE_URL=<url> npx playwright test --headed
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
**Step 3.3 — Organize Evidence**
|
|
279
|
+
|
|
280
|
+
**INVOKE:** `evidence-aggregation` skill
|
|
281
|
+
|
|
282
|
+
- Parse `test-results/results.json`
|
|
283
|
+
- Create `evidence/TC_[ID]-[scenario]/` with screenshots + traces
|
|
284
|
+
- Generate `result.md` per TC
|
|
285
|
+
- Auto-draft `bugs/BUG-NNN-*.md` for failed TCs
|
|
286
|
+
|
|
287
|
+
**Re-test loop** — when TESTER types `RETEST: [TC_ID]`:
|
|
288
|
+
|
|
289
|
+
**INVOKE:** `retest-orchestration` skill
|
|
290
|
+
- Re-run Dev Artifacts Check (detect new commits in dev fix)
|
|
291
|
+
- Re-execute: `npx playwright test --grep "TC_ID_pattern" --headed`
|
|
292
|
+
- Update evidence (create `run-N/` subfolder — never delete prior evidence)
|
|
293
|
+
- Update bug status (RESOLVED / Still OPEN)
|
|
294
|
+
|
|
295
|
+
**INVOKE** `gate-review` skill (generate mode) — write `.aiflow/review/gate-3-[ticket-id].md` — summarize execution results + bug list
|
|
296
|
+
Display gate pause message from `gate-review` skill — wait for **APPROVED**
|
|
297
|
+
|
|
298
|
+
```
|
|
299
|
+
⏸️ GATE 3: EXECUTION COMPLETE
|
|
300
|
+
Passed: [N] | Failed: [N] | Blocked: [N]
|
|
301
|
+
Bugs: [N Critical] [N High] [N Medium] [N Low]
|
|
302
|
+
→ Type APPROVED when all critical/high bugs resolved
|
|
303
|
+
→ Type RETEST: [TC_ID] to re-execute
|
|
304
|
+
→ Type PR: [url] to declare new dev PRs
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
**When APPROVED received:**
|
|
308
|
+
→ **INVOKE** `gate-review` skill (verify mode) — `ak review check --gate 3 --ticket [ticket-id]`
|
|
309
|
+
→ If passed: `ak gate 3 approved --ticket [ticket-id]` → Gate 4
|
|
310
|
+
→ If blocked: follow gate-review skill response protocol
|
|
311
|
+
|
|
312
|
+
> **Telemetry:** Run `ak gate 3 start --ticket [ticket-id]` when starting this gate. Run as-is — do NOT append shell redirects.
|
|
313
|
+
|
|
314
|
+
---
|
|
315
|
+
|
|
316
|
+
### GATE 4 — Báo Cáo & Sign-off
|
|
317
|
+
|
|
318
|
+
Only runs after Gate 3 APPROVED.
|
|
319
|
+
|
|
320
|
+
**INVOKE:** `generate-test-report` skill
|
|
321
|
+
|
|
322
|
+
1. Aggregate results from `evidence/*/result.md`
|
|
323
|
+
2. Summarize bugs from `bugs/BUG-*.md` by severity
|
|
324
|
+
3. Verify acceptance criteria coverage from Gate 1
|
|
325
|
+
4. Determine Go / No-Go: 0 unresolved Critical = Go
|
|
326
|
+
5. Write `test-plan/test-report.md`
|
|
327
|
+
|
|
328
|
+
- **INVOKE** `gate-review` skill (generate mode) — write `.aiflow/review/gate-4-[ticket-id].md` — summarize test report + go/no-go decision
|
|
329
|
+
- Display gate pause message from `gate-review` skill. Also accepts `NO-GO: [reason]` (bypasses review check).
|
|
330
|
+
|
|
331
|
+
```
|
|
332
|
+
⏸️ GATE 4: TEST REPORT READY
|
|
333
|
+
Decision: [GO / NO-GO]
|
|
334
|
+
Passed: [N/total] | Bugs unresolved: [N]
|
|
335
|
+
Coverage: [N]% acceptance criteria
|
|
336
|
+
→ Type APPROVED to sign off
|
|
337
|
+
→ Type NO-GO: [reason] to reject release
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
**When APPROVED received:**
|
|
341
|
+
→ **INVOKE** `gate-review` skill (verify mode) — `ak review check --gate 4 --ticket [ticket-id]`
|
|
342
|
+
→ If passed: `ak gate 4 approved --ticket [ticket-id]` → sign off complete
|
|
343
|
+
→ If blocked: follow gate-review skill response protocol
|
|
344
|
+
|
|
345
|
+
**When NO-GO: [reason] received (no review check needed):** reject release per reason.
|
|
346
|
+
|
|
347
|
+
> **Telemetry:** Run `ak gate 4 start --ticket [ticket-id]` when starting this gate. Run as-is — do NOT append shell redirects.
|
|
348
|
+
> Run `ak gate 4 approved --ticket [ticket-id]` after gate-review verify passes (see When APPROVED received block above). Run as-is — do NOT append shell redirects.
|
|
349
|
+
|
|
350
|
+
---
|
|
351
|
+
|
|
352
|
+
## [EXECUTE] Executing Flow
|
|
353
|
+
|
|
354
|
+
> **For:** `execute`
|
|
355
|
+
> **Entry points:** `ak execute TICKET-ID` · `ak execute ./path/to/testcases.md` · `ak execute` (manual)
|
|
356
|
+
> **Interaction Rules:** Ask ONE clarifying question at a time — wait for TESTER reply before proceeding.
|
|
357
|
+
|
|
358
|
+
### GATE 1 — Pre-flight & Work Plan (auto-start)
|
|
359
|
+
|
|
360
|
+
**INVOKE:** `execute-flow` skill (from `custom/skills/execute-flow/SKILL.md`)
|
|
361
|
+
|
|
362
|
+
Pre-flight checks (stop and report if any fail):
|
|
363
|
+
0. **MCP Playwright is configured** — check `~/.claude/settings.json` (global user-level) for a `playwright` key in `mcpServers`. This is global — set once, works across all repos.
|
|
364
|
+
- If missing: ask TESTER "MCP Playwright chưa cấu hình. Tự động cài vào global settings (~/.claude/settings.json)? [Y/n]"
|
|
365
|
+
- If Y: read and update `~/.claude/settings.json` by merging the playwright entry into `mcpServers`, then instruct TESTER to **restart Claude Code** before retrying. Stop here.
|
|
366
|
+
- If n: show manual install instructions (add `playwright` to `mcpServers` in `~/.claude/settings.json`). Stop here.
|
|
367
|
+
1. TC file is parseable — Section 3 has at least one TC row
|
|
368
|
+
2. `ak-test/{repo}/` directory exists (or offer to scaffold it)
|
|
369
|
+
3. `BASE_URL` env var is set
|
|
370
|
+
4. `ak-test/{repo}/playwright.config.ts` exists (or offer to create from template)
|
|
371
|
+
|
|
372
|
+
Then display work plan:
|
|
373
|
+
|
|
374
|
+
- **INVOKE** `gate-review` skill (generate mode) — write `.aiflow/review/gate-1-[ticket-id].md`
|
|
375
|
+
- Display gate pause message from `gate-review` skill — wait for **APPROVED**
|
|
376
|
+
|
|
377
|
+
```
|
|
378
|
+
⏸️ GATE 1: EXECUTE FLOW READY
|
|
379
|
+
TC file: [path](path)
|
|
380
|
+
Repo: [repo]
|
|
381
|
+
Screen: [ScreenID] — [Screen Name]
|
|
382
|
+
BASE_URL: [url]
|
|
383
|
+
→ Type APPROVED to sync scripts (Gate 2)
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
**When APPROVED received:**
|
|
387
|
+
→ **INVOKE** `gate-review` skill (verify mode) — `ak review check --gate 1 --ticket [ticket-id]`
|
|
388
|
+
→ If passed: `ak gate 1 approved --ticket [ticket-id]` → Gate 2
|
|
389
|
+
→ If blocked: follow gate-review skill response protocol
|
|
390
|
+
|
|
391
|
+
> **Telemetry:** Run `ak gate 1 start --ticket [ticket-id]` when starting. Run `ak gate 1 approved --ticket [ticket-id]` when APPROVED.
|
|
392
|
+
|
|
393
|
+
---
|
|
394
|
+
|
|
395
|
+
### GATE 2 — Script Sync
|
|
396
|
+
|
|
397
|
+
Only runs after Gate 1 APPROVED.
|
|
398
|
+
|
|
399
|
+
**INVOKE:** `script-sync` skill (from `custom/skills/script-sync/SKILL.md`)
|
|
400
|
+
|
|
401
|
+
Hash-based TC↔script sync — for each TC in the file:
|
|
402
|
+
- **New TC** (no matching `@tc-hash` in spec): generate Playwright test using MCP (`browser_navigate` → `browser_snapshot` → `browser_generate_locator`). Never fabricate selectors.
|
|
403
|
+
- **Changed TC** (hash mismatch): update the existing test block only.
|
|
404
|
+
- **Unchanged TC** (hash matches): skip — do not touch.
|
|
405
|
+
- **Manual/Blocked TC**: mark `⏭️ Untest` / `⏳ Pending` — no script generated.
|
|
406
|
+
|
|
407
|
+
Output: `ak-test/{repo}/scripts/{screenId}/{ScreenID}.spec.ts` (1 file per screen, all TCs inside)
|
|
408
|
+
|
|
409
|
+
- **INVOKE** `gate-review` skill (generate mode) — write `.aiflow/review/gate-2-[ticket-id].md`
|
|
410
|
+
- Display gate pause message from `gate-review` skill — wait for **APPROVED**
|
|
411
|
+
|
|
412
|
+
```
|
|
413
|
+
⏸️ GATE 2: SCRIPT SYNC COMPLETE
|
|
414
|
+
✅ New: [N] | 🔄 Updated: [N] | ⏭️ Skipped: [N] | ⚠️ Manual: [N]
|
|
415
|
+
→ Type APPROVED to execute (Gate 3)
|
|
416
|
+
```
|
|
417
|
+
|
|
418
|
+
**When APPROVED received:**
|
|
419
|
+
→ **INVOKE** `gate-review` skill (verify mode) — `ak review check --gate 2 --ticket [ticket-id]`
|
|
420
|
+
→ If passed: `ak gate 2 approved --ticket [ticket-id]` → Gate 3
|
|
421
|
+
→ If blocked: follow gate-review skill response protocol
|
|
422
|
+
|
|
423
|
+
---
|
|
424
|
+
|
|
425
|
+
### GATE 3 — Execute & Evidence
|
|
426
|
+
|
|
427
|
+
Only runs after Gate 2 APPROVED.
|
|
428
|
+
|
|
429
|
+
**Step 3.1 — Determine run number**
|
|
430
|
+
|
|
431
|
+
Check `ak-test/{repo}/results/{screenId}/` — next run is `run-{N+1}`.
|
|
432
|
+
|
|
433
|
+
**Step 3.2 — Execute Playwright**
|
|
434
|
+
|
|
435
|
+
```bash
|
|
436
|
+
BASE_URL=<url> npx playwright test scripts/{screenId}/{ScreenID}.spec.ts
|
|
437
|
+
```
|
|
438
|
+
|
|
439
|
+
**Step 3.3 — Organize evidence** into `ak-test/{repo}/results/{screenId}/run-{N}/`:
|
|
440
|
+
- Per-TC folder `{TC_ID}-{scenario}/` with `step-NN-{desc}.png`, `trace.zip`, `result.md`
|
|
441
|
+
- Auto-draft `bugs/BUG-NNN-{slug}.md` for failed TCs
|
|
442
|
+
|
|
443
|
+
**Step 3.4 — Update TC file** R1/R2 columns:
|
|
444
|
+
- `✅ Pass` · `❌ Fail` · `⏭️ Untest` · `⏳ Pending`
|
|
445
|
+
|
|
446
|
+
**Re-test loop** — when TESTER types `RETEST: [TC_ID]`:
|
|
447
|
+
- Re-run Dev Artifacts Check if PR was declared
|
|
448
|
+
- Re-execute only the specified TCs
|
|
449
|
+
- Create new `run-{N}/` — never delete prior runs
|
|
450
|
+
- Update R1/R2 columns
|
|
451
|
+
|
|
452
|
+
**INVOKE** `gate-review` skill (generate mode) — write `.aiflow/review/gate-3-[ticket-id].md`
|
|
453
|
+
Display gate pause message from `gate-review` skill — wait for **APPROVED**
|
|
454
|
+
|
|
455
|
+
```
|
|
456
|
+
⏸️ GATE 3: EXECUTION COMPLETE
|
|
457
|
+
Run: run-{N} | Passed: [N] | Failed: [N] | Untest: [N] | Pending: [N]
|
|
458
|
+
→ Type APPROVED when all Critical/High bugs resolved
|
|
459
|
+
→ Type RETEST: [TC_ID] to re-execute specific TCs
|
|
460
|
+
→ Type PR: [url] to declare a dev fix PR
|
|
461
|
+
```
|
|
462
|
+
|
|
463
|
+
**When APPROVED received:**
|
|
464
|
+
→ **INVOKE** `gate-review` skill (verify mode) — `ak review check --gate 3 --ticket [ticket-id]`
|
|
465
|
+
→ If passed: `ak gate 3 approved --ticket [ticket-id]` → Gate 4
|
|
466
|
+
→ If blocked: follow gate-review skill response protocol
|
|
467
|
+
|
|
468
|
+
> **Telemetry:** Run `ak gate 3 start --ticket [ticket-id]` when starting. Run as-is — do NOT append shell redirects.
|
|
469
|
+
|
|
470
|
+
---
|
|
471
|
+
|
|
472
|
+
### GATE 4 — Report & Bug Logging
|
|
473
|
+
|
|
474
|
+
Only runs after Gate 3 APPROVED.
|
|
475
|
+
|
|
476
|
+
**Step 4.1** — Generate `ak-test/{repo}/results/{screenId}/run-{N}/testreport.md`:
|
|
477
|
+
- Per-module rows with Pass/Fail/Untest/Pending counts, R1/R2 columns, % completion
|
|
478
|
+
- Go/No-Go: 0 unresolved Critical = Go
|
|
479
|
+
|
|
480
|
+
**Step 4.2** — Bug logging: for each `❌ Fail` TC, ask TESTER ONE at a time:
|
|
481
|
+
> "BUG-NNN — [TC_ID]: [title]. Log to Jira? (Y/N/edit)"
|
|
482
|
+
|
|
483
|
+
Wait for reply before moving to next bug.
|
|
484
|
+
|
|
485
|
+
- **INVOKE** `gate-review` skill (generate mode) — write `.aiflow/review/gate-4-[ticket-id].md`
|
|
486
|
+
- Display gate pause message from `gate-review` skill — wait for **APPROVED**
|
|
487
|
+
|
|
488
|
+
```
|
|
489
|
+
⏸️ GATE 4: REPORT READY
|
|
490
|
+
Decision: [GO / NO-GO]
|
|
491
|
+
Bugs logged: [N] | Skipped: [N]
|
|
492
|
+
→ Review: [ak-test/{repo}/results/{screenId}/run-{N}/testreport.md](ak-test/{repo}/results/{screenId}/run-{N}/testreport.md)
|
|
493
|
+
→ Type APPROVED to sign off
|
|
494
|
+
```
|
|
495
|
+
|
|
496
|
+
**When APPROVED received:**
|
|
497
|
+
→ **INVOKE** `gate-review` skill (verify mode) — `ak review check --gate 4 --ticket [ticket-id]`
|
|
498
|
+
→ If passed: `ak gate 4 approved --ticket [ticket-id]` → sign off complete
|
|
499
|
+
→ If blocked: follow gate-review skill response protocol
|
|
500
|
+
|
|
501
|
+
> **Telemetry:** Run `ak gate 4 start --ticket [ticket-id]` when starting. Run `ak gate 4 approved --ticket [ticket-id]` when APPROVED.
|
package/docs/common/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,58 @@ Versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
7
7
|
|
|
8
8
|
---
|
|
9
9
|
|
|
10
|
+
## [0.1.3] - 2026-06-18
|
|
11
|
+
|
|
12
|
+
### Added
|
|
13
|
+
|
|
14
|
+
- **`execute` task type — 4-Gate Executing Flow** — New end-to-end test execution workflow for QA testers. Activated when `taskType: "execute"` in context. Orchestrated by the new `execute-flow` skill across 4 gates:
|
|
15
|
+
- **Gate 1 — Pre-flight & Work Plan**: Validates TC file, `ak-test/{repo}/` directory, `BASE_URL` env var, and `playwright.config.ts` before any scripts are touched.
|
|
16
|
+
- **Gate 2 — Script Sync**: Hash-based TC↔script sync via the new `script-sync` skill. Each TC is hashed as `SHA1(TC_ID + "|" + Steps + "|" + Expected Result)[:8]` and compared against the `@tc-hash` comment in the spec file. New TCs get scripts generated via MCP browser tools; changed TCs update their existing block; unchanged TCs are skipped entirely.
|
|
17
|
+
- **Gate 3 — Execute & Evidence**: Runs `npx playwright test` and organizes evidence into `ak-test/{repo}/results/{screenId}/run-{N}/` with per-TC folders (screenshots, trace.zip, result.md). Auto-drafts bug files for failed TCs. Supports `RETEST: [TC_ID]` loop.
|
|
18
|
+
- **Gate 4 — Report & Bug Logging**: Generates `testreport.md` with Go/No-Go decision; logs each failed TC to Jira/Backlog one-by-one with interactive confirm per bug.
|
|
19
|
+
|
|
20
|
+
- **`execute-flow` skill** (`custom/skills/execute-flow/SKILL.md`) — 4-gate execute flow orchestrator. Handles 3 entry points: `ak execute TICKET-ID` (ticket with `taskType: "execute"`), `ak execute ./path/to/testcases.md` (direct TC file), and `ak execute` (manual — AI asks for TC file). Output structure: `ak-test/{repo}/scripts/{screenId}/{ScreenID}.spec.ts` for scripts; `ak-test/{repo}/results/{screenId}/run-{N}/` for evidence.
|
|
21
|
+
|
|
22
|
+
- **`script-sync` skill** (`custom/skills/script-sync/SKILL.md`) — Hash-based TC↔Playwright script sync engine. Called from execute-flow Gate 2. Never fabricates selectors — uses MCP browser tools (`browser_navigate` → `browser_snapshot` → `browser_generate_locator`) for any new/changed TC. Produces one `.spec.ts` per screen with all TCs inside, using `screenId` (lowercase) for directory paths and `{ScreenID}.spec.ts` (uppercase) for the filename.
|
|
23
|
+
|
|
24
|
+
- **`playwright.config.ts` template** for execute-flow (`custom/skills/execute-flow/templates/playwright.config.ts`) — Default config for each `ak-test/{repo}` repo with HTML + JSON reporters, screenshot-on-failure, and trace-on-failure. AI offers to scaffold this file during Gate 1 pre-flight if it doesn't exist.
|
|
25
|
+
|
|
26
|
+
- **`execute` entry in `gate-workflow.md` Workflow Selection table** — `gate-workflow.md` (single source of truth for all AI agent instruction files) now routes `taskType: "execute"` to the `[EXECUTE] Executing Flow` section. Distributed to all agents (Claude, Gemini, Cursor, Copilot) via `ak init` / `ak up`.
|
|
27
|
+
|
|
28
|
+
- **`▶️ Execute Test` option in `ak use` type selector** — Both the `promptForTaskType()` shared function (Backlog/Jira loaders) and the `manualContext()` manual entry flow now include `execute` as a selectable type. Users can run `ak use --manual` or `ak use TICKET-ID` and choose "Execute Test" to route the AI to the execute-flow.
|
|
29
|
+
|
|
30
|
+
- **`ak execute` command** (`ak ex` alias) — New top-level CLI entry point that bypasses `ak use`. Accepts a ticket ID, a TC file path, or no argument (AI asks interactively). Documented in README, QUICK_START, cli-reference, and `ak guide --commands`.
|
|
31
|
+
|
|
32
|
+
- **`test-analysis` skill** (`custom/skills/test-analysis/SKILL.md`) — Gate 1 analysis skill for the [TESTER] workflow. Reads ticket context, fetches linked docs, analyzes scope and risk, asks clarifying questions one at a time, and writes `test-plan/test-analysis.md`.
|
|
33
|
+
|
|
34
|
+
- **`coverage-check` skill** (`custom/skills/coverage-check/SKILL.md`) — Gate 2d skill that applies review action items, generates a requirement→TC coverage matrix, exports the final test case set to `test-plan/test-cases/final-testcases.md`, and invokes `automation-testing` to generate Playwright scripts.
|
|
35
|
+
|
|
36
|
+
- **`evidence-aggregation` skill** (`custom/skills/evidence-aggregation/SKILL.md`) — Parses `test-results/results.json`, organizes screenshots and traces into `evidence/TC_[ID]-[scenario]/` folders, generates per-TC `result.md`, and auto-drafts `bugs/BUG-NNN-*.md` for failed TCs.
|
|
37
|
+
|
|
38
|
+
- **`retest-orchestration` skill** (`custom/skills/retest-orchestration/SKILL.md`) — Handles the `RETEST: [TC_ID]` loop in Gate 3. Re-runs dev artifacts check (detect new commits), re-executes only specified TCs, creates `run-N/` subfolders (never deletes prior evidence), and updates bug status.
|
|
39
|
+
|
|
40
|
+
- **`pr-impact-analysis` skill** (`custom/skills/pr-impact-analysis/SKILL.md`) — Checks for new commits/PRs between gates to ensure TC coverage stays current with dev changes.
|
|
41
|
+
|
|
42
|
+
- **`log-bug` skill** (`custom/skills/log-bug/SKILL.md`) — Logs a failed TC as a bug ticket in Jira/Backlog with structured fields (severity, steps, expected/actual, evidence link).
|
|
43
|
+
|
|
44
|
+
- **Playwright harness scaffold** — `ak scaffold playwright` (via `scripts/scaffold-playwright.js`) creates the `ak-test/{repo}/` directory structure with `playwright.config.ts`, `tests/e2e/fixtures/test.ts`, `tests/e2e/pages/BasePage.ts`, `tests/e2e/support/auth.ts`, and `.env.example`. Covered by 90-line Jest test suite in `tests/scaffold-playwright.test.js`.
|
|
45
|
+
|
|
46
|
+
- **Playwright MCP preset** (`custom/mcp-presets/playwright.json`) — MCP configuration preset for browser automation tools used by `script-sync` during TC→script generation.
|
|
47
|
+
|
|
48
|
+
- **`test-patterns.md` rules file** (`custom/rules/test-patterns.md`) — Team-level Playwright patterns and conventions referenced by `automation-testing` and `script-sync` skills.
|
|
49
|
+
|
|
50
|
+
- **`generate-testcase` skill — Phase 2a/2b/2c structure** — Skill rewritten with explicit phased execution: Phase 2a (scenarios & checklist), Phase 2b (generate detailed TC table), Phase 2c (review & optimize). TC_ID format: `TC_[Module]_[NNN]`. Gate pauses after each phase.
|
|
51
|
+
|
|
52
|
+
- **`automation-testing` skill — MCP browser integration** — Updated to document MCP tool sequence (`browser_navigate` → `browser_snapshot` → `browser_generate_locator`) for generating reliable Playwright locators without fabricating selectors.
|
|
53
|
+
|
|
54
|
+
### Fixed
|
|
55
|
+
|
|
56
|
+
- **`execute-flow` Gate 1 pre-flight missing `playwright.config.ts` check** — Original Gate 1 had 3 checks; spec required 4. Added explicit check for `ak-test/{repo}/playwright.config.ts` with offer to scaffold from template.
|
|
57
|
+
- **`screenId` casing ambiguity in execute-flow/script-sync** — Directory paths use lowercase `screenId` (e.g. `ad10`); spec file names remain uppercase `{ScreenID}.spec.ts` (e.g. `AD10.spec.ts`). Both skills now explicitly document this distinction with examples to prevent AI from using wrong case.
|
|
58
|
+
- **`--reporter` CLI flag overriding config reporters** — Gate 3 run command previously included `--reporter=json,html` which overrides (not appends) reporters defined in `playwright.config.ts`, causing the HTML report to be replaced entirely. Removed the flag; reporters are now defined solely in `playwright.config.ts`.
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
10
62
|
## [0.1.2] - 2026-06-13
|
|
11
63
|
|
|
12
64
|
### Added
|
|
@@ -358,6 +358,31 @@ aiflow use PROJ-88
|
|
|
358
358
|
claude # AI auto-starts: map dependencies → assess risk → output report
|
|
359
359
|
```
|
|
360
360
|
|
|
361
|
+
### Execute Tests (QA Tester)
|
|
362
|
+
|
|
363
|
+
Run existing test cases with Playwright — sync scripts, execute, collect evidence, and generate report.
|
|
364
|
+
|
|
365
|
+
**Entry point 1: from a ticket** (ticket `type` must be `"execute"`)
|
|
366
|
+
|
|
367
|
+
```bash
|
|
368
|
+
aiflow use PROJ-44 # loads ticket with taskType "execute"
|
|
369
|
+
claude # AI auto-starts execute-flow Gate 1 (pre-flight check)
|
|
370
|
+
```
|
|
371
|
+
|
|
372
|
+
**Entry point 2: from a TC file**
|
|
373
|
+
|
|
374
|
+
```bash
|
|
375
|
+
ak execute ./testcases/AD10.md # AI starts execute-flow with this TC file
|
|
376
|
+
```
|
|
377
|
+
|
|
378
|
+
**Entry point 3: manual**
|
|
379
|
+
|
|
380
|
+
```bash
|
|
381
|
+
ak execute # AI asks: "TC file ở đâu?"
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
Output lands in `ak-test/{repo}/results/{screenId}/run-{N}/` — never deleted between runs.
|
|
385
|
+
|
|
361
386
|
### Figma Design → Code
|
|
362
387
|
|
|
363
388
|
Turn a Figma design into a React / Next.js / Vue / Angular component automatically.
|
|
@@ -414,6 +439,11 @@ ak g -f # architecture diagram (ak guide
|
|
|
414
439
|
ak g -c # command reference (ak guide --commands)
|
|
415
440
|
ak sync # sync aiflow instruction files (ak sync-skills)
|
|
416
441
|
|
|
442
|
+
# Execute flow (QA Tester)
|
|
443
|
+
ak execute PROJ-44 # execute từ ticket (taskType phải là "execute")
|
|
444
|
+
ak execute ./testcases/AD10.md # execute từ TC file
|
|
445
|
+
ak execute # execute manual (AI hỏi TC file)
|
|
446
|
+
|
|
417
447
|
# Per task
|
|
418
448
|
ak use PROJ-33 # load context (Fast Mode, default) — alias: ak u PROJ-33
|
|
419
449
|
ak use PROJ-33 PROJ-10 docs/arch.md # multi-target: primary + supplementary (v0.1.0+)
|
|
@@ -17,13 +17,13 @@ ak <alias> --help # Also works with aliases
|
|
|
17
17
|
| Full command | Short | Full command | Short |
|
|
18
18
|
|---|---|---|---|
|
|
19
19
|
| `ak init` | `ak i` | `ak use` | `ak u` |
|
|
20
|
-
| `ak
|
|
21
|
-
| `ak
|
|
22
|
-
| `ak
|
|
23
|
-
| `ak
|
|
24
|
-
| `ak
|
|
25
|
-
| `ak
|
|
26
|
-
| `ak
|
|
20
|
+
| `ak execute` | `ak ex` | `ak prompt` | `ak p` |
|
|
21
|
+
| `ak detect` | `ak d` | `ak task` | `ak t` |
|
|
22
|
+
| `ak context` | `ak ctx` | `ak checkpoint` | `ak cp` |
|
|
23
|
+
| `ak validate` | `ak vl` | `ak memory` | `ak mem` |
|
|
24
|
+
| `ak guide` | `ak g` | `ak remove` | `ak rm` |
|
|
25
|
+
| `ak update` | `ak up` | `ak sync-skills` | `ak sync` |
|
|
26
|
+
| `ak doctor` | `ak dr` | `ak telemetry` | `ak tel` |
|
|
27
27
|
|
|
28
28
|
| `task` sub-command | Short | `memory` sub-command | Short |
|
|
29
29
|
|---|---|---|---|
|
|
@@ -156,6 +156,47 @@ $ aiflow use PROJ-33 PROJ-10 docs/arch.md
|
|
|
156
156
|
✓ Auto-resolved 2 link(s) from description
|
|
157
157
|
```
|
|
158
158
|
|
|
159
|
+
## execute (alias: `ex`)
|
|
160
|
+
|
|
161
|
+
Execute test cases via the 4-gate Executing Flow. Syncs Playwright scripts, runs them, collects evidence, and generates a test report.
|
|
162
|
+
|
|
163
|
+
```bash
|
|
164
|
+
ak execute PROJ-44 # from ticket (taskType must be "execute")
|
|
165
|
+
ak execute ./testcases/AD10.md # from TC file
|
|
166
|
+
ak execute # manual — AI asks for TC file
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
**Arguments:**
|
|
170
|
+
- `[target]` — Optional. A ticket ID (`PROJ-44`), a path to a TC file (`./testcases/AD10.md`), or omitted for manual entry.
|
|
171
|
+
|
|
172
|
+
**What it does (4 gates):**
|
|
173
|
+
1. **Gate 1 — Pre-flight:** Parse TC file, verify `ak-test/{repo}/` and `playwright.config.ts` exist, check `BASE_URL`
|
|
174
|
+
2. **Gate 2 — Script Sync:** Hash-based sync — gen new TCs, update changed, skip unchanged. Uses Playwright MCP for real selectors (never fabricates).
|
|
175
|
+
3. **Gate 3 — Execute & Evidence:** Run Playwright, organize evidence into `run-{N}/`, update TC file R1/R2 columns (`✅ Pass` · `❌ Fail` · `⏭️ Untest` · `⏳ Pending`)
|
|
176
|
+
4. **Gate 4 — Report & Bug Logging:** Generate `testreport.md`, confirm each bug with TESTER before logging to Jira
|
|
177
|
+
|
|
178
|
+
**Output structure:**
|
|
179
|
+
```
|
|
180
|
+
ak-test/{repo}/
|
|
181
|
+
├── scripts/{screenId}/{ScreenID}.spec.ts
|
|
182
|
+
└── results/{screenId}/run-{N}/
|
|
183
|
+
├── {TC_ID}-{scenario}/ (screenshots, trace.zip, result.md)
|
|
184
|
+
├── bugs/BUG-NNN-{slug}.md
|
|
185
|
+
└── testreport.md
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
**Example:**
|
|
189
|
+
```bash
|
|
190
|
+
$ ak execute ./testcases/AD10.md
|
|
191
|
+
⏸️ GATE 1: EXECUTE FLOW READY
|
|
192
|
+
TC file: testcases/AD10.md
|
|
193
|
+
Repo: repo-fe | Screen: AD10 — Create Product
|
|
194
|
+
BASE_URL: http://localhost:3000
|
|
195
|
+
→ Type APPROVED to sync scripts (Gate 2)
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
---
|
|
199
|
+
|
|
159
200
|
## fetch-links
|
|
160
201
|
|
|
161
202
|
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.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@relipa/ai-flow-kit",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4-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": "Example Team",
|
|
6
6
|
"publishConfig": {
|
|
@@ -65,4 +65,4 @@
|
|
|
65
65
|
"<rootDir>/tests/**/*.test.js"
|
|
66
66
|
]
|
|
67
67
|
}
|
|
68
|
-
}
|
|
68
|
+
}
|