easy-coding-harness 0.1.4

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.
Files changed (42) hide show
  1. package/README.md +112 -0
  2. package/dist/cli.d.ts +2 -0
  3. package/dist/cli.js +979 -0
  4. package/dist/cli.js.map +1 -0
  5. package/package.json +53 -0
  6. package/templates/claude/agents/ec-implementer.md +26 -0
  7. package/templates/claude/agents/ec-reviewer.md +30 -0
  8. package/templates/claude/agents/ec-verifier.md +30 -0
  9. package/templates/claude/settings.json +40 -0
  10. package/templates/codex/agents/ec-implementer.toml +25 -0
  11. package/templates/codex/agents/ec-reviewer.toml +28 -0
  12. package/templates/codex/agents/ec-verifier.toml +26 -0
  13. package/templates/codex/config.toml +9 -0
  14. package/templates/codex/hooks.json +24 -0
  15. package/templates/common/bundled-skills/ec-meta/SKILL.md +56 -0
  16. package/templates/common/bundled-skills/ec-meta/references/customize-local/README.md +54 -0
  17. package/templates/common/bundled-skills/ec-meta/references/local-architecture/README.md +76 -0
  18. package/templates/common/bundled-skills/ec-meta/references/platform-files/README.md +52 -0
  19. package/templates/common/skills/ec-analysis/SKILL.md +113 -0
  20. package/templates/common/skills/ec-brainstorming/SKILL.md +70 -0
  21. package/templates/common/skills/ec-git/SKILL.md +47 -0
  22. package/templates/common/skills/ec-implementing/SKILL.md +89 -0
  23. package/templates/common/skills/ec-init/SKILL.md +96 -0
  24. package/templates/common/skills/ec-memory/SKILL.md +69 -0
  25. package/templates/common/skills/ec-reviewing/SKILL.md +61 -0
  26. package/templates/common/skills/ec-task-close/SKILL.md +35 -0
  27. package/templates/common/skills/ec-task-management/SKILL.md +45 -0
  28. package/templates/common/skills/ec-verification/SKILL.md +78 -0
  29. package/templates/common/skills/ec-workflow/SKILL.md +120 -0
  30. package/templates/main-constraint/AGENTS.md.tpl +58 -0
  31. package/templates/main-constraint/CLAUDE.md.tpl +56 -0
  32. package/templates/qoder/agents/ec-implementer.md +28 -0
  33. package/templates/qoder/agents/ec-reviewer.md +32 -0
  34. package/templates/qoder/agents/ec-verifier.md +32 -0
  35. package/templates/qoder/settings.json +36 -0
  36. package/templates/runtime/memory/long/BUSINESS.md +14 -0
  37. package/templates/runtime/memory/long/MEMORY.md +3 -0
  38. package/templates/runtime/memory/long/TECHNICAL.md +3 -0
  39. package/templates/shared-hooks/easy_coding_status.py +73 -0
  40. package/templates/shared-hooks/inject-subagent-context.py +80 -0
  41. package/templates/shared-hooks/inject-workflow-state.py +92 -0
  42. package/templates/shared-hooks/session-start.py +111 -0
