@zmice/zc 0.2.5 → 0.2.7
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 +98 -11
- package/dist/cli/__tests__/platform.test.js +215 -2
- package/dist/cli/__tests__/platform.test.js.map +1 -1
- package/dist/cli/__tests__/surface.test.js +52 -0
- package/dist/cli/__tests__/surface.test.js.map +1 -1
- package/dist/cli/__tests__/team.test.d.ts +2 -0
- package/dist/cli/__tests__/team.test.d.ts.map +1 -0
- package/dist/cli/__tests__/team.test.js +29 -0
- package/dist/cli/__tests__/team.test.js.map +1 -0
- package/dist/cli/__tests__/upstream.test.js +4 -0
- package/dist/cli/__tests__/upstream.test.js.map +1 -1
- package/dist/cli/platform.d.ts +11 -3
- package/dist/cli/platform.d.ts.map +1 -1
- package/dist/cli/platform.js +216 -54
- package/dist/cli/platform.js.map +1 -1
- package/dist/cli/team.d.ts.map +1 -1
- package/dist/cli/team.js +114 -4
- package/dist/cli/team.js.map +1 -1
- package/dist/cli/upstream.d.ts +1 -0
- package/dist/cli/upstream.d.ts.map +1 -1
- package/dist/cli/upstream.js +84 -5
- package/dist/cli/upstream.js.map +1 -1
- package/dist/node_modules/@zmice/platform-core/dist/index.d.ts +37 -3
- package/dist/node_modules/@zmice/platform-core/dist/index.d.ts.map +1 -1
- package/dist/node_modules/@zmice/platform-core/dist/index.js +68 -0
- package/dist/node_modules/@zmice/platform-core/dist/index.js.map +1 -1
- package/dist/node_modules/@zmice/platform-core/dist/index.test.js +44 -1
- package/dist/node_modules/@zmice/platform-core/dist/index.test.js.map +1 -1
- package/dist/runtime/__tests__/worktree-manager.test.js +63 -1
- package/dist/runtime/__tests__/worktree-manager.test.js.map +1 -1
- package/dist/runtime/worktree-manager.d.ts +26 -1
- package/dist/runtime/worktree-manager.d.ts.map +1 -1
- package/dist/runtime/worktree-manager.js +126 -12
- package/dist/runtime/worktree-manager.js.map +1 -1
- package/dist/team/__tests__/orchestrator.test.js +40 -0
- package/dist/team/__tests__/orchestrator.test.js.map +1 -1
- package/dist/team/__tests__/planner.test.d.ts +2 -0
- package/dist/team/__tests__/planner.test.d.ts.map +1 -0
- package/dist/team/__tests__/planner.test.js +43 -0
- package/dist/team/__tests__/planner.test.js.map +1 -0
- package/dist/team/__tests__/task-queue.test.js +18 -0
- package/dist/team/__tests__/task-queue.test.js.map +1 -1
- package/dist/team/orchestrator.d.ts +2 -1
- package/dist/team/orchestrator.d.ts.map +1 -1
- package/dist/team/orchestrator.js +29 -10
- package/dist/team/orchestrator.js.map +1 -1
- package/dist/team/planner.d.ts +27 -0
- package/dist/team/planner.d.ts.map +1 -0
- package/dist/team/planner.js +120 -0
- package/dist/team/planner.js.map +1 -0
- package/dist/team/task-queue.d.ts +3 -0
- package/dist/team/task-queue.d.ts.map +1 -1
- package/dist/team/task-queue.js +11 -2
- package/dist/team/task-queue.js.map +1 -1
- package/package.json +2 -2
- package/vendor/node_modules/@zmice/platform-core/dist/index.d.ts +37 -3
- package/vendor/node_modules/@zmice/platform-core/dist/index.d.ts.map +1 -1
- package/vendor/node_modules/@zmice/platform-core/dist/index.js +68 -0
- package/vendor/node_modules/@zmice/platform-core/dist/index.js.map +1 -1
- package/vendor/node_modules/@zmice/platform-core/dist/index.test.js +44 -1
- package/vendor/node_modules/@zmice/platform-core/dist/index.test.js.map +1 -1
- package/vendor/packages/platform-claude/dist/index.d.ts.map +1 -1
- package/vendor/packages/platform-claude/dist/index.js +12 -70
- package/vendor/packages/platform-claude/dist/index.js.map +1 -1
- package/vendor/packages/platform-codex/dist/generate.d.ts +1 -1
- package/vendor/packages/platform-codex/dist/generate.d.ts.map +1 -1
- package/vendor/packages/platform-codex/dist/generate.js +1 -1
- package/vendor/packages/platform-codex/dist/generate.js.map +1 -1
- package/vendor/packages/platform-codex/dist/index.d.ts +15 -1
- package/vendor/packages/platform-codex/dist/index.d.ts.map +1 -1
- package/vendor/packages/platform-codex/dist/index.js +320 -47
- package/vendor/packages/platform-codex/dist/index.js.map +1 -1
- package/vendor/packages/platform-codex/dist/index.test.js +113 -5
- package/vendor/packages/platform-codex/dist/index.test.js.map +1 -1
- package/vendor/packages/platform-opencode/dist/index.d.ts.map +1 -1
- package/vendor/packages/platform-opencode/dist/index.js +15 -81
- package/vendor/packages/platform-opencode/dist/index.js.map +1 -1
- package/vendor/packages/platform-qwen/dist/index.d.ts.map +1 -1
- package/vendor/packages/platform-qwen/dist/index.js +28 -84
- package/vendor/packages/platform-qwen/dist/index.js.map +1 -1
- package/vendor/packages/toolkit/src/content/agents/architect/body.md +8 -0
- package/vendor/packages/toolkit/src/content/agents/code-reviewer/body.md +10 -0
- package/vendor/packages/toolkit/src/content/agents/product-owner/body.md +8 -0
- package/vendor/packages/toolkit/src/content/commands/plan-review/body.md +3 -1
- package/vendor/packages/toolkit/src/content/commands/start/body.md +51 -2
- package/vendor/packages/toolkit/src/content/commands/start/meta.yaml +2 -2
- package/vendor/packages/toolkit/src/content/skills/branch-finish-and-cleanup/body.md +17 -0
- package/vendor/packages/toolkit/src/content/skills/browser-qa-testing/body.md +77 -520
- package/vendor/packages/toolkit/src/content/skills/ci-cd-and-automation/body.md +56 -387
- package/vendor/packages/toolkit/src/content/skills/code-review-and-quality/body.md +10 -0
- package/vendor/packages/toolkit/src/content/skills/code-simplification/body.md +55 -301
- package/vendor/packages/toolkit/src/content/skills/context-engineering/body.md +10 -0
- package/vendor/packages/toolkit/src/content/skills/continuous-learning/body.md +66 -331
- package/vendor/packages/toolkit/src/content/skills/multi-perspective-review/body.md +30 -1
- package/vendor/packages/toolkit/src/content/skills/parallel-agent-dispatch/body.md +79 -317
- package/vendor/packages/toolkit/src/content/skills/performance-optimization/body.md +60 -330
- package/vendor/packages/toolkit/src/content/skills/planning-and-task-breakdown/body.md +35 -0
- package/vendor/packages/toolkit/src/content/skills/sdd-tdd-workflow/body.md +66 -342
- package/vendor/packages/toolkit/src/content/skills/sprint-retrospective/body.md +66 -303
- package/vendor/packages/toolkit/src/content/skills/team-orchestration/body.md +81 -327
- package/vendor/packages/toolkit/src/content/skills/test-driven-development/body.md +50 -346
- package/vendor/packages/toolkit/src/content/skills/using-agent-skills/body.md +26 -2
- package/vendor/references/upstreams.yaml +5 -0
|
@@ -6,17 +6,19 @@
|
|
|
6
6
|
|
|
7
7
|
1. 读取当前 Spec 或 Plan,提取关键决策点
|
|
8
8
|
2. **产品视角**:用户价值清晰?边界覆盖?验收可测?
|
|
9
|
-
3.
|
|
9
|
+
3. **工程视角**:架构、数据流、边界条件、失败模式、测试策略和性能预算可控?
|
|
10
10
|
4. **设计视角**:体验流畅?异常状态完整?一致性足够?
|
|
11
11
|
5. **DevEx 视角**:接口直觉?文档充分?配置合理?
|
|
12
12
|
6. 汇总发现,按 `Critical / Warning / Suggestion` 分级
|
|
13
13
|
7. 存在 `Critical` 时阻断,先修复再继续
|
|
14
|
+
8. 把评审结论写成 plan 可吸收的修订项、验收标准或验证门禁
|
|
14
15
|
|
|
15
16
|
## 当前阶段的边界
|
|
16
17
|
|
|
17
18
|
- 这里只做评审,不直接进入实现
|
|
18
19
|
- 重点是提前暴露盲点,而不是重写整份规格
|
|
19
20
|
- 评审结论必须指向明确修正动作
|
|
21
|
+
- 问题要少而关键;只有会改变方案的疑问才向用户提出
|
|
20
22
|
|
|
21
23
|
## 从这里通常接到哪里
|
|
22
24
|
|
|
@@ -8,6 +8,20 @@
|
|
|
8
8
|
4. 判断风险等级:`trivial` / `standard` / `high-risk`
|
|
9
9
|
5. 输出推荐 workflow、该 workflow 的默认入口和必要的防护建议
|
|
10
10
|
|
|
11
|
+
## 输出契约
|
|
12
|
+
|
|
13
|
+
`start` 每次都要给出一个可执行分诊结果,而不是泛泛建议:
|
|
14
|
+
|
|
15
|
+
- `workflow`:六条固定 workflow 之一
|
|
16
|
+
- `entry`:下一步应该调用的 command / skill,必须是实际可执行入口
|
|
17
|
+
- `agent`:可选协作角色;只有平台支持且用户授权时才建议,不作为默认入口
|
|
18
|
+
- `reason`:用 1-3 条证据说明为什么这样判型
|
|
19
|
+
- `assumption`:如果有未确认前提,明确写出
|
|
20
|
+
- `question`:只有无法安全推进时才问,最多 1-3 个关键问题
|
|
21
|
+
- `verification`:说明完成前需要什么证据
|
|
22
|
+
|
|
23
|
+
如果信息足够,直接选择保守 workflow 并继续推进;不要为了形式完整而反复提问。
|
|
24
|
+
|
|
11
25
|
## 固定 workflow
|
|
12
26
|
|
|
13
27
|
### 1. `product-analysis`
|
|
@@ -95,12 +109,30 @@
|
|
|
95
109
|
- 重点是文档、ADR、发布与同步:进入 `docs-release`
|
|
96
110
|
- 当前先要理解项目、修复上下文、摸清约束:进入 `investigation`
|
|
97
111
|
|
|
112
|
+
### 判型优先级
|
|
113
|
+
|
|
114
|
+
当一个请求同时命中多个 workflow,按下面顺序消歧:
|
|
115
|
+
|
|
116
|
+
1. **显式 review findings**:进入 `review-closure`。如果用户要求修复,入口是 `review-response-and-resolution`;如果要求审查所有变更,入口是 `quality-review`。
|
|
117
|
+
2. **CI 失败 / 报错日志 / 可复现异常**:进入 `bugfix`。
|
|
118
|
+
3. **上游更新、依赖升级、陌生能力吸收**:先 `investigation` 拿证据,再按范围进入 `docs-release` 或 `full-delivery`。不能先凭记忆同步。
|
|
119
|
+
4. **文档误导、安装说明 drift、发布后同步**:如果只改文档,进入 `docs-release`;如果文档暴露实现不一致,先 `bugfix`。
|
|
120
|
+
5. **新功能或跨模块优化**:目标和验收明确时进入 `full-delivery`;目标不稳定时先 `product-analysis`。
|
|
121
|
+
6. **生产、数据、破坏性命令、凭据、跨会话记忆或项目路由写入**:主 workflow 不变,但必须加 `guard` / `careful` / `freeze` 这类防护建议。
|
|
122
|
+
|
|
123
|
+
### 提问纪律
|
|
124
|
+
|
|
125
|
+
- 能从仓库、日志、diff、配置或用户原话判断的,不问。
|
|
126
|
+
- 只有架构方向、数据安全、破坏性操作、缺失关键上下文、或用户目标互相冲突时才问。
|
|
127
|
+
- 问题要以结果和风险表述:这个选择会避免什么风险、解锁什么能力、改变什么体验。
|
|
128
|
+
- 如果用户已经给出偏好,按偏好执行;偏好不能变成自动写入长期配置或跨会话记忆的授权。
|
|
129
|
+
|
|
98
130
|
## 在 workflow 内部的切入点
|
|
99
131
|
|
|
100
132
|
- `product-analysis`
|
|
101
133
|
- 主入口:`product-analysis`
|
|
102
134
|
- 需要先发散想法:`idea`
|
|
103
|
-
-
|
|
135
|
+
- 需要产品判断:继续 `product-analysis`;必要时建议 `product-owner` 作为可选 agent
|
|
104
136
|
- 需要方案探索:`brainstorming-and-design`
|
|
105
137
|
- 需要沉淀规格:`spec`
|
|
106
138
|
- 需要做方案评审:`plan-review`
|
|
@@ -114,6 +146,7 @@
|
|
|
114
146
|
- 主入口:`debug`
|
|
115
147
|
- `review-closure`
|
|
116
148
|
- 主入口:`quality-review`
|
|
149
|
+
- 已有 review findings 且需要修复:`review-response-and-resolution`
|
|
117
150
|
- `docs-release`
|
|
118
151
|
- 文档优先:`doc`
|
|
119
152
|
- 发布优先:`ship`
|
|
@@ -122,11 +155,27 @@
|
|
|
122
155
|
- 上下文漂移:`ctx-health`
|
|
123
156
|
- 需要重新收敛问题:`idea`
|
|
124
157
|
|
|
158
|
+
## 并行与 agent 判断
|
|
159
|
+
|
|
160
|
+
`start` 可以评估是否适合并行,但不能把并行当默认:
|
|
161
|
+
|
|
162
|
+
- 任务能按文件、模块或证据问题拆开,且没有强依赖:可以建议 `parallel-agent-dispatch` 或 `zc team plan`
|
|
163
|
+
- 无法证明独立、存在同文件冲突、存在依赖链:默认串行或先计划
|
|
164
|
+
- 用户没有明确授权时,不自动启动子代理或 `zc team start`
|
|
165
|
+
- 如果进入 `zc team`,先 dry-run:`zc team plan ... --json`
|
|
166
|
+
|
|
167
|
+
## 上下文与持久化边界
|
|
168
|
+
|
|
169
|
+
- skill 和 workflow 应按需加载;不要把所有 skill 都常驻上下文
|
|
170
|
+
- `AGENTS.md`、`GEMINI.md`、平台规则文件只放长期项目约定和稳定路由
|
|
171
|
+
- 写入用户级配置、跨项目路由、跨会话记忆或跨机器同步前,必须明确说明影响并取得用户授权
|
|
172
|
+
- 平台不支持的能力不能通过文案暗示支持;例如某个平台没有 native plugin,就走 install / filesystem 适配路线
|
|
173
|
+
|
|
125
174
|
## 平台说明
|
|
126
175
|
|
|
127
176
|
- `start` 是 canonical command,不等于所有平台都有原生同名命令
|
|
128
177
|
- 在 Codex 上,它更适合作为“统一任务开始方式”的自然语言入口
|
|
129
|
-
- 在 Qwen /
|
|
178
|
+
- 在 Qwen / Claude / OpenCode 上,可以呈现为更接近命令式的入口文案
|
|
130
179
|
- 当前阶段没有 `zc start` CLI
|
|
131
180
|
|
|
132
181
|
## 使用方式
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
kind: command
|
|
2
2
|
name: start
|
|
3
3
|
title: 开始
|
|
4
|
-
description:
|
|
4
|
+
description: 统一任务开始入口。用于先评估任务类型、清晰度、阶段与风险,再在 6 条固定 workflow 中选择默认入口;适用于不确定该先分析、实现、调试、审查、补文档还是调查摸底的请求。
|
|
5
5
|
tier: core
|
|
6
6
|
audience: default
|
|
7
7
|
stability: stable
|
|
@@ -52,4 +52,4 @@ platform_exposure:
|
|
|
52
52
|
source:
|
|
53
53
|
upstream: toolkit-original
|
|
54
54
|
strategy: curated
|
|
55
|
-
notes: 本仓库新增的统一任务入口,用于 intake、任务判型,并在 product-analysis、full-delivery、bugfix、review-closure、docs-release、investigation 六条固定 workflow 中选路;其中 product-analysis 由独立 workflow-entry 承接。
|
|
55
|
+
notes: 本仓库新增的统一任务入口,用于 intake、任务判型,并在 product-analysis、full-delivery、bugfix、review-closure、docs-release、investigation 六条固定 workflow 中选路;其中 product-analysis 由独立 workflow-entry 承接。2026-04-29 根据 agent-skills 的 trigger/description 经验和 gstack 的 outcome-framed question / stop-gate 经验补强路由纪律。
|
|
@@ -130,11 +130,28 @@ worktree 是隔离手段,不是长期存档机制。
|
|
|
130
130
|
|
|
131
131
|
如果一个并行批次完成后还残留大量无主分支,说明收尾协议没有真正执行。
|
|
132
132
|
|
|
133
|
+
使用 `zc team` 时,先运行 dry-run:
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
zc team shutdown <team-name> --plan
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
它只读取 fan-in 状态,不关闭 tmux、不删除 worktree。重点看每个 worker worktree:
|
|
140
|
+
|
|
141
|
+
- `clean`:没有未提交变更,可以继续判断是否合入或删除
|
|
142
|
+
- `dirty`:仍有未提交变更,必须先转移、提交或明确丢弃
|
|
143
|
+
- `ahead`:分支领先目标引用,需要判断是否合入或开 PR
|
|
144
|
+
- `merged`:已合入的分支可以进入删除流程
|
|
145
|
+
- `unknown`:状态无法判断,必须人工检查后再清理
|
|
146
|
+
|
|
147
|
+
只有每个 worktree 的去向明确后,才运行不带 `--plan` 的 `zc team shutdown <team-name>`。
|
|
148
|
+
|
|
133
149
|
## 最小收尾清单
|
|
134
150
|
|
|
135
151
|
- [ ] branch 的最终去向已明确
|
|
136
152
|
- [ ] 必要验证已完成,证据可追溯
|
|
137
153
|
- [ ] 需要保留的信息已转移到 PR、任务系统或文档
|
|
154
|
+
- [ ] `zc team shutdown <team-name> --plan` 没有暴露未解释的 `dirty` / `unknown`
|
|
138
155
|
- [ ] 不再需要的 branch 已删除
|
|
139
156
|
- [ ] 不再需要的 worktree 已移除
|
|
140
157
|
- [ ] 没有遗留未解释的脏文件或临时产物
|