aodw-skill 0.9.0 → 0.11.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/.aodw-next/01-core/git-discipline.md +99 -52
- package/.aodw-next/02-workflow/autopilot-goal-spec.md +122 -23
- package/.aodw-next/02-workflow/autopilot-protocol.md +31 -13
- package/.aodw-next/02-workflow/orca-multi-session.md +80 -0
- package/.aodw-next/02-workflow/rt-autopilot-readiness.md +13 -10
- package/.aodw-next/02-workflow/rt-manager.md +25 -18
- package/.aodw-next/02-workflow/spec-lite-autopilot-profile.md +6 -3
- package/.aodw-next/README.md +1 -1
- package/.aodw-next/SKILL.md +1 -1
- package/.aodw-next/manifest.yaml +8 -2
- package/.aodw-next/project.yaml +4 -0
- package/.aodw-next/skills/handover-pack/scripts/_common.sh +1 -1
- package/.aodw-next/skills/handover-pack/scripts/next-number.sh +3 -3
- package/.aodw-next/skills/handover-pack/templates/handover-template.md +3 -1
- package/.aodw-next/templates/aodw-kernel-loader-template.md +1 -0
- package/.aodw-next/templates/dev-session-guide-template.md +20 -0
- package/.aodw-next/templates/main-session-handover-template.md +19 -0
- package/.aodw-next/templates/orca-handoff-template.md +30 -0
- package/.aodw-next/templates/rt-autopilot-preflight.template.md +5 -4
- package/.aodw-next/templates/rt-lite.template.md +35 -0
- package/.aodw-next/templates/rt-loop-prompt.template.md +33 -14
- package/.aodw-next/templates/rt-meta-template.yaml +2 -2
- package/.aodw-next/templates/rt-plan.template.md +22 -12
- package/.aodw-next/templates/rt-state.template.json +1 -0
- package/.aodw-next/tools/install-skills.sh +2 -2
- package/.aodw-next/tools/next-rt-id.sh +39 -0
- package/.aodw-next/tools/rt-grv-continue.sh +183 -0
- package/.aodw-next/tools/rt-guard.sh +3 -3
- package/.aodw-next/tools/worktree-gc.sh +260 -0
- package/AODW_Adapters/antigravity/.agent/rules/aodw-next.md +1 -0
- package/AODW_Adapters/claude/CLAUDE.md +1 -0
- package/AODW_Adapters/cursor/.cursor/rules/aodw-autopilot-continue.mdc +42 -0
- package/AODW_Adapters/cursor/.cursor/rules/aodw-next.mdc +1 -0
- package/AODW_Adapters/openclaw/AGENTS.md +1 -0
- package/AODW_Adapters/openclaw/SKILL.md +1 -1
- package/bin/aodw.js +85 -8
- package/bin/commands/new.js +21 -25
- package/package.json +1 -1
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
## B. RT 级(每个 RT)
|
|
17
17
|
|
|
18
18
|
- [ ] 用户创建 RT 时已确认 **Autopilot**(至少记录在 `meta.yaml.execution_mode` 与 `execution-log.md`;如有 `decision.md` 也应同步)
|
|
19
|
-
- [ ] `rt-lite.md` §1-§4、§1.3.1
|
|
20
|
-
- [ ] Goal
|
|
19
|
+
- [ ] `rt-lite.md` §1-§4、§1.3.1、**§1.5 GRV**、§7、§5.4 已填写
|
|
20
|
+
- [ ] Goal/GRV 质量自检通过(见 `autopilot-goal-spec.md` §5,含 G/R/V)
|
|
21
21
|
- [ ] Autopilot 适配度 ≥ 4/6(见 §6);不足则已改协作或用户知情
|
|
22
|
-
- [ ] §7
|
|
22
|
+
- [ ] 用户已确认「G + R + V」契约与 §7 摘要
|
|
23
23
|
- [ ] `state.json.checklist` 与 §7 对齐
|
|
24
|
-
- [ ] `rt-plan.md`
|
|
25
|
-
- [ ] `loop-prompt.md`
|
|
24
|
+
- [ ] `rt-plan.md` 已创建且 **V 队列与 §1.5 一致**
|
|
25
|
+
- [ ] `loop-prompt.md` 已创建(含 GRV 注入位)
|
|
26
26
|
- [ ] `execution-log.md` 已创建
|
|
27
27
|
- [ ] `autopilot-preflight.md` 已创建并正在勾选
|
|
28
28
|
- [ ] `feature/RT-XXX-*` 分支
|
|
@@ -32,21 +32,24 @@
|
|
|
32
32
|
## C. 禁止开工
|
|
33
33
|
|
|
34
34
|
- 完成条件含模糊词或不可机械验证
|
|
35
|
+
- §1.5 GRV 缺失,或 R/V 无法机判 / 未映射
|
|
35
36
|
- 「不改什么」少于 3 项
|
|
36
37
|
- 跨模块高风险未升级 Spec-Full
|
|
37
38
|
- main/master 上改业务代码
|
|
38
|
-
- Goal
|
|
39
|
+
- Goal/GRV 自检未通过或用户未确认契约
|
|
39
40
|
- Spec-Lite Autopilot 7 件套不齐
|
|
40
41
|
|
|
41
42
|
---
|
|
42
43
|
|
|
43
44
|
## D. 每轮固定动作
|
|
44
45
|
|
|
45
|
-
1. 读 `state.json` + `rt-plan.md
|
|
46
|
-
2.
|
|
47
|
-
3. tests → lint → guard
|
|
46
|
+
1. 读 `state.json` + `rt-plan.md`(下一未完成 V)+ `loop-prompt.md`
|
|
47
|
+
2. 只完成 **1 个** V(最多 2 个);不做 V 表外事
|
|
48
|
+
3. 跑该 V→R 验收 + tests → lint → guard
|
|
48
49
|
4. 更新 `state.json`、`rt-plan.md`、`execution-log.md`
|
|
49
|
-
5.
|
|
50
|
+
5. 未完成则 `CONTINUE` + 下一 V-ID(禁止停问用户)
|
|
51
|
+
6. 调用 `bash .aodw-next/tools/rt-grv-continue.sh --rt <RT-ID> --signal <CONTINUE|DONE|blocked>`;exit 0 则立即开下一轮
|
|
52
|
+
7. 反模式自检(见 `autopilot-protocol.md` §3.3)
|
|
50
53
|
|
|
51
54
|
---
|
|
52
55
|
|
|
@@ -128,7 +128,7 @@ C(多单元、执行时间长、上下文压缩风险高的 RT)
|
|
|
128
128
|
### 3.3 执行步骤
|
|
129
129
|
1. **确认执行模式**(§ 3.2,未完成则停止)
|
|
130
130
|
2. **立项查重**(§ 3.4b,优先复用已有 RT)
|
|
131
|
-
3.
|
|
131
|
+
3. 按 §9.2 运行本地脚本生成 RT-ID
|
|
132
132
|
4. 创建 RT 目录结构(**在 main 上**,`execution_mode` 已写入 `meta.yaml`,
|
|
133
133
|
并按 §5 一次性生成必备文件;**随写随提交**,不要留在工作区未提交)
|
|
134
134
|
5. 执行交互式澄清(选项化提问;仅 Spec-Full 或范围有歧义时必问范围切割:最小可用版本是什么?哪些延后进 DI?——Constitution §1.8)
|
|
@@ -378,8 +378,8 @@ RT/RT-XXX/
|
|
|
378
378
|
```
|
|
379
379
|
RT/RT-XXX/
|
|
380
380
|
meta.yaml ← RT 元数据(execution_mode: autopilot)
|
|
381
|
-
rt-lite.md ← Goal(静态):§1-§7
|
|
382
|
-
rt-plan.md ←
|
|
381
|
+
rt-lite.md ← Goal(静态):§1-§7(含 §1.5 GRV)
|
|
382
|
+
rt-plan.md ← V 队列(动态):与 §1.5 V 一致,每轮勾选
|
|
383
383
|
state.json ← 机器状态:checklist、phase、熔断信号
|
|
384
384
|
loop-prompt.md ← 每轮 Ralph 执行指令
|
|
385
385
|
execution-log.md ← 人读时间线
|
|
@@ -397,11 +397,14 @@ RT/RT-XXX/
|
|
|
397
397
|
|
|
398
398
|
**🚨 关键规则**:一个 RT = 一个 Worktree = 一个 Feature 分支
|
|
399
399
|
|
|
400
|
+
返工在原工作树内完成,合并也在该工作树内以 detached HEAD 进行。关单时删除该工作树和本地分支,
|
|
401
|
+
除主目录外不留常驻工作树。见 git-discipline §2.0、§2.6 和 §8。
|
|
402
|
+
|
|
400
403
|
### 6.1 worktree 按阶段创建,不在立项时创建(2026-08-13 修订)
|
|
401
404
|
|
|
402
405
|
| 阶段 | status | 在哪做 | 产物 |
|
|
403
406
|
|---|---|---|---|
|
|
404
|
-
| 立项与设计 | `intaking` / `decided` |
|
|
407
|
+
| 立项与设计 | `intaking` / `decided` | **项目主分支,随写随提交** | meta / intake / decision / spec / plan |
|
|
405
408
|
| 实现 | `in-progress` 起 | worktree + feature 分支 | 代码、测试、资源 |
|
|
406
409
|
|
|
407
410
|
判据只有一条:**要动 `RT/` 以外的文件,才建 worktree。**
|
|
@@ -410,7 +413,7 @@ RT/RT-XXX/
|
|
|
410
413
|
纯台账整理)。给这类 RT 建 worktree 是白占约 100M 磁盘,还会让并行 worktree
|
|
411
414
|
数量虚高、真正需要并行时看不清局面。
|
|
412
415
|
|
|
413
|
-
|
|
416
|
+
核心约定见 `01-core/git-discipline.md` §2.0。完整创建步骤与前置检查见该文档 §2.1。
|
|
414
417
|
|
|
415
418
|
### 6.2 建 worktree 前的三问(必答)
|
|
416
419
|
|
|
@@ -439,8 +442,8 @@ AI 根据决策结果,加载对应的 Profile:
|
|
|
439
442
|
|
|
440
443
|
| 文档 | 角色 |
|
|
441
444
|
|------|------|
|
|
442
|
-
| `rt-lite.md` | Goal(静态):§7
|
|
443
|
-
| `rt-plan.md` |
|
|
445
|
+
| `rt-lite.md` | Goal(静态):§1.5 GRV + §7 完成条件,见 `autopilot-goal-spec.md` |
|
|
446
|
+
| `rt-plan.md` | V 队列(动态):与 §1.5 一致,每轮只推进未完成 V |
|
|
444
447
|
| `state.json` | 机器状态:checklist、phase、熔断信号 |
|
|
445
448
|
| `loop-prompt.md` | 每轮 Ralph 执行指令 |
|
|
446
449
|
| `execution-log.md` | 人读时间线(防黑盒) |
|
|
@@ -449,17 +452,20 @@ AI 根据决策结果,加载对应的 Profile:
|
|
|
449
452
|
**总协议**:`02-workflow/autopilot-protocol.md`(Ralph 循环、机械 Gate、反模式、子模式、进度友好)。
|
|
450
453
|
|
|
451
454
|
Autopilot 流程摘要:
|
|
452
|
-
1. 用户确认模式(§3.2)→ 2. Goal 定稿 + 自检 → 3. Preflight → 4. Gate-Plan → 5. Ralph
|
|
453
|
-
熔断时交还人工;不得跳过 Goal
|
|
455
|
+
1. 用户确认模式(§3.2)→ 2. **GRV/Goal 定稿 + 自检 + 用户确认契约** → 3. Preflight → 4. Gate-Plan → 5. Ralph+GRV 循环(未完成禁止停问)→ 6. Gate-Commit/Done
|
|
456
|
+
熔断时交还人工;不得跳过 GRV/Goal 自检进入循环;禁止做 V 表外工作。
|
|
454
457
|
|
|
455
458
|
### 7.2 关闭一致性检查
|
|
456
459
|
|
|
457
|
-
关闭任一 RT
|
|
460
|
+
关闭任一 RT 时,AI 必须检查:
|
|
458
461
|
|
|
459
462
|
- `meta.yaml.status`、`state.json.phase`、`rt-lite.md` 元数据行的 `status` 三者一致。
|
|
460
463
|
- Spec-Lite autopilot RT 必须具备 §5.3 的 7 件套。
|
|
461
464
|
- `rt-plan.md` 无未完成步骤,或未完成项已明确转入后续 RT。
|
|
462
465
|
- `execution-log.md` 记录最新验证命令和关闭结论。
|
|
466
|
+
- 已建工作树的 RT 按 git-discipline §8 Step 3 删除本 RT 的工作树和本地分支,并快进主目录。
|
|
467
|
+
关单时跑 `bash .aodw-next/tools/worktree-gc.sh`,确认本 RT 不在任何工作树组、
|
|
468
|
+
【未合入的本地分支】或【已打完成标签但未关单】里。
|
|
463
469
|
|
|
464
470
|
### 7.3 收口前验**目标**,不是验**改动**(2026-08-14 新增)
|
|
465
471
|
|
|
@@ -506,18 +512,19 @@ AODW 使用本地生成 RT-ID,不依赖远程服务。
|
|
|
506
512
|
|
|
507
513
|
### 9.2 生成逻辑
|
|
508
514
|
|
|
509
|
-
|
|
515
|
+
在仓库根目录执行 `bash .aodw-next/tools/next-rt-id.sh .`。
|
|
516
|
+
|
|
517
|
+
1. 取三个来源的**并集**找最大序号 `N`:
|
|
510
518
|
- `RT/` 目录下所有 `RT-XXX` 格式的目录;
|
|
511
|
-
- `RT/index.yaml` 的全部条目 id
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
冲突,返工撤号(见 RT-128 retrospective.md)。
|
|
519
|
+
- `RT/index.yaml` 的全部条目 id;
|
|
520
|
+
- 本地 Git 各 ref 历史中新增过的根目录 `RT/RT-XXX/` 路径(`git log --all --no-renames --diff-merges=separate --diff-filter=A`)。
|
|
521
|
+
|
|
522
|
+
三处一起查,才能找到只有索引条目或只在其他分支上出现的编号。
|
|
516
523
|
2. 生成新 ID:`RT-{N+1}`(补零到 3 位,如 `RT-001`, `RT-002`)
|
|
517
524
|
3. 如果生成的 ID 在**任一来源**已存在:递增序号直到找到可用 ID
|
|
518
525
|
|
|
519
526
|
### 9.3 检查清单
|
|
520
527
|
|
|
521
|
-
- [ ]
|
|
528
|
+
- [ ] 已运行 `next-rt-id.sh` 扫描目录、索引和 Git 历史
|
|
522
529
|
- [ ] 已生成 `RT-{N+1}` 格式的 ID
|
|
523
|
-
- [ ] 已确认该 ID
|
|
530
|
+
- [ ] 已确认该 ID 在三个来源中均未出现
|
|
@@ -58,10 +58,10 @@ RT/RT-XXX/
|
|
|
58
58
|
| 阶段 | 动作 | Gate |
|
|
59
59
|
|------|------|------|
|
|
60
60
|
| 0 | `feature/RT-XXX` 分支 | 强制 |
|
|
61
|
-
| B | 定稿 rt-lite §1-§7
|
|
61
|
+
| B | 定稿 rt-lite §1-§7(含 §1.5 GRV);用户确认 G/R/V;生成 7 件套 | Goal/GRV 自检 |
|
|
62
62
|
| C | `autopilot-preflight.md` 全勾 | 人工清单 |
|
|
63
63
|
| D | `plan_complete=true` | 机械 Gate-Plan |
|
|
64
|
-
| E | Ralph
|
|
64
|
+
| E | Ralph+GRV(读 V 队列 → 做 1 个 V → R 验收+tests/lint/guard → CONTINUE → `rt-grv-continue.sh`) | 每轮 Quality Gate |
|
|
65
65
|
| F | commit | 机械 Gate-Commit |
|
|
66
66
|
| G | `status=done` | 机械 Gate-Done |
|
|
67
67
|
|
|
@@ -71,7 +71,7 @@ RT/RT-XXX/
|
|
|
71
71
|
|
|
72
72
|
## 4. 机械 Gate 条件(速查)
|
|
73
73
|
|
|
74
|
-
**Gate-Plan**:§1-§4、§7、§5.4 就绪;Goal
|
|
74
|
+
**Gate-Plan**:§1-§4、§1.5 GRV、§7、§5.4 就绪;Goal/GRV 自检通过且用户已确认契约;`plan_complete=true`。
|
|
75
75
|
|
|
76
76
|
**Gate-Commit**:`tests_pass` && `lint_pass` && `guard_pass`。
|
|
77
77
|
|
|
@@ -96,6 +96,9 @@ RT/RT-XXX/
|
|
|
96
96
|
- 🚫 无 `state.json` / `execution-log` 更新进入下一轮
|
|
97
97
|
- 🚫 缺 `loop-prompt.md` / `autopilot-preflight.md` 仍宣称 Autopilot RT 已就绪或已关闭
|
|
98
98
|
- 🚫 在 Autopilot 中等待人工 Gate 3/4/5(除非熔断)
|
|
99
|
+
- 🚫 无 §1.5 GRV 或用户未确认契约即开循环
|
|
100
|
+
- 🚫 做 V 表外工作 / 契约仍有效时停下来问「要不要继续」
|
|
101
|
+
- 🚫 发现 R 不可达或重大缺陷后仍不 `blocked`、不交还用户、或静默改 GRV
|
|
99
102
|
|
|
100
103
|
---
|
|
101
104
|
|
package/.aodw-next/README.md
CHANGED
package/.aodw-next/SKILL.md
CHANGED
|
@@ -30,7 +30,7 @@ description: AODW (AI-Orchestrated Development Workflow) — 完整的 AI 协作
|
|
|
30
30
|
- **一个 RT = 一个 Worktree = 一个 Feature 分支**(`feature/RT-XXX-name`)
|
|
31
31
|
- **Spec-Full**:跨模块/数据模型/API 变更/高风险 → 完整 spec+plan+审计
|
|
32
32
|
- **Spec-Lite**:单模块/bug 修复/低风险 → 单文件 `rt-lite.md`
|
|
33
|
-
- **Spec-Lite Autopilot
|
|
33
|
+
- **Spec-Lite Autopilot**:`rt-lite.md` 须含 **§1.5 GRV**;外加 `rt-plan.md`(V 队列)、`state.json`、`loop-prompt.md`、`execution-log.md`、`autopilot-preflight.md`;未完成时禁止停问、禁止 V 外工作;轮末调用 `tools/rt-grv-continue.sh` 驱动 CONTINUE→下一 V
|
|
34
34
|
- **确认门控**:commit/merge/push/worktree 操作前必须向用户确认
|
|
35
35
|
- **判据纪律**:判据全绿不是验收,只是允许你去读产出;详见 `01-core/test-discipline.md`
|
|
36
36
|
- **规则索引**:详见 `manifest.yaml`
|
package/.aodw-next/manifest.yaml
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# AODW Manifest (Level 1 metadata)
|
|
2
|
-
version: 0.
|
|
2
|
+
version: 0.11.0
|
|
3
3
|
last_updated_at: 2026-09-05T16:50:00+08:00
|
|
4
4
|
summary_preferred: true
|
|
5
5
|
|
|
@@ -38,7 +38,7 @@ rules:
|
|
|
38
38
|
|
|
39
39
|
- id: git-discipline
|
|
40
40
|
name: Git Discipline
|
|
41
|
-
description: Branching, commits, worktree
|
|
41
|
+
description: Branching, commits, confirm-gated worktree cleanup, and per-RT merge and closure.
|
|
42
42
|
path: 01-core/git-discipline.md
|
|
43
43
|
|
|
44
44
|
- id: rt-manager
|
|
@@ -46,6 +46,12 @@ rules:
|
|
|
46
46
|
description: RT lifecycle, branch rules, and mandatory checks.
|
|
47
47
|
path: 02-workflow/rt-manager.md
|
|
48
48
|
|
|
49
|
+
- id: orca-multi-session
|
|
50
|
+
name: Orca Multi-session Collaboration
|
|
51
|
+
description: Optional Orca workflow for main and development sessions and per-RT worktrees.
|
|
52
|
+
path: 02-workflow/orca-multi-session.md
|
|
53
|
+
load_when: [orca, worktree, session_handoff]
|
|
54
|
+
|
|
49
55
|
- id: spec-full-profile
|
|
50
56
|
name: Spec-Full Profile
|
|
51
57
|
description: Full specification workflow for complex changes.
|
package/.aodw-next/project.yaml
CHANGED
|
@@ -7,6 +7,10 @@ project_name: ""
|
|
|
7
7
|
# ── 以下均为**可选**声明块:不写则行为完全不变 ──────────────────────────────
|
|
8
8
|
# 这里给的是格式说明,不是实例值。接入的项目按需取消注释并填自己的值。
|
|
9
9
|
|
|
10
|
+
# ── 开发环境(可选)───────────────────────────────────────────────────────────
|
|
11
|
+
# 由 CLI 的 --dev-env 选项记录。orca 启用多会话协作模块,留空沿用标准 RT 流程。
|
|
12
|
+
# dev_env: orca
|
|
13
|
+
|
|
10
14
|
# ── 采纳溯源(可选)─────────────────────────────────────────────────────────
|
|
11
15
|
# 记录本项目的 .aodw-next/ 是从哪儿、哪个版本、什么时候拷过来的。
|
|
12
16
|
# 纯元数据:没有任何工具依据它改变行为,只为「这份规则是哪来的」可追溯。
|
|
@@ -59,7 +59,7 @@ scan_worktree() {
|
|
|
59
59
|
# (`交接/H004.md` → `"\344\272\244\346\216\245/H004.md"`),那样下面的 grep 全部落空,
|
|
60
60
|
# 历史与分支两路扫描静默失效——只剩工作区一路,正好漏掉它要防的那两类撞号事故。
|
|
61
61
|
scan_history() {
|
|
62
|
-
git -c core.quotepath=false log --all --pretty=format: --name-only --diff-filter=A -- "$DIR" 2>/dev/null \
|
|
62
|
+
git -c core.quotepath=false log --all --no-renames --pretty=format: --name-only --diff-filter=A -- "$DIR" 2>/dev/null \
|
|
63
63
|
| grep -o "$DIR/H[0-9]\{3\}" | sed "s|$DIR/||" | sed 's/^/历史 /'
|
|
64
64
|
}
|
|
65
65
|
# ③ 全部分支的当前内容(含未合并分支——已知事故 ① 正是栽在这)
|
|
@@ -75,7 +75,7 @@ ALL="$(printf '%s\n%s\n%s\n' "$(scan_worktree)" "$(scan_history)" "$(scan_branch
|
|
|
75
75
|
USED="$(printf '%s' "$ALL" | awk '{print $2}' | sort -u | grep -v '^$' || true)"
|
|
76
76
|
|
|
77
77
|
if [[ "$MODE" == "list" ]]; then
|
|
78
|
-
echo "已占用的 H 序号(目录:$DIR;来源含未合并分支):"
|
|
78
|
+
echo "已占用的 H 序号(目录:${DIR};来源含未合并分支):"
|
|
79
79
|
if [[ -z "$USED" ]]; then echo " (无)"; else
|
|
80
80
|
while read -r n; do
|
|
81
81
|
[[ -n "$n" ]] || continue
|
|
@@ -101,7 +101,7 @@ fi
|
|
|
101
101
|
|
|
102
102
|
count="$(printf '%s' "$USED" | grep -c . || true)"
|
|
103
103
|
echo "交接包取号"
|
|
104
|
-
echo " 目录: $DIR(相对 $REPO)"
|
|
104
|
+
echo " 目录: ${DIR}(相对 ${REPO})"
|
|
105
105
|
echo " 已占用:$count 个(扫描范围:工作区 + 历史提交 + 全部分支含未合并)"
|
|
106
106
|
[[ -n "$USED" ]] && echo " 已用号:$(printf '%s' "$USED" | tr '\n' ' ')"
|
|
107
107
|
echo
|
|
@@ -65,6 +65,7 @@
|
|
|
65
65
|
- 代码修改完成后,必须展示 git status 和关键 diff
|
|
66
66
|
- 询问用户"修改已完成,是否提交?"
|
|
67
67
|
- 严禁未获用户确认前直接 Commit
|
|
68
|
+
- **Autopilot 例外**:当 RT `meta.yaml` 含 `autopilot: true` 且 GRV 已用户确认、`phase=implementing` 时,由机械 Gate(tests/lint/guard)替代本条「询问是否提交」;轮末用 `CONTINUE`/`DONE`/`blocked` + `rt-grv-continue.sh` 续跑,禁止停问是否继续。详见 `autopilot-protocol.md` 与 Cursor 规则 `aodw-autopilot-continue`。
|
|
68
69
|
|
|
69
70
|
## 5. 兜底机制
|
|
70
71
|
如果你无法读取 {{REF_PREFIX}}.aodw-next/01-core/aodw-constitution.md,请立即停止并要求用户提供该文件。
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# {{PROJECT_NAME}} 开发会话指南
|
|
2
|
+
|
|
3
|
+
本项目使用 [Orca 多会话协作规则](../02-workflow/orca-multi-session.md)。按项目实际情况填写以下设置。
|
|
4
|
+
|
|
5
|
+
- 主干分支:`{{TRUNK}}`
|
|
6
|
+
- Orca 工作树根目录:项目自填
|
|
7
|
+
- 默认 Agent 和模型档:项目自填
|
|
8
|
+
- 同时在途上限:3(项目可调整)
|
|
9
|
+
- 验收与全量测试命令:项目自填
|
|
10
|
+
- 对外通知方式、发送人和授权范围:项目自填
|
|
11
|
+
|
|
12
|
+
## 主会话授权范围
|
|
13
|
+
|
|
14
|
+
默认由主会话确认提交、合并和开开发会话。遇到门禁,开发会话停下并把问题发给主会话,主会话在用户授权范围内代答。
|
|
15
|
+
|
|
16
|
+
不可恢复的删除、以用户名义对外发消息和业务口径取舍,仍须用户本人确认。
|
|
17
|
+
|
|
18
|
+
- 用户已明确授权的其他事项及限制:项目自填
|
|
19
|
+
|
|
20
|
+
开开发会话用 [任务书模板](../templates/orca-handoff-template.md),更换主会话用 [交接模板](../templates/main-session-handover-template.md)。
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# 主会话交接
|
|
2
|
+
|
|
3
|
+
- 项目、交接时间及换会话原因:项目自填
|
|
4
|
+
- 用户已确认的目标、决定与授权边界:项目自填
|
|
5
|
+
- 主目录、主干和 RT 索引位置:项目自填
|
|
6
|
+
|
|
7
|
+
## 在途 RT
|
|
8
|
+
|
|
9
|
+
| RT | 当前状态 | 工作树、分支和终端地址 | 验收证据或阻塞 | 下一步及负责人 |
|
|
10
|
+
| --- | --- | --- | --- | --- |
|
|
11
|
+
| 项目自填 | 项目自填 | 项目自填 | 项目自填 | 项目自填 |
|
|
12
|
+
|
|
13
|
+
交接前用 `orca worktree ps` 核对 RT 索引,标记会话空缺和等待原因。
|
|
14
|
+
|
|
15
|
+
## 后台任务与待办决定
|
|
16
|
+
|
|
17
|
+
- 后台任务的用途、状态、定位方式和后续处置:项目自填
|
|
18
|
+
- 等用户拍板的事项和已有选项:项目自填
|
|
19
|
+
- 新主会话优先处理的事:项目自填
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# RT-xxx 开发会话任务书
|
|
2
|
+
|
|
3
|
+
## 目标与范围
|
|
4
|
+
|
|
5
|
+
- 用户已确认的意图复述:项目自填
|
|
6
|
+
- 交付物、可改文件、禁改文件及外部环境禁区:项目自填
|
|
7
|
+
- 前置条件、依赖和真实样本:项目自填
|
|
8
|
+
|
|
9
|
+
## 开工信息
|
|
10
|
+
|
|
11
|
+
- 工作树、分支和主干:项目自填
|
|
12
|
+
- 所选 Agent、模型档及选用理由:项目自填
|
|
13
|
+
- 主会话终端地址、项目开发会话指南:项目自填
|
|
14
|
+
- 已获授权的提交、合并和推送动作:项目自填
|
|
15
|
+
|
|
16
|
+
## 验收
|
|
17
|
+
|
|
18
|
+
- 验收命令、预期输出和判据:项目自填
|
|
19
|
+
- 需要主会话确认的事项:项目自填
|
|
20
|
+
|
|
21
|
+
## 回报
|
|
22
|
+
|
|
23
|
+
做完、卡住或等待决定时,把四节回执发给主会话。
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
orca orchestration send --to "$main_terminal" --type handoff \
|
|
27
|
+
--subject "$rt 回执" --body-file "$report_file"
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
回执写清改了什么、验证了什么(命令与关键输出)、没验证什么及原因、剩余风险。结论标【已核实】【推测】【猜测】。如已合并,附合并 SHA。
|
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
## 2) RT 准备
|
|
15
15
|
|
|
16
16
|
- [ ] `meta.yaml.execution_mode = autopilot`(创建 RT 时用户已确认)
|
|
17
|
-
- [ ] `rt-lite.md` §1-§4、§1.3.1、§7、§5.4 已填写
|
|
18
|
-
- [ ] Goal 质量自检通过(`autopilot-goal-spec.md` §5)
|
|
17
|
+
- [ ] `rt-lite.md` §1-§4、§1.3.1、§1.5 GRV、§7、§5.4 已填写
|
|
18
|
+
- [ ] Goal/GRV 质量自检通过(`autopilot-goal-spec.md` §5)
|
|
19
19
|
- [ ] Autopilot 适配度 ≥ 4/6 或用户已知情
|
|
20
|
-
- [ ] §7
|
|
21
|
-
- [ ] `state.json` + `rt-plan.md`
|
|
20
|
+
- [ ] 用户已确认 G + R + V 契约与 §7 摘要
|
|
21
|
+
- [ ] `state.json` + `rt-plan.md` 已初始化;V 队列与 §1.5 一致
|
|
22
22
|
- [ ] `loop-prompt.md` 已创建
|
|
23
23
|
- [ ] `execution-log.md` 已创建
|
|
24
24
|
- [ ] `autopilot-preflight.md` 已创建并纳入版本控制
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
|
|
29
29
|
- [ ] §2.1 修改文件清单已列出
|
|
30
30
|
- [ ] §1.3.1「不改什么」≥ 3 项
|
|
31
|
+
- [ ] §1.5 V 为闭集(未列出的工作本 RT 不做)
|
|
31
32
|
- [ ] §4 invariants 已列出
|
|
32
33
|
- [ ] 无范围外改动计划
|
|
33
34
|
|
|
@@ -28,6 +28,41 @@
|
|
|
28
28
|
- **最小必要改动**:
|
|
29
29
|
- **可验证成功标准**:
|
|
30
30
|
|
|
31
|
+
### 1.5 GRV 执行契约(Autopilot / 防发散必填;协作模式强烈建议)
|
|
32
|
+
|
|
33
|
+
> 标准见 `02-workflow/autopilot-goal-spec.md` §9。
|
|
34
|
+
> **由 AI 与用户互动共写**:AI 出草案 + 选项化追问,用户拍板;定稿确认前禁止进入实现循环。
|
|
35
|
+
> 未列入 V 的工作默认禁止;新想法写入 DI / blockers,本 RT 不做。
|
|
36
|
+
> **执行中若发现重大缺陷导致 G/R 不可达**:立即 `phase=blocked`,按 §9.6 交还用户(修订契约 / 拆 RT / 暂停 / 中止),禁止静默改契约硬做。
|
|
37
|
+
|
|
38
|
+
#### G — Goal(一句话目标)
|
|
39
|
+
<!-- 基于真正问题,不是「建一个系统」;与 §1.2 一致,此处必须可单独摘录进 loop-prompt -->
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
#### R — Result(成果 = §7 的子集,须可机械验收)
|
|
43
|
+
|
|
44
|
+
| R-ID | 成果描述 | 对应 §7 | 验收命令(Baseline) |
|
|
45
|
+
|------|----------|---------|----------------------|
|
|
46
|
+
| R1 | | C? | |
|
|
47
|
+
| R2 | | C? | |
|
|
48
|
+
|
|
49
|
+
#### V — Variables(举措 = rt-plan 唯一工作源)
|
|
50
|
+
|
|
51
|
+
| V-ID | 举措(一件真实可做完的事) | 对应 R | 状态 |
|
|
52
|
+
|------|---------------------------|--------|------|
|
|
53
|
+
| V1 | | R? | pending |
|
|
54
|
+
| V2 | | R? | pending |
|
|
55
|
+
|
|
56
|
+
**共写与确认**:
|
|
57
|
+
- [ ] AI 已提供 G/R/V 草案并完成选项化澄清
|
|
58
|
+
- [ ] 用户已确认「按此契约执行」(日期:________)
|
|
59
|
+
|
|
60
|
+
**契约纪律**:
|
|
61
|
+
- 每轮只推进 **1 个**未完成 V(最多 2 个)
|
|
62
|
+
- 做完该 V 后立即跑其对应 R 的验收命令
|
|
63
|
+
- R 未全部通过时:结束语只能是 `CONTINUE` + 下一 V-ID,**禁止**停下来问「要不要继续」(熔断除外)
|
|
64
|
+
- 出现 V 表外需求 → `blockers` / DI,本 RT 不扩 scope
|
|
65
|
+
- 重大缺陷 / R 不可达 → `blocked` + §9.6 选项,等待用户裁决
|
|
31
66
|
---
|
|
32
67
|
|
|
33
68
|
## § 2. 方案设计 (Solution & Design)
|
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
你正在以 **AODW Autopilot** 模式自主推进 RT:{RT_ID}(第 **{ITERATION}** / **{MAX_ITERATIONS}** 次迭代)。
|
|
2
2
|
|
|
3
|
-
##
|
|
3
|
+
## GRV 契约(唯一工作源)
|
|
4
|
+
|
|
5
|
+
### G — Goal
|
|
4
6
|
{GOAL_SUMMARY}
|
|
5
7
|
|
|
8
|
+
### R — 尚未通过的成果(来自 rt-lite §1.5 / §7)
|
|
9
|
+
{OPEN_RESULTS}
|
|
10
|
+
|
|
11
|
+
### V — 本轮举措(只做这些)
|
|
12
|
+
{CURRENT_VARIABLES}
|
|
13
|
+
|
|
14
|
+
> 完整契约:读取 `RT/{RT_ID}/rt-lite.md` §1.5 与 §7;进度:`rt-plan.md`。
|
|
15
|
+
|
|
6
16
|
## 完成条件(机械验收,rt-lite.md §7)
|
|
7
17
|
{CHECKLIST_ITEMS}
|
|
8
18
|
|
|
@@ -13,33 +23,42 @@
|
|
|
13
23
|
{STATE_JSON}
|
|
14
24
|
```
|
|
15
25
|
|
|
16
|
-
### rt-plan.md
|
|
26
|
+
### rt-plan.md(只处理未完成 V)
|
|
17
27
|
> 开工前读取 `RT/{RT_ID}/rt-plan.md`,本轮完成后更新勾选与「当前焦点」。
|
|
18
28
|
|
|
19
|
-
## 本轮规则(Ralph
|
|
29
|
+
## 本轮规则(Ralph + GRV)
|
|
20
30
|
|
|
21
|
-
1.
|
|
22
|
-
2.
|
|
23
|
-
3. **验证驱动(Backpressure
|
|
31
|
+
1. **续接而非重做**:已 true / 已勾选的 V、R 不要重复
|
|
32
|
+
2. **一轮一 V**:本轮只完成 **1 个**未完成 V(最多 2 个),并跑其对应 R 的验收命令
|
|
33
|
+
3. **验证驱动(Backpressure)**:改动后立即运行该 V→R 命令,以及 §5.4 tests → lint → guard
|
|
24
34
|
4. **如实写状态**:更新 `state.json`、`rt-plan.md`、`execution-log.md`;决策写入 `decisions`
|
|
25
|
-
5. **范围锁定**:不修改
|
|
35
|
+
5. **范围锁定**:不修改 §1.3.1「不改什么」;**禁止** §1.5 V 表以外的任何功能/重构/「顺手优化」
|
|
36
|
+
6. **未完成禁止停问**:只要仍有未完成 V 或未通过 R,且**契约仍成立**,本轮结束只能输出 **`CONTINUE`** + 下一 V-ID;**禁止**问「要不要继续」
|
|
37
|
+
7. **契约失效必须熔断**:若发现 R 不可达、G 前提错误、破坏 invariants、安全硬伤、工作量爆炸等(见 `autopilot-goal-spec.md` §9.6)→ 立即 `phase=blocked`,输出缺陷摘要 + A/B/C/D 选项,**禁止**静默改 GRV 继续做
|
|
26
38
|
|
|
27
39
|
## 反模式(出现则换方案或 blocked)
|
|
28
40
|
|
|
29
41
|
| 信号 | 处理 |
|
|
30
42
|
|------|------|
|
|
31
43
|
| 同一文件第 4 次修改 | 换实现,记入 decisions |
|
|
32
|
-
| 同一测试连续 2 轮失败 |
|
|
33
|
-
| checklist
|
|
34
|
-
|
|
44
|
+
| 同一测试连续 2 轮失败 | 重读 §1.5 G/R,写入 blockers |
|
|
45
|
+
| checklist / V 进度与上轮完全相同 | `stall_count++`;≥2 则 `phase=blocked` |
|
|
46
|
+
| 想做 V 表外的事 | 写入 blockers/DI,**本轮不做**;勿扩 scope |
|
|
47
|
+
| 停下来向用户确认是否继续(契约仍有效时) | 违规;改为 `CONTINUE` + 下一 V |
|
|
48
|
+
| R/G 已证伪或不可达 | **合法熔断**:`blocked` + §9.6,等用户选 A 修订 / B 拆 RT / C 暂停 / D 中止 |
|
|
35
49
|
## 机械 Gate
|
|
36
50
|
|
|
37
|
-
- **Plan**:`plan_complete` ← §1-§4、§7、§5.4
|
|
51
|
+
- **Plan**:`plan_complete` ← §1-§4、§1.5 GRV、§7、§5.4 就绪且用户已确认契约
|
|
38
52
|
- **Commit**:tests + lint + guard 全 pass
|
|
39
|
-
- **Done
|
|
53
|
+
- **Done**:全部 V `[x]` + 全部 R 验收通过 + checklist 全 true + auditor 无 P0
|
|
40
54
|
|
|
41
55
|
## 本轮结束
|
|
42
56
|
|
|
43
57
|
1. 更新上述文件
|
|
44
|
-
2.
|
|
45
|
-
3. 否则输出 **`CONTINUE`**
|
|
58
|
+
2. 若全部完成:`phase=done`,`meta.yaml.status=done`,输出 **`DONE`**
|
|
59
|
+
3. 否则输出 **`CONTINUE`** 与下一 V-ID(禁止空等用户)
|
|
60
|
+
4. **立即**调用外层续跑脚本(不要等用户):
|
|
61
|
+
```bash
|
|
62
|
+
bash .aodw-next/tools/rt-grv-continue.sh --rt {RT_ID} --signal CONTINUE # 或 DONE / blocked
|
|
63
|
+
```
|
|
64
|
+
退出码:`0`=续跑下一轮,`10`=DONE 停,`20`=blocked 交还用户,`30`=达 iteration 上限
|
|
@@ -38,8 +38,8 @@ status: created
|
|
|
38
38
|
# 涉及的业务/技术模块标识,来自你的模块体系(例如 orders / users / auth 等)
|
|
39
39
|
modules: []
|
|
40
40
|
|
|
41
|
-
# Git
|
|
42
|
-
#
|
|
41
|
+
# Git 分支与工作树(实现阶段创建后立即回填,见 git-discipline.md §2.1)
|
|
42
|
+
# 工作树与分支巡检(§2.5)以 git worktree list 为准。
|
|
43
43
|
branch: null # 例如 feature/RT-XXX-short-name
|
|
44
44
|
worktree: null # 例如 .claude/worktrees/RT-XXX-short-name
|
|
45
45
|
|
|
@@ -1,21 +1,28 @@
|
|
|
1
1
|
# Plan: {RT_ID} — <任务标题>
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> 动态实现计划 = **GRV 的 V(Variables)队列**。
|
|
4
|
+
> 每轮只处理未完成的 V;禁止添加未在 `rt-lite.md` §1.5 V 表中登记的步骤(除非先修订 GRV 并经用户确认)。
|
|
4
5
|
|
|
5
|
-
##
|
|
6
|
+
## 进度(V 队列)
|
|
6
7
|
|
|
7
|
-
-
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
| 勾选 | V-ID | 举措 | 对应 R | 验收命令 |
|
|
9
|
+
|------|------|------|--------|----------|
|
|
10
|
+
| [ ] | V1 | (与 rt-lite §1.5 一致) | R1 | |
|
|
11
|
+
| [ ] | V2 | | R? | |
|
|
12
|
+
| [ ] | V3 | | R? | |
|
|
13
|
+
|
|
14
|
+
> 上表与 `rt-lite.md` §1.5 V 表必须一致;§1.5 为契约源,本表为执行勾选副本。
|
|
10
15
|
|
|
11
16
|
## 当前焦点
|
|
12
17
|
|
|
13
|
-
-
|
|
14
|
-
- 对应
|
|
18
|
+
- 本轮 V-ID:(仅 1 个,例外最多 2 个)
|
|
19
|
+
- 对应 R-ID:
|
|
20
|
+
- 本轮验收命令:
|
|
21
|
+
- 禁止事项:不碰 §1.3.1「不改什么」;不做 V 表外功能
|
|
15
22
|
|
|
16
23
|
## 阻塞(blockers)
|
|
17
24
|
|
|
18
|
-
-
|
|
25
|
+
- (无则留空;V 外需求记在这里或 DI,本 RT 不实现)
|
|
19
26
|
|
|
20
27
|
## 决策(decisions)
|
|
21
28
|
|
|
@@ -25,11 +32,14 @@
|
|
|
25
32
|
|
|
26
33
|
仅当 **同时** 满足才可输出 `DONE`:
|
|
27
34
|
|
|
28
|
-
1. 本节「进度」全部 `[x]
|
|
35
|
+
1. 本节「进度」全部 `[x]`(全部 V 完成)
|
|
29
36
|
2. `state.json.checklist` 全 `true`,且 §5.4 tests/lint/guard 已通过
|
|
37
|
+
3. §1.5 每个 R 的验收命令均曾 exit 0(记入 execution-log)
|
|
38
|
+
|
|
39
|
+
未满足时:输出 **`CONTINUE`** + 下一 V-ID;**禁止**等待用户确认是否继续。
|
|
30
40
|
|
|
31
41
|
## 迭代记录
|
|
32
42
|
|
|
33
|
-
| 轮次 |
|
|
34
|
-
|
|
35
|
-
| 0 | scaffold | — | RT 创建 |
|
|
43
|
+
| 轮次 | 完成 V | 验证结果 | 备注 |
|
|
44
|
+
|------|--------|----------|------|
|
|
45
|
+
| 0 | scaffold | — | RT 创建 / GRV 定稿 |
|
|
@@ -114,7 +114,7 @@ is_ours() {
|
|
|
114
114
|
for src in "$SKILLS_SRC"/*/; do
|
|
115
115
|
[[ -d "$src" ]] || continue
|
|
116
116
|
name="$(basename "$src")"
|
|
117
|
-
[[ -f "$src/SKILL.md" ]] || { echo " 跳过 $name(无 SKILL.md,不是合法 skill)"; continue; }
|
|
117
|
+
[[ -f "$src/SKILL.md" ]] || { echo " 跳过 ${name}(无 SKILL.md,不是合法 skill)"; continue; }
|
|
118
118
|
dst="$TARGET_DIR/$name"
|
|
119
119
|
|
|
120
120
|
case "$ACTION" in
|
|
@@ -188,7 +188,7 @@ for src in "$SKILLS_SRC"/*/; do
|
|
|
188
188
|
# 写来源标记:uninstall 据此确认「这是我装的」,绝不误删宿主自有 skill
|
|
189
189
|
printf '%s\n' \
|
|
190
190
|
"# 本目录由 .aodw-next/tools/install-skills.sh --copy 安装,可被 --uninstall 移除。" \
|
|
191
|
-
"# 源:.aodw-next/skills/$name(改源后需重新运行安装脚本)" \
|
|
191
|
+
"# 源:.aodw-next/skills/${name}(改源后需重新运行安装脚本)" \
|
|
192
192
|
> "$dst/$MARKER"
|
|
193
193
|
printf ' %-18s ✓ 已复制\n' "$name"
|
|
194
194
|
else
|