easy-coding-harness 1.0.1 → 1.1.0-beta.1

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.
Files changed (28) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/README.md +17 -15
  3. package/dist/cli.js +209 -195
  4. package/dist/cli.js.map +1 -1
  5. package/package.json +1 -1
  6. package/templates/claude/agents/ec-implementer.md +4 -0
  7. package/templates/claude/agents/ec-reviewer.md +6 -0
  8. package/templates/codex/agents/ec-implementer.toml +4 -0
  9. package/templates/codex/agents/ec-reviewer.toml +6 -0
  10. package/templates/common/bundled-skills/ec-init/SKILL.md +2 -2
  11. package/templates/common/bundled-skills/ec-meta/references/local-architecture/README.md +6 -6
  12. package/templates/common/skills/ec-analysis/SKILL.md +56 -104
  13. package/templates/common/skills/ec-config/SKILL.md +37 -47
  14. package/templates/common/skills/ec-implementing/SKILL.md +26 -10
  15. package/templates/common/skills/ec-lite/SKILL.md +1 -1
  16. package/templates/common/skills/ec-memory/SKILL.md +3 -4
  17. package/templates/common/skills/ec-quality/SKILL.md +46 -25
  18. package/templates/common/skills/ec-task-management/SKILL.md +2 -2
  19. package/templates/common/skills/ec-tdd-init/SKILL.md +7 -7
  20. package/templates/common/skills/ec-workflow/SKILL.md +24 -22
  21. package/templates/main-constraint/AGENTS.md.tpl +23 -16
  22. package/templates/main-constraint/CLAUDE.md.tpl +23 -16
  23. package/templates/qoder/agents/ec-implementer.md +4 -0
  24. package/templates/qoder/agents/ec-reviewer.md +6 -0
  25. package/templates/runtime/tools/easy_coding_java_coverage.py +5 -5
  26. package/templates/shared-hooks/easy_coding_inputs.py +305 -0
  27. package/templates/shared-hooks/easy_coding_state.py +495 -461
  28. package/templates/shared-hooks/inject-subagent-context.py +3 -3
@@ -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 synchronization and ANALYSIS replanning have completed.
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 and use the returned implementation/config fingerprints for
19
- the whole attempt. It also returns the runtime-owned `quality_attempt` number, start time, evidence
20
- boundary, and repair count. Every Review and Verification record in this attempt must carry that
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
- `execution.jsonl` is append-only. Do not write `type:"quality"` yourself. The state API appends
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
- Review Gate and Verification Gate are independent and may run in parallel. Review never executes
31
- commands. Verification never edits files. If a hard blocker makes remaining work meaningless,
32
- cancel the other checks explicitly and record the cancellation; do not start repair while a gate
33
- is still running or unacknowledged.
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
 
@@ -53,10 +69,15 @@ is still running or unacknowledged.
53
69
  - For each actually modified repository, run all applicable lint, typecheck, test, and build
54
70
  checks. A repository merely mentioned by a Spec, dependency, supermodule, or path map is not in
55
71
  scope.
56
- - 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"`;
58
- GitLab coverage is informative, not a task acceptance gate. Reuse current-fingerprint GREEN
59
- evidence from IMPLEMENT instead of rerunning an identical command.
72
+
73
+ ### Unit test strategy (all depths)
74
+
75
+ For frozen `unit_test_mode=ut|tdd` at any workflow depth, require passed local unit tests and
76
+ changed-production-line coverage at `ut_coverage_threshold`. Run the related tests with coverage
77
+ collection once and record both results from that execution (`coverage_scope:"local"`). Reuse
78
+ unchanged input-bound evidence from IMPLEMENT or earlier attempts. Only `tdd` adds the TDD review
79
+ dimension and lifecycle contract. UT reviews assertions within ordinary review and does not add a
80
+ separate review. `none` adds no coverage gate. GitLab results are informative, not acceptance gates.
60
81
 
61
82
  ## Review Gate
62
83
 
