os-tk-logging
Implements the lightweight logging spec (human-readable, append-only).
Resolve skill dir (for scripts)
bash
SKILL_DIR=".pi/skills/os-tk-logging" if [[ ! -d "$SKILL_DIR" ]]; then SKILL_DIR="pi/skills/os-tk-logging"; fi
Inputs (required variables)
- •
CMD(e.g.,os-tk-review,os-tk-done) - •
TICKET_ID,TICKET_ALIAS,CHANGE_ID - •
BRANCH,WORKTREE - •
STATUS(okorerror)
Ensure files
- •
bash "$SKILL_DIR/scripts/ensure-files.sh"
activity.log (human-readable)
Start:
- •
eval "$(bash "$SKILL_DIR/scripts/activity-start.sh")"→ setsSTART_EPOCH/TS_START
End:
- •
eval "$(bash "$SKILL_DIR/scripts/activity-end.sh")"→ setsTS_END/DUR_MS
errors.log (append-only)
On failure: set ERROR_MESSAGE, then:
- •
bash "$SKILL_DIR/scripts/append-error.sh"
progress.md (append-only)
- •
bash "$SKILL_DIR/scripts/append-progress.sh"(requiresTS_END,TICKET_ID,TICKET_ALIAS,CHANGE_ID,VERDICT,VERIFICATION_SUMMARY,NEXT_TICKET,BLOCKERS)
Lessons learned (.os-tk/AGENTS.md)
Only append when a new durable lesson is discovered (not a changelog).
Set LESSON, then:
- •
bash "$SKILL_DIR/scripts/append-lessons.sh"