@namewta/speculo 0.7.1 → 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.
Files changed (57) hide show
  1. package/README.md +2 -1
  2. package/dist/src/migrations.js +604 -23
  3. package/dist/src/migrations.js.map +1 -1
  4. package/package.json +1 -1
  5. package/template/canonical/canonical-specdev-engineering-cognitive-mentor.md +171 -277
  6. package/template/canonical/canonical-specdev-goal-plan.md +714 -833
  7. package/template/canonical/canonical-specdev-grill-with-docs.md +172 -278
  8. package/template/canonical/canonical-specdev-spec.md +199 -315
  9. package/template/canonical/canonical-specdev-tickets.md +405 -398
  10. package/template/canonical/canonical-specdev-wayfinder.md +170 -276
  11. package/template/skills/migrate-runtime-state/SKILL.md +6 -6
  12. package/template/skills/migrate-runtime-state/references/migration-contract.md +9 -3
  13. package/template/skills/migrate-runtime-state/scripts/migrate-runtime-state.mjs +322 -33
  14. package/template/skills/optimize-codex-config/SKILL.md +81 -0
  15. package/template/skills/optimize-codex-config/references/configuration-contract.md +103 -0
  16. package/template/skills/optimize-codex-config/references/troubleshooting.md +79 -0
  17. package/template/skills/optimize-codex-config/scripts/audit-codex-config.mjs +747 -0
  18. package/template/workflows/specdev/I-implement/I-implement.md +97 -142
  19. package/template/workflows/specdev/I-implement/evidence-template.md +60 -48
  20. package/template/workflows/specdev/I-implement/execution-preflight.md +29 -19
  21. package/template/workflows/specdev/I-implement/merge-conflict-protocol.md +12 -11
  22. package/template/workflows/specdev/I-init-setup/I-init-setup.md +4 -5
  23. package/template/workflows/specdev/I-init-setup/change-status-template.json +14 -1
  24. package/template/workflows/specdev/I-init-setup/config-template.json +3 -5
  25. package/template/workflows/specdev/I-init-setup/status-template.json +1 -1
  26. package/template/workflows/specdev/INDEX.md +12 -8
  27. package/template/workflows/specdev/P-goal-plan/P-goal-plan.md +76 -93
  28. package/template/workflows/specdev/P-goal-plan/completion-control.md +26 -44
  29. package/template/workflows/specdev/P-goal-plan/goal-plan-template.md +43 -31
  30. package/template/workflows/specdev/P-goal-plan/lead-orchestration.md +34 -0
  31. package/template/workflows/specdev/P-goal-plan/orchestration-protocol.md +31 -42
  32. package/template/workflows/specdev/P-goal-plan/planning-modes.md +42 -61
  33. package/template/workflows/specdev/T-tickets/T-tickets.md +6 -3
  34. package/template/workflows/specdev/T-tickets/ticket-readiness.md +5 -3
  35. package/template/workflows/specdev/T-tickets/ticket-template.md +8 -1
  36. package/template/workflows/specdev/T-tickets/tickets-map-template.md +5 -4
  37. package/template/workflows/specdev/_state/status.json +1 -1
  38. package/template/workflows/specdev/common/README.md +2 -2
  39. package/template/workflows/specdev/common/rules/change-completion.md +17 -19
  40. package/template/workflows/specdev/common/rules/deviation-control.md +1 -1
  41. package/template/workflows/specdev/common/rules/evidence-and-verification.md +27 -37
  42. package/template/workflows/specdev/common/rules/path-ownership.md +21 -23
  43. package/template/workflows/specdev/common/rules/readiness-and-depth.md +1 -1
  44. package/template/workflows/specdev/common/schemas/change-status.schema.json +136 -195
  45. package/template/workflows/specdev/common/schemas/config.schema.json +9 -11
  46. package/template/workflows/specdev/common/schemas/goal-plan.schema.json +24 -6
  47. package/template/workflows/specdev/common/schemas/status.schema.json +7 -63
  48. package/template/workflows/specdev/common/skills/dev-worktree/SKILL.md +42 -21
  49. package/template/workflows/specdev/common/skills/dev-worktree/references/create.md +48 -18
  50. package/template/workflows/specdev/common/skills/dev-worktree/references/finalize.md +47 -12
  51. package/template/workflows/specdev/common/skills/subagent-delivery/SKILL.md +34 -30
  52. package/template/workflows/specdev/common/skills/subagent-delivery/references/external-web-subagent.md +10 -23
  53. package/template/workflows/specdev/common/skills/subagent-delivery/references/native-subagent.md +14 -25
  54. package/template/workflows/specdev/common/tools/validate-specdev.mjs +507 -117
  55. package/template/workflows/specdev/I-implement/delegated-evidence-template.md +0 -11
  56. package/template/workflows/specdev/P-goal-plan/delegated-execution-template.md +0 -33
  57. package/template/workflows/specdev/P-goal-plan/delegated-execution.md +0 -53
