Skip to content

Commit ed2ae30

Browse files
committed
docs(blocks): note when a block change needs tool-metadata regeneration
Adding a block alone needs no regeneration — it references existing tool IDs and changes no tool's shape. But a change that touches a tool alongside the block does, and this is where that is easy to miss: a block's `outputs` are authored to match its tools' outputs, and the UI now reads those from the generated metadata, so a stale artifact makes the block's declared outputs disagree with what the panel renders (and fails CI). Completes the tool-authoring surface alongside add-tools and add-integration.
1 parent c6ff77a commit ed2ae30

3 files changed

Lines changed: 21 additions & 0 deletions

File tree

.agents/skills/add-block/SKILL.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -919,6 +919,12 @@ Derive templates from the service's real use cases. Each prompt should name a co
919919
- **Ground every skill in operations the block actually exposes** — cross-check each skill's steps against `tools.access`. Never describe an action the integration cannot perform.
920920
- **Derive skills from real, popular use cases found online — never invent them.** Web-search the service's documented use cases (vendor use-case/solutions pages, official docs describing the workflow, reputable "top automations for X" articles) and only add a skill you can source as something people genuinely do with the service. Do not hallucinate skills.
921921

922+
## Generated tool metadata
923+
924+
Adding a block on its own needs **no** regeneration — a block references existing tool IDs through `tools.access` and does not change any tool's shape.
925+
926+
But if the same change also adds or edits a tool, run `bun run tool-metadata:generate` and commit the result, or CI fails on stale artifacts. That matters here because a block's `outputs` are authored to match its tools' outputs, and the UI now reads those from the generated metadata rather than the executable registry — an unregenerated tool change makes the block's outputs disagree with what the panel renders. See `.agents/skills/tool-registry-boundary/SKILL.md`.
927+
922928
## Checklist Before Finishing
923929

924930
- [ ] `integrationType` is set to the correct `IntegrationType` enum value
@@ -933,6 +939,7 @@ Derive templates from the service's real use cases. Each prompt should name a co
933939
- [ ] Tools.config.tool returns correct tool ID (snake_case)
934940
- [ ] Outputs match tool outputs
935941
- [ ] Block + meta registered in registry-maps.ts (`BLOCK_REGISTRY` / `BLOCK_META_REGISTRY`)
942+
- [ ] If any tool was added or changed alongside the block: ran `bun run tool-metadata:generate` and committed the artifacts
936943
- [ ] If icon missing: asked user to provide SVG
937944
- [ ] If triggers exist: `triggers` config set, trigger subBlocks spread
938945
- [ ] Optional/rarely-used fields set to `mode: 'advanced'`

.claude/commands/add-block.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -918,6 +918,12 @@ Derive templates from the service's real use cases. Each prompt should name a co
918918
- **Ground every skill in operations the block actually exposes** — cross-check each skill's steps against `tools.access`. Never describe an action the integration cannot perform.
919919
- **Derive skills from real, popular use cases found online — never invent them.** Web-search the service's documented use cases (vendor use-case/solutions pages, official docs describing the workflow, reputable "top automations for X" articles) and only add a skill you can source as something people genuinely do with the service. Do not hallucinate skills.
920920

921+
## Generated tool metadata
922+
923+
Adding a block on its own needs **no** regeneration — a block references existing tool IDs through `tools.access` and does not change any tool's shape.
924+
925+
But if the same change also adds or edits a tool, run `bun run tool-metadata:generate` and commit the result, or CI fails on stale artifacts. That matters here because a block's `outputs` are authored to match its tools' outputs, and the UI now reads those from the generated metadata rather than the executable registry — an unregenerated tool change makes the block's outputs disagree with what the panel renders. See `.agents/skills/tool-registry-boundary/SKILL.md`.
926+
921927
## Checklist Before Finishing
922928

923929
- [ ] `integrationType` is set to the correct `IntegrationType` enum value
@@ -932,6 +938,7 @@ Derive templates from the service's real use cases. Each prompt should name a co
932938
- [ ] Tools.config.tool returns correct tool ID (snake_case)
933939
- [ ] Outputs match tool outputs
934940
- [ ] Block + meta registered in registry-maps.ts (`BLOCK_REGISTRY` / `BLOCK_META_REGISTRY`)
941+
- [ ] If any tool was added or changed alongside the block: ran `bun run tool-metadata:generate` and committed the artifacts
935942
- [ ] If icon missing: asked user to provide SVG
936943
- [ ] If triggers exist: `triggers` config set, trigger subBlocks spread
937944
- [ ] Optional/rarely-used fields set to `mode: 'advanced'`

.cursor/commands/add-block.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -913,6 +913,12 @@ Derive templates from the service's real use cases. Each prompt should name a co
913913
- **Ground every skill in operations the block actually exposes** — cross-check each skill's steps against `tools.access`. Never describe an action the integration cannot perform.
914914
- **Derive skills from real, popular use cases found online — never invent them.** Web-search the service's documented use cases (vendor use-case/solutions pages, official docs describing the workflow, reputable "top automations for X" articles) and only add a skill you can source as something people genuinely do with the service. Do not hallucinate skills.
915915

916+
## Generated tool metadata
917+
918+
Adding a block on its own needs **no** regeneration — a block references existing tool IDs through `tools.access` and does not change any tool's shape.
919+
920+
But if the same change also adds or edits a tool, run `bun run tool-metadata:generate` and commit the result, or CI fails on stale artifacts. That matters here because a block's `outputs` are authored to match its tools' outputs, and the UI now reads those from the generated metadata rather than the executable registry — an unregenerated tool change makes the block's outputs disagree with what the panel renders. See `.agents/skills/tool-registry-boundary/SKILL.md`.
921+
916922
## Checklist Before Finishing
917923

918924
- [ ] `integrationType` is set to the correct `IntegrationType` enum value
@@ -927,6 +933,7 @@ Derive templates from the service's real use cases. Each prompt should name a co
927933
- [ ] Tools.config.tool returns correct tool ID (snake_case)
928934
- [ ] Outputs match tool outputs
929935
- [ ] Block + meta registered in registry-maps.ts (`BLOCK_REGISTRY` / `BLOCK_META_REGISTRY`)
936+
- [ ] If any tool was added or changed alongside the block: ran `bun run tool-metadata:generate` and committed the artifacts
930937
- [ ] If icon missing: asked user to provide SVG
931938
- [ ] If triggers exist: `triggers` config set, trigger subBlocks spread
932939
- [ ] Optional/rarely-used fields set to `mode: 'advanced'`

0 commit comments

Comments
 (0)