feat(grounding): attach the repo-search tools and reground the prompt - #31
Open
EdmondDantes21 wants to merge 1 commit into
Open
feat(grounding): attach the repo-search tools and reground the prompt#31EdmondDantes21 wants to merge 1 commit into
EdmondDantes21 wants to merge 1 commit into
Conversation
The clickstack agent now greps and reads its component AT THE VERSION THIS CLUSTER RUNS instead of fetching a version-pinned docs/llms.txt URL. The shared krateo-repo-mcp-server (deployed by the krateo-autopilot chart) resolves each ref from the installer's component pins, so the agent never recalls a version. - agent.yaml: the six repo tools, gated on repoSearch.enabled like the fetch block. - values.yaml + values.schema.json: the repoSearch flag (the schema root is additionalProperties:false, so the entry is mandatory). - prompts-eng.yaml: grounding is grep-first with repo/path:line citations; versions come from get_deployed_versions(); read_repo_file's offset replaces the old 5000-char pagination advice; the footer names krateo-otel-collector alongside the chart repo and points at the observability components. `fetch` stays wired but is narrowed to URLs OUTSIDE the corpus. The __DOC_TAG__ raw-URL is gone; docs/llms.txt survives as the curated index, now read with read_repo_file at the deployed pin. Verified on installer-e2e-test-2: the agent is Accepted=True with all six tools discovered, and its prompt ConfigMap carries no stale fetch URL. Co-Authored-By: Claude Opus 5 (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.
Fleet rollout of the new grounding path. Server side: krateo-autopilot#34. Pin data: krateo-installer#232.
What changes for the clickstack agent
It stops fetching a pinned
docs/llms.txtURL and starts grepping its own component at the version this cluster runs.krateo-repo-mcp-server(a sharedRemoteMCPServer, deployed by the autopilot chart) resolves every ref from the installer's component pins, so a version is a tool read rather than a recollection.templates/agent.yamlget_deployed_versions,list_krateo_repos,list_krateo_blueprints,list_repo_files,search_repo,read_repo_file), gated onrepoSearch.enabledexactly like the existingfetchblockvalues.yamlrepoSearch: {enabled: true, mcpServer: krateo-repo-mcp-server}values.schema.jsonadditionalProperties: falsefiles/prompts-eng.yaml## Tools, and the## Your componentfooter rewrittenThe prompt
search_reporeturns up to 100path:linehits in one call; every claim carries therepo/path:lineit came from. "No matches" is an honest answer, not a licence to answer from memory.get_deployed_versions(), never recall. The tools already default to the deployed pin, soref=is passed only to compare releases.read_repo_fileprintslines X-Y of Zand hands back anoffset— replacing the old 5000-charstart_indexadvice, and the silent-truncation failure it enabled.fetchstays wired and enabled, narrowed to URLs outside the corpus (upstream docs, a release note, an issue).docs/llms.txtsurvives as the curated index — now read withread_repo_fileat the deployed pin, which also keepsAGENTS-VERSIONING§10's DOC-D2 rule satisfied.Verification
Live on
installer-e2e-test-2(chart pushed to a scratch registry and the CD repointed): the agent isAccepted=Truewith all six tools indiscoveredTools, its pod is healthy, and its prompt ConfigMap contains no__DOC_TAG__and noraw.githubusercontentURL.helm template/lintclean with the flag on and off, andhack/lint-agents.pyis unchanged from baseline.Not in this PR:
Chart.yaml(local version bumps) and.tgzpackages. The pin bump belongs in the installer once this is tagged.🤖 Generated with Claude Code