feat(fileshare): a skill for the file tool - #74
Merged
Conversation
Fileshare was the one heavily-used tool without a skill, so its guidance lived on as a legacy in-repo guide in the backend — which is exactly why nothing told an agent the most important fact at that boundary: a file the user attached in the chat is ALREADY in the drive and its file_key is already in hand. That knowledge had to be smuggled into the datasets skill's CSV-import phase 0, where it only covers CSVs, while the same is true of a PDF, a log or an xlsx. The skill states it up front, with the two failures it prevents — asking the user to upload a file they just attached, and claiming a file was "too large to receive" when nothing is too large to receive; what is too large to inline arrives as a key plus a labelled sample. It also draws the boundary the two tools actually have: this one is file exchange (list, read, drop, delete), and the moment the question becomes "how many rows", "what is the sum" or "which of these exist already", the file belongs to xentral_datasets — a figure may only come from import_analyze over every row, not from a sample. And it says plainly what the tool cannot do (no windowed read, no search, no in-place edit, no versions) with the route to take instead, so an agent stops at a dead end less often. manifest.json's skills array was missing xentral-datasets as well; both are added.
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.
Why
xentral_fileshareis the one heavily-used tool with no skill: its guidance is a legacy in-repo guide in the backend (backend/files/agent_guide/{en,de}.md), served only becauseagent_guides.loaderfalls back for domains without a skill.That is why the single most important fact at this boundary had nowhere to live and ended up in the datasets skill's CSV-import phase 0 (#73): a file the user attached in the chat is already in the drive, and the agent already holds its
file_key. In datasets it only covers CSVs — the same is true of a PDF, a log or an xlsx, and the two tools are otherwise independent (datasets = create and maintain data tables, fileshare = plain file exchange).What is in it
skills/xentral-fileshare/SKILL.md(143 lines) +reference/recipes-and-pitfalls.md(82).The parts that are new rather than ported:
xentral_datasets, stated as the expensive mistake it is: the moment a figure is wanted, the file belongs toimport_analyze(every row, a few KB back) — including for a small table.xentral/agent-os→docs/plans/file-tools-for-the-model.md; when they land, this table shrinks.)sourcevalues as they now are —chat,inbox,slack,advisor,api— which the legacy guide predates.Ported and tightened from the legacy guide: purpose and non-purposes, the concepts table, the action reference, the rules that bite (tenant isolation,
contentXORcontent_b64, irreversibledelete, filenames are not unique), the recipes and the pitfalls table.Verification
agent_guides.loader._assemble_skillagainst this directory): 10 651 characters, frontmatter stripped, reference folded in at the right place,_parse_frontmatterreads name + description + 3 examples — soaction='help', the Advisor overlay, the in-app guide and the plugin all serve it.python scripts/validate_library.py→ OK: 337 library items valid against their schemas.manifest.jsonstill parses; SKILL.md is well under the 500-line guideline.Two things to know
manifest.json'sskillsarray was missingxentral-datasets(8 entries for 9 skills). Both it and the new skill are added, so the array is truthful again — 10 for 10. I could find no consumer of that array in the backend (the sync copies directories, the loader resolves by path), so this is an index fix on its own; if the customer plugin reads it, datasets was invisible there until now.Wiring is a follow-up in the backend repo, not here:
_DOMAIN_TO_SKILL["fileshare"] = "xentral-fileshare"plus_DOMAIN_TO_TOOL, aLIBRARY_VERSIONbump, and deleting the legacybackend/files/agent_guide/. Worth flagging in that PR: skills are English-only today, so registering this one drops the German version of this guide (load_guide(locale='de')returns the assembled English skill for skill-backed domains). That is the existing convention for every other skill, not a new decision — but it is a visible change for this domain, so it should be a conscious one rather than a side effect.