@@ -1,11 +0,0 @@
1
- # Delegated Evidence Addendum
2
-
3
- Goal Plan 含完整 `## Delegated Execution Addendum` 时,把以下字段加入对应 Ticket Evidence;普通执行不生成本附录或空占位。
4
-
5
- - **Execution model / Provider:** native-subagent / external-web-subagent;`<provider>`
6
- - **Session/Package locator:** `<portable-locator>`
7
- - **Dispatch / Final checkpoint:** `<sha-or-fixed-baseline>` / `<sha-or-fixed-baseline>`
8
- - **Correction rounds:** `<count>`
9
- - **Candidate delivery verification:** 范围、附件 hash、声明与独立核对结果
10
- - **Lead E2E:** 不适用 / 待执行:场景与预期 / 通过 / 失败
11
- - **Unverified claims:** 无 / `<items-and-reason>`
@@ -1,33 +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 / Branch | `<repository-or-local>` / `<branch>` |
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
-
15
- ### Per-Ticket Dispatch Packets
16
-
17
- #### Dispatch: T-01
18
-
19
- - **Goal / observable result:**
20
- - **Priority on conflict:** correctness > contract completeness > speed,或当前项目裁决
21
- - **Implement / Ticket:** `<Path>{roots.workflows}/specdev/I-implement/I-implement.md</Path>`;`<Path>{roots.state}/specdev/changes/{change}/ticket/01-<name>.md</Path>`
22
- - **Authority / dependencies:** 相关合同、ADR/CONTEXT、已完成依赖 Evidence
23
- - **Wave / Gate / hard constraints:**
24
- - **Writable / read-only / shared owner:**
25
- - **Baseline / branch / workspace or session locator / package hash:**
26
- - **Preflight receipt:** 在 `<Path>{roots.state}/specdev/changes/{change}/evidence/T-01.md</Path>` 记录目标、顺序、最大风险和基线差异,不超过 10 行
27
- - **Verification / baseline / reverse check:**
28
- - **Authorization / deviation / correction limit:**
29
- - **Return:** 状态、Evidence、locator、最终 checkpoint、commit/PR、未验证项、待 Lead E2E
30
-
31
- ### Candidate Delivery Return and Lead Integration
32
-
33
- Worker 将 Ticket 推进到 `review` 并返回候选交付;Lead 负责独立验证、适用 E2E、集成、Gate 关闭和 worktree 收尾。达到修正上限时保留最后可信 checkpoint、失败命令、已通过行为和恢复条件。
@@ -1,53 +0,0 @@
1
- # Goal Plan 委派执行协议
2
-
3
- 只有用户在本次 P-goal-plan 运行中选择委派 Goal Plan 时加载。该分支同时启用唯一 Lead 与 native/external subagent;不支持 Lead-only,也不把本协议用于普通 Goal Plan。
4
-
5
- ## 1. Lead 与 Delivery Contract
6
-
7
- Lead 负责源码基线、DAG、Wave、shared owner、Gate、权限、Evidence 汇总和集成;已派发 Ticket 的实现由对应执行者负责,Lead 不制造双重 owner。
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
- 并行写代码且配置允许时,Lead 为每个 Ticket 调用 `<Path>{roots.workflows}/specdev/common/skills/dev-worktree/SKILL.md</Path>`。所有并行 Ticket 固定同一 `base_sha`,每个 Ticket 使用独立分支和 `workspace_ref`;Lead 创建、恢复、集成和清理,Worker 只推进到 `review`。
21
-
22
- ## 2. Dispatch Packet
23
-
24
- 每个计划 Ticket 都生成一个可独立投递的 Dispatch Packet,至少包含:
25
-
26
- 1. Ticket ID、目标、可观察完成结果和优先级冲突裁决;
27
- 2. `<Path>{roots.workflows}/specdev/I-implement/I-implement.md</Path>` 与具体 Ticket;
28
- 3. 相关 Spec 合同、ADR/CONTEXT 条目、Wave、Gate 和不可协商约束;
29
- 4. 已完成依赖及其 Evidence;
30
- 5. 项目 writable/read-only/shared 路径与唯一 shared owner;
31
- 6. `base_sha`、branch、workspace/session locator 和 source package hash;
32
- 7. 必跑验证、基线、反向验证和明确不适用项;
33
- 8. 当前授权、偏差升级、修正上限、Evidence 路径和返回字段。
34
-
35
- 派单块将不可违反项写为 Hard Constraints,将低影响实现自由写为 Guidance。执行者先核对 checkpoint、项目指令、路径和验证命令,再在 Ticket Evidence 写入不超过 10 行的开工回执。事实不一致时停止受影响路径并升级。
36
-
37
- ## 3. 候选交付、Evidence 与 Lead 集成
38
-
39
- Worker 完成或阻塞时写入 Ticket Evidence,同步状态,并向 Lead 返回 Ticket ID、Evidence、workspace/session locator、最终 checkpoint、commit/PR、未验证项和条件性 Lead E2E。
40
-
41
- Lead 接收候选交付时:
42
-
43
- 1. 读取 Dispatch Packet、Ticket、Evidence、Goal Plan 和代码引用;
44
- 2. 检查 checkpoint、附件 hash、路径授权、依赖和敏感信息边界;
45
- 3. 在隔离基线上应用交付并复跑定向验证和受影响回归;
46
- 4. 仅当 UI 交互受影响时运行最小 E2E;
47
- 5. provider 声明、模拟结果和静态推断在独立证据前保持 `unverified`;
48
- 6. 验证通过后集成,并按 dev-worktree Skill 更新或清理 worktree;
49
- 7. 同步 Ticket、Map、Evidence 和 Goal Plan,检查 Gate 是否可关闭。
50
-
51
- 同一验收项达到修正上限时标记 blocker,记录最后 checkpoint、错误、已通过行为、责任方和恢复条件。
52
-
53
- **完成标准**:完整委派附录包含唯一 Lead、完整 Delivery Contract、每 Ticket Dispatch Packet 和候选交付验收协议;任何一部分缺失都不得视为 Ready。