easy-coding-harness 0.4.0 → 0.5.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easy-coding-harness",
3
- "version": "0.4.0",
3
+ "version": "0.5.1",
4
4
  "description": "CLI scaffold for installing Easy Coding harness files into agent-native directories.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -6,7 +6,7 @@
6
6
  "hooks": [
7
7
  {
8
8
  "type": "command",
9
- "command": "{{PYTHON_CMD}} .claude/hooks/session-start.py",
9
+ "command": "{{PYTHON_CMD}} {{platform_hooks_dir_shell}}/session-start.py",
10
10
  "timeout": 30000
11
11
  }
12
12
  ]
@@ -18,7 +18,7 @@
18
18
  "hooks": [
19
19
  {
20
20
  "type": "command",
21
- "command": "{{PYTHON_CMD}} .claude/hooks/session-start.py",
21
+ "command": "{{PYTHON_CMD}} {{platform_hooks_dir_shell}}/session-start.py",
22
22
  "timeout": 15000
23
23
  }
24
24
  ]
@@ -28,7 +28,7 @@
28
28
  "hooks": [
29
29
  {
30
30
  "type": "command",
31
- "command": "{{PYTHON_CMD}} .claude/hooks/inject-workflow-state.py",
31
+ "command": "{{PYTHON_CMD}} {{platform_hooks_dir_shell}}/inject-workflow-state.py",
32
32
  "timeout": 15000
33
33
  }
34
34
  ]
@@ -40,7 +40,7 @@
40
40
  "hooks": [
41
41
  {
42
42
  "type": "command",
43
- "command": "{{PYTHON_CMD}} .claude/hooks/inject-subagent-context.py",
43
+ "command": "{{PYTHON_CMD}} {{platform_hooks_dir_shell}}/inject-subagent-context.py",
44
44
  "timeout": 15000
45
45
  }
46
46
  ]
@@ -5,7 +5,7 @@
5
5
  "hooks": [
6
6
  {
7
7
  "type": "command",
8
- "command": "{{PYTHON_CMD}} .codex/hooks/session-start.py",
8
+ "command": "{{PYTHON_CMD}} {{platform_hooks_dir_shell}}/session-start.py",
9
9
  "timeout": 10
10
10
  }
11
11
  ]
@@ -14,7 +14,7 @@
14
14
  "hooks": [
15
15
  {
16
16
  "type": "command",
17
- "command": "{{PYTHON_CMD}} .codex/hooks/inject-workflow-state.py",
17
+ "command": "{{PYTHON_CMD}} {{platform_hooks_dir_shell}}/inject-workflow-state.py",
18
18
  "timeout": 5
19
19
  }
20
20
  ]
@@ -65,6 +65,13 @@ initialization standard. Check each item:
65
65
  and non-empty?
