ai-developer-skill-os 3.0.0 → 3.1.1

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 (43) hide show
  1. package/.agents/AGENTS.md +79 -46
  2. package/.github/workflows/ci.yml +56 -0
  3. package/CHANGELOG.md +53 -36
  4. package/README.md +97 -77
  5. package/bin/install.js +14 -2
  6. package/docs/GOVERNANCE.md +40 -0
  7. package/docs/SPEC.md +37 -0
  8. package/docs/adr/0001-intent-based-architecture.md +19 -0
  9. package/docs/adr/0002-kernel-freeze.md +21 -0
  10. package/docs/adr/0003-risk-based-verification.md +20 -0
  11. package/docs/adr/0004-progressive-evidence.md +19 -0
  12. package/docs/skill-classification.md +25 -0
  13. package/knowledge/backend/nodejs.md +52 -0
  14. package/knowledge/frontend/react.md +54 -0
  15. package/package.json +44 -34
  16. package/skills/qk-access-policy/SKILL.md +8 -1
  17. package/skills/qk-ai-builder/SKILL.md +8 -1
  18. package/skills/qk-api-lifecycle/SKILL.md +9 -1
  19. package/skills/qk-bug-resolution/SKILL.md +11 -2
  20. package/skills/qk-context-loader/SKILL.md +9 -1
  21. package/skills/qk-data-lifecycle/SKILL.md +9 -1
  22. package/skills/qk-design-to-code/SKILL.md +8 -1
  23. package/skills/qk-docs/SKILL.md +9 -1
  24. package/skills/qk-documentation-system/SKILL.md +8 -1
  25. package/skills/qk-engineering-standard/SKILL.md +10 -2
  26. package/skills/qk-feature-delivery/SKILL.md +12 -2
  27. package/skills/qk-help/SKILL.md +8 -1
  28. package/skills/qk-orchestrator/SKILL.md +9 -1
  29. package/skills/qk-policy-engine/SKILL.md +9 -1
  30. package/skills/qk-production-release/SKILL.md +9 -2
  31. package/skills/qk-project-bootstrap/SKILL.md +8 -1
  32. package/skills/qk-project-health/SKILL.md +10 -2
  33. package/skills/qk-project-memory/SKILL.md +8 -1
  34. package/skills/qk-system-evolution/SKILL.md +10 -2
  35. package/skills/qk-ui-audit/SKILL.md +10 -2
  36. package/skills/qk-ui-system-builder/SKILL.md +8 -1
  37. package/skills/qk-validation-gate/SKILL.md +10 -2
  38. package/skills.json +433 -556
  39. package/templates/skill-template.md +38 -0
  40. package/tests/install-script.test.js +38 -0
  41. package/tests/registry.test.js +111 -0
  42. package/tests/spec-compliance.test.js +193 -0
  43. package/vitest.config.js +11 -0
