easy-coding-harness 1.1.0-beta.0 → 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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easy-coding-harness",
3
- "version": "1.1.0-beta.0",
3
+ "version": "1.1.0-beta.1",
4
4
  "description": "CLI scaffold for installing Easy Coding harness files into agent-native directories.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -85,7 +85,7 @@ initialization standard. Check each item:
85
85
  and non-empty?
86
86
  - **Project profile**: `project.yaml` exists with `mode` and `test` fields (ec-init owns it;
87
87
  `config.yaml` is CLI-owned — not ec-init's concern)?
88
- - **TDD runtime contract**: CLI-owned `config.yaml` has schema 5 TDD defaults and both
88
+ - **TDD runtime contract**: CLI-owned `config.yaml` has schema 6 unit test defaults and both
89
89
  `.easy-coding/tools/easy_coding_java_coverage.py` and
90
90
  `.easy-coding/tools/easy_coding_tdd_readiness.py` exist? Missing fields or tools mean
91
91
  `easy-coding upgrade` is required; ec-init must not repair them directly. Project-specific
@@ -169,7 +169,7 @@ agent must be able to see what was generated and on what evidence.
169
169
  tests live, naming conventions, coverage expectations, which classes of code this project
170
170
  tests vs skips. Also fill `project.yaml` `test.framework` and `test.command` with commands
171
171
  you verified exist (read package.json scripts or equivalent — do not guess).
172
- If effective TDD is disabled, do not inspect JaCoCo or GitLab and do not add TDD-specific
172
+ If effective unit test strategy is `none`, do not inspect JaCoCo or GitLab and do not add TDD-specific
173
173
  requirements. If it is enabled for Java, additionally document JUnit/JaCoCo commands,
174
174
  production/test source roots, XML report paths, the local acceptance gate, and the generated
175
175
  GitLab TEST-stage job as non-blocking automation infrastructure.
@@ -63,12 +63,12 @@ confirmation before a minimal mutation, creates no task/QUALITY/MEMORY artifacts
63
63
  until the user invokes it again. If a task is active, the user chooses whether to cancel startup,
64
64
  close the task, or clear only the session task pointer before Lite starts.
65
65
 
66
- Java TDD is a third independent, default-off control managed by `ec-config`. Session overrides
67
- project configuration; ANALYSIS freezes enabled state and the 1..100 changed-line threshold
68
- (default 90) on entry to IMPLEMENT. Disabled TDD changes no ordinary workflow test depth. Enabled
69
- TDD adds lifecycle evidence, a TDD review dimension, passed local unit-test evidence, and a local
70
- JaCoCo diff gate. `ec-tdd-init` still generates the equivalent GitLab TEST-stage job, but remote
71
- pipeline execution and status are not Harness acceptance dependencies.
66
+ Java unit tests use an independent `unit_test_mode: none|ut|tdd` managed by `ec-config`.
67
+ Session values override project defaults. Both UT and TDD freeze the shared `ut_coverage_threshold`
68
+ (default 90) and repository baseline on entry to IMPLEMENT, and require passed local unit tests
69
+ plus JaCoCo changed-line coverage. UT has no test-first or separate TDD-review requirement; TDD
70
+ adds lifecycle evidence and its review dimension. Both reuse `ec-tdd-init` infrastructure.
71
+ Remote GitLab execution is not a task acceptance gate.
72
72
 
73
73
  The active task pointer lives in `sessions/{agent}-{session-id}.json` (with an agent-prefixed PPID fallback only
74
74
  when a hook payload has no logical session ID);
@@ -153,47 +153,36 @@ for truly independent write scopes. Better unit contracts reduce later QUALITY r
153
153
  Standard/Strict tasks require `test-strategy.md`; compact Fast tasks keep checks in the plan. Pure read-only
154
154
  conversation never enters ANALYSIS and creates no task.
155
155
 
156
- ## Optional Java TDD analysis
157
-
158
- Read `effective_tdd_enabled` and `effective_tdd_coverage_threshold` from the state snapshot.
159
- For a `type=tdd-init` task, treat frozen TDD as off even if the project/session requests it. That
160
- task is the sole exception allowed to inspect and plan build/CI coverage infrastructure while TDD
161
- is off. Its scope is infrastructure only: never plan historical business-test backfill or a
162
- repository-wide coverage target, and explicitly record `coverage scope: changed production lines`.
163
-
164
- When TDD is disabled, stop here: do not inspect GitLab CI or JaCoCo, do not add TDD fields or
165
- extra tests, and do not strengthen the selected Workflow Mode's ordinary acceptance depth. This
166
- zero-cost rule applies to ordinary tasks, not the explicit `tdd-init` infrastructure task above.
167
-
168
- When TDD is enabled for a Java code task, make `test-strategy.md` record:
169
-
170
- - detected Java/JUnit build system, exact unit-test command, production/test source roots, and
171
- JaCoCo XML paths;
172
- - immutable Git baseline SHA and the configured changed-production-line threshold; meet that threshold without adding assertions or tests solely to reach 100%;
173
- - feature/bug RED -> GREEN -> REFACTOR evidence, or for pure refactors a pre-change
174
- characterization GREEN -> post-change GREEN sequence without inventing a RED failure;
175
- - the local unit-test command and local changed-line acceptance command. Record that
176
- `ec-tdd-init` generated the GitLab TEST-stage job, but remote execution, pipeline identity, and
177
- status are non-blocking and never require an intermediate commit or push. Include these exact,
178
- language-independent contract markers: `local_test_gate: required` and
179
- `remote_ci_acceptance: non-blocking`.
180
- - current `tdd_readiness_status=ready`; a missing receipt requires `ec-tdd-init`, while
181
- `needs_repair` requires fixing the reported entry without resetting TDD configuration.
182
- Build-file content changes use current task tests and coverage; they do not require reinit.
183
-
184
- The state API mechanically freezes current Git `HEAD` per repository into `task.tdd_baselines`
185
- when ANALYSIS advances to IMPLEMENT. Plan the local command with that exact SHA and the frozen
186
- threshold. The generated GitLab job remains parameterized for infrastructure parity, but the
187
- Harness acceptance plan never waits for remote CI. Never use a mutable `HEAD` fallback at
188
- verification time. Non-Canonical TDD is limited to one Git repository; multi-repository TDD must
189
- use Canonical repository bindings.
190
-
191
- Also append a `### TDD Mode` section to `dev-spec.md` with enabled state, frozen threshold,
192
- baseline, local unit-test gate, local coverage gate, generated GitLab job as non-blocking
193
- infrastructure, and lifecycle evidence. Do not add this section when TDD is disabled.
194
-
195
- If the task is not a Java project, explain that Java-only TDD cannot be activated and obtain a
196
- mode decision before advancing. The CLI never installs JaCoCo or edits CI automatically.
156
+ ## Optional Java unit test strategies
157
+
158
+ Read `effective_unit_test_mode` and `effective_ut_coverage_threshold` from the snapshot. The
159
+ strategy is independent of workflow depth. For `type=tdd-init`, freeze strategy `none` and only
160
+ initialize the existing changed-line infrastructure; do not backfill historical business tests.
161
+
162
+ With `none`, retain ordinary task-required verification and add no coverage scan, command, or
163
+ artifact. With `ut` or `tdd`, reuse the existing Java/JUnit/JaCoCo readiness. Missing infrastructure
164
+ uses `ec-tdd-init`; damaged local entries need only the reported repair. Build-file changes alone
165
+ do not require reinitialization. GitLab execution is not an acceptance dependency.
166
+
167
+ For UT, keep the normal compact Fast analysis when applicable. Record the related unit-test
168
+ command with coverage collection and the changed-line gate command in the plan for compact Fast,
169
+ or in the existing `test-strategy.md` for other tasks, using the
170
+ confirmed `ut_coverage_threshold`. The state API freezes each repository's current Git HEAD in
171
+ `task.tdd_baselines`; use that exact baseline at verification time. Do not duplicate these values
172
+ across extra documents or add a UT Mode section. No RED/GREEN/REFACTOR evidence or TDD review is
173
+ required. Existing tests may already satisfy the threshold; add tests only for relevant gaps.
174
+
175
+ For TDD, also record the existing test-first contract in `test-strategy.md` and a `### TDD Mode`
176
+ section in `dev-spec.md`: frozen threshold, immutable baseline per repository, local unit-test
177
+ command, JaCoCo XML paths, and lifecycle evidence. Use RED -> GREEN -> REFACTOR for feature/bug
178
+ units, or characterization GREEN -> post-change GREEN for pure refactors. Refactor only for a
179
+ concrete improvement. Include `TDD`, `JaCoCo`, `baseline`, `local_test_gate: required`, and
180
+ `remote_ci_acceptance: non-blocking` in the test strategy.
181
+
182
+ Both strategies accept changed production lines at the configured threshold, without chasing
183
+ 100% or expanding to historical coverage. One grouped test execution supplies both test and
184
+ coverage evidence. Non-Canonical coverage uses one Git repository; multi-repository coverage uses
185
+ Canonical repository bindings. Preserve failed tests as failures even when coverage reaches target.
197
186
 
198
187
  ## Workflow mode calculation
199
188
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ec-config
3
- description: Inspect and configure Easy Coding project/session Approval, Workflow, and Java TDD modes.
3
+ description: Inspect and configure Easy Coding project/session Approval, Workflow, and Java unit test strategies.
4
4
  ---
5
5
 
6
6
  # ec-config — mode configuration
@@ -10,68 +10,59 @@ 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:
13
+ Call `snapshot` and show project, session, effective, and frozen task values for `approval_mode`,
14
+ the mechanically calculated workflow mode (read-only), `unit_test_mode`, and `ut_coverage_threshold`.
15
+ Use `project_unit_test_mode`, `session_unit_test_mode`, `effective_unit_test_mode`, their threshold
16
+ counterparts, `task_unit_test_mode`, `task_tdd_baselines`, and `unit_test_readiness_status` directly.
17
+ When readiness is `not_checked`, report it as not checked; do not scan infrastructure merely to
18
+ populate the panel. Inspect readiness when the user requests it or selects UT/TDD.
14
19
 
15
- - `approval_mode`;
16
- - the mechanically calculated workflow mode (read-only);
17
- - `tdd_enabled` and `tdd_coverage_threshold`.
20
+ Precedence is `session override > project config > defaults`. Defaults are Approval `guard`,
21
+ Workflow `adaptive`, unit test strategy `none`, and shared changed-line coverage threshold 90%.
22
+ The strategies are:
18
23
 
19
- Use the returned fields directly, including `project_tdd_enabled`, `session_tdd_enabled`,
20
- `effective_tdd_enabled`, their threshold counterparts, `task_tdd_enabled`, and the task's
21
- per-repository `task_tdd_baselines` frozen state. When `tdd_readiness_status=not_checked` because
22
- TDD is off, explicitly run the read-only readiness command below before showing readiness:
24
+ - `none`: ordinary task-required verification, with no additional coverage gate.
25
+ - `ut`: passed local unit tests and changed-production-line JaCoCo coverage at the threshold.
26
+ No test-first order, RED/GREEN history, refactor cycle, or separate TDD review is required.
27
+ - `tdd`: test-first development plus the same local test and coverage gates; retain TDD lifecycle
28
+ evidence and the TDD review dimension.
23
29
 
24
- ```bash
25
- python3 .easy-coding/tools/easy_coding_tdd_readiness.py --cwd . check
26
- ```
27
-
28
- This explicit configuration-panel check is the only disabled-mode readiness scan; ordinary hooks
29
- must not inspect build or CI files while TDD is off.
30
-
31
- Explain precedence as `session override > project config > defaults`. Defaults are Approval
32
- `guard`, Workflow `adaptive`, TDD disabled, and TDD changed-line coverage threshold 90%. An active
33
- task freezes its effective TDD values when ANALYSIS advances to IMPLEMENT; later project/session
34
- changes affect future tasks and ANALYSIS only.
30
+ UT/TDD currently apply to Java code tasks. Neither strategy raises the mechanical workflow depth.
31
+ ANALYSIS -> IMPLEMENT freezes strategy, threshold, and repository baselines; later project/session
32
+ changes affect future tasks and ANALYSIS only. `none` preserves the threshold for later use.
35
33
 
36
34
  Approval semantics stay independent from verification depth: `approve` waits at each
37
35
  non-mechanical edge, `guard` waits at ANALYSIS -> IMPLEMENT and QUALITY -> MEMORY, `confirm`
38
- waits only for the plan, and `auto` advances legal green edges immediately. Every mode temporarily
39
- pauses only when code changes after the frozen QUALITY checkpoint, because the user must see
40
- and accept that exact new diff; this exception does not convert `auto` into `guard`.
36
+ waits only for the plan, and `auto` advances legal green edges immediately. A new code diff after
37
+ the QUALITY checkpoint requires acceptance of that exact diff without changing the approval mode.
41
38
 
42
39
  ## Project configuration
43
40
 
44
- Use `easy-coding config` for project settings. The CLI confirms one atomic update of Approval,
45
- TDD, and (when enabled) the threshold. Execution depth is calculated automatically. The threshold must be an integer from 1 to 100.
46
- Enabling TDD is rejected atomically unless `ec-tdd-init` readiness is currently `ready`.
41
+ Use `easy-coding config`. The CLI confirms an atomic update of Approval, unit test strategy, and
42
+ its shared threshold (integer 1..100). Execution depth remains calculated automatically.
47
43
 
48
44
  ## Session configuration
49
45
 
50
46
  After explicit user selection, use the current logical session file:
51
47
 
52
48
  ```bash
53
- # approval
54
49
  {{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
50
  {{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py clear-approval-mode --agent <agent-id> --session-file <P>
56
51
 
57
- # TDD; omitting threshold preserves an existing session threshold, otherwise project/default 90 applies
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>
59
- {{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py clear-tdd --agent <agent-id> --session-file <P>
52
+ # Omitting threshold preserves the session threshold or inherits project/default 90.
53
+ {{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
+ {{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py clear-unit-test-mode --agent <agent-id> --session-file <P>
60
55
  ```
61
56
 
62
- Turning TDD off must preserve the existing Fast/Standard/Strict test depth exactly: do not inspect
63
- CI, request JaCoCo, add TDD artifacts, run coverage commands, or strengthen acceptance criteria.
64
- When TDD is on, explain that it applies only to Java code tasks and activates RED/GREEN/REFACTOR,
65
- TDD review, a passed local unit-test gate, and local changed-line JaCoCo coverage. `ec-tdd-init`
66
- still generates the GitLab TEST-stage job, but Harness does not wait for or record remote pipeline
67
- results as acceptance evidence.
68
-
69
- Before any project/session enable action, require `tdd_readiness_status=ready`. If it is not ready,
70
- route `needs_init` to `ec-tdd-init` and `needs_repair` to the reported repair. Preserve existing
71
- settings on failure; never offer or persist "enable now, initialize later". Normal build-file
72
- changes do not require initialization, and a CLI upgrade must preserve project/session TDD values.
73
- Readiness means infrastructure can measure future changed production lines. It does not certify
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.
57
+ Selecting UT/TDD requires ready infrastructure. Reuse `ec-tdd-init` and its existing readiness
58
+ receipt for both strategies. Route `needs_init` to initialization and `needs_repair` to the reported
59
+ repair, preserving existing settings. Normal build-file changes do not require reinitialization.
60
+ The shared gate measures changed production lines, not historical repository-wide coverage.
61
+ GitLab automation may reuse it, but remote pipelines are not Harness acceptance dependencies.
62
+
63
+ Run related unit tests once with coverage collection, and reuse that execution for both test and
64
+ coverage evidence. Inputs unchanged means reuse; only rerun affected checks after relevant changes.
65
+ Test assertions stay in ordinary review for UT. Do not add a separate UT review or workflow stage.
66
+
67
+ Execution depth always equals the current mechanical minimum. Legacy workflow settings do not
68
+ raise it. Do not offer execution-depth choices or recommend changing to Lite.
@@ -15,12 +15,13 @@ or claim. On session resume or after design sync, call `resume-spec-context --ag
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.
17
17
 
18
- If frozen `task.tdd_enabled` is not `true`, IMPLEMENT writes production and planned test code but
18
+ If frozen `task.unit_test_mode` is `none` or `ut`, IMPLEMENT writes production and planned test code but
19
19
  does not run lint, typecheck, test, build, or coverage commands. Deterministic execution belongs
20
20
  to QUALITY's Verification Gate. TDD is the only exception because RED/GREEN/REFACTOR commands are
21
21
  part of the implementation method; current-fingerprint green evidence may be reused by QUALITY.
22
+ UT writes the necessary tests here and runs them once with coverage in QUALITY, with no TDD lifecycle.
22
23
 
23
- When frozen TDD is enabled, every feature/bug unit must capture a meaningful failing unit test
24
+ When frozen `task.unit_test_mode` is `tdd`, every feature/bug unit must capture a meaningful failing unit test
24
25
  before production code (RED) and the smallest passing implementation (GREEN). Refactor only
25
26
  when a concrete improvement is needed; unchanged GREEN inputs do not require another run.
26
27
  Pure refactors instead capture a passing characterization test before the change and rerun it
@@ -134,7 +135,7 @@ Sub-agents never dispatch other sub-agents or read `.easy-coding` workflow asset
134
135
  # Task Card
135
136
  ## Identity Easy Coding implementation unit
136
137
  ## Workflow Mode {fast|standard|strict}
137
- ## TDD {off | on, frozen changed-line threshold N%}
138
+ ## Unit Tests {none | ut | tdd; shared changed-line threshold N%}
138
139
  ## Task {unit description}
139
140
  ## Source Spec {spec_id@revision + sha256 | NONE}
140
141
  ## Source Task {source_task_id | NONE}
@@ -77,5 +77,5 @@ For an explicit repository mutation:
77
77
  another file changed after confirmation, or Git HEAD moved. Re-present the proposal rather
78
78
  than bypassing that result. Lite remains enabled for the next request.
79
79
 
80
- Lite intentionally omits TDD, QUALITY, MEMORY, task history, and completion transitions. Use a
80
+ Lite intentionally omits UT/TDD coverage gates, QUALITY, MEMORY, task history, and completion transitions. Use a
81
81
  normal Fast task instead when the user wants those guarantees.
@@ -42,10 +42,9 @@ policy, changed files, and any Canonical source tasks that required targeted ver
42
42
  the user's accepted exception without re-reviewing or re-analyzing the code. Canonical writeback
43
43
  already carries the same digest and authorization as shared `acceptance` evidence.
44
44
 
45
- When frozen TDD is enabled, add its threshold, lifecycle evidence, passed local unit-test result,
46
- and local changed-line result to the short memory's execution evidence. Remote CI status is not
47
- part of Harness acceptance or task memory. When TDD is off, omit TDD fields entirely so ordinary
48
- tasks incur no additional memory work.
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.
49
48
 
50
49
  Ask the state API for `memory-instruction`. Distill only when it returns `action:distill`;
51
50
  otherwise record `no-op`. Long memory receives reusable facts only, not file dumps, transient
@@ -69,10 +69,15 @@ meaningless remaining check when a concrete blocker is found. Aggregate the repa
69
69
  - For each actually modified repository, run all applicable lint, typecheck, test, and build
70
70
  checks. A repository merely mentioned by a Spec, dependency, supermodule, or path map is not in
71
71
  scope.
72
- - When frozen TDD is enabled, include the required TDD review dimension, local unit test, and
73
- changed-production-line coverage at the confirmed threshold. Record one coverage result with `coverage_scope:"local"`;
74
- GitLab coverage is informative, not a task acceptance gate. Reuse current-fingerprint GREEN
75
- 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.
76
81
 
77
82
  ## Review Gate
78
83
 
@@ -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
- Approval and TDD retain session-over-project precedence. Execution depth is always the
36
+ Approval and unit test strategy retain session-over-project precedence. Execution depth is always the
37
37
  mechanically calculated minimum for the current change. Do not recommend, select a higher mode,
38
38
  or inherit an old task mode. Persist it once with `propose-workflow-mode --agent <agent-id>
39
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.
@@ -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
@@ -51,17 +51,18 @@ First run `ec-init`; daily work goes through `ec-workflow`.
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.
@@ -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
@@ -49,17 +49,18 @@ First run `/ec-init`; daily work goes through `/ec-workflow`.
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.
@@ -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
@@ -255,7 +255,7 @@ def input_spec(root, task, plan, check):
255
255
  "tests" if builds_module else "tests/fixtures"):
256
256
  if (base / config).is_dir():
257
257
  paths.add(config)
258
- if task.get("tdd_enabled") is True:
258
+ if task.get("unit_test_mode") in {"ut", "tdd"}:
259
259
  for directory in {str(root.resolve()), *repositories}:
260
260
  manifest = Path(directory) / ".easy-coding/tdd/readiness.json"
261
261
  if manifest.is_file():