easy-coding-harness 0.7.1 → 0.8.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 +14 -0
- package/README.md +3 -3
- package/dist/cli.js +6 -1
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
- package/templates/common/bundled-skills/ec-meta/references/local-architecture/README.md +3 -2
- package/templates/common/skills/ec-implementing/SKILL.md +3 -2
- package/templates/common/skills/ec-memory/SKILL.md +1 -1
- package/templates/common/skills/ec-reviewing/SKILL.md +1 -0
- package/templates/common/skills/ec-task-management/SKILL.md +9 -7
- package/templates/common/skills/ec-verification/SKILL.md +9 -7
- package/templates/common/skills/ec-workflow/SKILL.md +25 -15
- package/templates/main-constraint/AGENTS.md.tpl +8 -8
- package/templates/main-constraint/CLAUDE.md.tpl +8 -8
- package/templates/shared-hooks/easy_coding_state.py +38 -9
package/package.json
CHANGED
|
@@ -47,8 +47,9 @@ analysis, workflow operation). The CLI never analyzes the project.
|
|
|
47
47
|
(user abort, no memory flow). INIT → ANALYSIS and completed MEMORY → COMPLETE are restricted
|
|
48
48
|
automatic edges. A validated read-only `doc` / `analysis` / `report` task also auto-completes
|
|
49
49
|
from IMPLEMENT after its full deliverable is shown, without REVIEW, VERIFICATION, MEMORY, or
|
|
50
|
-
task memory.
|
|
51
|
-
|
|
50
|
+
task memory. Confirm mode controls non-mechanical edges: approve confirms each edge, guard
|
|
51
|
+
confirms two critical gates, lite uses the same gates but forces IMPLEMENT -> VERIFICATION,
|
|
52
|
+
and auto advances legal edges automatically. Lite never enters REVIEW. VERIFICATION remains
|
|
52
53
|
the code-task fresh-evidence hard gate, and MEMORY keeps the conditional long-memory threshold
|
|
53
54
|
gate. The active task
|
|
54
55
|
pointer lives in `sessions/{ppid}.json`;
|
|
@@ -123,9 +123,10 @@ let sub-agents re-dispatch each other.
|
|
|
123
123
|
|
|
124
124
|
- **Code task:** after all units are done and self-audited, hand back to ec-workflow. In approve
|
|
125
125
|
mode it records IMPLEMENT -> REVIEW as the recommended pending edge and presents REVIEW /
|
|
126
|
-
skip to VERIFICATION / handoff. In guard/auto it automatically enters REVIEW.
|
|
126
|
+
skip to VERIFICATION / handoff. In guard/auto it automatically enters REVIEW. In lite it
|
|
127
|
+
automatically enters VERIFICATION and must not dispatch REVIEW.
|
|
127
128
|
- **No-code read-only task:** after recording the successful result and showing the complete
|
|
128
|
-
deliverable, request COMPLETE in approve mode or auto-transition in guard/auto. Do not
|
|
129
|
+
deliverable, request COMPLETE in approve mode or auto-transition in guard/lite/auto. Do not
|
|
129
130
|
enter REVIEW, VERIFICATION, or MEMORY; do not write short or long memory. The state API only
|
|
130
131
|
accepts this terminal edge when the latest plan is `single` with `files:[]` and the latest
|
|
131
132
|
result has `changed_files:[]`, a non-empty `deliverable`, and no issues/needs_attention.
|
|
@@ -5,7 +5,7 @@ description: MEMORY-stage skill — archive flow entered after a green VERIFICAT
|
|
|
5
5
|
|
|
6
6
|
# ec-memory — archive what was learned
|
|
7
7
|
|
|
8
|
-
ec-workflow dispatches you during MEMORY after approve/guard acceptance or an auto-mode green
|
|
8
|
+
ec-workflow dispatches you during MEMORY after approve/guard/lite acceptance or an auto-mode green
|
|
9
9
|
VERIFICATION gate. Inputs: the task's `dev-spec.md`, `execution.jsonl` (the `result` and
|
|
10
10
|
`verify` records are precise source material), the changed-files list, existing memory files.
|
|
11
11
|
Read-only `doc` / `analysis` / `report` tasks auto-complete from IMPLEMENT and never enter
|
|
@@ -9,6 +9,7 @@ ec-workflow dispatches you when code IMPLEMENT finishes. Read-only `doc` / `anal
|
|
|
9
9
|
tasks auto-complete from IMPLEMENT and never enter REVIEW. You judge the code change set and
|
|
10
10
|
return a verdict that drives the next transition. Inputs: the changed files (from
|
|
11
11
|
execution.jsonl `result` records), `dev-spec.md`, `.easy-coding/RULES.md`, `test-strategy.md`.
|
|
12
|
+
Lite-mode code tasks never enter REVIEW; they proceed from IMPLEMENT to VERIFICATION.
|
|
12
13
|
|
|
13
14
|
Communicate with the user in the user's language.
|
|
14
15
|
|
|
@@ -23,7 +23,7 @@ panel", not just the unfinished task list. On every invocation:
|
|
|
23
23
|
- `session_confirm_mode` (`project default` when null)
|
|
24
24
|
- `effective_confirm_mode`
|
|
25
25
|
4. Show the supported conversational changes in the user's language: set this session to
|
|
26
|
-
`approve`, `guard`, or `auto`, and restore the project default.
|
|
26
|
+
`approve`, `guard`, `lite`, or `auto`, and restore the project default.
|
|
27
27
|
|
|
28
28
|
Never omit the confirm-mode section, even when the unfinished task list is empty. A bare panel
|
|
29
29
|
invocation is read-only: do not set or clear the session override until the user explicitly asks
|
|
@@ -87,20 +87,22 @@ Use the snapshot already required by the default panel and show:
|
|
|
87
87
|
- `session_confirm_mode` (`project default` when null)
|
|
88
88
|
- `effective_confirm_mode`
|
|
89
89
|
|
|
90
|
-
When the user asks to change the current session, use native choice UI when available
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
90
|
+
When the user asks to change the current session, use native choice UI when available. When the
|
|
91
|
+
UI is limited to three choices, offer `guard` (recommended default), `lite`, and `auto`; accept
|
|
92
|
+
`approve` or `restore project default` through the native free-form Other input. A text fallback
|
|
93
|
+
must list all four modes and the restore action.
|
|
94
94
|
|
|
95
95
|
Set an override through the state API, never by editing the session JSON:
|
|
96
|
-
`{{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py set-confirm-mode --session-file <P> --mode <approve|guard|auto> --agent <agent-id>`.
|
|
96
|
+
`{{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py set-confirm-mode --session-file <P> --mode <approve|guard|lite|auto> --agent <agent-id>`.
|
|
97
97
|
|
|
98
98
|
Restore project configuration through:
|
|
99
99
|
`{{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py clear-confirm-mode --session-file <P> --agent <agent-id>`.
|
|
100
100
|
|
|
101
101
|
Use the returned snapshot as authoritative and report the effective mode. Preserve any existing
|
|
102
102
|
`pending_transition`; when it becomes automatic, ec-workflow consumes its original target via
|
|
103
|
-
`auto-transition` instead of losing the completed stage outcome.
|
|
103
|
+
`auto-transition` instead of losing the completed stage outcome. The exception is an existing
|
|
104
|
+
IMPLEMENT -> REVIEW edge after switching to lite: ec-workflow must cancel it and automatically
|
|
105
|
+
enter VERIFICATION because lite never runs REVIEW.
|
|
104
106
|
|
|
105
107
|
## Boundaries
|
|
106
108
|
|
|
@@ -21,7 +21,7 @@ NO COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE
|
|
|
21
21
|
|
|
22
22
|
NO ARCHIVE WITHOUT A GREEN GATE
|
|
23
23
|
- Verification passing evidence is mandatory in every confirm mode.
|
|
24
|
-
- approve/guard require user acceptance before MEMORY; auto advances after the green gate.
|
|
24
|
+
- approve/guard/lite require user acceptance before MEMORY; auto advances after the green gate.
|
|
25
25
|
- Confirmation mode never turns failed or missing evidence into acceptance.
|
|
26
26
|
```
|
|
27
27
|
|
|
@@ -53,7 +53,7 @@ Append one `verify` record per check:
|
|
|
53
53
|
|
|
54
54
|
## 3. Gate decision
|
|
55
55
|
|
|
56
|
-
- All three pass AND coverage satisfied → present the verification result; approve/guard wait
|
|
56
|
+
- All three pass AND coverage satisfied → present the verification result; approve/guard/lite wait
|
|
57
57
|
for user acceptance, while auto hands the green result to ec-workflow for automatic MEMORY.
|
|
58
58
|
- Any failure → append the failing `verify` record, summarize failures, select
|
|
59
59
|
VERIFICATION -> IMPLEMENT, and follow the effective confirm mode.
|
|
@@ -64,21 +64,23 @@ After a green gate, present an acceptance summary: what changed (files + summari
|
|
|
64
64
|
verification results (lint/type/test), and the coverage status. Then the user takes time to
|
|
65
65
|
test manually. Their response routes:
|
|
66
66
|
|
|
67
|
-
- **"accepted"** (approve/guard) → request VERIFICATION -> MEMORY and present the standard boundary gate.
|
|
67
|
+
- **"accepted"** (approve/guard/lite) → request VERIFICATION -> MEMORY and present the standard boundary gate.
|
|
68
68
|
- **"problem here"** → scope judgment against the dev-spec:
|
|
69
69
|
- in scope → select VERIFICATION -> IMPLEMENT and follow the effective confirm mode; after
|
|
70
|
-
repair, approve presents the IMPLEMENT choice
|
|
70
|
+
repair, approve presents the IMPLEMENT choice, guard/auto default to REVIEW, and lite
|
|
71
|
+
returns directly to VERIFICATION.
|
|
71
72
|
- out of scope → propose a new task (`spawned_from` = current task id); the current task
|
|
72
73
|
may archive now (if already satisfactory) or stay suspended.
|
|
73
74
|
- **"cancel"** → ec-task-close.
|
|
74
75
|
|
|
75
76
|
Repair sizing: a trivial tweak is fixed and re-verified inside VERIFICATION; a logic/structure
|
|
76
|
-
change formally returns to IMPLEMENT. After repair,
|
|
77
|
-
choice again
|
|
77
|
+
change formally returns to IMPLEMENT. After repair, approve presents the standard IMPLEMENT
|
|
78
|
+
completion choice again; guard/auto enter REVIEW, while lite returns directly to VERIFICATION
|
|
79
|
+
without offering REVIEW.
|
|
78
80
|
|
|
79
81
|
## 5. Archive entry
|
|
80
82
|
|
|
81
|
-
In approve/guard, acceptance does not mutate the stage directly. Hand control to ec-workflow
|
|
83
|
+
In approve/guard/lite, acceptance does not mutate the stage directly. Hand control to ec-workflow
|
|
82
84
|
to call `request-transition --stage MEMORY`, then present:
|
|
83
85
|
1. Confirm entering MEMORY
|
|
84
86
|
2. Hand off to another agent
|
|
@@ -76,7 +76,7 @@ INIT --[always auto]--> ANALYSIS -> IMPLEMENT -> REVIEW -> VERIFICATION -> MEMOR
|
|
|
76
76
|
+-- replan ---+ +--- fix -----+
|
|
77
77
|
^ |
|
|
78
78
|
+------- repair ----------+
|
|
79
|
-
edge behavior --[effective confirm mode: approve / guard / auto]--> target stage
|
|
79
|
+
edge behavior --[effective confirm mode: approve / guard / lite / auto]--> target stage
|
|
80
80
|
any stage --[user abort via ec-task-close]--> CLOSED
|
|
81
81
|
```
|
|
82
82
|
|
|
@@ -84,7 +84,7 @@ any stage --[user abort via ec-task-close]--> CLOSED
|
|
|
84
84
|
|---|---|---|---|
|
|
85
85
|
| INIT | ec-workflow | collect context, settle scope AND delivery form (change code vs. produce a document) | work complete; auto-transition to ANALYSIS |
|
|
86
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 |
|
|
87
|
+
| IMPLEMENT | ec-implementing | code changes or one read-only deliverable | guard/auto default to REVIEW; lite enters VERIFICATION; approve chooses |
|
|
88
88
|
| REVIEW | ec-reviewing | multi-dimension code review | verdict selects a legal mode-aware target |
|
|
89
89
|
| VERIFICATION | ec-verification | hard gate: lint/typecheck/test + coverage | mode-aware transition to MEMORY or IMPLEMENT |
|
|
90
90
|
| MEMORY | ec-memory | write short memory, then run the conditional long-memory gate | memory work complete; auto-transition to COMPLETE |
|
|
@@ -120,8 +120,9 @@ it, routing matches, and switching happens again.
|
|
|
120
120
|
|
|
121
121
|
- **Code tasks may skip only REVIEW.** ANALYSIS cannot jump to VERIFICATION and code tasks never
|
|
122
122
|
skip VERIFICATION. In `guard` and `auto`, an automatic code path chooses REVIEW as the default
|
|
123
|
-
successor to IMPLEMENT. In `
|
|
124
|
-
|
|
123
|
+
successor to IMPLEMENT. In `lite`, IMPLEMENT must enter VERIFICATION directly and the state
|
|
124
|
+
API rejects IMPLEMENT -> REVIEW. In `approve`, the user may explicitly choose REVIEW or skip
|
|
125
|
+
it and enter VERIFICATION.
|
|
125
126
|
- **Resolve the effective confirm mode first.** Read `[easy-coding:confirm-mode:X]` or the state
|
|
126
127
|
API snapshot. Session mode overrides project `behavior.confirm_mode`; missing project
|
|
127
128
|
configuration defaults to `guard`.
|
|
@@ -130,11 +131,16 @@ it, routing matches, and switching happens again.
|
|
|
130
131
|
- `guard` (default): only ANALYSIS -> IMPLEMENT and VERIFICATION -> MEMORY require explicit
|
|
131
132
|
confirmation. Every other legal edge uses `auto-transition` after its owner selects the
|
|
132
133
|
evidence-backed target.
|
|
134
|
+
- `lite`: uses the same two confirmation gates as guard, but code IMPLEMENT automatically
|
|
135
|
+
enters VERIFICATION and never dispatches REVIEW.
|
|
133
136
|
- `auto`: every legal edge uses `auto-transition`.
|
|
134
137
|
`ec-task-close` remains an explicit user abort and is not triggered by confirm mode.
|
|
135
138
|
- **Confirmation policy changes prompts, not evidence.** No mode chooses product scope,
|
|
136
|
-
delivery form, API contracts, or risk decisions for the user.
|
|
137
|
-
|
|
139
|
+
delivery form, API contracts, or risk decisions for the user. Lite intentionally omits REVIEW;
|
|
140
|
+
every mode still preserves its applicable dev-spec, execution, verification, and memory gates.
|
|
141
|
+
- **Lite pending-edge compatibility.** If the status context contains
|
|
142
|
+
`[easy-coding:lite-review-bypass-required:IMPLEMENT->REVIEW]`, cancel that stale pending edge,
|
|
143
|
+
then call `auto-transition --stage VERIFICATION`. Never consume or re-request REVIEW in lite.
|
|
138
144
|
- **Always-automatic mechanical edges.** After INIT work completes, call `auto-transition` for
|
|
139
145
|
ANALYSIS. After `memory-complete`, call `auto-transition` for COMPLETE. These two edges never
|
|
140
146
|
create `pending_transition` in any mode.
|
|
@@ -183,7 +189,7 @@ it, routing matches, and switching happens again.
|
|
|
183
189
|
A summary or execution.jsonl record is not a substitute; missing user-visible delivery keeps
|
|
184
190
|
the task in IMPLEMENT. The execution log must contain a matching `dispatch` immediately before
|
|
185
191
|
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
|
|
192
|
+
or `auto-transition` in guard/lite/auto mode for COMPLETE; do not enter REVIEW, VERIFICATION, or
|
|
187
193
|
MEMORY and do not write memory.
|
|
188
194
|
- **On an automatic edge** call:
|
|
189
195
|
`{{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py auto-transition --session-file <P> --stage <TARGET> --agent <agent-id>`.
|
|
@@ -206,14 +212,15 @@ it, routing matches, and switching happens again.
|
|
|
206
212
|
- **Repair loop sizing** (after VERIFICATION): a trivial tweak may be fixed inside
|
|
207
213
|
VERIFICATION and re-verified without a status change; a logic or structure change selects
|
|
208
214
|
VERIFICATION -> IMPLEMENT and follows the effective mode. After repair, approve mode presents
|
|
209
|
-
the IMPLEMENT choice again; guard/auto follow the default REVIEW path
|
|
215
|
+
the IMPLEMENT choice again; guard/auto follow the default REVIEW path, while lite returns
|
|
216
|
+
directly to VERIFICATION.
|
|
210
217
|
- **Scope guard** (repair loop): if the user's fix request falls outside the dev-spec scope
|
|
211
218
|
(features or files absent from the change-scope table), say so explicitly and propose a
|
|
212
219
|
new task with `spawned_from` set to the current task id. Never silently absorb scope creep.
|
|
213
220
|
- **Task switching is allowed at any stage.** The suspended task retains its stage in
|
|
214
221
|
task.json. Do not run memory flows for suspended tasks — only completed tasks get archived.
|
|
215
222
|
- **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
|
|
223
|
+
the task. A green gate requests VERIFICATION -> MEMORY in approve/guard/lite, or advances
|
|
217
224
|
automatically in auto. After entry, MEMORY writes one short entry first, records it through `memory-short-complete`,
|
|
218
225
|
then asks the state API for the authoritative `memory` instruction. `action == "no-op"`
|
|
219
226
|
skips long-memory reads/writes; `action == "distill"` processes exactly `trim_count` older
|
|
@@ -228,6 +235,7 @@ it, routing matches, and switching happens again.
|
|
|
228
235
|
Hook breadcrumbs you may receive: `[workflow-state:X]`, `[current-task:Y]`,
|
|
229
236
|
`[easy-coding:session-file:P]`, `[easy-coding:confirm-mode:M]`,
|
|
230
237
|
`[easy-coding:handoff-from:Z]`,
|
|
238
|
+
`[easy-coding:lite-review-bypass-required:IMPLEMENT->REVIEW]`,
|
|
231
239
|
`[easy-coding:init-required]`.
|
|
232
240
|
|
|
233
241
|
Resuming an active task (whether from session restart, claim, handoff, or task switch):
|
|
@@ -236,12 +244,14 @@ Resuming an active task (whether from session restart, claim, handoff, or task s
|
|
|
236
244
|
records tell you exactly where work stopped.
|
|
237
245
|
3. If the task was claimed from another agent, read the latest `handoff` record first for the
|
|
238
246
|
fast summary and tell the user which previous agent handed it off.
|
|
239
|
-
4. If `pending_transition` exists, do not rerun the completed stage action.
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
247
|
+
4. If `pending_transition` exists, do not rerun the completed stage action. Handle
|
|
248
|
+
`[easy-coding:lite-review-bypass-required:IMPLEMENT->REVIEW]` before the generic pending-edge
|
|
249
|
+
rule: call `cancel-transition`, then `auto-transition --stage VERIFICATION`. Otherwise compare
|
|
250
|
+
the stored edge with `effective_confirm_mode`. If the edge is now automatic, call
|
|
251
|
+
`auto-transition` for its stored target; otherwise re-present the confirmation/handoff/Other
|
|
252
|
+
choices. For a read-only task in IMPLEMENT, cancel any stale REVIEW/VERIFICATION edge before
|
|
253
|
+
the terminal check below. At an approve-mode IMPLEMENT boundary for a code task, re-present
|
|
254
|
+
the special REVIEW / skip to VERIFICATION / handoff choices.
|
|
245
255
|
5. If a read-only task resumes in IMPLEMENT with a valid successful result, output its complete
|
|
246
256
|
deliverable again and follow the effective mode to COMPLETE. Otherwise tell the user what is
|
|
247
257
|
being resumed and from which stage, then continue.
|
|
@@ -11,13 +11,13 @@ user in the user's language.
|
|
|
11
11
|
Start every work reply with the single Markdown blockquote status line injected by the hook,
|
|
12
12
|
then a blank line. Do not render the machine breadcrumbs to the user.
|
|
13
13
|
|
|
14
|
-
`{confirm-mode}` is the capitalized effective mode (`Approve`, `Guard`, or `Auto`); a session
|
|
14
|
+
`{confirm-mode}` is the capitalized effective mode (`Approve`, `Guard`, `Lite`, or `Auto`); a session
|
|
15
15
|
override takes precedence over the project mode.
|
|
16
16
|
|
|
17
|
-
- Ready: > **Easy Coding
|
|
18
|
-
- Waiting init: > **Easy Coding
|
|
19
|
-
- Active task: > **Easy Coding
|
|
20
|
-
- Handoff: > **Easy Coding
|
|
17
|
+
- Ready: > **Easy Coding** · **{confirm-mode}** · Ready · Use `ec-workflow` to start or resume a task, `ec-brainstorming` to brainstorm, or `ec-task-management` to manage tasks or session settings
|
|
18
|
+
- Waiting init: > **Easy Coding** · **{confirm-mode}** · Waiting init · Use `ec-init` to initialize
|
|
19
|
+
- Active task: > **Easy Coding** · **{confirm-mode}** · `{current-task}` · `{workflow-state}`
|
|
20
|
+
- Handoff: > **Easy Coding** · **{confirm-mode}** · `{current-task}` · `{workflow-state}` · Handoff -> `{source-agent}`
|
|
21
21
|
|
|
22
22
|
Skill names in the status line are bare names (`ec-init`, `ec-workflow`) and never include
|
|
23
23
|
platform prefixes such as `/` or `$`. If no status line is injected, do not invent one.
|
|
@@ -41,9 +41,9 @@ First run `ec-init`; daily work goes through `ec-workflow`.
|
|
|
41
41
|
|
|
42
42
|
- Effective confirm mode is session override > project `behavior.confirm_mode` > `guard`.
|
|
43
43
|
`approve` confirms every legal edge except INIT -> ANALYSIS and MEMORY -> COMPLETE; `guard`
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
and `lite` confirm only ANALYSIS -> IMPLEMENT and VERIFICATION -> MEMORY; `auto` confirms none.
|
|
45
|
+
Guard/auto code flow chooses IMPLEMENT -> REVIEW; lite chooses IMPLEMENT -> VERIFICATION and
|
|
46
|
+
never runs REVIEW. Confirmation mode never changes scope, delivery form, or evidence gates.
|
|
47
47
|
- Confirmation-required edges use `pending_transition`; automatic edges use the restricted
|
|
48
48
|
`auto-transition` API. A read-only task creates no test-strategy.md, never enters REVIEW,
|
|
49
49
|
VERIFICATION, or MEMORY, and writes no task memory.
|
|
@@ -11,13 +11,13 @@ user in the user's language.
|
|
|
11
11
|
Start every work reply with the single Markdown blockquote status line injected by the hook,
|
|
12
12
|
then a blank line. Do not render the machine breadcrumbs to the user.
|
|
13
13
|
|
|
14
|
-
`{confirm-mode}` is the capitalized effective mode (`Approve`, `Guard`, or `Auto`); a session
|
|
14
|
+
`{confirm-mode}` is the capitalized effective mode (`Approve`, `Guard`, `Lite`, or `Auto`); a session
|
|
15
15
|
override takes precedence over the project mode.
|
|
16
16
|
|
|
17
|
-
- Ready: > **Easy Coding
|
|
18
|
-
- Waiting init: > **Easy Coding
|
|
19
|
-
- Active task: > **Easy Coding
|
|
20
|
-
- Handoff: > **Easy Coding
|
|
17
|
+
- Ready: > **Easy Coding** · **{confirm-mode}** · Ready · Use `ec-workflow` to start or resume a task, `ec-brainstorming` to brainstorm, or `ec-task-management` to manage tasks or session settings
|
|
18
|
+
- Waiting init: > **Easy Coding** · **{confirm-mode}** · Waiting init · Use `ec-init` to initialize
|
|
19
|
+
- Active task: > **Easy Coding** · **{confirm-mode}** · `{current-task}` · `{workflow-state}`
|
|
20
|
+
- Handoff: > **Easy Coding** · **{confirm-mode}** · `{current-task}` · `{workflow-state}` · Handoff -> `{source-agent}`
|
|
21
21
|
|
|
22
22
|
Skill names in the status line are bare names (`ec-init`, `ec-workflow`) and never include
|
|
23
23
|
platform prefixes such as `/` or `$`. If no status line is injected, do not invent one.
|
|
@@ -39,9 +39,9 @@ First run `/ec-init`; daily work goes through `/ec-workflow`.
|
|
|
39
39
|
|
|
40
40
|
- Effective confirm mode is session override > project `behavior.confirm_mode` > `guard`.
|
|
41
41
|
`approve` confirms every legal edge except INIT -> ANALYSIS and MEMORY -> COMPLETE; `guard`
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
and `lite` confirm only ANALYSIS -> IMPLEMENT and VERIFICATION -> MEMORY; `auto` confirms none.
|
|
43
|
+
Guard/auto code flow chooses IMPLEMENT -> REVIEW; lite chooses IMPLEMENT -> VERIFICATION and
|
|
44
|
+
never runs REVIEW. Confirmation mode never changes scope, delivery form, or evidence gates.
|
|
45
45
|
- Confirmation-required edges use `pending_transition`; automatic edges use the restricted
|
|
46
46
|
`auto-transition` API. A read-only task creates no test-strategy.md, never enters REVIEW,
|
|
47
47
|
VERIFICATION, or MEMORY, and writes no task memory.
|
|
@@ -50,12 +50,13 @@ ALWAYS_AUTO_TRANSITIONS = {
|
|
|
50
50
|
}
|
|
51
51
|
READ_ONLY_COMPLETION_TRANSITION = ("IMPLEMENT", "COMPLETE")
|
|
52
52
|
NO_CODE_TASK_TYPES = {"analysis", "doc", "report"}
|
|
53
|
-
CONFIRM_MODES = {"approve", "guard", "auto"}
|
|
53
|
+
CONFIRM_MODES = {"approve", "guard", "lite", "auto"}
|
|
54
54
|
DEFAULT_CONFIRM_MODE = "guard"
|
|
55
|
-
|
|
55
|
+
CRITICAL_CONFIRM_TRANSITIONS = {
|
|
56
56
|
("ANALYSIS", "IMPLEMENT"),
|
|
57
57
|
("VERIFICATION", "MEMORY"),
|
|
58
58
|
}
|
|
59
|
+
LITE_SKIPPED_TRANSITION = ("IMPLEMENT", "REVIEW")
|
|
59
60
|
|
|
60
61
|
LEGACY_STAGE_MAP = {
|
|
61
62
|
"WAITING_CONFIRM": "ANALYSIS",
|
|
@@ -198,7 +199,7 @@ def read_project_confirm_mode(root: Path) -> str:
|
|
|
198
199
|
if mode not in CONFIRM_MODES:
|
|
199
200
|
raise StateError(
|
|
200
201
|
"Invalid behavior.confirm_mode in .easy-coding/config.yaml: "
|
|
201
|
-
"expected approve, guard, or auto."
|
|
202
|
+
"expected approve, guard, lite, or auto."
|
|
202
203
|
)
|
|
203
204
|
return mode
|
|
204
205
|
return DEFAULT_CONFIRM_MODE
|
|
@@ -208,7 +209,7 @@ def resolve_confirm_mode(root: Path, session: dict) -> tuple[str, str | None, st
|
|
|
208
209
|
project_mode = read_project_confirm_mode(root)
|
|
209
210
|
session_mode = session.get("confirm_mode")
|
|
210
211
|
if session_mode is not None and session_mode not in CONFIRM_MODES:
|
|
211
|
-
raise StateError("Invalid session confirm_mode: expected approve, guard, or auto.")
|
|
212
|
+
raise StateError("Invalid session confirm_mode: expected approve, guard, lite, or auto.")
|
|
212
213
|
effective_mode = str(session_mode or project_mode)
|
|
213
214
|
return project_mode, str(session_mode) if session_mode else None, effective_mode
|
|
214
215
|
|
|
@@ -950,13 +951,23 @@ def transition_requires_confirmation(
|
|
|
950
951
|
return True
|
|
951
952
|
if confirm_mode == "auto":
|
|
952
953
|
return False
|
|
953
|
-
if confirm_mode
|
|
954
|
-
return (previous, current) in
|
|
954
|
+
if confirm_mode in {"guard", "lite"}:
|
|
955
|
+
return (previous, current) in CRITICAL_CONFIRM_TRANSITIONS
|
|
955
956
|
if confirm_mode == "approve":
|
|
956
957
|
return True
|
|
957
958
|
raise StateError(f"Unknown confirm mode: {confirm_mode}")
|
|
958
959
|
|
|
959
960
|
|
|
961
|
+
def validate_confirm_mode_transition(
|
|
962
|
+
previous: str,
|
|
963
|
+
current: str,
|
|
964
|
+
confirm_mode: str,
|
|
965
|
+
) -> str | None:
|
|
966
|
+
if confirm_mode == "lite" and (previous, current) == LITE_SKIPPED_TRANSITION:
|
|
967
|
+
return "LITE MODE TRANSITION: IMPLEMENT -> REVIEW is disabled; use IMPLEMENT -> VERIFICATION."
|
|
968
|
+
return None
|
|
969
|
+
|
|
970
|
+
|
|
960
971
|
def is_automatic_transition(
|
|
961
972
|
previous: str,
|
|
962
973
|
current: str,
|
|
@@ -1040,7 +1051,7 @@ def build_status_line(
|
|
|
1040
1051
|
session_file: str | Path | None = None,
|
|
1041
1052
|
) -> str:
|
|
1042
1053
|
state = snapshot_state(root, session_file, session)
|
|
1043
|
-
status_brand = f"> **Easy Coding
|
|
1054
|
+
status_brand = f"> **Easy Coding** · **{str(state['effective_confirm_mode']).capitalize()}**"
|
|
1044
1055
|
task_id = state["current_task"]
|
|
1045
1056
|
if task_id:
|
|
1046
1057
|
status = str(state["status"])
|
|
@@ -1096,7 +1107,15 @@ def build_machine_breadcrumbs(
|
|
|
1096
1107
|
if target:
|
|
1097
1108
|
lines.append(f"[easy-coding:pending-transition:{source}->{target}]")
|
|
1098
1109
|
task_type = str(task.get("type") or "") if task else ""
|
|
1099
|
-
|
|
1110
|
+
# A mode switch can leave a REVIEW edge that lite must bypass instead of consume.
|
|
1111
|
+
mode_violation = validate_confirm_mode_transition(
|
|
1112
|
+
source,
|
|
1113
|
+
target,
|
|
1114
|
+
str(state["effective_confirm_mode"]),
|
|
1115
|
+
)
|
|
1116
|
+
if mode_violation:
|
|
1117
|
+
lines.append(f"[easy-coding:lite-review-bypass-required:{source}->{target}]")
|
|
1118
|
+
elif is_automatic_transition(
|
|
1100
1119
|
source,
|
|
1101
1120
|
target,
|
|
1102
1121
|
task_type,
|
|
@@ -1257,7 +1276,7 @@ def set_session_confirm_mode(
|
|
|
1257
1276
|
session_file: str | Path | None = None,
|
|
1258
1277
|
) -> dict:
|
|
1259
1278
|
if mode not in CONFIRM_MODES:
|
|
1260
|
-
raise StateError("Invalid confirm mode: expected approve, guard, or auto.")
|
|
1279
|
+
raise StateError("Invalid confirm mode: expected approve, guard, lite, or auto.")
|
|
1261
1280
|
session = ensure_session(root, session_file)
|
|
1262
1281
|
session["confirm_mode"] = mode
|
|
1263
1282
|
session["last_agent"] = agent
|
|
@@ -1446,6 +1465,9 @@ def request_transition(
|
|
|
1446
1465
|
violation = validate_transition(previous, stage, task_type)
|
|
1447
1466
|
if violation:
|
|
1448
1467
|
raise StateError(violation)
|
|
1468
|
+
mode_violation = validate_confirm_mode_transition(previous, stage, confirm_mode)
|
|
1469
|
+
if mode_violation:
|
|
1470
|
+
raise StateError(mode_violation)
|
|
1449
1471
|
if is_automatic_transition(previous, stage, task_type, confirm_mode):
|
|
1450
1472
|
raise StateError(
|
|
1451
1473
|
f"Transition {previous} -> {stage} is automatic in {confirm_mode} mode; "
|
|
@@ -1488,9 +1510,13 @@ def apply_transition(
|
|
|
1488
1510
|
|
|
1489
1511
|
previous = str(task.get("status") or "idle")
|
|
1490
1512
|
task_type = str(task.get("type") or "")
|
|
1513
|
+
confirm_mode = resolve_confirm_mode(root, session)[2]
|
|
1491
1514
|
violation = validate_transition(previous, stage, task_type)
|
|
1492
1515
|
if violation:
|
|
1493
1516
|
raise StateError(violation)
|
|
1517
|
+
mode_violation = validate_confirm_mode_transition(previous, stage, confirm_mode)
|
|
1518
|
+
if mode_violation:
|
|
1519
|
+
raise StateError(mode_violation)
|
|
1494
1520
|
if previous == "ANALYSIS" and stage == "IMPLEMENT":
|
|
1495
1521
|
validate_analysis_readiness(root, resolved_task_id)
|
|
1496
1522
|
if previous == "MEMORY" and stage == "COMPLETE":
|
|
@@ -1571,6 +1597,9 @@ def confirm_transition(
|
|
|
1571
1597
|
)
|
|
1572
1598
|
if stage and stage != target:
|
|
1573
1599
|
raise StateError(f"Pending transition targets {target}, not {stage}.")
|
|
1600
|
+
mode_violation = validate_confirm_mode_transition(source, target, confirm_mode)
|
|
1601
|
+
if mode_violation:
|
|
1602
|
+
raise StateError(mode_violation)
|
|
1574
1603
|
if is_automatic_transition(source, target, task_type, confirm_mode):
|
|
1575
1604
|
raise StateError(
|
|
1576
1605
|
f"Transition {source} -> {target} is automatic in {confirm_mode} mode; "
|