claude-everything-workflow 0.2.2 → 0.2.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.
- package/.agents/plugins/marketplace.json +12 -0
- package/.claude-plugin/hooks.json +33 -0
- package/.claude-plugin/marketplace.json +12 -0
- package/.claude-plugin/plugin.json +10 -0
- package/.codex-plugin/plugin.json +20 -0
- package/AGENTS.md +13 -18
- package/CLAUDE.md +1 -5
- package/README.md +101 -368
- package/README.zh-CN.md +158 -0
- package/agents/database-reviewer.md +0 -3
- package/agents/e2e-runner.md +8 -141
- package/commands/code-review.md +9 -30
- package/commands/pr.md +1 -6
- package/commands/verify.md +7 -11
- package/docs/plugins.md +91 -0
- package/harness/manifest.json +310 -0
- package/package.json +14 -2
- package/references/git-worktrees.md +29 -0
- package/rules/01-base.md +9 -26
- package/rules/02-code-size.md +5 -9
- package/rules/03-architecture.md +8 -22
- package/rules/04-error-handling.md +4 -5
- package/rules/05-git-workflow.md +6 -3
- package/rules/06-comments.md +3 -9
- package/rules/07-forbidden.md +4 -3
- package/rules/common/agent-orchestration.md +2 -4
- package/rules/common/context-hygiene.md +2 -0
- package/rules/common/hooks.md +2 -0
- package/rules/common/pr-automation.md +1 -1
- package/rules/common/skills-learning.md +2 -2
- package/rules/common/testing.md +10 -2
- package/scripts/install-rules.js +100 -0
- package/scripts/install.ps1 +29 -3
- package/scripts/install.sh +26 -2
- package/scripts/legacy-common-rule-hashes.json +78 -0
- package/scripts/retired-skill-files.json +26 -0
- package/scripts/upstream-capability-map.json +14 -9
- package/scripts/verify/continuation-checks.test.js +101 -0
- package/scripts/verify/core.js +1 -0
- package/scripts/verify/grilling-spec-gate-checks.js +48 -11
- package/scripts/verify/install-rules.test.js +165 -0
- package/scripts/verify/metadata-checks.js +35 -26
- package/scripts/verify/plugin-distribution.test.js +40 -0
- package/scripts/verify/repository-checks.js +39 -80
- package/scripts/verify/skill-invocation.test.js +87 -0
- package/scripts/verify/skill-manifest-checks.js +197 -0
- package/scripts/verify/skill-manifest-checks.test.js +135 -0
- package/scripts/verify/workflow-checks.js +28 -150
- package/scripts/verify-harness.js +2 -0
- package/scripts/verify-upstream-capability-map.js +2 -1
- package/skills/README.md +11 -15
- package/skills/code-review/SKILL.md +54 -41
- package/skills/codebase-design/SKILL.md +1 -1
- package/skills/continuous-learning-v2/SKILL.md +4 -2
- package/skills/domain-modeling/SKILL.md +9 -6
- package/skills/e2e-testing/SKILL.md +20 -310
- package/skills/e2e-testing/references/playwright-patterns.md +324 -0
- package/skills/feature-acceptance/SKILL.md +6 -2
- package/skills/grilling/SKILL.md +4 -3
- package/skills/handoff/SKILL.md +3 -4
- package/skills/handoff/agents/openai.yaml +5 -0
- package/skills/implement/SKILL.md +32 -81
- package/skills/implement/references/ticket-delivery.md +43 -0
- package/skills/improve-codebase-architecture/SKILL.md +1 -2
- package/skills/improve-codebase-architecture/agents/openai.yaml +5 -0
- package/skills/prototype/SKILL.md +1 -1
- package/skills/resolving-merge-conflicts/SKILL.md +1 -1
- package/skills/spec-gate/SKILL.md +4 -2
- package/skills/subagent-driven-development/SKILL.md +3 -3
- package/skills/systematic-debugging/SKILL.md +41 -3
- package/skills/systematic-debugging/references/diagnostic-scenarios.md +28 -0
- package/skills/test-driven-development/SKILL.md +6 -2
- package/skills/to-tickets/SKILL.md +5 -3
- package/skills/triage/SKILL.md +4 -4
- package/skills/triage/agents/openai.yaml +5 -0
- package/skills/using-superpowers/SKILL.md +33 -96
- package/skills/using-superpowers/references/process-outcomes.md +44 -0
- package/skills/visual-companion/SKILL.md +1 -1
- package/agents/architect.md +0 -59
- package/agents/code-reviewer.md +0 -28
- package/agents/planner.md +0 -40
- package/agents/tdd-guide.md +0 -101
- package/references/agents/database-reviewer.md +0 -657
- package/skills/find-skills/SKILL.md +0 -142
- package/skills/iterative-retrieval/SKILL.md +0 -84
- package/skills/project-context/SKILL.md +0 -94
- package/skills/project-context/agents/openai.yaml +0 -6
- package/skills/project-context/references/project-context-template.md +0 -61
- package/skills/research/SKILL.md +0 -48
- package/skills/using-git-worktrees/SKILL.md +0 -64
- package/skills/verification-before-completion/SKILL.md +0 -77
- package/skills/wayfinder/SKILL.md +0 -57
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
|
|
4
|
+
const fs = require("node:fs");
|
|
5
|
+
const path = require("node:path");
|
|
6
|
+
const crypto = require("node:crypto");
|
|
7
|
+
|
|
8
|
+
const digest = (content) => crypto.createHash("sha256")
|
|
9
|
+
.update(content.toString("utf8").replace(/\r\n/g, "\n")).digest("hex");
|
|
10
|
+
|
|
11
|
+
// Check the root and every descendant before touching a managed file; do not follow links.
|
|
12
|
+
function checkedPath(root, relative) {
|
|
13
|
+
const target = path.resolve(root, relative);
|
|
14
|
+
if (target !== root && !target.startsWith(root + path.sep)) {
|
|
15
|
+
throw new Error(`Path escapes install root: ${relative}`);
|
|
16
|
+
}
|
|
17
|
+
let cursor = target;
|
|
18
|
+
for (;;) {
|
|
19
|
+
try {
|
|
20
|
+
if (fs.lstatSync(cursor).isSymbolicLink()) throw new Error(`Refusing symlink: ${cursor}`);
|
|
21
|
+
} catch (error) {
|
|
22
|
+
if (error.code !== "ENOENT") throw error;
|
|
23
|
+
}
|
|
24
|
+
if (cursor === root) break;
|
|
25
|
+
cursor = path.dirname(cursor);
|
|
26
|
+
}
|
|
27
|
+
return target;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function copyRule({ source, root, relative, dryRun, log }) {
|
|
31
|
+
const target = checkedPath(root, relative);
|
|
32
|
+
const content = fs.readFileSync(source);
|
|
33
|
+
if (fs.existsSync(target)) {
|
|
34
|
+
const previous = fs.readFileSync(target);
|
|
35
|
+
if (content.equals(previous)) return;
|
|
36
|
+
const backup = checkedPath(root, relative + ".bak." + digest(previous));
|
|
37
|
+
log(`${dryRun ? "[dry-run] " : ""}备份规则: ${backup}`);
|
|
38
|
+
if (!dryRun && !fs.existsSync(backup)) fs.copyFileSync(target, backup, fs.constants.COPYFILE_EXCL);
|
|
39
|
+
}
|
|
40
|
+
log(`${dryRun ? "[dry-run] " : ""}安装规则: ${target}`);
|
|
41
|
+
if (!dryRun) {
|
|
42
|
+
fs.mkdirSync(path.dirname(target), { recursive: true });
|
|
43
|
+
fs.copyFileSync(source, target);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function retireCommon({ source, root, relative, knownHashes, dryRun, log }) {
|
|
48
|
+
const target = checkedPath(root, relative);
|
|
49
|
+
if (!fs.existsSync(target)) return;
|
|
50
|
+
const hash = digest(fs.readFileSync(target));
|
|
51
|
+
if (hash !== digest(fs.readFileSync(source)) && !knownHashes.includes(hash)) {
|
|
52
|
+
log(`保留个人修改,仍可能自动加载: ${target}`);
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
log(`${dryRun ? "[dry-run] " : ""}移除已迁移的分发规则: ${target}`);
|
|
56
|
+
if (!dryRun) fs.unlinkSync(target);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function installRules({ sourceRoot, installRoot, host, dryRun = false, log = console.log }) {
|
|
60
|
+
if (!["claude-code", "codex"].includes(host)) throw new Error(`Invalid host: ${host}`);
|
|
61
|
+
const root = path.resolve(installRoot);
|
|
62
|
+
const rulesRoot = path.join(sourceRoot, "rules");
|
|
63
|
+
const legacy = JSON.parse(fs.readFileSync(path.join(sourceRoot, "scripts/legacy-common-rule-hashes.json"), "utf8"));
|
|
64
|
+
const files = fs.readdirSync(rulesRoot, { withFileTypes: true })
|
|
65
|
+
.filter((entry) => entry.isFile() && entry.name.endsWith(".md"))
|
|
66
|
+
.map((entry) => entry.name);
|
|
67
|
+
const commonFiles = fs.readdirSync(path.join(rulesRoot, "common"), { withFileTypes: true })
|
|
68
|
+
.filter((entry) => entry.isFile() && entry.name.endsWith(".md"))
|
|
69
|
+
.map((entry) => `common/${entry.name}`);
|
|
70
|
+
// Validate all managed destinations before the first write, including upgrade cleanup paths.
|
|
71
|
+
for (const relative of [...files, ...commonFiles]) {
|
|
72
|
+
checkedPath(root, `rules/${relative}`);
|
|
73
|
+
if (host === "claude-code" && relative.startsWith("common/")) {
|
|
74
|
+
checkedPath(root, `references/rules/${relative}`);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
for (const relative of [...files, ...commonFiles]) {
|
|
78
|
+
const source = path.join(rulesRoot, relative);
|
|
79
|
+
const cold = host === "claude-code" && relative.startsWith("common/");
|
|
80
|
+
copyRule({ source, root, relative: `${cold ? "references/rules" : "rules"}/${relative}`, dryRun, log });
|
|
81
|
+
if (cold) retireCommon({ source, root, relative: `rules/${relative}`,
|
|
82
|
+
knownHashes: legacy.files[relative] || [], dryRun, log });
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
module.exports = { installRules };
|
|
87
|
+
|
|
88
|
+
if (require.main === module) {
|
|
89
|
+
const [host, installRoot, ...options] = process.argv.slice(2);
|
|
90
|
+
try {
|
|
91
|
+
if (!installRoot || options.some((option) => option !== "--dry-run")) {
|
|
92
|
+
throw new Error("Usage: install-rules.js <claude-code|codex> <install-root> [--dry-run]");
|
|
93
|
+
}
|
|
94
|
+
installRules({ sourceRoot: path.resolve(__dirname, ".."), installRoot, host,
|
|
95
|
+
dryRun: options.includes("--dry-run") });
|
|
96
|
+
} catch (error) {
|
|
97
|
+
process.stderr.write(`${error.message}\n`);
|
|
98
|
+
process.exitCode = 1;
|
|
99
|
+
}
|
|
100
|
+
}
|
package/scripts/install.ps1
CHANGED
|
@@ -137,6 +137,11 @@ function Copy-DirectoryMerge {
|
|
|
137
137
|
}
|
|
138
138
|
|
|
139
139
|
$destDir = Join-Path $DestinationRoot $Name
|
|
140
|
+
$existingDest = Get-Item -LiteralPath $destDir -Force -ErrorAction SilentlyContinue
|
|
141
|
+
if ($null -ne $existingDest -and ($existingDest.Attributes -band [IO.FileAttributes]::ReparsePoint)) {
|
|
142
|
+
throw "Refusing to merge into symlinked destination: $destDir"
|
|
143
|
+
}
|
|
144
|
+
|
|
140
145
|
Invoke-InstallCommand `
|
|
141
146
|
-Description "New-Item -ItemType Directory '$destDir'" `
|
|
142
147
|
-Action { New-Item -ItemType Directory -Path $destDir -Force | Out-Null }
|
|
@@ -150,13 +155,13 @@ function Install-SharedDirs {
|
|
|
150
155
|
param([string]$Destination)
|
|
151
156
|
|
|
152
157
|
$dirs = @(
|
|
153
|
-
"rules",
|
|
154
158
|
"agents",
|
|
155
159
|
"commands",
|
|
156
160
|
"scripts",
|
|
157
161
|
"hooks",
|
|
158
162
|
"skills",
|
|
159
|
-
"references"
|
|
163
|
+
"references",
|
|
164
|
+
"harness"
|
|
160
165
|
)
|
|
161
166
|
|
|
162
167
|
foreach ($dir in $dirs) {
|
|
@@ -170,6 +175,8 @@ function Remove-PackageOnlyPaths {
|
|
|
170
175
|
$packageOnlyFiles = @(
|
|
171
176
|
"scripts\install.sh",
|
|
172
177
|
"scripts\install.ps1",
|
|
178
|
+
"scripts\install-rules.js",
|
|
179
|
+
"scripts\legacy-common-rule-hashes.json",
|
|
173
180
|
"scripts\verify-harness.js",
|
|
174
181
|
"scripts\verify\core.js",
|
|
175
182
|
"scripts\verify\grilling-spec-gate-checks.js",
|
|
@@ -178,7 +185,13 @@ function Remove-PackageOnlyPaths {
|
|
|
178
185
|
"scripts\verify\runtime-checks.js",
|
|
179
186
|
"scripts\verify\workflow-checks.js",
|
|
180
187
|
"scripts\verify\workflow-ownership-fixtures.js",
|
|
181
|
-
"scripts\verify\workflow-ownership.js"
|
|
188
|
+
"scripts\verify\workflow-ownership.js",
|
|
189
|
+
"scripts\verify\skill-manifest-checks.js",
|
|
190
|
+
"scripts\verify\skill-manifest-checks.test.js",
|
|
191
|
+
"scripts\verify\skill-invocation.test.js",
|
|
192
|
+
"scripts\verify\continuation-checks.test.js",
|
|
193
|
+
"scripts\verify\install-rules.test.js",
|
|
194
|
+
"scripts\verify\plugin-distribution.test.js"
|
|
182
195
|
)
|
|
183
196
|
|
|
184
197
|
foreach ($relative in $packageOnlyFiles) {
|
|
@@ -299,6 +312,7 @@ function Install-ClaudeWorkflow {
|
|
|
299
312
|
Copy-ClaudeSettings -Source (Join-Path $RootDir "settings.json") -Destination $settingsPath
|
|
300
313
|
Convert-ClaudeSettingsHookPaths -SettingsPath $settingsPath
|
|
301
314
|
Install-SharedDirs -Destination $dest
|
|
315
|
+
Install-WorkflowRules -Destination $dest -HostName "claude-code"
|
|
302
316
|
Remove-RetiredSkills -Destination $dest
|
|
303
317
|
Remove-PackageOnlyPaths -Destination $dest
|
|
304
318
|
}
|
|
@@ -314,10 +328,22 @@ function Install-CodexWorkflow {
|
|
|
314
328
|
Remove-ObsoleteWorkflowPaths -Destination $dest
|
|
315
329
|
Copy-ConfigFile -Source (Join-Path $RootDir "AGENTS.md") -Destination (Join-Path $dest "AGENTS.md")
|
|
316
330
|
Install-SharedDirs -Destination $dest
|
|
331
|
+
Install-WorkflowRules -Destination $dest -HostName "codex"
|
|
317
332
|
Remove-RetiredSkills -Destination $dest
|
|
318
333
|
Remove-PackageOnlyPaths -Destination $dest
|
|
319
334
|
}
|
|
320
335
|
|
|
336
|
+
function Install-WorkflowRules {
|
|
337
|
+
param([string]$Destination, [string]$HostName)
|
|
338
|
+
|
|
339
|
+
$ruleArgs = @((Join-Path $RootDir "scripts\install-rules.js"), $HostName, $Destination)
|
|
340
|
+
if ($DryRun) { $ruleArgs += "--dry-run" }
|
|
341
|
+
& node @ruleArgs
|
|
342
|
+
if ($LASTEXITCODE -ne 0) {
|
|
343
|
+
throw "Rule installation failed with exit code $LASTEXITCODE"
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
|
|
321
347
|
Test-RetiredSkillManifest
|
|
322
348
|
|
|
323
349
|
if ($InstallClaude) {
|
package/scripts/install.sh
CHANGED
|
@@ -103,6 +103,11 @@ copy_dir() {
|
|
|
103
103
|
return
|
|
104
104
|
fi
|
|
105
105
|
|
|
106
|
+
if [ -L "$dest_root/$name" ]; then
|
|
107
|
+
echo "Refusing to merge into symlinked destination: $dest_root/$name" >&2
|
|
108
|
+
exit 1
|
|
109
|
+
fi
|
|
110
|
+
|
|
106
111
|
run mkdir -p "$dest_root/$name"
|
|
107
112
|
run rsync -a "$ROOT_DIR/$name/" "$dest_root/$name/"
|
|
108
113
|
}
|
|
@@ -121,13 +126,13 @@ require_rsync() {
|
|
|
121
126
|
install_shared_dirs() {
|
|
122
127
|
local dest="$1"
|
|
123
128
|
|
|
124
|
-
copy_dir rules "$dest"
|
|
125
129
|
copy_dir agents "$dest"
|
|
126
130
|
copy_dir commands "$dest"
|
|
127
131
|
copy_dir scripts "$dest"
|
|
128
132
|
copy_dir hooks "$dest"
|
|
129
133
|
copy_dir skills "$dest"
|
|
130
134
|
copy_dir references "$dest"
|
|
135
|
+
copy_dir harness "$dest"
|
|
131
136
|
}
|
|
132
137
|
|
|
133
138
|
remove_package_only_paths() {
|
|
@@ -136,6 +141,8 @@ remove_package_only_paths() {
|
|
|
136
141
|
for file in \
|
|
137
142
|
"scripts/install.sh" \
|
|
138
143
|
"scripts/install.ps1" \
|
|
144
|
+
"scripts/install-rules.js" \
|
|
145
|
+
"scripts/legacy-common-rule-hashes.json" \
|
|
139
146
|
"scripts/verify-harness.js" \
|
|
140
147
|
"scripts/verify/core.js" \
|
|
141
148
|
"scripts/verify/grilling-spec-gate-checks.js" \
|
|
@@ -144,7 +151,13 @@ remove_package_only_paths() {
|
|
|
144
151
|
"scripts/verify/runtime-checks.js" \
|
|
145
152
|
"scripts/verify/workflow-checks.js" \
|
|
146
153
|
"scripts/verify/workflow-ownership-fixtures.js" \
|
|
147
|
-
"scripts/verify/workflow-ownership.js"
|
|
154
|
+
"scripts/verify/workflow-ownership.js" \
|
|
155
|
+
"scripts/verify/skill-manifest-checks.js" \
|
|
156
|
+
"scripts/verify/skill-manifest-checks.test.js" \
|
|
157
|
+
"scripts/verify/skill-invocation.test.js" \
|
|
158
|
+
"scripts/verify/continuation-checks.test.js" \
|
|
159
|
+
"scripts/verify/install-rules.test.js" \
|
|
160
|
+
"scripts/verify/plugin-distribution.test.js"
|
|
148
161
|
do
|
|
149
162
|
if [ -f "$dest/$file" ]; then
|
|
150
163
|
run rm -f "$dest/$file"
|
|
@@ -229,6 +242,7 @@ install_claude() {
|
|
|
229
242
|
copy_file "$ROOT_DIR/AGENTS.md" "$dest/AGENTS.md"
|
|
230
243
|
copy_claude_settings "$ROOT_DIR/settings.json" "$dest/settings.json"
|
|
231
244
|
install_shared_dirs "$dest"
|
|
245
|
+
install_workflow_rules claude-code "$dest"
|
|
232
246
|
cleanup_retired_skills "$dest"
|
|
233
247
|
remove_package_only_paths "$dest"
|
|
234
248
|
}
|
|
@@ -241,10 +255,20 @@ install_codex() {
|
|
|
241
255
|
remove_obsolete_workflow_paths "$dest"
|
|
242
256
|
copy_file "$ROOT_DIR/AGENTS.md" "$dest/AGENTS.md"
|
|
243
257
|
install_shared_dirs "$dest"
|
|
258
|
+
install_workflow_rules codex "$dest"
|
|
244
259
|
cleanup_retired_skills "$dest"
|
|
245
260
|
remove_package_only_paths "$dest"
|
|
246
261
|
}
|
|
247
262
|
|
|
263
|
+
install_workflow_rules() {
|
|
264
|
+
local host_name="$1"
|
|
265
|
+
local dest="$2"
|
|
266
|
+
# Bash <4.4 treats empty arrays as unset under set -u.
|
|
267
|
+
local options=("$ROOT_DIR/scripts/install-rules.js" "$host_name" "$dest")
|
|
268
|
+
if [ "$DRY_RUN" -eq 1 ]; then options+=(--dry-run); fi
|
|
269
|
+
node "${options[@]}"
|
|
270
|
+
}
|
|
271
|
+
|
|
248
272
|
validate_retired_skill_manifest
|
|
249
273
|
require_rsync
|
|
250
274
|
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 1,
|
|
3
|
+
"algorithm": "sha256-lf",
|
|
4
|
+
"source": "origin/main history through a4f938bc70f3f85e4dcfad4d2534f522b823ea20",
|
|
5
|
+
"files": {
|
|
6
|
+
"common/agent-orchestration.md": [
|
|
7
|
+
"0518525f093f91b60dbae5259e0f228686687abdd65787b880f59e286c2e546c",
|
|
8
|
+
"3b5095839ff85adefb7324518526be65c473770df9124d190137ba05721ca6bf",
|
|
9
|
+
"3fb0846a2c57b833c12195610bab569e295981e2d2b6b33aa72660220be8131f",
|
|
10
|
+
"4840d178f06f4bdd9b67de8acb5bf4cc00b456f7dd5245db0cc5831c20b0587e",
|
|
11
|
+
"93a4101d3f6bb15dd8274a6064ae30c1bff43174a89384ce87a767e40b88805f",
|
|
12
|
+
"96bd24c0db02977e924a4d8c99e1cd9fc7ec0c43dd63e8de2fefd423cf795a5e"
|
|
13
|
+
],
|
|
14
|
+
"common/context-hygiene.md": [
|
|
15
|
+
"0e98ade57a4739e99f0f9651b2e01507241849ba6f8dcdb676755694b4347a39",
|
|
16
|
+
"366c50d792cac5339e90e23d727dff5e818b2797a904284f3aac809377ee9a0c",
|
|
17
|
+
"d6462e16f190e9d8b737f9fb57039606a637920ca681641b0bcf6dbaad671ea2",
|
|
18
|
+
"de9a23f664094629974ec24697a196822f33d4f222b70b821831089d4d761a6e"
|
|
19
|
+
],
|
|
20
|
+
"common/harness-engineering.md": [
|
|
21
|
+
"591091ef8f64c8f00d4de9dd78e112bc22bc4dfe36ba44f738670df0c2b44254",
|
|
22
|
+
"9247631278f21f200dc9231ad6c9a2608824f8382acbe136721db042d1626ad4"
|
|
23
|
+
],
|
|
24
|
+
"common/hooks.md": [
|
|
25
|
+
"2b55915316968a573e2b375c5031cfd48a6a4c7a09581157c341193382089484",
|
|
26
|
+
"2bffbf111b970a42b7e9d5d3a99b83754a9162256e60679a9d98bf1c5be0665d",
|
|
27
|
+
"581ed0a2b50d46b5bdda7ecf6fb8a629b825216175aa02b22248e985380baae7",
|
|
28
|
+
"617f99d48a1a0a4f32f9a716758b75eb487b35596805b34e98cae655f79f8546",
|
|
29
|
+
"650dd4aa9e5106b70373abc662cfe12e19553cec691c344ce54170efde2c60bb",
|
|
30
|
+
"66fd4b6eab8dbec27bd30772299b7caf4a42a4cd60a471a90a134481c169445b",
|
|
31
|
+
"8a2a13bc972dfd343a1304f96711e1741d452688f94a690554f3ff32646d4fd3",
|
|
32
|
+
"ada8e689f116257fbefa429d5b93b1cad911ea92aaf763e1bfabfb25365a152f",
|
|
33
|
+
"ca9cfc09bec1960ac305a32f18fbd9d617cf994feb40145fca6c57a05a4c2030"
|
|
34
|
+
],
|
|
35
|
+
"common/performance.md": [
|
|
36
|
+
"451a91bf7f92e747785e56d2e669ef14bca344bcddd3fa8ee0c6b2daf9aa0036",
|
|
37
|
+
"5b50781c4dce9e088c407efadcc31f5f5e2e5c09e77a3b2c264293be383401c5",
|
|
38
|
+
"7e34a17eeb86a54ae64b503edbc7635d7e0b92d4f24fe450f564a5fd76fbd17a",
|
|
39
|
+
"8c30e5a5561d315078d4806cc883444936e708b8e13f1ca5713ab5596317f283",
|
|
40
|
+
"b1d3f415dd7dd13efe7ea8d71b0dc5fd14d12f544d63f7d37bd26d12b7f5c11d"
|
|
41
|
+
],
|
|
42
|
+
"common/pr-automation.md": [
|
|
43
|
+
"09b5a378cca840be6ffb202bc7f6e99ff1229762850586cf0a83faaf059aee24",
|
|
44
|
+
"3f6e221582a74976bb6ca164bc837cb593312d755f5ac23f1d7f7f72104d16ab",
|
|
45
|
+
"4f93b7d10834be91dc89e4491577cd2436fc1dcc00c256c737f75504c41173e6",
|
|
46
|
+
"9088d7449714af985f3800664281b0392916d40699d9a0cf2a37ed8a07d2c1ba",
|
|
47
|
+
"9d88f5dce7f87ba89c2c326331e27585d3f570f65416846d81c716c3e1f3b716",
|
|
48
|
+
"f4f1fd2cd8e07d1539144a00c3d1210658ff575da5fe85fec83d7d554f21cba8"
|
|
49
|
+
],
|
|
50
|
+
"common/skills-learning.md": [
|
|
51
|
+
"04b82c7073fbb44bb8f350124331ec0631849592d0593ea0809bfc6d5c759342",
|
|
52
|
+
"0a70fdfce1dc9047743e525e38a7831ab3597e64741e706a06ac19a609bb333e",
|
|
53
|
+
"1c9377592732cf9ed4ee4eff2bed1504b30ef1f184c81c7db1cf75ddae17b6cb",
|
|
54
|
+
"3d80e4cc9966ba884b2a26d75950662d85e17d0a8b0fdba759f14b9ff405cc57",
|
|
55
|
+
"3e36e738fd540a5809217ef45d6898362c0c75e5ba842c3f05637321cac4038b",
|
|
56
|
+
"4b23bcfda2a1c40373b575868e9194f1f299c864c453405871464efebfbf640a",
|
|
57
|
+
"64f8da14651bd5cd1e70329b3bbd06b9767def04d3a3ca2ae4bb437e3f57b5da",
|
|
58
|
+
"79435212d7749c6b0e12419a4af9725bf2c686bc796a5388d807c6f7e160526b",
|
|
59
|
+
"7ea69af97511eaaeea662bcdb4b3c87de131d0d9835ca8c07f9f3b26114d8963",
|
|
60
|
+
"8d10b1b3a51516f485f184b487c4fb186cd13a675d89d1aed140ae6c08ee9baf",
|
|
61
|
+
"abc3dae7fe2a7801e130b8d4ab6e56fd27110ceceb715c987de2ccee2900ad81",
|
|
62
|
+
"b31acc0a27cc35f2e1441fb27b7033ff206f94892a990b588dd155814182f399",
|
|
63
|
+
"e54cd3640e4d8e858e384161b710c9cd7ccb1fa7bdeb612b5ca1d5855a5a4d8f"
|
|
64
|
+
],
|
|
65
|
+
"common/testing.md": [
|
|
66
|
+
"5e8226b3bb360f107b68e99ead86799f3b3180635ab2c114dd32021feecbe4c9",
|
|
67
|
+
"660ec721b0a9d2a8b8c7806039454f6e30e509c57c2329b3f705627b81ed06f3",
|
|
68
|
+
"6cd550064aee456c58d2424c38f7c63f90afe8f89114bfc3ccfb1c4dd07ccfc6",
|
|
69
|
+
"73ae212aa8a6ebc55e044690b804b2c76d6c218dfd60a2557bd33fe884744787",
|
|
70
|
+
"9aa0e17f5c6d37157e059f39723dbc8b2e7e2a9efb46c609d5388ed966245d4e",
|
|
71
|
+
"9bbd08807d4c0d28cf74f3fa5baeea37167f2b42fff36e75795cc66c77a46f6d",
|
|
72
|
+
"b10bb70a5c673bfbae1bde35b8879ffd88209e024efb1011c86bd7e65045ef7d",
|
|
73
|
+
"c9f169a9720c038749d729f15cb110fe67d0f748fc7de73e301b3726509651ae",
|
|
74
|
+
"f10250dbc8a67c47b514defca1f97ce00cb2096aa9dada92ce410f308c9ffda5",
|
|
75
|
+
"f593217cd46431850e8f1c135c5e604cb71da7bd0c6614e8036d7bd7b0e9e92a"
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
}
|
|
@@ -32,6 +32,32 @@
|
|
|
32
32
|
],
|
|
33
33
|
"executing-plans": [
|
|
34
34
|
"SKILL.md"
|
|
35
|
+
],
|
|
36
|
+
"research": [
|
|
37
|
+
"SKILL.md"
|
|
38
|
+
],
|
|
39
|
+
"iterative-retrieval": [
|
|
40
|
+
"SKILL.md"
|
|
41
|
+
],
|
|
42
|
+
"wayfinder": [
|
|
43
|
+
"SKILL.md",
|
|
44
|
+
"agents/openai.yaml"
|
|
45
|
+
],
|
|
46
|
+
"find-skills": [
|
|
47
|
+
"SKILL.md",
|
|
48
|
+
"agents/openai.yaml",
|
|
49
|
+
"references/skills-cli.md"
|
|
50
|
+
],
|
|
51
|
+
"project-context": [
|
|
52
|
+
"SKILL.md",
|
|
53
|
+
"agents/openai.yaml",
|
|
54
|
+
"references/project-context-template.md"
|
|
55
|
+
],
|
|
56
|
+
"using-git-worktrees": [
|
|
57
|
+
"SKILL.md"
|
|
58
|
+
],
|
|
59
|
+
"verification-before-completion": [
|
|
60
|
+
"SKILL.md"
|
|
35
61
|
]
|
|
36
62
|
}
|
|
37
63
|
}
|
|
@@ -79,10 +79,11 @@
|
|
|
79
79
|
},
|
|
80
80
|
{
|
|
81
81
|
"upstream": "research",
|
|
82
|
-
"status": "
|
|
82
|
+
"status": "adapted",
|
|
83
83
|
"evidence": [
|
|
84
|
-
"skills/
|
|
85
|
-
]
|
|
84
|
+
"skills/using-superpowers/SKILL.md"
|
|
85
|
+
],
|
|
86
|
+
"reason": "Engineering source lookup is handled directly with citations; the standalone report Skill is retired."
|
|
86
87
|
},
|
|
87
88
|
{
|
|
88
89
|
"upstream": "resolving-merge-conflicts",
|
|
@@ -93,10 +94,12 @@
|
|
|
93
94
|
},
|
|
94
95
|
{
|
|
95
96
|
"upstream": "setup-matt-pocock-skills",
|
|
96
|
-
"status": "
|
|
97
|
+
"status": "excluded",
|
|
97
98
|
"evidence": [
|
|
98
|
-
"
|
|
99
|
-
|
|
99
|
+
"scripts/retired-skill-files.json",
|
|
100
|
+
"README.md"
|
|
101
|
+
],
|
|
102
|
+
"reason": "The standalone project-context setup Skill is retired; existing project configuration remains supported."
|
|
100
103
|
},
|
|
101
104
|
{
|
|
102
105
|
"upstream": "tdd",
|
|
@@ -129,10 +132,12 @@
|
|
|
129
132
|
},
|
|
130
133
|
{
|
|
131
134
|
"upstream": "wayfinder",
|
|
132
|
-
"status": "
|
|
135
|
+
"status": "excluded",
|
|
133
136
|
"evidence": [
|
|
134
|
-
"
|
|
135
|
-
|
|
137
|
+
"scripts/retired-skill-files.json",
|
|
138
|
+
"README.md"
|
|
139
|
+
],
|
|
140
|
+
"reason": "Standalone multi-session decision mapping is intentionally removed from the engineering distribution."
|
|
136
141
|
}
|
|
137
142
|
],
|
|
138
143
|
"support_dependencies": [
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const assert = require("node:assert/strict");
|
|
4
|
+
const fs = require("node:fs");
|
|
5
|
+
const path = require("node:path");
|
|
6
|
+
const { createHarnessContext } = require("./core");
|
|
7
|
+
const { runGrillingSpecGateChecks } = require("./grilling-spec-gate-checks");
|
|
8
|
+
|
|
9
|
+
const root = path.resolve(__dirname, "../..");
|
|
10
|
+
const domain = "skills/domain-modeling/SKILL.md";
|
|
11
|
+
const outcomes = "skills/using-superpowers/references/process-outcomes.md";
|
|
12
|
+
const spec = "skills/spec-gate/SKILL.md";
|
|
13
|
+
const read = (file) => fs.readFileSync(path.join(root, file), "utf8");
|
|
14
|
+
|
|
15
|
+
// Inject regressions in memory so tests exercise the real gates without changing the working tree.
|
|
16
|
+
function verify(overrides = {}) {
|
|
17
|
+
const context = createHarnessContext(root);
|
|
18
|
+
context.read = (file) => overrides[file] ?? read(file);
|
|
19
|
+
context.requireTokens = (file, tokens) => {
|
|
20
|
+
if (!context.exists(file)) return context.fail(`${file} is missing`);
|
|
21
|
+
for (const token of tokens) {
|
|
22
|
+
if (!context.read(file).includes(token)) context.fail(`${file} should include ${token}`);
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
runGrillingSpecGateChecks(context);
|
|
26
|
+
return context.errors;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
assert.deepEqual(verify(), []);
|
|
30
|
+
|
|
31
|
+
const regressions = [
|
|
32
|
+
{
|
|
33
|
+
name: "maintenance changes a confirmed decision without approval",
|
|
34
|
+
file: domain,
|
|
35
|
+
body: read(domain).replace(/changes to\s+confirmed decisions, and\s*/, ""),
|
|
36
|
+
error: /should include changes to/,
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: "per-term approval despite maintenance authorization",
|
|
40
|
+
file: domain,
|
|
41
|
+
body: read(domain) + "\nWhen a term becomes stable, show the exact glossary change and obtain write approval before\nupdating it inline.\n",
|
|
42
|
+
error: /not require per-term approval/,
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: "maintenance without initial authorization",
|
|
46
|
+
file: domain,
|
|
47
|
+
body: read(domain).replace("If maintenance is not yet authorized, obtain approval before writing", "Write immediately"),
|
|
48
|
+
error: /should include If maintenance is not yet authorized/,
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: "maintenance expands into new scope",
|
|
52
|
+
file: domain,
|
|
53
|
+
body: read(domain).replace("New paths or scope", "Any document"),
|
|
54
|
+
error: /should include New paths or scope/,
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: "permission required just to clarify",
|
|
58
|
+
file: outcomes,
|
|
59
|
+
body: read(outcomes) + "\nOnly an explicit choice to continue starts a new grilling session.\n",
|
|
60
|
+
error: /not request permission to clarify/,
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
name: "clarification continues without an answer",
|
|
64
|
+
file: outcomes,
|
|
65
|
+
body: read(outcomes).replace("Wait for the user's answer", "Continue without the user's answer"),
|
|
66
|
+
error: /should include Wait for the user's answer/,
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
name: "blocked Spec stops the router's clarification",
|
|
70
|
+
file: outcomes,
|
|
71
|
+
body: read(outcomes).replace(
|
|
72
|
+
"Preserve the confirmed decisions and evidence; do not draft through an unresolved decision.",
|
|
73
|
+
"Stop without drafting, guessing, or invoking another Skill.",
|
|
74
|
+
),
|
|
75
|
+
error: /not request permission to clarify/,
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
name: "clarification ignores the user's stop request",
|
|
79
|
+
file: outcomes,
|
|
80
|
+
body: read(outcomes).replace("If the user pauses or ends the task, stop.", ""),
|
|
81
|
+
error: /should include If the user pauses or ends the task, stop/,
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
name: "clarification expands authorization to external actions",
|
|
85
|
+
file: outcomes,
|
|
86
|
+
body: read(outcomes).replace(/A new scope or external action still requires its own\s+authorization;/, ""),
|
|
87
|
+
error: /should include A new scope or external action still requires its own/,
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
name: "implementation without Spec approval",
|
|
91
|
+
file: spec,
|
|
92
|
+
body: read(spec).replace("the user has explicitly approved it", "the agent considers it ready"),
|
|
93
|
+
error: /should include the user has explicitly approved it/,
|
|
94
|
+
},
|
|
95
|
+
];
|
|
96
|
+
|
|
97
|
+
for (const scenario of regressions) {
|
|
98
|
+
assert.match(verify({ [scenario.file]: scenario.body }).join("\n"), scenario.error, scenario.name);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
console.log(`Continuation contract tests passed (current documents and ${regressions.length} regressions).`);
|
package/scripts/verify/core.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
const ACTIVE_BRAINSTORMING_REFERENCE = "skills/brainstorming/SKILL.md";
|
|
4
|
+
const PROCESS_OUTCOMES = "skills/using-superpowers/references/process-outcomes.md";
|
|
4
5
|
const BRAINSTORMING_REFERENCE_ALLOWLIST = new Set([
|
|
5
6
|
"README.md",
|
|
6
7
|
"skills/using-superpowers/SKILL.md",
|
|
@@ -38,20 +39,20 @@ const ROUTING_SCENARIOS = [
|
|
|
38
39
|
{
|
|
39
40
|
name: "Spec Gate discovers an unresolved public contract",
|
|
40
41
|
checks: [{
|
|
41
|
-
file:
|
|
42
|
+
file: PROCESS_OUTCOMES,
|
|
42
43
|
tokens: ["BLOCKED_BY_UNRESOLVED_DECISION", "decision map"],
|
|
43
44
|
}],
|
|
44
45
|
},
|
|
45
46
|
{
|
|
46
|
-
name: "
|
|
47
|
+
name: "authorized task continues after focused clarification",
|
|
47
48
|
checks: [{
|
|
48
|
-
file:
|
|
49
|
-
tokens: ["
|
|
49
|
+
file: PROCESS_OUTCOMES,
|
|
50
|
+
tokens: ["grilling inline", "Wait for the user's answer", "new Spec Gate", "do not resume the old call stack"],
|
|
50
51
|
}],
|
|
51
52
|
},
|
|
52
53
|
{
|
|
53
54
|
name: "unchanged confirmed decision blocks again",
|
|
54
|
-
checks: [{ file:
|
|
55
|
+
checks: [{ file: PROCESS_OUTCOMES, tokens: ["Spec Gate contract conflict"] }],
|
|
55
56
|
},
|
|
56
57
|
{
|
|
57
58
|
name: "task only consumes established domain vocabulary",
|
|
@@ -116,6 +117,7 @@ function checkSpecGateContract({ exists, read, fail, requireTokens }) {
|
|
|
116
117
|
"Local-only artifact policy",
|
|
117
118
|
"Do not stage or commit it.",
|
|
118
119
|
"Spec Gate contract conflict",
|
|
120
|
+
"the user has explicitly approved it",
|
|
119
121
|
]);
|
|
120
122
|
if (!exists(file)) return;
|
|
121
123
|
|
|
@@ -135,25 +137,43 @@ function checkRouterContract({ exists, read, fail, requireTokens }) {
|
|
|
135
137
|
const file = "skills/using-superpowers/SKILL.md";
|
|
136
138
|
requireTokens(file, [
|
|
137
139
|
"three lanes",
|
|
140
|
+
"[references/process-outcomes.md](references/process-outcomes.md)",
|
|
141
|
+
"Ordinary direct delivery does not load this reference",
|
|
142
|
+
"spec-gate",
|
|
143
|
+
]);
|
|
144
|
+
requireTokens(PROCESS_OUTCOMES, [
|
|
138
145
|
"BLOCKED_BY_UNRESOLVED_DECISION",
|
|
139
146
|
"decision map",
|
|
140
|
-
"
|
|
147
|
+
"grilling inline",
|
|
148
|
+
"do not ask whether to continue clarification",
|
|
149
|
+
"Wait for the user's answer",
|
|
150
|
+
"Silence is not a decision or approval.",
|
|
151
|
+
"If the user pauses or ends the task, stop.",
|
|
152
|
+
"A new scope or external action still requires its own",
|
|
153
|
+
"authorization; clarification does not expand the original request.",
|
|
141
154
|
"new Spec Gate",
|
|
142
155
|
"do not resume the old call stack",
|
|
143
156
|
"spec-gate",
|
|
144
157
|
]);
|
|
145
|
-
if (!exists(file)) return;
|
|
158
|
+
if (!exists(file) || !exists(PROCESS_OUTCOMES)) return;
|
|
146
159
|
|
|
147
|
-
const body = read(
|
|
148
|
-
|
|
149
|
-
|
|
160
|
+
const body = read(PROCESS_OUTCOMES);
|
|
161
|
+
for (const staleGate of [
|
|
162
|
+
"Only an explicit choice to continue",
|
|
163
|
+
"Let the user choose to continue clarification",
|
|
164
|
+
"Stop without drafting, guessing, or invoking another Skill.",
|
|
165
|
+
"is terminal for the current call chain",
|
|
166
|
+
]) {
|
|
167
|
+
if (body.includes(staleGate)) {
|
|
168
|
+
fail("Router must ask the missing decision within the authorized task, not request permission to clarify");
|
|
169
|
+
}
|
|
150
170
|
}
|
|
151
171
|
for (const scenario of ROUTING_SCENARIOS) {
|
|
152
172
|
for (const check of scenario.checks) requireTokens(check.file, check.tokens);
|
|
153
173
|
}
|
|
154
174
|
}
|
|
155
175
|
|
|
156
|
-
function checkSupportingSkills({ requireTokens }) {
|
|
176
|
+
function checkSupportingSkills({ exists, read, fail, requireTokens }) {
|
|
157
177
|
requireTokens("skills/grilling/SKILL.md", [
|
|
158
178
|
"Route context:",
|
|
159
179
|
"Risk classification:",
|
|
@@ -166,7 +186,24 @@ function checkSupportingSkills({ requireTokens }) {
|
|
|
166
186
|
"lifecycle",
|
|
167
187
|
"CONTEXT.md",
|
|
168
188
|
"approved Spec",
|
|
189
|
+
"Reuse existing maintenance authorization",
|
|
190
|
+
"within the approved paths and scope",
|
|
191
|
+
"If maintenance is not yet authorized, obtain approval before writing",
|
|
192
|
+
"New paths or scope",
|
|
169
193
|
]);
|
|
194
|
+
const domain = "skills/domain-modeling/SKILL.md";
|
|
195
|
+
if (exists(domain)) {
|
|
196
|
+
const body = read(domain).replace(/\s+/g, " ");
|
|
197
|
+
if (body.includes("When a term becomes stable, show the exact glossary change and obtain write approval before")) {
|
|
198
|
+
fail("Domain documentation must reuse in-scope maintenance authorization, not require per-term approval");
|
|
199
|
+
}
|
|
200
|
+
for (const constraint of [
|
|
201
|
+
"changes to confirmed decisions",
|
|
202
|
+
"unresolved consequential decisions require approval before the affected edit.",
|
|
203
|
+
]) {
|
|
204
|
+
if (!body.includes(constraint)) fail(`${domain} should include ${constraint}`);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
170
207
|
requireTokens("skills/visual-companion/SKILL.md", [
|
|
171
208
|
"user consent",
|
|
172
209
|
"grilling owns the decision loop",
|