ai-developer-skill-os 5.0.0 → 6.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/README.md +10 -10
- package/_template/BEHAVIOR_SPEC.md +96 -0
- package/docs/GOVERNANCE.md +1 -1
- package/fix_seeds.js +22 -0
- package/framework/KERNEL.md +65 -40
- package/framework/decision-primitives.md +47 -0
- package/migrate-to-v6.js +130 -0
- package/migrate.js +147 -0
- package/migrate.py +133 -0
- package/migrate_all.cjs +96 -0
- package/package.json +2 -2
- package/skills/qk-access-policy/SKILL.md +18 -40
- package/skills/qk-ai-builder/SKILL.md +20 -40
- package/skills/qk-api-lifecycle/SKILL.md +22 -41
- package/skills/qk-bug-resolution/SKILL.md +22 -40
- package/skills/qk-context-loader/SKILL.md +19 -39
- package/skills/qk-data-lifecycle/SKILL.md +19 -40
- package/skills/qk-db-optimizer/SKILL.md +19 -40
- package/skills/qk-design-to-code/SKILL.md +20 -41
- package/skills/qk-docs/SKILL.md +20 -40
- package/skills/qk-engineering-standard/SKILL.md +21 -40
- package/skills/qk-feature-delivery/SKILL.md +22 -40
- package/skills/qk-help/SKILL.md +18 -36
- package/skills/qk-orchestrator/SKILL.md +18 -41
- package/skills/qk-policy-engine/SKILL.md +18 -38
- package/skills/qk-production-release/SKILL.md +18 -39
- package/skills/qk-project-bootstrap/SKILL.md +20 -41
- package/skills/qk-project-health/SKILL.md +20 -40
- package/skills/qk-project-memory/SKILL.md +19 -40
- package/skills/qk-system-evolution/SKILL.md +19 -40
- package/skills/qk-ui-audit/SKILL.md +19 -41
- package/skills/qk-ui-system-builder/SKILL.md +18 -39
- package/skills/qk-validation-gate/SKILL.md +20 -38
- package/specs/contracts/behavior-contract.yaml +40 -0
- package/specs/expectations/qk-bug-resolution.yaml +35 -0
- package/specs/scenarios/fix-login-nullref.yaml +3 -0
- package/tests/behavior-conformance.test.js +151 -0
- package/_template/SKILL.md +0 -58
- package/tests/spec-compliance.test.js +0 -193
package/migrate.py
ADDED
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import re
|
|
3
|
+
|
|
4
|
+
skills_dir = os.path.join(os.getcwd(), 'skills')
|
|
5
|
+
|
|
6
|
+
def migrate_skill(skill_dir):
|
|
7
|
+
file_path = os.path.join(skills_dir, skill_dir, 'SKILL.md')
|
|
8
|
+
if not os.path.exists(file_path): return
|
|
9
|
+
if skill_dir in ['qk-bug-resolution', 'qk-access-policy']: return
|
|
10
|
+
|
|
11
|
+
with open(file_path, 'r', encoding='utf-8') as f:
|
|
12
|
+
content = f.read()
|
|
13
|
+
|
|
14
|
+
fm_match = re.search(r'^---\n(.*?)\n---', content, re.DOTALL)
|
|
15
|
+
if not fm_match: return
|
|
16
|
+
frontmatter = fm_match.group(1)
|
|
17
|
+
|
|
18
|
+
valid_fields = []
|
|
19
|
+
for line in frontmatter.split('\n'):
|
|
20
|
+
if not any(line.startswith(prefix) for prefix in ['behavior:', 'intent:', 'priority:', 'trigger:', 'inputs:', 'outputs:', 'allowed_tools:', 'pipeline:']):
|
|
21
|
+
valid_fields.append(line.replace('v5.0', 'v6.0'))
|
|
22
|
+
|
|
23
|
+
new_fm = '---\n' + '\n'.join(valid_fields) + '\n---'
|
|
24
|
+
|
|
25
|
+
mission = f'Th?c thi nhi?m v? c?t l�i c?a {skill_dir}'
|
|
26
|
+
limitation = 'Kh�ng vi ph?m Invariants c?a h? th?ng.'
|
|
27
|
+
|
|
28
|
+
mission_section = re.search(r'## .*?Mission \(Scope\)(.*?)(?=## |---|$)', content, re.DOTALL)
|
|
29
|
+
if mission_section:
|
|
30
|
+
lines = mission_section.group(1).split('\n')
|
|
31
|
+
pos = [l.split('- ?')[-1].strip() for l in lines if '- ?' in l]
|
|
32
|
+
neg = [l.split('- ?')[-1].strip() for l in lines if '- ?' in l]
|
|
33
|
+
if pos: mission = ' '.join(pos)
|
|
34
|
+
if neg: limitation = ' '.join(neg)
|
|
35
|
+
|
|
36
|
+
biases_match = re.search(r'Biases:(.*?)(?=---|$)', content, re.DOTALL)
|
|
37
|
+
refuses = []
|
|
38
|
+
if biases_match:
|
|
39
|
+
refuses = [l.replace('- id:', '').strip() for l in biases_match.group(1).split('\n') if '- id:' in l]
|
|
40
|
+
|
|
41
|
+
dials_match = re.search(r'Dials:(.*?)(?=---|$)', content, re.DOTALL)
|
|
42
|
+
asks = []
|
|
43
|
+
if dials_match:
|
|
44
|
+
asks = [l.replace('- id:', '').strip() for l in dials_match.group(1).split('\n') if '- id:' in l]
|
|
45
|
+
|
|
46
|
+
must_ask = ', '.join(asks) if asks else 'Y�u c?u m?p m?, thi?u th�ng tin.'
|
|
47
|
+
must_refuse = ', '.join(refuses) if refuses else 'R?i ro b?o m?t, ph� v? ki?n tr�c.'
|
|
48
|
+
|
|
49
|
+
bsf_content = f'''{new_fm}
|
|
50
|
+
|
|
51
|
+
# ?? Behavior Specification: {skill_dir}
|
|
52
|
+
|
|
53
|
+
## 1. Behavior (�?nh danh H�nh vi)
|
|
54
|
+
`yaml
|
|
55
|
+
Mission: "{mission.replace('"', "'")}"
|
|
56
|
+
Authority: "�u?c quy?n th?c thi c�c t�c v? trong ph?m vi {skill_dir}."
|
|
57
|
+
Responsibility: "B?o d?m ch?t lu?ng d?u ra v� tu�n th? chu?n h? th?ng."
|
|
58
|
+
Limitation: "{limitation.replace('"', "'")}"
|
|
59
|
+
`
|
|
60
|
+
|
|
61
|
+
## 2. Contracts (H?p d?ng)
|
|
62
|
+
|
|
63
|
+
### 2.1. Capability Contract
|
|
64
|
+
`yaml
|
|
65
|
+
Can:
|
|
66
|
+
- read_code
|
|
67
|
+
- execute_tests
|
|
68
|
+
- modify_code
|
|
69
|
+
Must:
|
|
70
|
+
- verify_assumptions_before_coding
|
|
71
|
+
Cannot:
|
|
72
|
+
- execute_destructive_commands
|
|
73
|
+
- bypass_validation
|
|
74
|
+
`
|
|
75
|
+
|
|
76
|
+
### 2.2. Output Contract
|
|
77
|
+
`yaml
|
|
78
|
+
Artifacts:
|
|
79
|
+
- summary_report: "Decision Summary gi?i th�ch Context, Quy?t d?nh v� Trade-offs."
|
|
80
|
+
Completion: "Nhi?m v? ho�n th�nh & Quality Gates passed."
|
|
81
|
+
`
|
|
82
|
+
|
|
83
|
+
## 3. Policies (Ch�nh s�ch)
|
|
84
|
+
|
|
85
|
+
### 3.1. Context Policy
|
|
86
|
+
`yaml
|
|
87
|
+
Scope: current_repo
|
|
88
|
+
Priority:
|
|
89
|
+
1: Project Docs
|
|
90
|
+
2: Current Conversation
|
|
91
|
+
3: Source Code
|
|
92
|
+
Trust: "official docs > code > assumptions"
|
|
93
|
+
Fallback: ask_user
|
|
94
|
+
`
|
|
95
|
+
|
|
96
|
+
### 3.2. Reasoning Boundary
|
|
97
|
+
`yaml
|
|
98
|
+
May infer: "Bi?n s? c?c b?, logic n?i b? kh�ng ?nh hu?ng h? th?ng."
|
|
99
|
+
Must verify: "T�c d?ng d?n c�c module kh�c."
|
|
100
|
+
Must ask: "{must_ask.replace('"', "'")}"
|
|
101
|
+
Must refuse: "{must_refuse.replace('"', "'")}"
|
|
102
|
+
`
|
|
103
|
+
|
|
104
|
+
### 3.3. Decision Policy
|
|
105
|
+
`yaml
|
|
106
|
+
Priority:
|
|
107
|
+
1: correctness
|
|
108
|
+
2: safety
|
|
109
|
+
3: maintainability
|
|
110
|
+
4: performance
|
|
111
|
+
`
|
|
112
|
+
|
|
113
|
+
### 3.4. Evidence Policy
|
|
114
|
+
`yaml
|
|
115
|
+
Accept: [logs, unit tests, official docs]
|
|
116
|
+
Prefer: [unit tests, CI results]
|
|
117
|
+
Reject: [guesswork, outdated internet search]
|
|
118
|
+
`
|
|
119
|
+
|
|
120
|
+
### 3.5. Escalation Policy
|
|
121
|
+
`yaml
|
|
122
|
+
Warning: "Thay d?i c?u tr�c ho?c public API"
|
|
123
|
+
Confirmation: "Override config ho?c x�a file quan tr?ng"
|
|
124
|
+
Stop: "L?i Permission ho?c xung d?t Invariants"
|
|
125
|
+
`
|
|
126
|
+
'''
|
|
127
|
+
with open(file_path, 'w', encoding='utf-8') as f:
|
|
128
|
+
f.write(bsf_content)
|
|
129
|
+
print(f'Migrated {skill_dir}')
|
|
130
|
+
|
|
131
|
+
for d in os.listdir(skills_dir):
|
|
132
|
+
if os.path.isdir(os.path.join(skills_dir, d)) and not d.startswith('_'):
|
|
133
|
+
migrate_skill(d)
|
package/migrate_all.cjs
ADDED
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
const fs = require('fs');
|
|
2
|
+
const path = require('path');
|
|
3
|
+
const skillsDir = path.join(__dirname, 'skills');
|
|
4
|
+
|
|
5
|
+
const template = `---
|
|
6
|
+
name: {NAME}
|
|
7
|
+
version: 6.0.0
|
|
8
|
+
updated: 2026-07-10
|
|
9
|
+
description: Behavior Specification for {NAME} in BSF v6.0 format.
|
|
10
|
+
category: orchestration
|
|
11
|
+
tags: [bsf, v6]
|
|
12
|
+
platforms: [claude-code, cursor, windsurf, gemini-cli]
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
# Behavior Specification: {NAME}
|
|
16
|
+
|
|
17
|
+
## 1. Behavior
|
|
18
|
+
\`\`\`yaml
|
|
19
|
+
Mission: "Execute core tasks for {NAME}."
|
|
20
|
+
Authority: "Full authority within the scope of {NAME}."
|
|
21
|
+
Responsibility: "Ensure the system complies with v6 standards."
|
|
22
|
+
Limitation: "Do not violate System Invariants."
|
|
23
|
+
\`\`\`
|
|
24
|
+
|
|
25
|
+
## 2. Contracts
|
|
26
|
+
|
|
27
|
+
### 2.1. Capability Contract
|
|
28
|
+
\`\`\`yaml
|
|
29
|
+
Can:
|
|
30
|
+
- read_code
|
|
31
|
+
- modify_code
|
|
32
|
+
Must:
|
|
33
|
+
- verify_assumptions_before_coding
|
|
34
|
+
Cannot:
|
|
35
|
+
- bypass_validation
|
|
36
|
+
\`\`\`
|
|
37
|
+
|
|
38
|
+
### 2.2. Output Contract
|
|
39
|
+
\`\`\`yaml
|
|
40
|
+
Artifacts:
|
|
41
|
+
- summary_report: "Progress and decision report."
|
|
42
|
+
Completion: "Feature works & Quality Gates passed."
|
|
43
|
+
\`\`\`
|
|
44
|
+
|
|
45
|
+
## 3. Policies
|
|
46
|
+
|
|
47
|
+
### 3.1. Context Policy
|
|
48
|
+
\`\`\`yaml
|
|
49
|
+
Scope: whole_workspace
|
|
50
|
+
Priority:
|
|
51
|
+
1: Project Guidelines
|
|
52
|
+
2: Current Code
|
|
53
|
+
Trust: "official docs > code > user assumptions"
|
|
54
|
+
Fallback: ask_user
|
|
55
|
+
\`\`\`
|
|
56
|
+
|
|
57
|
+
### 3.2. Reasoning Boundary
|
|
58
|
+
\`\`\`yaml
|
|
59
|
+
May infer: "Local variables and obvious logic."
|
|
60
|
+
Must verify: "Cross-module impacts."
|
|
61
|
+
Must ask: "Vague requirements, missing context."
|
|
62
|
+
Must refuse: "Security risks, baseless guesses."
|
|
63
|
+
\`\`\`
|
|
64
|
+
|
|
65
|
+
### 3.3. Decision Policy
|
|
66
|
+
\`\`\`yaml
|
|
67
|
+
Priority:
|
|
68
|
+
1: correctness
|
|
69
|
+
2: safety
|
|
70
|
+
3: maintainability
|
|
71
|
+
\`\`\`
|
|
72
|
+
|
|
73
|
+
### 3.4. Evidence Policy
|
|
74
|
+
\`\`\`yaml
|
|
75
|
+
Accept: [unit tests, CI logs]
|
|
76
|
+
Prefer: [end-to-end tests]
|
|
77
|
+
Reject: [guesswork]
|
|
78
|
+
\`\`\`
|
|
79
|
+
|
|
80
|
+
### 3.5. Escalation Policy
|
|
81
|
+
\`\`\`yaml
|
|
82
|
+
Warning: "Changing task scope."
|
|
83
|
+
Confirmation: "Overriding config or deleting files."
|
|
84
|
+
Stop: "Critical security error."
|
|
85
|
+
\`\`\`
|
|
86
|
+
`;
|
|
87
|
+
|
|
88
|
+
const dirs = fs.readdirSync(skillsDir);
|
|
89
|
+
for (const dir of dirs) {
|
|
90
|
+
if (dir.startsWith('_') || dir === 'qk-bug-resolution' || dir === 'qk-access-policy') continue;
|
|
91
|
+
const p = path.join(skillsDir, dir, 'SKILL.md');
|
|
92
|
+
if (fs.existsSync(p)) {
|
|
93
|
+
fs.writeFileSync(p, template.replace(/{NAME}/g, dir), 'utf8');
|
|
94
|
+
console.log('Updated ' + dir);
|
|
95
|
+
}
|
|
96
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ai-developer-skill-os",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "6.0.1",
|
|
4
|
+
"description": "Behavior Specification Format Framework, AI coding agents (Claude, Cursor, Windsurf, Antigravity) với 23 skills chuyên nghiệp.",
|
|
5
5
|
"main": "bin/install.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"ai-developer-skill-os": "bin/install.js",
|
|
@@ -1,57 +1,35 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: qk-access-policy
|
|
3
|
-
version: 5.0.0
|
|
4
|
-
updated: 2026-07-03
|
|
5
|
-
description: Quản lý RBAC, ABAC và các ranh giới bảo mật.
|
|
6
3
|
category: security
|
|
7
|
-
|
|
8
|
-
platforms: [claude-code, cursor, windsurf, gemini-cli]
|
|
4
|
+
version: 6.0.0
|
|
9
5
|
---
|
|
10
6
|
|
|
11
|
-
#
|
|
7
|
+
# qk-access-policy
|
|
12
8
|
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
## Scope
|
|
10
|
+
- Security boundaries and policies (Govern)
|
|
15
11
|
|
|
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).
|
|
21
|
-
|
|
22
|
-
---
|
|
23
|
-
|
|
24
|
-
## ⚙️ Capabilities (Cognitive Pipeline)
|
|
12
|
+
## Constraints
|
|
25
13
|
```yaml
|
|
26
|
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
|
|
30
|
-
-
|
|
31
|
-
- ship-check
|
|
14
|
+
must:
|
|
15
|
+
- Enforce access controls at API level
|
|
16
|
+
- Check security rules
|
|
17
|
+
must_not:
|
|
18
|
+
- Rely on UI-only security
|
|
32
19
|
```
|
|
33
20
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
## 🎛️ Dials (Hành vi)
|
|
21
|
+
## Policies
|
|
37
22
|
```yaml
|
|
38
|
-
|
|
39
|
-
-
|
|
40
|
-
- id: strictness
|
|
23
|
+
prefer:
|
|
24
|
+
- Deny-by-default
|
|
41
25
|
```
|
|
42
26
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
## 🛡️ Biases (Sửa lỗi mặc định)
|
|
27
|
+
## Escalation
|
|
46
28
|
```yaml
|
|
47
|
-
|
|
48
|
-
-
|
|
29
|
+
stop:
|
|
30
|
+
- Policy is missing or ambiguous
|
|
49
31
|
```
|
|
50
32
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
## 🛫 Ship Criteria
|
|
54
|
-
```yaml
|
|
55
|
-
Rules:
|
|
56
|
-
- id: end-to-end-validation
|
|
33
|
+
## Output
|
|
34
|
+
- Policy enforcement decision
|
|
57
35
|
```
|
|
@@ -1,57 +1,37 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: qk-ai-builder
|
|
3
|
-
version: 5.0.0
|
|
4
|
-
updated: 2026-07-03
|
|
5
|
-
description: Thiết kế AI Logic, Prompts, RAG pipelines, và các Agents.
|
|
6
3
|
category: ai
|
|
7
|
-
|
|
8
|
-
platforms: [claude-code, cursor, windsurf, gemini-cli]
|
|
4
|
+
version: 6.0.0
|
|
9
5
|
---
|
|
10
6
|
|
|
11
|
-
#
|
|
7
|
+
# qk-ai-builder
|
|
12
8
|
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
## Scope
|
|
10
|
+
- AI logic, prompts, RAG pipelines, and Agents (Plan & Execute)
|
|
15
11
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
## 🎯 Mission (Scope)
|
|
19
|
-
- ✅ Xây dựng luồng AI/LLM, viết Prompts chuyên nghiệp.
|
|
20
|
-
- ❌ Do NOT dùng LLM để thay thế các logic cứng có thể giải quyết bằng Code (như tính toán).
|
|
21
|
-
|
|
22
|
-
---
|
|
23
|
-
|
|
24
|
-
## ⚙️ Capabilities (Cognitive Pipeline)
|
|
12
|
+
## Constraints
|
|
25
13
|
```yaml
|
|
26
|
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
|
|
30
|
-
-
|
|
31
|
-
-
|
|
14
|
+
must:
|
|
15
|
+
- Validate prompt changes against actual model outputs
|
|
16
|
+
- Handle API rate limits and failures gracefully
|
|
17
|
+
must_not:
|
|
18
|
+
- Use LLMs for deterministic logic (e.g. math, exact matching)
|
|
19
|
+
- Fabricate non-existent models or APIs
|
|
32
20
|
```
|
|
33
21
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
## 🎛️ Dials (Hành vi)
|
|
22
|
+
## Policies
|
|
37
23
|
```yaml
|
|
38
|
-
|
|
39
|
-
-
|
|
24
|
+
prefer:
|
|
25
|
+
- System prompts over user prompts for constraints
|
|
26
|
+
- Few-shot examples over complex instructions
|
|
40
27
|
```
|
|
41
28
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
## 🛡️ Biases (Sửa lỗi mặc định)
|
|
29
|
+
## Escalation
|
|
45
30
|
```yaml
|
|
46
|
-
|
|
47
|
-
-
|
|
48
|
-
- id: hallucinated-tools # (Tự bịa model không tồn tại)
|
|
31
|
+
stop:
|
|
32
|
+
- Model context window limits are exceeded
|
|
49
33
|
```
|
|
50
34
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
## 🛫 Ship Criteria
|
|
54
|
-
```yaml
|
|
55
|
-
Rules:
|
|
56
|
-
- id: end-to-end-validation
|
|
35
|
+
## Output
|
|
36
|
+
- Prompts, pipelines, or Agent configuration
|
|
57
37
|
```
|
|
@@ -1,57 +1,38 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: qk-api-lifecycle
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
description: Thiết kế, triển khai, và tích hợp các API endpoints.
|
|
6
|
-
category: backend
|
|
7
|
-
tags: [api, rest, graphql, integration]
|
|
8
|
-
platforms: [claude-code, cursor, windsurf, gemini-cli]
|
|
3
|
+
category: fullstack
|
|
4
|
+
version: 6.0.0
|
|
9
5
|
---
|
|
10
6
|
|
|
11
|
-
#
|
|
7
|
+
# qk-api-lifecycle
|
|
12
8
|
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
## Scope
|
|
10
|
+
- API design, endpoints, contracts, and lifecycle management (Plan & Execute)
|
|
15
11
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
## 🎯 Mission (Scope)
|
|
19
|
-
- ✅ Thiết kế RESTful hoặc GraphQL API chuẩn mực.
|
|
20
|
-
- ❌ Do NOT trả về mã `200 OK` cho các response bị lỗi `error: true`.
|
|
21
|
-
|
|
22
|
-
---
|
|
23
|
-
|
|
24
|
-
## ⚙️ Capabilities (Cognitive Pipeline)
|
|
12
|
+
## Constraints
|
|
25
13
|
```yaml
|
|
26
|
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
|
|
30
|
-
-
|
|
31
|
-
-
|
|
14
|
+
must:
|
|
15
|
+
- Define clear request/response contracts (OpenAPI/Swagger)
|
|
16
|
+
- Ensure backward compatibility on existing endpoints
|
|
17
|
+
must_not:
|
|
18
|
+
- Introduce breaking changes without versioning
|
|
19
|
+
- Bypass authentication or authorization checks
|
|
32
20
|
```
|
|
33
21
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
## 🎛️ Dials (Hành vi)
|
|
22
|
+
## Policies
|
|
37
23
|
```yaml
|
|
38
|
-
|
|
39
|
-
-
|
|
24
|
+
prefer:
|
|
25
|
+
- RESTful resource naming conventions
|
|
26
|
+
- Meaningful HTTP status codes
|
|
40
27
|
```
|
|
41
28
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
## 🛡️ Biases (Sửa lỗi mặc định)
|
|
29
|
+
## Escalation
|
|
45
30
|
```yaml
|
|
46
|
-
|
|
47
|
-
-
|
|
48
|
-
-
|
|
31
|
+
stop:
|
|
32
|
+
- Required API contracts or models are missing
|
|
33
|
+
- Major breaking change detected on production APIs
|
|
49
34
|
```
|
|
50
35
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
## 🛫 Ship Criteria
|
|
54
|
-
```yaml
|
|
55
|
-
Rules:
|
|
56
|
-
- id: minimal-diff
|
|
36
|
+
## Output
|
|
37
|
+
- API endpoints, controllers, and documentation
|
|
57
38
|
```
|
|
@@ -1,57 +1,39 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: qk-bug-resolution
|
|
3
|
-
version: 5.0.0
|
|
4
|
-
updated: 2026-07-03
|
|
5
|
-
description: Xử lý và sửa các lỗi (bugs), đồng thời ngăn ngừa lỗi hồi quy.
|
|
6
3
|
category: maintenance
|
|
7
|
-
|
|
8
|
-
platforms: [claude-code, cursor, windsurf, gemini-cli]
|
|
4
|
+
version: 6.0.0
|
|
9
5
|
---
|
|
10
6
|
|
|
11
|
-
#
|
|
7
|
+
# qk-bug-resolution
|
|
12
8
|
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
## Scope
|
|
10
|
+
- Existing defects only (Diagnose)
|
|
15
11
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
## 🎯 Mission (Scope)
|
|
19
|
-
- ✅ Tìm ra nguyên nhân gốc rễ (root cause) và sửa lỗi.
|
|
20
|
-
- ❌ Do NOT viết lại (rewrite) toàn bộ file thay vì sửa đúng dòng gây lỗi (The Rewrite Trap).
|
|
21
|
-
|
|
22
|
-
---
|
|
23
|
-
|
|
24
|
-
## ⚙️ Capabilities (Cognitive Pipeline)
|
|
12
|
+
## Constraints
|
|
25
13
|
```yaml
|
|
26
|
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
|
|
30
|
-
-
|
|
31
|
-
-
|
|
14
|
+
must:
|
|
15
|
+
- Collect evidence (stack trace/logs) before diagnosis
|
|
16
|
+
- Verify fix before completion
|
|
17
|
+
must_not:
|
|
18
|
+
- Rewrite modules
|
|
19
|
+
- Guess root cause without evidence
|
|
32
20
|
```
|
|
33
21
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
## 🎛️ Dials (Hành vi)
|
|
22
|
+
## Policies
|
|
37
23
|
```yaml
|
|
38
|
-
|
|
39
|
-
-
|
|
24
|
+
prefer:
|
|
25
|
+
- Minimal patch
|
|
26
|
+
- Regression prevention
|
|
40
27
|
```
|
|
41
28
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
## 🛡️ Biases (Sửa lỗi mặc định)
|
|
29
|
+
## Escalation
|
|
45
30
|
```yaml
|
|
46
|
-
|
|
47
|
-
-
|
|
48
|
-
-
|
|
31
|
+
stop:
|
|
32
|
+
- Missing logs/evidence
|
|
33
|
+
- Fix requires major architectural changes
|
|
49
34
|
```
|
|
50
35
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
```yaml
|
|
55
|
-
Rules:
|
|
56
|
-
- id: minimal-diff # (Chỉ sửa dòng cần sửa)
|
|
36
|
+
## Output
|
|
37
|
+
- Minimal patch
|
|
38
|
+
- Risk summary
|
|
57
39
|
```
|
|
@@ -1,56 +1,36 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: qk-context-loader
|
|
3
|
-
version: 5.0.0
|
|
4
|
-
updated: 2026-07-03
|
|
5
|
-
description: Tải các file liên quan và vẽ biểu đồ phụ thuộc (dependency graph) cho một tác vụ.
|
|
6
3
|
category: utilities
|
|
7
|
-
|
|
8
|
-
platforms: [claude-code, cursor, windsurf, gemini-cli]
|
|
4
|
+
version: 6.0.0
|
|
9
5
|
---
|
|
10
6
|
|
|
11
|
-
#
|
|
7
|
+
# qk-context-loader
|
|
12
8
|
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
## Scope
|
|
10
|
+
- Context collection and dependency mapping (Collect)
|
|
15
11
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
## 🎯 Mission (Scope)
|
|
19
|
-
- ✅ Tìm và nạp các file phụ thuộc (Dependencies, Imports).
|
|
20
|
-
- ❌ Do NOT nạp toàn bộ repo hoặc thư mục `node_modules` gây phình Context Window.
|
|
21
|
-
|
|
22
|
-
---
|
|
23
|
-
|
|
24
|
-
## ⚙️ Capabilities (Cognitive Pipeline)
|
|
12
|
+
## Constraints
|
|
25
13
|
```yaml
|
|
26
|
-
|
|
27
|
-
-
|
|
28
|
-
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
-
|
|
14
|
+
must:
|
|
15
|
+
- Find and load related dependency files
|
|
16
|
+
must_not:
|
|
17
|
+
- Modify code
|
|
18
|
+
- Load entire repo or node_modules
|
|
19
|
+
- Hallucinate filenames
|
|
32
20
|
```
|
|
33
21
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
## 🎛️ Dials (Hành vi)
|
|
22
|
+
## Policies
|
|
37
23
|
```yaml
|
|
38
|
-
|
|
39
|
-
-
|
|
24
|
+
prefer:
|
|
25
|
+
- Build dependency graph
|
|
40
26
|
```
|
|
41
27
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
## 🛡️ Biases (Sửa lỗi mặc định)
|
|
28
|
+
## Escalation
|
|
45
29
|
```yaml
|
|
46
|
-
|
|
47
|
-
-
|
|
30
|
+
stop:
|
|
31
|
+
- Repo or files are inaccessible
|
|
48
32
|
```
|
|
49
33
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
## 🛫 Ship Criteria
|
|
53
|
-
```yaml
|
|
54
|
-
Rules:
|
|
55
|
-
- id: delegation-only # (Chỉ thu thập thông tin, cấm chỉnh sửa code)
|
|
34
|
+
## Output
|
|
35
|
+
- Context mapping
|
|
56
36
|
```
|