66
66
  - **Project profile**: `project.yaml` exists with `mode` and `test` fields (ec-init owns it;
67
67
  `config.yaml` is CLI-owned — not ec-init's concern)?
68
+ - **Platform hook config freshness**: for each installed platform in `.easy-coding/config.yaml`,
69
+ read the platform hook config and verify managed Easy Coding hook commands use quoted absolute
70
+ paths to this project's platform hook scripts. If any managed hook command is still relative
71
+ (for example `python3 .claude/hooks/session-start.py`) or points outside this project, report
72
+ the exact config file and tell the user to run `easy-coding upgrade`; the upgrade command also
73
+ refreshes stale hook config when the project is already on the current harness version. Do not
74
+ edit the config yourself.
68
75
 
69
76
  **If all checks pass:** show "initialization is up to date" with a brief summary and exit.
70
77
 
@@ -170,6 +177,9 @@ agent must be able to see what was generated and on what evidence.
170
177
 
171
178
  - Never modify business source code, dependencies, or git state.
172
179
  - Never create workflow tasks or touch session files.
180
+ - Never modify platform hook configuration (`.claude/settings.json`, `.codex/hooks.json`,
181
+ `.qoder/settings.json`, `.qodercn/settings.json`). These files are CLI-managed; if they look
182
+ stale or broken, tell the user to run `easy-coding upgrade`.
173
183
  - For COMPLETE projects: the compliance scan may propose supplementary initialization, but
174
184
  never overwrite existing knowledge files without explicit user confirmation. Missing files
175
185
  can be created; existing files are only updated via migration procedures (e.g., memory
@@ -37,7 +37,12 @@ with `.easy-coding/sessions/` always excluded. The CLI already added it to `.git
37
37
  `repo_paths`), the commit/push covers every involved repo. Read `repo_paths` from the
38
38
  current task state to locate each checkout, check changes, and commit/push them as one
39
39
  coherent change set — do not leave a sub-repo behind.
40
- 4. **No false success.** Never claim a commit or push succeeded without reading the command
40
+ 4. **Supermodule two-step commits.** If the current repo has `.gitmodules`, or the current
41
+ task touches a git submodule path, treat each submodule as an independent git boundary:
42
+ commit and push child repos first, then commit and push the parent gitlink update. If a
43
+ child repo is on a detached HEAD, stop and ask the user to choose or create a branch before
44
+ committing there.
45
+ 5. **No false success.** Never claim a commit or push succeeded without reading the command
41
46
  output. A failed push reported as success is a serious error.
42
47
 
43
48
  ## Boundaries
@@ -45,3 +50,6 @@ with `.easy-coding/sessions/` always excluded. The CLI already added it to `.git
45
50
  - Do not touch session files, task status fields, or run stage transitions — git only.
46
51
  - Do not commit `.easy-coding/sessions/`.
47
52
  - Do not commit `spec/dev/` unless the user explicitly asks.
53
+ - In a supermodule task launched from the parent root, parent `.easy-coding/` belongs to the
54
+ parent git. Child `.easy-coding/memory/` changes created by memory archive belong to the
55
+ owning child git and must be committed before the parent gitlink update.
@@ -45,6 +45,23 @@ conversation. Refer to SHORT_MEMORY_TEMPLATE.md for the complete section format.
45
45
 
46
46
  If the task was cross-repo, record the repo names involved and the collaboration reason.
47
47
 
48
+ ## Supermodule memory routing
49
+
50
+ If the current project config contains `supermodule.role: super-parent`, archive memory by
51
+ ownership:
52
+
53
+ - Cross-repo business context, parent orchestration decisions, and multi-repo contracts stay
54
+ in the parent `.easy-coding/memory`.
55
+ - Technical memory that belongs to one child repo must be written to that child's
56
+ `.easy-coding/memory`, not only to the parent. Use changed file paths and module ownership
57
+ to decide the child.
58
+ - Only write child memory files during this routing. Do not edit child task, session, state,
59
+ or dev-spec files from the parent workflow.
60
+ - If a touched child repo has no initialized `.easy-coding/memory` directory, keep the memory
61
+ in the parent and mark it as "original child: <path>; child not initialized".
62
+ - When child memory is written, the later git flow must commit and push the child repo before
63
+ the parent gitlink update.
64
+
48
65
  **Immutability:** Short memories are write-once. Never edit an existing short memory file —
49
66
  create a new one instead. Short memories serve as both a recent-detail sliding window and a
50
67
  distillation buffer for long-term memory.
@@ -62,6 +62,7 @@ First run `ec-init`; daily work goes through `ec-workflow`.
62
62
  creates the project-init task — agent skills perform all project analysis.
63
63
  - Cross-repo references in git-tracked task artifacts use repo NAMES, never local paths.
64
64
  Cache local paths only through the state script so they land on the current task.
65
+ {{supermodule_boundary}}
65
66
 
66
67
  <!-- ═══ end easy-coding-harness generated ═══ -->
67
68
 
@@ -60,6 +60,7 @@ First run `/ec-init`; daily work goes through `/ec-workflow`.
60
60
  creates the project-init task — agent skills perform all project analysis.
61
61
  - Cross-repo references in git-tracked task artifacts use repo NAMES, never local paths.
62
62
  Cache local paths only through the state script so they land on the current task.
63
+ {{supermodule_boundary}}
63
64
 
64
65
  <!-- ═══ end easy-coding-harness generated ═══ -->
65
66
 
@@ -5,7 +5,7 @@
5
5
  "hooks": [
6
6
  {
7
7
  "type": "command",
8
- "command": "{{PYTHON_CMD}} {{platform_config_dir}}/hooks/session-start.py",
8
+ "command": "{{PYTHON_CMD}} {{platform_hooks_dir_shell}}/session-start.py",
9
9
  "timeout": 10
10
10
  }
11
11
  ]
@@ -14,7 +14,7 @@
14
14
  "hooks": [
15
15
  {
16
16
  "type": "command",
17
- "command": "{{PYTHON_CMD}} {{platform_config_dir}}/hooks/inject-workflow-state.py",
17
+ "command": "{{PYTHON_CMD}} {{platform_hooks_dir_shell}}/inject-workflow-state.py",
18
18
  "timeout": 5
19
19
  }
20
20
  ]
@@ -26,7 +26,7 @@
26
26
  "hooks": [
27
27
  {
28
28
  "type": "command",
29
- "command": "{{PYTHON_CMD}} {{platform_config_dir}}/hooks/inject-subagent-context.py",
29
+ "command": "{{PYTHON_CMD}} {{platform_hooks_dir_shell}}/inject-subagent-context.py",
30
30
  "timeout": 30
31
31
  }
32
32
  ]