natureco-cli 5.18.2 → 5.19.0

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 (155) hide show
  1. package/package.json +1 -1
  2. package/skills/airunway-aks-setup/SKILL.md +73 -0
  3. package/skills/algorithmic-art/SKILL.md +405 -0
  4. package/skills/appinsights-instrumentation/SKILL.md +76 -0
  5. package/skills/azure-ai/SKILL.md +71 -0
  6. package/skills/azure-aigateway/SKILL.md +129 -0
  7. package/skills/azure-cloud-migrate/SKILL.md +52 -0
  8. package/skills/azure-compliance/SKILL.md +108 -0
  9. package/skills/azure-compute/SKILL.md +46 -0
  10. package/skills/azure-cost/SKILL.md +45 -0
  11. package/skills/azure-deploy/SKILL.md +97 -0
  12. package/skills/azure-diagnostics/SKILL.md +151 -0
  13. package/skills/azure-enterprise-infra-planner/SKILL.md +54 -0
  14. package/skills/azure-hosted-copilot-sdk/SKILL.md +89 -0
  15. package/skills/azure-kubernetes/SKILL.md +153 -0
  16. package/skills/azure-kusto/SKILL.md +231 -0
  17. package/skills/azure-messaging/SKILL.md +57 -0
  18. package/skills/azure-prepare/SKILL.md +165 -0
  19. package/skills/azure-quotas/SKILL.md +276 -0
  20. package/skills/azure-rbac/SKILL.md +17 -0
  21. package/skills/azure-reliability/SKILL.md +387 -0
  22. package/skills/azure-resource-lookup/SKILL.md +108 -0
  23. package/skills/azure-resource-visualizer/SKILL.md +183 -0
  24. package/skills/azure-storage/SKILL.md +100 -0
  25. package/skills/azure-upgrade/SKILL.md +91 -0
  26. package/skills/azure-validate/SKILL.md +72 -0
  27. package/skills/brainstorming/SKILL.md +159 -0
  28. package/skills/brand-guidelines/SKILL.md +73 -0
  29. package/skills/brandkit/SKILL.md +798 -0
  30. package/skills/brutalist-skill/SKILL.md +92 -0
  31. package/skills/canvas-design/SKILL.md +130 -0
  32. package/skills/cavecrew/SKILL.md +82 -0
  33. package/skills/caveman-commit/SKILL.md +65 -0
  34. package/skills/caveman-help/SKILL.md +63 -0
  35. package/skills/caveman-review/SKILL.md +55 -0
  36. package/skills/caveman-stats/SKILL.md +10 -0
  37. package/skills/claude-api/SKILL.md +356 -0
  38. package/skills/composition-patterns/SKILL.md +89 -0
  39. package/skills/decision-mapping/SKILL.md +84 -0
  40. package/skills/deploy-to-vercel/SKILL.md +296 -0
  41. package/skills/design-an-interface/SKILL.md +94 -0
  42. package/skills/design-doc-mermaid/SKILL.md +498 -0
  43. package/skills/develop-userscripts/SKILL.md +84 -0
  44. package/skills/doc-coauthoring/SKILL.md +375 -0
  45. package/skills/documentation/SKILL.md +109 -0
  46. package/skills/docx/SKILL.md +590 -0
  47. package/skills/edit-article/SKILL.md +15 -0
  48. package/skills/entra-agent-id/SKILL.md +356 -0
  49. package/skills/entra-app-registration/SKILL.md +191 -0
  50. package/skills/faceless-explainer/SKILL.md +202 -0
  51. package/skills/fastify/SKILL.md +75 -0
  52. package/skills/general-video/SKILL.md +143 -0
  53. package/skills/git-guardrails-claude-code/SKILL.md +95 -0
  54. package/skills/github-actions-docs/SKILL.md +98 -0
  55. package/skills/gpt-tasteskill/SKILL.md +74 -0
  56. package/skills/grill-me/SKILL.md +7 -0
  57. package/skills/grilling/SKILL.md +10 -0
  58. package/skills/handoff/SKILL.md +16 -0
  59. package/skills/hyperframes/SKILL.md +152 -0
  60. package/skills/hyperframes-animation/SKILL.md +82 -0
  61. package/skills/hyperframes-cli/SKILL.md +109 -0
  62. package/skills/hyperframes-core/SKILL.md +78 -0
  63. package/skills/hyperframes-creative/SKILL.md +68 -0
  64. package/skills/hyperframes-media/SKILL.md +97 -0
  65. package/skills/image-to-code-skill/SKILL.md +1228 -0
  66. package/skills/imagegen-frontend-mobile/SKILL.md +1465 -0
  67. package/skills/imagegen-frontend-web/SKILL.md +987 -0
  68. package/skills/implement/SKILL.md +15 -0
  69. package/skills/init/SKILL.md +91 -0
  70. package/skills/internal-comms/SKILL.md +32 -0
  71. package/skills/lark-approval/SKILL.md +56 -0
  72. package/skills/lark-base/SKILL.md +157 -0
  73. package/skills/lark-doc/SKILL.md +81 -0
  74. package/skills/lark-shared/SKILL.md +168 -0
  75. package/skills/lark-workflow-meeting-summary/SKILL.md +122 -0
  76. package/skills/linting-neostandard-eslint9/SKILL.md +64 -0
  77. package/skills/loop-me/SKILL.md +32 -0
  78. package/skills/microsoft-foundry/SKILL.md +262 -0
  79. package/skills/migrate-to-shoehorn/SKILL.md +118 -0
  80. package/skills/minimalist-skill/SKILL.md +85 -0
  81. package/skills/motion-graphics/SKILL.md +170 -0
  82. package/skills/music-to-video/SKILL.md +197 -0
  83. package/skills/node/SKILL.md +94 -0
  84. package/skills/nodejs-core/SKILL.md +156 -0
  85. package/skills/oauth/SKILL.md +186 -0
  86. package/skills/obsidian-vault/SKILL.md +59 -0
  87. package/skills/octocat/SKILL.md +93 -0
  88. package/skills/openclaw-secure-linux-cloud/SKILL.md +157 -0
  89. package/skills/opensource-guide-coach/SKILL.md +218 -0
  90. package/skills/output-skill/SKILL.md +49 -0
  91. package/skills/pdf/SKILL.md +314 -0
  92. package/skills/pptx/SKILL.md +232 -0
  93. package/skills/pr-to-video/SKILL.md +235 -0
  94. package/skills/product-launch-video/SKILL.md +205 -0
  95. package/skills/python-appservice-deploy/SKILL.md +36 -0
  96. package/skills/qa/SKILL.md +130 -0
  97. package/skills/react-best-practices/SKILL.md +149 -0
  98. package/skills/react-native-skills/SKILL.md +121 -0
  99. package/skills/react-view-transitions/SKILL.md +320 -0
  100. package/skills/readme-i18n/SKILL.md +176 -0
  101. package/skills/redesign-skill/SKILL.md +178 -0
  102. package/skills/remotion/SKILL.md +364 -0
  103. package/skills/request-refactor-plan/SKILL.md +68 -0
  104. package/skills/resolving-merge-conflicts/SKILL.md +14 -0
  105. package/skills/running-claude-code-via-litellm-copilot/SKILL.md +263 -0
  106. package/skills/scaffold-exercises/SKILL.md +106 -0
  107. package/skills/secure-linux-web-hosting/SKILL.md +162 -0
  108. package/skills/setup-pre-commit/SKILL.md +91 -0
  109. package/skills/shadcn/SKILL.md +267 -0
  110. package/skills/simple/SKILL.md +52 -0
  111. package/skills/skill-creator/SKILL.md +485 -0
  112. package/skills/skill-optimizer/SKILL.md +47 -0
  113. package/skills/skills-cli/SKILL.md +281 -0
  114. package/skills/slack-gif-creator/SKILL.md +254 -0
  115. package/skills/snipgrapher/SKILL.md +58 -0
  116. package/skills/soft-skill/SKILL.md +98 -0
  117. package/skills/stitch-skill/SKILL.md +184 -0
  118. package/skills/supabase/SKILL.md +135 -0
  119. package/skills/supabase-postgres-best-practices/SKILL.md +64 -0
  120. package/skills/systematic-debugging/SKILL.md +296 -0
  121. package/skills/talking-head-recut/SKILL.md +1191 -0
  122. package/skills/taste-skill/SKILL.md +1206 -0
  123. package/skills/taste-skill-v1/SKILL.md +226 -0
  124. package/skills/tdd/SKILL.md +108 -0
  125. package/skills/teach/SKILL.md +140 -0
  126. package/skills/test-driven-development/SKILL.md +371 -0
  127. package/skills/theme-factory/SKILL.md +59 -0
  128. package/skills/to-prd/SKILL.md +75 -0
  129. package/skills/typescript-magician/SKILL.md +117 -0
  130. package/skills/tzst/SKILL.md +68 -0
  131. package/skills/ubiquitous-language/SKILL.md +93 -0
  132. package/skills/use-my-browser/SKILL.md +110 -0
  133. package/skills/using-superpowers/SKILL.md +121 -0
  134. package/skills/vercel-cli-with-tokens/SKILL.md +353 -0
  135. package/skills/vercel-optimize/SKILL.md +322 -0
  136. package/skills/viral-instagram-reels/SKILL.md +180 -0
  137. package/skills/viral-short-form/SKILL.md +147 -0
  138. package/skills/viral-short-form-ideas/SKILL.md +184 -0
  139. package/skills/viral-tiktok-content/SKILL.md +180 -0
  140. package/skills/web-artifacts-builder/SKILL.md +74 -0
  141. package/skills/web-design-guidelines/SKILL.md +39 -0
  142. package/skills/webapp-testing/SKILL.md +96 -0
  143. package/skills/website-to-video/SKILL.md +145 -0
  144. package/skills/writing-beats/SKILL.md +67 -0
  145. package/skills/writing-fragments/SKILL.md +79 -0
  146. package/skills/writing-great-skills/SKILL.md +82 -0
  147. package/skills/writing-guidelines/SKILL.md +39 -0
  148. package/skills/writing-plans/SKILL.md +174 -0
  149. package/skills/writing-shape/SKILL.md +79 -0
  150. package/skills/xdrop/SKILL.md +78 -0
  151. package/skills/xget/SKILL.md +87 -0
  152. package/skills/xlsx/SKILL.md +292 -0
  153. package/src/tools/browser_use.js +2 -1
  154. package/src/tools/skills_download.js +217 -0
  155. package/src/utils/tools.js +2 -2
