ai-developer-skill-os 6.0.3 → 7.0.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.
- package/.agents/AGENTS.md +8 -0
- package/CHANGELOG.md +11 -0
- package/README.md +59 -93
- package/package.json +43 -43
- package/skills/qk-access-policy/SKILL.md +13 -10
- package/skills/qk-ai-builder/SKILL.md +15 -13
- package/skills/qk-api-lifecycle/SKILL.md +19 -12
- package/skills/qk-bug-resolution/SKILL.md +20 -14
- package/skills/qk-context-loader/SKILL.md +14 -8
- package/skills/qk-data-lifecycle/SKILL.md +19 -11
- package/skills/qk-db-optimizer/SKILL.md +17 -12
- package/skills/qk-design-to-code/SKILL.md +14 -6
- package/skills/qk-docs/SKILL.md +15 -12
- package/skills/qk-engineering-standard/SKILL.md +17 -14
- package/skills/qk-feature-delivery/SKILL.md +21 -13
- package/skills/qk-help/SKILL.md +13 -10
- package/skills/qk-orchestrator/SKILL.md +13 -7
- package/skills/qk-policy-engine/SKILL.md +12 -9
- package/skills/qk-production-release/SKILL.md +15 -10
- package/skills/qk-project-bootstrap/SKILL.md +2 -1
- package/skills/qk-project-health/SKILL.md +15 -12
- package/skills/qk-project-memory/SKILL.md +15 -11
- package/skills/qk-system-evolution/SKILL.md +15 -11
- package/skills/qk-ui-audit/SKILL.md +16 -10
- package/skills/qk-ui-system-builder/SKILL.md +14 -7
- package/skills/qk-validation-gate/SKILL.md +14 -11
- package/templates/DESIGN.md +38 -0
- package/tests/behavior-conformance.test.js +14 -11
- package/scratch_update.cjs +0 -66
package/.agents/AGENTS.md
CHANGED
|
@@ -28,6 +28,7 @@ If multiple objectives or skills overlap, resolve them in this order:
|
|
|
28
28
|
**Rules:**
|
|
29
29
|
- **MUST** read before write. Always understand context before modifying code.
|
|
30
30
|
- **MUST NOT** read the whole project unless explicitly required.
|
|
31
|
+
- **ZERO-TRUST CONTEXT:** MUST NOT write business logic until a Dependency Graph or structural map is established (Do not guess the architecture).
|
|
31
32
|
|
|
32
33
|
**Guidelines:**
|
|
33
34
|
- **Context Budget:** Prefer reading `1 file` → `3 files` → `directory` → `project`.
|
|
@@ -55,6 +56,7 @@ If multiple objectives or skills overlap, resolve them in this order:
|
|
|
55
56
|
## 6. Execution & Repair Loop
|
|
56
57
|
**Rules:**
|
|
57
58
|
- **Repair Loop:** MUST follow: `Observe` → `Hypothesis` → `Evidence` → `Fix` → `Verify` → `Done`. Do NOT jump directly from Observe to Fix.
|
|
59
|
+
- **Self-Correction (Anti-Slop):** MUST proactively self-audit code (especially UI) against design constraints before emitting. Reject any generic, lazy, or "slop" solutions.
|
|
58
60
|
- **Escalation Policy:** If 2 consecutive attempts fail (e.g., build fail, permission denied): Stop. Explain the blocker. Request user confirmation before continuing.
|
|
59
61
|
- **Stopping Criteria:** Stop immediately when: Root cause identified, task completed, required evidence collected, or sufficient confidence reached.
|
|
60
62
|
|
|
@@ -79,3 +81,9 @@ If multiple objectives or skills overlap, resolve them in this order:
|
|
|
79
81
|
- **MUST** use Vietnamese for: User-facing explanations, questions, summaries, progress updates, and the final report.
|
|
80
82
|
- **MUST NOT** translate: Code snippets, stack traces, file paths, shell commands, config keys, environment variables.
|
|
81
83
|
- **MUST** follow the required reporting structure (Summary, Changes, Reason, Verification, Risks, Next Action).
|
|
84
|
+
|
|
85
|
+
## 9. Design Contract (Open Design)
|
|
86
|
+
**Rules:**
|
|
87
|
+
- **MUST** locate and read `DESIGN.md` in the project root before performing any UI or frontend tasks.
|
|
88
|
+
- **MUST NOT** invent design tokens, colors, or typography that contradict `DESIGN.md`.
|
|
89
|
+
- **ENFORCEMENT:** If `DESIGN.md` is missing, the agent MUST request the user to create one (or use bootstrap skill) before continuing UI work.
|
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,17 @@ All notable changes to the **AI Developer Skill OS** project will be documented
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [7.0.0] - 2026-07-15
|
|
9
|
+
|
|
10
|
+
### Changed (The "Anti-Slop & Zero-Trust" Architecture Upgrade)
|
|
11
|
+
- **Zero-Trust Logic**: Core logic skills (`qk-context-loader`, `qk-orchestrator`, `qk-feature-delivery`) now mandate a Topological Context Graph prior to any code generation.
|
|
12
|
+
- **Strict Design Contract**: Frontend skills (`qk-ui-system-builder`, `qk-design-to-code`, `qk-ui-audit`) now explicitly reject generic styling (slop) and enforce strict token matching against a mandated `DESIGN.md`.
|
|
13
|
+
- **Repair Loop Enforcement**: `qk-bug-resolution` updated to strictly prohibit jumping to fixes without explicitly establishing an `Observe -> Hypothesis -> Evidence` chain.
|
|
14
|
+
- **Contract-First APIs**: `qk-api-lifecycle` now requires explicit OpenAPI/Swagger definitions prior to endpoint implementation.
|
|
15
|
+
- **Upgraded Testing Framework**: Fixed regex and validation logic in `behavior-conformance.test.js` to rigorously support YAML array strings and precise V7 markdown constraints. All 22 skills bumped to `v7.0.0`.
|
|
16
|
+
- **Project Bootstrapping**: `qk-project-bootstrap` now scaffolds `DESIGN.md` explicitly upon initialization.
|
|
17
|
+
|
|
18
|
+
|
|
8
19
|
## [4.0.0] - 2026-07-02
|
|
9
20
|
|
|
10
21
|
### Changed (Major Architecture Upgrade)
|
package/README.md
CHANGED
|
@@ -1,93 +1,59 @@
|
|
|
1
|
-
# 🚀 AI Developer Skill OS (ai-developer-skill-os)
|
|
2
|
-
|
|
3
|
-
> **
|
|
4
|
-
|
|
5
|
-
Thay vì cung cấp các "công cụ rời rạc" (Toolbox)
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## 🏗️
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
```bash
|
|
61
|
-
npm i -g ai-developer-skill-os
|
|
62
|
-
```
|
|
63
|
-
Hoặc sử dụng qua `npx`:
|
|
64
|
-
```bash
|
|
65
|
-
npx ai-developer-skill-os init
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
## 🧪 Testing
|
|
69
|
-
|
|
70
|
-
This project includes a full test suite to ensure registry integrity and SKILL.md spec compliance:
|
|
71
|
-
|
|
72
|
-
```bash
|
|
73
|
-
npm test
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
CI runs automatically on every PR via GitHub Actions, enforcing:
|
|
77
|
-
- Registry matches filesystem
|
|
78
|
-
- All SKILL.md frontmatters comply with `docs/SPEC.md`
|
|
79
|
-
- Install script idempotency
|
|
80
|
-
|
|
81
|
-
## 🗑️ Cách Gỡ Cài Đặt (Uninstallation)
|
|
82
|
-
|
|
83
|
-
Nếu bạn đã cài đặt thông qua npm global, bạn có thể gỡ bỏ bằng lệnh:
|
|
84
|
-
```bash
|
|
85
|
-
npm uninstall -g ai-developer-skill-os
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
## 🚀 Tra Cứu (Help)
|
|
89
|
-
|
|
90
|
-
Để tra cứu danh sách toàn bộ 20+ Kỹ năng và các mẹo sử dụng, hãy gọi:
|
|
91
|
-
```bash
|
|
92
|
-
./qk-help "Hiển thị tất cả các skill"
|
|
93
|
-
```
|
|
1
|
+
# 🚀 AI Developer Skill OS (ai-developer-skill-os) v7.0.0
|
|
2
|
+
|
|
3
|
+
> **V7.0.0 "Anti-Slop & Zero-Trust Architecture"**
|
|
4
|
+
|
|
5
|
+
Hệ sinh thái AI Developer Skill OS đã được tái cấu trúc hoàn toàn. Thay vì cung cấp các "công cụ rời rạc" (Toolbox), phiên bản V7 được thiết kế như một **Hệ điều hành khép kín, hoạt động theo kỷ luật của một Kiến trúc sư Hệ thống (50 năm kinh nghiệm)**.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## 🏗️ Triết Lý Hoạt Động Cốt Lõi (V7 Kernel)
|
|
10
|
+
|
|
11
|
+
### 1. Zero-Trust Context (Không bao giờ đoán mò)
|
|
12
|
+
Mọi kỹ năng phân tích logic và backend (như `qk-feature-delivery`, `qk-orchestrator`) đều bị khoá chặt, không được phép hoạt động nếu chưa có **Dependency Graph** (Bản đồ cấu trúc) từ `qk-context-loader`. AI không được phép thay đổi code dựa trên trí tưởng tượng.
|
|
13
|
+
|
|
14
|
+
### 2. Contract-First (Khế ước đi đầu)
|
|
15
|
+
- **Frontend / UI**: Mọi sửa đổi giao diện đều phải dựa trên `DESIGN.md`. Nếu vi phạm (tạo ra giao diện lười biếng "slop", dùng màu mặc định sai lệch), AI sẽ tự động bị đánh trượt bài kiểm toán.
|
|
16
|
+
- **Backend / API**: Mọi API phải được viết `OpenAPI/Swagger` schema trước khi viết logic thực tế (`qk-api-lifecycle`).
|
|
17
|
+
- **Database**: Cấm truy vấn mù. Bắt buộc phải có Schema định nghĩa rõ ràng trước (`qk-data-lifecycle`).
|
|
18
|
+
|
|
19
|
+
### 3. Repair Loop (Chu trình Sửa Lỗi Khép Kín)
|
|
20
|
+
Bảo vệ mã nguồn khỏi thói quen "sửa vội" của AI. Lỗi bắt buộc phải qua chu trình điều tra nghiêm ngặt: `Observe -> Hypothesis -> Evidence -> Fix -> Verify` (`qk-bug-resolution`).
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## 🧩 Danh sách 22 Master Skills
|
|
25
|
+
|
|
26
|
+
Các kỹ năng được quản lý cực kỳ chặt chẽ với bài kiểm tra tự động (Vitest) để đảm bảo tính nhất quán của luật lệ:
|
|
27
|
+
- **Orchestration:** `qk-orchestrator`, `qk-context-loader`, `qk-policy-engine`, `qk-access-policy`
|
|
28
|
+
- **Engineering / Dev:** `qk-feature-delivery`, `qk-api-lifecycle`, `qk-data-lifecycle`, `qk-design-to-code`, `qk-ui-system-builder`
|
|
29
|
+
- **Validation & Standards:** `qk-validation-gate`, `qk-engineering-standard`, `qk-ui-audit`, `qk-project-health`, `qk-bug-resolution`
|
|
30
|
+
- **Ops & AI:** `qk-system-evolution`, `qk-production-release`, `qk-ai-builder`, `qk-project-bootstrap`
|
|
31
|
+
- **Docs & Utils:** `qk-docs`, `qk-project-memory`, `qk-help`
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## 💻 Cách Cài Đặt (Installation)
|
|
36
|
+
|
|
37
|
+
Sử dụng npm:
|
|
38
|
+
```bash
|
|
39
|
+
npm i -g ai-developer-skill-os
|
|
40
|
+
```
|
|
41
|
+
Hoặc khởi tạo thông qua `npx`:
|
|
42
|
+
```bash
|
|
43
|
+
npx ai-developer-skill-os init
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## 🧪 Testing
|
|
47
|
+
|
|
48
|
+
Hệ thống được bảo vệ bằng bộ Test Suite (Vitest) để tự động kiểm toán tính hợp lệ của toàn bộ 22 file Kỹ năng trước khi xuất bản:
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
npm test
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
## 🚀 Tra Cứu (Help)
|
|
55
|
+
|
|
56
|
+
Để tra cứu danh sách các Kỹ năng và luật lệ khắt khe của hệ thống V7, hãy gọi:
|
|
57
|
+
```bash
|
|
58
|
+
./qk-help
|
|
59
|
+
```
|
package/package.json
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "ai-developer-skill-os",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "Behavior Specification Format Framework, 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
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "ai-developer-skill-os",
|
|
3
|
+
"version": "7.0.1",
|
|
4
|
+
"description": "Behavior Specification Format Framework, 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
44
|
}
|
|
@@ -1,36 +1,39 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: qk-access-policy
|
|
3
3
|
category: security
|
|
4
|
-
version:
|
|
5
|
-
description: "Quản lý RBAC, ABAC và
|
|
4
|
+
version: 7.0.0
|
|
5
|
+
description: "Quản lý RBAC, ABAC và thiết lập ranh giới bảo mật nghiêm ngặt."
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# qk-access-policy
|
|
9
9
|
|
|
10
10
|
## Scope
|
|
11
|
-
-
|
|
11
|
+
- Role-Based and Attribute-Based Access Control configuration (Plan & Execute)
|
|
12
|
+
|
|
13
|
+
## Verbs
|
|
14
|
+
- `[CONFIGURE]`: Setup explicit role hierarchies and access lists.
|
|
12
15
|
|
|
13
16
|
## Constraints
|
|
14
17
|
```yaml
|
|
15
18
|
must:
|
|
16
|
-
-
|
|
17
|
-
-
|
|
19
|
+
- "Explicitly define roles and permissions in a Matrix"
|
|
20
|
+
- "Validate user identity before granting role-based access"
|
|
18
21
|
must_not:
|
|
19
|
-
-
|
|
22
|
+
- "Grant wildcard (*) permissions unless absolutely mandated by system architecture"
|
|
23
|
+
- "Mix authentication logic with authorization logic"
|
|
20
24
|
```
|
|
21
25
|
|
|
22
26
|
## Policies
|
|
23
27
|
```yaml
|
|
24
28
|
prefer:
|
|
25
|
-
-
|
|
29
|
+
- "Attribute-Based Access Control (ABAC) for complex business logic"
|
|
26
30
|
```
|
|
27
31
|
|
|
28
32
|
## Escalation
|
|
29
33
|
```yaml
|
|
30
34
|
stop:
|
|
31
|
-
-
|
|
35
|
+
- "Access Matrix is contradictory or undefined"
|
|
32
36
|
```
|
|
33
37
|
|
|
34
38
|
## Output
|
|
35
|
-
-
|
|
36
|
-
```
|
|
39
|
+
- RBAC/ABAC configurations and middleware.
|
|
@@ -1,38 +1,40 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: qk-ai-builder
|
|
3
|
-
category:
|
|
4
|
-
version:
|
|
5
|
-
description: "Thiết kế AI Logic, Prompts, RAG pipelines
|
|
3
|
+
category: core
|
|
4
|
+
version: 7.0.0
|
|
5
|
+
description: "Thiết kế AI Logic, Prompts, RAG pipelines với bảo mật chống Injection."
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# qk-ai-builder
|
|
9
9
|
|
|
10
10
|
## Scope
|
|
11
|
-
- AI
|
|
11
|
+
- AI integration, Prompt Engineering, and RAG architectures (Plan & Execute)
|
|
12
|
+
|
|
13
|
+
## Verbs
|
|
14
|
+
- `[PROMPT]`: Design strict and deterministic prompts.
|
|
12
15
|
|
|
13
16
|
## Constraints
|
|
14
17
|
```yaml
|
|
15
18
|
must:
|
|
16
|
-
-
|
|
17
|
-
-
|
|
19
|
+
- "Include explicit constraints and negative constraints (must_not) in all prompts"
|
|
20
|
+
- "Sanitize user inputs before feeding them to LLMs (Anti-Injection)"
|
|
18
21
|
must_not:
|
|
19
|
-
-
|
|
20
|
-
-
|
|
22
|
+
- "Create open-ended 'chat' prompts without strict system boundaries"
|
|
23
|
+
- "Trust LLM output for critical logic without a validation step"
|
|
21
24
|
```
|
|
22
25
|
|
|
23
26
|
## Policies
|
|
24
27
|
```yaml
|
|
25
28
|
prefer:
|
|
26
|
-
-
|
|
27
|
-
-
|
|
29
|
+
- "Few-shot prompting with clear examples"
|
|
30
|
+
- "Structured output (JSON) over raw text for API interactions"
|
|
28
31
|
```
|
|
29
32
|
|
|
30
33
|
## Escalation
|
|
31
34
|
```yaml
|
|
32
35
|
stop:
|
|
33
|
-
-
|
|
36
|
+
- "Prompt architecture lacks validation or security boundaries"
|
|
34
37
|
```
|
|
35
38
|
|
|
36
39
|
## Output
|
|
37
|
-
- Prompts, pipelines,
|
|
38
|
-
```
|
|
40
|
+
- Prompts, RAG pipelines, and AI integration logic.
|
|
@@ -1,39 +1,46 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: qk-api-lifecycle
|
|
3
3
|
category: fullstack
|
|
4
|
-
version:
|
|
5
|
-
description: "Thiết kế, triển khai, và tích hợp các API endpoints."
|
|
4
|
+
version: 7.0.0
|
|
5
|
+
description: "Thiết kế, triển khai, và tích hợp các API endpoints với kỷ luật Zero-Trust."
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# qk-api-lifecycle
|
|
9
9
|
|
|
10
10
|
## Scope
|
|
11
11
|
- API design, endpoints, contracts, and lifecycle management (Plan & Execute)
|
|
12
|
+
- Zero-Trust validation of API schemas.
|
|
13
|
+
|
|
14
|
+
## Verbs
|
|
15
|
+
- `[DEFINE]`: Create strict API contracts before implementation.
|
|
16
|
+
- `[IMPLEMENT]`: Build endpoints strictly adhering to the defined contract.
|
|
12
17
|
|
|
13
18
|
## Constraints
|
|
14
19
|
```yaml
|
|
15
20
|
must:
|
|
16
|
-
- Define clear request/response contracts (OpenAPI/Swagger)
|
|
17
|
-
- Ensure backward compatibility on existing endpoints
|
|
21
|
+
- "Define clear request/response contracts (OpenAPI/Swagger) BEFORE coding"
|
|
22
|
+
- "Ensure backward compatibility on existing endpoints"
|
|
23
|
+
- "Validate all incoming data against the strict schema"
|
|
18
24
|
must_not:
|
|
19
|
-
- Introduce breaking changes without versioning
|
|
20
|
-
- Bypass authentication or authorization checks
|
|
25
|
+
- "Introduce breaking changes without versioning"
|
|
26
|
+
- "Bypass authentication or authorization checks"
|
|
27
|
+
- "Hallucinate or guess external API shapes without evidence"
|
|
21
28
|
```
|
|
22
29
|
|
|
23
30
|
## Policies
|
|
24
31
|
```yaml
|
|
25
32
|
prefer:
|
|
26
|
-
- RESTful resource naming conventions
|
|
27
|
-
- Meaningful HTTP status codes
|
|
33
|
+
- "RESTful resource naming conventions"
|
|
34
|
+
- "Meaningful HTTP status codes"
|
|
35
|
+
- "Strict type-checking and validation over loose parsing"
|
|
28
36
|
```
|
|
29
37
|
|
|
30
38
|
## Escalation
|
|
31
39
|
```yaml
|
|
32
40
|
stop:
|
|
33
|
-
- Required API contracts or models are missing
|
|
34
|
-
- Major breaking change detected on production APIs
|
|
41
|
+
- "Required API contracts or models are missing"
|
|
42
|
+
- "Major breaking change detected on production APIs"
|
|
35
43
|
```
|
|
36
44
|
|
|
37
45
|
## Output
|
|
38
|
-
- API endpoints, controllers, and documentation
|
|
39
|
-
```
|
|
46
|
+
- API endpoints, controllers, and strict documentation.
|
|
@@ -1,40 +1,46 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: qk-bug-resolution
|
|
3
3
|
category: maintenance
|
|
4
|
-
version:
|
|
5
|
-
description: "
|
|
4
|
+
version: 7.0.0
|
|
5
|
+
description: "Sửa lỗi (bugs) bằng chu trình khép kín: Quan sát -> Giả thuyết -> Bằng chứng -> Sửa."
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# qk-bug-resolution
|
|
9
9
|
|
|
10
10
|
## Scope
|
|
11
|
-
- Existing defects only (Diagnose)
|
|
11
|
+
- Existing defects only (Diagnose & Repair)
|
|
12
|
+
- Enforcing the strict Repair Loop.
|
|
13
|
+
|
|
14
|
+
## Verbs
|
|
15
|
+
- `[DIAGNOSE]`: Follow the `Observe -> Hypothesis -> Evidence` loop.
|
|
16
|
+
- `[REPAIR]`: Execute the fix only when confidence is high.
|
|
12
17
|
|
|
13
18
|
## Constraints
|
|
14
19
|
```yaml
|
|
15
20
|
must:
|
|
16
|
-
-
|
|
17
|
-
-
|
|
21
|
+
- "Strictly follow the Repair Loop: Observe -> Hypothesis -> Evidence -> Fix -> Verify -> Done"
|
|
22
|
+
- "Collect evidence (stack trace/logs/dependency graph) before diagnosis"
|
|
23
|
+
- "Verify fix before completion"
|
|
18
24
|
must_not:
|
|
19
|
-
-
|
|
20
|
-
-
|
|
25
|
+
- "Jump directly from Observe to Fix (No slop debugging)"
|
|
26
|
+
- "Rewrite modules unnecessarily"
|
|
27
|
+
- "Guess root cause without concrete evidence"
|
|
21
28
|
```
|
|
22
29
|
|
|
23
30
|
## Policies
|
|
24
31
|
```yaml
|
|
25
32
|
prefer:
|
|
26
|
-
- Minimal patch
|
|
27
|
-
-
|
|
33
|
+
- "Minimal patch"
|
|
34
|
+
- "Root cause resolution over symptom patching"
|
|
35
|
+
- "Regression prevention via targeted tests"
|
|
28
36
|
```
|
|
29
37
|
|
|
30
38
|
## Escalation
|
|
31
39
|
```yaml
|
|
32
40
|
stop:
|
|
33
|
-
- Missing logs/evidence
|
|
34
|
-
- Fix requires major architectural changes
|
|
41
|
+
- "Missing logs/evidence after 2 attempts to gather them"
|
|
42
|
+
- "Fix requires major architectural changes"
|
|
35
43
|
```
|
|
36
44
|
|
|
37
45
|
## Output
|
|
38
|
-
- Minimal patch
|
|
39
|
-
- Risk summary
|
|
40
|
-
```
|
|
46
|
+
- Minimal patch and Risk summary.
|
|
@@ -1,37 +1,43 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: qk-context-loader
|
|
3
3
|
category: utilities
|
|
4
|
-
version:
|
|
5
|
-
description: "Tải các file liên quan và vẽ biểu đồ phụ thuộc (dependency graph)
|
|
4
|
+
version: 7.0.0
|
|
5
|
+
description: "Tải các file liên quan và vẽ biểu đồ phụ thuộc (dependency graph) khắt khe trước khi code."
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# qk-context-loader
|
|
9
9
|
|
|
10
10
|
## Scope
|
|
11
|
-
- Context collection and dependency mapping (Collect)
|
|
11
|
+
- Context collection and structural dependency mapping (Collect)
|
|
12
|
+
- Implementing Understand Anything's "Graphing" philosophy to prevent hallucination.
|
|
13
|
+
|
|
14
|
+
## Verbs
|
|
15
|
+
- `[MAP]`: Analyze file relationships and generate a topological graph or tree map of the domain logic.
|
|
12
16
|
|
|
13
17
|
## Constraints
|
|
14
18
|
```yaml
|
|
15
19
|
must:
|
|
16
|
-
-
|
|
20
|
+
- Generate a Structural Map (Dependency Graph) BEFORE attempting to solve complex tasks.
|
|
21
|
+
- Find and load related dependency files based strictly on the map.
|
|
17
22
|
must_not:
|
|
18
23
|
- Modify code
|
|
19
24
|
- Load entire repo or node_modules
|
|
20
|
-
-
|
|
25
|
+
- Guess or hallucinate filenames or API shapes.
|
|
26
|
+
- Skip the graphing phase for business logic tasks.
|
|
21
27
|
```
|
|
22
28
|
|
|
23
29
|
## Policies
|
|
24
30
|
```yaml
|
|
25
31
|
prefer:
|
|
26
|
-
-
|
|
32
|
+
- Deterministic tracing (following imports/exports) over semantic guessing.
|
|
27
33
|
```
|
|
28
34
|
|
|
29
35
|
## Escalation
|
|
30
36
|
```yaml
|
|
31
37
|
stop:
|
|
32
38
|
- Repo or files are inaccessible
|
|
39
|
+
- Cannot determine the architectural structure (Context overflow)
|
|
33
40
|
```
|
|
34
41
|
|
|
35
42
|
## Output
|
|
36
|
-
- Context
|
|
37
|
-
```
|
|
43
|
+
- Explicit JSON or Markdown Topological Graph of Context
|
|
@@ -1,36 +1,44 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: qk-data-lifecycle
|
|
3
|
-
category:
|
|
4
|
-
version:
|
|
5
|
-
description: "Quản lý Database Schema, Migrations, và Repositories."
|
|
3
|
+
category: backend
|
|
4
|
+
version: 7.0.0
|
|
5
|
+
description: "Quản lý Database Schema, Migrations, và Repositories khắt khe với Zero-Trust."
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# qk-data-lifecycle
|
|
9
9
|
|
|
10
10
|
## Scope
|
|
11
|
-
- Database Schema, Migrations, and Repositories
|
|
11
|
+
- Database Schema management, Migrations, and Repositories (Plan & Execute)
|
|
12
|
+
- Enforcing structural database contracts before implementation.
|
|
13
|
+
|
|
14
|
+
## Verbs
|
|
15
|
+
- `[SCHEMA]`: Define database tables/models explicitly.
|
|
16
|
+
- `[MIGRATE]`: Safely manage state changes.
|
|
12
17
|
|
|
13
18
|
## Constraints
|
|
14
19
|
```yaml
|
|
15
20
|
must:
|
|
16
|
-
-
|
|
17
|
-
-
|
|
21
|
+
- "MUST define explicitly strict database schemas (e.g., Prisma/TypeORM) before writing repository code"
|
|
22
|
+
- "Enforce strict types for all database operations"
|
|
18
23
|
must_not:
|
|
19
|
-
-
|
|
24
|
+
- "Create dynamic queries without schema definitions"
|
|
25
|
+
- "Delete or drop columns without a deprecation phase"
|
|
26
|
+
- "Write complex business logic inside repository files"
|
|
20
27
|
```
|
|
21
28
|
|
|
22
29
|
## Policies
|
|
23
30
|
```yaml
|
|
24
31
|
prefer:
|
|
25
|
-
-
|
|
32
|
+
- "Separation of concerns (Repositories handle data, Services handle logic)"
|
|
33
|
+
- "Transactions for multi-table updates"
|
|
26
34
|
```
|
|
27
35
|
|
|
28
36
|
## Escalation
|
|
29
37
|
```yaml
|
|
30
38
|
stop:
|
|
31
|
-
-
|
|
39
|
+
- "Missing database schema or ORM models"
|
|
40
|
+
- "Attempting destructive migrations on production"
|
|
32
41
|
```
|
|
33
42
|
|
|
34
43
|
## Output
|
|
35
|
-
-
|
|
36
|
-
```
|
|
44
|
+
- ORM Schema, Repositories, and Migration files.
|