@namewta/speculo 0.7.2 → 0.7.3
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/dist/src/migrations.js +604 -23
- package/dist/src/migrations.js.map +1 -1
- package/package.json +1 -1
- package/template/canonical/canonical-specdev-engineering-cognitive-mentor.md +171 -455
- package/template/canonical/canonical-specdev-goal-plan.md +686 -1117
- package/template/canonical/canonical-specdev-grill-with-docs.md +172 -456
- package/template/canonical/canonical-specdev-spec.md +199 -493
- package/template/canonical/canonical-specdev-tickets.md +378 -597
- package/template/canonical/canonical-specdev-wayfinder.md +170 -454
- package/template/skills/migrate-runtime-state/SKILL.md +6 -6
- package/template/skills/migrate-runtime-state/references/migration-contract.md +9 -3
- package/template/skills/migrate-runtime-state/scripts/migrate-runtime-state.mjs +322 -33
- package/template/workflows/specdev/I-implement/I-implement.md +97 -143
- package/template/workflows/specdev/I-implement/evidence-template.md +60 -48
- package/template/workflows/specdev/I-implement/execution-preflight.md +29 -21
- package/template/workflows/specdev/I-implement/merge-conflict-protocol.md +12 -12
- package/template/workflows/specdev/I-init-setup/I-init-setup.md +4 -5
- package/template/workflows/specdev/I-init-setup/change-status-template.json +14 -1
- package/template/workflows/specdev/I-init-setup/config-template.json +3 -5
- package/template/workflows/specdev/I-init-setup/status-template.json +1 -1
- package/template/workflows/specdev/INDEX.md +11 -8
- package/template/workflows/specdev/P-goal-plan/P-goal-plan.md +76 -102
- package/template/workflows/specdev/P-goal-plan/completion-control.md +26 -44
- package/template/workflows/specdev/P-goal-plan/goal-plan-template.md +40 -37
- package/template/workflows/specdev/P-goal-plan/lead-orchestration.md +34 -0
- package/template/workflows/specdev/P-goal-plan/orchestration-protocol.md +31 -46
- package/template/workflows/specdev/P-goal-plan/planning-modes.md +42 -76
- package/template/workflows/specdev/T-tickets/T-tickets.md +6 -3
- package/template/workflows/specdev/T-tickets/ticket-readiness.md +5 -3
- package/template/workflows/specdev/T-tickets/ticket-template.md +8 -1
- package/template/workflows/specdev/T-tickets/tickets-map-template.md +5 -4
- package/template/workflows/specdev/_state/status.json +1 -1
- package/template/workflows/specdev/common/README.md +2 -2
- package/template/workflows/specdev/common/rules/change-completion.md +17 -20
- package/template/workflows/specdev/common/rules/deviation-control.md +1 -1
- package/template/workflows/specdev/common/rules/evidence-and-verification.md +27 -37
- package/template/workflows/specdev/common/rules/path-ownership.md +21 -23
- package/template/workflows/specdev/common/rules/readiness-and-depth.md +1 -1
- package/template/workflows/specdev/common/schemas/change-status.schema.json +136 -373
- package/template/workflows/specdev/common/schemas/config.schema.json +9 -11
- package/template/workflows/specdev/common/schemas/goal-plan.schema.json +24 -16
- package/template/workflows/specdev/common/schemas/status.schema.json +7 -63
- package/template/workflows/specdev/common/skills/dev-worktree/SKILL.md +42 -21
- package/template/workflows/specdev/common/skills/dev-worktree/references/create.md +36 -21
- package/template/workflows/specdev/common/skills/dev-worktree/references/finalize.md +46 -18
- package/template/workflows/specdev/common/skills/subagent-delivery/SKILL.md +34 -31
- package/template/workflows/specdev/common/skills/subagent-delivery/references/external-web-subagent.md +10 -23
- package/template/workflows/specdev/common/skills/subagent-delivery/references/native-subagent.md +15 -25
- package/template/workflows/specdev/common/tools/validate-specdev.mjs +386 -209
- package/template/workflows/specdev/I-implement/delegated-evidence-template.md +0 -12
- package/template/workflows/specdev/P-goal-plan/delegated-execution-template.md +0 -35
- package/template/workflows/specdev/P-goal-plan/delegated-execution.md +0 -59
- package/template/workflows/specdev/P-goal-plan/workspace-execution-template.md +0 -24
|
@@ -1,57 +1,47 @@
|
|
|
1
1
|
# 证据与验证规范
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
验证回答“怎样证明”,Evidence 记录“实际运行了什么、在哪个状态运行、结果和残余风险是什么”。
|
|
4
4
|
|
|
5
5
|
## 1. 验证矩阵
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
每行绑定行为、合同或风险,并标记环境:
|
|
8
8
|
|
|
9
|
-
| 行为或风险 |
|
|
10
|
-
|
|
11
|
-
|
|
|
12
|
-
|
|
|
13
|
-
|
|
|
9
|
+
| 行为或风险 | 接缝 | 命令/方法 | 环境 | 预期 | Evidence |
|
|
10
|
+
|---|---|---|---|---|---|
|
|
11
|
+
| 正常/失败路径 | 公共接口或稳定接缝 | 定向测试 | source-worktree | 合同成立 | Ticket Evidence |
|
|
12
|
+
| 跨模块回归 | 集成接缝 | 回归命令 | parent-candidate | 组合状态成立 | Ticket Evidence |
|
|
13
|
+
| E2E required | 真实端到端边界 | 场景步骤 | parent-candidate | 外部行为成立 | Ticket Evidence |
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
## 2. 两层验证
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
### Source-worktree
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
implementation owner 运行最接近目标行为的单元/组件测试、静态分析、类型、lint/build 等适用非 E2E 检查。来源实现必须在 clean worktree 形成 commit。任何 source-worktree E2E pass 声明无效。
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
2. 稳定接缝上的单元测试;
|
|
23
|
-
3. 类型检查、静态分析、lint 和构建;
|
|
24
|
-
4. 可重复手动步骤、截图或查询结果;
|
|
25
|
-
5. 代码阅读推断。
|
|
21
|
+
### Parent-candidate
|
|
26
22
|
|
|
27
|
-
|
|
23
|
+
Lead 在最新父分支与 source commit 的 candidate 状态运行受影响集成/回归、项目父状态检查和适用 E2E。E2E 由实际跨边界风险决定,不限于 UI;not-required 必须写理由。required E2E 未运行或失败时不得推进父分支。
|
|
28
24
|
|
|
29
|
-
|
|
25
|
+
### Direct Spec
|
|
30
26
|
|
|
31
|
-
|
|
27
|
+
获批 Direct Spec 不创建 Ticket worktree 或 candidate。Lead 在 current workspace 记录实施前基线,运行轻量合同要求的定向检查、适用回归与 E2E,并记录最终 checkpoint、dirty 状态、运行环境、命令、退出状态和未运行原因。E2E 仍只由 Lead 执行;不得为套用两层验证而伪造 Ticket、source/candidate/result 或父分支推进证据。
|
|
32
28
|
|
|
33
|
-
|
|
29
|
+
低层证据不能替代明确要求的外部行为证据。高风险迁移还需要 dry-run、调用点扫描、数据核对、监控或恢复演练。
|
|
34
30
|
|
|
35
|
-
|
|
36
|
-
- 基线已存在的失败;
|
|
37
|
-
- 环境、权限或基础设施失败;
|
|
38
|
-
- 验证本身无效或无法观察目标行为。
|
|
31
|
+
## 3. Agent 声明
|
|
39
32
|
|
|
40
|
-
|
|
33
|
+
subagent 只返回候选命令与结果,不写 Evidence。Lead 重读 workspace/Git、必要时复跑或核对输出后落盘;外部 provider 自报、截图、模拟和推断在此之前标记 `unverified`。review/research/test-observation agent 不拥有 E2E Gate。
|
|
41
34
|
|
|
42
|
-
## 4.
|
|
35
|
+
## 4. 失败分类与完整性
|
|
43
36
|
|
|
44
|
-
|
|
37
|
+
失败分类为本 Ticket 新失败、基线既有失败、环境/权限/基础设施失败、无效验证或 candidate stale。不得通过跳过、放宽断言、吞错、删除用例或迁移验证位置制造绿色。
|
|
45
38
|
|
|
46
|
-
|
|
47
|
-
- 实际修改的项目路径;
|
|
48
|
-
- 每条命令、退出状态和结果摘要;
|
|
49
|
-
- 每条验收合同的证据映射;
|
|
50
|
-
- 未运行项与原因;
|
|
51
|
-
- 新失败、既有失败和环境失败;
|
|
52
|
-
- 偏差及批准;
|
|
53
|
-
- 残余风险;
|
|
54
|
-
- worktree、提交或 PR 引用;
|
|
55
|
-
- 最终结论。
|
|
39
|
+
受控反向验证只用于可能静默通过的关键门禁:证明检查能在目标风险出现时失败,再恢复并重跑。普通测试不为形式执行破坏性操作。
|
|
56
40
|
|
|
57
|
-
|
|
41
|
+
## 5. Evidence 最低内容
|
|
42
|
+
|
|
43
|
+
每个 Ticket Evidence 至少包含:Lead、Dispatch/返回(若有)、base/source/candidate/result SHA、来源 worktree、实际路径、每条命令/环境/退出状态、合同映射、双轴审查、E2E disposition、未运行项、失败分类、偏差、残余风险和父分支重读结果。
|
|
44
|
+
|
|
45
|
+
Ticket Done 必须有 source commit、通过 candidate、父分支 result 与 Lead Evidence。无法运行 required 验证、存在未批准偏差、父分支未包含 source commit 或 Evidence 不完整时不得 Done。
|
|
46
|
+
|
|
47
|
+
Direct Spec Evidence 至少包含:用户批准与轻量合同、Lead、实施前/最终 checkpoint、实际路径、定向/回归/E2E 命令及环境、验收映射、未运行项、偏差、残余风险和提交授权状态。
|
|
@@ -1,35 +1,33 @@
|
|
|
1
1
|
# 路径所有权与并发规则
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
路径所有权是逻辑写入边界;worktree 是物理隔离边界,两者不能互相替代。
|
|
4
4
|
|
|
5
5
|
## 1. 四类路径
|
|
6
6
|
|
|
7
|
-
- `expected_changes
|
|
8
|
-
- `writable_paths
|
|
9
|
-
- `read_only_paths
|
|
10
|
-
- `shared_paths`:多个 Ticket
|
|
7
|
+
- `expected_changes`:导航预测;
|
|
8
|
+
- `writable_paths`:当前 Ticket implementation owner 可写的硬边界;
|
|
9
|
+
- `read_only_paths`:只读上下文;
|
|
10
|
+
- `shared_paths`:多个 Ticket 可能触达且必须有唯一 owner 的项目路径。
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
```yaml
|
|
15
|
-
expected_changes: ["<Path>src/auth/session.ts</Path>"]
|
|
16
|
-
writable_paths: ["<Path>src/auth/**</Path>"]
|
|
17
|
-
read_only_paths: ["<Path>src/users/**</Path>"]
|
|
18
|
-
shared_paths: ["<Path>package.json</Path>"]
|
|
19
|
-
```
|
|
12
|
+
所有项目路径使用项目相对 Path 标签。根依赖清单、锁文件、根导出、共享 schema、迁移索引、全局路由和跨 Ticket 合同默认视为 shared。
|
|
20
13
|
|
|
21
14
|
## 2. 所有权规则
|
|
22
15
|
|
|
23
|
-
1. 可能并行的 Ticket,其
|
|
24
|
-
2.
|
|
25
|
-
3.
|
|
26
|
-
4.
|
|
27
|
-
5.
|
|
28
|
-
6.
|
|
29
|
-
|
|
16
|
+
1. 可能并行的 Ticket,其 writable paths 不得相交;glob 按覆盖关系判断。
|
|
17
|
+
2. shared path 只由专用 owner Ticket 修改;消费者 Ticket 只读。Lead 负责集成,不以冲突解决替代 shared owner。
|
|
18
|
+
3. implementation subagent 只写其 Packet 与 Ticket 授权路径;Lead 自行实现也受同一边界约束。
|
|
19
|
+
4. review/research/test-observation agent 只读项目与 SpecDev 工件。
|
|
20
|
+
5. 越界前停止并按 deviation control 提出 ownership change;不得先改后报。
|
|
21
|
+
6. 上游 Ticket 改变目录/合同后,下游基于已集成父分支重新解析路径和 preflight。
|
|
22
|
+
|
|
23
|
+
## 3. Ticket worktree
|
|
24
|
+
|
|
25
|
+
每个进入 I-implement 的 Ticket 都使用唯一来源 worktree `specdev-worktree/<ticket-id>`,无论是否并行、是否派遣 subagent。Ticket 切片是隔离依据;Agent Team 不是 worktree 触发器。没有 Ticket 的获批 Direct Spec 可由 current workspace 唯一 owner 执行;只读调查不创建实现 worktree。
|
|
26
|
+
|
|
27
|
+
workspace/implementation owner 可以是 Lead 或动态 implementation subagent;integration owner 固定为 Lead。只有 Lead 写 SpecDev 状态、建立 parent-candidate、运行适用 E2E 并推进父分支。生命周期由 `<Path>{roots.workflows}/specdev/common/skills/dev-worktree/SKILL.md</Path>` 管理。
|
|
30
28
|
|
|
31
|
-
##
|
|
29
|
+
## 4. 并发
|
|
32
30
|
|
|
33
|
-
|
|
31
|
+
implementation subagent 同时最多三个,Lead 不计入;实际上限取 Goal Plan、config 和平台能力最小值。review/research/test-observation agent 不设置 SpecDev 数字上限,但 Lead 必须避免重复工作与可变环境争用。
|
|
34
32
|
|
|
35
|
-
|
|
33
|
+
**完成标准**:每个项目写入映射到唯一 Ticket、owner 和来源 worktree;shared 与父分支写入 owner 唯一。
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
### Deep
|
|
18
18
|
|
|
19
|
-
任一条件触发:公共 API、schema、wire format、数据迁移、认证授权、隐私、资金、不可逆操作、expand-contract
|
|
19
|
+
任一条件触发:公共 API、schema、wire format、数据迁移、认证授权、隐私、资金、不可逆操作、expand-contract、共享核心路径、多个 implementation owner 的跨 Ticket 写入协调、多个实质架构方案或高事故半径。
|
|
20
20
|
|
|
21
21
|
额外要求:数据流或状态转换、兼容窗口、迁移顺序、可观测性、回滚、风险缓解、收缩条件和人工批准点。
|
|
22
22
|
|