Skip to content

Docs cleanup: drop stale spec, compress conventions and playbook (901 → 526 lines)#27

Merged
Xinze-Li-Moqian merged 1 commit into
mainfrom
cleanup-docs
May 15, 2026
Merged

Docs cleanup: drop stale spec, compress conventions and playbook (901 → 526 lines)#27
Xinze-Li-Moqian merged 1 commit into
mainfrom
cleanup-docs

Conversation

@Xinze-Li-Moqian
Copy link
Copy Markdown
Contributor

Summary

Audited docs/ for redundancy and drift. Cut 42% (901 → 526 lines) across 4 files, removing content that either duplicates CLAUDE.md, contradicts the current code, or has no behavioral payload.

Removed entirely

docs/RIEMANNIAN_FRAMEWORK_SPEC.md — orphan documentation. Verification (this PR):

  • Not referenced anywhere else in the repo (*.lean or *.md).
  • class SmoothManifold / class RiemannianManifold do exist in Riemannian/Manifold/SmoothManifold.lean, but adoption is incomplete: 8 uses of [RiemannianManifold M] vs 17 of [HasMetric I M].
  • Notation table contradicts reality: spec claims Δ_g f, grad_g f; actual code uses Δ_g[I] f, grad_g[I] f.
  • Anti-pattern §5 ("Manifold operator with [I]-bracket notation is legacy") is actively violated by current code.

The design intent for SmoothManifold / RiemannianManifold is preserved in their own file's docstring.

Compressed

CONVENTIONS.md (135 → 59) — kept the four substantive convention pinnings (curvature sign, length functional, geodesic, mm-space); dropped version metadata, the Mathlib-autonomy section (now in CLAUDE.md), and the aspirational "Future sections" list.

NAMING_CONVENTION.md (177 → 91) — kept object/theorem suffixes, naming case, local notation, docstring template, private/protected/public; dropped §6 (per-decl docstring, duplicates Math/Eng/Mixed), §7 (engineering hiding, duplicates anchor purity), §8 (entirely "this is removed" history), §10 (refactor process, duplicates the playbook), and the §5 "Removed" blacklist.

REFACTOR_PLAYBOOK.md (344 → 261) — kept decision tree, the 8 substantive pitfalls, consolidation procedure; dropped pre-flight checklist (duplicates CLAUDE.md atomic-commit), "Lake script vs bash" section (niche meta-tool guidance), the .gitkeep pitfall (one-shot trivia), and the meta epilogue.

Not touched

SORRY_CATALOG.md — has its own data drift (catalog says 32, CI says 42) that's a separate maintenance concern.

Test plan

  • No file in the repo imports/references RIEMANNIAN_FRAMEWORK_SPEC.md.
  • Verified SmoothManifold and RiemannianManifold adoption counts.
  • Verified notation discrepancy: actual codebase uses Δ_g[I] / grad_g[I] / scal_g[I].
  • User reviews the four kept docs for any missed cuts.

901 → 526 lines (42% reduction) across docs/. Removes content that
either duplicates CLAUDE.md, contradicts the current code, or has no
behavioral payload.

Removed entirely:
- docs/RIEMANNIAN_FRAMEWORK_SPEC.md — orphan, never referenced; class
  definitions exist but adoption is incomplete (8 [RiemannianManifold]
  vs 17 [HasMetric] uses); notation table contradicts current code
  (claims `Δ_g f` but actual is `Δ_g[I] f`); anti-pattern §5 actively
  violated by current code. The class docstrings in
  Riemannian/Manifold/SmoothManifold.lean carry the design intent.

CONVENTIONS.md (135 → 59):
- Drop "v1 — Stage I" version metadata
- Drop "Layer 1: Autonomy policy" section (now in CLAUDE.md as the
  Mathlib-wrapping policy)
- Drop "Future sections" aspirational list
- Keep: curvature sign, length functional, geodesic, mm-space

NAMING_CONVENTION.md (177 → 91):
- Keep: object suffixes, theorem suffixes, naming case, local notation,
  module docstring template, private/protected/public
- Drop §6 (per-decl docstring) — duplicates Math/Eng/Mixed in CLAUDE.md
- Drop §7 (engineering hiding) — duplicates anchor purity in CLAUDE.md
- Drop §8 (UXTest sections) — was entirely "this is removed" history
- Drop §10 (refactor process) — duplicates REFACTOR_PLAYBOOK
- Drop §5 "Removed" blacklist subsection

REFACTOR_PLAYBOOK.md (344 → 261):
- Drop "Pre-flight checklist" — duplicates CLAUDE.md atomic-commit
- Drop "Lake script vs bash" section — niche meta-tool guidance with
  no daily payload
- Drop pitfall #7 (.gitkeep) — one-shot trivia
- Drop "Adding to this playbook" meta epilogue
- Keep: decision tree, the 8 substantive pitfalls, consolidation
  procedure

SORRY_CATALOG.md untouched — data drift (catalog says 32, CI says 42)
is a separate maintenance concern.
@Xinze-Li-Moqian Xinze-Li-Moqian marked this pull request as ready for review May 15, 2026 23:03
@Xinze-Li-Moqian Xinze-Li-Moqian merged commit 683d3cb into main May 15, 2026
2 checks passed
@Xinze-Li-Moqian Xinze-Li-Moqian deleted the cleanup-docs branch May 15, 2026 23:03
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