@xulthekl/team-flow 0.59.0 → 0.60.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/.claude/always/phase-guard.md +1 -1
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +2 -2
- package/.codex-plugin/plugin.json +1 -1
- package/.cursor-plugin/marketplace.json +1 -1
- package/.cursor-plugin/plugin.json +2 -2
- package/.github/plugin/marketplace.json +2 -2
- package/AGENTS.md +6 -6
- package/CHANGELOG.md +45 -0
- package/GEMINI.md +1 -1
- package/INSTALL.md +1 -1
- package/README.md +3 -3
- package/docs/README_en.md +1 -1
- package/docs/usage-guide.md +1 -1
- package/gemini-extension.json +2 -2
- package/hooks/session-start +2 -2
- package/llms.txt +1 -1
- package/package.json +1 -1
- package/plugin.json +2 -2
- package/scripts/lib/cmd-version.mjs +4 -0
- package/skills/jarvis/SKILL.md +117 -0
- package/skills/{decision-surrogate → jarvis}/references/decision-points.md +2 -2
- package/skills/{decision-surrogate → jarvis}/references/onboarding.md +27 -11
- package/skills/{decision-surrogate → jarvis}/references/protocols.md +21 -11
- package/skills/decision-surrogate/SKILL.md +0 -87
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
{
|
|
10
10
|
"name": "team-flow",
|
|
11
11
|
"description": "8-state spec workflow + compound global compounding + architecture-design (4A/DDD) + local HTML prototype + product-level orchestration + bootstrap + e2e + session handoff + workflow feedback + independent business analysis. 28 skills + 17 agents with embedded TDD, SDD, code review, debugging, delta spec sync, and design-system-driven prototyping.",
|
|
12
|
-
"version": "0.
|
|
12
|
+
"version": "0.60.0",
|
|
13
13
|
"source": "./",
|
|
14
14
|
"author": {
|
|
15
15
|
"name": "LT",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "team-flow",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Unified workflow plugin: team-flow (spec-driven dev: TDD/SDD/code-review/debugging) + compound-engineering core subset (brainstorm/plan/compound/strategy/ideate/proof, global compounding) + architecture-design (4A+DDD incremental design & global compounding) + prototype (local HTML prototype, zero external deps) + e2e (Playwright E2E, AC-driven) + workflow-orchestrator (product-level workflow orchestration) + workflow-bootstrap (existing project onboarding) + session-handoff (context transfer) + workflow-feedback (issue tracking) + business-analysis (independent requirement/scenario artifact) + design-system (design tokens + component contract + AI primer + showcase) + test-strategy (test strategy design) + project-initialize (new service onboarding). 28 skills + 17 agents, one install.",
|
|
3
|
+
"version": "0.60.0",
|
|
4
|
+
"description": "Unified workflow plugin: team-flow (spec-driven dev: TDD/SDD/code-review/debugging) + compound-engineering core subset (brainstorm/plan/compound/strategy/ideate/proof, global compounding) + architecture-design (4A+DDD incremental design & global compounding) + prototype (local HTML prototype, zero external deps) + e2e (Playwright E2E, AC-driven) + workflow-orchestrator (product-level workflow orchestration) + workflow-bootstrap (existing project onboarding) + session-handoff (context transfer) + workflow-feedback (issue tracking) + business-analysis (independent requirement/scenario artifact) + design-system (design tokens + component contract + AI primer + showcase) + test-strategy (test strategy design) + project-initialize (new service onboarding) + jarvis (team-flow decision agent, opt-in). 28 skills + 17 agents, one install.",
|
|
5
5
|
"source": "./",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "LT",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "team-flow",
|
|
3
3
|
"displayName": "team-flow",
|
|
4
|
-
"description": "Unified workflow plugin: team-flow (spec-driven dev: TDD/SDD/code-review/debugging) + compound-engineering core subset (brainstorm/plan/compound/strategy/ideate/proof, global compounding) + architecture-design (4A+DDD incremental design & global compounding) + prototype (local HTML prototype, zero external deps) + e2e (Playwright E2E, AC-driven) + workflow-orchestrator (product-level workflow orchestration) + workflow-bootstrap (existing project onboarding) + session-handoff (context transfer) + workflow-feedback (issue tracking) + business-analysis (independent requirement/scenario artifact). 28 skills + 17 agents, one install.",
|
|
5
|
-
"version": "0.
|
|
4
|
+
"description": "Unified workflow plugin: team-flow (spec-driven dev: TDD/SDD/code-review/debugging) + compound-engineering core subset (brainstorm/plan/compound/strategy/ideate/proof, global compounding) + architecture-design (4A+DDD incremental design & global compounding) + prototype (local HTML prototype, zero external deps) + e2e (Playwright E2E, AC-driven) + workflow-orchestrator (product-level workflow orchestration) + workflow-bootstrap (existing project onboarding) + session-handoff (context transfer) + workflow-feedback (issue tracking) + business-analysis (independent requirement/scenario artifact) + jarvis (team-flow decision agent, opt-in). 28 skills + 17 agents, one install.",
|
|
5
|
+
"version": "0.60.0",
|
|
6
6
|
"author": {
|
|
7
7
|
"name": "LT",
|
|
8
8
|
"url": "https://github.com/LT"
|
|
@@ -6,13 +6,13 @@
|
|
|
6
6
|
},
|
|
7
7
|
"metadata": {
|
|
8
8
|
"description": "Unified workflow plugins and skills for AI coding agents (team-flow: team-flow + compound + architecture-design + prototype).",
|
|
9
|
-
"version": "0.
|
|
9
|
+
"version": "0.60.0"
|
|
10
10
|
},
|
|
11
11
|
"plugins": [
|
|
12
12
|
{
|
|
13
13
|
"name": "team-flow",
|
|
14
14
|
"description": "Unified workflow with planning artifacts, execution contracts, TDD, review gates, systematic debugging, delta spec sync, architecture-design, independent business analysis, and local HTML prototyping.",
|
|
15
|
-
"version": "0.
|
|
15
|
+
"version": "0.60.0",
|
|
16
16
|
"source": ".",
|
|
17
17
|
"author": {
|
|
18
18
|
"name": "LT",
|
package/AGENTS.md
CHANGED
|
@@ -100,10 +100,10 @@ spec 驱动开发过程。8 态变更机:`exploring → specifying → bridgin
|
|
|
100
100
|
- glaf4 体系走 glaf4-dev 的 PROJECT_INITIALIZE 模式;非 glaf4 走内置引导(B1.5 骨架生成)
|
|
101
101
|
- 由 ARCH 后 Pre-check 服务初始化检测触发(缺失时引导接入)
|
|
102
102
|
|
|
103
|
-
### 13.
|
|
104
|
-
-
|
|
105
|
-
- 依赖**个人资产**:`~/.claude/lt-preferences/` 决策偏好库 +
|
|
106
|
-
- **不进任何默认流程**,需要的成员独立启用;设计文档见工作区 `docs/plan/
|
|
103
|
+
### 13. jarvis(1 skill,team-flow 决策代理,v0.59.0 新增 / v0.60.0 改名,**可选启用**)
|
|
104
|
+
- 在授权范围内代做 team-flow 决策点裁决:布置任务并逐点预授权 → 经 Orca 派 worker 跑工作流 → 裁决可代答的点、其余 HOLD 等用户 → 交付决策过程汇总。**核心场景是夜间/离席值守,但不再限于此**——在场时亦可分流决策点,减少打断
|
|
105
|
+
- 依赖**个人资产**:`~/.claude/lt-preferences/` 决策偏好库 + Jarvis home(各成员自建)
|
|
106
|
+
- **不进任何默认流程**,需要的成员独立启用;设计文档见工作区 `docs/plan/jarvis-design.md`
|
|
107
107
|
|
|
108
108
|
## 全局产物结构(Discoverability —— 设计/开发前先检索)
|
|
109
109
|
|
|
@@ -220,7 +220,7 @@ STRATEGY.md CONCEPTS.md 产品策略(BA) / 领域词汇
|
|
|
220
220
|
| workflow-feedback | 工作流反馈 | 工作流问题结构化记录(v0.16.0) |
|
|
221
221
|
| business-analysis | 独立业务分析 | 将任意输入整理为 requirement/vN/business-analysis.md(独立外挂,v0.44.0) |
|
|
222
222
|
| project-initialize | 项目初始化引导 | 工作空间代码服务为空时:架构选择(glaf4/前端分离/单体微服务/拆分)→ 服务命名确认 → 创建服务子目录 → 委托初始化(glaf4 走 glaf4-dev,非 glaf4 走内置引导)(v0.45.0) |
|
|
223
|
-
|
|
|
223
|
+
| jarvis | team-flow 决策代理(**可选启用**) | 在授权范围内代做 team-flow 决策点裁决(**夜间/离席值守**为核心场景,在场时亦可分流、只把 HOLD 项交回);经 Orca 派 worker,依赖个人偏好库与 Jarvis home(v0.59.0 新增 / v0.60.0 改名) |
|
|
224
224
|
|
|
225
225
|
### 触发域分层(v0.12.0 新增)
|
|
226
226
|
|
|
@@ -231,7 +231,7 @@ STRATEGY.md CONCEPTS.md 产品策略(BA) / 领域词汇
|
|
|
231
231
|
| 接入层 | workflow-bootstrap | "初始化/接入/分析代码库" | 一次性,触发词独特,无冲突 |
|
|
232
232
|
| 产品级(唯一入口) | **workflow-orchestrator** | 新的产品级需求("新需求/从头开始/我有个想法/做一个XX") | 拥有所有"产品级新需求"触发词,内部路由到 ce-brainstorm/ce-plan |
|
|
233
233
|
| 变更级(唯一入口) | workflow-start | change 上下文内的操作(.team-flow.yaml) | 有强上下文约束,与产品级天然隔离 |
|
|
234
|
-
| 步骤级 - 独立工具 | ce-ideate, ce-strategy, ce-compound, ce-proof, architecture-design, prototype, e2e, session-handoff, workflow-feedback, **business-analysis**, **
|
|
234
|
+
| 步骤级 - 独立工具 | ce-ideate, ce-strategy, ce-compound, ce-proof, architecture-design, prototype, e2e, session-handoff, workflow-feedback, **business-analysis**, **jarvis** | 各自独特触发词 | 无冲突,可独立触发;business-analysis 不进入核心工作流;**jarvis 为可选启用**(个人决策代理,不进任何默认流程) |
|
|
235
235
|
| 步骤级 - 受限独立 | ce-brainstorm, ce-plan | 可独立触发,但产品级新需求应走 orchestrator | description 中标注路由指导 |
|
|
236
236
|
| 步骤级 - 仅路由 | need-explorer, spec-writer, contract-builder, build-executor, code-reviewer, spec-merger, release-archivist, bug-investigator | 仅由 workflow-start 路由 | 不独立触发 |
|
|
237
237
|
| 内部方法论(预加载)| test-strategy, clean-code | 无触发词——仅经 agent `skills:` 字段预加载,或由派发模板内联 | 不独立触发;判据真相源,执行处为派发模板(`user-invocable: false`)|
|
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,51 @@ All notable changes to `team-flow` will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
The format loosely follows Keep a Changelog.
|
|
6
6
|
|
|
7
|
+
## [0.60.0] - 2026-09-12
|
|
8
|
+
|
|
9
|
+
### Changed(`decision-surrogate` → `jarvis`:更名 + 重定位 + 首次通道实测修订)
|
|
10
|
+
|
|
11
|
+
**更名**:第 28 个 skill `decision-surrogate` → **`jarvis`**(目录 / frontmatter `name` / 全部文档引用同步;设计文档更名为 `docs/plan/jarvis-design.md`)。
|
|
12
|
+
|
|
13
|
+
**重定位**:从「夜间决策替身」扩为 **「team-flow 专用决策代理」**——夜间/离席值守仍为核心场景,但**不再限时段**(在场时亦可分流决策点、只把 HOLD 项交回);通用跨项目的「大副」角色由 firstmate 承担,两者不重叠。
|
|
14
|
+
|
|
15
|
+
### Added(首次通道实测:六条通路,详见设计文档附录 E)
|
|
16
|
+
|
|
17
|
+
| 通路 | 结果 | 关键证据 |
|
|
18
|
+
|------|------|---------|
|
|
19
|
+
| `ask` → `reply`(worker 问、代理答) | ✅ 可用 | 14 秒闭环;worker 写回文件与代答原文**逐字一致** |
|
|
20
|
+
| `send --to dispatch` 唤醒 settled worker | ❌ **不可用** | 消息 `read=0` 永久滞留邮箱 |
|
|
21
|
+
| 重新派发(退化路径) | ✅ 可用 | 新 task 完成原 worker 目标 |
|
|
22
|
+
| Claude Code `SendMessage` 唤醒 idle 会话 | ✅ **可用** | 唤起 idle worker 并完成写入 |
|
|
23
|
+
| Orca 派发 + SendMessage 对话 | ✅ 可用 | worker 主动联系代理会话成功 |
|
|
24
|
+
| 多轮持续对话 | ✅ 可用 | 3 轮问答全部无超时 |
|
|
25
|
+
|
|
26
|
+
### Changed(方案 v4.1 → v4.2)
|
|
27
|
+
|
|
28
|
+
1. **§7.1 双通道互补** —— `orca ask/reply`(worker 发起、**阻塞语义**)+ Claude Code `SendMessage`(代理发起、**异步唤醒**),含**反向寻址**机制(worker 会话名随机 → 由 worker 启动后主动联系代理,代理凭消息头 `from=` 回复)
|
|
29
|
+
2. **§7.2 晨间恢复改 SendMessage** —— 原 `send --to dispatch` 路径**已证伪**
|
|
30
|
+
3. **§7.5 ⑧ 结案**(不可用)+ 新增 ⑩–⑬ 四项待验
|
|
31
|
+
4. **新增 §7.6 环境前置检查**(shell 启动期提示 / 目录信任 / 不休眠 / runtime / orchestration)
|
|
32
|
+
5. **§11 补三行异常**
|
|
33
|
+
|
|
34
|
+
**`agent_prompt_stalled` 真因修正(重要)**:实测证明主因是 **shell 启动期的交互提示**——oh-my-zsh 更新提示吃掉 Orca 注入的 `claude` 命令首字母(实际执行 `laude`),故障发生在 worker 启动**之前**,与 TUI 模态无关,且报错完全不指向真因。
|
|
35
|
+
|
|
36
|
+
### Fixed(skill 侧 4 处缺陷,均由实测暴露)
|
|
37
|
+
|
|
38
|
+
1. **`orca ask` 简写不存在** → 更正为 `orca orchestration ask`
|
|
39
|
+
2. **ask 命令模板缺鉴权参数** → 补 `--from` / `--dispatch-capability`(裸命令返回 `dispatch_capability_invalid`)
|
|
40
|
+
3. **HOLD 早上恢复路径已证伪** → 改 SendMessage
|
|
41
|
+
4. **重试命令缺前置步骤** → 补 `orca orchestration task-update --status ready`(派发失败会连坐 task,否则报 `task_not_startable`)
|
|
42
|
+
|
|
43
|
+
### Changed(环境前置,实测踩坑)
|
|
44
|
+
|
|
45
|
+
- `~/.zshrc`:`DISABLE_UPDATE_PROMPT="true"` 取消注释——**消除 oh-my-zsh 更新提示对 worker 派发的干扰**(实测 5 次连续派发失败的根因)
|
|
46
|
+
- 目标目录须预置 `~/.claude.json` 的 `hasTrustDialogAccepted: true`——新目录首次派发否则必失败
|
|
47
|
+
|
|
48
|
+
### Changed(文档同步)
|
|
49
|
+
|
|
50
|
+
`README.md` / `AGENTS.md` / 工作区 `CLAUDE.md`:skill 名、设计文档路径、定位描述全部同步。
|
|
51
|
+
|
|
7
52
|
## [0.59.0] - 2026-09-12
|
|
8
53
|
|
|
9
54
|
### Added(decision-surrogate 决策替身 —— 第 28 个 skill,可选启用)
|
package/GEMINI.md
CHANGED
|
@@ -8,7 +8,7 @@ The workflow is self-contained and does not require OpenSpec or Superpowers at r
|
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
<!-- team-flow-phase-guard-start -->
|
|
11
|
-
# team-flow v0.
|
|
11
|
+
# team-flow v0.60.0 | 阶段: {{state}} | 工作流: {{workflow}}
|
|
12
12
|
当前阶段允许的操作由 workflow-start 路由规则定义。
|
|
13
13
|
禁止跨越 DP gate 进入下一阶段。变更范围以 execution-contract.md 的 Intent Lock 为准。
|
|
14
14
|
<!-- team-flow-phase-guard-end -->
|
package/INSTALL.md
CHANGED
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# team-flow
|
|
2
2
|
|
|
3
|
-
> 当前版本:`v0.
|
|
3
|
+
> 当前版本:`v0.60.0`
|
|
4
4
|
|
|
5
5
|
> 统一插件:**team-flow**(spec 驱动开发)+ **compound-engineering 核心子集**(全局复利)+ **architecture-design**(4A+DDD 增量设计)+ **prototype**(本地 HTML 原型)+ **e2e**(AC 驱动 E2E)+ **workflow-orchestrator**(产品级编排)+ **workflow-bootstrap**(既有项目接入)。一次安装,十三套能力协同(详见下文「十三套能力」)。
|
|
6
6
|
|
|
@@ -84,7 +84,7 @@ STRATEGY.md CONCEPTS.md 策略 / 领域词汇
|
|
|
84
84
|
- **设计系统**(1):design-system(独立创建/迭代项目级设计系统,用户主导交互,v0.19.0)
|
|
85
85
|
- **业务分析**(1):business-analysis(将任意输入整理为 requirement/vN/business-analysis.md,多轮单问澄清,独立外挂,v0.44.0)
|
|
86
86
|
- **项目初始化**(1):project-initialize(工作空间代码服务为空时的初始化引导:架构选择 → 服务命名 → 创建子目录 → 委托骨架,v0.45.0)
|
|
87
|
-
-
|
|
87
|
+
- **Jarvis**(1):jarvis(team-flow 专用决策代理:在授权范围内代做决策点裁决——**夜间/离席值守**为核心场景,在场时亦可分流、只把 HOLD 项交回;经 Orca 派 worker,依赖个人偏好库与 Jarvis home,**可选启用**,v0.59.0 新增 / v0.60.0 改名)
|
|
88
88
|
|
|
89
89
|
### 配套 agents(17 个,v0.47.0 增至 17)
|
|
90
90
|
|
|
@@ -98,7 +98,7 @@ Skills 命名保留其来源前缀,作为功能分组的自然标识:
|
|
|
98
98
|
|------|------|------|--------|
|
|
99
99
|
| `ce-` | compound-engineering | 产品级思维工具(头脑风暴、计划、策略、复利、创意、验证) | ce-brainstorm, ce-plan, ce-strategy, ce-compound, ce-ideate, ce-proof |
|
|
100
100
|
| 无前缀 | team-flow | 变更级开发流程工具(状态机、规格、构建、审查、归档、内部方法论) | workflow-start, need-explorer, spec-writer, contract-builder, build-executor, code-reviewer, spec-merger, release-archivist, bug-investigator, test-strategy, clean-code |
|
|
101
|
-
| 无前缀 | team-flow 新增 |
|
|
101
|
+
| 无前缀 | team-flow 新增 | 编排/接入/设计/原型/测试/交接/反馈/初始化/分析/决策代理 | workflow-orchestrator, workflow-bootstrap, architecture-design, prototype, e2e, session-handoff, workflow-feedback, design-system, project-initialize, business-analysis, jarvis |
|
|
102
102
|
|
|
103
103
|
> `ce-` 前缀来自 compound-engineering 项目,team-flow 整合时保留了这一命名以维持功能分组的可辨识性。这不是命名不一致,而是有意的来源标注。
|
|
104
104
|
|
package/docs/README_en.md
CHANGED
|
@@ -126,7 +126,7 @@ npm install -g team-flow
|
|
|
126
126
|
|
|
127
127
|
### Version
|
|
128
128
|
|
|
129
|
-
- Current: `v0.
|
|
129
|
+
- Current: `v0.60.0`
|
|
130
130
|
- v0.9.1 highlights: DP-4 execution-mode recommendations, a portable runtime across 17 platforms, and a raw-package smoke with no plugin-root variable.
|
|
131
131
|
- Self-contained — no OpenSpec or Superpowers runtime required
|
|
132
132
|
- Upstream: [Fission-AI/OpenSpec](https://github.com/Fission-AI/OpenSpec), [obra/superpowers](https://github.com/obra/superpowers)
|
package/docs/usage-guide.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# team-flow 使用说明(研发团队版)
|
|
2
2
|
|
|
3
|
-
> 版本锚点:v0.
|
|
3
|
+
> 版本锚点:v0.60.0(28 skills + 17 agents)· 更新日期:2026-09-12
|
|
4
4
|
> 读者:使用 team-flow 做日常研发的工程师。不需要你懂插件内部实现,只需要照着路径走。
|
|
5
5
|
> 配套文档:安装细节见 [INSTALL.md](../INSTALL.md);状态机细节见 [state-machine.md](state-machine.md);决策点细节见 [decision-points.md](decision-points.md);平台差异见 [platform-matrix.md](platform-matrix.md)。
|
|
6
6
|
|
package/gemini-extension.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "team-flow",
|
|
3
|
-
"description": "Unified workflow plugin: team-flow (spec-driven dev) + compound-engineering core subset + architecture-design (4A/DDD) + prototype (local HTML) + business-analysis (independent requirement/scenario artifact). 28 skills, one install.",
|
|
4
|
-
"version": "0.
|
|
3
|
+
"description": "Unified workflow plugin: team-flow (spec-driven dev) + compound-engineering core subset + architecture-design (4A/DDD) + prototype (local HTML) + business-analysis (independent requirement/scenario artifact) + jarvis (team-flow decision agent, opt-in). 28 skills, one install.",
|
|
4
|
+
"version": "0.60.0",
|
|
5
5
|
"contextFileName": "GEMINI.md"
|
|
6
6
|
}
|
package/hooks/session-start
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
-
# v0.
|
|
2
|
+
# v0.60.0: auto-sync CLI version with plugin version
|
|
3
3
|
set -e
|
|
4
4
|
|
|
5
5
|
# ═══════════════════════════════════════════════════════════════
|
|
6
6
|
# Plugin version (update this when releasing new versions)
|
|
7
7
|
# ═══════════════════════════════════════════════════════════════
|
|
8
|
-
PLUGIN_VERSION="0.
|
|
8
|
+
PLUGIN_VERSION="0.60.0"
|
|
9
9
|
|
|
10
10
|
# ═══════════════════════════════════════════════════════════════
|
|
11
11
|
# Step 1: Auto-sync CLI version with plugin version
|
package/llms.txt
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
## Overview
|
|
4
4
|
spec-superflow is a self-contained workflow integration plugin for Claude Code, Cursor, OpenAI Codex CLI/App, GitHub Copilot CLI, Gemini CLI, OpenCode, WorkBuddy, and Trae. It merges spec-driven planning artifacts (proposal, specs, design, tasks) with disciplined execution guardrails (TDD, review gates, controlled handoff) into one unified workflow.
|
|
5
5
|
|
|
6
|
-
Current version: v0.
|
|
6
|
+
Current version: v0.60.0.
|
|
7
7
|
|
|
8
8
|
## Key Documents
|
|
9
9
|
- README.md: Chinese homepage with full usage guide and FAQ
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xulthekl/team-flow",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.60.0",
|
|
4
4
|
"description": "Unified plugin (28 skills + 17 agents) integrating team-flow, compound-engineering, architecture-design, prototype, design-system, workflow-orchestrator, workflow-bootstrap, e2e, session-handoff, workflow-feedback, business-analysis for multi-agent coding tools.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
package/plugin.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "team-flow",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Unified workflow plugin: team-flow (spec-driven dev: TDD/SDD/code-review/debugging) + compound-engineering core subset (brainstorm/plan/compound/strategy/ideate/proof, global compounding) + architecture-design (4A+DDD incremental design & global compounding) + prototype (local HTML prototype, zero external deps) + e2e (Playwright E2E, AC-driven) + workflow-orchestrator (product-level workflow orchestration) + workflow-bootstrap (existing project onboarding) + session-handoff (context transfer) + workflow-feedback (issue tracking) + business-analysis (independent requirement/scenario artifact) + design-system (design tokens + component contract + AI primer + showcase) + test-strategy (test strategy design) + project-initialize (new service onboarding). 28 skills + 17 agents, one install.",
|
|
3
|
+
"version": "0.60.0",
|
|
4
|
+
"description": "Unified workflow plugin: team-flow (spec-driven dev: TDD/SDD/code-review/debugging) + compound-engineering core subset (brainstorm/plan/compound/strategy/ideate/proof, global compounding) + architecture-design (4A+DDD incremental design & global compounding) + prototype (local HTML prototype, zero external deps) + e2e (Playwright E2E, AC-driven) + workflow-orchestrator (product-level workflow orchestration) + workflow-bootstrap (existing project onboarding) + session-handoff (context transfer) + workflow-feedback (issue tracking) + business-analysis (independent requirement/scenario artifact) + design-system (design tokens + component contract + AI primer + showcase) + test-strategy (test strategy design) + project-initialize (new service onboarding) + jarvis (team-flow decision agent, opt-in). 28 skills + 17 agents, one install.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "LT"
|
|
7
7
|
},
|
|
@@ -31,6 +31,10 @@ const TEXT_FILES = [
|
|
|
31
31
|
{ file: 'llms.txt', pattern: /(Current version: v)\d+\.\d+\.\d+(\.)/g, replacement: '$1%MAJOR%.%MINOR%.%PATCH%$2' },
|
|
32
32
|
{ file: '.claude/always/phase-guard.md', pattern: /(# team-flow v)\d+\.\d+\.\d+( \|)/g, replacement: '$1%MAJOR%.%MINOR%.%PATCH%$2' },
|
|
33
33
|
{ file: 'GEMINI.md', pattern: /(# team-flow v)\d+\.\d+\.\d+( \|)/g, replacement: '$1%MAJOR%.%MINOR%.%PATCH%$2' },
|
|
34
|
+
// v0.60.0:补 usage-guide 的**同步面**——v0.59.0 只把它纳入检出(check-version-consistency.mjs),
|
|
35
|
+
// 漏了本列表,导致升版时「package.json 已改但 usage-guide 未同步 → 检出失败 → npm version 非 0 退出」
|
|
36
|
+
// 的脏状态。检出与同步现已同源(两处 pattern 对应同一锚点)。
|
|
37
|
+
{ file: 'docs/usage-guide.md', pattern: /(版本锚点:v)\d+\.\d+\.\d+/g, replacement: '$1%MAJOR%.%MINOR%.%PATCH%' },
|
|
34
38
|
{ file: 'skills/workflow-start/SKILL.md', pattern: /(npx --yes --package @xulthekl\/team-flow@)\d+\.\d+\.\d+( tf)/g, replacement: '$1%MAJOR%.%MINOR%.%PATCH%$2' },
|
|
35
39
|
{ file: 'skills/need-explorer/SKILL.md', pattern: /(npx --yes --package @xulthekl\/team-flow@)\d+\.\d+\.\d+( tf)/g, replacement: '$1%MAJOR%.%MINOR%.%PATCH%$2' },
|
|
36
40
|
{ file: 'skills/spec-writer/SKILL.md', pattern: /(npx --yes --package @xulthekl\/team-flow@)\d+\.\d+\.\d+( tf)/g, replacement: '$1%MAJOR%.%MINOR%.%PATCH%$2' },
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: jarvis
|
|
3
|
+
description: This skill should be used when the user asks to "启动 Jarvis", "让 Jarvis 接手决策", "我要睡了,今晚把 X 推下去", "睡前布置任务", "jarvis mode", or wants an agent to take over team-flow decision points — whether away (overnight handoff) or present (to offload decision bandwidth). It loads the user's decision-preference library and a Jarvis home, dispatches workers via Orca orchestration on team-flow projects, adjudicates pre-authorized decision points, and delivers a decision log. Optional, opt-in only.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Jarvis(team-flow 决策代理)
|
|
7
|
+
|
|
8
|
+
作为 **team-flow 工作流**的决策代理:在用户设定的授权范围内代做决策点裁决,缓解决策带宽瓶颈。Jarvis 派 worker 跑工作流、裁决**可代答**的决策点、其余一律 HOLD 交回用户。
|
|
9
|
+
|
|
10
|
+
**两种典型场景**:
|
|
11
|
+
|
|
12
|
+
| 场景 | 形态 |
|
|
13
|
+
|------|------|
|
|
14
|
+
| **夜间 / 离席值守**(核心) | 睡前逐点预授权 → 夜间派 worker → 裁决可代答点、其余 HOLD → 早上交付汇总 |
|
|
15
|
+
| **在场分流** | 用户在时也先过一遍决策点,只把 HOLD 项交给人 —— 减少打断 |
|
|
16
|
+
|
|
17
|
+
**核心边界**:Jarvis 只做决策与编排——**不写产线代码、不改 team-flow 状态文件(`.team-flow.yaml`)、不发明任务方向**。(「不改状态文件」专指 team-flow 的门禁真相源;Jarvis 自己的 `state/*.log|md` 当然要写。)
|
|
18
|
+
|
|
19
|
+
> **与 firstmate 的分工**:Jarvis 是 **team-flow 专用**的决策代理,深度集成状态机 / 决策点 / 门禁;通用跨项目的「大副」角色由 firstmate 承担。两者不重叠——Jarvis 不做通用编码、调查或审计工作。
|
|
20
|
+
|
|
21
|
+
> **命令形态以官方为准**:本文命令随 Orca 版本演进,**运行前先读一次** `orca skills get orchestration`,不要凭记忆推断子命令或参数——v0.60.0 实测暴露的 skill 缺陷之一即命令形态错误。
|
|
22
|
+
|
|
23
|
+
## 何时使用
|
|
24
|
+
|
|
25
|
+
- 用户要睡前(或离席前)布置任务,希望期间持续推进
|
|
26
|
+
- 用户在场,但希望将某 change 的决策点分流给 Jarvis 处理
|
|
27
|
+
- 当前会话承担 Jarvis 角色(本 skill 由主会话加载,不是 dispatch 的子代理)
|
|
28
|
+
|
|
29
|
+
## Phase 0:首次接入(环境前置检查 + 初始化)
|
|
30
|
+
|
|
31
|
+
**每次启动先跑检查**;缺项即引导补齐,**不降级、不跳过**。完整检查矩阵、初始化步骤与偏好库访谈问题见 `references/onboarding.md`。
|
|
32
|
+
|
|
33
|
+
| 检查项 | 命令 / 判据 | 缺失时 |
|
|
34
|
+
|--------|-----------|--------|
|
|
35
|
+
| **shell 启动无交互提示** | 新开终端不停在等待输入;shell 配置无更新检查 / read | **派发会静默失败**——见「硬约束」 |
|
|
36
|
+
| **目标目录已被 claude 信任** | `~/.claude.json` → `projects["<路径>"].hasTrustDialogAccepted == true` | 预置该字段(**先备份**),否则首次派发必失败 |
|
|
37
|
+
| Orca CLI | `which orca` | `brew install orca` |
|
|
38
|
+
| Orca runtime | `orca status --json` → `result.runtime.state == "ready"` | `orca open` |
|
|
39
|
+
| orchestration 可用 | `orca orchestration run-list --json` → `ok: true` | 开启 Settings → Experimental |
|
|
40
|
+
| 已绑定 Run | `orca orchestration run-current --json`(或可 `run-create` 绑定) | 须在 **Orca 管理的终端**内运行 |
|
|
41
|
+
| 可用项目 | `orca worktree list --json` | `orca repo add --path <路径>` |
|
|
42
|
+
| 偏好库 | `~/.claude/lt-preferences/decision-preferences.md` 存在 | 走 onboarding.md §2 |
|
|
43
|
+
| Jarvis home | 用户指定(默认 `~/jarvis-home/`)含 `state/` | 创建 + `git init`(onboarding.md §3) |
|
|
44
|
+
| 项目空间判据 | 目标含 `.team-flow/` + `changes/` | **拒绝派发**(普通模式本期不支持) |
|
|
45
|
+
| 机器不休眠 | `pmset -g` 的 `sleep` 为 0 且 `pgrep -x caffeinate` 有进程 | `caffeinate -i` |
|
|
46
|
+
|
|
47
|
+
**并取得自身会话名**(反向寻址的前提):`ListAgents` 的首行 `This session is <name>` 即本会话名。**崩溃恢复后须重新取得**(重启即新会话,名可能变)。
|
|
48
|
+
|
|
49
|
+
探测结果向用户报告一张「就绪 / 待补齐」清单,补齐后方可进 Phase 1。
|
|
50
|
+
|
|
51
|
+
## Phase 1:睡前授权(用户在场,约 5 分钟)
|
|
52
|
+
|
|
53
|
+
1. 接收任务:项目空间、change、完成标准
|
|
54
|
+
2. **预案扫描**:读 change 现状 + 偏好库,列出预期决策点及其默认裁决,一并确认**架构门状态**与**执行模式**(两者决定夜间能走多远)
|
|
55
|
+
3. **读回**:把任务 + 逐点授权 + 红线完整读给用户
|
|
56
|
+
4. **落盘**:用户确认后写 `state/mandate-<YYYY-MM-DD>.md`(模板见 `references/protocols.md`,**须含 Jarvis 会话名字段**)
|
|
57
|
+
5. **派发**:`run-create` → `task-create --spec <...>` → `worker-start --task <id> --worktree "path:<项目根>" --agent claude`
|
|
58
|
+
- task spec **必须含五条硬指令**(完整措辞见 `references/protocols.md` §二):① **禁止使用 AskUserQuestion**;② 决策点一律 `orca orchestration ask` 转 Jarvis(**须补 `--from` / `--dispatch-capability` 鉴权参数**);③ **`ask` 超时禁止自行裁决**——保留 message_id 用 `--resume` 续等,续等仍超时则停并上报;④ 完成或阻塞时用 `send --type worker_done` 上报;⑤ **附上 Jarvis 会话名**,供 worker 启动后主动联系(反向寻址)
|
|
59
|
+
|
|
60
|
+
## Phase 2:夜间值守
|
|
61
|
+
|
|
62
|
+
### 主循环(worker 提问 → 代答)
|
|
63
|
+
|
|
64
|
+
1. `orca orchestration check --wait --types question,worker_done,escalation --timeout-ms 600000 --json`
|
|
65
|
+
2. 逐条处置:
|
|
66
|
+
- `question` → 按 `references/decision-points.md` 三档裁决 → `orca orchestration reply --id <msg_id> --body "<答复>"`(代答)或 `--body "HOLD: <原因>"`
|
|
67
|
+
- `worker_done` → **先选定该 worker 终端的归宿**(官方强制:不得留活终端):有后续 task 则 `worker-start --task <next> --terminal <worker.agent_terminal_handle>` 复用,否则 `orca orchestration worker-release --dispatch <id>`
|
|
68
|
+
- `escalation` → 记入早报「等你决定」
|
|
69
|
+
3. **每个裁决即时写日志**(不等收工):`state/decisions-<YYYY-MM-DD>.log`
|
|
70
|
+
4. 处理完再确认:`orca orchestration check --ack <delivery_id> --wait ...`
|
|
71
|
+
|
|
72
|
+
> **走 `ask` 还是等 worker 主动?** 二者的分野不在命令,而在**接收端是否有进程阻塞等待**:worker 阻塞在 `ask` 时消息必达;worker settle 后则无人读邮箱。
|
|
73
|
+
|
|
74
|
+
### 唤醒通道(worker 已停)
|
|
75
|
+
|
|
76
|
+
**`send --to dispatch` 唤醒已实证不可用**(消息 `read=0` 永久滞留邮箱)→ 改用 Claude Code 原生 **`SendMessage`**:
|
|
77
|
+
|
|
78
|
+
- **发现**:`ListAgents` 能看到本机所有会话,含 Orca 派发的 worker
|
|
79
|
+
- **唤醒 / 追问**:`SendMessage(to: <worker 会话名>)`——**已实测可唤起 idle 会话**
|
|
80
|
+
- **反向寻址**:worker 会话名随机,Jarvis 无法预知 → 由 worker 启动后主动联系 Jarvis(task spec 已附 Jarvis 会话名;worker 侧地址来自其 session 的 `from=`)
|
|
81
|
+
- **不可达时退化**:重新派发(`worker-start` 新 task,已实证可行,代价是原 worker 上下文丢失)
|
|
82
|
+
|
|
83
|
+
### 异常处置
|
|
84
|
+
|
|
85
|
+
5. **`check` 超时未收到 `worker_done`**:`worker-show --dispatch <id>` 判状态——
|
|
86
|
+
- `ready` → 继续等(长任务常态)
|
|
87
|
+
- `failed` / `stopped` → **先 `orca orchestration task-update --id <t> --status ready`**(失败会连坐 task,否则报 `task_not_startable`),再 `worker-start --task <t> --retry-of <dispatch> --on <saved-environment> --worktree <...> --agent claude`(`--task` 为必填;`--retry-of` **不继承位置**,须显式重复三个参数)
|
|
88
|
+
- `outcome_unknown` → `worker-stop --dispatch <id>` 后检查
|
|
89
|
+
- worker 停在 `observation.agentWait` 是**健康态**,不是故障
|
|
90
|
+
- 每次判状态后追加 `health` 日志行
|
|
91
|
+
6. **Jarvis 自身异常恢复**(通道堵死 / 会话崩溃):
|
|
92
|
+
- **通道停更判据**:`check --wait` 连续 2 次满超时(各 10 分钟)且期间零消息 → 记 `health` 行 `channel_stalled`,改用 `worker-show --dispatch <id>` 逐个轮询
|
|
93
|
+
- **崩溃恢复**:状态**只在磁盘**——重入时先读 `state/mandate-<date>.md` + `decisions-<date>.log`,再用 `worker-show` 逐个对账 dispatch 状态,**禁止凭记忆续跑**
|
|
94
|
+
- **会话名核对**(反向寻址的持久性):重启后 `ListAgents` 重新取得自身会话名;**若与 mandate 记录不同,旧地址已失效** → 用 `ListAgents` 反查 worker 会话名后主动联系,或让 worker 重新上报
|
|
95
|
+
|
|
96
|
+
**裁决依据优先级(高→低)**:授权书红线 > 授权书逐点授权 > 偏好库条目 > 可推断。
|
|
97
|
+
**冲突时红线优先**(例如偏好库里「收尾即提交推送」在夜间不适用,一律不 push)。
|
|
98
|
+
|
|
99
|
+
## Phase 3:早上交付
|
|
100
|
+
|
|
101
|
+
从决策日志渲染早报 `state/report-<YYYY-MM-DD>.md`(格式见 `references/protocols.md`),六段式:① 夜间健康度 ② 各 change 进度 ③ 我替你做的决策 ④ 等你决定的 ⑤ 试过但失败的 ⑥ 成本。
|
|
102
|
+
|
|
103
|
+
**早报必须逐条列出 HOLD 项**,每项附「问题 + 选项 + Jarvis 倾向 + 依据」,便于用户批量裁决。
|
|
104
|
+
|
|
105
|
+
## 硬约束
|
|
106
|
+
|
|
107
|
+
- **禁止 AskUserQuestion**:`agent_prompt_stalled` 在**派发阶段**最常见的触发点是 **shell 启动期的交互提示**(2026-09-12 实测:oh-my-zsh 更新提示吃掉 `claude` 命令首字母 → 实际执行 `laude`),故障发生在 worker 真正启动**之前**,报错完全不指向真因。**注意**:运行中弹 TUI 模态是另一触发点,同样无自动化手段可救——该结论**未被推翻**
|
|
108
|
+
- **Jarvis 不改 team-flow 状态文件**:决策点状态由 worker 经 `tf state set` 写入(`dp_4_result` 由 `tf execution plan --confirm` 程序化写入,不可 set;**HOLD 场景不写任何决策点字段**——12 个字段已于 v0.59.0 移出白名单,写入即**显式报错**,见 `references/protocols.md` §三)
|
|
109
|
+
- **HOLD 是主要形态**:无法代答的点一律 HOLD,**不得静默放行**
|
|
110
|
+
- **不做沉默即同意**:`ask` 超时不产生默认裁决,保留 thread id 待恢复
|
|
111
|
+
- **不假设未验证的机制**:worker 遵循指示是靠 task spec 约束的运行时行为;每次任务须核对早报与**决策日志 + change 的 `state` 位置**是否一致(字段能否落盘须实测,勿据白名单推断)
|
|
112
|
+
|
|
113
|
+
## 参考文件
|
|
114
|
+
|
|
115
|
+
- **`references/onboarding.md`** — 首次接入:环境检查矩阵、偏好库初始化(三种方式)、Jarvis home 初始化、就绪检查
|
|
116
|
+
- **`references/decision-points.md`** — 9 个决策点 + 5 个确认点的代答权限、三档处置规则、夜间红线清单
|
|
117
|
+
- **`references/protocols.md`** — 授权书模板、worker task spec 模板、HOLD 六步协议、**决策日志与早报格式**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# 决策点代答权限与处置规则
|
|
2
2
|
|
|
3
|
-
> 来源:工作区仓 `docs/plan/
|
|
3
|
+
> 来源:工作区仓 `docs/plan/jarvis-design.md`(v4.2 §6);决策点权威定义见插件内 `docs/decision-points.md`
|
|
4
4
|
|
|
5
5
|
## 一、完整清单(9 个 DP 门 + 5 个确认点)
|
|
6
6
|
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|--------|------|--------|---------|
|
|
9
9
|
| DP-0 | 设计前确认 | 主会话 | workflow-start |
|
|
10
10
|
| DP-1 | 需求确认 | 主进程(need-explorer 为交互式澄清) | `skills/workflow-start/SKILL.md:71` |
|
|
11
|
-
| DP-2 | 工件审查 | 待 P0
|
|
11
|
+
| DP-2 | 工件审查 | 待 P0 确认 | `skills/spec-writer/SKILL.md:151` |
|
|
12
12
|
| DP-A | 架构设计确认 | 主会话(AskUserQuestion) | `skills/workflow-start/references/routing-rules.md:104,153` |
|
|
13
13
|
| DP-3 | 契约批准(硬门禁) | 主会话 | `skills/workflow-start/references/routing-rules.md:212` |
|
|
14
14
|
| DP-4 | 执行模式选择 | 主会话 | `skills/workflow-start/references/routing-rules.md:215` |
|
|
@@ -1,12 +1,26 @@
|
|
|
1
|
-
#
|
|
1
|
+
# 首次接入:环境检查与初始化
|
|
2
2
|
|
|
3
|
-
> 目标:把「一台裸机 +
|
|
3
|
+
> 目标:把「一台裸机 + 一个想用 Jarvis 的人」带到可启动状态。全部检查**只读**;所有写操作(建目录、写偏好库、改信任配置)**先向用户说明再执行**。
|
|
4
4
|
|
|
5
|
-
## 1.
|
|
5
|
+
## 1. 环境检查矩阵
|
|
6
6
|
|
|
7
7
|
按顺序执行,记录每项状态;任何一项不可用都应给出**具体引导命令**,而非笼统报错。
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
### 1.1 派发前置项(v0.60.0 新增,据 2026-09-12 实测)
|
|
10
|
+
|
|
11
|
+
**这两项不满足时 worker 派发会静默失败**,且报错(`agent_prompt_stalled`)完全不指向真因——**故障发生在 worker 真正启动之前**。
|
|
12
|
+
|
|
13
|
+
| # | 检查项 | 命令 / 判据 | 缺失时的引导 |
|
|
14
|
+
|---|--------|-----------|-------------|
|
|
15
|
+
| P1 | **shell 启动无交互提示** | 新开一个终端,观察是否停在等待输入(如更新提示);检查 shell 配置有无更新检查 / `read` | 关闭自动更新检查(如 oh-my-zsh 的 `DISABLE_UPDATE_PROMPT` / `DISABLE_AUTO_UPDATE`)。**修复后仅对新建终端生效**,已存在的终端不受影响 |
|
|
16
|
+
| P2 | **目标目录已被 claude 信任** | `~/.claude.json` → `projects["<路径>"].hasTrustDialogAccepted == true` | 预置该字段(**先备份** `~/.claude.json`;并发 claude 进程可能覆盖配置,改完尽快验证) |
|
|
17
|
+
|
|
18
|
+
> **实测教训(2026-09-12)**:oh-my-zsh 更新提示吃掉 Orca 注入的 `claude` 命令首字母 → 实际执行 `laude` → claude 从未启动 → task spec 落进 shell。造成 **5 次连续派发失败**。
|
|
19
|
+
> **现场特征**:spec 文本落在 shell 上(`zsh: parse error`)、启动命令被吃字符(`command not found: laude`)。**见到这两个特征先查 shell 提示,不要先怀疑 Orca。**
|
|
20
|
+
|
|
21
|
+
### 1.2 环境项
|
|
22
|
+
|
|
23
|
+
| # | 检查项 | 命令 | 就绪判据 | 缺失时的引导 |
|
|
10
24
|
|---|--------|------|---------|-------------|
|
|
11
25
|
| 1 | Orca CLI | `which orca` | 返回路径 | `brew install orca`(macOS) |
|
|
12
26
|
| 2 | Orca runtime | `orca status --json` | `result.runtime.state == "ready"` | `orca open`(启动桌面应用并等待 runtime 可达) |
|
|
@@ -15,14 +29,14 @@
|
|
|
15
29
|
| 5 | 可用项目 | `orca worktree list --json` | 列出项目 | 用 `orca repo add --path <路径>` 注册项目 |
|
|
16
30
|
| 6 | 目标项目空间 | 目标路径含 `.team-flow/` 与 `changes/` | 两者存在 | **拒绝派发**——普通模式本期不支持,改用 workflow-start 常规推进 |
|
|
17
31
|
| 7 | 偏好库 | `test -f ~/.claude/lt-preferences/decision-preferences.md` | 文件存在 | 走 §2 |
|
|
18
|
-
| 8 |
|
|
32
|
+
| 8 | Jarvis home | `test -d <home>/state` | 目录存在 | 走 §3 |
|
|
19
33
|
| 9 | 机器不休眠 | `pmset -g` 的 `sleep` 为 0;`pgrep -x caffeinate` 有进程 | 两者满足 | `caffeinate -i`(前台保持);或说明夜间须保持机器唤醒 |
|
|
20
34
|
|
|
21
35
|
**输出**:一张「就绪 / 待补齐」清单交给用户,**补齐后才进 Phase 1**。
|
|
22
36
|
|
|
23
37
|
## 2. 偏好库初始化(三种方式,按投入递增)
|
|
24
38
|
|
|
25
|
-
|
|
39
|
+
偏好库是 Jarvis 判断力的唯一来源;**没有它就不要启动**(否则只能全量 HOLD,等于没做)。
|
|
26
40
|
|
|
27
41
|
### 方式 A:交互式最小收集(约 5 分钟,建议起步用)
|
|
28
42
|
|
|
@@ -49,7 +63,7 @@
|
|
|
49
63
|
|
|
50
64
|
### 方式 C:从历史会话挖掘(最完整,成本最高)
|
|
51
65
|
|
|
52
|
-
|
|
66
|
+
适用:用户已积累数月会话记录,希望 Jarvis 更贴近本人。
|
|
53
67
|
|
|
54
68
|
1. 定位会话:`~/.claude/projects/<按路径转义的项目目录>/*.jsonl`
|
|
55
69
|
2. 提取人类输入(过滤 `tool_result`、以 `<` 开头的注入块、上下文压缩摘要、skill 内容)
|
|
@@ -58,22 +72,24 @@
|
|
|
58
72
|
|
|
59
73
|
**建议**:先用 A+B 起步运行,积累几周后再用 C 做一次深度校准。
|
|
60
74
|
|
|
61
|
-
## 3.
|
|
75
|
+
## 3. Jarvis home 初始化
|
|
62
76
|
|
|
63
77
|
```bash
|
|
64
78
|
mkdir -p <home>/state
|
|
65
79
|
cd <home> && git init
|
|
66
80
|
```
|
|
67
81
|
|
|
68
|
-
- 默认路径 `~/
|
|
82
|
+
- 默认路径 `~/jarvis-home/`(用户可指定其他路径)
|
|
69
83
|
- `state/` 承载:授权书 `mandate-<date>.md`、决策日志 `decisions-<date>.log`、早报 `report-<date>.md`、任务队列 `queue.md`
|
|
70
84
|
- home **与业务项目解耦**;偏好库不放这里(它在 `~/.claude/lt-preferences/`,属用户级、跨项目可用)
|
|
85
|
+
- 建议在 home 下加 `.gitignore`,排除实测沙箱等临时目录
|
|
71
86
|
|
|
72
87
|
## 4. 就绪检查(进 Phase 1 前)
|
|
73
88
|
|
|
74
|
-
- [ ]
|
|
89
|
+
- [ ] **派发前置项 2 项**(shell 提示 / 目录信任)
|
|
90
|
+
- [ ] 环境项 9 项全部就绪
|
|
75
91
|
- [ ] 偏好库存在且非空(≥1 条)
|
|
76
|
-
- [ ]
|
|
92
|
+
- [ ] Jarvis home 存在且含 `state/`
|
|
77
93
|
- [ ] 用户已确认目标项目空间与 change
|
|
78
94
|
|
|
79
95
|
全部打勾后,向用户复述一次本次任务的**范围与红线**,再进 Phase 1。
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# 协议模板集
|
|
2
2
|
|
|
3
|
+
> **命令形态以官方为准**:本文件与 SKILL.md 中的 `orca` 命令随 Orca 版本演进。**运行前建议先读一次版本匹配的官方指南**(`orca skills get orchestration`),不要凭记忆推断子命令或参数——v0.60.0 实测暴露的 4 处 skill 缺陷之一即命令形态错误(`orca ask` 简写不存在)。
|
|
4
|
+
|
|
3
5
|
## 一、授权书模板 → `state/mandate-<YYYY-MM-DD>.md`
|
|
4
6
|
|
|
5
7
|
```markdown
|
|
@@ -12,6 +14,7 @@
|
|
|
12
14
|
- **架构门状态:已过 / 未过**(未过则夜间止于 exploring)
|
|
13
15
|
- 需求范围:<scope 摘要,供 DP-1 条件代答判据>
|
|
14
16
|
- **执行模式:<TDD|SDD|inline|不指定>**(不指定则夜间止于 approved-for-build)
|
|
17
|
+
- **Jarvis 会话名:<name>**(供 worker 主动联系用。**崩溃恢复后须核对是否仍有效**——重启即新会话、名可能变,失效时应让 worker 用 `ListAgents` 反查并重新上报,详见 §二「反向寻址」)
|
|
15
18
|
|
|
16
19
|
## 逐点授权
|
|
17
20
|
| 决策点 | 授权 | 条件 |
|
|
@@ -40,14 +43,19 @@
|
|
|
40
43
|
【协调协议 — 必须遵守】
|
|
41
44
|
1. 严格禁止使用 AskUserQuestion 工具。任何需要用户确认的点,一律用
|
|
42
45
|
`orca orchestration ask --question "<问题>" --options "<选项逗号分隔>" --timeout-ms 600000`
|
|
43
|
-
|
|
46
|
+
转给协调者(Jarvis),等待 reply 后再继续。
|
|
47
|
+
⚠️ 须带鉴权参数 `--from` 与 `--dispatch-capability` —— 裸命令返回 `dispatch_capability_invalid`
|
|
48
|
+
(2026-09-12 实测)。两个值见你启动时收到的 preamble;无从获取时向 Jarvis 求助,**不要猜测**。
|
|
44
49
|
2. 子代理上报的决策请求同样转给协调者,不得自行裁决。
|
|
45
50
|
3. **若 `ask` 超时:禁止自行裁决**。保留 message_id,用
|
|
46
51
|
`orca orchestration ask --resume <message_id> --timeout-ms 600000` 续等;
|
|
47
52
|
续等仍超时则停止推进并向协调者上报。
|
|
48
53
|
4. 完成或阻塞时用
|
|
49
|
-
`orca orchestration send --type worker_done --outcome <succeeded|failed> --subject "<状态>" --body "<三句话:做了什么、发现了什么、还剩什么>" --json`
|
|
50
|
-
|
|
54
|
+
`orca orchestration send --type worker_done --outcome <succeeded|failed> --subject "<状态>" --body "<三句话:做了什么、发现了什么、还剩什么>" --task-id <注入的 taskId> --dispatch-id <注入的 dispatchId> --json`
|
|
55
|
+
报告,随后结束本轮。**必须带 `--task-id` / `--dispatch-id`**——Orca 据此自动结算 task(不带则 task 不会自动完结)。两个 ID 使用 Orca 启动时注入的值,**不要自行编造**。
|
|
56
|
+
5. **启动后主动联系 Jarvis**:用 SendMessage 向会话 `<Jarvis 会话名>` 发送
|
|
57
|
+
「worker 已就绪,工作目录 <路径>」。这一步让 Jarvis 得知你的会话名,
|
|
58
|
+
后续才能唤醒你(worker 会话名随机,Jarvis 无法预知 —— 反向寻址)。
|
|
51
59
|
|
|
52
60
|
【红线 — 绝对禁止(违反即停)】
|
|
53
61
|
- `push`(含 `tf publish --arch --push`)
|
|
@@ -61,22 +69,24 @@
|
|
|
61
69
|
|
|
62
70
|
> 派发命令:`orca orchestration worker-start --task <task_id> --worktree "path:<项目根>" --agent claude --json`
|
|
63
71
|
> `path:` 只能指向**项目根**(Orca 注册主 worktree);`tf isolate` 建的 `.worktrees/...` 路径不可用(返回 `selector_not_found`)。
|
|
72
|
+
> **派发失败的现场特征见 SKILL.md「硬约束」**——`agent_prompt_stalled` 多由 shell 启动期提示或目录未信任所致,**不是 Orca 故障**。
|
|
64
73
|
|
|
65
74
|
## 三、HOLD 协议(worker 侧六步)
|
|
66
75
|
|
|
67
76
|
| 步骤 | 动作 |
|
|
68
77
|
|------|------|
|
|
69
|
-
| ①
|
|
78
|
+
| ① Jarvis 裁决 | `orca orchestration reply --id <msg_id> --body "HOLD: <原因>"` |
|
|
70
79
|
| ② worker | 停止当前 change 推进;不提交半成品;已落 worktree 的工作**保留** |
|
|
71
|
-
| ③ worker 记录 | **不写任何决策点字段**。两条禁令:① `dp_N_result` 是门禁判据(`dp-gate-passed` 只校验非空),写入 HOLD 值会让 change 呈现"已批准"假象;② `dp_{1,2,3,5,6,7}_decisions` 与 `dp_{1,2,3,5,6,7}_confirmed`(共 12
|
|
80
|
+
| ③ worker 记录 | **不写任何决策点字段**。两条禁令:① `dp_N_result` 是门禁判据(`dp-gate-passed` 只校验非空),写入 HOLD 值会让 change 呈现"已批准"假象;② `dp_{1,2,3,5,6,7}_decisions` 与 `dp_{1,2,3,5,6,7}_confirmed`(共 12 个)**已于 v0.59.0 移出 `cmd-state.mjs` 的 `SETTABLE_FIELDS` 白名单**——写入即显式报错 `⛔ Field '...' is not settable` 并以非 0 退出(**原为「回显 ✅ 却零写入」的静默假成功,v0.59.0 P4 实测后改为 fail-loud**;`dp_0_decisions`/`dp_0_confirmed` 不在移除之列,二者确有序列化分支)。HOLD 的持久锚点 = 步④ 的 escalation 消息 + 步⑥ 的 Jarvis 决策日志 + change 的 `state` 仍停在门禁前(客观事实)。**约束**:不得新建 `changes/<name>/` 下任何文件(Artifact Ownership:「主会话」此处指 **worker 侧**的主会话——它 MUST NOT 直接 Edit/Write `changes/` 或 `.worktrees/`;与 Jarvis 侧会话无关) |
|
|
72
81
|
| ④ worker 上报 | `orca orchestration send --type escalation --subject "HOLD at <门>" --body "<摘要>" --json` |
|
|
73
|
-
| ⑤ worker 处置 | 用 `orca orchestration worker-retain --dispatch <id>` 标记保留(**不可用 `worker-release`**——官方禁止因 escalation/question/idle
|
|
74
|
-
| ⑥
|
|
82
|
+
| ⑤ worker 处置 | 用 `orca orchestration worker-retain --dispatch <id>` 标记保留(**不可用 `worker-release`**——官方禁止因 escalation/question/idle 释放)。**语义澄清**:`worker-retain` 的官方定位是 "keep one supervised worker terminal live for debugging",**HOLD 保活属借用**该语义;保活效果与普通 settled 态的差异尚未实测(设计文档 §7.5 ⑪) |
|
|
83
|
+
| ⑥ Jarvis | 写决策日志 + 早报「等你决定」段(问题/选项/Jarvis 倾向/依据/msg_id) |
|
|
75
84
|
|
|
76
85
|
**多任务**:一个 HOLD 不阻塞其他 worker。
|
|
77
|
-
**早上恢复**:用户批阅早报 → 给出裁决 → `
|
|
86
|
+
**早上恢复**:用户批阅早报 → 给出裁决 → **用 `SendMessage` 投递到该 worker 会话** → worker 解除 HOLD 继续。
|
|
78
87
|
|
|
79
|
-
>
|
|
88
|
+
> **为何不是 `send --to dispatch`**:2026-09-12 实测证明**该路径不可用**——HOLD 时 worker 已 settle(不在阻塞等待态),消息 `read=0` 永久滞留邮箱。改用 SendMessage(同场景实测可唤起 idle 会话)。
|
|
89
|
+
> **⚠️ 待补验**:HOLD 的 `worker-retain` 保活态与实测的普通 settled 态**是否等价尚未验证**。补验前**先试 SendMessage,失败则退化为重新派发**(已实证可行,代价是上下文丢失)。
|
|
80
90
|
|
|
81
91
|
## 四、决策日志格式 → `state/decisions-<YYYY-MM-DD>.log`(append-only)
|
|
82
92
|
|
|
@@ -94,7 +104,7 @@ cost | [HH:MM] | 累计:<token|时长>
|
|
|
94
104
|
## 五、早报格式 → `state/report-<YYYY-MM-DD>.md`
|
|
95
105
|
|
|
96
106
|
```
|
|
97
|
-
#
|
|
107
|
+
# Jarvis 早报 <日期>
|
|
98
108
|
|
|
99
109
|
## ① 夜间健康度
|
|
100
110
|
心跳时间戳范围 / 是否卡过 / 有无告警
|
|
@@ -106,7 +116,7 @@ cost | [HH:MM] | 累计:<token|时长>
|
|
|
106
116
|
| 时间 | change | 决策点 | 选择 | 理由 | 依据 | 置信 |
|
|
107
117
|
|
|
108
118
|
## ④ 等你决定的(HOLD)
|
|
109
|
-
| 决策点 | 问题 | 选项 |
|
|
119
|
+
| 决策点 | 问题 | 选项 | Jarvis 倾向 | 依据 | 恢复命令 |
|
|
110
120
|
(逐条列全,便于批量裁决)
|
|
111
121
|
|
|
112
122
|
## ⑤ 试过但失败的
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: decision-surrogate
|
|
3
|
-
description: This skill should be used when the user asks to "启动替身", "夜间替身", "我要睡了,今晚把 X 推下去", "睡前布置任务", "surrogate mode", or wants an agent to take over team-flow decision points while away (overnight or otherwise). It loads the user's decision-preference library and a surrogate home, dispatches workers via Orca orchestration on team-flow projects, adjudicates pre-authorized decision points, and delivers a decision log in the morning. Optional, opt-in only.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# 决策替身(Decision Surrogate)
|
|
7
|
-
|
|
8
|
-
在用户离席期间扮演「决策代理」:用户睡前布置任务并逐点预授权,替身在夜间派 worker 跑 team-flow 工作流、裁决**可代答**的决策点、其余一律 HOLD 等用户,早上交付决策过程汇总。
|
|
9
|
-
|
|
10
|
-
**核心边界**:替身只做决策与编排,**不写代码、不改状态文件、不发明任务方向**。
|
|
11
|
-
|
|
12
|
-
## 何时使用
|
|
13
|
-
|
|
14
|
-
- 用户要睡前(或离席前)布置任务,希望期间持续推进
|
|
15
|
-
- 当前会话承担替身角色(本 skill 由主会话加载,不是 dispatch 的子代理)
|
|
16
|
-
|
|
17
|
-
## Phase 0:首次接入(环境探测 + 初始化)
|
|
18
|
-
|
|
19
|
-
**每次启动先跑探测**;缺项即引导补齐,**不降级、不跳过**。完整探测矩阵、初始化步骤与偏好库访谈问题见 `references/onboarding.md`。
|
|
20
|
-
|
|
21
|
-
| 探测项 | 命令 | 缺失时 |
|
|
22
|
-
|--------|------|--------|
|
|
23
|
-
| Orca CLI | `which orca` | 引导安装(`brew install orca`) |
|
|
24
|
-
| Orca runtime | `orca status --json` → `result.runtime.state == "ready"` | 引导 `orca open` |
|
|
25
|
-
| orchestration 可用 | `orca orchestration run-list --json` → 返回 JSON 且 `ok: true` | 引导开启 Settings → Experimental |
|
|
26
|
-
| 已绑定的 Run | `orca orchestration run-current --json`(确认当前会话可作协调者) | 说明须在 Orca 管理的终端内运行 |
|
|
27
|
-
| 可用项目 | `orca worktree list --json` | 列出项目供用户选择目标 |
|
|
28
|
-
| 偏好库 | `~/.claude/lt-preferences/decision-preferences.md` 存在 | 走「偏好库初始化」(onboarding.md §2) |
|
|
29
|
-
| 替身 home | 用户指定路径(默认 `~/Documents/work/code/practice/surrogate-home/`)含 `state/` | 创建 + `git init`(onboarding.md §3) |
|
|
30
|
-
| 项目空间判据 | 目标含 `.team-flow/` + `changes/` | **拒绝派发**(普通模式本期不支持) |
|
|
31
|
-
| 机器不休眠 | `pmset -g` 的 `sleep` 为 0 | 引导 `caffeinate -i` |
|
|
32
|
-
|
|
33
|
-
探测结果向用户报告一张「就绪/待补齐」清单,补齐后方可进 Phase 1。
|
|
34
|
-
|
|
35
|
-
## Phase 1:睡前授权(用户在场,约 5 分钟)
|
|
36
|
-
|
|
37
|
-
1. 接收任务:项目空间、change、完成标准
|
|
38
|
-
2. **预案扫描**:读 change 现状 + 偏好库,列出预期决策点及其默认裁决,一并确认**架构门状态**与**执行模式**(两者决定夜间能走多远)
|
|
39
|
-
3. **读回**:把任务 + 逐点授权 + 红线完整读给用户
|
|
40
|
-
4. **落盘**:用户确认后写 `state/mandate-<YYYY-MM-DD>.md`(模板见 `references/protocols.md`)
|
|
41
|
-
5. **派发**:`run-create` → `task-create --spec <...>` → `worker-start --task <id> --worktree "path:<项目根>" --agent claude`
|
|
42
|
-
- task spec **必须**包含两条硬指令:**禁止使用 AskUserQuestion**;决策点一律 `orca ask` 转协调者
|
|
43
|
-
|
|
44
|
-
## Phase 2:夜间执行
|
|
45
|
-
|
|
46
|
-
循环处理:
|
|
47
|
-
|
|
48
|
-
1. `orca orchestration check --wait --types question,worker_done,escalation --timeout-ms 600000 --json`
|
|
49
|
-
2. 逐条处置:
|
|
50
|
-
- `question` → 按 `references/decision-points.md` 的三档裁决 → `reply`(代答)或 `reply --body "HOLD: <原因>"`
|
|
51
|
-
- `worker_done` → 处置 worker(`worker-release`;有后续 task 则转派)
|
|
52
|
-
- `escalation` → 记入早报「等你决定」
|
|
53
|
-
3. **每个裁决即时写日志**(不等收工):`state/decisions-<YYYY-MM-DD>.log`
|
|
54
|
-
4. 处理完再确认:`orca orchestration check --ack <delivery_id> --wait ...`
|
|
55
|
-
5. **`check` 超时未收到 `worker_done` 时**:用 `orca orchestration worker-show --dispatch <id>` 判状态并处置——
|
|
56
|
-
- `ready` → 继续等(长任务常态)
|
|
57
|
-
- `failed` / `stopped` → `orca orchestration worker-start --task <t> --retry-of <dispatch> --on <saved-environment> --worktree <...> --agent claude` 重启(`--retry-of` **不继承位置**——须显式重复 `--on` / `--worktree` / `--agent`,否则多 server 场景会落到默认 server)
|
|
58
|
-
- `outcome_unknown` → `worker-stop --dispatch <id>` 后检查
|
|
59
|
-
- **注意**:worker 停在人工应答(`observation.agentWait`)是**健康态**,不是故障
|
|
60
|
-
- 每次判状态后追加一条 `health` 日志行
|
|
61
|
-
6. **替身自身异常的恢复**(通道堵死 / 会话崩溃):
|
|
62
|
-
- **通道停更判据**:`check --wait` 连续 2 次满超时(各 10 分钟)且期间零消息 → 记 `health` 行 `channel_stalled`,改用 `worker-show --dispatch <id>` 逐个轮询既有 dispatch,不再依赖长等待
|
|
63
|
-
- **崩溃恢复**:替身会话中断后,状态**只在磁盘**——重入时先读 `state/mandate-<date>.md` + `decisions-<date>.log`,再用 `worker-show` 逐个对账 dispatch 状态,**禁止凭记忆续跑**
|
|
64
|
-
- **续跑依赖 `send --to dispatch` 唤醒 worker(未实证,见设计文档 §7.5 ⑧⑨)**——已实证的是 `reply` 通路,**与主动 `send` 不是同一条路**;首次启用前须实测,通不过则退化为人工重新派发
|
|
65
|
-
|
|
66
|
-
**裁决依据优先级(高→低)**:授权书红线 > 授权书逐点授权 > 偏好库条目 > 可推断。
|
|
67
|
-
**冲突时红线优先**(例如偏好库里「收尾即提交推送」在夜间不适用,一律不 push)。
|
|
68
|
-
|
|
69
|
-
## Phase 3:早上交付
|
|
70
|
-
|
|
71
|
-
从决策日志渲染早报 `state/report-<YYYY-MM-DD>.md`(格式见 `references/protocols.md`),六段式:① 夜间健康度 ② 各 change 进度 ③ 我替你做的决策 ④ 等你决定的 ⑤ 试过但失败的 ⑥ 成本。
|
|
72
|
-
|
|
73
|
-
**早报必须逐条列出 HOLD 项**,每项附「问题 + 选项 + 替身倾向 + 依据」,便于用户批量裁决。
|
|
74
|
-
|
|
75
|
-
## 硬约束
|
|
76
|
-
|
|
77
|
-
- **禁止 AskUserQuestion**:P0 实证 `orca terminal send` 会返回 `agent_prompt_stalled`——一旦 worker 弹出 TUI 模态,**没有任何自动化手段能救它**。故此禁令是硬要求,不是建议
|
|
78
|
-
- **替身不改状态文件**:决策点状态由 worker 经 `tf state set` 写入(`dp_4_result` 由 `tf execution plan --confirm` 程序化写入,不可 set;**HOLD 场景不写任何决策点字段**——`dp_{1,2,3,5,6,7}_decisions` 等 12 个字段在白名单内但不可落盘,见 `references/protocols.md` §三)
|
|
79
|
-
- **HOLD 是主要形态**:无法代答的点一律 HOLD,**不得静默放行**
|
|
80
|
-
- **不做沉默即同意**:`ask` 超时不产生默认裁决,保留 thread id 待恢复
|
|
81
|
-
- **不假设未验证的机制**:worker 遵循指示是靠 task spec 约束的运行时行为;每次任务须核对早报与**决策日志 + change 的 `state` 位置**是否一致(HOLD 项按设计不写 `dp_N_result`;字段能否落盘须实测,勿据白名单推断)
|
|
82
|
-
|
|
83
|
-
## 参考文件
|
|
84
|
-
|
|
85
|
-
- **`references/onboarding.md`** — 首次接入:环境探测矩阵、偏好库初始化(三种方式)、替身 home 初始化、就绪检查
|
|
86
|
-
- **`references/decision-points.md`** — 9 个决策点 + 5 个确认点的代答权限、三档处置规则、夜间红线清单
|
|
87
|
-
- **`references/protocols.md`** — 授权书模板、worker task spec 模板、HOLD 六步协议、**决策日志与早报格式**
|