@@ -0,0 +1,19 @@
1
+ # 4. Progressive Evidence Collection
2
+
3
+ Date: 2026-07-02
4
+
5
+ ## Status
6
+ Accepted
7
+
8
+ ## Context
9
+ AI Agents frequently fall into "hallucination loops" or "over-exploration loops", running commands like `ls`, `tree`, or reading entire project directories just to find one file. This burns through context windows rapidly and leads to poor reasoning.
10
+
11
+ ## Decision
12
+ We implemented a strict **Progressive Evidence Collection** pipeline inside the OS Kernel (`AGENTS.md`):
13
+ - **Context Budget:** Agents must start by reading 1 file, then 3 files, then a directory. They must never read the whole project unless explicitly required.
14
+ - **Sufficient Confidence:** Agents must stop collecting evidence the moment they reach an 80% confidence threshold to proceed.
15
+ - **Evidence Priority:** User input > Existing context > Source code > Types > Logs > Runtime > External knowledge.
16
+
17
+ ## Consequences
18
+ - **Positive:** Drastically reduced unnecessary `run_command` usage. Agents act much more like senior developers who pinpoint issues via stack traces instead of blindly searching the filesystem.
19
+ - **Negative:** Requires rigorous enforcement in the Kernel to prevent agents from falling back to old habits.
@@ -0,0 +1,25 @@
1
+ # Skill Classifications (Intent-Based Policies)
2
+
3
+ Skills are classified into behavioral groups that define their **Primary Objective** and **Preferred Evidence Strategy**.
4
+
5
+ *Note: Actual verification depth is NOT determined by the skill itself, but must strictly follow the **Risk-based Verification Policy** defined in `AGENTS.md`.*
6
+
7
+ ## 1. Static Analysis Skills
8
+ *e.g., Code Review, Project Health, Architecture, Documentation*
9
+ - **Primary Goal:** Audit, analyze, or document without altering system behavior.
10
+ - **Preferred Behavior:** Prefer static analysis (`read_file`, `grep_search`). Do not execute code or run test suites unless explicitly requested to validate the audit.
11
+
12
+ ## 2. Development Skills
13
+ *e.g., Feature Delivery, Refactor, Bug Resolution*
14
+ - **Primary Goal:** Modify existing behavior or implement new features safely.
15
+ - **Preferred Behavior:** Apply localized changes. Gather targeted evidence. Avoid speculative full-project validation; verify only what is affected.
16
+
17
+ ## 3. Validation Skills
18
+ *e.g., Validation Gate, CI Check, Release*
19
+ - **Primary Goal:** Ensure code quality, security, and build stability before release.
20
+ - **Preferred Behavior:** Exhaustive scanning. Running automated checks and full builds is encouraged to satisfy the validation gate.
21
+
22
+ ## 4. Maintenance Skills
23
+ *e.g., System Evolution, Dependency Update*
24
+ - **Primary Goal:** Upgrade system foundations safely with a rollback strategy.
25
+ - **Preferred Behavior:** Inspect changelogs and compatibility carefully before updating. Run full system verifications post-update to ensure stability.
@@ -0,0 +1,52 @@
1
+ ---
2
+ id: nodejs-knowledge-base
3
+ domain: backend
4
+ tags: [nodejs, express, api, middleware]
5
+ priority: high
6
+ ---
7
+
8
+ # Node.js Backend Knowledge Base
9
+
10
+ ## Architecture Patterns
11
+ - **Controller Layer:** Handle HTTP requests/responses, input validation, delegate to Service
12
+ - **Service Layer:** Business logic, data transformation, transaction management
13
+ - **Repository Layer:** Direct database queries, ORM interactions
14
+ - **Middleware:** Auth guards, logging, rate limiting, error handling
15
+
16
+ ## Express Best Practices
17
+ ```ts
18
+ // Controller pattern - thin, delegates to service
19
+ export async function createUser(req: Request, res: Response) {
20
+ const result = await userService.create(req.body);
21
+ res.status(201).json(result);
22
+ }
23
+
24
+ // Service pattern - business logic
25
+ export async function create(userData: UserDto) {
26
+ // Validation
27
+ const validated = userSchema.parse(userData);
28
+ // Transaction
29
+ return db.user.create({ data: validated });
30
+ }
31
+
32
+ // Middleware pattern - reusable
33
+ export const requireAuth = (req: Request, res: Response, next: NextFunction) => {
34
+ const user = verifyToken(req.headers.authorization);
35
+ if (!user) return res.status(401).json({ error: 'Unauthorized' });
36
+ req.user = user;
37
+ next();
38
+ };
39
+ ```
40
+
41
+ ## Error Handling
42
+ - Never throw raw Errors. Use custom error classes.
43
+ - Always catch async errors in middleware.
44
+ - Return consistent error format: `{ error: string, code?: string }`
45
+
46
+ ## Security Checklist
47
+ - Use helmet middleware for security headers
48
+ - Validate all inputs with Zod/Joi
49
+ - Never commit .env files
50
+ - Use parameterized queries to prevent SQL injection
51
+ - Rate limit public endpoints
52
+ - Log security events (failed logins, permission denied)
@@ -12,16 +12,70 @@ priority: high
12
12
  - Use `useContext` or global stores (Zustand/Redux) when prop drilling exceeds 3 levels.
13
13
  - Never store derived data in state. Compute it on the fly during render.
14
14
  - Never store API responses in Redux if a Server State tool (React Query/SWR) is available.
15
+ - For forms: Use React Hook Form + Zod for validation, NOT useState for each field.
15
16
 
16
17
  ## Hooks Best Practices
17
18
  - **useEffect:** Avoid using `useEffect` for data transformation or syncing state. Only use it for actual side effects (subscriptions, API calls, manual DOM mutations).
18
19
  - **useMemo / useCallback:** Only use when passing props to heavily memoized child components or when the computation is extremely expensive. Do not use them blindly.
19
20
  - **Custom Hooks:** Extract complex logic out of UI components into custom hooks. Prefix them with `use` (e.g., `useUserAuth`).
