feat(repo-chat): declare tools as data — first exemplar of the creator way (#51) - #61
Merged
Merged
Conversation
…r way (#51) Migration 0050 sets repo-chat's capabilities.tools to its read-only KB set explicitly, instead of leaning on the hardcoded `repo`-surface special-case in toolNamesFor. repo-chat becomes the first agent built the "creator way" (declared data, not platform conditionals) — the reference example future creators copy. Behavior-preserving: BASE + read-only KB is exactly what the repo surface already resolved to (proven by a new test that resolves the post-migration config and asserts an identical tool set); the surface stays ["repo"] so the Repo tab + technical response style are unchanged. Migration validated with sqlite3 (tools set, surfaces + identity preserved). Part of #58. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Dogfoods PR #59 on a live agent. Part of epic #58 (first-party exemplary agents mature the platform).
What
Migration
0050setsrepo-chat'scapabilities.toolsto["search_knowledge","list_knowledge","read_knowledge"]explicitly — instead of leaning on the hardcodedrepo-surface special-case intoolNamesFor.repo-chatbecomes the first agent built the "creator way": its toolset is declared data, not a platform conditional. That makes it the reference example a future creator copies, and it decouples the agent from the surface special-cases (a step toward eventually deleting them).Behavior-preserving (by design)
BASE + read-only KB is exactly what the
reposurface already resolved to. Proven by a new test that resolves the post-migration config throughagentCapabilities→toolNamesForand asserts an identical tool set to the surface default. The surface stays["repo"], so the Repo tab and technical response style are unchanged.Validation
json_setmigration checked with sqlite3:toolsset,surfaces+identitypreserved (nested patch, no clobber).workers/api/src/agent-do-tools.test.ts— 14 tests pass; typecheck clean.Next in #51
Formalize the declarative agent schema (identity/prompt/guardrails/model/tools/surfaces as one validated shape) informed by this exercise, then a "view/fork source" example-gallery so exemplars are visible to creators.