easy-coding-harness 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.
@@ -1,12 +1,13 @@
1
1
  ---
2
2
  name: ec-verification
3
- description: VERIFICATION-stage skill — the hard gate between REVIEW and archive. Use when ec-workflow enters VERIFICATION. Runs lint/typecheck/test in parallel, verifies coverage against test-strategy, gates on fresh evidence, then drives the user-acceptance and repair loop. Archive never happens without explicit user acceptance.
3
+ description: VERIFICATION-stage skill — the hard evidence gate between implementation/review and archive. Runs lint/typecheck/test in parallel, verifies coverage against test-strategy, then follows the effective confirm mode for archive or repair.
4
4
  ---
5
5
 
6
6
  # ec-verification — the hard gate
7
7
 
8
- ec-workflow dispatches you when REVIEW returns `accept`. You are the last gate before
9
- archive. Nothing passes on assumption.
8
+ ec-workflow dispatches you when REVIEW returns `accept` or the user explicitly skips REVIEW
9
+ after code IMPLEMENT. Read-only tasks auto-complete from IMPLEMENT and never enter this stage.
10
+ You are the last gate before code-task archive. Nothing passes on assumption.
10
11
 
11
12
  Communicate with the user in the user's language.
12
13
 
@@ -18,10 +19,10 @@ NO COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE
18
19
  - A previous round's result does not count.
19
20
  - "should pass" / "looks correct" is not evidence.
20
21
 
