feat(decision-records): flatten accepted/ into one directory - #12
Merged
Merged
Conversation
The accepted/<type>/ subdirectories were a layer the convention never needed: identity is the global counter, `type` already lives in front-matter, and the INDEX groups by it. Records now land in a flat accepted/, matching archived/ and drafts/, and the new-type heads-up reads the types accepted records carry instead of listing directories. Since drafts/ and accepted/ are siblings now, promotion keeps same-depth links as they are and still re-expresses paths into the old directory (a link to a fellow draft reaches back into drafts/). `check` refuses a nested record by naming the fix: the new one-shot `migrate-layout`. It refuses duplicate filenames before moving anything, re-paths each moved record's hand-authored links one level up, retargets links elsewhere whose target record moved, repoints spelled-out paths, and ends with `build --relink` so ID references self-heal. Filenames survive the move, so the origin/main collision warning stays silent across a migration; verified against a copy of lanh-ai's 55-record corpus with zero residual breakage.
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
S1 of the decision-records convention refresh:
accepted/<type>/collapses to a flataccepted/— the type subdirectory was a layer of hierarchy the convention never needed, since identity is the global counter,typealready lives in front-matter, and the INDEX groups by it. All three lifecycle dirs are now flat.How it lands
promotewrites toaccepted/NNNN-title.md; drafts/ and accepted/ being siblings means same-depth relative links survive promotion unchanged, and a path into the old drafts/ dir is still re-expressed.checkrefuses a nested record with the fix by name: the new one-shotmigrate-layoutcommand. It refuses duplicate filenames before moving anything, re-paths each moved record's hand-authored relative links one level up, retargets links elsewhere in docs whose target record moved (the class neither--relinknor spelled-out-path rewriting reaches), repoints spelled-out paths, and finishes withbuild --relink.Consumers
No flag-day: consumers pin by hash in
skills-lock.jsonand migrate when they bump. lanh-ai (55 records in 4 type dirs) is the only real migration; axie-principles has zero accepted records. Follow-up PRs handle each.Verification
migrate-layoutagainst a copy of lanh-ai's real docs tree: all 55 records flattened, 70 files relinked, zero residual link breakage (the only check complaints in the sandbox were files outside the copied tree).validate_skills.pyandpre-commit run --all-filesclean.