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.
Files changed (63) hide show
  1. package/.agents/AGENTS.md +139 -42
  2. package/.agents/DEV_PROFILE.md +95 -0
  3. package/.agents/registry/capability-graph.yml +171 -334
  4. package/.agents/registry/graph.json +37 -19
  5. package/.agents/registry/index.yaml +59 -13
  6. package/.agents/registry/skills-index.yml +204 -447
  7. package/.agents/rules/coding.md +23 -0
  8. package/.agents/rules/global.md +44 -30
  9. package/.agents/skills/_template/SKILL.md +2 -377
  10. package/.agents/skills/qk-access-policy/SKILL.md +98 -473
  11. package/.agents/skills/qk-agent-observability/SKILL.md +3 -439
  12. package/.agents/skills/qk-ai-builder/SKILL.md +132 -565
  13. package/.agents/skills/qk-api-consumer/SKILL.md +256 -0
  14. package/.agents/skills/qk-api-consumer/capability.yaml +21 -0
  15. package/.agents/skills/qk-api-consumer/evals/scorecard.yaml +29 -0
  16. package/.agents/skills/qk-api-lifecycle/SKILL.md +133 -456
  17. package/.agents/skills/qk-bug-resolution/SKILL.md +128 -561
  18. package/.agents/skills/qk-code-review/SKILL.md +142 -420
  19. package/.agents/skills/qk-context-loader/SKILL.md +99 -471
  20. package/.agents/skills/qk-data-engineer/SKILL.md +119 -340
  21. package/.agents/skills/qk-data-lifecycle/SKILL.md +89 -488
  22. package/.agents/skills/qk-db-optimizer/SKILL.md +102 -488
  23. package/.agents/skills/qk-design-system-engineering/SKILL.md +76 -461
  24. package/.agents/skills/qk-devops-platform/SKILL.md +77 -463
  25. package/.agents/skills/qk-docs/SKILL.md +88 -494
  26. package/.agents/skills/qk-engineering-standard/SKILL.md +4 -588
  27. package/.agents/skills/qk-fe-api-integration/SKILL.md +343 -343
  28. package/.agents/skills/qk-fe-api-integration/evals/scorecard.yaml +29 -29
  29. package/.agents/skills/qk-feature-delivery/SKILL.md +137 -445
  30. package/.agents/skills/qk-feature-delivery/evals/scorecard.yaml +1 -1
  31. package/.agents/skills/qk-frontend-architecture/SKILL.md +5 -479
  32. package/.agents/skills/qk-help/evals/scorecard.yaml +13 -13
  33. package/.agents/skills/qk-orchestrator/SKILL.md +63 -502
  34. package/.agents/skills/qk-orchestrator/references/routing-table.md +10 -14
  35. package/.agents/skills/qk-product-specification/SKILL.md +70 -479
  36. package/.agents/skills/qk-production-release/SKILL.md +80 -537
  37. package/.agents/skills/qk-project-audit/SKILL.md +174 -0
  38. package/.agents/skills/qk-project-bootstrap/SKILL.md +243 -471
  39. package/.agents/skills/qk-project-health/SKILL.md +97 -496
  40. package/.agents/skills/qk-project-memory/SKILL.md +76 -21
  41. package/.agents/skills/qk-refactor/SKILL.md +167 -384
  42. package/.agents/skills/qk-security-audit/SKILL.md +141 -463
  43. package/.agents/skills/qk-security-audit/capability.yaml +1 -2
  44. package/.agents/skills/qk-system-evolution/SKILL.md +343 -343
  45. package/.agents/skills/qk-system-evolution/evals/scorecard.yaml +26 -26
  46. package/.agents/skills/qk-test-engineering/SKILL.md +119 -509
  47. package/.agents/skills/qk-ui-audit/SKILL.md +73 -537
  48. package/.agents/skills/qk-ui-builder/SKILL.md +521 -482
  49. package/.agents/skills/qk-ui-system-builder/SKILL.md +68 -514
  50. package/.agents/skills/qk-upgrade/SKILL.md +301 -0
  51. package/.agents/skills/qk-upgrade/capability.yaml +24 -0
  52. package/.agents/skills/qk-upgrade/evals/scorecard.yaml +26 -0
  53. package/.agents/skills/qk-validation-gate/SKILL.md +4 -603
  54. package/.agents/skills/qk-web-quality-gate/SKILL.md +85 -463
  55. package/.agents/workflows/bug-resolution.yml +6 -6
  56. package/.agents/workflows/context-discovery.yml +94 -0
  57. package/.agents/workflows/feature-delivery.yml +8 -4
  58. package/.agents/workflows/refactor.yml +6 -3
  59. package/.agents/workflows/shared/quality-gate.yml +94 -0
  60. package/.agents/workflows/skin-governance.yml +115 -0
  61. package/README.md +152 -67
  62. package/package.json +2 -2
  63. package/tooling/build-registry.js +30 -8
