Skip to content

[DRAFT] TRIAGE.md: library-vs-examples classification (planning doc)#2757

Draft
keon wants to merge 1 commit into
mainfrom
chore/triage-library-vs-examples
Draft

[DRAFT] TRIAGE.md: library-vs-examples classification (planning doc)#2757
keon wants to merge 1 commit into
mainfrom
chore/triage-library-vs-examples

Conversation

@keon
Copy link
Copy Markdown
Owner

@keon keon commented May 18, 2026

Summary

Draft classification doc for the planned split between library (reusable algorithms/data structures that ship on PyPI) and examples (LeetCode/puzzle-style problem solutions).

This PR contains only the planning doc — no code moves yet. Once you review and override the borderline calls, I'll execute the file moves in batches (one PR per top-level category).

Settled decisions captured in the doc:

  • Layout: top-level `examples/` folder
  • Backwards compat: hard break in next major release (no shims)

Numbers

  • 182 files → library
  • 164 files → example
  • 9 explicitly ambiguous (need your decision)
  • Several cross-cutting issues surfaced: duplicate filenames across categories, misfiled algorithms (`backtracking/anagram.py` doesn't backtrack, `graph/all_factors.py` isn't graph-related), and likely literal duplicates (`bst_validate_bst.py` vs `bst_is_bst.py`, etc.) — all flagged for resolution during the migration.

Review focus

The 9 ❓ AMBIGUOUS rows are the highest-value items to decide. Beyond those, please skim each category table and flag any disagreements — even a single line like "flip `X.py` to library" is enough; I'll integrate edits and produce a v2 before any code moves.

Four open questions are listed at the end of TRIAGE.md (default for ambiguous calls, linked-list philosophy, sub-categories under examples/, test layout).

🤖 Generated with Claude Code

Draft classification of every source file in algorithms/ into either
LIBRARY (reusable, canonical) or EXAMPLE (LeetCode/puzzle-style problem
solution), in preparation for the planned split between algorithms/
(continues to ship on PyPI) and a new top-level examples/ tree.

Status: draft — needs maintainer review. ~182 library, ~164 example,
~9 explicitly flagged ambiguous. Surfaces several cross-cutting issues
(duplicate filenames across categories, misfiled algorithms) that should
be resolved as part of the migration.

No code changes; just the planning doc.

Co-Authored-By: Claude Opus 4.7 (1M context) <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