Loading...
Loading...
Kiểm tra sức khỏe "pattern chuẩn" của template — pattern đã đủ chưa, có drift local không, và có cần /sync-template từ remote không. So version.json local ↔ remote ↔ disk (0 token, fail- open). Trigger: "health check", "check pattern", "cần sync chưa", "/health-check".
npx skill4agent add rheinmir/setup health-check.template-manifest.jsonsync-template/health-check/sync-template/sync-templateharness/scripts/wiki-health.pyharness/version.jsontemplate_versionOKDRIFTNEEDS-SYNC| Field | Required? | Ý nghĩa | |
|---|---|---|---|
| In | | có | tập pattern + fingerprint; thiếu version.json → báo phần local (fail-open) |
| In | | không | nhánh remote; bỏ fetch; output máy đọc; exit 2 cho gate CI |
| Out | báo cáo status từng nhóm + dòng OKF v0.1 | có | |
| Out | exit code | khi | 2 nếu nhóm chỉ định vi phạm |
| Out | | chỉ khi | hash khớp disk |
harness/version.jsonincludes.template-manifest.jsonharness/version.jsonindex.mdlog.mdactive-context.mddecisions.md--bump--update.template-manifest.jsonincludes--update--updateharness/version.json--fail-on| Step | Type | Inputs | Action | Outputs/exit | Failure/next |
|---|---|---|---|---|---|
| W01 | deterministic | repo, nhánh | Chạy báo cáo | bảng status + dòng OKF | offline → B01 |
| W02 | judgment | báo cáo | Đọc kết quả theo bảng status | hành động khuyến nghị | |
| W03 | effect | khuyến nghị | Hành động: | pattern đã đồng bộ/revert | DRIFT mơ hồ → clarify |
| W04 | effect | sau sync | Refresh fingerprint | version.json khớp disk | — |
python3 harness/scripts/health-check.py --root . --branch orca--offline--json--fail-on behind,drift,missing| status | nghĩa | hành động |
|---|---|---|
| pattern đủ + khớp remote | không cần làm gì |
| pattern bị sửa local | cân nhắc upstream ( |
| thiếu file hoặc remote mới hơn | chạy downstream |
✓ OKF v0.1: N/N concept đạt chuẩntype⟳ OKF v0.1: x/N … cần migratepython3 harness/scripts/okf-check.py --migrate/sync-template/sync-templategit checkout -- <file>python3 harness/scripts/health-check.py --update # giữ nguyên version
python3 harness/scripts/health-check.py --update --bump patch # khi PHÁT HÀNH bản mới (chỉ làm ở repo template)(major/minor/patch) CHỈ chạy ở repo template--bumpkhi muốn công bố version pattern mới cho mọi project. Project con chỉRheinmir/setup(không bump) để đồng bộ hash sau khi pull.--update
| ID | Kind | Guard | Hành vi | Skip / failure | Rejoin |
|---|---|---|---|---|---|
| B01 | user_optional | không có mạng / user muốn chỉ kiểm local | thêm | lỗi mạng khi không cờ → vẫn báo phần local (fail-open) | W02 |
| B02 | conditional_required | đang ở repo template | | project con → chỉ | kết thúc |
| B03 | capability_optional | chạy trong gate CI/hook | | — | W02 (hoặc exit 2) |
health-check.pyOK--updateorcatemplate_versionNEEDS-SYNC/sync-templatepython3 harness/scripts/health-check.py --updateOK--offlineharness/scripts/wiki-health.pyllmwiki/wiki/sources/draft/150626-health-check-pattern-sync.md