ai-developer-skill-os 8.1.5 → 8.1.9
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/CHANGELOG.md +113 -70
- package/.agents/README.md +44 -58
- package/.agents/skills/qk-code-review/SKILL.md +189 -0
- package/.agents/skills/qk-code-review/references/ai/ai-anti-patterns.md +28 -0
- package/.agents/skills/qk-code-review/references/ai/v8-schema-validation.md +65 -0
- package/.agents/skills/qk-code-review/references/cross-cutting/architecture-review-guide.md +212 -0
- package/.agents/skills/qk-code-review/references/cross-cutting/async-concurrency-patterns.md +515 -0
- package/.agents/skills/qk-code-review/references/cross-cutting/code-quality-universal.md +358 -0
- package/.agents/skills/qk-code-review/references/cross-cutting/code-review-best-practices.md +136 -0
- package/.agents/skills/qk-code-review/references/cross-cutting/common-bugs-checklist.md +124 -0
- package/.agents/skills/qk-code-review/references/cross-cutting/error-handling-principles.md +492 -0
- package/.agents/skills/qk-code-review/references/cross-cutting/n-plus-one-queries.md +309 -0
- package/.agents/skills/qk-code-review/references/cross-cutting/performance-review-guide.md +387 -0
- package/.agents/skills/qk-code-review/references/cross-cutting/security-review-guide.md +318 -0
- package/.agents/skills/qk-code-review/references/cross-cutting/sql-injection-prevention.md +308 -0
- package/.agents/skills/qk-code-review/references/cross-cutting/xss-prevention.md +264 -0
- package/.agents/skills/qk-code-review/references/languages/angular.md +768 -0
- package/.agents/skills/qk-code-review/references/languages/c.md +890 -0
- package/.agents/skills/qk-code-review/references/languages/cpp.md +893 -0
- package/.agents/skills/qk-code-review/references/languages/csharp.md +519 -0
- package/.agents/skills/qk-code-review/references/languages/css-less-sass.md +661 -0
- package/.agents/skills/qk-code-review/references/languages/django.md +985 -0
- package/.agents/skills/qk-code-review/references/languages/fastapi.md +580 -0
- package/.agents/skills/qk-code-review/references/languages/go.md +993 -0
- package/.agents/skills/qk-code-review/references/languages/java.md +409 -0
- package/.agents/skills/qk-code-review/references/languages/java8.md +586 -0
- package/.agents/skills/qk-code-review/references/languages/kotlin.md +1018 -0
- package/.agents/skills/qk-code-review/references/languages/nestjs.md +593 -0
- package/.agents/skills/qk-code-review/references/languages/php.md +684 -0
- package/.agents/skills/qk-code-review/references/languages/python.md +1073 -0
- package/.agents/skills/qk-code-review/references/languages/qt.md +757 -0
- package/.agents/skills/qk-code-review/references/languages/react.md +871 -0
- package/.agents/skills/qk-code-review/references/languages/ruby.md +964 -0
- package/.agents/skills/qk-code-review/references/languages/rust.md +846 -0
- package/.agents/skills/qk-code-review/references/languages/svelte.md +1064 -0
- package/.agents/skills/qk-code-review/references/languages/swift.md +936 -0
- package/.agents/skills/qk-code-review/references/languages/typescript.md +1016 -0
- package/.agents/skills/qk-code-review/references/languages/vue.md +924 -0
- package/.agents/skills/qk-code-review/references/languages/zig.md +440 -0
- package/CHANGELOG.md +22 -0
- package/README.md +3 -3
- package/bin/install.js +5 -2
- package/package.json +1 -1
package/.agents/CHANGELOG.md
CHANGED
|
@@ -1,70 +1,113 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
## [
|
|
9
|
-
|
|
10
|
-
###
|
|
11
|
-
- **
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
- **
|
|
20
|
-
- **
|
|
21
|
-
- **
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
- **
|
|
35
|
-
- **
|
|
36
|
-
- **
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
- **
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
-
|
|
50
|
-
- **
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
- **
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
-
|
|
68
|
-
-
|
|
69
|
-
-
|
|
70
|
-
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to AI Developer Skill OS are documented here.
|
|
4
|
+
Format: [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## [8.1.7] — 2026-07 — README Sync
|
|
9
|
+
|
|
10
|
+
### Changed
|
|
11
|
+
- **README Sync**: Synced `.agents/README.md` with root `README.md` so the installed documentation is fully up-to-date with V8.1 architecture.
|
|
12
|
+
- Bumped version to `8.1.7`.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## [8.1.6] — 2026-07 — Design Intelligence Content & Sync
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
- **Design Intelligence Populated**: Sourced core market-standard knowledge (Tailwind, Radix, Apple, Vercel-like principles) into `.agents/knowledge/design-intelligence/` covering components, patterns, industries, themes, and references.
|
|
20
|
+
- **Animation Knowledge**: Added `visual-language/animation.md` for micro-interactions and transition durations.
|
|
21
|
+
- **Dependency Wiring**: Linked `qk-ui-system-builder` to `design-intelligence` so it utilizes the newly generated design constraints.
|
|
22
|
+
- **Changelog Sync**: Synced `.agents/CHANGELOG.md` with root `CHANGELOG.md` so the installed copy reflects the true V8 evolution.
|
|
23
|
+
|
|
24
|
+
### Changed
|
|
25
|
+
- All skill descriptions properly translated to Vietnamese for ecosystem consistency.
|
|
26
|
+
- Bumped version to `8.1.6` for final, truly complete Design Intelligence NPM Release.
|
|
27
|
+
|
|
28
|
+
---
|
|
29
|
+
|
|
30
|
+
## [8.1.4] — 2026-07 — Design Intelligence Pack
|
|
31
|
+
|
|
32
|
+
### Added
|
|
33
|
+
- **Design Intelligence Layer**: `.agents/knowledge/design-intelligence/` (industries, themes, patterns, visual-language, components, templates)
|
|
34
|
+
- **Knowledge Dependencies**: `qk-design-system-engineering` and `qk-ui-builder` now have strict dependency bounds tied to Design Intelligence without bloating the Capability Graph.
|
|
35
|
+
- **Design Routing Test Cases**: `design-intel-01`, `02`, `03` for validating routing logic in design scenarios.
|
|
36
|
+
- **Re-introduced CLI Installer**: Restored and refactored `bin/install.js` to correctly copy `.agents` across global/local directories for easy NPM setup.
|
|
37
|
+
|
|
38
|
+
### Changed
|
|
39
|
+
- Refined **Decision Boundaries**: `qk-ui-builder` explicitly forbidden from defining visual direction or brand identity (strict capability bounds).
|
|
40
|
+
- **README.md** reflects 30 Master Skills and the "Agent Engineering OS" mindset.
|
|
41
|
+
- **package.json**: Version bump `8.1.4` and whitelisted files for npm publish.
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## [8.1.3] — 2026-07 — Architecture Freeze & Governance
|
|
46
|
+
|
|
47
|
+
### Added
|
|
48
|
+
- **Capability Graph & Routing**: `.agents/registry/capability-graph.yml` to define skill relations (`depends_on`, `delegates_to`).
|
|
49
|
+
- **Priority Governance**: `.agents/rules/priorities.yml` enforcing safety layers (`P1: System Integrity`, `P2: Guardrails`).
|
|
50
|
+
- **Audit Tools**: `tooling/run-aar.js` for architectural acceptance testing.
|
|
51
|
+
- Test cases for routing and boundary attacks.
|
|
52
|
+
|
|
53
|
+
### Changed
|
|
54
|
+
- Name transition from "Self-Improving" to **Adaptive Agent OS** (Self Optimizing ≠ Self Modifying).
|
|
55
|
+
- Enforced hard cap of **30 Skills** to prevent Skill Inflation.
|
|
56
|
+
- Frozen Baseline achieved: `v8.1.3-agent-os-production`.
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## [8.0.0] — 2026-07 — Agent Knowledge System
|
|
61
|
+
|
|
62
|
+
### Philosophy shift
|
|
63
|
+
- **V7:** Skill Repository — human selects skill, AI executes
|
|
64
|
+
- **V8:** Agent Knowledge System — AI retrieves context, selects capability, executes workflow, verifies
|
|
65
|
+
|
|
66
|
+
### Added
|
|
67
|
+
- `rules/` — Agent behavior policies (global, coding, safety)
|
|
68
|
+
- `workflows/` — Reusable execution pipelines (YAML, with inputs/outputs per step)
|
|
69
|
+
- `examples/` — Few-shot knowledge (good/, bad/)
|
|
70
|
+
- `learnings/` — Evidence-based learning lifecycle (draft/, validated/, deprecated/)
|
|
71
|
+
- `registry/` — Generated AI retrieval index (skills-index.yml)
|
|
72
|
+
- `docs/ARCHITECTURE.md` — Agent request flow diagram
|
|
73
|
+
- `docs/VERSIONING.md` — Semantic versioning policy
|
|
74
|
+
- `docs/schemas/` — Schema definitions for all knowledge objects
|
|
75
|
+
- `docs/decisions/` — Architecture Decision Records (ADRs)
|
|
76
|
+
- `.agentsignore` — AI boundary file (what agents should NOT load)
|
|
77
|
+
- `tooling/` — Dev automation (generate-registry.js, validate-skills.js)
|
|
78
|
+
- `tests/agent-evaluation/` — Agent behavior test harness
|
|
79
|
+
|
|
80
|
+
### Changed
|
|
81
|
+
- SKILL.md schema upgraded to V8: added `type`, `intent`, `triggers`, `complexity`, `workflow`, `verification`, `related_skills`
|
|
82
|
+
- `skills.json` demoted to **generated compatibility manifest** (source of truth = SKILL.md)
|
|
83
|
+
- Workflows extracted from individual skills → shared reusable templates
|
|
84
|
+
|
|
85
|
+
### Removed
|
|
86
|
+
- Embedded workflows inside SKILL.md body (moved to workflows/)
|
|
87
|
+
- Old migration scripts (migrate-v*.js, patch*.py, add_lang.*, etc.)
|
|
88
|
+
- Duplicate documentation (CLAUDE.md, old docs/)
|
|
89
|
+
- Experimental packages (packages/edaos-sdk)
|
|
90
|
+
- framework/, knowledge/, specs/, templates/ directories
|
|
91
|
+
|
|
92
|
+
### Migration
|
|
93
|
+
- V7.5.1 tagged at git: `v7.5.1`
|
|
94
|
+
- V7 skills preserved in git history; migration is additive schema upgrade
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## [7.5.1] — 2026-07 — Final V7 Release
|
|
99
|
+
|
|
100
|
+
- Bumped all skill versions to 7.5.1
|
|
101
|
+
- Added qk-fe-api-integration skill
|
|
102
|
+
- Added qk-performance-tuner (global config)
|
|
103
|
+
- Stabilized frontmatter schema across all 22 skills
|
|
104
|
+
|
|
105
|
+
## [7.5.0] — 2026-07
|
|
106
|
+
|
|
107
|
+
- Major skills refactor with EDAOS runtime adapter
|
|
108
|
+
- Added MCP server integration
|
|
109
|
+
- Added qk-bug-resolution workflow contracts
|
|
110
|
+
|
|
111
|
+
## [7.0.0] — 2026
|
|
112
|
+
|
|
113
|
+
- V7 release: 22 skills, YAML frontmatter, token budget system
|
package/.agents/README.md
CHANGED
|
@@ -1,74 +1,52 @@
|
|
|
1
|
-
# 🚀 AI Developer Skill OS (ai-developer-skill-os)
|
|
1
|
+
# 🚀 AI Developer Skill OS (ai-developer-skill-os) v8.1.7
|
|
2
2
|
|
|
3
|
-
> **
|
|
3
|
+
> **v8.1.7 "Agent Engineering OS + Design Intelligence"**
|
|
4
4
|
|
|
5
|
-
Hệ sinh thái AI Developer Skill OS đã
|
|
5
|
+
Hệ sinh thái AI Developer Skill OS đã lột xác hoàn toàn. Từ một bộ "công cụ phân tán" (Toolbox) ở V7, phiên bản V8.1.7 được thiết kế như một **Hệ điều hành khép kín (Agent Engineering OS)**, sở hữu năng lực giám sát, bảo vệ ranh giới quyết định (Decision Boundaries) và được trang bị thêm tầng **Design Intelligence**.
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
|
-
## 🏗️ Triết Lý Hoạt Động Cốt Lõi (
|
|
9
|
+
## 🏗️ Triết Lý Hoạt Động Cốt Lõi (V8 Kernel)
|
|
10
10
|
|
|
11
|
-
### 1.
|
|
12
|
-
|
|
11
|
+
### 1. Decision Boundary (Ranh giới Thẩm quyền)
|
|
12
|
+
Không còn tình trạng một Skill ôm đồm mọi việc. Mọi Skill (Kỹ năng) hiện tại bị quản lý bởi các trường `owns`, `does_not_own`, `conflicts_with`, `delegates_to`. Thợ code UI (`qk-ui-builder`) không được phép tự ra quyết định kiến trúc, và ngược lại.
|
|
13
13
|
|
|
14
|
-
### 2.
|
|
15
|
-
|
|
16
|
-
- **Backend / API**: Mọi API phải được viết `OpenAPI/Swagger` schema trước khi viết logic thực tế (`qk-api-lifecycle`).
|
|
17
|
-
- **Database**: Cấm truy vấn mù. Bắt buộc phải có Schema định nghĩa rõ ràng trước (`qk-data-lifecycle`).
|
|
14
|
+
### 2. Design Intelligence Layer
|
|
15
|
+
Khắc phục điểm yếu "mù thẩm mỹ" của AI. Agent giờ đây không chỉ biết code mà còn có Gu Thẩm Mỹ (Design Taste). Dựa trên yêu cầu của bạn, hệ thống tự động tra cứu **Knowledge Graph** để chọn đúng Theme (Fintech, Healthcare, SaaS...), Typography và Visual Patterns trước khi giao việc cho UI Builder.
|
|
18
16
|
|
|
19
|
-
### 3.
|
|
20
|
-
|
|
17
|
+
### 3. Khế Ước Đi Đầu (Contract-First & Zero-Trust)
|
|
18
|
+
- **Frontend / UI**: Mọi sửa đổi phải tuân thủ Design System (được `qk-design-system-engineering` kiểm duyệt).
|
|
19
|
+
- **Backend / API**: Phải viết OpenAPI/Swagger contract trước (`qk-api-lifecycle`).
|
|
20
|
+
- **Data**: Cấm AI tự đoán cấu trúc DB, mọi truy vấn phải có Schema (`qk-data-lifecycle`).
|
|
21
21
|
|
|
22
22
|
---
|
|
23
23
|
|
|
24
|
-
## 🧩 Danh sách
|
|
24
|
+
## 🧩 Danh sách 30 Master Skills
|
|
25
25
|
|
|
26
|
-
Các kỹ năng được quản lý
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
26
|
+
Các kỹ năng được quản lý bằng **Capability Graph** và được đánh giá liên tục thông qua Evaluation Suite. Bao gồm 7 lĩnh vực:
|
|
27
|
+
1. **Core & Orchestration:** `qk-orchestrator`, `qk-context-loader`, `qk-project-memory`, `qk-help`
|
|
28
|
+
2. **Product & Architecture:** `qk-product-specification`, `qk-project-bootstrap`, `qk-frontend-architecture`
|
|
29
|
+
3. **Frontend & UI:** `qk-design-system-engineering`, `qk-ui-system-builder`, `qk-ui-builder`, `qk-fe-api-integration`, `qk-ui-audit`
|
|
30
|
+
4. **Backend & Data:** `qk-api-lifecycle`, `qk-data-lifecycle`, `qk-access-policy`
|
|
31
|
+
5. **Engineering & Delivery:** `qk-feature-delivery`, `qk-bug-resolution`, `qk-engineering-standard`, `qk-system-evolution`, `qk-docs`
|
|
32
|
+
6. **Quality & Testing:** `qk-test-engineering`, `qk-validation-gate`, `qk-web-quality-gate`, `qk-project-health`
|
|
33
|
+
7. **Security, DevOps & Analytics:** `qk-security-audit`, `qk-db-optimizer`, `qk-devops-platform`, `qk-production-release`, `qk-agent-observability`, `qk-ai-builder`
|
|
32
34
|
|
|
33
35
|
---
|
|
34
36
|
|
|
35
37
|
## 💻 Cách Cài Đặt (Installation)
|
|
36
38
|
|
|
37
|
-
### Cách 1:
|
|
39
|
+
### Cách 1: NXP (Không cần cài global) - MỚI
|
|
38
40
|
```bash
|
|
39
|
-
|
|
41
|
+
npx ai-developer-skill-os init
|
|
40
42
|
```
|
|
41
43
|
|
|
42
|
-
### Cách 2:
|
|
44
|
+
### Cách 2: NPM Global (Khuyên dùng cho cá nhân)
|
|
43
45
|
```bash
|
|
44
|
-
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
### Cách 3: NPM Scripts (Trong dự án)
|
|
48
|
-
```bash
|
|
49
|
-
# Antigravity Global — 1 lần cài, mọi dự án dùng chung
|
|
50
|
-
npm run install:antigravity
|
|
51
|
-
|
|
52
|
-
# Antigravity Local — cài riêng cho dự án này
|
|
53
|
-
npm run install:antigravity:local
|
|
54
|
-
|
|
55
|
-
# Các IDE khác
|
|
56
|
-
npm run install:cursor # Global Cursor
|
|
57
|
-
npm run install:windsurf # Global Windsurf
|
|
58
|
-
npm run install:claude # Global Claude Code
|
|
59
|
-
npm run install:kilo # Global Kilo Code
|
|
60
|
-
npm run install:multi # Multi-IDE
|
|
46
|
+
npm i -g ai-developer-skill-os
|
|
61
47
|
```
|
|
62
48
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
| Tham số | Giá trị | Mô tả |
|
|
66
|
-
|---------|---------|-------|
|
|
67
|
-
| `--ide` | `antigravity`, `cursor`, `windsurf`, `claude`, `kilo`, `multi-ide` | IDE/AI Assistant |
|
|
68
|
-
| `--scope` | `1` = Local, `2` = Global | Phạm vi cài đặt |
|
|
69
|
-
|
|
70
|
-
### Ví dụ thực tế
|
|
71
|
-
|
|
49
|
+
### Chạy bằng tham số (Command Line Arguments)
|
|
72
50
|
```bash
|
|
73
51
|
# Cài Antigravity Global (toàn máy)
|
|
74
52
|
npx ai-developer-skill-os init --ide=antigravity --scope=2
|
|
@@ -78,23 +56,31 @@ npx ai-developer-skill-os init --ide=antigravity --scope=1
|
|
|
78
56
|
|
|
79
57
|
# Cài Cursor Local
|
|
80
58
|
npx ai-developer-skill-os init --ide=cursor --scope=1
|
|
81
|
-
|
|
82
|
-
# Cài Multi-IDE (tạo CLAUDE.md + .qk-ai-skill-os)
|
|
83
|
-
npx ai-developer-skill-os init --ide=multi-ide --scope=2
|
|
84
59
|
```
|
|
85
60
|
|
|
86
|
-
##
|
|
61
|
+
## 📦 Các IDE/AI Assistant Được Hỗ Trợ
|
|
62
|
+
- (1) Cursor
|
|
63
|
+
- (2) Windsurf
|
|
64
|
+
- (3) Cline / Roo Code
|
|
65
|
+
- (4) Antigravity / Gemini
|
|
66
|
+
- (5) Codex
|
|
67
|
+
- (6) Kilo Code
|
|
87
68
|
|
|
88
|
-
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## 🧪 Đánh Giá Tự Động (Agent Evaluation)
|
|
72
|
+
|
|
73
|
+
Hệ thống đi kèm một bộ Runner nội bộ để kiểm toán **Routing Intelligence**. Bất kỳ cập nhật nào vào hệ thống Kỹ năng đều phải vượt qua bài kiểm tra hóc búa (Bypass Security, Boundary Attacks, Ambiguous Prompts):
|
|
89
74
|
|
|
90
75
|
```bash
|
|
91
|
-
npm test
|
|
76
|
+
npm run test:agent
|
|
77
|
+
npm run test:graph
|
|
78
|
+
npm run test:registry
|
|
92
79
|
```
|
|
93
80
|
|
|
94
|
-
## 🚀
|
|
95
|
-
|
|
96
|
-
Để tra cứu danh sách các Kỹ năng và luật lệ khắt khe của hệ thống V7, hãy gọi:
|
|
81
|
+
## 🚀 Hướng Dẫn Sử Dụng
|
|
82
|
+
Sau khi cài đặt thành công, hãy gõ lệnh:
|
|
97
83
|
```bash
|
|
98
84
|
./qk-help
|
|
99
85
|
```
|
|
100
|
-
|
|
86
|
+
để kích hoạt AI Orchestrator và khám phá sức mạnh của hệ điều hành!
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
---
|
|
2
|
+
# ── Identity ───────────────────────────────────────────────
|
|
3
|
+
name: qk-code-review
|
|
4
|
+
version: 8.0.0
|
|
5
|
+
status: stable
|
|
6
|
+
description: "Elite AI/Code Review System: Kiểm toán, Review code và cấu hình AI với tư duy Architect, áp dụng 4-Phase Review."
|
|
7
|
+
platforms: [antigravity, claude-code, cursor, windsurf, kilo-code]
|
|
8
|
+
|
|
9
|
+
# ── V8: Classification ─────────────────────────────────────
|
|
10
|
+
type: utility
|
|
11
|
+
|
|
12
|
+
intent:
|
|
13
|
+
- code-review
|
|
14
|
+
- quality-assurance
|
|
15
|
+
- architecture-review
|
|
16
|
+
- ai-config-audit
|
|
17
|
+
|
|
18
|
+
complexity:
|
|
19
|
+
level: high
|
|
20
|
+
criteria:
|
|
21
|
+
files_affected: "1-15"
|
|
22
|
+
has_behavior_change: false
|
|
23
|
+
has_external_dependency: false
|
|
24
|
+
has_breaking_change: false
|
|
25
|
+
|
|
26
|
+
triggers:
|
|
27
|
+
- "review code"
|
|
28
|
+
- "code review"
|
|
29
|
+
- "kiểm tra code"
|
|
30
|
+
- "đánh giá code"
|
|
31
|
+
- "review skin"
|
|
32
|
+
- "review rule"
|
|
33
|
+
- "review ai"
|
|
34
|
+
|
|
35
|
+
selection:
|
|
36
|
+
priority: high
|
|
37
|
+
confidence_threshold: 0.85
|
|
38
|
+
|
|
39
|
+
# ── V8: References ─────────────────────────────────────────
|
|
40
|
+
workflow: code-review
|
|
41
|
+
|
|
42
|
+
rules:
|
|
43
|
+
- global
|
|
44
|
+
|
|
45
|
+
tools:
|
|
46
|
+
- filesystem
|
|
47
|
+
|
|
48
|
+
related_skills:
|
|
49
|
+
- qk-validation-gate
|
|
50
|
+
- qk-engineering-standard
|
|
51
|
+
- qk-project-health
|
|
52
|
+
|
|
53
|
+
knowledge_scope:
|
|
54
|
+
owns:
|
|
55
|
+
- code-review-standards
|
|
56
|
+
- ai-configuration-review
|
|
57
|
+
- feedback-delivery
|
|
58
|
+
references:
|
|
59
|
+
- architecture
|
|
60
|
+
- security-best-practices
|
|
61
|
+
|
|
62
|
+
# ── V8: Verification ───────────────────────────────────────
|
|
63
|
+
verification:
|
|
64
|
+
required: true
|
|
65
|
+
strategy: review
|
|
66
|
+
|
|
67
|
+
# ── V8: Knowledge links ────────────────────────────────────
|
|
68
|
+
examples: []
|
|
69
|
+
learnings: []
|
|
70
|
+
|
|
71
|
+
# ── V7 Runtime ─────────────────────────────────────────────
|
|
72
|
+
execution_mode: deterministic
|
|
73
|
+
cost: high
|
|
74
|
+
latency: medium
|
|
75
|
+
risk: low
|
|
76
|
+
side_effects: read_only
|
|
77
|
+
produces: [report]
|
|
78
|
+
consumes: [source-code, rules, workflows]
|
|
79
|
+
|
|
80
|
+
token_budget:
|
|
81
|
+
max_files_read: 10
|
|
82
|
+
max_lines_per_read: 300
|
|
83
|
+
max_shell_commands: 2
|
|
84
|
+
stop_early: false
|
|
85
|
+
|
|
86
|
+
exit_codes: [SUCCESS, BLOCKED, FAILED, PARTIAL]
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
# qk-code-review — Elite Review System
|
|
90
|
+
|
|
91
|
+
> **Language rule:** Code, identifiers, file names → English. Explanations, summaries → Vietnamese.
|
|
92
|
+
|
|
93
|
+
Biến quá trình Code Review từ "bắt bẻ" (gatekeeping) thành "chia sẻ tri thức" (knowledge sharing) thông qua phản hồi mang tính xây dựng, phân tích có hệ thống và hợp tác cải tiến.
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
## Preconditions
|
|
98
|
+
|
|
99
|
+
- [ ] Xác định rõ đối tượng cần review: Mã nguồn phần mềm (React, Java, etc.) hay Cấu hình AI (Skin, Rules, Workflows).
|
|
100
|
+
- [ ] Cung cấp ngữ cảnh hoặc mục tiêu của đoạn code/cấu hình cần review.
|
|
101
|
+
|
|
102
|
+
```
|
|
103
|
+
On missing precondition → EXIT: BLOCKED
|
|
104
|
+
Report: "Missing: Vui lòng cung cấp ngữ cảnh hoặc chỉ định rõ file cần review."
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
---
|
|
108
|
+
|
|
109
|
+
## Dynamic Context Loading (Tải Ngữ Cảnh Động)
|
|
110
|
+
|
|
111
|
+
> **BẮT BUỘC:** Trước khi bắt đầu review, Agent phải sử dụng tool `view_file` để nạp các bí kíp tương ứng từ thư mục `references/` nhằm đảm bảo chất lượng review sâu sát nhất.
|
|
112
|
+
|
|
113
|
+
- **Nếu review AI Config (Skin, Rule, Workflow):**
|
|
114
|
+
- Mở đọc: `references/ai/v8-schema-validation.md` và `references/ai/ai-anti-patterns.md`.
|
|
115
|
+
- **Nếu review Code Phần mềm (VD: React, Java, Go, v.v.):**
|
|
116
|
+
- Nhận diện ngôn ngữ/framework.
|
|
117
|
+
- Mở đọc file tương ứng: `references/languages/[tên-ngôn-ngữ].md` (VD: `react.md`, `java.md`).
|
|
118
|
+
- **Nếu review ở mức tổng quát hoặc PR lớn (Cross-cutting):**
|
|
119
|
+
- Đọc thêm: `references/cross-cutting/architecture-review-guide.md`, hoặc các file về security/performance nếu phù hợp.
|
|
120
|
+
|
|
121
|
+
---
|
|
122
|
+
|
|
123
|
+
## 4-Phase Review Process
|
|
124
|
+
|
|
125
|
+
Là một AI Architect, quá trình review phải tuân thủ nghiêm ngặt 4 giai đoạn sau:
|
|
126
|
+
|
|
127
|
+
### Phase 1: Context Gathering & Loading (Thu thập & Nạp Ngữ Cảnh)
|
|
128
|
+
- Đọc file mô tả (PR, Issue) hoặc yêu cầu của người dùng.
|
|
129
|
+
- **Thực thi Dynamic Context Loading** (đọc các file reference cần thiết như đã định nghĩa ở trên).
|
|
130
|
+
|
|
131
|
+
### Phase 2: High-Level Review (Kiến trúc & Chuẩn mực)
|
|
132
|
+
- **Đối với AI Config:** Kiểm tra cấu trúc V8 (Identity, Intent, Complexity, Triggers).
|
|
133
|
+
- **Đối với Code Phần mềm:** Kiểm tra SOLID, Coupling/Cohesion, Performance, Security (Tham chiếu theo `cross-cutting` guides).
|
|
134
|
+
|
|
135
|
+
### Phase 3: Deep-dive & Logic Review (Phân tích chi tiết)
|
|
136
|
+
- **Đối với AI Config:** Kiểm tra rủi ro "ảo giác" (hallucination), token abuse, side-effects, stop_early.
|
|
137
|
+
- **Đối với Code Phần mềm:** Rà soát edge cases, lỗi logic chuyên sâu theo từng ngôn ngữ (Tham chiếu theo `languages` guides).
|
|
138
|
+
|
|
139
|
+
### Phase 4: Summary & Decision (Tổng hợp & Quyết định)
|
|
140
|
+
- Đưa ra báo cáo theo `Output Format`.
|
|
141
|
+
- Gắn nhãn `Severity Tags` rõ ràng.
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## Feedback Principles (Nguyên tắc Phản hồi)
|
|
146
|
+
|
|
147
|
+
- **Collaborative Language (Ngôn từ hợp tác)**: Thay vì ra lệnh ("Sửa cái này thành X", "Bỏ dòng này đi"), hãy dùng câu hỏi gợi mở ("Nếu chúng ta dùng X ở đây thì có tối ưu hiệu năng hơn không?", "Có vẻ logic này bị lặp, chúng ta extract nó ra hàm riêng được không?").
|
|
148
|
+
- **Differentiate Severity (Phân biệt mức độ)**: Bắt buộc sử dụng các nhãn sau để phân loại mức độ phản hồi:
|
|
149
|
+
- 🔴 `[blocking]` - Lỗi nghiêm trọng (VD: Security flaw, thiếu token_budget). Bắt buộc phải sửa.
|
|
150
|
+
- 🟡 `[important]` - Lỗi quan trọng (VD: Performance leak, trigger quá rộng). Nên sửa hoặc cần thảo luận.
|
|
151
|
+
- 🟢 `[nit]` - Cải thiện nhỏ (VD: Lỗi chính tả, format, naming). Không bắt buộc.
|
|
152
|
+
- 💡 `[suggestion]` - Cách tiếp cận hoặc thư viện thay thế để tham khảo.
|
|
153
|
+
- 📚 `[learning]` - Giải thích nguyên lý (Why) để chia sẻ kiến thức, không yêu cầu hành động.
|
|
154
|
+
- 🎉 `[praise]` - Lời khen cho đoạn code / logic thiết kế tốt.
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## Output Format
|
|
159
|
+
|
|
160
|
+
```markdown
|
|
161
|
+
## qk-code-review Report
|
|
162
|
+
─────────────────────────────────────────────────
|
|
163
|
+
**Target:** [Tên file / Chức năng]
|
|
164
|
+
**Status:** SUCCESS | BLOCKED | FAILED | PARTIAL
|
|
165
|
+
|
|
166
|
+
### 📊 Executive Summary
|
|
167
|
+
[1-2 câu tóm tắt chất lượng tổng thể của mã nguồn/cấu hình. VD: "Kiến trúc rõ ràng, nhưng tiềm ẩn rủi ro lặp vô hạn ở dòng 45."]
|
|
168
|
+
|
|
169
|
+
### 🔍 Findings & Recommendations
|
|
170
|
+
|
|
171
|
+
[Nhóm các findings theo mức độ nghiêm trọng giảm dần. LUÔN đính kèm snippet / file line nếu có thể]
|
|
172
|
+
|
|
173
|
+
- 🔴 `[blocking]`: [Vấn đề nghiêm trọng]
|
|
174
|
+
- *Location*: `file.ts:L45`
|
|
175
|
+
- *Feedback*: [Câu hỏi/Gợi ý sửa chữa]
|
|
176
|
+
|
|
177
|
+
- 🟡 `[important]`: [Vấn đề quan trọng]
|
|
178
|
+
- 💡 `[suggestion]`: [Gợi ý cải thiện]
|
|
179
|
+
- 🟢 `[nit]`: [Góp ý nhỏ]
|
|
180
|
+
- 🎉 `[praise]`: [Khen ngợi]
|
|
181
|
+
|
|
182
|
+
### 🛠️ Suggested Fixes (Optional)
|
|
183
|
+
[Cung cấp Code diff hoặc YAML chuẩn xác để user dễ dàng copy & paste. TUYỆT ĐỐI KHÔNG tự sửa file nếu user chưa yêu cầu]
|
|
184
|
+
|
|
185
|
+
### ✅ Verdict
|
|
186
|
+
- [ ] Approve (Có thể merge/deploy ngay)
|
|
187
|
+
- [ ] Changes Requested (Cần sửa các mục `[blocking]`)
|
|
188
|
+
- [ ] Comment (Chỉ là gợi ý, quyền quyết định ở user)
|
|
189
|
+
```
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# AI Agent Anti-Patterns
|
|
2
|
+
|
|
3
|
+
Khi review các cấu hình AI (Skills, Rules, Workflows), hãy lưu ý các "Code Smells" hoặc Anti-patterns phổ biến sau đây:
|
|
4
|
+
|
|
5
|
+
## 1. Mất kiểm soát Token (Token Abuse)
|
|
6
|
+
- **Dấu hiệu**: Không định nghĩa `token_budget`, hoặc định nghĩa `max_files_read: 50`, `max_lines_per_read: 1000`.
|
|
7
|
+
- **Rủi ro**: Agent sẽ đọc lướt quá nhiều file, làm cạn kiệt context window, dẫn đến "ảo giác" (hallucination) và tốn kém chi phí.
|
|
8
|
+
- **Cách khắc phục**: Ép buộc một giới hạn cứng hợp lý (VD: `max_files_read: 3`, `max_lines_per_read: 150`). Bắt buộc agent dùng `grep` thay vì `read_file` toàn bộ.
|
|
9
|
+
|
|
10
|
+
## 2. Phạm vi quá rộng (Scope Creep)
|
|
11
|
+
- **Dấu hiệu**: Phần `Scope` hoặc `Intent` bao gồm quá nhiều chức năng không liên quan (VD: Vừa viết code, vừa test, vừa deploy, vừa viết docs).
|
|
12
|
+
- **Rủi ro**: Agent mất tập trung, không biết ưu tiên tác vụ nào, thường xuyên bỏ dở công việc giữa chừng.
|
|
13
|
+
- **Cách khắc phục**: Áp dụng nguyên tắc Single Responsibility. Tách thành nhiều skill nhỏ và dùng Orchestrator hoặc Workflow để phối hợp. Yêu cầu làm rõ mục `This skill does NOT`.
|
|
14
|
+
|
|
15
|
+
## 3. Lạm dụng quyền thực thi (Unsafe Side-Effects)
|
|
16
|
+
- **Dấu hiệu**: Cấu hình `side_effects: run_commands` nhưng không có Verification Gate hoặc không bắt buộc user approval.
|
|
17
|
+
- **Rủi ro**: Có thể vô tình xóa file (`rm -rf`), chạy mã độc, hoặc làm hỏng môi trường phát triển của User.
|
|
18
|
+
- **Cách khắc phục**: Đánh giá Risk level (High/Medium). Nếu có `run_commands`, phải ép buộc chạy ở môi trường giả lập (sandbox) hoặc chỉ sinh ra script để user tự chạy (Dry-run mode).
|
|
19
|
+
|
|
20
|
+
## 4. Thiếu điều kiện tiền quyết (Missing Preconditions)
|
|
21
|
+
- **Dấu hiệu**: Bỏ trống phần `Preconditions`, agent lao vào thực thi ngay lập tức.
|
|
22
|
+
- **Rủi ro**: Chạy sai ngữ cảnh, sửa bậy bạ vào mã nguồn khi chưa đủ thông tin, tốn token vô ích.
|
|
23
|
+
- **Cách khắc phục**: Bắt buộc phải có `EXIT: BLOCKED` nếu thiếu thông tin đầu vào quan trọng (ví dụ: thiếu file config, thiếu đường dẫn dự án).
|
|
24
|
+
|
|
25
|
+
## 5. Prompt mang tính "Bức ép" (Aggressive Prompts)
|
|
26
|
+
- **Dấu hiệu**: Dùng nhiều từ in hoa "MUST", "DO NOT", "NEVER" nhưng thiếu giải thích nguyên lý (Why).
|
|
27
|
+
- **Rủi ro**: LLM (Large Language Model) thường bị over-constrained (bị kìm kẹp quá mức), dẫn đến việc từ chối trả lời (refusal) hoặc phản hồi cứng nhắc, mất đi khả năng sáng tạo.
|
|
28
|
+
- **Cách khắc phục**: Chuyển từ "Cấm làm X" sang "Chỉ làm X khi Y, vì Z". Cung cấp `examples` cụ thể thay vì cấm đoán suông.
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# V8 Schema Validation Guide
|
|
2
|
+
|
|
3
|
+
Tài liệu này dùng để đối chiếu khi review các file `SKILL.md` hoặc các file cấu hình AI khác trong dự án. Đảm bảo mọi cấu hình tuân thủ chặt chẽ định dạng và kiến trúc của V8 Skin.
|
|
4
|
+
|
|
5
|
+
## 1. Frontmatter (YAML Metadata) Bắt buộc
|
|
6
|
+
|
|
7
|
+
Mọi file `SKILL.md` **phải** bắt đầu bằng khối YAML chứa các thông tin sau:
|
|
8
|
+
|
|
9
|
+
```yaml
|
|
10
|
+
---
|
|
11
|
+
# ── Identity ───────────────────────────────────────────────
|
|
12
|
+
name: qk-[tên-skill] # Bắt buộc có tiền tố qk-
|
|
13
|
+
version: [X.Y.Z] # Phiên bản semantic
|
|
14
|
+
status: [stable/beta/draft]
|
|
15
|
+
description: "[Mô tả ngắn gọn bằng tiếng Việt]"
|
|
16
|
+
platforms: [danh sách platform hỗ trợ]
|
|
17
|
+
|
|
18
|
+
# ── V8: Classification ─────────────────────────────────────
|
|
19
|
+
type: [utility/capability/orchestrator]
|
|
20
|
+
intent:
|
|
21
|
+
- [mục-đích-chính]
|
|
22
|
+
|
|
23
|
+
complexity:
|
|
24
|
+
level: [low/medium/high/critical]
|
|
25
|
+
criteria:
|
|
26
|
+
files_affected: "[range]"
|
|
27
|
+
# ... các criteria khác
|
|
28
|
+
|
|
29
|
+
triggers: # Rất quan trọng, bắt buộc có
|
|
30
|
+
- "[từ khóa 1]"
|
|
31
|
+
- "[từ khóa 2]"
|
|
32
|
+
|
|
33
|
+
# ── V7 Runtime ─────────────────────────────────────────────
|
|
34
|
+
# Phần này cấu hình cách Agent thực thi
|
|
35
|
+
side_effects: [read_only/edit_files/run_commands]
|
|
36
|
+
produces: [...]
|
|
37
|
+
consumes: [...]
|
|
38
|
+
|
|
39
|
+
token_budget: # Bắt buộc để tránh cạn kiệt Token
|
|
40
|
+
max_files_read: [số]
|
|
41
|
+
max_lines_per_read: [số]
|
|
42
|
+
max_shell_commands: [số]
|
|
43
|
+
stop_early: [true/false]
|
|
44
|
+
|
|
45
|
+
exit_codes: [SUCCESS, BLOCKED, FAILED, PARTIAL]
|
|
46
|
+
---
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## 2. Các phần Body (Markdown) Bắt buộc
|
|
50
|
+
|
|
51
|
+
1. **Title & Language Rule**: Ngay sau frontmatter, phải có tiêu đề và rule ngôn ngữ chuẩn:
|
|
52
|
+
```markdown
|
|
53
|
+
> **Language rule:** Code, identifiers, file names → English. Explanations, summaries → Vietnamese.
|
|
54
|
+
```
|
|
55
|
+
2. **Preconditions**: Định nghĩa rõ điều kiện tiên quyết để skill này có thể chạy. Phải mô tả hành động (thường là `EXIT: BLOCKED`) nếu thiếu thông tin.
|
|
56
|
+
3. **Scope (What it does / What it does NOT)**: Phải rõ ràng giới hạn của skill. Đặc biệt phần `Does NOT` để ngăn scope creep.
|
|
57
|
+
4. **Output Format**: Format chuẩn mà AI sẽ phản hồi lại cho user sau khi thực thi.
|
|
58
|
+
|
|
59
|
+
## 3. Checklist khi Review
|
|
60
|
+
|
|
61
|
+
- [ ] Tiền tố tên có đúng chuẩn (`qk-`) không?
|
|
62
|
+
- [ ] Triggers có bao phủ đủ các cách gọi thông dụng không? Có bị trùng lặp với skill khác không?
|
|
63
|
+
- [ ] `token_budget` có được cấu hình hợp lý so với `complexity` không? (Ví dụ: complexity low nhưng lại cho đọc 50 files là sai).
|
|
64
|
+
- [ ] Nếu `side_effects` là `run_commands` hoặc `edit_files`, phần Preconditions đã đủ chặt chẽ chưa?
|
|
65
|
+
- [ ] Format đầu ra (Output format) có chuẩn mực và chuyên nghiệp không?
|