@@ -143,12 +164,12 @@ After repair, choose the minimum honest evidence refresh:
143
164
  - localized business code: delta review plus impacted tests;
144
165
  - contract/config/plan/shared behavior: rerun all applicable gates for the affected scope.
145
166
 
146
- When uncertain, rerun rather than infer. On the next attempt, the state API emits an append-only
147
- `quality-carry-forward` record only for Canonical repositories whose plan and repository content
148
- fingerprints are unchanged and whose sources are not hard/contract downstream of a changed source;
149
- it references the exact passed evidence indices from the consumed repair attempt. Never copy or
150
- relabel old evidence yourself. Strict may consume that state-owned record for independent,
151
- unaffected repositories, but must rerun every affected or dependency-invalidated repository gate.
167
+ Use the runtime's reusable/changed-input result to decide what remains. Changes to a plan
168
+ narrative, stage, approval mode or Spec revision alone do not require test execution. Refresh only
169
+ affected evidence, including actual shared dependencies; never restart all Units in the repository.
170
+ Passed checks are terminal until their inputs change or a concrete new defect invalidates them.
171
+ Suggestions never trigger another review round. No reviewer may demand new defensive checks
172
+ without a concrete triggering input and demonstrated failure. Preserve the original error strategy.
152
173
 
153
174
  ## Acceptance boundary
154
175
 
@@ -13,7 +13,7 @@ panel and available actions, but do not mutate a session without an explicit cho
13
13
  Call the state API snapshot and show:
14
14
 
15
15
  - current task, stage, last Agent, and pending transition;
16
- - task `concrete_workflow_mode` and frozen TDD state when present;
16
+ - task `concrete_workflow_mode` and frozen unit test strategy when present;
17
17
  - harness enabled/disabled and Lite Direct state;
18
18
  - active and resumable tasks.
19
19
  - for Canonical-backed tasks: source locator/path mode, Spec ID/design revision/design digest,
@@ -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, TDD, or the TDD coverage threshold, route there and do not mutate those fields here.
25
+ Workflow, 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
 
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  name: ec-tdd-init
3
- description: Initialize or refresh Java changed-line TDD coverage infrastructure before TDD can be enabled.
3
+ description: Initialize or refresh Java changed-line TDD coverage infrastructure before UT or TDD can be enabled.
4
4
  ---
5
5
 
6
6
  # ec-tdd-init — Java changed-line gate initialization
7
7
 
8
- Communicate in the user's language. This skill owns TDD infrastructure readiness, not historical
8
+ Communicate in the user's language. This skill owns shared UT/TDD infrastructure readiness, not historical
9
9
  test-debt cleanup. It must never bulk-generate tests for existing business code, require
10
10
  repository-wide coverage, or modify production behavior merely to raise coverage.
11
11
 
@@ -14,12 +14,12 @@ repository-wide coverage, or modify production behavior merely to raise coverage
14
14
  The only legal order is:
15
15
 
16
16
  ```text
17
- TDD off -> initialize infrastructure -> readiness ready -> user explicitly enables TDD
17
+ unit_test_mode=none -> initialize infrastructure -> readiness ready -> user selects UT or TDD
18
18
  ```
19
19
 
20
20
  Run this skill as a dedicated code task with `type=tdd-init`. The state API always freezes that
21
- task with `tdd_enabled=false`, even when a legacy project/session setting or a suspended task has
22
- TDD enabled. Never offer "enable now and initialize later". Never enable TDD automatically after
21
+ task with `unit_test_mode=none`, even when a legacy project/session setting or a suspended task has
22
+ UT or TDD enabled. Never offer "enable now and initialize later". Never enable UT/TDD automatically after
23
23
  initialization.
24
24
 
25
25
  ## Read-only preflight
