task-ledger 1.3.53 → 1.3.55
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 +122 -30
- package/README.zh-CN.md +145 -0
- package/SKILL.md +3 -3
- package/package.json +1 -1
- package/references/init-identity.md +7 -26
package/README.md
CHANGED
|
@@ -1,53 +1,145 @@
|
|
|
1
1
|
# task-ledger
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
**English** · [简体中文](https://github.com/cq-guojia/dsh-task-ledger/blob/main/packages/skill/README.zh-CN.md)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
A task ledger for AI coding agents. The agent records what it is working on — who owns it, how far it has got, when it was opened and when it was closed — as plain text inside the repository, so the answer survives the end of the conversation.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
The package is a skill: a `SKILL.md` file, a prebuilt command-line tool, and reference material. It runs on any agent that loads the open `SKILL.md` format: Claude Code, Cursor, Codex, CodeBuddy, WorkBuddy, Trae, Doubao Work and others.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
- **过程正文**:全在 `ledger/worklog/<年月>/<月日>-<时分>-<说明>-<码>.md`(六节),agent 直接编辑前五节,末节「执行记录」只由脚本写。
|
|
11
|
-
- **已结案**:一行一条在 `ledger/history/<年月>.md`(16 列),只由脚本写。
|
|
9
|
+
Four properties define it:
|
|
12
10
|
|
|
13
|
-
|
|
11
|
+
| Property | What it means |
|
|
12
|
+
|---|---|
|
|
13
|
+
| **Task lifecycle tracking** | Tasks are created, claimed, resumed, handed over and closed. Every transition carries a timestamp and an owner; progress, the conclusion and open issues are written into the task document. |
|
|
14
|
+
| **Local by design** | No account, no hosted backend, no service marketplace. The ledger is JSON and Markdown committed with the repository; it works offline and is reviewable in a pull request. |
|
|
15
|
+
| **Single-user and multi-user** | One person on one machine, or a team sharing one repository. Ownership state is sharded per person, so concurrent work never writes the same file. |
|
|
16
|
+
| **Version control as the sync layer** | Git is the transport. Push, pull and merge carry the ledger between machines and contributors. |
|
|
14
17
|
|
|
15
|
-
|
|
18
|
+

|
|
16
19
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
| `ledger/owners.json` | 索引:身份 uuid → 分片文件(`name` 只做显示 / 模糊筛) |
|
|
21
|
-
| `ledger/owners/<hash>.json` | 每人一份分片:自己认领的任务 |
|
|
22
|
-
| `ledger/worklog/<年月>/*.md` | 任务正文(六节) |
|
|
23
|
-
| `ledger/history/<年月>.md` | 已结案(一行一条,16 列) |
|
|
20
|
+
## Install
|
|
21
|
+
|
|
22
|
+
### With a skill manager
|
|
24
23
|
|
|
25
|
-
|
|
24
|
+
The [skills CLI](https://skills.sh) (Vercel) detects the agents installed on the machine, writes the skill into the right directory for each, and can update it later:
|
|
26
25
|
|
|
27
|
-
|
|
26
|
+
```bash
|
|
27
|
+
npx skills add https://github.com/cq-guojia/dsh-task-ledger/tree/main/packages/skill
|
|
28
|
+
```
|
|
28
29
|
|
|
29
|
-
|
|
30
|
+
The path is part of the command: this repository is a monorepo holding two copies of the skill, and `packages/skill` selects the source. Add `-g` to install for every project rather than the current one, and `--agent` to restrict the targets.
|
|
30
31
|
|
|
31
|
-
|
|
32
|
+
[SkillHub](https://skillhub.cn) — the market behind CodeBuddy and WorkBuddy — installs a skill once it is listed there. When search does not find `task-ledger`, use the client's local import and point it at `packages/skill`, or add this repository as a GitHub source in the SkillHub desktop application.
|
|
33
|
+
|
|
34
|
+
### Manually
|
|
35
|
+
|
|
36
|
+
Installing means copying the skill directory into the directory your agent reads. Fetch the source once:
|
|
32
37
|
|
|
33
38
|
```bash
|
|
34
|
-
|
|
39
|
+
git clone --depth 1 https://github.com/cq-guojia/dsh-task-ledger.git /tmp/task-ledger-src
|
|
35
40
|
```
|
|
36
41
|
|
|
37
|
-
|
|
42
|
+
Then copy it for the agent you use. User-level paths apply to every project; project-level paths apply to one repository and can be committed, which is how a team shares one skill.
|
|
43
|
+
|
|
44
|
+
| Agent | User-level directory | Command |
|
|
45
|
+
|---|---|---|
|
|
46
|
+
| **Claude Code** | `~/.claude/skills/` | `mkdir -p ~/.claude/skills && cp -R /tmp/task-ledger-src/packages/skill ~/.claude/skills/task-ledger` |
|
|
47
|
+
| **Cursor** | `~/.cursor/skills/` | `mkdir -p ~/.cursor/skills && cp -R /tmp/task-ledger-src/packages/skill ~/.cursor/skills/task-ledger` |
|
|
48
|
+
| **Codex CLI** | `~/.codex/skills/` | `mkdir -p ~/.codex/skills && cp -R /tmp/task-ledger-src/packages/skill ~/.codex/skills/task-ledger` |
|
|
49
|
+
| **CodeBuddy** | `~/.codebuddy/skills/` | `mkdir -p ~/.codebuddy/skills && cp -R /tmp/task-ledger-src/packages/skill ~/.codebuddy/skills/task-ledger` |
|
|
50
|
+
| **WorkBuddy** | `~/.workbuddy/skills/` | `mkdir -p ~/.workbuddy/skills && cp -R /tmp/task-ledger-src/packages/skill ~/.workbuddy/skills/task-ledger` |
|
|
51
|
+
| **Trae** | `~/.trae/skills/` (Trae CN: `~/.trae-cn/skills/`) | `mkdir -p ~/.trae/skills && cp -R /tmp/task-ledger-src/packages/skill ~/.trae/skills/task-ledger` |
|
|
52
|
+
|
|
53
|
+
**Project-level installation.** The same copy works inside a repository: `.claude/skills/`, `.cursor/skills/`, `.codebuddy/skills/`, `.trae/skills/`, or `.agents/skills/` — the cross-agent convention read by Codex and Cursor. Committed alongside the code, it gives every contributor the same instructions.
|
|
54
|
+
|
|
55
|
+
**Doubao Work (豆包工作).** Import the folder from the application: open the sidebar, choose Skills, and import `packages/skill` as a local skill. The application does not document a user-level skills directory, so in-app import is the supported route.
|
|
56
|
+
|
|
57
|
+
**Other agents.** Place the directory under `.agents/skills/task-ledger/`, or wherever the agent scans for `SKILL.md`. Nothing in the package depends on the host: the CLI is a static binary, the content is Markdown.
|
|
58
|
+
|
|
59
|
+
**Windows.** Substitute `%USERPROFILE%\` for `~`. The CLI ships binaries for Linux (amd64), macOS (arm64) and Windows (amd64); the wrapper script selects the right one.
|
|
60
|
+
|
|
61
|
+
## First run
|
|
62
|
+
|
|
63
|
+
Once per machine, initialise the identity that signs every ledger entry. The step is interactive and must be run by you — the agent is not allowed to create or rewrite an identity on your behalf:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
~/.claude/skills/task-ledger/scripts/progress init --new --name "Your Name"
|
|
67
|
+
```
|
|
38
68
|
|
|
39
|
-
|
|
69
|
+
On a second machine, run `init` without arguments and claim the identity already present in the ledger roster, so that both machines write under the same account.
|
|
40
70
|
|
|
41
|
-
|
|
71
|
+
No runtime, package manager or network access is required afterwards.
|
|
42
72
|
|
|
43
|
-
##
|
|
73
|
+
## Using it
|
|
44
74
|
|
|
45
|
-
|
|
75
|
+
There are no commands for you to type. The ledger is driven by what you say to the agent: when a request matches one of the intents below, the agent runs the corresponding operation and records it.
|
|
76
|
+
|
|
77
|
+
| You say | What the agent does | Result |
|
|
78
|
+
|---|---|---|
|
|
79
|
+
| "Open a task: get the release pipeline working" | creates the task with the tags you gave | In the shared pool, state `open`, unclaimed |
|
|
80
|
+
| "Open a task and start on it" | creates and claims it | Owned by you, state `doing` |
|
|
81
|
+
| "I'll take that one" / "continue with X" | claims the task | Moved to your name, state `doing` |
|
|
82
|
+
| *(while working)* | writes the task document, then appends an execution record | Progress, conclusions and blockers on record |
|
|
83
|
+
| "Blocked for now" / "leave it for a while" | records the blocker, leaves the state alone | Still `doing` — a pause is neither a release nor a cancellation |
|
|
84
|
+
| "Hand it back" | releases it | Returns to the shared pool for anyone to claim |
|
|
85
|
+
| "Close this task" | closes it with your summary | One row written to history; read-only afterwards |
|
|
86
|
+
| "Cancel it" | closes it as void, with the reason | Closed, not completed |
|
|
87
|
+
| "Delete it" | asks you to confirm, then deletes | Removed permanently — no undo, no restore |
|
|
88
|
+
| "What should I be doing?" / "what did we close last week?" | lists in-flight tasks, one task, or history | Query only, nothing written |
|
|
89
|
+
|
|
90
|
+
Creating a task requires two inputs: **what the work is** — one sentence, without category or project prefixes — and **what it touches** — one to five tags. A category may be given at creation; it is immutable afterwards.
|
|
91
|
+
|
|
92
|
+
Four rules bind the agent:
|
|
93
|
+
|
|
94
|
+
- It never creates, claims, releases, closes or deletes a task on its own initiative. Each of those needs an explicit instruction from you, and a vague "done" is answered with a question rather than a closure.
|
|
95
|
+
- It never edits state files, the history file or the execution log. Only the task document's first five sections are its to write.
|
|
96
|
+
- It completes the written record before closing: a closed task cannot be written to again.
|
|
97
|
+
- When it cannot find a task for the work at hand, it asks whether to create one instead of registering work you did not ask for.
|
|
98
|
+
|
|
99
|
+
## What gets written
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
ledger/
|
|
103
|
+
├── pool.json unclaimed tasks (shared)
|
|
104
|
+
├── owners.json index: identity → shard file
|
|
105
|
+
├── owners/<hash>.json one shard per person: the tasks they own
|
|
106
|
+
├── worklog/<YYYYMM>/*.md task documents, six fixed sections
|
|
107
|
+
└── history/<YYYYMM>.md closed tasks, one row each
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
State and prose are kept apart: JSON records ownership and state, Markdown records the reasoning. Only the CLI writes state, history and the execution log; the agent writes the first five sections of a task document and nothing else. All timestamps are stored in UTC and rendered in local time.
|
|
111
|
+
|
|
112
|
+
## Commands
|
|
113
|
+
|
|
114
|
+
| Command | Purpose |
|
|
46
115
|
|---|---|
|
|
47
|
-
|
|
|
48
|
-
|
|
|
49
|
-
|
|
|
116
|
+
| `init` | Initialise or claim the machine identity (once per machine) |
|
|
117
|
+
| `new` | Create a task |
|
|
118
|
+
| `claim` | Take ownership of a task |
|
|
119
|
+
| `set` | Change state, owner, tags or notes |
|
|
120
|
+
| `log` | Append an execution record to a task document |
|
|
121
|
+
| `close` | Close a task and write its history row |
|
|
122
|
+
| `delete` | Delete a task created in error |
|
|
123
|
+
| `list` | List in-flight tasks |
|
|
124
|
+
| `show` | Show one task |
|
|
125
|
+
| `history` | List closed tasks |
|
|
126
|
+
| `stats` | Aggregate counters and trend |
|
|
127
|
+
| `owners` | List known identities |
|
|
128
|
+
| `root` | Detect whether a directory holds a ledger |
|
|
129
|
+
| `whoami` | Show the current identity |
|
|
130
|
+
| `validate` | Check ledger consistency |
|
|
131
|
+
|
|
132
|
+
Run `scripts/progress <command> --help` for parameters. The agent-facing workflow lives in `SKILL.md`.
|
|
133
|
+
|
|
134
|
+
## Multiple users
|
|
135
|
+
|
|
136
|
+
Ownership is sharded: each person's tasks live in their own file, so two people advancing two tasks never touch the same file. Git merges the shards, the worklog documents and the history file. Where two people edit the same task document, the conflict is confined to that one file.
|
|
137
|
+
|
|
138
|
+
## Links
|
|
139
|
+
|
|
140
|
+
- Repository and full documentation: <https://github.com/cq-guojia/dsh-task-ledger>
|
|
141
|
+
- The dsh plugin, which bundles this skill with a board UI: [`dsh-task-ledger`](https://www.npmjs.com/package/dsh-task-ledger)
|
|
50
142
|
|
|
51
|
-
##
|
|
143
|
+
## Licence
|
|
52
144
|
|
|
53
|
-
|
|
145
|
+
MIT
|
package/README.zh-CN.md
ADDED
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# task-ledger
|
|
2
|
+
|
|
3
|
+
[English](README.md) · **简体中文**
|
|
4
|
+
|
|
5
|
+
面向 AI 编码代理的任务台账。代理把正在做的事 —— 谁在做、做到哪一步、何时开始、何时结束 —— 以纯文本形式记录在仓库内,答案不会随对话结束而丢失。
|
|
6
|
+
|
|
7
|
+
本包是一个 skill:一份 `SKILL.md`、一个预编译命令行工具,以及若干参考资料。凡加载开放 `SKILL.md` 格式的代理均可使用:Claude Code、Cursor、Codex、CodeBuddy、WorkBuddy、Trae、豆包工作等。
|
|
8
|
+
|
|
9
|
+
它的定位由四点界定:
|
|
10
|
+
|
|
11
|
+
| 特性 | 具体含义 |
|
|
12
|
+
|---|---|
|
|
13
|
+
| **任务全生命周期跟踪** | 任务可创建、认领、续做、移交、结案。每次状态变更都带时间与责任人;过程、结论与遗留问题写入任务正文。 |
|
|
14
|
+
| **本地化工具** | 不需要账号、不需要托管后端、不依赖任何服务市场。台账是与仓库一同提交的 JSON 与 Markdown,离线可用,可在代码评审中审阅。 |
|
|
15
|
+
| **单人可用,多人亦可用** | 单机单人可直接使用;团队共用一个仓库同样成立。归属状态按人分片存储,并发推进时不会写同一份文件。 |
|
|
16
|
+
| **以 Git 承载版本同步** | Git 即传输通道。push、pull、merge 把台账带到其他机器与其他人。 |
|
|
17
|
+
|
|
18
|
+

|
|
19
|
+
|
|
20
|
+
## 安装
|
|
21
|
+
|
|
22
|
+
### 用技能管理器安装
|
|
23
|
+
|
|
24
|
+
[skills CLI](https://skills.sh)(Vercel)会识别本机已装的 agent,把 skill 写入各自目录,并支持后续更新:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
npx skills add https://github.com/cq-guojia/dsh-task-ledger/tree/main/packages/skill
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
路径是命令的一部分:本仓库是 monorepo,内含两份同名副本,`packages/skill` 才是真源。加 `-g` 装到全局而非当前项目,加 `--agent` 限定目标 agent。
|
|
31
|
+
|
|
32
|
+
[SkillHub](https://skillhub.cn) 是 CodeBuddy 与 WorkBuddy 背后的技能市场,skill 上架后可直接安装。检索不到 `task-ledger` 时,改用客户端「导入本地技能」指向 `packages/skill`,或在 SkillHub 桌面版中把本仓库添加为 GitHub 来源。
|
|
33
|
+
|
|
34
|
+
### 手动安装
|
|
35
|
+
|
|
36
|
+
安装即:把 skill 目录复制到你所使用代理读取的技能目录。先取一份源码:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
git clone --depth 1 https://github.com/cq-guojia/dsh-task-ledger.git /tmp/task-ledger-src
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
再按代理复制到对应位置。用户级目录对所有项目生效;项目级目录只对单个仓库生效,可随仓库提交,这是团队共用同一份 skill 的方式。
|
|
43
|
+
|
|
44
|
+
| 代理 | 用户级目录 | 命令 |
|
|
45
|
+
|---|---|---|
|
|
46
|
+
| **Claude Code** | `~/.claude/skills/` | `mkdir -p ~/.claude/skills && cp -R /tmp/task-ledger-src/packages/skill ~/.claude/skills/task-ledger` |
|
|
47
|
+
| **Cursor** | `~/.cursor/skills/` | `mkdir -p ~/.cursor/skills && cp -R /tmp/task-ledger-src/packages/skill ~/.cursor/skills/task-ledger` |
|
|
48
|
+
| **Codex CLI** | `~/.codex/skills/` | `mkdir -p ~/.codex/skills && cp -R /tmp/task-ledger-src/packages/skill ~/.codex/skills/task-ledger` |
|
|
49
|
+
| **CodeBuddy** | `~/.codebuddy/skills/` | `mkdir -p ~/.codebuddy/skills && cp -R /tmp/task-ledger-src/packages/skill ~/.codebuddy/skills/task-ledger` |
|
|
50
|
+
| **WorkBuddy** | `~/.workbuddy/skills/` | `mkdir -p ~/.workbuddy/skills && cp -R /tmp/task-ledger-src/packages/skill ~/.workbuddy/skills/task-ledger` |
|
|
51
|
+
| **Trae** | `~/.trae/skills/`(Trae 国内版:`~/.trae-cn/skills/`) | `mkdir -p ~/.trae/skills && cp -R /tmp/task-ledger-src/packages/skill ~/.trae/skills/task-ledger` |
|
|
52
|
+
|
|
53
|
+
**项目级安装。** 同样的复制方式也适用于仓库内:`.claude/skills/`、`.cursor/skills/`、`.codebuddy/skills/`、`.trae/skills/`,以及 Codex 与 Cursor 都能读取的跨代理约定目录 `.agents/skills/`。随代码一同提交,每位协作者便获得同一份执行说明。
|
|
54
|
+
|
|
55
|
+
**豆包工作。** 在应用内导入:打开侧栏,进入「技能」,将 `packages/skill` 作为本地技能导入。该应用未公开用户级技能目录,应用内导入是受支持的方式。
|
|
56
|
+
|
|
57
|
+
**其他代理。** 将目录放到 `.agents/skills/task-ledger/`,或该代理扫描 `SKILL.md` 的位置。本包不依赖任何宿主:命令行是静态二进制,内容均为 Markdown。
|
|
58
|
+
|
|
59
|
+
**Windows。** 将路径中的 `~` 替换为 `%USERPROFILE%\`。命令行提供 Linux(amd64)、macOS(arm64)与 Windows(amd64)三个平台的二进制,由包装脚本自动选择。
|
|
60
|
+
|
|
61
|
+
## 首次使用
|
|
62
|
+
|
|
63
|
+
每台机器需执行一次身份初始化,此后所有台账记录均以该身份署名。该步骤为交互式,必须由你本人执行 —— 代理不得代为创建或改写身份:
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
~/.claude/skills/task-ledger/scripts/progress init --new --name "你的名字"
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
在第二台机器上,直接运行 `init` 并从台账名册中认领已有身份,两台机器便以同一账号写入。
|
|
70
|
+
|
|
71
|
+
此后无需任何运行时、包管理器或网络。
|
|
72
|
+
|
|
73
|
+
## 怎么用
|
|
74
|
+
|
|
75
|
+
不需要你敲任何命令。台账由你对代理说的话驱动:请求命中下列意图时,代理执行对应操作并留痕。
|
|
76
|
+
|
|
77
|
+
| 你说 | 代理做什么 | 结果 |
|
|
78
|
+
|---|---|---|
|
|
79
|
+
| 「新建一个任务:把发布流程走通」 | 按你给的标签建任务 | 落公共池,状态「待认领」 |
|
|
80
|
+
| 「新建个任务并开始做」 | 建并认领 | 归你名下,状态「进行中」 |
|
|
81
|
+
| 「这活我领了」/「接着做 X」 | 认领该任务 | 转到你名下,状态「进行中」 |
|
|
82
|
+
| (干活过程中) | 写任务正文,再追加一条执行记录 | 进度、结论、卡点全程留痕 |
|
|
83
|
+
| 「卡住了」/「先放一放」 | 记下卡点,状态不动 | 仍是「进行中」—— 暂停既不是释放,也不是取消 |
|
|
84
|
+
| 「退回去」 | 释放任务 | 回公共池,任何人可认领 |
|
|
85
|
+
| 「这个任务结束掉」 | 带摘要结案 | 写入历史,此后只读 |
|
|
86
|
+
| 「取消 / 作废」 | 作废结案,记下原因 | 已关闭,但不算完成 |
|
|
87
|
+
| 「删除」 | 先请你确认,再删除 | 彻底删除,无撤销、无恢复 |
|
|
88
|
+
| 「现在该做什么」/「上周结了什么」 | 列在办、看单条、查历史 | 只读查询,不写任何东西 |
|
|
89
|
+
|
|
90
|
+
建任务需要两项输入:**做什么** —— 一句话,不加分类或项目名前缀;**涉及什么** —— 一到五个标签。分类可在建任务时给出,此后不可更改。
|
|
91
|
+
|
|
92
|
+
四条约束对代理生效:
|
|
93
|
+
|
|
94
|
+
- 建、认领、释放、结案、删除,没有一项由代理自行发起。每一项都需要你的明确指令;你只说了「做完了」这类含糊的话,它回问,而不是直接结案。
|
|
95
|
+
- 状态文件、历史文件、执行记录一律不由代理改动。它只能写任务正文的前五节。
|
|
96
|
+
- 结案前必须先把记录写完 —— 已结案的任务不能再写。
|
|
97
|
+
- 找不到对应任务时,它问你要不要新建,而不是替你登记你没要求登记的工作。
|
|
98
|
+
|
|
99
|
+
## 落盘的数据
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
ledger/
|
|
103
|
+
├── pool.json 公共池:未认领任务
|
|
104
|
+
├── owners.json 索引:身份 → 分片文件
|
|
105
|
+
├── owners/<hash>.json 每人一份分片:其名下任务
|
|
106
|
+
├── worklog/<年月>/*.md 任务正文,固定六节
|
|
107
|
+
└── history/<年月>.md 已结案任务,一行一条
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
状态与正文分离:JSON 记录归属与状态,Markdown 记录来龙去脉。只有命令行工具可写状态、历史与执行记录;代理只能写任务正文的前五节,其余一律不改。所有存盘时间一律为 UTC,输出时转换为本机时区。
|
|
111
|
+
|
|
112
|
+
## 命令
|
|
113
|
+
|
|
114
|
+
| 命令 | 用途 |
|
|
115
|
+
|---|---|
|
|
116
|
+
| `init` | 初始化或认领本机身份(一台机器一次) |
|
|
117
|
+
| `new` | 新建任务 |
|
|
118
|
+
| `claim` | 认领任务 |
|
|
119
|
+
| `set` | 修改状态、责任人、标签或备注 |
|
|
120
|
+
| `log` | 向任务正文追加一条执行记录 |
|
|
121
|
+
| `close` | 结案,并写入历史 |
|
|
122
|
+
| `delete` | 删除建错的任务 |
|
|
123
|
+
| `list` | 列出在办任务 |
|
|
124
|
+
| `show` | 查看单个任务 |
|
|
125
|
+
| `history` | 列出已结案任务 |
|
|
126
|
+
| `stats` | 汇总计数与趋势 |
|
|
127
|
+
| `owners` | 列出已知身份 |
|
|
128
|
+
| `root` | 判断某目录是否含台账 |
|
|
129
|
+
| `whoami` | 显示当前身份 |
|
|
130
|
+
| `validate` | 检查台账一致性 |
|
|
131
|
+
|
|
132
|
+
参数见 `scripts/progress <子命令> --help`;面向代理的工作流写在 `SKILL.md`。
|
|
133
|
+
|
|
134
|
+
## 多人协作
|
|
135
|
+
|
|
136
|
+
归属按人分片:每人名下的任务保存在各自的分片文件中,两人各自推进各自的任务时不会写同一份文件。Git 负责合并分片、任务正文与历史文件。若两人同时修改同一份任务正文,冲突范围仅限于该文件。
|
|
137
|
+
|
|
138
|
+
## 链接
|
|
139
|
+
|
|
140
|
+
- 仓库与完整文档:<https://github.com/cq-guojia/dsh-task-ledger>
|
|
141
|
+
- 内置本 skill 并提供看板界面的 dsh 插件:[`dsh-task-ledger`](https://www.npmjs.com/package/dsh-task-ledger)
|
|
142
|
+
|
|
143
|
+
## 许可
|
|
144
|
+
|
|
145
|
+
MIT
|
package/SKILL.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: task-ledger
|
|
3
3
|
description: 本地任务台账,跨会话记录在办任务的归属、进度与起止。当用户要登记一件新的事(新建任务 / 建个坑 / 这活我领了)、记录已有任务的进展(接着做 / 记一条进展 / 这轮先记下)、查看任务状态或历史(现在该做什么 / 这活谁在做 / 上周做过什么)、给任务结案 / 取消作废 / 退回(做完了 / 验收通过 / 取消 / 作废 / 退回待认领)、删除建错的或垃圾任务(只认「删除」二字)、整理标签或检查台账一致性时加载;只是改代码、讨论方案时不要用。
|
|
4
|
-
version: 1.3.
|
|
4
|
+
version: 1.3.55
|
|
5
5
|
allowed-tools: Read,Edit,Bash,Grep
|
|
6
6
|
---
|
|
7
7
|
|
|
@@ -34,7 +34,7 @@ allowed-tools: Read,Edit,Bash,Grep
|
|
|
34
34
|
| `--claim <uuid>` | 认领名册里已有的 uuid(名字一起复制) |
|
|
35
35
|
| `--new --name "…"` | 新建身份:生成 uuid + 名字 |
|
|
36
36
|
|
|
37
|
-
干什么:写本机身份文件(`~/.taskledger/identity.json`),**一台机器只一次**,与台账无关。真终端里裸跑 `init` 是交互式选择框(↑/↓ 选、Enter 认领、末尾「+
|
|
37
|
+
干什么:写本机身份文件(`~/.taskledger/identity.json`),**一台机器只一次**,与台账无关。真终端里裸跑 `init` 是交互式选择框(↑/↓ 选、Enter 认领、末尾「+ 新建身份」输名字),非终端(agent)下裸跑 `init` 只报名单,任何写操作都被脚本拒绝(Agent 不得代写/重建)。没身份时怎么引导用户,见 `references/init-identity.md`。
|
|
38
38
|
|
|
39
39
|
### new — 建任务
|
|
40
40
|
|
|
@@ -333,7 +333,7 @@ allowed-tools: Read,Edit,Bash,Grep
|
|
|
333
333
|
|
|
334
334
|
**触发判据(只认退出码 100)**:命令**退出码为 `100`**。只读命令(`list` / `show` / `history` / `validate`)未初始化时同样退 100,是设计如此,不是台账坏了;**`owners` 是唯一例外** —— 读名册不需要身份,未初始化也照常输出(要列候选人或看花名册,直接跑它,别当成没身份)。此时 stderr 仍是那句固定的话,但那是**给人看的说明,不作判据**。
|
|
335
335
|
|
|
336
|
-
**触发后 ⇒ 停下,它是当前的主任务**(不适用「故障处置」里「不挡主任务」的通则,等用户 `init` 完再重跑原命令)。身份是用户自己的,不是你的决定:不替用户选、不读 `ledger/*.json`
|
|
336
|
+
**触发后 ⇒ 停下,它是当前的主任务**(不适用「故障处置」里「不挡主任务」的通则,等用户 `init` 完再重跑原命令)。身份是用户自己的,不是你的决定:不替用户选、不读 `ledger/*.json` 兜底、未初始化时不写任何东西。具体怎么做、给用户说什么话,一律见 `references/init-identity.md`(唯一真源),这里不重复。
|
|
337
337
|
|
|
338
338
|
## 任务生命周期
|
|
339
339
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "task-ledger",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.55",
|
|
4
4
|
"description": "Task-ledger skill for coding agents: per-workspace progress tracking (ledger/pool.json + owners/<hash>.json shards + owners.json index, history, worklog) driven by a CLI script. Standalone install for CodeBuddy and other agents; also bundled inside the dsh-task-ledger DSH plugin.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"skill",
|
|
@@ -2,33 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
触发:任何命令**退出码为 100**。身份是用户自己的,**不是你的决定**。
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
> **路径约定**:下文 `<SKILL 目录>` = 本 skill 的安装目录(即你正在读的这份 `SKILL.md` 所在目录)。**交给用户前必须替换成真实绝对路径**,不要原样把 `<SKILL 目录>` 这几个字留给用户。
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## 给用户的话(照原样转述;但先把 `<SKILL 目录>` 换成真实绝对路径)
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
> 这台机器还没有身份。在终端运行 `<SKILL 目录>/scripts/progress init` 进入初始化引导(交互式选 / 建身份);或打开看板「设置 → 创建身份」直接建立用户。
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
## 你的硬约束(你读,用户不看)
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
2. 把名册给用户选,并把这**同一条命令**交给用户在 ta 自己的终端跑(真终端里它自己会变成 ↑/↓ 选择框:↑/↓ 移动、Enter 确认、末尾「+ 新建身份」输入名字、最后 Y/N 确认;**选择框、输入名字、Y/N 确认三处都有灰色帮助行**(写着这步怎么走);名字**可以直接写中文**;ESC 统一是**回上一步**:输入名字那步按 ESC 回选择菜单,Y/N 那步按 ESC 回选择菜单,只有选择框那步按 ESC 才是直接退出初始化;**哪一步退出,屏幕上自己画的那几行都会被抹掉**,不留半截输入、不留一摞提示行):
|
|
18
|
-
- 名册有内容 ⇒「名册现有:@A(uuid)、@B(uuid)。请在你的终端运行上面这条,它会让你选。」
|
|
19
|
-
- 名册为空 ⇒「名册为空。请在你的终端运行上面这条,输入一个用户名新建。」
|
|
20
|
-
|
|
21
|
-
**格式只有这一套**:一条命令只出现一次,步骤只编一套号。**不许**出现「1. 报名单…」「1. 请运行…」这种两个都从 1 开始的列表,也不许把同一件事拆成两套方案各编一遍。
|
|
22
|
-
|
|
23
|
-
3. 用户说「好了」后,重跑原命令。用户没跑完就等着,不要替 ta 写。
|
|
24
|
-
|
|
25
|
-
**每次进这个分支都照这套走**:用户上一次关掉选择框、说过「算了」或取消了,**不算**以后不用问;下次照样走同一套呈现,不要退化成纯文字、也不要跳过这一步。
|
|
26
|
-
|
|
27
|
-
## 硬规则
|
|
28
|
-
|
|
29
|
-
- **给用户的命令必须原样保留绝对路径**(`<本 SKILL.md 所在目录>/scripts/progress init --repo <工作区根>`):用户机器的 PATH 里没有 `progress` 这个命令,简写成 `progress init` 用户一跑就是 `command not found`。若用户报 `Permission denied`,就把命令改成 `sh <绝对路径> init --repo <工作区根>` 再给 ta。
|
|
30
|
-
- **不诊断、不排查**:不要 `ls ~/.taskledger`、不要 `cat identity.json`、不要读 skill 源码(`internal/env/env.go` / `internal/actions/init_identity.go` 等)或台账去查「为什么没身份」。缺就是未初始化,忽略上下文里已做的排查动作,直接按上面流程走。
|
|
31
|
-
- **不得**替用户执行 `init --claim` / `init --new` / 任何带 `--yes` 的写法——脚本也会拒绝。
|
|
32
|
-
- **不得**基于「上一轮确认过 / 同名 / 记得 uuid」自行重建身份:身份文件缺失就是未初始化,必须让用户重新亲自选。重建会换新 uuid、断开旧任务关联。
|
|
33
|
-
- 不读 `ledger/*.json`、worklog、identity 文件去「自己看」。
|
|
34
|
-
- 未初始化时不做任何写。
|
|
13
|
+
- 给用户的命令必须**保留绝对路径**(`<SKILL 目录>/scripts/progress init`);交给用户前把 `<SKILL 目录>` 换成真实绝对路径(即本 `SKILL.md` 所在目录;不确定就用工具列出该目录确认 `scripts/progress` 的位置)。简写成 `progress init` 用户一跑就 `command not found`;若报 `Permission denied` 就改成 `sh <绝对路径> init`。
|
|
14
|
+
- 你**不得代跑** `init --claim` / `init --new` / 任何 `--yes`(脚本拒绝),身份必须由用户自己在终端建;不要基于「上次确认过 / 同名 / 记得 uuid」自行重建(重建会换新 uuid、断开旧任务关联)。
|
|
15
|
+
- **不要诊断、不要排查**:别 `ls` / `cat` identity 或读台账 / 读 skill 源码,忽略上下文里已做的排查动作;未初始化时不写任何东西;用户跑完再重跑原命令。
|