easy-coding-harness 1.1.0-beta.2 → 1.1.0-beta.3
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 +4 -2
- package/package.json +1 -1
- package/templates/common/skills/ec-analysis/SKILL.md +4 -2
- package/templates/common/skills/ec-memory/SKILL.md +48 -24
- package/templates/main-constraint/AGENTS.md.tpl +3 -2
- package/templates/main-constraint/CLAUDE.md.tpl +3 -2
- package/templates/runtime/memory/SHORT_MEMORY_TEMPLATE.md +21 -48
- package/templates/shared-hooks/easy_coding_state.py +0 -40
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,17 @@
|
|
|
6
6
|
- `y`:常规功能升级
|
|
7
7
|
- `z`:日常 bug 修复
|
|
8
8
|
|
|
9
|
+
## 1.1.0-beta.3
|
|
10
|
+
|
|
11
|
+
- MEMORY 以可复用开发知识为正文,提炼业务规则、设计原因、修改入口、适用边界与真实踩坑经验;
|
|
12
|
+
短期记忆写出后即可用于后续开发,没有新增知识时明确记录无新增,不拼凑验收报告。
|
|
13
|
+
- 精简短期记忆模板,移除执行流水、审批、指纹、单次测试统计与无价值内容清单;验收证据保留在
|
|
14
|
+
原任务日志,通过来源引用追溯,不再要求向记忆全文复制验收字段。
|
|
15
|
+
- 普通与派发协作复用已有方案、实施和 Review 结论完成沉淀,不增加报告、仓库扫描或验证轮次;
|
|
16
|
+
分析优先读取命中的知识摘要,长期蒸馏过滤历史过程噪声。
|
|
17
|
+
- 升级保留历史记忆与用户模板,新 MEMORY 指令优先于旧模板中的过程栏目;schema 2、归属与
|
|
18
|
+
完整性校验、滑动窗口及验收流程保持兼容。
|
|
19
|
+
|
|
9
20
|
## 1.1.0-beta.2
|
|
10
21
|
|
|
11
22
|
- 新增 `cooperate_mode: default | dispatch`,支持用户手动派发实现和 QUALITY 内修复,主 Agent
|
package/README.md
CHANGED
|
@@ -102,7 +102,9 @@ any stage --[user abort via ec-task-close]--> CLOSED
|
|
|
102
102
|
`diff_sha256`。用户确认后不重跑 Review Gate:纯非执行差异可沿用
|
|
103
103
|
原验证,可执行差异补定向验证,显式风险豁免单独记录。配置、方案或 Canonical 设计漂移
|
|
104
104
|
不能走这条例外。
|
|
105
|
-
- `MEMORY`
|
|
105
|
+
- `MEMORY` 提炼可直接用于后续开发的知识:业务规则、设计原因、修改入口、适用边界与踩坑经验。
|
|
106
|
+
复用已有方案、实施和 Review 结论,验收及过程证据留在任务日志,记忆只引用来源;没有新增
|
|
107
|
+
可复用知识时简短注明,不拼凑报告。短期记忆超过阈值才归并长期知识,否则长期沉淀为 no-op。
|
|
106
108
|
- `ec-lite` 仅由用户显式启停,不是 Fast 的别名。它只保留“紧凑方案 → 用户确认 → 最小实现”,
|
|
107
109
|
不创建任务、Dev-Spec、QUALITY 或 MEMORY;存在活动任务时由用户选择取消启动、关闭任务后
|
|
108
110
|
启动,或只清除当前任务指针后启动。活动任务决策使用 session 级原子锁;每次方案生成一次性
|
|
@@ -174,7 +176,7 @@ Dev-Spec 继续走原有整文分析流程。
|
|
|
174
176
|
| `ec-analysis` | 生成 dev-spec、执行计划和测试策略 |
|
|
175
177
|
| `ec-implementing` | 按确认后的计划执行代码实现;非 TDD 不运行质量命令 |
|
|
176
178
|
| `ec-quality` | 编排 Review/Verification 双门、证据复用和一次性 Repair Bundle |
|
|
177
|
-
| `ec-memory` |
|
|
179
|
+
| `ec-memory` | 提炼可复用开发知识,超过阈值时归并长期记忆 |
|
|
178
180
|
| `ec-task-management` | 任务面板:查看、创建、选择、恢复、交接任务 |
|
|
179
181
|
| `ec-config` | 只读查看或显式修改项目/session 的 Approval、Workflow、单测策略与阈值 |
|
|
180
182
|
| `ec-tdd-init` | 为 UT/TDD 初始化/刷新 Java changed-line coverage 基础设施,不补存量单测 |
|
package/package.json
CHANGED
|
@@ -15,9 +15,11 @@ Communicate with the user in the user's language.
|
|
|
15
15
|
|
|
16
16
|
1. Read task.json, SOUL, RULES index/headings, ABSTRACT index/headings, and the dev-spec
|
|
17
17
|
skeleton.
|
|
18
|
-
2. Search short-memory frontmatter and summaries first. Open only memories whose domains,
|
|
18
|
+
2. Search short-memory frontmatter and knowledge summaries first. Open only memories whose domains,
|
|
19
19
|
tags, related files, or predecessor links match this task. Do not load the newest five
|
|
20
|
-
memories unconditionally.
|
|
20
|
+
memories unconditionally. Skip `memory_value: none` during knowledge retrieval. For legacy
|
|
21
|
+
reports, read the matching reusable decisions or pitfalls; consult acceptance/process records
|
|
22
|
+
only when the current task needs that history, not as default development context.
|
|
21
23
|
3. Read full RULES/ABSTRACT sections only for affected modules.
|
|
22
24
|
4. Inspect concrete code paths and tests. Expand context only when evidence reveals another
|
|
23
25
|
dependency or risk.
|
|
@@ -1,27 +1,55 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: ec-memory
|
|
3
|
-
description: MEMORY-stage skill.
|
|
3
|
+
description: MEMORY-stage skill. Extracts reusable development knowledge from existing task evidence and performs conditional long-memory distillation.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# ec-memory —
|
|
6
|
+
# ec-memory — reusable knowledge for future development
|
|
7
7
|
|
|
8
8
|
MEMORY remains mandatory for code tasks. Daily task processing and architecture maintenance are
|
|
9
9
|
separate responsibilities: every completed code task produces one immutable short-memory fact;
|
|
10
10
|
only a long-memory distillation, or the explicit missing-ABSTRACT startup exception, may open an
|
|
11
11
|
architecture assessment. Never update architecture merely because MEMORY was entered.
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
`execution.jsonl
|
|
16
|
-
`backfill` or `update` architecture assessment.
|
|
13
|
+
MEMORY must not re-analyze the repository or repeat the entire conversation. Reuse confirmed
|
|
14
|
+
decisions and verified findings already available in `dev-spec.md`, implementation results and
|
|
15
|
+
Review evidence in `execution.jsonl`; `task.json` supplies identity and frozen mode. The bounded
|
|
16
|
+
repository reads below belong only to a required `backfill` or `update` architecture assessment.
|
|
17
|
+
|
|
18
|
+
## Knowledge value
|
|
19
|
+
|
|
20
|
+
A short memory is directly usable knowledge, not an acceptance report. Keep a fact when it helps
|
|
21
|
+
a later task understand behavior, choose the right change, diagnose a failure, or verify correctly.
|
|
22
|
+
|
|
23
|
+
- Lead with a knowledge topic and a retrieval summary, not a version release or task-completion
|
|
24
|
+
headline. Prefer business semantics, design reasons, relevant code entrypoints, compatibility
|
|
25
|
+
boundaries, and observed failure causes with their fixes.
|
|
26
|
+
- State the applicable situation and useful conclusion. Include reasons, limitations and exact
|
|
27
|
+
symbols or source references where they help the next developer; do not fill a fixed checklist
|
|
28
|
+
for every fact. Preserve only confirmed conclusions, and keep task-specific scope constraints
|
|
29
|
+
scoped to that task rather than turning them into permanent project rules.
|
|
30
|
+
- Leave acceptance records in `execution.jsonl`; cite the relevant source instead of copying it.
|
|
31
|
+
Omit approval JSON, fingerprints, execution timelines, test counts, per-run coverage numbers,
|
|
32
|
+
temporary log paths, file inventories and handoff history. Do not add a list of excluded noise.
|
|
33
|
+
A reusable verification command or environment constraint belongs here only when it guides
|
|
34
|
+
future work; a single run's pass/fail and UT/TDD lifecycle evidence stay in the task record.
|
|
35
|
+
- When no new reusable knowledge exists, set `memory_value: none` and `target_long: NONE`, write
|
|
36
|
+
a brief reason and retain the source reference. Do not manufacture lessons or duplicate existing
|
|
37
|
+
knowledge merely to populate sections. This still completes the mandatory short-memory step.
|
|
38
|
+
|
|
39
|
+
For example, preserve that a cache write may return a failure code without throwing, why proceeding
|
|
40
|
+
with an unpersisted local value breaks shared counting, and where to bypass that behavior. A count
|
|
41
|
+
of passing tests and the user's acceptance timestamp do not teach a future task how to handle it.
|
|
42
|
+
|
|
43
|
+
Both `default` and `dispatch` use this contract. The coordinator reuses the analysis, implementation
|
|
44
|
+
results and Review findings already available. Reuse any executor-only discovery from its existing
|
|
45
|
+
result; do not require another report, another handoff, or repeated checks for MEMORY.
|
|
17
46
|
|
|
18
47
|
## Depth by workflow mode
|
|
19
48
|
|
|
20
|
-
- `fast`:
|
|
21
|
-
|
|
22
|
-
- `
|
|
23
|
-
|
|
24
|
-
needed for future high-risk work.
|
|
49
|
+
- `fast`: keep the directly reusable conclusions concise.
|
|
50
|
+
- `standard`: include relevant contract, compatibility, and troubleshooting reasons when present.
|
|
51
|
+
- `strict`: retain non-obvious architecture, migration and cross-module boundaries needed by
|
|
52
|
+
future changes. Greater depth never requires process logs, more checks, or invented knowledge.
|
|
25
53
|
|
|
26
54
|
Every memory uses schema 2 and includes `workflow_mode` in frontmatter. Generate its UUIDv7 ID
|
|
27
55
|
through:
|
|
@@ -33,22 +61,18 @@ through:
|
|
|
33
61
|
Name it `{memory_id}_{YYYYMMDD}_{smart_name}.md` and set
|
|
34
62
|
`source_task: {current task id, exact}`. Write one immutable short memory under
|
|
35
63
|
`.easy-coding/memory/short/`, then register it with
|
|
36
|
-
`memory-short-complete`.
|
|
64
|
+
`memory-short-complete`. Task ownership and content integrity remain runtime checks; acceptance
|
|
65
|
+
and Canonical evidence remain in their existing records, not duplicated in the memory body.
|
|
37
66
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
`memory-short-complete` rejects a checkpoint that omits any of those decision fields. This records
|
|
42
|
-
the user's accepted exception without re-reviewing or re-analyzing the code. Canonical writeback
|
|
43
|
-
already carries the same digest and authorization as shared `acceptance` evidence.
|
|
44
|
-
|
|
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.
|
|
67
|
+
Upgrades preserve existing project templates. These instructions take precedence over legacy
|
|
68
|
+
process sections in `SHORT_MEMORY_TEMPLATE.md`; omit those sections when writing a new memory.
|
|
69
|
+
Do not rewrite old memories or user templates to adopt this contract.
|
|
48
70
|
|
|
49
71
|
Ask the state API for `memory-instruction`. Distill only when it returns `action:distill`;
|
|
50
|
-
otherwise record `no-op`. Long memory
|
|
51
|
-
|
|
72
|
+
otherwise record `no-op`. Long memory merges reusable facts, deduplicates matching knowledge and
|
|
73
|
+
retires superseded conclusions. Extract useful knowledge from legacy acceptance reports without
|
|
74
|
+
carrying over process noise; `memory_value: none` contributes no long-memory topic. Work only
|
|
75
|
+
within the frozen candidates and matching topics, without a global history cleanup.
|
|
52
76
|
|
|
53
77
|
## Architecture assessment
|
|
54
78
|
|
|
@@ -125,8 +125,9 @@ First run `ec-init`; daily work goes through `ec-workflow`.
|
|
|
125
125
|
ANALYSIS reads the selected consumption closure once and treats exact/scope-unchanged as a fast
|
|
126
126
|
projection, while shared execution is the dependency fact source.
|
|
127
127
|
- MEMORY combines short-memory creation and the conditional long-memory gate. Entry follows the
|
|
128
|
-
effective confirmation mode
|
|
129
|
-
and
|
|
128
|
+
effective confirmation mode. Record reusable development knowledge and source references;
|
|
129
|
+
acceptance digests and process evidence stay in task records. Do not add reports or repeated
|
|
130
|
+
checks for memory. Once memory processing completes, COMPLETE is automatic.
|
|
130
131
|
- NO CODE-TASK COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE.
|
|
131
132
|
- All cross-platform modules (skills, hooks, references) must use universal agent protocols.
|
|
132
133
|
Do not rely on any specific agent's proprietary conventions unless the module is explicitly
|
|
@@ -123,8 +123,9 @@ First run `/ec-init`; daily work goes through `/ec-workflow`.
|
|
|
123
123
|
ANALYSIS reads the selected consumption closure once and treats exact/scope-unchanged as a fast
|
|
124
124
|
projection, while shared execution is the dependency fact source.
|
|
125
125
|
- MEMORY combines short-memory creation and the conditional long-memory gate. Entry follows the
|
|
126
|
-
effective confirmation mode
|
|
127
|
-
and
|
|
126
|
+
effective confirmation mode. Record reusable development knowledge and source references;
|
|
127
|
+
acceptance digests and process evidence stay in task records. Do not add reports or repeated
|
|
128
|
+
checks for memory. Once memory processing completes, COMPLETE is automatic.
|
|
128
129
|
- NO CODE-TASK COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE.
|
|
129
130
|
- All cross-platform modules (skills, hooks, references) must use universal agent protocols.
|
|
130
131
|
Do not rely on any specific agent's proprietary conventions unless the module is explicitly
|
|
@@ -11,14 +11,12 @@ domain:
|
|
|
11
11
|
tags:
|
|
12
12
|
- "{keyword}"
|
|
13
13
|
related_files:
|
|
14
|
-
- "{
|
|
15
|
-
commit: none
|
|
16
|
-
verification: passed | partial | not_run
|
|
14
|
+
- "{entrypoint or file useful for applying this knowledge}"
|
|
17
15
|
memory_value: business | technical | both | none
|
|
18
16
|
target_long: BUSINESS | TECHNICAL | BOTH | NONE
|
|
19
17
|
---
|
|
20
18
|
|
|
21
|
-
#
|
|
19
|
+
# {Reusable knowledge topic}
|
|
22
20
|
|
|
23
21
|
> This template defines the format for files under `.easy-coding/memory/short/`.
|
|
24
22
|
> File naming convention: `{memory_id}_{YYYYMMDD}_{smart_name}.md`
|
|
@@ -26,57 +24,32 @@ target_long: BUSINESS | TECHNICAL | BOTH | NONE
|
|
|
26
24
|
> both the filename prefix and this frontmatter `id`. The UUIDv7 id is safe for concurrent agents.
|
|
27
25
|
> Keep `smart_name` as the readable summary suffix.
|
|
28
26
|
> `source_task` must exactly match the current workflow task id from `task.json`.
|
|
29
|
-
> Short memories are immutable
|
|
30
|
-
>
|
|
31
|
-
> When short memories reach the threshold (default 10), the newest 5 are kept as recent
|
|
27
|
+
> Short memories are immutable and directly useful for later development before distillation.
|
|
28
|
+
> When short memories exceed the threshold (default 10), the newest 5 are kept as recent
|
|
32
29
|
> context; older entries are distillation candidates for long-term memory.
|
|
33
30
|
> Sorting: by frontmatter `date` ascending, then by frontmatter `id`, then by filename. Legacy
|
|
34
31
|
> `SM-YYYYMMDD-NNN` ids sort before UUIDv7 ids on the same date for upgrade compatibility.
|
|
35
32
|
|
|
36
|
-
##
|
|
33
|
+
## Knowledge Summary
|
|
37
34
|
|
|
38
|
-
|
|
39
|
-
- Scope: {modules, pages, interfaces, or files involved}
|
|
40
|
-
- Result: {completed / partially completed / not completed, with reasons}
|
|
41
|
-
- Key Constraints: {encoding, compatibility, interface, spec, or user-specified constraints; "none" if none}
|
|
42
|
-
- Workflow Mode: {frozen mode and why it was selected or escalated}
|
|
35
|
+
{When this knowledge is useful and the main conclusion a future developer should find.}
|
|
43
36
|
|
|
44
|
-
##
|
|
37
|
+
## Reusable Knowledge
|
|
45
38
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
| Commit Info | {commit hash; "none" if not committed} |
|
|
39
|
+
{Write only confirmed facts with future reuse value. Use natural paragraphs or bullets; omit
|
|
40
|
+
inapplicable categories rather than filling a checklist. Useful material includes business rules,
|
|
41
|
+
design reasons, change entrypoints, compatibility boundaries, and failure causes with their fixes.
|
|
42
|
+
Add applicable conditions, necessary reasons and exact symbols where they guide the next change.
|
|
43
|
+
Do not promote a task-specific restriction into a permanent project rule.}
|
|
52
44
|
|
|
53
|
-
##
|
|
45
|
+
## Sources
|
|
54
46
|
|
|
55
|
-
|
|
47
|
+
- {Relevant dev-spec section, implementation result or Review finding; reference instead of copying.}
|
|
48
|
+
- {Related memory or existing knowledge topic, only when useful.}
|
|
56
49
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
## Technical Memory Candidates
|
|
64
|
-
|
|
65
|
-
> Only record engineering facts with future reuse value. Write "none" if none.
|
|
66
|
-
|
|
67
|
-
- Architecture / Interface Decisions: {module boundaries, dependency direction, interface contracts}
|
|
68
|
-
- Engineering Rules / Workflows: {coding, commit, release, installation, directory boundaries}
|
|
69
|
-
- Implementation Patterns / Reusable Approaches: {recommended approaches, fallback strategies, compatibility patterns}
|
|
70
|
-
- Pitfalls / Fix Strategies: {root cause, fix approach, verification method}
|
|
71
|
-
- Verification Experience: {test commands, environment constraints, acceptance paths}
|
|
72
|
-
|
|
73
|
-
## Non-Distillation Content
|
|
74
|
-
|
|
75
|
-
> Content that should NOT enter long-term memory, with reasons — prevents accidental absorption of noise.
|
|
76
|
-
|
|
77
|
-
- {routine file lists / temp logs / one-time data / non-reusable implementation details; "none" if none}
|
|
78
|
-
|
|
79
|
-
## Related Memories
|
|
80
|
-
|
|
81
|
-
- Predecessor: {related short memory id, long-term topic, or "none"}
|
|
82
|
-
- Successor: {follow-up task; "none" if none}
|
|
50
|
+
> Authoring guidance, not memory content: remove these instructions and unused placeholders.
|
|
51
|
+
> If nothing new is reusable, set `memory_value: none` and `target_long: NONE`, give a brief reason
|
|
52
|
+
> in Knowledge Summary and retain Sources; omit Reusable Knowledge rather than inventing lessons.
|
|
53
|
+
> Leave task status, approvals, fingerprints, test statistics and temporary logs in task records.
|
|
54
|
+
> Keep a verification command only when it teaches a reusable method or environment requirement.
|
|
55
|
+
> Do not include an acceptance report or a list of excluded noise.
|
|
@@ -10460,46 +10460,6 @@ def memory_short_complete(
|
|
|
10460
10460
|
memory_file.strip(),
|
|
10461
10461
|
require_current_id=True,
|
|
10462
10462
|
)
|
|
10463
|
-
acceptance = latest_acceptance_record(root, resolved_task_id, task)
|
|
10464
|
-
if isinstance(acceptance, dict) and acceptance.get("changed_files"):
|
|
10465
|
-
try:
|
|
10466
|
-
memory_text = resolved_memory_path.read_text(encoding="utf-8")
|
|
10467
|
-
except (OSError, UnicodeError) as exc:
|
|
10468
|
-
raise StateError(f"Cannot read short-memory file: {resolved_memory_path}") from exc
|
|
10469
|
-
required_decision_fields = {
|
|
10470
|
-
"diff_sha256": str(acceptance.get("diff_sha256") or ""),
|
|
10471
|
-
"authorization": str(acceptance.get("authorization") or ""),
|
|
10472
|
-
"approval_mode": str(acceptance.get("approval_mode") or ""),
|
|
10473
|
-
"review_policy": str(acceptance.get("review_policy") or ""),
|
|
10474
|
-
"verification_policy": str(acceptance.get("verification_policy") or ""),
|
|
10475
|
-
"summary": str(acceptance.get("summary") or ""),
|
|
10476
|
-
}
|
|
10477
|
-
missing_decision_fields = [
|
|
10478
|
-
field_name
|
|
10479
|
-
for field_name, value in required_decision_fields.items()
|
|
10480
|
-
if not value or value not in memory_text
|
|
10481
|
-
]
|
|
10482
|
-
missing_changed_files = [
|
|
10483
|
-
str(file_name)
|
|
10484
|
-
for file_name in acceptance.get("changed_files", [])
|
|
10485
|
-
if not is_non_empty_string(file_name) or str(file_name) not in memory_text
|
|
10486
|
-
]
|
|
10487
|
-
missing_targeted_tasks = [
|
|
10488
|
-
str(source_task_id)
|
|
10489
|
-
for source_task_id in acceptance.get("required_targeted_source_tasks", [])
|
|
10490
|
-
if not is_non_empty_string(source_task_id)
|
|
10491
|
-
or str(source_task_id) not in memory_text
|
|
10492
|
-
]
|
|
10493
|
-
if missing_decision_fields or missing_changed_files or missing_targeted_tasks:
|
|
10494
|
-
missing_labels = [
|
|
10495
|
-
*missing_decision_fields,
|
|
10496
|
-
*(f"changed_file:{file_name}" for file_name in missing_changed_files),
|
|
10497
|
-
*(f"targeted_source_task:{task_name}" for task_name in missing_targeted_tasks),
|
|
10498
|
-
]
|
|
10499
|
-
raise StateError(
|
|
10500
|
-
"Short memory must record the complete accepted post-quality decision; "
|
|
10501
|
-
"missing: " + ", ".join(missing_labels)
|
|
10502
|
-
)
|
|
10503
10463
|
progress = task.get("memory_progress")
|
|
10504
10464
|
if not isinstance(progress, dict):
|
|
10505
10465
|
progress = {}
|