ai-developer-skill-os 3.1.5 → 5.0.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 (95) hide show
  1. package/README.md +15 -19
  2. package/_template/SKILL.md +37 -133
  3. package/framework/KERNEL.md +58 -0
  4. package/framework/bias-library/cosmetic-refactor.md +21 -0
  5. package/framework/bias-library/enterprise-crud.md +21 -0
  6. package/framework/bias-library/fake-ui-slop.md +20 -0
  7. package/framework/bias-library/hallucinated-tools.md +20 -0
  8. package/framework/bias-library/missing-ui-states.md +19 -0
  9. package/framework/bias-library/over-indexing.md +20 -0
  10. package/framework/bias-library/swallow-errors.md +19 -0
  11. package/framework/bias-library/ui-only-security.md +17 -0
  12. package/framework/dial-library/complexity-budget.md +13 -0
  13. package/framework/dial-library/granularity.md +13 -0
  14. package/framework/dial-library/optimization-strategy.md +13 -0
  15. package/framework/dial-library/strictness.md +13 -0
  16. package/framework/rule-library/delegation-only.md +9 -0
  17. package/framework/rule-library/minimal-diff.md +9 -0
  18. package/package.json +1 -1
  19. package/skills/qk-access-policy/SKILL.md +40 -30
  20. package/skills/qk-ai-builder/SKILL.md +39 -30
  21. package/skills/qk-api-lifecycle/SKILL.md +39 -54
  22. package/skills/qk-bug-resolution/SKILL.md +39 -58
  23. package/skills/qk-context-loader/SKILL.md +36 -35
  24. package/skills/qk-data-lifecycle/SKILL.md +37 -49
  25. package/skills/qk-db-optimizer/SKILL.md +37 -44
  26. package/skills/qk-design-to-code/SKILL.md +40 -35
  27. package/skills/qk-docs/SKILL.md +37 -43
  28. package/skills/qk-engineering-standard/SKILL.md +39 -51
  29. package/skills/qk-feature-delivery/SKILL.md +39 -56
  30. package/skills/qk-help/SKILL.md +36 -28
  31. package/skills/qk-orchestrator/SKILL.md +40 -43
  32. package/skills/qk-policy-engine/SKILL.md +36 -41
  33. package/skills/qk-production-release/SKILL.md +40 -36
  34. package/skills/qk-project-bootstrap/SKILL.md +39 -32
  35. package/skills/qk-project-health/SKILL.md +36 -44
  36. package/skills/qk-project-memory/SKILL.md +38 -24
  37. package/skills/qk-system-evolution/SKILL.md +36 -51
  38. package/skills/qk-ui-audit/SKILL.md +37 -46
  39. package/skills/qk-ui-system-builder/SKILL.md +38 -29
  40. package/skills/qk-validation-gate/SKILL.md +34 -47
  41. package/taste-skill/.claude-plugin/marketplace.json +20 -0
  42. package/taste-skill/.claude-plugin/plugin.json +19 -0
  43. package/taste-skill/.github/FUNDING.yml +1 -0
  44. package/taste-skill/.github/copilot-instructions.md +11 -0
  45. package/taste-skill/CHANGELOG.md +111 -0
  46. package/taste-skill/LICENSE +21 -0
  47. package/taste-skill/README.md +212 -0
  48. package/taste-skill/assets/.gitkeep +0 -0
  49. package/taste-skill/assets/readme-banner.webp +0 -0
  50. package/taste-skill/assets/readme-buttons/btn-agent-skills.webp +0 -0
  51. package/taste-skill/assets/readme-buttons/btn-changelog.webp +0 -0
  52. package/taste-skill/assets/readme-buttons/btn-mit.webp +0 -0
  53. package/taste-skill/assets/readme-buttons/btn-site.webp +0 -0
  54. package/taste-skill/assets/readme-buttons/btn-tools.webp +0 -0
  55. package/taste-skill/assets/readme-cta-tasteskill.svg +5 -0
  56. package/taste-skill/assets/sponsors/animations-dev.webp +0 -0
  57. package/taste-skill/assets/sponsors/emil-animations-dev.webp +0 -0
  58. package/taste-skill/assets/taste-skill-logo.png +0 -0
  59. package/taste-skill/assets/taste-skill-logo.webp +0 -0
  60. package/taste-skill/assets/vercel-oss-program-badge.svg +44 -0
  61. package/taste-skill/examples/floria-bottom.webp +0 -0
  62. package/taste-skill/examples/floria-full.webp +0 -0
  63. package/taste-skill/examples/floria-top.webp +0 -0
  64. package/taste-skill/research/README.md +8 -0
  65. package/taste-skill/research/laziness/README.md +25 -0
  66. package/taste-skill/research/laziness/findings/empirical-results.md +58 -0
  67. package/taste-skill/research/laziness/findings/references.md +20 -0
  68. package/taste-skill/research/laziness/remediation/architectural-patterns.md +55 -0
  69. package/taste-skill/research/laziness/remediation/parameter-tuning.md +44 -0
  70. package/taste-skill/research/laziness/remediation/prompt-engineering.md +52 -0
  71. package/taste-skill/research/laziness/remediation/reference-prompts.md +79 -0
  72. package/taste-skill/research/laziness/root-causes/cognitive-shortcuts.md +23 -0
  73. package/taste-skill/research/laziness/root-causes/output-limits.md +39 -0
  74. package/taste-skill/research/laziness/root-causes/rlhf-and-compute.md +27 -0
  75. package/taste-skill/research/laziness/root-causes/training-data-bias.md +28 -0
  76. package/taste-skill/scripts/build-emil-sponsor-row.mjs +41 -0
  77. package/taste-skill/scripts/convert-readme-assets-webp.mjs +142 -0
  78. package/taste-skill/scripts/process-readme-buttons.mjs +108 -0
  79. package/taste-skill/scripts/process-sponsor-badge.mjs +83 -0
  80. package/taste-skill/skill.sh +25 -0
  81. package/taste-skill/skills/brandkit/SKILL.md +798 -0
  82. package/taste-skill/skills/brutalist-skill/SKILL.md +92 -0
  83. package/taste-skill/skills/gpt-tasteskill/SKILL.md +74 -0
  84. package/taste-skill/skills/image-to-code-skill/SKILL.md +1228 -0
  85. package/taste-skill/skills/imagegen-frontend-mobile/SKILL.md +1465 -0
  86. package/taste-skill/skills/imagegen-frontend-web/SKILL.md +987 -0
  87. package/taste-skill/skills/llms.txt +13 -0
  88. package/taste-skill/skills/minimalist-skill/SKILL.md +85 -0
  89. package/taste-skill/skills/output-skill/SKILL.md +49 -0
  90. package/taste-skill/skills/redesign-skill/SKILL.md +178 -0
  91. package/taste-skill/skills/soft-skill/SKILL.md +98 -0
  92. package/taste-skill/skills/stitch-skill/DESIGN.md +121 -0
  93. package/taste-skill/skills/stitch-skill/SKILL.md +184 -0
  94. package/taste-skill/skills/taste-skill/SKILL.md +1206 -0
  95. package/taste-skill/skills/taste-skill-v1/SKILL.md +226 -0