@@ -31,7 +31,7 @@ python3 .easy-coding/tools/easy_coding_tdd_readiness.py --cwd . check --include-
31
31
  ```
32
32
 
33
33
  If it returns `ready`, report the recorded build/CI contract and stop without creating a task.
34
- The user may then use `ec-config` or `easy-coding config` to enable TDD.
34
+ The user may then use `ec-config` or `easy-coding config` to select UT or TDD.
35
35
 
36
36
  If it returns `needs_init` or `needs_repair`, inspect only the reported infrastructure needed
37
37
  to form a confirmed initialization or repair plan:
@@ -102,5 +102,5 @@ reinitialization. Daily `check` validates local entry points and task-variable c
102
102
  return `needs_init`; damaged receipts or required entries return `needs_repair`. Repair the
103
103
  reported entry, repeat applicable tests, and preserve the user's TDD settings.
104
104
 
105
- After completion, report the unchanged TDD setting and provide the explicit project/session
105
+ After completion, report the unchanged unit test strategy and provide the explicit project/session
106
106
  enable route when it is off. Do not treat readiness as consent to change it.
@@ -30,20 +30,20 @@ Pure conversation, explanation, analysis, and read-only review stay Ready and cr
30
30
  edge. The only additional pause is an exceptional code diff detected after the frozen
31
31
  QUALITY acceptance checkpoint; accepting that exact diff does not change the mode.
32
32
  - `workflow_mode = adaptive|fast|standard|strict` controls execution cost and assurance depth.
33
- - `tdd_enabled` independently activates Java TDD and changed-line coverage. It defaults off;
34
- `tdd_coverage_threshold` defaults to 90 and accepts integers from 1 to 100.
33
+ - `unit_test_mode` independently selects `none`, `ut`, or `tdd`. It defaults to `none`;
34
+ `ut_coverage_threshold` defaults to 90 and accepts integers from 1 to 100.
35
35
 
36
- Resolution order for each configured value is session override, then project config, then
37
- defaults (`guard`, `adaptive`). ANALYSIS resolves `adaptive` to a concrete mode, presents the
38
- selection and reasons, allows the user to change it within the risk floor, and freezes it when
39
- ANALYSIS -> IMPLEMENT is applied.
36
+ Approval and unit test strategy 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
- TDD resolves with the same session-over-project precedence and freezes its enabled flag and
42
- threshold on ANALYSIS -> IMPLEMENT. It may be enabled only after `ec-tdd-init` readiness passes;
43
- there is no enabled-but-pending-initialization state. A dedicated `tdd-init` task always freezes
44
- TDD off so it can create or repair the required infrastructure without circular gating. When off,
45
- ordinary tasks add no CI scan, artifacts, commands, coverage work, or stronger acceptance. Use
46
- `ec-config` for all mode configuration.
41
+ Unit test strategy uses the same session-over-project precedence and freezes its mode and
42
+ `ut_coverage_threshold` on ANALYSIS -> IMPLEMENT. UT and TDD share passed local unit tests and
43
+ changed-line coverage, and reuse `ec-tdd-init` readiness. Only TDD requires test-first lifecycle
44
+ and its review dimension. UT keeps ordinary review and compact Fast planning. The `tdd-init`
45
+ task itself freezes strategy `none`; `none` adds no infrastructure scan or coverage gate.
46
+ Both strategies reuse input-bound results and do not raise workflow depth.
47
47
 
48
48
  `confirm` and `auto` do not hide the proposal: show it in the plan. Confirm waits for that one
49
49
  plan decision; Auto continues immediately. Both remove later waiting, not quality gates.
@@ -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
- ## Mode escalation
209
+ ## Current-change routing
210
210
 
211
- When implementation reveals a higher risk, call:
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
- ```bash
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 upward changes are legal after ANALYSIS. During QUALITY, return to IMPLEMENT before
220
- raising the mode so the task re-enters QUALITY with fresh evidence. Scope or design changes return
221
- to ANALYSIS.
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
 
@@ -13,8 +13,8 @@ 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
15
  task-frozen execution mode; session overrides take precedence over project settings.
