easy-coding-harness 1.1.0-beta.1 → 1.1.0-beta.3
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 +21 -0
- package/README.md +17 -6
- package/dist/cli.js +395 -190
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
- package/templates/common/skills/ec-analysis/SKILL.md +8 -4
- package/templates/common/skills/ec-config/SKILL.md +33 -5
- package/templates/common/skills/ec-implementing/SKILL.md +10 -2
- package/templates/common/skills/ec-memory/SKILL.md +48 -24
- package/templates/common/skills/ec-quality/SKILL.md +42 -10
- package/templates/common/skills/ec-task-management/SKILL.md +10 -3
- package/templates/common/skills/ec-workflow/SKILL.md +30 -10
- package/templates/main-constraint/AGENTS.md.tpl +27 -9
- package/templates/main-constraint/CLAUDE.md.tpl +27 -9
- package/templates/runtime/memory/SHORT_MEMORY_TEMPLATE.md +21 -48
- package/templates/shared-hooks/easy_coding_inputs.py +18 -0
- package/templates/shared-hooks/easy_coding_state.py +367 -126
package/package.json
CHANGED
|
@@ -6,7 +6,8 @@ description: ANALYSIS-stage skill. Produces the confirmed dev-spec, execution pl
|
|
|
6
6
|
# ec-analysis — progressive analysis and mode selection
|
|
7
7
|
|
|
8
8
|
This stage is read-only for project source. Its outputs are task artifacts only:
|
|
9
|
-
`dev-spec.md`, `execution.jsonl` plan, and `test-strategy.md`
|
|
9
|
+
`dev-spec.md`, `execution.jsonl` plan, and `test-strategy.md` when required by the concrete mode.
|
|
10
|
+
Compact Fast keeps checks in the existing plan.
|
|
10
11
|
|
|
11
12
|
Communicate with the user in the user's language.
|
|
12
13
|
|
|
@@ -14,9 +15,11 @@ Communicate with the user in the user's language.
|
|
|
14
15
|
|
|
15
16
|
1. Read task.json, SOUL, RULES index/headings, ABSTRACT index/headings, and the dev-spec
|
|
16
17
|
skeleton.
|
|
17
|
-
2. Search short-memory frontmatter and summaries first. Open only memories whose domains,
|
|
18
|
+
2. Search short-memory frontmatter and knowledge summaries first. Open only memories whose domains,
|
|
18
19
|
tags, related files, or predecessor links match this task. Do not load the newest five
|
|
19
|
-
memories unconditionally.
|
|
20
|
+
memories unconditionally. Skip `memory_value: none` during knowledge retrieval. For legacy
|
|
21
|
+
reports, read the matching reusable decisions or pitfalls; consult acceptance/process records
|
|
22
|
+
only when the current task needs that history, not as default development context.
|
|
20
23
|
3. Read full RULES/ABSTRACT sections only for affected modules.
|
|
21
24
|
4. Inspect concrete code paths and tests. Expand context only when evidence reveals another
|
|
22
25
|
dependency or risk.
|
|
@@ -24,7 +27,8 @@ Communicate with the user in the user's language.
|
|
|
24
27
|
Load context only for the current change and its direct dependencies. Reuse existing findings;
|
|
25
28
|
without new evidence, do not repeat discovery or expand into unrelated modules.
|
|
26
29
|
|
|
27
|
-
For a task with `task.json.spec_source`,
|
|
30
|
+
For a task with `task.json.spec_source`, reuse the returned/current-session consumption closure.
|
|
31
|
+
Only if missing or changed, use `resume-spec-context` against the stored source, exact
|
|
28
32
|
`selected_spec_tasks`, and only their stored `task.repo_paths` bindings. Schema, Spec ID, design
|
|
29
33
|
revision, and `design_sha256` must still match. A changed `document_sha256` with the same design is
|
|
30
34
|
normal shared progress; refresh `execution_revision` without invalidating plan/QUALITY
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ec-config
|
|
3
|
-
description: Inspect and configure Easy Coding project/session Approval,
|
|
3
|
+
description: Inspect and configure Easy Coding project/session Approval, cooperation, and Java unit test strategies across session, local and project scopes.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# ec-config — mode configuration
|
|
@@ -10,15 +10,17 @@ and available actions. Never mutate project or session settings without an expli
|
|
|
10
10
|
|
|
11
11
|
## Configuration panel
|
|
12
12
|
|
|
13
|
-
Call `snapshot` and show project, session, effective, and frozen task values for `approval_mode`,
|
|
13
|
+
Call `snapshot` and show project, session, effective, and frozen task values for `approval_mode`, `cooperate_mode`,
|
|
14
14
|
the mechanically calculated workflow mode (read-only), `unit_test_mode`, and `ut_coverage_threshold`.
|
|
15
|
+
Show `behavior_sources`, `local_behavior`, and `effective_cooperate_mode` alongside the current
|
|
16
|
+
task cooperation/continuation so a receiving Agent can distinguish its defaults from accepted work.
|
|
15
17
|
Use `project_unit_test_mode`, `session_unit_test_mode`, `effective_unit_test_mode`, their threshold
|
|
16
18
|
counterparts, `task_unit_test_mode`, `task_tdd_baselines`, and `unit_test_readiness_status` directly.
|
|
17
19
|
When readiness is `not_checked`, report it as not checked; do not scan infrastructure merely to
|
|
18
20
|
populate the panel. Inspect readiness when the user requests it or selects UT/TDD.
|
|
19
21
|
|
|
20
|
-
Precedence is `session override > project config > defaults
|
|
21
|
-
Workflow `adaptive`, unit test strategy `none`, and shared changed-line coverage threshold 90%.
|
|
22
|
+
Precedence is `session override > ~/.easy-coding/config.yaml > project config > defaults`, per field. Defaults are Approval `guard`,
|
|
23
|
+
Workflow `adaptive`, cooperation `default`, unit test strategy `none`, and shared changed-line coverage threshold 90%.
|
|
22
24
|
The strategies are:
|
|
23
25
|
|
|
24
26
|
- `none`: ordinary task-required verification, with no additional coverage gate.
|
|
@@ -36,6 +38,32 @@ non-mechanical edge, `guard` waits at ANALYSIS -> IMPLEMENT and QUALITY -> MEMOR
|
|
|
36
38
|
waits only for the plan, and `auto` advances legal green edges immediately. A new code diff after
|
|
37
39
|
the QUALITY checkpoint requires acceptance of that exact diff without changing the approval mode.
|
|
38
40
|
|
|
41
|
+
## Cooperation and configuration scopes
|
|
42
|
+
|
|
43
|
+
`cooperate_mode: default | dispatch` selects stage-boundary handoff or manual implementation/repair
|
|
44
|
+
handoff. In dispatch, the coordinator analyzes, verifies and writes memory; the user may choose
|
|
45
|
+
current-Agent execution for any bounded change. Never launch or schedule another Agent.
|
|
46
|
+
One decision approves the displayed scope and its executor. Dispatch requires this human decision
|
|
47
|
+
even under Auto; Approve consumes it as the same approval, not a second dialog. Existing accepted
|
|
48
|
+
handoffs and frozen UT/TDD contracts survive changes to defaults.
|
|
49
|
+
|
|
50
|
+
The local file is optional. Read-only inspection and init/upgrade never create it. Save only explicit
|
|
51
|
+
keys under `behavior`; resetting a key removes that override. Local settings are preferences across
|
|
52
|
+
projects and platforms, so saving local UT/TDD does not scan or initialize the current project.
|
|
53
|
+
Readiness is checked when a task actually enables that strategy.
|
|
54
|
+
|
|
55
|
+
After the user chooses scope and values, use these commands (the explicit choice authorizes `--yes`):
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
easy-coding config --scope local --cooperate-mode dispatch --yes
|
|
59
|
+
easy-coding config --scope project --cooperate-mode default --yes
|
|
60
|
+
easy-coding config --scope local --reset cooperate_mode --yes
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
The same scopes support `--approval-mode`, `--unit-test-mode`, and `--ut-coverage-threshold`.
|
|
64
|
+
For a session, call `set-cooperate-mode --mode default|dispatch` or `clear-cooperate-mode`
|
|
65
|
+
with the current state API, agent and session file. Bare `ec-config` remains read-only.
|
|
66
|
+
|
|
39
67
|
## Project configuration
|
|
40
68
|
|
|
41
69
|
Use `easy-coding config`. The CLI confirms an atomic update of Approval, unit test strategy, and
|
|
@@ -49,7 +77,7 @@ After explicit user selection, use the current logical session file:
|
|
|
49
77
|
{{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py set-approval-mode --mode approve|guard|confirm|auto --agent <agent-id> --session-file <P>
|
|
50
78
|
{{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py clear-approval-mode --agent <agent-id> --session-file <P>
|
|
51
79
|
|
|
52
|
-
# Omitting threshold preserves the session threshold or inherits project/default 90.
|
|
80
|
+
# Omitting threshold preserves the session threshold or inherits local/project/default 90.
|
|
53
81
|
{{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py set-unit-test-mode --mode none|ut|tdd [--threshold 1..100] --agent <agent-id> --session-file <P>
|
|
54
82
|
{{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py clear-unit-test-mode --agent <agent-id> --session-file <P>
|
|
55
83
|
```
|
|
@@ -7,10 +7,10 @@ description: IMPLEMENT-stage skill. Executes the confirmed plan with workflow-mo
|
|
|
7
7
|
|
|
8
8
|
Use only after ANALYSIS has frozen `task.json.workflow_mode` to `fast`, `standard`, or
|
|
9
9
|
`strict`. Read `dev-spec.md`, the latest `plan` record in `execution.jsonl`, relevant RULES
|
|
10
|
-
and ABSTRACT sections
|
|
10
|
+
and ABSTRACT sections. Read `test-strategy.md` when required; compact Fast uses plan checks.
|
|
11
11
|
|
|
12
12
|
For a Canonical-backed task, consume the ready `spec_context.consumption` returned on creation
|
|
13
|
-
or claim.
|
|
13
|
+
or claim. Reuse unchanged context on the same session; only if context is missing or design changed, call `resume-spec-context --agent <agent-id>
|
|
14
14
|
--session-file <P>`. The bound source and selected changes/steps/tests govern the implementation;
|
|
15
15
|
handoff summaries and derived plans cannot substitute for this context. A blocked context or
|
|
16
16
|
pending `spec_change` stops implementation until the original source is repaired/synchronized.
|
|
@@ -221,3 +221,11 @@ conversation overhead while keeping work observable.
|
|
|
221
221
|
an existing core Java class, has Javadoc unless it qualifies for the documented-interface
|
|
222
222
|
implementation exception.
|
|
223
223
|
- [ ] The task enters QUALITY, regardless of workflow mode.
|
|
224
|
+
|
|
225
|
+
## Manual implementation handoff
|
|
226
|
+
|
|
227
|
+
When `continuation.next_action=implement`, execute only its approved Units. Reuse the original plan,
|
|
228
|
+
commands and results. Honor `stop_after:IMPLEMENT`: record completion and hand back with
|
|
229
|
+
`next_action:quality`, then stop. The receiving coordinator handles the existing stage boundary
|
|
230
|
+
once under the approval policy; the executor never starts quality work by inertia. Users may
|
|
231
|
+
instead choose current-Agent execution. No platform is permanently assigned either role.
|
|
@@ -1,27 +1,55 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ec-memory
|
|
3
|
-
description: MEMORY-stage skill.
|
|
3
|
+
description: MEMORY-stage skill. Extracts reusable development knowledge from existing task evidence and performs conditional long-memory distillation.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# ec-memory —
|
|
6
|
+
# ec-memory — reusable knowledge for future development
|
|
7
7
|
|
|
8
8
|
MEMORY remains mandatory for code tasks. Daily task processing and architecture maintenance are
|
|
9
9
|
separate responsibilities: every completed code task produces one immutable short-memory fact;
|
|
10
10
|
only a long-memory distillation, or the explicit missing-ABSTRACT startup exception, may open an
|
|
11
11
|
architecture assessment. Never update architecture merely because MEMORY was entered.
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
`execution.jsonl
|
|
16
|
-
`backfill` or `update` architecture assessment.
|
|
13
|
+
MEMORY must not re-analyze the repository or repeat the entire conversation. Reuse confirmed
|
|
14
|
+
decisions and verified findings already available in `dev-spec.md`, implementation results and
|
|
15
|
+
Review evidence in `execution.jsonl`; `task.json` supplies identity and frozen mode. The bounded
|
|
16
|
+
repository reads below belong only to a required `backfill` or `update` architecture assessment.
|
|
17
|
+
|
|
18
|
+
## Knowledge value
|
|
19
|
+
|
|
20
|
+
A short memory is directly usable knowledge, not an acceptance report. Keep a fact when it helps
|
|
21
|
+
a later task understand behavior, choose the right change, diagnose a failure, or verify correctly.
|
|
22
|
+
|
|
23
|
+
- Lead with a knowledge topic and a retrieval summary, not a version release or task-completion
|
|
24
|
+
headline. Prefer business semantics, design reasons, relevant code entrypoints, compatibility
|
|
25
|
+
boundaries, and observed failure causes with their fixes.
|
|
26
|
+
- State the applicable situation and useful conclusion. Include reasons, limitations and exact
|
|
27
|
+
symbols or source references where they help the next developer; do not fill a fixed checklist
|
|
28
|
+
for every fact. Preserve only confirmed conclusions, and keep task-specific scope constraints
|
|
29
|
+
scoped to that task rather than turning them into permanent project rules.
|
|
30
|
+
- Leave acceptance records in `execution.jsonl`; cite the relevant source instead of copying it.
|
|
31
|
+
Omit approval JSON, fingerprints, execution timelines, test counts, per-run coverage numbers,
|
|
32
|
+
temporary log paths, file inventories and handoff history. Do not add a list of excluded noise.
|
|
33
|
+
A reusable verification command or environment constraint belongs here only when it guides
|
|
34
|
+
future work; a single run's pass/fail and UT/TDD lifecycle evidence stay in the task record.
|
|
35
|
+
- When no new reusable knowledge exists, set `memory_value: none` and `target_long: NONE`, write
|
|
36
|
+
a brief reason and retain the source reference. Do not manufacture lessons or duplicate existing
|
|
37
|
+
knowledge merely to populate sections. This still completes the mandatory short-memory step.
|
|
38
|
+
|
|
39
|
+
For example, preserve that a cache write may return a failure code without throwing, why proceeding
|
|
40
|
+
with an unpersisted local value breaks shared counting, and where to bypass that behavior. A count
|
|
41
|
+
of passing tests and the user's acceptance timestamp do not teach a future task how to handle it.
|
|
42
|
+
|
|
43
|
+
Both `default` and `dispatch` use this contract. The coordinator reuses the analysis, implementation
|
|
44
|
+
results and Review findings already available. Reuse any executor-only discovery from its existing
|
|
45
|
+
result; do not require another report, another handoff, or repeated checks for MEMORY.
|
|
17
46
|
|
|
18
47
|
## Depth by workflow mode
|
|
19
48
|
|
|
20
|
-
- `fast`:
|
|
21
|
-
|
|
22
|
-
- `
|
|
23
|
-
|
|
24
|
-
needed for future high-risk work.
|
|
49
|
+
- `fast`: keep the directly reusable conclusions concise.
|
|
50
|
+
- `standard`: include relevant contract, compatibility, and troubleshooting reasons when present.
|
|
51
|
+
- `strict`: retain non-obvious architecture, migration and cross-module boundaries needed by
|
|
52
|
+
future changes. Greater depth never requires process logs, more checks, or invented knowledge.
|
|
25
53
|
|
|
26
54
|
Every memory uses schema 2 and includes `workflow_mode` in frontmatter. Generate its UUIDv7 ID
|
|
27
55
|
through:
|
|
@@ -33,22 +61,18 @@ through:
|
|
|
33
61
|
Name it `{memory_id}_{YYYYMMDD}_{smart_name}.md` and set
|
|
34
62
|
`source_task: {current task id, exact}`. Write one immutable short memory under
|
|
35
63
|
`.easy-coding/memory/short/`, then register it with
|
|
36
|
-
`memory-short-complete`.
|
|
64
|
+
`memory-short-complete`. Task ownership and content integrity remain runtime checks; acceptance
|
|
65
|
+
and Canonical evidence remain in their existing records, not duplicated in the memory body.
|
|
37
66
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
`memory-short-complete` rejects a checkpoint that omits any of those decision fields. This records
|
|
42
|
-
the user's accepted exception without re-reviewing or re-analyzing the code. Canonical writeback
|
|
43
|
-
already carries the same digest and authorization as shared `acceptance` evidence.
|
|
44
|
-
|
|
45
|
-
For frozen UT/TDD, record the strategy, shared threshold, passed local unit-test result, and
|
|
46
|
-
changed-line coverage result with its frozen baseline. Only TDD includes lifecycle evidence.
|
|
47
|
-
Remote CI is not acceptance evidence. With `none`, omit coverage-specific fields.
|
|
67
|
+
Upgrades preserve existing project templates. These instructions take precedence over legacy
|
|
68
|
+
process sections in `SHORT_MEMORY_TEMPLATE.md`; omit those sections when writing a new memory.
|
|
69
|
+
Do not rewrite old memories or user templates to adopt this contract.
|
|
48
70
|
|
|
49
71
|
Ask the state API for `memory-instruction`. Distill only when it returns `action:distill`;
|
|
50
|
-
otherwise record `no-op`. Long memory
|
|
51
|
-
|
|
72
|
+
otherwise record `no-op`. Long memory merges reusable facts, deduplicates matching knowledge and
|
|
73
|
+
retires superseded conclusions. Extract useful knowledge from legacy acceptance reports without
|
|
74
|
+
carrying over process noise; `memory_value: none` contributes no long-memory topic. Work only
|
|
75
|
+
within the frozen candidates and matching topics, without a global history cleanup.
|
|
52
76
|
|
|
53
77
|
## Architecture assessment
|
|
54
78
|
|
|
@@ -6,15 +6,17 @@ description: QUALITY-stage skill. Freezes one candidate, runs independent Review
|
|
|
6
6
|
# ec-quality — one candidate, two read-only gates
|
|
7
7
|
|
|
8
8
|
Use only while the current task is in `QUALITY`. Communicate in the user's language. QUALITY
|
|
9
|
-
|
|
9
|
+
keeps Review and Verification read-only while permitting approved bounded repairs between checks.
|
|
10
|
+
Ordinary fixes stay in QUALITY; changed requirements/contracts or a replaced implementation plan
|
|
11
|
+
return to ANALYSIS/IMPLEMENT. Bug severity or line count alone does not decide the route.
|
|
10
12
|
|
|
11
13
|
## Candidate freeze
|
|
12
14
|
|
|
13
15
|
For Canonical-backed tasks, load the current session's bound selection through `resume-spec-context`
|
|
14
|
-
when
|
|
16
|
+
only when the current session lacks that context or the design changed. Pass that original consumption closure to both gates and compare selected contracts,
|
|
15
17
|
changes, Steps and Tests against the candidate. Pending `spec_change` blocks QUALITY acceptance
|
|
16
18
|
until the source revision is synchronized. Bounded corrections refresh only their affected Unit
|
|
17
|
-
mappings and
|
|
19
|
+
mappings and retain the current stage; substantive expansion returns to ANALYSIS.
|
|
18
20
|
|
|
19
21
|
Call `evidence-fingerprints` once to obtain the runtime-owned attempt and candidate. The runtime
|
|
20
22
|
owns signatures and prior-evidence references. Never calculate historical fingerprints, import
|
|
@@ -59,7 +61,8 @@ meaningless remaining check when a concrete blocker is found. Aggregate the repa
|
|
|
59
61
|
|
|
60
62
|
### Standard
|
|
61
63
|
|
|
62
|
-
-
|
|
64
|
+
- Use one independent reviewer. A coordinator who did not author the candidate can provide this
|
|
65
|
+
review after another Agent implemented it; do not launch a duplicate reviewer merely for form.
|
|
63
66
|
- Run affected lint/typecheck/test plus every must-test command from `test-strategy.md`.
|
|
64
67
|
- Run Review and Verification in parallel when their inputs are already frozen.
|
|
65
68
|
|
|
@@ -108,7 +111,7 @@ blocking record also carries a `failure_classes` array; do not defer classificat
|
|
|
108
111
|
|
|
109
112
|
## Verification Gate
|
|
110
113
|
|
|
111
|
-
Run only
|
|
114
|
+
Run only commands selected by the mode and the existing plan/test strategy. Record real exit status and
|
|
112
115
|
current implementation/config fingerprints plus the active `quality_attempt` using the existing
|
|
113
116
|
`type:"verify"` contract. Do not run a command inside Review Gate, and do not fix a failure inside
|
|
114
117
|
Verification Gate. A failed applicable check also carries its structured `failure_classes` array.
|
|
@@ -129,7 +132,7 @@ Wait for both gates, then aggregate all blocking results once. Classify each ite
|
|
|
129
132
|
|
|
130
133
|
If code or tests need edits, create one concise Repair Bundle containing every in-scope blocking
|
|
131
134
|
item, affected files, required verification, and evidence that may be reused. After both Gates are
|
|
132
|
-
terminal, finalize the decision
|
|
135
|
+
terminal, finalize the decision, then prepare the bounded repair while remaining in QUALITY:
|
|
133
136
|
|
|
134
137
|
```bash
|
|
135
138
|
{{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py finalize-quality \
|
|
@@ -152,10 +155,39 @@ review/verify record first, then write each affected source task `blocked` throu
|
|
|
152
155
|
use the exact idempotency key `<H>:<S>:<F>:quality-<A>:blocked`. Add one failed evidence object for
|
|
153
156
|
each affected Gate kind with ref
|
|
154
157
|
`execution.jsonl#quality-attempt=<A>;implementation=<F>;source-task=<S>;kind=review|verify`.
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
158
|
+
After blocked writeback is acknowledged, start the approved repair. The runtime reopens only those
|
|
159
|
+
source tasks with a repair-specific idempotency key, keeping local status QUALITY and unaffected
|
|
160
|
+
source progress. Record affected Step/result completion and source `implemented` before completing
|
|
161
|
+
the repair. Reuse the existing writer and ledger, never copy a second implementation plan.
|
|
162
|
+
|
|
163
|
+
Use `begin-correction --file <existing-unit-file> --summary <bundle>` to prepare one `quality_repair`.
|
|
164
|
+
In dispatch mode, present this complete bundle once with choices: current Agent, another Agent,
|
|
165
|
+
or defer/revise. This human dispatch decision remains under every approval mode; Approve shares
|
|
166
|
+
the same decision. The user may explicitly authorize current-Agent execution. Default mode uses
|
|
167
|
+
its existing approval policy for local repair, with no handoff inside the stage.
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
{{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py start-quality-repair \
|
|
171
|
+
--repair-id <id> --executor current|other [--confirmed] --agent <agent-id> --session-file <P>
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
Pass `--confirmed` only for a real user decision on this bundle. For other-Agent execution the call
|
|
175
|
+
also writes the handoff. The recipient claims the task and directly repairs the approved files;
|
|
176
|
+
it must not ask again or return to IMPLEMENT. Bounded code and necessary tests follow the existing
|
|
177
|
+
unit test strategy, including TDD lifecycle checks only when TDD is frozen. The recipient finishes:
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
{{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py complete-quality-repair \
|
|
181
|
+
--repair-id <id> --agent <agent-id> --session-file <P>
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
This returns other-Agent repairs to the coordinator for delta review/verification. No quality gate
|
|
185
|
+
may pass while the repair is pending. Scope/contract changes must be resolved rather than silently
|
|
186
|
+
included in the accepted bundle. Repeated starts/completions reuse the existing repair ID.
|
|
187
|
+
|
|
188
|
+
`prepare-check --record` also accepts an array. `record-check --result` accepts an array of
|
|
189
|
+
`{prepared_id,result}` to register the results of those prepared checks. Each check keeps its own
|
|
190
|
+
inputs and real result; batching shares runtime reads, not unrelated evidence.
|
|
159
191
|
|
|
160
192
|
After repair, choose the minimum honest evidence refresh:
|
|
161
193
|
|
|
@@ -22,7 +22,7 @@ Call the state API snapshot and show:
|
|
|
22
22
|
pending confirmed Spec change.
|
|
23
23
|
|
|
24
24
|
Mode inspection and configuration belongs to `ec-config`. If the user asks to change Approval,
|
|
25
|
-
Workflow, unit test strategy, or the shared coverage threshold, route there and do not mutate those fields here.
|
|
25
|
+
Workflow, cooperation, unit test strategy, or the shared coverage threshold, route there and do not mutate those fields here.
|
|
26
26
|
|
|
27
27
|
## Task actions
|
|
28
28
|
|
|
@@ -38,8 +38,8 @@ When creating from a Canonical Spec, call `inspect-dev-spec --manifest-only`, di
|
|
|
38
38
|
task and dependency selection, then call `create-task-from-spec` only after explicit user
|
|
39
39
|
selection. Multiple selected Spec tasks still create one Harness task. Do not call
|
|
40
40
|
`select-dev-spec-scope` during discovery. Creation and claim return the selected consumption
|
|
41
|
-
closure; consume it before stage work. On
|
|
42
|
-
|
|
41
|
+
closure; consume it before stage work. On the same session, reuse unchanged context; call `resume-spec-context` only if context is missing
|
|
42
|
+
or invalidated. A new session must consume its selected closure. A blocked context allows repair/rebind/sync, but blocks advancement.
|
|
43
43
|
Initialize missing shared execution before creation. Support `rebind-spec-source` only when the
|
|
44
44
|
new file matches schema + spec_id + design revision + design_sha256 and does not roll execution
|
|
45
45
|
revision backward. A pending writeback is repaired with `reconcile-spec-execution`, never by
|
|
@@ -49,3 +49,10 @@ action is cleared with `status:error`; correct its input instead of replaying it
|
|
|
49
49
|
Confirmed requirement changes use `begin-spec-change` before editing the original source.
|
|
50
50
|
Its summary and affected tasks survive handoff. Finish revision + READY + `sync-spec-design`,
|
|
51
51
|
then reload context and refresh the plan in ANALYSIS. Do not clear a pending change manually.
|
|
52
|
+
|
|
53
|
+
## Scoped continuation
|
|
54
|
+
|
|
55
|
+
Display the task coordinator, continuation action/stop point and current repair bundle. A claim
|
|
56
|
+
returns the existing approved work; do not request a second scope approval. The main Agent is not
|
|
57
|
+
replaced by the coding executor. Handoff summaries reference existing plan Units and execution
|
|
58
|
+
indices; never copy a new Spec or reconstruct old verification results.
|
|
@@ -12,8 +12,9 @@ user's language.
|
|
|
12
12
|
|
|
13
13
|
```text
|
|
14
14
|
INIT --auto--> ANALYSIS -> IMPLEMENT -> QUALITY -> MEMORY --auto--> COMPLETE
|
|
15
|
-
^
|
|
16
|
-
|
|
15
|
+
^ |
|
|
16
|
+
+---- scope/contract replan -----+
|
|
17
|
+
QUALITY -- bounded repair --> QUALITY
|
|
17
18
|
|
|
18
19
|
any active stage --explicit user abort--> CLOSED
|
|
19
20
|
```
|
|
@@ -27,18 +28,19 @@ Pure conversation, explanation, analysis, and read-only review stay Ready and cr
|
|
|
27
28
|
- `approval_mode = approve|guard|confirm|auto` controls whether a legal transition waits for a
|
|
28
29
|
user. `confirm` waits only at ANALYSIS -> IMPLEMENT; after that, green QUALITY, MEMORY, and
|
|
29
30
|
COMPLETE transitions advance automatically. `auto` advances every legal green
|
|
30
|
-
edge.
|
|
31
|
+
edge. Dispatch keeps its explicit scope/executor decision; another pause is an exceptional code diff detected after the frozen
|
|
31
32
|
QUALITY acceptance checkpoint; accepting that exact diff does not change the mode.
|
|
32
33
|
- `workflow_mode = adaptive|fast|standard|strict` controls execution cost and assurance depth.
|
|
33
34
|
- `unit_test_mode` independently selects `none`, `ut`, or `tdd`. It defaults to `none`;
|
|
34
35
|
`ut_coverage_threshold` defaults to 90 and accepts integers from 1 to 100.
|
|
35
36
|
|
|
36
|
-
Approval and unit test
|
|
37
|
+
Approval, cooperation and unit test settings use session > local > project > defaults, per field.
|
|
38
|
+
Local preferences live in optional `~/.easy-coding/config.yaml`; reads never create it. Execution depth is always the
|
|
37
39
|
mechanically calculated minimum for the current change. Do not recommend, select a higher mode,
|
|
38
40
|
or inherit an old task mode. Persist it once with `propose-workflow-mode --agent <agent-id>
|
|
39
41
|
--session-file <P>`; the runtime calculates and freezes the value.
|
|
40
42
|
|
|
41
|
-
Unit test strategy uses the same
|
|
43
|
+
Unit test strategy uses the same three-scope precedence and freezes its mode and
|
|
42
44
|
`ut_coverage_threshold` on ANALYSIS -> IMPLEMENT. UT and TDD share passed local unit tests and
|
|
43
45
|
changed-line coverage, and reuse `ec-tdd-init` readiness. Only TDD requires test-first lifecycle
|
|
44
46
|
and its review dimension. UT keeps ordinary review and compact Fast planning. The `tdd-init`
|
|
@@ -126,7 +128,7 @@ or `qoder`. Never use a display or source-author attribution such as `Codex with
|
|
|
126
128
|
`type=tdd-init` code task only after scope confirmation. Do not reinterpret it as an ordinary
|
|
127
129
|
TDD-enabled feature task and do not require readiness before creating it.
|
|
128
130
|
5. Match the user's intent against `current_task` and the active task list before resuming.
|
|
129
|
-
If the user
|
|
131
|
+
If the user explicitly selects another task, that selection authorizes the switch; call
|
|
130
132
|
`claim-task --task-id <id> --agent <agent-id> --session-file <P>`. Do not execute task A
|
|
131
133
|
under task B's request.
|
|
132
134
|
- With no explicit repository-mutation request, stay Ready and answer normally. Ambiguous
|
|
@@ -139,7 +141,23 @@ or `qoder`. Never use a display or source-author attribution such as `Codex with
|
|
|
139
141
|
6. Resume the matched/current task, then load only state-relevant assets. Do not read five full
|
|
140
142
|
memories at every startup; ANALYSIS searches memory metadata and opens relevant entries on
|
|
141
143
|
demand.
|
|
142
|
-
7.
|
|
144
|
+
7. Honor the returned `continuation` before generic stage dispatch. Summarize the existing handoff,
|
|
145
|
+
consume its approved scope and references, and stop at `stop_after`. Never create a new task,
|
|
146
|
+
replan, or ask again to approve already accepted work merely because the Agent changed.
|
|
147
|
+
`cooperation.coordinator` stays the main Agent/session while `last_agent` tracks the executor.
|
|
148
|
+
A repeated claim of the same active task does not require another claim record.
|
|
149
|
+
|
|
150
|
+
## Manual dispatch
|
|
151
|
+
|
|
152
|
+
`cooperate_mode=default` preserves handoff at stage boundaries. `dispatch` also supports handing
|
|
153
|
+
a QUALITY repair to another Agent without changing stage. The user manually switches Agents.
|
|
154
|
+
At an implementation decision, offer current-Agent execution, handoff, or defer/change once.
|
|
155
|
+
"Confirm and hand off" consumes the existing pending stage approval before writing a handoff;
|
|
156
|
+
"handoff for analysis" alone does not approve implementation. Do not ask again on claim.
|
|
157
|
+
Use `handoff-task --continuation` with `next_action`, existing `unit_ids`, optional `evidence_refs`,
|
|
158
|
+
and `stop_after`. Implement-only handoff uses `next_action:implement, stop_after:IMPLEMENT`;
|
|
159
|
+
on completion return `next_action:quality` to the coordinator. QUALITY repairs follow ec-quality.
|
|
160
|
+
The user can authorize the coordinator to fix a small change directly in either mode.
|
|
143
161
|
|
|
144
162
|
## Stage dispatch
|
|
145
163
|
|
|
@@ -158,7 +176,8 @@ clears the pending action so the corrected action can proceed; never overwrite a
|
|
|
158
176
|
pending action.
|
|
159
177
|
|
|
160
178
|
Creation and claim return `spec_context.consumption` for the stored selection. Consume it before
|
|
161
|
-
dispatching a stage.
|
|
179
|
+
dispatching a stage. Reuse a matching current-session receipt (`spec_context.reused:true`) and context already loaded.
|
|
180
|
+
If context was lost, the session is new, or design changed, call `resume-spec-context --agent
|
|
162
181
|
<agent-id> --session-file <P>` and consume its returned closure. A blocked context requires
|
|
163
182
|
source repair or design sync; never continue from a handoff summary alone. If `spec_change` is
|
|
164
183
|
pending, resume that confirmed change on the bound original file before implementation/QUALITY.
|
|
@@ -211,8 +230,9 @@ acceptance-diff choice and returns to the stage required by the state API.
|
|
|
211
230
|
For an explicitly confirmed rollback, scope reduction, or bounded correction of an active task,
|
|
212
231
|
call `begin-correction --file <existing-task-file> ... --summary <confirmed-change>
|
|
213
232
|
[--risk <actual-new-risk>] --agent <agent-id> --session-file <P>`. The runtime preserves the plan,
|
|
214
|
-
unaffected Units and evidence
|
|
215
|
-
|
|
233
|
+
unaffected Units and evidence. In QUALITY it prepares an in-stage repair bundle; use
|
|
234
|
+
`start-quality-repair` and `complete-quality-repair` without a stage transition. Other active stages
|
|
235
|
+
use IMPLEMENT at the mechanical minimum for these files. Do not reconstruct the original task or its documents. Synchronize only
|
|
216
236
|
conflicting source Spec clauses once when needed; then continue the correction. Never restore an
|
|
217
237
|
entire file over unrelated user edits. A new feature or expanded contract still needs ANALYSIS.
|
|
218
238
|
|
|
@@ -12,7 +12,7 @@ Start every work reply with the single Markdown blockquote status line injected
|
|
|
12
12
|
then a blank line. Do not render the machine breadcrumbs to the user.
|
|
13
13
|
|
|
14
14
|
`{approval-mode}` is the effective approval mode and `{workflow-mode}` is the configured or
|
|
15
|
-
task-frozen execution mode; session
|
|
15
|
+
task-frozen execution mode; behavior settings resolve per field: session > optional local ~/.easy-coding/config.yaml > project > defaults.
|
|
16
16
|
When effective/frozen unit_test_mode is `ut` or `tdd`, insert `· **UT**` or `· **TDD**`
|
|
17
17
|
immediately after Workflow. For `none`, omit this segment and preserve the status-line format.
|
|
18
18
|
|
|
@@ -43,17 +43,18 @@ First run `ec-init`; daily work goes through `ec-workflow`.
|
|
|
43
43
|
|
|
44
44
|
## Workflow discipline
|
|
45
45
|
|
|
46
|
-
- Approval mode is session override > project `behavior.approval_mode` > `guard`; workflow mode
|
|
46
|
+
- Approval mode is session override > local ~/.easy-coding/config.yaml > project `behavior.approval_mode` > `guard`; workflow mode
|
|
47
47
|
is the mechanical minimum for the current actual change. Approval controls waiting;
|
|
48
48
|
workflow controls execution depth. Do not recommend or inflate the calculated mode.
|
|
49
49
|
Confirm approval waits only at ANALYSIS -> IMPLEMENT, then advances green later stages
|
|
50
|
-
automatically; Auto advances all legal green edges.
|
|
51
|
-
|
|
50
|
+
automatically; Auto advances all legal green edges. Dispatch retains the explicit scope/executor
|
|
51
|
+
decision, merged with any required approval. A new code diff after the QUALITY
|
|
52
|
+
checkpoint also pauses across all modes: show the exact diff, bind acceptance
|
|
52
53
|
to its digest, and continue without rereview when the user accepts.
|
|
53
54
|
Every mutation task runs QUALITY; no mode changes scope, delivery form, or evidence gates.
|
|
54
|
-
- Unit test strategy is session override > project `behavior.unit_test_mode` > `none`.
|
|
55
|
+
- Unit test strategy is session override > local ~/.easy-coding/config.yaml > project `behavior.unit_test_mode` > `none`.
|
|
55
56
|
Values are `none`, `ut`, and `tdd`; both enabled strategies share `ut_coverage_threshold`
|
|
56
|
-
(session > project > 90, integer 1..100). ANALYSIS -> IMPLEMENT freezes strategy, threshold,
|
|
57
|
+
(session > local > project > 90, integer 1..100). ANALYSIS -> IMPLEMENT freezes strategy, threshold,
|
|
57
58
|
and repository baselines. `none` adds no coverage work and retains ordinary task verification.
|
|
58
59
|
UT requires passed local unit tests and changed-production-line coverage, without test-first
|
|
59
60
|
ordering, RED/GREEN artifacts, or a separate TDD review. TDD additionally requires its lifecycle
|
|
@@ -113,7 +114,7 @@ First run `ec-init`; daily work goes through `ec-workflow`.
|
|
|
113
114
|
Runtime progress must use the shared writer with CAS/idempotency and reconciliation; static
|
|
114
115
|
confirmed design changes first use `begin-spec-change`, then revision + READY + `sync-spec-design`.
|
|
115
116
|
Creation/claim returns selected source context; session resume and design sync require
|
|
116
|
-
`resume-spec-context`
|
|
117
|
+
`resume-spec-context` only when current-session context is missing or design changed; otherwise reuse it. Pending changes block implementation/acceptance across agents.
|
|
117
118
|
Preserve the original writer actor while retaining the current owner during reconciliation.
|
|
118
119
|
Never hand-edit `EDS:EXECUTION`.
|
|
119
120
|
Selected source tasks remain `implemented` through local QUALITY and become `verified`
|
|
@@ -124,8 +125,9 @@ First run `ec-init`; daily work goes through `ec-workflow`.
|
|
|
124
125
|
ANALYSIS reads the selected consumption closure once and treats exact/scope-unchanged as a fast
|
|
125
126
|
projection, while shared execution is the dependency fact source.
|
|
126
127
|
- MEMORY combines short-memory creation and the conditional long-memory gate. Entry follows the
|
|
127
|
-
effective confirmation mode
|
|
128
|
-
and
|
|
128
|
+
effective confirmation mode. Record reusable development knowledge and source references;
|
|
129
|
+
acceptance digests and process evidence stay in task records. Do not add reports or repeated
|
|
130
|
+
checks for memory. Once memory processing completes, COMPLETE is automatic.
|
|
129
131
|
- NO CODE-TASK COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE.
|
|
130
132
|
- All cross-platform modules (skills, hooks, references) must use universal agent protocols.
|
|
131
133
|
Do not rely on any specific agent's proprietary conventions unless the module is explicitly
|
|
@@ -166,3 +168,19 @@ speculative fallback/retry/compatibility logic, or defensive copying.
|
|
|
166
168
|
|
|
167
169
|
Add project-specific instructions below this line. The generated region above is managed by
|
|
168
170
|
easy-coding-harness and is replaced on `easy-coding upgrade`.
|
|
171
|
+
|
|
172
|
+
## Cooperation and bounded QUALITY repair
|
|
173
|
+
|
|
174
|
+
`cooperate_mode: default | dispatch` is independent of approval and unit-test strategy, with
|
|
175
|
+
session > optional local `~/.easy-coding/config.yaml` > project > default precedence. Reads never
|
|
176
|
+
create local config; ec-config changes only explicitly selected fields and can restore inheritance.
|
|
177
|
+
Default preserves stage-boundary handoff. Dispatch supports manual implementation and QUALITY
|
|
178
|
+
repair handoff; the user can always select current-Agent execution. Preserve the task coordinator,
|
|
179
|
+
use existing plan/evidence references and stop at the handoff's `stop_after`. Never launch another Agent.
|
|
180
|
+
Dispatch requires one user decision on scope and executor, even under Auto; combine any approval
|
|
181
|
+
with that same decision and never ask again on claim. Ordinary repairs stay in QUALITY using
|
|
182
|
+
begin-correction, start-quality-repair and complete-quality-repair. Only changed requirements,
|
|
183
|
+
contracts or a replaced main implementation plan justify returning to ANALYSIS/IMPLEMENT.
|
|
184
|
+
Review and verification remain read-only checks; approved repairs happen between them. Reuse
|
|
185
|
+
unaffected evidence, review the repair delta and run affected checks only. Do not rebuild the plan
|
|
186
|
+
or repeat completed checks because of handoff, stage labels or descriptive check-name changes.
|
|
@@ -12,7 +12,7 @@ Start every work reply with the single Markdown blockquote status line injected
|
|
|
12
12
|
then a blank line. Do not render the machine breadcrumbs to the user.
|
|
13
13
|
|
|
14
14
|
`{approval-mode}` is the effective approval mode and `{workflow-mode}` is the configured or
|
|
15
|
-
task-frozen execution mode; session
|
|
15
|
+
task-frozen execution mode; behavior settings resolve per field: session > optional local ~/.easy-coding/config.yaml > project > defaults.
|
|
16
16
|
When effective/frozen unit_test_mode is `ut` or `tdd`, insert `· **UT**` or `· **TDD**`
|
|
17
17
|
immediately after Workflow. For `none`, omit this segment and preserve the status-line format.
|
|
18
18
|
|
|
@@ -41,17 +41,18 @@ First run `/ec-init`; daily work goes through `/ec-workflow`.
|
|
|
41
41
|
|
|
42
42
|
## Workflow discipline
|
|
43
43
|
|
|
44
|
-
- Approval mode is session override > project `behavior.approval_mode` > `guard`; workflow mode
|
|
44
|
+
- Approval mode is session override > local ~/.easy-coding/config.yaml > project `behavior.approval_mode` > `guard`; workflow mode
|
|
45
45
|
is the mechanical minimum for the current actual change. Approval controls waiting;
|
|
46
46
|
workflow controls execution depth. Do not recommend or inflate the calculated mode.
|
|
47
47
|
Confirm approval waits only at ANALYSIS -> IMPLEMENT, then advances green later stages
|
|
48
|
-
automatically; Auto advances all legal green edges.
|
|
49
|
-
|
|
48
|
+
automatically; Auto advances all legal green edges. Dispatch retains the explicit scope/executor
|
|
49
|
+
decision, merged with any required approval. A new code diff after the QUALITY
|
|
50
|
+
checkpoint also pauses across all modes: show the exact diff, bind acceptance
|
|
50
51
|
to its digest, and continue without rereview when the user accepts.
|
|
51
52
|
Every mutation task runs QUALITY; no mode changes scope, delivery form, or evidence gates.
|
|
52
|
-
- Unit test strategy is session override > project `behavior.unit_test_mode` > `none`.
|
|
53
|
+
- Unit test strategy is session override > local ~/.easy-coding/config.yaml > project `behavior.unit_test_mode` > `none`.
|
|
53
54
|
Values are `none`, `ut`, and `tdd`; both enabled strategies share `ut_coverage_threshold`
|
|
54
|
-
(session > project > 90, integer 1..100). ANALYSIS -> IMPLEMENT freezes strategy, threshold,
|
|
55
|
+
(session > local > project > 90, integer 1..100). ANALYSIS -> IMPLEMENT freezes strategy, threshold,
|
|
55
56
|
and repository baselines. `none` adds no coverage work and retains ordinary task verification.
|
|
56
57
|
UT requires passed local unit tests and changed-production-line coverage, without test-first
|
|
57
58
|
ordering, RED/GREEN artifacts, or a separate TDD review. TDD additionally requires its lifecycle
|
|
@@ -111,7 +112,7 @@ First run `/ec-init`; daily work goes through `/ec-workflow`.
|
|
|
111
112
|
Runtime progress must use the shared writer with CAS/idempotency and reconciliation; static
|
|
112
113
|
confirmed design changes first use `begin-spec-change`, then revision + READY + `sync-spec-design`.
|
|
113
114
|
Creation/claim returns selected source context; session resume and design sync require
|
|
114
|
-
`resume-spec-context`
|
|
115
|
+
`resume-spec-context` only when current-session context is missing or design changed; otherwise reuse it. Pending changes block implementation/acceptance across agents.
|
|
115
116
|
Preserve the original writer actor while retaining the current owner during reconciliation.
|
|
116
117
|
Never hand-edit `EDS:EXECUTION`.
|
|
117
118
|
Selected source tasks remain `implemented` through local QUALITY and become `verified`
|
|
@@ -122,8 +123,9 @@ First run `/ec-init`; daily work goes through `/ec-workflow`.
|
|
|
122
123
|
ANALYSIS reads the selected consumption closure once and treats exact/scope-unchanged as a fast
|
|
123
124
|
projection, while shared execution is the dependency fact source.
|
|
124
125
|
- MEMORY combines short-memory creation and the conditional long-memory gate. Entry follows the
|
|
125
|
-
effective confirmation mode
|
|
126
|
-
and
|
|
126
|
+
effective confirmation mode. Record reusable development knowledge and source references;
|
|
127
|
+
acceptance digests and process evidence stay in task records. Do not add reports or repeated
|
|
128
|
+
checks for memory. Once memory processing completes, COMPLETE is automatic.
|
|
127
129
|
- NO CODE-TASK COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE.
|
|
128
130
|
- All cross-platform modules (skills, hooks, references) must use universal agent protocols.
|
|
129
131
|
Do not rely on any specific agent's proprietary conventions unless the module is explicitly
|
|
@@ -161,3 +163,19 @@ speculative fallback/retry/compatibility logic, or defensive copying.
|
|
|
161
163
|
|
|
162
164
|
Add project-specific instructions below this line. The generated region above is managed by
|
|
163
165
|
easy-coding-harness and is replaced on `easy-coding upgrade`.
|
|
166
|
+
|
|
167
|
+
## Cooperation and bounded QUALITY repair
|
|
168
|
+
|
|
169
|
+
`cooperate_mode: default | dispatch` is independent of approval and unit-test strategy, with
|
|
170
|
+
session > optional local `~/.easy-coding/config.yaml` > project > default precedence. Reads never
|
|
171
|
+
create local config; ec-config changes only explicitly selected fields and can restore inheritance.
|
|
172
|
+
Default preserves stage-boundary handoff. Dispatch supports manual implementation and QUALITY
|
|
173
|
+
repair handoff; the user can always select current-Agent execution. Preserve the task coordinator,
|
|
174
|
+
use existing plan/evidence references and stop at the handoff's `stop_after`. Never launch another Agent.
|
|
175
|
+
Dispatch requires one user decision on scope and executor, even under Auto; combine any approval
|
|
176
|
+
with that same decision and never ask again on claim. Ordinary repairs stay in QUALITY using
|
|
177
|
+
begin-correction, start-quality-repair and complete-quality-repair. Only changed requirements,
|
|
178
|
+
contracts or a replaced main implementation plan justify returning to ANALYSIS/IMPLEMENT.
|
|
179
|
+
Review and verification remain read-only checks; approved repairs happen between them. Reuse
|
|
180
|
+
unaffected evidence, review the repair delta and run affected checks only. Do not rebuild the plan
|
|
181
|
+
or repeat completed checks because of handoff, stage labels or descriptive check-name changes.
|