easy-coding-harness 0.1.8 → 0.3.0
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 +120 -0
- package/README.md +109 -135
- package/dist/cli.js +1218 -282
- package/dist/cli.js.map +1 -1
- package/package.json +10 -1
- package/templates/claude/agents/ec-implementer.md +1 -1
- package/templates/claude/agents/ec-reviewer.md +1 -1
- package/templates/common/bundled-skills/ec-init/SKILL.md +174 -0
- package/templates/common/bundled-skills/ec-init/references/memory-migration.md +87 -0
- package/templates/common/bundled-skills/ec-meta/SKILL.md +5 -2
- package/templates/common/bundled-skills/ec-meta/references/customize-local/README.md +2 -1
- package/templates/common/bundled-skills/ec-meta/references/local-architecture/README.md +14 -11
- package/templates/common/bundled-skills/ec-meta/references/platform-files/README.md +8 -4
- package/templates/common/skills/ec-analysis/SKILL.md +111 -130
- package/templates/common/skills/ec-brainstorming/SKILL.md +1 -1
- package/templates/common/skills/ec-git/SKILL.md +10 -10
- package/templates/common/skills/ec-implementing/SKILL.md +31 -24
- package/templates/common/skills/ec-memory/SKILL.md +41 -16
- package/templates/common/skills/ec-reviewing/SKILL.md +1 -1
- package/templates/common/skills/ec-task-close/SKILL.md +4 -3
- package/templates/common/skills/ec-task-management/SKILL.md +9 -24
- package/templates/common/skills/ec-verification/SKILL.md +10 -4
- package/templates/common/skills/ec-workflow/SKILL.md +48 -17
- package/templates/main-constraint/AGENTS.md.tpl +16 -3
- package/templates/main-constraint/CLAUDE.md.tpl +16 -3
- package/templates/runtime/memory/SHORT_MEMORY_TEMPLATE.md +75 -0
- package/templates/runtime/memory/long/BUSINESS.md +42 -9
- package/templates/runtime/memory/long/MEMORY.md +37 -2
- package/templates/runtime/memory/long/TECHNICAL.md +45 -1
- package/templates/runtime/templates/dev-spec-skeleton.md +80 -0
- package/templates/shared-hooks/easy_coding_state.py +610 -0
- package/templates/shared-hooks/easy_coding_status.py +72 -81
- package/templates/shared-hooks/inject-subagent-context.py +5 -12
- package/templates/shared-hooks/inject-workflow-state.py +2 -1
- package/templates/shared-hooks/session-start.py +2 -1
- package/templates/common/skills/ec-init/SKILL.md +0 -96
|
@@ -13,32 +13,17 @@ Communicate with the user in the user's language.
|
|
|
13
13
|
## Capabilities
|
|
14
14
|
|
|
15
15
|
### List tasks
|
|
16
|
-
|
|
17
|
-
`
|
|
18
|
-
|
|
19
|
-
nothing.
|
|
16
|
+
Call the state API:
|
|
17
|
+
`{{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py list-tasks`.
|
|
18
|
+
Show each task's id, title, status, created_at, and whether it is active. This is read-only.
|
|
20
19
|
|
|
21
20
|
### Create a task
|
|
22
|
-
Create
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
"status": "INIT",
|
|
29
|
-
"created_at": "<ISO 8601>",
|
|
30
|
-
"created_by": "<agent id>",
|
|
31
|
-
"context": {},
|
|
32
|
-
"spawned_from": null,
|
|
33
|
-
"spawned_tasks": [],
|
|
34
|
-
"closed_reason": null,
|
|
35
|
-
"repos": []
|
|
36
|
-
}
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
Only set `current_task`/`current_stage` in state.json if the user explicitly wants to start
|
|
40
|
-
the task now — otherwise leave the workflow state untouched and tell them to run
|
|
41
|
-
`{{skill_trigger}}ec-workflow` when ready.
|
|
21
|
+
Create through the state API, never by hand-editing `task.json` or session files:
|
|
22
|
+
`{{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py create-task --session-file <P> --task-id <MM-DD-short-name> --type <feature|bugfix|refactor|perf> --title "<one-line summary>" --agent <agent-id> --no-set-current`.
|
|
23
|
+
|
|
24
|
+
If the user explicitly wants to start the task now, omit `--no-set-current`; otherwise leave
|
|
25
|
+
the current workflow pointer untouched and tell them to run `{{skill_trigger}}ec-workflow`
|
|
26
|
+
when ready.
|
|
42
27
|
|
|
43
28
|
## Boundaries
|
|
44
29
|
|
|
@@ -75,9 +75,15 @@ change formally returns to IMPLEMENT and re-walks REVIEW → VERIFICATION.
|
|
|
75
75
|
## 5. Archive flow (only after acceptance)
|
|
76
76
|
|
|
77
77
|
Runs automatically once the user accepts:
|
|
78
|
-
1. MEMORY_SHORT —
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
78
|
+
1. MEMORY_SHORT — call
|
|
79
|
+
`{{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py transition --session-file <P> --stage MEMORY_SHORT --agent <agent-id>`,
|
|
80
|
+
then hand control to ec-memory to write the short memory entry.
|
|
81
|
+
2. MEMORY_LONG — after MEMORY_SHORT returns, call
|
|
82
|
+
`{{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py transition --session-file <P> --stage MEMORY_LONG --agent <agent-id>`,
|
|
83
|
+
then hand control to ec-memory to distill long memory or perform its no-op gate.
|
|
84
|
+
3. COMPLETE — after MEMORY_LONG returns, call
|
|
85
|
+
`{{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py transition --session-file <P> --stage COMPLETE --agent <agent-id>`,
|
|
86
|
+
which clears session `current_task` for the completed task. Then output the task summary
|
|
87
|
+
(what was done, files changed, key decisions).
|
|
82
88
|
|
|
83
89
|
Hand control back to ec-workflow at each transition; ec-workflow owns the stage writes.
|
|
@@ -18,14 +18,19 @@ replies are English.
|
|
|
18
18
|
- Missing → tell the user to run the `easy-coding init` CLI first. Stop.
|
|
19
19
|
- `status != "COMPLETE"` → tell the user to run `{{skill_trigger}}ec-init` first. Stop.
|
|
20
20
|
Do not perform project initialization yourself; that is ec-init's job.
|
|
21
|
+
- `[easy-coding:upgrade-init-pending:X]` in breadcrumbs → tell the user: "Harness upgraded
|
|
22
|
+
to vX. Running `{{skill_trigger}}ec-init` is recommended to adapt project knowledge and
|
|
23
|
+
complete migration. You can skip and start working — the reminder will persist until
|
|
24
|
+
ec-init runs." Do NOT stop. Proceed with normal startup.
|
|
21
25
|
2. **Required reading** (cheap, always):
|
|
22
26
|
- `.easy-coding/SOUL.md` — project identity and dialogue standards; obey for the session.
|
|
23
27
|
- `.easy-coding/RULES.md` — coding rules; re-checked before every write.
|
|
24
28
|
- Latest 5 entries in `.easy-coding/memory/short/` — recent task context.
|
|
25
29
|
Do NOT bulk-read ABSTRACT.md or long memory here; ec-analysis loads them on demand.
|
|
26
30
|
3. **State check + Intent routing.** Read the hook-injected breadcrumbs (`[current-task:X]`,
|
|
27
|
-
`[workflow-state:Y]`) to determine the active task
|
|
28
|
-
whether the user's message carries a
|
|
31
|
+
`[workflow-state:Y]`, `[easy-coding:session-file:P]`) to determine the active task,
|
|
32
|
+
stage, and session file, then decide based on whether the user's message carries a
|
|
33
|
+
task-related prompt beyond the bare skill trigger.
|
|
29
34
|
|
|
30
35
|
**No prompt (bare trigger):**
|
|
31
36
|
- `current_task` set with an active stage → resume that stage (see Resume and handoff).
|
|
@@ -53,9 +58,10 @@ replies are English.
|
|
|
53
58
|
directly (step 4).
|
|
54
59
|
|
|
55
60
|
4. **New task.** When creating a task (from step 3), create
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
61
|
+
the task through the state API, which creates `task.json`, sets `status:"INIT"`, writes
|
|
62
|
+
`stage_history`, and sets the session `current_task`:
|
|
63
|
+
`{{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py create-task --session-file <P> --task-id <MM-DD-task-slug> --type <type> --title "<one-line summary>" --agent <agent-id>`.
|
|
64
|
+
Then enter INIT.
|
|
59
65
|
|
|
60
66
|
## State machine
|
|
61
67
|
|
|
@@ -72,22 +78,28 @@ any stage --[user abort via ec-task-close]--> CLOSED
|
|
|
72
78
|
|
|
73
79
|
| Stage | Owner skill | What happens | Exit condition |
|
|
74
80
|
|---|---|---|---|
|
|
75
|
-
| INIT | ec-workflow | collect context, settle
|
|
81
|
+
| INIT | ec-workflow | collect context, settle scope AND delivery form (change code vs. produce a document) | task understood |
|
|
76
82
|
| ANALYSIS | ec-analysis | dev-spec + execution plan + test strategy | analysis presented |
|
|
77
83
|
| WAITING_CONFIRM | ec-workflow | blocking gate; user reviews the plan | explicit user confirmation |
|
|
78
84
|
| IMPLEMENT | ec-implementing | code changes per confirmed plan | all units done |
|
|
79
85
|
| REVIEW | ec-reviewing | multi-dimension code review | verdict = accept |
|
|
80
86
|
| VERIFICATION | ec-verification | hard gate: lint/typecheck/test + coverage | all pass AND user accepts |
|
|
81
87
|
| MEMORY_SHORT | ec-memory | archive: short memory entry | written |
|
|
82
|
-
| MEMORY_LONG | ec-memory | archive: long memory distillation |
|
|
88
|
+
| MEMORY_LONG | ec-memory | archive: long memory distillation (conditional — no-op when short memory is under threshold) | state API `memory_long` instruction handled |
|
|
83
89
|
| COMPLETE | ec-workflow | clear current_task, set task status, summary | terminal |
|
|
84
90
|
| CLOSED | ec-task-close | user abort; no memory flow | terminal |
|
|
85
91
|
|
|
92
|
+
> **INIT delivery-form rule.** When creating the task, `type` and `title` must faithfully
|
|
93
|
+
> reflect the delivery form implied by the user's request. A refactor/fix/feature is a CODE
|
|
94
|
+
> task; do not record it as an analysis/report task. Do not let ANALYSIS later re-interpret a
|
|
95
|
+
> code task into a documentation-only task — that is a downgrade (see ec-analysis HARD RULE 5).
|
|
96
|
+
|
|
86
97
|
## Task switching
|
|
87
98
|
|
|
88
99
|
When the user confirms switching from task A to task B:
|
|
89
100
|
1. Task A's status is already persisted in its `task.json` — nothing extra to save.
|
|
90
|
-
2. Set
|
|
101
|
+
2. Set the current task through the state API:
|
|
102
|
+
`{{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py set-current --session-file <P> --task-id <task-b-id> --agent <agent-id>`.
|
|
91
103
|
3. Read task B's `task.json` to determine its current stage.
|
|
92
104
|
4. Resume task B's stage via the appropriate stage skill.
|
|
93
105
|
|
|
@@ -100,13 +112,24 @@ routing matches, and switching happens again.
|
|
|
100
112
|
- **Never skip a stage.** ANALYSIS cannot jump to VERIFICATION; IMPLEMENT cannot start before
|
|
101
113
|
WAITING_CONFIRM passes. No exception for "simple" tasks — simple tasks have short analyses,
|
|
102
114
|
not skipped ones.
|
|
115
|
+
- **ANALYSIS entry gate.** When entering ANALYSIS, your FIRST TWO tool calls must be:
|
|
116
|
+
(1) Read `.easy-coding/templates/dev-spec-skeleton.md`, then (2) Write its exact content
|
|
117
|
+
to the task's dev-spec.md. This is a mechanical copy, not a generation task. Do not read
|
|
118
|
+
code, load memory, or analyze before the skeleton is on disk. This is ec-analysis
|
|
119
|
+
HARD RULE 1 — violating it means the analysis has failed. Your reply to the user must
|
|
120
|
+
be the complete dev-spec.md content, not a summary or custom format.
|
|
121
|
+
Additionally, ANALYSIS must stay faithful to the user's delivery form — it may NOT downgrade
|
|
122
|
+
a code task to a report-only task — and the 改动范围 table must list only real project code,
|
|
123
|
+
never `.easy-coding/` harness artifacts (ec-analysis HARD RULES 5 and 6).
|
|
103
124
|
- **WAITING_CONFIRM is a real gate.** Proceed only on explicit user confirmation of BOTH the
|
|
104
125
|
analysis conclusion and the test strategy. Silence, enthusiasm, or a topic change is not
|
|
105
126
|
confirmation. Sole exception: `behavior.auto_mode: true` in `.easy-coding/config.yaml`
|
|
106
|
-
AND the user asked for autonomous execution.
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
127
|
+
AND the user asked for autonomous execution. `auto_mode` ONLY waives this confirmation step;
|
|
128
|
+
it carries NO scope or delivery-form decision. Never cite `auto_mode` (or "the user already
|
|
129
|
+
decided in INIT") to justify narrowing scope or downgrading a code task to a report.
|
|
130
|
+
- **On every transition** call the state API immediately (not at turn end):
|
|
131
|
+
`{{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py transition --session-file <P> --stage <STAGE> --agent <agent-id>`.
|
|
132
|
+
Do not hand-edit `status`, `stage_history`, `last_agent`, `current_task`, or session files.
|
|
110
133
|
- **Hook enforcement.** The `inject-workflow-state` hook validates every stage transition
|
|
111
134
|
against the state machine. If you see `[ILLEGAL-TRANSITION:...]` in the injected context,
|
|
112
135
|
you MUST revert the task's status to the previous valid stage and explain why the
|
|
@@ -120,14 +143,21 @@ routing matches, and switching happens again.
|
|
|
120
143
|
- **Task switching is allowed at any stage.** The suspended task retains its stage in
|
|
121
144
|
task.json. Do not run memory flows for suspended tasks — only completed tasks get archived.
|
|
122
145
|
- **Archive only after user acceptance.** VERIFICATION passing does not complete the task.
|
|
123
|
-
After the user accepts,
|
|
124
|
-
|
|
125
|
-
|
|
146
|
+
After the user accepts, call state API transitions in order:
|
|
147
|
+
MEMORY_SHORT → MEMORY_LONG → COMPLETE. Do not jump directly from VERIFICATION to COMPLETE.
|
|
148
|
+
When transitioning to MEMORY_LONG, pass the state API snapshot to ec-memory and treat its
|
|
149
|
+
`memory_long` object as authoritative: `action == "no-op"` advances to COMPLETE without
|
|
150
|
+
reading or writing long memory; `action == "distill"` runs distillation for `trim_count`
|
|
151
|
+
older short-memory entries.
|
|
152
|
+
- **COMPLETE closeout:** call the state API with `--stage COMPLETE`. The state API clears
|
|
153
|
+
session `current_task` for terminal tasks, so the next hook injection returns to Ready.
|
|
154
|
+
Then output a summary (what was done, files changed, key decisions).
|
|
126
155
|
|
|
127
156
|
## Resume and handoff
|
|
128
157
|
|
|
129
158
|
Hook breadcrumbs you may receive: `[workflow-state:X]`, `[current-task:Y]`,
|
|
130
|
-
`[easy-coding:
|
|
159
|
+
`[easy-coding:session-file:P]`, `[easy-coding:handoff-from:Z]`,
|
|
160
|
+
`[easy-coding:init-required]`.
|
|
131
161
|
|
|
132
162
|
Resuming an active task (whether from session restart, handoff, or task switch):
|
|
133
163
|
1. Read `task.json` and the dev-spec sections relevant to the current stage.
|
|
@@ -154,7 +184,8 @@ switches agents by itself.
|
|
|
154
184
|
|
|
155
185
|
Start every reply with the single Markdown blockquote status line injected by the hook,
|
|
156
186
|
then a blank line. Do not render machine breadcrumbs such as `[workflow-state:...]` to the
|
|
157
|
-
user. If no status line is injected (harness inactive), do not invent one.
|
|
187
|
+
user. If no status line is injected (harness inactive), do not invent one. Status display is
|
|
188
|
+
script-owned; skills must never construct or "fix" the status line manually.
|
|
158
189
|
|
|
159
190
|
## Boundaries
|
|
160
191
|
|
|
@@ -37,18 +37,31 @@ First run `ec-init`; daily work goes through `ec-workflow`.
|
|
|
37
37
|
|
|
38
38
|
- Stages do not skip. WAITING_CONFIRM is a real gate — implement only after the user confirms
|
|
39
39
|
the plan and test strategy (unless `behavior.auto_mode` is on and the user asked for it).
|
|
40
|
+
- ANALYSIS must follow template-first: read `.easy-coding/templates/dev-spec-skeleton.md` then
|
|
41
|
+
write its exact content to the task's dev-spec.md as the FIRST tool calls, then fill sections
|
|
42
|
+
incrementally via edits. Reply to the user with the complete dev-spec.md content — never a
|
|
43
|
+
summary table or custom format.
|
|
40
44
|
- VERIFICATION is a hard gate: lint + typecheck + test must pass on fresh evidence, and
|
|
41
45
|
coverage must match the test strategy, before a task can complete.
|
|
42
46
|
- Archive (memory flow) runs only after explicit user acceptance — an unaccepted task's
|
|
43
47
|
memory is dirty data.
|
|
44
48
|
- NO COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE.
|
|
49
|
+
- All cross-platform modules (skills, hooks, references) must use universal agent protocols.
|
|
50
|
+
Do not rely on any specific agent's proprietary conventions unless the module is explicitly
|
|
51
|
+
a platform-specific compatibility layer. Reference files use descriptive filenames (e.g.,
|
|
52
|
+
`memory-migration.md`), not platform convention names.
|
|
45
53
|
|
|
46
54
|
## Runtime contract
|
|
47
55
|
|
|
48
|
-
- Workflow state
|
|
49
|
-
|
|
56
|
+
- Workflow state operations go through `{{platform_config_dir}}/hooks/easy_coding_state.py`;
|
|
57
|
+
do not hand-edit session files, `current_task`, task `status`, `stage_history`, or
|
|
58
|
+
`last_agent`.
|
|
59
|
+
- The hook injects `[easy-coding:session-file:P]`; pass that path to the state script with
|
|
60
|
+
`--session-file <P>` when changing the current task or stage.
|
|
61
|
+
- Workflow session files live at `{{workflow_state_path}}`; the CLI only installs files and
|
|
62
|
+
creates the project-init task — agent skills perform all project analysis.
|
|
50
63
|
- Cross-repo references in git-tracked task artifacts use repo NAMES, never local paths.
|
|
51
|
-
Cache local paths only
|
|
64
|
+
Cache local paths only through the state script so they land on the current task.
|
|
52
65
|
|
|
53
66
|
<!-- ═══ end easy-coding-harness generated ═══ -->
|
|
54
67
|
|
|
@@ -35,18 +35,31 @@ First run `/ec-init`; daily work goes through `/ec-workflow`.
|
|
|
35
35
|
|
|
36
36
|
- Stages do not skip. WAITING_CONFIRM is a real gate — implement only after the user confirms
|
|
37
37
|
the plan and test strategy (unless `behavior.auto_mode` is on and the user asked for it).
|
|
38
|
+
- ANALYSIS must follow template-first: read `.easy-coding/templates/dev-spec-skeleton.md` then
|
|
39
|
+
write its exact content to the task's dev-spec.md as the FIRST tool calls, then fill sections
|
|
40
|
+
incrementally via edits. Reply to the user with the complete dev-spec.md content — never a
|
|
41
|
+
summary table or custom format.
|
|
38
42
|
- VERIFICATION is a hard gate: lint + typecheck + test must pass on fresh evidence, and
|
|
39
43
|
coverage must match the test strategy, before a task can complete.
|
|
40
44
|
- Archive (memory flow) runs only after explicit user acceptance — an unaccepted task's
|
|
41
45
|
memory is dirty data.
|
|
42
46
|
- NO COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE.
|
|
47
|
+
- All cross-platform modules (skills, hooks, references) must use universal agent protocols.
|
|
48
|
+
Do not rely on any specific agent's proprietary conventions unless the module is explicitly
|
|
49
|
+
a platform-specific compatibility layer. Reference files use descriptive filenames (e.g.,
|
|
50
|
+
`memory-migration.md`), not platform convention names.
|
|
43
51
|
|
|
44
52
|
## Runtime contract
|
|
45
53
|
|
|
46
|
-
- Workflow state
|
|
47
|
-
|
|
54
|
+
- Workflow state operations go through `{{platform_config_dir}}/hooks/easy_coding_state.py`;
|
|
55
|
+
do not hand-edit session files, `current_task`, task `status`, `stage_history`, or
|
|
56
|
+
`last_agent`.
|
|
57
|
+
- The hook injects `[easy-coding:session-file:P]`; pass that path to the state script with
|
|
58
|
+
`--session-file <P>` when changing the current task or stage.
|
|
59
|
+
- Workflow session files live at `{{workflow_state_path}}`; the CLI only installs files and
|
|
60
|
+
creates the project-init task — agent skills perform all project analysis.
|
|
48
61
|
- Cross-repo references in git-tracked task artifacts use repo NAMES, never local paths.
|
|
49
|
-
Cache local paths only
|
|
62
|
+
Cache local paths only through the state script so they land on the current task.
|
|
50
63
|
|
|
51
64
|
<!-- ═══ end easy-coding-harness generated ═══ -->
|
|
52
65
|
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
---
|
|
2
|
+
memory_schema: 2
|
|
3
|
+
id: SM-YYYYMMDD-001
|
|
4
|
+
date: YYYY-MM-DD
|
|
5
|
+
task_type: feature | bugfix | refactor | perf | doc | workflow
|
|
6
|
+
project_mode: startup | iteration
|
|
7
|
+
domain:
|
|
8
|
+
- "{business domain or module}"
|
|
9
|
+
tags:
|
|
10
|
+
- "{keyword}"
|
|
11
|
+
related_files:
|
|
12
|
+
- "{key file or module}"
|
|
13
|
+
commit: none
|
|
14
|
+
verification: passed | partial | not_run
|
|
15
|
+
memory_value: business | technical | both | none
|
|
16
|
+
target_long: BUSINESS | TECHNICAL | BOTH | NONE
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
# Short Memory Template
|
|
20
|
+
|
|
21
|
+
> This template defines the format for files under `.easy-coding/memory/short/`.
|
|
22
|
+
> File naming convention: `{NNN}_{YYYYMMDD}_{smart_name}.md`
|
|
23
|
+
> Short memories are immutable after creation — they serve as a sliding window of recent
|
|
24
|
+
> details and a buffer for long-term distillation candidates.
|
|
25
|
+
> When short memories reach the threshold (default 10), the newest 5 are kept as recent
|
|
26
|
+
> context; older entries are distillation candidates for long-term memory.
|
|
27
|
+
> Sorting: by frontmatter `date` ascending; if date is missing or tied, by filename prefix
|
|
28
|
+
> number ascending; then by filename ascending.
|
|
29
|
+
|
|
30
|
+
## Task Summary
|
|
31
|
+
|
|
32
|
+
- Goal: {the actual problem solved}
|
|
33
|
+
- Scope: {modules, pages, interfaces, or files involved}
|
|
34
|
+
- Result: {completed / partially completed / not completed, with reasons}
|
|
35
|
+
- Key Constraints: {encoding, compatibility, interface, spec, or user-specified constraints; "none" if none}
|
|
36
|
+
|
|
37
|
+
## Execution Evidence
|
|
38
|
+
|
|
39
|
+
| Type | Content |
|
|
40
|
+
|---|---|
|
|
41
|
+
| Key Files | {file or module list; "none" if none} |
|
|
42
|
+
| Verification Commands | {test / build / lint commands and results; explain if not run} |
|
|
43
|
+
| Manual Acceptance | {key behaviors checked; "none" if none} |
|
|
44
|
+
| Commit Info | {commit hash; "none" if not committed} |
|
|
45
|
+
|
|
46
|
+
## Business Memory Candidates
|
|
47
|
+
|
|
48
|
+
> Only record business facts with future reuse value. Write "none" if none.
|
|
49
|
+
|
|
50
|
+
- Concepts / Field Semantics: {concepts, fields, enums, state meanings}
|
|
51
|
+
- Workflows / State Transitions: {chain steps, pre/post conditions, exception branches}
|
|
52
|
+
- Business Rules / Compatibility: {admission criteria, decision basis, grayscale or legacy reasons}
|
|
53
|
+
- Upstream/Downstream Contracts: {producers, consumers, interface or message fields}
|
|
54
|
+
- Business Troubleshooting: {common misdiagnosis, priority check paths}
|
|
55
|
+
|
|
56
|
+
## Technical Memory Candidates
|
|
57
|
+
|
|
58
|
+
> Only record engineering facts with future reuse value. Write "none" if none.
|
|
59
|
+
|
|
60
|
+
- Architecture / Interface Decisions: {module boundaries, dependency direction, interface contracts}
|
|
61
|
+
- Engineering Rules / Workflows: {coding, commit, release, installation, directory boundaries}
|
|
62
|
+
- Implementation Patterns / Reusable Approaches: {recommended approaches, fallback strategies, compatibility patterns}
|
|
63
|
+
- Pitfalls / Fix Strategies: {root cause, fix approach, verification method}
|
|
64
|
+
- Verification Experience: {test commands, environment constraints, acceptance paths}
|
|
65
|
+
|
|
66
|
+
## Non-Distillation Content
|
|
67
|
+
|
|
68
|
+
> Content that should NOT enter long-term memory, with reasons — prevents accidental absorption of noise.
|
|
69
|
+
|
|
70
|
+
- {routine file lists / temp logs / one-time data / non-reusable implementation details; "none" if none}
|
|
71
|
+
|
|
72
|
+
## Related Memories
|
|
73
|
+
|
|
74
|
+
- Predecessor: {related short memory id, long-term topic, or "none"}
|
|
75
|
+
- Successor: {follow-up task; "none" if none}
|
|
@@ -1,14 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
memory_schema: 2
|
|
3
|
+
memory_file: BUSINESS
|
|
4
|
+
last_updated: YYYY-MM-DD
|
|
5
|
+
---
|
|
6
|
+
|
|
1
7
|
# Business Memory
|
|
2
8
|
|
|
3
|
-
Durable business
|
|
4
|
-
|
|
5
|
-
|
|
9
|
+
> Durable facts about "what the business is, why it works this way, and how upstream/downstream systems interact."
|
|
10
|
+
|
|
11
|
+
## Core Concepts & Field Semantics
|
|
12
|
+
|
|
13
|
+
| Concept / Field | Meaning | Applicable Scenario | Source | Status |
|
|
14
|
+
|---|---|---|---|---|
|
|
15
|
+
| (none) | — | — | — | — |
|
|
16
|
+
|
|
17
|
+
## Business Workflows & State Transitions
|
|
18
|
+
|
|
19
|
+
| Workflow / State | Trigger | Key Steps | Exception Branches | Source | Status |
|
|
20
|
+
|---|---|---|---|---|---|
|
|
21
|
+
| (none) | — | — | — | — | — |
|
|
22
|
+
|
|
23
|
+
## Business Rules & Compatibility Background
|
|
24
|
+
|
|
25
|
+
| Rule | Applicable Scenario | Decision Basis | Impact Scope | Source | Status |
|
|
26
|
+
|---|---|---|---|---|---|
|
|
27
|
+
| (none) | — | — | — | — | — |
|
|
28
|
+
|
|
29
|
+
## Upstream/Downstream Contracts
|
|
30
|
+
|
|
31
|
+
| Contract | Producer | Consumer | Fields / Interface | Notes | Source |
|
|
32
|
+
|---|---|---|---|---|---|
|
|
33
|
+
| (none) | — | — | — | — | — |
|
|
34
|
+
|
|
35
|
+
## Business Troubleshooting Experience
|
|
36
|
+
|
|
37
|
+
| Problem | Common Misdiagnosis | Priority Checks | Fix / Handling | Source |
|
|
38
|
+
|---|---|---|---|---|
|
|
39
|
+
| (none) | — | — | — | — |
|
|
6
40
|
|
|
7
|
-
|
|
41
|
+
## Deprecated Records
|
|
8
42
|
|
|
9
|
-
|
|
10
|
-
- First line: `status: active` (active | deprecated | superseded | deleted)
|
|
11
|
-
- Body: the rule or decision, why it holds, and which tasks/files evidence it.
|
|
43
|
+
> Audit zone — short summaries only. Not loaded into ANALYSIS context by default.
|
|
12
44
|
|
|
13
|
-
|
|
14
|
-
|
|
45
|
+
| Deprecated Date | Original Summary | Reason | Replacement / Source |
|
|
46
|
+
|---|---|---|---|
|
|
47
|
+
| (none) | — | — | — |
|
|
@@ -1,3 +1,38 @@
|
|
|
1
|
-
|
|
1
|
+
---
|
|
2
|
+
memory_schema: 2
|
|
3
|
+
memory_file: MEMORY
|
|
4
|
+
last_updated: YYYY-MM-DD
|
|
5
|
+
---
|
|
2
6
|
|
|
3
|
-
Long-
|
|
7
|
+
# Long-Term Memory Index
|
|
8
|
+
|
|
9
|
+
> This file is an index and navigation aid only — it does not hold detailed content.
|
|
10
|
+
> Business facts go in `BUSINESS.md`; technical/architecture/engineering facts go in `TECHNICAL.md`.
|
|
11
|
+
> Status values: `active / deprecated / superseded`. Default analysis reads only `active` topics.
|
|
12
|
+
|
|
13
|
+
## Quick Navigation
|
|
14
|
+
|
|
15
|
+
| Topic | Type | Keywords | Detail File | Status | Last Updated | Source |
|
|
16
|
+
|---|---|---|---|---|---|---|
|
|
17
|
+
| (none) | — | — | — | — | — | — |
|
|
18
|
+
|
|
19
|
+
## Current Priority Business Domains
|
|
20
|
+
|
|
21
|
+
- (none)
|
|
22
|
+
|
|
23
|
+
## Current Priority Technical Domains
|
|
24
|
+
|
|
25
|
+
- (none)
|
|
26
|
+
|
|
27
|
+
## Reading Strategy
|
|
28
|
+
|
|
29
|
+
- For business concepts, field semantics, workflows, rules, contracts, or troubleshooting → read `BUSINESS.md`.
|
|
30
|
+
- For architecture decisions, interface decisions, engineering rules, patterns, pitfalls, or verification experience → read `TECHNICAL.md`.
|
|
31
|
+
- Default: read only `active` topics. Read `deprecated` / `superseded` only during migration, conflict investigation, or user-requested history tracing.
|
|
32
|
+
- If long-term memory conflicts with current code or the user's latest statement, trust current code and user — update memory status during the next distillation.
|
|
33
|
+
|
|
34
|
+
## Migration Audit
|
|
35
|
+
|
|
36
|
+
| Date | Source | Result |
|
|
37
|
+
|---|---|---|
|
|
38
|
+
| (none) | — | — |
|
|
@@ -1,3 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
memory_schema: 2
|
|
3
|
+
memory_file: TECHNICAL
|
|
4
|
+
last_updated: YYYY-MM-DD
|
|
5
|
+
---
|
|
6
|
+
|
|
1
7
|
# Technical Memory
|
|
2
8
|
|
|
3
|
-
Durable
|
|
9
|
+
> Durable facts about "how code is organized, how engineering works, and how to avoid past pitfalls."
|
|
10
|
+
|
|
11
|
+
## Architecture & Interface Decisions
|
|
12
|
+
|
|
13
|
+
| Decision | Reason | Impact Scope | Source | Status |
|
|
14
|
+
|---|---|---|---|---|
|
|
15
|
+
| (none) | — | — | — | — |
|
|
16
|
+
|
|
17
|
+
## Engineering Rules & Workflows
|
|
18
|
+
|
|
19
|
+
| Rule | Applicable Scenario | Enforcement | Source | Status |
|
|
20
|
+
|---|---|---|---|---|
|
|
21
|
+
| (none) | — | — | — | — |
|
|
22
|
+
|
|
23
|
+
## Implementation Patterns & Reusable Approaches
|
|
24
|
+
|
|
25
|
+
| Pattern | Applicable Scenario | Recommended Approach | Anti-pattern / Caveats | Source |
|
|
26
|
+
|---|---|---|---|---|
|
|
27
|
+
| (none) | — | — | — | — |
|
|
28
|
+
|
|
29
|
+
## Pitfalls & Fix Strategies
|
|
30
|
+
|
|
31
|
+
| Problem | Root Cause | Fix | Verification | Source |
|
|
32
|
+
|---|---|---|---|---|
|
|
33
|
+
| (none) | — | — | — | — |
|
|
34
|
+
|
|
35
|
+
## Verification, Release & Installation Experience
|
|
36
|
+
|
|
37
|
+
| Scenario | Recommended Command / Path | Notes | Source |
|
|
38
|
+
|---|---|---|---|
|
|
39
|
+
| (none) | — | — | — |
|
|
40
|
+
|
|
41
|
+
## Deprecated Records
|
|
42
|
+
|
|
43
|
+
> Audit zone — short summaries only. Not loaded into ANALYSIS context by default.
|
|
44
|
+
|
|
45
|
+
| Deprecated Date | Original Summary | Reason | Replacement / Source |
|
|
46
|
+
|---|---|---|---|
|
|
47
|
+
| (none) | — | — | — |
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
[阶段:ANALYSIS]
|
|
2
|
+
|
|
3
|
+
## 技术方案:{任务标题}
|
|
4
|
+
|
|
5
|
+
### 项目模式
|
|
6
|
+
{初创项目/迭代项目}
|
|
7
|
+
|
|
8
|
+
### 任务类型
|
|
9
|
+
{新功能 / Bug 修复 / 重构 / 性能优化 / 前端设计实现}
|
|
10
|
+
|
|
11
|
+
### 需求解析
|
|
12
|
+
- **目标**:{待填写 — 真正要解决的问题}
|
|
13
|
+
- **输入**:{待填写 — 用户输入 / 系统输入 / 触发条件}
|
|
14
|
+
- **输出**:{待填写 — 先声明交付形态(改代码 / 出文档),再写最终交付结果。交付形态须忠于用户原始需求,不得擅自降级}
|
|
15
|
+
- **边界**:{待填写 — 明确不做什么}
|
|
16
|
+
|
|
17
|
+
### 现状
|
|
18
|
+
- **相关代码 / 页面 / 接口 / 模块**:{待填写 — 基于实际文件与代码的现状说明}
|
|
19
|
+
- **当前实现方式**:{待填写 — 现在是如何工作的}
|
|
20
|
+
- **现有问题 / 缺口**:{待填写 — 为什么需要改}
|
|
21
|
+
- **证据**:{待填写 — 引用的关键文件、类、页面、接口,含 file:line}
|
|
22
|
+
|
|
23
|
+
### 冲突摘要
|
|
24
|
+
- 需求 vs RULES:{待填写 或 "无冲突"}
|
|
25
|
+
- 需求 vs ABSTRACT:{待填写 或 "无冲突"}
|
|
26
|
+
- 需求 vs 现有代码:{待填写 或 "无冲突"}
|
|
27
|
+
- Dev-Spec vs 现有代码:{待填写 或 "无冲突"}
|
|
28
|
+
|
|
29
|
+
### 待用户决策
|
|
30
|
+
- {待填写 — 影响技术路线、接口、改动范围的问题逐条列出;任何"本次不做全部 / 分批落地 / 范围或交付形态收窄"必须列入此处交由用户拍板,不得自行决定并假托既定;若无则写"无"}
|
|
31
|
+
|
|
32
|
+
### 影响面分析
|
|
33
|
+
- **涉及模块**:{待填写}
|
|
34
|
+
- **核心类 / 页面 / 接口**:{待填写}
|
|
35
|
+
- **数据库变更**:{有/无}
|
|
36
|
+
- **接口变更**:{有/无}
|
|
37
|
+
- **关联历史任务**:{待填写 — 相关短期记忆序号;无则"无"}
|
|
38
|
+
|
|
39
|
+
### 改动范围
|
|
40
|
+
> 只列真实项目源码/配置文件的改动。禁止把 `.easy-coding/` 下的 harness 产物(dev-spec / execution.jsonl / test-strategy / 记忆 / 报告等)当作改动对象。本表为空仅允许用于"用户明确要求的无代码交付形态";代码类任务(重构/修复/功能)若此表为空,即为自我降级。
|
|
41
|
+
|
|
42
|
+
| 改动文件 | 改动类型 | 文件编码 | 改动核心内容 |
|
|
43
|
+
|----------|---------|---------|-------------|
|
|
44
|
+
| `{文件路径}` | 新增 | 项目编码 {X},依据:{xxx} | {核心改动} |
|
|
45
|
+
| `{文件路径}` | 修改 | 保持原编码 {X} | {核心改动} |
|
|
46
|
+
| `{文件路径}` | 删除 | — | {删除原因} |
|
|
47
|
+
|
|
48
|
+
### 修改方案
|
|
49
|
+
- **总体改法**:{待填写 — 一句话说清改哪里、怎么改}
|
|
50
|
+
- **后端改动**:{待填写;不涉及则写"不涉及"}
|
|
51
|
+
- **前端改动**:{待填写;不涉及则写"不涉及"}
|
|
52
|
+
- **兼容处理**:{待填写 — 旧逻辑如何迁移、保留或替换}
|
|
53
|
+
- **风险点**:{待填写 — 最容易出问题的位置}
|
|
54
|
+
|
|
55
|
+
### 实施拆解
|
|
56
|
+
|
|
57
|
+
| 单元 | 说明 | 类型 | 涉及文件 | 依赖 |
|
|
58
|
+
|------|------|------|---------|------|
|
|
59
|
+
| U1 | {title} | {backend/frontend/test/...} | {files} | — |
|
|
60
|
+
| U2 | {title} | {type} | {files} | — |
|
|
61
|
+
| U3 | {title} | {type} | {files} | U1, U2 |
|
|
62
|
+
|
|
63
|
+
**执行策略**:{parallel / sequential / single}
|
|
64
|
+
- 第一批(并行):U1 {title} | U2 {title}
|
|
65
|
+
- 第二批(等待第一批):U3 {title}
|
|
66
|
+
(若 single:单一实施单元,主 agent 直接执行)
|
|
67
|
+
|
|
68
|
+
### 测试策略
|
|
69
|
+
|
|
70
|
+
| 测试点 | 级别 | 归属单元 | 方式 | 验证命令 |
|
|
71
|
+
|--------|------|---------|------|---------|
|
|
72
|
+
| {描述} | 必测 | U1 | 单测 | `npm test -- --filter=xxx` |
|
|
73
|
+
| {描述} | 应测 | U2 | 快照 | `npm test -- --snapshot` |
|
|
74
|
+
|
|
75
|
+
- **人工验收**:{待填写 — 用户需要检查的关键行为}
|
|
76
|
+
- **无法验证项**:{待填写 — 无 / 说明缺失环境、数据或权限}
|
|
77
|
+
|
|
78
|
+
### 风险与注意事项
|
|
79
|
+
- {风险 1}
|
|
80
|
+
- {风险 2}
|