21
+ - **Custom Hook Pattern:**
22
+ ```ts
23
+ // useApi.ts - Generic API hook
24
+ export function useApi<T>(url: string) {
25
+ const [data, setData] = useState<T | null>(null);
26
+ const [loading, setLoading] = useState(false);
27
+ const [error, setError] = useState<string | null>(null);
28
+
29
+ useEffect(() => {
30
+ fetchData();
31
+ }, [url]);
32
+ }
33
+ ```
20
34
 
21
35
  ## Component Boundaries
22
36
  - Follow Single Responsibility Principle. A component should either handle logic (Container) or handle rendering UI (Presentational), ideally not both if it's complex.
23
37
  - Keep files under 300 lines. If a file is larger, break it down.
38
+ - **Component Hierarchy:**
39
+ - `components/shared/` - Reusable, no business logic
40
+ - `features/<domain>/components/` - Feature-specific components
41
+ - `layouts/` - Page layouts and wrappers
24
42
 
25
43
  ## Performance Gotchas
26
44
  - Stale Closures: Always include all reactive variables in the dependency array of `useEffect` or `useCallback`.
27
45
  - Keys in Lists: Always use unique IDs for `key` props. Never use array indices unless the list is completely static.
46
+ - **Re-render Detection:**
47
+ ```ts
48
+ // Use console.log inside component to detect renders
49
+ // Wrap child in React.memo if unnecessary re-renders occur
50
+ export const MemoizedChild = React.memo(ChildComponent);
51
+ ```
52
+
53
+ ## Error Handling Patterns
54
+ ```ts
55
+ // API Error Boundary
56
+ class ErrorBoundary extends React.Component {
57
+ state = { hasError: false };
58
+ static getDerivedStateFromError() {
59
+ return { hasError: true };
60
+ }
61
+ }
62
+
63
+ // Hook error handling
64
+ const { data, error, isLoading } = useQuery(['key'], fetchFn);
65
+ if (error) return <ErrorMessage error={error} />;
66
+ if (isLoading) return <LoadingSpinner />;
67
+ ```
68
+
69
+ ## Testing Patterns
70
+ ```tsx
71
+ // Component test with React Testing Library
72
+ import { render, screen, waitFor } from '@testing-library/react';
73
+ import userEvent from '@testing-library/user-event';
74
+
75
+ test('handles user interaction', async () => {
76
+ render(<LoginForm />);
77
+ const button = screen.getByRole('button', { name: /login/i });
78
+ await userEvent.click(button);
79
+ await waitFor(() => expect(mockSubmit).toHaveBeenCalled());
80
+ });
81
+ ```
package/package.json CHANGED
@@ -1,34 +1,44 @@
1
- {
2
- "name": "ai-developer-skill-os",
3
- "version": "3.0.0",
4
- "description": "Multi-agent skill package cho AI coding agents (Claude, Cursor, Windsurf, Antigravity) với 23 skills chuyên nghiệp.",
5
- "main": "bin/install.js",
6
- "bin": {
7
- "ai-developer-skill-os": "bin/install.js",
8
- "ai-skill": "bin/install.js"
9
- },
10
- "scripts": {
11
- "test": "echo \"Error: no test specified\" && exit 1"
12
- },
13
- "repository": {
14
- "type": "git",
15
- "url": "git+https://github.com/phamquangkhanh2999/ai-developer-skill-os.git"
16
- },
17
- "keywords": [
18
- "ai",
19
- "claude",
20
- "cursor",
21
- "windsurf",
22
- "skills",
23
- "developer",
24
- "agent",
25
- "prompts",
26
- "framework"
27
- ],
28
- "author": "Quang Khánh",
29
- "license": "MIT",
30
- "bugs": {
31
- "url": "https://github.com/phamquangkhanh2999/ai-developer-skill-os/issues"
32
- },
33
- "homepage": "https://github.com/phamquangkhanh2999/ai-developer-skill-os#readme"
34
- }
1
+ {
2
+ "name": "ai-developer-skill-os",
3
+ "version": "3.1.1",
4
+ "description": "Multi-agent skill package cho AI coding agents (Claude, Cursor, Windsurf, Antigravity) với 23 skills chuyên nghiệp.",
5
+ "main": "bin/install.js",
6
+ "bin": {
7
+ "ai-developer-skill-os": "bin/install.js",
8
+ "ai-skill": "bin/install.js"
9
+ },
10
+ "type": "module",
11
+ "scripts": {
12
+ "test": "vitest run",
13
+ "test:watch": "vitest",
14
+ "test:registry": "vitest run --config vitest.config.js",
15
+ "lint": "echo \"No linter configured\" && exit 0"
16
+ },
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "git+https://github.com/phamquangkhanh2999/ai-developer-skill-os.git"
20
+ },
21
+ "keywords": [
22
+ "ai",
23
+ "claude",
24
+ "cursor",
25
+ "windsurf",
26
+ "skills",
27
+ "developer",
28
+ "agent",
29
+ "prompts",
30
+ "framework"
31
+ ],
32
+ "author": "Quang Khánh",
33
+ "license": "MIT",
34
+ "bugs": {
35
+ "url": "https://github.com/phamquangkhanh2999/ai-developer-skill-os/issues"
36
+ },
37
+ "homepage": "https://github.com/phamquangkhanh2999/ai-developer-skill-os#readme",
38
+ "devDependencies": {
39
+ "vitest": "^2.1.0",
40
+ "fast-glob": "^3.3.0",
41
+ "gray-matter": "^4.0.0",
42
+ "js-yaml": "^4.1.0"
43
+ }
44
+ }
@@ -1,9 +1,11 @@
1
1
  ---
