claude-everything-workflow 0.2.6 → 0.2.7
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/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/.mcp.json +14 -0
- package/AGENTS.md +4 -0
- package/CLAUDE.md +2 -0
- package/README.md +20 -0
- package/README.zh-CN.md +20 -0
- package/agents/e2e-runner.md +1 -0
- package/docs/plugins.md +4 -0
- package/package.json +2 -1
- package/rules/08-specialty-rules-index.md +1 -1
- package/rules/common/testing.md +6 -0
- package/scripts/install-rules.js +8 -4
- package/scripts/legacy-common-rule-hashes.json +16 -1
- package/scripts/verify/install-rules.test.js +30 -11
- package/scripts/verify/plugin-distribution.test.js +3 -0
- package/skills/e2e-testing/SKILL.md +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-everything-workflow",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.7",
|
|
4
4
|
"description": "Evidence-based engineering workflows: implement, debug, review and verify.",
|
|
5
5
|
"author": { "name": "xu91102" },
|
|
6
6
|
"homepage": "https://github.com/xu91102/claude-everything-Workflow",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-everything-workflow",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.7",
|
|
4
4
|
"description": "Evidence-based engineering workflows: implement, debug, review and verify.",
|
|
5
5
|
"author": { "name": "xu91102" },
|
|
6
6
|
"homepage": "https://github.com/xu91102/claude-everything-Workflow",
|
package/.mcp.json
ADDED
package/AGENTS.md
CHANGED
|
@@ -21,6 +21,10 @@
|
|
|
21
21
|
- Claude 升级时若保留了个人修改的旧 `~/.claude/rules/common/...`,该用户规则仍生效;读取同名参考前先检查并尊重该修改,不把新版通用参考覆盖到个人约束上。
|
|
22
22
|
- `rules/common/` 是专项参考区;仅命令、agent、skill 或当前任务明确触发时读取。
|
|
23
23
|
|
|
24
|
+
## 浏览器验证
|
|
25
|
+
|
|
26
|
+
需要复用用户已登录的 Chrome 做交互式验证时,按 `rules/common/testing.md` 的“浏览器验证”执行;不要新开浏览器验证登录态页面。
|
|
27
|
+
|
|
24
28
|
## 规则索引
|
|
25
29
|
|
|
26
30
|
| 规则文件 | 内容与触发场景 |
|
package/CLAUDE.md
CHANGED
package/README.md
CHANGED
|
@@ -71,6 +71,26 @@ The CLI selects the shell or PowerShell installer for your platform. The same `-
|
|
|
71
71
|
|
|
72
72
|
Installation updates user-level files and can affect multiple projects. Changed top-level configuration files are backed up; matching files inside shared directories are synchronized from the repository. Unknown files are generally retained, while known retired files are removed by an explicit cleanup list. Back up any personal edits to shared files before upgrading. Use the installer instead of copying the entire `rules/` directory: it handles the different rule locations used by each host.
|
|
73
73
|
|
|
74
|
+
A fresh Claude Code installation puts CEW’s base, Git and security rules in `~/.claude/rules/`. Other CEW rules are available on demand under `~/.claude/references/rules/`. On upgrade, personally edited copies of the three newly migrated rules stay active. Obsolete rules left by older releases can also still load.
|
|
75
|
+
|
|
76
|
+
### Browser verification (optional)
|
|
77
|
+
|
|
78
|
+
Interactive checks that need your existing login can reuse the running Chrome instead of opening a new browser. Claude Code plugin installs register the `chrome-devtools` MCP from the repository's `.mcp.json`; npm installs add it manually:
|
|
79
|
+
|
|
80
|
+
```sh
|
|
81
|
+
# Claude Code
|
|
82
|
+
claude mcp add -s user chrome-devtools -- \
|
|
83
|
+
npx -y chrome-devtools-mcp@latest --autoConnect \
|
|
84
|
+
--no-usage-statistics --no-performance-crux
|
|
85
|
+
|
|
86
|
+
# Codex
|
|
87
|
+
codex mcp add chrome-devtools -- \
|
|
88
|
+
npx -y chrome-devtools-mcp@latest --autoConnect \
|
|
89
|
+
--no-usage-statistics --no-performance-crux
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Requires Node.js 20.19+, Chrome 144+, and remote debugging enabled at `chrome://inspect/#remote-debugging`. If a `chrome-devtools` server already exists, add `--autoConnect` to it; without it the server opens a new browser instead of reusing the running Chrome. The agent lists open pages and selects the tab matching the project URL. Repeatable `npx playwright test` runs still use their own browser and should prepare login state with `storageState`.
|
|
93
|
+
|
|
74
94
|
## How it works
|
|
75
95
|
|
|
76
96
|
Start with a normal task request. The workflow router selects relevant skills; you do not need to memorize every skill name.
|
package/README.zh-CN.md
CHANGED
|
@@ -71,6 +71,26 @@ node bin/claude-everything-workflow.js install
|
|
|
71
71
|
|
|
72
72
|
安装修改的是用户级目录,可能影响多个项目。顶层配置内容不同时会先备份;共享目录中的同名文件按仓库版本同步。未知文件通常保留,已登记的退役文件按明确清单清理。升级前请备份对共享文件的个人修改。不要直接复制整个 `rules/` 目录,安装器会处理两个宿主不同的规则加载位置。
|
|
73
73
|
|
|
74
|
+
全新安装时,CEW 将执行原则、Git 和安全规则放入 Claude Code 自动读取的 `~/.claude/rules/`,其余规则从 `~/.claude/references/rules/` 按需读取。升级时,本次迁移的三份规则如有个人修改,仍在原处生效。更早版本遗留的退役规则也可能继续加载。
|
|
75
|
+
|
|
76
|
+
### 浏览器验证(可选)
|
|
77
|
+
|
|
78
|
+
需要在你已登录的页面上做交互式核对时,让 agent 连接你当前的 Chrome,而不是新开浏览器。Claude Code 插件安装会通过仓库根目录的 `.mcp.json` 注册 `chrome-devtools` MCP;npm 安装需手动添加:
|
|
79
|
+
|
|
80
|
+
```sh
|
|
81
|
+
# Claude Code
|
|
82
|
+
claude mcp add -s user chrome-devtools -- \
|
|
83
|
+
npx -y chrome-devtools-mcp@latest --autoConnect \
|
|
84
|
+
--no-usage-statistics --no-performance-crux
|
|
85
|
+
|
|
86
|
+
# Codex
|
|
87
|
+
codex mcp add chrome-devtools -- \
|
|
88
|
+
npx -y chrome-devtools-mcp@latest --autoConnect \
|
|
89
|
+
--no-usage-statistics --no-performance-crux
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
需要 Node.js 20.19+、Chrome 144+,并在 `chrome://inspect/#remote-debugging` 启用远程调试。已有同名 `chrome-devtools` 配置时,需为其补上 `--autoConnect`,否则会新开浏览器而不是复用当前 Chrome。agent 会先列出已打开的页面,按项目地址选中标签页。可复跑的 `npx playwright test` 仍使用独立浏览器,登录态通过 `storageState` 准备。
|
|
93
|
+
|
|
74
94
|
## 如何使用
|
|
75
95
|
|
|
76
96
|
直接用自然语言描述任务,路由会选择相关技能,不需要记住所有 Skill 名称。
|
package/agents/e2e-runner.md
CHANGED
|
@@ -14,6 +14,7 @@ model: sonnet
|
|
|
14
14
|
- 优先项目已有脚本、依赖和 CLI;Agent Browser/MCP 只做探索,不替代最终测试。
|
|
15
15
|
- 只修改本次 E2E 范围内的测试、配置和必要脚本,不顺手重构产品代码。
|
|
16
16
|
- 失败时先读取 CLI、trace、截图、视频和 HTML 报告,再判断测试、产品或环境根因。
|
|
17
|
+
- 可复跑测试用 Playwright CLI;需要登录态的交互式查看由主会话用 chrome-devtools MCP(`--autoConnect`)完成,不新开浏览器。
|
|
17
18
|
|
|
18
19
|
## 回传
|
|
19
20
|
|
package/docs/plugins.md
CHANGED
|
@@ -55,6 +55,10 @@ codex plugin add claude-everything-workflow@cew
|
|
|
55
55
|
|
|
56
56
|
CLI 命令以宿主版本为准;缺少 `plugin` 子命令时使用支持插件的应用版本或继续使用 npm 安装。
|
|
57
57
|
|
|
58
|
+
### 浏览器验证 MCP
|
|
59
|
+
|
|
60
|
+
Claude 插件根目录的 `.mcp.json` 会注册 `chrome-devtools` MCP,启用插件后无需手动配置。前置条件、手动添加命令和复用已登录 Chrome 的说明见 README 的“浏览器验证(可选)”。
|
|
61
|
+
|
|
58
62
|
## 与 npm 安装的区别
|
|
59
63
|
|
|
60
64
|
| 项目 | 插件安装 | npm 安装 |
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-everything-workflow",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.7",
|
|
4
4
|
"description": "Claude Code and Codex harness with rules, skills, agents, hooks, and verification gates.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"claude-code",
|
|
@@ -31,6 +31,7 @@
|
|
|
31
31
|
"yaml": "2.9.0"
|
|
32
32
|
},
|
|
33
33
|
"files": [
|
|
34
|
+
".mcp.json",
|
|
34
35
|
".claude-plugin/",
|
|
35
36
|
".codex-plugin/",
|
|
36
37
|
".agents/plugins/marketplace.json",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
| Hook 行为、退出码、Profile、权限 | `common/hooks.md` |
|
|
13
13
|
| Token、MCP、模型和上下文成本 | `common/performance.md` |
|
|
14
14
|
| 外部 skill 学习、模式保存、演化评估 | `common/skills-learning.md` |
|
|
15
|
-
| 测试策略、TDD、E2E
|
|
15
|
+
| 测试策略、TDD、E2E、浏览器验证、验证范围 | `common/testing.md` |
|
|
16
16
|
| 提交、推送、PR、CI 质量门 | `05-git-workflow.md`、`common/pr-automation.md` |
|
|
17
17
|
| 安全敏感实现或安全审查 | `07-forbidden.md` |
|
|
18
18
|
| 架构与兼容、错误处理、代码规模、注释 | `02-implementation.md` |
|
package/rules/common/testing.md
CHANGED
|
@@ -35,3 +35,9 @@
|
|
|
35
35
|
## 端到端测试
|
|
36
36
|
|
|
37
37
|
Playwright 的组织、等待、POM、CI 制品和 flake 处理以 `skills/e2e-testing/SKILL.md` 为准;探索工具不能替代可重复的 E2E。本地多 worktree 运行时隔离端口和环境变量,启动服务必须等待 Web/API ready。CI 失败时按 `skills/e2e-testing/SKILL.md` 保留失败制品。
|
|
38
|
+
|
|
39
|
+
## 浏览器验证
|
|
40
|
+
|
|
41
|
+
- 需要登录态时复用已有会话;连接失败不另开浏览器绕过。
|
|
42
|
+
- 操作前确认目标页面,不关闭或修改无关页面。
|
|
43
|
+
- 可复跑测试使用独立测试登录态,不依赖用户日常会话。
|
package/scripts/install-rules.js
CHANGED
|
@@ -8,6 +8,9 @@ const crypto = require("node:crypto");
|
|
|
8
8
|
const digest = (content) => crypto.createHash("sha256")
|
|
9
9
|
.update(content.toString("utf8").replace(/\r\n/g, "\n")).digest("hex");
|
|
10
10
|
|
|
11
|
+
// Only cross-task policies belong in Claude's automatically loaded rules directory.
|
|
12
|
+
const claudeResidentRules = new Set(["01-base.md", "05-git-workflow.md", "07-forbidden.md"]);
|
|
13
|
+
|
|
11
14
|
// Check the root and every descendant before touching a managed file; do not follow links.
|
|
12
15
|
function checkedPath(root, relative) {
|
|
13
16
|
const target = path.resolve(root, relative);
|
|
@@ -44,7 +47,7 @@ function copyRule({ source, root, relative, dryRun, log }) {
|
|
|
44
47
|
}
|
|
45
48
|
}
|
|
46
49
|
|
|
47
|
-
function
|
|
50
|
+
function retireRule({ source, root, relative, knownHashes, dryRun, log }) {
|
|
48
51
|
const target = checkedPath(root, relative);
|
|
49
52
|
if (!fs.existsSync(target)) return;
|
|
50
53
|
const hash = digest(fs.readFileSync(target));
|
|
@@ -67,18 +70,19 @@ function installRules({ sourceRoot, installRoot, host, dryRun = false, log = con
|
|
|
67
70
|
const commonFiles = fs.readdirSync(path.join(rulesRoot, "common"), { withFileTypes: true })
|
|
68
71
|
.filter((entry) => entry.isFile() && entry.name.endsWith(".md"))
|
|
69
72
|
.map((entry) => `common/${entry.name}`);
|
|
73
|
+
const installedOnDemand = (relative) => host === "claude-code" && !claudeResidentRules.has(relative);
|
|
70
74
|
// Validate all managed destinations before the first write, including upgrade cleanup paths.
|
|
71
75
|
for (const relative of [...files, ...commonFiles]) {
|
|
72
76
|
checkedPath(root, `rules/${relative}`);
|
|
73
|
-
if (
|
|
77
|
+
if (installedOnDemand(relative)) {
|
|
74
78
|
checkedPath(root, `references/rules/${relative}`);
|
|
75
79
|
}
|
|
76
80
|
}
|
|
77
81
|
for (const relative of [...files, ...commonFiles]) {
|
|
78
82
|
const source = path.join(rulesRoot, relative);
|
|
79
|
-
const cold =
|
|
83
|
+
const cold = installedOnDemand(relative);
|
|
80
84
|
copyRule({ source, root, relative: `${cold ? "references/rules" : "rules"}/${relative}`, dryRun, log });
|
|
81
|
-
if (cold)
|
|
85
|
+
if (cold) retireRule({ source, root, relative: `rules/${relative}`,
|
|
82
86
|
knownHashes: legacy.files[relative] || [], dryRun, log });
|
|
83
87
|
}
|
|
84
88
|
}
|
|
@@ -1,8 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 1,
|
|
3
3
|
"algorithm": "sha256-lf",
|
|
4
|
-
"source": "origin/main history through a4f938bc70f3f85e4dcfad4d2534f522b823ea20",
|
|
4
|
+
"source": "common/: origin/main history through a4f938bc70f3f85e4dcfad4d2534f522b823ea20; top-level rules: first-parent main history through 7326e4b",
|
|
5
5
|
"files": {
|
|
6
|
+
"02-implementation.md": [
|
|
7
|
+
"1bbe491d9b89e37a6a6d004e1b6e1ccd7478b94341e7b4c51ce8d01fad585c7f",
|
|
8
|
+
"700331676ad40d65acdeb469a67cf802cddff78ebf0861ec5e4427b5a3d23620"
|
|
9
|
+
],
|
|
10
|
+
"08-specialty-rules-index.md": [
|
|
11
|
+
"283aba947990fd768597546f3aab12f8754d4d91968d6d119c3f5828c6be40dd",
|
|
12
|
+
"3fe1bcb7bdbad9ff8b074a36afd96b96fdf0da21c483b842c4ce2042ca398999",
|
|
13
|
+
"70f531356fd1fbd11d62ea0b2b43be82c278e975b43335a8b3956c207a930ef1",
|
|
14
|
+
"7ebf3b13e750fca3888843994ed43aba880ab98bdb8094b1f9070247d3791415"
|
|
15
|
+
],
|
|
16
|
+
"09-first-principles-adversarial-testing.md": [
|
|
17
|
+
"182ab761713451fd9b04c290a070e0235a52833f52cbaf695f065363675faf2f",
|
|
18
|
+
"72b71a851e9349e19806ae66258843b2394d7acbadc4e6498788af6337ba8357",
|
|
19
|
+
"d912674d84c1427d24d9d716d28cc57b926a4cf49284cffd46473d02219a0a57"
|
|
20
|
+
],
|
|
6
21
|
"common/agent-orchestration.md": [
|
|
7
22
|
"0518525f093f91b60dbae5259e0f228686687abdd65787b880f59e286c2e546c",
|
|
8
23
|
"3b5095839ff85adefb7324518526be65c473770df9124d190137ba05721ca6bf",
|
|
@@ -271,7 +271,10 @@ function checkInstallerEntrypoint() {
|
|
|
271
271
|
assert.equal(fs.existsSync(path.join(profile, ".claude/rules/common/testing.md")), false);
|
|
272
272
|
assert.equal(read(path.join(profile, ".codex/rules/common/testing.md")),
|
|
273
273
|
read(path.join(sourceRoot, "rules/common/testing.md")));
|
|
274
|
-
|
|
274
|
+
const claudeBootstrap = read(path.join(profile, ".claude/CLAUDE.md"));
|
|
275
|
+
assert.match(claudeBootstrap, /^@AGENTS\.md$/m);
|
|
276
|
+
assert.ok(claudeBootstrap.includes("~/.claude/references/rules/"),
|
|
277
|
+
"Claude's installed entry must locate on-demand rules outside the startup directory");
|
|
275
278
|
for (const host of [".claude", ".codex"]) {
|
|
276
279
|
assert.equal(read(path.join(profile, host, "references/git-worktrees.md")),
|
|
277
280
|
read(path.join(sourceRoot, "references/git-worktrees.md")));
|
|
@@ -299,17 +302,18 @@ try {
|
|
|
299
302
|
const fresh = path.join(tempRoot, "fresh");
|
|
300
303
|
const common = fs.readdirSync(path.join(sourceRoot, "rules/common"));
|
|
301
304
|
assert.equal(common.length, 8);
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
assert.equal(read(path.join(fresh, "rules/07-forbidden.md")),
|
|
308
|
-
read(path.join(sourceRoot, "rules/07-forbidden.md")));
|
|
309
|
-
|
|
305
|
+
const resident = ["01-base.md", "05-git-workflow.md", "07-forbidden.md"];
|
|
306
|
+
const onDemand = [
|
|
307
|
+
"02-implementation.md", "08-specialty-rules-index.md", "09-first-principles-adversarial-testing.md",
|
|
308
|
+
];
|
|
309
|
+
assert.deepEqual(fs.readdirSync(path.join(fresh, "rules")).sort(), resident);
|
|
310
310
|
install("codex", "codex");
|
|
311
|
-
|
|
312
|
-
read(path.join(sourceRoot, "rules
|
|
311
|
+
for (const file of [...resident, ...onDemand, ...common.map((name) => `common/${name}`)]) {
|
|
312
|
+
const source = read(path.join(sourceRoot, "rules", file));
|
|
313
|
+
const claudeDir = resident.includes(file) ? "rules" : "references/rules";
|
|
314
|
+
assert.equal(read(path.join(fresh, claudeDir, file)), source);
|
|
315
|
+
assert.equal(read(path.join(tempRoot, "codex/rules", file)), source);
|
|
316
|
+
}
|
|
313
317
|
install("preview", "claude-code", true);
|
|
314
318
|
assert.equal(fs.existsSync(path.join(tempRoot, "preview")), false);
|
|
315
319
|
|
|
@@ -319,6 +323,15 @@ try {
|
|
|
319
323
|
path.join(upgrade, "rules/common/testing.md"));
|
|
320
324
|
fs.writeFileSync(path.join(upgrade, "rules/common/hooks.md"), "Personal hook policy\n");
|
|
321
325
|
fs.writeFileSync(path.join(upgrade, "rules/common/personal.md"), "Keep my rules\n");
|
|
326
|
+
for (const file of onDemand) {
|
|
327
|
+
fs.copyFileSync(path.join(sourceRoot, "rules", file), path.join(upgrade, "rules", file));
|
|
328
|
+
}
|
|
329
|
+
const customRule = "02-implementation.md";
|
|
330
|
+
const personal = path.join(upgrade, "rules", customRule);
|
|
331
|
+
fs.writeFileSync(personal, "Personal implementation rules\n");
|
|
332
|
+
install("upgrade", "claude-code", true);
|
|
333
|
+
assert.equal(fs.existsSync(path.join(upgrade, "references")), false);
|
|
334
|
+
for (const file of onDemand) assert.ok(fs.existsSync(path.join(upgrade, "rules", file)));
|
|
322
335
|
install("upgrade");
|
|
323
336
|
assert.equal(fs.existsSync(path.join(upgrade, "rules/common/testing.md")), false);
|
|
324
337
|
assert.equal(read(path.join(upgrade, "rules/common/hooks.md")), "Personal hook policy\n");
|
|
@@ -327,6 +340,12 @@ try {
|
|
|
327
340
|
install("upgrade");
|
|
328
341
|
assert.equal(read(path.join(upgrade, "rules/common/hooks.md")), "Personal hook policy\n");
|
|
329
342
|
|
|
343
|
+
assert.equal(read(personal), "Personal implementation rules\n");
|
|
344
|
+
for (const file of onDemand) {
|
|
345
|
+
assert.equal(fs.existsSync(path.join(upgrade, "rules", file)), file === customRule);
|
|
346
|
+
assert.equal(read(path.join(upgrade, "references/rules", file)), read(path.join(sourceRoot, "rules", file)));
|
|
347
|
+
}
|
|
348
|
+
|
|
330
349
|
const outside = path.join(tempRoot, "outside");
|
|
331
350
|
fs.mkdirSync(outside);
|
|
332
351
|
const linked = path.join(tempRoot, "linked");
|
|
@@ -24,6 +24,9 @@ test("both marketplaces resolve to the same self-contained, versioned workflow p
|
|
|
24
24
|
const source = market.plugins[0].source;
|
|
25
25
|
assert.equal(path.resolve(root, typeof source === "string" ? source : source.path), root);
|
|
26
26
|
}
|
|
27
|
+
const mcp = readJson(".mcp.json");
|
|
28
|
+
assert.equal(mcp.mcpServers["chrome-devtools"].command, "npx");
|
|
29
|
+
assert.ok(mcp.mcpServers["chrome-devtools"].args.includes("--autoConnect"));
|
|
27
30
|
assert.ok(fs.existsSync(path.join(root, codex.skills, "using-superpowers/SKILL.md")));
|
|
28
31
|
assert.ok(!("hooks" in codex), "Claude hook events must not be advertised as Codex hooks");
|
|
29
32
|
const hooks = readJson(claude.hooks).hooks;
|
|
@@ -13,7 +13,7 @@ origin: ECC
|
|
|
13
13
|
1. 读取 `package.json`、lockfile、CI 配置和现有测试目录,确认包管理器与脚本。
|
|
14
14
|
2. 查找 `playwright.config.*`、`tests/e2e/`、`e2e/`、`BASE_URL`、启动命令和测试数据准备方式。
|
|
15
15
|
3. 优先使用项目已有依赖和 `npx playwright test`;缺少浏览器时再处理安装。
|
|
16
|
-
4.
|
|
16
|
+
4. 交互式探索和定位用 chrome-devtools MCP 连接用户已打开的 Chrome(`--autoConnect`),不新开浏览器;细节见 `rules/common/testing.md` 的“浏览器验证”,它不替代最终测试或报告。
|
|
17
17
|
|
|
18
18
|
## 执行契约
|
|
19
19
|
|