@@ -0,0 +1,296 @@
1
+ ---
2
+ name: deploy-to-vercel
3
+ description: Deploy applications and websites to Vercel. Use when the user requests deployment actions like "deploy my app", "deploy and give me the link", "push this live", or "create a preview deployment".
4
+ metadata:
5
+ author: vercel
6
+ version: "3.0.0"
7
+ ---
8
+
9
+ # Deploy to Vercel
10
+
11
+ Deploy any project to Vercel. **Always deploy as preview** (not production) unless the user explicitly asks for production.
12
+
13
+ The goal is to get the user into the best long-term setup: their project linked to Vercel with git-push deploys. Every method below tries to move the user closer to that state.
14
+
15
+ ## Step 1: Gather Project State
16
+
17
+ Run all four checks before deciding which method to use:
18
+
19
+ ```bash
20
+ # 1. Check for a git remote
21
+ git remote get-url origin 2>/dev/null
22
+
23
+ # 2. Check if locally linked to a Vercel project (either file means linked)
24
+ cat .vercel/project.json 2>/dev/null || cat .vercel/repo.json 2>/dev/null
25
+
26
+ # 3. Check if the Vercel CLI is installed and authenticated
27
+ vercel whoami 2>/dev/null
28
+
29
+ # 4. List available teams (if authenticated)
30
+ vercel teams list --format json 2>/dev/null
31
+ ```
32
+
33
+ ### Team selection
34
+
35
+ If the user belongs to multiple teams, present all available team slugs as a bulleted list and ask which one to deploy to. Once the user picks a team, proceed immediately to the next step — do not ask for additional confirmation.
36
+
37
+ Pass the team slug via `--scope` on all subsequent CLI commands (`vercel deploy`, `vercel link`, `vercel inspect`, etc.):
38
+
39
+ ```bash
40
+ vercel deploy [path] -y --no-wait --scope <team-slug>
41
+ ```
42
+
43
+ If the project is already linked (`.vercel/project.json` or `.vercel/repo.json` exists), the `orgId` in those files determines the team — no need to ask again. If there is only one team (or just a personal account), skip the prompt and use it directly.
44
+
45
+ **About the `.vercel/` directory:** A linked project has either:
46
+ - `.vercel/project.json` — created by `vercel link` (single project linking). Contains `projectId` and `orgId`.
47
+ - `.vercel/repo.json` — created by `vercel link --repo` (repo-based linking). Contains `orgId`, `remoteName`, and a `projects` array mapping directories to Vercel project IDs.
48
+
49
+ Either file means the project is linked. Check for both.
50
+
51
+ **Do NOT** use `vercel project inspect`, `vercel ls`, or `vercel link` to detect state in an unlinked directory — without a `.vercel/` config, they will interactively prompt (or with `--yes`, silently link as a side-effect). Only `vercel whoami` is safe to run anywhere.
52
+
53
+ ## Step 2: Choose a Deploy Method
54
+
55
+ ### Linked (`.vercel/` exists) + has git remote → Git Push
56
+
57
+ This is the ideal state. The project is linked and has git integration.
58
+
59
+ 1. **Ask the user before pushing.** Never push without explicit approval:
60
+ ```
61
+ This project is connected to Vercel via git. I can commit and push to
62
+ trigger a deployment. Want me to proceed?
63
+ ```
64
+
65
+ 2. **Commit and push:**
66
+ ```bash
67
+ git add .
68
+ git commit -m "deploy: <description of changes>"
69
+ git push
70
+ ```
71
+ Vercel automatically builds from the push. Non-production branches get preview deployments; the production branch (usually `main`) gets a production deployment.
72
+
73
+ 3. **Retrieve the preview URL.** If the CLI is authenticated:
74
+ ```bash
75
+ sleep 5
76
+ vercel ls --format json
77
+ ```
78
+ The JSON output has a `deployments` array. Find the latest entry — its `url` field is the preview URL.
79
+
80
+ If the CLI is not authenticated, tell the user to check the Vercel dashboard or the commit status checks on their git provider for the preview URL.
81
+
82
+ ---
83
+
84
+ ### Linked (`.vercel/` exists) + no git remote → `vercel deploy`
85
+
86
+ The project is linked but there's no git repo. Deploy directly with the CLI.
87
+
88
+ ```bash
89
+ vercel deploy [path] -y --no-wait
90
+ ```
91
+
92
+ Use `--no-wait` so the CLI returns immediately with the deployment URL instead of blocking until the build finishes (builds can take a while). Then check on the deployment status with:
93
+
94
+ ```bash
95
+ vercel inspect <deployment-url>
96
+ ```
97
+
98
+ For production deploys (only if user explicitly asks):
99
+ ```bash
100
+ vercel deploy [path] --prod -y --no-wait
101
+ ```
102
+
103
+ ---
104
+
105
+ ### Not linked + CLI is authenticated → Link first, then deploy
106
+
107
+ The CLI is working but the project isn't linked yet. This is the opportunity to get the user into the best state.
108
+
109
+ 1. **Ask the user which team to deploy to.** Present the team slugs from Step 1 as a bulleted list. If there's only one team (or just a personal account), skip this step.
110
+
111
+ 2. **Once a team is selected, proceed directly to linking.** Tell the user what will happen but do not ask for separate confirmation:
112
+ ```
113
+ Linking this project to <team name> on Vercel. This will create a Vercel
114
+ project to deploy to and enable automatic deployments on future git pushes.
115
+ ```
116
+
117
+ 3. **If a git remote exists**, use repo-based linking with the selected team scope:
118
+ ```bash
119
+ vercel link --repo --scope <team-slug>
120
+ ```
121
+ This reads the git remote URL and matches it to existing Vercel projects that deploy from that repo. It creates `.vercel/repo.json`. This is much more reliable than `vercel link` (without `--repo`), which tries to match by directory name and often fails when the local folder and Vercel project are named differently.
122
+
123
+ **If there is no git remote**, fall back to standard linking:
124
+ ```bash
125
+ vercel link --scope <team-slug>
126
+ ```
127
+ This prompts the user to select or create a project. It creates `.vercel/project.json`.
128
+
129
+ 4. **Then deploy using the best available method:**
130
+ - If a git remote exists → commit and push (see git push method above)
131
+ - If no git remote → `vercel deploy [path] -y --no-wait --scope <team-slug>`, then `vercel inspect <url>` to check status
132
+
133
+ ---
134
+
135
+ ### Not linked + CLI not authenticated → Install, auth, link, deploy
136
+
137
+ The Vercel CLI isn't set up at all.
138
+
139
+ 1. **Install the CLI (if not already installed):**
140
+ ```bash
141
+ npm install -g vercel
142
+ ```
143
+
144
+ 2. **Authenticate:**
145
+ ```bash
146
+ vercel login
147
+ ```
148
+ The user completes auth in their browser. If running in a non-interactive environment where login is not possible, skip to the **no-auth fallback** below.
149
+
150
+ 3. **Ask which team to deploy to** — present team slugs from `vercel teams list --format json` as a bulleted list. If only one team / personal account, skip. Once selected, proceed immediately.
151
+
152
+ 4. **Link the project** with the selected team scope (use `--repo` if a git remote exists, plain `vercel link` otherwise):
153
+ ```bash
154
+ vercel link --repo --scope <team-slug> # if git remote exists
155
+ vercel link --scope <team-slug> # if no git remote
156
+ ```
157
+
158
+ 5. **Deploy** using the best available method (git push if remote exists, otherwise `vercel deploy -y --no-wait --scope <team-slug>`, then `vercel inspect <url>` to check status).
159
+
160
+ ---
161
+
162
+ ### No-Auth Fallback — claude.ai sandbox
163
+
164
+ **When to use:** Last resort when the CLI can't be installed or authenticated in the claude.ai sandbox. This requires no authentication — it returns a **Preview URL** (live site) and a **Claim URL** (transfer to your Vercel account).
165
+
166
+ ```bash
167
+ bash /mnt/skills/user/deploy-to-vercel/resources/deploy.sh [path]
168
+ ```
169
+
170
+ **Arguments:**
171
+ - `path` - Directory to deploy, or a `.tgz` file (defaults to current directory)
172
+
173
+ **Examples:**
174
+ ```bash
175
+ # Deploy current directory
176
+ bash /mnt/skills/user/deploy-to-vercel/resources/deploy.sh
177
+
178
+ # Deploy specific project
179
+ bash /mnt/skills/user/deploy-to-vercel/resources/deploy.sh /path/to/project
180
+
181
+ # Deploy existing tarball
182
+ bash /mnt/skills/user/deploy-to-vercel/resources/deploy.sh /path/to/project.tgz
183
+ ```
184
+
185
+ The script auto-detects the framework from `package.json`, packages the project (excluding `node_modules`, `.git`, `.env`), uploads it, and waits for the build to complete.
186
+
187
+ **Tell the user:** "Your deployment is ready at [previewUrl]. Claim it at [claimUrl] to manage your deployment."
188
+
189
+ ---
190
+
191
+ ### No-Auth Fallback — Codex sandbox
192
+
193
+ **When to use:** In the Codex sandbox where the CLI may not be authenticated. Codex runs in a sandboxed environment by default — try the CLI first, and fall back to the deploy script if auth fails.
194
+
195
+ 1. **Check whether the Vercel CLI is installed** (no escalation needed for this check):
196
+ ```bash
197
+ command -v vercel
198
+ ```
199
+
200
+ 2. **If `vercel` is installed**, try deploying with the CLI:
201
+ ```bash
202
+ vercel deploy [path] -y --no-wait
203
+ ```
204
+
205
+ 3. **If `vercel` is not installed, or the CLI fails with "No existing credentials found"**, use the fallback script:
206
+ ```bash
207
+ skill_dir="<path-to-skill>"
208
+
209
+ # Deploy current directory
210
+ bash "$skill_dir/resources/deploy-codex.sh"
211
+
212
+ # Deploy specific project
213
+ bash "$skill_dir/resources/deploy-codex.sh" /path/to/project
214
+
215
+ # Deploy existing tarball
216
+ bash "$skill_dir/resources/deploy-codex.sh" /path/to/project.tgz
217
+ ```
218
+
219
+ The script handles framework detection, packaging, and deployment. It waits for the build to complete and returns JSON with `previewUrl` and `claimUrl`.
220
+
221
+ **Tell the user:** "Your deployment is ready at [previewUrl]. Claim it at [claimUrl] to manage your deployment."
222
+
223
+ **Escalated network access:** Only escalate the actual deploy command if sandboxing blocks the network call (`sandbox_permissions=require_escalated`). Do **not** escalate the `command -v vercel` check.
224
+
225
+ ---
226
+
227
+ ## Agent-Specific Notes
228
+
229
+ ### Claude Code / terminal-based agents
230
+
231
+ You have full shell access. Do NOT use the `/mnt/skills/` path. Follow the decision flow above using the CLI directly.
232
+
233
+ For the no-auth fallback, run the deploy script from the skill's installed location:
234
+ ```bash
235
+ bash ~/.claude/skills/deploy-to-vercel/resources/deploy.sh [path]
236
+ ```
237
+ The path may vary depending on where the user installed the skill.
238
+
239
+ ### Sandboxed environments (claude.ai)
240
+
241
+ You likely cannot run `vercel login` or `git push`. Go directly to the **no-auth fallback — claude.ai sandbox**.
242
+
243
+ ### Codex
244
+
245
+ Codex runs in a sandbox. Check if the CLI is available first, then fall back to the deploy script. Go to the **no-auth fallback — Codex sandbox**.
246
+
247
+ ---
248
+
249
+ ## Output
250
+
251
+ Always show the user the deployment URL.
252
+
253
+ - **Git push:** Use `vercel ls --format json` to find the preview URL. If the CLI isn't authenticated, tell the user to check the Vercel dashboard or commit status checks.
254
+ - **CLI deploy:** Show the URL returned by `vercel deploy --no-wait`. Use `vercel inspect <url>` to check build status and report it to the user.
255
+ - **No-auth fallback:** Show both the preview URL and the claim URL:
256
+ ```
257
+ Deployment successful!
258
+
259
+ Preview URL: https://my-app-abc123.vercel.app
260
+ Claim URL: https://vercel.com/claim-deployment?code=...
261
+
262
+ View your site at the Preview URL.
263
+ To transfer this deployment to your Vercel account, visit the Claim URL.
264
+ ```
265
+
266
+ **Do not** curl or fetch the deployed URL to verify it works. Just return the link.
267
+
268
+ ---
269
+
270
+ ## Troubleshooting
271
+
272
+ ### Network Egress Error (claude.ai)
273
+
274
+ If deployment fails due to network restrictions on claude.ai, tell the user:
275
+
276
+ ```
277
+ Deployment failed due to network restrictions. To fix this:
278
+
279
+ 1. Go to https://claude.ai/settings/capabilities
280
+ 2. Add *.vercel.com to the allowed domains
281
+ 3. Try deploying again
282
+ ```
283
+
284
+ ### Escalated Network Access (Codex / sandboxed environments)
285
+
286
+ If deployment fails due to network issues (timeouts, DNS errors, connection resets) in a sandboxed environment, rerun with escalated permissions (`sandbox_permissions=require_escalated`). Do not escalate the initial CLI availability check — only escalate the actual deploy command.
287
+
288
+ Example guidance to the user:
289
+ ```
290
+ The deploy needs escalated network access to deploy to Vercel. I can rerun
291
+ the command with escalated permissions — want me to proceed?
292
+ ```
293
+
294
+ ### CLI Auth Failure
295
+
296
+ If `vercel login` or `vercel deploy` fails with authentication errors, fall back to the no-auth deploy script (claude.ai or Codex variant, depending on the environment).
@@ -0,0 +1,94 @@
1
+ ---
2
+ name: design-an-interface
3
+ description: Generate multiple radically different interface designs for a module using parallel sub-agents. Use when user wants to design an API, explore interface options, compare module shapes, or mentions "design it twice".
4
+ ---
5
+
6
+ # Design an Interface
7
+
8
+ Based on "Design It Twice" from "A Philosophy of Software Design": your first idea is unlikely to be the best. Generate multiple radically different designs, then compare.
9
+
10
+ ## Workflow
11
+
12
+ ### 1. Gather Requirements
13
+
14
+ Before designing, understand:
15
+
16
+ - [ ] What problem does this module solve?
17
+ - [ ] Who are the callers? (other modules, external users, tests)
18
+ - [ ] What are the key operations?
19
+ - [ ] Any constraints? (performance, compatibility, existing patterns)
20
+ - [ ] What should be hidden inside vs exposed?
21
+
22
+ Ask: "What does this module need to do? Who will use it?"
23
+
24
+ ### 2. Generate Designs (Parallel Sub-Agents)
25
+
26
+ Spawn 3+ sub-agents simultaneously using Task tool. Each must produce a **radically different** approach.
27
+
28
+ ```
29
+ Prompt template for each sub-agent:
30
+
31
+ Design an interface for: [module description]
32
+
33
+ Requirements: [gathered requirements]
34
+
35
+ Constraints for this design: [assign a different constraint to each agent]
36
+ - Agent 1: "Minimize method count - aim for 1-3 methods max"
37
+ - Agent 2: "Maximize flexibility - support many use cases"
38
+ - Agent 3: "Optimize for the most common case"
39
+ - Agent 4: "Take inspiration from [specific paradigm/library]"
40
+
41
+ Output format:
42
+ 1. Interface signature (types/methods)
43
+ 2. Usage example (how caller uses it)
44
+ 3. What this design hides internally
45
+ 4. Trade-offs of this approach
46
+ ```
47
+
48
+ ### 3. Present Designs
49
+
50
+ Show each design with:
51
+
52
+ 1. **Interface signature** - types, methods, params
53
+ 2. **Usage examples** - how callers actually use it in practice
54
+ 3. **What it hides** - complexity kept internal
55
+
56
+ Present designs sequentially so user can absorb each approach before comparison.
57
+
58
+ ### 4. Compare Designs
59
+
60
+ After showing all designs, compare them on:
61
+
62
+ - **Interface simplicity**: fewer methods, simpler params
63
+ - **General-purpose vs specialized**: flexibility vs focus
64
+ - **Implementation efficiency**: does shape allow efficient internals?
65
+ - **Depth**: small interface hiding significant complexity (good) vs large interface with thin implementation (bad)
66
+ - **Ease of correct use** vs **ease of misuse**
67
+
68
+ Discuss trade-offs in prose, not tables. Highlight where designs diverge most.
69
+
70
+ ### 5. Synthesize
71
+
72
+ Often the best design combines insights from multiple options. Ask:
73
+
74
+ - "Which design best fits your primary use case?"
75
+ - "Any elements from other designs worth incorporating?"
76
+
77
+ ## Evaluation Criteria
78
+
79
+ From "A Philosophy of Software Design":
80
+
81
+ **Interface simplicity**: Fewer methods, simpler params = easier to learn and use correctly.
82
+
83
+ **General-purpose**: Can handle future use cases without changes. But beware over-generalization.
84
+
85
+ **Implementation efficiency**: Does interface shape allow efficient implementation? Or force awkward internals?
86
+
87
+ **Depth**: Small interface hiding significant complexity = deep module (good). Large interface with thin implementation = shallow module (avoid).
88
+
89
+ ## Anti-Patterns
90
+
91
+ - Don't let sub-agents produce similar designs - enforce radical difference
92
+ - Don't skip comparison - the value is in contrast
93
+ - Don't implement - this is purely about interface shape
94
+ - Don't evaluate based on implementation effort