16
- When effective/frozen TDD is enabled, insert `· **TDD**` immediately after Workflow. When it is
17
- disabled, omit the TDD segment entirely and preserve the existing status-line format.
16
+ When effective/frozen unit_test_mode is `ut` or `tdd`, insert `· **UT**` or **TDD**`
17
+ immediately after Workflow. For `none`, omit this segment and preserve the status-line format.
18
18
 
19
19
  - Ready: > **Easy Coding** · **Approval: {approval-mode}** · **Workflow: {workflow-mode}** · Ready · Use `ec-workflow` to start or resume a task, `ec-brainstorming` to brainstorm, `ec-task-management` to manage tasks, or `ec-config` to inspect or change modes
20
20
  - Waiting init: > **Easy Coding** · **Approval: {approval-mode}** · **Workflow: {workflow-mode}** · Waiting init · Use `ec-init` to initialize
@@ -34,7 +34,7 @@ Trigger Easy Coding skills with your platform prefix — Codex: `$ec-*`, Qoder:
34
34
  - `ec-brainstorming` — design exploration before building (hard design gate)
35
35
  - `ec-analysis` `ec-implementing` `ec-quality` — workflow stages
36
36
  - `ec-memory` — short/long memory archive
37
- - `ec-task-management` — task lifecycle panel · `ec-config` — Approval/Workflow/TDD settings · `ec-tdd-init` — Java changed-line gate initialization · `ec-task-close` — interrupt a task
37
+ - `ec-task-management` — task lifecycle panel · `ec-config` — Approval/Workflow/unit-test settings · `ec-tdd-init` — Java changed-line gate initialization · `ec-task-close` — interrupt a task
38
38
  - `ec-no-harness` — bypass only Easy Coding for the current session
39
39
  - `ec-lite` — user-controlled direct mode with one proposal confirmation and no task/QUALITY/MEMORY
40
40
  - `ec-git` — git discipline · `ec-meta` — understand/customize the harness
@@ -44,24 +44,25 @@ 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 session override > project `behavior.workflow_mode` > `adaptive`. Approval controls waiting;
48
- workflow controls execution depth. ANALYSIS shows and freezes adaptive to fast/standard/strict.
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
52
52
  to its digest, and continue without rereview when the user accepts.
53
53
  Every mutation task runs QUALITY; no mode changes scope, delivery form, or evidence gates.
54
- - TDD is session override > project `behavior.tdd_enabled` > `false`; its changed-line threshold
55
- is session override > project `behavior.tdd_coverage_threshold` > `90`. ANALYSIS -> IMPLEMENT
56
- freezes both. TDD may be enabled only after `ec-tdd-init` records valid infrastructure readiness;
57
- build version/content changes require fresh task evidence, not reinitialization. Repair missing
58
- local entries without resetting TDD; CLI upgrades preserve project/session/frozen task settings;
59
- there is no enable-now/init-later state. The dedicated `tdd-init` task always freezes TDD off and
60
- initializes only changed-line coverage infrastructure, never historical business-test coverage.
61
- Disabled TDD adds no CI scan, JaCoCo work, commands, artifacts, or stronger gates. Enabled TDD
62
- applies only to Java code tasks and requires lifecycle, review, passed local unit tests, and
63
- local coverage for production lines changed since the task baseline. `ec-tdd-init` still
64
- generates GitLab TEST-stage automation, but remote CI status is not Harness acceptance evidence.
54
+ - Unit test strategy is session override > project `behavior.unit_test_mode` > `none`.
55
+ 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
+ and repository baselines. `none` adds no coverage work and retains ordinary task verification.
58
+ UT requires passed local unit tests and changed-production-line coverage, without test-first
59
+ ordering, RED/GREEN artifacts, or a separate TDD review. TDD additionally requires its lifecycle
60
+ and review dimension. Assertions remain part of ordinary review in UT.
61
+ Both currently support Java and reuse `ec-tdd-init` readiness, JaCoCo, and existing evidence
62
+ reuse. One test execution supplies tests plus coverage. No new stages or workflow escalation.
63
+ The dedicated `tdd-init` task freezes strategy `none`; readiness failure reports repair rather
64
+ than resetting configuration. CLI upgrades migrate old fields and preserve frozen task progress.
65
+ GitLab automation is infrastructure, not remote acceptance evidence.
65
66
  - Confirmation-required edges use `pending_transition`; automatic edges use the restricted
66
67
  `auto-transition` API. Pure read-only conversation stays Ready and creates no task. Any
67
68
  repository write, including documentation or configuration, uses the full state machine.
@@ -153,6 +154,12 @@ First run `ec-init`; daily work goes through `ec-workflow`.
153
154
  not proof of writeback. Keep those facts and scopes separate.
154
155
  {{supermodule_boundary}}
155
156
 
157
+
158
+ Execution efficiency: use begin-correction for confirmed bounded repairs; preserve unrelated
159
+ Units and reuse input-bound checks through prepare-check/record-check. Stage or Spec revision
160
+ changes alone do not invalidate tests. No execution budget. No repeated internal validation,
161
+ speculative fallback/retry/compatibility logic, or defensive copying.
162
+
156
163
  <!-- ═══ end easy-coding-harness generated ═══ -->
157
164
 
158
165
  ## Project Custom Instructions
@@ -13,8 +13,8 @@ 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
15
  task-frozen execution mode; session overrides take precedence over project settings.
16
- When effective/frozen TDD is enabled, insert `· **TDD**` immediately after Workflow. When it is
17
- disabled, omit the TDD segment entirely and preserve the existing status-line format.
16
+ When effective/frozen unit_test_mode is `ut` or `tdd`, insert `· **UT**` or **TDD**`
17
+ immediately after Workflow. For `none`, omit this segment and preserve the status-line format.
18
18
 
