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.
- package/CHANGELOG.md +26 -0
- package/README.md +24 -8
- package/dist/cli.js +309 -168
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
- package/templates/claude/agents/ec-implementer.md +3 -0
- package/templates/codex/agents/ec-implementer.toml +3 -0
- package/templates/common/bundled-skills/ec-meta/references/local-architecture/README.md +7 -3
- package/templates/common/skills/ec-analysis/SKILL.md +83 -48
- package/templates/common/skills/ec-brainstorming/SKILL.md +1 -1
- package/templates/common/skills/ec-git/SKILL.md +1 -1
- package/templates/common/skills/ec-implementing/SKILL.md +41 -13
- package/templates/common/skills/ec-memory/SKILL.md +11 -7
- package/templates/common/skills/ec-no-harness/SKILL.md +39 -0
- package/templates/common/skills/ec-reviewing/SKILL.md +6 -5
- package/templates/common/skills/ec-task-management/SKILL.md +24 -2
- package/templates/common/skills/ec-verification/SKILL.md +23 -19
- package/templates/common/skills/ec-workflow/SKILL.md +98 -50
- package/templates/main-constraint/AGENTS.md.tpl +21 -14
- package/templates/main-constraint/CLAUDE.md.tpl +21 -14
- package/templates/qoder/agents/ec-implementer.md +3 -0
- package/templates/runtime/templates/dev-spec-skeleton.md +41 -46
- package/templates/shared-hooks/easy_coding_state.py +690 -16
- package/templates/shared-hooks/inject-subagent-context.py +6 -2
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ec-verification
|
|
3
|
-
description: VERIFICATION-stage skill — the hard gate between
|
|
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
|
|
9
|
-
|
|
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
|
|
22
|
-
- Verification passing
|
|
23
|
-
-
|
|
24
|
-
-
|
|
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
|
|
56
|
-
acceptance
|
|
57
|
-
- Any failure → append the failing `verify` record, summarize failures,
|
|
58
|
-
VERIFICATION -> IMPLEMENT, and
|
|
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 →
|
|
69
|
-
the
|
|
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
|
|
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
|
|
79
|
+
## 5. Archive entry
|
|
78
80
|
|
|
79
|
-
|
|
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.
|
|
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 <
|
|
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
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
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;
|
|
80
|
-
| ANALYSIS | ec-analysis | dev-spec + execution plan
|
|
81
|
-
| IMPLEMENT | ec-implementing | code changes
|
|
82
|
-
| REVIEW | ec-reviewing | multi-dimension code review | verdict selects a legal target
|
|
83
|
-
| VERIFICATION | ec-verification | hard gate: lint/typecheck/test + coverage |
|
|
84
|
-
| MEMORY | ec-memory | write short memory, then run the conditional long-memory gate | memory work complete;
|
|
85
|
-
| COMPLETE | ec-workflow | clear current_task, set task status, summary | terminal after
|
|
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
|
|
105
|
-
|
|
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
|
-
- **
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
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
|
|
132
|
-
the pending edge through `confirm-transition`, then run that stage's real work.
|
|
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.
|
|
141
|
-
|
|
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
|
-
- **
|
|
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
|
|
168
|
-
VERIFICATION -> IMPLEMENT and
|
|
169
|
-
REVIEW
|
|
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
|
|
176
|
-
A green gate requests VERIFICATION -> MEMORY
|
|
177
|
-
|
|
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.
|
|
181
|
-
- **COMPLETE closeout:** COMPLETE is
|
|
182
|
-
state API clears session `current_task`, so the
|
|
183
|
-
output a summary
|
|
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:
|
|
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.
|
|
198
|
-
|
|
199
|
-
|
|
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
|
|
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
|
-
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
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
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
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
|
-
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
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
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
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
|
-
[
|
|
2
|
-
|
|
3
|
-
## 技术方案:{任务标题}
|
|
1
|
+
## 技术方案:[[EC_TODO:任务标题]]
|
|
4
2
|
|
|
5
3
|
### 项目模式
|
|
6
|
-
|
|
4
|
+
[[EC_TODO:初创项目/迭代项目]]
|
|
7
5
|
|
|
8
6
|
### 任务类型
|
|
9
|
-
|
|
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
|
-
- **证据**:
|
|
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
|
-
| `
|
|
45
|
-
| `
|
|
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 |
|
|
60
|
-
| U2 |
|
|
61
|
-
| U3 |
|
|
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
|
-
**执行策略**:
|
|
64
|
-
- 第一批(并行):U1
|
|
65
|
-
- 第二批(等待第一批):U3
|
|
66
|
-
(若 single
|
|
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
|
-
|
|
|
73
|
-
|
|
|
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
|
-
-
|
|
80
|
-
-
|
|
74
|
+
- [[EC_TODO:风险 1]]
|
|
75
|
+
- [[EC_TODO:风险 2]]
|