一键导入
okr-harness
Quản lý mục tiêu OKR. Trigger: OKR, mục tiêu, dự án, kế hoạch, tracking, review, dashboard, tiến độ, inbox, capture, retro, bài học.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Quản lý mục tiêu OKR. Trigger: OKR, mục tiêu, dự án, kế hoạch, tracking, review, dashboard, tiến độ, inbox, capture, retro, bài học.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Rút bài học từ phiên OKR, lưu vào layer lessons. Record-only. Cũng dọn kho lessons khi user gọi: dọn kho lessons, consolidate, sắp xếp lại bài học, gộp bài học, rà soát lessons.
Quy tắc chung mọi OKR skill: SOT ownership, schemas, Quality Gate, priority.
Phân tích OKR read-only: metrics, issues, priority, dashboard, trace.
Cập nhật progress, review sâu, inbox, closure, external sync.
Tạo/sửa plan, milestones, actions, dependencies, deadline, external_ids.
Tạo/sửa objective, KR, KI, period, deadline, resources, capacity, tool, ngân sách.
| name | okr-harness |
| description | Quản lý mục tiêu OKR. Trigger: OKR, mục tiêu, dự án, kế hoạch, tracking, review, dashboard, tiến độ, inbox, capture, retro, bài học. |
Entry point quản lý mục tiêu OKR. Đọc state, route, chạy skill inline, tổng hợp kết quả.
| Skill | Vai trò | Ghi |
|---|---|---|
okr-analyze | Phân tích read-only: metrics, issues, priority, dashboard, trace (xem lại history) | Không |
okr-init | Tạo/sửa objective, KR/KI, resources | Có |
okr-plan | Tạo/sửa plan, milestones, actions | Có |
okr-track | Track progress, deep review, inbox, closure, sync | Có |
okr-capture | Ghi nhanh vào inbox | Có (inbox) |
okr-retro | Rút bài học từ phiên, ghi .okr/lessons/ (record-only) | Có (lessons) |
okr-shared | Quy tắc chung: SOT, schemas, quality gate, delegate, priority | Không |
if .okr/ không tồn tại:
→ chạy okr-init mode new (inline)
return
else:
→ Phase 1 (đọc state + xác định intent)
Orchestrator tự đọc nhanh (không gọi skill) để xác định state. Đây là Tier 1 của Preload Contract (canonical: okr-shared/references/preload.md):
ls -1 .okr/ → cấp 1, KHÔNG đệ quy: phát hiện context/ + file lẻ/thư mục lạ (cho audit)
objective.md → frontmatter: type (project/ongoing), status, period
plan.md → frontmatter: có/không, counters
resources.md → đọc TOÀN BỘ body (capacity, skills, tool, tài liệu, ngân sách)
actions/ → scan frontmatter: count active, có overdue/blocked?
inbox/ → scan frontmatter: count pending
lessons/index.md → đọc TOÀN BỘ (bài học, auto-load mỗi phiên)
context/index.md → conditional: nạp TOÀN BỘ nếu context/ tồn tại (như lessons/index.md)
Chỉ frontmatter (trừ resources.md, lessons/index.md, và context/index.md khi tồn tại đọc toàn bộ). Không đọc objective/plan body, action body, log, archive, file detail bài học, hay context/<slug>.md body (on-demand, xem contract mục "KHÔNG preload").
Lessons đã nạp → dùng làm context định hướng khi skill đề xuất/điều chỉnh trong phiên (đối chiếu area/target liên quan). Quy tắc áp dụng: okr-shared/references/preload.md "Áp dụng lessons".
context/index.md (nếu nạp) → áp dụng quy tắc okr-shared/references/preload.md "Áp dụng context": trước khi skill ghi/đề xuất, quét cột "Khi nào cần đọc", nạp body file khớp. Mọi file mới sinh trong phiên phải reachable theo bản đồ neo (canonical: preload.md "Reachability khi ghi").
| State | User intent | Chạy skill (inline) |
|---|---|---|
| Chưa có .okr/ | Bất kỳ | okr-init new |
| Có objective, chưa plan | Mặc định | okr-plan new |
| Có objective + plan | Mặc định / "hôm nay" | okr-analyze (dashboard) |
| "sửa mục tiêu / KR / KI" | okr-init update-objective | |
| "tài nguyên / capacity / skill / tool" | okr-init update-resource | |
| "thêm action / sửa plan / sửa action" | okr-plan update | |
| "track / cập nhật / update" | okr-analyze → okr-track light | |
| "review sâu / đánh giá / phân tích" | okr-analyze deep → okr-track deep | |
| "capture / ghi nhanh / note" | okr-capture | |
| "inbox / xử lý inbox" | okr-track inbox-only | |
| "tổng kết / closure / kết thúc" | okr-track closure | |
| "trace / history / xem lại" | okr-analyze trace | |
| "rút bài học / tổng kết phiên / retro" | okr-retro |
Collision: state gợi ý khác user intent → ưu tiên user intent + xác nhận lại.
Đọc SKILL.md của skill đích, theo đúng flow của nó. Khi một flow cần chuyển sang skill khác (vd track deep cần áp dụng thay đổi cấu trúc), đọc tiếp SKILL.md kia và thực thi, mang theo context đã có.
Chạy okr-analyze (focus=full, max_items=2, horizon_days=3). Render dashboard + nhắc review nếu cần (xem "Nhắc review").
okr-analyze (focus: progress, overdue, blocked) → thu được analysis.okr-track light, dùng analysis làm input. Tương tác user, cập nhật progress, archive, next action.okr-analyze mode deep: đọc toàn bộ .okr/ + log history, root cause mỗi issue (≥3 "tại sao?").okr-track deep, mang theo analysis: trình bày root cause → đề xuất điều chỉnh → all-changes confirm. User chọn áp dụng.okr-init/okr-plan và thực thi với pre_confirmed: true (xem okr-shared delegate-protocol). Cùng agent thực hiện, không spawn.Trước đây deep review chạy bằng agent team (analyst + tracker qua SendMessage). Skill-only gộp thành chuỗi tuần tự một agent: phân tích → track → áp dụng. Mất tính song song, đổi lại chạy được ở mọi nền tảng.
Chạy okr-init (mode new/update-objective/update-resource) hoặc okr-plan (new/update). Tương tác user theo flow. Confirm trước ghi.
Chạy okr-capture: phân loại type, ghi inbox/YYYY-MM-DD-HHmm-slug.md. Xem okr-capture SKILL.md.
Chạy okr-track với mode tương ứng (inbox-only / closure).
Chạy okr-analyze mode trace (read-only: xem lại history/archive/log). Xem okr-analyze/references/flow-trace.md.
## Rút bài học).| Lỗi | Xử lý |
|---|---|
.okr/ không tồn tại | Route okr-init new |
| File corrupt | Báo cụ thể file nào, đề xuất sửa |
| Skill flow lỗi giữa chừng | Báo bước nào lỗi, giữ thay đổi đã ghi, hỏi user tiếp |
| Phân tích thiếu dữ liệu | Tiếp tục với dữ liệu có, ghi rõ phần thiếu trong báo cáo |
Khi hiển thị dashboard, áp quy tắc "Nhắc review" canonical ở okr-shared/references/metrics.md (first match, phân Project/Ongoing). Period overdue (Project) là cảnh báo riêng, ưu tiên cao hơn, render block đầu dashboard. KHÔNG định nghĩa ngưỡng riêng ở đây để tránh lệch với analyze/track.
/okr-harnessokr-analyze inline → dashboardokr-analyze (analysis) → okr-track light inlineokr-analyze deep: root cause mọi issueokr-track deep: trình bày root cause + đề xuất → all-changes confirmokr-init/okr-plan (pre_confirmed) áp dụng inline/okr-harness.okr/ không tồn tạiokr-init new → hướng dẫn tạo objective + resourceokr-analyze gặp file thiếu frontmatterThay cho cơ chế tự cải tiến cũ. Việc rút bài học do skill okr-retro đảm nhiệm, user chủ động.
Gợi ý cuối flow: sau khi tổng hợp (Phase 3), với flow có thực chất (track, deep review, init, plan, inbox; trừ dashboard/capture/trace đơn giản), thêm đúng 1 dòng:
"Muốn rút bài học phiên này? (chạy okr-retro)"
KHÔNG tự chạy. User đồng ý hoặc tự gõ "rút bài học" → chạy okr-retro inline.
okr-retro ghi 3 loại bài học vào .okr/lessons/ (skill = công cụ, workflow = bản đồ điều phối, project = tri thức):
objective-kit.Record-only: okr-retro KHÔNG tự sửa file skill, KHÔNG ghi CHANGELOG. Chi tiết: okr-retro SKILL.md.
references/skill-contract.mdreferences/flows.md