docs(AGENTS.md): when the frame budget outweighs a shared predicate - #556
Merged
Merged
Conversation
The 2.0 conventions asked for frame cost on hot paths but never said how to weigh a frame against readability, and #544's cleanup applied "no added frames" as a hard rule: it declined is_title_piece for one frame on comma credential runs (24 ns a parse, no guard moved). A new bullet states the measured scale of one frame (about 13 ns against 40-80 us a parse, py3.11, 2026-09-28) and four questions to weigh it by: does it multiply with the input, how many names pay it, does it move an enforced guard, and what does the inline alternative cost to maintain. It also records the converse #553 showed: the frame counter cannot see C-level work, so no new frames is not no new cost. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #556 +/- ##
=======================================
Coverage 98.85% 98.85%
=======================================
Files 45 45
Lines 3934 3934
=======================================
Hits 3889 3889
Misses 45 45 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
Adds one bullet to AGENTS.md's 2.0 conventions: frames are a budget for hot and scaling paths; everywhere else, prefer the shared predicate.
Why. The conventions asked for frame cost on hot paths but gave no way to weigh a frame against readability. On #552 the cleanup pass treated "no added frames" as a hard rule and declined
is_title_piecefor a single frame on comma credential runs: 24 ns a parse, no guard moved.What it says.
_CALL_BASELINEband, or a scaling ratio)?Doe, Jane …) #553: the frame counter cannot see C-level work such asx in some_list, so "no new frames" is not "no new cost".Docs only; the doc tests pass.
🤖 Generated with Claude Code