package/README.md CHANGED
@@ -1,32 +1,28 @@
1
- # 🚀 AI Developer Skill OS (ai-developer-skill-os) v4.0
1
+ # 🚀 AI Developer Skill OS (ai-developer-skill-os) v5.0
2
2
 
3
- > Một hệ điều hành (AI-OS) và Nền tảng Kiến trúc Kỹ thuật (Engineering Platform) tối thượng dành cho AI Coding Agents (Claude Code, Cursor, Windsurf, Gemini, Kilo).
3
+ > Một hệ điều hành Agent (Agent OS Specification) tối thượng dành cho AI Coding Agents (Claude Code, Cursor, Windsurf, Gemini, Kilo).
4
4
 
5
- Thay vì cung cấp các "công cụ rời rạc" (Toolbox) hoặc những prompt cồng kềnh, **AI Developer Skill OS v4.0** được thiết kế lại hoàn toàn theo chuẩn **Enterprise-ready Agentic Framework**. biến Agent của bạn thành một **Senior Engineer / Chief Architect** thực thụ với khả năng tự suy luận bằng Tiếng Anh, nhưng lại báo cáo thân thiện bằng Tiếng Việt.
5
+ Thay vì cung cấp các "công cụ rời rạc" (Toolbox) hoặc những prompt cồng kềnh, **AI Developer Skill OS v5.0** được thiết kế lại hoàn toàn theo chuẩn **Modular Agent OS**. Các kỹ năng giờ đây siêu nhẹ, kế thừa tập trung từ Kernel các bộ quy tắc độc lập.
6
6
 
7
7
  ---
8
8
 
9
- ## 🏗️ Kiến Trúc 5 Tầng (The 5-Tier Architecture)
9
+ ## 🏗️ Kiến Trúc 5 Tầng (Agent OS Kernel)
10
10
 
11
- Hệ thống được thiết kế decoupled (phân tách) hoàn hảo để chống tràn Context Window và tối ưu khả năng suy luận của LLM:
11
+ Hệ thống được thiết kế decoupled hoàn hảo:
12
12
 
