easy-coding-harness 0.10.0-beta.4 → 0.10.0-beta.5

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/CHANGELOG.md CHANGED
@@ -6,6 +6,36 @@
6
6
  - `y`:常规功能升级
7
7
  - `z`:日常 bug 修复
8
8
 
9
+ ## 0.10.0-beta.5
10
+
11
+ - 兼容新版 `easy-dev-spec/v1` 共享执行区:同步设计/整文双摘要与 execution 投影协议,新增
12
+ 单一共享 writer,将 Canonical Task、Step 和 dependency 的实施、验证、完成与取消结果
13
+ 写回原 Spec;本地 `execution.jsonl` 继续保存完整门禁证据。
14
+ - Canonical 绑定改为 `design_sha256 + document_sha256 + execution_revision`:执行进度更新不再
15
+ 误判为方案漂移;CAS 冲突只在设计未变时自动重试一次,稳定幂等键避免重复事件,pending
16
+ 写回可通过 `reconcile-spec-execution` 对账,revision 回退会被硬拦截。
17
+ - 支持用户显式选择项目外 Spec 绝对路径,并提供身份严格校验的 `rebind-spec-source`;静态
18
+ 设计调整必须 revision 恰好 +1、重新 READY 并调用 `sync-spec-design`,受影响任务及后继
19
+ 状态重置后回到 ANALYSIS,禁止手工编辑 `EDS:EXECUTION`。
20
+ - ANALYSIS→IMPLEMENT 只启动依赖已满足的来源任务;IMPLEMENT 按通过的本地测试证据回写
21
+ Step/implemented,REVIEW 写回阻塞,VERIFICATION 写回 verified,MEMORY→COMPLETE 自动
22
+ 写回 completed,关闭任务写回 cancelled。共享写回与 Git 提交/推送保持相互独立。
23
+ - 共享事件统一记录为 `easy-coding / <Agent> with Easy Coding`;单槽 pending 禁止被不同动作
24
+ 覆盖,可重试 CAS 冲突保留现场,旧设计动作、幂等键载荷冲突和确定性状态错误会清槽解锁。
25
+ result 只消费当前 `in_progress` 尝试之后的 dispatch/严格成功证据,repair 只重开 blocked
26
+ 来源任务;设计同步同时淘汰受影响依赖证据和旧实现指纹,本地 task.json 使用原子替换。
27
+
28
+ - 将日常任务记忆与架构维护解耦:每个代码任务只生成不可变短期记忆;仅当长期记忆触发
29
+ `distill` 时才执行独立架构评估,并默认选择 `no-op`,避免为了更新而更新。
30
+ - MEMORY 状态 API 新增冻结式架构评估契约和 `memory-architecture-assessment` 命令,记录
31
+ `action / trigger / reason / evidence / affected_sections`,并用 ABSTRACT 与架构 CHANGELOG
32
+ 指纹校验 `no-op / backfill / update` 的实际文件结果;评估失败时不得消费短期候选。
33
+ - 架构更新只接受模块边界、职责/依赖方向、核心流程、技术栈/运行基础设施或现有 ABSTRACT
34
+ 与稳定事实冲突等证据;普通 Bug 修复、字段/DTO 调整、局部重构、临时方案和例行依赖升级
35
+ 不触发更新。稳定编码约定只沉淀为 RULES 更新候选,不静默改写知识约束。
36
+ - 初创项目首个实质任务若缺失 ABSTRACT,可通过 `missing-abstract` 例外在未触发长期蒸馏时
37
+ 完成一次 `backfill`;0.10.0-beta.5 前已冻结的 MEMORY 指令及旧 MEMORY_LONG 恢复路径保持兼容。
38
+
9
39
  ## 0.10.0-beta.4
10
40
 
11
41
  - ANALYSIS 完成后不再向会话回贴整份 `dev-spec.md`,改为展示核心方案、验收摘要、
package/README.md CHANGED
@@ -101,7 +101,8 @@ any stage --[user abort via ec-task-close]--> CLOSED
101
101
 
102
102
  Harness 可选择性消费 easy-dev-spec 生成的单文件 `easy-dev-spec/v1` Canonical Spec:
103
103
 
104
- 1. `ec-workflow` 先只读检查 manifest、仓库、任务 DAG、依赖和 baseline,不创建任务。
104
+ 1. `ec-workflow` 先只读检查 manifest、仓库、任务 DAG、依赖、baseline 与共享 execution;
105
+ 旧 Spec 仍可只读检查,但成为可执行任务前必须初始化共享执行区。
105
106
  2. 用户明确选择一个或多个 Spec task;`select-dev-spec-scope` 按仓库提取确定性消费
