ai-developer-skill-os 9.1.1 → 9.3.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.
Files changed (63) hide show
  1. package/.agents/AGENTS.md +139 -42
  2. package/.agents/DEV_PROFILE.md +95 -0
  3. package/.agents/registry/capability-graph.yml +171 -334
  4. package/.agents/registry/graph.json +52 -18
  5. package/.agents/registry/index.yaml +66 -12
  6. package/.agents/registry/skills-index.yml +204 -447
  7. package/.agents/rules/coding.md +23 -0
  8. package/.agents/rules/global.md +44 -30
  9. package/.agents/skills/_template/SKILL.md +2 -300
  10. package/.agents/skills/qk-access-policy/SKILL.md +98 -393
  11. package/.agents/skills/qk-agent-observability/SKILL.md +3 -359
  12. package/.agents/skills/qk-ai-builder/SKILL.md +132 -485
  13. package/.agents/skills/qk-api-consumer/SKILL.md +256 -0
  14. package/.agents/skills/qk-api-consumer/capability.yaml +21 -0
  15. package/.agents/skills/qk-api-consumer/evals/scorecard.yaml +29 -0
  16. package/.agents/skills/qk-api-lifecycle/SKILL.md +133 -376
  17. package/.agents/skills/qk-bug-resolution/SKILL.md +128 -481
  18. package/.agents/skills/qk-code-review/SKILL.md +142 -340
  19. package/.agents/skills/qk-context-loader/SKILL.md +99 -391
  20. package/.agents/skills/qk-data-engineer/SKILL.md +253 -0
  21. package/.agents/skills/qk-data-lifecycle/SKILL.md +89 -408
  22. package/.agents/skills/qk-db-optimizer/SKILL.md +102 -408
  23. package/.agents/skills/qk-design-system-engineering/SKILL.md +76 -381
  24. package/.agents/skills/qk-devops-platform/SKILL.md +77 -383
  25. package/.agents/skills/qk-docs/SKILL.md +88 -414
  26. package/.agents/skills/qk-engineering-standard/SKILL.md +4 -508
  27. package/.agents/skills/qk-fe-api-integration/SKILL.md +343 -263
  28. package/.agents/skills/qk-fe-api-integration/evals/scorecard.yaml +29 -29
  29. package/.agents/skills/qk-feature-delivery/SKILL.md +137 -365
  30. package/.agents/skills/qk-feature-delivery/evals/scorecard.yaml +1 -1
  31. package/.agents/skills/qk-frontend-architecture/SKILL.md +5 -399
  32. package/.agents/skills/qk-help/evals/scorecard.yaml +13 -13
  33. package/.agents/skills/qk-orchestrator/SKILL.md +63 -422
  34. package/.agents/skills/qk-orchestrator/references/routing-table.md +10 -14
  35. package/.agents/skills/qk-product-specification/SKILL.md +70 -399
  36. package/.agents/skills/qk-production-release/SKILL.md +80 -457
  37. package/.agents/skills/qk-project-audit/SKILL.md +174 -0
  38. package/.agents/skills/qk-project-bootstrap/SKILL.md +244 -392
  39. package/.agents/skills/qk-project-health/SKILL.md +97 -416
  40. package/.agents/skills/qk-project-memory/SKILL.md +76 -21
  41. package/.agents/skills/qk-refactor/SKILL.md +167 -304
  42. package/.agents/skills/qk-security-audit/SKILL.md +141 -383
  43. package/.agents/skills/qk-security-audit/capability.yaml +1 -2
  44. package/.agents/skills/qk-system-evolution/SKILL.md +343 -263
  45. package/.agents/skills/qk-system-evolution/evals/scorecard.yaml +26 -26
  46. package/.agents/skills/qk-test-engineering/SKILL.md +119 -429
  47. package/.agents/skills/qk-ui-audit/SKILL.md +73 -457
  48. package/.agents/skills/qk-ui-builder/SKILL.md +521 -482
  49. package/.agents/skills/qk-ui-system-builder/SKILL.md +68 -434
  50. package/.agents/skills/qk-upgrade/SKILL.md +301 -0
  51. package/.agents/skills/qk-upgrade/capability.yaml +24 -0
  52. package/.agents/skills/qk-upgrade/evals/scorecard.yaml +26 -0
  53. package/.agents/skills/qk-validation-gate/SKILL.md +4 -523
  54. package/.agents/skills/qk-web-quality-gate/SKILL.md +85 -383
  55. package/.agents/workflows/bug-resolution.yml +6 -6
  56. package/.agents/workflows/context-discovery.yml +94 -0
  57. package/.agents/workflows/feature-delivery.yml +8 -4
  58. package/.agents/workflows/refactor.yml +6 -3
  59. package/.agents/workflows/shared/quality-gate.yml +94 -0
  60. package/.agents/workflows/skin-governance.yml +115 -0
  61. package/README.md +152 -67
  62. package/package.json +2 -2
  63. package/tooling/build-registry.js +30 -8
