Skip to content

Derive lesson numbers from position (reorder-proof cross-references) - #22

Merged
tytremblay merged 1 commit into
mainfrom
lesson-ordering
Jul 27, 2026
Merged

Derive lesson numbers from position (reorder-proof cross-references)#22
tytremblay merged 1 commit into
mainfrom
lesson-ordering

Conversation

@tytremblay

Copy link
Copy Markdown
Contributor

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.md for the decision and docs/handoffs/ordering-refactor.md for full scope.

Changes

  • Gapped order — each lesson's order becomes position * 10 (10, 20, … 340), same sequence, room to insert between any two.
  • De-numbered titles — stripped the 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).
  • Reorder-proof cross-references — a link renderer resolves each #/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.
  • ADR + handoff docs under docs/.

Verification

No visible reorder: index and sidebar show lessons 1..34 in the same order with the same numbers as before. npm run build and npm run lint pass.

Base for the maze-module PR (#21), which stacks on top of this.

🤖 Generated with Claude Code

…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant