Skip to content

Commit 509865f

Browse files
committed
chore(logfire): regenerate tool metadata and document the step in the skill
- regenerate apps/sim/tools/generated/tool-outputs.ts, which CI's tool-metadata:check requires after a tool output change - add the regeneration step and artifact-diff guidance to the validate-integration skill so the gate stops being missed
1 parent 80ed39e commit 509865f

2 files changed

Lines changed: 25 additions & 4 deletions

File tree

.agents/skills/validate-integration/SKILL.md

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

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

298+
### Regenerate Derived Artifacts
299+
300+
Several files are generated from tool and block definitions. Editing a tool or block WITHOUT regenerating them fails CI, so run these before pushing:
301+
302+
```bash
303+
bun run tool-metadata:generate # repo root — apps/sim/tools/generated/*
304+
cd apps/sim && bun run generate-docs # docs .mdx + lib/integrations/integrations.json + docs icons
305+
```
306+
307+
- **`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.
308+
- **`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`.
309+
310+
**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.
311+
312+
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.
313+
298314
### Validation Output
299315

300316
After fixing, confirm:
301317
1. `bun run lint` passes with no fixes needed
302-
2. TypeScript compiles clean (no type errors)
303-
3. Re-read all modified files to verify fixes are correct
304-
4. Any remaining unknown response schemas were explicitly reported to the user instead of guessed
318+
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
319+
3. The integration's tests pass, and any test you added actually fails without its fix (revert it once and watch it go red)
320+
4. Derived artifacts regenerated and their diffs reviewed (see above)
321+
5. Re-read all modified files to verify fixes are correct
322+
6. Any remaining unknown response schemas were explicitly reported to the user instead of guessed
305323

306324
## Checklist Summary
307325

@@ -322,5 +340,8 @@ After fixing, confirm:
322340
- [ ] Validated `{Service}BlockMeta` exported with at least 7 templates
323341
- [ ] Reported all issues grouped by severity
324342
- [ ] Fixed all critical and warning issues
343+
- [ ] Ran `bun run tool-metadata:generate` if any tool outputs/params changed, and confirmed `bun run tool-metadata:check` passes
344+
- [ ] Ran `bun run generate-docs` if any block metadata changed, and reverted unrelated drift the generator swept in
325345
- [ ] Ran `bun run lint` after fixes
326346
- [ ] Verified TypeScript compiles clean
347+
- [ ] Verified added tests fail without their fix

apps/sim/tools/generated/tool-outputs.ts

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)