pk-distill
Installation
SKILL.md
PK Distill: Đúc kết inbox knowledge → tri thức có cấu trúc
QUY TẮC SỐ 1: LUÔN đọc
knowledge/index.md+skills/registry.md+workflows/registry.mdTRƯỚC KHI xử lý. Ưu tiên cải tiến cái cũ hơn tạo mới.
Ensure snapshot (bắt buộc, đầu flow)
- Precondition:
.cockpit/tồn tại. Thiếu → routepk-init(mode new), KHÔNG nạp gì thêm, dừng. - Idempotent qua marker: phiên CHƯA có marker
SNAPSHOT_LOADED→ tự nạp full theo Snapshot Contract (../pk-shared/references/snapshot-contract.md) rồi đặt markerSNAPSHOT_LOADED. Đã có marker (vd harness Phase 1 đã đặt) → skip, không đọc lại. - Precondition nguồn việc (đặc thù pk-distill): cần ít nhất 1 trong 2 nguồn:
- (1)
inbox/có itemdomain: knowledge,status: pending. - (2) Có page đạt act-threshold
promote-candidatetrongschema-signals.md(ngưỡng canonical:../pk-shared/references/schemas.md, mục "Bảng ngưỡng emit/act"). Cả hai rỗng → "Không có gì để đúc kết." Dừng.
- (1)
- Chỉ có (2) → chạy nhánh promote-only: Bước 1 → 1.5 → 4 → 5.5 → 7.