@namewta/speculo 0.7.1 → 0.7.2
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 +2 -1
- package/package.json +1 -1
- package/template/canonical/canonical-specdev-engineering-cognitive-mentor.md +178 -0
- package/template/canonical/canonical-specdev-goal-plan.md +386 -74
- package/template/canonical/canonical-specdev-grill-with-docs.md +178 -0
- package/template/canonical/canonical-specdev-spec.md +178 -0
- package/template/canonical/canonical-specdev-tickets.md +247 -21
- package/template/canonical/canonical-specdev-wayfinder.md +178 -0
- package/template/skills/optimize-codex-config/SKILL.md +81 -0
- package/template/skills/optimize-codex-config/references/configuration-contract.md +103 -0
- package/template/skills/optimize-codex-config/references/troubleshooting.md +79 -0
- package/template/skills/optimize-codex-config/scripts/audit-codex-config.mjs +747 -0
- package/template/workflows/specdev/I-implement/I-implement.md +11 -10
- package/template/workflows/specdev/I-implement/delegated-evidence-template.md +2 -1
- package/template/workflows/specdev/I-implement/execution-preflight.md +5 -3
- package/template/workflows/specdev/I-implement/merge-conflict-protocol.md +6 -5
- package/template/workflows/specdev/INDEX.md +5 -4
- package/template/workflows/specdev/P-goal-plan/P-goal-plan.md +27 -18
- package/template/workflows/specdev/P-goal-plan/completion-control.md +3 -3
- package/template/workflows/specdev/P-goal-plan/delegated-execution-template.md +6 -4
- package/template/workflows/specdev/P-goal-plan/delegated-execution.md +13 -7
- package/template/workflows/specdev/P-goal-plan/goal-plan-template.md +11 -2
- package/template/workflows/specdev/P-goal-plan/orchestration-protocol.md +7 -3
- package/template/workflows/specdev/P-goal-plan/planning-modes.md +23 -8
- package/template/workflows/specdev/P-goal-plan/workspace-execution-template.md +24 -0
- package/template/workflows/specdev/common/README.md +2 -2
- package/template/workflows/specdev/common/rules/change-completion.md +3 -2
- package/template/workflows/specdev/common/rules/path-ownership.md +2 -2
- package/template/workflows/specdev/common/schemas/change-status.schema.json +178 -0
- package/template/workflows/specdev/common/schemas/goal-plan.schema.json +10 -0
- package/template/workflows/specdev/common/skills/dev-worktree/SKILL.md +11 -11
- package/template/workflows/specdev/common/skills/dev-worktree/references/create.md +19 -4
- package/template/workflows/specdev/common/skills/dev-worktree/references/finalize.md +12 -5
- package/template/workflows/specdev/common/skills/subagent-delivery/SKILL.md +4 -3
- package/template/workflows/specdev/common/skills/subagent-delivery/references/external-web-subagent.md +1 -1
- package/template/workflows/specdev/common/skills/subagent-delivery/references/native-subagent.md +2 -3
- package/template/workflows/specdev/common/tools/validate-specdev.mjs +218 -5
|
@@ -786,9 +786,9 @@ shared_paths: ["package.json"]
|
|
|
786
786
|
|
|
787
787
|
## 3. Worktree 与分支
|
|
788
788
|
|
|
789
|
-
|
|
789
|
+
Worktree 只在存在可观察隔离需求时使用:并行写入、保护当前本地状态、一次性实验、后台恢复、provider 要求或用户明确要求。只读调查和没有其他隔离事实的顺序写入默认共用当前工作区。Agent Team、Ticket 数量和泛化的“更安全”都不构成隔离理由。Worktree 防止工作区污染,路径所有权防止逻辑冲突,两者不能互相替代。
|
|
790
790
|
|
|
791
|
-
生命周期由调用方明确的 workspace owner 按 下方 `<dev-worktree>` 标签
|
|
791
|
+
生命周期由调用方明确的 workspace owner 与 integration owner 按 下方 `<dev-worktree>` 标签 管理。`single-session` 通常把两者映射为主会话;`lead-team` 可以把 integration owner 映射为 Lead,但角色选择不决定是否使用 worktree。同一 current workspace 只允许一个项目与 SpecDev 状态写入 owner;Worker 要写项目文件时必须拥有独立 workspace。编排规则位于 “目标规划阶段的核心编排规则”。
|
|
792
792
|
|
|
793
793
|
</path-ownership>
|
|
794
794
|
|
|
@@ -963,28 +963,28 @@ E2E 仅在变更影响用户界面交互时加入验证矩阵。普通执行由
|
|
|
963
963
|
|
|
964
964
|
## 适用范围
|
|
965
965
|
|
|
966
|
-
-
|
|
967
|
-
-
|
|
968
|
-
- 调用方必须明确 workspace owner、implementation owner
|
|
969
|
-
-
|
|
966
|
+
- 只用于具备 `parallel-write`、`protect-local-state`、`disposable-experiment`、`background-resume`、`provider-requirement` 或 `user-requested` 触发事实的 Ready Ticket/原型。
|
|
967
|
+
- 只读调查、Agent Team 本身和没有其他隔离事实的顺序执行默认共用当前工作区。
|
|
968
|
+
- 调用方必须明确 trigger、workspace owner、implementation owner、integration owner、固定基线、父分支、工作项 ID、持久化 owner 和允许的结束动作。
|
|
969
|
+
- Coordination 与 workspace 正交:`single-session` 可以使用本 Skill;`lead-team` 不自动使用。Current workspace 下 Worker 只读;Worker 写入必须绑定本 Skill 创建的独立 workspace。
|
|
970
970
|
- 平台原生 worktree 优先;不可用时使用 Git worktree。
|
|
971
971
|
|
|
972
972
|
## 生命周期
|
|
973
973
|
|
|
974
974
|
1. 创建或恢复时加载 下方 `<dev-worktree-create>` 标签。
|
|
975
|
-
2. implementation owner 完成后返回工作项状态、Evidence/record 路径、`workspace_ref
|
|
976
|
-
3.
|
|
975
|
+
2. implementation owner 完成后返回工作项状态、Evidence/record 路径、`workspace_ref`、不可变 source checkpoint、commit 或 PR 引用和未验证项;Ticket worktree 从 `active` 更新为 `review`。
|
|
976
|
+
3. `terminal_action=integrate` 时 integration owner 自动加载 下方 `<dev-worktree-finalize>` 标签;`retain` 保持 review。一次性原型只评估和清理,不合入生产分支。
|
|
977
977
|
|
|
978
|
-
Ticket worktree 状态依次为 `planned → active → review → integrated → removed`;失败进入 `blocked`,记录写入 `specdev/changes/{change}/.status.json` 的 `worktrees
|
|
978
|
+
Ticket worktree 状态依次为 `planned → active → review → integrating → integrated → removed`;失败进入 `blocked`,记录写入 `specdev/changes/{change}/.status.json` 的 `worktrees`。`integrating` 是带完整授权、来源和尝试证据的可恢复锁:同一父分支一次只允许一个 integration owner;fast-forward 与 merge-commit 都必须落到可复核的 `integrated/passed` 终态。原型的 branch、`workspace_ref` 和清理结果只写入 `specdev/changes/{change}/prototypes/{prototype-id}/record.md`,不伪造 Ticket worktree 记录。
|
|
979
979
|
|
|
980
980
|
## 边界
|
|
981
981
|
|
|
982
|
-
-
|
|
982
|
+
- 每个隔离 Ticket 使用独立 worktree 和分支;同一并行 Wave 固定相同 `base_sha`。每个原型使用独立 worktree 和分支。
|
|
983
983
|
- Git provider 固定使用 `<project-root>/specdev-worktree/<work-item-id>/`,持久化 `workspace_ref: specdev-worktree/<work-item-id>`;`<project-root>` 由 `workspace.json#path_base: project-root` 解析。
|
|
984
984
|
- native/external provider 保留其可迁移 opaque locator;所有 provider 都不保存机器绝对路径、认证秘密或真实用户数据。
|
|
985
985
|
- 项目根 `.gitignore` 的 `specdev-worktree/` 条目由 `speculo init` 单一维护;缺失时创建流程阻塞并提示重新运行 init。
|
|
986
|
-
- E2E
|
|
987
|
-
-
|
|
986
|
+
- E2E 仅适用于用户界面交互受影响的变更,由 integration owner 在集成阶段运行。
|
|
987
|
+
- `terminal_action=integrate` 授权本地 fast-forward,以及分叉集成所需的暂存、merge continue 和一次集成专用 merge commit;不授权普通实现提交、push、PR、远端 merge、部署、迁移或删除分支/worktree。
|
|
988
988
|
|
|
989
989
|
</dev-worktree>
|
|
990
990
|
|
|
@@ -995,8 +995,8 @@ Ticket worktree 状态依次为 `planned → active → review → integrated
|
|
|
995
995
|
## 前置
|
|
996
996
|
|
|
997
997
|
- Ticket `ready: true` 且依赖完成,或原型问题与临时写入范围已锁定;项目写路径无冲突。
|
|
998
|
-
-
|
|
999
|
-
- 调用方已指定 workspace owner、implementation owner
|
|
998
|
+
- 调用方已记录允许的 trigger 及其事实。`parallel-write` 还要求 `specdev/config.json` 中 `git.worktree_for_parallel: true`;一次性原型要求 P-prototype 已取得本次临时 worktree 授权。
|
|
999
|
+
- 调用方已指定 workspace owner、implementation owner、integration owner、父分支、工作项 ID、持久化 owner、`integrate | retain`,并固定 `base_sha`;并行 Ticket 共用同一基线。
|
|
1000
1000
|
|
|
1001
1001
|
## 创建
|
|
1002
1002
|
|
|
@@ -1007,16 +1007,31 @@ Ticket worktree 状态依次为 `planned → active → review → integrated
|
|
|
1007
1007
|
5. Git fallback 固定 `physical_path = <project-root>/specdev-worktree/<work-item-id>`、`workspace_ref = specdev-worktree/<work-item-id>`,从 `base_sha` 执行 `git worktree add -b <work-item-branch> <physical-path> <base-sha>`。已存在但未与同一记录和 Git 注册匹配的目标路径一律阻塞。
|
|
1008
1008
|
6. 分支使用 `speculo/<change>/<work-item-id>`;现有分支未能匹配记录时停止。
|
|
1009
1009
|
7. 安装项目所需依赖,运行最小基线检查。E2E 不属于 implementation owner 的创建基线。
|
|
1010
|
-
8. Ticket 将记录写入 `worktrees
|
|
1010
|
+
8. Ticket 将记录写入 `worktrees`;`owner` 保持 implementation owner 的兼容含义:
|
|
1011
1011
|
|
|
1012
1012
|
```json
|
|
1013
1013
|
{
|
|
1014
1014
|
"ticket_id": "T-01",
|
|
1015
1015
|
"owner": "<implementation-owner>",
|
|
1016
|
+
"integration_owner": "<integration-owner>",
|
|
1016
1017
|
"provider": "git",
|
|
1017
1018
|
"base_sha": "<sha>",
|
|
1019
|
+
"parent_branch": "<parent-branch>",
|
|
1018
1020
|
"branch": "speculo/<change>/T-01",
|
|
1019
1021
|
"workspace_ref": "specdev-worktree/T-01",
|
|
1022
|
+
"terminal_action": "integrate",
|
|
1023
|
+
"source_checkpoint": null,
|
|
1024
|
+
"integration": {
|
|
1025
|
+
"status": "pending",
|
|
1026
|
+
"parent_before_sha": null,
|
|
1027
|
+
"source_sha": null,
|
|
1028
|
+
"result_sha": null,
|
|
1029
|
+
"method": null,
|
|
1030
|
+
"conflict_paths": [],
|
|
1031
|
+
"verification": "pending",
|
|
1032
|
+
"evidence": "specdev/changes/{change}/evidence/T-01.md",
|
|
1033
|
+
"attempts": 0
|
|
1034
|
+
},
|
|
1020
1035
|
"status": "active",
|
|
1021
1036
|
"updated_at": "<ISO-8601>"
|
|
1022
1037
|
}
|
|
@@ -1024,7 +1039,7 @@ Ticket worktree 状态依次为 `planned → active → review → integrated
|
|
|
1024
1039
|
|
|
1025
1040
|
native/external provider 将示例中的 provider 与 `workspace_ref` 换为对应可迁移 locator,不套用 Git 物理路径。原型不使用本 JSON 结构,只在 record 的 Run and Assets 中记录源码 branch/commit,并在 frontmatter 写入 `workspace_ref` 与清理状态。
|
|
1026
1041
|
|
|
1027
|
-
|
|
1042
|
+
`terminal_action=integrate` 不替代来源实现提交授权;进入 `review` 前必须把已获授权的最终 commit 写为 `source_checkpoint`。完成条件:工作区可定位、基线可用、调用方记录与实际 provider、分支和 checkpoint 一致;Git provider 的引用与工作项 ID 完全一致。失败时在调用方拥有的记录中设为 `blocked` 并保留现场。
|
|
1028
1043
|
|
|
1029
1044
|
</dev-worktree-create>
|
|
1030
1045
|
|
|
@@ -1036,10 +1051,17 @@ native/external provider 将示例中的 provider 与 `workspace_ref` 换为对
|
|
|
1036
1051
|
|
|
1037
1052
|
仅生产 Ticket 进入本段;一次性原型不得合入生产分支。
|
|
1038
1053
|
|
|
1039
|
-
1.
|
|
1040
|
-
2.
|
|
1041
|
-
3.
|
|
1042
|
-
4.
|
|
1054
|
+
1. integration owner 确认记录为 `review`、`terminal_action=integrate`,读取 implementation owner 的 Evidence,并验证实际修改未越过 writable/shared owner 合同。`source_checkpoint` 必须是不可变 commit,且与记录 branch 当前 tip 一致、从 `base_sha` 可达。
|
|
1055
|
+
2. 确认目标 checkout 正位于 `parent_branch`、index 与项目 working tree 干净,并把当前 HEAD 固定为 `parent_before_sha`。目标不干净、父分支不匹配、其他记录已在同一父分支 `integrating` 或 HEAD 在集成期间变化时停止,不覆盖用户工作。
|
|
1056
|
+
3. 将记录原子更新为 `integrating`,设置 `integration.status=running`、`parent_before_sha`、`source_sha` 并递增 `attempts`。中断恢复时先核对记录、Git `MERGE_HEAD` 和当前 HEAD,不重复开始第二次集成。
|
|
1057
|
+
4. 恢复已有 `integrating` 记录时只进入一个分支:HEAD 仍等于 `parent_before_sha` 且没有 `MERGE_HEAD` 时恢复同一次尝试;HEAD 已等于 `source_checkpoint`、没有 `MERGE_HEAD` 且 `parent_before_sha` 可达来源时,将其视为已完成但尚未落状态的 fast-forward;`MERGE_HEAD` 等于 `source_checkpoint` 时恢复未完成 merge。其他 HEAD、来源或 merge 状态漂移一律设为 `blocked`,不修改 Git 现场。
|
|
1058
|
+
5. 若 `parent_before_sha` 是 `source_checkpoint` 的祖先,先在来源 workspace 运行 Ticket 定向验证、受影响回归、项目 typecheck/lint/build 和适用最小 E2E,再从目标 checkout 执行 `git merge --ff-only <source_checkpoint>`。重读目标 HEAD、tree 和 Evidence,确认 HEAD 精确等于 `source_checkpoint` 后,记录 `method=fast-forward`、`result_sha=source_checkpoint`、空 `conflict_paths`、验证命令与结果、`verification=passed`、Evidence 和 `integration.status=passed`,再把 worktree 状态更新为 `integrated`。这是 fast-forward 的终态,不继续执行 merge-commit 步骤。
|
|
1059
|
+
6. 若双方已分叉,从干净目标 checkout 执行 `git merge --no-ff --no-commit <source_checkpoint>`。出现冲突时加载 下方 `<merge-conflict-protocol>` 标签,并将本记录作为持久授权来源;不为 `git add`、继续 merge 或集成提交重复请求确认。
|
|
1060
|
+
7. 在未提交的合并结果上运行 Ticket 定向验证、受影响回归、项目 typecheck/lint/build 和适用最小 E2E。可由既有意图机械修正的失败最多处理 3 轮;不得放宽断言、删除检查或引入未批准行为。
|
|
1061
|
+
8. 验证通过后完成一次集成专用 merge commit,重读 HEAD、parents、tree、diff 和 Evidence,确认父分支为第一 parent、`source_checkpoint` 为第二 parent,记录 `method=merge-commit`、`result_sha`、conflict paths、`verification=passed`、Evidence 与 `integration.status=passed`,再把 worktree 状态更新为 `integrated`。
|
|
1062
|
+
9. 冲突需要新产品/架构/安全/迁移决定、修改越过授权路径、验证无法通过、目标状态漂移或提交 hook 无法安全完成时,执行 `git merge --abort`(仅限本流程从干净目标开始的 merge),设置 worktree 与 integration 为 `blocked`,记录最小失败、已通过行为和恢复条件,并保留来源 worktree。
|
|
1063
|
+
|
|
1064
|
+
Fast-forward 路径的 `result_sha` 等于 `source_checkpoint`;merge-commit 路径必须保持父分支为第一 parent、来源 checkpoint 为第二 parent。任何成功结果都必须能从记录和 Evidence 复核。
|
|
1043
1065
|
|
|
1044
1066
|
## 清理
|
|
1045
1067
|
|
|
@@ -1047,10 +1069,36 @@ native/external provider 将示例中的 provider 与 `workspace_ref` 换为对
|
|
|
1047
1069
|
2. Git provider 从 project root 解析 `specdev-worktree/<work-item-id>`,重验无路径逃逸且与 `git worktree list --porcelain` 的记录一致,再从主工作树移除;native/external 通过对应 provider 管理入口移除。
|
|
1048
1070
|
3. 确认 worktree 不再注册且工作项目录不存在后删除对应分支。Ticket 将状态更新为 `removed`;原型把 `cleanup_status` 更新为 `clean`。保留项目根 `specdev-worktree/` 统一目录及 `.gitignore` 条目。
|
|
1049
1071
|
|
|
1050
|
-
PR 或暂缓集成时保留 worktree
|
|
1072
|
+
PR、`terminal_action=retain` 或暂缓集成时保留 worktree。成功集成也不自动清理。清理失败时停止;仅在用户明确要求时使用强制删除。
|
|
1051
1073
|
|
|
1052
1074
|
</dev-worktree-finalize>
|
|
1053
1075
|
|
|
1076
|
+
<merge-conflict-protocol>
|
|
1077
|
+
|
|
1078
|
+
# Merge / Rebase Conflict Protocol
|
|
1079
|
+
|
|
1080
|
+
只在 `git status` 证明仓库正处于 merge 或 rebase 冲突时加载。普通集成设计冲突继续按 deviation/upstream owner 处理。
|
|
1081
|
+
|
|
1082
|
+
## 流程
|
|
1083
|
+
|
|
1084
|
+
1. 读取 Git 状态、操作类型、冲突文件、base/ours/theirs commit、当前 Ticket/Evidence,以及是否存在匹配的 `terminal_action=integrate` worktree 记录。
|
|
1085
|
+
2. 追溯双方意图:commit message、冻结的 source、Spec、Ticket、ADR、测试和调用者。二者缺失时不凭代码表面猜测产品行为。
|
|
1086
|
+
3. 逐 conflict hunk 写出双方意图、共同约束和建议结果。只合并既有意图;需要发明新行为或改变上层合同则停止并登记 deviation。
|
|
1087
|
+
4. 在获授权可写范围内解决文本,运行受影响测试、typecheck、lint 和项目要求的验证。能从既有权威唯一推导的冲突直接处理,不把“发生冲突”本身升级为人工确认。
|
|
1088
|
+
5. 若当前 merge 来自匹配记录的本地集成,`terminal_action=integrate` 已授权 `git add`、继续 merge 和一次集成专用 commit;验证通过后直接完成,不逐动作请求确认。其他 merge/rebase 仍分别取得 Git 副作用授权;没有授权时保存分析、剩余文件和精确恢复命令。
|
|
1089
|
+
6. 需要发明新产品行为、改变 Spec/ADR、安全/迁移决定、越过路径 owner 或无法保持双方既有意图时停止;由从干净目标开始的自动集成执行 `git merge --abort`,记录 blocker 并保留来源 worktree。普通冲突现场不擅自 abort。
|
|
1090
|
+
7. 重读 Git 状态、parents 和 diff,确认无 marker、无未声明路径、双方要求及测试仍成立。
|
|
1091
|
+
|
|
1092
|
+
## 完成标准
|
|
1093
|
+
|
|
1094
|
+
- 每个 hunk 的结果可追溯到双方意图;
|
|
1095
|
+
- 新产品决定没有藏在冲突解决中;
|
|
1096
|
+
- 项目验证有命令、退出码和关键输出;
|
|
1097
|
+
- Git 副作用来自逐动作授权,或来自可核对 worktree 记录中的持久本地集成授权;
|
|
1098
|
+
- 完成或暂停状态可以从 Evidence 和 Git 状态恢复。
|
|
1099
|
+
|
|
1100
|
+
</merge-conflict-protocol>
|
|
1101
|
+
|
|
1054
1102
|
<config-template>
|
|
1055
1103
|
|
|
1056
1104
|
```json
|
|
@@ -1388,6 +1436,10 @@ PR 或暂缓集成时保留 worktree。清理失败时停止;仅在用户明
|
|
|
1388
1436
|
"type": "string",
|
|
1389
1437
|
"minLength": 1
|
|
1390
1438
|
},
|
|
1439
|
+
"integration_owner": {
|
|
1440
|
+
"type": "string",
|
|
1441
|
+
"minLength": 1
|
|
1442
|
+
},
|
|
1391
1443
|
"provider": {
|
|
1392
1444
|
"enum": [
|
|
1393
1445
|
"native",
|
|
@@ -1399,6 +1451,10 @@ PR 或暂缓集成时保留 worktree。清理失败时停止;仅在用户明
|
|
|
1399
1451
|
"type": "string",
|
|
1400
1452
|
"minLength": 1
|
|
1401
1453
|
},
|
|
1454
|
+
"parent_branch": {
|
|
1455
|
+
"type": "string",
|
|
1456
|
+
"minLength": 1
|
|
1457
|
+
},
|
|
1402
1458
|
"branch": {
|
|
1403
1459
|
"type": "string",
|
|
1404
1460
|
"minLength": 1
|
|
@@ -1408,11 +1464,76 @@ PR 或暂缓集成时保留 worktree。清理失败时停止;仅在用户明
|
|
|
1408
1464
|
"minLength": 1,
|
|
1409
1465
|
"pattern": "^(?!/)(?![A-Za-z]:[\\\\/]).+"
|
|
1410
1466
|
},
|
|
1467
|
+
"terminal_action": {
|
|
1468
|
+
"enum": [
|
|
1469
|
+
"integrate",
|
|
1470
|
+
"retain"
|
|
1471
|
+
]
|
|
1472
|
+
},
|
|
1473
|
+
"source_checkpoint": {
|
|
1474
|
+
"type": [
|
|
1475
|
+
"string",
|
|
1476
|
+
"null"
|
|
1477
|
+
]
|
|
1478
|
+
},
|
|
1479
|
+
"integration": {
|
|
1480
|
+
"type": "object",
|
|
1481
|
+
"required": [
|
|
1482
|
+
"status",
|
|
1483
|
+
"parent_before_sha",
|
|
1484
|
+
"source_sha",
|
|
1485
|
+
"result_sha",
|
|
1486
|
+
"method",
|
|
1487
|
+
"conflict_paths",
|
|
1488
|
+
"verification",
|
|
1489
|
+
"evidence",
|
|
1490
|
+
"attempts"
|
|
1491
|
+
],
|
|
1492
|
+
"properties": {
|
|
1493
|
+
"status": {
|
|
1494
|
+
"enum": [
|
|
1495
|
+
"pending",
|
|
1496
|
+
"running",
|
|
1497
|
+
"passed",
|
|
1498
|
+
"blocked"
|
|
1499
|
+
]
|
|
1500
|
+
},
|
|
1501
|
+
"parent_before_sha": {
|
|
1502
|
+
"type": ["string", "null"]
|
|
1503
|
+
},
|
|
1504
|
+
"source_sha": {
|
|
1505
|
+
"type": ["string", "null"]
|
|
1506
|
+
},
|
|
1507
|
+
"result_sha": {
|
|
1508
|
+
"type": ["string", "null"]
|
|
1509
|
+
},
|
|
1510
|
+
"method": {
|
|
1511
|
+
"enum": [null, "fast-forward", "merge-commit"]
|
|
1512
|
+
},
|
|
1513
|
+
"conflict_paths": {
|
|
1514
|
+
"type": "array",
|
|
1515
|
+
"items": {"type": "string"}
|
|
1516
|
+
},
|
|
1517
|
+
"verification": {
|
|
1518
|
+
"enum": ["pending", "passed", "failed"]
|
|
1519
|
+
},
|
|
1520
|
+
"evidence": {
|
|
1521
|
+
"type": "string",
|
|
1522
|
+
"pattern": "^\\{roots\\.state\\}/specdev/changes/[^<]+/evidence/T-[0-9]{2,}\\.md$"
|
|
1523
|
+
},
|
|
1524
|
+
"attempts": {
|
|
1525
|
+
"type": "integer",
|
|
1526
|
+
"minimum": 0
|
|
1527
|
+
}
|
|
1528
|
+
},
|
|
1529
|
+
"additionalProperties": true
|
|
1530
|
+
},
|
|
1411
1531
|
"status": {
|
|
1412
1532
|
"enum": [
|
|
1413
1533
|
"planned",
|
|
1414
1534
|
"active",
|
|
1415
1535
|
"review",
|
|
1536
|
+
"integrating",
|
|
1416
1537
|
"integrated",
|
|
1417
1538
|
"removed",
|
|
1418
1539
|
"blocked"
|
|
@@ -1423,6 +1544,111 @@ PR 或暂缓集成时保留 worktree。清理失败时停止;仅在用户明
|
|
|
1423
1544
|
"minLength": 1
|
|
1424
1545
|
}
|
|
1425
1546
|
},
|
|
1547
|
+
"dependentRequired": {
|
|
1548
|
+
"terminal_action": [
|
|
1549
|
+
"integration_owner",
|
|
1550
|
+
"parent_branch",
|
|
1551
|
+
"source_checkpoint",
|
|
1552
|
+
"integration"
|
|
1553
|
+
]
|
|
1554
|
+
},
|
|
1555
|
+
"allOf": [
|
|
1556
|
+
{
|
|
1557
|
+
"if": {
|
|
1558
|
+
"properties": {
|
|
1559
|
+
"status": {"const": "integrating"}
|
|
1560
|
+
},
|
|
1561
|
+
"required": ["status"]
|
|
1562
|
+
},
|
|
1563
|
+
"then": {
|
|
1564
|
+
"required": [
|
|
1565
|
+
"terminal_action",
|
|
1566
|
+
"integration_owner",
|
|
1567
|
+
"parent_branch",
|
|
1568
|
+
"source_checkpoint",
|
|
1569
|
+
"integration"
|
|
1570
|
+
],
|
|
1571
|
+
"properties": {
|
|
1572
|
+
"terminal_action": {"const": "integrate"}
|
|
1573
|
+
}
|
|
1574
|
+
}
|
|
1575
|
+
},
|
|
1576
|
+
{
|
|
1577
|
+
"if": {
|
|
1578
|
+
"properties": {
|
|
1579
|
+
"status": {"enum": ["integrating", "integrated"]},
|
|
1580
|
+
"terminal_action": {"const": "integrate"}
|
|
1581
|
+
},
|
|
1582
|
+
"required": ["status", "terminal_action"]
|
|
1583
|
+
},
|
|
1584
|
+
"then": {
|
|
1585
|
+
"properties": {
|
|
1586
|
+
"source_checkpoint": {"type": "string", "minLength": 1},
|
|
1587
|
+
"integration": {
|
|
1588
|
+
"properties": {
|
|
1589
|
+
"parent_before_sha": {"type": "string", "minLength": 1},
|
|
1590
|
+
"source_sha": {"type": "string", "minLength": 1},
|
|
1591
|
+
"attempts": {"type": "integer", "minimum": 1}
|
|
1592
|
+
}
|
|
1593
|
+
}
|
|
1594
|
+
}
|
|
1595
|
+
}
|
|
1596
|
+
},
|
|
1597
|
+
{
|
|
1598
|
+
"if": {
|
|
1599
|
+
"properties": {
|
|
1600
|
+
"status": {"const": "integrating"},
|
|
1601
|
+
"terminal_action": {"const": "integrate"}
|
|
1602
|
+
},
|
|
1603
|
+
"required": ["status", "terminal_action"]
|
|
1604
|
+
},
|
|
1605
|
+
"then": {
|
|
1606
|
+
"properties": {
|
|
1607
|
+
"integration": {
|
|
1608
|
+
"properties": {
|
|
1609
|
+
"status": {"const": "running"}
|
|
1610
|
+
}
|
|
1611
|
+
}
|
|
1612
|
+
}
|
|
1613
|
+
}
|
|
1614
|
+
},
|
|
1615
|
+
{
|
|
1616
|
+
"if": {
|
|
1617
|
+
"properties": {
|
|
1618
|
+
"status": {"const": "integrated"},
|
|
1619
|
+
"terminal_action": {"const": "integrate"}
|
|
1620
|
+
},
|
|
1621
|
+
"required": ["status", "terminal_action"]
|
|
1622
|
+
},
|
|
1623
|
+
"then": {
|
|
1624
|
+
"properties": {
|
|
1625
|
+
"integration": {
|
|
1626
|
+
"properties": {
|
|
1627
|
+
"status": {"const": "passed"},
|
|
1628
|
+
"result_sha": {"type": "string", "minLength": 1},
|
|
1629
|
+
"method": {"enum": ["fast-forward", "merge-commit"]},
|
|
1630
|
+
"verification": {"const": "passed"}
|
|
1631
|
+
}
|
|
1632
|
+
}
|
|
1633
|
+
}
|
|
1634
|
+
}
|
|
1635
|
+
},
|
|
1636
|
+
{
|
|
1637
|
+
"if": {
|
|
1638
|
+
"properties": {
|
|
1639
|
+
"terminal_action": {"const": "retain"}
|
|
1640
|
+
},
|
|
1641
|
+
"required": ["terminal_action"]
|
|
1642
|
+
},
|
|
1643
|
+
"then": {
|
|
1644
|
+
"properties": {
|
|
1645
|
+
"status": {
|
|
1646
|
+
"not": {"enum": ["integrating", "integrated"]}
|
|
1647
|
+
}
|
|
1648
|
+
}
|
|
1649
|
+
}
|
|
1650
|
+
}
|
|
1651
|
+
],
|
|
1426
1652
|
"additionalProperties": true
|
|
1427
1653
|
}
|
|
1428
1654
|
}
|
|
@@ -657,6 +657,10 @@ resolution: answered
|
|
|
657
657
|
"type": "string",
|
|
658
658
|
"minLength": 1
|
|
659
659
|
},
|
|
660
|
+
"integration_owner": {
|
|
661
|
+
"type": "string",
|
|
662
|
+
"minLength": 1
|
|
663
|
+
},
|
|
660
664
|
"provider": {
|
|
661
665
|
"enum": [
|
|
662
666
|
"native",
|
|
@@ -668,6 +672,10 @@ resolution: answered
|
|
|
668
672
|
"type": "string",
|
|
669
673
|
"minLength": 1
|
|
670
674
|
},
|
|
675
|
+
"parent_branch": {
|
|
676
|
+
"type": "string",
|
|
677
|
+
"minLength": 1
|
|
678
|
+
},
|
|
671
679
|
"branch": {
|
|
672
680
|
"type": "string",
|
|
673
681
|
"minLength": 1
|
|
@@ -677,11 +685,76 @@ resolution: answered
|
|
|
677
685
|
"minLength": 1,
|
|
678
686
|
"pattern": "^(?!/)(?![A-Za-z]:[\\\\/]).+"
|
|
679
687
|
},
|
|
688
|
+
"terminal_action": {
|
|
689
|
+
"enum": [
|
|
690
|
+
"integrate",
|
|
691
|
+
"retain"
|
|
692
|
+
]
|
|
693
|
+
},
|
|
694
|
+
"source_checkpoint": {
|
|
695
|
+
"type": [
|
|
696
|
+
"string",
|
|
697
|
+
"null"
|
|
698
|
+
]
|
|
699
|
+
},
|
|
700
|
+
"integration": {
|
|
701
|
+
"type": "object",
|
|
702
|
+
"required": [
|
|
703
|
+
"status",
|
|
704
|
+
"parent_before_sha",
|
|
705
|
+
"source_sha",
|
|
706
|
+
"result_sha",
|
|
707
|
+
"method",
|
|
708
|
+
"conflict_paths",
|
|
709
|
+
"verification",
|
|
710
|
+
"evidence",
|
|
711
|
+
"attempts"
|
|
712
|
+
],
|
|
713
|
+
"properties": {
|
|
714
|
+
"status": {
|
|
715
|
+
"enum": [
|
|
716
|
+
"pending",
|
|
717
|
+
"running",
|
|
718
|
+
"passed",
|
|
719
|
+
"blocked"
|
|
720
|
+
]
|
|
721
|
+
},
|
|
722
|
+
"parent_before_sha": {
|
|
723
|
+
"type": ["string", "null"]
|
|
724
|
+
},
|
|
725
|
+
"source_sha": {
|
|
726
|
+
"type": ["string", "null"]
|
|
727
|
+
},
|
|
728
|
+
"result_sha": {
|
|
729
|
+
"type": ["string", "null"]
|
|
730
|
+
},
|
|
731
|
+
"method": {
|
|
732
|
+
"enum": [null, "fast-forward", "merge-commit"]
|
|
733
|
+
},
|
|
734
|
+
"conflict_paths": {
|
|
735
|
+
"type": "array",
|
|
736
|
+
"items": {"type": "string"}
|
|
737
|
+
},
|
|
738
|
+
"verification": {
|
|
739
|
+
"enum": ["pending", "passed", "failed"]
|
|
740
|
+
},
|
|
741
|
+
"evidence": {
|
|
742
|
+
"type": "string",
|
|
743
|
+
"pattern": "^\\{roots\\.state\\}/specdev/changes/[^<]+/evidence/T-[0-9]{2,}\\.md$"
|
|
744
|
+
},
|
|
745
|
+
"attempts": {
|
|
746
|
+
"type": "integer",
|
|
747
|
+
"minimum": 0
|
|
748
|
+
}
|
|
749
|
+
},
|
|
750
|
+
"additionalProperties": true
|
|
751
|
+
},
|
|
680
752
|
"status": {
|
|
681
753
|
"enum": [
|
|
682
754
|
"planned",
|
|
683
755
|
"active",
|
|
684
756
|
"review",
|
|
757
|
+
"integrating",
|
|
685
758
|
"integrated",
|
|
686
759
|
"removed",
|
|
687
760
|
"blocked"
|
|
@@ -692,6 +765,111 @@ resolution: answered
|
|
|
692
765
|
"minLength": 1
|
|
693
766
|
}
|
|
694
767
|
},
|
|
768
|
+
"dependentRequired": {
|
|
769
|
+
"terminal_action": [
|
|
770
|
+
"integration_owner",
|
|
771
|
+
"parent_branch",
|
|
772
|
+
"source_checkpoint",
|
|
773
|
+
"integration"
|
|
774
|
+
]
|
|
775
|
+
},
|
|
776
|
+
"allOf": [
|
|
777
|
+
{
|
|
778
|
+
"if": {
|
|
779
|
+
"properties": {
|
|
780
|
+
"status": {"const": "integrating"}
|
|
781
|
+
},
|
|
782
|
+
"required": ["status"]
|
|
783
|
+
},
|
|
784
|
+
"then": {
|
|
785
|
+
"required": [
|
|
786
|
+
"terminal_action",
|
|
787
|
+
"integration_owner",
|
|
788
|
+
"parent_branch",
|
|
789
|
+
"source_checkpoint",
|
|
790
|
+
"integration"
|
|
791
|
+
],
|
|
792
|
+
"properties": {
|
|
793
|
+
"terminal_action": {"const": "integrate"}
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
},
|
|
797
|
+
{
|
|
798
|
+
"if": {
|
|
799
|
+
"properties": {
|
|
800
|
+
"status": {"enum": ["integrating", "integrated"]},
|
|
801
|
+
"terminal_action": {"const": "integrate"}
|
|
802
|
+
},
|
|
803
|
+
"required": ["status", "terminal_action"]
|
|
804
|
+
},
|
|
805
|
+
"then": {
|
|
806
|
+
"properties": {
|
|
807
|
+
"source_checkpoint": {"type": "string", "minLength": 1},
|
|
808
|
+
"integration": {
|
|
809
|
+
"properties": {
|
|
810
|
+
"parent_before_sha": {"type": "string", "minLength": 1},
|
|
811
|
+
"source_sha": {"type": "string", "minLength": 1},
|
|
812
|
+
"attempts": {"type": "integer", "minimum": 1}
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
}
|
|
816
|
+
}
|
|
817
|
+
},
|
|
818
|
+
{
|
|
819
|
+
"if": {
|
|
820
|
+
"properties": {
|
|
821
|
+
"status": {"const": "integrating"},
|
|
822
|
+
"terminal_action": {"const": "integrate"}
|
|
823
|
+
},
|
|
824
|
+
"required": ["status", "terminal_action"]
|
|
825
|
+
},
|
|
826
|
+
"then": {
|
|
827
|
+
"properties": {
|
|
828
|
+
"integration": {
|
|
829
|
+
"properties": {
|
|
830
|
+
"status": {"const": "running"}
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
}
|
|
834
|
+
}
|
|
835
|
+
},
|
|
836
|
+
{
|
|
837
|
+
"if": {
|
|
838
|
+
"properties": {
|
|
839
|
+
"status": {"const": "integrated"},
|
|
840
|
+
"terminal_action": {"const": "integrate"}
|
|
841
|
+
},
|
|
842
|
+
"required": ["status", "terminal_action"]
|
|
843
|
+
},
|
|
844
|
+
"then": {
|
|
845
|
+
"properties": {
|
|
846
|
+
"integration": {
|
|
847
|
+
"properties": {
|
|
848
|
+
"status": {"const": "passed"},
|
|
849
|
+
"result_sha": {"type": "string", "minLength": 1},
|
|
850
|
+
"method": {"enum": ["fast-forward", "merge-commit"]},
|
|
851
|
+
"verification": {"const": "passed"}
|
|
852
|
+
}
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
},
|
|
857
|
+
{
|
|
858
|
+
"if": {
|
|
859
|
+
"properties": {
|
|
860
|
+
"terminal_action": {"const": "retain"}
|
|
861
|
+
},
|
|
862
|
+
"required": ["terminal_action"]
|
|
863
|
+
},
|
|
864
|
+
"then": {
|
|
865
|
+
"properties": {
|
|
866
|
+
"status": {
|
|
867
|
+
"not": {"enum": ["integrating", "integrated"]}
|
|
868
|
+
}
|
|
869
|
+
}
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
],
|
|
695
873
|
"additionalProperties": true
|
|
696
874
|
}
|
|
697
875
|
}
|