@@ -0,0 +1,94 @@
1
+ name: context-discovery
2
+ version: 9.2.0
3
+ description: "Pipeline load context dự án và vẽ dependency graph trước khi thực hiện task — ngăn hallucination kiến trúc."
4
+
5
+ owner:
6
+ type: engineering
7
+ maintained_by: qk-team
8
+
9
+ verification_profile: review
10
+
11
+ triggers:
12
+ - "load context"
13
+ - "tìm hiểu codebase"
14
+ - "explore architecture"
15
+ - "explain the codebase"
16
+ - "trace dependency"
17
+ - "hiểu project"
18
+ - "which skill should i use"
19
+ - "help me choose"
20
+
21
+ ide_binding:
22
+ slash_command: "/discover"
23
+ aliases: ["/context", "/explore", "/research"]
24
+
25
+ steps:
26
+ - id: define_scope
27
+ name: "Xác định phạm vi cần khám phá"
28
+ purpose: "Biết chính xác cần tìm hiểu gì để phục vụ task tiếp theo"
29
+ required: true
30
+ inputs:
31
+ - task_goal # Task người dùng muốn làm sau context load
32
+ outputs:
33
+ - discovery_questions # Các câu hỏi cụ thể cần trả lời
34
+ - entry_points # Files/folders bắt đầu đọc
35
+ actions:
36
+ - "Đặt 3-5 câu hỏi cụ thể cần trả lời (không đọc mọi thứ)"
37
+ - "Ưu tiên: package.json / go.mod / pyproject.toml → biết stack"
38
+ - "Sau đó: src/ structure → biết architecture pattern"
39
+ exit_on_fail: BLOCKED
40
+
41
+ - id: detect_stack
42
+ name: "Phát hiện Stack & Architecture"
43
+ purpose: "Xác định tech stack, project type, và conventions đang dùng"
44
+ required: true
45
+ inputs:
46
+ - entry_points
47
+ outputs:
48
+ - detected_stack # language, framework, DB, CSS, test runner...
49
+ - project_type # web-app / api / data-pipeline / monorepo / ai-agent
50
+ - architecture_pattern # feature-based / domain / layered / atomic
51
+ actions:
52
+ - "Đọc package.json / requirements.txt / go.mod / Cargo.toml"
53
+ - "Đọc cấu trúc thư mục src/ (1 level sâu)"
54
+ - "Tìm config files: tsconfig, prisma/schema, docker-compose, .env.example"
55
+ - "Đọc tối đa 2-3 file entry point để xác nhận pattern"
56
+
57
+ - id: map_dependencies
58
+ name: "Vẽ Dependency Map"
59
+ purpose: "Hiểu component nào phụ thuộc vào component nào"
60
+ required: false
61
+ skip_if: "Task không cần hiểu cross-component dependencies"
62
+ inputs:
63
+ - detected_stack
64
+ - entry_points
65
+ outputs:
66
+ - dependency_map # Key components + their relationships
67
+ - critical_paths # Paths hay bị ảnh hưởng khi thay đổi
68
+ context_budget: 100
69
+ actions:
70
+ - "Dùng grep_search để trace imports, không đọc toàn bộ file"
71
+ - "Đọc targeted sections (≤ 100 lines per read)"
72
+ - "Ghi lại circular deps hay God File nếu phát hiện"
73
+
74
+ - id: synthesize
75
+ name: "Tổng hợp Context"
76
+ purpose: "Đóng gói kết quả sẵn sàng inject vào skill thực thi tiếp theo"
77
+ required: true
78
+ inputs:
79
+ - detected_stack
80
+ - dependency_map
81
+ - discovery_questions
82
+ outputs:
83
+ - context_summary # Stack + Architecture + Key files
84
+ - skill_recommendation # Skill phù hợp nhất cho task hiện tại
85
+ - warnings # Deprecated patterns, risks, anti-patterns phát hiện
86
+ actions:
87
+ - "Viết summary dạng bullet (không dài hơn 10 dòng)"
88
+ - "Đề xuất skill phù hợp nhất nếu chưa được chọn"
89
+ - "Flag pattern cũ hoặc vi phạm convention"
90
+ - "Ghi log execution trace vào evals/traces/ nếu có"
91
+
92
+ escalation:
93
+ max_retries: 1
94
+ on_failure: "Report partial findings với confidence level, list files chưa đọc được"
@@ -98,7 +98,7 @@ steps:
98
98
 
99
99
  - id: verify
100
100
  name: "Verify implementation"
101
- purpose: "Xác nhận feature hoạt động đúng theo acceptance criteria"
101
+ purpose: "Xác nhận feature hoạt động đúng theo acceptance criteria — quality gate bắt buộc"
102
102
  required: true
103
103
  skip_if: null
104
104
  inputs:
@@ -107,11 +107,15 @@ steps:
107
107
  - modified_files
108
108
  outputs:
109
109
  - verification_result
110
- - unmet_criteria # Any criteria not yet met
110
+ - unmet_criteria
111
+ - quality_gate_result # PASS | PARTIAL | FAIL
111
112
  actions:
112
- - "Đối chiếu từng acceptance criterion"
113
+ - "Đối chiếu từng acceptance criterion — list unmet nếu có"
113
114
  - "Re-read key implementation sections"
