docs(core): the specs state the caps, ranges, and formats the binary enforces - #259
Merged
Merged
Conversation
…enforces --spec skills documents both of its own limits and has a test demanding it; tools and hooks did not: the 64-tool load cap, the 4096-byte params cap and its required object root, and the 32-per-event hook cap (the least visible of the four: hooks have no prompt trailer) were all enforced silently. Both timeout clamps were written as Rust exclusive ranges for inclusive clamps. The memory spec's index template used an ASCII hyphen where the binary emits an em dash, teaching authors to grep for a line the prompt never contains. And the skills byte cap is first-fit in name order, not a suffix cut, so an author told the omissions are a suffix may rename a skill when shortening a description would have worked. Drift tests tie each statement to its constant.
A minimal skill can still be omitted because earlier entries consumed the budget, where renaming is exactly what helps; the sentence now says what each lever does (shortening any earlier line frees budget for the lines after it, renaming changes who competes first) instead of ranking them.
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
Round-7 contract audit (F6 plus three one-liners). The skills spec already establishes the principle, with a test demanding it: a spec that omits the real limit sends an author hunting for one they have not hit while the real one silently ate their file. Four enforced limits were undocumented on their surfaces, two clamp ranges were written in Rust exclusive-range notation for inclusive clamps, the memory spec's index template showed a separator the binary never emits, and the skills byte-cap wording described first-fit omission as a suffix cut.
Summary
--spec tools: names the 64-tool load cap, the 4096-byte serialized-params cap (rejected, not truncated), the requiredparams.type = "object"root, and unknown-key rejection.--spec hooks: names the 32-per-event cap (the least visible: hooks have no prompt trailer, only --check names the drop) and unknown-key rejection.timeout_secslines read "clamped between 1 and N, inclusive".--spec memory: the index template quotes the emitted separator exactly.--spec skills: the byte cap is described as first-fit in name order, with the practical consequence (shortening a description beats renaming a skill).Test Plan
Four drift tests tie the statements to their constants (
MAX_EXTERNAL_TOOLS,MAX_EXTERNAL_PARAMS_BYTES,MAX_HOOKS_PER_EVENT) and phrases:spec_tools_names_the_caps_that_drop_or_reject,spec_hooks_names_the_per_event_cap,spec_memory_shows_the_emitted_index_line,spec_skills_states_first_fit_omission. All four shown red against the previous text in one revert run. Full workspace green (exit 0), clippy zero warnings.Greptile Summary
The extension specifications document enforced limits, validation behavior, emitted formats, and skill-index ordering. The reported skill-index guidance issue was disproved: with earlier entries occupying the byte budget, shortening only an initially omitted skill changed its line enough for the real CLI to include it.
Confidence Score: 5/5
No blocking failure remains.
The exercised skill-index behavior matches the current documentation: an entry that initially does not fit can be included when its own description is shortened.
What T-Rex did
Reviews (2): Last reviewed commit: "docs(core): the first-fit remediation do..." | Re-trigger Greptile