@cnzgray/dsh-mattpocock-workflow 0.6.0 → 0.8.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cnzgray/dsh-mattpocock-workflow",
3
- "version": "0.6.0",
3
+ "version": "0.8.0",
4
4
  "description": "在 DSH 里运行 mattpocock/skills 工作流的 MattWorkflow 任务面板插件。",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/skills/README.md CHANGED
@@ -1,21 +1,23 @@
1
+ English | [简体中文](README.zh-CN.md)
2
+
1
3
  # skills
2
4
 
3
- 随插件发布的技能(中英两份)。目录结构对照上游 [mattpocock/skills](https://github.com/mattpocock/skills):
4
- `skills/<分类>/<技能名>/`,英文文件沿用上游文件名(如 `issue-tracker-gitea.md`),中文版加 `.zh.md` 后缀
5
- (如 `issue-tracker-gitea.zh.md`)。上游技能升级时按同名文件对齐,不另起目录。
5
+ Skills shipped with the plugin (skill bodies and seed templates are English only, and file names match upstream). The directory structure mirrors upstream [mattpocock/skills](https://github.com/mattpocock/skills):
6
+ `skills/<category>/<skill name>/`; skill files keep their upstream file names (such as `issue-tracker-gitea.md`), with no separate directories and no translation copies.
7
+ When upstream skills are upgraded, align by the same file name.
6
8
 
7
- ## 工单后端种子模板
9
+ ## Ticket backend seed templates
8
10
 
9
- `engineering/setup-matt-pocock-skills/` 下每种工单后端一份种子模板,初始化工作区时选用其中一份写进
10
- `docs/agents/issue-tracker.md`。GitHub、GitLab 与本地 Markdown 的模板随上游技能提供;本插件新增的是
11
- Gitea 版:`issue-tracker-gitea.md`(英)与 `issue-tracker-gitea.zh.md`(中)。
11
+ Under `engineering/setup-matt-pocock-skills/` there is one seed template per ticket backend; when initializing a workspace, choose one of them and write it into
12
+ `docs/agents/issue-tracker.md`. Templates for GitHub, GitLab and local Markdown come with the upstream skills; the one this plugin adds is
13
+ the Gitea version: `issue-tracker-gitea.md`.
12
14
 
13
- Gitea 后端的初始化约定:
15
+ Conventions for initializing the Gitea backend:
14
16
 
15
- 1. 当前工作区 `origin` 远端的主机与 `tea logins list --output json` 里某个登录的主机一致时,默认推荐
16
- Gitea;用户也可以手动选择;
17
- 2. 选了 Gitea 但没有匹配的登录时停下来,让用户先运行 `tea login add`,不要写出一份用不了的配置;
18
- 3. `tea --version` 低于 0.16 时提示升级,`tea api --include` 与 `--description-file` 依赖这个版本;
19
- 4. 完成标志是在仓库目录里运行 `tea api /repos/{owner}/{repo}` 能返回仓库信息(`tea repo` 只列仓库,
20
- 不能判断当前目录);
21
- 5. 先用 `tea labels list --output json` 看缺哪些分诊标签,再用 `tea labels create` 补齐,最后写种子模板。
17
+ 1. When the host of the current workspace's `origin` remote matches the host of a login in `tea logins list --output json`, recommend
18
+ Gitea by default; the user may also choose it manually;
19
+ 2. If Gitea is chosen but no matching login exists, stop and have the user run `tea login add` first; do not write a configuration that cannot work;
20
+ 3. When `tea --version` is below 0.16, suggest upgrading; `tea api --include` and `--description-file` depend on this version;
21
+ 4. The completion criterion is that running `tea api /repos/{owner}/{repo}` in the repository directory returns repository information (`tea repo` only lists repositories
22
+ and cannot judge the current directory);
23
+ 5. First use `tea labels list --output json` to see which triage labels are missing, then use `tea labels create` to add them, and finally write the seed template.
@@ -0,0 +1,23 @@
1
+ [English](README.md) | 简体中文
2
+
3
+ # skills
4
+
5
+ 随插件发布的技能(技能正文与种子模板只英文,文件名与上游一致)。目录结构对照上游 [mattpocock/skills](https://github.com/mattpocock/skills):
6
+ `skills/<分类>/<技能名>/`,技能文件沿用上游文件名(如 `issue-tracker-gitea.md`),不另起目录,也不提供翻译副本。
7
+ 上游技能升级时按同名文件对齐。
8
+
9
+ ## 工单后端种子模板
10
+
11
+ `engineering/setup-matt-pocock-skills/` 下每种工单后端一份种子模板,初始化工作区时选用其中一份写进
12
+ `docs/agents/issue-tracker.md`。GitHub、GitLab 与本地 Markdown 的模板随上游技能提供;本插件新增的是
13
+ Gitea 版:`issue-tracker-gitea.md`。
14
+
15
+ Gitea 后端的初始化约定:
16
+
17
+ 1. 当前工作区 `origin` 远端的主机与 `tea logins list --output json` 里某个登录的主机一致时,默认推荐
18
+ Gitea;用户也可以手动选择;
19
+ 2. 选了 Gitea 但没有匹配的登录时停下来,让用户先运行 `tea login add`,不要写出一份用不了的配置;
20
+ 3. `tea --version` 低于 0.16 时提示升级,`tea api --include` 与 `--description-file` 依赖这个版本;
21
+ 4. 完成标志是在仓库目录里运行 `tea api /repos/{owner}/{repo}` 能返回仓库信息(`tea repo` 只列仓库,
22
+ 不能判断当前目录);
23
+ 5. 先用 `tea labels list --output json` 看缺哪些分诊标签,再用 `tea labels create` 补齐,最后写种子模板。
@@ -1,73 +0,0 @@
1
- # 工单后端:Gitea
2
-
3
- 本仓库的 issue 和 spec 都放在 Gitea 上,所有操作统一用 [`tea`](https://gitea.com/gitea/tea) 命令行完成。要求 `tea` 0.16 或更高版本:本文依赖 `tea api`、`tea comments` 与 `tea issues edit --description-file`。
4
-
5
- 所有命令都在仓库目录里执行。`tea` 从登录配置推断实例、从 `git remote` 推断仓库。要确认当前目录能解析到登录可见的仓库,运行 `tea api /repos/{owner}/{repo}`:成功时返回仓库信息,不在克隆目录或没有匹配的登录时会失败。`tea repo` 只是列出登录可见的仓库,不能用来判断当前目录。
6
-
7
- ## 约定
8
-
9
- - **建票**:`tea issues create --title "..." --description-file <文件> --labels "bug,ready-for-agent"`。多行正文先写进文件,避免 shell 转义弄坏内容;`--description -` 从标准输入读。
10
- - **读票**:`tea issues <n> --comments` 打印正文与评论。要机器可读时用 API:`tea api /repos/{owner}/{repo}/issues/<n>` 与 `tea api /repos/{owner}/{repo}/issues/<n>/comments`。
11
- - **列表**:`tea issues list --state all --kind issues --labels "ready-for-agent" --output json` 做带过滤的查看。要拿全量就按页读 API(见 **分页**)。
12
- - **分页**:`tea api --include` 把状态行和响应头写到标准错误,其中包含 `X-Total-Count`。请求 `limit=50`(Gitea 的默认返回上限),然后一直请求 `page=2`、`page=3`…… 直到拿到的条数等于 `X-Total-Count`。
13
- - **评论**:`tea comments <n> "<正文>"`(别名 `tea comment`)。
14
- - **加减标签**:`tea issues edit <n> --add-labels "..."` / `--remove-labels "..."`。缺标签时先用 `tea labels create --name "..." --color "#ededed"` 建出来。
15
- - **关闭**:先用 `tea comments <n> "<原因>"` 写明原因,再 `tea issues close <n>`。重新打开用 `tea issues reopen <n>`。
16
- - **原地更新 spec**:`tea issues edit <n> --description-file <文件>`。同一份 spec 绝不另建一张票。
17
-
18
- 只读 issue 接口。`tea issues list --kind issues` 与 `type=issues` 会把 pull request 挡在外面;不要把 PR 当成票来统计。
19
-
20
- ## 父子关系
21
-
22
- Gitea 没有子 issue。子票正文的**第一个非空行**单独写 `Part of #<父票>`,并在父票正文的任务列表里登记子票:`- [ ] #<子票>`。
23
-
24
- 任务面板只从这一行读父级。写在正文后面、放在引用块或标题里、带多余文字或指向其他仓库的 `Part of` 都不算父级。`Blocked by:` 行写在它下面;阻塞关系不代表父子。
25
-
26
- ## 阻塞
27
-
28
- Gitea 原生的 issue 依赖是规范的、网页上也可见的表示。`tea` 没有专门的子命令,所以走 API:
29
-
30
- - **读阻塞票**:`tea api /repos/{owner}/{repo}/issues/<n>/dependencies` 列出阻塞 `<n>` 的票。所有阻塞票都关闭后,这张票才算解除阻塞。
31
- - **加阻塞关系**:`tea api --method POST /repos/{owner}/{repo}/issues/<子票>/dependencies -F index=<阻塞票>`。
32
- - **删阻塞关系**:`tea api --method DELETE /repos/{owner}/{repo}/issues/<子票>/dependencies -F index=<阻塞票>`。
33
-
34
- 实例或仓库可以关闭 issue 依赖功能,此时接口返回 404。这种情况下把 `Blocked by: #<n>, #<n>` 写在子票正文顶部(有 `Part of` 行时紧跟在它后面),改用这一行判断阻塞。
35
-
36
- ## 分诊标签
37
-
38
- 先用 `tea labels list --output json` 列出仓库已有的标签,只建缺的那些,这样打标签不会失败,也不会因为重复创建报错:
39
-
40
- ```bash
41
- tea labels create --name "needs-triage" --color "#ededed"
42
- tea labels create --name "needs-info" --color "#d4c5f9"
43
- tea labels create --name "ready-for-agent" --color "#0e8a16"
44
- tea labels create --name "ready-for-human" --color "#1d76db"
45
- tea labels create --name "wontfix" --color "#ffffff"
46
- tea labels create --name "bug" --color "#d73a4a"
47
- tea labels create --name "enhancement" --color "#a2eeef"
48
- ```
49
-
50
- ## 发布到工单后端
51
-
52
- 发布 spec 时先确定目标票:用户给了票号或链接,或者对话里已经指明是哪张票,就用 `tea issues edit <票号> --description-file <文件>` 原地更新,不再另建一张。发布 tickets 时,每张票都是一个新 issue,除非它已经存在。
53
-
54
- 没有指定目标时,先搜索开放的票看有没有匹配的,并在建票前问用户。同一份 spec 绝不建第二张票。
55
-
56
- ## 读取相关工单
57
-
58
- 按 **读票** 一节执行,带上 `--comments`,把讨论一起读进来。
59
-
60
- ## wayfinder 操作
61
-
62
- 供 `/wayfinder` 使用。**地图**是一张带 `wayfinder:map` 标签的 issue;**子票**就是它的子 issue。
63
-
64
- - **地图**:`tea issues create --title "..." --description-file <文件> --labels "wayfinder:map"`,正文放 Notes / Decisions-so-far / Fog。
65
- - **子票**:正文顶部写 `Part of #<地图>`,在 地图的任务列表里登记,并打 `wayfinder:<type>` 标签(`research`/`prototype`/`grilling`/`task`)。认领后把它指派给负责推进的开发者。
66
- - **阻塞**:见 **约定** 里的 **阻塞**。
67
- - **前沿查询**:列出带 `wayfinder:<type>` 标签的开放票,只保留正文里含 `Part of #<地图>` 的,去掉有未关闭阻塞票的(原生依赖,或 `Blocked by` 行里指向未关闭票)和有指派人的;按地图顺序取第一张。
68
- - **认领**:`tea issues edit <n> --add-assignees <你的用户名>`,这是本次会话的第一次写操作。
69
- - **结案**:`tea comments <n> "<答案>"`,然后 `tea issues close <n>`,再把上下文指针(gist + 链接)追加到地图的 Decisions-so-far:`tea issues edit <地图> --description-file <文件>`。
70
-
71
- ## 安全
72
-
73
- 只往用户自己的仓库建票。同时登录了多个 Gitea 实例时,第一次写操作前先用 `tea api /repos/{owner}/{repo}` 确认当前目录解析到的实例与仓库;需要固定实例时加 `--login <名称>`。除用户自己拥有外,绝不往这些 skills 的来源仓库建票。