114
- - "Run tests nếu có"
115
+ - "Run linter nếu có (npm run lint / ruff / eslint)"
116
+ - "Run tests nếu có (npm test / pytest / go test)"
117
+ - "Áp dụng shared quality gate → xem: .agents/workflows/shared/quality-gate.yml"
118
+ - " Checklist: universal_checks + feature-delivery specific checks"
115
119
  - "Ghi log execution trace vào evals/traces/"
116
120
  exit_on_fail: PARTIAL
117
121
 
@@ -77,8 +77,8 @@ steps:
77
77
  - "Không add functionality mới trong khi refactor"
78
78
 
79
79
  - id: verify
80
- name: "Verify behavior unchanged"
81
- purpose: "Xác nhận external behavior giống hệt trước refactor"
80
+ name: "Verify behavior unchanged + quality gate"
81
+ purpose: "Xác nhận external behavior giống hệt trước refactor VÀ quality cải thiện"
82
82
  required: true
83
83
  skip_if: null
84
84
  inputs:
@@ -87,10 +87,13 @@ steps:
87
87
  outputs:
88
88
  - behavior_preserved # true/false
89
89
  - test_results # pass/fail/na
90
+ - quality_gate_result # PASS | FAIL
90
91
  actions:
91
92
  - "Re-read modified sections"
92
- - "So sánh với current_behavior_summary"
93
+ - "So sánh với current_behavior_summary — behavior PHẢI giống hệt"
93
94
  - "Chạy tests nếu có"
95
+ - "Áp dụng shared quality gate → xem: .agents/workflows/shared/quality-gate.yml"
96
+ - " Checklist: universal_checks + refactor specific checks"
94
97
  - "Ghi log execution trace vào evals/traces/"
95
98
  exit_on_fail: FAILED
96
99
 