package/README.md ADDED
@@ -0,0 +1,112 @@
1
+ # Easy Coding Harness
2
+
3
+ 把"AI 编码 Harness"一键安装到各 agent 平台标准目录的 CLI 脚手架。在项目里跑一次
4
+ `easy-coding init`,按所选平台把 skills / hooks / 子代理 / 主约束文件写入平台标准目录,
5
+ agent 原生识别——用 `/ec-`(Claude Code / Qoder)或 `$ec-`(Codex)即可调用。
6
+
7
+ ## 核心理念
8
+
9
+ - **平台标准目录**:skills / hooks / agents 写进 `.claude/`、`.agents/` + `.codex/`、
10
+ `.qoder/`,复用 agent 已有的发现机制,不造新轮子。
11
+ - **运行时 dead-drop**:`.easy-coding/` 存放 config / state / tasks / memory,所有产物
12
+ 平台无关。换 agent、跨会话,信息零损失。
13
+ - **约束即护城河**:8 阶段状态机 + 2 终态,WAITING_CONFIRM 与 VERIFICATION 是硬门控,
14
+ "没跑过的命令不算通过"。
15
+
16
+ ## 安装
17
+
18
+ ```bash
19
+ # 方式一:源码(开发者 / 内网)
20
+ git clone <repo> && cd easy-coding-harness && ./install.sh
21
+
22
+ # 方式二:npm beta(内测用户)
23
+ npm install -g easy-coding-harness@beta
24
+ easy-coding --version
25
+ ```
26
+
27
+ 两种方式都注册全局命令 `easy-coding`,效果一致。
28
+
29
+ 当前 `0.x.x` 版本为内测版本,npm 使用 `beta` dist-tag 发布。稳定版发布后,普通用户可使用
30
+ `npm install -g easy-coding-harness` 安装默认 latest 版本。
31
+
32
+ ## 版本与更新日志
33
+
34
+ 版本号严格使用 `x.y.z`:
35
+
36
+ - `x`:大的功能迭代;`0.x.x` 表示内测版本
37
+ - `y`:常规功能升级
38
+ - `z`:日常 bug 修复
39
+
40
+ 详细变更见 [CHANGELOG.md](CHANGELOG.md)。
41
+
42
+ ## 命令
43
+
44
+ | 命令 | 用途 |
45
+ |------|------|
46
+ | `easy-coding init` | 首次接入。`--agent=claude-code,codex,qoder` 选平台,`-y` 默认 claude-code |
47
+ | `easy-coding add-agent` | 给已有项目追加平台支持 |
48
+ | `easy-coding upgrade` | CLI 更新后同步项目里的功能文件(生成区覆盖,用户资产不动) |
49
+ | `easy-coding status` | 查看已装平台、版本、当前任务状态 |
50
+
51
+ ## 两阶段初始化
52
+
53
+ CLI 是纯文件搬运工,不做任何项目分析。初始化分两步:
54
+
55
+ 1. **CLI** `easy-coding init` —— 装文件 + 建 `project-init` 占位任务。
56
+ 2. **Agent** `/ec-init` —— agent 分析代码,生成 SOUL / RULES / ABSTRACT / TEST_STRATEGY,
57
+ 自动判断初创 vs 迭代项目。幂等,重复跑安全。
58
+
59
+ 之后日常工作统一走 `/ec-workflow`。
60
+
61
+ ## 12 个 skill
62
+
63
+ | skill | 职责 |
64
+ |------|------|
65
+ | ec-init | 项目知识初始化(幂等,一次性) |
66
+ | ec-workflow | 工作流状态机 + 任务发现/恢复(日常入口) |
67
+ | ec-brainstorming | 实现前设计探索(硬设计门,复刻 Superpowers 方法论) |
68
+ | ec-analysis | 需求分析 + 执行计划 + 测试策略 |
69
+ | ec-implementing | 编码实现 + 子代理并行调度 + 任务卡 |
70
+ | ec-reviewing | 多维度审查(accept/fix/replan/blocked) |
71
+ | ec-verification | 验证硬闸门 + 用户验收修复循环 |
72
+ | ec-memory | 短期滑动窗口 + 长期记忆沉淀(schema v2) |
73
+ | ec-task-management | 任务面板(创建 / 列表) |
74
+ | ec-task-close | 任务中断与关闭 |
75
+ | ec-git | git 操作约束 + 跨仓库提交 |
76
+ | ec-meta | harness 自身架构理解 + 本地定制 |
77
+
78
+ ## 三平台支持
79
+
80
+ | | Claude Code | Codex | Qoder |
81
+ |---|---|---|---|
82
+ | Skills 目录 | `.claude/skills/` | `.agents/skills/` | `.qoder/skills/` |
83
+ | 触发符 | `/` | `$` | `/` |
84
+ | Hook 配置 | `.claude/settings.json` | `.codex/hooks.json` | `.qoder/settings.json` |
85
+ | 主约束 | `CLAUDE.md` | `AGENTS.md` | `AGENTS.md` |
86
+ | 中国版 | — | — | `.qodercn/` |
87
+
88
+ 同一份 skill 模板,平台差异通过 `{{placeholder}}` 在安装时解析。
89
+
90
+ ## 工作流状态机
91
+
92
+ ```
93
+ INIT → ANALYSIS → WAITING_CONFIRM → IMPLEMENT → REVIEW → VERIFICATION
94
+ ↑ │
95
+ └──── 修复循环 ────────┘
96
+ [用户验收]
97
+ MEMORY_SHORT → MEMORY_LONG → COMPLETE
98
+ 任何阶段 ──[用户中断]──→ CLOSED
99
+ ```
100
+
101
+ ## 开发
102
+
103
+ ```bash
104
+ npm install
105
+ npm run build # tsup 编译 + 拷贝模板到 templates/
106
+ npm test # vitest
107
+ npm run lint # biome
108
+ ```
109
+
110
+ 源码结构:`src/commands/`(CLI 命令)、`src/configurators/`(平台配置器)、
111
+ `src/templates/`(skills / hooks / 子代理 / 主约束模板)、`src/types/`(运行时数据契约)、
112
+ `src/utils/`(文件写入 / 配置 / 分区替换等)。
package/dist/cli.d.ts ADDED
@@ -0,0 +1,2 @@
1
+
2
+ export { }