Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 28 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ Because local tasks and promoted remote tasks may share `TaskFlowDocs/todo.md`,

Before creating or updating a pull request, TaskFlow reads the applicable `.github/pull_request_template.md`, satisfies every required item, records the field mapping and verification in `plan.md`, and blocks PR mutation when a required item is missing or ambiguous.

Run `bash hooks/repository-check [repo-root]` for an opt-in, read-only readiness summary. It reports missing baseline governance and ambiguous branch/remote information as `needs-user-input`, and names any task artifact left uncommitted in the checkout — an uncommitted task directory follows you to whatever branch you check out next, so the next task inherits it. The task-artifact report never changes the exit code; it is not attached to automatic hooks. `bash hooks/release-check [repo-root]` is the same kind of report for a release: it compares the version literals in all four plugin manifests, the newest `CHANGELOG.md` section, and each README's `claude plugin list` sample, and confirms each marketplace `ref` resolves to the commit its `sha` names. It exits `2` on a mismatch and `3` when a manifest is missing; CI runs it on every change.
Run `bash hooks/repository-check [repo-root]` for an opt-in, read-only readiness summary. It reports missing baseline governance and ambiguous branch/remote information as `needs-user-input`, and names any task artifact left uncommitted in the checkout — an uncommitted task directory follows you to whatever branch you check out next, so the next task inherits it. The task-artifact report never changes the exit code; it is not attached to automatic hooks. `bash hooks/release-check [repo-root]` is the same kind of report for a release: it compares the version literals in all four plugin manifests, the newest `CHANGELOG.md` section, and each README's `claude plugin list` sample, and checks that the marketplace entries and the tagged plugin agree. It exits `2` on a mismatch and `3` when a manifest is missing; CI runs it on every change.

Any user correction or addition to an approved task is classified before documents change: wording or approach clarifications are work revisions that update only affected records and the Plan change log; changes to an approved goal, requirement, acceptance criterion, scope, or contract create a Task version and return to approval. TaskFlow never continues implementation using an outdated plan.

Expand Down Expand Up @@ -240,6 +240,30 @@ stateDiagram-v2

