easy-coding-harness 1.1.0-beta.0 → 1.1.0-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +21 -0
- package/README.md +23 -13
- package/dist/cli.js +559 -311
- 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 +34 -43
- package/templates/common/skills/ec-config/SKILL.md +65 -46
- package/templates/common/skills/ec-implementing/SKILL.md +14 -5
- 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 +51 -14
- package/templates/common/skills/ec-task-management/SKILL.md +11 -4
- package/templates/common/skills/ec-tdd-init/SKILL.md +7 -7
- package/templates/common/skills/ec-workflow/SKILL.md +37 -17
- package/templates/main-constraint/AGENTS.md.tpl +37 -19
- package/templates/main-constraint/CLAUDE.md.tpl +37 -19
- package/templates/runtime/tools/easy_coding_java_coverage.py +5 -5
- package/templates/shared-hooks/easy_coding_inputs.py +19 -1
- package/templates/shared-hooks/easy_coding_state.py +536 -220
- 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);
|
|
@@ -6,7 +6,8 @@ description: ANALYSIS-stage skill. Produces the confirmed dev-spec, execution pl
|
|
|
6
6
|
# ec-analysis — progressive analysis and mode selection
|
|
7
7
|
|
|
8
8
|
This stage is read-only for project source. Its outputs are task artifacts only:
|
|
9
|
-
`dev-spec.md`, `execution.jsonl` plan, and `test-strategy.md`
|
|
9
|
+
`dev-spec.md`, `execution.jsonl` plan, and `test-strategy.md` when required by the concrete mode.
|
|
10
|
+
Compact Fast keeps checks in the existing plan.
|
|
10
11
|
|
|
11
12
|
Communicate with the user in the user's language.
|
|
12
13
|
|
|
@@ -24,7 +25,8 @@ Communicate with the user in the user's language.
|
|
|
24
25
|
Load context only for the current change and its direct dependencies. Reuse existing findings;
|
|
25
26
|
without new evidence, do not repeat discovery or expand into unrelated modules.
|
|
26
27
|
|
|
27
|
-
For a task with `task.json.spec_source`,
|
|
28
|
+
For a task with `task.json.spec_source`, reuse the returned/current-session consumption closure.
|
|
29
|
+
Only if missing or changed, use `resume-spec-context` against the stored source, exact
|
|
28
30
|
`selected_spec_tasks`, and only their stored `task.repo_paths` bindings. Schema, Spec ID, design
|
|
29
31
|
revision, and `design_sha256` must still match. A changed `document_sha256` with the same design is
|
|
30
32
|
normal shared progress; refresh `execution_revision` without invalidating plan/QUALITY
|
|
@@ -153,47 +155,36 @@ for truly independent write scopes. Better unit contracts reduce later QUALITY r
|
|
|
153
155
|
Standard/Strict tasks require `test-strategy.md`; compact Fast tasks keep checks in the plan. Pure read-only
|
|
154
156
|
conversation never enters ANALYSIS and creates no task.
|
|
155
157
|
|
|
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.
|
|
158
|
+
## Optional Java unit test strategies
|
|
159
|
+
|
|
160
|
+
Read `effective_unit_test_mode` and `effective_ut_coverage_threshold` from the snapshot. The
|
|
161
|
+
strategy is independent of workflow depth. For `type=tdd-init`, freeze strategy `none` and only
|
|
162
|
+
initialize the existing changed-line infrastructure; do not backfill historical business tests.
|
|
163
|
+
|
|
164
|
+
With `none`, retain ordinary task-required verification and add no coverage scan, command, or
|
|
165
|
+
artifact. With `ut` or `tdd`, reuse the existing Java/JUnit/JaCoCo readiness. Missing infrastructure
|
|
166
|
+
uses `ec-tdd-init`; damaged local entries need only the reported repair. Build-file changes alone
|
|
167
|
+
do not require reinitialization. GitLab execution is not an acceptance dependency.
|
|
168
|
+
|
|
169
|
+
For UT, keep the normal compact Fast analysis when applicable. Record the related unit-test
|
|
170
|
+
command with coverage collection and the changed-line gate command in the plan for compact Fast,
|
|
171
|
+
or in the existing `test-strategy.md` for other tasks, using the
|
|
172
|
+
confirmed `ut_coverage_threshold`. The state API freezes each repository's current Git HEAD in
|
|
173
|
+
`task.tdd_baselines`; use that exact baseline at verification time. Do not duplicate these values
|
|
174
|
+
across extra documents or add a UT Mode section. No RED/GREEN/REFACTOR evidence or TDD review is
|
|
175
|
+
required. Existing tests may already satisfy the threshold; add tests only for relevant gaps.
|
|
176
|
+
|
|
177
|
+
For TDD, also record the existing test-first contract in `test-strategy.md` and a `### TDD Mode`
|
|
178
|
+
section in `dev-spec.md`: frozen threshold, immutable baseline per repository, local unit-test
|
|
179
|
+
command, JaCoCo XML paths, and lifecycle evidence. Use RED -> GREEN -> REFACTOR for feature/bug
|
|
180
|
+
units, or characterization GREEN -> post-change GREEN for pure refactors. Refactor only for a
|
|
181
|
+
concrete improvement. Include `TDD`, `JaCoCo`, `baseline`, `local_test_gate: required`, and
|
|
182
|
+
`remote_ci_acceptance: non-blocking` in the test strategy.
|
|
183
|
+
|
|
184
|
+
Both strategies accept changed production lines at the configured threshold, without chasing
|
|
185
|
+
100% or expanding to historical coverage. One grouped test execution supplies both test and
|
|
186
|
+
coverage evidence. Non-Canonical coverage uses one Git repository; multi-repository coverage uses
|
|
187
|
+
Canonical repository bindings. Preserve failed tests as failures even when coverage reaches target.
|
|
197
188
|
|
|
198
189
|
## Workflow mode calculation
|
|
199
190
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ec-config
|
|
3
|
-
description: Inspect and configure Easy Coding project/session Approval,
|
|
3
|
+
description: Inspect and configure Easy Coding project/session Approval, cooperation, and Java unit test strategies across session, local and project scopes.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# ec-config — mode configuration
|
|
@@ -10,68 +10,87 @@ 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`, `cooperate_mode`,
|
|
14
|
+
the mechanically calculated workflow mode (read-only), `unit_test_mode`, and `ut_coverage_threshold`.
|
|
15
|
+
Show `behavior_sources`, `local_behavior`, and `effective_cooperate_mode` alongside the current
|
|
16
|
+
task cooperation/continuation so a receiving Agent can distinguish its defaults from accepted work.
|
|
17
|
+
Use `project_unit_test_mode`, `session_unit_test_mode`, `effective_unit_test_mode`, their threshold
|
|
18
|
+
counterparts, `task_unit_test_mode`, `task_tdd_baselines`, and `unit_test_readiness_status` directly.
|
|
19
|
+
When readiness is `not_checked`, report it as not checked; do not scan infrastructure merely to
|
|
20
|
+
populate the panel. Inspect readiness when the user requests it or selects UT/TDD.
|
|
21
|
+
|
|
22
|
+
Precedence is `session override > ~/.easy-coding/config.yaml > project config > defaults`, per field. Defaults are Approval `guard`,
|
|
23
|
+
Workflow `adaptive`, cooperation `default`, unit test strategy `none`, and shared changed-line coverage threshold 90%.
|
|
24
|
+
The strategies are:
|
|
25
|
+
|
|
26
|
+
- `none`: ordinary task-required verification, with no additional coverage gate.
|
|
27
|
+
- `ut`: passed local unit tests and changed-production-line JaCoCo coverage at the threshold.
|
|
28
|
+
No test-first order, RED/GREEN history, refactor cycle, or separate TDD review is required.
|
|
29
|
+
- `tdd`: test-first development plus the same local test and coverage gates; retain TDD lifecycle
|
|
30
|
+
evidence and the TDD review dimension.
|
|
31
|
+
|
|
32
|
+
UT/TDD currently apply to Java code tasks. Neither strategy raises the mechanical workflow depth.
|
|
33
|
+
ANALYSIS -> IMPLEMENT freezes strategy, threshold, and repository baselines; later project/session
|
|
34
|
+
changes affect future tasks and ANALYSIS only. `none` preserves the threshold for later use.
|
|
14
35
|
|
|
15
|
-
|
|
16
|
-
-
|
|
17
|
-
|
|
36
|
+
Approval semantics stay independent from verification depth: `approve` waits at each
|
|
37
|
+
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. A new code diff after
|
|
39
|
+
the QUALITY checkpoint requires acceptance of that exact diff without changing the approval mode.
|
|
18
40
|
|
|
19
|
-
|
|
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:
|
|
41
|
+
## Cooperation and configuration scopes
|
|
23
42
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
43
|
+
`cooperate_mode: default | dispatch` selects stage-boundary handoff or manual implementation/repair
|
|
44
|
+
handoff. In dispatch, the coordinator analyzes, verifies and writes memory; the user may choose
|
|
45
|
+
current-Agent execution for any bounded change. Never launch or schedule another Agent.
|
|
46
|
+
One decision approves the displayed scope and its executor. Dispatch requires this human decision
|
|
47
|
+
even under Auto; Approve consumes it as the same approval, not a second dialog. Existing accepted
|
|
48
|
+
handoffs and frozen UT/TDD contracts survive changes to defaults.
|
|
27
49
|
|
|
28
|
-
|
|
29
|
-
|
|
50
|
+
The local file is optional. Read-only inspection and init/upgrade never create it. Save only explicit
|
|
51
|
+
keys under `behavior`; resetting a key removes that override. Local settings are preferences across
|
|
52
|
+
projects and platforms, so saving local UT/TDD does not scan or initialize the current project.
|
|
53
|
+
Readiness is checked when a task actually enables that strategy.
|
|
30
54
|
|
|
31
|
-
|
|
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.
|
|
55
|
+
After the user chooses scope and values, use these commands (the explicit choice authorizes `--yes`):
|
|
35
56
|
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
57
|
+
```bash
|
|
58
|
+
easy-coding config --scope local --cooperate-mode dispatch --yes
|
|
59
|
+
easy-coding config --scope project --cooperate-mode default --yes
|
|
60
|
+
easy-coding config --scope local --reset cooperate_mode --yes
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
The same scopes support `--approval-mode`, `--unit-test-mode`, and `--ut-coverage-threshold`.
|
|
64
|
+
For a session, call `set-cooperate-mode --mode default|dispatch` or `clear-cooperate-mode`
|
|
65
|
+
with the current state API, agent and session file. Bare `ec-config` remains read-only.
|
|
41
66
|
|
|
42
67
|
## Project configuration
|
|
43
68
|
|
|
44
|
-
Use `easy-coding config
|
|
45
|
-
|
|
46
|
-
Enabling TDD is rejected atomically unless `ec-tdd-init` readiness is currently `ready`.
|
|
69
|
+
Use `easy-coding config`. The CLI confirms an atomic update of Approval, unit test strategy, and
|
|
70
|
+
its shared threshold (integer 1..100). Execution depth remains calculated automatically.
|
|
47
71
|
|
|
48
72
|
## Session configuration
|
|
49
73
|
|
|
50
74
|
After explicit user selection, use the current logical session file:
|
|
51
75
|
|
|
52
76
|
```bash
|
|
53
|
-
# approval
|
|
54
77
|
{{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py set-approval-mode --mode approve|guard|confirm|auto --agent <agent-id> --session-file <P>
|
|
55
78
|
{{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py clear-approval-mode --agent <agent-id> --session-file <P>
|
|
56
79
|
|
|
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-
|
|
80
|
+
# Omitting threshold preserves the session threshold or inherits local/project/default 90.
|
|
81
|
+
{{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py set-unit-test-mode --mode none|ut|tdd [--threshold 1..100] --agent <agent-id> --session-file <P>
|
|
82
|
+
{{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py clear-unit-test-mode --agent <agent-id> --session-file <P>
|
|
60
83
|
```
|
|
61
84
|
|
|
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.
|
|
85
|
+
Selecting UT/TDD requires ready infrastructure. Reuse `ec-tdd-init` and its existing readiness
|
|
86
|
+
receipt for both strategies. Route `needs_init` to initialization and `needs_repair` to the reported
|
|
87
|
+
repair, preserving existing settings. Normal build-file changes do not require reinitialization.
|
|
88
|
+
The shared gate measures changed production lines, not historical repository-wide coverage.
|
|
89
|
+
GitLab automation may reuse it, but remote pipelines are not Harness acceptance dependencies.
|
|
90
|
+
|
|
91
|
+
Run related unit tests once with coverage collection, and reuse that execution for both test and
|
|
92
|
+
coverage evidence. Inputs unchanged means reuse; only rerun affected checks after relevant changes.
|
|
93
|
+
Test assertions stay in ordinary review for UT. Do not add a separate UT review or workflow stage.
|
|
94
|
+
|
|
95
|
+
Execution depth always equals the current mechanical minimum. Legacy workflow settings do not
|
|
96
|
+
raise it. Do not offer execution-depth choices or recommend changing to Lite.
|
|
@@ -7,20 +7,21 @@ description: IMPLEMENT-stage skill. Executes the confirmed plan with workflow-mo
|
|
|
7
7
|
|
|
8
8
|
Use only after ANALYSIS has frozen `task.json.workflow_mode` to `fast`, `standard`, or
|
|
9
9
|
`strict`. Read `dev-spec.md`, the latest `plan` record in `execution.jsonl`, relevant RULES
|
|
10
|
-
and ABSTRACT sections
|
|
10
|
+
and ABSTRACT sections. Read `test-strategy.md` when required; compact Fast uses plan checks.
|
|
11
11
|
|
|
12
12
|
For a Canonical-backed task, consume the ready `spec_context.consumption` returned on creation
|
|
13
|
-
or claim.
|
|
13
|
+
or claim. Reuse unchanged context on the same session; only if context is missing or design changed, call `resume-spec-context --agent <agent-id>
|
|
14
14
|
--session-file <P>`. The bound source and selected changes/steps/tests govern the implementation;
|
|
15
15
|
handoff summaries and derived plans cannot substitute for this context. A blocked context or
|
|
16
16
|
pending `spec_change` stops implementation until the original source is repaired/synchronized.
|
|
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}
|
|
@@ -220,3 +221,11 @@ conversation overhead while keeping work observable.
|
|
|
220
221
|
an existing core Java class, has Javadoc unless it qualifies for the documented-interface
|
|
221
222
|
implementation exception.
|
|
222
223
|
- [ ] The task enters QUALITY, regardless of workflow mode.
|
|
224
|
+
|
|
225
|
+
## Manual implementation handoff
|
|
226
|
+
|
|
227
|
+
When `continuation.next_action=implement`, execute only its approved Units. Reuse the original plan,
|
|
228
|
+
commands and results. Honor `stop_after:IMPLEMENT`: record completion and hand back with
|
|
229
|
+
`next_action:quality`, then stop. The receiving coordinator handles the existing stage boundary
|
|
230
|
+
once under the approval policy; the executor never starts quality work by inertia. Users may
|
|
231
|
+
instead choose current-Agent execution. No platform is permanently assigned either role.
|
|
@@ -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
|
|
@@ -6,15 +6,17 @@ description: QUALITY-stage skill. Freezes one candidate, runs independent Review
|
|
|
6
6
|
# ec-quality — one candidate, two read-only gates
|
|
7
7
|
|
|
8
8
|
Use only while the current task is in `QUALITY`. Communicate in the user's language. QUALITY
|
|
9
|
-
|
|
9
|
+
keeps Review and Verification read-only while permitting approved bounded repairs between checks.
|
|
10
|
+
Ordinary fixes stay in QUALITY; changed requirements/contracts or a replaced implementation plan
|
|
11
|
+
return to ANALYSIS/IMPLEMENT. Bug severity or line count alone does not decide the route.
|
|
10
12
|
|
|
11
13
|
## Candidate freeze
|
|
12
14
|
|
|
13
15
|
For Canonical-backed tasks, load the current session's bound selection through `resume-spec-context`
|
|
14
|
-
when
|
|
16
|
+
only when the current session lacks that context or the design changed. Pass that original consumption closure to both gates and compare selected contracts,
|
|
15
17
|
changes, Steps and Tests against the candidate. Pending `spec_change` blocks QUALITY acceptance
|
|
16
18
|
until the source revision is synchronized. Bounded corrections refresh only their affected Unit
|
|
17
|
-
mappings and
|
|
19
|
+
mappings and retain the current stage; substantive expansion returns to ANALYSIS.
|
|
18
20
|
|
|
19
21
|
Call `evidence-fingerprints` once to obtain the runtime-owned attempt and candidate. The runtime
|
|
20
22
|
owns signatures and prior-evidence references. Never calculate historical fingerprints, import
|
|
@@ -59,7 +61,8 @@ meaningless remaining check when a concrete blocker is found. Aggregate the repa
|
|
|
59
61
|
|
|
60
62
|
### Standard
|
|
61
63
|
|
|
62
|
-
-
|
|
64
|
+
- Use one independent reviewer. A coordinator who did not author the candidate can provide this
|
|
65
|
+
review after another Agent implemented it; do not launch a duplicate reviewer merely for form.
|
|
63
66
|
- Run affected lint/typecheck/test plus every must-test command from `test-strategy.md`.
|
|
64
67
|
- Run Review and Verification in parallel when their inputs are already frozen.
|
|
65
68
|
|
|
@@ -69,10 +72,15 @@ meaningless remaining check when a concrete blocker is found. Aggregate the repa
|
|
|
69
72
|
- For each actually modified repository, run all applicable lint, typecheck, test, and build
|
|
70
73
|
checks. A repository merely mentioned by a Spec, dependency, supermodule, or path map is not in
|
|
71
74
|
scope.
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
75
|
+
|
|
76
|
+
### Unit test strategy (all depths)
|
|
77
|
+
|
|
78
|
+
For frozen `unit_test_mode=ut|tdd` at any workflow depth, require passed local unit tests and
|
|
79
|
+
changed-production-line coverage at `ut_coverage_threshold`. Run the related tests with coverage
|
|
80
|
+
collection once and record both results from that execution (`coverage_scope:"local"`). Reuse
|
|
81
|
+
unchanged input-bound evidence from IMPLEMENT or earlier attempts. Only `tdd` adds the TDD review
|
|
82
|
+
dimension and lifecycle contract. UT reviews assertions within ordinary review and does not add a
|
|
83
|
+
separate review. `none` adds no coverage gate. GitLab results are informative, not acceptance gates.
|
|
76
84
|
|
|
77
85
|
## Review Gate
|
|
78
86
|
|
|
@@ -103,7 +111,7 @@ blocking record also carries a `failure_classes` array; do not defer classificat
|
|
|
103
111
|
|
|
104
112
|
## Verification Gate
|
|
105
113
|
|
|
106
|
-
Run only
|
|
114
|
+
Run only commands selected by the mode and the existing plan/test strategy. Record real exit status and
|
|
107
115
|
current implementation/config fingerprints plus the active `quality_attempt` using the existing
|
|
108
116
|
`type:"verify"` contract. Do not run a command inside Review Gate, and do not fix a failure inside
|
|
109
117
|
Verification Gate. A failed applicable check also carries its structured `failure_classes` array.
|
|
@@ -124,7 +132,7 @@ Wait for both gates, then aggregate all blocking results once. Classify each ite
|
|
|
124
132
|
|
|
125
133
|
If code or tests need edits, create one concise Repair Bundle containing every in-scope blocking
|
|
126
134
|
item, affected files, required verification, and evidence that may be reused. After both Gates are
|
|
127
|
-
terminal, finalize the decision
|
|
135
|
+
terminal, finalize the decision, then prepare the bounded repair while remaining in QUALITY:
|
|
128
136
|
|
|
129
137
|
```bash
|
|
130
138
|
{{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py finalize-quality \
|
|
@@ -147,10 +155,39 @@ review/verify record first, then write each affected source task `blocked` throu
|
|
|
147
155
|
use the exact idempotency key `<H>:<S>:<F>:quality-<A>:blocked`. Add one failed evidence object for
|
|
148
156
|
each affected Gate kind with ref
|
|
149
157
|
`execution.jsonl#quality-attempt=<A>;implementation=<F>;source-task=<S>;kind=review|verify`.
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
158
|
+
After blocked writeback is acknowledged, start the approved repair. The runtime reopens only those
|
|
159
|
+
source tasks with a repair-specific idempotency key, keeping local status QUALITY and unaffected
|
|
160
|
+
source progress. Record affected Step/result completion and source `implemented` before completing
|
|
161
|
+
the repair. Reuse the existing writer and ledger, never copy a second implementation plan.
|
|
162
|
+
|
|
163
|
+
Use `begin-correction --file <existing-unit-file> --summary <bundle>` to prepare one `quality_repair`.
|
|
164
|
+
In dispatch mode, present this complete bundle once with choices: current Agent, another Agent,
|
|
165
|
+
or defer/revise. This human dispatch decision remains under every approval mode; Approve shares
|
|
166
|
+
the same decision. The user may explicitly authorize current-Agent execution. Default mode uses
|
|
167
|
+
its existing approval policy for local repair, with no handoff inside the stage.
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
{{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py start-quality-repair \
|
|
171
|
+
--repair-id <id> --executor current|other [--confirmed] --agent <agent-id> --session-file <P>
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
Pass `--confirmed` only for a real user decision on this bundle. For other-Agent execution the call
|
|
175
|
+
also writes the handoff. The recipient claims the task and directly repairs the approved files;
|
|
176
|
+
it must not ask again or return to IMPLEMENT. Bounded code and necessary tests follow the existing
|
|
177
|
+
unit test strategy, including TDD lifecycle checks only when TDD is frozen. The recipient finishes:
|
|
178
|
+
|
|
179
|
+
```bash
|
|
180
|
+
{{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py complete-quality-repair \
|
|
181
|
+
--repair-id <id> --agent <agent-id> --session-file <P>
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
This returns other-Agent repairs to the coordinator for delta review/verification. No quality gate
|
|
185
|
+
may pass while the repair is pending. Scope/contract changes must be resolved rather than silently
|
|
186
|
+
included in the accepted bundle. Repeated starts/completions reuse the existing repair ID.
|
|
187
|
+
|
|
188
|
+
`prepare-check --record` also accepts an array. `record-check --result` accepts an array of
|
|
189
|
+
`{prepared_id,result}` to register the results of those prepared checks. Each check keeps its own
|
|
190
|
+
inputs and real result; batching shares runtime reads, not unrelated evidence.
|
|
154
191
|
|
|
155
192
|
After repair, choose the minimum honest evidence refresh:
|
|
156
193
|
|
|
@@ -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, cooperation, unit test strategy, or the shared coverage threshold, route there and do not mutate those fields here.
|
|
26
26
|
|
|
27
27
|
## Task actions
|
|
28
28
|
|
|
@@ -38,8 +38,8 @@ When creating from a Canonical Spec, call `inspect-dev-spec --manifest-only`, di
|
|
|
38
38
|
task and dependency selection, then call `create-task-from-spec` only after explicit user
|
|
39
39
|
selection. Multiple selected Spec tasks still create one Harness task. Do not call
|
|
40
40
|
`select-dev-spec-scope` during discovery. Creation and claim return the selected consumption
|
|
41
|
-
closure; consume it before stage work. On
|
|
42
|
-
|
|
41
|
+
closure; consume it before stage work. On the same session, reuse unchanged context; call `resume-spec-context` only if context is missing
|
|
42
|
+
or invalidated. A new session must consume its selected closure. A blocked context allows repair/rebind/sync, but blocks advancement.
|
|
43
43
|
Initialize missing shared execution before creation. Support `rebind-spec-source` only when the
|
|
44
44
|
new file matches schema + spec_id + design revision + design_sha256 and does not roll execution
|
|
45
45
|
revision backward. A pending writeback is repaired with `reconcile-spec-execution`, never by
|
|
@@ -49,3 +49,10 @@ action is cleared with `status:error`; correct its input instead of replaying it
|
|
|
49
49
|
Confirmed requirement changes use `begin-spec-change` before editing the original source.
|
|
50
50
|
Its summary and affected tasks survive handoff. Finish revision + READY + `sync-spec-design`,
|
|
51
51
|
then reload context and refresh the plan in ANALYSIS. Do not clear a pending change manually.
|
|
52
|
+
|
|
53
|
+
## Scoped continuation
|
|
54
|
+
|
|
55
|
+
Display the task coordinator, continuation action/stop point and current repair bundle. A claim
|
|
56
|
+
returns the existing approved work; do not request a second scope approval. The main Agent is not
|
|
57
|
+
replaced by the coding executor. Handoff summaries reference existing plan Units and execution
|
|
58
|
+
indices; never copy a new Spec or reconstruct old verification results.
|
|
@@ -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.
|