13
- ### 1. OS Kernel (`.agents/AGENTS.md`)
14
- The core of the system is a lightweight, heavily optimized OS Kernel that dictates agent behavior across all tasks.
15
- - **Intent-Based Policies:** Skills are classified into 4 groups (Static Analysis, Development, Validation, Maintenance) rather than micromanaged with individual exceptions.
16
- - **Progressive Evidence Collection:** Agents collect context incrementally (1 file → 3 files) and stop at a 80% Confidence Threshold, eliminating "hallucination loops".
17
- - **Risk-based Verification:** Tests and builds are only run based on the risk level of the change, strictly guided by the Cost and Escalation policies.
13
+ ### 1. OS Kernel (`framework/KERNEL.md`)
14
+ Trái tim của hệ thống định nghĩa Core Policies (Minimal Change, Evidence, Escalation, Reasoning), Constraint Layer (các hành vi bị cấm), và Cognitive Pipeline.
18
15
 
19
- ### 2. Core Templates (`templates/`)
20
- Chứa các format báo cáo chuẩn (như `bug-report.md`, `feature-report.md`, `review-report.md`). AI không cần "học lại" cách viết báo cáo, giúp đầu ra luôn nhất quán 100%.
16
+ ### 2. Thư Viện Độc Lập (Library Modules)
17
+ - `framework/bias-library/`: Sửa các lỗi duy mặc định của AI (Ví dụ: cấm vẽ UI giả, cấm nuốt lỗi).
18
+ - `framework/dial-library/`: Định nghĩa các cấu hình điều khiển hành vi (Độ nghiêm ngặt, ngân sách độ phức tạp).
19
+ - `framework/rule-library/`: Các tiêu chí xuất xưởng bắt buộc.
21
20
 
22
- ### 3. Skill Definition (`skills/`)
23
- Bộ 20+ kỹ năng (Skills) cốt lõi được cấu trúc siêu chuẩn xác với **Metadata 12 trường** (Version, Category, Pipeline, Allowed Tools...). Toàn bộ SOP (Standard Operating Procedure), Decision Tree và Constraints được viết 100% bằng Tiếng Anh để tối ưu hóa khả năng hiểu kỹ thuật của AI.
21
+ ### 3. Metadata-Only Skills (`skills/`)
22
+ Bộ 23 kỹ năng (Skills) cốt lõi được cấu trúc siêu nhẹ. Toàn bộ logic nội bộ bị loại bỏ, thay bằng việc khai báo (Declarative) để gọi các Pipeline, Bias, Dials từ thư viện.
24
23
 
25
- ### 4. Knowledge Library (`knowledge/`)
26
- Tri thức chuyên sâu được tách rời hoàn toàn khỏi Prompt. dụ: Kiến thức về React (`knowledge/frontend/react.md`) chỉ được gọi (On-demand RAG) khi AI thực sự làm việc với React.
27
-
28
- ### 5. Output Format (Vietnamese Report)
29
- Toàn bộ kết quả trả về cho bạn đều tuân thủ Output Policy: Báo cáo bằng Tiếng Việt, chia mục rõ ràng (Summary, Changes, Root Cause, Risks, Next Actions).
24
+ ### 4. Output Contract (Decision Summary)
25
+ Toàn bộ kết quả trả về cho bạn đều tuân thủ Output Contract: Báo cáo dưới dạng `Decision Summary` súc tích (Context, Decisions, Assumptions, Trade-offs) bằng Tiếng Việt, loại bỏ hoàn toàn các chuỗi suy nghĩ dài dòng (Invisible Reasoning).
30
26
 
31
27
  ---
32
28
 
@@ -1,154 +1,58 @@
1
1
  ---
2
- name: <skill-name>
3
- description: >-
4
- <1-3 lines in English. This is used for trigger matching across all AI agents.
5
- Be specific and action-oriented. Avoid vague words.>
6
- version: 1.0.0
7
- category: engineering | frontend | backend
8
- tags: [tag1, tag2, tag3]
9
- platforms: [antigravity, claude-code, kilo-code, cursor, windsurf]
2
+ name: qk-template
3
+ version: 5.0.0
4
+ updated: 2026-07-03
5
+ description: Bản mẫu siêu gọn để tạo skill theo chuẩn Agent OS v5.0.
6
+ category: template
7
+ tags: [template, boilerplate]
8
+ platforms: [claude-code, cursor, windsurf, gemini-cli]
10
9
  ---
11
10
 
12
- # <Skill Name>
11
+ # 🛠️ [Tên Kỹ Năng]
13
12
 
14
- > **Language rule:**
15
- > Use **English** for: code, identifiers, file names, architecture terms, technical decisions.
16
- > Use **the user's language** for: explanations, questions, summaries, and feedback.
17
- > The user may write in any language — detect and match it automatically.
13
+ > **Inheritance:** Kỹ năng này tuân thủ Kiến trúc v5.0 của `framework/KERNEL.md`.
14
+ > Các xử duy nội bộ sẽ dựa vào các thông số dưới đây và trả về Decision Summary.
18
15
 
