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/CHANGELOG.md +11 -0
- package/README.md +11 -10
- package/dist/cli.js +208 -165
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
- package/templates/common/bundled-skills/ec-init/SKILL.md +2 -2
- package/templates/common/bundled-skills/ec-meta/references/local-architecture/README.md +6 -6
- package/templates/common/skills/ec-analysis/SKILL.md +30 -41
- package/templates/common/skills/ec-config/SKILL.md +37 -46
- package/templates/common/skills/ec-implementing/SKILL.md +4 -3
- package/templates/common/skills/ec-lite/SKILL.md +1 -1
- package/templates/common/skills/ec-memory/SKILL.md +3 -4
- package/templates/common/skills/ec-quality/SKILL.md +9 -4
- package/templates/common/skills/ec-task-management/SKILL.md +2 -2
- package/templates/common/skills/ec-tdd-init/SKILL.md +7 -7
- package/templates/common/skills/ec-workflow/SKILL.md +9 -9
- package/templates/main-constraint/AGENTS.md.tpl +15 -14
- package/templates/main-constraint/CLAUDE.md.tpl +15 -14
- package/templates/runtime/tools/easy_coding_java_coverage.py +5 -5
- package/templates/shared-hooks/easy_coding_inputs.py +1 -1
- package/templates/shared-hooks/easy_coding_state.py +173 -138
- package/templates/shared-hooks/inject-subagent-context.py +3 -3
package/package.json
CHANGED
|
@@ -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
|
|
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
|
|
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
|
|
67
|
-
|
|
68
|
-
(default 90) on entry to IMPLEMENT
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
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
|
|
157
|
-
|
|
158
|
-
Read `
|
|
159
|
-
For
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
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
|
|
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
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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
|
-
|
|
20
|
-
`
|
|
21
|
-
|
|
22
|
-
|
|
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
|
-
|
|
25
|
-
|
|
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.
|
|
39
|
-
|
|
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
|
|
45
|
-
|
|
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
|
-
#
|
|
58
|
-
{{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py set-
|
|
59
|
-
{{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py clear-
|
|
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
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
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.
|
|
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
|
|
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
|
-
##
|
|
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
|
-
|
|
46
|
-
|
|
47
|
-
|
|
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
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
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
|
|
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,
|
|
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
|
-
|
|
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 `
|
|
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
|
|
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
|
|
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
|
-
- `
|
|
34
|
-
`
|
|
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
|
|
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
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
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
|
|
17
|
-
|
|
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/
|
|
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
|
-
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
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
|
|
17
|
-
|
|
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/
|
|
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
|
-
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
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 >=
|
|
194
|
+
schema_version >= 6
|
|
195
195
|
and in_behavior
|
|
196
|
-
and stripped.startswith("
|
|
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.
|
|
201
|
+
raise CoverageError("Invalid behavior.ut_coverage_threshold") from error
|
|
202
202
|
if not 1 <= value <= 100:
|
|
203
|
-
raise CoverageError("
|
|
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("
|
|
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("
|
|
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():
|