ai-developer-skill-os 7.0.2 → 7.5.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 +44 -88
- package/.agents/CHANGELOG.md +69 -0
- package/.agents/LICENSE +21 -0
- package/.agents/README.md +59 -0
- package/.agents/_template/BEHAVIOR_SPEC.md +96 -0
- package/.agents/_template/examples/example-en.md +49 -0
- package/.agents/_template/examples/example-vi.md +49 -0
- package/.agents/docs/CHI_TIET_SKILLS.md +125 -0
- package/.agents/docs/GOVERNANCE.md +40 -0
- package/.agents/docs/HUONG_DAN_SU_DUNG.md +120 -0
- package/.agents/docs/SPEC.md +87 -0
- package/.agents/docs/adr/0001-intent-based-architecture.md +19 -0
- package/.agents/docs/adr/0002-kernel-freeze.md +21 -0
- package/.agents/docs/adr/0003-risk-based-verification.md +20 -0
- package/.agents/docs/adr/0004-progressive-evidence.md +19 -0
- package/.agents/docs/skill-classification.md +25 -0
- package/.agents/skills/qk-access-policy/SKILL.md +179 -0
- package/.agents/skills/qk-ai-builder/SKILL.md +215 -0
- package/.agents/skills/qk-api-lifecycle/SKILL.md +176 -0
- package/.agents/skills/qk-bug-resolution/SKILL.md +307 -0
- package/.agents/skills/qk-context-loader/SKILL.md +218 -0
- package/.agents/skills/qk-data-lifecycle/SKILL.md +192 -0
- package/.agents/skills/qk-db-optimizer/SKILL.md +196 -0
- package/.agents/skills/qk-design-to-code/SKILL.md +285 -0
- package/.agents/skills/qk-docs/SKILL.md +198 -0
- package/.agents/skills/qk-engineering-standard/SKILL.md +351 -0
- package/.agents/skills/qk-engineering-standard/rules/backend.md +122 -0
- package/.agents/skills/qk-engineering-standard/rules/database.md +3 -0
- package/.agents/skills/qk-engineering-standard/rules/frontend.md +152 -0
- package/.agents/skills/qk-engineering-standard/rules/security.md +3 -0
- package/.agents/skills/qk-engineering-standard/rules/testing.md +3 -0
- package/.agents/skills/qk-fe-api-integration/SKILL.md +326 -0
- package/.agents/skills/qk-feature-delivery/SKILL.md +305 -0
- package/.agents/skills/qk-help/SKILL.md +193 -0
- package/.agents/skills/qk-orchestrator/SKILL.md +277 -0
- package/.agents/skills/qk-orchestrator/references/routing-table.md +77 -0
- package/.agents/skills/qk-production-release/SKILL.md +284 -0
- package/.agents/skills/qk-project-bootstrap/SKILL.md +234 -0
- package/.agents/skills/qk-project-health/SKILL.md +199 -0
- package/.agents/skills/qk-project-memory/SKILL.md +172 -0
- package/.agents/skills/qk-system-evolution/SKILL.md +281 -0
- package/.agents/skills/qk-ui-audit/SKILL.md +314 -0
- package/.agents/skills/qk-ui-audit/references/anti-slop-checklist.md +136 -0
- package/.agents/skills/qk-ui-system-builder/SKILL.md +221 -0
- package/.agents/skills/qk-validation-gate/SKILL.md +359 -0
- package/.agents/skills.json +819 -0
- package/.github/workflows/ci.yml +1 -1
- package/.qk-ai-skill-os/CHANGELOG.md +69 -0
- package/.qk-ai-skill-os/LICENSE +21 -0
- package/.qk-ai-skill-os/README.md +59 -0
- package/.qk-ai-skill-os/_template/BEHAVIOR_SPEC.md +96 -0
- package/.qk-ai-skill-os/_template/examples/example-en.md +49 -0
- package/.qk-ai-skill-os/_template/examples/example-vi.md +49 -0
- package/.qk-ai-skill-os/docs/CHI_TIET_SKILLS.md +125 -0
- package/.qk-ai-skill-os/docs/GOVERNANCE.md +40 -0
- package/.qk-ai-skill-os/docs/HUONG_DAN_SU_DUNG.md +120 -0
- package/.qk-ai-skill-os/docs/SPEC.md +87 -0
- package/.qk-ai-skill-os/docs/adr/0001-intent-based-architecture.md +19 -0
- package/.qk-ai-skill-os/docs/adr/0002-kernel-freeze.md +21 -0
- package/.qk-ai-skill-os/docs/adr/0003-risk-based-verification.md +20 -0
- package/.qk-ai-skill-os/docs/adr/0004-progressive-evidence.md +19 -0
- package/.qk-ai-skill-os/docs/skill-classification.md +25 -0
- package/.qk-ai-skill-os/skills/_archive_old_skills/qk-accessibility-audit/SKILL.md +121 -0
- package/.qk-ai-skill-os/skills/_archive_old_skills/qk-agent-orchestrator/SKILL.md +179 -0
- package/.qk-ai-skill-os/skills/_archive_old_skills/qk-api-integration/SKILL.md +389 -0
- package/.qk-ai-skill-os/skills/_archive_old_skills/qk-auth-security/SKILL.md +96 -0
- package/.qk-ai-skill-os/skills/_archive_old_skills/qk-backend-architecture/SKILL.md +125 -0
- package/.qk-ai-skill-os/skills/_archive_old_skills/qk-bug-fix/SKILL.md +213 -0
- package/.qk-ai-skill-os/skills/_archive_old_skills/qk-component-generator/SKILL.md +136 -0
- package/.qk-ai-skill-os/skills/_archive_old_skills/qk-context-manager/SKILL.md +175 -0
- package/.qk-ai-skill-os/skills/_archive_old_skills/qk-database-engineer/SKILL.md +104 -0
- package/.qk-ai-skill-os/skills/_archive_old_skills/qk-deployment/SKILL.md +96 -0
- package/.qk-ai-skill-os/skills/_archive_old_skills/qk-design-system/SKILL.md +137 -0
- package/.qk-ai-skill-os/skills/_archive_old_skills/qk-form-builder/SKILL.md +140 -0
- package/.qk-ai-skill-os/skills/_archive_old_skills/qk-frontend-architecture/SKILL.md +155 -0
- package/.qk-ai-skill-os/skills/_archive_old_skills/qk-frontend-debug/SKILL.md +133 -0
- package/.qk-ai-skill-os/skills/_archive_old_skills/qk-frontend-performance/SKILL.md +129 -0
- package/.qk-ai-skill-os/skills/_archive_old_skills/qk-frontend-testing/SKILL.md +146 -0
- package/.qk-ai-skill-os/skills/_archive_old_skills/qk-git-engineer/SKILL.md +304 -0
- package/.qk-ai-skill-os/skills/_archive_old_skills/qk-help/SKILL.md +68 -0
- package/.qk-ai-skill-os/skills/_archive_old_skills/qk-migration/SKILL.md +284 -0
- package/.qk-ai-skill-os/skills/_archive_old_skills/qk-project-audit/SKILL.md +280 -0
- package/.qk-ai-skill-os/skills/_archive_old_skills/qk-refactor/SKILL.md +222 -0
- package/.qk-ai-skill-os/skills/_archive_old_skills/qk-state-management/SKILL.md +140 -0
- package/.qk-ai-skill-os/skills/_archive_old_skills/qk-table-crud-generator/SKILL.md +127 -0
- package/.qk-ai-skill-os/skills/_archive_old_skills/qk-ui-builder/SKILL.md +152 -0
- package/.qk-ai-skill-os/skills/_template/SKILL.md +238 -0
- package/.qk-ai-skill-os/skills/qk-access-policy/SKILL.md +179 -0
- package/.qk-ai-skill-os/skills/qk-ai-builder/SKILL.md +221 -0
- package/.qk-ai-skill-os/skills/qk-api-lifecycle/SKILL.md +176 -0
- package/.qk-ai-skill-os/skills/qk-bug-resolution/SKILL.md +307 -0
- package/.qk-ai-skill-os/skills/qk-context-loader/SKILL.md +218 -0
- package/.qk-ai-skill-os/skills/qk-data-lifecycle/SKILL.md +192 -0
- package/.qk-ai-skill-os/skills/qk-db-optimizer/SKILL.md +196 -0
- package/.qk-ai-skill-os/skills/qk-design-to-code/SKILL.md +291 -0
- package/.qk-ai-skill-os/skills/qk-docs/SKILL.md +198 -0
- package/.qk-ai-skill-os/skills/qk-engineering-standard/SKILL.md +351 -0
- package/.qk-ai-skill-os/skills/qk-engineering-standard/rules/backend.md +122 -0
- package/.qk-ai-skill-os/skills/qk-engineering-standard/rules/database.md +3 -0
- package/.qk-ai-skill-os/skills/qk-engineering-standard/rules/frontend.md +152 -0
- package/.qk-ai-skill-os/skills/qk-engineering-standard/rules/security.md +3 -0
- package/.qk-ai-skill-os/skills/qk-engineering-standard/rules/testing.md +3 -0
- package/.qk-ai-skill-os/skills/qk-fe-api-integration/SKILL.md +326 -0
- package/.qk-ai-skill-os/skills/qk-feature-delivery/SKILL.md +305 -0
- package/.qk-ai-skill-os/skills/qk-help/SKILL.md +193 -0
- package/.qk-ai-skill-os/skills/qk-orchestrator/SKILL.md +277 -0
- package/.qk-ai-skill-os/skills/qk-orchestrator/references/routing-table.md +77 -0
- package/.qk-ai-skill-os/skills/qk-production-release/SKILL.md +290 -0
- package/.qk-ai-skill-os/skills/qk-project-bootstrap/SKILL.md +240 -0
- package/.qk-ai-skill-os/skills/qk-project-health/SKILL.md +199 -0
- package/.qk-ai-skill-os/skills/qk-project-memory/SKILL.md +172 -0
- package/.qk-ai-skill-os/skills/qk-system-evolution/SKILL.md +285 -0
- package/.qk-ai-skill-os/skills/qk-ui-audit/SKILL.md +314 -0
- package/.qk-ai-skill-os/skills/qk-ui-audit/references/anti-slop-checklist.md +136 -0
- package/.qk-ai-skill-os/skills/qk-ui-system-builder/SKILL.md +225 -0
- package/.qk-ai-skill-os/skills/qk-validation-gate/SKILL.md +361 -0
- package/.qk-ai-skill-os/skills.json +819 -0
- package/CLAUDE.md +110 -0
- package/README.md +25 -3
- package/add_lang.js +21 -0
- package/add_lang.py +25 -0
- package/add_sections.py +53 -0
- package/bin/install.js +225 -170
- package/bin/lint.js +122 -0
- package/docs/CHI_TIET_SKILLS.md +26 -26
- package/docs/HUONG_DAN_SU_DUNG.md +3 -3
- package/docs/SPEC.md +70 -20
- package/framework/skill-schema.md +310 -0
- package/package.json +15 -4
- package/patch.js +15 -0
- package/patch.py +89 -0
- package/patch2.py +83 -0
- package/skills/_archive_old_skills/qk-accessibility-audit/SKILL.md +1 -0
- package/skills/_archive_old_skills/qk-agent-orchestrator/SKILL.md +1 -0
- package/skills/_archive_old_skills/qk-api-integration/SKILL.md +1 -0
- package/skills/_archive_old_skills/qk-auth-security/SKILL.md +1 -0
- package/skills/_archive_old_skills/qk-backend-architecture/SKILL.md +1 -0
- package/skills/_archive_old_skills/qk-bug-fix/SKILL.md +1 -0
- package/skills/_archive_old_skills/qk-component-generator/SKILL.md +1 -0
- package/skills/_archive_old_skills/qk-context-manager/SKILL.md +1 -0
- package/skills/_archive_old_skills/qk-database-engineer/SKILL.md +1 -0
- package/skills/_archive_old_skills/qk-deployment/SKILL.md +1 -0
- package/skills/_archive_old_skills/qk-design-system/SKILL.md +1 -0
- package/skills/_archive_old_skills/qk-form-builder/SKILL.md +1 -0
- package/skills/_archive_old_skills/qk-frontend-architecture/SKILL.md +1 -0
- package/skills/_archive_old_skills/qk-frontend-debug/SKILL.md +1 -0
- package/skills/_archive_old_skills/qk-frontend-performance/SKILL.md +1 -0
- package/skills/_archive_old_skills/qk-frontend-testing/SKILL.md +1 -0
- package/skills/_archive_old_skills/qk-git-engineer/SKILL.md +1 -0
- package/skills/_archive_old_skills/qk-help/SKILL.md +1 -0
- package/skills/_archive_old_skills/qk-migration/SKILL.md +1 -0
- package/skills/_archive_old_skills/qk-project-audit/SKILL.md +1 -0
- package/skills/_archive_old_skills/qk-refactor/SKILL.md +1 -0
- package/skills/_archive_old_skills/qk-state-management/SKILL.md +1 -0
- package/skills/_archive_old_skills/qk-table-crud-generator/SKILL.md +1 -0
- package/skills/_archive_old_skills/qk-ui-builder/SKILL.md +1 -0
- package/skills/_template/SKILL.md +238 -0
- package/skills/qk-access-policy/SKILL.md +179 -39
- package/skills/qk-ai-builder/SKILL.md +215 -40
- package/skills/qk-api-lifecycle/SKILL.md +176 -46
- package/skills/qk-bug-resolution/SKILL.md +307 -46
- package/skills/qk-context-loader/SKILL.md +218 -43
- package/skills/qk-data-lifecycle/SKILL.md +192 -44
- package/skills/qk-db-optimizer/SKILL.md +196 -41
- package/skills/qk-design-to-code/SKILL.md +285 -46
- package/skills/qk-docs/SKILL.md +198 -40
- package/skills/qk-engineering-standard/SKILL.md +351 -42
- package/skills/qk-fe-api-integration/SKILL.md +326 -55
- package/skills/qk-feature-delivery/SKILL.md +305 -48
- package/skills/qk-help/SKILL.md +178 -23
- package/skills/qk-orchestrator/SKILL.md +277 -42
- package/skills/qk-orchestrator/references/routing-table.md +77 -0
- package/skills/qk-production-release/SKILL.md +284 -41
- package/skills/qk-project-bootstrap/SKILL.md +234 -38
- package/skills/qk-project-health/SKILL.md +199 -40
- package/skills/qk-project-memory/SKILL.md +172 -40
- package/skills/qk-system-evolution/SKILL.md +281 -40
- package/skills/qk-ui-audit/SKILL.md +314 -42
- package/skills/qk-ui-audit/references/anti-slop-checklist.md +136 -0
- package/skills/qk-ui-system-builder/SKILL.md +221 -43
- package/skills/qk-validation-gate/SKILL.md +359 -40
- package/skills.json +813 -824
- package/specs/fixtures/user-payload.json +12 -0
- package/specs/regressions/api-integration-null-fields.yaml +19 -0
- package/temp_fix.js +61 -0
- package/tests/registry.test.js +1 -1
- package/update_template.js +28 -0
- package/skills/qk-policy-engine/SKILL.md +0 -39
|
@@ -1,46 +1,285 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: qk-design-to-code
|
|
3
|
-
category: frontend
|
|
4
|
-
version: 7.
|
|
5
|
-
description: "Chuyển
|
|
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
|
-
|
|
1
|
+
---
|
|
2
|
+
name: qk-design-to-code
|
|
3
|
+
category: frontend
|
|
4
|
+
version: 7.5.0
|
|
5
|
+
description: "Chuyển thiết kế Figma/Image thành UI component chuẩn pixel — zero AI-slop, 100% DESIGN.md."
|
|
6
|
+
platforms: [antigravity, claude-code, cursor, windsurf, kilo-code]
|
|
7
|
+
execution_mode: deterministic
|
|
8
|
+
|
|
9
|
+
cost: high
|
|
10
|
+
latency: slow
|
|
11
|
+
risk: low
|
|
12
|
+
side_effects: edit_files
|
|
13
|
+
produces: [code]
|
|
14
|
+
consumes: [design-md, design-asset]
|
|
15
|
+
|
|
16
|
+
token_budget:
|
|
17
|
+
max_files_read: 4
|
|
18
|
+
max_lines_per_read: 150
|
|
19
|
+
max_shell_commands: 0
|
|
20
|
+
stop_early: false
|
|
21
|
+
|
|
22
|
+
exit_codes: [SUCCESS, BLOCKED, FAILED, PARTIAL]
|
|
23
|
+
skill_version: 7.5.0
|
|
24
|
+
runtime_version: 1
|
|
25
|
+
schema_version: 2
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
# qk-design-to-code — Pixel-Perfect Builder
|
|
29
|
+
|
|
30
|
+
> **Language rule:** Code, identifiers, file names ? English. Explanations, summaries ? Vietnamese.
|
|
31
|
+
|
|
32
|
+
skill_version: 7.5.0
|
|
33
|
+
runtime_version: 1
|
|
34
|
+
schema_version: 2
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Preconditions
|
|
38
|
+
- [ ] `DESIGN.md` exists with color tokens, spacing scale, typography
|
|
39
|
+
- [ ] Design reference (Figma link, image, or wireframe description) provided
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
On missing precondition:
|
|
43
|
+
EXIT: BLOCKED
|
|
44
|
+
Message: "DESIGN.md missing or design reference not provided."
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
skill_version: 7.5.0
|
|
48
|
+
runtime_version: 1
|
|
49
|
+
schema_version: 2
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Scope
|
|
53
|
+
- ✅ Build UI from design reference using ONLY DESIGN.md tokens
|
|
54
|
+
- ✅ Include all interactive states: hover, focus, active, disabled, loading
|
|
55
|
+
- ✅ Responsive layouts (mobile + desktop)
|
|
56
|
+
- ✅ Semantic HTML with ARIA roles
|
|
57
|
+
|
|
58
|
+
## Non-Goals
|
|
59
|
+
- ❌ Invent design tokens not in DESIGN.md
|
|
60
|
+
- ❌ Use hardcoded hex colors, px sizes not from token system
|
|
61
|
+
- ❌ Copy generic Tailwind/Bootstrap templates
|
|
62
|
+
- ❌ Skip loading/error/empty states
|
|
63
|
+
|
|
64
|
+
skill_version: 7.5.0
|
|
65
|
+
runtime_version: 1
|
|
66
|
+
schema_version: 2
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Priority Order
|
|
70
|
+
|
|
71
|
+
| Priority | Task | Skip Threshold |
|
|
72
|
+
|----------|------|----------------|
|
|
73
|
+
| P1 | HTML structure + semantic markup | Never |
|
|
74
|
+
| P2 | DESIGN.md token application (colors, spacing, typography) | Never |
|
|
75
|
+
| P3 | Interactive states (hover, focus, active) | Budget < 30% |
|
|
76
|
+
| P4 | Responsive breakpoints (mobile) | Budget < 50% |
|
|
77
|
+
| P5 | Loading / error / empty states | Budget < 60% |
|
|
78
|
+
| P6 | Animation / micro-interactions | Budget < 70% |
|
|
79
|
+
| P7 | ARIA roles + keyboard navigation | Budget < 80% |
|
|
80
|
+
|
|
81
|
+
skill_version: 7.5.0
|
|
82
|
+
runtime_version: 1
|
|
83
|
+
schema_version: 2
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## Workflow
|
|
87
|
+
|
|
88
|
+
### Phase 1 — Extract Design System
|
|
89
|
+
|
|
90
|
+
**Steps:**
|
|
91
|
+
1. Read `DESIGN.md` → extract: colors (HSL), spacing scale, font families, border-radius, shadows, animation timing
|
|
92
|
+
2. Map tokens to CSS variables or framework equivalents
|
|
93
|
+
|
|
94
|
+
**Decision:**
|
|
95
|
+
```
|
|
96
|
+
IF DESIGN.md has all required tokens
|
|
97
|
+
→ go to Phase 2
|
|
98
|
+
|
|
99
|
+
ELSE IF some tokens missing
|
|
100
|
+
→ Use reasonable fallback, note gap in output
|
|
101
|
+
→ Confidence: MEDIUM
|
|
102
|
+
|
|
103
|
+
ELSE IF DESIGN.md empty
|
|
104
|
+
→ EXIT: BLOCKED
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
skill_version: 7.5.0
|
|
108
|
+
runtime_version: 1
|
|
109
|
+
schema_version: 2
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
### Phase 2 — Build Structure
|
|
113
|
+
|
|
114
|
+
**Steps:**
|
|
115
|
+
1. Create HTML structure (semantic: `article`, `section`, `nav`, `button`, NOT `div` soup)
|
|
116
|
+
2. Apply layout: CSS Grid / Flexbox (NO absolute positioning unless unavoidable)
|
|
117
|
+
3. Apply DESIGN.md tokens for colors, spacing, typography
|
|
118
|
+
|
|
119
|
+
**Self-Check before next phase:**
|
|
120
|
+
```
|
|
121
|
+
✅ No hardcoded hex/rgb values (only CSS vars or DESIGN.md tokens)
|
|
122
|
+
✅ No magic numbers for spacing (only from scale: 4, 8, 16, 24, 32...)
|
|
123
|
+
✅ Semantic HTML elements used
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
skill_version: 7.5.0
|
|
127
|
+
runtime_version: 1
|
|
128
|
+
schema_version: 2
|
|
129
|
+
---
|
|
130
|
+
|
|
131
|
+
### Phase 3 — Interactive States
|
|
132
|
+
|
|
133
|
+
**Steps:**
|
|
134
|
+
1. Add hover, focus, active states for all interactive elements
|
|
135
|
+
2. Add disabled state for form elements
|
|
136
|
+
3. Use CSS transitions (duration from DESIGN.md, typically 150–300ms)
|
|
137
|
+
|
|
138
|
+
**Self-Check:**
|
|
139
|
+
```
|
|
140
|
+
✅ Every button/link has hover + focus state
|
|
141
|
+
✅ Focus visible (not outline: none without replacement)
|
|
142
|
+
✅ Transition duration matches DESIGN.md
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
skill_version: 7.5.0
|
|
146
|
+
runtime_version: 1
|
|
147
|
+
schema_version: 2
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
### Phase 4 — Self-Audit (Anti-Slop Check)
|
|
151
|
+
|
|
152
|
+
**Checklist (must pass ALL):**
|
|
153
|
+
- [ ] No hardcoded colors — only DESIGN.md tokens
|
|
154
|
+
- [ ] No font-size in px without token — use rem/token
|
|
155
|
+
- [ ] No `margin: auto` soup — use proper grid/flex
|
|
156
|
+
- [ ] All interactive elements have hover + focus state
|
|
157
|
+
- [ ] Mobile viewport works (no horizontal overflow)
|
|
158
|
+
- [ ] No `!important` overrides (except resets)
|
|
159
|
+
- [ ] No inline styles except dynamic values
|
|
160
|
+
- [ ] Loading state implemented (skeleton or spinner)
|
|
161
|
+
- [ ] Error state implemented (clear message)
|
|
162
|
+
- [ ] Empty state implemented (helpful illustration/text)
|
|
163
|
+
|
|
164
|
+
**Decision:**
|
|
165
|
+
```
|
|
166
|
+
IF all 10 anti-slop checks pass
|
|
167
|
+
→ EXIT: SUCCESS
|
|
168
|
+
|
|
169
|
+
ELSE IF 1–2 minor fails
|
|
170
|
+
→ Fix immediately, EXIT: SUCCESS
|
|
171
|
+
|
|
172
|
+
ELSE IF > 2 fails OR hardcoded colors found
|
|
173
|
+
→ Fix all, re-audit, EXIT: PARTIAL if still one gap
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
skill_version: 7.5.0
|
|
177
|
+
runtime_version: 1
|
|
178
|
+
schema_version: 2
|
|
179
|
+
---
|
|
180
|
+
|
|
181
|
+
## Confidence Model
|
|
182
|
+
|
|
183
|
+
| Level | Condition | Action |
|
|
184
|
+
|-------|-----------|--------|
|
|
185
|
+
| HIGH | DESIGN.md complete, design reference clear | Build directly |
|
|
186
|
+
| MEDIUM | Some tokens missing, inferring from context | Note gaps, proceed |
|
|
187
|
+
| LOW | Design reference too vague or DESIGN.md empty | EXIT: BLOCKED |
|
|
188
|
+
|
|
189
|
+
skill_version: 7.5.0
|
|
190
|
+
runtime_version: 1
|
|
191
|
+
schema_version: 2
|
|
192
|
+
---
|
|
193
|
+
|
|
194
|
+
## Evidence Format (Self-Audit Violations)
|
|
195
|
+
|
|
196
|
+
```
|
|
197
|
+
[SEVERITY] path/to/Component.tsx:LINE
|
|
198
|
+
Category: [TOKEN|SEMANTIC|INTERACTION|RESPONSIVE|STATE|ARIA]
|
|
199
|
+
Reason: [specific anti-slop violation]
|
|
200
|
+
Confidence: HIGH
|
|
201
|
+
Fix: [applied immediately]
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
skill_version: 7.5.0
|
|
205
|
+
runtime_version: 1
|
|
206
|
+
schema_version: 2
|
|
207
|
+
---
|
|
208
|
+
|
|
209
|
+
## Handoff Contract
|
|
210
|
+
|
|
211
|
+
### Consumes
|
|
212
|
+
```json
|
|
213
|
+
{
|
|
214
|
+
"from": "user",
|
|
215
|
+
"required_fields": ["design_reference", "design_md_path"],
|
|
216
|
+
"optional_fields": ["component_name", "framework"]
|
|
217
|
+
}
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
### Produces
|
|
221
|
+
```json
|
|
222
|
+
{
|
|
223
|
+
"to": "qk-ui-audit (for verification)",
|
|
224
|
+
"output_fields": ["component_files", "tokens_used", "states_implemented", "exit_code"]
|
|
225
|
+
}
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
skill_version: 7.5.0
|
|
229
|
+
runtime_version: 1
|
|
230
|
+
schema_version: 2
|
|
231
|
+
---
|
|
232
|
+
|
|
233
|
+
## Output Format
|
|
234
|
+
|
|
235
|
+
```
|
|
236
|
+
🎨 Design → Code
|
|
237
|
+
─────────────────────────────────────────────────
|
|
238
|
+
Component: [ComponentName]
|
|
239
|
+
Tokens used: [list of DESIGN.md tokens applied]
|
|
240
|
+
|
|
241
|
+
States implemented:
|
|
242
|
+
✅ Default / ✅ Hover / ✅ Focus / ✅ Active
|
|
243
|
+
✅ Loading / ✅ Error / ✅ Empty
|
|
244
|
+
⚠️ [any state skipped — reason]
|
|
245
|
+
|
|
246
|
+
Anti-Slop Audit:
|
|
247
|
+
✅ [10/10 checks passed | N/10 — list failures]
|
|
248
|
+
|
|
249
|
+
Exit Code: [SUCCESS | PARTIAL | BLOCKED | FAILED]
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
skill_version: 7.5.0
|
|
253
|
+
runtime_version: 1
|
|
254
|
+
schema_version: 2
|
|
255
|
+
---
|
|
256
|
+
|
|
257
|
+
|
|
258
|
+
---
|
|
259
|
+
|
|
260
|
+
## Escalation Rules
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
---
|
|
264
|
+
|
|
265
|
+
## Severity
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
---
|
|
269
|
+
|
|
270
|
+
## Retry Policy
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
---
|
|
274
|
+
## Exit Codes
|
|
275
|
+
|
|
276
|
+
| Code | Meaning | When |
|
|
277
|
+
|------|---------|------|
|
|
278
|
+
| SUCCESS | Component built, all 10 anti-slop checks passed | Production ready |
|
|
279
|
+
| PARTIAL | Built but 1–2 minor gaps (e.g., animation skipped) | User review recommended |
|
|
280
|
+
| BLOCKED | DESIGN.md or design reference missing | Cannot build |
|
|
281
|
+
| FAILED | Anti-slop audit finds > 2 violations or hardcoded values | Rebuild required |
|
|
282
|
+
|
|
283
|
+
---
|
|
284
|
+
|
|
285
|
+
|
package/skills/qk-docs/SKILL.md
CHANGED
|
@@ -1,40 +1,198 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: qk-docs
|
|
3
|
-
category: documentation
|
|
4
|
-
version: 7.
|
|
5
|
-
description: "Viết và duy trì tài liệu
|
|
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
|
-
|
|
1
|
+
---
|
|
2
|
+
name: qk-docs
|
|
3
|
+
category: documentation
|
|
4
|
+
version: 7.5.0
|
|
5
|
+
description: "Viết và duy trì tài liệu chính xác tuyệt đối — phải match code thực tế, cấm bịa đặt."
|
|
6
|
+
platforms: [antigravity, claude-code, cursor, windsurf, kilo-code]
|
|
7
|
+
execution_mode: deterministic
|
|
8
|
+
cost: low
|
|
9
|
+
latency: fast
|
|
10
|
+
risk: low
|
|
11
|
+
side_effects: edit_files
|
|
12
|
+
produces: [report]
|
|
13
|
+
consumes: [source-code]
|
|
14
|
+
token_budget:
|
|
15
|
+
max_files_read: 3
|
|
16
|
+
max_lines_per_read: 100
|
|
17
|
+
max_shell_commands: 0
|
|
18
|
+
stop_early: true
|
|
19
|
+
exit_codes: [SUCCESS, BLOCKED, FAILED, PARTIAL]
|
|
20
|
+
skill_version: 7.5.0
|
|
21
|
+
runtime_version: 1
|
|
22
|
+
schema_version: 2
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
# qk-docs — Technical Writer & Documentation Maintainer
|
|
26
|
+
|
|
27
|
+
> **Language rule:** Code, identifiers, file names ? English. Explanations, summaries ? Vietnamese.
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Preconditions
|
|
32
|
+
- [ ] Target code file or module is specified
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
On missing precondition:
|
|
36
|
+
EXIT: BLOCKED
|
|
37
|
+
Message: "Chỉ định file cần viết docs."
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Scope
|
|
43
|
+
- ✅ Document ONLY what exists in code — never invent params/behavior
|
|
44
|
+
- ✅ Update docs whenever corresponding code changes
|
|
45
|
+
- ✅ Use living documentation (JSDoc/TSDoc/Swagger) over isolated Markdown
|
|
46
|
+
|
|
47
|
+
## Non-Goals
|
|
48
|
+
- ❌ Guess API params not in the code
|
|
49
|
+
- ❌ Write generic/useless comments (`// gets the user`)
|
|
50
|
+
- ❌ Write docs for code that hasn't been read yet
|
|
51
|
+
|
|
52
|
+
---
|
|
53
|
+
|
|
54
|
+
## Priority Order
|
|
55
|
+
| P | Task | Skip Threshold |
|
|
56
|
+
|---|------|----------------|
|
|
57
|
+
| P1 | Read source code first (never write before reading) | Never |
|
|
58
|
+
| P2 | Document public API (exported functions/classes) | Never |
|
|
59
|
+
| P3 | Document complex logic with WHY (not WHAT) | Budget < 40% |
|
|
60
|
+
| P4 | Update README if public interface changed | Budget < 60% |
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Workflow
|
|
65
|
+
|
|
66
|
+
### Phase 1 — Read Code
|
|
67
|
+
1. `view_file[targeted]` — read function/class signatures
|
|
68
|
+
2. Identify: params, return type, side effects, error cases
|
|
69
|
+
|
|
70
|
+
**Decision:** `IF code is not readable → EXIT: BLOCKED — read code first`
|
|
71
|
+
|
|
72
|
+
### Phase 2 — Write Documentation
|
|
73
|
+
1. JSDoc/TSDoc format for functions: `@param`, `@returns`, `@throws`
|
|
74
|
+
2. Comment: WHY (not WHAT) — code already shows what
|
|
75
|
+
3. Example usage for complex APIs
|
|
76
|
+
|
|
77
|
+
### Phase 3 — Verify Accuracy
|
|
78
|
+
1. Re-read written docs vs code → spot check each param name
|
|
79
|
+
|
|
80
|
+
**Decision:**
|
|
81
|
+
```
|
|
82
|
+
IF docs match code exactly → EXIT: SUCCESS
|
|
83
|
+
IF any param name or type mismatch → fix immediately
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Documentation Templates
|
|
89
|
+
|
|
90
|
+
### Function (JSDoc)
|
|
91
|
+
```typescript
|
|
92
|
+
/**
|
|
93
|
+
* [One sentence — what it does and WHY it exists]
|
|
94
|
+
*
|
|
95
|
+
* @param {Type} paramName - [description]
|
|
96
|
+
* @returns {Type} [description of return value]
|
|
97
|
+
* @throws {ErrorType} [when this error is thrown]
|
|
98
|
+
* @example
|
|
99
|
+
* const result = functionName(arg);
|
|
100
|
+
*/
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
### README Section
|
|
104
|
+
```markdown
|
|
105
|
+
## [Feature Name]
|
|
106
|
+
[What it does — user-facing description]
|
|
107
|
+
|
|
108
|
+
### Usage
|
|
109
|
+
[Code example]
|
|
110
|
+
|
|
111
|
+
### Configuration
|
|
112
|
+
| Option | Type | Default | Description |
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## Evidence Format
|
|
118
|
+
```
|
|
119
|
+
[SEVERITY] path/to/file.ts:LINE
|
|
120
|
+
Issue: [MISSING_PARAM | WRONG_TYPE | STALE_DOC | GENERIC_COMMENT]
|
|
121
|
+
Confidence: HIGH
|
|
122
|
+
Fix: [specific correction]
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
---
|
|
126
|
+
|
|
127
|
+
## Exit Codes
|
|
128
|
+
| Code | Meaning | When |
|
|
129
|
+
|------|---------|------|
|
|
130
|
+
| SUCCESS | Docs written and verified against source code | Execution complete |
|
|
131
|
+
| PARTIAL | Docs written but some parts inferred (not verified) | MEDIUM confidence |
|
|
132
|
+
| BLOCKED | Target source file missing or inaccessible | Cannot read source |
|
|
133
|
+
| FAILED | Documentation fundamentally misrepresents the code | Gross error |
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## Confidence Model
|
|
138
|
+
| Level | Condition | Action |
|
|
139
|
+
|-------|-----------|--------|
|
|
140
|
+
| HIGH | Target code read, behavior understood | Write docs definitively |
|
|
141
|
+
| MEDIUM | Target code too large, inferred from types/tests | Write with disclaimer |
|
|
142
|
+
| LOW | "Write docs for this feature" without pointing to code | EXIT: BLOCKED |
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
## Severity
|
|
147
|
+
| Level | Definition | Example |
|
|
148
|
+
|-------|-----------|---------|
|
|
149
|
+
| CRITICAL | Docs instruct user to do something dangerous | Documenting destructive API without warnings |
|
|
150
|
+
| HIGH | API params documented incorrectly | Says string instead of object |
|
|
151
|
+
| MEDIUM | Missing docs for edge cases | Doesn't explain error throws |
|
|
152
|
+
| LOW | Typo or poor formatting | Misaligned markdown table |
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
|
|
156
|
+
## Retry Policy
|
|
157
|
+
```
|
|
158
|
+
Doc verification fails
|
|
159
|
+
└─ Target code changed during doc writing
|
|
160
|
+
├─ Re-read target code
|
|
161
|
+
└─ Do NOT retry more than 1 time
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
## Escalation Rules
|
|
167
|
+
```
|
|
168
|
+
BLOCKED: Target source file missing
|
|
169
|
+
Missing:
|
|
170
|
+
- Exact path to the code that needs documenting
|
|
171
|
+
Questions:
|
|
172
|
+
1. File code nào bạn muốn viết doc? (Xin đường dẫn)
|
|
173
|
+
2. Mục tiêu của doc này là cho user hay cho developer nội bộ?
|
|
174
|
+
Recommended Assumptions:
|
|
175
|
+
- Developer-facing JSDoc if inside source files
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
---
|
|
179
|
+
|
|
180
|
+
## Handoff Contract
|
|
181
|
+
### Consumes
|
|
182
|
+
```json
|
|
183
|
+
{
|
|
184
|
+
"from": "user",
|
|
185
|
+
"required_fields": ["target_file", "doc_type"],
|
|
186
|
+
"optional_fields": ["context"]
|
|
187
|
+
}
|
|
188
|
+
```
|
|
189
|
+
### Produces
|
|
190
|
+
```json
|
|
191
|
+
{
|
|
192
|
+
"to": "user",
|
|
193
|
+
"output_fields": ["updated_files", "exit_code"]
|
|
194
|
+
}
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
---
|
|
198
|
+
|