@@ -0,0 +1,94 @@
1
+ name: quality-gate
2
+ version: 9.2.0
3
+ description: "Shared quality gate — embedded vào bước verify của feature-delivery, bug-resolution, refactor. Source of truth duy nhất cho R-C-10 checklist."
4
+ type: shared-step
5
+
6
+ # ─────────────────────────────────────────────────────────────
7
+ # CÁCH DÙNG TRONG WORKFLOW:
8
+ # Trong step verify của workflow, thêm dòng sau vào actions:
9
+ # - "Áp dụng shared quality gate: xem .agents/workflows/shared/quality-gate.yml"
10
+ # Rồi liệt kê CHỈ những check đặc thù của workflow đó.
11
+ #
12
+ # KHÔNG copy toàn bộ checklist này vào workflow — trỏ về file này.
13
+ # Khi cần update checklist: sửa file này, tất cả workflow tự được cập nhật.
14
+ # ─────────────────────────────────────────────────────────────
15
+
16
+ universal_checks:
17
+ description: "Áp dụng cho MỌI workflow có side_effects: edit_files (R-C-10 trong coding.md)"
18
+ items:
19
+ - id: fn-length
20
+ check: "Function length ≤ 40 lines"
21
+ action: "Extract sub-function nếu vi phạm"
22
+
23
+ - id: file-length
24
+ check: "File length ≤ 300 lines"
25
+ action: "Split module nếu vi phạm"
26
+
27
+ - id: nesting-depth
28
+ check: "Nesting depth ≤ 3 levels"
29
+ action: "Extract early return hoặc helper function"
30
+
31
+ - id: cyclomatic
32
+ check: "Cyclomatic complexity ≤ 10"
33
+ action: "Simplify conditions, extract logic"
34
+
35
+ - id: no-silent-errors
36
+ check: "Không có empty catch, không dùng `!` hoặc `as` để bypass type"
37
+ action: "Fix root cause — report BLOCKED nếu không rõ root cause"
38
+
39
+ - id: no-magic-numbers
40
+ check: "Không có magic numbers/strings trong logic"
41
+ action: "Extract thành named constant"
42
+
43
+ - id: dry
44
+ check: "Không có logic lặp ≥ 2 lần"
45
+ action: "Extract thành shared function/util"
46
+
47
+ - id: naming
48
+ check: "Naming conventions: camelCase fn, PascalCase class, UPPER_SNAKE constant"
49
+ action: "Rename theo convention"
50
+
51
+ - id: no-console-log
52
+ check: "Không có console.log/print/fmt.Println debug còn sót"
53
+ action: "Xóa hoặc thay bằng proper logger"
54
+
55
+ - id: root-cause-fix
56
+ check: "Fix là root cause, không phải symptom patch"
57
+ action: "Report BLOCKED nếu root cause chưa rõ"
58
+
59
+ workflow_specific_checks:
60
+ feature-delivery:
61
+ description: "Thêm vào sau universal_checks khi verify feature mới"
62
+ items:
63
+ - id: acceptance-criteria
64
+ check: "Tất cả acceptance criteria đã được đáp ứng"
65
+ action: "List unmet criteria, report PARTIAL nếu còn thiếu"
66
+ - id: run-tests
67
+ check: "Chạy linter + test suite (npm run lint / ruff / eslint / pytest)"
68
+ action: "Fix lint errors trước khi report SUCCESS"
69
+
70
+ bug-resolution:
71
+ description: "Thêm vào sau universal_checks khi verify bug fix"
72
+ items:
73
+ - id: no-regression
74
+ check: "Callers/dependents không bị break"
75
+ action: "Đọc caller files, verify interface không thay đổi"
76
+ - id: security-boundary
77
+ check: "Tuân thủ R-SEC-04 (Security Boundary)"
78
+ action: "Flag nếu fix chạm auth/payment/permission code"
79
+
80
+ refactor:
81
+ description: "Thêm vào sau universal_checks khi verify refactor"
82
+ items:
83
+ - id: behavior-unchanged
84
+ check: "External behavior giống hệt trước refactor"
85
+ action: "So sánh với current_behavior_summary, report FAILED nếu có diff"
86
+ - id: run-tests
87
+ check: "Test suite pass — không có regression"
88
+ action: "Report FAILED + rollback nếu test fail sau refactor"
89
+
90
+ exit_criteria:
91
+ SUCCESS: "Tất cả universal_checks + workflow_specific_checks đều pass"
92
+ PARTIAL: "Universal checks pass, nhưng có workflow-specific check chưa xong (VD: test chưa được viết)"
93
+ FAILED: "Bất kỳ universal check nào fail, hoặc behavior changed sau refactor, hoặc test regression"
94
+ BLOCKED: "Root cause chưa rõ, hoặc thiếu thông tin để verify"
@@ -0,0 +1,115 @@
1
+ name: skin-governance
2
+ version: 9.2.0
3
+ description: "Workflow tối ưu hóa, kiểm định và nâng cấp AI Skin — observe usage, measure success, improve, validate, promote."
4
+
5
+ owner:
6
+ type: engineering
7
+ maintained_by: qk-team
8
+
9
+ verification_profile: skill-evolution
10
+
11
+ triggers:
12
+ - "improve this skill"
13
+ - "tối ưu skill"
14
+ - "why does this skill keep failing"
15
+ - "optimize this workflow"
16
+ - "phân tích usage skill"
17
+ - "nâng cấp skin"
18
+ - "skin governance"
19
+
20
+ ide_binding:
21
+ slash_command: "/skin-tune"
22
+ aliases: ["/evolve-skill", "/skin-governance"]
23
+
24
+ steps:
25
+ - id: observe_usage
26
+ name: "Observe Usage"
27
+ purpose: "Thống kê cách skill được gọi, token consumed, exit codes phân bổ"
28
+ required: true
29
+ inputs:
30
+ - skill_logs
31
+ - evals_traces
32
+ outputs:
33
+ - usage_metrics # trigger_rate, avg_tokens, exit_distribution
34
+ actions:
35
+ - "Đọc evals/traces/ của skill target"
36
+ - "Thống kê trigger rate và token usage per exit code"
37
+ - "Phát hiện pattern gọi sai skill (routing error)"
38
+
39
+ - id: measure_success
40
+ name: "Measure Success Rate"
41
+ purpose: "Đánh giá chất lượng thực thi theo scorecard"
42
+ required: true
43
+ inputs:
44
+ - usage_metrics
45
+ - scorecard_yaml
46
+ outputs:
47
+ - success_rate # % SUCCESS / total runs
48
+ - weak_areas # Steps hay fail nhất
49
+ actions:
50
+ - "Tính SUCCESS / FAILED / PARTIAL / BLOCKED ratio"
51
+ - "Xác định bước nào trong workflow hay bị BLOCKED nhất"
52
+ - "So sánh với threshold trong scorecard.yaml"
53
+
54
+ - id: detect_failure
55
+ name: "Detect Failure Patterns"
56
+ purpose: "Tìm root cause của các lần fail — không đoán mò"
57
+ required: true
58
+ inputs:
59
+ - execution_results
60
+ - evals_traces
61
+ outputs:
62
+ - failure_patterns # Categorized: ambiguous_input | hallucination | budget_overrun | wrong_routing
63
+ actions:
64
+ - "Phân loại lỗi: ambiguous_input / hallucination / budget_overrun / wrong_routing"
65
+ - "Tìm ví dụ cụ thể từ traces"
66
+ - "Ghi root cause evidence cho từng category"
67
+
68
+ - id: improve_skill
69
+ name: "Propose Improvement"
70
+ purpose: "Đề xuất thay đổi cụ thể — không thay đổi ngầm"
71
+ required: true
72
+ inputs:
73
+ - failure_patterns
74
+ - skill_body
75
+ outputs:
76
+ - improvement_proposal # Diff: what to add/remove/change + reason
77
+ actions:
78
+ - "Giảm noise trong instruction (xóa rule không được enforce)"
79
+ - "Cập nhật examples với case thực tế từ traces"
80
+ - "Tinh chỉnh token_budget nếu hay bị overrun"
81
+ - "Cập nhật triggers nếu routing hay sai"
82
+ - "KHÔNG tự sửa — trả proposal để human review"
83
+ human_checkpoint:
84
+ condition: always
85
+ message: "Review improvement proposal trước khi apply vào SKILL.md"
86
+
87
+ - id: validate
88
+ name: "Validate Proposal"
89
+ purpose: "Đảm bảo bản cải tiến không vi phạm governance rules"
90
+ required: true
91
+ inputs:
92
+ - improvement_proposal
93
+ outputs:
94
+ - validation_result # PASS | FAIL với lý do
95
+ actions:
96
+ - "Kiểm tra schema compliance (SPEC.md frontmatter)"
97
+ - "Đảm bảo không tạo scope overlap với skill khác"
98
+ - "Verify triggers không trùng skill khác trong routing table"
99
+
100
+ - id: promote
101
+ name: "Promote to Stable"
102
+ purpose: "Đưa bản cải tiến vào production sau khi đã validate"
103
+ required: true
104
+ inputs:
105
+ - validation_result
106
+ outputs:
107
+ - promoted_skill # version bumped SKILL.md
108
+ actions:
109
+ - "Bump patch version (9.2.x → 9.2.x+1)"
110
+ - "Cập nhật registry: node tooling/generate-registry.js"
111
+ - "Ghi changelog entry"
112
+
113
+ escalation:
114
+ max_retries: 1
115
+ on_failure: "Hủy bỏ bản cải tiến, giữ nguyên version hiện tại, ghi failure reason"
package/README.md CHANGED
@@ -1,99 +1,184 @@
1
- # 🚀 AI Developer Skill OS (ai-developer-skill-os) v9.1.1
1
+ # AI Developer Skill OS v9.2.0
2
2
 