@@ -0,0 +1,253 @@
1
+ ---
2
+ # ── Identity ───────────────────────────────────────────────
3
+ name: qk-data-engineer
4
+ version: 9.2.0
5
+ status: stable
6
+ description: "Thiết kế và implement data pipeline với best practices: idempotency, data quality gate, lineage, incremental processing. Dùng skill này khi user nhắc đến: data pipeline, etl, elt, dbt, dbt model, airflow dag, spark job, medallion architecture, data quality, incremental load, schema evolution, backfill, data warehouse — kể cả khi chỉ nói \"load data từ X sang Y\"."
7
+ platforms: [antigravity, claude-code, cursor, windsurf, kilo-code]
8
+
9
+ # ── V9: Classification ─────────────────────────────────────
10
+ type: capability
11
+
12
+ intent:
13
+ - data-pipeline
14
+ - data-modeling
15
+ - data-quality
16
+ - etl-optimization
17
+
18
+ complexity:
19
+ level: high
20
+ criteria:
21
+ files_affected: "1-15"
22
+ has_behavior_change: true
23
+ has_external_dependency: true
24
+ has_breaking_change: false
25
+
26
+ triggers:
27
+ - "data pipeline"
28
+ - "etl"
29
+ - "elt"
30
+ - "dbt"
31
+ - "dbt model"
32
+ - "airflow dag"
33
+ - "spark job"
34
+ - "medallion architecture"
35
+ - "data quality"
36
+ - "incremental load"
37
+ - "schema evolution"
38
+ - "backfill"
39
+ - "data warehouse"
40
+
41
+ selection:
42
+ priority: high
43
+ confidence_threshold: 0.85
44
+
45
+ # ── V8: References ─────────────────────────────────────────
46
+ workflow: feature-delivery
47
+
48
+ rules:
49
+ - global
50
+ - coding
51
+ - safety
52
+
53
+ tools:
54
+ - filesystem
55
+ - terminal
56
+
57
+ related_skills:
58
+ - qk-data-lifecycle
59
+ - qk-db-optimizer
60
+
61
+ knowledge_scope:
62
+ owns:
63
+ - data-pipeline-architecture
64
+ - data-contracts
65
+ - data-quality-gate
66
+ - incremental-processing
67
+ references:
68
+ - architecture
69
+ - security
70
+ - performance
71
+
72
+ # ── V8: Verification ───────────────────────────────────────
73
+ verification:
74
+ required: true
75
+ strategy: feature
76
+
77
+ examples: []
78
+ learnings: []
79
+
80
+ # ── V7 Runtime ─────────────────────────────────────────────
81
+ execution_mode: deterministic
82
+ cost: high
83
+ latency: medium
84
+ risk: high
85
+ side_effects: edit_files
86
+ produces: [code, schema, report]
87
+ consumes:
88
+ - user-request
89
+ - project-source-code
90
+ - project-config
91
+ - project-tests
92
+ - project-documentation
93
+ - project-memory
94
+
95
+ token_budget:
96
+ max_files_read: 20
97
+ max_lines_per_read: 200
98
+ max_shell_commands: 10
99
+ stop_early: true
100
+
101
+ exit_codes: [SUCCESS, BLOCKED, FAILED, PARTIAL]
102
+ ---
103
+
104
+ # qk-data-engineer — Universal Data Engineer
105
+
106
+ > **Language rule:** Code, identifiers, file names → English. Explanations, summaries → Vietnamese.
107
+
108
+ Chịu trách nhiệm thiết kế và hiện thực hóa các đường ống dữ liệu (Data Pipelines: ETL/ELT) tuân thủ nghiêm ngặt 4 trụ cột kỹ thuật dữ liệu: **Idempotency (Tính lũy thừa) → Data Quality Gate (Cổng kiểm tra chất lượng) → Lineage (Nguồn gốc luồng dữ liệu) → Incremental Processing (Xử lý gia tăng)**.
109
+
110
+ ---
111
+
112
+ ## Preconditions
113
+
114
+ Trước khi xây dựng hoặc cập nhật pipeline dữ liệu, AI BẮT BUỘC kiểm tra:
115
+
116
+ - [ ] Xác định Data stack từ `.agents/DEV_PROFILE.md` (Orchestrator: Airflow/Prefect, Warehouse: BigQuery/Snowflake/Postgres, Transformation: dbt/Spark/Pandas).
117
+ - [ ] Xác định chiến lược Idempotency (Upsert, Merge, Partition overwrite, Watermarking).
118
+ - [ ] Xác định ngưỡng Data Quality Gates (Null check, Uniqueness, Volume anomaly, Freshness).
119
+ - [ ] Nếu pipeline không có cơ chế Idempotent (chạy lại gây duplicate dữ liệu) hoặc thiếu validation:
120
+ → **EXIT: BLOCKED**
121
+ → Báo cáo user yêu cầu xác định deduplication key / partition strategy trước khi code.
122
+
123
+ ---
124
+
125
+ ## Scope
126
+
127
+ ✅ Skill này làm:
128
+ - Thiết kế và cài đặt dbt models (Staging → Intermediate → Marts), Spark jobs, Airflow DAGs.
129
+ - Cấu hình chiến lược Incremental load (Timestamp watermarking, CDC, Partition replacement).
130
+ - Thiết lập Data Quality Assertions (dbt tests, Great Expectations, Soda checks).
131
+ - Quản lý Schema Evolution (thay đổi cột an toàn, chống silent failure / schema drift).
132
+ - Viết tài liệu Lineage và từ điển dữ liệu (Data Dictionary).
133
+
134
+ ❌ Skill này KHÔNG làm:
135
+ - Thiết kế UI Dashboard hay biểu đồ trên web app (→ `qk-ui-builder`).
136
+ - Viết CRUD REST API cho web backend thông thường (→ `qk-api-lifecycle`).
137
+ - Quản lý hạ tầng cụm máy chủ vật lý / Kafka cluster (→ `qk-devops-platform`).
138
+
139
+ ---
140
+
141
+ ## Execution Steps
142
+
143
+ ### Step 1 — Source Analysis & Data Contract
144
+ ```
145
+ Inputs: Yêu cầu pipeline từ user, Source schema, Volume ước tính
146
+ Actions:
147
+ - Phân tích cấu trúc nguồn dữ liệu (Source freshness, Primary keys, Update timestamps).
148
+ - Thỏa thuận Data Contract giữa nhà cung cấp dữ liệu và Data Warehouse.
149
+ - Xác định partition strategy (theo date/hour) và clustering keys.
150
+ Output: Pipeline Architectural Plan & Contract
151
+ ```
152
+
153
+ ### Step 2 — Transformation & Idempotent Logic
154
+ ```
155
+ Inputs: Contract, Tech stack
156
+ Actions:
157
+ - Viết code transformation (SQL/Python/PySpark) chia theo các tầng Medallion (Bronze/Silver/Gold).
158
+ - Đảm bảo logic tính toán có tính lũy thừa (Idempotent): rerun nhiều lần không thay đổi kết quả.
159
+ - Tối ưu hóa câu query xử lý dữ liệu lớn (Pruning partitions, tránh full table scan).
160
+ Output: Transformation scripts & Models
161
+ ```
162
+
163
+ ### Step 3 — Quality Gates & Anomaly Checks
164
+ ```
165
+ Inputs: Transformation scripts
166
+ Actions:
167
+ - Thêm tests bắt buộc: Not null, Unique, Referential integrity (Foreign keys).
168
+ - Thêm row count checks và freshness sensors để phát hiện dữ liệu rỗng bất thường.
169
+ - Cấu hình cơ chế cảnh báo (Alert) khi chất lượng dữ liệu không đạt chuẩn.
170
+ Output: Test suite & Monitoring rules
171
+ ```
172
+
173
+ ### Step 4 — Verification & Dry Run
174
+ ```
175
+ Inputs: Pipeline code & Quality tests
176
+ Actions:
177
+ - Kiểm tra cú pháp, compile SQL/dbt models.
178
+ - Xác nhận kế hoạch backfill dữ liệu lịch sử an toàn.
179
+ Exit: SUCCESS nếu pipeline bảo đảm tính idempotent và pass mọi quality gates.
180
+ ```
181
+
182
+ ---
183
+
184
+ ## Prompt Template
185
+
186
+ AI đọc `DEV_PROFILE.md` để biết data stack (pipeline/warehouse/format/broker).
187
+ Mô tả pipeline cần làm — AI sẽ thiết kế theo đúng tool đang dùng.
188
+
189
+ ```
190
+ Pipeline: [Tên pipeline / DAG / job]
191
+ Source: [Nguồn dữ liệu: DB / API / file / stream / ...]
192
+ Destination: [Đích: warehouse / data lake / another DB / ...]
193
+ Frequency: [Batch daily / hourly / streaming / event-driven]
194
+ Volume: [Số rows / GB ước tính mỗi lần chạy]
195
+ SLA: [Data phải có mặt lúc mấy giờ? Latency tối đa?]
196
+ Rules: [Idempotency, dedup, schema evolution, data quality gate]
197
+ ```
198
+
199
+ ---
200
+
201
+ ### Ví dụ theo tech stack:
202
+
203
+ **dbt + BigQuery + Airflow**
204
+ ```
205
+ Pipeline: daily_order_metrics
206
+ Source: PostgreSQL (production DB) — bảng orders, order_items, products
207
+ Destination: BigQuery dataset: mart — table: fct_order_metrics
208
+ Frequency: Daily batch lúc 3AM UTC
209
+ Volume: ~50k rows/ngày, tăng trưởng 10%/tháng
210
+ SLA: Data sẵn sàng trước 6AM UTC cho dashboard
211
+ Rules: - Idempotent: re-run ngày bất kỳ cho kết quả giống nhau
212
+ - Không load ngày hiện tại (incomplete data)
213
+ - Alert nếu row count giảm > 20% so với 7 ngày trước
214
+ - Schema thay đổi ở source → fail loud, không silent corrupt
215
+ ```
216
+ → AI thiết kế: dbt model layers (staging → intermediate → mart),
217
+ Airflow DAG với sensor check source freshness, incremental model strategy
218
+ (merge key = order_id + date), dbt test (not_null, unique, accepted_values),
219
+ partition by date trên BQ để tránh full scan, audit log table.
220
+
221
+ **Spark + Delta Lake + Databricks**
222
+ ```
223
+ Pipeline: clickstream_sessionization
224
+ Source: Kafka topic: user.clicks — ~5M events/ngày
225
+ Destination: Delta Lake: /data/gold/user_sessions
226
+ Frequency: Micro-batch mỗi 5 phút (Structured Streaming)
227
+ Volume: ~3.5GB/ngày raw
228
+ SLA: Session data available trong vòng 10 phút kể từ event
229
+ Rules: - Session timeout: 30 phút không activity
230
+ - Exactly-once processing
231
+ - Backfill safe (có thể re-process từ Kafka offset)
232
+ ```
233
+ → AI thiết kế: Spark Structured Streaming với watermark cho late data,
234
+ session window aggregation, Delta Lake MERGE cho upsert sessions,
235
+ checkpoint location strategy, schema enforcement + evolution,
236
+ Z-ORDER optimization cho query patterns, monitoring (lag metrics).
237
+
238
+ **Airbyte + dbt + Snowflake**
239
+ ```
240
+ Pipeline: crm_sync — Salesforce → Snowflake → mart
241
+ Source: Salesforce (Airbyte connector) — objects: Account, Opportunity, Contact
242
+ Destination: Snowflake RAW → STAGING → MART
243
+ Frequency: Airbyte sync mỗi 1 giờ, dbt transform mỗi 2 giờ
244
+ Volume: ~500k records total, delta ~2k/ngày
245
+ SLA: CRM data lag tối đa 3 giờ so với Salesforce
246
+ Rules: - Không xóa hard delete từ source (soft delete pattern)
247
+ - PII fields (email, phone) phải masked trong MART layer
248
+ - Lineage từ Salesforce ID phải traceable đến mart row
249
+ ```
250
+ → AI thiết kế: Airbyte connection config + normalization settings,
251
+ dbt source freshness test, PII masking macro, soft-delete handling
252
+ (dbt snapshot vs custom), column-level lineage documentation,
253
+ Snowflake role-based access cho MART vs RAW.