2
2
  name: qk-access-policy
3
- version: 3.0.0
3
+ version: 3.1.0
4
4
  updated: 2026-07-02
5
5
  description: Manage RBAC, ABAC, and security boundaries.
6
6
  category: security
7
+ behavior: static-analysis
8
+ intent: review-code
7
9
  priority: high
8
10
  tags: [security, rbac, auth, permissions]
9
11
  platforms: [claude-code, cursor, windsurf, gemini-cli]
@@ -19,6 +21,7 @@ pipeline: [analyze, implement, engineering-standard, validate, complete]
19
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.
20
22
 
21
23
  ## 🔄 1. Chain of Thought (SOP)
24
+
22
25
  1. **Analyze (Role Assessment):**
23
26
  - Identify the user roles (Guest, User, Admin, SuperAdmin).
24
27
  2. **Implement (Boundary Definition):**
@@ -28,13 +31,17 @@ pipeline: [analyze, implement, engineering-standard, validate, complete]
28
31
  - Ensure you didn't grant broad access by default.
29
32
 
30
33
  ## 🛡️ 2. Constraints & Rules
34
+
31
35
  - **Full Stack Protection:** Never hide UI elements without also securing the corresponding backend API.
32
36
 
33
37
  ## 🤝 3. Handoff Pipeline
38
+
34
39
  1. `validate`: Trigger `qk-validation-gate` to check for security flaws.
35
40
  2. `complete`: Generate the Access Control Report.
36
41
 
37
42
  ## 📝 4. Output Format
43
+
38
44
  Vui lòng trả kết quả bằng Tiếng Việt.
45
+
39
46
  - **Tóm tắt (Summary):** Các role vừa được setup.
40
47
  - **Chi tiết (Changes):** UI và API nào đã được bảo vệ.
@@ -1,9 +1,11 @@
1
1
  ---
2
2
  name: qk-ai-builder
3
- version: 3.0.0
3
+ version: 3.1.0
4
4
  updated: 2026-07-02
5
5
  description: Design AI Logic, Prompts, RAG pipelines, and Agents.
6
6
  category: ai
7
+ behavior: development
8
+ intent: implement-feature
7
9
  priority: medium
8
10
  tags: [ai, llm, prompt-engineering, rag, agents]
9
11
  platforms: [claude-code, cursor, windsurf, gemini-cli]
@@ -19,6 +21,7 @@ pipeline: [analyze, design, implement, validate, complete]
19
21
  > **Goal:** "AI Engineer". Xây dựng các tính năng thông minh bằng LLM (Chatbot, RAG pipeline, Agent workflows).
20
22
 
21
23
  ## 🔄 1. Chain of Thought (SOP)
24
+
22
25
  1. **Analyze (Task Breakdown):**
23
26
  - Determine the AI use case (Classification, Generation, Chat, Search).
24
27
  2. **Design (Prompt Engineering):**
@@ -29,13 +32,17 @@ pipeline: [analyze, design, implement, validate, complete]
29
32
  - Ensure API keys are not hardcoded.
30
33
 
31
34
  ## 🛡️ 2. Constraints & Rules
35
+
32
36
  - **JSON Parsing:** Always enforce JSON outputs if the AI response is consumed by the app, and handle parse errors.
33
37
 
34
38
  ## 🤝 3. Handoff Pipeline
