easy-coding-harness 0.10.0-beta.0 → 0.10.0-beta.10
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 +166 -0
- package/README.md +53 -19
- package/dist/cli.js +573 -53
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
- package/templates/claude/agents/ec-implementer.md +11 -0
- package/templates/claude/agents/ec-reviewer.md +6 -1
- package/templates/codex/agents/ec-implementer.toml +11 -0
- package/templates/codex/agents/ec-reviewer.toml +6 -1
- package/templates/common/bundled-skills/ec-init/SKILL.md +20 -2
- package/templates/common/bundled-skills/ec-meta/references/local-architecture/README.md +33 -11
- package/templates/common/bundled-skills/ec-meta/references/platform-files/README.md +1 -1
- package/templates/common/skills/ec-analysis/SKILL.md +162 -26
- package/templates/common/skills/ec-config/SKILL.md +76 -0
- package/templates/common/skills/ec-git/SKILL.md +7 -1
- package/templates/common/skills/ec-implementing/SKILL.md +72 -1
- package/templates/common/skills/ec-memory/SKILL.md +77 -3
- package/templates/common/skills/ec-reviewing/SKILL.md +25 -1
- package/templates/common/skills/ec-task-close/SKILL.md +4 -0
- package/templates/common/skills/ec-task-management/SKILL.md +13 -32
- package/templates/common/skills/ec-tdd-init/SKILL.md +101 -0
- package/templates/common/skills/ec-verification/SKILL.md +91 -5
- package/templates/common/skills/ec-workflow/SKILL.md +86 -21
- package/templates/main-constraint/AGENTS.md.tpl +54 -12
- package/templates/main-constraint/CLAUDE.md.tpl +51 -12
- package/templates/qoder/agents/ec-implementer.md +11 -0
- package/templates/qoder/agents/ec-reviewer.md +6 -1
- package/templates/runtime/templates/dev-spec-skeleton.md +8 -1
- package/templates/runtime/tools/easy_coding_java_coverage.py +317 -0
- package/templates/runtime/tools/easy_coding_tdd_readiness.py +306 -0
- package/templates/shared-hooks/easy_coding_state.py +4782 -574
- package/templates/shared-hooks/easy_dev_spec.py +444 -30
- package/templates/shared-hooks/easy_dev_spec_execution.py +1014 -0
- package/templates/shared-hooks/easy_dev_spec_protocol.py +1426 -18
- package/templates/shared-hooks/inject-subagent-context.py +5 -0
|
@@ -24,23 +24,37 @@ the stage graph. Pre-0.9 in-flight tasks may carry `workflow_mode_legacy:true` f
|
|
|
24
24
|
review-evidence compatibility. Only `workflow_mode_legacy_direct_edge:true`, created from old
|
|
25
25
|
lite semantics or an already-persisted edge, permits one IMPLEMENT -> VERIFICATION transition.
|
|
26
26
|
|
|
27
|
-
##
|
|
27
|
+
## Independent controls
|
|
28
28
|
|
|
29
29
|
- `approval_mode = approve|guard|confirm|auto` controls whether a legal transition waits for a
|
|
30
30
|
user. `confirm` waits only at ANALYSIS -> IMPLEMENT; after that, green REVIEW, VERIFICATION,
|
|
31
|
-
MEMORY, and COMPLETE transitions advance automatically.
|
|
31
|
+
MEMORY, and COMPLETE transitions advance automatically. `auto` advances every legal green
|
|
32
|
+
edge. The only additional pause is an exceptional code diff detected after the frozen
|
|
33
|
+
VERIFICATION acceptance checkpoint; accepting that exact diff does not change the mode.
|
|
32
34
|
- `workflow_mode = adaptive|fast|standard|strict` controls execution cost and assurance depth.
|
|
35
|
+
- `tdd_enabled` independently activates Java TDD and changed-line coverage. It defaults off;
|
|
36
|
+
`tdd_coverage_threshold` defaults to 90 and accepts integers from 1 to 100.
|
|
33
37
|
|
|
34
38
|
Resolution order for each configured value is session override, then project config, then
|
|
35
39
|
defaults (`guard`, `adaptive`). ANALYSIS resolves `adaptive` to a concrete mode, presents the
|
|
36
40
|
selection and reasons, allows the user to change it within the risk floor, and freezes it when
|
|
37
41
|
ANALYSIS -> IMPLEMENT is applied.
|
|
38
42
|
|
|
43
|
+
TDD resolves with the same session-over-project precedence and freezes its enabled flag and
|
|
44
|
+
threshold on ANALYSIS -> IMPLEMENT. It may be enabled only after `ec-tdd-init` readiness passes;
|
|
45
|
+
there is no enabled-but-pending-initialization state. A dedicated `tdd-init` task always freezes
|
|
46
|
+
TDD off so it can create or repair the required infrastructure without circular gating. When off,
|
|
47
|
+
ordinary tasks add no CI scan, artifacts, commands, coverage work, or stronger acceptance. Use
|
|
48
|
+
`ec-config` for all mode configuration.
|
|
49
|
+
|
|
39
50
|
`confirm` and `auto` do not hide the proposal: show it in the plan. Confirm waits for that one
|
|
40
51
|
plan decision; Auto continues immediately. Both remove later waiting, not quality gates.
|
|
41
52
|
|
|
42
53
|
## Startup
|
|
43
54
|
|
|
55
|
+
Throughout this skill, `<agent-id>` is the canonical workflow owner ID: `claude-code`, `codex`,
|
|
56
|
+
or `qoder`. Never use a display or source-author attribution such as `Codex with Easy Coding`.
|
|
57
|
+
|
|
44
58
|
1. Read the injected state breadcrumbs or call:
|
|
45
59
|
|
|
46
60
|
```bash
|
|
@@ -52,36 +66,63 @@ plan decision; Auto continues immediately. Both remove later waiting, not qualit
|
|
|
52
66
|
- Present with `status != "COMPLETE"`: invoke `{{skill_trigger}}ec-init`, then stop.
|
|
53
67
|
- `[easy-coding:upgrade-init-pending:X]`: recommend `{{skill_trigger}}ec-init` for vX
|
|
54
68
|
adaptation, but allow the user to continue; this reminder is not a workflow block.
|
|
55
|
-
3. When the user explicitly references a Dev-Spec, run
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
69
|
+
3. When the user explicitly references a Dev-Spec, first run read-only `inspect-dev-spec
|
|
70
|
+
--manifest-only`. This routing pass validates the document, identifies the current worktree by
|
|
71
|
+
normalized remote, and returns the task catalog without resolving unrelated repositories. For
|
|
72
|
+
`protocol=canonical-v1`, show every task ID, repository, title, static status, actual execution
|
|
73
|
+
status, and dependency; never select all tasks by default and never calculate baseline drift
|
|
74
|
+
before selection.
|
|
75
|
+
|
|
76
|
+
After the user chooses one or more tasks, run one selected inspection with repeated
|
|
77
|
+
`--spec-task`. Resolve paths only for repositories that own selected tasks. The current
|
|
78
|
+
worktree needs no explicit mapping when its normalized remote matches uniquely; pass
|
|
79
|
+
`--repo-path` only for an additional selected repository or to confirm an ambiguous current
|
|
80
|
+
match. A differing `path_hint` is a one-time runtime mapping notice, not a Spec portability
|
|
81
|
+
failure: never copy, mirror, or rewrite the source Spec because of it.
|
|
82
|
+
|
|
83
|
+
Then call `create-task-from-spec` once for the complete selection. Do not call
|
|
84
|
+
`select-dev-spec-scope` during routing; `ec-analysis` owns the single consumption-closure read
|
|
85
|
+
after task creation. A document without a Canonical manifest remains a legacy ANALYSIS input
|
|
86
|
+
for an ordinary task. A malformed, DRAFT, or otherwise non-READY Canonical Spec stays blocked
|
|
87
|
+
and must never be downgraded to the legacy route. A READY Canonical Spec without shared
|
|
88
|
+
execution remains readable, but run `initialize-spec-execution` before selection can become an
|
|
89
|
+
executable Harness task.
|
|
63
90
|
|
|
64
91
|
```bash
|
|
65
92
|
{{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py inspect-dev-spec \
|
|
66
|
-
--spec <path>
|
|
93
|
+
--spec <path> --manifest-only
|
|
67
94
|
|
|
68
|
-
{{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py
|
|
69
|
-
--spec <path> --spec-task <task-id> [--spec-task <task-id>]...
|
|
95
|
+
{{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py inspect-dev-spec \
|
|
96
|
+
--spec <path> --spec-task <task-id> [--spec-task <task-id>]... \
|
|
97
|
+
[--repo-path <repo-id>=<path>]...
|
|
98
|
+
|
|
99
|
+
{{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py initialize-spec-execution \
|
|
100
|
+
--spec <path>
|
|
70
101
|
|
|
71
102
|
{{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py create-task-from-spec \
|
|
72
103
|
--spec <path> --spec-task <task-id> [--spec-task <task-id>]... \
|
|
73
104
|
--task-id <harness-task-id> --type <type> --title <title> \
|
|
74
|
-
--repo-path <repo-id>=<path>
|
|
105
|
+
[--repo-path <repo-id>=<path>]... \
|
|
106
|
+
[--dependency-evidence <dependency-id>=<evidence>]... \
|
|
75
107
|
--agent <agent-id> --session-file <P>
|
|
76
108
|
```
|
|
77
109
|
|
|
78
|
-
`
|
|
79
|
-
|
|
80
|
-
|
|
110
|
+
Shared `EDS:EXECUTION` is the dependency fact source. Accept a completed hard dependency or a
|
|
111
|
+
satisfied edge directly from that snapshot. Only accept manual dependency evidence when the
|
|
112
|
+
shared edge is still pending and the user explicitly supplies independently verifiable
|
|
113
|
+
evidence; never reconstruct completion from another local Harness task, Git history, or an
|
|
114
|
+
agent's inference.
|
|
81
115
|
|
|
82
116
|
When multiple selected tasks depend on the same target, disambiguate creation evidence with
|
|
83
117
|
`<source-task-id>-><dependency-task-id>=<evidence>`.
|
|
84
|
-
|
|
118
|
+
Explicit project-external Spec files are supported and stored as absolute locators. If that
|
|
119
|
+
locator moves, use `rebind-spec-source`; never guess by basename. Shared execution progress is
|
|
120
|
+
written only through state API writer commands. Static design edits require revision + READY +
|
|
121
|
+
`sync-spec-design`; never hand-edit the `EDS:EXECUTION` region.
|
|
122
|
+
4. When the user explicitly invokes `ec-tdd-init`, let that skill own preflight and create a
|
|
123
|
+
`type=tdd-init` code task only after scope confirmation. Do not reinterpret it as an ordinary
|
|
124
|
+
TDD-enabled feature task and do not require readiness before creating it.
|
|
125
|
+
5. Match the user's intent against `current_task` and the active task list before resuming.
|
|
85
126
|
If the user names or clearly matches another task, confirm the switch and call
|
|
86
127
|
`claim-task --task-id <id> --agent <agent-id> --session-file <P>`. Do not execute task A
|
|
87
128
|
under task B's request.
|
|
@@ -93,10 +134,10 @@ plan decision; Auto continues immediately. Both remove later waiting, not qualit
|
|
|
93
134
|
to the requested deliverable. Feature, bugfix, refactor, performance, and workflow changes
|
|
94
135
|
are code tasks. Use `doc`, `analysis`, or `report` only when the user explicitly requested
|
|
95
136
|
a no-code deliverable; never downgrade a code request to the read-only completion path.
|
|
96
|
-
|
|
137
|
+
6. Resume the matched/current task, then load only state-relevant assets. Do not read five full
|
|
97
138
|
memories at every startup; ANALYSIS searches memory metadata and opens relevant entries on
|
|
98
139
|
demand.
|
|
99
|
-
|
|
140
|
+
7. If another Agent last owned the task, summarize the stored handoff before continuing.
|
|
100
141
|
|
|
101
142
|
## Stage dispatch
|
|
102
143
|
|
|
@@ -104,10 +145,17 @@ plan decision; Auto continues immediately. Both remove later waiting, not qualit
|
|
|
104
145
|
- `ANALYSIS`: dispatch `ec-analysis`; it produces artifacts and a workflow proposal.
|
|
105
146
|
- `IMPLEMENT`: dispatch `ec-implementing` using the frozen concrete mode.
|
|
106
147
|
- `REVIEW`: dispatch `ec-reviewing`; the transition requires current fingerprint evidence.
|
|
107
|
-
- `VERIFICATION`: dispatch `ec-verification`;
|
|
148
|
+
- `VERIFICATION`: dispatch `ec-verification`; the MEMORY boundary requires green evidence and an
|
|
149
|
+
unchanged or explicitly accepted verification checkpoint.
|
|
108
150
|
- `MEMORY`: dispatch `ec-memory`.
|
|
109
151
|
- `COMPLETE` / `CLOSED`: report terminal status and clear stale session ownership.
|
|
110
152
|
|
|
153
|
+
For a Canonical-backed task whose snapshot reports pending writeback, call
|
|
154
|
+
`reconcile-spec-execution` before dispatching the stage. Do not advance locally while shared
|
|
155
|
+
writeback remains pending or conflicted. A deterministic writer rejection reports `error` and
|
|
156
|
+
clears the pending action so the corrected action can proceed; never overwrite a different
|
|
157
|
+
pending action.
|
|
158
|
+
|
|
111
159
|
## Boundary handling
|
|
112
160
|
|
|
113
161
|
Use `request-transition` for a boundary that requires approval, then present the complete
|
|
@@ -124,6 +172,23 @@ Use `auto-transition` only when the state API says the edge is automatic. Mechan
|
|
|
124
172
|
(analysis artifacts and proposal, review fingerprint, verification fingerprint, memory
|
|
125
173
|
completion) apply in every approval mode.
|
|
126
174
|
|
|
175
|
+
`[easy-coding:acceptance-drift-confirmation-required]` is a narrow exception to automatic-edge
|
|
176
|
+
handling. Call `inspect-transition-drift`, present every returned patch/binary/mode change and the
|
|
177
|
+
current `diff_sha256`, then use the platform's native choice UI for these branches:
|
|
178
|
+
|
|
179
|
+
1. Accept this exact diff and continue to MEMORY (recommended only with the stated verification
|
|
180
|
+
policy).
|
|
181
|
+
2. Return to IMPLEMENT because the change needs normal repair/review.
|
|
182
|
+
3. Hand off to another Agent.
|
|
183
|
+
4. Other / revise.
|
|
184
|
+
|
|
185
|
+
Never call `auto-transition` repeatedly to hide this pause. If the user accepts, preserve the
|
|
186
|
+
existing REVIEW conclusion and call `confirm-transition` with the exact digest,
|
|
187
|
+
`--verification-policy carry-forward|targeted|waived`, and a decision summary. `targeted` needs a
|
|
188
|
+
passed current-fingerprint targeted check first. If the digest changes, inspect and present the
|
|
189
|
+
new diff. Config, plan, workflow, Canonical-design, or nested-repository drift is not an
|
|
190
|
+
acceptance-diff choice and returns to the stage required by the state API.
|
|
191
|
+
|
|
127
192
|
For a migrated pre-0.9 Lite task, the breadcrumb
|
|
128
193
|
`[easy-coding:lite-review-bypass-required:IMPLEMENT->REVIEW]` means the stored REVIEW edge is
|
|
129
194
|
stale. Call `cancel-transition`, then immediately call `auto-transition --stage VERIFICATION`.
|
|
@@ -13,8 +13,10 @@ 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
18
|
|
|
17
|
-
- Ready: > **Easy Coding** · **Approval: {approval-mode}** · **Workflow: {workflow-mode}** · Ready · Use `ec-workflow` to start or resume a task, `ec-brainstorming` to brainstorm,
|
|
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
|
|
18
20
|
- Waiting init: > **Easy Coding** · **Approval: {approval-mode}** · **Workflow: {workflow-mode}** · Waiting init · Use `ec-init` to initialize
|
|
19
21
|
- Active task: > **Easy Coding** · **Approval: {approval-mode}** · **Workflow: {workflow-mode}** · `{current-task}` · `{workflow-state}`
|
|
20
22
|
- Handoff: > **Easy Coding** · **Approval: {approval-mode}** · **Workflow: {workflow-mode}** · `{current-task}` · `{workflow-state}` · Handoff -> `{source-agent}`
|
|
@@ -31,7 +33,7 @@ Trigger Easy Coding skills with your platform prefix — Codex: `$ec-*`, Qoder:
|
|
|
31
33
|
- `ec-brainstorming` — design exploration before building (hard design gate)
|
|
32
34
|
- `ec-analysis` `ec-implementing` `ec-reviewing` `ec-verification` — workflow stages
|
|
33
35
|
- `ec-memory` — short/long memory archive
|
|
34
|
-
- `ec-task-management` — task
|
|
36
|
+
- `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
37
|
- `ec-no-harness` — bypass only Easy Coding for the current session
|
|
36
38
|
- `ec-git` — git discipline · `ec-meta` — understand/customize the harness
|
|
37
39
|
|
|
@@ -43,8 +45,19 @@ First run `ec-init`; daily work goes through `ec-workflow`.
|
|
|
43
45
|
is session override > project `behavior.workflow_mode` > `adaptive`. Approval controls waiting;
|
|
44
46
|
workflow controls execution depth. ANALYSIS shows and freezes adaptive to fast/standard/strict.
|
|
45
47
|
Confirm approval waits only at ANALYSIS -> IMPLEMENT, then advances green later stages
|
|
46
|
-
automatically
|
|
47
|
-
|
|
48
|
+
automatically; Auto advances all legal green edges. A new code diff after the VERIFICATION
|
|
49
|
+
checkpoint is the only exceptional pause across all modes: show the exact diff, bind acceptance
|
|
50
|
+
to its digest, and continue without rereview when the user accepts.
|
|
51
|
+
Every new code task runs REVIEW; 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
|
+
there is no enable-now/init-later state. The dedicated `tdd-init` task always freezes TDD off and
|
|
56
|
+
initializes only changed-line coverage infrastructure, never historical business-test coverage.
|
|
57
|
+
Disabled TDD adds no CI scan, JaCoCo work, commands, artifacts, or stronger gates. Enabled TDD
|
|
58
|
+
applies only to Java code tasks and requires lifecycle, review, passed local unit tests, and
|
|
59
|
+
local coverage for production lines changed since the task baseline. `ec-tdd-init` still
|
|
60
|
+
generates GitLab TEST-stage automation, but remote CI status is not Harness acceptance evidence.
|
|
48
61
|
- Confirmation-required edges use `pending_transition`; automatic edges use the restricted
|
|
49
62
|
`auto-transition` API. A read-only task creates no test-strategy.md, never enters REVIEW,
|
|
50
63
|
VERIFICATION, or MEMORY, and writes no task memory.
|
|
@@ -65,15 +78,35 @@ First run `ec-init`; daily work goes through `ec-workflow`.
|
|
|
65
78
|
only Easy Coding workflow/stage orchestration for this session. Continue honoring every
|
|
66
79
|
non-Easy-Coding skill, hook, and instruction. Do not clear or mutate the suspended task.
|
|
67
80
|
- ANALYSIS must follow template-first: read `.easy-coding/templates/dev-spec-skeleton.md` then
|
|
68
|
-
write its exact content to the task's dev-spec.md as the FIRST tool calls. Next inspect evidence
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
81
|
+
write its exact content to the task's dev-spec.md as the FIRST tool calls. Next inspect evidence,
|
|
82
|
+
set `decision_status: open`, ask every unresolved material decision, and progressively record
|
|
83
|
+
each confirmed answer and its evidence in `### 决策闭环`. Only after all material decisions are
|
|
84
|
+
resolved may the agent set the single `decision_status: closed`, finalize the artifacts, and
|
|
85
|
+
propose IMPLEMENT. The session presentation is a concise core-solution, acceptance, workflow,
|
|
86
|
+
and risk summary with an absolute local link/path to the full dev-spec.md; never paste the full
|
|
87
|
+
artifact by default. The final artifact contains neither `[阶段:ANALYSIS]` nor a
|
|
88
|
+
`待用户决策` section.
|
|
72
89
|
- REVIEW and VERIFICATION are fingerprinted hard gates. Review evidence must match the final
|
|
73
90
|
implementation; verification evidence must match final implementation and config. The frozen
|
|
74
91
|
workflow mode selects targeted, impacted, or full commands without weakening the green gate.
|
|
92
|
+
Freeze a verification checkpoint after green checks. Unchanged checkpoints follow approval
|
|
93
|
+
mode normally; post-checkpoint code drift requires exact digest acceptance and
|
|
94
|
+
carry-forward/targeted/waived verification policy, but never an automatic second REVIEW.
|
|
95
|
+
- Canonical-backed tasks bind static validity to design revision + `design_sha256`, while
|
|
96
|
+
`document_sha256` and `execution_revision` may advance through shared writer commands. Project-
|
|
97
|
+
external explicit Spec paths are allowed and may be repaired only with identity-checked rebind.
|
|
98
|
+
Runtime progress must use the shared writer with CAS/idempotency and reconciliation; static
|
|
99
|
+
design changes require revision + READY + `sync-spec-design`. Never hand-edit `EDS:EXECUTION`.
|
|
100
|
+
Selected source tasks remain `implemented` through local VERIFICATION and become `verified`
|
|
101
|
+
only when the accepted VERIFICATION -> MEMORY boundary is actually applied.
|
|
102
|
+
- Canonical routing is two-pass: first use manifest-only discovery for the current worktree, then
|
|
103
|
+
inspect only the explicitly selected task IDs and repositories. A remote-confirmed worktree
|
|
104
|
+
overrides a stale `path_hint`; never mirror the source Spec or re-check unselected repositories.
|
|
105
|
+
ANALYSIS reads the selected consumption closure once and treats exact/scope-unchanged as a fast
|
|
106
|
+
projection, while shared execution is the dependency fact source.
|
|
75
107
|
- MEMORY combines short-memory creation and the conditional long-memory gate. Entry follows the
|
|
76
|
-
effective confirmation mode;
|
|
108
|
+
effective confirmation mode; its checkpoint records any accepted post-verification diff digest
|
|
109
|
+
and decision. Once memory processing completes, COMPLETE is automatic.
|
|
77
110
|
- NO CODE-TASK COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE.
|
|
78
111
|
- All cross-platform modules (skills, hooks, references) must use universal agent protocols.
|
|
79
112
|
Do not rely on any specific agent's proprietary conventions unless the module is explicitly
|
|
@@ -82,15 +115,24 @@ First run `ec-init`; daily work goes through `ec-workflow`.
|
|
|
82
115
|
|
|
83
116
|
## Runtime contract
|
|
84
117
|
|
|
85
|
-
- Workflow state operations
|
|
86
|
-
|
|
87
|
-
|
|
118
|
+
- Workflow state operations use the script installed for the active host: Codex uses
|
|
119
|
+
`.codex/hooks/easy_coding_state.py`, while Qoder uses its installed `.qoder/hooks/easy_coding_state.py`
|
|
120
|
+
or `.qodercn/hooks/easy_coding_state.py` variant.
|
|
121
|
+
Never substitute one platform's script for the other, and pass only the canonical owner ID
|
|
122
|
+
(`codex` or `qoder`) to `--agent`; display attribution such as `Codex with Easy Coding` is not
|
|
123
|
+
a workflow identity. The installed script's embedded platform identity, canonical owner, and
|
|
124
|
+
injected session namespace must agree. Do not hand-edit session files, `current_task`, task
|
|
125
|
+
`status`, `stage_history`,
|
|
126
|
+
`pending_transition`, `verification_checkpoint`, workflow/TDD proposal or freeze fields,
|
|
127
|
+
`memory_progress`, or `last_agent`.
|
|
88
128
|
- The hook injects `[easy-coding:session-file:P]`; pass that path to the state script with
|
|
89
129
|
`--session-file <P>` when changing the current task or stage.
|
|
90
130
|
- Workflow session files live at `{{workflow_state_path}}`; the CLI only installs files and
|
|
91
131
|
creates the project-init task — agent skills perform all project analysis.
|
|
92
132
|
- Cross-repo references in git-tracked task artifacts use repo NAMES, never local paths.
|
|
93
133
|
Cache local paths only through the state script so they land on the current task.
|
|
134
|
+
- Shared Canonical writeback is a stage gate but not proof of Git commit/push, and Git delivery is
|
|
135
|
+
not proof of writeback. Keep those facts and scopes separate.
|
|
94
136
|
{{supermodule_boundary}}
|
|
95
137
|
|
|
96
138
|
<!-- ═══ end easy-coding-harness generated ═══ -->
|
|
@@ -13,8 +13,10 @@ 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
18
|
|
|
17
|
-
- Ready: > **Easy Coding** · **Approval: {approval-mode}** · **Workflow: {workflow-mode}** · Ready · Use `ec-workflow` to start or resume a task, `ec-brainstorming` to brainstorm,
|
|
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
|
|
18
20
|
- Waiting init: > **Easy Coding** · **Approval: {approval-mode}** · **Workflow: {workflow-mode}** · Waiting init · Use `ec-init` to initialize
|
|
19
21
|
- Active task: > **Easy Coding** · **Approval: {approval-mode}** · **Workflow: {workflow-mode}** · `{current-task}` · `{workflow-state}`
|
|
20
22
|
- Handoff: > **Easy Coding** · **Approval: {approval-mode}** · **Workflow: {workflow-mode}** · `{current-task}` · `{workflow-state}` · Handoff -> `{source-agent}`
|
|
@@ -29,7 +31,7 @@ platform prefixes such as `/` or `$`. If no status line is injected, do not inve
|
|
|
29
31
|
- `/ec-brainstorming` — design exploration before building (hard design gate)
|
|
30
32
|
- `/ec-analysis` `/ec-implementing` `/ec-reviewing` `/ec-verification` — workflow stages
|
|
31
33
|
- `/ec-memory` — short/long memory archive
|
|
32
|
-
- `/ec-task-management` — task
|
|
34
|
+
- `/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
|
|
33
35
|
- `/ec-no-harness` — bypass only Easy Coding for the current session
|
|
34
36
|
- `/ec-git` — git discipline · `/ec-meta` — understand/customize the harness
|
|
35
37
|
|
|
@@ -41,8 +43,19 @@ First run `/ec-init`; daily work goes through `/ec-workflow`.
|
|
|
41
43
|
is session override > project `behavior.workflow_mode` > `adaptive`. Approval controls waiting;
|
|
42
44
|
workflow controls execution depth. ANALYSIS shows and freezes adaptive to fast/standard/strict.
|
|
43
45
|
Confirm approval waits only at ANALYSIS -> IMPLEMENT, then advances green later stages
|
|
44
|
-
automatically
|
|
45
|
-
|
|
46
|
+
automatically; Auto advances all legal green edges. A new code diff after the VERIFICATION
|
|
47
|
+
checkpoint is the only exceptional pause across all modes: show the exact diff, bind acceptance
|
|
48
|
+
to its digest, and continue without rereview when the user accepts.
|
|
49
|
+
Every new code task runs REVIEW; no mode changes scope, delivery form, or evidence gates.
|
|
50
|
+
- TDD is session override > project `behavior.tdd_enabled` > `false`; its changed-line threshold
|
|
51
|
+
is session override > project `behavior.tdd_coverage_threshold` > `90`. ANALYSIS -> IMPLEMENT
|
|
52
|
+
freezes both. TDD may be enabled only after `ec-tdd-init` records valid infrastructure readiness;
|
|
53
|
+
there is no enable-now/init-later state. The dedicated `tdd-init` task always freezes TDD off and
|
|
54
|
+
initializes only changed-line coverage infrastructure, never historical business-test coverage.
|
|
55
|
+
Disabled TDD adds no CI scan, JaCoCo work, commands, artifacts, or stronger gates. Enabled TDD
|
|
56
|
+
applies only to Java code tasks and requires lifecycle, review, passed local unit tests, and
|
|
57
|
+
local coverage for production lines changed since the task baseline. `ec-tdd-init` still
|
|
58
|
+
generates GitLab TEST-stage automation, but remote CI status is not Harness acceptance evidence.
|
|
46
59
|
- Confirmation-required edges use `pending_transition`; automatic edges use the restricted
|
|
47
60
|
`auto-transition` API. A read-only task creates no test-strategy.md, never enters REVIEW,
|
|
48
61
|
VERIFICATION, or MEMORY, and writes no task memory.
|
|
@@ -63,15 +76,35 @@ First run `/ec-init`; daily work goes through `/ec-workflow`.
|
|
|
63
76
|
only Easy Coding workflow/stage orchestration for this session. Continue honoring every
|
|
64
77
|
non-Easy-Coding skill, hook, and instruction. Do not clear or mutate the suspended task.
|
|
65
78
|
- ANALYSIS must follow template-first: read `.easy-coding/templates/dev-spec-skeleton.md` then
|
|
66
|
-
write its exact content to the task's dev-spec.md as the FIRST tool calls. Next inspect evidence
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
79
|
+
write its exact content to the task's dev-spec.md as the FIRST tool calls. Next inspect evidence,
|
|
80
|
+
set `decision_status: open`, ask every unresolved material decision, and progressively record
|
|
81
|
+
each confirmed answer and its evidence in `### 决策闭环`. Only after all material decisions are
|
|
82
|
+
resolved may the agent set the single `decision_status: closed`, finalize the artifacts, and
|
|
83
|
+
propose IMPLEMENT. The session presentation is a concise core-solution, acceptance, workflow,
|
|
84
|
+
and risk summary with an absolute local link/path to the full dev-spec.md; never paste the full
|
|
85
|
+
artifact by default. The final artifact contains neither `[阶段:ANALYSIS]` nor a
|
|
86
|
+
`待用户决策` section.
|
|
70
87
|
- REVIEW and VERIFICATION are fingerprinted hard gates. Review evidence must match the final
|
|
71
88
|
implementation; verification evidence must match final implementation and config. The frozen
|
|
72
89
|
workflow mode selects targeted, impacted, or full commands without weakening the green gate.
|
|
90
|
+
Freeze a verification checkpoint after green checks. Unchanged checkpoints follow approval
|
|
91
|
+
mode normally; post-checkpoint code drift requires exact digest acceptance and
|
|
92
|
+
carry-forward/targeted/waived verification policy, but never an automatic second REVIEW.
|
|
93
|
+
- Canonical-backed tasks bind static validity to design revision + `design_sha256`, while
|
|
94
|
+
`document_sha256` and `execution_revision` may advance through shared writer commands. Project-
|
|
95
|
+
external explicit Spec paths are allowed and may be repaired only with identity-checked rebind.
|
|
96
|
+
Runtime progress must use the shared writer with CAS/idempotency and reconciliation; static
|
|
97
|
+
design changes require revision + READY + `sync-spec-design`. Never hand-edit `EDS:EXECUTION`.
|
|
98
|
+
Selected source tasks remain `implemented` through local VERIFICATION and become `verified`
|
|
99
|
+
only when the accepted VERIFICATION -> MEMORY boundary is actually applied.
|
|
100
|
+
- Canonical routing is two-pass: first use manifest-only discovery for the current worktree, then
|
|
101
|
+
inspect only the explicitly selected task IDs and repositories. A remote-confirmed worktree
|
|
102
|
+
overrides a stale `path_hint`; never mirror the source Spec or re-check unselected repositories.
|
|
103
|
+
ANALYSIS reads the selected consumption closure once and treats exact/scope-unchanged as a fast
|
|
104
|
+
projection, while shared execution is the dependency fact source.
|
|
73
105
|
- MEMORY combines short-memory creation and the conditional long-memory gate. Entry follows the
|
|
74
|
-
effective confirmation mode;
|
|
106
|
+
effective confirmation mode; its checkpoint records any accepted post-verification diff digest
|
|
107
|
+
and decision. Once memory processing completes, COMPLETE is automatic.
|
|
75
108
|
- NO CODE-TASK COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE.
|
|
76
109
|
- All cross-platform modules (skills, hooks, references) must use universal agent protocols.
|
|
77
110
|
Do not rely on any specific agent's proprietary conventions unless the module is explicitly
|
|
@@ -80,15 +113,21 @@ First run `/ec-init`; daily work goes through `/ec-workflow`.
|
|
|
80
113
|
|
|
81
114
|
## Runtime contract
|
|
82
115
|
|
|
83
|
-
- Workflow state operations go through `{{platform_config_dir}}/hooks/easy_coding_state.py
|
|
84
|
-
|
|
85
|
-
`
|
|
116
|
+
- Workflow state operations go through `{{platform_config_dir}}/hooks/easy_coding_state.py` and
|
|
117
|
+
pass only the canonical owner ID `claude-code` to `--agent`; display attribution such as
|
|
118
|
+
`Claude with Easy Coding` is not a workflow identity. The installed script's embedded platform
|
|
119
|
+
identity, canonical owner, and injected session namespace must agree. Do not hand-edit session
|
|
120
|
+
files, `current_task`, task `status`, `stage_history`,
|
|
121
|
+
`pending_transition`, `verification_checkpoint`, workflow/TDD proposal or freeze fields,
|
|
122
|
+
`memory_progress`, or `last_agent`.
|
|
86
123
|
- The hook injects `[easy-coding:session-file:P]`; pass that path to the state script with
|
|
87
124
|
`--session-file <P>` when changing the current task or stage.
|
|
88
125
|
- Workflow session files live at `{{workflow_state_path}}`; the CLI only installs files and
|
|
89
126
|
creates the project-init task — agent skills perform all project analysis.
|
|
90
127
|
- Cross-repo references in git-tracked task artifacts use repo NAMES, never local paths.
|
|
91
128
|
Cache local paths only through the state script so they land on the current task.
|
|
129
|
+
- Shared Canonical writeback is a stage gate but not proof of Git commit/push, and Git delivery is
|
|
130
|
+
not proof of writeback. Keep those facts and scopes separate.
|
|
92
131
|
{{supermodule_boundary}}
|
|
93
132
|
|
|
94
133
|
<!-- ═══ end easy-coding-harness generated ═══ -->
|
|
@@ -18,6 +18,17 @@ complete exactly that unit. Your reply IS the return value, not a message to a h
|
|
|
18
18
|
context is in the card.
|
|
19
19
|
- Make no workflow stage-transition decisions; you do not know the state machine exists.
|
|
20
20
|
- Follow the coding rules and architecture context embedded in the card.
|
|
21
|
+
- Follow the task card's `Local Baseline`: match nearby naming, control flow, null/error handling,
|
|
22
|
+
layering, object modeling, method granularity, literal usage, and comment style unless a stated
|
|
23
|
+
correctness, security, requirement, or hard-rule reason requires a deviation.
|
|
24
|
+
- Treat the task card's `Code Comments` author value and field/member/constant rules as mandatory.
|
|
25
|
+
- Do not add generic defensive null checks, speculative abstractions/layers, fragmented one-use
|
|
26
|
+
micro-methods, or a constant that exists only to hold one getter return.
|
|
27
|
+
- Local, obvious magic values are allowed when they match surrounding code; create constants for
|
|
28
|
+
reuse, stable domain/config/protocol semantics, or established project convention.
|
|
29
|
+
- Every method and field in a new core Java class, and every added or materially modified method
|
|
30
|
+
or field in an existing core Java class, must have meaningful Javadoc; comment complex logic
|
|
31
|
+
where intent or constraints are not obvious.
|
|
21
32
|
- Treat acceptance criteria, test points, contracts, and risks in the card as required inputs.
|
|
22
33
|
- Run the exact targeted checks requested by the card and report their real outcome.
|
|
23
34
|
- Preserve each existing file's original encoding; never silently convert.
|
|
@@ -17,7 +17,12 @@ dimension named in your task card. Your reply IS the return value.
|
|
|
17
17
|
- correctness → does the implementation match the dev-spec requirement? edge cases,
|
|
18
18
|
null/empty handling, races, off-by-one.
|
|
19
19
|
- compliance → does the code obey the RULES sections in the card? naming, format, comment
|
|
20
|
-
language, error handling.
|
|
20
|
+
language, error handling, and the evidenced Local Baseline.
|
|
21
|
+
- Do not request defensive null checks, abstraction, constant extraction, or legacy-wide comment
|
|
22
|
+
cleanup solely as generic best practice. Flag unjustified local-style deviations, speculative
|
|
23
|
+
layers, fragmented one-use micro-methods, constants created only for a getter return, and
|
|
24
|
+
missing Javadoc on any method/field in a new core Java class or any added/materially modified
|
|
25
|
+
method/field in an existing core Java class.
|
|
21
26
|
- `error` means a demonstrated acceptance, contract, security, or build failure. Use `warning`
|
|
22
27
|
for a credible risk and `info` for non-blocking maintainability advice.
|
|
23
28
|
|
|
@@ -24,8 +24,15 @@
|
|
|
24
24
|
- 需求 vs 现有代码:[[EC_TODO:填写结果或“无冲突”]]
|
|
25
25
|
- Dev-Spec vs 现有代码:[[EC_TODO:填写结果或“无冲突”]]
|
|
26
26
|
|
|
27
|
+
### 决策闭环
|
|
28
|
+
decision_status: [[EC_TODO:仅当所有实质性问题均已解决并回填后写 closed]]
|
|
29
|
+
- **已解决问题与结论**:[[EC_TODO:逐项记录影响技术路线、接口、模型、状态、范围或验收的问题及最终结论;无则写“无”]]
|
|
30
|
+
- **确认依据**:[[EC_TODO:用户答复、冻结 Spec、现有代码证据或“无额外决策”]]
|
|
31
|
+
|
|
27
32
|
### Canonical Spec 来源
|
|
28
|
-
-
|
|
33
|
+
- **来源定位**:[[EC_TODO:非 Canonical 任务写“无”;否则填写 path、path_mode、spec_id 与 design revision]]
|
|
34
|
+
- **设计 / 文档摘要**:[[EC_TODO:非 Canonical 任务写“无”;否则填写 design_sha256、document_sha256]]
|
|
35
|
+
- **共享执行状态**:[[EC_TODO:非 Canonical 任务写“无”;否则填写 execution_revision、writeback 状态及是否需要 reconcile]]
|
|
29
36
|
- **选择任务 / 仓库**:[[EC_TODO:非 Canonical 任务写“无”;否则填写 selected task IDs 与 repo IDs]]
|
|
30
37
|
- **消费闭包**:[[EC_TODO:非 Canonical 任务写“无”;否则填写 contracts、direct dependencies、changes、steps、tests 摘要]]
|
|
31
38
|
- **基线与冲突**:[[EC_TODO:非 Canonical 任务写“无”;否则逐仓填写 exact/scope-unchanged/scope-drifted/baseline-unavailable 及处理结论]]
|