@punks/cli 2.0.0-beta.4 → 2.0.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/AGENTS.md +4 -0
- package/dist/data/catalog/hooks.ts +0 -7
- package/dist/data/catalog/packs.ts +34 -4
- package/dist/data/catalog/skills.ts +31 -7
- package/dist/data/catalog/tools.ts +6 -0
- package/dist/data/hooks/format-edited-file.mjs +26 -5
- package/dist/data/hooks.test.ts +0 -29
- package/dist/data/scripts/sync-subagents.mjs +29 -87
- package/dist/data/subagents/manifest.mjs +9 -9
- package/dist/data/subagents/manifest.test.ts +40 -0
- package/dist/index.js +3275 -1764
- package/dist/skills/agnostic/planning/create-spec/references/discovery.md +3 -3
- package/dist/skills/agnostic/requirements/requirements-grill/SKILL.md +1 -1
- package/dist/skills/agnostic/requirements/requirements-grill/references/wiki-output.md +1 -1
- package/dist/skills/phases/bug-discovery-phase/REFERENCE.md +124 -0
- package/dist/skills/phases/bug-discovery-phase/SKILL.md +76 -0
- package/dist/skills/phases/bug-resolution-phase/REFERENCE.md +154 -0
- package/dist/skills/phases/bug-resolution-phase/SKILL.md +62 -0
- package/dist/skills/{agnostic/docs → phases}/docs-ingest-phase/SKILL.md +16 -16
- package/dist/skills/phases/docs-ingest-phase/references/concept-pages.md +70 -0
- package/dist/skills/phases/docs-ingest-phase/references/flow-pages.md +56 -0
- package/dist/skills/phases/docs-ingest-phase/references/fumadocs-routing.md +76 -0
- package/dist/skills/{agnostic/docs → phases}/docs-ingest-phase/references/wiki-ingest.md +5 -5
- package/dist/skills/{agnostic/planning → phases}/resolve-debt-phase/SKILL.md +4 -4
- package/package.json +12 -3
- package/dist/skills/agnostic/docs/docs-ingest-phase/references/concept-pages.md +0 -48
- package/dist/skills/agnostic/docs/docs-ingest-phase/references/flow-pages.md +0 -41
- package/dist/skills/agnostic/docs/docs-ingest-phase/references/fumadocs-routing.md +0 -88
- /package/dist/skills/{agnostic/debug → phases}/debugging-phase/SKILL.md +0 -0
- /package/dist/skills/{agnostic/planning → phases}/delivery-phase/SKILL.md +0 -0
- /package/dist/skills/{agnostic/docs → phases}/docs-ingest-phase/agents/openai.yaml +0 -0
- /package/dist/skills/{agnostic/docs → phases}/docs-ingest-phase/references/repo-docs.md +0 -0
- /package/dist/skills/{agnostic/planning → phases}/goalify/EXAMPLES.md +0 -0
- /package/dist/skills/{agnostic/planning → phases}/goalify/SKILL.md +0 -0
- /package/dist/skills/{agnostic/requirements → phases}/requirements-phase/SKILL.md +0 -0
- /package/dist/skills/{agnostic/research → phases}/review-phase/SKILL.md +0 -0
package/AGENTS.md
CHANGED
|
@@ -6,4 +6,8 @@ This app owns the `punks`/`dp` executable, repo detection flow, local scaffold a
|
|
|
6
6
|
|
|
7
7
|
Keep consumer-repo product logic out of the CLI. The future backend owns registry, provenance, auth, telemetry, and artifact access; the CLI remains the local scanner, cache, prompt/skill/hook placer, and filesystem writer.
|
|
8
8
|
|
|
9
|
+
For direct CLI UX, packaging, and release behavior guidance, inspect:
|
|
10
|
+
|
|
11
|
+
- `opensrc path cevr/sentry-cli` (`https://github.com/cevr/sentry-cli`)
|
|
12
|
+
|
|
9
13
|
If work here changes operator workflow, setup, or AI scaffolding behavior, update `docs/README.md` and `docs/runbooks/dp-cli-scaffolding.md` in the same task.
|
|
@@ -15,11 +15,4 @@ export const hookCatalog = [
|
|
|
15
15
|
"Shared hook that auto-formats edited JS/TS/JSON files and lint-checks product files after tool use.",
|
|
16
16
|
sourcePath: "hooks/format-edited-file.mjs",
|
|
17
17
|
},
|
|
18
|
-
{
|
|
19
|
-
id: "require-tests-for-pr",
|
|
20
|
-
harness: "shared",
|
|
21
|
-
outputPath: ".agents/hooks/require-tests-for-pr.mjs",
|
|
22
|
-
description: "Shared hook that blocks PR creation while tests are failing.",
|
|
23
|
-
sourcePath: "hooks/require-tests-for-pr.mjs",
|
|
24
|
-
},
|
|
25
18
|
] as const satisfies ReadonlyArray<HookDefinition>;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type { PackCategory, PackId } from "../../core/models";
|
|
2
2
|
import type { LintAssetId } from "./lint";
|
|
3
3
|
import type { SkillId } from "./skills";
|
|
4
|
+
import type { ScaffoldExampleRepository } from "@punks/scaffold";
|
|
4
5
|
|
|
5
|
-
export type PackHookId = "format-edited-file"
|
|
6
|
+
export type PackHookId = "format-edited-file";
|
|
6
7
|
export type PackPromptSurfaceId =
|
|
7
8
|
| "shared-agents"
|
|
8
9
|
| "root-prompt-spec"
|
|
@@ -20,6 +21,7 @@ export interface PackCatalogEntry {
|
|
|
20
21
|
readonly hooks: ReadonlyArray<PackHookId>;
|
|
21
22
|
readonly promptSurfaces: ReadonlyArray<PackPromptSurfaceId>;
|
|
22
23
|
readonly promptDetails: ReadonlyArray<string>;
|
|
24
|
+
readonly exampleRepositories?: ReadonlyArray<ScaffoldExampleRepository>;
|
|
23
25
|
}
|
|
24
26
|
|
|
25
27
|
export const packCatalog = [
|
|
@@ -53,8 +55,9 @@ export const packCatalog = [
|
|
|
53
55
|
id: "debug",
|
|
54
56
|
category: "default",
|
|
55
57
|
triggerPackages: [],
|
|
56
|
-
description:
|
|
57
|
-
|
|
58
|
+
description:
|
|
59
|
+
"Default debug pack: runtime debugging, ClawPatch bug discovery/resolution, and debug-agent workflow.",
|
|
60
|
+
skills: ["debugging-phase", "bug-discovery-phase", "bug-resolution-phase", "debug-agent"],
|
|
58
61
|
lintAssets: [],
|
|
59
62
|
hooks: [],
|
|
60
63
|
promptSurfaces: ["shared-agents", "root-prompt-spec", "workspace-prompt-spec"],
|
|
@@ -100,6 +103,33 @@ export const packCatalog = [
|
|
|
100
103
|
hooks: [],
|
|
101
104
|
promptSurfaces: ["shared-agents", "root-prompt-spec", "workspace-prompt-spec"],
|
|
102
105
|
promptDetails: ["shared effect authoring baseline", "workspace service/layer rules"],
|
|
106
|
+
exampleRepositories: [
|
|
107
|
+
{
|
|
108
|
+
repo: "AnswerOverflow/AnswerOverflow",
|
|
109
|
+
url: "https://github.com/AnswerOverflow/AnswerOverflow",
|
|
110
|
+
packs: [{ uid: "effect", version: "^3.20.0" }],
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
repo: "rhyssullivan/executor",
|
|
114
|
+
url: "https://github.com/rhyssullivan/executor",
|
|
115
|
+
packs: [{ uid: "effect", version: "4.0.0-beta.59" }],
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
repo: "alchemy-run/alchemy-effect",
|
|
119
|
+
url: "https://github.com/alchemy-run/alchemy-effect",
|
|
120
|
+
packs: [{ uid: "effect", version: ">=4.0.0-beta.66 || >=4.0.0" }],
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
repo: "anomalyco/opencode",
|
|
124
|
+
url: "https://github.com/anomalyco/opencode",
|
|
125
|
+
packs: [{ uid: "effect", version: "4.0.0-beta.65" }],
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
repo: "pingdotgg/t3code",
|
|
129
|
+
url: "https://github.com/pingdotgg/t3code",
|
|
130
|
+
packs: [{ uid: "effect", version: "4.0.0-beta.59" }],
|
|
131
|
+
},
|
|
132
|
+
],
|
|
103
133
|
},
|
|
104
134
|
{
|
|
105
135
|
id: "elysia",
|
|
@@ -281,7 +311,7 @@ export const packCatalog = [
|
|
|
281
311
|
"Shared JavaScript / TypeScript language pack for hook and language-level scaffold assets.",
|
|
282
312
|
skills: ["quality-types"],
|
|
283
313
|
lintAssets: [],
|
|
284
|
-
hooks: ["format-edited-file"
|
|
314
|
+
hooks: ["format-edited-file"],
|
|
285
315
|
promptSurfaces: [],
|
|
286
316
|
promptDetails: [],
|
|
287
317
|
},
|
|
@@ -52,6 +52,14 @@ export const skillCatalog = [
|
|
|
52
52
|
framework: "better-auth",
|
|
53
53
|
requiresTools: [],
|
|
54
54
|
},
|
|
55
|
+
{
|
|
56
|
+
id: "better-auth-security-best-practices",
|
|
57
|
+
sourceDirectory: "skills/frameworks/better-auth/better-auth-security-best-practices",
|
|
58
|
+
tier: "framework",
|
|
59
|
+
language: "typescript",
|
|
60
|
+
framework: "better-auth",
|
|
61
|
+
requiresTools: [],
|
|
62
|
+
},
|
|
55
63
|
{
|
|
56
64
|
id: "create-plan",
|
|
57
65
|
sourceDirectory: "skills/agnostic/planning/create-plan",
|
|
@@ -70,7 +78,7 @@ export const skillCatalog = [
|
|
|
70
78
|
},
|
|
71
79
|
{
|
|
72
80
|
id: "delivery-phase",
|
|
73
|
-
sourceDirectory: "skills/
|
|
81
|
+
sourceDirectory: "skills/phases/delivery-phase",
|
|
74
82
|
tier: "agnostic",
|
|
75
83
|
language: null,
|
|
76
84
|
framework: null,
|
|
@@ -86,15 +94,31 @@ export const skillCatalog = [
|
|
|
86
94
|
},
|
|
87
95
|
{
|
|
88
96
|
id: "debugging-phase",
|
|
89
|
-
sourceDirectory: "skills/
|
|
97
|
+
sourceDirectory: "skills/phases/debugging-phase",
|
|
90
98
|
tier: "agnostic",
|
|
91
99
|
language: null,
|
|
92
100
|
framework: null,
|
|
93
101
|
requiresTools: ["debug-agent"],
|
|
94
102
|
},
|
|
103
|
+
{
|
|
104
|
+
id: "bug-discovery-phase",
|
|
105
|
+
sourceDirectory: "skills/phases/bug-discovery-phase",
|
|
106
|
+
tier: "agnostic",
|
|
107
|
+
language: null,
|
|
108
|
+
framework: null,
|
|
109
|
+
requiresTools: ["clawpatch"],
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
id: "bug-resolution-phase",
|
|
113
|
+
sourceDirectory: "skills/phases/bug-resolution-phase",
|
|
114
|
+
tier: "agnostic",
|
|
115
|
+
language: null,
|
|
116
|
+
framework: null,
|
|
117
|
+
requiresTools: ["clawpatch"],
|
|
118
|
+
},
|
|
95
119
|
{
|
|
96
120
|
id: "docs-ingest-phase",
|
|
97
|
-
sourceDirectory: "skills/
|
|
121
|
+
sourceDirectory: "skills/phases/docs-ingest-phase",
|
|
98
122
|
tier: "agnostic",
|
|
99
123
|
language: null,
|
|
100
124
|
framework: null,
|
|
@@ -158,7 +182,7 @@ export const skillCatalog = [
|
|
|
158
182
|
},
|
|
159
183
|
{
|
|
160
184
|
id: "goalify",
|
|
161
|
-
sourceDirectory: "skills/
|
|
185
|
+
sourceDirectory: "skills/phases/goalify",
|
|
162
186
|
tier: "agnostic",
|
|
163
187
|
language: null,
|
|
164
188
|
framework: null,
|
|
@@ -278,7 +302,7 @@ export const skillCatalog = [
|
|
|
278
302
|
},
|
|
279
303
|
{
|
|
280
304
|
id: "requirements-phase",
|
|
281
|
-
sourceDirectory: "skills/
|
|
305
|
+
sourceDirectory: "skills/phases/requirements-phase",
|
|
282
306
|
tier: "agnostic",
|
|
283
307
|
language: null,
|
|
284
308
|
framework: null,
|
|
@@ -286,7 +310,7 @@ export const skillCatalog = [
|
|
|
286
310
|
},
|
|
287
311
|
{
|
|
288
312
|
id: "resolve-debt-phase",
|
|
289
|
-
sourceDirectory: "skills/
|
|
313
|
+
sourceDirectory: "skills/phases/resolve-debt-phase",
|
|
290
314
|
tier: "agnostic",
|
|
291
315
|
language: null,
|
|
292
316
|
framework: null,
|
|
@@ -294,7 +318,7 @@ export const skillCatalog = [
|
|
|
294
318
|
},
|
|
295
319
|
{
|
|
296
320
|
id: "review-phase",
|
|
297
|
-
sourceDirectory: "skills/
|
|
321
|
+
sourceDirectory: "skills/phases/review-phase",
|
|
298
322
|
tier: "agnostic",
|
|
299
323
|
language: null,
|
|
300
324
|
framework: null,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { createHash } from "node:crypto";
|
|
4
|
-
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
4
|
+
import { accessSync, constants, existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
5
5
|
import os from "node:os";
|
|
6
6
|
import path from "node:path";
|
|
7
7
|
import { spawnSync } from "node:child_process";
|
|
@@ -87,11 +87,32 @@ function runCommand(root, args, stdio = "ignore") {
|
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
function commandExists(command) {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
90
|
+
const pathValue = process.env.PATH ?? process.env.Path;
|
|
91
|
+
if (!pathValue) {
|
|
92
|
+
return false;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
const isWindows = os.platform() === "win32";
|
|
96
|
+
const pathEntries = pathValue.split(isWindows ? ";" : ":").filter(Boolean);
|
|
97
|
+
const pathExtensions = isWindows
|
|
98
|
+
? (process.env.PATHEXT ?? ".COM;.EXE;.BAT;.CMD").split(";").filter(Boolean)
|
|
99
|
+
: [""];
|
|
100
|
+
const commandExtensions = isWindows && path.extname(command) === "" ? pathExtensions : [""];
|
|
101
|
+
const hasPathSegment = command.includes("/") || command.includes("\\");
|
|
102
|
+
const candidates = (hasPathSegment ? [""] : pathEntries).flatMap((entry) =>
|
|
103
|
+
commandExtensions.map((extension) =>
|
|
104
|
+
hasPathSegment ? `${command}${extension}` : path.join(entry, `${command}${extension}`),
|
|
105
|
+
),
|
|
94
106
|
);
|
|
107
|
+
|
|
108
|
+
return candidates.some((candidate) => {
|
|
109
|
+
try {
|
|
110
|
+
accessSync(candidate, isWindows ? constants.F_OK : constants.X_OK);
|
|
111
|
+
return true;
|
|
112
|
+
} catch {
|
|
113
|
+
return false;
|
|
114
|
+
}
|
|
115
|
+
});
|
|
95
116
|
}
|
|
96
117
|
|
|
97
118
|
function packageManagerFromPackageJson(root) {
|
package/dist/data/hooks.test.ts
CHANGED
|
@@ -31,35 +31,6 @@ const tempRepo = (files: Record<string, string>) => {
|
|
|
31
31
|
};
|
|
32
32
|
|
|
33
33
|
describe("scaffolded hooks", () => {
|
|
34
|
-
it("runs the PR test gate with the repo package manager", async () => {
|
|
35
|
-
const { testHooks } = await loadHookModule("require-tests-for-pr.mjs");
|
|
36
|
-
|
|
37
|
-
expect(
|
|
38
|
-
testHooks.testCommand?.(
|
|
39
|
-
tempRepo({
|
|
40
|
-
"package.json": JSON.stringify({ packageManager: "bun@1.3.5" }),
|
|
41
|
-
}),
|
|
42
|
-
),
|
|
43
|
-
).toEqual(["bun", "run", "test"]);
|
|
44
|
-
|
|
45
|
-
expect(
|
|
46
|
-
testHooks.testCommand?.(
|
|
47
|
-
tempRepo({
|
|
48
|
-
"package.json": JSON.stringify({ packageManager: "pnpm@10.0.0" }),
|
|
49
|
-
}),
|
|
50
|
-
),
|
|
51
|
-
).toEqual(["pnpm", "--silent", "test"]);
|
|
52
|
-
|
|
53
|
-
expect(
|
|
54
|
-
testHooks.testCommand?.(
|
|
55
|
-
tempRepo({
|
|
56
|
-
"package.json": "{}",
|
|
57
|
-
"package-lock.json": "",
|
|
58
|
-
}),
|
|
59
|
-
),
|
|
60
|
-
).toEqual(["npm", "--silent", "test"]);
|
|
61
|
-
});
|
|
62
|
-
|
|
63
34
|
it("executes formatter tools with the repo package manager", async () => {
|
|
64
35
|
const { testHooks } = await loadHookModule("format-edited-file.mjs");
|
|
65
36
|
|
|
@@ -52,7 +52,7 @@ const cursorManagedComment =
|
|
|
52
52
|
const opencodeManagedComment =
|
|
53
53
|
"<!-- Generated by scripts/sync-subagents.mjs. Edit .agents/subagents/manifest.mjs instead. -->";
|
|
54
54
|
|
|
55
|
-
function buildCodexAgentConfig({ hasFormatHook
|
|
55
|
+
function buildCodexAgentConfig({ hasFormatHook }) {
|
|
56
56
|
const lines = [
|
|
57
57
|
"[agents]",
|
|
58
58
|
"max_threads = 6",
|
|
@@ -74,16 +74,6 @@ function buildCodexAgentConfig({ hasFormatHook, hasTestHook }) {
|
|
|
74
74
|
);
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
if (hasTestHook) {
|
|
78
|
-
lines.push(
|
|
79
|
-
"PreToolUse = [",
|
|
80
|
-
' { matcher = "Bash|.*[Pp]ull.?[Rr]equest.*|.*[Pp][Rr].?[Cc]reate.*|.*create[_-]?pull[_-]?request.*", hooks = [',
|
|
81
|
-
' { type = "command", command = "node \\"$(git rev-parse --show-toplevel)/.codex/hooks/require-tests-for-pr.mjs\\" codex", statusMessage = "Checking tests before PR creation", timeout = 600 },',
|
|
82
|
-
" ] },",
|
|
83
|
-
"]",
|
|
84
|
-
);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
77
|
if (hasFormatHook) {
|
|
88
78
|
lines.push(
|
|
89
79
|
"PostToolUse = [",
|
|
@@ -98,86 +88,39 @@ function buildCodexAgentConfig({ hasFormatHook, hasTestHook }) {
|
|
|
98
88
|
return lines.join("\n");
|
|
99
89
|
}
|
|
100
90
|
|
|
101
|
-
function buildClaudeSettingsConfig({ hasFormatHook
|
|
91
|
+
function buildClaudeSettingsConfig({ hasFormatHook }) {
|
|
102
92
|
return {
|
|
103
|
-
hooks:
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
matcher: "Bash",
|
|
120
|
-
hooks: [
|
|
121
|
-
{
|
|
122
|
-
type: "command",
|
|
123
|
-
command:
|
|
124
|
-
'node "$CLAUDE_PROJECT_DIR"/.claude/hooks/require-tests-for-pr.mjs claude',
|
|
125
|
-
timeout: 600,
|
|
126
|
-
},
|
|
127
|
-
],
|
|
128
|
-
},
|
|
129
|
-
],
|
|
130
|
-
}
|
|
131
|
-
: {}),
|
|
132
|
-
...(hasFormatHook
|
|
133
|
-
? {
|
|
134
|
-
PostToolUse: [
|
|
135
|
-
{
|
|
136
|
-
matcher: "Edit|Write|MultiEdit",
|
|
137
|
-
hooks: [
|
|
138
|
-
{
|
|
139
|
-
type: "command",
|
|
140
|
-
command:
|
|
141
|
-
'node "$CLAUDE_PROJECT_DIR"/.claude/hooks/format-edited-file.mjs claude',
|
|
142
|
-
timeout: 30,
|
|
143
|
-
},
|
|
144
|
-
],
|
|
145
|
-
},
|
|
146
|
-
],
|
|
147
|
-
}
|
|
148
|
-
: {}),
|
|
149
|
-
},
|
|
93
|
+
hooks: hasFormatHook
|
|
94
|
+
? {
|
|
95
|
+
PostToolUse: [
|
|
96
|
+
{
|
|
97
|
+
matcher: "Edit|Write|MultiEdit",
|
|
98
|
+
hooks: [
|
|
99
|
+
{
|
|
100
|
+
type: "command",
|
|
101
|
+
command: 'node "$CLAUDE_PROJECT_DIR"/.claude/hooks/format-edited-file.mjs claude',
|
|
102
|
+
timeout: 30,
|
|
103
|
+
},
|
|
104
|
+
],
|
|
105
|
+
},
|
|
106
|
+
],
|
|
107
|
+
}
|
|
108
|
+
: {},
|
|
150
109
|
};
|
|
151
110
|
}
|
|
152
111
|
|
|
153
|
-
function buildCursorHooksConfig({ hasFormatHook
|
|
112
|
+
function buildCursorHooksConfig({ hasFormatHook }) {
|
|
154
113
|
return {
|
|
155
114
|
version: 1,
|
|
156
|
-
hooks:
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
{
|
|
166
|
-
command: "node .cursor/hooks/require-tests-for-pr.mjs cursor",
|
|
167
|
-
},
|
|
168
|
-
],
|
|
169
|
-
}
|
|
170
|
-
: {}),
|
|
171
|
-
...(hasFormatHook
|
|
172
|
-
? {
|
|
173
|
-
afterFileEdit: [
|
|
174
|
-
{
|
|
175
|
-
command: "node .cursor/hooks/format-edited-file.mjs cursor",
|
|
176
|
-
},
|
|
177
|
-
],
|
|
178
|
-
}
|
|
179
|
-
: {}),
|
|
180
|
-
},
|
|
115
|
+
hooks: hasFormatHook
|
|
116
|
+
? {
|
|
117
|
+
afterFileEdit: [
|
|
118
|
+
{
|
|
119
|
+
command: "node .cursor/hooks/format-edited-file.mjs cursor",
|
|
120
|
+
},
|
|
121
|
+
],
|
|
122
|
+
}
|
|
123
|
+
: {},
|
|
181
124
|
};
|
|
182
125
|
}
|
|
183
126
|
|
|
@@ -394,7 +337,7 @@ async function syncHookSurface() {
|
|
|
394
337
|
await mkdir(cursorHooksDir, { recursive: true });
|
|
395
338
|
await mkdir(opencodePluginsDir, { recursive: true });
|
|
396
339
|
|
|
397
|
-
for (const hookName of ["format-edited-file.mjs"
|
|
340
|
+
for (const hookName of ["format-edited-file.mjs"]) {
|
|
398
341
|
const sourcePath = path.join(sharedHooksPath, hookName);
|
|
399
342
|
const targetPaths = [
|
|
400
343
|
path.join(codexHooksDir, hookName),
|
|
@@ -448,7 +391,6 @@ async function main() {
|
|
|
448
391
|
await mkdir(path.dirname(cursorHooksJsonPath), { recursive: true });
|
|
449
392
|
const availableHooks = {
|
|
450
393
|
hasFormatHook: await pathExists(path.join(sharedHooksPath, "format-edited-file.mjs")),
|
|
451
|
-
hasTestHook: await pathExists(path.join(sharedHooksPath, "require-tests-for-pr.mjs")),
|
|
452
394
|
};
|
|
453
395
|
await writeFile(codexConfigPath, buildCodexAgentConfig(availableHooks), "utf8");
|
|
454
396
|
await rm(path.join(codexDir, "hooks.json"), { force: true });
|
|
@@ -4,7 +4,7 @@ const capabilityPacks = {
|
|
|
4
4
|
skills: [
|
|
5
5
|
"next-best-practices",
|
|
6
6
|
"async-react-patterns",
|
|
7
|
-
"
|
|
7
|
+
"frontend-domain-structure",
|
|
8
8
|
"vercel-react-best-practices",
|
|
9
9
|
],
|
|
10
10
|
},
|
|
@@ -16,8 +16,8 @@ const capabilityPacks = {
|
|
|
16
16
|
description: "UI implementation, browser testing, visual quality, and composition patterns.",
|
|
17
17
|
skills: [
|
|
18
18
|
"agent-browser",
|
|
19
|
-
"frontend
|
|
20
|
-
"
|
|
19
|
+
"design-taste-frontend",
|
|
20
|
+
"frontend-domain-structure",
|
|
21
21
|
"vercel-composition-patterns",
|
|
22
22
|
],
|
|
23
23
|
},
|
|
@@ -145,7 +145,7 @@ const agents = [
|
|
|
145
145
|
"vercel-composition-patterns",
|
|
146
146
|
"vercel-react-best-practices",
|
|
147
147
|
"tanstack-query",
|
|
148
|
-
"
|
|
148
|
+
"frontend-domain-structure",
|
|
149
149
|
"simplify",
|
|
150
150
|
],
|
|
151
151
|
boundaries: [
|
|
@@ -167,13 +167,13 @@ const agents = [
|
|
|
167
167
|
"agent-browser",
|
|
168
168
|
"next-best-practices",
|
|
169
169
|
"next-cache-components",
|
|
170
|
-
"frontend
|
|
171
|
-
"
|
|
170
|
+
"design-taste-frontend",
|
|
171
|
+
"frontend-domain-structure",
|
|
172
172
|
"async-react-patterns",
|
|
173
173
|
"vercel-composition-patterns",
|
|
174
174
|
"vercel-react-best-practices",
|
|
175
175
|
"tanstack-query",
|
|
176
|
-
"
|
|
176
|
+
"frontend-domain-structure",
|
|
177
177
|
"simplify",
|
|
178
178
|
],
|
|
179
179
|
boundaries: [
|
|
@@ -198,7 +198,7 @@ const agents = [
|
|
|
198
198
|
"vercel-composition-patterns",
|
|
199
199
|
"vercel-react-best-practices",
|
|
200
200
|
"tanstack-query",
|
|
201
|
-
"
|
|
201
|
+
"frontend-domain-structure",
|
|
202
202
|
"simplify",
|
|
203
203
|
],
|
|
204
204
|
boundaries: [
|
|
@@ -223,7 +223,7 @@ const agents = [
|
|
|
223
223
|
"vercel-composition-patterns",
|
|
224
224
|
"vercel-react-best-practices",
|
|
225
225
|
"tanstack-query",
|
|
226
|
-
"
|
|
226
|
+
"frontend-domain-structure",
|
|
227
227
|
"simplify",
|
|
228
228
|
],
|
|
229
229
|
boundaries: [
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
import { pathToFileURL } from "node:url";
|
|
3
|
+
|
|
4
|
+
import { describe, expect, it } from "@effect/vitest";
|
|
5
|
+
|
|
6
|
+
import { knownSkillIds } from "../../content/skills";
|
|
7
|
+
|
|
8
|
+
describe("subagent manifest", () => {
|
|
9
|
+
it("references only bundled skill ids", async () => {
|
|
10
|
+
const manifestUrl = pathToFileURL(path.resolve(import.meta.dirname, "manifest.mjs")).toString();
|
|
11
|
+
const manifest = (await import(manifestUrl)) as {
|
|
12
|
+
readonly agents: ReadonlyArray<{
|
|
13
|
+
readonly skills?: ReadonlyArray<string>;
|
|
14
|
+
readonly packs?: ReadonlyArray<string>;
|
|
15
|
+
}>;
|
|
16
|
+
readonly capabilityPacks: Record<string, { readonly skills: ReadonlyArray<string> }>;
|
|
17
|
+
};
|
|
18
|
+
const bundledSkills = new Set(knownSkillIds);
|
|
19
|
+
const referencedSkills = new Set<string>();
|
|
20
|
+
|
|
21
|
+
for (const pack of Object.values(manifest.capabilityPacks)) {
|
|
22
|
+
for (const skill of pack.skills) {
|
|
23
|
+
referencedSkills.add(skill);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
for (const agent of manifest.agents) {
|
|
28
|
+
for (const skill of agent.skills ?? []) {
|
|
29
|
+
referencedSkills.add(skill);
|
|
30
|
+
}
|
|
31
|
+
for (const packId of agent.packs ?? []) {
|
|
32
|
+
expect(manifest.capabilityPacks[packId]).toBeDefined();
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
expect([...referencedSkills].filter((skill) => !bundledSkills.has(skill)).toSorted()).toEqual(
|
|
37
|
+
[],
|
|
38
|
+
);
|
|
39
|
+
});
|
|
40
|
+
});
|