39
+
35
40
  1. `validate`: Send to validation gate.
36
41
  2. `complete`: Output the AI Integration Report.
37
42
 
38
43
  ## 📝 4. Output Format
44
+
39
45
  Vui lòng trả kết quả bằng Tiếng Việt.
46
+
40
47
  - **Tóm tắt (Summary):** Luồng AI đã thiết lập.
41
48
  - **Chi tiết (Changes):** Prompt và logic gọi API.
@@ -1,9 +1,11 @@
1
1
  ---
2
2
  name: qk-api-lifecycle
3
- version: 3.0.0
3
+ version: 3.1.0
4
4
  updated: 2026-07-02
5
5
  description: Design, implement, and integrate API endpoints.
6
6
  category: engineering
7
+ behavior: development
8
+ intent: implement-feature
7
9
  priority: high
8
10
  tags: [api, backend, frontend-integration, endpoints]
9
11
  platforms: [claude-code, cursor, windsurf, gemini-cli]
@@ -19,6 +21,7 @@ pipeline: [analyze, implement, engineering-standard, validate, complete]
19
21
  > **Goal:** Quản lý toàn bộ vòng đời của một API, từ việc thiết kế Spec (Swagger/Types) cho đến khi Backend code xong và Frontend gọi thành công.
20
22
 
21
23
  ## 🔄 1. Chain of Thought (SOP)
24
+
22
25
  1. **Analyze (Contract Definition):**
23
26
  - Read the user requirements.
24
27
  - Define the exact API contract (Request Body, Query Params, Response DTO) in TypeScript interfaces or OpenAPI spec.
@@ -34,10 +37,12 @@ pipeline: [analyze, implement, engineering-standard, validate, complete]
34
37
  - Ensure loading states are managed on the frontend.
35
38
 
36
39
  ## 🛡️ 2. Constraints & Rules
40
+
37
41
  - **No Hardcoded URLs:** Never hardcode `http://localhost:3000` inside frontend components. Always use environment variables (`process.env.API_URL`).
38
42
  - **Separation of Concerns:** Do NOT write `fetch` or `axios.get` directly inside a React UI component. Extract it to a custom hook or an API service file.
39
43
 
40
44
  ## 🌳 3. Decision Tree
45
+
41
46
  ```text
42
47
  Is this a Backend or Frontend task?
43
48
  ├── BACKEND → Does the API need Database access?
@@ -49,12 +54,15 @@ Is this a Backend or Frontend task?
49
54
  ```
50
55
 
51
56
  ## 🤝 4. Handoff Pipeline
57
+
52
58
  1. `engineering-standard`: Verify API naming conventions (e.g., `GET /users` instead of `POST /getUsers`).
53
59
  2. `validate`: Run API tests and Type-checks.
54
60
  3. `complete`: Generate the final report.
55
61
 
56
62
  ## 📝 5. Output Format
63
+
57
64
  Vui lòng trả kết quả bằng Tiếng Việt. Sử dụng template chuẩn của hệ thống:
65
+
58
66
  - **Tóm tắt (Summary):** Các endpoint đã tạo hoặc tích hợp.
59
67
  - **Chi tiết (Changes):** File nào chứa logic API.
60
68
  - **Kiến trúc (Reasoning):** Lý do chọn thư viện hoặc cách bắt lỗi (Error handling).
@@ -1,9 +1,11 @@
1
1
  ---
2
2
  name: qk-bug-resolution
3
- version: 3.0.0
3
+ version: 3.1.0
4
4
  updated: 2026-07-02
5
5
  description: Fix bugs and prevent regressions.
6
6
  category: engineering
7
+ behavior: development
8
+ intent: fix-bug
7
9
  priority: high
8
10
  tags: [bug, debug, regression]
9
11
  platforms: [claude-code, cursor, windsurf, gemini-cli]
@@ -19,6 +21,7 @@ pipeline: [analyze, implement, engineering-standard, validate, complete]
19
21
  > **Goal:** Định vị nguyên nhân, sửa lỗi triệt để, và đảm bảo lỗi không bị lặp lại (Regression Prevention).
20
22
 
21
23
  ## 🔄 1. Chain of Thought (SOP)
24
+
22
25
  1. **Analyze (Root Cause Analysis):**
23
26
  - Read the provided error log or bug description.
24
27
  - Trace the error to the exact file and line of code.
@@ -33,12 +36,14 @@ pipeline: [analyze, implement, engineering-standard, validate, complete]
33
36
  - Provide steps to test the fix.
