easy-coding-harness 1.0.1 → 1.1.0-beta.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 +8 -0
- package/README.md +6 -5
- package/dist/cli.js +1 -30
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
- package/templates/claude/agents/ec-implementer.md +4 -0
- package/templates/claude/agents/ec-reviewer.md +6 -0
- package/templates/codex/agents/ec-implementer.toml +4 -0
- package/templates/codex/agents/ec-reviewer.toml +6 -0
- package/templates/common/skills/ec-analysis/SKILL.md +27 -64
- package/templates/common/skills/ec-config/SKILL.md +5 -6
- package/templates/common/skills/ec-implementing/SKILL.md +22 -7
- package/templates/common/skills/ec-quality/SKILL.md +38 -22
- package/templates/common/skills/ec-workflow/SKILL.md +16 -14
- package/templates/main-constraint/AGENTS.md.tpl +8 -2
- package/templates/main-constraint/CLAUDE.md.tpl +8 -2
- package/templates/qoder/agents/ec-implementer.md +4 -0
- package/templates/qoder/agents/ec-reviewer.md +6 -0
- package/templates/shared-hooks/easy_coding_inputs.py +305 -0
- package/templates/shared-hooks/easy_coding_state.py +328 -329
package/package.json
CHANGED
|
@@ -48,3 +48,7 @@ complete exactly that unit. Your reply IS the return value, not a message to a h
|
|
|
48
48
|
- `checks`: TDD lifecycle commands actually run, otherwise an empty array
|
|
49
49
|
|
|
50
50
|
Do not claim a file is verified unless the card asked you to run a check and you ran it.
|
|
51
|
+
|
|
52
|
+
- Use only the current correction/diff and direct dependencies. Preserve unrelated progress.
|
|
53
|
+
- Do not add repeated validation, fallback, retries, compatibility branches, idempotency
|
|
54
|
+
changes or defensive copies without an explicit requirement or demonstrated defect.
|
|
@@ -53,3 +53,9 @@ dimension named in your task card. Your reply IS the return value.
|
|
|
53
53
|
- `repo_id` and `source_task_id`: copy unchanged when present in the task card
|
|
54
54
|
- `findings`: array of `{file, line, issue, severity}` (`severity`: info | warning | error)
|
|
55
55
|
- `suggestion`: optional fix direction per finding
|
|
56
|
+
|
|
57
|
+
- Use only the current correction/diff and direct dependencies. Preserve unrelated progress.
|
|
58
|
+
- Do not add repeated validation, fallback, retries, compatibility branches, idempotency
|
|
59
|
+
changes or defensive copies without an explicit requirement or demonstrated defect.
|
|
60
|
+
- Review code and test behavior only. Do not reconstruct fingerprints or inspect workflow
|
|
61
|
+
history. Passed work stays passed until relevant inputs change; suggestions do not block.
|
|
@@ -45,4 +45,8 @@ Output (return exactly this):
|
|
|
45
45
|
- checks: TDD lifecycle commands actually run, otherwise an empty array
|
|
46
46
|
|
|
47
47
|
Do not claim a file is verified unless the card asked you to run a check and you ran it.
|
|
48
|
+
|
|
49
|
+
- Use only the current correction/diff and direct dependencies. Preserve unrelated progress.
|
|
50
|
+
- Do not add repeated validation, fallback, retries, compatibility branches, idempotency
|
|
51
|
+
changes or defensive copies without an explicit requirement or demonstrated defect.
|
|
48
52
|
"""
|
|
@@ -50,4 +50,10 @@ Output (return exactly this):
|
|
|
50
50
|
- repo_id and source_task_id: copy unchanged when present in the task card
|
|
51
51
|
- findings: array of {file, line, issue, severity} (severity: info | warning | error)
|
|
52
52
|
- suggestion: optional fix direction per finding
|
|
53
|
+
|
|
54
|
+
- Use only the current correction/diff and direct dependencies. Preserve unrelated progress.
|
|
55
|
+
- Do not add repeated validation, fallback, retries, compatibility branches, idempotency
|
|
56
|
+
changes or defensive copies without an explicit requirement or demonstrated defect.
|
|
57
|
+
- Review code and test behavior only. Do not reconstruct fingerprints or inspect workflow
|
|
58
|
+
history. Passed work stays passed until relevant inputs change; suggestions do not block.
|
|
53
59
|
"""
|
|
@@ -21,12 +21,8 @@ Communicate with the user in the user's language.
|
|
|
21
21
|
4. Inspect concrete code paths and tests. Expand context only when evidence reveals another
|
|
22
22
|
dependency or risk.
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
module closure. Expand into cross-module or repository-wide context only after concrete evidence
|
|
27
|
-
shows the compound high-risk and complexity signals required for Strict. Do not scan unrelated
|
|
28
|
-
repositories, the full Spec, broad Git history, or every architecture section merely to prove
|
|
29
|
-
that a bounded task might be complicated.
|
|
24
|
+
Load context only for the current change and its direct dependencies. Reuse existing findings;
|
|
25
|
+
without new evidence, do not repeat discovery or expand into unrelated modules.
|
|
30
26
|
|
|
31
27
|
For a task with `task.json.spec_source`, use `resume-spec-context` against the stored source, exact
|
|
32
28
|
`selected_spec_tasks`, and only their stored `task.repo_paths` bindings. Schema, Spec ID, design
|
|
@@ -73,7 +69,8 @@ when local evidence conflicts or a deviation can change the contract, risk, or a
|
|
|
73
69
|
|
|
74
70
|
## Analysis artifacts
|
|
75
71
|
|
|
76
|
-
|
|
72
|
+
For a non-TDD Fast task use the compact form below. Otherwise copy
|
|
73
|
+
`.easy-coding/templates/dev-spec-skeleton.md` first, then replace every `[[EC_TODO:...]]`.
|
|
77
74
|
Keep every mandatory section. The `### 决策闭环` (Decision Closure) and `### Workflow Mode`
|
|
78
75
|
sections are required. The decision section must contain exactly one standalone
|
|
79
76
|
`decision_status: closed` marker, and no other `decision_status` marker may appear elsewhere in
|
|
@@ -153,7 +150,7 @@ line count, or create many one-use helpers, merely to make the plan look modular
|
|
|
153
150
|
clear semantic boundary, reuse point, or independently testable responsibility. Use parallel only
|
|
154
151
|
for truly independent write scopes. Better unit contracts reduce later QUALITY rework.
|
|
155
152
|
|
|
156
|
-
|
|
153
|
+
Standard/Strict tasks require `test-strategy.md`; compact Fast tasks keep checks in the plan. Pure read-only
|
|
157
154
|
conversation never enters ANALYSIS and creates no task.
|
|
158
155
|
|
|
159
156
|
## Optional Java TDD analysis
|
|
@@ -172,8 +169,7 @@ When TDD is enabled for a Java code task, make `test-strategy.md` record:
|
|
|
172
169
|
|
|
173
170
|
- detected Java/JUnit build system, exact unit-test command, production/test source roots, and
|
|
174
171
|
JaCoCo XML paths;
|
|
175
|
-
- immutable Git baseline SHA and the configured changed-production-line threshold;
|
|
176
|
-
toward 100% while treating the threshold as the mechanical minimum;
|
|
172
|
+
- immutable Git baseline SHA and the configured changed-production-line threshold; meet that threshold without adding assertions or tests solely to reach 100%;
|
|
177
173
|
- feature/bug RED -> GREEN -> REFACTOR evidence, or for pure refactors a pre-change
|
|
178
174
|
characterization GREEN -> post-change GREEN sequence without inventing a RED failure;
|
|
179
175
|
- the local unit-test command and local changed-line acceptance command. Record that
|
|
@@ -201,60 +197,27 @@ mode decision before advancing. The CLI never installs JaCoCo or edits CI automa
|
|
|
201
197
|
|
|
202
198
|
## Workflow mode calculation
|
|
203
199
|
|
|
204
|
-
|
|
200
|
+
Execution mode equals the mechanical minimum for the actual current scope. Do not propose a
|
|
201
|
+
higher mode or ask the user to select one. Old configured/frozen modes do not raise the minimum.
|
|
202
|
+
Use `propose-workflow-mode --agent <agent-id> --session-file <P>` once after the plan exists;
|
|
203
|
+
it returns the calculated mode and reasons, so a separate floor/proposal round is unnecessary.
|
|
205
204
|
|
|
206
|
-
|
|
205
|
+
For a non-TDD Fast task, dev-spec.md may use the compact form:
|
|
207
206
|
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
Use its `minimum_mode` and `reasons` as the proposal floor. You may raise this result when
|
|
216
|
-
uncertainty or user preference requires more rigor, but never lower or replace it with a
|
|
217
|
-
self-reported floor. The state API rechecks the floor when the proposal is saved and frozen.
|
|
218
|
-
|
|
219
|
-
The calculation is intentionally Standard-centered:
|
|
220
|
-
|
|
221
|
-
- `fast`: up to three coherent low-risk units in one actually modified repository, at most eight
|
|
222
|
-
changed files, no explicit high-risk signal, and no public or cross-repository contract impact.
|
|
223
|
-
Small parameter changes, bounded field/mapping edits, and a few ordinary model files should
|
|
224
|
-
normally remain Fast.
|
|
225
|
-
- `standard`: the default for ordinary business work. Four or more units, more than eight files,
|
|
226
|
-
bounded compatibility work, actual but contained multi-repository changes, broad low-risk work,
|
|
227
|
-
and bounded high-risk work remain Standard.
|
|
228
|
-
- `strict`: requires both an explicit high-risk signal and concrete complexity/blast-radius
|
|
229
|
-
evidence. Complexity means actual multi-repository edits, at least five units, at least fifteen
|
|
230
|
-
changed files, or a public/cross-repository contract. Parallel execution is a Standard signal
|
|
231
|
-
by itself. Generic domain words in a risk description, title, file path, Spec repository
|
|
232
|
-
catalog, or unselected task are never sufficient evidence of high risk.
|
|
233
|
-
|
|
234
|
-
Repository count comes only from repositories that own files in current plan units. Canonical
|
|
235
|
-
Spec metadata, unselected tasks, dependency summaries, unused `repo_paths`, and supermodule child
|
|
236
|
-
registrations do not raise the mode. A real multi-repository change is a Standard signal by
|
|
237
|
-
itself and reaches Strict only when an explicit high-risk signal is also present.
|
|
238
|
-
|
|
239
|
-
If configuration is concrete, it is also a floor. The selected mode may be raised by the user
|
|
240
|
-
but never placed below either floor. The Agent must not raise an adaptive proposal to Strict from
|
|
241
|
-
vague uncertainty or a domain keyword; cite both the explicit risk and the concrete complexity
|
|
242
|
-
signal. Explain the decision and state-specific effects in the dev-spec.
|
|
243
|
-
|
|
244
|
-
Persist the proposal before requesting ANALYSIS -> IMPLEMENT:
|
|
245
|
-
|
|
246
|
-
```bash
|
|
247
|
-
{{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py propose-workflow-mode \
|
|
248
|
-
--configured <adaptive|fast|standard|strict> \
|
|
249
|
-
--selected <fast|standard|strict> \
|
|
250
|
-
--minimum <fast|standard|strict> \
|
|
251
|
-
--source <project|session|adaptive|user> \
|
|
252
|
-
--reason "<reason>" \
|
|
253
|
-
--agent <agent-id> --session-file <P>
|
|
207
|
+
```markdown
|
|
208
|
+
<!-- easy-coding:compact -->
|
|
209
|
+
decision_status: closed
|
|
210
|
+
Goal: <confirmed behavior>
|
|
211
|
+
Scope: <exact files and preservation boundary>
|
|
212
|
+
Acceptance: <observable outcome and minimum check>
|
|
254
213
|
```
|
|
255
214
|
|
|
256
|
-
|
|
257
|
-
|
|
215
|
+
Record Unit `input_files` for the known additional direct inputs (an empty list means the
|
|
216
|
+
Unit files are self-contained). Include shared helpers, fixtures, schemas and configuration
|
|
217
|
+
actually consumed by its checks. Without a declared closure, checks cover the owning module.
|
|
218
|
+
Build commands still include their module compilation inputs. Do not infer a whole-program call graph. Keep Unit contracts and test points in the existing execution plan. Do not duplicate them across
|
|
219
|
+
full template chapters or create a separate test strategy for this compact form. Canonical work
|
|
220
|
+
consumes the selected source closure; it does not redesign unrelated selected tasks.
|
|
258
221
|
|
|
259
222
|
## User presentation and transition
|
|
260
223
|
|
|
@@ -263,9 +226,9 @@ pasting the full `dev-spec.md`. The receipt must contain:
|
|
|
263
226
|
|
|
264
227
|
- the core solution and affected scope/units;
|
|
265
228
|
- acceptance and test-strategy highlights;
|
|
266
|
-
-
|
|
229
|
+
- the computed minimum workflow mode and its concrete reasons;
|
|
267
230
|
- the material risks and explicit acceptance boundaries;
|
|
268
|
-
-
|
|
231
|
+
- the computed minimum mode as an execution fact, without offering mode choices.
|
|
269
232
|
|
|
270
233
|
End the summary with the absolute path to
|
|
271
234
|
`.easy-coding/tasks/<task-id>/dev-spec.md`. When the current client supports local-file Markdown
|
|
@@ -305,6 +268,6 @@ If evidence requires changing Canonical task boundaries, contracts, files, symbo
|
|
|
305
268
|
or dependencies, obtain confirmation and run `begin-spec-change --affected-task <id> --summary
|
|
306
269
|
<confirmed-change> --agent <agent-id> --session-file <P>` before editing. This persists the
|
|
307
270
|
intent across handoffs and blocks implementation/acceptance until synchronization. Update the original static design with revision +1,
|
|
308
|
-
restore READY, and call `sync-spec-design --affected-task ...`.
|
|
309
|
-
plan. Run `resume-spec-context` after synchronization, then refresh derived artifacts. Never
|
|
271
|
+
restore READY, and call `sync-spec-design --affected-task ...`. For bounded corrections this refreshes only affected Unit mappings; other design changes
|
|
272
|
+
invalidate the old local plan. Run `resume-spec-context` after synchronization, then refresh derived artifacts. Never
|
|
310
273
|
substitute edits to the derived `dev-spec.md`, and never edit `EDS:EXECUTION` by hand.
|
|
@@ -13,7 +13,7 @@ and available actions. Never mutate project or session settings without an expli
|
|
|
13
13
|
Call `snapshot` and show project, session, effective, and frozen task values for:
|
|
14
14
|
|
|
15
15
|
- `approval_mode`;
|
|
16
|
-
-
|
|
16
|
+
- the mechanically calculated workflow mode (read-only);
|
|
17
17
|
- `tdd_enabled` and `tdd_coverage_threshold`.
|
|
18
18
|
|
|
19
19
|
Use the returned fields directly, including `project_tdd_enabled`, `session_tdd_enabled`,
|
|
@@ -42,7 +42,7 @@ and accept that exact new diff; this exception does not convert `auto` into `gua
|
|
|
42
42
|
## Project configuration
|
|
43
43
|
|
|
44
44
|
Use `easy-coding config` for project settings. The CLI confirms one atomic update of Approval,
|
|
45
|
-
|
|
45
|
+
TDD, and (when enabled) the threshold. Execution depth is calculated automatically. The threshold must be an integer from 1 to 100.
|
|
46
46
|
Enabling TDD is rejected atomically unless `ec-tdd-init` readiness is currently `ready`.
|
|
47
47
|
|
|
48
48
|
## Session configuration
|
|
@@ -54,10 +54,6 @@ After explicit user selection, use the current logical session file:
|
|
|
54
54
|
{{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py set-approval-mode --mode approve|guard|confirm|auto --agent <agent-id> --session-file <P>
|
|
55
55
|
{{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py clear-approval-mode --agent <agent-id> --session-file <P>
|
|
56
56
|
|
|
57
|
-
# workflow
|
|
58
|
-
{{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py set-workflow-mode --mode adaptive|fast|standard|strict --agent <agent-id> --session-file <P>
|
|
59
|
-
{{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py clear-workflow-mode --agent <agent-id> --session-file <P>
|
|
60
|
-
|
|
61
57
|
# TDD; omitting threshold preserves an existing session threshold, otherwise project/default 90 applies
|
|
62
58
|
{{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py set-tdd --enabled true|false [--threshold 1..100] --agent <agent-id> --session-file <P>
|
|
63
59
|
{{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py clear-tdd --agent <agent-id> --session-file <P>
|
|
@@ -76,3 +72,6 @@ settings on failure; never offer or persist "enable now, initialize later". Norm
|
|
|
76
72
|
changes do not require initialization, and a CLI upgrade must preserve project/session TDD values.
|
|
77
73
|
Readiness means infrastructure can measure future changed production lines. It does not certify
|
|
78
74
|
repository-wide coverage and does not require tests for unchanged historical code.
|
|
75
|
+
|
|
76
|
+
Execution depth always equals the current mechanical minimum. Legacy workflow_mode settings
|
|
77
|
+
remain readable but do not raise it. Do not offer mode choices or recommend changing to Lite.
|
|
@@ -21,17 +21,26 @@ to QUALITY's Verification Gate. TDD is the only exception because RED/GREEN/REFA
|
|
|
21
21
|
part of the implementation method; current-fingerprint green evidence may be reused by QUALITY.
|
|
22
22
|
|
|
23
23
|
When frozen TDD is enabled, every feature/bug unit must capture a meaningful failing unit test
|
|
24
|
-
before production code (RED)
|
|
24
|
+
before production code (RED) and the smallest passing implementation (GREEN). Refactor only
|
|
25
|
+
when a concrete improvement is needed; unchanged GREEN inputs do not require another run.
|
|
25
26
|
Pure refactors instead capture a passing characterization test before the change and rerun it
|
|
26
27
|
afterward. Never fake RED evidence. Keep tests deterministic, boundary-focused, and minimally
|
|
27
|
-
mocked, and
|
|
28
|
+
mocked, and meet the confirmed changed-line threshold without expanding scope for extra coverage.
|
|
28
29
|
|
|
29
30
|
Communicate with the user in the user's language.
|
|
30
31
|
|
|
32
|
+
For a bounded correction already routed by `begin-correction`, use the existing plan and the
|
|
33
|
+
returned file scope. Restoring known behavior needs the affected regression checks, not an
|
|
34
|
+
artificial RED/REFACTOR cycle. Preserve all unrelated Unit progress. A correction of generated
|
|
35
|
+
tracking metadata is handled once; do not reopen design or rewrite the complete plan for it.
|
|
36
|
+
|
|
37
|
+
When a lifecycle check is necessary, call `prepare-check` before running it and `record-check`
|
|
38
|
+
afterward as documented in ec-quality. QUALITY reuses these input-bound results.
|
|
39
|
+
|
|
31
40
|
## Non-negotiable gates
|
|
32
41
|
|
|
33
|
-
1. Modify only files
|
|
34
|
-
|
|
42
|
+
1. Modify only confirmed files. Return to ANALYSIS only for a substantive scope/contract
|
|
43
|
+
expansion; restoring a previously mapped file uses the correction scope.
|
|
35
44
|
2. Preserve existing encoding and project comment conventions.
|
|
36
45
|
3. Each unit must carry `acceptance_criteria`, `test_points`, `contracts`, and `risks`.
|
|
37
46
|
Missing unit context is an analysis defect; do not make the implementer rediscover it.
|
|
@@ -88,6 +97,11 @@ Communicate with the user in the user's language.
|
|
|
88
97
|
14. Use one blank line between coherent logic sections. Do not create noisy blank-line gaps or
|
|
89
98
|
compress unrelated steps into an unreadable block.
|
|
90
99
|
|
|
100
|
+
Keep validation at its responsible boundary. Do not repeat internal null/state checks already
|
|
101
|
+
covered by the contract. Without an explicit requirement or demonstrated defect, add no fallback,
|
|
102
|
+
retry, compatibility branch, idempotency change, defensive copy, or speculative error handling.
|
|
103
|
+
An added validation needs a concrete triggering input and the failure it prevents.
|
|
104
|
+
|
|
91
105
|
## Choose the execution owner
|
|
92
106
|
|
|
93
107
|
`strategy` defines dependency shape; `workflow_mode` defines assurance depth.
|
|
@@ -176,7 +190,8 @@ checks:[], issues:[], needs_attention:[]
|
|
|
176
190
|
8. If a static Canonical change is confirmed, first persist it with `begin-spec-change
|
|
177
191
|
--affected-task <id> --summary <confirmed-change> --agent <agent-id> --session-file <P>`.
|
|
178
192
|
Revise the original design by exactly one revision, validate READY and use `sync-spec-design`;
|
|
179
|
-
then `resume-spec-context
|
|
193
|
+
then `resume-spec-context`. A bounded correction preserves the plan and continues IMPLEMENT;
|
|
194
|
+
substantive expansion returns to ANALYSIS. Never edit the
|
|
180
195
|
machine-owned execution block. If a writeback was
|
|
181
196
|
interrupted, run `reconcile-spec-execution` with the stored idempotent pending action.
|
|
182
197
|
Reconciliation only consumes dispatch/result evidence created after the current `in_progress`
|
|
@@ -188,8 +203,8 @@ conversation overhead while keeping work observable.
|
|
|
188
203
|
## End state
|
|
189
204
|
|
|
190
205
|
- After all units are implemented, hand control to ec-workflow for IMPLEMENT -> QUALITY.
|
|
191
|
-
-
|
|
192
|
-
|
|
206
|
+
- A concrete new risk changes the calculated minimum: update its Unit risk and call
|
|
207
|
+
`raise-workflow-mode` to recalculate. The argument cannot inflate the mechanical result.
|
|
193
208
|
|
|
194
209
|
## Self-check
|
|
195
210
|
|
|
@@ -13,24 +13,40 @@ does not modify source, tests, configuration, plans, or task scope.
|
|
|
13
13
|
For Canonical-backed tasks, load the current session's bound selection through `resume-spec-context`
|
|
14
14
|
when resuming. Pass that original consumption closure to both gates and compare selected contracts,
|
|
15
15
|
changes, Steps and Tests against the candidate. Pending `spec_change` blocks QUALITY acceptance
|
|
16
|
-
until source revision
|
|
16
|
+
until the source revision is synchronized. Bounded corrections refresh only their affected Unit
|
|
17
|
+
mappings and continue IMPLEMENT; substantive expansion returns to ANALYSIS.
|
|
17
18
|
|
|
18
|
-
Call `evidence-fingerprints` once
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
same candidate fingerprint and `quality_attempt` number. If the candidate changes, return to
|
|
22
|
-
IMPLEMENT; the state API finalizes the old attempt as `cancelled` before the transition. Never mix
|
|
23
|
-
evidence from two candidates.
|
|
19
|
+
Call `evidence-fingerprints` once to obtain the runtime-owned attempt and candidate. The runtime
|
|
20
|
+
owns signatures and prior-evidence references. Never calculate historical fingerprints, import
|
|
21
|
+
runtime internals to reconstruct old candidates, or ask a reviewer to audit workflow bookkeeping.
|
|
24
22
|
|
|
25
|
-
|
|
26
|
-
exactly one fingerprint-bound finalized record when QUALITY passes, leaves for repair/replan, or is
|
|
27
|
-
cancelled by candidate drift, rework, or task closure. Retries reuse that record instead of
|
|
28
|
-
duplicating it. An incomplete, duplicate, or out-of-sequence quality record blocks the transition.
|
|
23
|
+
For each distinct review or verification, prepare its actual inputs before executing it:
|
|
29
24
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
25
|
+
```bash
|
|
26
|
+
{{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py prepare-check \
|
|
27
|
+
--record '<review/verify JSON with unit_id, dimension or check/check_type/command>' \
|
|
28
|
+
--agent <agent-id> --session-file <P>
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
When `reusable:true`, use the returned evidence index and skip that check. Otherwise run the
|
|
32
|
+
specified check once, then register its real result:
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
{{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py record-check \
|
|
36
|
+
--prepared-id <returned-id> --result '<JSON with passed, exit_code for verification, findings/reviewer for review>' \
|
|
37
|
+
--agent <agent-id> --session-file <P>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Preparation binds code/test inputs, module dependencies, build files and the actual command.
|
|
41
|
+
Use the analyzed Unit `input_files` closure for additional helpers/fixtures/configuration, and record intentional
|
|
42
|
+
environment overrides in the check descriptor. Production-only reviews may declare
|
|
43
|
+
`review_scope:"production"`; test review still covers changed test behavior. A result is accepted
|
|
44
|
+
only if its inputs remained unchanged. One grouped Maven `-Dtest=A,B` execution covers both source
|
|
45
|
+
commands when all other arguments agree. Do not run individual commands and then repeat a combined
|
|
46
|
+
clean run. IMPLEMENT results and prior attempts use the same reuse mechanism.
|
|
47
|
+
|
|
48
|
+
Record failed checks with failure_classes. Review and Verification remain independent; cancel a
|
|
49
|
+
meaningless remaining check when a concrete blocker is found. Aggregate the repair once.
|
|
34
50
|
|
|
35
51
|
## Workflow depth
|
|
36
52
|
|
|
@@ -54,7 +70,7 @@ is still running or unacknowledged.
|
|
|
54
70
|
checks. A repository merely mentioned by a Spec, dependency, supermodule, or path map is not in
|
|
55
71
|
scope.
|
|
56
72
|
- When frozen TDD is enabled, include the required TDD review dimension, local unit test, and
|
|
57
|
-
changed-production-line coverage. Record one coverage result with `coverage_scope:"local"`;
|
|
73
|
+
changed-production-line coverage at the confirmed threshold. Record one coverage result with `coverage_scope:"local"`;
|
|
58
74
|
GitLab coverage is informative, not a task acceptance gate. Reuse current-fingerprint GREEN
|
|
59
75
|
evidence from IMPLEMENT instead of rerunning an identical command.
|
|
60
76
|
|
|
@@ -143,12 +159,12 @@ After repair, choose the minimum honest evidence refresh:
|
|
|
143
159
|
- localized business code: delta review plus impacted tests;
|
|
144
160
|
- contract/config/plan/shared behavior: rerun all applicable gates for the affected scope.
|
|
145
161
|
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
162
|
+
Use the runtime's reusable/changed-input result to decide what remains. Changes to a plan
|
|
163
|
+
narrative, stage, approval mode or Spec revision alone do not require test execution. Refresh only
|
|
164
|
+
affected evidence, including actual shared dependencies; never restart all Units in the repository.
|
|
165
|
+
Passed checks are terminal until their inputs change or a concrete new defect invalidates them.
|
|
166
|
+
Suggestions never trigger another review round. No reviewer may demand new defensive checks
|
|
167
|
+
without a concrete triggering input and demonstrated failure. Preserve the original error strategy.
|
|
152
168
|
|
|
153
169
|
## Acceptance boundary
|
|
154
170
|
|
|
@@ -33,10 +33,10 @@ Pure conversation, explanation, analysis, and read-only review stay Ready and cr
|
|
|
33
33
|
- `tdd_enabled` independently activates Java TDD and changed-line coverage. It defaults off;
|
|
34
34
|
`tdd_coverage_threshold` defaults to 90 and accepts integers from 1 to 100.
|
|
35
35
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
Approval and TDD retain session-over-project precedence. Execution depth is always the
|
|
37
|
+
mechanically calculated minimum for the current change. Do not recommend, select a higher mode,
|
|
38
|
+
or inherit an old task mode. Persist it once with `propose-workflow-mode --agent <agent-id>
|
|
39
|
+
--session-file <P>`; the runtime calculates and freezes the value.
|
|
40
40
|
|
|
41
41
|
TDD resolves with the same session-over-project precedence and freezes its enabled flag and
|
|
42
42
|
threshold on ANALYSIS -> IMPLEMENT. It may be enabled only after `ec-tdd-init` readiness passes;
|
|
@@ -206,19 +206,21 @@ passed current-fingerprint targeted check first. If the digest changes, inspect
|
|
|
206
206
|
new diff. Config, plan, workflow, Canonical-design, or nested-repository drift is not an
|
|
207
207
|
acceptance-diff choice and returns to the stage required by the state API.
|
|
208
208
|
|
|
209
|
-
##
|
|
209
|
+
## Current-change routing
|
|
210
210
|
|
|
211
|
-
|
|
211
|
+
For an explicitly confirmed rollback, scope reduction, or bounded correction of an active task,
|
|
212
|
+
call `begin-correction --file <existing-task-file> ... --summary <confirmed-change>
|
|
213
|
+
[--risk <actual-new-risk>] --agent <agent-id> --session-file <P>`. The runtime preserves the plan,
|
|
214
|
+
unaffected Units and evidence, consumes old QUALITY state, and enters IMPLEMENT at the mechanical
|
|
215
|
+
minimum for these files. Do not reconstruct the original task or its documents. Synchronize only
|
|
216
|
+
conflicting source Spec clauses once when needed; then continue the correction. Never restore an
|
|
217
|
+
entire file over unrelated user edits. A new feature or expanded contract still needs ANALYSIS.
|
|
212
218
|
|
|
213
|
-
|
|
214
|
-
{{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py raise-workflow-mode \
|
|
215
|
-
--mode standard|strict --reason "<new risk>" \
|
|
216
|
-
--agent <agent-id> --session-file <P>
|
|
217
|
-
```
|
|
219
|
+
## Recalculate actual risk
|
|
218
220
|
|
|
219
|
-
Only
|
|
220
|
-
|
|
221
|
-
|
|
221
|
+
Only an actual change in the current scope or risk changes execution depth. The runtime
|
|
222
|
+
recalculates the minimum; old configuration, task size, and unrelated risks never raise it.
|
|
223
|
+
There is no time, token, tool-count, or execution-budget gate.
|
|
222
224
|
|
|
223
225
|
## Handoff and closure
|
|
224
226
|
|
|
@@ -44,8 +44,8 @@ First run `ec-init`; daily work goes through `ec-workflow`.
|
|
|
44
44
|
## Workflow discipline
|
|
45
45
|
|
|
46
46
|
- Approval mode is session override > project `behavior.approval_mode` > `guard`; workflow mode
|
|
47
|
-
is
|
|
48
|
-
workflow controls execution depth.
|
|
47
|
+
is the mechanical minimum for the current actual change. Approval controls waiting;
|
|
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
50
|
automatically; Auto advances all legal green edges. A new code diff after the QUALITY
|
|
51
51
|
checkpoint is the only exceptional pause across all modes: show the exact diff, bind acceptance
|
|
@@ -153,6 +153,12 @@ First run `ec-init`; daily work goes through `ec-workflow`.
|
|
|
153
153
|
not proof of writeback. Keep those facts and scopes separate.
|
|
154
154
|
{{supermodule_boundary}}
|
|
155
155
|
|
|
156
|
+
|
|
157
|
+
Execution efficiency: use begin-correction for confirmed bounded repairs; preserve unrelated
|
|
158
|
+
Units and reuse input-bound checks through prepare-check/record-check. Stage or Spec revision
|
|
159
|
+
changes alone do not invalidate tests. No execution budget. No repeated internal validation,
|
|
160
|
+
speculative fallback/retry/compatibility logic, or defensive copying.
|
|
161
|
+
|
|
156
162
|
<!-- ═══ end easy-coding-harness generated ═══ -->
|
|
157
163
|
|
|
158
164
|
## Project Custom Instructions
|
|
@@ -42,8 +42,8 @@ First run `/ec-init`; daily work goes through `/ec-workflow`.
|
|
|
42
42
|
## Workflow discipline
|
|
43
43
|
|
|
44
44
|
- Approval mode is session override > project `behavior.approval_mode` > `guard`; workflow mode
|
|
45
|
-
is
|
|
46
|
-
workflow controls execution depth.
|
|
45
|
+
is the mechanical minimum for the current actual change. Approval controls waiting;
|
|
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
48
|
automatically; Auto advances all legal green edges. A new code diff after the QUALITY
|
|
49
49
|
checkpoint is the only exceptional pause across all modes: show the exact diff, bind acceptance
|
|
@@ -148,6 +148,12 @@ First run `/ec-init`; daily work goes through `/ec-workflow`.
|
|
|
148
148
|
not proof of writeback. Keep those facts and scopes separate.
|
|
149
149
|
{{supermodule_boundary}}
|
|
150
150
|
|
|
151
|
+
|
|
152
|
+
Execution efficiency: use begin-correction for confirmed bounded repairs; preserve unrelated
|
|
153
|
+
Units and reuse input-bound checks through prepare-check/record-check. Stage or Spec revision
|
|
154
|
+
changes alone do not invalidate tests. No execution budget. No repeated internal validation,
|
|
155
|
+
speculative fallback/retry/compatibility logic, or defensive copying.
|
|
156
|
+
|
|
151
157
|
<!-- ═══ end easy-coding-harness generated ═══ -->
|
|
152
158
|
|
|
153
159
|
## Project Custom Instructions
|
|
@@ -50,3 +50,7 @@ complete exactly that unit. Your reply IS the return value, not a message to a h
|
|
|
50
50
|
- `checks`: TDD lifecycle commands actually run, otherwise an empty array
|
|
51
51
|
|
|
52
52
|
Do not claim a file is verified unless the card asked you to run a check and you ran it.
|
|
53
|
+
|
|
54
|
+
- Use only the current correction/diff and direct dependencies. Preserve unrelated progress.
|
|
55
|
+
- Do not add repeated validation, fallback, retries, compatibility branches, idempotency
|
|
56
|
+
changes or defensive copies without an explicit requirement or demonstrated defect.
|
|
@@ -55,3 +55,9 @@ dimension named in your task card. Your reply IS the return value.
|
|
|
55
55
|
- `repo_id` and `source_task_id`: copy unchanged when present in the task card
|
|
56
56
|
- `findings`: array of `{file, line, issue, severity}` (`severity`: info | warning | error)
|
|
57
57
|
- `suggestion`: optional fix direction per finding
|
|
58
|
+
|
|
59
|
+
- Use only the current correction/diff and direct dependencies. Preserve unrelated progress.
|
|
60
|
+
- Do not add repeated validation, fallback, retries, compatibility branches, idempotency
|
|
61
|
+
changes or defensive copies without an explicit requirement or demonstrated defect.
|
|
62
|
+
- Review code and test behavior only. Do not reconstruct fingerprints or inspect workflow
|
|
63
|
+
history. Passed work stays passed until relevant inputs change; suggestions do not block.
|