You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .claude/commands/validate-integration.md
+24-3Lines changed: 24 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -294,13 +294,31 @@ Group findings by severity:
294
294
295
295
After reporting, fix every **critical** and **warning** issue. Apply **suggestions** where they don't add unnecessary complexity.
296
296
297
+
### Regenerate Derived Artifacts
298
+
299
+
Several files are generated from tool and block definitions. Editing a tool or block WITHOUT regenerating them fails CI, so run these before pushing:
300
+
301
+
```bash
302
+
bun run tool-metadata:generate # repo root — apps/sim/tools/generated/*
303
+
cd apps/sim && bun run generate-docs # docs .mdx + lib/integrations/integrations.json + docs icons
304
+
```
305
+
306
+
-**`tool-metadata:generate`** — required whenever a tool's `outputs`, `params`, or descriptions change. CI enforces this with `bun run tool-metadata:check`, which fails with *"Generated tool metadata is stale"*. This is the easiest gate to miss, because nothing in the tool file hints that a generated artifact mirrors it.
307
+
-**`generate-docs`** — required whenever block metadata changes (`bgColor`, `name`, `description`, operations, outputs). Regenerates the integration `.mdx`, `integrations.json`, and the docs copy of `components/icons.tsx`.
308
+
309
+
**Always diff the regen output before committing.** These generators rewrite every file they own, so they will also sweep in unrelated drift that accumulated on the base branch — pages losing sections, unrelated icons appearing. Keep only the hunks belonging to the integration under validation and `git checkout --` the rest, otherwise an unrelated doc regression rides along in the PR. Verify no page was silently dropped by comparing the directory listing before and after.
310
+
311
+
If an icon changed, `apps/sim/components/icons.tsx` is the source of truth and `apps/docs/components/icons.tsx` is its generated mirror — they must end up byte-identical for that component.
312
+
297
313
### Validation Output
298
314
299
315
After fixing, confirm:
300
316
1.`bun run lint` passes with no fixes needed
301
-
2. TypeScript compiles clean (no type errors)
302
-
3. Re-read all modified files to verify fixes are correct
303
-
4. Any remaining unknown response schemas were explicitly reported to the user instead of guessed
317
+
2. TypeScript compiles clean (no type errors) — check the error list is empty for the files you touched; pre-existing unrelated errors in a worktree usually mean workspace packages resolve to the main checkout
318
+
3. The integration's tests pass, and any test you added actually fails without its fix (revert it once and watch it go red)
319
+
4. Derived artifacts regenerated and their diffs reviewed (see above)
320
+
5. Re-read all modified files to verify fixes are correct
321
+
6. Any remaining unknown response schemas were explicitly reported to the user instead of guessed
304
322
305
323
## Checklist Summary
306
324
@@ -321,5 +339,8 @@ After fixing, confirm:
321
339
-[ ] Validated `{Service}BlockMeta` exported with at least 7 templates
322
340
-[ ] Reported all issues grouped by severity
323
341
-[ ] Fixed all critical and warning issues
342
+
-[ ] Ran `bun run tool-metadata:generate` if any tool outputs/params changed, and confirmed `bun run tool-metadata:check` passes
343
+
-[ ] Ran `bun run generate-docs` if any block metadata changed, and reverted unrelated drift the generator swept in
Copy file name to clipboardExpand all lines: .cursor/commands/validate-integration.md
+24-3Lines changed: 24 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -289,13 +289,31 @@ Group findings by severity:
289
289
290
290
After reporting, fix every **critical** and **warning** issue. Apply **suggestions** where they don't add unnecessary complexity.
291
291
292
+
### Regenerate Derived Artifacts
293
+
294
+
Several files are generated from tool and block definitions. Editing a tool or block WITHOUT regenerating them fails CI, so run these before pushing:
295
+
296
+
```bash
297
+
bun run tool-metadata:generate # repo root — apps/sim/tools/generated/*
298
+
cd apps/sim && bun run generate-docs # docs .mdx + lib/integrations/integrations.json + docs icons
299
+
```
300
+
301
+
-**`tool-metadata:generate`** — required whenever a tool's `outputs`, `params`, or descriptions change. CI enforces this with `bun run tool-metadata:check`, which fails with *"Generated tool metadata is stale"*. This is the easiest gate to miss, because nothing in the tool file hints that a generated artifact mirrors it.
302
+
-**`generate-docs`** — required whenever block metadata changes (`bgColor`, `name`, `description`, operations, outputs). Regenerates the integration `.mdx`, `integrations.json`, and the docs copy of `components/icons.tsx`.
303
+
304
+
**Always diff the regen output before committing.** These generators rewrite every file they own, so they will also sweep in unrelated drift that accumulated on the base branch — pages losing sections, unrelated icons appearing. Keep only the hunks belonging to the integration under validation and `git checkout --` the rest, otherwise an unrelated doc regression rides along in the PR. Verify no page was silently dropped by comparing the directory listing before and after.
305
+
306
+
If an icon changed, `apps/sim/components/icons.tsx` is the source of truth and `apps/docs/components/icons.tsx` is its generated mirror — they must end up byte-identical for that component.
307
+
292
308
### Validation Output
293
309
294
310
After fixing, confirm:
295
311
1.`bun run lint` passes with no fixes needed
296
-
2. TypeScript compiles clean (no type errors)
297
-
3. Re-read all modified files to verify fixes are correct
298
-
4. Any remaining unknown response schemas were explicitly reported to the user instead of guessed
312
+
2. TypeScript compiles clean (no type errors) — check the error list is empty for the files you touched; pre-existing unrelated errors in a worktree usually mean workspace packages resolve to the main checkout
313
+
3. The integration's tests pass, and any test you added actually fails without its fix (revert it once and watch it go red)
314
+
4. Derived artifacts regenerated and their diffs reviewed (see above)
315
+
5. Re-read all modified files to verify fixes are correct
316
+
6. Any remaining unknown response schemas were explicitly reported to the user instead of guessed
299
317
300
318
## Checklist Summary
301
319
@@ -316,5 +334,8 @@ After fixing, confirm:
316
334
-[ ] Validated `{Service}BlockMeta` exported with at least 7 templates
317
335
-[ ] Reported all issues grouped by severity
318
336
-[ ] Fixed all critical and warning issues
337
+
-[ ] Ran `bun run tool-metadata:generate` if any tool outputs/params changed, and confirmed `bun run tool-metadata:check` passes
338
+
-[ ] Ran `bun run generate-docs` if any block metadata changed, and reverted unrelated drift the generator swept in
0 commit comments