19
19
  - Ready: > **Easy Coding** · **Approval: {approval-mode}** · **Workflow: {workflow-mode}** · Ready · Use `ec-workflow` to start or resume a task, `ec-brainstorming` to brainstorm, `ec-task-management` to manage tasks, or `ec-config` to inspect or change modes
20
20
  - Waiting init: > **Easy Coding** · **Approval: {approval-mode}** · **Workflow: {workflow-mode}** · Waiting init · Use `ec-init` to initialize
@@ -32,7 +32,7 @@ platform prefixes such as `/` or `$`. If no status line is injected, do not inve
32
32
  - `/ec-brainstorming` — design exploration before building (hard design gate)
33
33
  - `/ec-analysis` `/ec-implementing` `/ec-quality` — workflow stages
34
34
  - `/ec-memory` — short/long memory archive
35
- - `/ec-task-management` — task lifecycle panel · `/ec-config` — Approval/Workflow/TDD settings · `/ec-tdd-init` — Java changed-line gate initialization · `/ec-task-close` — interrupt a task
35
+ - `/ec-task-management` — task lifecycle panel · `/ec-config` — Approval/Workflow/unit-test settings · `/ec-tdd-init` — Java changed-line gate initialization · `/ec-task-close` — interrupt a task
36
36
  - `/ec-no-harness` — bypass only Easy Coding for the current session
37
37
  - `/ec-lite` — user-controlled direct mode with one proposal confirmation and no task/QUALITY/MEMORY
38
38
  - `/ec-git` — git discipline · `/ec-meta` — understand/customize the harness
@@ -42,24 +42,25 @@ 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 session override > project `behavior.workflow_mode` > `adaptive`. Approval controls waiting;
46
- workflow controls execution depth. ANALYSIS shows and freezes adaptive to fast/standard/strict.
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
50
50
  to its digest, and continue without rereview when the user accepts.
51
51
  Every mutation task runs QUALITY; no mode changes scope, delivery form, or evidence gates.
