Document x/ experimental packages and components.JoinAttrs in AGENTS.md - #338
Open
maragubot wants to merge 3 commits into
Open
Document x/ experimental packages and components.JoinAttrs in AGENTS.md#338maragubot wants to merge 3 commits into
x/ experimental packages and components.JoinAttrs in AGENTS.md#338maragubot wants to merge 3 commits into
Conversation
…NTS.md The project structure section listed neither the `x/` packages nor `components.JoinAttrs`, so the guide read as if they didn't exist and contradicted the readme, which already documents `x/...` as experimental.
Say that `components.JoinAttrs` merges attributes among a node's direct children, since "across nodes" suggested a traversal it doesn't do. Scope the backwards-compatibility rule to the core library, so it no longer reads as a blanket prohibition on the experimental `x/` packages.
`slices.Reduce` takes a `func(T2, T1) T2` callback with no index, unlike `slices.Map` and `slices.Filter`, so the label was wrong for one of the three. Describe the package as generic slice helpers instead, matching its own package comment.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #338 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 6 6
Lines 639 639
=========================================
Hits 639 639 ☔ 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.
What was found
AGENTS.mdis the guide loaded into every AI assistant that works on this repo, sinceCLAUDE.mdsymlinks to it. Its Project Structure section had drifted from the packages that actually exist:x/experimental packages were missing entirely.x/sliceslanded in Addx/slicespackage withMap,Filter, andReduce#284 on 2026-01-08, afterAGENTS.mdwas written on 2025-09-24, and the section was never updated. This also putAGENTS.mdat odds with the readme, which already documentsgomponents/x/...as experimental.components/entry named onlyHTML5andClasses, nevercomponents.JoinAttrs(added in Addcomponents.JoinAttrs#262).What was fixed
Added an
x/bullet and listedcomponents.JoinAttrs, so the section matches what's on disk.Also scoped one Code Style bullet from "Maintain backwards compatibility" to "Maintain backwards compatibility in the core library". Without that, the new
x/bullet's "may get breaking changes" would contradict it, and an assistant would read a blanket prohibition the project doesn't intend. The file already scopes this way two lines up ("No external dependencies in core library") and under Contributing Guidelines.Review notes
Two rounds of self-review caught real errors, both now fixed: the first draft described
components.JoinAttrsas joining attributes "across nodes", which implies a tree traversal it doesn't do (it only merges attributes among the child nodes passed to it); and a later draft labelled thex/sliceshelpers "index-aware", which is false forslices.Reduce, whose callback isfunc(T2, T1) T2with no index.Deliberately left for a later gardening pass:
LLMs.mdhas the same two gaps in its own Package Structure section. Another change is in flight against that file, so this one stays out of it.internal/assertandinternal/importare still absent from the list. They're test-only scaffolding, and that omission predates this change.