34
37
  - Ensure backward compatibility.
35
38
 
36
- ## 🛡️ 2. Constraints & Rules
39
+ ## 🛡️ 3. Constraints & Rules
40
+
37
41
  - **No Guesses:** Do not assume the shape of an API response. Print it or read the type definitions first.
38
42
  - **Minimal Fix:** Always prefer a 1-line fix over a 100-line refactor, unless the architecture is fundamentally broken.
39
43
  - **Clean Up:** Remove any `console.log()` or debugger statements introduced during the debugging process.
40
44
 
41
45
  ## 🌳 3. Decision Tree
46
+
42
47
  ```text
43
48
  Is there a Stack Trace?
44
49
  ├── YES → Use grep_search to find the exact file and line number.
@@ -50,13 +55,17 @@ Is the bug related to State/Re-rendering?
50
55
  ```
51
56
 
52
57
  ## 🤝 4. Handoff Pipeline
58
+
53
59
  After implementing the fix, map to the pipeline:
60
+
54
61
  1. `engineering-standard`: Ensure the fix follows naming and architecture rules.
55
62
  2. `validate`: Run linters and tests (via `qk-validation-gate` equivalent).
56
63
  3. `complete`: Output the final report.
57
64
 
58
65
  ## 📝 5. Output Format
66
+
59
67
  Vui lòng sử dụng template `templates/bug-report.md` (Báo Cáo Xử Lý Lỗi) để phản hồi lại cho người dùng bằng Tiếng Việt. Nội dung bao gồm:
68
+
60
69
  - Summary
61
70
  - Changes
62
71
  - Root Cause
@@ -1,9 +1,11 @@
1
1
  ---
2
2
  name: qk-context-loader
3
- version: 3.0.0
3
+ version: 3.1.0
4
4
  updated: 2026-07-02
5
5
  description: Load relevant files and map the dependency graph for a task.
6
6
  category: utilities
7
+ behavior: static-analysis
8
+ intent: review-code
7
9
  priority: medium
8
10
  tags: [context, filesystem, dependencies, graph]
9
11
  platforms: [claude-code, cursor, windsurf, gemini-cli]
@@ -19,6 +21,7 @@ pipeline: [analyze, implement, complete]
19
21
  > **Goal:** "Người thu thập tình báo". Đảm bảo AI hiểu rõ môi trường xung quanh một file code trước khi tiến hành sửa nó, tránh lỗi thiếu context.
20
22
 
21
23
  ## 🔄 1. Chain of Thought (SOP)
24
+
22
25
  1. **Analyze (Target Identification):**
23
26
  - Identify the main file that needs modification.
24
27
  2. **Implement (Graph Traversal):**
@@ -29,9 +32,11 @@ pipeline: [analyze, implement, complete]
29
32
  - Build a mental map of how the data flows.
30
33
 
31
34
  ## 🛡️ 2. Constraints & Rules
35
+
32
36
  - **Token Optimization:** Do not load `node_modules` or massive minified build files. Extract only the exact logic needed.
33
37
 
34
38
  ## 🌳 3. Decision Tree
39
+
35
40
  ```text
36
41
  Is the target file a UI Component?
37
42
  ├── YES → Load its CSS/Theme tokens and any nested Child components.
@@ -39,9 +44,12 @@ Is the target file a UI Component?
39
44
  ```
40
45
 
41
46
  ## 🤝 4. Handoff Pipeline
47
+
42
48
  1. `complete`: Provide the context map to the Orchestrator or Target Skill.
43
49
 
44
50
  ## 📝 5. Output Format
51
+
45
52
  Vui lòng trả kết quả bằng Tiếng Việt.
53
+
46
54
  - **Tóm tắt (Summary):** Đã nạp thành công ngữ cảnh.
47
55
  - **Chi tiết (Changes):** Các file có liên quan trực tiếp.
@@ -1,9 +1,11 @@
1
1
  ---
2
2
  name: qk-data-lifecycle
3
- version: 3.0.0
3
+ version: 3.1.0
4
4
  updated: 2026-07-02
5
5
  description: Manage Database Schema, Migrations, and Repositories.
6
6
  category: database
7
+ behavior: development
8
+ intent: implement-feature
7
9
  priority: medium
8
10
  tags: [database, sql, migration, schema, orm]
9
11
  platforms: [claude-code, cursor, windsurf, gemini-cli]