19
16
  ---
20
17
 
21
- ## Trigger
22
-
23
- When to activate this skill. List specific conditions, user intents, and keywords.
24
-
25
- Examples:
26
- - User says "create a new page"
27
- - User provides a UI mockup or wireframe
28
- - User asks to "build", "design", or "implement" a screen
29
-
30
- ---
31
-
32
- ## Scope
33
-
34
- What this skill is responsible for. Be explicit.
35
-
36
- - ✅ [What it covers]
37
- - ✅ [What it covers]
38
-
39
- ---
40
-
41
- ## Non-goals
42
-
43
- What this skill must NOT do. This prevents scope creep.
44
-
45
- - ❌ Do NOT [action A]
46
- - ❌ Do NOT [action B]
47
- - ❌ Do NOT make changes beyond the stated task
48
-
49
- ---
50
-
51
- ## Severity Levels
52
-
53
- All findings, issues, and risks use this shared scale:
54
-
55
- | Level | Label | Meaning |
56
- |-------|-------|---------|
57
- | P0 | Critical | Must fix before any other work |
58
- | P1 | High | Fix in current session |
59
- | P2 | Medium | Schedule soon |
60
- | P3 | Low | Technical debt — fix when possible |
18
+ ## 🎯 Mission (Scope)
19
+ - ✅ Làm gì.
20
+ - Không được làm gì.
61
21
 
62
22
  ---
63
23
 
64
- ## Workflow
65
-
66
- ### Phase 1 — <Discovery / Analysis>
67
-
68
- What to analyze, read, or understand first.
69
-
70
- - Read: [files / folders / configs]
71
- - Detect: [patterns / issues / context]
72
- - Output: [brief summary of findings]
73
-
74
- ---
75
-
76
- ### Phase 2 — <Planning>
77
-
78
- Before writing any code, produce a plan.
79
-
80
- - List what will change and why
81
- - Identify risks or conflicts
82
- - Confirm with user if scope is unclear
83
-
84
- ---
85
-
86
- ### Phase 3 — <Execution>
87
-
88
- Apply changes following the plan.
89
-
90
- Rules:
91
- - Smallest safe change
92
- - Preserve existing behavior unless explicitly changing it
93
- - Follow project conventions (naming, structure, style)
94
- - Do not introduce unnecessary dependencies
95
-
96
- ---
97
-
98
- ### Phase 4 — <Validation>
99
-
100
- Verify the output before finishing.
101
-
102
- - [ ] Does it match the requirement?
103
- - [ ] Are edge cases handled?
104
- - [ ] No regressions introduced?
105
- - [ ] Output format is complete?
106
-
107
- ---
108
-
109
- ## Decision Tree
110
-
111
- Use this to handle branching logic during execution:
112
-
113
- ```
114
- Condition A?
115
- ├── Yes → Action X
116
- └── No → Condition B?
117
- ├── Yes → Action Y
118
- └── No → Ask user for clarification
24
+ ## ⚙️ Capabilities (Cognitive Pipeline)
25
+ ```yaml
26
+ Pipeline:
27
+ - inference
28
+ - planning
29
+ - execution
30
+ - bias-review
31
+ - ship-check
119
32
  ```
120
33
 
121
34
  ---
122
35
 
123
- ## Output Format
124
-
125
- Define exactly what the AI must produce at the end of this skill.
126
-
127
- Example:
128
- ```
129
- ✅ Summary: <what was done>
130
- 📁 Files: <list of created/modified files>
131
- ⚠️ Warnings: <anything the user should know>
132
- 🔗 Next steps: <suggested follow-up skills or actions>
36
+ ## 🎛️ Dials (Hành vi)
37
+ ```yaml
38
+ Dials:
39
+ - id: strictness # (Import từ dial-library/strictness.md)
40
+ - id: complexity-budget # (Import từ dial-library/complexity-budget.md)
133
41
  ```
134
42
 
135
43
  ---
136
44
 
137
- ## Validation Checklist
138
-
139
- Before marking this skill complete:
140
-
141
- - [ ] All phases completed
142
- - [ ] Output format produced
143
- - [ ] No TODOs or placeholder code left
144
- - [ ] No hardcoded secrets, URLs, or credentials
145
- - [ ] Follows project naming conventions
146
- - [ ] User has been informed of any side effects
45
+ ## 🛡️ Biases (Sửa lỗi mặc định của AI)
46
+ ```yaml
47
+ Biases:
48
+ - id: cosmetic-refactor # (Import từ bias-library/cosmetic-refactor.md)
49
+ - id: enterprise-crud # (Import từ bias-library/enterprise-crud.md)
50
+ ```
147
51
 