3
- > **v9.1.1 "EDAOS v9.1Governed Capability & Universal Project Knowledge V1 Architecture"**
3
+ > **v9.2.0 "EDAOS v9.2Role-Aware Execution & Semantic Naming"**
4
4
 
5
- Hệ sinh thái AI Developer Skill OS tiến hóa lên phiên bản **V9.1.1 (EDAOS v9.1.1)** với kiến trúc **Universal Project Knowledge V1 (Local Private & Self-Init Architecture)**, kết hợp cùng mô hình Manifest-First và Eval Pipeline, biến AI từ trợ lý bị động thành Sư phụ Lập trình (Elite AI Engineer) thấu hiểu sâu sắc codebase và tri thức dự án với chi phí tra cứu gần như bằng 0.
5
+ Phiên bản **v9.2.0** tập trung vào 3 nâng cấp cốt lõi:
6
+ 1. **Role-Aware Execution** — AI tự động điều chỉnh chiều sâu phân tích theo role khai báo trong `DEV_PROFILE.md`
7
+ 2. **Semantic Naming** — Đổi tên skills, workflows theo đúng mục đích thực tế, loại bỏ tên trừu tượng
8
+ 3. **Prompt Templates theo Role** — Mỗi skill có examples cụ thể cho từng role (fe/be/fullstack/data/ai-engineer/devops)
6
9
 
7
10
  ---
8
11
 
9
- ## 🧭 Kiến Trúc Trí Nhớ Dự Án (Universal Project Knowledge V1 - Local Private Mode)
10
- - **Quản trị như Source Code:** Tri thức dự án đơn giản, minh bạch, có thể xem xét (review) và **luôn có con người phê duyệt** (AI Đề xuất -> Con người Phê duyệt via `/learn` hoặc `./qk-project-memory`).
11
- - **Chính sách Local Private Duy Nhất & Tự động Khởi tạo (Self-Init Protocol):**
12
- - *Bộ Nhớ Cá Nhân (`.ai-local/`):* Toàn bộ tri thức ghi nhớ của dự án được tập trung lưu tại thư mục `.ai-local/` (bao gồm `AGENTS.md` và `knowledge/index.yaml`). Đã loại bỏ hoàn toàn chế độ dùng chung (`.agents/knowledge/index.yaml` - Shared Mode) để đảm bảo quyền riêng tư và tránh xung đột khi làm việc nhóm.
13
- - *Tự động Khởi tạo & Bảo mật Gitignore:* Bất cứ khi nào AI kích hoạt kỹ năng hoặc cần tra cứu/học tri thức mà thư mục `.ai-local/` chưa tồn tại trong gốc dự án, AI **BẮT BUỘC** tự động tạo cấu trúc thư mục này và tự động thêm dòng `.ai-local/` vào file `.gitignore` của dự án ngay lập tức.
14
- - **Tối Ưu Nhảy Sọt (Navigator):** File `.ai-local/AGENTS.md` giới hạn siêu gọn dưới 100 dòng làm bản đồ chỉ đường, kết hợp cùng `.ai-local/knowledge/index.yaml` (lưu trữ đúng 4 loại: *Architecture, Convention, Pattern, Hard Bug*), triệt tiêu 80% chi phí tìm kiếm mù lòa (zero redundant searches).
12
+ ## Bắt đầu nhanh
15
13
 
16
- ---
14
+ ### Bước 1 — Khai báo role và stack một lần
17
15
 
18
- ## 🏗️ 4 Trụ Cột Kiến Trúc Cốt Lõi (EDAOS v9.0 Architecture)
16
+ Tạo file `.agents/DEV_PROFILE.md` trong dự án:
19
17
 
