Remove skill content max truncation#4639
Open
KyleAMathews wants to merge 2 commits into
Open
Conversation
Contributor
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4639 +/- ##
==========================================
- Coverage 59.46% 57.93% -1.53%
==========================================
Files 385 342 -43
Lines 43039 40296 -2743
Branches 12383 11761 -622
==========================================
- Hits 25591 23347 -2244
+ Misses 17371 16911 -460
+ Partials 77 38 -39
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
Electric Agents Mobile BuildLocal mobile checks ran for commit The EAS Android preview build was skipped because the |
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.
Remove
maxfrom the skills metadata contract and stop truncating skill content inuse_skill. Agents now receive complete skill instructions instead of partial directives plus truncation warnings.Root Cause
use_skillhistorically sliced skill markdown tometa.maxbefore inserting the skill instructions into context. Long skills therefore loaded as incomplete directives, causing agents to complain about truncation and potentially follow partial workflows.Approach
maxfield from parsed preamble metadata, extracted metadata, andSkillMeta.use_skilltruncation branch and thetruncatedtool-result details.@electric-ax/agents-runtime.Key Invariants
use_skillinserts complete skill instructions into context.truncatedflag or warning.Non-goals
Trade-offs
The previous
maxfield acted as a hard per-skill safety cap, but it produced incomplete instructions. This PR removes that contract so legitimate skills are not silently corrupted; if a skill is too large, the skill itself should be split or improved.Verification
Results:
test/skills/tools.test.tsandtest/skills/preamble.test.ts: 17 tests passed.@electric-ax/agents-runtimetypecheck passed.@electric-ax/agents-runtime.Files changed
.changeset/remove-skill-content-max.md: adds a patch changeset.packages/agents-runtime/src/skills/types.ts: removesSkillMeta.max.packages/agents-runtime/src/skills/extract-meta.ts: stops defaulting/extracting skillmax.packages/agents-runtime/src/skills/preamble.ts: stops parsingmaxfrom skill frontmatter.packages/agents-runtime/src/skills/tools.ts: removes skill content truncation andtruncateddetails.packages/agents-runtime/test/skills/*.test.ts: updates tests and fixtures for full skill loading.