@punks/cli 1.0.7 → 2.0.0-beta.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.
Files changed (42) hide show
  1. package/AGENTS.md +4 -5
  2. package/README.md +2 -2
  3. package/dist/data/catalog/hooks.ts +7 -0
  4. package/dist/data/catalog/lint.ts +7 -21
  5. package/dist/data/catalog/packs.ts +263 -21
  6. package/dist/data/catalog/skills.ts +352 -38
  7. package/dist/data/hooks/require-tests-for-pr.mjs +206 -0
  8. package/dist/data/hooks.test.ts +29 -0
  9. package/dist/data/scripts/sync-subagents.mjs +64 -6
  10. package/dist/data/subagents/manifest.mjs +15 -49
  11. package/dist/index.js +14368 -3445
  12. package/dist/skills/agnostic/debug/debugging-phase/SKILL.md +87 -0
  13. package/dist/skills/agnostic/docs/docs-ingest-phase/SKILL.md +87 -0
  14. package/dist/skills/agnostic/docs/docs-ingest-phase/agents/openai.yaml +4 -0
  15. package/dist/skills/agnostic/docs/{docs-maintenance → docs-ingest-phase}/references/concept-pages.md +1 -1
  16. package/dist/skills/agnostic/docs/{docs-maintenance → docs-ingest-phase}/references/flow-pages.md +1 -1
  17. package/dist/skills/agnostic/docs/docs-ingest-phase/references/fumadocs-routing.md +88 -0
  18. package/dist/skills/agnostic/docs/docs-ingest-phase/references/repo-docs.md +38 -0
  19. package/dist/skills/agnostic/docs/docs-ingest-phase/references/wiki-ingest.md +131 -0
  20. package/dist/skills/agnostic/planning/create-plan/SKILL.md +11 -9
  21. package/dist/skills/agnostic/planning/create-spec/SKILL.md +20 -18
  22. package/dist/skills/agnostic/planning/delivery-phase/SKILL.md +82 -0
  23. package/dist/skills/agnostic/planning/goalify/EXAMPLES.md +72 -0
  24. package/dist/skills/agnostic/planning/goalify/SKILL.md +97 -0
  25. package/dist/skills/agnostic/planning/implement-spec/SKILL.md +3 -3
  26. package/dist/skills/agnostic/planning/implement-spec/assets/IMPLEMENTATION-NOTES-TEMPLATE.md +6 -0
  27. package/dist/skills/agnostic/planning/implement-spec/references/lifecycle.md +23 -2
  28. package/dist/skills/agnostic/planning/resolve-debt-phase/SKILL.md +87 -0
  29. package/dist/skills/agnostic/requirements/requirements-grill/SKILL.md +4 -3
  30. package/dist/skills/agnostic/requirements/requirements-grill/references/artifact-output.md +56 -2
  31. package/dist/skills/agnostic/requirements/requirements-grill/references/grilling-flow.md +16 -4
  32. package/dist/skills/agnostic/requirements/requirements-grill/references/wiki-output.md +6 -2
  33. package/dist/skills/agnostic/requirements/requirements-phase/SKILL.md +67 -0
  34. package/dist/skills/agnostic/research/review-phase/SKILL.md +99 -0
  35. package/package.json +17 -7
  36. package/dist/skills/agnostic/docs/docs-maintenance/SKILL.md +0 -193
  37. package/dist/skills/agnostic/docs/docs-maintenance/agents/openai.yaml +0 -4
  38. package/docs/README.md +0 -35
  39. package/docs/harness-intelligence-grill-log.md +0 -39
  40. package/docs/harness-intelligence-grill-status.md +0 -25
  41. package/docs/reference/dp-requirements.md +0 -225
  42. package/docs/runbooks/dp-cli-scaffolding.md +0 -261