148
52
  ---
149
53
 
150
- ## Examples
151
-
152
- See `examples/` folder for:
153
- - `example-en.md` English input/output example
154
- - `example-vi.md` — Vietnamese input/output example
54
+ ## 🛫 Ship Criteria (Điều kiện xuất xưởng)
55
+ ```yaml
56
+ Rules:
57
+ - id: minimal-diff # (Import từ rule-library/minimal-diff.md)
58
+ ```
@@ -0,0 +1,58 @@
1
+ # SKILL_KERNEL (Agent OS Specification v5.0)
2
+
3
+ > **OS Protocol:** Mọi AI Agent thuộc hệ sinh thái `rules-skill` phải tuân thủ tuyệt đối cấu trúc hệ điều hành này.
4
+
5
+ ---
6
+
7
+ ## 🏛️ Layer 1: Core Policies (Luật Nền)
8
+ Triết lý vận hành chung cho mọi kỹ năng. Không được phép vi phạm.
9
+ 1. **Minimal Change Policy:** Ưu tiên thay đổi nhỏ nhất an toàn. Cấm rewrite toàn bộ file, cấm reformat các file không liên quan.
10
+ 2. **Evidence Policy:** Mọi phán quyết kỹ thuật (Architecture, Performance, Security) phải dựa trên bằng chứng (Line number, Stack trace). Không đoán mò.
11
+ 3. **Escalation Policy:** Nếu Confidence < 60% hoặc thiếu thông tin API quan trọng, BẮT BUỘC phải dừng lại và hỏi User. Không tự phát minh yêu cầu.
12
+ 4. **Reasoning Policy:** Ưu tiên tái sử dụng code cũ và pattern có sẵn. Luôn nêu rõ Trade-off (sự đánh đổi) khi đưa ra nhiều lựa chọn.
13
+
14
+ ---
15
+
16
+ ## 🛑 Layer 2: Constraint Layer (Hard Constraints)
17
+ Những hành động bị cấm tuyệt đối (Không thể override).
18
+ - `Never invent APIs` (Không tự gọi các API chưa từng tồn tại).
19
+ - `Never fabricate test results` (Không báo cáo Test Pass nếu chưa thực sự chạy lệnh CLI).
20
+ - `Never execute destructive commands without backup` (Không tự chạy lệnh `rm -rf`, `DROP TABLE`, force push `main`).
21
+ - `Never bypass validation` (Không dùng `any` hoặc `@ts-ignore` để vượt qua lỗi Linter/TS).
22
+ - `Never swallow errors` (Không bọc `try/catch` rỗng).
23
+
24
+ ---
25
+
26
+ ## ⚖️ Layer 3: Decision Model
27
+ Hướng dẫn cách AI đưa ra quyết định khi có nhiều ngã rẽ.
28
+ - **Khi cân nhắc giải pháp:** `Reuse Code > Minimal Diff > Existing Convention > Performance > Premature Optimization`.
29
+ - **Khi cân nhắc kiến trúc:** Chọn cấu trúc đơn giản nhất thỏa mãn yêu cầu. (Ví dụ: `Monolith + Postgres > Microservices + Kafka` cho ứng dụng vừa và nhỏ).
30
+
31
+ ---
32
+
33
+ ## 🧠 Layer 4: Cognitive Pipeline
34
+ Mỗi Skill sẽ khai báo sử dụng các Capability (Năng lực) sau đây:
35
+ - `inference`: Đọc ngữ cảnh (Risk, Scale, Intent).
36
+ - `planning`: Lập kế hoạch từng bước ngắn gọn.
37
+ - `delegation`: Ủy quyền cho Sub-Skill khác.
38
+ - `execution`: Trực tiếp chỉnh sửa mã nguồn/chạy lệnh.
39
+ - `bias-review`: Kiểm điểm lại kết quả bằng cách chạy các file cấu hình trong `bias-library`.
40
+ - `ship-check`: Kiểm định các điều kiện hoàn thành trong `rule-library`.
41
+
42
+ *(Chỉ hiển thị tóm tắt quyết định, không in toàn bộ chuỗi suy luận nội bộ ra màn hình UI của user).*
43
+
44
+ ---
45
+
46
+ ## 📝 Layer 5: Output Contract (Decision Summary Contract)
47
+ Đầu ra (Output) cuối cùng BẮT BUỘC phải tuân thủ format `Decision Summary` dưới dạng YAML hoặc Markdown gãy gọn:
48
+
49
+ ```yaml
50
+ Decision Summary:
51
+ Context: [Bối cảnh bài toán, ví dụ: Production API]
52
+ Key Decisions: [Các quyết định chính, ví dụ: Dùng Zod để validate]
53
+ Assumptions: [Giả định, ví dụ: User đã login]
54
+ Trade-offs: [Đánh đổi, ví dụ: Dùng Fetch API thay vì Axios để giảm bundle size]
55
+ Confidence: [0-100%]
56
+ Needs User Input: [Có/Không - Nếu Có, hãy đặt câu hỏi]
57
+ ```
58
+ Kèm theo danh sách các `Files` bị thay đổi và `Next Action`.
@@ -0,0 +1,21 @@
1
+ ---
2
+ id: cosmetic-refactor
3
+ type: bias
4
+ description: LLM frequently rename variables or restructures code purely for aesthetic reasons without architectural improvement.
5
+ ---
6
+
7
+ Detection:
8
+ - Did I only rename variables (e.g. `data` to `userData`)?
9
+ - Did I fail to split God Objects or reduce coupling?
10
+
11
+ Risk:
12
+ - High noise in Git diffs.
13
+ - Low return on investment (ROI).
14
+ - Potential regression for zero architectural gain.
15
+
16
+ Correction:
17
+ - Reject cosmetic-only changes.
18
+ - Focus strictly on decoupling, dependency injection, or SOLID violations.
19
+
20
+ Evidence:
21
+ - Explain explicitly why the new structure scales better or is more decoupled.
@@ -0,0 +1,21 @@
1
+ ---
2
+ id: enterprise-crud
3
+ type: bias
4
+ description: LLM suggests overly complex architectures (Kafka, Redis, Microservices) for simple CRUD operations.
5
+ ---
6
+
7
+ Detection:
8
+ - Did I introduce message queues, caching layers, or gRPC for a simple REST API?
9
+ - Did I split a simple app into multiple microservices?
10
+
11
+ Risk:
12
+ - Severe over-engineering.
13
+ - Unnecessary infrastructure costs.
14
+ - Reduced maintainability for small teams.
15
+
16
+ Correction:
17
+ - Default to Monolith + PostgreSQL.
18
+ - Only introduce caching or queues if a specific bottleneck is identified by evidence.
19
+
20
+ Evidence:
21
+ - Must provide exact metrics or requirements that justify the complex architecture.
@@ -0,0 +1,20 @@
1
+ ---
2
+ id: fake-ui-slop
3
+ type: bias
4
+ description: LLM draws fake charts, images, or dashboard UI elements using generic div blocks instead of integrating real assets.
5
+ ---
6
+
7
+ Detection:
8
+ - Did I use `<div class="bg-blue-500 w-full h-32">Fake Chart</div>`?
9
+ - Did I forget to add placeholders for real images?
10
+
11
+ Risk:
12
+ - Unprofessional UI design.
13
+ - Technical debt for the frontend developer.
14
+
15
+ Correction:
16
+ - Insert a comment like `<!-- TODO: Insert real image -->`.
17
+ - Use high-quality placeholder services (e.g., picsum).
18
+
19
+ Evidence:
20
+ - Highlight the exact placeholder used.
@@ -0,0 +1,20 @@
1
+ ---
2
+ id: hallucinated-tools
3
+ type: bias
4
+ description: LLM invents APIs, tools, or shell commands that do not exist in the current environment.
5
+ ---
6
+
7
+ Detection:
8
+ - Did I attempt to call a CLI tool without verifying it is installed?
9
+ - Did I invent a non-existent method on a standard library?
10
+
11
+ Risk:
12
+ - Execution failure.
13
+ - Broken workflows.
14
+
15
+ Correction:
16
+ - Verify tools and APIs before using them.
17
+ - Stick to standard, known commands.
18
+
19
+ Evidence:
20
+ - Provide documentation or link to the specific tool usage.
@@ -0,0 +1,19 @@
1
+ ---
2
+ id: missing-ui-states
3
+ type: bias
4
+ description: LLM writes frontend components assuming the "happy path" only, ignoring Loading, Error, and Empty states.
5
+ ---
6
+
7
+ Detection:
8
+ - Did I write a fetch component without a loading spinner?
9
+ - Did I forget to handle the case where the data array is empty?
10
+
11
+ Risk:
12
+ - Poor user experience.
13
+ - UI crashes on undefined data.
14
+
15
+ Correction:
16
+ - Always implement Loading, Error, and Empty states for any asynchronous UI component.
17
+
18
+ Evidence:
19
+ - Point to the conditional rendering logic.
@@ -0,0 +1,20 @@
1
+ ---
2
+ id: over-indexing
3
+ type: bias
4
+ description: LLM recommends adding database indexes to every column to "improve performance", ignoring write penalties.
5
+ ---
6
+
7
+ Detection:
8
+ - Did I suggest indexing a column with low cardinality (e.g., boolean status)?
9
+ - Did I suggest indexing multiple columns without analyzing query patterns?
10
+
11
+ Risk:
12
+ - Slower INSERT/UPDATE operations.
13
+ - Increased database storage costs.
14
+
15
+ Correction:
16
+ - Only recommend indexes for Foreign Keys or heavily filtered/sorted columns.
17
+ - Suggest resolving N+1 queries first.
18
+
19
+ Evidence:
20
+ - Provide the exact slow query that justifies the index.
@@ -0,0 +1,19 @@
1
+ ---
2
+ id: swallow-errors
3
+ type: bias
4
+ description: LLM wraps code in a try/catch block but leaves the catch block empty or just logs to console, effectively hiding fatal errors.
5
+ ---
6
+
7
+ Detection:
8
+ - Did I write `catch (e) { console.error(e) }` without throwing or returning an error state?
9
+ - Did I fail to surface the error to the UI?
10
+
11
+ Risk:
12
+ - Silent failures.
13
+ - Extremely difficult debugging.
14
+
15
+ Correction:
16
+ - Always handle the error gracefully (e.g., return a unified error object or show a toast notification).
17
+
18
+ Evidence:
19
+ - Point to the specific error handling logic.
@@ -0,0 +1,17 @@
1
+ ---
2
+ id: ui-only-security
3
+ type: bias
4
+ description: LLM hides a button on the UI for unauthorized users but forgets to secure the backend API endpoint.
5
+ ---
6
+
7
+ Detection:
8
+ - Did I add a role check in the React component but not in the Node.js controller?
9
+
10
+ Risk:
11
+ - Critical security vulnerability (users can bypass UI and hit the API directly).
12
+
13
+ Correction:
14
+ - Security must always be enforced at the Backend/API layer first. UI hiding is just for UX.
15
+
16
+ Evidence:
17
+ - Point to the backend middleware or controller where the permission is checked.
@@ -0,0 +1,13 @@
1
+ ---
2
+ id: complexity-budget
3
+ type: dial
4
+ description: Defines the ceiling for architectural and code complexity.
5
+ ---
6
+
7
+ Levels:
8
+ - **Level 1 (Prototype):** Hardcode data, skip tests, minimal validation. Goal is highest speed.
9
+ - **Level 5 (Standard):** Monolith, basic SQL/ORM, Zod validation, essential error states.
10
+ - **Level 10 (Enterprise):** Event-driven architecture, CQRS, strict rate limiting, 100% test coverage.
11
+
12
+ Usage:
13
+ - The AI must infer the current budget based on the Project Scale (MVP vs Enterprise) and stick to it. Never exceed the budget.
@@ -0,0 +1,13 @@
1
+ ---
2
+ id: granularity
3
+ type: dial
4
+ description: Defines the level of detail for access control policies.
5
+ ---
6
+
7
+ Levels:
8
+ - **Level 1 (Coarse):** Role-based (Admin vs User).
9
+ - **Level 5 (Fine-grained):** Attribute-based (Owner of the resource).
10
+ - **Level 10 (Micro):** Field-level permissions (Can edit Title but not Price).
11
+
12
+ Usage:
13
+ - Adjust based on the project scale. For MVP, stick to Level 1.
@@ -0,0 +1,13 @@
1
+ ---
2
+ id: optimization-strategy
3
+ type: dial
4
+ description: Defines the approach to database and performance optimization.
5
+ ---
6
+
7
+ Levels:
8
+ - **Level 1 (Query Fixes):** Resolve N+1 issues and add basic indexes.
9
+ - **Level 5 (Caching):** Introduce Redis or Memcached for heavy read paths.
10
+ - **Level 10 (Architecture):** CQRS, Read Replicas, Sharding.
11
+
12
+ Usage:
13
+ - Start at Level 1. Never jump to Level 5 or 10 without explicit bottleneck evidence.
@@ -0,0 +1,13 @@
1
+ ---
2
+ id: strictness
3
+ type: dial
4
+ description: Defines how rigidly the AI enforces patterns and rules.
5
+ ---
6
+
7
+ Levels:
8
+ - **Level 1 (Lenient):** Fix only syntax errors and fatal bugs. Ignore bad architecture.
9
+ - **Level 5 (Balanced):** Suggest improvements but don't rewrite entire files.
10
+ - **Level 10 (Draconian):** Fail immediately on any Linter warning. Enforce strict SOLID principles.
11
+
12
+ Usage:
13
+ - Adjust based on the user's intent. If they just want a quick fix, lower the strictness. If they ask for an audit, raise it.
@@ -0,0 +1,9 @@
1
+ ---
2
+ id: delegation-only
3
+ type: rule
4
+ description: Restricts the skill from making direct system modifications.
5
+ ---
6
+
7
+ Condition:
8
+ - The skill must ONLY plan, analyze, and dispatch instructions to sub-skills.
9
+ - It must NEVER write code, execute CLI commands, or modify files directly.
@@ -0,0 +1,9 @@
1
+ ---
2
+ id: minimal-diff
3
+ type: rule
4
+ description: Ensure the smallest possible change footprint.
5
+ ---
6
+
7
+ Condition:
8
+ - Must only modify lines directly related to the task.
9
+ - Reformatting, restructuring, or touching unrelated files is strictly forbidden.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ai-developer-skill-os",
3
- "version": "3.1.5",
3
+ "version": "5.0.0",
4
4
  "description": "Multi-agent skill package cho AI coding agents (Claude, Cursor, Windsurf, Antigravity) với 23 skills chuyên nghiệp.",
