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
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ec-init
|
|
3
|
+
description: One-time project knowledge initialization after the easy-coding CLI install. Use when the user runs {{skill_trigger}}ec-init or hook context shows [easy-coding:init-required]. Idempotent. Detects startup vs iterative projects automatically and generates SOUL, RULES, ABSTRACT, and TEST_STRATEGY.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# ec-init — project knowledge initialization
|
|
7
|
+
|
|
8
|
+
The CLI is a dumb file mover; you are the smart half. You analyze the project and produce
|
|
9
|
+
the knowledge assets every later stage depends on. This runs once per project; re-runs are
|
|
10
|
+
safe.
|
|
11
|
+
|
|
12
|
+
Communicate with the user in the user's language.
|
|
13
|
+
|
|
14
|
+
## Config file ownership — read before writing anything
|
|
15
|
+
|
|
16
|
+
Two files, two owners. Never cross the line:
|
|
17
|
+
|
|
18
|
+
- **`.easy-coding/config.yaml` is owned by the `easy-coding` CLI.** It holds the structural
|
|
19
|
+
fields the CLI is authoritative for: `version`, `harness_version`, `agents`,
|
|
20
|
+
`project.name`, `memory`, `tasks`, `behavior`. You may READ it. You must NEVER write to it,
|
|
21
|
+
add fields to it, or regenerate it — doing so corrupts the CLI contract and breaks
|
|
22
|
+
`easy-coding upgrade`.
|
|
23
|
+
- **`.easy-coding/project.yaml` is owned by you (ec-init).** Your entire project-analysis
|
|
24
|
+
configuration lives here. The CLI never reads this file, so writing it can never break the
|
|
25
|
+
CLI — but stay within the schema below so later stages can rely on it.
|
|
26
|
+
|
|
27
|
+
Write `project.yaml` with exactly this shape. If it already exists, read-modify-write
|
|
28
|
+
(update changed fields, preserve the rest) — never blow it away:
|
|
29
|
+
|
|
30
|
+
```yaml
|
|
31
|
+
# Easy Coding project profile — generated by ec-init. Safe to re-run.
|
|
32
|
+
mode: iterative # startup | iterative — your detection verdict
|
|
33
|
+
language: typescript # primary language
|
|
34
|
+
test:
|
|
35
|
+
framework: vitest # detected test framework
|
|
36
|
+
command: "npm test" # a test command you VERIFIED exists (read package.json etc.)
|
|
37
|
+
build: # optional — include only when detected
|
|
38
|
+
command: "npm run build"
|
|
39
|
+
lint: # optional — include only when detected
|
|
40
|
+
command: "npm run lint"
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Field whitelist: `mode`, `language`, `test.*`, `build.*`, `lint.*`. Do not invent other
|
|
44
|
+
top-level keys. Do not copy any CLI-owned field (`harness_version`, `agents`, …) into this
|
|
45
|
+
file.
|
|
46
|
+
|
|
47
|
+
## Entry guard (idempotency — run first)
|
|
48
|
+
|
|
49
|
+
1. Read `.easy-coding/tasks/project-init/task.json`.
|
|
50
|
+
- File missing → the CLI never ran. Tell the user to run `easy-coding init` first. Stop.
|
|
51
|
+
- `status == "COMPLETE"` → already initialized. Run the **compliance scan** (see below),
|
|
52
|
+
then exit.
|
|
53
|
+
- `status == "PENDING"` → proceed with full initialization.
|
|
54
|
+
2. Repeated calls must never duplicate files or corrupt existing ones.
|
|
55
|
+
|
|
56
|
+
## Compliance scan (for COMPLETE projects)
|
|
57
|
+
|
|
58
|
+
When `status == "COMPLETE"`, scan the project against the current harness version's
|
|
59
|
+
initialization standard. Check each item:
|
|
60
|
+
|
|
61
|
+
- **Memory format**: `.easy-coding/memory/long/MEMORY.md` has `memory_schema: 2` frontmatter?
|
|
62
|
+
`BUSINESS.md` and `TECHNICAL.md` exist? `SHORT_MEMORY_TEMPLATE.md` exists?
|
|
63
|
+
Short memories under `memory/short/` all have schema-v2 frontmatter?
|
|
64
|
+
- **Knowledge files**: `SOUL.md`, `RULES.md`, `ABSTRACT.md`, `TEST_STRATEGY.md` — present
|
|
65
|
+
and non-empty?
|
|
66
|
+
- **Project profile**: `project.yaml` exists with `mode` and `test` fields (ec-init owns it;
|
|
67
|
+
`config.yaml` is CLI-owned — not ec-init's concern)?
|
|
68
|
+
|
|
69
|
+
**If all checks pass:** show "initialization is up to date" with a brief summary and exit.
|
|
70
|
+
|
|
71
|
+
**If gaps are found:** list each gap with a one-line explanation. Ask the user whether to
|
|
72
|
+
run supplementary initialization for the missing items. The user MUST confirm — do not
|
|
73
|
+
auto-fix, as overwriting could destroy user-customized content with real value.
|
|
74
|
+
|
|
75
|
+
On confirmation: execute only the missing/outdated steps — memory migration (load
|
|
76
|
+
`references/memory-migration.md` if old-format memory detected), missing file generation,
|
|
77
|
+
template updates. Do not re-generate files that already exist and pass the check.
|
|
78
|
+
|
|
79
|
+
On decline: exit with the gap list as a reference for the user to address manually.
|
|
80
|
+
|
|
81
|
+
**Clear upgrade marker:** After the compliance scan completes (whether all checks passed or
|
|
82
|
+
gaps were fixed), run
|
|
83
|
+
`{{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py project-init-complete --agent <agent-id>`.
|
|
84
|
+
This removes `pending_init_since` and clears the "Waiting init · Upgrade" status line so the
|
|
85
|
+
user is no longer prompted on every session.
|
|
86
|
+
|
|
87
|
+
## Project mode detection (automatic — never ask the user)
|
|
88
|
+
|
|
89
|
+
Scan the project root, excluding `.easy-coding/`, platform dirs (`.claude/`, `.agents/`,
|
|
90
|
+
`.codex/`, `.qoder/`), lockfiles, and pure config skeletons (package.json, tsconfig,
|
|
91
|
+
linter configs, CI yaml).
|
|
92
|
+
|
|
93
|
+
- Substantive source files exist (.ts/.js/.java/.py/.go/.rs/... containing real logic)
|
|
94
|
+
→ **iterative** (existing project).
|
|
95
|
+
- Empty, or config skeleton only → **startup** (new project).
|
|
96
|
+
|
|
97
|
+
Record the verdict in `project.yaml` under `mode` (see **Config file ownership**) and in
|
|
98
|
+
`init_log`. Never touch `config.yaml`.
|
|
99
|
+
|
|
100
|
+
## Iterative project flow
|
|
101
|
+
|
|
102
|
+
After each step append `{step, summary, timestamp}` to `init_log` in task.json — a later
|
|
103
|
+
agent must be able to see what was generated and on what evidence.
|
|
104
|
+
|
|
105
|
+
1. **SOUL.md — project identity.** Analyze README, package metadata, and code purpose. Write:
|
|
106
|
+
- What this project is (2-3 sentences, concrete, no marketing fluff)
|
|
107
|
+
- Dialogue standards (language to use with the user, tone, verbosity expectations)
|
|
108
|
+
- Hard prohibitions (e.g. never commit secrets, never edit generated directories)
|
|
109
|
+
Keep it under ~40 lines; SOUL is loaded on every task.
|
|
110
|
+
2. **RULES.md — coding rules grounded in evidence,** not generic best practice. Detect:
|
|
111
|
+
- Languages and versions (from configs and sources)
|
|
112
|
+
- Naming conventions actually in use (scan representative files)
|
|
113
|
+
- Comment language: if more than 70% of existing comments are Chinese, the rule is
|
|
114
|
+
"comments in Chinese"; same logic for English; mixed → follow each file's dominant language
|
|
115
|
+
- Error handling style, import ordering, formatter/linter in use (read their configs)
|
|
116
|
+
Structure as one section per language plus a General section. Every rule must be
|
|
117
|
+
mechanically checkable — "be clean" is not a rule; "exported functions carry explicit
|
|
118
|
+
return types" is.
|
|
119
|
+
3. **ABSTRACT.md — architecture cognition.** Scan directory structure and entrypoints. Write:
|
|
120
|
+
modules and their responsibilities, core data flow, tech stack with versions, external
|
|
121
|
+
dependencies and services, build and run commands. Use a named section per module —
|
|
122
|
+
later stages extract sections by name (the `abstract_modules` field in execution plans).
|
|
123
|
+
4. **TEST_STRATEGY.md — project test baseline:** detected framework, test command, where
|
|
124
|
+
tests live, naming conventions, coverage expectations, which classes of code this project
|
|
125
|
+
tests vs skips. Also fill `project.yaml` `test.framework` and `test.command` with commands
|
|
126
|
+
you verified exist (read package.json scripts or equivalent — do not guess).
|
|
127
|
+
5. **Memory migration probe** — Check for old-format memory files:
|
|
128
|
+
- `.easy-coding/memory/long/MEMORY.md` exists but lacks `memory_schema: 2` frontmatter
|
|
129
|
+
- `.easy-coding/memory/long/BUSINESS.md` or `TECHNICAL.md` missing
|
|
130
|
+
- `.easy-coding/memory/short/*.md` files without `memory_schema: 2` frontmatter
|
|
131
|
+
If any trigger condition is met: load `references/memory-migration.md` (relative to this
|
|
132
|
+
skill's directory — the same directory that contains this SKILL.md) and execute the
|
|
133
|
+
migration procedure automatically. No user confirmation needed — migration is part of
|
|
134
|
+
initialization. Output an audit summary when done.
|
|
135
|
+
6. **Memory init** — ensure `.easy-coding/memory/short/` and `memory/long/` exist with the
|
|
136
|
+
three long files (MEMORY.md, BUSINESS.md, TECHNICAL.md) using `memory_schema: 2` templates.
|
|
137
|
+
Also ensure `SHORT_MEMORY_TEMPLATE.md` exists in `memory/` as format reference. Never write
|
|
138
|
+
fake entries.
|
|
139
|
+
7. **Mark complete** — write the final `init_log` entry, then run
|
|
140
|
+
`{{PYTHON_CMD}} {{platform_config_dir}}/hooks/easy_coding_state.py project-init-complete --agent <agent-id>`.
|
|
141
|
+
Tell the user initialization is done and daily work goes through `{{skill_trigger}}ec-workflow`.
|
|
142
|
+
|
|
143
|
+
## Startup project flow
|
|
144
|
+
|
|
145
|
+
1. **Lightweight interview** — 3-5 questions, strictly one at a time, multiple-choice
|
|
146
|
+
preferred: project name and positioning, primary language and framework, test framework
|
|
147
|
+
preference, special coding conventions (optional), comment language (optional).
|
|
148
|
+
2. Generate from the answers:
|
|
149
|
+
- SOUL.md (identity from answers, dialogue standards, prohibitions)
|
|
150
|
+
- RULES.md (baseline rules for the chosen language; mark sections "refine as code grows")
|
|
151
|
+
- TEST_STRATEGY.md (skeleton for the chosen framework)
|
|
152
|
+
3. **Skip ABSTRACT.md** — no architecture exists yet. Note in init_log:
|
|
153
|
+
"ABSTRACT pending; ec-memory backfills after the first substantive task." (ec-memory
|
|
154
|
+
detects the missing file during MEMORY_LONG and generates it from the then-current code.)
|
|
155
|
+
4. Memory migration probe and memory init, same as iterative steps 5-7.
|
|
156
|
+
5. Recommend: design first with `{{skill_trigger}}ec-brainstorming`, then build via
|
|
157
|
+
`{{skill_trigger}}ec-workflow`.
|
|
158
|
+
|
|
159
|
+
## Quality bar for generated files
|
|
160
|
+
|
|
161
|
+
- Every claim grounded in observed evidence — file paths and configs you actually read.
|
|
162
|
+
No filler like "follow best practices".
|
|
163
|
+
- SOUL stays short. RULES and ABSTRACT run as long as the evidence supports, in named
|
|
164
|
+
sections. TEST_STRATEGY must be concrete enough that ec-verification can derive runnable
|
|
165
|
+
commands from it.
|
|
166
|
+
|
|
167
|
+
## Boundaries
|
|
168
|
+
|
|
169
|
+
- Never modify business source code, dependencies, or git state.
|
|
170
|
+
- Never create workflow tasks or touch session files.
|
|
171
|
+
- For COMPLETE projects: the compliance scan may propose supplementary initialization, but
|
|
172
|
+
never overwrite existing knowledge files without explicit user confirmation. Missing files
|
|
173
|
+
can be created; existing files are only updated via migration procedures (e.g., memory
|
|
174
|
+
migration), never silently regenerated.
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Memory Migration Procedure
|
|
2
|
+
|
|
3
|
+
> Loaded by ec-init when old-format memory is detected during initialization.
|
|
4
|
+
> Migration scope is strictly `.easy-coding/memory/` — never modify business code, specs, or other project files.
|
|
5
|
+
|
|
6
|
+
## Trigger Conditions
|
|
7
|
+
|
|
8
|
+
Any ONE of the following triggers automatic migration during ec-init (no user confirmation
|
|
9
|
+
needed — migration is part of initialization, not a separate decision):
|
|
10
|
+
|
|
11
|
+
1. `.easy-coding/memory/long/MEMORY.md` exists but lacks `memory_schema: 2` in its frontmatter
|
|
12
|
+
2. `.easy-coding/memory/long/BUSINESS.md` is missing
|
|
13
|
+
3. `.easy-coding/memory/long/TECHNICAL.md` is missing
|
|
14
|
+
4. `.easy-coding/memory/short/*.md` files exist that lack YAML frontmatter or have `memory_schema != 2`
|
|
15
|
+
5. `MEMORY.md` is still old-format long-form prose rather than a schema-2 index/navigation file
|
|
16
|
+
|
|
17
|
+
## Migration Principles
|
|
18
|
+
|
|
19
|
+
1. Migration executes automatically as part of ec-init. Inform the user what was detected and what will be migrated, but do not ask for confirmation — the user already triggered initialization.
|
|
20
|
+
2. Old long-term memory content must not be discarded — migrate it to `BUSINESS.md`, `TECHNICAL.md`, the new index, or deprecated records.
|
|
21
|
+
3. Old short-term memories are NOT converted to new format first. All old short memories participate in a single batch settlement.
|
|
22
|
+
4. After successful migration, delete all processed old short-term files. New schema-2 short memories then follow the sliding window rules.
|
|
23
|
+
5. If old and new content conflict, trust current code and user's latest statement. Old content goes to the "Deprecated Records" section of the appropriate file.
|
|
24
|
+
6. The migration process must output an audit summary listing what was identified, migrated, deleted, and not distilled.
|
|
25
|
+
7. Migration is a one-time operation, not incremental.
|
|
26
|
+
|
|
27
|
+
## Old Long-Term Memory Split Rules
|
|
28
|
+
|
|
29
|
+
Read the old `.easy-coding/memory/long/MEMORY.md` and split content by topic. **Also read
|
|
30
|
+
`BUSINESS.md` and `TECHNICAL.md` if they already exist** — they may contain entries from
|
|
31
|
+
prior usage. Merge existing entries with newly split content; do not overwrite or discard
|
|
32
|
+
entries already present in these files.
|
|
33
|
+
|
|
34
|
+
**→ BUSINESS.md:**
|
|
35
|
+
- Business rules, field semantics, business workflows, state transitions
|
|
36
|
+
- Upstream/downstream contracts, business troubleshooting experience
|
|
37
|
+
|
|
38
|
+
**→ TECHNICAL.md:**
|
|
39
|
+
- Architecture decisions, interface decisions, tech selections
|
|
40
|
+
- Engineering rules, implementation patterns
|
|
41
|
+
- Pitfalls and fix strategies, verification/release/installation experience
|
|
42
|
+
|
|
43
|
+
**→ Deprecated Records:**
|
|
44
|
+
- Expired content, content superseded by current code, content conflicting with user's latest statement
|
|
45
|
+
|
|
46
|
+
After splitting, rewrite `MEMORY.md` as a `memory_schema: 2` index containing only: Topic, Type, Keywords, Detail File, Status, Last Updated, Source.
|
|
47
|
+
|
|
48
|
+
## Old Short-Term Memory Batch Settlement
|
|
49
|
+
|
|
50
|
+
Read `.easy-coding/memory/short/*.md`:
|
|
51
|
+
|
|
52
|
+
- Files lacking YAML frontmatter, or with `memory_schema != 2`, are treated as old-format
|
|
53
|
+
- Do NOT require old short memories to first gain new frontmatter — settle them as-is
|
|
54
|
+
- ALL old short memories participate in one batch, even if fewer than 10 (to prevent re-triggering migration)
|
|
55
|
+
- Stable sorting order:
|
|
56
|
+
1. By frontmatter `date` ascending
|
|
57
|
+
2. If date is missing, unparseable, or tied → by filename prefix number ascending
|
|
58
|
+
3. Still tied → by filename ascending
|
|
59
|
+
- Classify all old short memories by content into: business candidates, technical candidates, non-distillation content
|
|
60
|
+
- Write results to `BUSINESS.md` / `TECHNICAL.md`
|
|
61
|
+
- Update `MEMORY.md` index with sources
|
|
62
|
+
- After success, delete all processed old short files
|
|
63
|
+
|
|
64
|
+
**Content that does NOT enter long-term memory:**
|
|
65
|
+
- Routine file modification lists
|
|
66
|
+
- One-time task logs
|
|
67
|
+
- Temporary logs, temp order numbers, one-time mock data
|
|
68
|
+
- Implementation details with no reuse value
|
|
69
|
+
|
|
70
|
+
## Migration Audit Output
|
|
71
|
+
|
|
72
|
+
```markdown
|
|
73
|
+
### Memory Migration Complete
|
|
74
|
+
|
|
75
|
+
- Old-format files identified: {file list}
|
|
76
|
+
- Business topics migrated: {topic list; "none" if none}
|
|
77
|
+
- Technical topics migrated: {topic list; "none" if none}
|
|
78
|
+
- Old short memories deleted: {file list; "none" if none}
|
|
79
|
+
- Non-distilled content and reasons: {summary; "none" if none}
|
|
80
|
+
- Conflict handling: {old content deprecated / new content adopted / no conflicts}
|
|
81
|
+
|
|
82
|
+
Proceeding with new memory structure.
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Return
|
|
86
|
+
|
|
87
|
+
After migration completes, return to ec-init's normal flow. Background data should be re-loaded using the new three-file memory structure.
|
|
@@ -21,9 +21,12 @@ source in the global npm install.
|
|
|
21
21
|
## Source-of-truth rules
|
|
22
22
|
|
|
23
23
|
- `ec-workflow`'s SKILL.md is the source of truth for the workflow.
|
|
24
|
-
- `.easy-coding/config.yaml` is the source of truth for
|
|
24
|
+
- `.easy-coding/config.yaml` is the CLI-owned source of truth for structural config
|
|
25
|
+
(`harness_version`, `agents`, `memory`, `behavior`, …) — the CLI reads and writes it.
|
|
26
|
+
- `.easy-coding/project.yaml` is the ec-init-owned source of truth for project analysis
|
|
27
|
+
(`mode`, `language`, `test`, `build`, `lint`) — the CLI never reads it.
|
|
25
28
|
- Customization edits the LOCAL installed copy only, never the scaffold source package.
|
|
26
|
-
- Never edit runtime data here: `
|
|
29
|
+
- Never edit runtime data here: `sessions/`, `tasks/`, `memory/`.
|
|
27
30
|
- Warn the user: harness-managed files (ec-* skills, shared hooks, generated hook config,
|
|
28
31
|
generated main-constraint regions) are **overwritten by `easy-coding upgrade`**. Durable
|
|
29
32
|
customization belongs in project custom instructions (outside the generated markers) or in
|
|
@@ -15,7 +15,8 @@ How to change the harness locally without losing it on `easy-coding upgrade`.
|
|
|
15
15
|
`easy-coding upgrade` **never touches**:
|
|
16
16
|
|
|
17
17
|
- `config.yaml` (only `harness_version` is bumped)
|
|
18
|
-
- `
|
|
18
|
+
- `project.yaml` (ec-init's project profile)
|
|
19
|
+
- `sessions/`, `tasks/`, `memory/`, `spec/`
|
|
19
20
|
- `SOUL.md` / `RULES.md` / `ABSTRACT.md` / `TEST_STRATEGY.md` / `CHANGELOG.md`
|
|
20
21
|
- the user region of `CLAUDE.md` / `AGENTS.md` (outside the markers)
|
|
21
22
|
|
|
@@ -10,7 +10,7 @@ The harness deliberately separates **platform-native files** from **shared runti
|
|
|
10
10
|
and the main constraint file. They live in each platform's standard directory
|
|
11
11
|
(`.claude/`, `.agents/` + `.codex/`, `.qoder/`). The agent's own `/` or `$` discovery finds
|
|
12
12
|
them — the harness invents no new discovery mechanism.
|
|
13
|
-
- **Shared runtime data** (`.easy-coding/`): `config.yaml`, `
|
|
13
|
+
- **Shared runtime data** (`.easy-coding/`): `config.yaml`, `project.yaml`, `sessions/`, `tasks/`, `memory/`,
|
|
14
14
|
`spec/`, and the project knowledge assets (SOUL/RULES/ABSTRACT/TEST_STRATEGY/CHANGELOG).
|
|
15
15
|
Skills and hooks read and write these.
|
|
16
16
|
|
|
@@ -21,8 +21,9 @@ analysis, workflow operation). The CLI never analyzes the project.
|
|
|
21
21
|
|
|
22
22
|
```
|
|
23
23
|
.easy-coding/
|
|
24
|
-
config.yaml
|
|
25
|
-
|
|
24
|
+
config.yaml CLI-owned structural config (in git)
|
|
25
|
+
project.yaml ec-init project profile (in git)
|
|
26
|
+
sessions/ personal workflow session files (NOT in git)
|
|
26
27
|
SOUL.md project identity + dialogue standards
|
|
27
28
|
RULES.md coding rules (per-language sections)
|
|
28
29
|
ABSTRACT.md architecture cognition
|
|
@@ -44,13 +45,15 @@ analysis, workflow operation). The CLI never analyzes the project.
|
|
|
44
45
|
8 stages + 2 terminals, owned by ec-workflow:
|
|
45
46
|
`INIT → ANALYSIS → WAITING_CONFIRM → IMPLEMENT → REVIEW → VERIFICATION → MEMORY_SHORT →
|
|
46
47
|
MEMORY_LONG → COMPLETE`, plus `CLOSED` (user abort, no memory flow). WAITING_CONFIRM and
|
|
47
|
-
VERIFICATION are hard gates. The
|
|
48
|
-
|
|
48
|
+
VERIFICATION are hard gates. The active task pointer lives in `sessions/{ppid}.json`;
|
|
49
|
+
when the task reaches `COMPLETE` or `CLOSED`, the state API clears `current_task` so the
|
|
50
|
+
session returns to Ready. Each task's stage persists in its `task.json`. Hooks inject the
|
|
51
|
+
session and task state as breadcrumbs so every reply can render the status line.
|
|
49
52
|
|
|
50
|
-
Task switching:
|
|
51
|
-
tasks at any time. When a user's prompt doesn't match the active task, ec-workflow's
|
|
52
|
-
router offers to suspend the current task and switch. The suspended task retains its
|
|
53
|
-
`task.json`; no data is lost. Each task folder is self-contained.
|
|
53
|
+
Task switching: the session file has a single `current_task` slot, but the user can switch
|
|
54
|
+
between tasks at any time. When a user's prompt doesn't match the active task, ec-workflow's
|
|
55
|
+
intent router offers to suspend the current task and switch. The suspended task retains its
|
|
56
|
+
stage in `task.json`; no data is lost. Each task folder is self-contained.
|
|
54
57
|
|
|
55
58
|
## Task persistence
|
|
56
59
|
|
|
@@ -77,5 +80,5 @@ demand.
|
|
|
77
80
|
|
|
78
81
|
`.easy-coding/` is a dead drop. Agent A writes results and leaves; agent B reads them and
|
|
79
82
|
continues. All platform-agnostic artifacts (dev-spec, execution.jsonl, task.json, memory)
|
|
80
|
-
make cross-agent handoff lossless. `
|
|
81
|
-
task was handed off rather than self-interrupted.
|
|
83
|
+
make cross-agent handoff lossless. `task.json.last_agent` records the last owner so a new
|
|
84
|
+
agent knows a task was handed off rather than self-interrupted.
|
|
@@ -22,7 +22,7 @@ discovery surfaces them under `/ec-` or `$ec-`.
|
|
|
22
22
|
|
|
23
23
|
- **Skills** (`SKILL.md`): frontmatter `name` + `description`, then markdown instructions.
|
|
24
24
|
They carry the workflow logic. Platform differences — the skill trigger (`/` vs `$`), the
|
|
25
|
-
state
|
|
25
|
+
session path, state API path, and the sub-agent spawn instruction — are filled in from a small
|
|
26
26
|
placeholder map at install time, so one source template serves all three platforms.
|
|
27
27
|
- **Sub-agent definitions**: role baselines for the implementer / reviewer / verifier
|
|
28
28
|
sub-agents. Claude/Qoder use markdown frontmatter; Codex uses TOML with
|
|
@@ -31,10 +31,14 @@ discovery surfaces them under `/ec-` or `$ec-`.
|
|
|
31
31
|
|
|
32
32
|
## Hooks and settings
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
Python runtime files are shared verbatim across platforms (only the JSON wrapper differs):
|
|
35
35
|
|
|
36
|
-
- `
|
|
37
|
-
|
|
36
|
+
- `easy_coding_state.py` — the single runtime API for current-task pointers, task status,
|
|
37
|
+
transitions, and task state reads.
|
|
38
|
+
- `easy_coding_status.py` — renders the Markdown status line and machine breadcrumbs from
|
|
39
|
+
state API snapshots.
|
|
40
|
+
- `session-start.py` — ensures the per-session file exists; performs legacy `state.json`
|
|
41
|
+
migration; injects resume / init-required / handoff breadcrumbs. Idempotent.
|
|
38
42
|
- `inject-workflow-state.py` — injects the `workflow-state` and `current-task` breadcrumbs so
|
|
39
43
|
the status line can render.
|
|
40
44
|
- `inject-subagent-context.py` — injects the sub-agent guard before an Agent tool call.
|