claude-everything-workflow 0.1.9 → 0.2.2
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.md +19 -20
- package/README.md +112 -104
- package/agents/code-reviewer.md +15 -44
- package/agents/harness-optimizer.md +3 -2
- package/agents/planner.md +23 -107
- package/commands/code-review.md +25 -9
- package/commands/learn.md +97 -0
- package/commands/pr.md +4 -0
- package/commands/to-spec.md +11 -0
- package/hooks/check-code-size.js +33 -12
- package/hooks/check-console-log.js +72 -24
- package/package.json +5 -2
- package/rules/01-base.md +19 -42
- package/rules/02-code-size.md +6 -17
- package/rules/03-architecture.md +16 -54
- package/rules/04-error-handling.md +4 -25
- package/rules/05-git-workflow.md +9 -37
- package/rules/06-comments.md +3 -37
- package/rules/07-forbidden.md +6 -30
- package/rules/08-specialty-rules-index.md +18 -0
- package/rules/09-first-principles-adversarial-testing.md +6 -18
- package/rules/common/agent-orchestration.md +10 -47
- package/rules/common/context-hygiene.md +9 -72
- package/rules/common/harness-engineering.md +11 -38
- package/rules/common/hooks.md +11 -82
- package/rules/common/performance.md +8 -71
- package/rules/common/pr-automation.md +7 -68
- package/rules/common/skills-learning.md +12 -36
- package/rules/common/testing.md +15 -59
- package/scripts/cleanup-retired-skills.js +214 -0
- package/scripts/install.ps1 +73 -85
- package/scripts/install.sh +54 -77
- package/scripts/learning/review-confidence.js +1 -4
- package/scripts/merge-claude-settings.cjs +75 -0
- package/scripts/retired-skill-files.json +37 -0
- package/scripts/upstream-capability-baseline.json +27 -0
- package/scripts/upstream-capability-map.json +150 -0
- package/scripts/verify/core.js +91 -0
- package/scripts/verify/grilling-spec-gate-checks.js +260 -0
- package/scripts/verify/metadata-checks.js +724 -0
- package/scripts/verify/repository-checks.js +435 -0
- package/scripts/verify/runtime-checks.js +593 -0
- package/scripts/verify/workflow-checks.js +741 -0
- package/scripts/verify/workflow-ownership-fixtures.js +371 -0
- package/scripts/verify/workflow-ownership.js +780 -0
- package/scripts/verify-harness.js +16 -1075
- package/scripts/verify-upstream-capability-map.js +117 -0
- package/skills/README.md +24 -11
- package/skills/code-review/SKILL.md +50 -0
- package/skills/code-review/references/spec-reviewer-prompt.md +24 -0
- package/skills/code-review/references/standards-reviewer-prompt.md +35 -0
- package/skills/codebase-design/SKILL.md +63 -0
- package/skills/codebase-design/references/deepening.md +27 -0
- package/skills/codebase-design/references/design-it-twice.md +17 -0
- package/skills/continuous-learning-v2/SKILL.md +7 -7
- package/skills/continuous-learning-v2/config.json +0 -4
- package/skills/domain-modeling/SKILL.md +100 -0
- package/skills/feature-acceptance/SKILL.md +89 -0
- package/skills/grilling/SKILL.md +83 -0
- package/skills/handoff/SKILL.md +56 -0
- package/skills/implement/SKILL.md +97 -0
- package/skills/improve-codebase-architecture/SKILL.md +48 -0
- package/skills/iterative-retrieval/SKILL.md +10 -1
- package/skills/learn/README.md +2 -2
- package/skills/project-context/SKILL.md +94 -0
- package/skills/project-context/agents/openai.yaml +6 -0
- package/skills/project-context/references/project-context-template.md +61 -0
- package/skills/prototype/SKILL.md +50 -0
- package/skills/prototype/references/logic.md +28 -0
- package/skills/prototype/references/ui.md +30 -0
- package/skills/research/SKILL.md +48 -0
- package/skills/resolving-merge-conflicts/SKILL.md +27 -0
- package/skills/spec-gate/SKILL.md +149 -0
- package/skills/spec-gate/agents/openai.yaml +4 -0
- package/skills/spec-gate/references/spec-document-reviewer-prompt.md +31 -0
- package/skills/subagent-driven-development/SKILL.md +95 -414
- package/skills/systematic-debugging/SKILL.md +7 -51
- package/skills/systematic-debugging/references/diagnosing-bugs.upstream.md +129 -0
- package/skills/systematic-debugging/scripts/hitl-loop.template.js +75 -0
- package/skills/systematic-debugging/scripts/hitl-loop.template.sh +41 -0
- package/skills/test-driven-development/SKILL.md +18 -2
- package/skills/to-tickets/SKILL.md +94 -0
- package/skills/triage/SKILL.md +53 -0
- package/skills/triage/references/agent-brief.md +32 -0
- package/skills/triage/references/out-of-scope.md +14 -0
- package/skills/using-superpowers/SKILL.md +140 -40
- package/skills/visual-companion/SKILL.md +62 -0
- package/skills/visual-companion/agents/openai.yaml +4 -0
- package/skills/{brainstorming/visual-companion.md → visual-companion/references/guide.md} +1 -1
- package/skills/{brainstorming → visual-companion}/scripts/frame-template.html +42 -12
- package/skills/visual-companion/scripts/pages.cjs +28 -0
- package/skills/visual-companion/scripts/server-utils.cjs +82 -0
- package/skills/{brainstorming → visual-companion}/scripts/server.cjs +108 -248
- package/skills/{brainstorming → visual-companion}/scripts/start-server.sh +18 -4
- package/skills/visual-companion/scripts/websocket.cjs +86 -0
- package/skills/wayfinder/SKILL.md +57 -0
- package/commands/e2e.md +0 -28
- package/commands/evolve.md +0 -42
- package/commands/harness-audit.md +0 -27
- package/commands/instinct-status.md +0 -38
- package/commands/learn-eval.md +0 -91
- package/commands/projects.md +0 -27
- package/commands/promote.md +0 -29
- package/commands/prune.md +0 -46
- package/commands/tdd.md +0 -27
- package/homunculus/instincts/personal/always-test-first.md +0 -28
- package/homunculus/instincts/personal/pr-ci-quality-gate.md +0 -30
- package/rules/08-ecc-integration.md +0 -46
- package/rules/common/implementation.md +0 -25
- package/rules/common/security.md +0 -19
- package/skills/brainstorming/SKILL.md +0 -185
- package/skills/brainstorming/agents/openai.yaml +0 -3
- package/skills/brainstorming/spec-document-reviewer-prompt.md +0 -49
- package/skills/context-budget/SKILL.md +0 -59
- package/skills/discover-unknowns-zh/SKILL.md +0 -112
- package/skills/discover-unknowns-zh/agents/openai.yaml +0 -4
- package/skills/discover-unknowns-zh/references/prompt-patterns.md +0 -144
- package/skills/documentation-lookup/SKILL.md +0 -90
- package/skills/executing-plans/SKILL.md +0 -66
- package/skills/skill-creator/LICENSE.txt +0 -202
- package/skills/skill-creator/SKILL.md +0 -356
- package/skills/skill-creator/references/output-patterns.md +0 -82
- package/skills/skill-creator/references/workflows.md +0 -28
- package/skills/skill-creator/scripts/init_skill.py +0 -303
- package/skills/skill-creator/scripts/package_skill.py +0 -110
- package/skills/skill-creator/scripts/quick_validate.py +0 -95
- package/skills/subagent-driven-development/implementer-prompt.md +0 -139
- package/skills/subagent-driven-development/scripts/review-package +0 -44
- package/skills/subagent-driven-development/scripts/sdd-workspace +0 -22
- package/skills/subagent-driven-development/scripts/task-brief +0 -40
- package/skills/subagent-driven-development/task-reviewer-prompt.md +0 -188
- package/skills/writing-plans/SKILL.md +0 -206
- package/skills/writing-plans/plan-document-reviewer-prompt.md +0 -49
- /package/skills/{brainstorming → visual-companion}/scripts/helper.js +0 -0
- /package/skills/{brainstorming → visual-companion}/scripts/stop-server.sh +0 -0
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema_version": 1,
|
|
3
|
+
"upstream": {
|
|
4
|
+
"repository": "https://github.com/mattpocock/skills",
|
|
5
|
+
"commit": "2ab958093e83e0ec752e6c1c5932da465bf23e0c",
|
|
6
|
+
"checked_at": "2026-07-31",
|
|
7
|
+
"baseline": "promoted-engineering"
|
|
8
|
+
},
|
|
9
|
+
"capabilities": [
|
|
10
|
+
{
|
|
11
|
+
"upstream": "ask-matt",
|
|
12
|
+
"status": "adapted",
|
|
13
|
+
"evidence": [
|
|
14
|
+
"skills/using-superpowers/SKILL.md"
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"upstream": "code-review",
|
|
19
|
+
"status": "adapted",
|
|
20
|
+
"evidence": [
|
|
21
|
+
"commands/code-review.md",
|
|
22
|
+
"skills/code-review/SKILL.md",
|
|
23
|
+
"skills/code-review/references/standards-reviewer-prompt.md",
|
|
24
|
+
"skills/code-review/references/spec-reviewer-prompt.md"
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"upstream": "codebase-design",
|
|
29
|
+
"status": "covered",
|
|
30
|
+
"evidence": [
|
|
31
|
+
"skills/codebase-design/SKILL.md",
|
|
32
|
+
"skills/codebase-design/references/deepening.md"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"upstream": "diagnosing-bugs",
|
|
37
|
+
"status": "adapted",
|
|
38
|
+
"evidence": [
|
|
39
|
+
"skills/systematic-debugging/SKILL.md"
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
"upstream": "domain-modeling",
|
|
44
|
+
"status": "adapted",
|
|
45
|
+
"evidence": [
|
|
46
|
+
"skills/domain-modeling/SKILL.md"
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
"upstream": "grill-with-docs",
|
|
51
|
+
"status": "adapted",
|
|
52
|
+
"evidence": [
|
|
53
|
+
"skills/grilling/SKILL.md",
|
|
54
|
+
"skills/domain-modeling/SKILL.md"
|
|
55
|
+
]
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"upstream": "implement",
|
|
59
|
+
"status": "adapted",
|
|
60
|
+
"evidence": [
|
|
61
|
+
"skills/implement/SKILL.md"
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"upstream": "improve-codebase-architecture",
|
|
66
|
+
"status": "adapted",
|
|
67
|
+
"evidence": [
|
|
68
|
+
"skills/improve-codebase-architecture/SKILL.md"
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"upstream": "prototype",
|
|
73
|
+
"status": "adapted",
|
|
74
|
+
"evidence": [
|
|
75
|
+
"skills/prototype/SKILL.md",
|
|
76
|
+
"skills/prototype/references/logic.md",
|
|
77
|
+
"skills/visual-companion/SKILL.md"
|
|
78
|
+
]
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"upstream": "research",
|
|
82
|
+
"status": "covered",
|
|
83
|
+
"evidence": [
|
|
84
|
+
"skills/research/SKILL.md"
|
|
85
|
+
]
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
"upstream": "resolving-merge-conflicts",
|
|
89
|
+
"status": "covered",
|
|
90
|
+
"evidence": [
|
|
91
|
+
"skills/resolving-merge-conflicts/SKILL.md"
|
|
92
|
+
]
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
"upstream": "setup-matt-pocock-skills",
|
|
96
|
+
"status": "adapted",
|
|
97
|
+
"evidence": [
|
|
98
|
+
"skills/project-context/SKILL.md"
|
|
99
|
+
]
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"upstream": "tdd",
|
|
103
|
+
"status": "adapted",
|
|
104
|
+
"evidence": [
|
|
105
|
+
"skills/test-driven-development/SKILL.md"
|
|
106
|
+
]
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
"upstream": "to-spec",
|
|
110
|
+
"status": "adapted",
|
|
111
|
+
"evidence": [
|
|
112
|
+
"commands/to-spec.md",
|
|
113
|
+
"skills/spec-gate/SKILL.md"
|
|
114
|
+
]
|
|
115
|
+
},
|
|
116
|
+
{
|
|
117
|
+
"upstream": "to-tickets",
|
|
118
|
+
"status": "adapted",
|
|
119
|
+
"evidence": [
|
|
120
|
+
"skills/to-tickets/SKILL.md"
|
|
121
|
+
]
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
"upstream": "triage",
|
|
125
|
+
"status": "adapted",
|
|
126
|
+
"evidence": [
|
|
127
|
+
"skills/triage/SKILL.md"
|
|
128
|
+
]
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"upstream": "wayfinder",
|
|
132
|
+
"status": "adapted",
|
|
133
|
+
"evidence": [
|
|
134
|
+
"skills/wayfinder/SKILL.md"
|
|
135
|
+
]
|
|
136
|
+
}
|
|
137
|
+
],
|
|
138
|
+
"support_dependencies": [
|
|
139
|
+
{
|
|
140
|
+
"upstream": "handoff",
|
|
141
|
+
"source_group": "productivity",
|
|
142
|
+
"status": "adapted",
|
|
143
|
+
"reason": "The promoted Engineering router requires it for prototype detours and context-window crossings.",
|
|
144
|
+
"evidence": [
|
|
145
|
+
"skills/handoff/SKILL.md",
|
|
146
|
+
"skills/using-superpowers/SKILL.md"
|
|
147
|
+
]
|
|
148
|
+
}
|
|
149
|
+
]
|
|
150
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const fs = require("fs");
|
|
4
|
+
const path = require("path");
|
|
5
|
+
|
|
6
|
+
const MANAGED_ROOTS = [
|
|
7
|
+
"README.md",
|
|
8
|
+
"AGENTS.md",
|
|
9
|
+
"CLAUDE.md",
|
|
10
|
+
"settings.json",
|
|
11
|
+
"commands",
|
|
12
|
+
"agents",
|
|
13
|
+
"skills",
|
|
14
|
+
"hooks",
|
|
15
|
+
"scripts",
|
|
16
|
+
"rules",
|
|
17
|
+
];
|
|
18
|
+
|
|
19
|
+
function createFileAccess(root) {
|
|
20
|
+
const rel = (...parts) => path.join(root, ...parts);
|
|
21
|
+
const exists = (file) => fs.existsSync(rel(file));
|
|
22
|
+
const read = (file) => fs.readFileSync(rel(file), "utf8");
|
|
23
|
+
|
|
24
|
+
function walk(dir = "") {
|
|
25
|
+
const base = rel(dir);
|
|
26
|
+
if (!fs.existsSync(base)) return [];
|
|
27
|
+
|
|
28
|
+
const out = [];
|
|
29
|
+
for (const entry of fs.readdirSync(base, { withFileTypes: true })) {
|
|
30
|
+
if (entry.name === ".git" || entry.name === "node_modules") continue;
|
|
31
|
+
const child = path.join(dir, entry.name);
|
|
32
|
+
if (entry.isDirectory()) {
|
|
33
|
+
out.push(...walk(child));
|
|
34
|
+
} else {
|
|
35
|
+
out.push(child.replace(/\\/g, "/"));
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return out;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
return { rel, exists, read, walk };
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function createManagedFiles({ rel, walk }) {
|
|
45
|
+
return () => MANAGED_ROOTS.flatMap((item) => {
|
|
46
|
+
const full = rel(item);
|
|
47
|
+
if (!fs.existsSync(full)) return [];
|
|
48
|
+
if (fs.statSync(full).isDirectory()) return walk(item);
|
|
49
|
+
return [item];
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function createTokenChecker({ exists, read, fail }) {
|
|
54
|
+
return (file, tokens) => {
|
|
55
|
+
if (!exists(file)) {
|
|
56
|
+
fail(`${file} is missing`);
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const body = read(file);
|
|
61
|
+
for (const token of tokens) {
|
|
62
|
+
if (!body.includes(token)) fail(`${file} should include ${token}`);
|
|
63
|
+
}
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
function isVerifierImplementation(file) {
|
|
68
|
+
return file === "scripts/verify-harness.js" || file.startsWith("scripts/verify/");
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function createHarnessContext(root) {
|
|
72
|
+
const errors = [];
|
|
73
|
+
const warnings = [];
|
|
74
|
+
const fileAccess = createFileAccess(root);
|
|
75
|
+
const fail = (message) => errors.push(message);
|
|
76
|
+
const warn = (message) => warnings.push(message);
|
|
77
|
+
|
|
78
|
+
return {
|
|
79
|
+
root,
|
|
80
|
+
errors,
|
|
81
|
+
warnings,
|
|
82
|
+
...fileAccess,
|
|
83
|
+
managedFiles: createManagedFiles(fileAccess),
|
|
84
|
+
fail,
|
|
85
|
+
warn,
|
|
86
|
+
requireTokens: createTokenChecker({ ...fileAccess, fail }),
|
|
87
|
+
isVerifierImplementation,
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
module.exports = { createHarnessContext };
|
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
const ACTIVE_BRAINSTORMING_REFERENCE = "skills/brainstorming/SKILL.md";
|
|
4
|
+
const BRAINSTORMING_REFERENCE_ALLOWLIST = new Set([
|
|
5
|
+
"README.md",
|
|
6
|
+
"skills/using-superpowers/SKILL.md",
|
|
7
|
+
"scripts/install.sh",
|
|
8
|
+
"scripts/install.ps1",
|
|
9
|
+
]);
|
|
10
|
+
|
|
11
|
+
const ROUTING_SCENARIOS = [
|
|
12
|
+
{
|
|
13
|
+
name: "clear low-risk task",
|
|
14
|
+
checks: [{ file: "skills/using-superpowers/SKILL.md", tokens: ["direct", "clear low-risk task"] }],
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
name: "ordinary task with one user decision",
|
|
18
|
+
checks: [{
|
|
19
|
+
file: "skills/using-superpowers/SKILL.md",
|
|
20
|
+
tokens: ["grilling inline", "unresolved user-owned decision"],
|
|
21
|
+
}],
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
name: "explicit grilling request",
|
|
25
|
+
checks: [{ file: "skills/using-superpowers/SKILL.md", tokens: ["explicit grilling request", "grilling explicit"] }],
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: "clear breaking public API migration",
|
|
29
|
+
checks: [{ file: "skills/spec-gate/SKILL.md", tokens: ["clear breaking public API migration", "Spec drafting"] }],
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
name: "public API migration with unresolved compatibility",
|
|
33
|
+
checks: [{
|
|
34
|
+
file: "skills/using-superpowers/SKILL.md",
|
|
35
|
+
tokens: ["unresolved user-owned decision", "resume_target: spec-gate"],
|
|
36
|
+
}],
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: "Spec Gate discovers an unresolved public contract",
|
|
40
|
+
checks: [{
|
|
41
|
+
file: "skills/using-superpowers/SKILL.md",
|
|
42
|
+
tokens: ["BLOCKED_BY_UNRESOLVED_DECISION", "decision map"],
|
|
43
|
+
}],
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
name: "user explicitly continues after blocking",
|
|
47
|
+
checks: [{
|
|
48
|
+
file: "skills/using-superpowers/SKILL.md",
|
|
49
|
+
tokens: ["new grilling session", "new Spec Gate", "do not resume the old call stack"],
|
|
50
|
+
}],
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
name: "unchanged confirmed decision blocks again",
|
|
54
|
+
checks: [{ file: "skills/using-superpowers/SKILL.md", tokens: ["Spec Gate contract conflict"] }],
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
name: "task only consumes established domain vocabulary",
|
|
58
|
+
checks: [{
|
|
59
|
+
file: "skills/domain-modeling/SKILL.md",
|
|
60
|
+
tokens: ["established `CONTEXT.md` vocabulary", "does not trigger it"],
|
|
61
|
+
}],
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
name: "new domain entity and lifecycle without a user decision",
|
|
65
|
+
checks: [{ file: "skills/domain-modeling/SKILL.md", tokens: ["subscription entity", "lifecycle states"] }],
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
name: "domain boundary remains a user decision",
|
|
69
|
+
checks: [
|
|
70
|
+
{ file: "skills/domain-modeling/SKILL.md", tokens: ["Unresolved consequential decisions"] },
|
|
71
|
+
{ file: "skills/using-superpowers/SKILL.md", tokens: ["unresolved user-owned decision"] },
|
|
72
|
+
],
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
name: "explicit /to-spec with sufficient context",
|
|
76
|
+
checks: [{ file: "commands/to-spec.md", tokens: ["skills/spec-gate/SKILL.md"] }],
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
name: "old brainstorming name compatibility",
|
|
80
|
+
checks: [{
|
|
81
|
+
file: "skills/using-superpowers/SKILL.md",
|
|
82
|
+
tokens: ["Compatibility Alias", "old name `brainstorming`", "/to-spec"],
|
|
83
|
+
}],
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
name: "consented visual comparison",
|
|
87
|
+
checks: [{ file: "skills/visual-companion/SKILL.md", tokens: ["user consent", "visual comparisons"] }],
|
|
88
|
+
},
|
|
89
|
+
];
|
|
90
|
+
|
|
91
|
+
function checkRequiredPaths({ exists, fail }) {
|
|
92
|
+
for (const file of [
|
|
93
|
+
"skills/spec-gate/SKILL.md",
|
|
94
|
+
"skills/spec-gate/references/spec-document-reviewer-prompt.md",
|
|
95
|
+
"skills/spec-gate/agents/openai.yaml",
|
|
96
|
+
"skills/domain-modeling/SKILL.md",
|
|
97
|
+
"skills/visual-companion/SKILL.md",
|
|
98
|
+
"skills/visual-companion/references/guide.md",
|
|
99
|
+
"commands/to-spec.md",
|
|
100
|
+
]) {
|
|
101
|
+
if (!exists(file)) fail(`${file} is missing from the new workflow`);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
function checkSpecGateContract({ exists, read, fail, requireTokens }) {
|
|
106
|
+
const file = "skills/spec-gate/SKILL.md";
|
|
107
|
+
requireTokens(file, [
|
|
108
|
+
"zero interview",
|
|
109
|
+
"READY_FOR_USER_REVIEW",
|
|
110
|
+
"BLOCKED_BY_UNRESOLVED_DECISION",
|
|
111
|
+
"NOT_APPLICABLE",
|
|
112
|
+
"decision_id",
|
|
113
|
+
"blocking_reason",
|
|
114
|
+
"known_constraints",
|
|
115
|
+
"evidence",
|
|
116
|
+
"Local-only artifact policy",
|
|
117
|
+
"Do not stage or commit it.",
|
|
118
|
+
"Spec Gate contract conflict",
|
|
119
|
+
]);
|
|
120
|
+
if (!exists(file)) return;
|
|
121
|
+
|
|
122
|
+
const body = read(file);
|
|
123
|
+
const blockedSection = body.match(
|
|
124
|
+
/## Outcomes[\s\S]*?BLOCKED_BY_UNRESOLVED_DECISION([\s\S]*?)(?=NOT_APPLICABLE)/,
|
|
125
|
+
);
|
|
126
|
+
if (blockedSection && /^- resume_target\s*$/m.test(blockedSection[1])) {
|
|
127
|
+
fail("Spec Gate blocked outcome must not include resume_target");
|
|
128
|
+
}
|
|
129
|
+
if (/spec-gate\s*->\s*grilling/i.test(body)) {
|
|
130
|
+
fail("Spec Gate must not define an automatic spec-gate -> grilling edge");
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
function checkRouterContract({ exists, read, fail, requireTokens }) {
|
|
135
|
+
const file = "skills/using-superpowers/SKILL.md";
|
|
136
|
+
requireTokens(file, [
|
|
137
|
+
"three lanes",
|
|
138
|
+
"BLOCKED_BY_UNRESOLVED_DECISION",
|
|
139
|
+
"decision map",
|
|
140
|
+
"new grilling session",
|
|
141
|
+
"new Spec Gate",
|
|
142
|
+
"do not resume the old call stack",
|
|
143
|
+
"spec-gate",
|
|
144
|
+
]);
|
|
145
|
+
if (!exists(file)) return;
|
|
146
|
+
|
|
147
|
+
const body = read(file);
|
|
148
|
+
if (/BLOCKED_BY_UNRESOLVED_DECISION[\s\S]{0,240}(?:automatically|auto).*grilling/i.test(body)) {
|
|
149
|
+
fail("Router must stop on Spec Gate blocking instead of automatically invoking grilling");
|
|
150
|
+
}
|
|
151
|
+
for (const scenario of ROUTING_SCENARIOS) {
|
|
152
|
+
for (const check of scenario.checks) requireTokens(check.file, check.tokens);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
function checkSupportingSkills({ requireTokens }) {
|
|
157
|
+
requireTokens("skills/grilling/SKILL.md", [
|
|
158
|
+
"Route context:",
|
|
159
|
+
"Risk classification:",
|
|
160
|
+
"Resume target:",
|
|
161
|
+
"resume_target: spec-gate",
|
|
162
|
+
"return to `skills/using-superpowers/SKILL.md`",
|
|
163
|
+
]);
|
|
164
|
+
requireTokens("skills/domain-modeling/SKILL.md", [
|
|
165
|
+
"bounded context",
|
|
166
|
+
"lifecycle",
|
|
167
|
+
"CONTEXT.md",
|
|
168
|
+
"approved Spec",
|
|
169
|
+
]);
|
|
170
|
+
requireTokens("skills/visual-companion/SKILL.md", [
|
|
171
|
+
"user consent",
|
|
172
|
+
"grilling owns the decision loop",
|
|
173
|
+
"does not own continuation",
|
|
174
|
+
]);
|
|
175
|
+
requireTokens("commands/to-spec.md", ["skills/spec-gate/SKILL.md"]);
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
function checkRemovedBrainstormingReferences(context) {
|
|
179
|
+
const { exists, read, managedFiles, fail, isVerifierImplementation } = context;
|
|
180
|
+
for (const agent of ["agents/harness-optimizer.md"]) {
|
|
181
|
+
if (exists(agent) && read(agent).includes("brainstorming")) {
|
|
182
|
+
fail(`${agent} must not reference brainstorming after the migration`);
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
for (const file of managedFiles()) {
|
|
187
|
+
if (isVerifierImplementation(file) || BRAINSTORMING_REFERENCE_ALLOWLIST.has(file)) continue;
|
|
188
|
+
if (read(file).includes(ACTIVE_BRAINSTORMING_REFERENCE)) {
|
|
189
|
+
fail(`${file} contains active reference to ${ACTIVE_BRAINSTORMING_REFERENCE}`);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
if (exists("skills/brainstorming/SKILL.md")) {
|
|
194
|
+
fail("skills/brainstorming/SKILL.md must be removed");
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
function checkVisualCompanionSecurity({ requireTokens }) {
|
|
199
|
+
requireTokens("skills/visual-companion/references/guide.md", [
|
|
200
|
+
"session key",
|
|
201
|
+
"?key=",
|
|
202
|
+
"4 hours idle",
|
|
203
|
+
"--idle-timeout-minutes",
|
|
204
|
+
"same port",
|
|
205
|
+
]);
|
|
206
|
+
requireTokens("skills/visual-companion/scripts/server.cjs", [
|
|
207
|
+
"BRAINSTORM_TOKEN",
|
|
208
|
+
"BRAINSTORM_TOKEN_FILE",
|
|
209
|
+
"Default 4 hours",
|
|
210
|
+
]);
|
|
211
|
+
requireTokens("skills/visual-companion/scripts/server-utils.cjs", [
|
|
212
|
+
"timingSafeEqualStr",
|
|
213
|
+
"Cache-Control",
|
|
214
|
+
"X-Frame-Options",
|
|
215
|
+
]);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
function checkInstallerCleanupContract({ requireTokens }) {
|
|
219
|
+
requireTokens("scripts/install.sh", [
|
|
220
|
+
"cleanup_retired_skills",
|
|
221
|
+
"cleanup-retired-skills.js",
|
|
222
|
+
"validate_retired_skill_manifest",
|
|
223
|
+
"--dry-run",
|
|
224
|
+
"rules/08-ecc-integration.md",
|
|
225
|
+
"skills/subagent-driven-development/implementer-prompt.md",
|
|
226
|
+
]);
|
|
227
|
+
requireTokens("scripts/install.ps1", [
|
|
228
|
+
"Remove-RetiredSkills",
|
|
229
|
+
"cleanup-retired-skills.js",
|
|
230
|
+
"Test-RetiredSkillManifest",
|
|
231
|
+
"--dry-run",
|
|
232
|
+
"rules\\08-ecc-integration.md",
|
|
233
|
+
"skills\\subagent-driven-development\\implementer-prompt.md",
|
|
234
|
+
]);
|
|
235
|
+
requireTokens("scripts/retired-skill-files.json", [
|
|
236
|
+
"brainstorming",
|
|
237
|
+
"SKILL.md",
|
|
238
|
+
"scripts/server.cjs",
|
|
239
|
+
"agents/openai.yaml",
|
|
240
|
+
"writing-plans",
|
|
241
|
+
"executing-plans",
|
|
242
|
+
]);
|
|
243
|
+
requireTokens("scripts/cleanup-retired-skills.js", [
|
|
244
|
+
"Preserving unknown files in retired skill",
|
|
245
|
+
"Preserving symlinked retired skill",
|
|
246
|
+
"Preserving retired path through symlink",
|
|
247
|
+
]);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
function runGrillingSpecGateChecks(context) {
|
|
251
|
+
checkRequiredPaths(context);
|
|
252
|
+
checkSpecGateContract(context);
|
|
253
|
+
checkRouterContract(context);
|
|
254
|
+
checkSupportingSkills(context);
|
|
255
|
+
checkRemovedBrainstormingReferences(context);
|
|
256
|
+
checkVisualCompanionSecurity(context);
|
|
257
|
+
checkInstallerCleanupContract(context);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
module.exports = { runGrillingSpecGateChecks };
|