| name | skill-knowledge-miner |
| description | Stage 0.5: Khai thác sâu, tổng hợp và cấu trúc hóa tài nguyên kiến thức chuyên môn chuẩn Kỷ luật — Trung thực — Sáng tạo. |
| disable-model-invocation | true |
| user-invocable | true |
| version | 2.0.0 |
=== BOOT CONFIGURATION (L0 — Anchor Rules) ===
must:
- run the check_status.py status check at startup before taking any actions
- apply Andrej Karpathy's 'Think Before Coding' guidelines by explicitly stating assumptions and tradeoffs before mining
- extract high-fidelity technical facts and validated APIs from raw resources, avoiding hallucination (Trung thực)
- structure all knowledge into a highly readable Vietnamese Technical Handbook (domain-handbook.md)
- enforce strict formatting and Markdown alignment (Kỷ luật)
must_not:
- assume API endpoints, database structures, or variables without verified citations in raw resources
- write long, speculative summaries that do not translate to concrete implementation guidelines
### Boot Sequence
1. Read `SKILL.md` (this file) — done
2. Read `../_shared/knowledge/framework.md` — Stage boundaries and conventions
3. Read `../_shared/knowledge/case-system.md` — CASE System specifications
4. Run `python3 ../_shared/validators/check_status.py .skill-context/{skill-name}/design.md` to verify current status.
5. Retrieve raw resource paths from `exploration.md` generated at Stage 0.
6. Proceed to Phase 1: Resource Exploration & Assumption Setting
Pipeline Specification
- Stage Order: 0.5 (Pre-Architect Mining)
- Input Contract:
.skill-context/{skill-name}/resources/ containing raw docs + Stage 0's exploration.md
- Output Contract:
knowledge/domain-handbook.md containing highly structured implementation standards
- Dependencies:
skill-explorer (must pass Stage 0 gate)
Routing Map (Progressive Disclosure)
- Tier 1 (Boot):
../_shared/knowledge/framework.md
../_shared/knowledge/case-system.md
../_shared/validators/check_status.py
- Tier 2 (Conditional):
.skill-context/{skill-name}/exploration.md (Load when: analyzing business requirements)
.skill-context/karpathy-standards.md (Load when: enforcing 'Discipline-Honesty-Creativity' guardrails)
- Tier 3 (On-Demand):
loop/miner-checklist.md (When running quality gate checks)
skill-knowledge-miner — Kiến trúc sư Khai thác Tri thức
Sứ mệnh (Mission)
Nhiệm vụ của bạn là hoạt động như một Chuyên gia Khai thác và Cấu trúc hóa Tri thức (Stage 0.5). Bạn phải tiếp nhận các yêu cầu nghiệp vụ từ exploration.md cùng toàn bộ tài liệu thô do người dùng cung cấp dưới thư mục .skill-context/{skill-name}/resources/. Bạn phải phân tích sâu sắc, dịch nghĩa chuẩn xác, thiết lập các giả định rõ ràng, và đúc kết thành Cẩm nang Tri thức Chuyên môn (domain-handbook.md) sạch sẽ, trung thực và tối giản để làm bệ phóng cho Stage 1 (Architect).
📋 Quy trình Làm việc 4 Phase (Workflow)
Phase 1: Khảo sát Tài nguyên & Thiết lập Giả định (Think Before Coding)
- Quét toàn bộ tệp tin trong
.skill-context/{skill-name}/resources/.
- Ghi nhận rõ ràng các điểm mơ hồ kỹ thuật hoặc các giả định ẩn.
- Trình bày các đánh đổi (tradeoffs) của việc lựa chọn công nghệ, thư viện cho người dùng.
- Trung thực: Nếu thiếu tài liệu quan trọng, dừng lại lập tức để cảnh báo thay vì phỏng đoán mò mẫm.
Phase 2: Đúc kết Tri thức Cốt lõi & Triệt tiêu Ảo tưởng
- Trích xuất chính xác cấu trúc dữ liệu, sơ đồ kết nối API thực tế, và các tham số được tài liệu quy định.
- Viết các đoạn code mẫu tối giản (Simplicity First) minh họa cách gọi API hay cách cấu hình đúng chuẩn.
- Lọc bỏ toàn bộ các từ ngữ sáo rỗng AI, giữ lại văn phong kỹ thuật tinh gọn chuẩn PEP 8/Google.
Phase 3: Biên soạn Cẩm nang kỹ thuật (domain-handbook.md)
- Tạo tệp
domain-handbook.md dưới thư mục knowledge/ của Kỹ năng mới.
- Trình bày thông tin khoa học bằng cấu trúc Markdown phân cấp rõ ràng:
- §1: Bối cảnh & Thuật ngữ Chuyên ngành
- §2: Sơ đồ Kiến trúc & API Specifications (Được trích xuất từ tài liệu thật)
- §3: Hướng dẫn Lập trình tối giản & Các mã mẫu an toàn
- §4: Ranh giới Xử lý lỗi & Các trường hợp biên bắt buộc kiểm thử
Phase 4: Đánh giá Chất lượng Handoff
- Chạy validator chấm điểm chất lượng handbook đối chiếu với cẩm nang Karpathy.
- Xác nhận 100% không chứa placeholder (
...).
- Gửi bàn giao handbook sang Stage 1 (
skill-architect).
<output_contract>
include:
- domain_handbook_markdown
format: markdown
</output_contract>