ai-developer-skill-os 9.1.2 → 9.3.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/.agents/AGENTS.md +139 -42
- package/.agents/DEV_PROFILE.md +95 -0
- package/.agents/registry/capability-graph.yml +171 -334
- package/.agents/registry/graph.json +37 -19
- package/.agents/registry/index.yaml +59 -13
- package/.agents/registry/skills-index.yml +204 -447
- package/.agents/rules/coding.md +23 -0
- package/.agents/rules/global.md +44 -30
- package/.agents/skills/_template/SKILL.md +2 -377
- package/.agents/skills/qk-access-policy/SKILL.md +98 -473
- package/.agents/skills/qk-agent-observability/SKILL.md +3 -439
- package/.agents/skills/qk-ai-builder/SKILL.md +132 -565
- package/.agents/skills/qk-api-consumer/SKILL.md +256 -0
- package/.agents/skills/qk-api-consumer/capability.yaml +21 -0
- package/.agents/skills/qk-api-consumer/evals/scorecard.yaml +29 -0
- package/.agents/skills/qk-api-lifecycle/SKILL.md +133 -456
- package/.agents/skills/qk-bug-resolution/SKILL.md +128 -561
- package/.agents/skills/qk-code-review/SKILL.md +142 -420
- package/.agents/skills/qk-context-loader/SKILL.md +99 -471
- package/.agents/skills/qk-data-engineer/SKILL.md +119 -340
- package/.agents/skills/qk-data-lifecycle/SKILL.md +89 -488
- package/.agents/skills/qk-db-optimizer/SKILL.md +102 -488
- package/.agents/skills/qk-design-system-engineering/SKILL.md +76 -461
- package/.agents/skills/qk-devops-platform/SKILL.md +77 -463
- package/.agents/skills/qk-docs/SKILL.md +88 -494
- package/.agents/skills/qk-engineering-standard/SKILL.md +4 -588
- package/.agents/skills/qk-fe-api-integration/SKILL.md +343 -343
- package/.agents/skills/qk-fe-api-integration/evals/scorecard.yaml +29 -29
- package/.agents/skills/qk-feature-delivery/SKILL.md +137 -445
- package/.agents/skills/qk-feature-delivery/evals/scorecard.yaml +1 -1
- package/.agents/skills/qk-frontend-architecture/SKILL.md +5 -479
- package/.agents/skills/qk-help/evals/scorecard.yaml +13 -13
- package/.agents/skills/qk-orchestrator/SKILL.md +63 -502
- package/.agents/skills/qk-orchestrator/references/routing-table.md +10 -14
- package/.agents/skills/qk-product-specification/SKILL.md +70 -479
- package/.agents/skills/qk-production-release/SKILL.md +80 -537
- package/.agents/skills/qk-project-audit/SKILL.md +174 -0
- package/.agents/skills/qk-project-bootstrap/SKILL.md +243 -471
- package/.agents/skills/qk-project-health/SKILL.md +97 -496
- package/.agents/skills/qk-project-memory/SKILL.md +76 -21
- package/.agents/skills/qk-refactor/SKILL.md +167 -384
- package/.agents/skills/qk-security-audit/SKILL.md +141 -463
- package/.agents/skills/qk-security-audit/capability.yaml +1 -2
- package/.agents/skills/qk-system-evolution/SKILL.md +343 -343
- package/.agents/skills/qk-system-evolution/evals/scorecard.yaml +26 -26
- package/.agents/skills/qk-test-engineering/SKILL.md +119 -509
- package/.agents/skills/qk-ui-audit/SKILL.md +73 -537
- package/.agents/skills/qk-ui-builder/SKILL.md +521 -482
- package/.agents/skills/qk-ui-system-builder/SKILL.md +68 -514
- package/.agents/skills/qk-upgrade/SKILL.md +301 -0
- package/.agents/skills/qk-upgrade/capability.yaml +24 -0
- package/.agents/skills/qk-upgrade/evals/scorecard.yaml +26 -0
- package/.agents/skills/qk-validation-gate/SKILL.md +4 -603
- package/.agents/skills/qk-web-quality-gate/SKILL.md +85 -463
- package/.agents/workflows/bug-resolution.yml +6 -6
- package/.agents/workflows/context-discovery.yml +94 -0
- package/.agents/workflows/feature-delivery.yml +8 -4
- package/.agents/workflows/refactor.yml +6 -3
- package/.agents/workflows/shared/quality-gate.yml +94 -0
- package/.agents/workflows/skin-governance.yml +115 -0
- package/README.md +152 -67
- package/package.json +2 -2
- package/tooling/build-registry.js +30 -8
|
@@ -0,0 +1,301 @@
|
|
|
1
|
+
---
|
|
2
|
+
# ── Identity ───────────────────────────────────────────────
|
|
3
|
+
name: qk-upgrade
|
|
4
|
+
version: 9.2.0
|
|
5
|
+
status: stable
|
|
6
|
+
description: "Nâng cấp library/framework an toàn — incremental strategy, audit breaking changes, rollback plan bắt buộc, không big-bang update. Dùng skill này khi user nhắc đến: upgrade, nâng cấp thư viện, update package, migrate framework, version, cập nhật dependency, breaking change — kể cả khi chỉ nói 'nâng Next.js lên bản mới nhất'."
|
|
7
|
+
platforms: [antigravity, claude-code, cursor, windsurf, kilo-code]
|
|
8
|
+
|
|
9
|
+
# ── Classification ─────────────────────────────────────────
|
|
10
|
+
type: capability
|
|
11
|
+
|
|
12
|
+
intent:
|
|
13
|
+
- library-upgrade
|
|
14
|
+
- framework-migration
|
|
15
|
+
- dependency-management
|
|
16
|
+
|
|
17
|
+
complexity:
|
|
18
|
+
level: high
|
|
19
|
+
criteria:
|
|
20
|
+
files_affected: "10+"
|
|
21
|
+
has_behavior_change: false
|
|
22
|
+
has_external_dependency: true
|
|
23
|
+
has_breaking_change: true
|
|
24
|
+
|
|
25
|
+
triggers:
|
|
26
|
+
- "upgrade"
|
|
27
|
+
- "nâng cấp thư viện"
|
|
28
|
+
- "update package"
|
|
29
|
+
- "migrate framework"
|
|
30
|
+
- "version"
|
|
31
|
+
- "cập nhật dependency"
|
|
32
|
+
- "breaking change"
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
# ── References ─────────────────────────────────────────────
|
|
36
|
+
workflow: refactor
|
|
37
|
+
|
|
38
|
+
rules:
|
|
39
|
+
- global
|
|
40
|
+
- coding
|
|
41
|
+
- safety
|
|
42
|
+
|
|
43
|
+
tools:
|
|
44
|
+
- filesystem
|
|
45
|
+
- terminal
|
|
46
|
+
|
|
47
|
+
related_skills:
|
|
48
|
+
- qk-project-health # Chạy trước để biết tech debt tổng thể
|
|
49
|
+
- qk-refactor # Dùng sau upgrade để clean code dùng deprecated API
|
|
50
|
+
- qk-test-engineering # Verify không có regression sau upgrade
|
|
51
|
+
|
|
52
|
+
knowledge_scope:
|
|
53
|
+
owns:
|
|
54
|
+
- upgrade-strategy
|
|
55
|
+
- rollback-plan
|
|
56
|
+
- migration-path
|
|
57
|
+
- breaking-change-analysis
|
|
58
|
+
references:
|
|
59
|
+
- testing
|
|
60
|
+
- architecture
|
|
61
|
+
- security
|
|
62
|
+
- anti-patterns
|
|
63
|
+
|
|
64
|
+
# ── Verification ───────────────────────────────────────────
|
|
65
|
+
verification:
|
|
66
|
+
required: true
|
|
67
|
+
strategy: refactor
|
|
68
|
+
|
|
69
|
+
selection:
|
|
70
|
+
priority: medium
|
|
71
|
+
confidence_threshold: 0.85
|
|
72
|
+
|
|
73
|
+
# ── Runtime ────────────────────────────────────────────────
|
|
74
|
+
execution_mode: deterministic
|
|
75
|
+
cost: high
|
|
76
|
+
latency: slow
|
|
77
|
+
risk: high
|
|
78
|
+
side_effects: edit_files
|
|
79
|
+
produces: [code, report, plan]
|
|
80
|
+
consumes: [context-graph, source-code]
|
|
81
|
+
|
|
82
|
+
token_budget:
|
|
83
|
+
max_files_read: 6
|
|
84
|
+
max_lines_per_read: 120
|
|
85
|
+
max_shell_commands: 3
|
|
86
|
+
stop_early: true
|
|
87
|
+
|
|
88
|
+
exit_codes: [SUCCESS, BLOCKED, FAILED, PARTIAL]
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
# qk-upgrade — Safe Library & Framework Upgrade
|
|
92
|
+
|
|
93
|
+
> **Language rule:** Code, identifiers, file names → English. Explanations, summaries → Vietnamese.
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## Preconditions
|
|
98
|
+
|
|
99
|
+
Trước khi bắt đầu, AI PHẢI xác nhận:
|
|
100
|
+
|
|
101
|
+
- [ ] Biết version hiện tại và version target
|
|
102
|
+
→ Đọc `package.json` / `requirements.txt` / `go.mod` / `Cargo.toml`
|
|
103
|
+
- [ ] Biết changelog / migration guide của version target
|
|
104
|
+
→ Search official docs hoặc GitHub releases
|
|
105
|
+
- [ ] Có test suite để verify regression (unit test, E2E, hoặc ít nhất manual smoke test)
|
|
106
|
+
→ Nếu không có test: `BLOCKED` với warning — upgrade không có safety net
|
|
107
|
+
- [ ] Git working tree clean (không có uncommitted changes)
|
|
108
|
+
→ Nếu dirty: `BLOCKED` — yêu cầu commit hoặc stash trước
|
|
109
|
+
|
|
110
|
+
**Risk classification:**
|
|
111
|
+
- `patch` (1.2.3 → 1.2.4): low — thường safe, proceed autonomously
|
|
112
|
+
- `minor` (1.2.x → 1.3.x): medium — check deprecations, report trước
|
|
113
|
+
- `major` (1.x → 2.x): high — PHẢI có rollback plan, confirm với user
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## Scope
|
|
118
|
+
|
|
119
|
+
✅ Skill này làm:
|
|
120
|
+
- Phân tích breaking changes giữa version hiện tại và target
|
|
121
|
+
- Lên migration plan từng bước (không big-bang)
|
|
122
|
+
- Update dependency files
|
|
123
|
+
- Sửa code dùng deprecated/removed API
|
|
124
|
+
- Verify sau upgrade (chạy test, check build)
|
|
125
|
+
- Tạo rollback instructions
|
|
126
|
+
|
|
127
|
+
❌ Skill này KHÔNG làm:
|
|
128
|
+
- Refactor business logic không liên quan đến upgrade
|
|
129
|
+
- Thêm feature mới trong khi upgrade
|
|
130
|
+
- Upgrade nhiều major versions cùng lúc (→ chia nhỏ thành nhiều tasks)
|
|
131
|
+
- Deploy lên production (→ `qk-production-release`)
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## Execution Steps
|
|
136
|
+
|
|
137
|
+
### Step 1 — Audit hiện trạng
|
|
138
|
+
```
|
|
139
|
+
Inputs: package.json / lock file / dependency manifest
|
|
140
|
+
Actions:
|
|
141
|
+
- List tất cả dependencies + version hiện tại
|
|
142
|
+
- Xác định dependency cần upgrade (target) + version muốn lên
|
|
143
|
+
- Check transitive dependencies có bị ảnh hưởng không
|
|
144
|
+
- Tìm migration guide chính thức
|
|
145
|
+
Outputs: Upgrade scope + risk level
|
|
146
|
+
Exit: BLOCKED nếu không tìm được migration guide cho major upgrade
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### Step 2 — Phân tích Breaking Changes
|
|
150
|
+
```
|
|
151
|
+
Inputs: Changelog / migration guide / GitHub releases
|
|
152
|
+
Actions:
|
|
153
|
+
- List tất cả breaking changes giữa current → target version
|
|
154
|
+
- Categorize: API removed / renamed / signature changed / behavior changed
|
|
155
|
+
- Grep codebase để đếm số lần dùng từng API bị ảnh hưởng
|
|
156
|
+
- Ước tính effort (số file, số thay đổi)
|
|
157
|
+
Outputs: Breaking change inventory + impact assessment
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
### Step 3 — Lên Migration Plan
|
|
161
|
+
```
|
|
162
|
+
Inputs: Breaking change inventory
|
|
163
|
+
Actions:
|
|
164
|
+
- Chia thành phases nếu major upgrade (không làm tất cả 1 lần)
|
|
165
|
+
- Phase 1: Update dependency, fix compile errors
|
|
166
|
+
- Phase 2: Replace deprecated API
|
|
167
|
+
- Phase 3: Adopt new patterns (optional, separate task)
|
|
168
|
+
- Viết rollback command rõ ràng
|
|
169
|
+
Outputs: Phased migration plan + rollback instructions
|
|
170
|
+
Human checkpoint: Confirm plan trước khi thực thi (nếu major upgrade)
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### Step 4 — Execute Migration
|
|
174
|
+
```
|
|
175
|
+
Actions:
|
|
176
|
+
4a. Update version trong dependency file
|
|
177
|
+
4b. Chạy package manager install
|
|
178
|
+
4c. Fix compile errors / type errors theo thứ tự từ entry point
|
|
179
|
+
4d. Replace deprecated API calls (grep → replace có kiểm soát)
|
|
180
|
+
4e. Không refactor code không liên quan — chỉ làm đủ để build pass
|
|
181
|
+
|
|
182
|
+
Rules:
|
|
183
|
+
- Mỗi phase phải build và test pass trước khi sang phase tiếp
|
|
184
|
+
- Không dùng `// @ts-ignore` để ẩn lỗi type
|
|
185
|
+
- Không dùng `any` để workaround type conflict
|
|
186
|
+
- Document lý do nếu phải dùng compatibility shim tạm thời
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
### Step 5 — Verify
|
|
190
|
+
```
|
|
191
|
+
Actions:
|
|
192
|
+
- Chạy build: không có compile error
|
|
193
|
+
- Chạy test suite: không có regression
|
|
194
|
+
- Smoke test manual những path quan trọng nhất
|
|
195
|
+
- So sánh bundle size / performance nếu có tool
|
|
196
|
+
- Review diff cuối: không có thay đổi không liên quan
|
|
197
|
+
Outputs: Verification report (pass/fail per check)
|
|
198
|
+
Exit: FAILED nếu test regression, đính kèm rollback instructions
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
---
|
|
202
|
+
|
|
203
|
+
## Prompt Template
|
|
204
|
+
|
|
205
|
+
AI đọc `DEV_PROFILE.md` để biết stack. Cung cấp target version — AI lo phân tích và plan.
|
|
206
|
+
|
|
207
|
+
```
|
|
208
|
+
Package: [Tên thư viện / framework cần upgrade]
|
|
209
|
+
Từ: [Version hiện tại — vd: 4.x]
|
|
210
|
+
Lên: [Version target — vd: 5.0]
|
|
211
|
+
Lý do: [Bug fix / security patch / new feature / EOL]
|
|
212
|
+
Test suite: [Có / Không / Partial — vd: "có Jest unit tests, không có E2E"]
|
|
213
|
+
Deadline: [Urgent / Can plan carefully]
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
---
|
|
217
|
+
|
|
218
|
+
### Theo Stack:
|
|
219
|
+
|
|
220
|
+
**Node.js / TypeScript — Major upgrade (Express 4 → 5)**
|
|
221
|
+
```
|
|
222
|
+
Package: Express
|
|
223
|
+
Từ: 4.18.x
|
|
224
|
+
Lên: 5.0.0
|
|
225
|
+
Lý do: Security patches + async error handling native
|
|
226
|
+
Test suite: Có Jest + Supertest cho API routes
|
|
227
|
+
Deadline: Can plan carefully
|
|
228
|
+
```
|
|
229
|
+
→ AI phân tích: async middleware error handling thay đổi (không cần try/catch),
|
|
230
|
+
`req.query` parsing thay đổi, path-to-regexp breaking changes,
|
|
231
|
+
deprecated `res.json()` overloads, router API changes.
|
|
232
|
+
Plan: Phase 1 — update + fix types, Phase 2 — adopt async handlers,
|
|
233
|
+
Phase 3 — remove compatibility workarounds.
|
|
234
|
+
|
|
235
|
+
**Python — Minor upgrade (FastAPI 0.100 → 0.110)**
|
|
236
|
+
```
|
|
237
|
+
Package: FastAPI + Pydantic
|
|
238
|
+
Từ: fastapi==0.100, pydantic==1.10
|
|
239
|
+
Lên: fastapi==0.110, pydantic==2.x
|
|
240
|
+
Lý do: Pydantic v2 performance 5-50x nhanh hơn
|
|
241
|
+
Test suite: Có pytest + httpx async tests
|
|
242
|
+
Deadline: Can plan carefully
|
|
243
|
+
```
|
|
244
|
+
→ AI phân tích: Pydantic v2 breaking changes (validators syntax, model_config,
|
|
245
|
+
Field() params), FastAPI Pydantic v2 compatibility layer,
|
|
246
|
+
`orm_mode` → `model_config = ConfigDict(from_attributes=True)`.
|
|
247
|
+
Plan: Phase 1 — upgrade Pydantic, fix models, Phase 2 — remove compat layer.
|
|
248
|
+
|
|
249
|
+
**Frontend — Major upgrade (React 17 → 18)**
|
|
250
|
+
```
|
|
251
|
+
Package: React + ReactDOM
|
|
252
|
+
Từ: 17.0.2
|
|
253
|
+
Lên: 18.x
|
|
254
|
+
Lý do: Concurrent features + automatic batching
|
|
255
|
+
Test suite: Có Vitest + React Testing Library
|
|
256
|
+
Deadline: Urgent (security)
|
|
257
|
+
```
|
|
258
|
+
→ AI phân tích: `ReactDOM.render` → `createRoot`, `ReactDOM.hydrate` → `hydrateRoot`,
|
|
259
|
+
Strict Mode double-invoke effects (test side effects), auto-batching setState
|
|
260
|
+
(có thể break code expect sync update), Suspense behavior changes.
|
|
261
|
+
|
|
262
|
+
**Database ORM — Minor upgrade (Prisma 4 → 5)**
|
|
263
|
+
```
|
|
264
|
+
Package: Prisma
|
|
265
|
+
Từ: 4.x
|
|
266
|
+
Lên: 5.x
|
|
267
|
+
Lý do: Performance improvements + new features
|
|
268
|
+
Test suite: Có Jest + Prisma test utilities
|
|
269
|
+
Deadline: Can plan carefully
|
|
270
|
+
```
|
|
271
|
+
→ AI phân tích: `rejectOnNotFound` removed → dùng `findUniqueOrThrow`,
|
|
272
|
+
`jsonProtocol` now default (check binary targets),
|
|
273
|
+
`db push --accept-data-loss` behavior change,
|
|
274
|
+
type changes trong `Prisma.XxxWhereInput`.
|
|
275
|
+
|
|
276
|
+
**Data / Python ecosystem — Major (Python 3.9 → 3.12)**
|
|
277
|
+
```
|
|
278
|
+
Package: Python runtime + dependencies
|
|
279
|
+
Từ: 3.9
|
|
280
|
+
Lên: 3.12
|
|
281
|
+
Lý do: EOL approach + performance gains
|
|
282
|
+
Test suite: Có pytest full suite
|
|
283
|
+
Deadline: Can plan carefully
|
|
284
|
+
```
|
|
285
|
+
→ AI phân tích: deprecated stdlib modules (distutils removed),
|
|
286
|
+
`typing` module changes (use built-in generics `list[str]` thay `List[str]`),
|
|
287
|
+
f-string improvements, asyncio API changes,
|
|
288
|
+
check requirements.txt compatibility với 3.12 (numpy, pandas versions).
|
|
289
|
+
|
|
290
|
+
**DevOps — Upgrade CI runner (ubuntu-20.04 → ubuntu-24.04)**
|
|
291
|
+
```
|
|
292
|
+
Package: GitHub Actions ubuntu runner
|
|
293
|
+
Từ: ubuntu-20.04
|
|
294
|
+
Lên: ubuntu-24.04
|
|
295
|
+
Lý do: ubuntu-20.04 EOL
|
|
296
|
+
Test suite: Workflow chạy được là pass
|
|
297
|
+
Deadline: Urgent (EOL)
|
|
298
|
+
```
|
|
299
|
+
→ AI phân tích: Node.js bundled version thay đổi, Python 2 removed,
|
|
300
|
+
OpenSSL version differences (affect TLS), apt package names thay đổi,
|
|
301
|
+
action versions cần update (actions/setup-node@v3 → v4).
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Auto-generated from SKILL.md frontmatter
|
|
2
|
+
schema_version: 1
|
|
3
|
+
id: "qk-system-evolution"
|
|
4
|
+
version: "9.1.0"
|
|
5
|
+
description: "Nâng cấp thư viện/framework an toàn với rollback plan bắt buộc — incremental, không big-bang."
|
|
6
|
+
tools:
|
|
7
|
+
- "filesystem"
|
|
8
|
+
- "terminal"
|
|
9
|
+
knowledge:
|
|
10
|
+
owns:
|
|
11
|
+
- "upgrade-strategy"
|
|
12
|
+
- "rollback-plan"
|
|
13
|
+
references:
|
|
14
|
+
- "testing"
|
|
15
|
+
- "architecture"
|
|
16
|
+
- "security"
|
|
17
|
+
- "anti-patterns"
|
|
18
|
+
eval:
|
|
19
|
+
scorecard: "evals/scorecard.yaml"
|
|
20
|
+
decision_boundary:
|
|
21
|
+
owns:
|
|
22
|
+
- "qk-system-evolution"
|
|
23
|
+
does_not_own: []
|
|
24
|
+
conflicts_with: []
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
name: qk-system-evolution-eval
|
|
2
|
+
description: Đánh giá độ an toàn của quy trình nâng cấp System & Framework
|
|
3
|
+
version: 9.1.0
|
|
4
|
+
threshold: 90 # Việc nâng cấp framework mang rủi ro sập hệ thống rất cao
|
|
5
|
+
|
|
6
|
+
metrics:
|
|
7
|
+
- id: rollback_safety
|
|
8
|
+
name: Cơ chế Rollback bắt buộc
|
|
9
|
+
description: Agent có thiết lập và ghi chép lại lệnh rollback trước khi nâng cấp không?
|
|
10
|
+
weight: 40
|
|
11
|
+
criteria:
|
|
12
|
+
- Phải yêu cầu/lưu lại Rollback command (git tag / version trước đó) trước khi sửa code (40đ)
|
|
13
|
+
|
|
14
|
+
- id: changelog_awareness
|
|
15
|
+
name: Phân tích Breaking Changes
|
|
16
|
+
description: Agent có đọc Changelog thay vì nhắm mắt upgrade không?
|
|
17
|
+
weight: 35
|
|
18
|
+
criteria:
|
|
19
|
+
- Quét và liệt kê các Breaking Changes từ Changelog/Migration Guide trước khi chạy (35đ)
|
|
20
|
+
|
|
21
|
+
- id: incremental_upgrade
|
|
22
|
+
name: Nâng cấp gia tăng (Incremental)
|
|
23
|
+
description: Có nâng cấp từng phần và chạy test xác minh thay vì Big-bang không?
|
|
24
|
+
weight: 25
|
|
25
|
+
criteria:
|
|
26
|
+
- Chạy test ngay sau khi nâng cấp 1 package thay vì update hàng loạt (25đ)
|