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
|
@@ -1,36 +1,42 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: qk-ui-audit
|
|
3
3
|
category: qa
|
|
4
|
-
version:
|
|
5
|
-
description: "Kiểm toán giao diện (UI)
|
|
4
|
+
version: 7.0.0
|
|
5
|
+
description: "Kiểm toán giao diện (UI) bằng checklist chống rác (Anti-slop) khắt khe."
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# qk-ui-audit
|
|
9
9
|
|
|
10
10
|
## Scope
|
|
11
|
-
- UI consistency,
|
|
11
|
+
- UI consistency, Anti-Slop validation, accessibility, and performance auditing (Evaluate)
|
|
12
|
+
|
|
13
|
+
## Verbs
|
|
14
|
+
- `[AUDIT]`: Score the UI against the 57-point strict checklist (Anti-slop).
|
|
12
15
|
|
|
13
16
|
## Constraints
|
|
14
17
|
```yaml
|
|
15
18
|
must:
|
|
16
|
-
-
|
|
17
|
-
-
|
|
19
|
+
- Score the UI components against `DESIGN.md` tokens.
|
|
20
|
+
- Fail the audit if generic, lazy AI aesthetics are detected (e.g., default Tailwind blue/red, cluttered layouts).
|
|
21
|
+
- Verify ARIA roles and contrast ratios.
|
|
22
|
+
- Require micro-interactions (hover, active states) for all interactive elements.
|
|
18
23
|
must_not:
|
|
19
|
-
-
|
|
24
|
+
- Pass the audit if the UI looks like a "cheap template".
|
|
25
|
+
- Ignore mobile viewport constraints.
|
|
20
26
|
```
|
|
21
27
|
|
|
22
28
|
## Policies
|
|
23
29
|
```yaml
|
|
24
30
|
prefer:
|
|
25
|
-
- Identifying systemic UI issues over isolated pixel tweaks
|
|
31
|
+
- Identifying systemic UI issues and demanding complete REDESIGN over isolated pixel tweaks.
|
|
26
32
|
```
|
|
27
33
|
|
|
28
34
|
## Escalation
|
|
29
35
|
```yaml
|
|
30
36
|
stop:
|
|
31
|
-
- UI
|
|
37
|
+
- UI fails the Anti-Slop Audit (Score < 90/100). The agent MUST self-correct or ask the user to reject the code.
|
|
38
|
+
- UI components completely lack semantic structure.
|
|
32
39
|
```
|
|
33
40
|
|
|
34
41
|
## Output
|
|
35
|
-
- UI audit report with actionable fixes
|
|
36
|
-
```
|
|
42
|
+
- Strict UI audit report with actionable fixes, demanding redesign if slop is detected.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: qk-ui-system-builder
|
|
3
3
|
category: frontend
|
|
4
|
-
version:
|
|
4
|
+
version: 7.0.0
|
|
5
5
|
description: "Xây dựng và duy trì Design Systems, Token extraction, và các thư viện UI dùng chung."
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -9,28 +9,35 @@ description: "Xây dựng và duy trì Design Systems, Token extraction, và cá
|
|
|
9
9
|
|
|
10
10
|
## Scope
|
|
11
11
|
- Building and maintaining Design Systems and shared UI tokens (Plan & Execute)
|
|
12
|
+
- Enforcing Open Design constraints via `DESIGN.md`
|
|
13
|
+
|
|
14
|
+
## Verbs
|
|
15
|
+
- `[EXTRACT]`: Read `DESIGN.md` and generate CSS variables/tokens.
|
|
16
|
+
- `[ENFORCE]`: Ensure no generic "AI-slop" tokens are created.
|
|
12
17
|
|
|
13
18
|
## Constraints
|
|
14
19
|
```yaml
|
|
15
20
|
must:
|
|
16
|
-
- Extract reusable design tokens (colors, spacing, typography)
|
|
17
|
-
- Ensure components are accessible (A11y)
|
|
21
|
+
- "Extract reusable design tokens (colors, spacing, typography) from DESIGN.md ONLY"
|
|
22
|
+
- "Ensure components are accessible (A11y)"
|
|
18
23
|
must_not:
|
|
19
|
-
- Create duplicate tokens for the same visual value
|
|
24
|
+
- "Create duplicate tokens for the same visual value"
|
|
25
|
+
- "Invent tokens (e.g., standard Tailwind colors) not explicitly defined in DESIGN.md"
|
|
20
26
|
```
|
|
21
27
|
|
|
22
28
|
## Policies
|
|
23
29
|
```yaml
|
|
24
30
|
prefer:
|
|
31
|
+
- Strict adherence to HSL/Oklch over generic HEX colors
|
|
25
32
|
- Composable components over rigid layouts
|
|
26
33
|
```
|
|
27
34
|
|
|
28
35
|
## Escalation
|
|
29
36
|
```yaml
|
|
30
37
|
stop:
|
|
31
|
-
-
|
|
38
|
+
- "DESIGN.md is missing (Prompt user to run bootstrap or provide one)"
|
|
39
|
+
- "Design tokens conflict with existing DESIGN.md guidelines"
|
|
32
40
|
```
|
|
33
41
|
|
|
34
42
|
## Output
|
|
35
|
-
- UI component library or Design System tokens
|
|
36
|
-
```
|
|
43
|
+
- Strict UI component library or Design System tokens mapped to `DESIGN.md`
|
|
@@ -1,37 +1,40 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: qk-validation-gate
|
|
3
3
|
category: qa
|
|
4
|
-
version:
|
|
5
|
-
description: "Cổng kiểm tra chất lượng bắt buộc (Test, Lint, Security)."
|
|
4
|
+
version: 7.0.0
|
|
5
|
+
description: "Cổng kiểm tra chất lượng bắt buộc (Test, Lint, Security) chặn đứng mọi mã nguồn lỗi."
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
# qk-validation-gate
|
|
9
9
|
|
|
10
10
|
## Scope
|
|
11
|
-
-
|
|
11
|
+
- Pre-commit/Pre-push Quality Gates and Test execution (Evaluate)
|
|
12
|
+
|
|
13
|
+
## Verbs
|
|
14
|
+
- `[VALIDATE]`: Run tests, linters, and security checks before any merge or commit.
|
|
12
15
|
|
|
13
16
|
## Constraints
|
|
14
17
|
```yaml
|
|
15
18
|
must:
|
|
16
|
-
-
|
|
17
|
-
-
|
|
19
|
+
- "Run all unit/integration tests before passing the gate"
|
|
20
|
+
- "Run static analysis (Linting, Type-checking) on modified files"
|
|
18
21
|
must_not:
|
|
19
|
-
-
|
|
20
|
-
-
|
|
22
|
+
- "Bypass failing tests with generic 'ignore' flags"
|
|
23
|
+
- "Allow commits with unaddressed security warnings"
|
|
21
24
|
```
|
|
22
25
|
|
|
23
26
|
## Policies
|
|
24
27
|
```yaml
|
|
25
28
|
prefer:
|
|
26
|
-
-
|
|
29
|
+
- "Strict failure over silent continuation"
|
|
27
30
|
```
|
|
28
31
|
|
|
29
32
|
## Escalation
|
|
30
33
|
```yaml
|
|
31
34
|
stop:
|
|
32
|
-
-
|
|
35
|
+
- "Tests fail or Code coverage drops below threshold"
|
|
36
|
+
- "Linter reports errors (not just warnings)"
|
|
33
37
|
```
|
|
34
38
|
|
|
35
39
|
## Output
|
|
36
|
-
- Pass/Fail
|
|
37
|
-
```
|
|
40
|
+
- Validation report (Pass/Fail) and execution logs.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# DESIGN.md - The Brand Contract
|
|
2
|
+
|
|
3
|
+
> **CRITICAL RULE:** This file is the Single Source of Truth for all UI/UX in this project.
|
|
4
|
+
> Any AI agent performing frontend work MUST adhere strictly to the rules, tokens, and components defined here.
|
|
5
|
+
> DO NOT invent generic Tailwind colors or default layouts. DO NOT use "slop" AI aesthetics.
|
|
6
|
+
|
|
7
|
+
## 1. Typography
|
|
8
|
+
- **Primary Font:** [Specify Font Family, e.g., Inter, Roboto]
|
|
9
|
+
- **Heading Font:** [Specify Font Family if different]
|
|
10
|
+
- **Base Size:** [e.g., 16px]
|
|
11
|
+
- **Scale:** [e.g., Major Third (1.25) or Perfect Fourth (1.333)]
|
|
12
|
+
|
|
13
|
+
## 2. Color Palette (Strict Constraints)
|
|
14
|
+
- **Primary:** HSL(xxx, xx%, xx%)
|
|
15
|
+
- **Secondary:** HSL(xxx, xx%, xx%)
|
|
16
|
+
- **Background (Light):** HSL(xxx, xx%, xx%)
|
|
17
|
+
- **Background (Dark):** HSL(xxx, xx%, xx%)
|
|
18
|
+
- **Text (Light/Dark):** HSL(xxx, xx%, xx%)
|
|
19
|
+
- **Forbidden Colors:** [e.g., Default Tailwind `blue-500`, `red-500`. NEVER use default primary colors].
|
|
20
|
+
|
|
21
|
+
## 3. Spacing & Grid System
|
|
22
|
+
- **Base Unit:** [e.g., 4px / 0.25rem]
|
|
23
|
+
- **Grid Layout:** [e.g., 12-column grid, max-width: 1280px]
|
|
24
|
+
- **Whitespace Rule:** Always favor generous whitespace (whitespace is cheap, clutter is expensive).
|
|
25
|
+
|
|
26
|
+
## 4. UI Components & Micro-interactions
|
|
27
|
+
- **Border Radius:** [e.g., 8px for cards, 4px for buttons, 9999px for pills]
|
|
28
|
+
- **Shadows/Elevation:** [Define soft, organic shadows; avoid harsh, generic drop shadows]
|
|
29
|
+
- **Animations:** [e.g., 200ms ease-out for hover states, use micro-animations for button presses].
|
|
30
|
+
|
|
31
|
+
## 5. Anti-Slop Guidelines (Hallmark Rules)
|
|
32
|
+
- **NO Default Borders:** Avoid adding a 1px solid border to everything. Use background color shifts or soft shadows instead.
|
|
33
|
+
- **NO Cluttered Forms:** Forms must have clear visual hierarchy, grouped inputs, and explicit focus states.
|
|
34
|
+
- **NO Floating Elements:** Elements must be anchored visually to a grid.
|
|
35
|
+
- **MUST Check Contrast:** All text must meet WCAG AA contrast ratios.
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
*Note to AI Agent: If you are about to emit code that violates these rules, STOP. Redesign it, run an [AUDIT], and apply the correct constraints.*
|
|
@@ -22,12 +22,14 @@ function parseBSF(skillPath) {
|
|
|
22
22
|
const fmMatch = content.match(/^---\s*\n([\s\S]*?)\n---/);
|
|
23
23
|
if (!fmMatch) return null;
|
|
24
24
|
const frontmatter = YAML.load(fmMatch[1]);
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
let type = 'legacy';
|
|
26
|
+
if (frontmatter.version && frontmatter.version.startsWith('7.')) type = 'v7';
|
|
27
|
+
else if (frontmatter.version && frontmatter.version.startsWith('6.')) type = 'v6';
|
|
28
|
+
|
|
29
|
+
const bsf = { type, frontmatter };
|
|
28
30
|
|
|
29
31
|
// Parse YAML blocks
|
|
30
|
-
const yamlBlocks = [...content.matchAll(/```yaml\n([\s\S]*?)\n```/g)];
|
|
32
|
+
const yamlBlocks = [...content.matchAll(/```yaml\r?\n([\s\S]*?)\r?\n```/g)];
|
|
31
33
|
|
|
32
34
|
try {
|
|
33
35
|
let parsedBlocks = {};
|
|
@@ -61,24 +63,24 @@ function parseBSF(skillPath) {
|
|
|
61
63
|
describe('Behavior Validation Framework', () => {
|
|
62
64
|
|
|
63
65
|
describe('Level 1: Specification Valid', () => {
|
|
64
|
-
it('Every v6 skill must have valid Schema (Metadata, Scope, Constraints)', () => {
|
|
66
|
+
it('Every v6/v7 skill must have valid Schema (Metadata, Scope, Constraints)', () => {
|
|
65
67
|
const dirs = getActiveSkillDirs();
|
|
66
|
-
const
|
|
68
|
+
const modernSkills = [];
|
|
67
69
|
|
|
68
70
|
dirs.forEach(dir => {
|
|
69
71
|
const skillPath = path.join(dir, 'SKILL.md');
|
|
70
72
|
if (!fs.existsSync(skillPath)) return;
|
|
71
73
|
const bsf = parseBSF(skillPath);
|
|
72
74
|
|
|
73
|
-
if (bsf && bsf.type === '
|
|
74
|
-
|
|
75
|
+
if (bsf && bsf.type === 'v7') {
|
|
76
|
+
modernSkills.push(dir);
|
|
75
77
|
expect(bsf.error, `Parser error in ${path.basename(dir)}: ${bsf.error}`).toBeUndefined();
|
|
76
78
|
expect(bsf.frontmatter.category, `Missing category metadata in ${path.basename(dir)}`).toBeDefined();
|
|
77
79
|
expect(bsf.constraints, `Missing Constraints in ${path.basename(dir)}`).toBeDefined();
|
|
78
80
|
}
|
|
79
81
|
});
|
|
80
82
|
|
|
81
|
-
expect(
|
|
83
|
+
expect(modernSkills.length).toBeGreaterThan(0);
|
|
82
84
|
});
|
|
83
85
|
});
|
|
84
86
|
|
|
@@ -91,12 +93,13 @@ describe('Behavior Validation Framework', () => {
|
|
|
91
93
|
if (!fs.existsSync(skillPath)) return;
|
|
92
94
|
const bsf = parseBSF(skillPath);
|
|
93
95
|
|
|
94
|
-
if (bsf && bsf.type === '
|
|
96
|
+
if (bsf && bsf.type === 'v7' && !bsf.error) {
|
|
95
97
|
const must = bsf.constraints.must || [];
|
|
96
98
|
const must_not = bsf.constraints.must_not || [];
|
|
97
99
|
|
|
98
100
|
must.forEach(rule => {
|
|
99
|
-
|
|
101
|
+
if (typeof rule !== 'string') return;
|
|
102
|
+
const conflict = must_not.some(c => typeof c === 'string' && c.toLowerCase() === rule.toLowerCase());
|
|
100
103
|
expect(conflict, `Conflict detected in ${path.basename(dir)}: '${rule}' is in both must and must_not`).toBe(false);
|
|
101
104
|
});
|
|
102
105
|
}
|
package/scratch_update.cjs
DELETED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
const fs = require('fs');
|
|
2
|
-
const path = require('path');
|
|
3
|
-
|
|
4
|
-
const repoDir = 'd:\\ai-code-skin-mcp\\rules-skill';
|
|
5
|
-
const skillsJsonPath = path.join(repoDir, 'skills.json');
|
|
6
|
-
|
|
7
|
-
try {
|
|
8
|
-
const data = fs.readFileSync(skillsJsonPath, 'utf8');
|
|
9
|
-
const skillsConfig = JSON.parse(data);
|
|
10
|
-
|
|
11
|
-
skillsConfig.skills.forEach(skill => {
|
|
12
|
-
if (skill.path && skill.description) {
|
|
13
|
-
const skillMdPath = path.join(repoDir, skill.path);
|
|
14
|
-
if (fs.existsSync(skillMdPath)) {
|
|
15
|
-
let content = fs.readFileSync(skillMdPath, 'utf8');
|
|
16
|
-
const frontmatterRegex = /^---\r?\n([\s\S]*?)\r?\n---/;
|
|
17
|
-
const match = content.match(frontmatterRegex);
|
|
18
|
-
|
|
19
|
-
if (match) {
|
|
20
|
-
let frontmatter = match[1];
|
|
21
|
-
// Update version to 6.0.3 in frontmatter
|
|
22
|
-
if (/^version:/m.test(frontmatter)) {
|
|
23
|
-
frontmatter = frontmatter.replace(/^version:.*$/m, `version: 6.0.3`);
|
|
24
|
-
} else {
|
|
25
|
-
frontmatter += `\nversion: 6.0.3`;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
// Check if description already exists
|
|
29
|
-
if (/^description:/m.test(frontmatter)) {
|
|
30
|
-
frontmatter = frontmatter.replace(/^description:.*$/m, `description: "${skill.description}"`);
|
|
31
|
-
} else {
|
|
32
|
-
frontmatter += `\ndescription: "${skill.description}"`;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
const newContent = content.replace(frontmatterRegex, `---\n${frontmatter}\n---`);
|
|
36
|
-
fs.writeFileSync(skillMdPath, newContent, 'utf8');
|
|
37
|
-
console.log(`Updated ${skillMdPath}`);
|
|
38
|
-
} else {
|
|
39
|
-
console.log(`No frontmatter found in ${skillMdPath}`);
|
|
40
|
-
}
|
|
41
|
-
} else {
|
|
42
|
-
console.log(`File not found: ${skillMdPath}`);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
// Also update package.json version
|
|
48
|
-
const packageJsonPath = path.join(repoDir, 'package.json');
|
|
49
|
-
if (fs.existsSync(packageJsonPath)) {
|
|
50
|
-
const pkg = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8'));
|
|
51
|
-
pkg.version = "6.0.3";
|
|
52
|
-
fs.writeFileSync(packageJsonPath, JSON.stringify(pkg, null, 2), 'utf8');
|
|
53
|
-
console.log('Updated package.json to 6.0.3');
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
// Also update skills.json version if needed
|
|
57
|
-
if (skillsConfig.version) {
|
|
58
|
-
skillsConfig.version = "6.0.3";
|
|
59
|
-
fs.writeFileSync(skillsJsonPath, JSON.stringify(skillsConfig, null, 2), 'utf8');
|
|
60
|
-
console.log('Updated skills.json version to 6.0.3');
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
console.log('Done!');
|
|
64
|
-
} catch (err) {
|
|
65
|
-
console.error('Error:', err);
|
|
66
|
-
}
|