20
- ### 1. Manifest-First & O(1) Registry Engine
21
- Không còn phụ thuộc vào việc đọc/scan toàn bộ markdown mệt mỏi. AI Agent tra cứu siêu dữ liệu từ `.agents/registry/index.yaml` và kiểm duyệt chu trình không lặp (acyclic validation) thông qua O(1) graph JSON (`.agents/registry/graph.json`). Tốc độ hiểu và phân công năng lực đạt ngưỡng sub-second!
18
+ ```yaml
19
+ role: fullstack # fe | be | fullstack | data | ai-engineer | devops
20
+ stack:
21
+ frontend: Next.js 14 + TypeScript
22
+ backend: tRPC + Prisma
23
+ database: PostgreSQL
24
+ css: Tailwind CSS
25
+ ai_style: concise # concise | detailed | teaching
26
+ ```
22
27
 
23
- ### 2. V8.2 Blueprint Plugins & Universal 4-Folder Architecture
24
- Khởi tạo dự án (chỉ đạo qua `qk-project-bootstrap`) hỗ trợ sinh file `project.yaml` gốc từ thư viện Blueprint Plugins:
25
- - **RAG / AI Agents:** Cấu trúc 4 thư mục chuẩn thực chiến: `prompts/`, `data/` (bảo vệ `data/raw` bất biến), `agents/`, và `evals/`.
26
- - **Standard Software Coding:** Kiến trúc module sạch vững chắc với `DESIGN.md` và rào cản kiểm duyệt tự động.
27
- - **Automation Workflows:** Các luồng tích hợp n8n và dữ liệu lớn.
28
+ AI sẽ đọc file này trước mọi yêu cầu — không cần nhắc lại stack mỗi lần.
28
29
 
29
- ### 3. Eval Pipeline Platform (Khép Kín Kiểm Định)
30
- Chấm dứt việc tin tưởng AI blindly. Mọi Capability đều có thẻ điểm định lượng (`scorecard.yaml`), kết nối log thực thi thực tế từ thư mục `evals/traces/` qua cổng thẩm định sắt đá `qk-validation-gate`. Trách nhiệm định lượng 0–100 với sai số 0% (zero tolerance for fabrication).
30
+ ### Bước 2 Gọi skill
31
31
 
32
- ### 4. Domain Patterns Separation (Bảo Vệ Kernel)
33
- Các hệ thống AI chuyên sâu (như **Xây dựng DDC 192 skills**, bóc tách BIM/IFC, ERP) được tải lập trình viên cấu hình dạng Module dưới `knowledge/domain-patterns/` thay vì phơi bày trực tiếp vào 30 Core Developer Skills, giữ cho đồ thị cốt lõi luôn nhanh bén mượt mà!
32
+ ```bash
33
+ # pháp command
34
+ ./qk-feature-delivery
35
+ ./qk-bug-resolution
36
+ ./qk-api-lifecycle --fw=fastapi
37
+
38
+ # Hoặc ngôn ngữ tự nhiên — AI tự route đúng skill
39
+ "fix bug login crash"
40
+ "viết api tạo đơn hàng"
41
+ "refactor file UserService.ts quá dài"
42
+ ```
34
43
 
35
- ---
44
+ ### Cài đặt
36
45
 
37
- ## 🧩 Danh sách 30 Master Skills (Core Developer Capabilities)
46
+ ```bash
47
+ # NPX (không cần cài global)
48
+ npx ai-developer-skill-os init
38
49
 
39
- 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:
40
- 1. **Core & Orchestration:** `qk-orchestrator`, `qk-context-loader`, `qk-project-memory`, `qk-help`
41
- 2. **Product & Architecture:** `qk-product-specification`, `qk-project-bootstrap`, `qk-frontend-architecture`
42
- 3. **Frontend & UI:** `qk-design-system-engineering`, `qk-ui-system-builder`, `qk-ui-builder`, `qk-fe-api-integration`, `qk-ui-audit`
43
- 4. **Backend & Data:** `qk-api-lifecycle`, `qk-data-lifecycle`, `qk-data-engineer`, `qk-access-policy`
44
- 5. **Engineering & Delivery:** `qk-feature-delivery`, `qk-bug-resolution`, `qk-engineering-standard`, `qk-system-evolution`, `qk-docs`
45
- 6. **Quality & Testing:** `qk-test-engineering`, `qk-validation-gate`, `qk-web-quality-gate`, `qk-project-health`
46
- 7. **Security, DevOps & Analytics:** `qk-security-audit`, `qk-db-optimizer`, `qk-devops-platform`, `qk-production-release`, `qk-agent-observability`, `qk-ai-builder`
50
+ # NPM global
51
+ npm i -g ai-developer-skill-os
52
+
53
+ # Với tham số IDE
54
+ npx ai-developer-skill-os init --ide=cursor --scope=1
55
+ npx ai-developer-skill-os init --ide=windsurf --scope=1
56
+ npx ai-developer-skill-os init --ide=antigravity --scope=2
57
+ ```
58
+
59
+ **IDE được hỗ trợ:** Cursor · Windsurf · Cline / Roo Code · Antigravity · Kilo Code · Codex
47
60
 
