ai-developer-skill-os 8.2.1 → 8.3.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/LICENSE +21 -21
- package/.agents/README.md +90 -90
- package/.agents/docs/CHI_TIET_SKILLS.md +125 -125
- package/.agents/docs/MIGRATION-CLEANUP-V8.1.3.md +36 -36
- package/.agents/docs/MIGRATION-STATUS.md +35 -35
- package/.agents/docs/MIGRATION-V8.md +10 -10
- package/.agents/docs/V8-CERTIFICATION.md +27 -27
- package/.agents/docs/decisions/ADR-001-v8-migration.md +58 -58
- package/.agents/docs/decisions/ADR-002-workflow-separation.md +50 -50
- package/.agents/docs/decisions/ADR-003-registry-generated.md +54 -54
- package/.agents/docs/decisions/ADR-008-skill-boundary-review.md +27 -27
- package/.agents/registry/capability-graph.yml +67 -25
- package/.agents/registry/graph.json +135 -256
- package/.agents/registry/index.yaml +68 -95
- package/.agents/registry/skills-index.yml +548 -525
- package/.agents/rules/anti-patterns.md +45 -0
- package/.agents/rules/coding.md +10 -0
- package/.agents/rules/command-safety.md +37 -14
- package/.agents/rules/priorities.yml +13 -2
- package/.agents/rules/security.md +47 -7
- package/.agents/rules/skill-quality.md +32 -8
- package/.agents/skills/_template/SKILL.md +133 -132
- package/.agents/skills/_template/capability.yaml +22 -8
- package/.agents/skills/_template/evals/scorecard.yaml +19 -19
- package/.agents/skills/qk-access-policy/SKILL.md +5 -2
- package/.agents/skills/qk-access-policy/capability.yaml +23 -0
- package/.agents/skills/qk-access-policy/evals/scorecard.yaml +36 -0
- package/.agents/skills/qk-agent-observability/SKILL.md +112 -1
- package/.agents/skills/qk-agent-observability/capability.yaml +29 -0
- package/.agents/skills/qk-agent-observability/evals/scorecard.yaml +29 -0
- package/.agents/skills/qk-agent-observability/references/scorecard.yaml +80 -0
- package/.agents/skills/qk-ai-builder/SKILL.md +75 -6
- package/.agents/skills/qk-ai-builder/capability.yaml +23 -0
- package/.agents/skills/qk-ai-builder/evals/scorecard.yaml +30 -0
- package/.agents/skills/qk-api-lifecycle/SKILL.md +5 -3
- package/.agents/skills/qk-api-lifecycle/capability.yaml +23 -0
- package/.agents/skills/qk-api-lifecycle/evals/scorecard.yaml +29 -0
- package/.agents/skills/qk-bug-resolution/SKILL.md +4 -22
- package/.agents/skills/qk-bug-resolution/capability.yaml +25 -0
- package/.agents/skills/qk-bug-resolution/evals/scorecard.yaml +30 -0
- package/.agents/skills/qk-code-review/SKILL.md +188 -186
- package/.agents/skills/qk-code-review/capability.yaml +23 -0
- package/.agents/skills/qk-code-review/evals/scorecard.yaml +29 -0
- package/.agents/skills/qk-context-loader/SKILL.md +4 -12
- package/.agents/skills/qk-context-loader/capability.yaml +23 -0
- package/.agents/skills/qk-context-loader/evals/scorecard.yaml +28 -0
- package/.agents/skills/qk-data-lifecycle/SKILL.md +7 -2
- package/.agents/skills/qk-data-lifecycle/capability.yaml +23 -0
- package/.agents/skills/qk-data-lifecycle/evals/scorecard.yaml +29 -0
- package/.agents/skills/qk-db-optimizer/SKILL.md +4 -3
- package/.agents/skills/qk-db-optimizer/capability.yaml +22 -0
- package/.agents/skills/qk-db-optimizer/evals/scorecard.yaml +28 -0
- package/.agents/skills/qk-design-system-engineering/SKILL.md +235 -112
- package/.agents/skills/qk-design-system-engineering/capability.yaml +25 -0
- package/.agents/skills/qk-design-system-engineering/evals/scorecard.yaml +27 -0
- package/.agents/skills/qk-devops-platform/SKILL.md +241 -117
- package/.agents/skills/qk-devops-platform/capability.yaml +29 -0
- package/.agents/skills/qk-devops-platform/evals/scorecard.yaml +28 -0
- package/.agents/skills/qk-docs/SKILL.md +4 -2
- package/.agents/skills/qk-docs/capability.yaml +23 -0
- package/.agents/skills/qk-docs/evals/scorecard.yaml +27 -0
- package/.agents/skills/qk-engineering-standard/SKILL.md +5 -76
- package/.agents/skills/qk-engineering-standard/capability.yaml +23 -0
- package/.agents/skills/qk-engineering-standard/evals/scorecard.yaml +28 -0
- package/.agents/skills/qk-engineering-standard/references/anti-patterns.md +121 -0
- package/.agents/skills/qk-engineering-standard/rules/frontend.md +1 -1
- package/.agents/skills/qk-fe-api-integration/SKILL.md +14 -33
- package/.agents/skills/qk-fe-api-integration/capability.yaml +21 -0
- package/.agents/skills/qk-fe-api-integration/evals/scorecard.yaml +29 -0
- package/.agents/skills/qk-feature-delivery/SKILL.md +54 -222
- package/.agents/skills/qk-feature-delivery/capability.yaml +24 -0
- package/.agents/skills/qk-feature-delivery/evals/scorecard.yaml +28 -0
- package/.agents/skills/qk-frontend-architecture/SKILL.md +258 -134
- package/.agents/skills/qk-frontend-architecture/capability.yaml +28 -0
- package/.agents/skills/qk-frontend-architecture/evals/scorecard.yaml +28 -0
- package/.agents/skills/qk-help/SKILL.md +23 -161
- package/.agents/skills/qk-help/capability.yaml +20 -0
- package/.agents/skills/qk-help/evals/scorecard.yaml +13 -0
- package/.agents/skills/qk-orchestrator/SKILL.md +3 -35
- package/.agents/skills/qk-orchestrator/capability.yaml +22 -0
- package/.agents/skills/qk-orchestrator/evals/scorecard.yaml +27 -0
- package/.agents/skills/qk-orchestrator/references/routing-table.md +15 -3
- package/.agents/skills/qk-product-specification/SKILL.md +253 -130
- package/.agents/skills/qk-product-specification/capability.yaml +27 -0
- package/.agents/skills/qk-product-specification/evals/scorecard.yaml +27 -0
- package/.agents/skills/qk-production-release/SKILL.md +33 -68
- package/.agents/skills/qk-production-release/capability.yaml +27 -0
- package/.agents/skills/qk-production-release/evals/scorecard.yaml +28 -0
- package/.agents/skills/qk-project-bootstrap/SKILL.md +59 -8
- package/.agents/skills/qk-project-bootstrap/capability.yaml +23 -0
- package/.agents/skills/qk-project-bootstrap/evals/scorecard.yaml +28 -0
- package/.agents/skills/qk-project-health/SKILL.md +5 -3
- package/.agents/skills/qk-project-health/capability.yaml +23 -0
- package/.agents/skills/qk-project-health/evals/scorecard.yaml +27 -0
- package/.agents/skills/qk-project-memory/SKILL.md +4 -2
- package/.agents/skills/qk-project-memory/capability.yaml +23 -0
- package/.agents/skills/qk-project-memory/evals/scorecard.yaml +27 -0
- package/.agents/skills/qk-refactor/SKILL.md +117 -0
- package/.agents/skills/qk-refactor/capability.yaml +26 -0
- package/.agents/skills/qk-refactor/evals/scorecard.yaml +27 -0
- package/.agents/skills/qk-security-audit/SKILL.md +259 -135
- package/.agents/skills/qk-security-audit/capability.yaml +30 -0
- package/.agents/skills/qk-security-audit/evals/scorecard.yaml +27 -0
- package/.agents/skills/qk-system-evolution/SKILL.md +18 -68
- package/.agents/skills/qk-system-evolution/capability.yaml +24 -0
- package/.agents/skills/qk-system-evolution/evals/scorecard.yaml +26 -0
- package/.agents/skills/qk-test-engineering/SKILL.md +262 -139
- package/.agents/skills/qk-test-engineering/capability.yaml +28 -0
- package/.agents/skills/qk-test-engineering/evals/scorecard.yaml +26 -0
- package/.agents/skills/qk-ui-audit/SKILL.md +17 -90
- package/.agents/skills/qk-ui-audit/capability.yaml +23 -0
- package/.agents/skills/qk-ui-audit/evals/scorecard.yaml +26 -0
- package/.agents/skills/qk-ui-audit/references/anti-slop-checklist.md +2 -2
- package/.agents/skills/qk-ui-builder/SKILL.md +482 -509
- package/.agents/skills/qk-ui-builder/capability.yaml +29 -0
- package/.agents/skills/qk-ui-builder/references/component-cookbook.md +455 -1191
- package/.agents/skills/qk-ui-system-builder/SKILL.md +2 -6
- package/.agents/skills/qk-ui-system-builder/capability.yaml +25 -0
- package/.agents/skills/qk-ui-system-builder/evals/scorecard.yaml +26 -0
- package/.agents/skills/qk-validation-gate/SKILL.md +1 -75
- package/.agents/skills/qk-validation-gate/capability.yaml +23 -0
- package/.agents/skills/qk-validation-gate/evals/scorecard.yaml +26 -0
- package/.agents/skills/qk-web-quality-gate/SKILL.md +232 -114
- package/.agents/skills/qk-web-quality-gate/capability.yaml +24 -0
- package/.agents/skills/qk-web-quality-gate/evals/scorecard.yaml +26 -0
- package/.agents/workflows/_schema.yml +146 -109
- package/.agents/workflows/bug-resolution.yml +121 -101
- package/.agents/workflows/code-review.yml +93 -77
- package/.agents/workflows/documentation.yml +90 -75
- package/.agents/workflows/feature-delivery.yml +120 -103
- package/.agents/workflows/production-release.yml +173 -0
- package/.agents/workflows/refactor.yml +99 -81
- package/.agents/workflows/research.yml +75 -60
- package/.agents/workflows/security-audit.yml +115 -72
- package/.agents/workflows/skill-evolution.yml +97 -65
- package/.agents/workflows/spec-driven-development.yml +87 -57
- package/CHANGELOG.md +27 -0
- package/README.md +90 -90
- package/bin/install.js +329 -179
- package/package.json +4 -2
- package/tooling/build-registry.js +186 -186
- package/tooling/fix-refactor.js +8 -0
- package/tooling/sync-versions.js +49 -0
- package/tooling/validate-graph.js +87 -87
- package/.agents/CHANGELOG.md +0 -131
- package/.agents/learnings/draft/README.md +0 -37
- package/.agents/reports/RELEASE-CHECKLIST.md +0 -29
- package/.agents/reports/architecture-audit.md +0 -13
- package/.agents/reports/graph-health.md +0 -20
- package/.agents/reports/skill-audit.md +0 -215
- package/tooling/generate-registry.js +0 -157
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Auto-generated from SKILL.md frontmatter
|
|
2
|
+
schema_version: 1
|
|
3
|
+
id: "qk-web-quality-gate"
|
|
4
|
+
version: "8.3.1"
|
|
5
|
+
description: "Kiểm toán tổng thể chất lượng Web: Accessibility (A11y), SEO, Web Performance, Security, UX Heuristics."
|
|
6
|
+
tools:
|
|
7
|
+
- "filesystem"
|
|
8
|
+
- "terminal"
|
|
9
|
+
knowledge:
|
|
10
|
+
owns:
|
|
11
|
+
- "qk-web-quality-gate"
|
|
12
|
+
references:
|
|
13
|
+
- "architecture"
|
|
14
|
+
eval:
|
|
15
|
+
scorecard: "evals/scorecard.yaml"
|
|
16
|
+
decision_boundary:
|
|
17
|
+
owns:
|
|
18
|
+
- "lighthouse audit"
|
|
19
|
+
- "accessibility review"
|
|
20
|
+
- "performance audit"
|
|
21
|
+
- "seo audit"
|
|
22
|
+
does_not_own:
|
|
23
|
+
- "ui component implementation"
|
|
24
|
+
conflicts_with: []
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
name: qk-web-quality-gate-eval
|
|
2
|
+
description: Đánh giá chất lượng tổng thể của Web (Performance, SEO, A11y, UX)
|
|
3
|
+
version: 8.3.1
|
|
4
|
+
threshold: 85 # Đảm bảo đo lường đầy đủ 4 trục chất lượng của ứng dụng Web
|
|
5
|
+
|
|
6
|
+
metrics:
|
|
7
|
+
- id: core_web_vitals_focus
|
|
8
|
+
name: Phân tích Core Web Vitals
|
|
9
|
+
description: Có đánh giá đúng các chỉ số ảnh hưởng đến trải nghiệm (LCP, CLS, INP) không?
|
|
10
|
+
weight: 40
|
|
11
|
+
criteria:
|
|
12
|
+
- Báo cáo rõ ràng về kích thước Bundle, chiến lược Lazy loading và tối ưu hình ảnh (40đ)
|
|
13
|
+
|
|
14
|
+
- id: seo_and_accessibility
|
|
15
|
+
name: Kiểm tra SEO & A11y
|
|
16
|
+
description: Web có thân thiện với bot tìm kiếm và người khuyết tật không?
|
|
17
|
+
weight: 35
|
|
18
|
+
criteria:
|
|
19
|
+
- Quét Semantic HTML, Meta tags, và các rào cản truy cập ARIA (35đ)
|
|
20
|
+
|
|
21
|
+
- id: actionable_recommendations
|
|
22
|
+
name: Khuyến nghị thực tiễn (Actionable)
|
|
23
|
+
description: Các đề xuất tối ưu có khả thi để lập trình viên thực hiện ngay không?
|
|
24
|
+
weight: 25
|
|
25
|
+
criteria:
|
|
26
|
+
- Không chỉ ra lỗi chung chung mà chỉ định rõ cách fix (vd: "Thêm loading='lazy' vào thẻ img dòng 15") (25đ)
|
|
@@ -1,109 +1,146 @@
|
|
|
1
|
-
# Workflow Schema — V8 Standard
|
|
2
|
-
# Every workflow YAML file MUST conform to this schema.
|
|
3
|
-
# Version: 8.
|
|
4
|
-
|
|
5
|
-
schema_version: 8.
|
|
6
|
-
|
|
7
|
-
# ── Required top-level fields ──────────────────────────────
|
|
8
|
-
required:
|
|
9
|
-
- name # string: workflow identifier (kebab-case)
|
|
10
|
-
- version # semver: 8.x.x
|
|
11
|
-
- description # string: one sentence
|
|
12
|
-
- owner # object: {type, maintained_by} — who owns this workflow
|
|
13
|
-
- steps # array: minimum 2 steps
|
|
14
|
-
- escalation # object: retry + on_failure
|
|
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
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
-
|
|
89
|
-
-
|
|
90
|
-
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
-
|
|
103
|
-
|
|
104
|
-
#
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
1
|
+
# Workflow Schema — V8 Standard
|
|
2
|
+
# Every workflow YAML file MUST conform to this schema.
|
|
3
|
+
# Version: 8.3.0
|
|
4
|
+
|
|
5
|
+
schema_version: 8.3.0
|
|
6
|
+
|
|
7
|
+
# ── Required top-level fields ──────────────────────────────
|
|
8
|
+
required:
|
|
9
|
+
- name # string: workflow identifier (kebab-case)
|
|
10
|
+
- version # semver: 8.x.x
|
|
11
|
+
- description # string: one sentence
|
|
12
|
+
- owner # object: {type, maintained_by} — who owns this workflow
|
|
13
|
+
- steps # array: minimum 2 steps
|
|
14
|
+
- escalation # object: retry + on_failure
|
|
15
|
+
|
|
16
|
+
# ── Optional top-level fields ───────────────────────────────
|
|
17
|
+
optional:
|
|
18
|
+
- verification_profile # string: key into verification_profiles table below
|
|
19
|
+
- triggers # array: keywords to auto-select workflow
|
|
20
|
+
- ide_binding # object: {slash_command, aliases} — maps workflow to an IDE command
|
|
21
|
+
|
|
22
|
+
# ── IDE binding field structure ─────────────────────────────
|
|
23
|
+
ide_binding_fields:
|
|
24
|
+
slash_command: # string: e.g. "/fix-bug" — primary command to invoke this workflow
|
|
25
|
+
aliases: # array: alternate strings that also trigger it
|
|
26
|
+
|
|
27
|
+
# ── Owner field structure ───────────────────────────────────
|
|
28
|
+
owner_fields:
|
|
29
|
+
type: # string: engineering | security | ux | data | devops
|
|
30
|
+
maintained_by: # string: team or person identifier
|
|
31
|
+
|
|
32
|
+
# ── Required fields per step ────────────────────────────────
|
|
33
|
+
step_required:
|
|
34
|
+
- id # string: unique within workflow (snake_case)
|
|
35
|
+
- name # string: human-readable step name
|
|
36
|
+
- purpose # string: WHAT the step achieves (not HOW)
|
|
37
|
+
- inputs # array: what this step needs to start
|
|
38
|
+
- outputs # array: what this step produces when done
|
|
39
|
+
- required # bool: true = cannot be skipped
|
|
40
|
+
|
|
41
|
+
# ── Optional fields per step ────────────────────────────────
|
|
42
|
+
step_optional:
|
|
43
|
+
- skip_if # string: condition under which step can be skipped
|
|
44
|
+
- exit_on_fail # enum: BLOCKED | PARTIAL | FAILED
|
|
45
|
+
- min_confidence # enum: HIGH | MEDIUM (default: HIGH)
|
|
46
|
+
- actions # array: hints for HOW to achieve the purpose
|
|
47
|
+
- human_checkpoint # object: {condition, message} — pause and wait for human approval before proceeding past this step
|
|
48
|
+
- context_budget # int: max lines of code that should be read in this step (prevent token overflow)
|
|
49
|
+
|
|
50
|
+
# ── Human checkpoint field structure ────────────────────────
|
|
51
|
+
human_checkpoint_fields:
|
|
52
|
+
condition: # string: when this checkpoint triggers, e.g. "any CRITICAL finding present"
|
|
53
|
+
message: # string: what to show the human when asking for approval
|
|
54
|
+
|
|
55
|
+
# ── Complexity definitions ──────────────────────────────────
|
|
56
|
+
complexity_levels:
|
|
57
|
+
low:
|
|
58
|
+
files_affected: "1"
|
|
59
|
+
has_behavior_change: false
|
|
60
|
+
has_external_dependency: false
|
|
61
|
+
has_breaking_change: false
|
|
62
|
+
examples: ["fix typo", "rename variable", "add comment"]
|
|
63
|
+
|
|
64
|
+
medium:
|
|
65
|
+
files_affected: "2-5"
|
|
66
|
+
has_behavior_change: true
|
|
67
|
+
has_external_dependency: false
|
|
68
|
+
has_breaking_change: false
|
|
69
|
+
examples: ["fix bug", "add feature to existing module", "refactor function"]
|
|
70
|
+
|
|
71
|
+
high:
|
|
72
|
+
files_affected: "5+"
|
|
73
|
+
has_behavior_change: true
|
|
74
|
+
has_external_dependency: true
|
|
75
|
+
has_breaking_change: false
|
|
76
|
+
examples: ["add new API endpoint", "database migration", "new component with state"]
|
|
77
|
+
|
|
78
|
+
critical:
|
|
79
|
+
files_affected: "many"
|
|
80
|
+
has_behavior_change: true
|
|
81
|
+
has_external_dependency: true
|
|
82
|
+
has_breaking_change: true
|
|
83
|
+
examples: ["architecture change", "breaking API change", "auth system overhaul"]
|
|
84
|
+
|
|
85
|
+
# ── Verification profiles ────────────────────────────────────
|
|
86
|
+
verification_profiles:
|
|
87
|
+
bug-fix:
|
|
88
|
+
- regression_check # Does the fix break anything else?
|
|
89
|
+
- root_cause_fixed # Is the real cause addressed (not patched)?
|
|
90
|
+
- lint_clean # No lint errors introduced
|
|
91
|
+
- test_if_available # Run related tests if they exist
|
|
92
|
+
- security_boundary_check # Ensure R-SEC-04 is respected
|
|
93
|
+
|
|
94
|
+
refactor:
|
|
95
|
+
- behavior_unchanged # External behavior identical before/after
|
|
96
|
+
- test_pass # All existing tests still pass
|
|
97
|
+
- lint_clean
|
|
98
|
+
- no_new_complexity # Cyclomatic complexity not increased
|
|
99
|
+
- anti_slop_compliance # Meets R-C-09 zero-slop standard
|
|
100
|
+
|
|
101
|
+
feature:
|
|
102
|
+
- acceptance_criteria # Does it meet the stated requirements?
|
|
103
|
+
- test_coverage # New logic has tests
|
|
104
|
+
- integration_check # Works with existing system
|
|
105
|
+
- lint_clean
|
|
106
|
+
- anti_slop_compliance # Meets R-C-09 zero-slop standard
|
|
107
|
+
- security_boundary_check # Enforces R-SEC-04
|
|
108
|
+
|
|
109
|
+
documentation:
|
|
110
|
+
- accuracy # Content matches actual code behavior
|
|
111
|
+
- completeness # All required sections present
|
|
112
|
+
- no_broken_links # References are valid
|
|
113
|
+
|
|
114
|
+
review:
|
|
115
|
+
- findings_have_evidence # Each finding has file+line+quote
|
|
116
|
+
- severity_justified # Severity level is appropriate
|
|
117
|
+
- actionable_suggestions # Each finding has a fix suggestion
|
|
118
|
+
|
|
119
|
+
security-audit:
|
|
120
|
+
- no_unverified_critical # No CRITICAL risk left without a recommendation
|
|
121
|
+
- secret_scan_complete # Secret scan actually ran, not skipped
|
|
122
|
+
- fix_confirmed # Reported vulnerabilities re-checked after remediation
|
|
123
|
+
|
|
124
|
+
skill-evolution:
|
|
125
|
+
- improvement_schema_valid # Proposal passes validate-skills.js
|
|
126
|
+
- regression_free # Success rate not lower than baseline
|
|
127
|
+
- change_justified # Each change traces to a failure_pattern
|
|
128
|
+
|
|
129
|
+
spec-driven:
|
|
130
|
+
- spec_matches_code # Implementation matches technical_spec
|
|
131
|
+
- edge_cases_covered # Edge cases from spec are handled
|
|
132
|
+
- acceptance_criteria # Verify step confirms criteria met
|
|
133
|
+
|
|
134
|
+
# ── Escalation schema ────────────────────────────────────────
|
|
135
|
+
escalation_required: true
|
|
136
|
+
escalation_fields:
|
|
137
|
+
required:
|
|
138
|
+
- max_retries # int: max retry attempts (recommended: 2)
|
|
139
|
+
- on_failure # string: what to do when all retries exhausted
|
|
140
|
+
|
|
141
|
+
# ── Exit codes ───────────────────────────────────────────────
|
|
142
|
+
exit_codes:
|
|
143
|
+
SUCCESS: "Task completed and verified"
|
|
144
|
+
BLOCKED: "Precondition not met — waiting for input"
|
|
145
|
+
FAILED: "Execution failed after max_retries"
|
|
146
|
+
PARTIAL: "Partially completed — output + reason provided"
|
|
@@ -1,101 +1,121 @@
|
|
|
1
|
-
name: bug-resolution
|
|
2
|
-
version: 8.0.0
|
|
3
|
-
description: "Pipeline chuẩn để diagnose và fix bugs theo chu trình: Observe → Hypothesize → Evidence → Patch → Verify."
|
|
4
|
-
|
|
5
|
-
owner:
|
|
6
|
-
type: engineering
|
|
7
|
-
maintained_by: qk-team
|
|
8
|
-
|
|
9
|
-
verification_profile: bug-fix
|
|
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
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
-
|
|
77
|
-
|
|
78
|
-
- "
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
- "
|
|
95
|
-
- "
|
|
96
|
-
- "
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
1
|
+
name: bug-resolution
|
|
2
|
+
version: 8.0.0
|
|
3
|
+
description: "Pipeline chuẩn để diagnose và fix bugs theo chu trình: Observe → Hypothesize → Evidence → Patch → Verify."
|
|
4
|
+
|
|
5
|
+
owner:
|
|
6
|
+
type: engineering
|
|
7
|
+
maintained_by: qk-team
|
|
8
|
+
|
|
9
|
+
verification_profile: bug-fix
|
|
10
|
+
|
|
11
|
+
triggers:
|
|
12
|
+
- "fix bug"
|
|
13
|
+
- "sửa lỗi"
|
|
14
|
+
- "error"
|
|
15
|
+
- "exception"
|
|
16
|
+
- "crash"
|
|
17
|
+
- "stack trace"
|
|
18
|
+
- "not working"
|
|
19
|
+
- "bị lỗi"
|
|
20
|
+
|
|
21
|
+
ide_binding:
|
|
22
|
+
slash_command: "/fix-bug"
|
|
23
|
+
aliases: ["/bug", "/debug"]
|
|
24
|
+
|
|
25
|
+
steps:
|
|
26
|
+
- id: observe
|
|
27
|
+
name: "Thu thập triệu chứng"
|
|
28
|
+
purpose: "Xác định chính xác bug xảy ra ở đâu và biểu hiện thế nào"
|
|
29
|
+
required: true
|
|
30
|
+
skip_if: "Stack trace + affected file đã được cung cấp đầy đủ"
|
|
31
|
+
inputs:
|
|
32
|
+
- error_message
|
|
33
|
+
- stack_trace
|
|
34
|
+
- user_description
|
|
35
|
+
outputs:
|
|
36
|
+
- affected_file
|
|
37
|
+
- affected_line_range
|
|
38
|
+
- error_signature
|
|
39
|
+
actions:
|
|
40
|
+
- "Đọc error message và stack trace"
|
|
41
|
+
- "Xác định file và line range bị ảnh hưởng"
|
|
42
|
+
- "Mô tả triệu chứng bằng ngôn ngữ kỹ thuật"
|
|
43
|
+
exit_on_fail: BLOCKED
|
|
44
|
+
|
|
45
|
+
- id: hypothesize
|
|
46
|
+
name: "Đặt giả thuyết nguyên nhân"
|
|
47
|
+
purpose: "Xác định top 3 nguyên nhân có thể, xếp theo xác suất"
|
|
48
|
+
required: true
|
|
49
|
+
skip_if: null
|
|
50
|
+
inputs:
|
|
51
|
+
- error_signature
|
|
52
|
+
- affected_file
|
|
53
|
+
outputs:
|
|
54
|
+
- hypothesis_list # Ordered list: [H1 (most likely), H2, H3]
|
|
55
|
+
- selected_hypothesis # H1 unless evidence suggests otherwise
|
|
56
|
+
min_confidence: HIGH
|
|
57
|
+
actions:
|
|
58
|
+
- "List 3 nguyên nhân có thể gây ra triệu chứng này"
|
|
59
|
+
- "Xếp hạng theo xác suất dựa trên stack trace"
|
|
60
|
+
- "Chọn H1 để kiểm chứng trước"
|
|
61
|
+
|
|
62
|
+
- id: evidence
|
|
63
|
+
name: "Tìm bằng chứng xác nhận"
|
|
64
|
+
purpose: "Xác nhận hoặc loại bỏ hypothesis bằng code thực tế"
|
|
65
|
+
required: true
|
|
66
|
+
skip_if: null
|
|
67
|
+
inputs:
|
|
68
|
+
- selected_hypothesis
|
|
69
|
+
- affected_file
|
|
70
|
+
outputs:
|
|
71
|
+
- confirmed_root_cause # File + line + quoted code
|
|
72
|
+
- evidence_quote # Exact code causing the bug
|
|
73
|
+
min_confidence: HIGH
|
|
74
|
+
context_budget: 150
|
|
75
|
+
actions:
|
|
76
|
+
- "Dùng grep_search để tìm pattern liên quan"
|
|
77
|
+
- "Dùng view_file[StartLine:EndLine] để đọc section cụ thể"
|
|
78
|
+
- "Quote chính xác đoạn code gây bug"
|
|
79
|
+
exit_on_fail: PARTIAL
|
|
80
|
+
|
|
81
|
+
- id: patch
|
|
82
|
+
name: "Áp dụng fix"
|
|
83
|
+
purpose: "Sửa root cause, không chỉ patch triệu chứng"
|
|
84
|
+
required: true
|
|
85
|
+
skip_if: null
|
|
86
|
+
inputs:
|
|
87
|
+
- confirmed_root_cause
|
|
88
|
+
- evidence_quote
|
|
89
|
+
outputs:
|
|
90
|
+
- patched_files # List of files modified
|
|
91
|
+
- diff_summary # What changed and why
|
|
92
|
+
actions:
|
|
93
|
+
- "Edit source file trực tiếp với replace_file_content hoặc multi_replace_file_content"
|
|
94
|
+
- "Không tạo wrapper script"
|
|
95
|
+
- "Không dùng ?. hoặc ! để silence lỗi"
|
|
96
|
+
- "Fix root cause, không patch bề mặt"
|
|
97
|
+
human_checkpoint:
|
|
98
|
+
condition: "file thuộc vùng auth/payment/permission/migration"
|
|
99
|
+
message: "Patch này chạm vào code nhạy cảm. Xác nhận an toàn trước khi thay đổi."
|
|
100
|
+
- id: verify
|
|
101
|
+
name: "Xác minh fix"
|
|
102
|
+
purpose: "Xác nhận bug đã được fix và không có regression"
|
|
103
|
+
required: true
|
|
104
|
+
skip_if: null
|
|
105
|
+
inputs:
|
|
106
|
+
- patched_files
|
|
107
|
+
outputs:
|
|
108
|
+
- verification_result # PASS | FAIL | PARTIAL
|
|
109
|
+
- evidence_of_fix # Re-read patched section
|
|
110
|
+
actions:
|
|
111
|
+
- "Re-read patched code section"
|
|
112
|
+
- "Chạy test liên quan nếu có"
|
|
113
|
+
- "Kiểm tra caller/dependent nếu interface thay đổi"
|
|
114
|
+
- "Đảm bảo tuân thủ R-SEC-04 (Security Boundary)"
|
|
115
|
+
- "Đảm bảo tuân thủ R-C-09 (Zero-Slop)"
|
|
116
|
+
- "Ghi log execution trace vào evals/traces/"
|
|
117
|
+
exit_on_fail: FAILED
|
|
118
|
+
|
|
119
|
+
escalation:
|
|
120
|
+
max_retries: 2
|
|
121
|
+
on_failure: "Report với full evidence chain (observe→hypothesis→evidence), escalate to human với gợi ý bước tiếp theo"
|