@@ -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, hasTestHook }) {
56
56
  const lines = [
57
57
  "[agents]",
58
58
  "max_threads = 6",
@@ -74,6 +74,16 @@ function buildCodexAgentConfig({ hasFormatHook }) {
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
+
77
87
  if (hasFormatHook) {
78
88
  lines.push(
79
89
  "PostToolUse = [",
@@ -88,9 +98,37 @@ function buildCodexAgentConfig({ hasFormatHook }) {
88
98
  return lines.join("\n");
89
99
  }
90
100
 
91
- function buildClaudeSettingsConfig({ hasFormatHook }) {
101
+ function buildClaudeSettingsConfig({ hasFormatHook, hasTestHook }) {
92
102
  return {
93
103
  hooks: {
104
+ ...(hasTestHook
105
+ ? {
106
+ PreToolUse: [
107
+ {
108
+ matcher: "mcp__github__create_pull_request",
109
+ hooks: [
110
+ {
111
+ type: "command",
112
+ command:
113
+ 'node "$CLAUDE_PROJECT_DIR"/.claude/hooks/require-tests-for-pr.mjs claude',
114
+ timeout: 600,
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
+ : {}),
94
132
  ...(hasFormatHook
95
133
  ? {
96
134
  PostToolUse: [
@@ -99,7 +137,8 @@ function buildClaudeSettingsConfig({ hasFormatHook }) {
99
137
  hooks: [
100
138
  {
101
139
  type: "command",
102
- command: 'node "$CLAUDE_PROJECT_DIR"/.claude/hooks/format-edited-file.mjs claude',
140
+ command:
141
+ 'node "$CLAUDE_PROJECT_DIR"/.claude/hooks/format-edited-file.mjs claude',
103
142
  timeout: 30,
104
143
  },
105
144
  ],
@@ -111,10 +150,24 @@ function buildClaudeSettingsConfig({ hasFormatHook }) {
111
150
  };
112
151
  }
113
152
 
114
- function buildCursorHooksConfig({ hasFormatHook }) {
153
+ function buildCursorHooksConfig({ hasFormatHook, hasTestHook }) {
115
154
  return {
116
155
  version: 1,
117
156
  hooks: {
157
+ ...(hasTestHook
158
+ ? {
159
+ beforeMCPExecution: [
160
+ {
161
+ command: "node .cursor/hooks/require-tests-for-pr.mjs cursor",
162
+ },
163
+ ],
164
+ beforeShellExecution: [
165
+ {
166
+ command: "node .cursor/hooks/require-tests-for-pr.mjs cursor",
167
+ },
168
+ ],
169
+ }
170
+ : {}),
118
171
  ...(hasFormatHook
119
172
  ? {
120
173
  afterFileEdit: [
@@ -341,7 +394,7 @@ async function syncHookSurface() {
341
394
  await mkdir(cursorHooksDir, { recursive: true });
342
395
  await mkdir(opencodePluginsDir, { recursive: true });
343
396
 
344
- for (const hookName of ["format-edited-file.mjs"]) {
397
+ for (const hookName of ["format-edited-file.mjs", "require-tests-for-pr.mjs"]) {
345
398
  const sourcePath = path.join(sharedHooksPath, hookName);
346
399
  const targetPaths = [
347
400
  path.join(codexHooksDir, hookName),
@@ -395,10 +448,15 @@ async function main() {
395
448
  await mkdir(path.dirname(cursorHooksJsonPath), { recursive: true });
396
449
  const availableHooks = {
397
450
  hasFormatHook: await pathExists(path.join(sharedHooksPath, "format-edited-file.mjs")),
451
+ hasTestHook: await pathExists(path.join(sharedHooksPath, "require-tests-for-pr.mjs")),
398
452
  };
399
453
  await writeFile(codexConfigPath, buildCodexAgentConfig(availableHooks), "utf8");
400
454
  await rm(path.join(codexDir, "hooks.json"), { force: true });
401
- await writeFile(claudeSettingsPath, encodeJson(buildClaudeSettingsConfig(availableHooks)), "utf8");
455
+ await writeFile(
456
+ claudeSettingsPath,
457
+ encodeJson(buildClaudeSettingsConfig(availableHooks)),
458
+ "utf8",
459
+ );
402
460
  await writeFile(cursorHooksJsonPath, encodeJson(buildCursorHooksConfig(availableHooks)), "utf8");
403
461
  await writeManagedFiles(claudeAgentsDir, "md", claudeFiles);
404
462
  await writeManagedFiles(codexAgentsDir, "toml", codexFiles);
@@ -1,7 +1,6 @@
1
1
  const capabilityPacks = {
2
2
  "frontend-core": {
3
- description:
4
- "Core Next.js and React app structure guidance for product-facing frontend work.",
3
+ description: "Core Next.js and React app structure guidance for product-facing frontend work.",
5
4
  skills: [
6
5
  "next-best-practices",
7
6
  "async-react-patterns",
@@ -10,13 +9,11 @@ const capabilityPacks = {
10
9
  ],
11
10
  },
12
11
  simplify: {
13
- description:
14
- "Simplify and refine recently modified code for clarity and consistency.",
12
+ description: "Simplify and refine recently modified code for clarity and consistency.",
15
13
  skills: ["simplify"],
16
14
  },
17
15
  "frontend-ui": {
18
- description:
19
- "UI implementation, browser testing, visual quality, and composition patterns.",
16
+ description: "UI implementation, browser testing, visual quality, and composition patterns.",
20
17
  skills: [
21
18
  "agent-browser",
22
19
  "frontend-design",
@@ -30,8 +27,7 @@ const capabilityPacks = {
30
27
  skills: ["tanstack-query"],
31
28
  },
32
29
  "frontend-cache": {
33
- description:
34
- "Next.js cache components, PPR, cache tags, and related rendering/cache behavior.",
30
+ description: "Next.js cache components, PPR, cache tags, and related rendering/cache behavior.",
35
31
  skills: ["next-cache-components"],
36
32
  },
37
33
  "server-core": {
@@ -42,25 +38,16 @@ const capabilityPacks = {
42
38
  "api-core": {
43
39
  description:
44
40
  "Effect application logic, pre-write authoring guidance, service/layer patterns, and test-first backend domain work.",
45
- skills: [
46
- "effect-authoring",
47
- "effect-best-practices",
48
- "effect-recoverable-actions",
49
- "tdd",
50
- ],
41
+ skills: ["effect-authoring", "effect-best-practices", "effect-recoverable-actions", "tdd"],
51
42
  },
52
43
  "auth-core": {
53
- description:
54
- "Better Auth conventions and security-sensitive authentication behavior.",
55
- skills: [
56
- "better-auth-best-practices",
57
- "better-auth-security-best-practices",
58
- ],
44
+ description: "Better Auth conventions and security-sensitive authentication behavior.",
45
+ skills: ["better-auth-best-practices", "better-auth-security-best-practices"],
59
46
  },
60
47
  "docs-core": {
61
48
  description:
62
49
  "Repo documentation maintenance, routing, and human-facing durable knowledge capture.",
63
- skills: ["docs-maintenance"],
50
+ skills: ["docs-ingest-phase"],
64
51
  },
65
52
  "review-core": {
66
53
  description:
@@ -78,8 +65,7 @@ const capabilityPacks = {
78
65
  ],
79
66
  },
80
67
  "python-async": {
81
- description:
82
- "Python asyncio, concurrent I/O, async API boundaries, and async test strategy.",
68
+ description: "Python asyncio, concurrent I/O, async API boundaries, and async test strategy.",
83
69
  skills: [
84
70
  "async-python-patterns",
85
71
  "python-project-structure",
@@ -90,11 +76,7 @@ const capabilityPacks = {
90
76
  "python-quality": {
91
77
  description:
92
78
  "Python pytest coverage, fixture design, style checks, and refactor-safe quality work.",
93
- skills: [
94
- "python-testing-patterns",
95
- "python-code-style",
96
- "python-design-patterns",
97
- ],
79
+ skills: ["python-testing-patterns", "python-code-style", "python-design-patterns"],
98
80
  },
99
81
  };
100
82
 
@@ -133,14 +115,14 @@ const agents = [
133
115
  ],
134
116
  },
135
117
  {
136
- name: "docs-maintenance",
118
+ name: "docs-ingest-phase",
137
119
  description:
138
120
  "Use for repo documentation work centered on docs updates, index maintenance, ADR routing, and keeping docs grounded in implemented reality.",
139
121
  ownedPaths: ["docs/**"],
140
122
  guidanceFiles: ["docs/AGENTS.md"],
141
123
  activationInstructions: skillActivationInstructions,
142
124
  packs: ["docs-core", "simplify"],
143
- skills: ["docs-maintenance", "simplify"],
125
+ skills: ["docs-ingest-phase", "simplify"],
144
126
  boundaries: [
145
127
  "Own documentation updates in docs/ and keep them human-facing and implementation-grounded.",
146
128
  "If the task is mainly code implementation, tell the parent to use the relevant code specialist and only return for the docs follow-up.",
@@ -295,11 +277,7 @@ const agents = [
295
277
  guidanceFiles: ["packages/auth/AGENTS.md"],
296
278
  activationInstructions: skillActivationInstructions,
297
279
  packs: ["auth-core", "simplify"],
298
- skills: [
299
- "better-auth-best-practices",
300
- "better-auth-security-best-practices",
301
- "simplify",
302
- ],
280
+ skills: ["better-auth-best-practices", "better-auth-security-best-practices", "simplify"],
303
281
  boundaries: [
304
282
  "Treat auth work as security-sensitive and stay inside packages/auth unless explicitly coordinating with another specialist.",
305
283
  "If the task is mainly Effect application logic, tell the parent to use api-domain instead.",
@@ -342,14 +320,7 @@ const agents = [
342
320
  name: "python-async",
343
321
  description:
344
322
  "Use for Python async work centered on asyncio, concurrent I/O, async APIs, background tasks, and async test coverage.",
345
- ownedPaths: [
346
- "src/**",
347
- "packages/**",
348
- "services/**",
349
- "apps/**",
350
- "tests/**",
351
- "pyproject.toml",
352
- ],
323
+ ownedPaths: ["src/**", "packages/**", "services/**", "apps/**", "tests/**", "pyproject.toml"],
353
324
  guidanceFiles: ["AGENTS.md"],
354
325
  activationInstructions: skillActivationInstructions,
355
326
  packs: ["python-async", "python-quality", "simplify"],
@@ -383,12 +354,7 @@ const agents = [
383
354
  guidanceFiles: ["AGENTS.md"],
384
355
  activationInstructions: skillActivationInstructions,
385
356
  packs: ["python-quality", "simplify"],
386
- skills: [
387
- "python-testing-patterns",
388
- "python-code-style",
389
- "python-design-patterns",
390
- "simplify",
391
- ],
357
+ skills: ["python-testing-patterns", "python-code-style", "python-design-patterns", "simplify"],
392
358
  boundaries: [
393
359
  "Own pytest structure, fixtures, parameterization, integration-test shape, and test readability.",
394
360
  "Prefer tests that exercise real behavior over brittle mocks unless the boundary is genuinely external.",