@@ -19,6 +21,7 @@ pipeline: [analyze, design, implement, engineering-standard, validate, complete]
19
21
  > **Goal:** Quản lý an toàn vòng đời dữ liệu, đảm bảo Schema chuẩn xác, Migration có thể Rollback và Query tối ưu.
20
22
 
21
23
  ## 🔄 1. Chain of Thought (SOP)
24
+
22
25
  1. **Analyze (Requirements):**
23
26
  - Understand the entities and their relationships (1:1, 1:N, N:N).
24
27
  - Identify the ORM/Query Builder used in the project (e.g., Prisma, TypeORM, Drizzle).
@@ -33,11 +36,13 @@ pipeline: [analyze, design, implement, engineering-standard, validate, complete]
33
36
  - Review the migration script for destructive operations (e.g., `DROP TABLE`, `DROP COLUMN`).
34
37
 
35
38
  ## 🛡️ 2. Constraints & Rules
39
+
36
40
  - **No Data Loss:** NEVER execute a migration that drops data on Production without explicit User approval and a backup plan.
37
41
  - **Decoupling:** Do not write SQL queries directly in Controllers. Always use the Repository or DAO pattern.
38
42
  - **Index Rule:** Any column used in a `WHERE`, `JOIN`, or `ORDER BY` clause should be evaluated for an index.
39
43
 
40
44
  ## 🌳 3. Decision Tree
45
+
41
46
  ```text
42
47
  Is this modifying an existing table in Production?
43
48
  ├── YES → Does it drop a column or change a data type destructively?
@@ -47,12 +52,15 @@ Is this modifying an existing table in Production?
47
52
  ```
48
53
 
49
54
  ## 🤝 4. Handoff Pipeline
55
+
50
56
  1. `engineering-standard`: Verify naming conventions (e.g., snake_case for DB columns if required).
51
57
  2. `validate`: Run dry-run migrations or unit tests.
52
58
  3. `complete`: Generate the Database report.
53
59
 
54
60
  ## 📝 5. Output Format
61
+
55
62
  Vui lòng trả kết quả bằng Tiếng Việt.
63
+
56
64
  - **Tóm tắt (Summary):** Bảng nào được tạo/sửa.
57
65
  - **Chi tiết (Changes):** File migration và Model đã sinh ra.
58
66
  - **Kiến trúc (Reasoning):** Lý do thiết kế quan hệ bảng và các Index.
@@ -1,9 +1,11 @@
1
1
  ---
2
2
  name: qk-design-to-code
3
- version: 3.0.0
3
+ version: 3.1.0
4
4
  updated: 2026-07-02
5
5
  description: Convert Figma/Images to semantic, pixel-perfect code components.
6
6
  category: frontend
7
+ behavior: development
8
+ intent: implement-feature
7
9
  priority: high
8
10
  tags: [ui, figma, frontend, styling, css]
9
11
  platforms: [claude-code, cursor, windsurf, gemini-cli]
@@ -19,6 +21,7 @@ pipeline: [analyze, implement, engineering-standard, validate, complete]
19
21
  > **Goal:** Dịch thiết kế (Mockups/Images) thành mã nguồn (React, Vue, HTML/CSS) với độ chính xác Pixel-Perfect.
20
22
 
21
23
  ## 🔄 1. Chain of Thought (SOP)
24
+
22
25
  1. **Analyze (Deconstruct Design):**
23
26
  - Look at the provided mockup.
24
27
  - Break it down from Outside-In (Container -> Rows -> Columns -> Elements).
@@ -31,16 +34,20 @@ pipeline: [analyze, implement, engineering-standard, validate, complete]
31
34
  - Ensure the component uses relative units where necessary and scales on mobile.
32
35
 
33
36
  ## 🛡️ 2. Constraints & Rules
37
+
34
38
  - **No Magic Values:** Do not use random hex codes or pixel values if a Design System is available.
35
39
  - **Accessibility:** Always include `alt` for images and `aria-label` for icon-only buttons.
36
40
 
37
41
  ## 🤝 3. Handoff Pipeline
42
+
38
43
  1. `engineering-standard`: Ensure the UI component has no business logic.
39
44
  2. `validate`: Trigger `qk-ui-audit` checks.
40
45
  3. `complete`: Generate the UI Component Report.
41
46
 
42
47
  ## 📝 4. Output Format
48
+
43
49
  Vui lòng trả kết quả bằng Tiếng Việt.
50
+
44
51
  - **Tóm tắt (Summary):** Tên Component vừa tạo.