TaskFlow ships as a Claude Code / Codex / CodeBuddy / dsh plugin: the `hooks/`, skill, and install wiring are all in one marketplace. No copying files or editing `settings.json` by hand. Trae has no such marketplace, so it is the one host whose install is a documented copy — see [Install with Trae](#install-with-trae).

## Install a specific version

Starting with `v1.3.1`, one release tag contains both the marketplace catalog and the same plugin version.

When switching an existing Claude Code or Codex marketplace to a specific version, remove its `taskflow` registration in the corresponding host first with `claude plugin marketplace remove taskflow` or `codex plugin marketplace remove taskflow`. Then add the pinned marketplace and install the plugin again. If an administrator manages the Claude Code source, update that setting instead.

```bash
claude plugin marketplace add 'https://github.com/hkwuks/TaskFlow.git#v1.3.1'
claude plugin install taskflow@taskflow
codex plugin marketplace add hkwuks/TaskFlow --ref v1.3.1
codex plugin add taskflow@taskflow
```

For CodeBuddy, dsh, or Trae, select the version with a Git checkout:

```bash
git clone --branch v1.3.1 https://github.com/hkwuks/TaskFlow.git taskflow-v1.3.1
codebuddy plugin marketplace add ./taskflow-v1.3.1
codebuddy plugin install taskflow@taskflow
dsh plugin --profile web add ./taskflow-v1.3.1
```

For Trae, use that checkout when copying the files described below. Keep the checkout if its path is used by your hook configuration.

### Install with Claude Code

Add the TaskFlow marketplace, then install the plugin:
Expand Down Expand Up @@ -333,29 +357,7 @@ CodeBuddy reloads hooks, skills, and agents on `/reload-plugins` without a resta

### Install with dsh

TaskFlow's repository root is a dsh plugin package. dsh has no marketplace and the
package is not on a registry, so the install names the Git repository and pins the
commit — the same commit the release tag names:

```bash
dsh plugin --profile web add github:hkwuks/TaskFlow#<40-character-sha>
```

Take the sha from the release you intend to run. Every release tag names one
commit, and it is the commit the marketplace catalogs pin for the other hosts, so
the value is already published rather than something to work out:

```bash
git ls-remote https://github.com/hkwuks/TaskFlow.git 'refs/tags/v1.1.15^{}'
# or, in a checkout: git rev-parse v1.1.15^{commit}
```

Pinning the full 40 characters is the point, not a formality: `dsh plugin add`
resolves through pnpm, and a bare `github:hkwuks/TaskFlow` would follow `main`, so a
later push would silently change what runs.

Installed from a local checkout instead, point at the directory — useful while
developing TaskFlow itself, and it tracks the working tree rather than a commit:
TaskFlow's repository root is a dsh plugin package. To install a specific version, use the tagged checkout above. For a development checkout, point at its root:

```bash
dsh plugin --profile web add <repo-root>
Expand All @@ -380,9 +382,7 @@ its output shape from the environment.
dsh's SessionStart sources are `startup`, `resume`, `clear`, and `compact`; there
is no `fork`, so the dsh matcher omits it.

To move to a newer release, re-add with that release's sha — `dsh plugin --profile web
update` refreshes dependencies, but the pin is what decides which commit the profile
runs, so a new release means a new pin.
To upgrade, check out the new release tag in its own directory and add that checkout to the profile.

### Install with Trae

Expand Down Expand Up @@ -468,7 +468,7 @@ Every check is a plain script at the repository root — no service, no test fra
| --- | --- |
| `bash hooks/smoke-test` | Builds temporary `TaskFlowDocs` fixtures and drives the full lifecycle through the hooks. `hooks/smoke-test-windows.ps1` is the Windows equivalent over PowerShell 5.1 and `run-hook.cmd`. |
| `bash hooks/repository-check .` | Read-only repository readiness: missing baseline governance and ambiguous branch/remote information, reported as `needs-user-input`. |
| `bash hooks/release-check .` | Every version literal a release has to move agrees, and each marketplace pin resolves to the commit its `sha` names. Exits `2` on a mismatch, `3` on a missing manifest. |
| `bash hooks/release-check .` | Every version literal a release has to move agrees, and both marketplace entries select the tagged plugin. Exits `2` on a mismatch, `3` on a missing manifest. |
| `python3 evals/runner.py` | Offline routing evals against immutable sample task trees. The runner is repository tooling, so it is the one thing here that does need Python. |

`.github/workflows/hooks.yml` runs four jobs on every push to `main` and every pull request: `smoke` on an Ubuntu / macOS / Windows matrix, `release`, `todo-merge-audit` (no merge in the pushed range dropped a Todo entry), and `evals`. The smoke job deliberately installs no language runtime — the hooks carry none, so a hook that ever grew an interpreter dependency fails there rather than in a user's session.
Expand Down
52 changes: 28 additions & 24 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ TaskFlow 从不在 base 工作区里写任务文档:每个任务使用独立

创建或更新 Pull Request 前,TaskFlow 必须读取适用的 `.github/pull_request_template.md`,完成每个必填项,在 `plan.md` 中记录字段映射和验证结果;必填项缺失或有歧义时禁止修改 PR。

可以运行 `bash hooks/repository-check [repo-root]` 获取可选的只读检查摘要。它会把缺失的基础治理文档和不明确的分支/远端信息标记为 `needs-user-input`,并列出该 checkout 里未提交的任务产物——未提交的任务目录会跟着你进入下一个 `git checkout` 的分支,于是被下一个任务接手。任务产物这一段不影响退出码,也不会挂到自动 hook 上。`bash hooks/release-check [repo-root]` 是同一类面向发布的报告:比对四个插件 manifest、`CHANGELOG.md` 最新的版本段落、两份 README 的 `claude plugin list` 示例中的版本号,并确认 marketplace 的 `ref` 与它声明的 `sha` 指向同一个提交。版本不一致时退出 `2`,manifest 缺失时退出 `3`;CI 在每次改动上都会运行它。
可以运行 `bash hooks/repository-check [repo-root]` 获取可选的只读检查摘要。它会把缺失的基础治理文档和不明确的分支/远端信息标记为 `needs-user-input`,并列出该 checkout 里未提交的任务产物——未提交的任务目录会跟着你进入下一个 `git checkout` 的分支,于是被下一个任务接手。任务产物这一段不影响退出码,也不会挂到自动 hook 上。`bash hooks/release-check [repo-root]` 是同一类面向发布的报告:比对四个插件 manifest、`CHANGELOG.md` 最新的版本段落、两份 README 的 `claude plugin list` 示例中的版本号,并检查市场目录和标签内的插件版本一致。版本不一致时退出 `2`,manifest 缺失时退出 `3`;CI 在每次改动上都会运行它。

用户对已批准任务提出修正或新增要求时,TaskFlow 必须先分类再修改文档:只改措辞或实现路径的澄清属于工作修订,仅更新受影响记录并在 Plan 变更日志记一行;改动已批准的目标、需求、验收、范围或契约才创建新 Task version 并回到批准门禁。不得带着过期 Plan 继续实施。

Expand Down Expand Up @@ -206,6 +206,30 @@ stateDiagram-v2

TaskFlow 以插件形式分发(Claude Code / Codex / CodeBuddy 同一套市场,dsh 为独立插件包,Trae 为 Trae 自有格式的 hooks 文件):`hooks/`、技能与安装配置都在一个仓库里,无需手动复制文件或手改 `settings.json`。

## 安装指定版本

从 `v1.3.1` 起,一个发布标签包含对应版本的市场目录和插件内容。

Claude Code 或 Codex 已注册 `taskflow` 市场时,切换到指定版本前,先在对应宿主运行 `claude plugin marketplace remove taskflow` 或 `codex plugin marketplace remove taskflow`,再添加指定版本的市场并重新安装插件。Claude Code 市场来源由管理员管理时,需更新对应设置。

```bash
claude plugin marketplace add 'https://github.com/hkwuks/TaskFlow.git#v1.3.1'
claude plugin install taskflow@taskflow
codex plugin marketplace add hkwuks/TaskFlow --ref v1.3.1
codex plugin add taskflow@taskflow
```

CodeBuddy、dsh 和 Trae 可以通过检出指定标签选择版本:

```bash
git clone --branch v1.3.1 https://github.com/hkwuks/TaskFlow.git taskflow-v1.3.1
codebuddy plugin marketplace add ./taskflow-v1.3.1
codebuddy plugin install taskflow@taskflow
dsh plugin --profile web add ./taskflow-v1.3.1
```

Trae 从这个检出目录复制下文列出的文件。如果 hook 配置引用了该目录,请保留它。

### 用 Claude Code 安装

先添加 TaskFlow 市场,再安装插件:
Expand Down Expand Up @@ -298,26 +322,7 @@ CodeBuddy 通过 `/reload-plugins` 重新加载 hooks、技能和代理,无需

### 用 dsh 安装

TaskFlow 的仓库根目录本身就是一个 dsh 插件包。dsh 没有插件市场,这个包也不在任何
registry 上,所以安装命令直接指向 Git 仓库并钉住 commit——就是发布 tag 所指向的那个:

```bash
dsh plugin --profile web add github:hkwuks/TaskFlow#<40 位 sha>
```

sha 从你要运行的版本取。每个发布 tag 指向一个 commit,而它也正是其它宿主的 marketplace
catalog 所钉的那个,所以这是一个已经公开的值,不需要自己推算:

```bash
git ls-remote https://github.com/hkwuks/TaskFlow.git 'refs/tags/v1.1.15^{}'
# 或在本地检出中: git rev-parse v1.1.15^{commit}
```

钉满 40 位不是形式:`dsh plugin add` 经由 pnpm 解析,写成 `github:hkwuks/TaskFlow`
会跟随 `main`,于是之后任何一次推送都会悄悄改变实际运行的代码。

从本地检出目录安装则直接指向该目录,适合在开发 TaskFlow 自身时使用——它跟随工作树
而不是某个 commit:
TaskFlow 仓库的根目录就是 dsh 插件包。固定版本时使用上文的标签检出。开发时直接指向本地检出目录。

```bash
dsh plugin --profile web add <仓库根目录>
Expand All @@ -339,8 +344,7 @@ dsh 通过 `hooks/hooks-dsh.json` 和 dsh 自带的 Claude Code hook 桥接,
dsh 的 SessionStart 来源是 `startup`、`resume`、`clear`、`compact`,没有 `fork`,
因此 dsh 的 matcher 不含它。

升级到新版本时,用新版本的 sha 重新 add——`dsh plugin --profile web update` 会刷新依赖,
但真正决定 profile 运行哪个 commit 的是那个 pin,所以换版本意味着换 pin。
升级时,在新目录检出目标标签,再把该目录添加到 profile。

### 用 Trae 安装

Expand Down Expand Up @@ -417,7 +421,7 @@ dsh plugin --profile web add <仓库根目录>
| --- | --- |
| `bash hooks/smoke-test` | 构造临时 `TaskFlowDocs` 夹具,通过 hook 跑完整生命周期。`hooks/smoke-test-windows.ps1` 是 Windows 上的等价实现(PowerShell 5.1 + `run-hook.cmd`)。 |
| `bash hooks/repository-check .` | 只读的仓库就绪度检查:缺失的基础治理文档、不明确的分支/远端信息,标记为 `needs-user-input`。 |
| `bash hooks/release-check .` | 一次发布要改动的所有版本字面量是否一致,以及每个 marketplace pin 是否解析到它 `sha` 声明的那个提交。不一致退出 `2`,manifest 缺失退出 `3`。 |
| `bash hooks/release-check .` | 一次发布要改动的所有版本字面量是否一致,以及两份市场目录是否选择同版标签的插件。不一致退出 `2`,manifest 缺失退出 `3`。 |
| `python3 evals/runner.py` | 针对不可变示例任务树的离线路由评测。runner 属于仓库工具链,是这里唯一需要 Python 的东西。 |

`.github/workflows/hooks.yml` 在每次推送 `main` 和每个 Pull Request 上跑四个作业:`smoke`(Ubuntu / macOS / Windows 矩阵)、`release`、`todo-merge-audit`(推送范围内没有 merge 丢掉 Todo 条目)、`evals`。smoke 作业刻意不安装任何语言运行时——hook 本身不依赖运行时,所以一旦某个 hook 长出解释器依赖,会在这里失败,而不是等到用户会话里才暴露。
Expand Down
Loading
Loading