Derive lesson numbers from position (reorder-proof cross-references) - #22
Merged
Conversation
…f cross-refs Make lesson ordering cheap to change (see docs/adr/0001): - Gapped `order` (position * 10) so a lesson can be inserted without renumbering every later one. - Stripped the "Lesson N: " prefix from all 34 titles — titles are the concept only; the number is derived from position in the sorted list and rendered by the site (LessonCard/LessonView/AppSidebar). - Cross-references resolve the target's current number/title at render time from its slug, so moving or inserting a lesson never edits another lesson's prose. - ADR 0001 + ordering-refactor handoff added under docs/. Co-Authored-By: Claude Opus 4.8 <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.
Makes lesson ordering cheap to change, so inserting a lesson (e.g. an upcoming maze module) no longer means renumbering everything. See
docs/adr/0001-derive-lesson-order-from-position.mdfor the decision anddocs/handoffs/ordering-refactor.mdfor full scope.Changes
order— each lesson'sorderbecomesposition * 10(10, 20, … 340), same sequence, room to insert between any two.Lesson N:prefix from all 34 titles; the number is now derived from position in the sorted list and rendered by the site (LessonCard/LessonView/AppSidebar).#/lesson/<slug>reference's{n}/{title}to the target's current position at render time, so moving/inserting a lesson never edits another lesson's prose.docs/.Verification
No visible reorder: index and sidebar show lessons 1..34 in the same order with the same numbers as before.
npm run buildandnpm run lintpass.Base for the maze-module PR (#21), which stacks on top of this.
🤖 Generated with Claude Code