@namewta/speculo 0.6.0 → 0.7.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/README.md +11 -11
- package/dist/src/cli.js +36 -128
- package/dist/src/cli.js.map +1 -1
- package/dist/src/index.d.ts +2 -4
- package/dist/src/index.js +173 -151
- package/dist/src/index.js.map +1 -1
- package/package.json +6 -4
- package/template/.speculo/README.md +4 -0
- package/template/canonical/canonical-specdev-engineering-cognitive-mentor.md +133 -141
- package/template/canonical/canonical-specdev-goal-plan.md +394 -377
- package/template/canonical/canonical-specdev-grill-with-docs.md +241 -178
- package/template/canonical/canonical-specdev-spec.md +132 -122
- package/template/canonical/canonical-specdev-tickets.md +176 -156
- package/template/canonical/canonical-specdev-wayfinder.md +106 -108
- package/template/commands/archive-and-consolidate.md +10 -8
- package/template/commands/handoff.md +2 -0
- package/template/commands/retro.md +3 -3
- package/template/commands/status.md +5 -4
- package/template/skills/archive-and-consolidate/SKILL.md +5 -9
- package/template/skills/archive-and-consolidate/assets/archive-plan-template.md +1 -1
- package/template/skills/archive-and-consolidate/references/archive-rules.md +4 -4
- package/template/skills/archive-and-consolidate/references/consolidation-rules.md +7 -8
- package/template/skills/archive-and-consolidate/references/knowledge-graduation.md +5 -2
- package/template/skills/github-npm-ops/SKILL.md +4 -2
- package/template/skills/github-npm-ops/references/issue-transport.md +26 -0
- package/template/skills/github-npm-ops/references/preflight-checklist.md +1 -1
- package/template/skills/github-npm-ops/scripts/issue-transport.mjs +227 -0
- package/template/workflows/specdev/A-archive-and-consolidate/A-archive-and-consolidate.md +31 -145
- package/template/workflows/specdev/A-archive-and-consolidate/consolidation-interview.md +4 -6
- package/template/workflows/specdev/C-code-review/C-code-review.md +42 -0
- package/template/workflows/specdev/C-code-review/code-review-template.md +42 -0
- package/template/workflows/specdev/D-diagnose-bugs/D-diagnose-bugs.md +45 -48
- package/template/workflows/specdev/D-diagnose-bugs/diagnosis-template.md +44 -40
- package/template/workflows/specdev/D-diagnose-bugs/feedback-loop.md +41 -0
- package/template/workflows/specdev/D-diagnose-bugs/hypothesis-and-instrumentation.md +32 -0
- package/template/workflows/specdev/D-diagnose-bugs/scripts/hitl-loop.template.sh +26 -0
- package/template/workflows/specdev/E-engineering-cognitive-mentor/E-engineering-cognitive-mentor.md +3 -3
- package/template/workflows/specdev/E-engineering-cognitive-mentor/persistence-and-resume.md +5 -20
- package/template/workflows/specdev/G-grill-with-docs/G-grill-with-docs.md +17 -10
- package/template/workflows/specdev/G-grill-with-docs/adr-format.md +31 -17
- package/template/workflows/specdev/G-grill-with-docs/context-format.md +9 -29
- package/template/workflows/specdev/G-grill-with-docs/domain-modeling-rules.md +10 -5
- package/template/workflows/specdev/G-grill-with-docs/stakeholder-questionnaire.md +45 -0
- package/template/workflows/specdev/I-implement/I-implement.md +29 -14
- package/template/workflows/specdev/I-implement/delegated-evidence-template.md +11 -0
- package/template/workflows/specdev/I-implement/evidence-template.md +24 -10
- package/template/workflows/specdev/I-implement/execution-preflight.md +4 -4
- package/template/workflows/specdev/I-implement/merge-conflict-protocol.md +20 -0
- package/template/workflows/specdev/I-implement/tdd-mocking.md +19 -0
- package/template/workflows/specdev/I-implement/tdd-rules.md +14 -12
- package/template/workflows/specdev/I-implement/tdd-test-design.md +25 -0
- package/template/workflows/specdev/I-init-setup/I-init-setup.md +12 -9
- package/template/workflows/specdev/I-init-setup/config-template.json +1 -1
- package/template/workflows/specdev/I-init-setup/domain-layout-template.md +2 -2
- package/template/workflows/specdev/I-init-setup/status-template.json +2 -3
- package/template/workflows/specdev/I-init-setup/tracking-template.md +3 -0
- package/template/workflows/specdev/INDEX.md +64 -26
- package/template/workflows/specdev/P-goal-plan/P-goal-plan.md +48 -38
- package/template/workflows/specdev/P-goal-plan/completion-control.md +19 -53
- package/template/workflows/specdev/P-goal-plan/delegated-execution-template.md +33 -0
- package/template/workflows/specdev/P-goal-plan/delegated-execution.md +53 -0
- package/template/workflows/specdev/P-goal-plan/goal-plan-template.md +9 -40
- package/template/workflows/specdev/P-goal-plan/orchestration-protocol.md +16 -68
- package/template/workflows/specdev/P-goal-plan/planning-modes.md +20 -48
- package/template/workflows/specdev/P-prototype/P-prototype.md +46 -0
- package/template/workflows/specdev/P-prototype/logic-prototype.md +24 -0
- package/template/workflows/specdev/P-prototype/prototype-record-template.md +46 -0
- package/template/workflows/specdev/P-prototype/ui-prototype.md +21 -0
- package/template/workflows/specdev/R-review-architecture/R-review-architecture.md +1 -1
- package/template/workflows/specdev/S-spec/S-spec.md +2 -1
- package/template/workflows/specdev/T-tickets/T-tickets.md +3 -2
- package/template/workflows/specdev/T-tickets/ticket-readiness.md +1 -1
- package/template/workflows/specdev/T-tickets/ticket-template.md +1 -1
- package/template/workflows/specdev/T-tickets/tickets-map-template.md +1 -1
- package/template/workflows/specdev/T-triage/T-triage.md +65 -26
- package/template/workflows/specdev/T-triage/intake-protocol.md +32 -0
- package/template/workflows/specdev/T-triage/reconcile-protocol.md +34 -0
- package/template/workflows/specdev/T-triage/source-template.md +30 -0
- package/template/workflows/specdev/T-triage/triage-template.md +38 -24
- package/template/workflows/specdev/W-wayfinder/W-wayfinder.md +3 -1
- package/template/workflows/specdev/_state/status.json +2 -3
- package/template/workflows/specdev/common/README.md +9 -2
- package/template/workflows/specdev/common/rules/artifact-contract.md +20 -9
- package/template/workflows/specdev/common/rules/change-completion.md +33 -0
- package/template/workflows/specdev/common/rules/deviation-control.md +2 -2
- package/template/workflows/specdev/common/rules/evidence-and-verification.md +1 -1
- package/template/workflows/specdev/common/rules/path-ownership.md +3 -3
- package/template/workflows/specdev/common/schemas/change-status.schema.json +43 -0
- package/template/workflows/specdev/common/schemas/code-review.schema.json +22 -0
- package/template/workflows/specdev/common/schemas/diagnosis.schema.json +19 -0
- package/template/workflows/specdev/common/schemas/prototype-record.schema.json +24 -0
- package/template/workflows/specdev/common/schemas/source.schema.json +20 -0
- package/template/workflows/specdev/common/schemas/status.schema.json +20 -78
- package/template/workflows/specdev/common/schemas/triage.schema.json +21 -0
- package/template/workflows/specdev/common/skills/code-review/SKILL.md +49 -0
- package/template/workflows/specdev/common/skills/code-review/references/fowler-smells.md +18 -0
- package/template/workflows/specdev/common/skills/code-review/references/reviewer-contracts.md +13 -0
- package/template/workflows/specdev/common/skills/code-review/references/source-discovery.md +22 -0
- package/template/workflows/specdev/common/skills/dev-worktree/SKILL.md +12 -9
- package/template/workflows/specdev/common/skills/dev-worktree/references/create.md +18 -13
- package/template/workflows/specdev/common/skills/dev-worktree/references/finalize.md +8 -6
- package/template/workflows/specdev/common/skills/research/SKILL.md +38 -26
- package/template/workflows/specdev/common/skills/subagent-delivery/SKILL.md +3 -5
- package/template/workflows/specdev/common/tools/README.md +3 -0
- package/template/workflows/specdev/common/tools/validate-specdev.mjs +496 -30
- package/dist/src/migrate.d.ts +0 -38
- package/dist/src/migrate.js +0 -642
- package/dist/src/migrate.js.map +0 -1
- package/dist/src/skills-mirror.d.ts +0 -38
- package/dist/src/skills-mirror.js +0 -160
- package/dist/src/skills-mirror.js.map +0 -1
- package/template/workflows/specdev/A-archive-and-consolidate/archive-checklist.md +0 -15
- package/template/workflows/specdev/A-archive-and-consolidate/knowledge-promotion-rules.md +0 -32
- package/template/workflows/specdev/I-implement/code-review-process.md +0 -17
- package/template/workflows/specdev/I-implement/tdd-examples.md +0 -14
- package/template/workflows/specdev/I-init-setup/status-labels-template.md +0 -55
|
@@ -3,43 +3,82 @@ id: specdev/triage
|
|
|
3
3
|
type: workflow-entry
|
|
4
4
|
workflow: specdev
|
|
5
5
|
name: 请求分诊
|
|
6
|
-
description:
|
|
7
|
-
keywords: [triage, 摄入, issue, 风险, 路由]
|
|
6
|
+
description: 把远程 Issue、URL、文件或对话冻结为本地来源工件,完成风险分诊与路由,并在本地 change 完成后受控回写和关闭支持的远程 Issue。
|
|
7
|
+
keywords: [triage, 摄入, import, issue, reconcile, close, 风险, 路由]
|
|
8
8
|
---
|
|
9
9
|
|
|
10
10
|
# 请求分诊
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Triage 是 SpecDev 唯一的远程摄入与关闭边界。开发期间,`<Path>{roots.state}/specdev/changes/{change}/source.md</Path>`、`<Path>{roots.state}/specdev/changes/{change}/triage.md</Path>`、Spec、Ticket、Map、Goal Plan、Evidence 和状态文件是唯一权威;远程系统只保存原始请求以及经确认后的完成通知。
|
|
13
13
|
|
|
14
|
-
##
|
|
14
|
+
## 模式
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
3. **读取上下文**:按需读取 `<Path>{roots.state}/specdev/context/</Path>`、`<Path>{roots.state}/specdev/adr/</Path>`、当前 change 文档和相关代码事实。
|
|
19
|
-
4. **分类**:bug、feature、refactor、investigation、operations、documentation 或混合;混合请求按主要阻塞问题路由,不强行塞入单类。
|
|
20
|
-
5. **评估**:影响、紧急度、风险、事故半径、安全/数据/兼容/迁移因素和所需人工批准。
|
|
21
|
-
6. **未知项分类**:可发现事实继续探索;无法发现且会改变方案的内容标为 decision-needed;低影响实现细节不阻塞。
|
|
22
|
-
7. **推荐路线**:
|
|
23
|
-
- bug 且根因未知 → `<Path>{roots.workflows}/specdev/D-diagnose-bugs/D-diagnose-bugs.md</Path>`;
|
|
24
|
-
- 需求或架构不清 → `<Path>{roots.workflows}/specdev/G-grill-with-docs/G-grill-with-docs.md</Path>`;
|
|
25
|
-
- 外部行为已清楚 → `<Path>{roots.workflows}/specdev/S-spec/S-spec.md</Path>`;
|
|
26
|
-
- 小且完全明确、风险低 → `<Path>{roots.workflows}/specdev/T-tickets/T-tickets.md</Path>` 的 Lite Ticket,或用户批准的 Direct Spec 实现;
|
|
27
|
-
- 路径未知或调查超出单次上下文 → `<Path>{roots.workflows}/specdev/W-wayfinder/W-wayfinder.md</Path>`;
|
|
28
|
-
- 架构质量问题 → `<Path>{roots.workflows}/specdev/R-review-architecture/R-review-architecture.md</Path>`。
|
|
29
|
-
8. **写入结果**:使用 `<Path>{roots.workflows}/specdev/T-triage/triage-template.md</Path>` 写入 `<Path>{roots.state}/specdev/changes/{change}/triage.md</Path>`,更新 `<Path>{roots.state}/specdev/status.json</Path>` 和 `<Path>{roots.state}/specdev/changes/{change}/.status.json</Path>`(首次创建时使用 `<Path>{roots.workflows}/specdev/I-init-setup/change-status-template.json</Path>`)。
|
|
16
|
+
- **intake**:冻结输入、创建或恢复 change、分类并返回下一 Work。
|
|
17
|
+
- **reconcile**:本地 change 已完成后,确认远程完成摘要并关闭支持的 GitHub Issue;不重新分诊或修改开发契约。
|
|
30
18
|
|
|
31
|
-
##
|
|
19
|
+
## 共同启动
|
|
32
20
|
|
|
33
|
-
|
|
21
|
+
1. 解析 roots,读取 `<Path>{roots.workflows}/specdev/INDEX.md</Path>`、全局状态和 change 状态。
|
|
22
|
+
2. Intake 可以创建 change;reconcile 必须选择一个已存在的 completed change。
|
|
23
|
+
3. 若该 change 的 `current_work` 为 null,设置为 `specdev/triage`;指向其他 Work 时先恢复或完成显式 handoff。
|
|
24
|
+
4. 重读已有 `<Path>{roots.state}/specdev/changes/{change}/source.md</Path>` 与 `<Path>{roots.state}/specdev/changes/{change}/triage.md</Path>`,不覆盖已冻结的来源。
|
|
25
|
+
|
|
26
|
+
## Intake
|
|
27
|
+
|
|
28
|
+
输入为远程 Issue、URL、项目相对文件、用户粘贴内容或当前对话时,加载 `<Path>{roots.workflows}/specdev/T-triage/intake-protocol.md</Path>`:
|
|
29
|
+
|
|
30
|
+
1. 按协议解析来源、查重、脱敏、冻结并计算内容 hash;使用 `<Path>{roots.workflows}/specdev/T-triage/source-template.md</Path>` 原子写入 `<Path>{roots.state}/specdev/changes/{change}/source.md</Path>`。
|
|
31
|
+
2. 按需读取永久 ADR/CONTEXT、当前 change 工件和相关代码事实;缺失的可选输入静默跳过。
|
|
32
|
+
3. 分类为 bug、feature、refactor、investigation、operations、documentation、review 或 mixed。
|
|
33
|
+
4. 评估影响、紧急度、事故半径、安全、数据、迁移和人工批准;把未知项分为可发现事实、decision-needed 和低影响实现细节。
|
|
34
|
+
5. 使用 `<Path>{roots.workflows}/specdev/T-triage/triage-template.md</Path>` 写入 `<Path>{roots.state}/specdev/changes/{change}/triage.md</Path>`。
|
|
35
|
+
6. 运行阶段校验并返回最小正确路线:
|
|
36
|
+
- 根因未知的 bug → `<Path>{roots.workflows}/specdev/D-diagnose-bugs/D-diagnose-bugs.md</Path>`;
|
|
37
|
+
- 产品或架构决定未锁定 → `<Path>{roots.workflows}/specdev/G-grill-with-docs/G-grill-with-docs.md</Path>`;
|
|
38
|
+
- 路径超出单次上下文 → `<Path>{roots.workflows}/specdev/W-wayfinder/W-wayfinder.md</Path>`;
|
|
39
|
+
- 需要可运行原型回答设计问题 → `<Path>{roots.workflows}/specdev/P-prototype/P-prototype.md</Path>`;
|
|
40
|
+
- 外部行为明确 → `<Path>{roots.workflows}/specdev/S-spec/S-spec.md</Path>`;
|
|
41
|
+
- 固定点 diff 或 PR 审查 → `<Path>{roots.workflows}/specdev/C-code-review/C-code-review.md</Path>`;
|
|
42
|
+
- 小型明确变更 → `<Path>{roots.workflows}/specdev/T-tickets/T-tickets.md</Path>` 或获批 Direct Spec。
|
|
43
|
+
|
|
44
|
+
只有目标、范围、验证、路径和风险全部明确且用户批准 Direct Spec 时,`ready_for_implementation` 才能为 true。
|
|
45
|
+
|
|
46
|
+
## Reconcile
|
|
47
|
+
|
|
48
|
+
本地 change 完成并需要关闭来源 Issue 时,加载:
|
|
49
|
+
|
|
50
|
+
- `<Path>{roots.workflows}/specdev/common/rules/change-completion.md</Path>`;
|
|
51
|
+
- `<Path>{roots.workflows}/specdev/T-triage/reconcile-protocol.md</Path>`。
|
|
52
|
+
|
|
53
|
+
按协议重验本地完成、生成最小外部摘要、展示准确目标和动作、取得本次明确授权,再调用 `<Path>{roots.skills}/github-npm-ops/SKILL.md</Path>`。成功时把 `external_action` 更新为 `closed`;部分或完全失败为 `close-failed` 并保留可重试检查点;用户明确不关闭时为 `waived`。任何结果都不改写本地完成事实。
|
|
54
|
+
|
|
55
|
+
Reconcile 成功或 waived 后返回 `<Path>{roots.workflows}/specdev/A-archive-and-consolidate/A-archive-and-consolidate.md</Path>`。不支持关闭的来源使用 `not-applicable`,无需虚构 provider。
|
|
56
|
+
|
|
57
|
+
## 状态与验证
|
|
58
|
+
|
|
59
|
+
运行:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
node <Path>{roots.workflows}/specdev/common/tools/validate-specdev.mjs</Path> \
|
|
63
|
+
--stage triage \
|
|
64
|
+
<Path>{roots.state}/specdev/changes/{change}</Path>
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
验证通过后原子重读 source、triage 和 change 状态。Intake 或 reconcile 成功时将 `specdev/triage` 去重加入 `works_run` 并清空 `current_work`;可恢复失败保留 `current_work` 和具体 blocker。
|
|
34
68
|
|
|
35
69
|
## 完成标准
|
|
36
70
|
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
-
|
|
41
|
-
-
|
|
71
|
+
- 来源已冻结为本地工件,原意未被改写,敏感值未持久化;
|
|
72
|
+
- 相同 locator 不会静默创建重复 change或覆盖已有快照;
|
|
73
|
+
- 分类、影响、风险、未知项和下一 Work 有证据;
|
|
74
|
+
- 开发权威完全位于本地 state;
|
|
75
|
+
- 未授权时远程写入为零;
|
|
76
|
+
- Reconcile 可从失败检查点幂等恢复;
|
|
77
|
+
- 状态、验证结果和下一 Work 完整路径已返回。
|
|
42
78
|
|
|
43
79
|
## 子文件引用
|
|
44
80
|
|
|
45
|
-
-
|
|
81
|
+
- Intake:`<Path>{roots.workflows}/specdev/T-triage/intake-protocol.md</Path>`
|
|
82
|
+
- Reconcile:`<Path>{roots.workflows}/specdev/T-triage/reconcile-protocol.md</Path>`
|
|
83
|
+
- Source 模板:`<Path>{roots.workflows}/specdev/T-triage/source-template.md</Path>`
|
|
84
|
+
- Triage 模板:`<Path>{roots.workflows}/specdev/T-triage/triage-template.md</Path>`
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Intake Protocol
|
|
2
|
+
|
|
3
|
+
仅在 Triage `mode=intake` 时加载。本协议把外部输入转换为不可静默覆盖的本地来源快照。
|
|
4
|
+
|
|
5
|
+
## 1. 解析来源
|
|
6
|
+
|
|
7
|
+
按以下优先级确定 `source_type`:GitHub Issue/PR URL、普通 URL、项目相对文件、用户粘贴内容、当前对话。来源为 GitHub 时调用 `<Path>{roots.skills}/github-npm-ops/SKILL.md</Path>` 的 `issue-read` 或 `pr-read`;其他 URL 使用当前环境可用的只读读取能力。读取失败时保持 blocked,并请求用户提供导出或粘贴内容。
|
|
8
|
+
|
|
9
|
+
只记录规范化 URL、项目相对 Path 或 null;不保存机器绝对路径、认证信息、Cookie 或令牌。
|
|
10
|
+
|
|
11
|
+
## 2. 查重与漂移
|
|
12
|
+
|
|
13
|
+
在 active 和 archive 的 `<Path>{roots.state}/specdev/changes/{change}/source.md</Path>` 或对应归档 Source 中查询相同 `canonical_locator`:
|
|
14
|
+
|
|
15
|
+
- locator 与 hash 相同:恢复已有 change,不创建副本;
|
|
16
|
+
- locator 相同但 hash 不同:展示漂移,不覆盖原快照;只有用户确认后才创建新 change,并在新 source 中记录 `supersedes_source`;
|
|
17
|
+
- 没有稳定 locator:按用户指定 change 或新 change 继续。
|
|
18
|
+
|
|
19
|
+
## 3. 冻结内容
|
|
20
|
+
|
|
21
|
+
GitHub 来源保存 title、body、author、state、labels、created/updated 和截至捕获时可见的全部评论。普通 URL 保存可读正文和元数据;项目文件保存内容及项目相对 Path;粘贴或对话保存用户原文。
|
|
22
|
+
|
|
23
|
+
在计算 SHA-256 前移除秘密、令牌、Cookie、个人隐私和不应长期保存的敏感日志,并在 Redactions 记录类型,不记录原值。附件默认只留 URL 与描述。
|
|
24
|
+
|
|
25
|
+
使用 `<Path>{roots.workflows}/specdev/T-triage/source-template.md</Path>` 写临时文件,重读并验证后原子替换目标。已有 `<Path>{roots.state}/specdev/changes/{change}/source.md</Path>` 永不就地覆盖。
|
|
26
|
+
|
|
27
|
+
## 完成标准
|
|
28
|
+
|
|
29
|
+
- 来源类型、locator、捕获时间、hash 和关闭能力已确定;
|
|
30
|
+
- 完整可持久化正文与评论已冻结;
|
|
31
|
+
- 重复和漂移分支有唯一结果;
|
|
32
|
+
- 失败没有生成伪造或不完整的 Ready source。
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Reconcile Protocol
|
|
2
|
+
|
|
3
|
+
仅在 Triage `mode=reconcile` 时加载。目标是把本地完成结果最小化投影到来源 Issue,并关闭它。
|
|
4
|
+
|
|
5
|
+
## 1. 本地完成硬门
|
|
6
|
+
|
|
7
|
+
按 `<Path>{roots.workflows}/specdev/common/rules/change-completion.md</Path>` 重验:change 为 completed、全部计划内 Ticket 已完成或批准取消、Evidence 与 Gate 齐全、验证通过、无未批准 deviation。任一项失败时停止,不准备远程写入。
|
|
8
|
+
|
|
9
|
+
`<Path>{roots.state}/specdev/changes/{change}/source.md</Path>` 必须指向仍可定位的 open GitHub Issue,且 `<Path>{roots.state}/specdev/changes/{change}/triage.md</Path>` 的 `external_action` 为 `pending-close` 或 `close-failed`。其他来源使用 `not-applicable`。
|
|
10
|
+
|
|
11
|
+
## 2. 准备关闭计划
|
|
12
|
+
|
|
13
|
+
从本地 Evidence 生成简短评论:完成结果、关键验证、可公开的 commit/PR URL、残余风险或后续工作。不得发布 state Path、机器路径、秘密、内部日志或未核对声明。
|
|
14
|
+
|
|
15
|
+
向用户展示准确 repo、Issue 编号、评论全文、close reason 和将执行的动作。只有本次明确确认后才继续;拒绝或暂不执行时零远程写入。用户明确放弃关闭可将状态置为 `waived`。
|
|
16
|
+
|
|
17
|
+
## 3. 幂等执行
|
|
18
|
+
|
|
19
|
+
调用 `<Path>{roots.skills}/github-npm-ops/SKILL.md</Path>` 的 `issue-comment-close`,marker 固定为 `specdev:<change>:completion`。执行前重读 Issue 与评论:
|
|
20
|
+
|
|
21
|
+
- 已关闭且 marker 存在:按已完成恢复;
|
|
22
|
+
- marker 存在但 Issue 仍 open:只重试 close;
|
|
23
|
+
- marker 不存在:评论成功后再 close;
|
|
24
|
+
- 任一步失败:记录已完成步骤、错误和下一重试动作,状态为 `close-failed`。
|
|
25
|
+
|
|
26
|
+
成功后重读远程状态,只有观察到 closed 才写 `external_action: closed`。
|
|
27
|
+
|
|
28
|
+
## 完成标准
|
|
29
|
+
|
|
30
|
+
- 本地完成先于远程动作;
|
|
31
|
+
- 用户看见并批准了准确写入计划;
|
|
32
|
+
- 重试不会重复评论;
|
|
33
|
+
- 外部失败不改写本地完成事实;
|
|
34
|
+
- closed、close-failed 或 waived 与证据一致。
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
schema_version: 1
|
|
3
|
+
artifact: source
|
|
4
|
+
change: <YYYY-MM-DD-topic>
|
|
5
|
+
source_type: conversation
|
|
6
|
+
canonical_locator: null
|
|
7
|
+
captured_at: <ISO-8601>
|
|
8
|
+
content_sha256: <sha256>
|
|
9
|
+
remote_state: not-applicable
|
|
10
|
+
close_capability: not-applicable
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
# Source: <标题>
|
|
14
|
+
|
|
15
|
+
## Capture Metadata
|
|
16
|
+
|
|
17
|
+
- **Capture method:** conversation / pasted / project-file / URL fetch / GitHub CLI
|
|
18
|
+
- **Author:** unknown / <name>
|
|
19
|
+
- **Created / updated:** unknown / <timestamps>
|
|
20
|
+
- **Labels or classification supplied by source:** none / ...
|
|
21
|
+
- **Attachments:** none / URL references only
|
|
22
|
+
- **Redactions:** none / description of omitted sensitive material
|
|
23
|
+
|
|
24
|
+
## Original Content
|
|
25
|
+
|
|
26
|
+
<保存脱敏后的完整原始正文,不改写语气、结构或意图。>
|
|
27
|
+
|
|
28
|
+
## Source Comments
|
|
29
|
+
|
|
30
|
+
<按来源顺序保存评论;没有评论时写“无”。>
|
|
@@ -1,29 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
schema_version: 1
|
|
3
|
+
artifact: triage
|
|
4
|
+
change: <YYYY-MM-DD-topic>
|
|
5
|
+
mode: intake
|
|
6
|
+
source: <Path>{roots.state}/specdev/changes/{change}/source.md</Path>
|
|
7
|
+
classification: investigation
|
|
8
|
+
risk: medium
|
|
9
|
+
route: specdev/wayfinder
|
|
10
|
+
ready_for_implementation: false
|
|
11
|
+
external_action: not-applicable
|
|
12
|
+
updated_at: <ISO-8601>
|
|
13
|
+
---
|
|
14
|
+
|
|
1
15
|
# Triage: <标题>
|
|
2
16
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
- **类型:** bug / feature / refactor / investigation / operations / documentation
|
|
17
|
+
## 当前判定
|
|
18
|
+
|
|
6
19
|
- **影响:** 用户、系统、数据或交付影响
|
|
7
|
-
- **风险:** low / medium / high / critical
|
|
8
20
|
- **紧急度:** immediate / scheduled / normal / unknown
|
|
9
21
|
- **当前证据:** 已观察事实,不写推测
|
|
10
|
-
- **相关代码/工件:** `<Path>src/example.ts</Path>` /
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
22
|
+
- **相关代码/工件:** `<Path>src/example.ts</Path>` / 无
|
|
23
|
+
|
|
24
|
+
## 未知项
|
|
25
|
+
|
|
26
|
+
- **可发现事实:** 无 / 需要从仓库、日志、测试或配置查明的事实
|
|
27
|
+
- **需要用户决定:** 无 / 会改变目标、范围、行为或风险承受度的决定
|
|
28
|
+
- **低影响实现细节:** 无 / 由后续实现者按既有惯例决定
|
|
29
|
+
|
|
30
|
+
## 路由
|
|
31
|
+
|
|
32
|
+
- **下一 Work:** `<Path>{roots.workflows}/specdev/W-wayfinder/W-wayfinder.md</Path>`
|
|
33
|
+
- **理由:** 为什么这是最小且正确的下一步
|
|
34
|
+
|
|
35
|
+
## 外部动作
|
|
36
|
+
|
|
37
|
+
- **远程目标:** 无 / `<Url>https://github.com/owner/repo/issues/123</Url>`
|
|
38
|
+
- **关闭能力:** supported / unsupported / not-applicable
|
|
39
|
+
- **当前状态:** not-applicable / pending-close / closed / close-failed / waived
|
|
40
|
+
- **授权记录:** 无
|
|
41
|
+
- **尝试与结果:** 无
|
|
42
|
+
|
|
43
|
+
外部动作只投影最终完成,不替代本地状态、Ticket、Map 或 Evidence。
|
|
@@ -45,7 +45,7 @@ Wayfinder 默认进行**规划**:每个 Ticket 解决一个决策,当地图
|
|
|
45
45
|
每个 Ticket 要么是 **HITL**,与一个代表自己发言的人类一起工作;要么是 **AFK**,由 Agent 独立驱动。HITL Ticket 只能通过实时交流解决,Agent 绝不代替人类一方发言。
|
|
46
46
|
|
|
47
47
|
- **Research(AFK)**:阅读文档、第三方 API 或知识库等资源,揭示某个决策等待的事实。调用 `<Path>{roots.workflows}/specdev/common/skills/research/SKILL.md</Path>`。当需要当前工作目录之外的知识时使用。
|
|
48
|
-
- **Prototype(HITL
|
|
48
|
+
- **Prototype(HITL)**:调用 `<Path>{roots.workflows}/specdev/P-prototype/P-prototype.md</Path>` 回答一个 UI/逻辑问题,并把 record、临时 branch/worktree 和运行 URL 链接为 solution comment 资产;P 不实现目的地。
|
|
49
49
|
- **Grilling(HITL)**:对话。调用 `<Path>{roots.workflows}/specdev/G-grill-with-docs/G-grill-with-docs.md</Path>` 的 grilling 与 domain-modeling 能力,但本会话只关闭当前 Wayfinder Ticket。
|
|
50
50
|
- **Task(HITL 或 AFK)**:在决策做出前必须完成的手动工作。它通过为决策解除阻塞赢得位置,不以交付目的地为目标。Agent 能独立驱动时使用 AFK,否则给人类精确清单。
|
|
51
51
|
|
|
@@ -97,6 +97,8 @@ Ticket label 只能是 `wayfinder:research | wayfinder:prototype | wayfinder:gri
|
|
|
97
97
|
|
|
98
98
|
当前沿为空且“尚未明确”不再包含阻塞目的地的内容时,路径清晰:
|
|
99
99
|
|
|
100
|
+
路由前使用 `<Path>{roots.workflows}/specdev/common/tools/validate-specdev.mjs</Path>` 的 `--stage wayfinder`;Ticket、claim、comment 或地图不一致时保持 blocked。
|
|
101
|
+
|
|
100
102
|
- 需要产品或架构取舍:`<Path>{roots.workflows}/specdev/G-grill-with-docs/G-grill-with-docs.md</Path>`;
|
|
101
103
|
- 外部行为已清楚:`<Path>{roots.workflows}/specdev/S-spec/S-spec.md</Path>`;
|
|
102
104
|
- Spec Ready、只需拆分:`<Path>{roots.workflows}/specdev/T-tickets/T-tickets.md</Path>`;
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
- 证据与验证:`<Path>{roots.workflows}/specdev/common/rules/evidence-and-verification.md</Path>`
|
|
19
19
|
- 偏差控制:`<Path>{roots.workflows}/specdev/common/rules/deviation-control.md</Path>`
|
|
20
20
|
- 路径引用:`<Path>{roots.workflows}/specdev/common/rules/path-reference-contract.md</Path>`
|
|
21
|
+
- Change 完成:`<Path>{roots.workflows}/specdev/common/rules/change-completion.md</Path>`
|
|
21
22
|
- 代码注释:`<Path>{roots.workflows}/specdev/common/rules/code-commenting-rule.md</Path>`
|
|
22
23
|
- 代码库设计:`<Path>{roots.workflows}/specdev/common/rules/codebase-design.md</Path>`
|
|
23
24
|
|
|
@@ -32,14 +33,20 @@
|
|
|
32
33
|
- Goal Plan:`<Path>{roots.workflows}/specdev/common/schemas/goal-plan.schema.json</Path>`
|
|
33
34
|
- 设计树:`<Path>{roots.workflows}/specdev/common/schemas/design-tree.schema.json</Path>`
|
|
34
35
|
- Wayfinder Ticket:`<Path>{roots.workflows}/specdev/common/schemas/wayfinder-ticket.schema.json</Path>`
|
|
36
|
+
- 来源快照:`<Path>{roots.workflows}/specdev/common/schemas/source.schema.json</Path>`
|
|
37
|
+
- 分诊:`<Path>{roots.workflows}/specdev/common/schemas/triage.schema.json</Path>`
|
|
38
|
+
- 诊断:`<Path>{roots.workflows}/specdev/common/schemas/diagnosis.schema.json</Path>`
|
|
39
|
+
- 代码审查:`<Path>{roots.workflows}/specdev/common/schemas/code-review.schema.json</Path>`
|
|
40
|
+
- 原型记录:`<Path>{roots.workflows}/specdev/common/schemas/prototype-record.schema.json</Path>`
|
|
35
41
|
|
|
36
42
|
## 工具与 Skill
|
|
37
43
|
|
|
38
44
|
- 包与 change 校验器:`<Path>{roots.workflows}/specdev/common/tools/validate-specdev.mjs</Path>`
|
|
39
45
|
- 校验器说明:`<Path>{roots.workflows}/specdev/common/tools/README.md</Path>`
|
|
40
46
|
- 外部技术研究 Skill:`<Path>{roots.workflows}/specdev/common/skills/research/SKILL.md</Path>`
|
|
41
|
-
-
|
|
42
|
-
- Agent 交付合同 Skill:`<Path>{roots.workflows}/specdev/common/skills/subagent-delivery/SKILL.md</Path
|
|
47
|
+
- 隔离 Ticket/原型 worktree Skill:`<Path>{roots.workflows}/specdev/common/skills/dev-worktree/SKILL.md</Path>`,角色中立;委派 Goal Plan 才映射为 Lead/Worker
|
|
48
|
+
- 委派 Agent 交付合同 Skill:`<Path>{roots.workflows}/specdev/common/skills/subagent-delivery/SKILL.md</Path>`,仅用户选择委派 Goal Plan 时调用
|
|
49
|
+
- 双轴代码审查 Skill:`<Path>{roots.workflows}/specdev/common/skills/code-review/SKILL.md</Path>`
|
|
43
50
|
|
|
44
51
|
## 加载原则
|
|
45
52
|
|
|
@@ -6,33 +6,44 @@ SpecDev 通过分层工件避免同一决策被多个模型反复重做。每个
|
|
|
6
6
|
|
|
7
7
|
| 工件 | 具体位置 | 必须决定 | 不应决定 |
|
|
8
8
|
|---|---|---|---|
|
|
9
|
-
|
|
|
9
|
+
| 来源快照 | `<Path>{roots.state}/specdev/changes/{change}/source.md</Path>` | 原始请求、捕获时间、locator、hash 和关闭能力 | 当前产品合同或实现状态 |
|
|
10
|
+
| 分诊 | `<Path>{roots.state}/specdev/changes/{change}/triage.md</Path>` | 请求类别、影响、风险、缺失输入、下一 work 和远程 reconcile 状态 | 详细实现方案或开发进度 |
|
|
10
11
|
| 诊断 | `<Path>{roots.state}/specdev/changes/{change}/diagnosis.md</Path>` | 复现、证据、根因、修复不变量和回归契约 | 未经验证的修复实现 |
|
|
11
12
|
| 设计日志 | `<Path>{roots.state}/specdev/changes/{change}/LOG.md</Path>` | 讨论轨迹、确认、延后、替代与废弃结论 | 当前架构权威摘要 |
|
|
12
13
|
| 设计树 | `<Path>{roots.state}/specdev/changes/{change}/design-tree.json</Path>` | 决策节点、依赖、当前 frontier、轮次与共识状态 | 领域真相或架构决定正文 |
|
|
13
|
-
| 领域上下文 | `<Path>{roots.state}/specdev/changes/{change}/CONTEXT.md</Path>` |
|
|
14
|
-
| 架构决策 | `<Path>{roots.state}/specdev/changes/{change}/ADR.md</Path>` |
|
|
14
|
+
| Change 领域上下文 | `<Path>{roots.state}/specdev/changes/{change}/CONTEXT.md</Path>` | 本 change 已确认、供下游使用的领域术语和语义 | 永久领域知识或临时会议记录 |
|
|
15
|
+
| Change 架构决策 | `<Path>{roots.state}/specdev/changes/{change}/ADR.md</Path>` | 已成为本 change 下游合同的架构决策、原因、后果和替代关系 | 永久项目 ADR 或尚未决定的方案集合 |
|
|
15
16
|
| Spec | `<Path>{roots.state}/specdev/changes/{change}/spec.md</Path>` | 用户问题、外部行为、范围、验收合同、非功能要求和已锁定实现约束 | 文件级施工步骤 |
|
|
16
17
|
| Ticket | `<Path>{roots.state}/specdev/changes/{change}/ticket/{ticket-file}.md</Path>` | 单一垂直切片的行为、决策、范围、路径所有权、执行路线和验证证据 | 跨 Ticket 里程碑治理 |
|
|
17
18
|
| Tickets Map | `<Path>{roots.state}/specdev/changes/{change}/tickets-map.md</Path>` | 依赖 DAG、合同覆盖、Ready 投影、并行候选和路径冲突 | 单 Ticket 的完整实现契约 |
|
|
18
19
|
| Goal Plan | `<Path>{roots.state}/specdev/changes/{change}/goal-plan.md</Path>` | 跨 Ticket 调度、Gate、共享所有权、迁移顺序、集成和偏差治理 | 复制 Ticket 全文 |
|
|
19
20
|
| Evidence | `<Path>{roots.state}/specdev/changes/{change}/evidence/{ticket-id}.md</Path>` | 实际修改、命令、结果、验收映射、偏差、风险和提交引用 | 新的产品或架构决策 |
|
|
21
|
+
| 代码审查 | `<Path>{roots.state}/specdev/changes/{change}/reviews/CR-###.md</Path>` | 固定点、标准轴和规范轴 finding | 实施修复或合并两轴排名 |
|
|
22
|
+
| 原型记录 | `<Path>{roots.state}/specdev/changes/{change}/prototypes/{prototype-id}/record.md</Path>` | 一个问题、分支、资产、答案、promotion 和清理 | 生产实现或多个问题的计划 |
|
|
23
|
+
| Stakeholder 问卷 | `<Path>{roots.state}/specdev/changes/{change}/questionnaires/{slug}.md</Path>` | 第三方原始回答和恢复条件 | 未经转录确认的产品/架构决定 |
|
|
20
24
|
| Wayfinder 地图 | `<Path>{roots.state}/specdev/changes/{change}/wayfinder-map.md</Path>` | 目的地、说明、已关闭决策索引、战争迷雾和范围之外 | 开放 Ticket 正文或答案详情 |
|
|
21
25
|
| Wayfinder Ticket | `<Path>{roots.state}/specdev/changes/{change}/investigation/{investigation-id}.md</Path>` | 一个可精确陈述的问题、类型、阻塞和关闭状态 | 解决方案评论或交付目标 |
|
|
22
26
|
| Wayfinder solution comment | `<Path>{roots.state}/specdev/changes/{change}/investigation/comments/{investigation-id}/NN-solution.md</Path>` | Ticket 的答案、结果事实和资产指针 | 地图索引或产品实现 |
|
|
23
27
|
| 架构审查 | `<Path>{roots.state}/specdev/changes/{change}/architecture-review.md</Path>` 与 `<Path>{roots.state}/specdev/changes/{change}/architecture-review.html</Path>` | 深化候选、证据、可视化、选择和访谈状态 | 未经用户选择的执行契约 |
|
|
24
28
|
|
|
29
|
+
Change CONTEXT/ADR 是 active change 内的执行权威,不是 workflow 级永久知识。G 和其他设计/执行 Works 只读 `<Path>{roots.state}/specdev/context/</Path>` 与 `<Path>{roots.state}/specdev/adr/</Path>`;只有 A 在 change 完成、实现证据验证、毕业评估和用户确认后才能写入永久 namespace。未毕业内容随归档 change 保留,不能从 change 工件消失。
|
|
30
|
+
|
|
25
31
|
## 2. 权威顺序
|
|
26
32
|
|
|
27
33
|
同一事项冲突时按下列顺序裁决:
|
|
28
34
|
|
|
29
35
|
1. 用户最新明确决定;
|
|
30
|
-
2.
|
|
31
|
-
3.
|
|
32
|
-
4.
|
|
33
|
-
5.
|
|
34
|
-
6.
|
|
35
|
-
7.
|
|
36
|
+
2. 当前 change 已接受的架构决策:`<Path>{roots.state}/specdev/changes/{change}/ADR.md</Path>`;
|
|
37
|
+
3. 永久 ADR 与领域上下文:`<Path>{roots.state}/specdev/adr/</Path>`、`<Path>{roots.state}/specdev/context/</Path>`;
|
|
38
|
+
4. 当前外部行为权威:`<Path>{roots.state}/specdev/changes/{change}/spec.md</Path>`;
|
|
39
|
+
5. 当前 Ticket 契约:`<Path>{roots.state}/specdev/changes/{change}/ticket/{ticket-file}.md</Path>`;
|
|
40
|
+
6. 当前跨 Ticket 编排:`<Path>{roots.state}/specdev/changes/{change}/goal-plan.md</Path>`;
|
|
41
|
+
7. 当前代码与运行事实;
|
|
42
|
+
8. 旧计划、旧日志和未经确认的推断。
|
|
43
|
+
|
|
44
|
+
当前 change 决定与永久知识冲突时,必须在 LOG/ADR 中显式说明替代关系;它只约束当前 change,直到 A 决定是否提升并更新永久版本。
|
|
45
|
+
|
|
46
|
+
`<Path>{roots.state}/specdev/changes/{change}/source.md</Path>` 只对“原始输入是什么”具有权威;后续用户决定、ADR 和 Spec 可以显式演进该意图。远程来源在摄入后发生变化不会自动改写本地合同,必须重新 Triage。
|
|
36
47
|
|
|
37
48
|
代码事实可以证明计划已过时,但不能静默改写用户目标或已接受契约。出现这种情况时,按 `<Path>{roots.workflows}/specdev/common/rules/deviation-control.md</Path>` 退回相应工件修订。
|
|
38
49
|
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Change Completion
|
|
2
|
+
|
|
3
|
+
本规则是 change 从 active/blocked 转为 completed 的唯一合同,并由 Implement、Goal Plan、Triage、Status 与 Archive 共同读取。
|
|
4
|
+
|
|
5
|
+
## 完成门
|
|
6
|
+
|
|
7
|
+
一个 change 只有同时满足以下条件才能设置 `change_status: completed`:
|
|
8
|
+
|
|
9
|
+
1. 所有计划内 Ticket 为 `done`,或有明确批准理由的 `cancelled`;无 Ticket 的 Direct Spec/非实现流程有等价的验收清单。
|
|
10
|
+
2. 每个完成行为有 Evidence,全部 Spec 验收合同和适用 Goal Gate 可定位。
|
|
11
|
+
3. 项目级验证通过;既有或环境失败已分类、接受并记录风险。
|
|
12
|
+
4. 迁移、发布、监控、回滚和不可逆批准已完成或明确不适用。
|
|
13
|
+
5. 没有未批准 deviation、未处置 blocker 或伪装成通过的 `unverified` 声明。
|
|
14
|
+
6. Ticket、Map、Goal Plan、Evidence、源码 checkpoint 和 change 状态一致。
|
|
15
|
+
|
|
16
|
+
## 转换 Owner
|
|
17
|
+
|
|
18
|
+
- Goal Plan 含完整 `## Delegated Execution Addendum`:Lead 在独立验收并关闭最后一个 Gate 后拥有完成转换。
|
|
19
|
+
- Goal Plan 不含委派附录,或无 Goal Plan 的 Ticket/Direct Spec 实现:最后一个计划内 Implement 在最后一项验收通过后拥有完成转换。
|
|
20
|
+
- 非实现型终点:最后一个拥有最终验收工件的 Work 使用本规则完成转换。
|
|
21
|
+
|
|
22
|
+
Owner 原子更新 `<Path>{roots.state}/specdev/changes/{change}/.status.json</Path>` 的 `change_status`、`completed_at`、`updated_at` 和 `current_work`,然后重读验证。全局 `<Path>{roots.state}/specdev/status.json</Path>` 继续只保存 active 索引,不复制完成详情。
|
|
23
|
+
|
|
24
|
+
## 远程来源与归档
|
|
25
|
+
|
|
26
|
+
远程动作不参与本地完成判定。完成后若 `<Path>{roots.state}/specdev/changes/{change}/triage.md</Path>` 的 `external_action` 为 `pending-close` 或 `close-failed`,下一路线是 Triage reconcile;`closed`、`waived` 或 `not-applicable` 才允许 Archive 移动 change。归档后工件只读,不在归档目录补写远程结果。
|
|
27
|
+
|
|
28
|
+
## 完成标准
|
|
29
|
+
|
|
30
|
+
- 完成声明可以从本地工件和实际验证重建;
|
|
31
|
+
- 当前 change 只有一个条件命中的转换 owner;
|
|
32
|
+
- 远程失败不会把 completed 改回 active;
|
|
33
|
+
- Archive 不接收尚未 reconcile 或 waive 的远程来源。
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
## 1. 偏差等级
|
|
6
6
|
|
|
7
7
|
- **local**:只改变局部实现,不改变 Ticket 的行为、范围、公共契约、路径所有权或验证;记录到 Evidence 后可继续。
|
|
8
|
-
- **ticket**:改变 Ticket 的执行路线、可写范围、局部契约或验收映射,但不改变 Spec;必须停止相关修改、更新 Ticket
|
|
8
|
+
- **ticket**:改变 Ticket 的执行路线、可写范围、局部契约或验收映射,但不改变 Spec;必须停止相关修改、更新 Ticket 并获得该 Ticket 或计划明确的批准 owner 同意。
|
|
9
9
|
- **spec**:改变外部行为、范围、用户故事、验收合同或非功能要求;必须返回 `<Path>{roots.workflows}/specdev/S-spec/S-spec.md</Path>`。
|
|
10
10
|
- **architecture**:改变已接受架构决策或公共架构约束;必须返回 `<Path>{roots.workflows}/specdev/G-grill-with-docs/G-grill-with-docs.md</Path>` 并更新 `<Path>{roots.state}/specdev/changes/{change}/ADR.md</Path>`。
|
|
11
11
|
- **release**:改变迁移、兼容窗口、发布门禁、回滚或不可逆批准点;必须停止并获得明确人工批准。
|
|
@@ -40,4 +40,4 @@
|
|
|
40
40
|
|
|
41
41
|
- 未批准的 ticket、spec、architecture 或 release 偏差不得继续实现。
|
|
42
42
|
- 不得通过扩大 `writable_paths`、删除测试、降低断言或把风险改写成“已知限制”来绕过停止。
|
|
43
|
-
-
|
|
43
|
+
- 偏差影响普通并行执行时,当前集成 owner 必须暂停受影响 Wave,重新计算路径所有权、依赖和 Gate;委派执行由 Lead 承担同一责任。
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
4. 可重复手动步骤、截图或查询结果;
|
|
25
25
|
5. 代码阅读推断。
|
|
26
26
|
|
|
27
|
-
E2E
|
|
27
|
+
E2E 仅在变更影响用户界面交互时加入验证矩阵。普通执行由当前实现或集成 owner 运行;委派执行中 Worker 只记录场景、预期结果和待执行状态,由 Lead 在集成阶段运行。API、CLI、后端、库或数据变更默认使用其稳定接缝,不追加 E2E。
|
|
28
28
|
|
|
29
29
|
低层证据不能替代明确要求的用户行为证据。高风险迁移还需要 dry-run、调用点扫描、数据核对、监控信号或回滚演练。
|
|
30
30
|
|
|
@@ -23,13 +23,13 @@ shared_paths: ["<Path>package.json</Path>"]
|
|
|
23
23
|
1. 可能并行的 Ticket,其 `writable_paths` 不得相交。
|
|
24
24
|
2. glob 与具体路径按覆盖关系判断,不得只比较字符串。
|
|
25
25
|
3. 根依赖清单、锁文件、根导出、共享 schema、迁移索引、全局路由和跨 Ticket 合同文件默认视为 shared。
|
|
26
|
-
4. shared path
|
|
26
|
+
4. shared path 只能由专用 owner Ticket 或 Goal Plan 明确指定的唯一集成 owner 修改;消费者 Ticket 只读。委派 Goal Plan 可以把该 owner 指定为 Lead,但普通计划不预设角色。
|
|
27
27
|
5. 需要越界时先停止,按 `<Path>{roots.workflows}/specdev/common/rules/deviation-control.md</Path>` 提出 ownership change;不得先改后报。
|
|
28
28
|
6. 前置 Ticket 改变目录结构后,后续 Ticket 开始前重新解析项目路径;若授权范围语义未改变,可只更新导航路径。
|
|
29
29
|
7. 不得把“最后解决合并冲突”当作所有权方案。
|
|
30
30
|
|
|
31
31
|
## 3. Worktree 与分支
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
需要并行或临时隔离项目写入时使用独立 worktree;只读调查和顺序执行默认共用当前工作区。Worktree 防止工作区污染,路径所有权防止逻辑冲突,两者不能互相替代。
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
生命周期由调用方明确的 workspace owner 按 `<Path>{roots.workflows}/specdev/common/skills/dev-worktree/SKILL.md</Path>` 管理。普通 Goal Plan 由当前执行或集成 owner 负责;委派 Goal Plan 才把 workspace owner 映射为 Lead。编排规则位于 `<Path>{roots.workflows}/specdev/P-goal-plan/orchestration-protocol.md</Path>`。
|
|
@@ -145,6 +145,49 @@
|
|
|
145
145
|
}
|
|
146
146
|
},
|
|
147
147
|
"allOf": [
|
|
148
|
+
{
|
|
149
|
+
"if": {
|
|
150
|
+
"properties": {
|
|
151
|
+
"worktrees": {
|
|
152
|
+
"contains": {
|
|
153
|
+
"properties": {
|
|
154
|
+
"provider": {
|
|
155
|
+
"const": "git"
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
"required": [
|
|
159
|
+
"provider"
|
|
160
|
+
]
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
"then": {
|
|
166
|
+
"properties": {
|
|
167
|
+
"worktrees": {
|
|
168
|
+
"items": {
|
|
169
|
+
"if": {
|
|
170
|
+
"properties": {
|
|
171
|
+
"provider": {
|
|
172
|
+
"const": "git"
|
|
173
|
+
}
|
|
174
|
+
},
|
|
175
|
+
"required": [
|
|
176
|
+
"provider"
|
|
177
|
+
]
|
|
178
|
+
},
|
|
179
|
+
"then": {
|
|
180
|
+
"properties": {
|
|
181
|
+
"workspace_ref": {
|
|
182
|
+
"pattern": "^specdev-worktree/T-[0-9]{2,}$"
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
},
|
|
148
191
|
{
|
|
149
192
|
"if": {
|
|
150
193
|
"properties": {
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "urn:speculo:specdev:code-review:v1",
|
|
4
|
+
"title": "SpecDev Code Review Frontmatter",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["schema_version", "artifact", "change", "review_id", "fixed_point", "head", "status", "standards_result", "specification_result", "spec_sources", "standards_sources", "created_at"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"schema_version": {"const": 1},
|
|
9
|
+
"artifact": {"const": "code-review"},
|
|
10
|
+
"change": {"type": "string", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}-[a-z0-9]+(?:-[a-z0-9]+)*$"},
|
|
11
|
+
"review_id": {"type": "string", "pattern": "^CR-[0-9]{3,}$"},
|
|
12
|
+
"fixed_point": {"type": "string", "minLength": 7},
|
|
13
|
+
"head": {"type": "string", "minLength": 7},
|
|
14
|
+
"status": {"enum": ["approved", "request-changes", "blocked"]},
|
|
15
|
+
"standards_result": {"enum": ["pass", "request-changes", "skipped"]},
|
|
16
|
+
"specification_result": {"enum": ["pass", "request-changes", "skipped"]},
|
|
17
|
+
"spec_sources": {"type": "array", "items": {"type": "string"}, "uniqueItems": true},
|
|
18
|
+
"standards_sources": {"type": "array", "items": {"type": "string"}, "uniqueItems": true},
|
|
19
|
+
"created_at": {"type": "string", "minLength": 1}
|
|
20
|
+
},
|
|
21
|
+
"additionalProperties": true
|
|
22
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "urn:speculo:specdev:diagnosis:v1",
|
|
4
|
+
"title": "SpecDev Diagnosis Frontmatter",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["schema_version", "artifact", "change", "status", "feedback_loop_ready", "red_command", "red_evidence", "cleanup_status", "updated_at"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"schema_version": {"const": 1},
|
|
9
|
+
"artifact": {"const": "diagnosis"},
|
|
10
|
+
"change": {"type": "string", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}-[a-z0-9]+(?:-[a-z0-9]+)*$"},
|
|
11
|
+
"status": {"enum": ["reproducing", "minimizing", "testing-hypotheses", "root-cause-confirmed", "blocked"]},
|
|
12
|
+
"feedback_loop_ready": {"type": "boolean"},
|
|
13
|
+
"red_command": {"type": ["string", "null"]},
|
|
14
|
+
"red_evidence": {"type": ["string", "null"]},
|
|
15
|
+
"cleanup_status": {"enum": ["pending", "clean", "registered"]},
|
|
16
|
+
"updated_at": {"type": "string", "minLength": 1}
|
|
17
|
+
},
|
|
18
|
+
"additionalProperties": true
|
|
19
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "urn:speculo:specdev:prototype-record:v1",
|
|
4
|
+
"title": "SpecDev Prototype Record Frontmatter",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["schema_version", "artifact", "change", "prototype_id", "question", "branch", "status", "workspace_ref", "project_paths", "assets", "winner", "promotion_target", "cleanup_status", "updated_at"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"schema_version": {"const": 1},
|
|
9
|
+
"artifact": {"const": "prototype-record"},
|
|
10
|
+
"change": {"type": "string", "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}-[a-z0-9]+(?:-[a-z0-9]+)*$"},
|
|
11
|
+
"prototype_id": {"type": "string", "pattern": "^PROTO-[0-9]{3,}$"},
|
|
12
|
+
"question": {"type": "string", "minLength": 1},
|
|
13
|
+
"branch": {"enum": ["logic", "ui"]},
|
|
14
|
+
"status": {"enum": ["active", "answered", "blocked", "discarded"]},
|
|
15
|
+
"workspace_ref": {"type": "string", "minLength": 1, "pattern": "^(?!/)(?![A-Za-z]:[\\\\/]).+"},
|
|
16
|
+
"project_paths": {"type": "array", "items": {"type": "string"}, "uniqueItems": true},
|
|
17
|
+
"assets": {"type": "array", "items": {"type": "string"}, "uniqueItems": true},
|
|
18
|
+
"winner": {"type": ["string", "null"]},
|
|
19
|
+
"promotion_target": {"type": ["string", "null"]},
|
|
20
|
+
"cleanup_status": {"enum": ["pending", "clean", "registered"]},
|
|
21
|
+
"updated_at": {"type": "string", "minLength": 1}
|
|
22
|
+
},
|
|
23
|
+
"additionalProperties": true
|
|
24
|
+
}
|