Skip to content

Commit 913f067

Browse files
committed
chore(skills): sync validate-integration projections
1 parent 509865f commit 913f067

2 files changed

Lines changed: 48 additions & 6 deletions

File tree

.claude/commands/validate-integration.md

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -294,13 +294,31 @@ Group findings by severity:
294294

295295
After reporting, fix every **critical** and **warning** issue. Apply **suggestions** where they don't add unnecessary complexity.
296296

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+
297313
### Validation Output
298314

299315
After fixing, confirm:
300316
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
304322

305323
## Checklist Summary
306324

@@ -321,5 +339,8 @@ After fixing, confirm:
321339
- [ ] Validated `{Service}BlockMeta` exported with at least 7 templates
322340
- [ ] Reported all issues grouped by severity
323341
- [ ] 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
324344
- [ ] Ran `bun run lint` after fixes
325345
- [ ] Verified TypeScript compiles clean
346+
- [ ] Verified added tests fail without their fix

.cursor/commands/validate-integration.md

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -289,13 +289,31 @@ Group findings by severity:
289289

290290
After reporting, fix every **critical** and **warning** issue. Apply **suggestions** where they don't add unnecessary complexity.
291291

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+
292308
### Validation Output
293309

294310
After fixing, confirm:
295311
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
299317

300318
## Checklist Summary
301319

@@ -316,5 +334,8 @@ After fixing, confirm:
316334
- [ ] Validated `{Service}BlockMeta` exported with at least 7 templates
317335
- [ ] Reported all issues grouped by severity
318336
- [ ] 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
319339
- [ ] Ran `bun run lint` after fixes
320340
- [ ] Verified TypeScript compiles clean
341+
- [ ] Verified added tests fail without their fix

0 commit comments

Comments
 (0)