106
107
  闭包,Harness 不默认导入整份 Spec,也不会读取未选任务正文。
107
108
  3. 一次选择创建一个 Harness task;ANALYSIS 使用最终 producer READY 门禁,并将
@@ -110,9 +111,12 @@ Harness 可选择性消费 easy-dev-spec 生成的单文件 `easy-dev-spec/v1` C
110
111
  4. `hard` 依赖决定执行顺序,冻结的 `contract` 依赖允许并行编码,`integration` 依赖
111
112
  在证据闭合前阻止全链路完成。
112
113
 
113
- Canonical Spec 是只读设计源;`.easy-coding/tasks/<task-id>/` 下的 `dev-spec.md`、
114
- `execution.jsonl` `test-strategy.md` 是绑定来源 SHA-256 的运行时派生物,不会把开发
115
- 进度写回源 Spec。无 Canonical manifest 的历史 Dev-Spec 继续走原有整文分析流程。
114
+ Canonical Spec 的静态设计由 design revision + `design_sha256` 冻结;共享
115
+ `EDS:EXECUTION` 则接收 Harness Task/Step/dependency 投影。写回使用
116
+ `execution_revision` CAS、幂等键和断点对账,执行区变化不会使本地 plan/review/verify
117
+ 指纹失效,设计变化或 revision 回滚仍会阻塞。显式项目外路径受支持,迁移后只能通过
118
+ 身份一致的 rebind 修复定位。静态设计调整必须 revision +1、READY 并执行 `sync-design`;
119
+ 机器执行区禁止手工编辑。无 Canonical manifest 的历史 Dev-Spec 继续走原有整文分析流程。
116
120
 
117
121
  ## Supermodule 模型
118
122
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easy-coding-harness",
3
- "version": "0.10.0-beta.4",
3
+ "version": "0.10.0-beta.5",
4
4
  "description": "CLI scaffold for installing Easy Coding harness files into agent-native directories.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -191,7 +191,9 @@ agent must be able to see what was generated and on what evidence.
191
191
  - TEST_STRATEGY.md (skeleton for the chosen framework)
192
192
  3. **Skip ABSTRACT.md** — no architecture exists yet. Note in init_log:
193
193
  "ABSTRACT pending; ec-memory backfills after the first substantive task." (ec-memory
194
- detects the missing file during MEMORY and generates it from the then-current code.)
194
+ detects the missing file during MEMORY and uses the explicit `missing-abstract` assessment
195
+ exception to generate it from the then-current code. This one-time backfill does not enable
196
+ routine per-task architecture updates.)
195
197
  4. Memory migration probe and memory init, same as iterative steps 5-7.
196
198
  5. Recommend: design first with `{{skill_trigger}}ec-brainstorming`, then build via
197
199
  `{{skill_trigger}}ec-workflow`.
@@ -83,30 +83,38 @@ context window, a task survives session end and agent switches with zero informa
83
83
 
84
84
  ## Canonical Spec integration
85
85
 
86
- An `easy-dev-spec/v1` Canonical Spec is a read-only design source, not progress storage.
86
+ An `easy-dev-spec/v1` Canonical Spec separates frozen static design from a shared execution ledger.
87
87
  `inspect-dev-spec` validates the document with the protocol implementation pinned from
88
88
  `easy-dev-spec@7eb9b64`; after explicit task selection, `select-dev-spec-scope` returns one
89
89
  deterministic producer-compatible closure per repository, and `create-task-from-spec` creates one
90
- Harness task with the source ID/revision/SHA, selected task IDs, portable repository bindings,
90
+ Harness task with source locator mode, ID/design revision and digest, document digest, execution
91
+ revision, selected task IDs, repository bindings,
91
92
  baseline classifications, and dependency evidence.
92
93
 
93
94
  ANALYSIS derives local `dev-spec.md`, `execution.jsonl`, and `test-strategy.md` for the selected
94
95
  consumption closure. Canonical-backed units keep repository, source task/steps, files, symbols,
95
96
  and test commands. Hard dependencies shape the Unit DAG, READY contracts can run in parallel,