5
5
  "main": "bin/install.js",
6
6
  "bin": {
@@ -1,47 +1,57 @@
1
1
  ---
2
2
  name: qk-access-policy
3
- version: 3.1.5
4
- updated: 2026-07-02
3
+ version: 5.0.0
4
+ updated: 2026-07-03
5
5
  description: Quản lý RBAC, ABAC và các ranh giới bảo mật.
6
6
  category: security
7
- behavior: static-analysis
8
- intent: review-code
9
- priority: high
10
- tags: [security, rbac, auth, permissions]
7
+ tags: [security, rbac, abac, auth]
11
8
  platforms: [claude-code, cursor, windsurf, gemini-cli]
12
- trigger: User asks to add roles, restrict access, or implement authentication logic.
13
- inputs: [Auth requirements, RBAC Matrix]
14
- outputs: [Access control logic, Middleware]
15
- allowed_tools: [grep_search, run_command, write_to_file]
16
- pipeline: [analyze, implement, engineering-standard, validate, complete]
17
9
  ---
18
10
 
19
- # 🛠️ qk-access-policy - Standard Operating Procedure
11
+ # 🛠️ qk-access-policy
20
12
 
21
- > **Goal:** "Bảo vệ cổng" (Security Guard). Xác định xem người dùng có đủ thẩm quyền để truy cập vào một Component UI hoặc một Endpoint API hay không.
13
+ > **Inheritance:** Kỹ năng này tuân thủ Kiến trúc v5.0 của `framework/KERNEL.md`.
14
+ > Output bắt buộc là Decision Summary.
22
15
 
23
- ## 🔄 1. Chain of Thought (SOP)
16
+ ---
17
+
18
+ ## 🎯 Mission (Scope)
19
+ - ✅ Thiết kế và triển khai phân quyền hệ thống.
20
+ - ❌ Do NOT bỏ qua các lỗ hổng bảo mật hiển nhiên (như lộ mật khẩu, thiếu mã hóa).
24
21
 
25
- 1. **Analyze (Role Assessment):**
26
- - Identify the user roles (Guest, User, Admin, SuperAdmin).
27
- 2. **Implement (Boundary Definition):**
28
- - Implement UI Guards (e.g., hiding a Delete button).
29
- - Implement API Middleware (e.g., blocking the `/api/delete` endpoint).
30
- 3. **Validate (Least Privilege Check):**
31
- - Ensure you didn't grant broad access by default.
22
+ ---
32
23
 
33
- ## 🛡️ 2. Constraints & Rules
24
+ ## ⚙️ Capabilities (Cognitive Pipeline)
25
+ ```yaml
26
+ Pipeline:
27
+ - inference
28
+ - planning
29
+ - execution
30
+ - bias-review
31
+ - ship-check
32
+ ```
34
33
 
35
- - **Full Stack Protection:** Never hide UI elements without also securing the corresponding backend API.
34
+ ---
36
35
 
37
- ## 🤝 3. Handoff Pipeline
36
+ ## 🎛️ Dials (Hành vi)
37
+ ```yaml
38
+ Dials:
39
+ - id: granularity # (Coarse vs Fine-grained)
40
+ - id: strictness
41
+ ```
38
42
 
39
- 1. `validate`: Trigger `qk-validation-gate` to check for security flaws.
40
- 2. `complete`: Generate the Access Control Report.
43
+ ---
41
44
 
42
- ## 📝 4. Output Format
45
+ ## 🛡️ Biases (Sửa lỗi mặc định)
46
+ ```yaml
47
+ Biases:
48
+ - id: ui-only-security # (Chỉ ẩn nút ở frontend mà quên chặn API backend)
49
+ ```
43
50
 
44
- Vui lòng trả kết quả bằng Tiếng Việt.
51
+ ---
45
52
 
46
- - **Tóm tắt (Summary):** Các role vừa được setup.
47
- - **Chi tiết (Changes):** UI và API nào đã được bảo vệ.
53
+ ## 🛫 Ship Criteria
54
+ ```yaml
55
+ Rules:
56
+ - id: end-to-end-validation
57
+ ```