21
- NO AUTO-ARCHIVE WITHOUT USER ACCEPTANCE
22
- - Verification passing does not complete the task.
23
- - The memory flow is part of archive; it runs only after the user accepts.
24
- - An unaccepted task's memory is dirty data.
22
+ NO ARCHIVE WITHOUT A GREEN GATE
23
+ - Verification passing evidence is mandatory in every confirm mode.
24
+ - approve/guard require user acceptance before MEMORY; auto advances after the green gate.
25
+ - Confirmation mode never turns failed or missing evidence into acceptance.
25
26
  ```
26
27
 
27
28
  ## 1. Run the gate (parallel, always sub-agents)
@@ -52,10 +53,10 @@ Append one `verify` record per check:
52
53
 
53
54
  ## 3. Gate decision
54
55
 
55
- - All three pass AND coverage satisfied → present the verification result; wait for user
56
- acceptance. Do NOT archive yet.
57
- - Any failure → append the failing `verify` record, summarize failures, request
58
- VERIFICATION -> IMPLEMENT, and wait at the standard confirmation/handoff/Other gate.
56
+ - All three pass AND coverage satisfied → present the verification result; approve/guard wait
57
+ for user acceptance, while auto hands the green result to ec-workflow for automatic MEMORY.
58
+ - Any failure → append the failing `verify` record, summarize failures, select
59
+ VERIFICATION -> IMPLEMENT, and follow the effective confirm mode.
59
60
 
60
61
  ## 4. User acceptance and repair loop
61
62
 
@@ -63,25 +64,28 @@ After a green gate, present an acceptance summary: what changed (files + summari
63
64
  verification results (lint/type/test), and the coverage status. Then the user takes time to
64
65
  test manually. Their response routes:
65
66
 
66
- - **"accepted"** → request VERIFICATION -> MEMORY and present the standard boundary gate.
67
+ - **"accepted"** (approve/guard) → request VERIFICATION -> MEMORY and present the standard boundary gate.
67
68
  - **"problem here"** → scope judgment against the dev-spec:
68
- - in scope → request VERIFICATION -> IMPLEMENT, then re-REVIEW re-VERIFICATION after
69
- the user confirms each stage edge.
69
+ - in scope → select VERIFICATION -> IMPLEMENT and follow the effective confirm mode; after
70
+ repair, approve presents the IMPLEMENT choice while guard/auto default to REVIEW.
70
71
  - out of scope → propose a new task (`spawned_from` = current task id); the current task
71
72
  may archive now (if already satisfactory) or stay suspended.
72
73
  - **"cancel"** → ec-task-close.
73
74
 
74
75
  Repair sizing: a trivial tweak is fixed and re-verified inside VERIFICATION; a logic/structure
75
- change formally returns to IMPLEMENT and re-walks REVIEW VERIFICATION.
76
+ change formally returns to IMPLEMENT. After repair, present the standard IMPLEMENT completion
77
+ choice again so the user may enter REVIEW or skip directly to VERIFICATION.
76
78
 
77
- ## 5. Archive entry (only after acceptance)
79
+ ## 5. Archive entry
78
80
 
79
- Acceptance does not mutate the stage directly. Hand control to ec-workflow to call
80
- `request-transition --stage MEMORY`, then present:
81
+ In approve/guard, acceptance does not mutate the stage directly. Hand control to ec-workflow
82
+ to call `request-transition --stage MEMORY`, then present:
81
83
  1. Confirm entering MEMORY
82
84
  2. Hand off to another agent
83
85
  3. Other (native free-form Other, or the third text option)
84
86
 
85
87
  Only after confirmation may ec-workflow consume the pending edge and dispatch ec-memory.
88
+ In auto, hand the green gate directly to ec-workflow for `auto-transition --stage MEMORY`.
86
89
  ec-memory owns both short-memory creation and the conditional long-memory gate inside the
87
- single MEMORY stage. It later requests MEMORY -> COMPLETE and waits for a separate confirmation.
90
+ single MEMORY stage. After memory processing completes, MEMORY -> COMPLETE advances
91
+ automatically without another confirmation or handoff gate.
@@ -14,6 +14,10 @@ replies are English.
14
14
 
15
15
  ## Startup sequence (run on every activation, in order)
16
16
 
17
+ If `[easy-coding:no-harness]` is present, do not start or resume this workflow. The current
18
+ session is intentionally using native agent behavior; only `ec-no-harness` may restore Easy
19
+ Coding for that session.
20
+
17
21
  1. **Init guard.** Read `.easy-coding/tasks/project-init/task.json`.
18
22
  - Missing → tell the user to run the `easy-coding init` CLI first. Stop.
19
23
  - `status != "COMPLETE"` → tell the user to run `{{skill_trigger}}ec-init` first. Stop.
@@ -59,36 +63,43 @@ replies are English.
59
63
  4. **New task.** When creating a task (from step 3), create
60
64
  the task through the state API, which creates `task.json`, sets `status:"INIT"`, writes
61
65
  `stage_history`, and sets the session `current_task`:
62
- `{{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py create-task --session-file <P> --task-id <MM-DD-task-slug> --type <type> --title "<one-line summary>" --agent <agent-id>`.
66
+ `{{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py create-task --session-file <P> --task-id <MM-DD-task-slug> --type <feature|bugfix|refactor|perf|doc|analysis|report|workflow> --title "<one-line summary>" --agent <agent-id>`.
63
67
  Use the returned `status_context` as the current status source. Then enter INIT.
64
68
 
65
69
  ## State machine
66
70
 
67
71
  ```
68
- INIT -> ANALYSIS -> IMPLEMENT -> REVIEW -> VERIFICATION -> MEMORY -> COMPLETE
69
- ^ ^ | |
70
- +-- replan ---+ +--- fix -----+
71
- ^ |
72
- +------- repair ----------+
73
- every edge --[explicit user confirmation by default]--> target stage
72
+ INIT --[always auto]--> ANALYSIS -> IMPLEMENT -> REVIEW -> VERIFICATION -> MEMORY --[always auto]--> COMPLETE
73
+ \----------------> VERIFICATION
74
+ \--[read-only, mode-aware]-----------------------> COMPLETE
75
+ ^ ^ | |
76
+ +-- replan ---+ +--- fix -----+
77
+ ^ |
78
+ +------- repair ----------+
79
+ edge behavior --[effective confirm mode: approve / guard / auto]--> target stage
74
80
  any stage --[user abort via ec-task-close]--> CLOSED
75
81
  ```
76
82
 
77
83
  | Stage | Owner skill | What happens | Exit condition |
78
84
  |---|---|---|---|
79
- | INIT | ec-workflow | collect context, settle scope AND delivery form (change code vs. produce a document) | work complete; request ANALYSIS |
80
- | ANALYSIS | ec-analysis | dev-spec + execution plan + test strategy | analysis presented; request IMPLEMENT |
81
- | IMPLEMENT | ec-implementing | code changes per confirmed plan | all units done; request REVIEW |
82
- | REVIEW | ec-reviewing | multi-dimension code review | verdict selects a legal target; request it |
83
- | VERIFICATION | ec-verification | hard gate: lint/typecheck/test + coverage | result selects MEMORY or IMPLEMENT; request it |
84
- | MEMORY | ec-memory | write short memory, then run the conditional long-memory gate | memory work complete; request COMPLETE |
85
- | COMPLETE | ec-workflow | clear current_task, set task status, summary | terminal after user confirms entry |
85
+ | INIT | ec-workflow | collect context, settle scope AND delivery form (change code vs. produce a document) | work complete; auto-transition to ANALYSIS |
86
+ | ANALYSIS | ec-analysis | dev-spec + execution plan; code tasks also get test strategy | mode-aware transition to IMPLEMENT |
87
+ | IMPLEMENT | ec-implementing | code changes or one read-only deliverable | code defaults to REVIEW when automatic; approve may choose VERIFICATION |
88
+ | REVIEW | ec-reviewing | multi-dimension code review | verdict selects a legal mode-aware target |
89
+ | VERIFICATION | ec-verification | hard gate: lint/typecheck/test + coverage | mode-aware transition to MEMORY or IMPLEMENT |
90
+ | MEMORY | ec-memory | write short memory, then run the conditional long-memory gate | memory work complete; auto-transition to COMPLETE |
91
+ | COMPLETE | ec-workflow | clear current_task, set task status, summary | automatic terminal after MEMORY or validated read-only IMPLEMENT |
86
92
  | CLOSED | ec-task-close | user abort; no memory flow | terminal |
87
93
 
88
94
  > **INIT delivery-form rule.** When creating the task, `type` and `title` must faithfully
89
95
  > reflect the delivery form implied by the user's request. A refactor/fix/feature is a CODE
90
96
  > task; do not record it as an analysis/report task. Do not let ANALYSIS later re-interpret a
91
97
  > code task into a documentation-only task — that is a downgrade (see ec-analysis HARD RULE 5).
98
+ > Use `doc`, `analysis`, or `report` only when the user's original request explicitly asks for
99
+ > a no-code deliverable. Those task types may carry execution units with an empty file scope;
100
+ > code task types may not. After its full deliverable is shown, a successful empty-scope task
101
+ > follows the effective confirm mode from IMPLEMENT to COMPLETE; it never creates
102
+ > test-strategy.md or enters REVIEW, VERIFICATION, or MEMORY.
92
103
 
93
104
  ## Task switching
94
105
 
@@ -101,35 +112,54 @@ When the user confirms switching from task A to task B:
101
112
  the user which previous agent owned the task.
102
113
  4. Resume task B's stage via the appropriate stage skill.
103
114
 
104
- No data is lost — task A's dev-spec, execution.jsonl, and test-strategy.md stay intact on
105
- disk. To return to task A later, the same intent routing applies: the user mentions it,
106
- routing matches, and switching happens again.
115
+ No data is lost — task A's dev-spec and execution.jsonl stay intact, as does test-strategy.md
116
+ for a code task. To return to task A later, the same intent routing applies: the user mentions
117
+ it, routing matches, and switching happens again.
107
118
 
108
119
  ## Transition rules (hard)
109
120
 
110
- - **Never skip a stage.** ANALYSIS cannot jump to VERIFICATION; IMPLEMENT cannot start before
111
- the ANALYSIS -> IMPLEMENT confirmation gate passes. No exception for "simple" tasks
112
- simple tasks have short analyses, not skipped ones.
113
- - **Every stage edge is a confirmation gate by default.** Stage completion does NOT change
114
- `task.json.status`. It records a `pending_transition` through the state API, presents the
115
- standard choices below, and stops. This applies to forward edges, repair/replan edges, and
116
- MEMORY -> COMPLETE. Task creation entering INIT and the separately confirmed ec-task-close
117
- flow do not add a redundant second prompt.
118
- - **Native choice first (hard requirement).** After `request-transition` succeeds, you MUST
121
+ - **Code tasks may skip only REVIEW.** ANALYSIS cannot jump to VERIFICATION and code tasks never
122
+ skip VERIFICATION. In `guard` and `auto`, an automatic code path chooses REVIEW as the default
123
+ successor to IMPLEMENT. In `approve`, the user may explicitly choose REVIEW or skip it and
124
+ enter VERIFICATION.
125
+ - **Resolve the effective confirm mode first.** Read `[easy-coding:confirm-mode:X]` or the state
126
+ API snapshot. Session mode overrides project `behavior.confirm_mode`; missing project
127
+ configuration defaults to `guard`.
128
+ - `approve`: every legal edge requires `request-transition` and explicit confirmation except
129
+ INIT -> ANALYSIS and MEMORY -> COMPLETE.
130
+ - `guard` (default): only ANALYSIS -> IMPLEMENT and VERIFICATION -> MEMORY require explicit
131
+ confirmation. Every other legal edge uses `auto-transition` after its owner selects the
132
+ evidence-backed target.
133
+ - `auto`: every legal edge uses `auto-transition`.
134
+ `ec-task-close` remains an explicit user abort and is not triggered by confirm mode.
135
+ - **Confirmation policy changes prompts, not evidence.** No mode chooses product scope,
136
+ delivery form, API contracts, or risk decisions for the user. No mode bypasses dev-spec,
137
+ execution, review, verification, or memory checkpoints.
138
+ - **Always-automatic mechanical edges.** After INIT work completes, call `auto-transition` for
139
+ ANALYSIS. After `memory-complete`, call `auto-transition` for COMPLETE. These two edges never
140
+ create `pending_transition` in any mode.
141
+ - **Native choice first (hard requirement).** When the effective mode requires confirmation,
142
+ call `request-transition`. After it succeeds, you MUST
119
143
  prefer the agent/platform's native user-choice tool whenever one is available. Do not render
120
144
  a plain-text numbered list on a platform that can present selectable options and a free-form
121
145
  Other input. Offer exactly these business branches through that native UI:
122
146
  1. Confirm entering/returning to `<target-stage>` (recommended)
123
147
  2. Hand off to another agent
124
148
  3. Other — use the native tool's built-in free-form Other input.
149
+ Code-task IMPLEMENT completion is the one special gate: offer (1) enter REVIEW (recommended),
150
+ (2) skip REVIEW and enter VERIFICATION, and (3) hand off; use the native free-form Other
151
+ input for revisions. Record REVIEW as the recommended pending edge first. If the user chooses
152
+ VERIFICATION, cancel that edge, request IMPLEMENT -> VERIFICATION, and immediately confirm it
153
+ because that selection is explicit confirmation of the alternate target.
125
154
  Plain-text numbered choices are fallback only: use them only when no native user-choice tool
126
155
  exists. The runtime hook never mutates workflow state from user-prompt text. Native choice
127
156
  results, numbered fallback replies, and every natural-language reply must be interpreted by
128
157
  you against the current task and stored target before calling `confirm-transition` explicitly.
129
158
  On Other feedback, cancel the pending edge before revising work or requesting a different
130
159
  legal target. Never interpret silence, enthusiasm, or topic changes as confirmation.
131
- - **State before action.** Every confirmed stage advance is a two-step protocol: first consume
132
- the pending edge through `confirm-transition`, then run that stage's real work. Do not start
160
+ - **State before action.** Every confirmation-required stage advance is a two-step protocol: first
161
+ consume the pending edge through `confirm-transition`, then run that stage's real work. The
162
+ automatic edges use `auto-transition` instead. Do not start
133
163
  analysis, implementation, review, verification, memory writing, or closeout while
134
164
  `task.json.status` still names the previous stage. After every state API call, treat the
135
165
  returned snapshot/read-after-write state as authoritative for the next action and status line.
@@ -137,18 +167,28 @@ routing matches, and switching happens again.
137
167
  (1) Read `.easy-coding/templates/dev-spec-skeleton.md`, then (2) Write its exact content
138
168
  to the task's dev-spec.md. This is a mechanical copy, not a generation task. Do not read
139
169
  code, load memory, or analyze before the skeleton is on disk. This is ec-analysis
140
- HARD RULE 1 — violating it means the analysis has failed. Your reply to the user must
141
- be the complete dev-spec.md content, not a summary or custom format.
170
+ HARD RULE 1 — violating it means the analysis has failed. After the skeleton is written,
171
+ inspect the required evidence without editing it. Ask and resolve every user decision during
172
+ ANALYSIS before filling any section; the final report must not contain a `待用户决策` section
173
+ or `[阶段:ANALYSIS]`. Once decisions are resolved, your plan reply must be the complete
174
+ dev-spec.md content, not a summary or custom format.
142
175
  Additionally, ANALYSIS must stay faithful to the user's delivery form — it may NOT downgrade
143
176
  a code task to a report-only task — and the 改动范围 table must list only real project code,
144
177
  never `.easy-coding/` harness artifacts (ec-analysis HARD RULES 5 and 6).
145
- - **Autonomous exception.** `behavior.auto_mode: true` in `.easy-coding/config.yaml` only
146
- waives stage-boundary prompts when the user explicitly requested autonomous execution.
147
- It carries NO scope or delivery-form decision. Never cite `auto_mode` to narrow scope,
148
- downgrade a code task, or bypass a blocker that needs a real user decision.
149
- - **At stage completion** request the legal target immediately (not at turn end):
178
+ - **At confirmation-required stage completion** request the legal target immediately:
150
179
  `{{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py request-transition --session-file <P> --stage <STAGE> --agent <agent-id> --reason "<why this edge is ready>"`.
151
180
  This writes only `pending_transition`; it does not change the stage.
181
+ - **No-code IMPLEMENT delivery:** before completing the task, ec-implementing must
182
+ have output the successful unit's complete non-empty `deliverable` verbatim to the user.
183
+ A summary or execution.jsonl record is not a substitute; missing user-visible delivery keeps
184
+ the task in IMPLEMENT. The execution log must contain a matching `dispatch` immediately before
185
+ the accepted result for that unit. After delivery, use `request-transition` in approve mode
186
+ or `auto-transition` in guard/auto mode for COMPLETE; do not enter REVIEW, VERIFICATION, or
187
+ MEMORY and do not write memory.
188
+ - **On an automatic edge** call:
189
+ `{{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py auto-transition --session-file <P> --stage <TARGET> --agent <agent-id>`.
190
+ The state API validates both the legal edge and the effective confirm mode before changing
191
+ the stage.
152
192
  - **On user confirmation** read the current task's pending edge and call:
153
193
  `{{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py confirm-transition --session-file <P> --stage <STAGE> --agent <agent-id>`.
154
194
  Only after the read-after-write status names the target stage may its action start.
@@ -164,28 +204,30 @@ routing matches, and switching happens again.
164
204
  you MUST revert the task's status to the previous valid stage and explain why the
165
205
  transition was rejected. Do not proceed with an illegal stage.
166
206
  - **Repair loop sizing** (after VERIFICATION): a trivial tweak may be fixed inside
167
- VERIFICATION and re-verified without a status change; a logic or structure change requests
168
- VERIFICATION -> IMPLEMENT and waits at the standard confirmation gate before re-walking
169
- REVIEW -> VERIFICATION.
207
+ VERIFICATION and re-verified without a status change; a logic or structure change selects
208
+ VERIFICATION -> IMPLEMENT and follows the effective mode. After repair, approve mode presents
209
+ the IMPLEMENT choice again; guard/auto follow the default REVIEW path.
170
210
  - **Scope guard** (repair loop): if the user's fix request falls outside the dev-spec scope
171
211
  (features or files absent from the change-scope table), say so explicitly and propose a
172
212
  new task with `spawned_from` set to the current task id. Never silently absorb scope creep.
173
213
  - **Task switching is allowed at any stage.** The suspended task retains its stage in
174
214
  task.json. Do not run memory flows for suspended tasks — only completed tasks get archived.
175
- - **Archive only after user acceptance.** VERIFICATION passing does not complete the task.
176
- A green gate requests VERIFICATION -> MEMORY and presents the standard choices. After the
177
- user confirms, MEMORY writes one short entry first, records it through `memory-short-complete`,
215
+ - **Archive only after the configured acceptance gate.** VERIFICATION passing does not complete
216
+ the task. A green gate requests VERIFICATION -> MEMORY in approve/guard, or advances
217
+ automatically in auto. After entry, MEMORY writes one short entry first, records it through `memory-short-complete`,
178
218
  then asks the state API for the authoritative `memory` instruction. `action == "no-op"`
179
219
  skips long-memory reads/writes; `action == "distill"` processes exactly `trim_count` older
180
- entries. Only after `memory-complete` may ec-memory request MEMORY -> COMPLETE.
181
- - **COMPLETE closeout:** COMPLETE is also a confirmed edge. Once the user confirms it, the
182
- state API clears session `current_task`, so the next hook injection returns to Ready. Then
183
- output a summary (what was done, files changed, key decisions).
220
+ entries. After `memory-complete`, ec-memory automatically advances MEMORY -> COMPLETE.
221
+ - **COMPLETE closeout:** COMPLETE is automatic after successful memory processing, or directly
222
+ after a validated read-only deliverable. The state API clears session `current_task`, so the
223
+ next hook injection returns to Ready. Then output a summary; for read-only tasks, the full
224
+ report must already have appeared before this closeout.
184
225
 
185
226
  ## Resume and handoff
186
227
 
187
228
  Hook breadcrumbs you may receive: `[workflow-state:X]`, `[current-task:Y]`,
188
- `[easy-coding:session-file:P]`, `[easy-coding:handoff-from:Z]`,
229
+ `[easy-coding:session-file:P]`, `[easy-coding:confirm-mode:M]`,
230
+ `[easy-coding:handoff-from:Z]`,
189
231
  `[easy-coding:init-required]`.
190
232
 
191
233
  Resuming an active task (whether from session restart, claim, handoff, or task switch):
@@ -194,14 +236,20 @@ Resuming an active task (whether from session restart, claim, handoff, or task s
194
236
  records tell you exactly where work stopped.
195
237
  3. If the task was claimed from another agent, read the latest `handoff` record first for the
196
238
  fast summary and tell the user which previous agent handed it off.
197
- 4. If `pending_transition` exists, do not rerun the completed stage action. Re-present the
198
- standard confirmation/handoff/Other choices for its stored target.
199
- 5. Otherwise tell the user what is being resumed and from which stage, then continue.
239
+ 4. If `pending_transition` exists, do not rerun the completed stage action. Compare the stored
240
+ edge with `effective_confirm_mode`. If the edge is now automatic, call `auto-transition` for
241
+ its stored target; otherwise re-present the confirmation/handoff/Other choices. For a
242
+ read-only task in IMPLEMENT, cancel any stale REVIEW/VERIFICATION edge before the terminal
243
+ check below. At an approve-mode IMPLEMENT boundary for a code task, re-present the special
244
+ REVIEW / skip to VERIFICATION / handoff choices.
245
+ 5. If a read-only task resumes in IMPLEMENT with a valid successful result, output its complete
246
+ deliverable again and follow the effective mode to COMPLETE. Otherwise tell the user what is
247
+ being resumed and from which stage, then continue.
200
248
 
201
249
  After a task switch, the same resume flow applies — the only difference is that `current_task`
202
250
  was just changed by the switching procedure rather than being loaded from a prior session.
203
251
 
204
- Offering handoff — every pending stage edge includes the standard handoff option. On that
252
+ Offering handoff — every confirmation-required pending edge includes the handoff option. On that
205
253
  option, call:
206
254
  `{{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py handoff-task --session-file <P> --agent <agent-id> --summary "<dense context: plan shape, key decisions, user emphases>"`.
207
255
 
@@ -29,27 +29,34 @@ Trigger Easy Coding skills with your platform prefix — Codex: `$ec-*`, Qoder:
29
29
  - `ec-analysis` `ec-implementing` `ec-reviewing` `ec-verification` — workflow stages
30
30
  - `ec-memory` — short/long memory archive
31
31
  - `ec-task-management` — list/create tasks · `ec-task-close` — interrupt a task
32
+ - `ec-no-harness` — bypass only Easy Coding for the current session
32
33
  - `ec-git` — git discipline · `ec-meta` — understand/customize the harness
33
34
 
34
35
  First run `ec-init`; daily work goes through `ec-workflow`.
35
36
 
36
37
  ## Workflow discipline
37
38
 
38
- - Stages do not skip. Every legal stage edge uses `pending_transition` and requires explicit
39
- user confirmation by default. At each boundary, use the agent's native user-choice tool
40
- whenever available to offer: confirm target stage, hand off to another agent, or its
41
- free-form Other input. Plain-text numbered choices are fallback only. `auto_mode` only
42
- waives prompts when configured and explicitly requested by the user; it never changes scope
43
- or delivery form.
39
+ - Effective confirm mode is session override > project `behavior.confirm_mode` > `guard`.
40
+ `approve` confirms every legal edge except INIT -> ANALYSIS and MEMORY -> COMPLETE; `guard`
41
+ confirms only ANALYSIS -> IMPLEMENT and VERIFICATION -> MEMORY; `auto` confirms none.
42
+ Automatic code flow chooses IMPLEMENT -> REVIEW. Confirmation mode never changes scope,
43
+ delivery form, evidence gates, or the legal transition graph.
44
+ - Confirmation-required edges use `pending_transition`; automatic edges use the restricted
45
+ `auto-transition` API. A read-only task creates no test-strategy.md, never enters REVIEW,
46
+ VERIFICATION, or MEMORY, and writes no task memory.
47
+ - When `[easy-coding:no-harness]` is injected, do not emit an Easy Coding status line and ignore
48
+ only Easy Coding workflow/stage orchestration for this session. Continue honoring every
49
+ non-Easy-Coding skill, hook, and instruction. Do not clear or mutate the suspended task.
44
50
  - ANALYSIS must follow template-first: read `.easy-coding/templates/dev-spec-skeleton.md` then
45
- write its exact content to the task's dev-spec.md as the FIRST tool calls, then fill sections
46
- incrementally via edits. Reply to the user with the complete dev-spec.md content — never a
47
- summary table or custom format.
48
- - VERIFICATION is a hard gate: lint + typecheck + test must pass on fresh evidence, and
49
- coverage must match the test strategy, before a task can complete.
50
- - MEMORY combines short-memory creation and the conditional long-memory gate. Archive runs
51
- only after explicit user acceptance an unaccepted task's memory is dirty data.
52
- - NO COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE.
51
+ write its exact content to the task's dev-spec.md as the FIRST tool calls. Next inspect evidence
52
+ without editing the skeleton, ask every unresolved decision during analysis, and wait. Only
53
+ after all decisions are resolved may the agent fill the complete dev-spec.md. The final report
54
+ contains neither `[阶段:ANALYSIS]` nor a `待用户决策` section.
55
+ - For code tasks, VERIFICATION is a hard gate: lint + typecheck + test must pass on fresh
56
+ evidence, and coverage must match the test strategy, before completion.
57
+ - MEMORY combines short-memory creation and the conditional long-memory gate. Entry follows the
58
+ effective confirmation mode; once memory processing completes, COMPLETE is automatic.
59
+ - NO CODE-TASK COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE.
53
60
  - All cross-platform modules (skills, hooks, references) must use universal agent protocols.
54
61
  Do not rely on any specific agent's proprietary conventions unless the module is explicitly
55
62
  a platform-specific compatibility layer. Reference files use descriptive filenames (e.g.,
@@ -27,27 +27,34 @@ platform prefixes such as `/` or `$`. If no status line is injected, do not inve
27
27
  - `/ec-analysis` `/ec-implementing` `/ec-reviewing` `/ec-verification` — workflow stages
28
28
  - `/ec-memory` — short/long memory archive
29
29
  - `/ec-task-management` — list/create tasks · `/ec-task-close` — interrupt a task
30
+ - `/ec-no-harness` — bypass only Easy Coding for the current session
30
31
  - `/ec-git` — git discipline · `/ec-meta` — understand/customize the harness
31
32
 
32
33
  First run `/ec-init`; daily work goes through `/ec-workflow`.
33
34
 
34
35
  ## Workflow discipline
35
36
 
36
- - Stages do not skip. Every legal stage edge uses `pending_transition` and requires explicit
37
- user confirmation by default. At each boundary, use the agent's native user-choice tool
38
- whenever available to offer: confirm target stage, hand off to another agent, or its
39
- free-form Other input. Plain-text numbered choices are fallback only. `auto_mode` only
40
- waives prompts when configured and explicitly requested by the user; it never changes scope
41
- or delivery form.
37
+ - Effective confirm mode is session override > project `behavior.confirm_mode` > `guard`.
38
+ `approve` confirms every legal edge except INIT -> ANALYSIS and MEMORY -> COMPLETE; `guard`
39
+ confirms only ANALYSIS -> IMPLEMENT and VERIFICATION -> MEMORY; `auto` confirms none.
40
+ Automatic code flow chooses IMPLEMENT -> REVIEW. Confirmation mode never changes scope,
41
+ delivery form, evidence gates, or the legal transition graph.
42
+ - Confirmation-required edges use `pending_transition`; automatic edges use the restricted
43
+ `auto-transition` API. A read-only task creates no test-strategy.md, never enters REVIEW,
44
+ VERIFICATION, or MEMORY, and writes no task memory.
45
+ - When `[easy-coding:no-harness]` is injected, do not emit an Easy Coding status line and ignore
46
+ only Easy Coding workflow/stage orchestration for this session. Continue honoring every
47
+ non-Easy-Coding skill, hook, and instruction. Do not clear or mutate the suspended task.
42
48
  - ANALYSIS must follow template-first: read `.easy-coding/templates/dev-spec-skeleton.md` then
43
- write its exact content to the task's dev-spec.md as the FIRST tool calls, then fill sections
44
- incrementally via edits. Reply to the user with the complete dev-spec.md content — never a
45
- summary table or custom format.
46
- - VERIFICATION is a hard gate: lint + typecheck + test must pass on fresh evidence, and
47
- coverage must match the test strategy, before a task can complete.
48
- - MEMORY combines short-memory creation and the conditional long-memory gate. Archive runs
49
- only after explicit user acceptance an unaccepted task's memory is dirty data.
50
- - NO COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE.
49
+ write its exact content to the task's dev-spec.md as the FIRST tool calls. Next inspect evidence
50
+ without editing the skeleton, ask every unresolved decision during analysis, and wait. Only
51
+ after all decisions are resolved may the agent fill the complete dev-spec.md. The final report
52
+ contains neither `[阶段:ANALYSIS]` nor a `待用户决策` section.
53
+ - For code tasks, VERIFICATION is a hard gate: lint + typecheck + test must pass on fresh
54
+ evidence, and coverage must match the test strategy, before completion.
55
+ - MEMORY combines short-memory creation and the conditional long-memory gate. Entry follows the
56
+ effective confirmation mode; once memory processing completes, COMPLETE is automatic.
57
+ - NO CODE-TASK COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE.
51
58
  - All cross-platform modules (skills, hooks, references) must use universal agent protocols.
52
59
  Do not rely on any specific agent's proprietary conventions unless the module is explicitly
53
60
  a platform-specific compatibility layer. Reference files use descriptive filenames (e.g.,
@@ -11,6 +11,8 @@ complete exactly that unit. Your reply IS the return value, not a message to a h
11
11
  ## Hard constraints
12
12
 
13
13
  - Modify only the files listed in the task card's "Editable scope". Touch nothing else.
14
+ - If the editable scope is `NONE — read-only deliverable`, modify nothing and return the full
15
+ requested result in `deliverable`.
14
16
  - Do not call any Skill tool.
15
17
  - Do not read `.qoder/skills/`, `.agents/skills/`, or any `.easy-coding/` file. All needed
16
18
  context is in the card.
@@ -22,6 +24,7 @@ complete exactly that unit. Your reply IS the return value, not a message to a h
22
24
 
23
25
  - `changed_files`: the files you actually modified
24
26
  - `summary`: one line describing what you did
27
+ - `deliverable`: full no-code result, or `null` for a code unit
25
28
  - `issues`: problems you hit (empty array if none)
26
29
  - `needs_attention`: anything the main agent must decide (empty array if none)
27
30
 
@@ -1,80 +1,75 @@
1
- [阶段:ANALYSIS]
2
-
3
- ## 技术方案:{任务标题}
1
+ ## 技术方案:[[EC_TODO:任务标题]]
4
2
 
5
3
  ### 项目模式
6
- {初创项目/迭代项目}
4
+ [[EC_TODO:初创项目/迭代项目]]
7
5
 
8
6
  ### 任务类型
9
- {新功能 / Bug 修复 / 重构 / 性能优化 / 前端设计实现}
7
+ [[EC_TODO:新功能 / Bug 修复 / 重构 / 性能优化 / 前端设计实现]]
10
8
 
11
9
  ### 需求解析
12
- - **目标**:{待填写 — 真正要解决的问题}
13
- - **输入**:{待填写 — 用户输入 / 系统输入 / 触发条件}
14
- - **输出**:{待填写 — 先声明交付形态(改代码 / 出文档),再写最终交付结果。交付形态须忠于用户原始需求,不得擅自降级}
15
- - **边界**:{待填写 — 明确不做什么}
10
+ - **目标**:[[EC_TODO:真正要解决的问题]]
11
+ - **输入**:[[EC_TODO:用户输入 / 系统输入 / 触发条件]]
12
+ - **输出**:[[EC_TODO:先声明交付形态(改代码 / 出文档),再写最终交付结果。交付形态须忠于用户原始需求,不得擅自降级]]
13
+ - **边界**:[[EC_TODO:明确不做什么]]
16
14
 
17
15
  ### 现状
18
- - **相关代码 / 页面 / 接口 / 模块**:{待填写 — 基于实际文件与代码的现状说明}
19
- - **当前实现方式**:{待填写 — 现在是如何工作的}
20
- - **现有问题 / 缺口**:{待填写 — 为什么需要改}
21
- - **证据**:{待填写 — 引用的关键文件、类、页面、接口,含 file:line}
16
+ - **相关代码 / 页面 / 接口 / 模块**:[[EC_TODO:基于实际文件与代码的现状说明]]
17
+ - **当前实现方式**:[[EC_TODO:现在是如何工作的]]
18
+ - **现有问题 / 缺口**:[[EC_TODO:为什么需要改]]
19
+ - **证据**:[[EC_TODO:引用的关键文件、类、页面、接口,含 file:line]]
22
20
 
23
21
  ### 冲突摘要
24
- - 需求 vs RULES:{待填写 或 "无冲突"}
25
- - 需求 vs ABSTRACT:{待填写 或 "无冲突"}
26
- - 需求 vs 现有代码:{待填写 或 "无冲突"}
27
- - Dev-Spec vs 现有代码:{待填写 或 "无冲突"}
28
-
29
- ### 待用户决策
30
- - {待填写 — 影响技术路线、接口、改动范围的问题逐条列出;任何"本次不做全部 / 分批落地 / 范围或交付形态收窄"必须列入此处交由用户拍板,不得自行决定并假托既定;若无则写"无"}
22
+ - 需求 vs RULES:[[EC_TODO:填写结果或“无冲突”]]
23
+ - 需求 vs ABSTRACT:[[EC_TODO:填写结果或“无冲突”]]
24
+ - 需求 vs 现有代码:[[EC_TODO:填写结果或“无冲突”]]
25
+ - Dev-Spec vs 现有代码:[[EC_TODO:填写结果或“无冲突”]]
31
26
 
32
27
  ### 影响面分析
33
- - **涉及模块**:{待填写}
34
- - **核心类 / 页面 / 接口**:{待填写}
35
- - **数据库变更**:{有/无}
36
- - **接口变更**:{有/无}
37
- - **关联历史任务**:{待填写 — 相关短期记忆序号;无则"无"}
28
+ - **涉及模块**:[[EC_TODO:涉及模块]]
29
+ - **核心类 / 页面 / 接口**:[[EC_TODO:核心类 / 页面 / 接口]]
30
+ - **数据库变更**:[[EC_TODO:有/无]]
31
+ - **接口变更**:[[EC_TODO:有/无]]
32
+ - **关联历史任务**:[[EC_TODO:相关短期记忆序号;无则“无”]]
38
33
 
39
34
  ### 改动范围
40
35
  > 只列真实项目源码/配置文件的改动。禁止把 `.easy-coding/` 下的 harness 产物(dev-spec / execution.jsonl / test-strategy / 记忆 / 报告等)当作改动对象。本表为空仅允许用于"用户明确要求的无代码交付形态";代码类任务(重构/修复/功能)若此表为空,即为自我降级。
41
36
 
42
37
  | 改动文件 | 改动类型 | 文件编码 | 改动核心内容 |
43
38
  |----------|---------|---------|-------------|
44
- | `{文件路径}` | 新增 | 项目编码 {X},依据:{xxx} | {核心改动} |
45
- | `{文件路径}` | 修改 | 保持原编码 {X} | {核心改动} |
46
- | `{文件路径}` | 删除 | — | {删除原因} |
39
+ | `[[EC_TODO:文件路径]]` | 新增 | 项目编码 [[EC_TODO:编码]],依据:[[EC_TODO:编码依据]] | [[EC_TODO:核心改动]] |
40
+ | `[[EC_TODO:文件路径]]` | 修改 | 保持原编码 [[EC_TODO:编码]] | [[EC_TODO:核心改动]] |
41
+ | `[[EC_TODO:文件路径]]` | 删除 | — | [[EC_TODO:删除原因]] |
47
42
 
48
43
  ### 修改方案
49
- - **总体改法**:{待填写 — 一句话说清改哪里、怎么改}
50
- - **后端改动**:{待填写;不涉及则写"不涉及"}
51
- - **前端改动**:{待填写;不涉及则写"不涉及"}
52
- - **兼容处理**:{待填写 — 旧逻辑如何迁移、保留或替换}
53
- - **风险点**:{待填写 — 最容易出问题的位置}
44
+ - **总体改法**:[[EC_TODO:一句话说清改哪里、怎么改]]
45
+ - **后端改动**:[[EC_TODO:填写改动;不涉及则写“不涉及”]]
46
+ - **前端改动**:[[EC_TODO:填写改动;不涉及则写“不涉及”]]
47
+ - **兼容处理**:[[EC_TODO:旧逻辑如何迁移、保留或替换]]
48
+ - **风险点**:[[EC_TODO:最容易出问题的位置]]
54
49
 
55
50
  ### 实施拆解
56
51
 
57
52
  | 单元 | 说明 | 类型 | 涉及文件 | 依赖 |
58
53
  |------|------|------|---------|------|
59
- | U1 | {title} | {backend/frontend/test/...} | {files} | — |
60
- | U2 | {title} | {type} | {files} | — |
61
- | U3 | {title} | {type} | {files} | U1, U2 |
54
+ | U1 | [[EC_TODO:单元标题]] | [[EC_TODO:backend/frontend/test/...]] | [[EC_TODO:涉及文件]] | — |
55
+ | U2 | [[EC_TODO:单元标题]] | [[EC_TODO:单元类型]] | [[EC_TODO:涉及文件]] | — |
56
+ | U3 | [[EC_TODO:单元标题]] | [[EC_TODO:单元类型]] | [[EC_TODO:涉及文件]] | U1, U2 |
62
57
 
63
- **执行策略**:{parallel / sequential / single}
64
- - 第一批(并行):U1 {title} | U2 {title}
65
- - 第二批(等待第一批):U3 {title}
66
- (若 single:单一实施单元,主 agent 直接执行)
58
+ **执行策略**:[[EC_TODO:parallel / sequential / single]]
59
+ - 第一批(并行):U1 [[EC_TODO:单元标题]] | U2 [[EC_TODO:单元标题]]
60
+ - 第二批(等待第一批):U3 [[EC_TODO:单元标题]]
61
+ (若 single:单一实施单元,派发 1 个子代理执行)
67
62
 
68
63
  ### 测试策略
69
64
 
70
65
  | 测试点 | 级别 | 归属单元 | 方式 | 验证命令 |
71
66
  |--------|------|---------|------|---------|
72
- | {描述} | 必测 | U1 | 单测 | `npm test -- --filter=xxx` |
73
- | {描述} | 应测 | U2 | 快照 | `npm test -- --snapshot` |
67
+ | [[EC_TODO:测试点描述]] | 必测 | U1 | 单测 | `npm test -- --filter=xxx` |
68
+ | [[EC_TODO:测试点描述]] | 应测 | U2 | 快照 | `npm test -- --snapshot` |
74
69
 
75
- - **人工验收**:{待填写 — 用户需要检查的关键行为}
76
- - **无法验证项**:{待填写 — 无 / 说明缺失环境、数据或权限}
70
+ - **人工验收**:[[EC_TODO:用户需要检查的关键行为]]
71
+ - **无法验证项**:[[EC_TODO:无 / 说明缺失环境、数据或权限]]
77
72
 
78
73
  ### 风险与注意事项
79
- - {风险 1}
80
- - {风险 2}
74
+ - [[EC_TODO:风险 1]]
75
+ - [[EC_TODO:风险 2]]