96
- and integration dependencies block end-to-end completion until evidence is recorded. The source
97
- Canonical Spec is never rewritten with Harness runtime state.
97
+ and integration dependencies block end-to-end completion until evidence is recorded. Harness
98
+ keeps detailed evidence locally and projects cross-application Task/Step/dependency outcomes into
99
+ `EDS:EXECUTION` through one CAS/idempotent writer. Static changes use revision + READY +
100
+ `sync-spec-design`; agents never hand-edit the machine ledger. Explicit external locators are
101
+ allowed and rebind only by exact Canonical identity.
98
102
 
99
103
  ## Memory system
100
104
 
101
105
  Short memory: one schema-v2 file per task, sliding window (max 10, keep 5). Long memory:
102
106
  three files (index + business + technical), distilled from out-of-window short memories with
103
- explicit conflict resolution. ABSTRACT.md is backfilled/updated when memory distillation
104
- detects an architecture change.
107
+ explicit conflict resolution. Daily tasks only produce facts. When distillation runs, MEMORY
108
+ performs a separate, default-no-op architecture assessment and updates only affected ABSTRACT
109
+ sections when frozen evidence proves the architecture cognition is stale. A missing ABSTRACT
110
+ after the first substantive startup task is the only non-distillation backfill exception.
105
111
 
106
112
  ## Project knowledge — four layers
107
113
 
108
114
  Identity (SOUL, rarely changes) · Constraints (RULES, stable) · Cognition (ABSTRACT, updated
109
- on architecture change) · Memory (short + long, updated every task). ec-workflow always reads
115
+ only after evidence-backed architecture assessment) · Memory (short every task, long only on
116
+ distillation). Stable convention changes become RULES candidates in technical memory, never
117
+ silent RULES edits. ec-workflow always reads
110
118
  SOUL + RULES + recent short memory; ec-analysis loads ABSTRACT and matching long memory on
111
119
  demand.
112
120
 
@@ -22,8 +22,10 @@ Communicate with the user in the user's language.
22
22
  dependency or risk.
23
23
 
24
24
  For a task with `task.json.spec_source`, re-run `inspect-dev-spec` against the stored source and
25
- every stored `task.repo_paths` repository binding. The schema, spec ID, revision, and SHA-256
26
- must still match. Then call the read-only selector for the exact stored selection:
25
+ every stored `task.repo_paths` repository binding. Schema, Spec ID, design revision, and
26
+ `design_sha256` must still match. A changed `document_sha256` with the same design is normal
27
+ shared progress; refresh `execution_revision` without invalidating plan/review/verify evidence.
28
+ An execution revision rollback is blocking. Then call the selector for the exact selection:
27
29
 
28
30
  ```bash
29
31
  {{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py inspect-dev-spec \
@@ -70,6 +72,7 @@ Execution plan records use:
70
72
  ```json
