| name | review-logs |
| category | thai-sme-owner |
| version | 1.0.0 |
| description | Read recent workflow logs from workspace/09-Outputs/Logs, find recurring exceptions/friction, and propose (never auto-apply) updates to KMS/BUSINESS_CONTEXT so the framework learns from real usage over time. |
| risk_level | medium |
| output_type | markdown |
Review Logs Skill (Improvement Feedback Loop)
Purpose
Close the loop that every other skill leaves open: each workflow writes a
Standard Log with "recommended next step" / "suggested improvements", but
nothing was reading those logs back. This skill is that read-back step —
a periodic learning loop, not a one-shot report.
Use When
- User asks "มีอะไรที่ควรปรับปรุงบ้าง" / "สรุป pattern จากงานที่ทำไปช่วงนี้"
- Scheduled weekly run (see README "Recurring Automation")
- Before updating BUSINESS_CONTEXT.md or a KMS file
Required Inputs
- Date range (default: last 7 days)
workspace/09-Outputs/Logs/*.md in that range
Workflow
- Collect — read all Standard Logs in the date range.
- Pattern-match — group by recurring theme: same exception type appearing ≥3 times, same missing KMS fact needed repeatedly, same manual correction the owner made to a draft.
- Draft proposed changes — for each recurring pattern, write a specific diff-style suggestion against the relevant file (
BUSINESS_CONTEXT.md, or a .thclaws/kms/*.md file). Cap at 5 proposed changes per run — more than that means the underlying skill/agent needs fixing, not the KMS.
- Present for approval — this skill never edits KMS/BUSINESS_CONTEXT.md directly. It returns a proposed-diff list; the orchestrator must get explicit approval per change (or per batch) before any file is edited, same as any other governed write.
- Apply only approved diffs, then log this run itself to
workspace/09-Outputs/Logs/ (so the loop is visible in the next review too).
Output Contract
- Period covered
- Recurring patterns found (with count and source log references)
- Proposed diffs (file, before → after, reason)
- Skipped/low-confidence patterns (fewer than 3 occurrences — noted but not proposed)
- Approval status per diff
Risk Control
- Never auto-write to BUSINESS_CONTEXT.md or KMS files — proposal only.
- Cap 5 proposed changes per run.
- If a pattern looks like a skill/agent bug rather than a business-context gap, say so explicitly instead of forcing it into a KMS edit.