@namewta/speculo 0.7.2 → 0.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/src/migrations.js +604 -23
- package/dist/src/migrations.js.map +1 -1
- package/package.json +1 -1
- package/template/canonical/canonical-specdev-engineering-cognitive-mentor.md +171 -455
- package/template/canonical/canonical-specdev-goal-plan.md +686 -1117
- package/template/canonical/canonical-specdev-grill-with-docs.md +172 -456
- package/template/canonical/canonical-specdev-spec.md +199 -493
- package/template/canonical/canonical-specdev-tickets.md +378 -597
- package/template/canonical/canonical-specdev-wayfinder.md +170 -454
- package/template/skills/migrate-runtime-state/SKILL.md +6 -6
- package/template/skills/migrate-runtime-state/references/migration-contract.md +9 -3
- package/template/skills/migrate-runtime-state/scripts/migrate-runtime-state.mjs +322 -33
- package/template/workflows/specdev/I-implement/I-implement.md +97 -143
- package/template/workflows/specdev/I-implement/evidence-template.md +60 -48
- package/template/workflows/specdev/I-implement/execution-preflight.md +29 -21
- package/template/workflows/specdev/I-implement/merge-conflict-protocol.md +12 -12
- package/template/workflows/specdev/I-init-setup/I-init-setup.md +4 -5
- package/template/workflows/specdev/I-init-setup/change-status-template.json +14 -1
- package/template/workflows/specdev/I-init-setup/config-template.json +3 -5
- package/template/workflows/specdev/I-init-setup/status-template.json +1 -1
- package/template/workflows/specdev/INDEX.md +11 -8
- package/template/workflows/specdev/P-goal-plan/P-goal-plan.md +76 -102
- package/template/workflows/specdev/P-goal-plan/completion-control.md +26 -44
- package/template/workflows/specdev/P-goal-plan/goal-plan-template.md +40 -37
- package/template/workflows/specdev/P-goal-plan/lead-orchestration.md +34 -0
- package/template/workflows/specdev/P-goal-plan/orchestration-protocol.md +31 -46
- package/template/workflows/specdev/P-goal-plan/planning-modes.md +42 -76
- package/template/workflows/specdev/T-tickets/T-tickets.md +6 -3
- package/template/workflows/specdev/T-tickets/ticket-readiness.md +5 -3
- package/template/workflows/specdev/T-tickets/ticket-template.md +8 -1
- package/template/workflows/specdev/T-tickets/tickets-map-template.md +5 -4
- package/template/workflows/specdev/_state/status.json +1 -1
- package/template/workflows/specdev/common/README.md +2 -2
- package/template/workflows/specdev/common/rules/change-completion.md +17 -20
- package/template/workflows/specdev/common/rules/deviation-control.md +1 -1
- package/template/workflows/specdev/common/rules/evidence-and-verification.md +27 -37
- package/template/workflows/specdev/common/rules/path-ownership.md +21 -23
- package/template/workflows/specdev/common/rules/readiness-and-depth.md +1 -1
- package/template/workflows/specdev/common/schemas/change-status.schema.json +136 -373
- package/template/workflows/specdev/common/schemas/config.schema.json +9 -11
- package/template/workflows/specdev/common/schemas/goal-plan.schema.json +24 -16
- package/template/workflows/specdev/common/schemas/status.schema.json +7 -63
- package/template/workflows/specdev/common/skills/dev-worktree/SKILL.md +42 -21
- package/template/workflows/specdev/common/skills/dev-worktree/references/create.md +36 -21
- package/template/workflows/specdev/common/skills/dev-worktree/references/finalize.md +46 -18
- package/template/workflows/specdev/common/skills/subagent-delivery/SKILL.md +34 -31
- package/template/workflows/specdev/common/skills/subagent-delivery/references/external-web-subagent.md +10 -23
- package/template/workflows/specdev/common/skills/subagent-delivery/references/native-subagent.md +15 -25
- package/template/workflows/specdev/common/tools/validate-specdev.mjs +386 -209
- package/template/workflows/specdev/I-implement/delegated-evidence-template.md +0 -12
- package/template/workflows/specdev/P-goal-plan/delegated-execution-template.md +0 -35
- package/template/workflows/specdev/P-goal-plan/delegated-execution.md +0 -59
- package/template/workflows/specdev/P-goal-plan/workspace-execution-template.md +0 -24
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
# Delegated Evidence Addendum
|
|
2
|
-
|
|
3
|
-
Goal Plan 使用 `coordination_mode: lead-team` 时,把以下字段加入对应 Ticket Evidence;旧计划按完整 `## Delegated Execution Addendum` 兼容推导。`single-session` 不生成本附录或空占位。
|
|
4
|
-
|
|
5
|
-
- **Execution model / Provider:** native-subagent / external-web-subagent;`<provider>`
|
|
6
|
-
- **Mutation role / Workspace allocation:** read-only / lead-write / worker-write;`<allocation-or-current>`
|
|
7
|
-
- **Session/Package locator:** `<portable-locator>`
|
|
8
|
-
- **Dispatch / Final checkpoint:** `<sha-or-fixed-baseline>` / `<sha-or-fixed-baseline>`
|
|
9
|
-
- **Correction rounds:** `<count>`
|
|
10
|
-
- **Candidate delivery verification:** 范围、附件 hash、声明与独立核对结果
|
|
11
|
-
- **Lead E2E:** 不适用 / 待执行:场景与预期 / 通过 / 失败
|
|
12
|
-
- **Unverified claims:** 无 / `<items-and-reason>`
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
## Delegated Execution Addendum
|
|
2
|
-
|
|
3
|
-
### Delivery Contract
|
|
4
|
-
|
|
5
|
-
| 字段 | 值 |
|
|
6
|
-
|---|---|
|
|
7
|
-
| Execution model | native-subagent / external-web-subagent |
|
|
8
|
-
| Lead / Provider | `<owner>` / `<provider>` |
|
|
9
|
-
| Repository / Source baseline | `<repository-or-local>` / `<immutable-checkpoint>` |
|
|
10
|
-
| Checkpoint policy | immutable SHA / equivalent fixed baseline |
|
|
11
|
-
| Source delivery | repository-url / source-package / combination |
|
|
12
|
-
| Max concurrency / corrections | `<n>` / `3` |
|
|
13
|
-
| Review | standards + spec + Lead verification + conditional E2E |
|
|
14
|
-
| Mutation policy | read-only / lead-write / worker-write;worker-write 必须引用隔离 workspace |
|
|
15
|
-
|
|
16
|
-
### Per-Ticket Dispatch Packets
|
|
17
|
-
|
|
18
|
-
#### Dispatch: T-01
|
|
19
|
-
|
|
20
|
-
- **Goal / observable result:**
|
|
21
|
-
- **Priority on conflict:** correctness > contract completeness > speed,或当前项目裁决
|
|
22
|
-
- **Implement / Ticket:** `<Path>{roots.workflows}/specdev/I-implement/I-implement.md</Path>`;`<Path>{roots.state}/specdev/changes/{change}/ticket/01-<name>.md</Path>`
|
|
23
|
-
- **Authority / dependencies:** 相关合同、ADR/CONTEXT、已完成依赖 Evidence
|
|
24
|
-
- **Wave / Gate / hard constraints:**
|
|
25
|
-
- **Writable / read-only / shared owner:**
|
|
26
|
-
- **Mutation role / workspace allocation:** read-only / lead-write / worker-write;current 或对应 isolated allocation
|
|
27
|
-
- **Baseline / workspace or session locator / package hash:**
|
|
28
|
-
- **Preflight receipt:** 在 `<Path>{roots.state}/specdev/changes/{change}/evidence/T-01.md</Path>` 记录目标、顺序、最大风险和基线差异,不超过 10 行
|
|
29
|
-
- **Verification / baseline / reverse check:**
|
|
30
|
-
- **Authorization / deviation / correction limit:**
|
|
31
|
-
- **Return:** 状态、Evidence、locator、最终 checkpoint、commit/PR、未验证项、待 Lead E2E
|
|
32
|
-
|
|
33
|
-
### Candidate Delivery Return and Lead Acceptance
|
|
34
|
-
|
|
35
|
-
Worker 将 Ticket 推进到 `review` 并返回候选交付;Lead 负责独立验证、适用 E2E、候选验收和 Gate 判断。Git 集成只在独立 workspace 合同指定 Lead 为 integration owner 时发生;达到修正上限时保留最后可信 checkpoint、失败命令、已通过行为和恢复条件。
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
# Goal Plan 委派执行协议
|
|
2
|
-
|
|
3
|
-
只有用户在本次 P-goal-plan 运行中明确选择 `coordination_mode: lead-team` 时加载。该分支启用唯一 Lead 与 native/external Worker,但不决定 workspace strategy;Agent Team 可以只做只读分工,也可以与独立 worktree 组合。
|
|
4
|
-
|
|
5
|
-
## 1. Lead 与 Delivery Contract
|
|
6
|
-
|
|
7
|
-
Lead 负责源码基线、DAG、Wave、shared owner、Gate、权限、Evidence 汇总和最终验收;已派发写入 Ticket 的实现由对应执行者负责,Lead 不制造双重 owner。只有 workspace addendum 将 Lead 指定为 integration owner 时,Lead 才拥有对应 Git 集成。
|
|
8
|
-
|
|
9
|
-
委派分支选择唯一 execution model:`native-subagent` 或 `external-web-subagent`。Lead 以 `operation=plan` 调用 `<Path>{roots.workflows}/specdev/common/skills/subagent-delivery/SKILL.md</Path>` 生成里程碑 Delivery Contract;Implement 阶段以 `operation=execute` 调用同一 Skill 做恢复和验收。
|
|
10
|
-
|
|
11
|
-
Delivery Contract 必须固定:
|
|
12
|
-
|
|
13
|
-
- execution model、Lead、provider 和可恢复 workspace/session locator;
|
|
14
|
-
- repository、branch、不可变 checkpoint 与源码交付方式;
|
|
15
|
-
- 最大并发和默认 3 轮的 `max_correction_rounds`;
|
|
16
|
-
- 标准轴、规范轴、Lead 独立验证和条件性 E2E;
|
|
17
|
-
- local changes、commit、push、PR、merge、deploy、migration 和生产动作的逐项授权;
|
|
18
|
-
- 完成、阻塞、偏差、恢复和返回协议。
|
|
19
|
-
|
|
20
|
-
每个 Dispatch Packet 必须标记 mutation role:
|
|
21
|
-
|
|
22
|
-
- `read-only`:Worker 只返回调查、审查、测试观察或建议;可用于任何 workspace strategy;
|
|
23
|
-
- `lead-write`:Lead 是该 Ticket 唯一写入者,可在 current 或分配给自己的 worktree 执行;
|
|
24
|
-
- `worker-write`:Worker 拥有 Ticket 写入,必须引用 Isolated Workspace Addendum 中唯一的 branch、`workspace_ref` 和 integration owner,不得写入 current workspace。
|
|
25
|
-
|
|
26
|
-
多个 Worker 需要项目写入时,workspace 决策通常会因 `parallel-write` 触发 worktree,但触发来自写入事实而不是 Lead Team 身份。Worktree 生命周期继续由角色中立的 dev-worktree Skill 管理。
|
|
27
|
-
|
|
28
|
-
## 2. Dispatch Packet
|
|
29
|
-
|
|
30
|
-
每个计划 Ticket 都生成一个可独立投递的 Dispatch Packet,至少包含:
|
|
31
|
-
|
|
32
|
-
1. Ticket ID、目标、可观察完成结果和优先级冲突裁决;
|
|
33
|
-
2. `<Path>{roots.workflows}/specdev/I-implement/I-implement.md</Path>` 与具体 Ticket;
|
|
34
|
-
3. 相关 Spec 合同、ADR/CONTEXT 条目、Wave、Gate 和不可协商约束;
|
|
35
|
-
4. 已完成依赖及其 Evidence;
|
|
36
|
-
5. 项目 writable/read-only/shared 路径与唯一 shared owner;
|
|
37
|
-
6. mutation role、workspace allocation、`base_sha`、workspace/session locator 和 source package hash;
|
|
38
|
-
7. 必跑验证、基线、反向验证和明确不适用项;
|
|
39
|
-
8. 当前授权、偏差升级、修正上限、Evidence 路径和返回字段。
|
|
40
|
-
|
|
41
|
-
派单块将不可违反项写为 Hard Constraints,将低影响实现自由写为 Guidance。执行者先核对 checkpoint、项目指令、路径和验证命令,再在 Ticket Evidence 写入不超过 10 行的开工回执。事实不一致时停止受影响路径并升级。
|
|
42
|
-
|
|
43
|
-
## 3. 候选交付、Evidence 与 Lead 集成
|
|
44
|
-
|
|
45
|
-
Worker 完成或阻塞时写入 Ticket Evidence,同步状态,并向 Lead 返回 Ticket ID、Evidence、workspace/session locator、最终 checkpoint、commit/PR、未验证项和条件性 Lead E2E。
|
|
46
|
-
|
|
47
|
-
Lead 接收候选交付时:
|
|
48
|
-
|
|
49
|
-
1. 读取 Dispatch Packet、Ticket、Evidence、Goal Plan 和代码引用;
|
|
50
|
-
2. 检查 checkpoint、附件 hash、路径授权、依赖和敏感信息边界;
|
|
51
|
-
3. 按 mutation role 和 workspace allocation 核对交付,在声明基线上复跑定向验证和受影响回归;
|
|
52
|
-
4. 仅当 UI 交互受影响时运行最小 E2E;
|
|
53
|
-
5. provider 声明、模拟结果和静态推断在独立证据前保持 `unverified`;
|
|
54
|
-
6. 验证通过后接受候选交付;存在 `terminal_action=integrate` 的 workspace 时交给其 integration owner 自动本地集成,否则按 current workspace 或 retain 合同继续;
|
|
55
|
-
7. 同步 Ticket、Map、Evidence 和 Goal Plan,检查 Gate 是否可关闭。
|
|
56
|
-
|
|
57
|
-
同一验收项达到修正上限时标记 blocker,记录最后 checkpoint、错误、已通过行为、责任方和恢复条件。
|
|
58
|
-
|
|
59
|
-
**完成标准**:完整委派附录包含唯一 Lead、完整 Delivery Contract、每 Ticket Dispatch Packet、mutation role 和候选交付验收协议;它不隐式创建 worktree,任何一部分缺失都不得视为 Ready。
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
## Isolated Workspace Addendum
|
|
2
|
-
|
|
3
|
-
只在 `workspace_strategy: worktree` 或 `workspace_strategy: mixed` 时加入。它独立于 Agent Team:单会话和 Lead Team 都可加载本附录。
|
|
4
|
-
|
|
5
|
-
### Workspace Decision
|
|
6
|
-
|
|
7
|
-
| 字段 | 值 |
|
|
8
|
-
|---|---|
|
|
9
|
-
| Strategy | worktree / mixed |
|
|
10
|
-
| Trigger | parallel-write / protect-local-state / disposable-experiment / background-resume / provider-requirement / user-requested |
|
|
11
|
-
| Current-workspace writer | `<primary-session-or-lead>` |
|
|
12
|
-
| Integration serialization | 每次只允许一个 integration owner 修改目标父分支 |
|
|
13
|
-
|
|
14
|
-
### Per-Ticket Workspace Allocation
|
|
15
|
-
|
|
16
|
-
| Ticket | Trigger and evidence | Implementation owner | Integration owner | Provider | Base SHA | Parent branch | Branch / workspace ref | Terminal action |
|
|
17
|
-
|---|---|---|---|---|---|---|---|---|
|
|
18
|
-
| T-01 | `<allowed-trigger>: <observed-fact>` | `<owner>` | `<owner>` | git / native / external | `<immutable-sha>` | `<parent-branch>` | `<branch>` / `<portable-locator>` | integrate / retain |
|
|
19
|
-
|
|
20
|
-
### Local Integration Authorization
|
|
21
|
-
|
|
22
|
-
`terminal_action=integrate` 持久授权 integration owner 执行本 Ticket 的本地 fast-forward,或在分叉时完成 `git add`、`git merge --continue` 和一次集成专用 merge commit。普通实现提交、push、PR、远端 merge、部署、迁移以及删除 branch/worktree 不从该授权继承。
|
|
23
|
-
|
|
24
|
-
来源 checkpoint、路径审计和验证通过后才可从 `review` 进入 `integrating`。集成成功写入 result SHA 与 Evidence;失败时中止正在进行的 merge、保留来源 workspace,并记录 blocker 和恢复条件。
|