52
- - TDD is session override > project `behavior.tdd_enabled` > `false`; its changed-line threshold
53
- is session override > project `behavior.tdd_coverage_threshold` > `90`. ANALYSIS -> IMPLEMENT
54
- freezes both. TDD may be enabled only after `ec-tdd-init` records valid infrastructure readiness;
55
- build version/content changes require fresh task evidence, not reinitialization. Repair missing
56
- local entries without resetting TDD; CLI upgrades preserve project/session/frozen task settings;
57
- there is no enable-now/init-later state. The dedicated `tdd-init` task always freezes TDD off and
58
- initializes only changed-line coverage infrastructure, never historical business-test coverage.
59
- Disabled TDD adds no CI scan, JaCoCo work, commands, artifacts, or stronger gates. Enabled TDD
60
- applies only to Java code tasks and requires lifecycle, review, passed local unit tests, and
61
- local coverage for production lines changed since the task baseline. `ec-tdd-init` still
62
- generates GitLab TEST-stage automation, but remote CI status is not Harness acceptance evidence.
52
+ - Unit test strategy is session override > project `behavior.unit_test_mode` > `none`.
53
+ 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
+ and repository baselines. `none` adds no coverage work and retains ordinary task verification.
56
+ UT requires passed local unit tests and changed-production-line coverage, without test-first
57
+ ordering, RED/GREEN artifacts, or a separate TDD review. TDD additionally requires its lifecycle
58
+ and review dimension. Assertions remain part of ordinary review in UT.
59
+ Both currently support Java and reuse `ec-tdd-init` readiness, JaCoCo, and existing evidence
60
+ reuse. One test execution supplies tests plus coverage. No new stages or workflow escalation.
61
+ The dedicated `tdd-init` task freezes strategy `none`; readiness failure reports repair rather
62
+ than resetting configuration. CLI upgrades migrate old fields and preserve frozen task progress.
63
+ GitLab automation is infrastructure, not remote acceptance evidence.
63
64
  - Confirmation-required edges use `pending_transition`; automatic edges use the restricted
64
65
  `auto-transition` API. Pure read-only conversation stays Ready and creates no task. Any
65
66
  repository write, including documentation or configuration, uses the full state machine.
@@ -148,6 +149,12 @@ First run `/ec-init`; daily work goes through `/ec-workflow`.
148
149
  not proof of writeback. Keep those facts and scopes separate.
149
150
  {{supermodule_boundary}}
150
151
 
152
+
153
+ Execution efficiency: use begin-correction for confirmed bounded repairs; preserve unrelated
154
+ Units and reuse input-bound checks through prepare-check/record-check. Stage or Spec revision
155
+ changes alone do not invalidate tests. No execution budget. No repeated internal validation,
156
+ speculative fallback/retry/compatibility logic, or defensive copying.
157
+
151
158
  <!-- ═══ end easy-coding-harness generated ═══ -->
152
159
 
153
160
  ## 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.
@@ -191,16 +191,16 @@ def read_project_threshold(repo: Path) -> int:
191
191
  schema_version = 0
192
192
  continue
193
193
  if (
194
- schema_version >= 4
194
+ schema_version >= 6
195
195
  and in_behavior
196
- and stripped.startswith("tdd_coverage_threshold:")
196
+ and stripped.startswith("ut_coverage_threshold:")
197
197
  ):
198
198
  try:
199
199
  value = int(stripped.split(":", 1)[1].strip().strip("'\""))
200
200
  except ValueError as error:
201
- raise CoverageError("Invalid behavior.tdd_coverage_threshold") from error
201
+ raise CoverageError("Invalid behavior.ut_coverage_threshold") from error
202
202
  if not 1 <= value <= 100:
203
- raise CoverageError("TDD coverage threshold must be from 1 to 100")
203
+ raise CoverageError("Unit test coverage threshold must be from 1 to 100")
204
204
  return value
205
205
  return DEFAULT_THRESHOLD
206
206
 
@@ -294,7 +294,7 @@ def main() -> int:
294
294
  else read_project_threshold(repo)
295
295
  )
296
296
  if not 1 <= threshold <= 100:
297
- raise CoverageError("TDD coverage threshold must be from 1 to 100")
297
+ raise CoverageError("Unit test coverage threshold must be from 1 to 100")
298
298
  reports = (
299
299
  sorted({Path(item).resolve() for item in args.report})
300
300
  if args.report