@educa-corp/sdd-framework 0.6.0 → 0.7.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/bin/gate-trace.js +25 -2
- package/bin/index.js +32 -5
- package/bin/lint-trace.js +41 -0
- package/bin/self-check.js +430 -3
- package/bin/trace-schema.json +391 -30
- package/core/FRAMEWORK_VERSION +1 -1
- package/{commands/extend-prd.md → core/commands/amend-prd.md} +205 -173
- package/core/commands/dev-run-test.md +47 -9
- package/core/commands/extend-prd.md +39 -12
- package/core/commands/generate-bdd.md +43 -4
- package/core/commands/generate-code.md +33 -0
- package/core/commands/generate-tech-docs.md +34 -2
- package/core/commands/qc-run-test.md +29 -3
- package/core/commands/refine-prd.md +13 -2
- package/core/commands/review-context.md +43 -8
- package/core/commands/sync.md +105 -1
- package/core/commands/validate-traces.md +284 -11
- package/core/rules/workflow.md +34 -0
- package/core/steps/context-loader.md +26 -5
- package/core/templates/feature.template +1 -1
- package/docs/02-concepts/architecture.md +36 -0
- package/docs/04-reference/commands.md +148 -134
- package/docs/04-reference/trace-schema.md +39 -0
- package/docs/explain/02b-extend-prd.md +1 -1
- package/docs/explain/02c-amend-prd.md +152 -0
- package/docs/explain/28-sync.md +25 -0
- package/docs/explain/README.md +136 -135
- package/package.json +1 -8
- package/commands/debug.md +0 -529
- package/commands/debug.tmpl +0 -260
- package/commands/define-product.md +0 -438
- package/commands/define-product.tmpl +0 -225
- package/commands/dev-gen-test.md +0 -700
- package/commands/dev-gen-test.tmpl +0 -490
- package/commands/dev-run-test.md +0 -435
- package/commands/dev-run-test.tmpl +0 -225
- package/commands/dev-smoke-test.md +0 -374
- package/commands/dev-smoke-test.tmpl +0 -217
- package/commands/extend-prd.tmpl +0 -273
- package/commands/fix-bug.md +0 -519
- package/commands/fix-bug.tmpl +0 -197
- package/commands/generate-architecture.md +0 -354
- package/commands/generate-architecture.tmpl +0 -197
- package/commands/generate-bdd.md +0 -923
- package/commands/generate-bdd.tmpl +0 -590
- package/commands/generate-code.md +0 -859
- package/commands/generate-code.tmpl +0 -649
- package/commands/generate-design-spec.md +0 -737
- package/commands/generate-design-spec.tmpl +0 -524
- package/commands/generate-prd.md +0 -722
- package/commands/generate-prd.tmpl +0 -226
- package/commands/generate-spec-manifest.md +0 -321
- package/commands/generate-spec-manifest.tmpl +0 -164
- package/commands/generate-tech-docs.md +0 -920
- package/commands/generate-tech-docs.tmpl +0 -273
- package/commands/learn.md +0 -399
- package/commands/learn.tmpl +0 -130
- package/commands/map-testids.md +0 -238
- package/commands/map-testids.tmpl +0 -81
- package/commands/propose-scenario.md +0 -359
- package/commands/propose-scenario.tmpl +0 -202
- package/commands/qc-analyze.md +0 -269
- package/commands/qc-analyze.tmpl +0 -112
- package/commands/qc-design-test.md +0 -226
- package/commands/qc-design-test.tmpl +0 -69
- package/commands/qc-plan.md +0 -206
- package/commands/qc-plan.tmpl +0 -49
- package/commands/qc-report.md +0 -217
- package/commands/qc-report.tmpl +0 -60
- package/commands/qc-review.md +0 -210
- package/commands/qc-review.tmpl +0 -53
- package/commands/qc-run-test.md +0 -326
- package/commands/qc-run-test.tmpl +0 -116
- package/commands/refine-prd.md +0 -653
- package/commands/refine-prd.tmpl +0 -281
- package/commands/report-bug.md +0 -305
- package/commands/report-bug.tmpl +0 -148
- package/commands/review-code.md +0 -415
- package/commands/review-code.tmpl +0 -146
- package/commands/review-context.md +0 -902
- package/commands/review-context.tmpl +0 -530
- package/commands/review-tech-docs.md +0 -561
- package/commands/review-tech-docs.tmpl +0 -404
- package/commands/setup-ai-first.md +0 -602
- package/commands/setup-ai-first.tmpl +0 -450
- package/commands/sync.md +0 -430
- package/commands/sync.tmpl +0 -429
- package/commands/update-framework.md +0 -203
- package/commands/update-framework.tmpl +0 -202
- package/commands/validate-traces.md +0 -1077
- package/commands/validate-traces.tmpl +0 -920
- package/hooks/data-guard.js +0 -232
- package/hooks/settings.json +0 -19
- package/modules/android-compose/module.yaml +0 -13
- package/modules/android-compose/stack-profile.yaml +0 -57
- package/modules/angular/architecture-snippets/component-patterns.md +0 -187
- package/modules/angular/module.yaml +0 -6
- package/modules/angular/stack-profile.yaml +0 -38
- package/modules/context-engineering/architecture-snippets/context-design.md +0 -119
- package/modules/context-engineering/module.yaml +0 -9
- package/modules/context-engineering/stack-profile.yaml +0 -61
- package/modules/dotnet/architecture-snippets/clean-arch.md +0 -160
- package/modules/dotnet/module.yaml +0 -6
- package/modules/dotnet/stack-profile.yaml +0 -50
- package/modules/flutter/module.yaml +0 -14
- package/modules/flutter/stack-profile.yaml +0 -59
- package/modules/golang/architecture-snippets/domain-layout.md +0 -283
- package/modules/golang/module.yaml +0 -6
- package/modules/golang/stack-profile.yaml +0 -40
- package/modules/ios-swiftui/module.yaml +0 -13
- package/modules/ios-swiftui/stack-profile.yaml +0 -55
- package/modules/java-spring/architecture-snippets/layered-arch.md +0 -201
- package/modules/java-spring/module.yaml +0 -15
- package/modules/java-spring/stack-profile.yaml +0 -28
- package/modules/nextjs/architecture-snippets/app-router-patterns.md +0 -269
- package/modules/nextjs/module.yaml +0 -14
- package/modules/nextjs/stack-profile.yaml +0 -74
- package/modules/nuxt/module.yaml +0 -14
- package/modules/nuxt/stack-profile.yaml +0 -58
- package/modules/phaser-game/architecture-snippets/phaser-scene-patterns.md +0 -646
- package/modules/phaser-game/module.yaml +0 -15
- package/modules/phaser-game/stack-profile.yaml +0 -90
- package/modules/php-laravel/architecture-snippets/service-repository.md +0 -302
- package/modules/php-laravel/module.yaml +0 -15
- package/modules/php-laravel/stack-profile.yaml +0 -56
- package/modules/qc-playwright/stack-profile.yaml +0 -66
- package/modules/react/architecture-snippets/hooks-query-patterns.md +0 -254
- package/modules/react/module.yaml +0 -14
- package/modules/react/stack-profile.yaml +0 -63
- package/modules/react-native/module.yaml +0 -14
- package/modules/react-native/stack-profile.yaml +0 -56
- package/modules/vue/module.yaml +0 -14
- package/modules/vue/stack-profile.yaml +0 -65
- package/rules/data-protection.md +0 -80
- package/rules/workflow.md +0 -99
- package/skills/code/SKILL.md +0 -19
- package/skills/code/SKILL.tmpl +0 -19
- package/skills/debug/SKILL.md +0 -19
- package/skills/debug/SKILL.tmpl +0 -19
- package/skills/design-spec/SKILL.md +0 -11
- package/skills/design-spec/SKILL.tmpl +0 -11
- package/skills/discovery/SKILL.md +0 -14
- package/skills/discovery/SKILL.tmpl +0 -14
- package/skills/prd/SKILL.md +0 -19
- package/skills/prd/SKILL.tmpl +0 -19
- package/skills/qc/qa-analyst/DOC_GAPS.template.md +0 -63
- package/skills/qc/qa-analyst/acceptance-criteria.md +0 -60
- package/skills/qc/qa-analyst/business-rules.md +0 -59
- package/skills/qc/qa-analyst/data-flow.md +0 -64
- package/skills/qc/qa-analyst/spec-breakdown.md +0 -61
- package/skills/qc/qa-designer/e2e/journey.md +0 -41
- package/skills/qc/qa-designer/exploratory/charter.md +0 -68
- package/skills/qc/qa-designer/exploratory/explore-to-functional.md +0 -43
- package/skills/qc/qa-designer/functional/api.md +0 -45
- package/skills/qc/qa-designer/functional/gui-feature.md +0 -46
- package/skills/qc/qa-designer/functional/gui-screen.md +0 -52
- package/skills/qc/qa-designer/integration/api.md +0 -42
- package/skills/qc/qa-designer/integration/db.md +0 -39
- package/skills/qc/qa-designer/integration/gui.md +0 -40
- package/skills/qc/qa-designer/integration/kafka.md +0 -40
- package/skills/qc/qa-designer/non-functional.md +0 -40
- package/skills/qc/qa-planner/test-plan.md +0 -120
- package/skills/qc/qa-reviewer/script/e2e.md +0 -87
- package/skills/qc/qa-reviewer/script/exploratory.md +0 -45
- package/skills/qc/qa-reviewer/script/functional.md +0 -101
- package/skills/qc/qa-reviewer/script/integration.md +0 -91
- package/skills/qc/qa-reviewer/script/non-functional.md +0 -126
- package/skills/qc/qa-reviewer/test-case/e2e.md +0 -73
- package/skills/qc/qa-reviewer/test-case/exploratory.md +0 -43
- package/skills/qc/qa-reviewer/test-case/functional.md +0 -76
- package/skills/qc/qa-reviewer/test-case/integration.md +0 -69
- package/skills/qc/qa-reviewer/test-case/non-functional.md +0 -73
- package/skills/qc/qa-runner/e2e.md +0 -49
- package/skills/qc/qa-runner/exploratory/session.md +0 -36
- package/skills/qc/qa-runner/functional/api.md +0 -35
- package/skills/qc/qa-runner/functional/gui-feature.md +0 -51
- package/skills/qc/qa-runner/functional/gui-screen.md +0 -55
- package/skills/qc/qa-runner/integration.md +0 -47
- package/skills/qc/qa-runner/non-functional.md +0 -49
- package/skills/qc/qa-runner/report/report.md +0 -37
- package/skills/setup-ai-first/SKILL.md +0 -19
- package/skills/setup-ai-first/SKILL.tmpl +0 -19
- package/skills/spec/SKILL.md +0 -19
- package/skills/spec/SKILL.tmpl +0 -19
- package/skills/test/SKILL.md +0 -18
- package/skills/test/SKILL.tmpl +0 -18
- package/steps/business-language.md +0 -56
- package/steps/capture-lesson.md +0 -112
- package/steps/context-loader.md +0 -406
- package/steps/gate.md +0 -151
- package/steps/report-footer.md +0 -125
- package/steps/review-fanout.md +0 -159
- package/steps/spawn-agent.md +0 -129
- package/steps/trace-mirror.md +0 -53
- package/templates/README.md +0 -70
- package/templates/architecture.template.md +0 -394
- package/templates/ci/trace-gate.yml +0 -146
- package/templates/design-spec.template.md +0 -217
- package/templates/feature.template +0 -123
- package/templates/hooks/pre-push +0 -61
- package/templates/platform-guide.template.md +0 -145
- package/templates/prd.template.md +0 -283
- package/templates/product-definition.template.md +0 -188
- package/templates/project-context.yaml +0 -212
- package/templates/tech-design.template.md +0 -490
|
@@ -1,374 +0,0 @@
|
|
|
1
|
-
# /dev-smoke-test — Smoke Test Service hoặc App đang chạy
|
|
2
|
-
|
|
3
|
-
Dùng khi service/app **đang chạy sẵn**. Khác `/dev-run-test` (không cần live server).
|
|
4
|
-
|
|
5
|
-
## Gate
|
|
6
|
-
# Gate — Quy trình vào chuẩn cho mọi lệnh
|
|
7
|
-
|
|
8
|
-
Mọi lệnh PHẢI chạy gate này trước khi thực thi phần logic riêng của nó.
|
|
9
|
-
|
|
10
|
-
## Bước 0 — Kiểm tra chế độ Sub-Agent
|
|
11
|
-
|
|
12
|
-
Trước tiên, kiểm tra xem `$ARGUMENTS` có phải là payload JSON từ một orchestrator hay không:
|
|
13
|
-
|
|
14
|
-
1. Thử parse `$ARGUMENTS` dưới dạng JSON.
|
|
15
|
-
2. Nếu parse thành công **và** chứa `"_agent_mode": true`:
|
|
16
|
-
- **Bỏ qua hoàn toàn Bước 1, 2 và 3 của Gate này.**
|
|
17
|
-
- Đặt target file = `payload.target_file`
|
|
18
|
-
- Đặt loaded context = `payload.context` (KHÔNG chạy context-loader.md)
|
|
19
|
-
- Đặt phạm vi UC = `payload.uc_id` (chỉ xử lý UC này)
|
|
20
|
-
- Đặt line range = `payload.uc_section` (chỉ đọc đúng section đó của PRD)
|
|
21
|
-
- Đặt dimension = `payload.dimension` nếu có (lệnh review per-UC: chỉ review đúng lăng kính này)
|
|
22
|
-
- Đi thẳng tới phần logic riêng của lệnh.
|
|
23
|
-
3. Nếu `$ARGUMENTS` không phải JSON hoặc không có `_agent_mode` → tiếp tục sang Bước 1 (chế độ thường).
|
|
24
|
-
|
|
25
|
-
## Bước 0-B — Ghi nhận Model *(KHÔNG chặn)*
|
|
26
|
-
|
|
27
|
-
*Bỏ qua nếu `_agent_mode: true` (sub-agent — orchestrator đã ghi nhận rồi).*
|
|
28
|
-
|
|
29
|
-
Ghi lại **model mà bạn — agent đang chạy lệnh này — thực sự đang dùng**, rồi mang nó vào
|
|
30
|
-
dòng `Model:` của report cuối (xem `report-footer`). Nếu bạn biết mình **không** phải một
|
|
31
|
-
model Opus, gắn thêm cảnh báo ngay ở dòng đó.
|
|
32
|
-
|
|
33
|
-
**KHÔNG hỏi người dùng. KHÔNG chờ. KHÔNG dừng.**
|
|
34
|
-
|
|
35
|
-
> **Vì sao bước này từng là prompt chặn, và vì sao bỏ (GAPS-v3 G41):** bản cũ hiện khối
|
|
36
|
-
> `⚙️ MODEL CHECK` rồi chờ `Y/S/N`. Ba vấn đề cùng chỉ một hướng:
|
|
37
|
-
> **(1)** nó hỏi người dùng thứ mà **agent đã biết chính xác**;
|
|
38
|
-
> **(2)** câu trả lời **không kiểm chứng được** — gõ `Y` xong vẫn đang chạy Haiku thì không
|
|
39
|
-
> gì phát hiện;
|
|
40
|
-
> **(3)** **cả `Y` lẫn `S` đều đi tiếp** — cách duy nhất để nó dừng là tự nguyện gõ `N`.
|
|
41
|
-
> Tức nó **không chặn được ai**, mà tốn một lần chặn ở **mọi** lệnh. Một feature đi hết
|
|
42
|
-
> pipeline dùng 20 lệnh; 30/32 lệnh chạy gate. Hai mươi lần bấm cho một tín hiệu tự-khai
|
|
43
|
-
> không kiểm chứng được — và chính cái giá đó làm mòn CHECKPOINT ở Bước 3, cổng có giá trị thật.
|
|
44
|
-
>
|
|
45
|
-
> Khai báo trong report **mạnh hơn** hỏi: đúng nguồn (agent, không phải người), và nằm
|
|
46
|
-
> **cạnh kết quả** để cân nhắc, thay vì nằm trước khi có kết quả để bấm cho xong.
|
|
47
|
-
|
|
48
|
-
**Vẫn khuyến nghị Opus:** phân tích spec, review kiến trúc và sinh code đòi hỏi suy luận sâu;
|
|
49
|
-
model nhỏ hơn dễ bỏ sót edge case và vi phạm kiến trúc. Đổi: `/model` → chọn Opus.
|
|
50
|
-
|
|
51
|
-
## Bước 1 — Xác định Target File
|
|
52
|
-
|
|
53
|
-
0. **Tách cờ trước khi resolve target.** `$ARGUMENTS` có thể lẫn các `--flag` (vd `--phase=integration`, `--comment`, `--fix`). **Loại bỏ mọi token bắt đầu bằng `--`** ra khỏi phần dùng để tìm target — chỉ giữ phần path/UC-ID/ticket. (Các flag đó do phần logic riêng của lệnh parse ở bước sau, KHÔNG phải tên file.)
|
|
54
|
-
1. Nếu `$ARGUMENTS` (đã tách cờ) được cung cấp và trỏ tới một file tồn tại → dùng trực tiếp làm target.
|
|
55
|
-
2. Nếu `$ARGUMENTS` là một **UC-ID / ticket ID / tên rút gọn** (không có path) → phân giải thành file bằng cách glob theo bố cục feature-package. `{prd-slug}` lúc này **chưa biết**, nên dùng wildcard `*` cho segment đó, và `**` đệ quy dưới `bdd/` để phủ hết các thư mục con theo platform (`bdd/web/`, `bdd/app/`, `bdd/system/`):
|
|
56
|
-
- **Lệnh BDD** (target là `.feature`): `{specs_dir}/{domain}/*/bdd/**/{UC-ID}*.feature` — hoặc `{specs_dir}/*/*/bdd/**/{UC-ID}*.feature` nếu domain cũng chưa biết. Nếu lệnh ngụ ý một platform/scope cụ thể (vd: system tech-doc cần BDD `system/`), ưu tiên kết quả trong thư mục con platform đó.
|
|
57
|
-
- **Lệnh PRD** (target là file PRD `{TICKET-ID}-{prd-slug}.md` — file `.md` duy nhất ở gốc feature folder, cạnh `bdd/`): `{specs_dir}/{domain}/*/{TICKET-ID}*.md` nếu biết TICKET-ID; nếu không, `{specs_dir}/{domain}/*/*.md` (khớp feature folder có id tương ứng), hoặc `{specs_dir}/*/*/*.md` nếu domain cũng chưa biết. *(Glob `*/*.md` ở cấp gốc folder chỉ khớp PRD — tech-docs/design-spec `.md` nằm sâu hơn trong thư mục con.)*
|
|
58
|
-
- **Lệnh tech-docs** — target là tech-doc **gộp cấp PRD** `{TICKET-ID}-tech-design.md` (MỘT doc phủ nhiều UC; danh sách UC nằm ở `@trace.ucs`). Vì tên file mang `{TICKET-ID}` chứ **không** mang `{UC-ID}`, phải tách trước khi glob:
|
|
59
|
-
- `$ARGUMENTS` là **UC-ID** (`{TICKET-ID}-UC{N}`) → lấy `{TICKET-ID}` = phần **trước** `-UC`, rồi glob `{specs_dir}/{domain}/*/tech-docs/{TICKET-ID}-tech-design.md`.
|
|
60
|
-
- `$ARGUMENTS` là **TICKET-ID** → glob trực tiếp như trên.
|
|
61
|
-
- Chưa biết domain → `{specs_dir}/*/*/tech-docs/{TICKET-ID}-tech-design.md`.
|
|
62
|
-
- Vẫn không khớp → glob rộng `{specs_dir}/*/*/tech-docs/*tech-design*.md` rồi liệt kê để người dùng chọn.
|
|
63
|
-
*(Đừng glob `{UC-ID}*-tech-design*.md` — nó nở thành `FT-001-UC1*-tech-design*.md` và **không bao giờ** khớp `FT-001-tech-design.md`.)*
|
|
64
|
-
- **Lệnh design-spec**: `{specs_dir}/{domain}/*/design-spec/{TICKET-ID}*.md`.
|
|
65
|
-
|
|
66
|
-
Khi một file khớp: đặt nó làm target **và** ghi lại `domain` + `prd_slug` từ path của nó (theo quy tắc trích xuất trong `context-loader.md` Bước 1 — `prd_slug` = segment đầu tiên sau `{specs_dir}/{domain}/`). Mọi path mà lệnh đọc/ghi về sau (BDD/tech-docs/design-spec/trace cùng cấp) đều dùng **`prd_slug` đã phân giải đó**, nên tất cả artifact nằm chung một feature package. Nếu nhiều file khớp (vd: nhiều platform), chọn theo platform/scope của lệnh hoặc liệt kê ra và hỏi.
|
|
67
|
-
3. Nếu `$ARGUMENTS` rỗng hoặc không tìm thấy file khớp:
|
|
68
|
-
- Liệt kê các file trong thư mục liên quan của lệnh này (vd: `specs/*/*/*.md` — file PRD ở gốc mỗi feature folder — cho lệnh PRD, `specs/*/*/bdd/**/*.feature` cho lệnh BDD).
|
|
69
|
-
- Hiển thị danh sách cho người dùng và hỏi: "Bạn muốn làm việc với file nào? (Nhập số thứ tự hoặc tên file)"
|
|
70
|
-
- Chờ người dùng chọn rồi mới tiếp tục.
|
|
71
|
-
|
|
72
|
-
## Bước 2 — Chạy Context Loader
|
|
73
|
-
|
|
74
|
-
Nạp toàn bộ context của dự án bằng cách làm theo quy trình trong `steps/context-loader.md`.
|
|
75
|
-
Lưu toàn bộ context đã nạp vào bộ nhớ để dùng xuyên suốt phiên làm việc của lệnh.
|
|
76
|
-
|
|
77
|
-
## Bước 3 — CHECKPOINT
|
|
78
|
-
|
|
79
|
-
*Bỏ qua nếu `_agent_mode: true`.*
|
|
80
|
-
|
|
81
|
-
### 3a — Lệnh này có phải chặn không?
|
|
82
|
-
|
|
83
|
-
| Mức | Lệnh nào | `--yes` bỏ qua được? |
|
|
84
|
-
|---|---|:---:|
|
|
85
|
-
| **Không chặn** | Lệnh read-only: `/review-code` · `/validate-traces` · `/debug` · `/review-context` · `/review-tech-docs` | — (vốn không có) |
|
|
86
|
-
| **Chặn thường** | Mọi lệnh sinh/sửa artifact | ✅ |
|
|
87
|
-
| **Chặn CỨNG** | Ghi đè file đã tồn tại · `--resume` áp findings · migrate · prune | ❌ **không bao giờ** |
|
|
88
|
-
|
|
89
|
-
`--yes` trong `$ARGUMENTS` → bỏ qua CHECKPOINT mức *chặn thường*. (Bước 1 đã tách mọi token
|
|
90
|
-
`--` khỏi phần resolve target, nên cờ này không ảnh hưởng việc tìm file.) Mở đường chạy
|
|
91
|
-
headless: `claude -p "/generate-code UC1 --yes"`.
|
|
92
|
-
|
|
93
|
-
> **KHÔNG tự suy mức từ bảng này.** Mỗi lệnh **tự khai** mức của nó ở một dòng `*Checkpoint: …*`
|
|
94
|
-
> ngay dưới `## Gate` của chính nó — đọc dòng đó, đừng suy diễn. Bảng trên chỉ giải thích ba mức
|
|
95
|
-
> **nghĩa là gì**.
|
|
96
|
-
> Nguồn máy đọc: `bin/trace-schema.json` → `gate.checkpoint_levels`; `self-check` **R11** fail
|
|
97
|
-
> build nếu nhãn trong file lệnh lệch với schema, hoặc nếu một lệnh `hard`/`none` thiếu nhãn.
|
|
98
|
-
> *(Lệnh không có dòng nào = mức **chặn thường**, mặc định.)*
|
|
99
|
-
|
|
100
|
-
> **Mức *không chặn* là thực thi đúng miễn trừ mà `rules/workflow.md` đã cấp từ trước** —
|
|
101
|
-
> trước G41 file đó viết *"read-only commands may skip CHECKPOINT"* còn gate thì luôn đòi.
|
|
102
|
-
> Hai file cùng được nạp vào mọi lệnh mà nói ngược nhau; agent theo cái nào là tuỳ lúc.
|
|
103
|
-
|
|
104
|
-
### 3b — In gì
|
|
105
|
-
|
|
106
|
-
**KHÔNG lặp lại những gì `[CTX LOADED]` vừa in.** Recap của context-loader (Bước 7) đã hiện
|
|
107
|
-
Stack · Platform · Layers · CLAUDE.md · Dict · Entities · Lessons · Service · Status ngay phía
|
|
108
|
-
trên. CHECKPOINT chỉ thêm **một** thông tin mới là `Target`.
|
|
109
|
-
|
|
110
|
-
**Mọi thứ sạch** — recap báo `Status: FULL`, không cờ nào bật → in đúng hai dòng:
|
|
111
|
-
|
|
112
|
-
```
|
|
113
|
-
CHECKPOINT — Target: {resolved file path}
|
|
114
|
-
Tiếp tục? (Y/N)
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
**Có bất thường** → thêm một dòng cho **mỗi** trạng thái, nặng nhất lên đầu:
|
|
118
|
-
|
|
119
|
-
```
|
|
120
|
-
CHECKPOINT
|
|
121
|
-
🔴 Service : unresolved — {lý do context-loader đã ghi}
|
|
122
|
-
⚠️ CLAUDE.md: service overlay THIẾU — dùng root (code sinh ra có thể sai stack)
|
|
123
|
-
⚠️ Target : resolve bằng wildcard — {n} file khớp, chọn {file}
|
|
124
|
-
⚠️ Module : not configured — code sinh ra sẽ dùng default
|
|
125
|
-
Status : PARTIAL — thiếu: {danh sách}
|
|
126
|
-
Target : {resolved file path}
|
|
127
|
-
Tiếp tục? (Y/N)
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
### 3c — Cờ nào bật, cờ nào KHÔNG
|
|
131
|
-
|
|
132
|
-
Mỗi dòng ⚠️/🔴 phải ứng với một trạng thái **context-loader đã tính rồi** — không phát minh
|
|
133
|
-
điều kiện mới, chỉ mang thứ đang bị giấu lên chỗ người dùng phải quyết định:
|
|
134
|
-
|
|
135
|
-
| Bật cờ khi | Nguồn | Mức |
|
|
136
|
-
|---|---|:---:|
|
|
137
|
-
| `active_service = unresolved` | context-loader Bước 2b/2c/Fallback | 🔴 |
|
|
138
|
-
| `Status = MINIMAL` | recap Bước 7 | 🔴 |
|
|
139
|
-
| `Status = PARTIAL` | recap Bước 7 | ⚠️ |
|
|
140
|
-
| CLAUDE.md thiếu, hoặc service overlay thiếu | context-loader Bước 3 | ⚠️ |
|
|
141
|
-
| Target resolve qua wildcard, hoặc nhiều file khớp mà lệnh tự chọn | Bước 1 ở trên | ⚠️ |
|
|
142
|
-
| `module` không cấu hình | recap Bước 7 | ⚠️ |
|
|
143
|
-
|
|
144
|
-
**KHÔNG bật cờ cho:** `Lessons: chưa có` · `Dict: missing` · `Entities: missing`. Đó là
|
|
145
|
-
*"dự án chưa điền"*, không phải *"có gì đó sai"* — chúng ở lại trong recap.
|
|
146
|
-
|
|
147
|
-
> **Nguyên tắc một câu:** cờ dành cho thứ **framework không chắc chắn hoặc đã phải đoán**,
|
|
148
|
-
> không dành cho thứ **người dùng chưa làm**. Đẩy hết mọi thứ lên thì CHECKPOINT lại đầy như
|
|
149
|
-
> cũ, và ta quay về đúng chỗ xuất phát: một cổng luôn giống nhau thì bị lướt qua.
|
|
150
|
-
|
|
151
|
-
### 3d — Chờ trả lời
|
|
152
|
-
|
|
153
|
-
- "Y" → tiếp tục sang các bước riêng của lệnh.
|
|
154
|
-
- "N" → dừng, hỏi người dùng muốn thay đổi gì.
|
|
155
|
-
- Có `--yes` và mức *chặn thường* → coi như "Y", **nhưng vẫn IN khối CHECKPOINT** nếu có cờ
|
|
156
|
-
🔴/⚠️ (không chặn ≠ không báo — người đọc log sau này vẫn cần thấy).
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
*Lưu ý: Với lệnh này, target ở Bước 1 là một UC-ID từ `$ARGUMENTS`. Context loading cung cấp `conventions.service_run`, thông tin port, và `tech_stack.module`.*
|
|
160
|
-
|
|
161
|
-
## Context
|
|
162
|
-
**BẮT BUỘC — đọc `.agent/steps/context-loader.md` và thực thi TOÀN BỘ quy trình trong đó**,
|
|
163
|
-
rồi mới tiếp tục phần bên dưới.
|
|
164
|
-
|
|
165
|
-
Bỏ qua bước này thì `{paths.*}`, `{tech_stack.*}`, `{conventions.*}`, guardrail từ
|
|
166
|
-
`project-lessons`, và routing service (chế độ umbrella) đều **chưa được phân giải** — mọi
|
|
167
|
-
placeholder bên dưới sẽ rỗng và lệnh sẽ đọc/ghi sai chỗ.
|
|
168
|
-
|
|
169
|
-
---
|
|
170
|
-
|
|
171
|
-
## Service Detection
|
|
172
|
-
|
|
173
|
-
Đọc `active_module` từ context. Dùng để chọn đúng cách dev-smoke-test.
|
|
174
|
-
|
|
175
|
-
| Platform | Modules |
|
|
176
|
-
|---|---|
|
|
177
|
-
| `backend` | `java-spring`, `golang`, `dotnet`, `php-laravel`, `context-engineering` |
|
|
178
|
-
| `web-frontend` | `react`, `nextjs`, `vue`, `nuxt`, `angular` |
|
|
179
|
-
| `mobile` | `flutter`, `react-native`, `ios-swiftui`, `android-compose` |
|
|
180
|
-
|
|
181
|
-
---
|
|
182
|
-
|
|
183
|
-
## Nếu `platform_type = backend`
|
|
184
|
-
|
|
185
|
-
### Phase 1 — Xác minh service đang chạy
|
|
186
|
-
|
|
187
|
-
Đọc `conventions.service_run` từ project-context.yaml để xác định port.
|
|
188
|
-
|
|
189
|
-
```bash
|
|
190
|
-
# Try common health endpoints (use whichever applies):
|
|
191
|
-
curl -s http://localhost:{port}/health # generic / Go / Node
|
|
192
|
-
curl -s http://localhost:{port}/actuator/health # Spring Boot
|
|
193
|
-
curl -s http://localhost:{port}/ping # some frameworks
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
Nếu chưa chạy → "Khởi động với `{conventions.service_run}` từ project root."
|
|
197
|
-
|
|
198
|
-
### Phase 2 — Xác định endpoint
|
|
199
|
-
|
|
200
|
-
Từ UC-ID → tìm controller/handler có `@trace.implements={UC-ID}`.
|
|
201
|
-
Liệt kê: method, path, auth/role bắt buộc.
|
|
202
|
-
|
|
203
|
-
### Phase 3 — Lấy auth token (nếu cần)
|
|
204
|
-
|
|
205
|
-
```
|
|
206
|
-
Endpoint yêu cầu auth. Lựa chọn:
|
|
207
|
-
1. Dán Bearer token (từ Postman/DevTools)
|
|
208
|
-
2. Dùng test/dev token từ local config
|
|
209
|
-
3. Skip — chỉ test endpoint public
|
|
210
|
-
```
|
|
211
|
-
|
|
212
|
-
### Phase 4 — Run
|
|
213
|
-
|
|
214
|
-
```bash
|
|
215
|
-
# GET
|
|
216
|
-
curl -s -X GET "http://localhost:{port}/v1/{resource}" \
|
|
217
|
-
-H "Authorization: Bearer {token}" | {JSON_FORMATTER}
|
|
218
|
-
|
|
219
|
-
# POST
|
|
220
|
-
curl -s -X POST "http://localhost:{port}/v1/{resource}" \
|
|
221
|
-
-H "Authorization: Bearer {token}" \
|
|
222
|
-
-H "Content-Type: application/json" \
|
|
223
|
-
-d '{"field1": "test_value"}'
|
|
224
|
-
```
|
|
225
|
-
|
|
226
|
-
| Kết quả | Ý nghĩa |
|
|
227
|
-
|--------|---------|
|
|
228
|
-
| 200/201 + đúng data | ✅ OK |
|
|
229
|
-
| 200 + sai data | ⚠️ Logic bug → /debug |
|
|
230
|
-
| 400 | Sai request body → kiểm tra field bắt buộc |
|
|
231
|
-
| 401 | Token hết hạn hoặc sai config |
|
|
232
|
-
| 403 | Sai role → kiểm tra auth rule |
|
|
233
|
-
| 500 | Server error → /debug |
|
|
234
|
-
| Connection refused | Service chưa chạy |
|
|
235
|
-
|
|
236
|
-
### Nếu `active_module = context-engineering`
|
|
237
|
-
|
|
238
|
-
#### Phase 1 — Xác minh entry point của pipeline tới được
|
|
239
|
-
|
|
240
|
-
Chạy prompt function trực tiếp với một input hợp lệ tối thiểu:
|
|
241
|
-
|
|
242
|
-
```bash
|
|
243
|
-
# Python (pytest / script):
|
|
244
|
-
python -c "from {module}.{function} import {function}; print({function}(input='{test_input}'))"
|
|
245
|
-
|
|
246
|
-
# Or using the project test command with a smoke marker:
|
|
247
|
-
{conventions.test_command} -m smoke -v
|
|
248
|
-
```
|
|
249
|
-
|
|
250
|
-
#### Phase 2 — Xác minh cấu trúc output
|
|
251
|
-
|
|
252
|
-
Kiểm tra output khớp schema kỳ vọng:
|
|
253
|
-
|
|
254
|
-
```
|
|
255
|
-
Expected output schema: {output fields from @trace or tech-doc}
|
|
256
|
-
Actual output: {paste output here}
|
|
257
|
-
```
|
|
258
|
-
|
|
259
|
-
#### Phase 3 — Diễn giải kết quả
|
|
260
|
-
|
|
261
|
-
| Kết quả | Ý nghĩa |
|
|
262
|
-
|--------|---------|
|
|
263
|
-
| Output khớp schema | ✅ OK |
|
|
264
|
-
| Output có nhưng sai format | ⚠️ Logic bug → /debug |
|
|
265
|
-
| `APIError` / `AuthenticationError` | API key không hợp lệ hoặc service unavailable |
|
|
266
|
-
| `TokenLimitError` | Input quá dài — kiểm tra kích thước prompt template |
|
|
267
|
-
| Exception / traceback | Lỗi code → /debug |
|
|
268
|
-
|
|
269
|
-
---
|
|
270
|
-
|
|
271
|
-
## Nếu `platform_type = web-frontend`
|
|
272
|
-
|
|
273
|
-
### Phase 1 — Xác minh dev server đang chạy
|
|
274
|
-
|
|
275
|
-
```bash
|
|
276
|
-
# Linux / macOS:
|
|
277
|
-
curl -s -o /dev/null -w "%{http_code}" http://localhost:{port}
|
|
278
|
-
|
|
279
|
-
# Windows (cmd / PowerShell):
|
|
280
|
-
curl -s -o NUL -w "%{http_code}" http://localhost:{port}
|
|
281
|
-
|
|
282
|
-
# Should return 200. If not: start with {conventions.service_run} (e.g., npm run dev)
|
|
283
|
-
```
|
|
284
|
-
|
|
285
|
-
### Phase 2 — Chạy E2E smoke test
|
|
286
|
-
|
|
287
|
-
Xác định E2E tool trong dự án (Playwright hoặc Cypress):
|
|
288
|
-
|
|
289
|
-
```bash
|
|
290
|
-
# Playwright — run scenarios tagged with this UC:
|
|
291
|
-
npx playwright test --grep "{UC-ID}"
|
|
292
|
-
|
|
293
|
-
# Cypress:
|
|
294
|
-
npx cypress run --spec "cypress/e2e/{UC-ID}*"
|
|
295
|
-
```
|
|
296
|
-
|
|
297
|
-
Nếu chưa có E2E test → mở browser và verify thủ công:
|
|
298
|
-
1. Điều hướng tới route của UC này
|
|
299
|
-
2. Thực hiện hành động chính của người dùng
|
|
300
|
-
3. Xác nhận kết quả kỳ vọng hiển thị
|
|
301
|
-
|
|
302
|
-
### Phase 3 — Diễn giải kết quả
|
|
303
|
-
|
|
304
|
-
| Kết quả | Ý nghĩa |
|
|
305
|
-
|--------|---------|
|
|
306
|
-
| Tất cả E2E test pass | ✅ OK |
|
|
307
|
-
| Assertion failed | ⚠️ Logic bug → /debug |
|
|
308
|
-
| `ERR_CONNECTION_REFUSED` | Dev server chưa chạy |
|
|
309
|
-
| API trả về 4xx/5xx | Vấn đề backend → kiểm tra backend service |
|
|
310
|
-
|
|
311
|
-
---
|
|
312
|
-
|
|
313
|
-
## Nếu `platform_type = mobile`
|
|
314
|
-
|
|
315
|
-
### Phase 1 — Xác minh device/emulator sẵn sàng
|
|
316
|
-
|
|
317
|
-
```bash
|
|
318
|
-
# Flutter:
|
|
319
|
-
flutter devices # list connected devices/emulators
|
|
320
|
-
flutter install # install current build on device
|
|
321
|
-
|
|
322
|
-
# React Native:
|
|
323
|
-
npx react-native run-android # build + install on connected Android
|
|
324
|
-
npx react-native run-ios # build + install on iOS simulator
|
|
325
|
-
|
|
326
|
-
# Android (Compose):
|
|
327
|
-
./gradlew installDebug # install APK on connected device/emulator
|
|
328
|
-
|
|
329
|
-
# iOS (SwiftUI):
|
|
330
|
-
# Open Xcode → select simulator → Product → Run
|
|
331
|
-
```
|
|
332
|
-
|
|
333
|
-
### Phase 2 — Checklist dev-smoke-test thủ công
|
|
334
|
-
|
|
335
|
-
Với UC đang test, verify trên device:
|
|
336
|
-
1. Điều hướng tới màn của UC này
|
|
337
|
-
2. Thực hiện hành động chính từ Scenario `.feature` (step `When`)
|
|
338
|
-
3. Xác nhận kết quả kỳ vọng hiển thị (step `Then`)
|
|
339
|
-
4. Kiểm tra có crash hoặc dialog lỗi bất ngờ không
|
|
340
|
-
|
|
341
|
-
### Phase 3 — Bắt issue nếu phát hiện
|
|
342
|
-
|
|
343
|
-
```bash
|
|
344
|
-
# Flutter:
|
|
345
|
-
flutter logs
|
|
346
|
-
|
|
347
|
-
# Android:
|
|
348
|
-
adb logcat -d | grep -i "error\|exception\|crash"
|
|
349
|
-
|
|
350
|
-
# iOS:
|
|
351
|
-
# Copy crash log from Xcode → Devices and Simulators → View Device Logs
|
|
352
|
-
```
|
|
353
|
-
|
|
354
|
-
Dán output vào `/debug`.
|
|
355
|
-
|
|
356
|
-
---
|
|
357
|
-
|
|
358
|
-
## Output
|
|
359
|
-
|
|
360
|
-
**Đọc `.agent/steps/report-footer.md`** và áp đúng khuôn footer trong đó (Status Badge ·
|
|
361
|
-
Output Artifacts · Next) cho report cuối, kèm khối bên dưới.
|
|
362
|
-
|
|
363
|
-
```
|
|
364
|
-
/dev-smoke-test Report — {UC-ID}
|
|
365
|
-
Platform: {backend | web-frontend | mobile}
|
|
366
|
-
| Endpoint / Flow | Status | Result |
|
|
367
|
-
|-----------------------|-------------|---------|
|
|
368
|
-
| {method} {path/screen}| ✅/⚠️/❌ | {notes} |
|
|
369
|
-
|
|
370
|
-
Status legend: ✅ = OK | ⚠️ = Responded but wrong data / logic bug | ❌ = Error / not running
|
|
371
|
-
|
|
372
|
-
Issues: {mô tả các failure}
|
|
373
|
-
Next: /debug (dán lỗi tương tác) HOẶC /fix-bug {TICKET_ID} HOẶC sẵn sàng PR
|
|
374
|
-
```
|
|
@@ -1,217 +0,0 @@
|
|
|
1
|
-
# /dev-smoke-test — Smoke Test Service hoặc App đang chạy
|
|
2
|
-
|
|
3
|
-
Dùng khi service/app **đang chạy sẵn**. Khác `/dev-run-test` (không cần live server).
|
|
4
|
-
|
|
5
|
-
## Gate
|
|
6
|
-
{{include:steps/gate.md}}
|
|
7
|
-
|
|
8
|
-
*Lưu ý: Với lệnh này, target ở Bước 1 là một UC-ID từ `$ARGUMENTS`. Context loading cung cấp `conventions.service_run`, thông tin port, và `tech_stack.module`.*
|
|
9
|
-
|
|
10
|
-
## Context
|
|
11
|
-
{{include:steps/context-loader.md}}
|
|
12
|
-
|
|
13
|
-
---
|
|
14
|
-
|
|
15
|
-
## Service Detection
|
|
16
|
-
|
|
17
|
-
Đọc `active_module` từ context. Dùng để chọn đúng cách dev-smoke-test.
|
|
18
|
-
|
|
19
|
-
| Platform | Modules |
|
|
20
|
-
|---|---|
|
|
21
|
-
| `backend` | `java-spring`, `golang`, `dotnet`, `php-laravel`, `context-engineering` |
|
|
22
|
-
| `web-frontend` | `react`, `nextjs`, `vue`, `nuxt`, `angular` |
|
|
23
|
-
| `mobile` | `flutter`, `react-native`, `ios-swiftui`, `android-compose` |
|
|
24
|
-
|
|
25
|
-
---
|
|
26
|
-
|
|
27
|
-
## Nếu `platform_type = backend`
|
|
28
|
-
|
|
29
|
-
### Phase 1 — Xác minh service đang chạy
|
|
30
|
-
|
|
31
|
-
Đọc `conventions.service_run` từ project-context.yaml để xác định port.
|
|
32
|
-
|
|
33
|
-
```bash
|
|
34
|
-
# Try common health endpoints (use whichever applies):
|
|
35
|
-
curl -s http://localhost:{port}/health # generic / Go / Node
|
|
36
|
-
curl -s http://localhost:{port}/actuator/health # Spring Boot
|
|
37
|
-
curl -s http://localhost:{port}/ping # some frameworks
|
|
38
|
-
```
|
|
39
|
-
|
|
40
|
-
Nếu chưa chạy → "Khởi động với `{conventions.service_run}` từ project root."
|
|
41
|
-
|
|
42
|
-
### Phase 2 — Xác định endpoint
|
|
43
|
-
|
|
44
|
-
Từ UC-ID → tìm controller/handler có `@trace.implements={UC-ID}`.
|
|
45
|
-
Liệt kê: method, path, auth/role bắt buộc.
|
|
46
|
-
|
|
47
|
-
### Phase 3 — Lấy auth token (nếu cần)
|
|
48
|
-
|
|
49
|
-
```
|
|
50
|
-
Endpoint yêu cầu auth. Lựa chọn:
|
|
51
|
-
1. Dán Bearer token (từ Postman/DevTools)
|
|
52
|
-
2. Dùng test/dev token từ local config
|
|
53
|
-
3. Skip — chỉ test endpoint public
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
### Phase 4 — Run
|
|
57
|
-
|
|
58
|
-
```bash
|
|
59
|
-
# GET
|
|
60
|
-
curl -s -X GET "http://localhost:{port}/v1/{resource}" \
|
|
61
|
-
-H "Authorization: Bearer {token}" | {JSON_FORMATTER}
|
|
62
|
-
|
|
63
|
-
# POST
|
|
64
|
-
curl -s -X POST "http://localhost:{port}/v1/{resource}" \
|
|
65
|
-
-H "Authorization: Bearer {token}" \
|
|
66
|
-
-H "Content-Type: application/json" \
|
|
67
|
-
-d '{"field1": "test_value"}'
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
| Kết quả | Ý nghĩa |
|
|
71
|
-
|--------|---------|
|
|
72
|
-
| 200/201 + đúng data | ✅ OK |
|
|
73
|
-
| 200 + sai data | ⚠️ Logic bug → /debug |
|
|
74
|
-
| 400 | Sai request body → kiểm tra field bắt buộc |
|
|
75
|
-
| 401 | Token hết hạn hoặc sai config |
|
|
76
|
-
| 403 | Sai role → kiểm tra auth rule |
|
|
77
|
-
| 500 | Server error → /debug |
|
|
78
|
-
| Connection refused | Service chưa chạy |
|
|
79
|
-
|
|
80
|
-
### Nếu `active_module = context-engineering`
|
|
81
|
-
|
|
82
|
-
#### Phase 1 — Xác minh entry point của pipeline tới được
|
|
83
|
-
|
|
84
|
-
Chạy prompt function trực tiếp với một input hợp lệ tối thiểu:
|
|
85
|
-
|
|
86
|
-
```bash
|
|
87
|
-
# Python (pytest / script):
|
|
88
|
-
python -c "from {module}.{function} import {function}; print({function}(input='{test_input}'))"
|
|
89
|
-
|
|
90
|
-
# Or using the project test command with a smoke marker:
|
|
91
|
-
{conventions.test_command} -m smoke -v
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
#### Phase 2 — Xác minh cấu trúc output
|
|
95
|
-
|
|
96
|
-
Kiểm tra output khớp schema kỳ vọng:
|
|
97
|
-
|
|
98
|
-
```
|
|
99
|
-
Expected output schema: {output fields from @trace or tech-doc}
|
|
100
|
-
Actual output: {paste output here}
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
#### Phase 3 — Diễn giải kết quả
|
|
104
|
-
|
|
105
|
-
| Kết quả | Ý nghĩa |
|
|
106
|
-
|--------|---------|
|
|
107
|
-
| Output khớp schema | ✅ OK |
|
|
108
|
-
| Output có nhưng sai format | ⚠️ Logic bug → /debug |
|
|
109
|
-
| `APIError` / `AuthenticationError` | API key không hợp lệ hoặc service unavailable |
|
|
110
|
-
| `TokenLimitError` | Input quá dài — kiểm tra kích thước prompt template |
|
|
111
|
-
| Exception / traceback | Lỗi code → /debug |
|
|
112
|
-
|
|
113
|
-
---
|
|
114
|
-
|
|
115
|
-
## Nếu `platform_type = web-frontend`
|
|
116
|
-
|
|
117
|
-
### Phase 1 — Xác minh dev server đang chạy
|
|
118
|
-
|
|
119
|
-
```bash
|
|
120
|
-
# Linux / macOS:
|
|
121
|
-
curl -s -o /dev/null -w "%{http_code}" http://localhost:{port}
|
|
122
|
-
|
|
123
|
-
# Windows (cmd / PowerShell):
|
|
124
|
-
curl -s -o NUL -w "%{http_code}" http://localhost:{port}
|
|
125
|
-
|
|
126
|
-
# Should return 200. If not: start with {conventions.service_run} (e.g., npm run dev)
|
|
127
|
-
```
|
|
128
|
-
|
|
129
|
-
### Phase 2 — Chạy E2E smoke test
|
|
130
|
-
|
|
131
|
-
Xác định E2E tool trong dự án (Playwright hoặc Cypress):
|
|
132
|
-
|
|
133
|
-
```bash
|
|
134
|
-
# Playwright — run scenarios tagged with this UC:
|
|
135
|
-
npx playwright test --grep "{UC-ID}"
|
|
136
|
-
|
|
137
|
-
# Cypress:
|
|
138
|
-
npx cypress run --spec "cypress/e2e/{UC-ID}*"
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
Nếu chưa có E2E test → mở browser và verify thủ công:
|
|
142
|
-
1. Điều hướng tới route của UC này
|
|
143
|
-
2. Thực hiện hành động chính của người dùng
|
|
144
|
-
3. Xác nhận kết quả kỳ vọng hiển thị
|
|
145
|
-
|
|
146
|
-
### Phase 3 — Diễn giải kết quả
|
|
147
|
-
|
|
148
|
-
| Kết quả | Ý nghĩa |
|
|
149
|
-
|--------|---------|
|
|
150
|
-
| Tất cả E2E test pass | ✅ OK |
|
|
151
|
-
| Assertion failed | ⚠️ Logic bug → /debug |
|
|
152
|
-
| `ERR_CONNECTION_REFUSED` | Dev server chưa chạy |
|
|
153
|
-
| API trả về 4xx/5xx | Vấn đề backend → kiểm tra backend service |
|
|
154
|
-
|
|
155
|
-
---
|
|
156
|
-
|
|
157
|
-
## Nếu `platform_type = mobile`
|
|
158
|
-
|
|
159
|
-
### Phase 1 — Xác minh device/emulator sẵn sàng
|
|
160
|
-
|
|
161
|
-
```bash
|
|
162
|
-
# Flutter:
|
|
163
|
-
flutter devices # list connected devices/emulators
|
|
164
|
-
flutter install # install current build on device
|
|
165
|
-
|
|
166
|
-
# React Native:
|
|
167
|
-
npx react-native run-android # build + install on connected Android
|
|
168
|
-
npx react-native run-ios # build + install on iOS simulator
|
|
169
|
-
|
|
170
|
-
# Android (Compose):
|
|
171
|
-
./gradlew installDebug # install APK on connected device/emulator
|
|
172
|
-
|
|
173
|
-
# iOS (SwiftUI):
|
|
174
|
-
# Open Xcode → select simulator → Product → Run
|
|
175
|
-
```
|
|
176
|
-
|
|
177
|
-
### Phase 2 — Checklist dev-smoke-test thủ công
|
|
178
|
-
|
|
179
|
-
Với UC đang test, verify trên device:
|
|
180
|
-
1. Điều hướng tới màn của UC này
|
|
181
|
-
2. Thực hiện hành động chính từ Scenario `.feature` (step `When`)
|
|
182
|
-
3. Xác nhận kết quả kỳ vọng hiển thị (step `Then`)
|
|
183
|
-
4. Kiểm tra có crash hoặc dialog lỗi bất ngờ không
|
|
184
|
-
|
|
185
|
-
### Phase 3 — Bắt issue nếu phát hiện
|
|
186
|
-
|
|
187
|
-
```bash
|
|
188
|
-
# Flutter:
|
|
189
|
-
flutter logs
|
|
190
|
-
|
|
191
|
-
# Android:
|
|
192
|
-
adb logcat -d | grep -i "error\|exception\|crash"
|
|
193
|
-
|
|
194
|
-
# iOS:
|
|
195
|
-
# Copy crash log from Xcode → Devices and Simulators → View Device Logs
|
|
196
|
-
```
|
|
197
|
-
|
|
198
|
-
Dán output vào `/debug`.
|
|
199
|
-
|
|
200
|
-
---
|
|
201
|
-
|
|
202
|
-
## Output
|
|
203
|
-
|
|
204
|
-
{{include:steps/report-footer.md}}
|
|
205
|
-
|
|
206
|
-
```
|
|
207
|
-
/dev-smoke-test Report — {UC-ID}
|
|
208
|
-
Platform: {backend | web-frontend | mobile}
|
|
209
|
-
| Endpoint / Flow | Status | Result |
|
|
210
|
-
|-----------------------|-------------|---------|
|
|
211
|
-
| {method} {path/screen}| ✅/⚠️/❌ | {notes} |
|
|
212
|
-
|
|
213
|
-
Status legend: ✅ = OK | ⚠️ = Responded but wrong data / logic bug | ❌ = Error / not running
|
|
214
|
-
|
|
215
|
-
Issues: {mô tả các failure}
|
|
216
|
-
Next: /debug (dán lỗi tương tác) HOẶC /fix-bug {TICKET_ID} HOẶC sẵn sàng PR
|
|
217
|
-
```
|