@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
|
@@ -442,7 +442,7 @@ Change CONTEXT/ADR 是 active change 内的执行权威,不是 workflow 级永
|
|
|
442
442
|
|
|
443
443
|
### Deep
|
|
444
444
|
|
|
445
|
-
任一条件触发:公共 API、schema、wire format、数据迁移、认证授权、隐私、资金、不可逆操作、expand-contract
|
|
445
|
+
任一条件触发:公共 API、schema、wire format、数据迁移、认证授权、隐私、资金、不可逆操作、expand-contract、共享核心路径、多个 implementation owner 的跨 Ticket 写入协调、多个实质架构方案或高事故半径。
|
|
446
446
|
|
|
447
447
|
额外要求:数据流或状态转换、兼容窗口、迁移顺序、可观测性、回滚、风险缓解、收缩条件和人工批准点。
|
|
448
448
|
|
|
@@ -482,61 +482,51 @@ Ticket 只有同时满足以下适用条件才可设置 `ready: true`:
|
|
|
482
482
|
|
|
483
483
|
# 证据与验证规范
|
|
484
484
|
|
|
485
|
-
|
|
485
|
+
验证回答“怎样证明”,Evidence 记录“实际运行了什么、在哪个状态运行、结果和残余风险是什么”。
|
|
486
486
|
|
|
487
487
|
## 1. 验证矩阵
|
|
488
488
|
|
|
489
|
-
|
|
489
|
+
每行绑定行为、合同或风险,并标记环境:
|
|
490
490
|
|
|
491
|
-
| 行为或风险 |
|
|
492
|
-
|
|
493
|
-
|
|
|
494
|
-
|
|
|
495
|
-
|
|
|
491
|
+
| 行为或风险 | 接缝 | 命令/方法 | 环境 | 预期 | Evidence |
|
|
492
|
+
|---|---|---|---|---|---|
|
|
493
|
+
| 正常/失败路径 | 公共接口或稳定接缝 | 定向测试 | source-worktree | 合同成立 | Ticket Evidence |
|
|
494
|
+
| 跨模块回归 | 集成接缝 | 回归命令 | parent-candidate | 组合状态成立 | Ticket Evidence |
|
|
495
|
+
| E2E required | 真实端到端边界 | 场景步骤 | parent-candidate | 外部行为成立 | Ticket Evidence |
|
|
496
|
+
|
|
497
|
+
## 2. 两层验证
|
|
498
|
+
|
|
499
|
+
### Source-worktree
|
|
496
500
|
|
|
497
|
-
|
|
501
|
+
implementation owner 运行最接近目标行为的单元/组件测试、静态分析、类型、lint/build 等适用非 E2E 检查。来源实现必须在 clean worktree 形成 commit。任何 source-worktree E2E pass 声明无效。
|
|
498
502
|
|
|
499
|
-
|
|
503
|
+
### Parent-candidate
|
|
500
504
|
|
|
501
|
-
|
|
505
|
+
Lead 在最新父分支与 source commit 的 candidate 状态运行受影响集成/回归、项目父状态检查和适用 E2E。E2E 由实际跨边界风险决定,不限于 UI;not-required 必须写理由。required E2E 未运行或失败时不得推进父分支。
|
|
502
506
|
|
|
503
|
-
|
|
504
|
-
2. 稳定接缝上的单元测试;
|
|
505
|
-
3. 类型检查、静态分析、lint 和构建;
|
|
506
|
-
4. 可重复手动步骤、截图或查询结果;
|
|
507
|
-
5. 代码阅读推断。
|
|
507
|
+
### Direct Spec
|
|
508
508
|
|
|
509
|
-
|
|
509
|
+
获批 Direct Spec 不创建 Ticket worktree 或 candidate。Lead 在 current workspace 记录实施前基线,运行轻量合同要求的定向检查、适用回归与 E2E,并记录最终 checkpoint、dirty 状态、运行环境、命令、退出状态和未运行原因。E2E 仍只由 Lead 执行;不得为套用两层验证而伪造 Ticket、source/candidate/result 或父分支推进证据。
|
|
510
510
|
|
|
511
|
-
|
|
511
|
+
低层证据不能替代明确要求的外部行为证据。高风险迁移还需要 dry-run、调用点扫描、数据核对、监控或恢复演练。
|
|
512
512
|
|
|
513
|
-
## 3.
|
|
513
|
+
## 3. Agent 声明
|
|
514
514
|
|
|
515
|
-
|
|
515
|
+
subagent 只返回候选命令与结果,不写 Evidence。Lead 重读 workspace/Git、必要时复跑或核对输出后落盘;外部 provider 自报、截图、模拟和推断在此之前标记 `unverified`。review/research/test-observation agent 不拥有 E2E Gate。
|
|
516
516
|
|
|
517
|
-
|
|
518
|
-
- 基线已存在的失败;
|
|
519
|
-
- 环境、权限或基础设施失败;
|
|
520
|
-
- 验证本身无效或无法观察目标行为。
|
|
517
|
+
## 4. 失败分类与完整性
|
|
521
518
|
|
|
522
|
-
|
|
519
|
+
失败分类为本 Ticket 新失败、基线既有失败、环境/权限/基础设施失败、无效验证或 candidate stale。不得通过跳过、放宽断言、吞错、删除用例或迁移验证位置制造绿色。
|
|
523
520
|
|
|
524
|
-
|
|
521
|
+
受控反向验证只用于可能静默通过的关键门禁:证明检查能在目标风险出现时失败,再恢复并重跑。普通测试不为形式执行破坏性操作。
|
|
525
522
|
|
|
526
|
-
|
|
523
|
+
## 5. Evidence 最低内容
|
|
527
524
|
|
|
528
|
-
|
|
529
|
-
- 实际修改的项目路径;
|
|
530
|
-
- 每条命令、退出状态和结果摘要;
|
|
531
|
-
- 每条验收合同的证据映射;
|
|
532
|
-
- 未运行项与原因;
|
|
533
|
-
- 新失败、既有失败和环境失败;
|
|
534
|
-
- 偏差及批准;
|
|
535
|
-
- 残余风险;
|
|
536
|
-
- worktree、提交或 PR 引用;
|
|
537
|
-
- 最终结论。
|
|
525
|
+
每个 Ticket Evidence 至少包含:Lead、Dispatch/返回(若有)、base/source/candidate/result SHA、来源 worktree、实际路径、每条命令/环境/退出状态、合同映射、双轴审查、E2E disposition、未运行项、失败分类、偏差、残余风险和父分支重读结果。
|
|
538
526
|
|
|
539
|
-
|
|
527
|
+
Ticket Done 必须有 source commit、通过 candidate、父分支 result 与 Lead Evidence。无法运行 required 验证、存在未批准偏差、父分支未包含 source commit 或 Evidence 不完整时不得 Done。
|
|
528
|
+
|
|
529
|
+
Direct Spec Evidence 至少包含:用户批准与轻量合同、Lead、实施前/最终 checkpoint、实际路径、定向/回归/E2E 命令及环境、验收映射、未运行项、偏差、残余风险和提交授权状态。
|
|
540
530
|
|
|
541
531
|
</evidence-and-verification>
|
|
542
532
|
|
|
@@ -584,7 +574,7 @@ E2E 仅在变更影响用户界面交互时加入验证矩阵。普通执行由
|
|
|
584
574
|
|
|
585
575
|
- 未批准的 ticket、spec、architecture 或 release 偏差不得继续实现。
|
|
586
576
|
- 不得通过扩大 `writable_paths`、删除测试、降低断言或把风险改写成“已知限制”来绕过停止。
|
|
587
|
-
-
|
|
577
|
+
- 偏差影响并行执行、source checkpoint 或 candidate 集成时,Lead 必须暂停受影响 Wave,重新计算路径所有权、依赖、Gate 与父分支顺序;任何 subagent 都不能自行改写上层合同。
|
|
588
578
|
|
|
589
579
|
</deviation-control>
|
|
590
580
|
|
|
@@ -647,16 +637,14 @@ E2E 仅在变更影响用户界面交互时加入验证矩阵。普通执行由
|
|
|
647
637
|
|
|
648
638
|
```json
|
|
649
639
|
{
|
|
650
|
-
"schema_version":
|
|
640
|
+
"schema_version": 4,
|
|
651
641
|
"interaction_language": "zh-CN",
|
|
652
642
|
"artifact_language": "zh-CN",
|
|
653
643
|
"git": {
|
|
654
|
-
"
|
|
655
|
-
"default_branch": null,
|
|
656
|
-
"worktree_for_parallel": true
|
|
644
|
+
"default_branch": null
|
|
657
645
|
},
|
|
658
646
|
"execution": {
|
|
659
|
-
"
|
|
647
|
+
"max_implementation_agents": 3,
|
|
660
648
|
"deep_ticket_human_approval": true,
|
|
661
649
|
"shared_path_owner": "explicit"
|
|
662
650
|
},
|
|
@@ -681,33 +669,31 @@ E2E 仅在变更影响用户界面交互时加入验证矩阵。普通执行由
|
|
|
681
669
|
```json
|
|
682
670
|
{
|
|
683
671
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
684
|
-
"$id": "urn:speculo:specdev:config:
|
|
672
|
+
"$id": "urn:speculo:specdev:config:v4",
|
|
685
673
|
"title": "SpecDev Configuration",
|
|
686
674
|
"type": "object",
|
|
687
675
|
"required": ["schema_version", "interaction_language", "artifact_language", "git", "execution", "verification", "planning"],
|
|
688
676
|
"properties": {
|
|
689
|
-
"schema_version": {"const":
|
|
677
|
+
"schema_version": {"const": 4},
|
|
690
678
|
"interaction_language": {"type": "string", "minLength": 1},
|
|
691
679
|
"artifact_language": {"type": "string", "minLength": 1},
|
|
692
680
|
"git": {
|
|
693
681
|
"type": "object",
|
|
694
|
-
"required": ["
|
|
682
|
+
"required": ["default_branch"],
|
|
695
683
|
"properties": {
|
|
696
|
-
"
|
|
697
|
-
"default_branch": {"type": ["string", "null"]},
|
|
698
|
-
"worktree_for_parallel": {"type": "boolean"}
|
|
684
|
+
"default_branch": {"type": ["string", "null"]}
|
|
699
685
|
},
|
|
700
|
-
"additionalProperties":
|
|
686
|
+
"additionalProperties": false
|
|
701
687
|
},
|
|
702
688
|
"execution": {
|
|
703
689
|
"type": "object",
|
|
704
|
-
"required": ["
|
|
690
|
+
"required": ["max_implementation_agents", "deep_ticket_human_approval", "shared_path_owner"],
|
|
705
691
|
"properties": {
|
|
706
|
-
"
|
|
692
|
+
"max_implementation_agents": {"type": "integer", "minimum": 1, "maximum": 3},
|
|
707
693
|
"deep_ticket_human_approval": {"type": "boolean"},
|
|
708
694
|
"shared_path_owner": {"type": "string", "minLength": 1}
|
|
709
695
|
},
|
|
710
|
-
"additionalProperties":
|
|
696
|
+
"additionalProperties": false
|
|
711
697
|
},
|
|
712
698
|
"verification": {
|
|
713
699
|
"type": "object",
|
|
@@ -731,7 +717,7 @@ E2E 仅在变更影响用户界面交互时加入验证矩阵。普通执行由
|
|
|
731
717
|
"additionalProperties": true
|
|
732
718
|
}
|
|
733
719
|
},
|
|
734
|
-
"additionalProperties":
|
|
720
|
+
"additionalProperties": false
|
|
735
721
|
}
|
|
736
722
|
```
|
|
737
723
|
|
|
@@ -741,7 +727,7 @@ E2E 仅在变更影响用户界面交互时加入验证矩阵。普通执行由
|
|
|
741
727
|
|
|
742
728
|
```json
|
|
743
729
|
{
|
|
744
|
-
"schema_version":
|
|
730
|
+
"schema_version": 5,
|
|
745
731
|
"workflow": "specdev",
|
|
746
732
|
"active": [],
|
|
747
733
|
"archived": []
|
|
@@ -755,83 +741,27 @@ E2E 仅在变更影响用户界面交互时加入验证矩阵。普通执行由
|
|
|
755
741
|
```json
|
|
756
742
|
{
|
|
757
743
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
758
|
-
"$id": "urn:speculo:specdev:status:
|
|
744
|
+
"$id": "urn:speculo:specdev:status:v5",
|
|
759
745
|
"title": "SpecDev Global Status",
|
|
760
746
|
"type": "object",
|
|
761
|
-
"required": [
|
|
762
|
-
"schema_version",
|
|
763
|
-
"workflow",
|
|
764
|
-
"active",
|
|
765
|
-
"archived"
|
|
766
|
-
],
|
|
747
|
+
"required": ["schema_version", "workflow", "active", "archived"],
|
|
767
748
|
"properties": {
|
|
768
|
-
"schema_version": {
|
|
769
|
-
|
|
770
|
-
},
|
|
771
|
-
"workflow": {
|
|
772
|
-
"const": "specdev"
|
|
773
|
-
},
|
|
749
|
+
"schema_version": {"const": 5},
|
|
750
|
+
"workflow": {"const": "specdev"},
|
|
774
751
|
"active": {
|
|
775
752
|
"type": "array",
|
|
776
753
|
"items": {
|
|
777
754
|
"type": "object",
|
|
778
|
-
"required": [
|
|
779
|
-
"change",
|
|
780
|
-
"current_work",
|
|
781
|
-
"works_run"
|
|
782
|
-
],
|
|
755
|
+
"required": ["change"],
|
|
783
756
|
"properties": {
|
|
784
757
|
"change": {
|
|
785
758
|
"type": "string",
|
|
786
759
|
"pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}-[a-z0-9]+(?:-[a-z0-9]+)*$"
|
|
787
|
-
},
|
|
788
|
-
"current_work": {
|
|
789
|
-
"type": [
|
|
790
|
-
"string",
|
|
791
|
-
"null"
|
|
792
|
-
],
|
|
793
|
-
"pattern": "^specdev/"
|
|
794
|
-
},
|
|
795
|
-
"works_run": {
|
|
796
|
-
"type": "array",
|
|
797
|
-
"items": {
|
|
798
|
-
"type": "string",
|
|
799
|
-
"pattern": "^specdev/"
|
|
800
|
-
},
|
|
801
|
-
"uniqueItems": true
|
|
802
|
-
},
|
|
803
|
-
"claimed_investigations": {
|
|
804
|
-
"type": "array",
|
|
805
|
-
"items": {
|
|
806
|
-
"type": "object",
|
|
807
|
-
"required": [
|
|
808
|
-
"id",
|
|
809
|
-
"owner",
|
|
810
|
-
"claimed_at"
|
|
811
|
-
],
|
|
812
|
-
"properties": {
|
|
813
|
-
"id": {
|
|
814
|
-
"type": "string"
|
|
815
|
-
},
|
|
816
|
-
"owner": {
|
|
817
|
-
"type": "string"
|
|
818
|
-
},
|
|
819
|
-
"session": {
|
|
820
|
-
"type": [
|
|
821
|
-
"string",
|
|
822
|
-
"null"
|
|
823
|
-
]
|
|
824
|
-
},
|
|
825
|
-
"claimed_at": {
|
|
826
|
-
"type": "string"
|
|
827
|
-
}
|
|
828
|
-
},
|
|
829
|
-
"additionalProperties": false
|
|
830
|
-
}
|
|
831
760
|
}
|
|
832
761
|
},
|
|
833
762
|
"additionalProperties": false
|
|
834
|
-
}
|
|
763
|
+
},
|
|
764
|
+
"uniqueItems": true
|
|
835
765
|
},
|
|
836
766
|
"archived": {
|
|
837
767
|
"type": "array",
|
|
@@ -852,11 +782,24 @@ E2E 仅在变更影响用户界面交互时加入验证矩阵。普通执行由
|
|
|
852
782
|
|
|
853
783
|
```json
|
|
854
784
|
{
|
|
855
|
-
"schema_version":
|
|
785
|
+
"schema_version": 5,
|
|
856
786
|
"artifact": "change-status",
|
|
857
787
|
"change": "<YYYY-MM-DD-topic>",
|
|
858
788
|
"change_status": "active",
|
|
859
789
|
"current_work": null,
|
|
790
|
+
"works_run": [],
|
|
791
|
+
"claimed_investigations": [],
|
|
792
|
+
"execution_authorization": {
|
|
793
|
+
"implementation_commit": {"status": "not-authorized", "source": null, "granted_at": null, "scope": "Ticket source commits"},
|
|
794
|
+
"local_candidate_integration": {"status": "not-authorized", "source": null, "granted_at": null, "scope": "Lead-owned local parent candidate integration and parent update"},
|
|
795
|
+
"source_cleanup": {"status": "not-authorized", "source": null, "granted_at": null, "scope": "Source worktree and branch cleanup"}
|
|
796
|
+
},
|
|
797
|
+
"leadership": {
|
|
798
|
+
"current": "<owner-or-session-locator>",
|
|
799
|
+
"epoch": 1,
|
|
800
|
+
"assigned_at": "<ISO-8601>",
|
|
801
|
+
"history": []
|
|
802
|
+
},
|
|
860
803
|
"created_at": "<ISO-8601>",
|
|
861
804
|
"updated_at": "<ISO-8601>",
|
|
862
805
|
"completed_at": null,
|
|
@@ -875,394 +818,157 @@ E2E 仅在变更影响用户界面交互时加入验证矩阵。普通执行由
|
|
|
875
818
|
```json
|
|
876
819
|
{
|
|
877
820
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
878
|
-
"$id": "urn:speculo:specdev:change-status:
|
|
821
|
+
"$id": "urn:speculo:specdev:change-status:v5",
|
|
879
822
|
"title": "SpecDev Change Status",
|
|
880
823
|
"type": "object",
|
|
881
824
|
"required": [
|
|
882
|
-
"schema_version",
|
|
883
|
-
"
|
|
884
|
-
"
|
|
885
|
-
"change_status",
|
|
886
|
-
"current_work",
|
|
887
|
-
"created_at",
|
|
888
|
-
"updated_at",
|
|
889
|
-
"completed_at",
|
|
890
|
-
"archived",
|
|
891
|
-
"archive_path",
|
|
892
|
-
"blockers",
|
|
893
|
-
"deviations"
|
|
825
|
+
"schema_version", "artifact", "change", "change_status", "current_work", "works_run",
|
|
826
|
+
"claimed_investigations", "execution_authorization", "leadership", "created_at", "updated_at",
|
|
827
|
+
"completed_at", "archived", "archive_path", "blockers", "deviations", "worktrees"
|
|
894
828
|
],
|
|
895
829
|
"properties": {
|
|
896
|
-
"schema_version": {
|
|
897
|
-
|
|
898
|
-
},
|
|
899
|
-
"
|
|
900
|
-
|
|
901
|
-
},
|
|
902
|
-
"
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
},
|
|
906
|
-
"
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
"type": "string",
|
|
926
|
-
"minLength": 1
|
|
830
|
+
"schema_version": {"const": 5},
|
|
831
|
+
"artifact": {"const": "change-status"},
|
|
832
|
+
"change": {"type": "string", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}-[a-z0-9]+(?:-[a-z0-9]+)*$"},
|
|
833
|
+
"change_status": {"enum": ["active", "blocked", "completed", "archived"]},
|
|
834
|
+
"current_work": {"type": ["string", "null"], "pattern": "^specdev/"},
|
|
835
|
+
"works_run": {"type": "array", "items": {"type": "string", "pattern": "^specdev/"}, "uniqueItems": true},
|
|
836
|
+
"claimed_investigations": {"type": "array", "items": {"$ref": "#/$defs/claim"}},
|
|
837
|
+
"execution_authorization": {"$ref": "#/$defs/authorization"},
|
|
838
|
+
"leadership": {"$ref": "#/$defs/leadership"},
|
|
839
|
+
"created_at": {"type": "string", "minLength": 1},
|
|
840
|
+
"updated_at": {"type": "string", "minLength": 1},
|
|
841
|
+
"completed_at": {"type": ["string", "null"]},
|
|
842
|
+
"archived": {"type": "boolean"},
|
|
843
|
+
"archive_path": {"anyOf": [{"type": "null"}, {"type": "string", "pattern": "^specdev/archive/[0-9]{4}-[0-9]{2}/.+/$"}]},
|
|
844
|
+
"blockers": {"type": "array", "items": {"type": "string"}},
|
|
845
|
+
"deviations": {"type": "array", "items": {"type": "string"}},
|
|
846
|
+
"worktrees": {"type": "array", "items": {"$ref": "#/$defs/worktree"}}
|
|
847
|
+
},
|
|
848
|
+
"$defs": {
|
|
849
|
+
"claim": {
|
|
850
|
+
"type": "object",
|
|
851
|
+
"required": ["id", "owner", "session", "claimed_at"],
|
|
852
|
+
"properties": {
|
|
853
|
+
"id": {"type": "string", "minLength": 1},
|
|
854
|
+
"owner": {"type": "string", "minLength": 1},
|
|
855
|
+
"session": {"type": ["string", "null"]},
|
|
856
|
+
"claimed_at": {"type": "string", "minLength": 1}
|
|
857
|
+
},
|
|
858
|
+
"additionalProperties": false
|
|
927
859
|
},
|
|
928
|
-
"
|
|
929
|
-
"type":
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
860
|
+
"authorization-entry": {
|
|
861
|
+
"type": "object",
|
|
862
|
+
"required": ["status", "source", "granted_at", "scope"],
|
|
863
|
+
"properties": {
|
|
864
|
+
"status": {"enum": ["authorized", "not-authorized", "revoked"]},
|
|
865
|
+
"source": {"type": ["string", "null"]},
|
|
866
|
+
"granted_at": {"type": ["string", "null"]},
|
|
867
|
+
"scope": {"type": "string", "minLength": 1}
|
|
868
|
+
},
|
|
869
|
+
"allOf": [{
|
|
870
|
+
"if": {"properties": {"status": {"const": "authorized"}}, "required": ["status"]},
|
|
871
|
+
"then": {"properties": {"source": {"type": "string", "minLength": 1}, "granted_at": {"type": "string", "minLength": 1}}}
|
|
872
|
+
}],
|
|
873
|
+
"additionalProperties": false
|
|
933
874
|
},
|
|
934
|
-
"
|
|
935
|
-
"type": "
|
|
875
|
+
"authorization": {
|
|
876
|
+
"type": "object",
|
|
877
|
+
"required": ["implementation_commit", "local_candidate_integration", "source_cleanup"],
|
|
878
|
+
"properties": {
|
|
879
|
+
"implementation_commit": {"$ref": "#/$defs/authorization-entry"},
|
|
880
|
+
"local_candidate_integration": {"$ref": "#/$defs/authorization-entry"},
|
|
881
|
+
"source_cleanup": {"$ref": "#/$defs/authorization-entry"}
|
|
882
|
+
},
|
|
883
|
+
"additionalProperties": false
|
|
936
884
|
},
|
|
937
|
-
"
|
|
938
|
-
"
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
},
|
|
942
|
-
{
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
885
|
+
"leadership-history": {
|
|
886
|
+
"type": "object",
|
|
887
|
+
"required": ["owner", "epoch", "assigned_at", "ended_at"],
|
|
888
|
+
"properties": {
|
|
889
|
+
"owner": {"type": "string", "minLength": 1},
|
|
890
|
+
"epoch": {"type": "integer", "minimum": 1},
|
|
891
|
+
"assigned_at": {"type": "string", "minLength": 1},
|
|
892
|
+
"ended_at": {"type": "string", "minLength": 1}
|
|
893
|
+
},
|
|
894
|
+
"additionalProperties": false
|
|
947
895
|
},
|
|
948
|
-
"
|
|
949
|
-
"type": "
|
|
950
|
-
"
|
|
951
|
-
|
|
952
|
-
|
|
896
|
+
"leadership": {
|
|
897
|
+
"type": "object",
|
|
898
|
+
"required": ["current", "epoch", "assigned_at", "history"],
|
|
899
|
+
"properties": {
|
|
900
|
+
"current": {"type": "string", "minLength": 1},
|
|
901
|
+
"epoch": {"type": "integer", "minimum": 1},
|
|
902
|
+
"assigned_at": {"type": "string", "minLength": 1},
|
|
903
|
+
"history": {"type": "array", "items": {"$ref": "#/$defs/leadership-history"}}
|
|
904
|
+
},
|
|
905
|
+
"additionalProperties": false
|
|
953
906
|
},
|
|
954
|
-
"
|
|
955
|
-
"type": "
|
|
956
|
-
"
|
|
957
|
-
|
|
958
|
-
|
|
907
|
+
"full-suite": {
|
|
908
|
+
"type": "object",
|
|
909
|
+
"required": ["required", "status", "reason", "evidence"],
|
|
910
|
+
"properties": {
|
|
911
|
+
"required": {"type": "boolean"},
|
|
912
|
+
"status": {"enum": ["not-required", "pending", "passed", "failed"]},
|
|
913
|
+
"reason": {"type": ["string", "null"]},
|
|
914
|
+
"evidence": {"type": ["string", "null"]}
|
|
915
|
+
},
|
|
916
|
+
"allOf": [{
|
|
917
|
+
"if": {"properties": {"required": {"const": false}}, "required": ["required"]},
|
|
918
|
+
"then": {"properties": {"status": {"const": "not-required"}, "reason": {"type": "string", "minLength": 1}}}
|
|
919
|
+
}],
|
|
920
|
+
"additionalProperties": false
|
|
959
921
|
},
|
|
960
|
-
"
|
|
961
|
-
"type": "
|
|
962
|
-
"
|
|
963
|
-
|
|
964
|
-
"
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
],
|
|
974
|
-
"
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
"pattern": "^T-[0-9]{2,}$"
|
|
978
|
-
},
|
|
979
|
-
"owner": {
|
|
980
|
-
"type": "string",
|
|
981
|
-
"minLength": 1
|
|
982
|
-
},
|
|
983
|
-
"integration_owner": {
|
|
984
|
-
"type": "string",
|
|
985
|
-
"minLength": 1
|
|
986
|
-
},
|
|
987
|
-
"provider": {
|
|
988
|
-
"enum": [
|
|
989
|
-
"native",
|
|
990
|
-
"git",
|
|
991
|
-
"external"
|
|
992
|
-
]
|
|
993
|
-
},
|
|
994
|
-
"base_sha": {
|
|
995
|
-
"type": "string",
|
|
996
|
-
"minLength": 1
|
|
997
|
-
},
|
|
998
|
-
"parent_branch": {
|
|
999
|
-
"type": "string",
|
|
1000
|
-
"minLength": 1
|
|
1001
|
-
},
|
|
1002
|
-
"branch": {
|
|
1003
|
-
"type": "string",
|
|
1004
|
-
"minLength": 1
|
|
1005
|
-
},
|
|
1006
|
-
"workspace_ref": {
|
|
1007
|
-
"type": "string",
|
|
1008
|
-
"minLength": 1,
|
|
1009
|
-
"pattern": "^(?!/)(?![A-Za-z]:[\\\\/]).+"
|
|
1010
|
-
},
|
|
1011
|
-
"terminal_action": {
|
|
1012
|
-
"enum": [
|
|
1013
|
-
"integrate",
|
|
1014
|
-
"retain"
|
|
1015
|
-
]
|
|
1016
|
-
},
|
|
1017
|
-
"source_checkpoint": {
|
|
1018
|
-
"type": [
|
|
1019
|
-
"string",
|
|
1020
|
-
"null"
|
|
1021
|
-
]
|
|
1022
|
-
},
|
|
1023
|
-
"integration": {
|
|
1024
|
-
"type": "object",
|
|
1025
|
-
"required": [
|
|
1026
|
-
"status",
|
|
1027
|
-
"parent_before_sha",
|
|
1028
|
-
"source_sha",
|
|
1029
|
-
"result_sha",
|
|
1030
|
-
"method",
|
|
1031
|
-
"conflict_paths",
|
|
1032
|
-
"verification",
|
|
1033
|
-
"evidence",
|
|
1034
|
-
"attempts"
|
|
1035
|
-
],
|
|
1036
|
-
"properties": {
|
|
1037
|
-
"status": {
|
|
1038
|
-
"enum": [
|
|
1039
|
-
"pending",
|
|
1040
|
-
"running",
|
|
1041
|
-
"passed",
|
|
1042
|
-
"blocked"
|
|
1043
|
-
]
|
|
1044
|
-
},
|
|
1045
|
-
"parent_before_sha": {
|
|
1046
|
-
"type": ["string", "null"]
|
|
1047
|
-
},
|
|
1048
|
-
"source_sha": {
|
|
1049
|
-
"type": ["string", "null"]
|
|
1050
|
-
},
|
|
1051
|
-
"result_sha": {
|
|
1052
|
-
"type": ["string", "null"]
|
|
1053
|
-
},
|
|
1054
|
-
"method": {
|
|
1055
|
-
"enum": [null, "fast-forward", "merge-commit"]
|
|
1056
|
-
},
|
|
1057
|
-
"conflict_paths": {
|
|
1058
|
-
"type": "array",
|
|
1059
|
-
"items": {"type": "string"}
|
|
1060
|
-
},
|
|
1061
|
-
"verification": {
|
|
1062
|
-
"enum": ["pending", "passed", "failed"]
|
|
1063
|
-
},
|
|
1064
|
-
"evidence": {
|
|
1065
|
-
"type": "string",
|
|
1066
|
-
"pattern": "^\\{roots\\.state\\}/specdev/changes/[^<]+/evidence/T-[0-9]{2,}\\.md$"
|
|
1067
|
-
},
|
|
1068
|
-
"attempts": {
|
|
1069
|
-
"type": "integer",
|
|
1070
|
-
"minimum": 0
|
|
1071
|
-
}
|
|
1072
|
-
},
|
|
1073
|
-
"additionalProperties": true
|
|
1074
|
-
},
|
|
1075
|
-
"status": {
|
|
1076
|
-
"enum": [
|
|
1077
|
-
"planned",
|
|
1078
|
-
"active",
|
|
1079
|
-
"review",
|
|
1080
|
-
"integrating",
|
|
1081
|
-
"integrated",
|
|
1082
|
-
"removed",
|
|
1083
|
-
"blocked"
|
|
1084
|
-
]
|
|
1085
|
-
},
|
|
1086
|
-
"updated_at": {
|
|
1087
|
-
"type": "string",
|
|
1088
|
-
"minLength": 1
|
|
1089
|
-
}
|
|
1090
|
-
},
|
|
1091
|
-
"dependentRequired": {
|
|
1092
|
-
"terminal_action": [
|
|
1093
|
-
"integration_owner",
|
|
1094
|
-
"parent_branch",
|
|
1095
|
-
"source_checkpoint",
|
|
1096
|
-
"integration"
|
|
1097
|
-
]
|
|
1098
|
-
},
|
|
1099
|
-
"allOf": [
|
|
1100
|
-
{
|
|
1101
|
-
"if": {
|
|
1102
|
-
"properties": {
|
|
1103
|
-
"status": {"const": "integrating"}
|
|
1104
|
-
},
|
|
1105
|
-
"required": ["status"]
|
|
1106
|
-
},
|
|
1107
|
-
"then": {
|
|
1108
|
-
"required": [
|
|
1109
|
-
"terminal_action",
|
|
1110
|
-
"integration_owner",
|
|
1111
|
-
"parent_branch",
|
|
1112
|
-
"source_checkpoint",
|
|
1113
|
-
"integration"
|
|
1114
|
-
],
|
|
1115
|
-
"properties": {
|
|
1116
|
-
"terminal_action": {"const": "integrate"}
|
|
1117
|
-
}
|
|
1118
|
-
}
|
|
1119
|
-
},
|
|
1120
|
-
{
|
|
1121
|
-
"if": {
|
|
1122
|
-
"properties": {
|
|
1123
|
-
"status": {"enum": ["integrating", "integrated"]},
|
|
1124
|
-
"terminal_action": {"const": "integrate"}
|
|
1125
|
-
},
|
|
1126
|
-
"required": ["status", "terminal_action"]
|
|
1127
|
-
},
|
|
1128
|
-
"then": {
|
|
1129
|
-
"properties": {
|
|
1130
|
-
"source_checkpoint": {"type": "string", "minLength": 1},
|
|
1131
|
-
"integration": {
|
|
1132
|
-
"properties": {
|
|
1133
|
-
"parent_before_sha": {"type": "string", "minLength": 1},
|
|
1134
|
-
"source_sha": {"type": "string", "minLength": 1},
|
|
1135
|
-
"attempts": {"type": "integer", "minimum": 1}
|
|
1136
|
-
}
|
|
1137
|
-
}
|
|
1138
|
-
}
|
|
1139
|
-
}
|
|
1140
|
-
},
|
|
1141
|
-
{
|
|
1142
|
-
"if": {
|
|
1143
|
-
"properties": {
|
|
1144
|
-
"status": {"const": "integrating"},
|
|
1145
|
-
"terminal_action": {"const": "integrate"}
|
|
1146
|
-
},
|
|
1147
|
-
"required": ["status", "terminal_action"]
|
|
1148
|
-
},
|
|
1149
|
-
"then": {
|
|
1150
|
-
"properties": {
|
|
1151
|
-
"integration": {
|
|
1152
|
-
"properties": {
|
|
1153
|
-
"status": {"const": "running"}
|
|
1154
|
-
}
|
|
1155
|
-
}
|
|
1156
|
-
}
|
|
1157
|
-
}
|
|
1158
|
-
},
|
|
1159
|
-
{
|
|
1160
|
-
"if": {
|
|
1161
|
-
"properties": {
|
|
1162
|
-
"status": {"const": "integrated"},
|
|
1163
|
-
"terminal_action": {"const": "integrate"}
|
|
1164
|
-
},
|
|
1165
|
-
"required": ["status", "terminal_action"]
|
|
1166
|
-
},
|
|
1167
|
-
"then": {
|
|
1168
|
-
"properties": {
|
|
1169
|
-
"integration": {
|
|
1170
|
-
"properties": {
|
|
1171
|
-
"status": {"const": "passed"},
|
|
1172
|
-
"result_sha": {"type": "string", "minLength": 1},
|
|
1173
|
-
"method": {"enum": ["fast-forward", "merge-commit"]},
|
|
1174
|
-
"verification": {"const": "passed"}
|
|
1175
|
-
}
|
|
1176
|
-
}
|
|
1177
|
-
}
|
|
1178
|
-
}
|
|
1179
|
-
},
|
|
1180
|
-
{
|
|
1181
|
-
"if": {
|
|
1182
|
-
"properties": {
|
|
1183
|
-
"terminal_action": {"const": "retain"}
|
|
1184
|
-
},
|
|
1185
|
-
"required": ["terminal_action"]
|
|
1186
|
-
},
|
|
1187
|
-
"then": {
|
|
1188
|
-
"properties": {
|
|
1189
|
-
"status": {
|
|
1190
|
-
"not": {"enum": ["integrating", "integrated"]}
|
|
1191
|
-
}
|
|
1192
|
-
}
|
|
1193
|
-
}
|
|
1194
|
-
}
|
|
1195
|
-
],
|
|
1196
|
-
"additionalProperties": true
|
|
1197
|
-
}
|
|
1198
|
-
}
|
|
1199
|
-
},
|
|
1200
|
-
"allOf": [
|
|
1201
|
-
{
|
|
1202
|
-
"if": {
|
|
1203
|
-
"properties": {
|
|
1204
|
-
"worktrees": {
|
|
1205
|
-
"contains": {
|
|
1206
|
-
"properties": {
|
|
1207
|
-
"provider": {
|
|
1208
|
-
"const": "git"
|
|
1209
|
-
}
|
|
1210
|
-
},
|
|
1211
|
-
"required": [
|
|
1212
|
-
"provider"
|
|
1213
|
-
]
|
|
1214
|
-
}
|
|
1215
|
-
}
|
|
1216
|
-
}
|
|
922
|
+
"worktree": {
|
|
923
|
+
"type": "object",
|
|
924
|
+
"required": ["ticket_id", "owner", "implementation_owner", "integration_owner", "provider", "base_sha", "parent_branch", "branch", "workspace_ref", "source_checkpoint", "integration", "status", "updated_at"],
|
|
925
|
+
"properties": {
|
|
926
|
+
"ticket_id": {"type": "string", "pattern": "^T-[0-9]{2,}$"},
|
|
927
|
+
"owner": {"type": "string", "minLength": 1},
|
|
928
|
+
"implementation_owner": {"type": "string", "minLength": 1},
|
|
929
|
+
"integration_owner": {"type": "string", "minLength": 1},
|
|
930
|
+
"provider": {"const": "git"},
|
|
931
|
+
"base_sha": {"type": "string", "minLength": 1},
|
|
932
|
+
"parent_branch": {"type": "string", "minLength": 1},
|
|
933
|
+
"branch": {"type": "string", "minLength": 1},
|
|
934
|
+
"workspace_ref": {"type": "string", "pattern": "^specdev-worktree/[0-9]{4}-[0-9]{2}-[0-9]{2}-[a-z0-9]+(?:-[a-z0-9]+)*/T-[0-9]{2,}$"},
|
|
935
|
+
"source_checkpoint": {"type": ["string", "null"]},
|
|
936
|
+
"integration": {"$ref": "#/$defs/integration"},
|
|
937
|
+
"status": {"enum": ["planned", "active", "review", "integrating", "integrated", "removed", "blocked"]},
|
|
938
|
+
"updated_at": {"type": "string", "minLength": 1}
|
|
1217
939
|
},
|
|
1218
|
-
"
|
|
1219
|
-
"properties": {
|
|
1220
|
-
"worktrees": {
|
|
1221
|
-
"items": {
|
|
1222
|
-
"if": {
|
|
1223
|
-
"properties": {
|
|
1224
|
-
"provider": {
|
|
1225
|
-
"const": "git"
|
|
1226
|
-
}
|
|
1227
|
-
},
|
|
1228
|
-
"required": [
|
|
1229
|
-
"provider"
|
|
1230
|
-
]
|
|
1231
|
-
},
|
|
1232
|
-
"then": {
|
|
1233
|
-
"properties": {
|
|
1234
|
-
"workspace_ref": {
|
|
1235
|
-
"pattern": "^specdev-worktree/T-[0-9]{2,}$"
|
|
1236
|
-
}
|
|
1237
|
-
}
|
|
1238
|
-
}
|
|
1239
|
-
}
|
|
1240
|
-
}
|
|
1241
|
-
}
|
|
1242
|
-
}
|
|
940
|
+
"additionalProperties": false
|
|
1243
941
|
},
|
|
1244
|
-
{
|
|
1245
|
-
"
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
}
|
|
942
|
+
"integration": {
|
|
943
|
+
"type": "object",
|
|
944
|
+
"required": ["status", "parent_ref", "parent_before_sha", "source_sha", "candidate_sha", "candidate_tree_sha", "candidate_branch", "candidate_workspace_ref", "result_sha", "method", "conflict_paths", "verification", "full_suite", "e2e", "evidence", "attempts", "promotion_status"],
|
|
945
|
+
"properties": {
|
|
946
|
+
"status": {"enum": ["pending", "candidate", "passed", "failed", "stale"]},
|
|
947
|
+
"parent_ref": {"type": ["string", "null"]},
|
|
948
|
+
"parent_before_sha": {"type": ["string", "null"]},
|
|
949
|
+
"source_sha": {"type": ["string", "null"]},
|
|
950
|
+
"candidate_sha": {"type": ["string", "null"]},
|
|
951
|
+
"candidate_tree_sha": {"type": ["string", "null"]},
|
|
952
|
+
"candidate_branch": {"type": ["string", "null"]},
|
|
953
|
+
"candidate_workspace_ref": {"anyOf": [{"type": "null"}, {"type": "string", "pattern": "^specdev-worktree/\\.integration/[0-9]{4}-[0-9]{2}-[0-9]{2}-[a-z0-9]+(?:-[a-z0-9]+)*/T-[0-9]{2,}$"}]},
|
|
954
|
+
"result_sha": {"type": ["string", "null"]},
|
|
955
|
+
"method": {"enum": [null, "fast-forward", "merge-commit"]},
|
|
956
|
+
"conflict_paths": {"type": "array", "items": {"type": "string"}},
|
|
957
|
+
"verification": {"enum": ["pending", "passed", "failed"]},
|
|
958
|
+
"full_suite": {"$ref": "#/$defs/full-suite"},
|
|
959
|
+
"e2e": {"$ref": "#/$defs/full-suite"},
|
|
960
|
+
"evidence": {"type": "string", "pattern": "^\\{roots\\.state\\}/specdev/changes/[^<]+/evidence/T-[0-9]{2,}\\.md$"},
|
|
961
|
+
"attempts": {"type": "integer", "minimum": 0},
|
|
962
|
+
"promotion_status": {"enum": ["pending", "applying", "applied", "failed", "stale"]}
|
|
1251
963
|
},
|
|
1252
|
-
"
|
|
1253
|
-
"properties": {
|
|
1254
|
-
"archived": {
|
|
1255
|
-
"const": true
|
|
1256
|
-
},
|
|
1257
|
-
"archive_path": {
|
|
1258
|
-
"type": "string",
|
|
1259
|
-
"pattern": "^specdev/archive/[0-9]{4}-[0-9]{2}/.+/$"
|
|
1260
|
-
}
|
|
1261
|
-
}
|
|
1262
|
-
}
|
|
964
|
+
"additionalProperties": false
|
|
1263
965
|
}
|
|
1264
|
-
|
|
1265
|
-
"
|
|
966
|
+
},
|
|
967
|
+
"allOf": [{
|
|
968
|
+
"if": {"properties": {"change_status": {"const": "archived"}}, "required": ["change_status"]},
|
|
969
|
+
"then": {"properties": {"archived": {"const": true}, "archive_path": {"type": "string", "pattern": "^specdev/archive/[0-9]{4}-[0-9]{2}/.+/$"}}}
|
|
970
|
+
}],
|
|
971
|
+
"additionalProperties": false
|
|
1266
972
|
}
|
|
1267
973
|
```
|
|
1268
974
|
|