71
73
  {
72
74
  "type": "plan",
75
+ "spec_design_sha256": "<Canonical design digest; omit for ordinary tasks>",
73
76
  "strategy": "single|sequential|parallel",
74
77
  "units": [{
75
78
  "id": "U1",
@@ -99,7 +102,8 @@ units together must cover every source step exactly once. Map selected hard depe
99
102
  `parallel_groups`.
100
103
 
101
104
  Canonical-backed `dev-spec.md`, `execution.jsonl`, and `test-strategy.md` are runtime-derived
102
- evidence, not a second maintained Spec. Record the source path/ID/revision/SHA, selected tasks
105
+ evidence, not a second maintained Spec. Record the source path/path mode/ID/design revision and
106
+ digest, current document digest/execution revision/writeback status, selected tasks
103
107
  and repositories, baseline/conflict result, Unit mapping, source test mapping, and pending
104
108
  integration edges.
105
109
 
@@ -233,5 +237,11 @@ controls waiting; it never changes the selected execution depth.
233
237
  - No final summary, workflow proposal, or transition while a material decision is unresolved.
234
238
  - No transition without exactly one `decision_status: closed` marker in `dev-spec.md`.
235
239
  - No transition without a valid workflow proposal.
236
- - No Canonical-backed transition with changed source SHA, unresolved repository identity,
240
+ - No Canonical-backed transition with changed design revision/digest, a backward execution
241
+ revision, pending/conflicted writeback, unresolved repository identity,
237
242
  incomplete selected-task coverage, or an open Unit/Step/File/Symbol/Test traceability gap.
243
+
244
+ If evidence requires changing Canonical task boundaries, contracts, files, symbols, Steps, Tests,
245
+ or dependencies, remain/return to ANALYSIS, update the original static design with revision +1,
246
+ restore READY, and call `sync-spec-design --affected-task ...`. This invalidates the old local
247
+ plan. Never substitute edits to the derived `dev-spec.md`, and never edit `EDS:EXECUTION` by hand.
@@ -62,7 +62,13 @@ with `.easy-coding/sessions/` always excluded. The CLI already added it to `.git
62
62
  - Do not commit `spec/dev/` unless the user explicitly asks.
63
63
  - Do not omit managed `easy-coding upgrade` changes merely because they were created outside
64
64
  the current agent turn.
65
- - Never modify or stage the source Canonical Spec merely to record Harness execution progress.
65
+ - Shared Canonical execution writeback and Git delivery are independent facts. Do not stage or
66
+ commit a project-external Spec automatically. For a Spec inside a Git repository, include it
67
+ only when the user's requested commit scope and normal repository rules include it; never claim
68
+ shared writeback merely because Git succeeded, or Git delivery merely because writeback
69
+ succeeded.
70
+ - Never hand-edit `EDS:EXECUTION`. Static Spec changes are valid only through design revision +
71
+ READY + `sync-spec-design`; runtime progress uses the shared writer commands.
66
72
  - In a supermodule task launched from the parent root, parent `.easy-coding/` belongs to the
67
73
  parent git. Child `.easy-coding/memory/` changes created by memory archive belong to the
68
74
  owning child git and must be committed before the parent gitlink update.
@@ -97,13 +97,18 @@ Sub-agents never dispatch other sub-agents or read `.easy-coding` workflow asset
97
97
  ## Architecture {pre-digested ABSTRACT sections}
98
98
  ## Output
99
99
  status:"completed", repo_id|null, source_task_id|null, changed_files[], summary,
100
- deliverable|null, issues:[], needs_attention:[]
100
+ deliverable|null, checks:[{command,passed,failures:[]}], issues:[], needs_attention:[]
101
101
  ```
102
102
 
103
103
  ## Dispatch and result loop
104
104
 
105
105
  1. Append a `dispatch` record before work begins. Canonical-backed records include `repo_id` and
106
106
  `source_task_id`; resolve every file relative to `task.repo_paths[repo_id]` before dispatch.
107
+ Before dispatching a selected task that is not already `in_progress`, call
108
+ `writeback-spec-task --status in_progress` with a key stable for that dispatch/recovery
109
+ attempt but distinct from any earlier accepted `in_progress` event. Do this only after its
110
+ hard/contract dependencies are ready; do not batch-start dependent tasks at the initial
111
+ IMPLEMENT boundary.
107
112
  Populate `Code Comments` on every code task card with the resolved user-facing host Agent
108
113
  author value and the field/member/constant rules above; sub-agents do not read this Skill.
109
114
  2. Execute according to dependency order and selected owner.
@@ -113,10 +118,20 @@ deliverable|null, issues:[], needs_attention:[]
113
118
  4. Append one `result` record. Only a successful unit uses `status:"completed"`; include
114
119
  unresolved issues rather than hiding them, and do not advance while `issues` or
115
120
  `needs_attention` is non-empty.
121
+ For Canonical-backed success, write each owned source Step `completed` through
122
+ `writeback-spec-step`, with passed evidence for every bound Canonical Test ID and a stable key.
123
+ After every source Step for that task is complete, write the task `implemented`. On failure,
124
+ write the affected Step `failed`; the shared writer moves its task to `blocked`. Local evidence
125
+ is appended first, shared projection second, and the returned acknowledgment last.
116
126
  5. If a result changes a cross-unit contract, stop dependent units and return to ANALYSIS.
117
127
  6. For parallel units, detect overlapping writes before advancing.
118
128
  7. If implementation needs a file, symbol, repository, or source step outside the mapped
119
129
  Canonical change set, stop and return to ANALYSIS instead of expanding scope implicitly.
130
+ 8. If a static Canonical change is confirmed, revise the original design by exactly one revision
131
+ and use `sync-spec-design`; never edit the machine-owned execution block. If a writeback was
132
+ interrupted, run `reconcile-spec-execution` with the stored idempotent pending action.
133
+ Reconciliation only consumes dispatch/result evidence created after the current `in_progress`
134
+ acknowledgment; it never opens a new repair attempt or reuses an earlier attempt's result.
120
135
 
121
136
  Do not emit a progress message for every trivial edit. Report at unit boundaries to reduce
122
137
  conversation overhead while keeping work observable.
@@ -3,10 +3,17 @@ name: ec-memory
3
3
  description: MEMORY-stage skill. Creates a workflow-mode-aware schema-v2 checkpoint from existing task evidence and performs conditional long-memory distillation.
4
4
  ---
5
5
 
6
- # ec-memory — evidence-derived checkpoint
6
+ # ec-memory — evidence-derived checkpoint and knowledge governance
7
7
 
8
- MEMORY remains mandatory for code tasks. It must not re-analyze the repository or repeat the
9
- entire conversation. Generate from `task.json`, `dev-spec.md`, and `execution.jsonl`.
8
+ MEMORY remains mandatory for code tasks. Daily task processing and architecture maintenance are
9
+ separate responsibilities: every completed code task produces one immutable short-memory fact;
10
+ only a long-memory distillation, or the explicit missing-ABSTRACT startup exception, may open an
11
+ architecture assessment. Never update architecture merely because MEMORY was entered.
12
+
13
+ The short-memory checkpoint must not re-analyze the repository or repeat the entire conversation.
14
+ Generate it only from the verified evidence already stored in `task.json`, `dev-spec.md`, and
15
+ `execution.jsonl`. The bounded repository reads described below belong only to a required
16
+ `backfill` or `update` architecture assessment.
10
17
 
11
18
  ## Depth by workflow mode
12
19
 
@@ -37,5 +44,60 @@ Ask the state API for `memory-instruction`. Distill only when it returns `action
37
44
  otherwise record `no-op`. Long memory receives reusable facts only, not file dumps, transient
38
45
  logs, routine command output, or speculation.
39
46
 
47
+ ## Architecture assessment
48
+
49
+ Read the frozen `architecture_assessment` contract returned by `memory-instruction`.
50
+
51
+ - `required:false`: do not read the repository for architecture purposes and do not modify
52
+ `.easy-coding/ABSTRACT.md` or `.easy-coding/CHANGELOG.md`.
53
+ - `trigger:distillation`: finish classifying the frozen `candidate_files`, then assess whether
54
+ their stable, reusable facts make the current architecture cognition stale. Default to
55
+ `no-op`.
56
+ - `trigger:missing-abstract`: use `backfill` after the first substantive startup task even when
57
+ long-memory action is `no-op`. This is the only non-distillation architecture exception.
58
+
59
+ An architecture `update` is justified only by evidence of at least one of these changes:
60
+
61
+ - a module was added, removed, split, or merged;
62
+ - module responsibility, ownership, or dependency direction changed;
63
+ - a core request, data, state, or event flow changed;
64
+ - the technology stack, runtime, build, or deployment infrastructure changed;
65
+ - the existing ABSTRACT conflicts with verified current facts.
66
+
67
+ Do not update for a bug fix, local implementation detail, DTO/field-only change, local refactor,
68
+ temporary workaround, routine dependency patch, or the mere fact that distillation ran. Stable
69
+ new coding conventions belong in `TECHNICAL.md` as explicit RULES update candidates; never
70
+ silently edit `RULES.md`, `SOUL.md`, or `TEST_STRATEGY.md` from MEMORY.
71
+
72
+ For `no-op`, use only the frozen memory evidence and give a concrete reason. For `backfill` or
73
+ `update`, read only candidate-related modules, entrypoints, dependencies, and affected ABSTRACT
74
+ sections. Do not perform an unbounded repository re-analysis. Create or edit only the affected
75
+ sections of `.easy-coding/ABSTRACT.md`, and create or append `.easy-coding/CHANGELOG.md`; never
76
+ regenerate the whole ABSTRACT when a bounded edit is sufficient.
77
+
78
+ Whenever `required:true`, record the decision through the command below. For distillation this
79
+ must succeed before deleting any candidate; for `missing-abstract` it must succeed before the
80
+ `no-op` long-memory action can complete:
81
+
82
+ ```bash
83
+ {{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py memory-architecture-assessment \
84
+ --session-file <P> --action <no-op|backfill|update> --reason <reason> \
85
+ --evidence <frozen-memory-file> [--evidence <frozen-memory-file> ...] \
86
+ [--affected-section <section> ...] --agent <agent-id>
87
+ ```
88
+
89
+ `backfill` and `update` require affected sections; `no-op` must not declare them. Evidence must
90
+ come from the frozen candidate set, or from the current checkpoint for the missing-ABSTRACT
91
+ exception. If assessment or architecture-file validation fails, keep every candidate file and
92
+ remain in MEMORY.
93
+
94
+ After the assessment succeeds, a distillation may delete all frozen `candidate_files` while
95
+ preserving every `kept_file`. Then call `memory-complete`. The state API rechecks that no-op
96
+ assets stayed unchanged, changed assets still match the recorded assessment, all candidates were
97
+ consumed, and all retained memories still exist.
98
+
40
99
  Complete processing with `memory-complete`. When the state API reports
41
100
  `memory_progress.completed:true`, call `auto-transition --stage COMPLETE`.
101
+ For Canonical-backed tasks this automatic edge first writes every verified selected source task
102
+ to shared `completed`; pending integration dependencies or failed writeback keep the task in
103
+ MEMORY. Do not claim COMPLETE from local memory state alone.
@@ -69,6 +69,12 @@ Verdict:
69
69
  In-scope defects are fixed automatically. Ask the user only for a new design choice, changed
70
70
  public contract, or contradiction with a confirmed decision.
71
71
 
72
+ For Canonical-backed review, append the local review record first. Any blocking finding then
73
+ writes the owning source task `blocked` through `writeback-spec-task`, referencing the local
74
+ record. A passed review does not change shared task status. A `replan` verdict returns to ANALYSIS;
75
+ confirmed static Spec changes use revision + READY + `sync-spec-design` rather than edits to the
76
+ derived plan or machine execution block.
77
+
72
78
  ## Evidence record
73
79
 
74
80
  Append one final record per executed dimension for the current implementation fingerprint.
@@ -22,6 +22,9 @@ when you recognize abandonment intent in the user's message.
22
22
  `{{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py close-current --session-file <P> --reason "<reason>" --agent <agent-id>`.
23
23
  This sets `task.json.status` to `CLOSED`, records `closed_reason`, updates history, and
24
24
  clears session `current_task` so the next hook injection returns to Ready.
25
+ For Canonical-backed work, the same command first projects every unfinished selected task to
26
+ shared `cancelled` (using an intermediate `blocked` transition when required). A shared writer
27
+ failure leaves the Harness task open; never close only the local side.
25
28
  Use the returned `status_context` as the authoritative status source for the rest of the
26
29
  current turn.
27
30
  4. **No memory flow.** Do not run MEMORY. An incomplete task's memory is dirty data.
@@ -34,6 +37,7 @@ when you recognize abandonment intent in the user's message.
34
37
 
35
38
  - Never delete task folders — CLOSED tasks stay as a record.
36
39
  - Never run the memory/archive flow.
40
+ - Never hand-edit the Canonical execution region to force cancellation.
37
41
  - This skill closes the `current_task`. If the user wants to close a different (suspended)
38
42
  task, they should first switch to it via ec-workflow, then invoke ec-task-close.
39
43
  - Division of labor: ec-task-management lists/creates (read-only panel), ec-workflow runs the
@@ -16,7 +16,8 @@ Call the state API snapshot and show:
16
16
  - task `concrete_workflow_mode` and frozen TDD state when present;
17
17
  - harness enabled/disabled state;
18
18
  - active and resumable tasks.
19
- - for Canonical-backed tasks: source Spec ID/revision/SHA, selected task IDs, repository
19
+ - for Canonical-backed tasks: source locator/path mode, Spec ID/design revision/design digest,
20
+ document digest, execution revision, writeback status, selected task IDs, repository
20
21
  bindings/baseline status, and pending dependency evidence.
21
22
 
22
23
  Mode inspection and configuration belongs to `ec-config`. If the user asks to change Approval,
@@ -32,3 +33,8 @@ When creating from a Canonical Spec, call `inspect-dev-spec`, display the comple
32
33
  dependency selection, then call `select-dev-spec-scope` and `create-task-from-spec` only after
33
34
  explicit user selection. Multiple selected Spec tasks still create one Harness task, while the
34
35
  selector returns one deterministic consumption closure per selected repository.
36
+ Initialize missing shared execution before creation. Support `rebind-spec-source` only when the
37
+ new file matches schema + spec_id + design revision + design_sha256 and does not roll execution
38
+ revision backward. A pending writeback is repaired with `reconcile-spec-execution`, never by
39
+ editing the execution JSON block or starting a different writeback. A deterministic rejected
40
+ action is cleared with `status:error`; correct its input instead of replaying it.
@@ -77,7 +77,10 @@ and a non-empty `not_applicable_reason`; it does not count as the required appli
77
77
  check, and must not be represented by an invented successful command.
78
78
 
79
79
  Record failures in `failures[]`. If any current-fingerprint record fails, return to IMPLEMENT;
80
- do not append a later synthetic pass without rerunning the failed command.
80
+ do not append a later synthetic pass without rerunning the failed command. For a Canonical-backed
81
+ failure, append the local verify record first, then write the owning source task `blocked` with a
82
+ concise reference to that record. The repair transition automatically reopens blocked source tasks
83
+ only; unaffected implemented tasks retain their latest shared conclusion.
81
84
 
82
85
  ## Coverage and acceptance
83
86
 
@@ -116,6 +119,13 @@ tasks remain separate evidence records. In `strict`, every involved repository i
116
119
  records all four check types; a repository-specific non-applicable record still needs its reason
117
120
  and source ownership.
118
121
 
122
+ After all current-fingerprint local checks pass for a Canonical source task, call
123
+ `writeback-spec-task --status verified`. Include passed `kind:"test"` evidence for every bound
124
+ Canonical Test ID plus concise references to local review/build/coverage records. The subsequent
125
+ VERIFICATION -> MEMORY application requires every selected shared task to be `verified` or
126
+ `completed`; remote CI remains outside this acceptance gate. If writeback is interrupted, run
127
+ `reconcile-spec-execution` before requesting the transition.
128
+
119
129
  Record the exact integration edge only after its evidence exists:
120
130
 
121
131
  ```bash
@@ -67,13 +67,17 @@ plan decision; Auto continues immediately. Both remove later waiting, not qualit
67
67
  chooses one or more tasks and resolves repository paths or omitted hard-dependency evidence,
68
68
  call `create-task-from-spec` once for the complete selection. A document without a Canonical
69
69
  manifest remains a legacy ANALYSIS input for an ordinary task. A malformed, DRAFT, or otherwise
70
- non-READY Canonical Spec stays blocked and must never be downgraded to the legacy route. Never
71
- edit the source Spec.
70
+ non-READY Canonical Spec stays blocked and must never be downgraded to the legacy route. A
71
+ READY Canonical Spec without shared execution remains readable, but run
72
+ `initialize-spec-execution` before selection can become an executable Harness task.
72
73
 
73
74
  ```bash
74
75
  {{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py inspect-dev-spec \
75
76
  --spec <path> [--repo-path <repo-id>=<path>]...
76
77
 
78
+ {{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py initialize-spec-execution \
79
+ --spec <path>
80
+
77
81
  {{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py select-dev-spec-scope \
78
82
  --spec <path> --spec-task <task-id> [--spec-task <task-id>]...
79
83
 
@@ -90,6 +94,10 @@ plan decision; Auto continues immediately. Both remove later waiting, not qualit
90
94
 
91
95
  When multiple selected tasks depend on the same target, disambiguate creation evidence with
92
96
  `<source-task-id>-><dependency-task-id>=<evidence>`.
97
+ Explicit project-external Spec files are supported and stored as absolute locators. If that
98
+ locator moves, use `rebind-spec-source`; never guess by basename. Shared execution progress is
99
+ written only through state API writer commands. Static design edits require revision + READY +
100
+ `sync-spec-design`; never hand-edit the `EDS:EXECUTION` region.
93
101
  4. When the user explicitly invokes `ec-tdd-init`, let that skill own preflight and create a
94
102
  `type=tdd-init` code task only after scope confirmation. Do not reinterpret it as an ordinary
95
103
  TDD-enabled feature task and do not require readiness before creating it.
@@ -120,6 +128,12 @@ plan decision; Auto continues immediately. Both remove later waiting, not qualit
120
128
  - `MEMORY`: dispatch `ec-memory`.
121
129
  - `COMPLETE` / `CLOSED`: report terminal status and clear stale session ownership.
122
130
 
131
+ For a Canonical-backed task whose snapshot reports pending writeback, call
132
+ `reconcile-spec-execution` before dispatching the stage. Do not advance locally while shared
133
+ writeback remains pending or conflicted. A deterministic writer rejection reports `error` and
134
+ clears the pending action so the corrected action can proceed; never overwrite a different
135
+ pending action.
136
+
123
137
  ## Boundary handling
124
138
 
125
139
  Use `request-transition` for a boundary that requires approval, then present the complete
@@ -87,6 +87,11 @@ First run `ec-init`; daily work goes through `ec-workflow`.
87
87
  - REVIEW and VERIFICATION are fingerprinted hard gates. Review evidence must match the final
88
88
  implementation; verification evidence must match final implementation and config. The frozen
89
89
  workflow mode selects targeted, impacted, or full commands without weakening the green gate.
90
+ - Canonical-backed tasks bind static validity to design revision + `design_sha256`, while
91
+ `document_sha256` and `execution_revision` may advance through shared writer commands. Project-
92
+ external explicit Spec paths are allowed and may be repaired only with identity-checked rebind.
93
+ Runtime progress must use the shared writer with CAS/idempotency and reconciliation; static
94
+ design changes require revision + READY + `sync-spec-design`. Never hand-edit `EDS:EXECUTION`.
90
95
  - MEMORY combines short-memory creation and the conditional long-memory gate. Entry follows the
91
96
  effective confirmation mode; once memory processing completes, COMPLETE is automatic.
92
97
  - NO CODE-TASK COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE.
@@ -106,6 +111,8 @@ First run `ec-init`; daily work goes through `ec-workflow`.
106
111
  creates the project-init task — agent skills perform all project analysis.
107
112
  - Cross-repo references in git-tracked task artifacts use repo NAMES, never local paths.
108
113
  Cache local paths only through the state script so they land on the current task.
114
+ - Shared Canonical writeback is a stage gate but not proof of Git commit/push, and Git delivery is
115
+ not proof of writeback. Keep those facts and scopes separate.
109
116
  {{supermodule_boundary}}
110
117
 
111
118
  <!-- ═══ end easy-coding-harness generated ═══ -->
@@ -85,6 +85,11 @@ First run `/ec-init`; daily work goes through `/ec-workflow`.
85
85
  - REVIEW and VERIFICATION are fingerprinted hard gates. Review evidence must match the final
86
86
  implementation; verification evidence must match final implementation and config. The frozen
87
87
  workflow mode selects targeted, impacted, or full commands without weakening the green gate.
88
+ - Canonical-backed tasks bind static validity to design revision + `design_sha256`, while
89
+ `document_sha256` and `execution_revision` may advance through shared writer commands. Project-
90
+ external explicit Spec paths are allowed and may be repaired only with identity-checked rebind.
91
+ Runtime progress must use the shared writer with CAS/idempotency and reconciliation; static
92
+ design changes require revision + READY + `sync-spec-design`. Never hand-edit `EDS:EXECUTION`.
88
93
  - MEMORY combines short-memory creation and the conditional long-memory gate. Entry follows the
89
94
  effective confirmation mode; once memory processing completes, COMPLETE is automatic.
90
95
  - NO CODE-TASK COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE.
@@ -104,6 +109,8 @@ First run `/ec-init`; daily work goes through `/ec-workflow`.
104
109
  creates the project-init task — agent skills perform all project analysis.
105
110
  - Cross-repo references in git-tracked task artifacts use repo NAMES, never local paths.
106
111
  Cache local paths only through the state script so they land on the current task.
112
+ - Shared Canonical writeback is a stage gate but not proof of Git commit/push, and Git delivery is
113
+ not proof of writeback. Keep those facts and scopes separate.
107
114
  {{supermodule_boundary}}
108
115
 
109
116
  <!-- ═══ end easy-coding-harness generated ═══ -->
@@ -30,7 +30,9 @@ decision_status: [[EC_TODO:仅当所有实质性问题均已解决并回填后
30
30
  - **确认依据**:[[EC_TODO:用户答复、冻结 Spec、现有代码证据或“无额外决策”]]
31
31
 
32
32
  ### Canonical Spec 来源
33
- - **来源**:[[EC_TODO:非 Canonical 任务写“无”;否则填写 repo-relative path、spec_idrevision、SHA-256]]
33
+ - **来源定位**:[[EC_TODO:非 Canonical 任务写“无”;否则填写 path、path_mode、spec_id 与 design revision]]
34
+ - **设计 / 文档摘要**:[[EC_TODO:非 Canonical 任务写“无”;否则填写 design_sha256、document_sha256]]
35
+ - **共享执行状态**:[[EC_TODO:非 Canonical 任务写“无”;否则填写 execution_revision、writeback 状态及是否需要 reconcile]]
34
36
  - **选择任务 / 仓库**:[[EC_TODO:非 Canonical 任务写“无”;否则填写 selected task IDs 与 repo IDs]]
35
37
  - **消费闭包**:[[EC_TODO:非 Canonical 任务写“无”;否则填写 contracts、direct dependencies、changes、steps、tests 摘要]]
36
38
  - **基线与冲突**:[[EC_TODO:非 Canonical 任务写“无”;否则逐仓填写 exact/scope-unchanged/scope-drifted/baseline-unavailable 及处理结论]]