ai-developer-skill-os 2.1.1 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/AGENTS.md +81 -0
- package/CHANGELOG.md +14 -0
- package/README.md +84 -130
- package/docs/GOVERNANCE.md +40 -0
- package/docs/SPEC.md +37 -0
- package/docs/adr/0001-intent-based-architecture.md +19 -0
- package/docs/adr/0002-kernel-freeze.md +21 -0
- package/docs/adr/0003-risk-based-verification.md +20 -0
- package/docs/adr/0004-progressive-evidence.md +19 -0
- package/docs/skill-classification.md +25 -0
- package/knowledge/backend/nodejs.md +52 -0
- package/knowledge/frontend/react.md +81 -0
- package/package.json +1 -1
- package/skills/qk-access-policy/SKILL.md +40 -127
- package/skills/qk-ai-builder/SKILL.md +41 -33
- package/skills/qk-api-lifecycle/SKILL.md +62 -420
- package/skills/qk-bug-resolution/SKILL.md +67 -371
- package/skills/qk-context-loader/SKILL.md +47 -206
- package/skills/qk-data-lifecycle/SKILL.md +60 -135
- package/skills/qk-design-to-code/SKILL.md +46 -33
- package/skills/qk-docs/SKILL.md +52 -335
- package/skills/qk-documentation-system/SKILL.md +38 -33
- package/skills/qk-engineering-standard/SKILL.md +63 -171
- package/skills/qk-feature-delivery/SKILL.md +65 -432
- package/skills/qk-help/SKILL.md +37 -95
- package/skills/qk-orchestrator/SKILL.md +52 -272
- package/skills/qk-policy-engine/SKILL.md +52 -33
- package/skills/qk-production-release/SKILL.md +47 -127
- package/skills/qk-project-bootstrap/SKILL.md +43 -33
- package/skills/qk-project-health/SKILL.md +58 -650
- package/skills/qk-project-memory/SKILL.md +35 -33
- package/skills/qk-system-evolution/SKILL.md +65 -315
- package/skills/qk-ui-audit/SKILL.md +60 -152
- package/skills/qk-ui-system-builder/SKILL.md +40 -444
- package/skills/qk-validation-gate/SKILL.md +61 -33
- package/skills.json +36 -40
- package/templates/bug-report.md +21 -0
- package/templates/design-report.md +21 -0
- package/templates/feature-report.md +20 -0
- package/templates/review-report.md +21 -0
- package/templates/skill-template.md +38 -0
package/package.json
CHANGED
|
@@ -1,127 +1,40 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: qk-access-policy
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
1. **
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
# Auth & Security Engineer
|
|
44
|
-
|
|
45
|
-
> **Language rule:**
|
|
46
|
-
> Use English for: code, identifiers, file names, architecture terms, technical decisions.
|
|
47
|
-
> Use the user's language for: explanations, questions, summaries, and feedback.
|
|
48
|
-
> The user may write in any language — detect and match it automatically.
|
|
49
|
-
|
|
50
|
-
---
|
|
51
|
-
|
|
52
|
-
## Trigger
|
|
53
|
-
|
|
54
|
-
Activate this skill when:
|
|
55
|
-
- User asks to "add login", "protect this route", or "implement OAuth"
|
|
56
|
-
- Defining user roles and permissions (Admin vs User)
|
|
57
|
-
- Project audit flags security vulnerabilities (P0/P1)
|
|
58
|
-
- Handling sensitive data (passwords, PII, API keys)
|
|
59
|
-
|
|
60
|
-
---
|
|
61
|
-
|
|
62
|
-
## Scope
|
|
63
|
-
|
|
64
|
-
- ✅ **Authentication:** JWT, Session Cookies, OAuth2 (Google, GitHub, etc.), Magic Links.
|
|
65
|
-
- ✅ **Authorization:** Role-Based Access Control (RBAC), Middleware guards.
|
|
66
|
-
- ✅ **Data Protection:** Hashing passwords (bcrypt, Argon2), encrypting sensitive fields.
|
|
67
|
-
- ✅ **Vulnerability Prevention:** CSRF protection, Rate Limiting, CORS config, input sanitization (SQLi/XSS).
|
|
68
|
-
|
|
69
|
-
---
|
|
70
|
-
|
|
71
|
-
## Non-goals
|
|
72
|
-
|
|
73
|
-
- ❌ Do NOT store passwords in plain text. Ever.
|
|
74
|
-
- ❌ Do NOT hardcode secrets or private keys in the code (use `.env`).
|
|
75
|
-
- ❌ Do NOT store JWTs in `localStorage` if cookies (`httpOnly`) are an option, unless explicitly requested.
|
|
76
|
-
|
|
77
|
-
---
|
|
78
|
-
|
|
79
|
-
## Workflow
|
|
80
|
-
|
|
81
|
-
### Phase 1 — Strategy Selection
|
|
82
|
-
|
|
83
|
-
Determine the auth mechanism:
|
|
84
|
-
1. **Stateless (JWT):** Good for mobile/SPAs, distributed systems.
|
|
85
|
-
2. **Stateful (Sessions):** Good for traditional web apps, easier revocation.
|
|
86
|
-
3. **Third-party (OAuth / Auth0 / NextAuth / Supabase):** Offload auth complexity.
|
|
87
|
-
|
|
88
|
-
### Phase 2 — Implementation
|
|
89
|
-
|
|
90
|
-
**For JWT + Cookies (Recommended Web Pattern):**
|
|
91
|
-
1. Create Login endpoint: Verify password → Generate JWT → Set `httpOnly` cookie.
|
|
92
|
-
2. Create Middleware: Extract cookie → Verify JWT signature → Attach user to request.
|
|
93
|
-
3. Create Logout endpoint: Clear the cookie.
|
|
94
|
-
|
|
95
|
-
**For Authorization:**
|
|
96
|
-
1. Define roles (e.g., `enum Role { ADMIN, USER }`).
|
|
97
|
-
2. Create Role Middleware: Check `req.user.role`.
|
|
98
|
-
|
|
99
|
-
### Phase 3 — Security Audit
|
|
100
|
-
|
|
101
|
-
Verify:
|
|
102
|
-
- Passwords are hashed with a salt (e.g., `bcrypt.hash(password, 10)`).
|
|
103
|
-
- Cookies are `httpOnly`, `Secure` (in prod), and `SameSite`.
|
|
104
|
-
- CORS is configured to only allow trusted origins.
|
|
105
|
-
|
|
106
|
-
---
|
|
107
|
-
|
|
108
|
-
## Output Format
|
|
109
|
-
|
|
110
|
-
```
|
|
111
|
-
🛡️ Auth & Security Report
|
|
112
|
-
─────────────────────────────────────────────────
|
|
113
|
-
Mechanism: [JWT in httpOnly Cookie / OAuth / Session]
|
|
114
|
-
Roles: [Admin, User]
|
|
115
|
-
|
|
116
|
-
Components Implemented:
|
|
117
|
-
✅ Login/Logout handlers
|
|
118
|
-
✅ Auth Middleware (Guard)
|
|
119
|
-
✅ Password hashing (bcrypt)
|
|
120
|
-
|
|
121
|
-
Security measures enforced:
|
|
122
|
-
• `httpOnly`, `Secure`, `SameSite=Strict` on cookies
|
|
123
|
-
• CORS restricted to frontend origin
|
|
124
|
-
|
|
125
|
-
🔗 Next Steps:
|
|
126
|
-
Remember to add `JWT_SECRET` to your production environment variables.
|
|
127
|
-
```
|
|
1
|
+
---
|
|
2
|
+
name: qk-access-policy
|
|
3
|
+
version: 3.0.0
|
|
4
|
+
updated: 2026-07-02
|
|
5
|
+
description: Manage RBAC, ABAC, and security boundaries.
|
|
6
|
+
category: security
|
|
7
|
+
priority: high
|
|
8
|
+
tags: [security, rbac, auth, permissions]
|
|
9
|
+
platforms: [claude-code, cursor, windsurf, gemini-cli]
|
|
10
|
+
trigger: User asks to add roles, restrict access, or implement authentication logic.
|
|
11
|
+
inputs: [Auth requirements, RBAC Matrix]
|
|
12
|
+
outputs: [Access control logic, Middleware]
|
|
13
|
+
allowed_tools: [grep_search, run_command, write_to_file]
|
|
14
|
+
pipeline: [analyze, implement, engineering-standard, validate, complete]
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# 🛠️ qk-access-policy - Standard Operating Procedure
|
|
18
|
+
|
|
19
|
+
> **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
|
+
|
|
21
|
+
## 🔄 1. Chain of Thought (SOP)
|
|
22
|
+
1. **Analyze (Role Assessment):**
|
|
23
|
+
- Identify the user roles (Guest, User, Admin, SuperAdmin).
|
|
24
|
+
2. **Implement (Boundary Definition):**
|
|
25
|
+
- Implement UI Guards (e.g., hiding a Delete button).
|
|
26
|
+
- Implement API Middleware (e.g., blocking the `/api/delete` endpoint).
|
|
27
|
+
3. **Validate (Least Privilege Check):**
|
|
28
|
+
- Ensure you didn't grant broad access by default.
|
|
29
|
+
|
|
30
|
+
## 🛡️ 2. Constraints & Rules
|
|
31
|
+
- **Full Stack Protection:** Never hide UI elements without also securing the corresponding backend API.
|
|
32
|
+
|
|
33
|
+
## 🤝 3. Handoff Pipeline
|
|
34
|
+
1. `validate`: Trigger `qk-validation-gate` to check for security flaws.
|
|
35
|
+
2. `complete`: Generate the Access Control Report.
|
|
36
|
+
|
|
37
|
+
## 📝 4. Output Format
|
|
38
|
+
Vui lòng trả kết quả bằng Tiếng Việt.
|
|
39
|
+
- **Tóm tắt (Summary):** Các role vừa được setup.
|
|
40
|
+
- **Chi tiết (Changes):** UI và API nào đã được bảo vệ.
|
|
@@ -1,33 +1,41 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: qk-ai-builder
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
1. **
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
-
|
|
30
|
-
|
|
31
|
-
##
|
|
32
|
-
-
|
|
33
|
-
|
|
1
|
+
---
|
|
2
|
+
name: qk-ai-builder
|
|
3
|
+
version: 3.0.0
|
|
4
|
+
updated: 2026-07-02
|
|
5
|
+
description: Design AI Logic, Prompts, RAG pipelines, and Agents.
|
|
6
|
+
category: ai
|
|
7
|
+
priority: medium
|
|
8
|
+
tags: [ai, llm, prompt-engineering, rag, agents]
|
|
9
|
+
platforms: [claude-code, cursor, windsurf, gemini-cli]
|
|
10
|
+
trigger: User asks to build a chatbot, add AI features, or write prompts.
|
|
11
|
+
inputs: [AI Requirements]
|
|
12
|
+
outputs: [AI Logic, Prompts, RAG setup]
|
|
13
|
+
allowed_tools: [run_command, write_to_file]
|
|
14
|
+
pipeline: [analyze, design, implement, validate, complete]
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
# 🛠️ qk-ai-builder - Standard Operating Procedure
|
|
18
|
+
|
|
19
|
+
> **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
|
+
|
|
21
|
+
## 🔄 1. Chain of Thought (SOP)
|
|
22
|
+
1. **Analyze (Task Breakdown):**
|
|
23
|
+
- Determine the AI use case (Classification, Generation, Chat, Search).
|
|
24
|
+
2. **Design (Prompt Engineering):**
|
|
25
|
+
- Write clear System Prompts. Treat prompts like code (use variables, constraints).
|
|
26
|
+
3. **Implement (Integration):**
|
|
27
|
+
- Use the appropriate SDK (LangChain, OpenAI SDK, Vercel AI).
|
|
28
|
+
4. **Validate (Safety Check):**
|
|
29
|
+
- Ensure API keys are not hardcoded.
|
|
30
|
+
|
|
31
|
+
## 🛡️ 2. Constraints & Rules
|
|
32
|
+
- **JSON Parsing:** Always enforce JSON outputs if the AI response is consumed by the app, and handle parse errors.
|
|
33
|
+
|
|
34
|
+
## 🤝 3. Handoff Pipeline
|
|
35
|
+
1. `validate`: Send to validation gate.
|
|
36
|
+
2. `complete`: Output the AI Integration Report.
|
|
37
|
+
|
|
38
|
+
## 📝 4. Output Format
|
|
39
|
+
Vui lòng trả kết quả bằng Tiếng Việt.
|
|
40
|
+
- **Tóm tắt (Summary):** Luồng AI đã thiết lập.
|
|
41
|
+
- **Chi tiết (Changes):** Prompt và logic gọi API.
|