Write down the fragment contract - #100
Merged
Merged
Conversation
#71, #78, #79 and #80 settled how the fragments are structured, and two of those rules now fail the build. None of it was written anywhere a person would look. docs/fragments.md is the contract in one repo-level copy: the shared canvas and the bounding octagon, the content root each family uses, the free canvas template/example shape and why its template is optional, what the graphic types mean for an element's extent, what the normaliser strips and what its fingerprint check guarantees, what the two bound checks enforce, and the steps for changing a fragment without breaking any of it. Three things moved rather than being written twice: - The README gains the composition detail it stopped short of - the octagon as a rule rather than a measurement, and the FREE_CANVAS exception - and a pointer to the contract. - svg/README.md keeps its naming section, which is accurate and is the mapping from a SIDC to a filename, and loses the inherited DISA framing around it: the title, MIL-STD-2525, a zip file and an image-conversion utility that are not in this repository. It now says where the files came from and points at the contract. The link is absolute, because hallux carries a copy of this file and a relative one would resolve nowhere from there. - FragmentShapeChecker's failure message pointed at svg/README.md, which is no longer where the shape is described. Verified by breaking a fragment: the build fails with "See docs/fragments.md for the shape they should hold." Closes #99 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Closes #99.
#71, #78, #79 and #80 settled how the fragments are structured, and two of those rules now fail the build. None of it was written anywhere a person would look.
docs/fragments.mdThe contract in one repo-level copy — it applies to every icon library, so it does not belong inside one library's resources:
GraphicTypemeans for an element's extent, and whyFREE_CANVASis the reasonFragmentMeasurerexists;SvgFingerprintcheck guarantees;SvgFingerprintcannot guard a structural move, which is the thing most likely to catch someone out.Three things moved rather than being written twice
The README gains the composition detail it stopped short of — the octagon, and the
FREE_CANVASexception — and a pointer to the contract. It stays a front page; the contract is a page down.svg/README.mdkeeps its naming section, which is accurate and is the mapping from a SIDC to a filename, and loses the inherited DISA framing around it: the titlejoint-military-symbology-xml, MIL-STD-2525, a zip file and an image-conversion utility that are not in this repository. It now says where the files came from, that jmsfx is the canonical fork, and points at the contract.That link is absolute, because hallux carries a copy of this file and a relative link would resolve nowhere from there.
FragmentShapeChecker's failure message pointed atsvg/README.md, which is no longer where the shape is described. Verified by breaking a fragment on purpose:mvn verifygreen, Spotless clean.🤖 Generated with Claude Code