From aca938fb0504bdcb203c8563d25a3907f5a2eb7e Mon Sep 17 00:00:00 2001 From: Jeffery Date: Fri, 21 Aug 2026 14:28:18 +0800 Subject: [PATCH] docs(log): translate SKILL.md into English per guidelines Co-Authored-By: Claude Fable 5 --- skills/stats/SKILL.md | 20 ++++++++-------- skills/worklog/SKILL.md | 52 ++++++++++++++++++++--------------------- 2 files changed, 36 insertions(+), 36 deletions(-) diff --git a/skills/stats/SKILL.md b/skills/stats/SKILL.md index 1f54f83..2cec2f0 100644 --- a/skills/stats/SKILL.md +++ b/skills/stats/SKILL.md @@ -3,19 +3,19 @@ name: stats description: Report usage counts of every jsc skill and every skill call chain, aggregated by tools/usage-stats.sh from $JSC_HOME/usage/*.jsonl recorded by jsc-hooks. Supports --cli filtering. Use when the user asks how often skills or chains are used; not for token or time stats (see worklog). --- -# stats — 技能與呼叫鏈使用統計 +# stats — skill and call-chain usage counts -資料由 `jsc-hooks/hooks/skill-usage.sh` 持續記錄在 `$JSC_HOME/usage/`(預設 `~/.jsc/usage/`)。 +Data is recorded continuously by `jsc-hooks/hooks/skill-usage.sh` under `$JSC_HOME/usage/` (default `~/.jsc/usage/`). -## 操作 +## Operations -| 統計 | 指令 | 輸出 | +| Count | Command | Output | | --- | --- | --- | -| 各技能使用次數 | `tools/usage-stats.sh skills` | `次數技能名`,降冪 | -| 各呼叫鏈使用次數 | `tools/usage-stats.sh chains` | `次數from -> to`,降冪 | -| 依 CLI 過濾 | 加 `--cli claude`(或 codex / copilot / antigravity / kiro) | 同上 | +| Uses per skill | `tools/usage-stats.sh skills` | `countskill`, descending | +| Uses per call chain | `tools/usage-stats.sh chains` | `countfrom -> to`, descending | +| Filter by CLI | Append `--cli claude` (or codex / copilot / antigravity / kiro) | Same as above | -## 呈現 +## Reporting -1. 直接執行工具,把輸出整理成表格回覆。 -2. 沒有資料時說明:需先安裝 `jsc-hooks` 並執行 `jsc-hooks:hooks-install` 接線。 +1. Run the tool directly and present the output as a table. +2. When there is no data, explain that `jsc-hooks` must be installed and wired first via `jsc-hooks:hooks-install`. diff --git a/skills/worklog/SKILL.md b/skills/worklog/SKILL.md index 619bc70..2c9c041 100644 --- a/skills/worklog/SKILL.md +++ b/skills/worklog/SKILL.md @@ -3,43 +3,43 @@ name: worklog description: After finishing a work package, collect ten facts (repo, branch, plan link, work package link, elapsed time from session-timer, token usage per CLI, status, details, difficulties, PR target) and append a templated entry to wiki LOG_{yyyyMM}_W{week} plus LOG_CONTENTS. Week number is derived from the Friday of the work week. Trigger at the end of implement or maintain; not for planning notes. --- -# worklog — 工作日誌 +# worklog — work log -工作完成後蒐集以下十項資訊,套用 `templates/log-entry.md` 附加到 wiki 日誌頁。蒐集與寫入**必須以 sub agent 執行**。 +After work completes, collect the ten items below and append a `templates/log-entry.md` entry to the wiki log page. Collection and writing MUST run as a sub agent. The entry content is written in Traditional Chinese (STE100). -## 蒐集項目 +## Items to collect -| # | 項目 | 來源 | +| # | Item | Source | | --- | --- | --- | -| 1 | 存取庫名稱 | `git remote get-url origin` 解析出 `{owner}/{repo}` | -| 2 | 分支名稱 | `git branch --show-current` | -| 3 | 計畫名稱 | 連結到計畫頁 `[[PLAN_{...}]]` | -| 4 | 工作包編號 | 連結到分析頁的工作包標題 `[[ANALYZE_{...}#WP-xx]]` | -| 5 | 花費時間 | `jsc-hooks/hooks/session-timer.sh report {session_id}`(秒,換算 h/m) | -| 6 | token 用量 | 見下表,各 CLI 取法不同;不可得填 `N/A` | -| 7 | 任務狀態 | 完成 / 部分完成 / 阻塞(附原因) | -| 8 | 執行細節與產出 | 摘要改了什麼、產出哪些檔案或頁面 | -| 9 | 遇到的困難與解決方式 | 一行一組 | -| 10 | PR 的目標分支 | 連結到 PR 頁 | +| 1 | Repository name | Parse `{owner}/{repo}` from `git remote get-url origin` | +| 2 | Branch name | `git branch --show-current` | +| 3 | Plan name | Link to the plan page `[[PLAN_{...}]]` | +| 4 | Work package id | Link to the work package heading on the analyze page `[[ANALYZE_{...}#WP-xx]]` | +| 5 | Elapsed time | `jsc-hooks/hooks/session-timer.sh report {session_id}` (seconds; convert to h/m) | +| 6 | Token usage | See the table below; per-CLI methods differ. Fill `N/A` when unavailable | +| 7 | Task status | One of the literal values 「完成」、「部分完成」、「阻塞」 (with reason when blocked) | +| 8 | Details and outputs | Summarize what changed and which files or pages were produced | +| 9 | Difficulties and resolutions | One pair per line | +| 10 | PR target branch | Link to the PR page | -### token 用量取得方式 +### How to get token usage -| CLI | 取法 | +| CLI | Method | | --- | --- | -| claude | transcript JSONL(`~/.claude/projects/**/*.jsonl`)的 `usage` 欄位加總,或 `claude -p --output-format json` 的 `usage` | -| codex | `~/.codex/sessions/**` 的 token 計數,或工作階段內 `/status` | -| copilot | 工作階段內 `/usage` | -| antigravity | 介面顯示值;無法讀取時 `N/A` | -| kiro | 無公開來源,填 `N/A` | +| claude | Sum the `usage` fields in transcript JSONL (`~/.claude/projects/**/*.jsonl`), or read `usage` from `claude -p --output-format json` | +| codex | Token counters under `~/.codex/sessions/**`, or `/status` inside the session | +| copilot | `/usage` inside the session | +| antigravity | Value shown in the UI; `N/A` when unreadable | +| kiro | No public source; fill `N/A` | -## 目標頁與週數計算 +## Target page and week number -- 頁名:`LOG_{yyyyMM}_W{週數}`,兩者都取自**本工作週的週五**: +- Page name: `LOG_{yyyyMM}_W{週數}`. Both values come from the Friday of the current work week: ```sh dow=$(date +%u) if [ "$dow" -ge 6 ]; then f=$(date -d 'last friday' +%Y%m%d); else f=$(date -d 'friday' +%Y%m%d); fi yyyyMM=$(printf '%s' "$f" | cut -c1-6) - W=$(( ( $(printf '%s' "$f" | cut -c7-8 | sed 's/^0//') - 1 ) / 7 + 1 )) # 該週五是當月第幾個週五 + W=$(( ( $(printf '%s' "$f" | cut -c7-8 | sed 's/^0//') - 1 ) / 7 + 1 )) # which Friday of the month ``` -- 經由 `jsc-gitea:wiki` 讀取該頁;不存在就以 `templates/log-contents.md` 說明的結構新建,存在就把新條目**附加**在文末。 -- 同步更新 `LOG_CONTENTS`(套用 `templates/log-contents.md`,該週的列不存在就新增)。 +- Read the page via `jsc-gitea:wiki`. If it does not exist, create it with the structure described in `templates/log-contents.md`; otherwise APPEND the new entry at the end. +- Update `LOG_CONTENTS` in the same pass (apply `templates/log-contents.md`; add the week's row if missing).