45
52
  - **Chi tiết (Changes):** File chứa component.
46
53
  - **Rủi ro (Risks):** Vấn đề responsive nếu có.
@@ -1,9 +1,11 @@
1
1
  ---
2
2
  name: qk-docs
3
- version: 3.0.0
3
+ version: 3.1.0
4
4
  updated: 2026-07-02
5
5
  description: Write and maintain human-readable project documentation.
6
6
  category: documentation
7
+ behavior: static-analysis
8
+ intent: maintain
7
9
  priority: low
8
10
  tags: [docs, markdown, jsdoc, readme]
9
11
  platforms: [claude-code, cursor, windsurf, gemini-cli]
@@ -19,6 +21,7 @@ pipeline: [analyze, implement, validate, complete]
19
21
  > **Goal:** Đóng vai trò là "Technical Writer". Viết tài liệu (README, API Docs, Code Comments) rõ ràng, dễ hiểu cho con người.
20
22
 
21
23
  ## 🔄 1. Chain of Thought (SOP)
24
+
22
25
  1. **Analyze (Context Extraction):**
23
26
  - Read the target source code to understand its Inputs, Outputs, and side effects.
24
27
  2. **Implement (Drafting):**
@@ -30,10 +33,12 @@ pipeline: [analyze, implement, validate, complete]
30
33
  - Ensure proper Markdown syntax (bolding, code blocks with languages).
31
34
 
32
35
  ## 🛡️ 2. Constraints & Rules
36
+
33
37
  - **Human Friendly:** Avoid overly academic language. Explain it as if explaining to a junior developer.
34
38
  - **Language Hybrid:** If writing Vietnamese documentation, keep technical keywords (props, state, endpoint, fetch) in English.
35
39
 
36
40
  ## 🌳 3. Decision Tree
41
+
37
42
  ```text
38
43
  Is this an API Documentation?
39
44
  ├── YES → Use standard REST/GraphQL documentation layout (Endpoint, Method, Body, Response).
@@ -43,10 +48,13 @@ Is this an API Documentation?
43
48
  ```
44
49
 
45
50
  ## 🤝 4. Handoff Pipeline
51
+
46
52
  1. `complete`: Generate the Docs and save them to the project files.
47
53
 
48
54
  ## 📝 5. Output Format
55
+
49
56
  Vui lòng trả kết quả bằng Tiếng Việt.
57
+
50
58
  - **Tóm tắt (Summary):** Tài liệu nào đã được tạo/cập nhật.
51
59
  - **Chi tiết (Changes):** Cấu trúc tài liệu.
52
60
  - **Xác thực (Verification):** Yêu cầu User đọc lướt qua tài liệu.
@@ -1,9 +1,11 @@
1
1
  ---
2
2
  name: qk-documentation-system
3
- version: 3.0.0
3
+ version: 3.1.0
4
4
  updated: 2026-07-02
5
5
  description: Maintain system-level architecture docs and DevOps runbooks.
6
6
  category: documentation
7
+ behavior: static-analysis
8
+ intent: maintain
7
9
  priority: low
8
10
  tags: [architecture, diagrams, mermaid, runbooks]
9
11
  platforms: [claude-code, cursor, windsurf, gemini-cli]
@@ -19,6 +21,7 @@ pipeline: [analyze, design, implement, complete]
19
21
  > **Goal:** Quản lý tài liệu cấp hệ thống (System Architecture, Sequence Diagrams, Runbooks).
20
22
 
21
23
  ## 🔄 1. Chain of Thought (SOP)
24
+
22
25
  1. **Analyze (System Flow):**
23
26
  - Understand the flow of data across microservices or complex components.
24
27
  2. **Design (Diagramming):**
@@ -27,12 +30,16 @@ pipeline: [analyze, design, implement, complete]
27
30
  - Save the documentation into the `/docs/` folder.
28
31
 
29
32
  ## 🛡️ 2. Constraints & Rules
33
+
30
34
  - **Syntax Check:** Ensure Mermaid diagrams are syntactically valid before saving.
31
35
 
32
36
  ## 🤝 3. Handoff Pipeline
37
+
33
38
  1. `complete`: Output the System Documentation Report.
34
39
 
35
40
  ## 📝 4. Output Format
41
+
36
42
  Vui lòng trả kết quả bằng Tiếng Việt.
43
+
37
44
  - **Tóm tắt (Summary):** Tài liệu kiến trúc nào đã được tạo.
38
45
  - **Chi tiết (Changes):** Đường dẫn file.