48
61
  ---
49
62
 
50
- ## 💻 Cách Cài Đặt (Installation)
63
+ ## Kiến trúc v9.2
51
64
 
52
- ### Cách 1: NXP (Không cần cài global) - MỚI
53
- ```bash
54
- npx ai-developer-skill-os init
55
65
  ```
56
-
57
- ### Cách 2: NPM Global (Khuyên dùng cho cá nhân)
58
- ```bash
59
- npm i -g ai-developer-skill-os
66
+ .agents/
67
+ ├── DEV_PROFILE.md ← Khai báo role + stack (đọc đầu mỗi session)
68
+ ├── AGENTS.md ← Entry point: routing table + role behavior matrix
69
+ ├── skills/ ← 33 capabilities — mỗi skill có SKILL.md
70
+ ├── workflows/ ← 10 execution pipelines
71
+ ├── rules/ ← 8 behavior policies
72
+ ├── registry/ ← Generated indexes (không sửa tay)
73
+ ├── knowledge/ ← Design intelligence + domain patterns
74
+ └── blueprints/ ← Project scaffold templates
60
75
  ```
61
76
 
62
- ### Chạy bằng tham số (Command Line Arguments)
63
- ```bash
64
- # Cài Antigravity Global (toàn máy)
65
- npx ai-developer-skill-os init --ide=antigravity --scope=2
77
+ ### Role Behavior Matrix
66
78
 
67
- # Cài Antigravity Local (chỉ dự án này)
68
- npx ai-developer-skill-os init --ide=antigravity --scope=1
79
+ | Role | AI tập trung vào | AI bỏ qua |
80
+ |---|---|---|
81
+ | `fe` | Component arch, state, a11y, bundle size | DB schema, backend arch |
82
+ | `be` | API contract, business logic, DB perf, security | CSS, UI layout |
83
+ | `fullstack` | FE+BE end-to-end, type-safe contract | Over-engineering |
84
+ | `data` | Idempotency, data quality, lineage, SLA | Application ORM, UI |
85
+ | `ai-engineer` | Prompt eng, RAG arch, eval pipeline, hallucination | Standard CRUD |
86
+ | `devops` | CI/CD, IaC, observability, rollback | Business logic, UI |
69
87
 
70
- # Cài Cursor Local
71
- npx ai-developer-skill-os init --ide=cursor --scope=1
72
- ```
88
+ ---
73
89
 
74
- ## 📦 Các IDE/AI Assistant Được Hỗ Trợ
75
- - (1) Cursor
76
- - (2) Windsurf
77
- - (3) Cline / Roo Code
78
- - (4) Antigravity / Gemini
79
- - (5) Codex
80
- - (6) Kilo Code
90
+ ## 33 Skills (v9.2.0)
91
+
92
+ ### Core & Orchestration
93
+ | Skill | tả |
94
+ |---|---|
95
+ | `qk-orchestrator` | Route yêu cầu đến đúng skill, kiểm tra preconditions |
96
+ | `qk-context-loader` | Load context, vẽ dependency graph trước khi code |
97
+ | `qk-project-memory` | Lưu/tra cứu project knowledge (Architecture, Convention, Pattern, Hard Bug) |
98
+ | `qk-project-bootstrap` | Khởi tạo dự án mới với Blueprint Plugins (RAG/Coding/Workflow) |
99
+
100
+ ### Product & Architecture
101
+ | Skill | Mô tả |
102
+ |---|---|
103
+ | `qk-product-specification` | Idea → Requirement → Acceptance Criteria → Technical Spec |
104
+ | `qk-frontend-architecture` | Quyết định kiến trúc FE: component strategy, state, routing |
105
+ | `qk-project-audit` | Gap Analysis, Feasibility, Risk Assessment — báo cáo trước khi code |
106
+
107
+ ### Frontend & UI
108
+ | Skill | Mô tả |
109
+ |---|---|
110
+ | `qk-ui-builder` | Build/edit/audit/redesign UI từ Figma/ảnh/design reference |
111
+ | `qk-ui-system-builder` | Build Design System và token library từ DESIGN.md |
112
+ | `qk-design-system-engineering` | Quản trị design system: tokens, component variants, governance |
113
+ | `qk-api-consumer` | Consume API (REST/GraphQL/tRPC), manage state, bind vào UI |
114
+ | `qk-ui-audit` | Audit UI với 57-check Anti-Slop checklist |
115
+ | `qk-web-quality-gate` | A11y, SEO, Web Performance, Security, UX Heuristics |
116
+
117
+ ### Backend & Data
118
+ | Skill | Mô tả |
119
+ |---|---|
120
+ | `qk-api-lifecycle` | Design + implement API với Zero-Trust — contract trước, code sau |
121
+ | `qk-data-lifecycle` | Schema management + safe migrations (freeze → compat → cleanup) |
122
+ | `qk-data-engineer` | Data pipelines: dbt, Spark, Airflow, Delta Lake — idempotency first |
123
+ | `qk-access-policy` | RBAC/ABAC — định nghĩa role matrix trước, implement middleware sau |
124
+ | `qk-db-optimizer` | Evidence-based DB optimization: EXPLAIN → analyze → index |
125
+
126
+ ### Engineering & Delivery
127
+ | Skill | Mô tả |
128
+ |---|---|
129
+ | `qk-feature-delivery` | End-to-end feature: Requirements → Context → Design → Implement |
130
+ | `qk-bug-resolution` | Closed-loop bug fix: Observe → Hypothesis → Evidence → Fix |
131
+ | `qk-refactor` | Tái cấu trúc code không đổi behavior — extract, simplify, decouple |
132
+ | `qk-upgrade` | Nâng cấp library/framework an toàn — incremental, rollback bắt buộc |
133
+ | `qk-docs` | Viết/cập nhật docs chính xác tuyệt đối — match code thực tế |
134
+
135
+ ### Quality & Testing
136
+ | Skill | Mô tả |
137
+ |---|---|
138
+ | `qk-test-engineering` | Test strategy: pyramid, coverage, regression, mock |
139
+ | `qk-validation-gate` | Quality gate: linters, tests, scorecard.yaml (0–100) |
140
+ | `qk-project-health` | Audit: Code Smells, Tech Debt, Architecture (0–100 score) |
141
+ | `qk-code-review` | 4-Phase elite code review với Architect mindset |
142
+ | `qk-engineering-standard` | Enforce SOLID, DRY, Clean Code với ngưỡng metric cụ thể |
143
+
144
+ ### Security, DevOps & AI
145
+ | Skill | Mô tả |
146
+ |---|---|
147
+ | `qk-security-audit` | OWASP, dependency risk, secret detection, permission model |
148
+ | `qk-devops-platform` | CI/CD strategy, deployment architecture, environment management |
149
+ | `qk-production-release` | 8-gate mandatory checklist trước khi deploy production |
150
+ | `qk-ai-builder` | Governed AI Agent & RAG pipeline design — eval pipeline included |
151
+ | `qk-agent-observability` | Monitor AI skin routing decisions, failure patterns |
81
152
 
