@kairyou/agent-tools 0.10.2 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -12
- package/README.zh-CN.md +13 -10
- package/config.default.jsonc +16 -7
- package/docs/en/extras.md +47 -8
- package/docs/zh-CN/extras.md +47 -6
- package/package.json +1 -1
- package/skills/workflow/at-daily-log/SKILL.md +99 -0
- package/skills/workflow/at-self-eval/SKILL.md +76 -157
package/README.md
CHANGED
|
@@ -77,6 +77,7 @@ Runtime capabilities, installed per agent:
|
|
|
77
77
|
|
|
78
78
|
```bash
|
|
79
79
|
npx -y @kairyou/agent-tools@latest <capability> -a <agent...>
|
|
80
|
+
# npx -y github:kairyou/agent-tools <capability> -a <agent...> # Or the latest code from GitHub (needs Git)
|
|
80
81
|
```
|
|
81
82
|
|
|
82
83
|
`--dry-run` previews, `--uninstall` unwires the integration from the agent, and
|
|
@@ -222,25 +223,26 @@ npx -y @kairyou/agent-tools@latest inspect-image <path|url> -q "What are the nav
|
|
|
222
223
|
|
|
223
224
|
See [extras](docs/en/extras.md) for situational content.
|
|
224
225
|
|
|
225
|
-
## Run from Git
|
|
226
|
-
|
|
227
|
-
To run directly from the repository, replace the npm package name with
|
|
228
|
-
`github:kairyou/agent-tools` (Git required):
|
|
229
|
-
|
|
230
|
-
```bash
|
|
231
|
-
npx -y github:kairyou/agent-tools usage -a codex
|
|
232
|
-
```
|
|
233
|
-
|
|
234
|
-
Contributors can see the [repository structure](docs/en/repository-structure.md).
|
|
235
|
-
|
|
236
226
|
## FAQ
|
|
237
227
|
|
|
238
|
-
### Why does
|
|
228
|
+
### Why does installing skills report PromptScript as unsupported?
|
|
239
229
|
|
|
240
230
|
`PromptScript does not support global skill installation` means that the
|
|
241
231
|
PromptScript agent does not support global installation. It does not affect
|
|
242
232
|
other agents and can be ignored. See [`skills` issue #1352](https://github.com/vercel-labs/skills/issues/1352).
|
|
243
233
|
|
|
234
|
+
### How do I install skills without GitHub access?
|
|
235
|
+
|
|
236
|
+
Install from the npm package instead (swap `at-commit` for the skills you want):
|
|
237
|
+
|
|
238
|
+
```bash
|
|
239
|
+
cd "$(mktemp -d)" && tar -xf "$(npm pack @kairyou/agent-tools --silent)" && npx -y skills@latest add ./package --skill at-commit -g -y
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
### Want to contribute?
|
|
243
|
+
|
|
244
|
+
See the [repository structure](docs/en/repository-structure.md).
|
|
245
|
+
|
|
244
246
|
## Acknowledgements
|
|
245
247
|
|
|
246
248
|
- `at-commit` draws on commit-message generation ideas from
|
package/README.zh-CN.md
CHANGED
|
@@ -77,6 +77,7 @@ Runtime capability, 按 agent 选装:
|
|
|
77
77
|
|
|
78
78
|
```bash
|
|
79
79
|
npx -y @kairyou/agent-tools@latest <capability> -a <agent...>
|
|
80
|
+
# npx -y github:kairyou/agent-tools <capability> -a <agent...> # 或用 GitHub 上的最新代码(需 Git)
|
|
80
81
|
```
|
|
81
82
|
|
|
82
83
|
`--dry-run` 预览, `--uninstall` 解除对应集成, 重新执行安装命令即为更新.
|
|
@@ -217,22 +218,24 @@ npx -y @kairyou/agent-tools@latest inspect-image <path|url> -q "导航栏的背
|
|
|
217
218
|
|
|
218
219
|
[extras](docs/zh-CN/extras.md) 收录场景较窄的内容.
|
|
219
220
|
|
|
220
|
-
##
|
|
221
|
+
## FAQ
|
|
221
222
|
|
|
222
|
-
|
|
223
|
+
### 为什么安装 skills 时提示 PromptScript 不支持?
|
|
223
224
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
```
|
|
225
|
+
`PromptScript does not support global skill installation` 表示 PromptScript Agent 不支持全局
|
|
226
|
+
安装, 不影响其他 Agent, 可忽略. 参见 [`skills` issue #1352](https://github.com/vercel-labs/skills/issues/1352).
|
|
227
227
|
|
|
228
|
-
|
|
228
|
+
### 无法访问 GitHub 时如何安装 skills?
|
|
229
229
|
|
|
230
|
-
|
|
230
|
+
直接从 npm 包安装(`at-commit` 换成你要装的 skill):
|
|
231
231
|
|
|
232
|
-
|
|
232
|
+
```bash
|
|
233
|
+
cd "$(mktemp -d)" && tar -xf "$(npm pack @kairyou/agent-tools --silent)" && npx -y skills@latest add ./package --skill at-commit -g -y
|
|
234
|
+
```
|
|
233
235
|
|
|
234
|
-
|
|
235
|
-
|
|
236
|
+
### 想参与开发?
|
|
237
|
+
|
|
238
|
+
参见[仓库结构](docs/zh-CN/repository-structure.md).
|
|
236
239
|
|
|
237
240
|
## 参考与致谢
|
|
238
241
|
|
package/config.default.jsonc
CHANGED
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
// agent-tools config.
|
|
2
|
-
// statusline.fields controls both visibility and order.
|
|
3
|
-
// Remove a field to hide it; move a field to reorder it.
|
|
4
|
-
// Available statusline fields: branch, model, fiveHour, week, context, directory.
|
|
5
|
-
// providerUsage is used by the shared usage runtime.
|
|
6
1
|
{
|
|
7
2
|
"statusline": {
|
|
3
|
+
// Shown in this order; available: branch, model, fiveHour, week, context, directory
|
|
8
4
|
"fields": ["branch", "model", "fiveHour", "week"],
|
|
9
5
|
"separator": " | ",
|
|
10
6
|
"symbols": {
|
|
@@ -17,7 +13,20 @@
|
|
|
17
13
|
}
|
|
18
14
|
},
|
|
19
15
|
"providerUsage": {
|
|
20
|
-
"days": 30,
|
|
21
|
-
"debug": false
|
|
16
|
+
"days": 30, // recent days of spend to count
|
|
17
|
+
"debug": false // true: log probes to ~/.agent-tools/logs/usage-debug.log
|
|
22
18
|
}
|
|
19
|
+
|
|
20
|
+
// Optional blocks below: uncomment every line of a block, including its leading comma.
|
|
21
|
+
|
|
22
|
+
// at-self-eval, at-daily-log: default projects (otherwise just the current repo)
|
|
23
|
+
// , "workProjects": [
|
|
24
|
+
// "C:\\projects\\project-a",
|
|
25
|
+
// "C:\\projects\\project-b"
|
|
26
|
+
// ]
|
|
27
|
+
|
|
28
|
+
// at-daily-log: default file when asked to record; at-self-eval reads it as fallback
|
|
29
|
+
// , "dailyLog": {
|
|
30
|
+
// "output": "C:\\projects\\todo.md"
|
|
31
|
+
// }
|
|
23
32
|
}
|
package/docs/en/extras.md
CHANGED
|
@@ -4,8 +4,8 @@ Fully usable, just situational. Install each on demand.
|
|
|
4
4
|
|
|
5
5
|
## at-self-eval
|
|
6
6
|
|
|
7
|
-
Summarize a
|
|
8
|
-
performance cycles (quarterly, semi-annual, promotion).
|
|
7
|
+
Summarize git history, a work log you provide, or both into a self-evaluation
|
|
8
|
+
for performance cycles (quarterly, semi-annual, promotion).
|
|
9
9
|
|
|
10
10
|
```bash
|
|
11
11
|
npx -y skills@latest add kairyou/agent-tools --skill at-self-eval -g -y
|
|
@@ -13,12 +13,51 @@ npx -y skills@latest add kairyou/agent-tools --skill at-self-eval -g -y
|
|
|
13
13
|
|
|
14
14
|
Usage:
|
|
15
15
|
|
|
16
|
-
- `/at-self-eval` — current
|
|
16
|
+
- `/at-self-eval` — the current Git user's work this quarter
|
|
17
17
|
- `/at-self-eval [<author>] [--from yyyy-mm-dd] [--to yyyy-mm-dd]` — pick author and range
|
|
18
18
|
- Plain language works too: say "summarize the first half of the year" instead of writing flags
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
|
|
19
|
+
- `/at-self-eval summarize July for C:\projects\project-a and C:\projects\project-b` — only those projects
|
|
20
|
+
- `/at-self-eval also include C:\projects\project-c` — add to the default scope
|
|
21
|
+
- Paste a daily/weekly log, or give a file path, to add business context
|
|
22
|
+
- `/at-self-eval summarize from C:\projects\todo.md only` — log only, Git is not read
|
|
22
23
|
|
|
23
|
-
|
|
24
|
-
|
|
24
|
+
Review the generated result before use.
|
|
25
|
+
|
|
26
|
+
## at-daily-log
|
|
27
|
+
|
|
28
|
+
Summarize the day's Git activity across projects into a daily work log.
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npx -y skills@latest add kairyou/agent-tools --skill at-daily-log -g -y
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Usage:
|
|
35
|
+
|
|
36
|
+
- `/at-daily-log` — print today's log
|
|
37
|
+
- `/at-daily-log 2026-07-31` — pick the date
|
|
38
|
+
- `/at-daily-log summarize today for C:\projects\project-a` — only that project
|
|
39
|
+
- `/at-daily-log also include C:\projects\project-c` — add to the default scope
|
|
40
|
+
- `/at-daily-log record the log` — record to the configured file; rerunning a day only refreshes the generated part
|
|
41
|
+
- `/at-daily-log record it to C:\projects\todo.md` — record to that file
|
|
42
|
+
- `/at-daily-log record every workday at 18:00` — guides you through an OS scheduled task
|
|
43
|
+
|
|
44
|
+
Review the generated result before use.
|
|
45
|
+
|
|
46
|
+
## Optional configuration
|
|
47
|
+
|
|
48
|
+
All in `~/.agent-tools/config.jsonc`:
|
|
49
|
+
|
|
50
|
+
```jsonc
|
|
51
|
+
{
|
|
52
|
+
// at-self-eval, at-daily-log: default projects (otherwise just the current repo)
|
|
53
|
+
"workProjects": [
|
|
54
|
+
"C:\\projects\\project-a",
|
|
55
|
+
"C:\\projects\\project-b"
|
|
56
|
+
// "C:\\projects\\temporarily-disabled"
|
|
57
|
+
],
|
|
58
|
+
// at-daily-log: default file when asked to record; at-self-eval also reads it as fallback
|
|
59
|
+
"dailyLog": {
|
|
60
|
+
"output": "C:\\projects\\todo.md"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
```
|
package/docs/zh-CN/extras.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## at-self-eval
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
把 git 历史或你提供的工作日志归纳成自评产出清单, 用于季度/半年/晋升等绩效周期.
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
10
|
npx -y skills@latest add kairyou/agent-tools --skill at-self-eval -g -y
|
|
@@ -12,10 +12,51 @@ npx -y skills@latest add kairyou/agent-tools --skill at-self-eval -g -y
|
|
|
12
12
|
|
|
13
13
|
用法:
|
|
14
14
|
|
|
15
|
-
- `/at-self-eval` —
|
|
15
|
+
- `/at-self-eval` — 默认统计当前 Git 用户本季度的工作
|
|
16
16
|
- `/at-self-eval [<作者>] [--from yyyy-mm-dd] [--to yyyy-mm-dd]` — 指定作者与日期范围
|
|
17
|
-
- 在对话里直接说 `统计上半年的工作` / `统计
|
|
18
|
-
-
|
|
19
|
-
-
|
|
17
|
+
- 在对话里直接说 `统计上半年的工作` / `统计1-3月的产出` 即可, 无需手写参数
|
|
18
|
+
- `/at-self-eval 统计 C:\projects\project-a 和 C:\projects\project-b 的 7 月工作` — 只统计指定项目
|
|
19
|
+
- `/at-self-eval 另外包含 C:\projects\project-c` — 在默认范围上追加
|
|
20
|
+
- 可粘贴日报或周报文本, 也可提供文件路径补充业务背景
|
|
21
|
+
- `/at-self-eval 只根据 C:\projects\todo.md 总结` — 只凭日志生成, 不读 Git
|
|
20
22
|
|
|
21
|
-
|
|
23
|
+
生成的结果请人工核对.
|
|
24
|
+
|
|
25
|
+
## at-daily-log
|
|
26
|
+
|
|
27
|
+
汇总一天内各项目的 Git 活动, 生成工作日报.
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npx -y skills@latest add kairyou/agent-tools --skill at-daily-log -g -y
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
用法:
|
|
34
|
+
|
|
35
|
+
- `/at-daily-log` — 输出今天的日报
|
|
36
|
+
- `/at-daily-log 2026-07-31` — 指定日期
|
|
37
|
+
- `/at-daily-log 统计 C:\projects\project-a 今天的工作` — 只统计指定项目
|
|
38
|
+
- `/at-daily-log 另外包含 C:\projects\project-c` — 在默认范围上追加
|
|
39
|
+
- `/at-daily-log 记录日报` — 记录到配置的文件; 同一天重复执行只更新生成的部分
|
|
40
|
+
- `/at-daily-log 记录到 C:\projects\todo.md` — 记录到指定文件
|
|
41
|
+
- `/at-daily-log 每个工作日 18:00 自动记录` — 引导搭建系统定时任务
|
|
42
|
+
|
|
43
|
+
生成的结果请人工核对.
|
|
44
|
+
|
|
45
|
+
## 可选配置
|
|
46
|
+
|
|
47
|
+
都在 `~/.agent-tools/config.jsonc`:
|
|
48
|
+
|
|
49
|
+
```jsonc
|
|
50
|
+
{
|
|
51
|
+
// at-self-eval, at-daily-log: 默认统计的项目(不配则只统计当前项目)
|
|
52
|
+
"workProjects": [
|
|
53
|
+
"C:\\projects\\project-a",
|
|
54
|
+
"C:\\projects\\project-b"
|
|
55
|
+
// "C:\\projects\\temporarily-disabled"
|
|
56
|
+
],
|
|
57
|
+
// at-daily-log: 记录日报的默认文件; 未提供日志时 at-self-eval 也读它作补充
|
|
58
|
+
"dailyLog": {
|
|
59
|
+
"output": "C:\\projects\\todo.md"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kairyou/agent-tools",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"description": "Reusable Agent Skills, plus integrations (statusline, provider usage, vision) that install into Codex, Claude Code, and opencode.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: at-daily-log
|
|
3
|
+
description: "Summarize one day's Git activity into a concise daily work log. Uses the current repository, optional configured work projects, or paths named in conversation; configuration is never required."
|
|
4
|
+
argument-hint: "[<date>]"
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Daily Work Log
|
|
8
|
+
|
|
9
|
+
`resolve evidence -> group related commits -> draft or record`
|
|
10
|
+
|
|
11
|
+
## Date and evidence scope
|
|
12
|
+
|
|
13
|
+
Default to today. Accept plain-language dates or `YYYY-MM-DD`; query through the next
|
|
14
|
+
day because Git's `--until` boundary is exclusive. State the resolved date.
|
|
15
|
+
|
|
16
|
+
Read optional `workProjects` from `~/.agent-tools/config.jsonc`.
|
|
17
|
+
|
|
18
|
+
- No project named: current Git repository plus configured projects.
|
|
19
|
+
- Projects named directly: only those projects.
|
|
20
|
+
- "Also include" / `另外包含`: add them to the default scope.
|
|
21
|
+
|
|
22
|
+
Resolve paths to Git roots and deduplicate them. Report invalid paths; a non-Git current
|
|
23
|
+
directory does not block other valid projects. Do not clone remote URLs without consent.
|
|
24
|
+
|
|
25
|
+
For each repository, resolve the author with `git -C <root> config user.name`; never
|
|
26
|
+
infer aliases or use the remote login as the author. Filter commits by comparing `%an`
|
|
27
|
+
literally, not via an `--author` regex. Inspect all local branches, current
|
|
28
|
+
HEAD, user-named branches, and configured upstreams. Unless the user requests local-only
|
|
29
|
+
data, refresh only the configured upstream branches, grouped into one best-effort
|
|
30
|
+
`git fetch --no-tags <remote> <branch...>` per involved remote. Fetch failure is
|
|
31
|
+
non-fatal. Do not change the working tree or local branch history. Deduplicate commits
|
|
32
|
+
by hash.
|
|
33
|
+
|
|
34
|
+
## Build work items
|
|
35
|
+
|
|
36
|
+
Collect non-merge commits for the resolved author and day. Use subjects and changed
|
|
37
|
+
paths to turn related commits into concrete completed work items. Fold formatting,
|
|
38
|
+
version bumps, and follow-up fixes into the outcome they supported; do not inflate one
|
|
39
|
+
change into several deliverables.
|
|
40
|
+
|
|
41
|
+
Use file counts and added/deleted lines only when they meaningfully support the work
|
|
42
|
+
item. Generated files, lockfile churn, renames, and bulk formatting often make those
|
|
43
|
+
numbers misleading. Metrics are evidence, never hours, difficulty, impact, or a
|
|
44
|
+
productivity score.
|
|
45
|
+
|
|
46
|
+
Current uncommitted changes may be shown separately as **in progress**, but never as
|
|
47
|
+
proof of work on a past date. User-provided non-code work must remain clearly identified
|
|
48
|
+
as user context.
|
|
49
|
+
|
|
50
|
+
## Output
|
|
51
|
+
|
|
52
|
+
Match the user's language and omit empty sections:
|
|
53
|
+
|
|
54
|
+
```markdown
|
|
55
|
+
+ 2026-07-31
|
|
56
|
+
完成 2 项:
|
|
57
|
+
1. agent-tools: 完成多项目日报规则和 skill 落地.
|
|
58
|
+
2. vscode-plugin: 修复 Webview 刷新后状态丢失问题, 补充回归验证.
|
|
59
|
+
|
|
60
|
+
进行中 1 项:
|
|
61
|
+
- iunit-web: 推进导入流程重构, 已完成数据解析.
|
|
62
|
+
|
|
63
|
+
汇总: 3 个项目, 2 项完成, 1 项进行中.
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Prefer outcomes over raw Git metrics. If no verified activity exists, say so rather
|
|
67
|
+
than fabricate an entry.
|
|
68
|
+
|
|
69
|
+
## Draft or record
|
|
70
|
+
|
|
71
|
+
"Generate" / `生成日报` returns a draft. "Record" / `记录日报`, or an explicit
|
|
72
|
+
write request, writes after previewing the entry. Resolve the destination in order:
|
|
73
|
+
|
|
74
|
+
1. a path supplied in conversation;
|
|
75
|
+
2. optional `dailyLog.output` in `~/.agent-tools/config.jsonc`;
|
|
76
|
+
3. no destination: return the draft without writing.
|
|
77
|
+
|
|
78
|
+
Read the destination before editing. Wrap each date's generated content in that date's
|
|
79
|
+
own markers, `<!-- log:2026-07-31:start -->` / `<!-- log:2026-07-31:end -->`; the date
|
|
80
|
+
line and every line outside the markers belong to the user. For an existing date, show
|
|
81
|
+
the current block and the regenerated one before writing, then replace only that
|
|
82
|
+
date's block. If the date exists without markers, append a marked block below the
|
|
83
|
+
user's lines instead of editing them. Do not duplicate the date. On duplicate or
|
|
84
|
+
unpaired markers, stop and propose the edit instead of writing. When Git shows no
|
|
85
|
+
activity, leave the file unchanged and say so; the user can add a manual entry
|
|
86
|
+
themselves.
|
|
87
|
+
|
|
88
|
+
Scheduling is separate; set it up only when the user asks. Prefer the OS scheduler
|
|
89
|
+
(Task Scheduler, cron, launchd) over agent-internal timers, which stop with the agent:
|
|
90
|
+
schedule a headless run of the CLI this skill is executing in, invoking the skill with
|
|
91
|
+
a recording request (in Claude Code, `claude -p "/at-daily-log record the log"`; other
|
|
92
|
+
CLIs have their own headless form). Keep projects and output in config so the command
|
|
93
|
+
stays stable. Before registering, confirm the schedule (suggest workdays),
|
|
94
|
+
make sure the output file is resolvable, and run the exact command once; register only
|
|
95
|
+
after that test run records correctly, and show how to remove the task. Headless auth
|
|
96
|
+
differs from the interactive session, so a failed test run means stop instead of
|
|
97
|
+
registering, and show the exact command, its error output, and the likely fix (log in
|
|
98
|
+
for headless use, adjust the output path). An unattended run has nobody to confirm with, so it must follow the
|
|
99
|
+
marker rules exactly and skip any file it cannot edit that way.
|
|
@@ -1,186 +1,105 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: at-self-eval
|
|
3
|
-
description: "Summarize a contributor's
|
|
3
|
+
description: "Summarize a contributor's Git history, a provided work log, or both into a concise, review-friendly self-evaluation for quarterly, semi-annual, or promotion cycles."
|
|
4
4
|
argument-hint: "[<author>] [--from yyyy-mm-dd] [--to yyyy-mm-dd]"
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Self-Evaluation Summary
|
|
8
8
|
|
|
9
|
-
`
|
|
9
|
+
`resolve evidence -> group by business line -> deduplicate -> <=8 outcomes -> review`
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Author and date window
|
|
12
12
|
|
|
13
|
-
Normalize
|
|
14
|
-
|
|
15
|
-
to)` triple, then query. The user's explicit date range always wins; defaults
|
|
16
|
-
only fill what the user did not say. Re-state the resolved window in the output
|
|
17
|
-
header so the user can catch a wrong inference at a glance.
|
|
13
|
+
Normalize flags or plain language such as `统计1-3月的产出` and `统计上半年的工作`
|
|
14
|
+
into `(author, from, to)`. Explicit input wins; fill only missing values:
|
|
18
15
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
16
|
+
| User gave | Resolve to |
|
|
17
|
+
| --- | --- |
|
|
18
|
+
| `from` and `to` | use both |
|
|
19
|
+
| only `from` | `to` = today |
|
|
20
|
+
| only `to` | `from` = Jan 1 of that year |
|
|
21
|
+
| no range | current quarter |
|
|
25
22
|
|
|
26
|
-
|
|
23
|
+
Parse half-years, calendar quarters, month ranges, and rolling periods. A spoken
|
|
24
|
+
period without a year means the current year, except months still ahead of today,
|
|
25
|
+
which mean the previous year. Query through `<to + 1 day>` because Git's `--until` is exclusive.
|
|
26
|
+
Always exclude merge commits.
|
|
27
27
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
was found and show how to self-identify:
|
|
34
|
-
```bash
|
|
35
|
-
git log --format='%an' | sort -u
|
|
36
|
-
```
|
|
37
|
-
3. If results come back, end the output with a one-line hint: the user may have
|
|
38
|
-
commits under other names and can rerun with `--author "name1\|name2"`.
|
|
28
|
+
Use an explicit author when supplied; otherwise resolve it independently per repository
|
|
29
|
+
with `git -C <root> config user.name`. Never infer aliases or use the remote login as
|
|
30
|
+
the author. Filter commits by comparing `%an` literally, not via an `--author` regex. If no commits match, report that and suggest listing known commit authors;
|
|
31
|
+
do not try spelling or language variants. When results exist, mention once that the
|
|
32
|
+
user can provide other author names if needed.
|
|
39
33
|
|
|
40
|
-
|
|
34
|
+
## Project evidence
|
|
41
35
|
|
|
42
|
-
|
|
43
|
-
drops every commit on June 30. Always pass `<to + 1 day>` as `--until`.
|
|
36
|
+
Read optional `workProjects` from `~/.agent-tools/config.jsonc`.
|
|
44
37
|
|
|
45
|
-
|
|
38
|
+
- No project named: current Git repository plus configured projects.
|
|
39
|
+
- Projects named directly: only those projects.
|
|
40
|
+
- "Also include" / `另外包含`: add them to the default scope.
|
|
46
41
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
| Both `--from` and `--to` | use as-is (apply the `--until +1 day` fix) |
|
|
50
|
-
| Only `--from` | `to` = today |
|
|
51
|
-
| Only `--to` | `from` = Jan 1 of `to`'s year |
|
|
52
|
-
| Neither / plain-language time | **current quarter** |
|
|
42
|
+
Resolve paths to Git roots and deduplicate them. Report invalid paths; a non-Git current
|
|
43
|
+
directory does not block other valid projects. Do not clone remote URLs without consent.
|
|
53
44
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
current quarter.
|
|
45
|
+
Inspect all local branches, current HEAD, user-named branches, and configured upstreams.
|
|
46
|
+
Unless the user requests local-only data, refresh only the configured upstream
|
|
47
|
+
branches, grouped into one best-effort `git fetch --no-tags <remote> <branch...>` per
|
|
48
|
+
involved remote. Fetch failure is non-fatal. Do not change the working tree or local
|
|
49
|
+
branch history. Deduplicate commits by hash.
|
|
60
50
|
|
|
61
|
-
|
|
51
|
+
Begin the result with the resolved author/window and, for multiple repositories, a
|
|
52
|
+
plain-language list of the repositories checked. Mention remote-update failures without
|
|
53
|
+
Git jargon. Do not show commit counts or a generic source line.
|
|
62
54
|
|
|
63
|
-
|
|
64
|
-
so the user can verify or correct an auto-inferred window:
|
|
55
|
+
## Optional logs
|
|
65
56
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
57
|
+
A pasted daily/weekly log or explicit file path provides business context. If neither is
|
|
58
|
+
supplied, optionally read `dailyLog.output` from config. Explicit conversation input
|
|
59
|
+
always wins; a missing log is non-fatal.
|
|
69
60
|
|
|
70
|
-
|
|
71
|
-
|
|
61
|
+
Commit-backed items may be summarized directly. Keep log-only work separate for user
|
|
62
|
+
confirmation; include it only after confirmation, using only dates stated in the log or
|
|
63
|
+
by the user. Never turn undated log text into work inside the selected window.
|
|
72
64
|
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
65
|
+
When the user asks for a summary from a log alone, skip project scanning; when the
|
|
66
|
+
window has no Git evidence, fall back to the log. Either way the log becomes the
|
|
67
|
+
primary source: say so in the result and skip per-item confirmation, as the whole
|
|
68
|
+
draft is the user's own account.
|
|
76
69
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
Daily/weekly logs, other repos, and other branches are all **optional
|
|
82
|
-
supplementary context**, handled the same way — never via flags. The user offers
|
|
83
|
-
them in conversation; the skill asks to clarify only when the user has already
|
|
84
|
-
expressed intent. Do not prompt for these at the start.
|
|
85
|
-
|
|
86
|
-
**Daily/weekly log** (pasted text or a provided file path) is background context:
|
|
87
|
-
1. Format-agnostic — do not assume any date sectioning or schema; read as
|
|
88
|
-
continuous text to pick up business-line attribution and intent that commit
|
|
89
|
-
messages lack.
|
|
90
|
-
2. No fabrication — commit-backed items may be summarized directly. Log-only
|
|
91
|
-
items must not be mixed into confirmed deliverables; if one appears to be a
|
|
92
|
-
real non-code outcome (design, research, review, training, delivery support,
|
|
93
|
-
coordination), list it separately for user confirmation. Include it in the
|
|
94
|
-
final summary only after the user confirms it.
|
|
95
|
-
3. No time re-attribution — dates come from git log only; for a confirmed
|
|
96
|
-
log-only outcome, use only a date explicitly present in the log or provided
|
|
97
|
-
by the user.
|
|
98
|
-
|
|
99
|
-
**Other repos** (user pastes a path or a remote URL):
|
|
100
|
-
- **Local path** → query with `git -C <path> log ...`; resolve that repo's author
|
|
101
|
-
independently (same no-guessing rule as the primary repo). Default to that
|
|
102
|
-
repo's current branch, surfaced in the header for correction.
|
|
103
|
-
- **Remote URL** → do NOT auto-clone. Ask the user whether to clone into a temp
|
|
104
|
-
dir for this run; only clone on explicit yes. On yes, clone to a temp dir,
|
|
105
|
-
query it, then delete the temp dir when done (keep it only if the user asks).
|
|
106
|
-
On no, ask for a local path or have them clone it themselves. Never clone
|
|
107
|
-
silently — clone has side effects (disk, auth, slow, may fail).
|
|
108
|
-
- Path does not exist / not a git repo → ask, do not guess.
|
|
109
|
-
|
|
110
|
-
**Other branches** (user names them, e.g. "也包含 dev 分支"):
|
|
111
|
-
- Query those branches explicitly. Never run `git log --all` unprompted — on
|
|
112
|
-
large repos it pulls tens of thousands of commits and overruns context.
|
|
113
|
-
- Confirm scope with the user before scanning all branches.
|
|
114
|
-
|
|
115
|
-
**Dedup across repos/branches:** identical commit hashes count once. Do not
|
|
116
|
-
mechanically delete commits by date/subject — separate work can share a generic
|
|
117
|
-
message, while cherry-picked work can have different dates. During grouping,
|
|
118
|
-
merge likely duplicates only when repository, subject, files, and change intent
|
|
119
|
-
show they represent the same work; surface uncertain cases for user confirmation.
|
|
120
|
-
|
|
121
|
-
### Language for user-facing text
|
|
122
|
-
|
|
123
|
-
All output and prompts to the user use plain words. Avoid git jargon ("HEAD",
|
|
124
|
-
"ref", "upstream", "cherry-pick") — users who say "I also worked on the dev
|
|
125
|
-
branch" may not know what HEAD means. Keep "commit" and branch names (with
|
|
126
|
-
context) as those are widely understood.
|
|
127
|
-
|
|
128
|
-
## Phase 1 — Group and dedupe
|
|
129
|
-
|
|
130
|
-
Group commits into **business lines / modules** and merge related commits into
|
|
131
|
-
one deliverable. Collapse many commits into the 1–3 outcomes they achieved —
|
|
132
|
-
`fix: lint`, `chore: fmt`, repeated `feat: sync` fold into the larger deliverable
|
|
133
|
-
they supported. If a group has only trivial housekeeping, merge it into a
|
|
134
|
-
related group or drop it. Do not inflate a single commit into a "deliverable."
|
|
135
|
-
|
|
136
|
-
## Phase 2 — Write the summary
|
|
137
|
-
|
|
138
|
-
Output a **numbered list**, one deliverable per line, grouped by business line.
|
|
139
|
-
Each line:
|
|
140
|
-
|
|
141
|
-
- starts with the business line / module, a colon, then 2–4 sub-points or a
|
|
142
|
-
one-sentence outcome;
|
|
143
|
-
- is verb-led and outcome-oriented (built / shipped / refactored / migrated),
|
|
144
|
-
not a feature-name dump;
|
|
145
|
-
- is concrete enough to be credible but concise enough to scan.
|
|
146
|
-
|
|
147
|
-
- **≤8 top-level items — prioritize impact.** When work exceeds 8 lines, keep
|
|
148
|
-
the high-impact deliverables (built from scratch, major customer delivery,
|
|
149
|
-
architectural refactor, key fix) and merge or drop routine housekeeping
|
|
150
|
-
(lint, format, version bumps, repeated sync). Do not split 8 evenly across
|
|
151
|
-
business lines if that dilutes the standout work.
|
|
152
|
-
- A volume/peak note is worth citing inline **only when a business line clearly
|
|
153
|
-
concentrated in one month** (e.g. "5月密集完成 <业务线>"), as a distribution
|
|
154
|
-
cue — not as a self-justifying metric.
|
|
155
|
-
- Match the user's language (Chinese request → Chinese output). Identifiers and
|
|
156
|
-
product names stay as-is.
|
|
157
|
-
- Do NOT fabricate. Every confirmed deliverable must trace back to a commit or
|
|
158
|
-
to a user-confirmed log entry. Surface uncertain or log-only outcomes as
|
|
159
|
-
candidates for confirmation rather than stating it as fact.
|
|
160
|
-
|
|
161
|
-
Example shape (header + numbered list, placeholders only):
|
|
70
|
+
If the user supplies a remote repository URL, ask before cloning it to a temporary
|
|
71
|
+
directory and remove it afterward unless asked to keep it. Confirm before scanning every
|
|
72
|
+
remote branch.
|
|
162
73
|
|
|
163
|
-
|
|
164
|
-
> 作者: <author> · 窗口: 2026-01-01 ~ 2026-06-30 · (时间窗口为自动推断, 如不对请指正后重跑)
|
|
74
|
+
## Group the work
|
|
165
75
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
76
|
+
Group related commits into business-line or module outcomes. Fold lint, formatting,
|
|
77
|
+
version bumps, repeated syncs, and follow-up fixes into the outcome they supported.
|
|
78
|
+
Drop isolated trivial housekeeping. Similar subjects alone are not duplicates; use the
|
|
79
|
+
repository, changed paths, and intent, and surface uncertain attribution for review.
|
|
80
|
+
|
|
81
|
+
## Write the summary
|
|
169
82
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
83
|
+
Output a numbered list with no more than 8 top-level outcomes. Each item starts with the
|
|
84
|
+
business line/module and states a concrete result with 2-4 key points or one concise
|
|
85
|
+
sentence. Prefer high-impact delivery, architecture, and key fixes; condense or omit
|
|
86
|
+
routine work. Do not distribute the quota evenly if that hides standout results.
|
|
173
87
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
88
|
+
Mention a concentrated month only when it adds useful distribution context, never as a
|
|
89
|
+
productivity score. Match the user's language. Every confirmed outcome must trace to a
|
|
90
|
+
commit or a user-confirmed log item.
|
|
91
|
+
|
|
92
|
+
```text
|
|
93
|
+
> 作者: <author> · 窗口: 2026-01-01 ~ 2026-06-30 · (自动推断, 如不对请指正)
|
|
94
|
+
> 项目: <repo1> · <repo2>
|
|
95
|
+
|
|
96
|
+
1. <业务线A>: <结果>; <关键点>
|
|
97
|
+
2. <业务线B>: <结果>
|
|
98
|
+
```
|
|
177
99
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
attribute → "本次仅基于 commit 归纳; 若有日报/周报可粘贴文本或提供路径, 能补充业务背景使产出更准."
|
|
181
|
-
- There is concrete evidence that other repos/branches may contain relevant
|
|
182
|
-
work (the user mentioned them, or the supplied log names work absent from the
|
|
183
|
-
scanned repo) → "可能还有其他仓库或分支的工作未覆盖; 告知路径/分支后可继续聚合统计."
|
|
100
|
+
End with one reminder that this is a draft requiring review. Do not write it to a file
|
|
101
|
+
unless asked. Add at most one extra hint, and only when evidence is likely incomplete:
|
|
184
102
|
|
|
185
|
-
|
|
186
|
-
|
|
103
|
+
- unconfirmed log-only work exists;
|
|
104
|
+
- terse commits lack business context and no log was available;
|
|
105
|
+
- the conversation or log provides concrete evidence of unscanned projects/branches.
|