easy-coding-harness 0.6.1 → 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 +10 -0
- package/README.md +18 -6
- package/dist/cli.js +309 -168
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
- package/templates/common/skills/ec-analysis/SKILL.md +3 -3
- package/templates/common/skills/ec-implementing/SKILL.md +10 -10
- package/templates/common/skills/ec-memory/SKILL.md +3 -3
- package/templates/common/skills/ec-no-harness/SKILL.md +39 -0
- package/templates/common/skills/ec-reviewing/SKILL.md +2 -2
- package/templates/common/skills/ec-task-management/SKILL.md +23 -1
- package/templates/common/skills/ec-verification/SKILL.md +16 -16
- package/templates/common/skills/ec-workflow/SKILL.md +62 -56
- package/templates/main-constraint/AGENTS.md.tpl +14 -11
- package/templates/main-constraint/CLAUDE.md.tpl +14 -11
- package/templates/shared-hooks/easy_coding_state.py +218 -18
- package/templates/shared-hooks/inject-subagent-context.py +6 -2
package/package.json
CHANGED
|
@@ -50,9 +50,9 @@ Communicate with the user in the user's language.
|
|
|
50
50
|
downgrade: during the pre-fill decision gate, ask "split into batches? / which subset this
|
|
51
51
|
round?" and wait for the user to decide. Never make a scope-narrowing decision yourself and
|
|
52
52
|
present it as settled. Never fabricate a
|
|
53
|
-
premise such as "the user already fixed scope X in INIT" or "
|
|
54
|
-
to justify narrowing —
|
|
55
|
-
|
|
53
|
+
premise such as "the user already fixed scope X in INIT" or "confirm_mode already selected Y"
|
|
54
|
+
to justify narrowing — confirmation mode controls stage-boundary prompts only and carries
|
|
55
|
+
NO scope or delivery-form decision whatsoever.
|
|
56
56
|
6. **改动范围 lists ONLY real project code.** The 改动范围 table carries only changes to real
|
|
57
57
|
project source/config files. Any harness artifact under `.easy-coding/` (dev-spec.md,
|
|
58
58
|
execution.jsonl, test-strategy.md, memory files, generated reports, etc.) is FORBIDDEN in
|
|
@@ -53,7 +53,7 @@ EVERY STRATEGY = MANDATORY SUB-AGENT DISPATCH. NO EXCEPTIONS.
|
|
|
53
53
|
You MUST dispatch sub-agents using {{sub_agent_dispatch}} for every unit, whatever the
|
|
54
54
|
strategy. You are FORBIDDEN from implementing any unit yourself in the main agent. Doing the
|
|
55
55
|
work inline instead of dispatching is a protocol violation equivalent to bypassing the
|
|
56
|
-
ANALYSIS -> IMPLEMENT
|
|
56
|
+
ANALYSIS -> IMPLEMENT gate selected by the effective confirm mode.
|
|
57
57
|
|
|
58
58
|
Self-check before writing ANY implementation code:
|
|
59
59
|
- Am I about to write implementation code in the main agent? → STOP. Dispatch a sub-agent.
|
|
@@ -121,19 +121,19 @@ let sub-agents re-dispatch each other.
|
|
|
121
121
|
|
|
122
122
|
## End state
|
|
123
123
|
|
|
124
|
-
- **Code task:** after all units are done and self-audited, hand back to ec-workflow.
|
|
125
|
-
IMPLEMENT -> REVIEW as the recommended pending edge
|
|
126
|
-
|
|
124
|
+
- **Code task:** after all units are done and self-audited, hand back to ec-workflow. In approve
|
|
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.
|
|
127
127
|
- **No-code read-only task:** after recording the successful result and showing the complete
|
|
128
|
-
deliverable,
|
|
128
|
+
deliverable, request COMPLETE in approve mode or auto-transition in guard/auto. Do not
|
|
129
129
|
enter REVIEW, VERIFICATION, or MEMORY; do not write short or long memory. The state API only
|
|
130
130
|
accepts this terminal edge when the latest plan is `single` with `files:[]` and the latest
|
|
131
131
|
result has `changed_files:[]`, a non-empty `deliverable`, and no issues/needs_attention.
|
|
132
132
|
A matching `dispatch` record must immediately precede the accepted result among that unit's
|
|
133
133
|
execution records; an inline report without dispatch cannot complete.
|
|
134
134
|
|
|
135
|
-
If something invalidates the plan before completion,
|
|
136
|
-
the
|
|
135
|
+
If something invalidates the plan before completion, select IMPLEMENT -> ANALYSIS and follow
|
|
136
|
+
the effective confirm mode instead of improvising.
|
|
137
137
|
|
|
138
138
|
## Self-check gates (before handing back)
|
|
139
139
|
|
|
@@ -143,6 +143,6 @@ the standard gate instead of improvising.
|
|
|
143
143
|
- [ ] Each returned unit has a `result` record?
|
|
144
144
|
- [ ] No files modified outside the change-scope table?
|
|
145
145
|
- [ ] For a no-code unit: changed_files is empty, deliverable is non-empty, and the full
|
|
146
|
-
deliverable was output verbatim to the user before
|
|
147
|
-
- [ ] For a no-code task: IMPLEMENT -> COMPLETE
|
|
148
|
-
MEMORY, or memory write?
|
|
146
|
+
deliverable was output verbatim to the user before completion?
|
|
147
|
+
- [ ] For a no-code task: IMPLEMENT -> COMPLETE followed the effective confirm mode, with no
|
|
148
|
+
REVIEW, VERIFICATION, MEMORY, or memory write?
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ec-memory
|
|
3
|
-
description: MEMORY-stage skill —
|
|
3
|
+
description: MEMORY-stage skill — archive flow entered after a green VERIFICATION gate according to the effective confirm mode. Writes one schema-v2 short memory, runs the authoritative conditional long-memory gate, performs optional distillation, and automatically completes the task.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# ec-memory — archive what was learned
|
|
7
7
|
|
|
8
|
-
ec-workflow dispatches you during MEMORY
|
|
9
|
-
|
|
8
|
+
ec-workflow dispatches you during MEMORY after approve/guard acceptance or an auto-mode green
|
|
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
|
|
12
12
|
MEMORY or write task memory.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ec-no-harness
|
|
3
|
+
description: Disable Easy Coding Harness orchestration for the current agent session and use native agent behavior. Use only when the user explicitly invokes {{skill_trigger}}ec-no-harness or explicitly asks to restore Easy Coding after this bypass.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# ec-no-harness — current-session Easy Coding bypass
|
|
7
|
+
|
|
8
|
+
This skill bypasses only Easy Coding Harness for the current session. It does not disable the
|
|
9
|
+
platform's hook system, alter `EC_HOOKS`, or suppress non-Easy-Coding skills and instructions.
|
|
10
|
+
|
|
11
|
+
Communicate with the user in the user's language.
|
|
12
|
+
|
|
13
|
+
## Disable for this session
|
|
14
|
+
|
|
15
|
+
Read `[easy-coding:session-file:P]` from the injected context, then call:
|
|
16
|
+
|
|
17
|
+
`{{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py disable-harness --session-file <P> --agent <agent-id>`
|
|
18
|
+
|
|
19
|
+
After the command succeeds:
|
|
20
|
+
- Do not enter or resume ec-workflow in this session.
|
|
21
|
+
- Do not emit an Easy Coding status line or apply Easy Coding stages, confirmation gates,
|
|
22
|
+
task artifacts, verification orchestration, or memory workflow.
|
|
23
|
+
- Process the user's request with the platform's native agent behavior.
|
|
24
|
+
- Continue honoring project/user/global instructions, explicitly requested non-Easy-Coding
|
|
25
|
+
skills, and every other hook.
|
|
26
|
+
- Do not clear `current_task`, delete a pending transition, or modify task state. The task is
|
|
27
|
+
suspended intact and can resume after restoring Easy Coding or in a new session.
|
|
28
|
+
|
|
29
|
+
If the invocation contains no request beyond enabling the bypass, briefly confirm that native
|
|
30
|
+
mode is active for the current session.
|
|
31
|
+
|
|
32
|
+
## Restore Easy Coding in the same session
|
|
33
|
+
|
|
34
|
+
Only when the user explicitly asks to restore/resume Easy Coding, call:
|
|
35
|
+
|
|
36
|
+
`{{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py enable-harness --session-file <P> --agent <agent-id>`
|
|
37
|
+
|
|
38
|
+
Use the returned `status_context` as authoritative. Do not advance the task automatically;
|
|
39
|
+
hand control back to ec-workflow routing semantics.
|
|
@@ -89,6 +89,6 @@ Platform spawn rule: {{platform_spawn_instruction}}
|
|
|
89
89
|
Append `review` records to execution.jsonl, one per dimension:
|
|
90
90
|
`{"type":"review","dimension":"correctness","findings":[{"file":"...","line":42,"issue":"...","severity":"warn"}]}`.
|
|
91
91
|
Then state the verdict and hand back to ec-workflow.
|
|
92
|
-
For `accept` or `replan`, ec-workflow
|
|
93
|
-
|
|
92
|
+
For `accept` or `replan`, ec-workflow follows the effective confirm mode for the corresponding
|
|
93
|
+
transition. A `fix` round stays inside REVIEW and therefore
|
|
94
94
|
does not create a status transition unless the outcome changes.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ec-task-management
|
|
3
|
-
description: Task panel for Easy Coding
|
|
3
|
+
description: Task and session panel for Easy Coding. Use when the user runs {{skill_trigger}}ec-task-management, asks to see/create/continue/take over tasks, or asks to view or change the current session confirm mode.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# ec-task-management — the task panel
|
|
@@ -62,6 +62,28 @@ The command returns `status_line` and `status_context`. If the command sets or c
|
|
|
62
62
|
`current_task`, use the returned context as the authoritative status source for the rest of
|
|
63
63
|
the current turn instead of older hook-injected status text.
|
|
64
64
|
|
|
65
|
+
### View or change this session's confirm mode
|
|
66
|
+
|
|
67
|
+
Call `snapshot --session-file <P>` and show:
|
|
68
|
+
- `project_confirm_mode`
|
|
69
|
+
- `session_confirm_mode` (`project default` when null)
|
|
70
|
+
- `effective_confirm_mode`
|
|
71
|
+
|
|
72
|
+
When the user asks to change the current session, use native choice UI when available and offer
|
|
73
|
+
exactly `approve`, `guard` (recommended default), and `auto`. The native free-form Other input
|
|
74
|
+
may receive `restore project default`; do not invent a fourth button when the UI is limited to
|
|
75
|
+
three choices.
|
|
76
|
+
|
|
77
|
+
Set an override through the state API, never by editing the session JSON:
|
|
78
|
+
`{{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py set-confirm-mode --session-file <P> --mode <approve|guard|auto> --agent <agent-id>`.
|
|
79
|
+
|
|
80
|
+
Restore project configuration through:
|
|
81
|
+
`{{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py clear-confirm-mode --session-file <P> --agent <agent-id>`.
|
|
82
|
+
|
|
83
|
+
Use the returned snapshot as authoritative and report the effective mode. Preserve any existing
|
|
84
|
+
`pending_transition`; when it becomes automatic, ec-workflow consumes its original target via
|
|
85
|
+
`auto-transition` instead of losing the completed stage outcome.
|
|
86
|
+
|
|
65
87
|
## Boundaries
|
|
66
88
|
|
|
67
89
|
- Do not close or cancel tasks — that is ec-task-close.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ec-verification
|
|
3
|
-
description: VERIFICATION-stage skill — the hard gate between implementation/review and archive.
|
|
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
|
|
@@ -19,10 +19,10 @@ NO COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE
|
|
|
19
19
|
- A previous round's result does not count.
|
|
20
20
|
- "should pass" / "looks correct" is not evidence.
|
|
21
21
|
|
|
22
|
-
NO
|
|
23
|
-
- Verification passing
|
|
24
|
-
-
|
|
25
|
-
-
|
|
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.
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
## 1. Run the gate (parallel, always sub-agents)
|
|
@@ -53,10 +53,10 @@ 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; wait
|
|
57
|
-
acceptance
|
|
58
|
-
- Any failure → append the failing `verify` record, summarize failures,
|
|
59
|
-
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.
|
|
60
60
|
|
|
61
61
|
## 4. User acceptance and repair loop
|
|
62
62
|
|
|
@@ -64,11 +64,10 @@ 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"** → request VERIFICATION -> MEMORY and present the standard boundary gate.
|
|
67
|
+
- **"accepted"** (approve/guard) → request VERIFICATION -> MEMORY and present the standard boundary gate.
|
|
68
68
|
- **"problem here"** → scope judgment against the dev-spec:
|
|
69
|
-
- in scope →
|
|
70
|
-
|
|
71
|
-
VERIFICATION resumes directly.
|
|
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.
|
|
72
71
|
- out of scope → propose a new task (`spawned_from` = current task id); the current task
|
|
73
72
|
may archive now (if already satisfactory) or stay suspended.
|
|
74
73
|
- **"cancel"** → ec-task-close.
|
|
@@ -77,15 +76,16 @@ Repair sizing: a trivial tweak is fixed and re-verified inside VERIFICATION; a l
|
|
|
77
76
|
change formally returns to IMPLEMENT. After repair, present the standard IMPLEMENT completion
|
|
78
77
|
choice again so the user may enter REVIEW or skip directly to VERIFICATION.
|
|
79
78
|
|
|
80
|
-
## 5. Archive entry
|
|
79
|
+
## 5. Archive entry
|
|
81
80
|
|
|
82
|
-
|
|
83
|
-
`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:
|
|
84
83
|
1. Confirm entering MEMORY
|
|
85
84
|
2. Hand off to another agent
|
|
86
85
|
3. Other (native free-form Other, or the third text option)
|
|
87
86
|
|
|
88
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`.
|
|
89
89
|
ec-memory owns both short-memory creation and the conditional long-memory gate inside the
|
|
90
90
|
single MEMORY stage. After memory processing completes, MEMORY -> COMPLETE advances
|
|
91
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.
|
|
@@ -65,24 +69,24 @@ replies are English.
|
|
|
65
69
|
## State machine
|
|
66
70
|
|
|
67
71
|
```
|
|
68
|
-
INIT --[auto]--> ANALYSIS -> IMPLEMENT -> REVIEW -> VERIFICATION -> MEMORY --[auto]--> COMPLETE
|
|
72
|
+
INIT --[always auto]--> ANALYSIS -> IMPLEMENT -> REVIEW -> VERIFICATION -> MEMORY --[always auto]--> COMPLETE
|
|
69
73
|
\----------------> VERIFICATION
|
|
70
|
-
\--[read-only
|
|
74
|
+
\--[read-only, mode-aware]-----------------------> COMPLETE
|
|
71
75
|
^ ^ | |
|
|
72
76
|
+-- replan ---+ +--- fix -----+
|
|
73
77
|
^ |
|
|
74
78
|
+------- repair ----------+
|
|
75
|
-
|
|
79
|
+
edge behavior --[effective confirm mode: approve / guard / auto]--> target stage
|
|
76
80
|
any stage --[user abort via ec-task-close]--> CLOSED
|
|
77
81
|
```
|
|
78
82
|
|
|
79
83
|
| Stage | Owner skill | What happens | Exit condition |
|
|
80
84
|
|---|---|---|---|
|
|
81
85
|
| INIT | ec-workflow | collect context, settle scope AND delivery form (change code vs. produce a document) | work complete; auto-transition to ANALYSIS |
|
|
82
|
-
| ANALYSIS | ec-analysis | dev-spec + execution plan; code tasks also get test strategy |
|
|
83
|
-
| IMPLEMENT | ec-implementing | code changes or one read-only deliverable | code
|
|
84
|
-
| REVIEW | ec-reviewing | multi-dimension code review | verdict selects a legal target
|
|
85
|
-
| VERIFICATION | ec-verification | hard gate: lint/typecheck/test + coverage |
|
|
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 |
|
|
86
90
|
| MEMORY | ec-memory | write short memory, then run the conditional long-memory gate | memory work complete; auto-transition to COMPLETE |
|
|
87
91
|
| COMPLETE | ec-workflow | clear current_task, set task status, summary | automatic terminal after MEMORY or validated read-only IMPLEMENT |
|
|
88
92
|
| CLOSED | ec-task-close | user abort; no memory flow | terminal |
|
|
@@ -93,9 +97,9 @@ any stage --[user abort via ec-task-close]--> CLOSED
|
|
|
93
97
|
> code task into a documentation-only task — that is a downgrade (see ec-analysis HARD RULE 5).
|
|
94
98
|
> Use `doc`, `analysis`, or `report` only when the user's original request explicitly asks for
|
|
95
99
|
> a no-code deliverable. Those task types may carry execution units with an empty file scope;
|
|
96
|
-
> code task types may not.
|
|
97
|
-
>
|
|
98
|
-
> REVIEW, VERIFICATION, or MEMORY.
|
|
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.
|
|
99
103
|
|
|
100
104
|
## Task switching
|
|
101
105
|
|
|
@@ -114,22 +118,28 @@ it, routing matches, and switching happens again.
|
|
|
114
118
|
|
|
115
119
|
## Transition rules (hard)
|
|
116
120
|
|
|
117
|
-
- **Code tasks may skip only REVIEW.** ANALYSIS cannot jump to VERIFICATION
|
|
118
|
-
|
|
119
|
-
the user may
|
|
120
|
-
VERIFICATION.
|
|
121
|
-
- **
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
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
|
|
133
143
|
prefer the agent/platform's native user-choice tool whenever one is available. Do not render
|
|
134
144
|
a plain-text numbered list on a platform that can present selectable options and a free-form
|
|
135
145
|
Other input. Offer exactly these business branches through that native UI:
|
|
@@ -147,7 +157,7 @@ it, routing matches, and switching happens again.
|
|
|
147
157
|
you against the current task and stored target before calling `confirm-transition` explicitly.
|
|
148
158
|
On Other feedback, cancel the pending edge before revising work or requesting a different
|
|
149
159
|
legal target. Never interpret silence, enthusiasm, or topic changes as confirmation.
|
|
150
|
-
- **State before action.** Every
|
|
160
|
+
- **State before action.** Every confirmation-required stage advance is a two-step protocol: first
|
|
151
161
|
consume the pending edge through `confirm-transition`, then run that stage's real work. The
|
|
152
162
|
automatic edges use `auto-transition` instead. Do not start
|
|
153
163
|
analysis, implementation, review, verification, memory writing, or closeout while
|
|
@@ -165,23 +175,20 @@ it, routing matches, and switching happens again.
|
|
|
165
175
|
Additionally, ANALYSIS must stay faithful to the user's delivery form — it may NOT downgrade
|
|
166
176
|
a code task to a report-only task — and the 改动范围 table must list only real project code,
|
|
167
177
|
never `.easy-coding/` harness artifacts (ec-analysis HARD RULES 5 and 6).
|
|
168
|
-
- **
|
|
169
|
-
waives stage-boundary prompts when the user explicitly requested autonomous execution.
|
|
170
|
-
It carries NO scope or delivery-form decision. Never cite `auto_mode` to narrow scope,
|
|
171
|
-
downgrade a code task, or bypass a blocker that needs a real user decision.
|
|
172
|
-
- **At user-decision stage completion** request the legal target immediately (not at turn end):
|
|
178
|
+
- **At confirmation-required stage completion** request the legal target immediately:
|
|
173
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>"`.
|
|
174
180
|
This writes only `pending_transition`; it does not change the stage.
|
|
175
181
|
- **No-code IMPLEMENT delivery:** before completing the task, ec-implementing must
|
|
176
182
|
have output the successful unit's complete non-empty `deliverable` verbatim to the user.
|
|
177
183
|
A summary or execution.jsonl record is not a substitute; missing user-visible delivery keeps
|
|
178
184
|
the task in IMPLEMENT. The execution log must contain a matching `dispatch` immediately before
|
|
179
|
-
the accepted result for that unit. After delivery,
|
|
180
|
-
do not enter REVIEW, VERIFICATION, or
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
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.
|
|
185
192
|
- **On user confirmation** read the current task's pending edge and call:
|
|
186
193
|
`{{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py confirm-transition --session-file <P> --stage <STAGE> --agent <agent-id>`.
|
|
187
194
|
Only after the read-after-write status names the target stage may its action start.
|
|
@@ -197,18 +204,17 @@ it, routing matches, and switching happens again.
|
|
|
197
204
|
you MUST revert the task's status to the previous valid stage and explain why the
|
|
198
205
|
transition was rejected. Do not proceed with an illegal stage.
|
|
199
206
|
- **Repair loop sizing** (after VERIFICATION): a trivial tweak may be fixed inside
|
|
200
|
-
VERIFICATION and re-verified without a status change; a logic or structure change
|
|
201
|
-
VERIFICATION -> IMPLEMENT and
|
|
202
|
-
the IMPLEMENT
|
|
203
|
-
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.
|
|
204
210
|
- **Scope guard** (repair loop): if the user's fix request falls outside the dev-spec scope
|
|
205
211
|
(features or files absent from the change-scope table), say so explicitly and propose a
|
|
206
212
|
new task with `spawned_from` set to the current task id. Never silently absorb scope creep.
|
|
207
213
|
- **Task switching is allowed at any stage.** The suspended task retains its stage in
|
|
208
214
|
task.json. Do not run memory flows for suspended tasks — only completed tasks get archived.
|
|
209
|
-
- **Archive only after
|
|
210
|
-
A green gate requests VERIFICATION -> MEMORY
|
|
211
|
-
|
|
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`,
|
|
212
218
|
then asks the state API for the authoritative `memory` instruction. `action == "no-op"`
|
|
213
219
|
skips long-memory reads/writes; `action == "distill"` processes exactly `trim_count` older
|
|
214
220
|
entries. After `memory-complete`, ec-memory automatically advances MEMORY -> COMPLETE.
|
|
@@ -220,7 +226,8 @@ it, routing matches, and switching happens again.
|
|
|
220
226
|
## Resume and handoff
|
|
221
227
|
|
|
222
228
|
Hook breadcrumbs you may receive: `[workflow-state:X]`, `[current-task:Y]`,
|
|
223
|
-
`[easy-coding:session-file:P]`, `[easy-coding:
|
|
229
|
+
`[easy-coding:session-file:P]`, `[easy-coding:confirm-mode:M]`,
|
|
230
|
+
`[easy-coding:handoff-from:Z]`,
|
|
224
231
|
`[easy-coding:init-required]`.
|
|
225
232
|
|
|
226
233
|
Resuming an active task (whether from session restart, claim, handoff, or task switch):
|
|
@@ -229,21 +236,20 @@ Resuming an active task (whether from session restart, claim, handoff, or task s
|
|
|
229
236
|
records tell you exactly where work stopped.
|
|
230
237
|
3. If the task was claimed from another agent, read the latest `handoff` record first for the
|
|
231
238
|
fast summary and tell the user which previous agent handed it off.
|
|
232
|
-
4. If `pending_transition` exists, do not rerun the completed stage action.
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
special REVIEW / skip to VERIFICATION / handoff choices.
|
|
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.
|
|
239
245
|
5. If a read-only task resumes in IMPLEMENT with a valid successful result, output its complete
|
|
240
|
-
deliverable again and
|
|
241
|
-
|
|
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.
|
|
242
248
|
|
|
243
249
|
After a task switch, the same resume flow applies — the only difference is that `current_task`
|
|
244
250
|
was just changed by the switching procedure rather than being loaded from a prior session.
|
|
245
251
|
|
|
246
|
-
Offering handoff — every
|
|
252
|
+
Offering handoff — every confirmation-required pending edge includes the handoff option. On that
|
|
247
253
|
option, call:
|
|
248
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>"`.
|
|
249
255
|
|
|
@@ -29,21 +29,24 @@ 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
|
-
|
|
44
|
-
read-only task creates no test-strategy.md, never enters REVIEW,
|
|
45
|
-
writes no task memory.
|
|
46
|
-
|
|
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.
|
|
47
50
|
- ANALYSIS must follow template-first: read `.easy-coding/templates/dev-spec-skeleton.md` then
|
|
48
51
|
write its exact content to the task's dev-spec.md as the FIRST tool calls. Next inspect evidence
|
|
49
52
|
without editing the skeleton, ask every unresolved decision during analysis, and wait. Only
|
|
@@ -51,8 +54,8 @@ First run `ec-init`; daily work goes through `ec-workflow`.
|
|
|
51
54
|
contains neither `[阶段:ANALYSIS]` nor a `待用户决策` section.
|
|
52
55
|
- For code tasks, VERIFICATION is a hard gate: lint + typecheck + test must pass on fresh
|
|
53
56
|
evidence, and coverage must match the test strategy, before completion.
|
|
54
|
-
- MEMORY combines short-memory creation and the conditional long-memory gate.
|
|
55
|
-
|
|
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.
|
|
56
59
|
- NO CODE-TASK COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE.
|
|
57
60
|
- All cross-platform modules (skills, hooks, references) must use universal agent protocols.
|
|
58
61
|
Do not rely on any specific agent's proprietary conventions unless the module is explicitly
|
|
@@ -27,21 +27,24 @@ 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
|
-
|
|
42
|
-
read-only task creates no test-strategy.md, never enters REVIEW,
|
|
43
|
-
writes no task memory.
|
|
44
|
-
|
|
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.
|
|
45
48
|
- ANALYSIS must follow template-first: read `.easy-coding/templates/dev-spec-skeleton.md` then
|
|
46
49
|
write its exact content to the task's dev-spec.md as the FIRST tool calls. Next inspect evidence
|
|
47
50
|
without editing the skeleton, ask every unresolved decision during analysis, and wait. Only
|
|
@@ -49,8 +52,8 @@ First run `/ec-init`; daily work goes through `/ec-workflow`.
|
|
|
49
52
|
contains neither `[阶段:ANALYSIS]` nor a `待用户决策` section.
|
|
50
53
|
- For code tasks, VERIFICATION is a hard gate: lint + typecheck + test must pass on fresh
|
|
51
54
|
evidence, and coverage must match the test strategy, before completion.
|
|
52
|
-
- MEMORY combines short-memory creation and the conditional long-memory gate.
|
|
53
|
-
|
|
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.
|
|
54
57
|
- NO CODE-TASK COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE.
|
|
55
58
|
- All cross-platform modules (skills, hooks, references) must use universal agent protocols.
|
|
56
59
|
Do not rely on any specific agent's proprietary conventions unless the module is explicitly
|