82
153
  ---
83
154
 
84
- ## 🧪 Đánh Giá Tự Động (Agent Evaluation)
155
+ ## Changelog
85
156
 
86
- 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):
157
+ ### v9.2.0 (2026-09-11)
158
+ - **Thêm:** `DEV_PROFILE.md` — role + stack context file, AI đọc đầu mỗi session
159
+ - **Thêm:** Role Behavior Matrix trong `AGENTS.md` — 6 roles với focus/depth/skip
160
+ - **Thêm:** Prompt templates theo role trong 7 key skills
161
+ - **Đổi tên:** `qk-fe-api-integration` → `qk-api-consumer` (rõ hơn, không FE-only)
162
+ - **Đổi tên:** `qk-system-evolution` → `qk-upgrade` (đúng mục đích thực tế)
163
+ - **Đổi tên:** `qk-project-analyst` → `qk-project-audit` (rõ output là audit report)
164
+ - **Đổi tên workflow:** `skill-evolution.yml` → `skin-governance.yml`
165
+ - **Đổi tên workflow:** `research.yml` → `context-discovery.yml`
166
+ - **Xóa:** `qk-help` (deprecated từ v8.0, superseded bởi `qk-orchestrator`)
167
+ - **Xóa:** `.ai-local/` Self-Init Protocol khỏi tất cả SKILL.md (giảm token overhead)
168
+ - **Fix:** Compact routing table trong `AGENTS.md` — không cần đọc `skills-index.yml`
87
169
 
88
- ```bash
89
- npm run test:agent
90
- npm run test:graph
91
- npm run test:registry
92
- ```
170
+ ### v9.1.x (2026-08-03)
171
+ - O(1) registry engine, Universal Project Knowledge V1
172
+
173
+ ### v9.0.0 (2026-07-01)
174
+ - V9 schema migration, manifest-first architecture
175
+
176
+ ---
177
+
178
+ ## Đánh giá tự động
93
179
 
94
- ## 🚀 Hướng Dẫn Sử Dụng
95
- Sau khi cài đặt thành công, hãy gõ lệnh:
96
180
  ```bash
97
- ./qk-help
181
+ npm run test:agent # Routing intelligence tests
182
+ npm run test:graph # Capability graph validation
183
+ npm run test:registry # Registry consistency check
98
184
  ```
99
- để kích hoạt AI Orchestrator và khám phá sức mạnh của hệ điều hành!
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ai-developer-skill-os",
3
- "version": "9.1.2",
4
- "description": "EDAOS v9.1 — Governed Capability Platform & Universal Project Knowledge V1 (Candidate Memory & Golden Rule Architecture).",
3
+ "version": "9.3.0",
4
+ "description": "EDAOS v9.3SSOT Governed Capability Platform with 2-Clause Triggers & Full Technical Lifecycle.",
5
5
  "main": "bin/install.js",
6
6
  "files": [
7
7
  "bin",