Skip to content

docs: reorganize into features/, performance/, architecture/, proposals/, data/ - #103

Merged
marota merged 3 commits into
mainfrom
claude/organize-docs-Z5EvX
Apr 20, 2026
Merged

marota merged 3 commits into
mainfrom
claude/organize-docs-Z5EvX

Conversation

@marota

@marota marota commented Apr 20, 2026

Copy link
Copy Markdown
Collaborator

Summary

Reorganize the documentation structure into a clearer hierarchy with dedicated subdirectories for different doc types. This improves discoverability and makes it easier to find the right reference for a given task.

Key Changes

  • New top-level structure under docs/:

    • features/ — active feature / behavior reference docs
    • performance/ — current perf reference + history/ subfolder for shipped & rejected retrospectives
    • architecture/ — refactoring plans, code-quality audits
    • proposals/ — not-yet-implemented ideas, brainstorm decks, rejected designs
    • data/ — external data pipelines (OSM → XIIDM conversion, etc.)
  • Removed obsolete docs:

    • docs/nad_optimization.md — superseded by consolidated proposal
    • docs/spatial_lod_architecture_proposal.md — detailed critique + revised proposal consolidated into proposals/rendering-lod-strategies.md
    • docs/network_rendering_profiling_recommendations.md — Phase 3 proposal consolidated into proposals/rendering-lod-strategies.md
  • New consolidated docs:

    • docs/README.md — navigation guide with "when to look where" table
    • docs/proposals/rendering-lod-strategies.md — unified history of LoD investigations (Strategies 1–10), why backend BBox-scoped LoD keeps getting rejected, and current recommended plan (Layers A–B)
    • docs/performance/history/README.md — index of shipped & rejected retrospectives
  • Moved docs (content unchanged, paths updated):

    • docs/perf-*.md → docs/performance/history/*.md
    • Feature docs → docs/features/
    • Architecture docs → docs/architecture/
    • Data pipeline docs → docs/data/
  • Updated all cross-references throughout codebase:

    • Backend: recommender_service.py, network_service.py, diagram_mixin.py, analysis_mixin.py, test files
    • Frontend: App.tsx, useDiagrams.ts, useAnalysis.ts, useSession.ts, hook tests
    • Scripts: check_standalone_parity.py, check_invariants.py, check_session_fidelity.py, check_gesture_sequence.py
    • Benchmarks: all bench_*.py files
    • CI: .github/workflows/parity.yml
    • Root: CLAUDE.md, README.md, CHANGELOG.md, benchmarks/README.md, expert_backend/CLAUDE.md, frontend/CLAUDE.md, frontend/PARITY_AUDIT.md, scripts/PARITY_README.md

Implementation Details

  • All doc content is preserved; only paths and cross-references changed
  • The consolidated rendering-lod-strategies.md provides a single source of truth for LoD investigation history, eliminating redundancy across three prior docs
  • Cross-reference updates are mechanical (path rewrites) with no logic changes
  • New docs/README.md serves as a navigation hub with a "when to look where" table and file-by-file index

https://claude.ai/code/session_01XVPNYXZQ6SRZBxF6ccEYSe

claude added 3 commits April 20, 2026 15:17
Restructured the docs/ tree so ongoing reference material is easy
to find and historical PR writeups are archived together instead
of cluttering the root:

- features/     active feature / behavior reference docs
- performance/  current perf reference + history/ for shipped and
                rejected PR retrospectives
- architecture/ refactoring plans, code-quality audits
- proposals/    unimplemented ideas, rejected designs
- data/         external data pipelines

Consolidated three overlapping rendering-LoD proposals
(`nad_optimization.md`, `network_rendering_profiling_recommendations.md`,
`spatial_lod_architecture_proposal.md`) into
`proposals/rendering-lod-strategies.md` — a single record of the
history, the reasons backend BBox-LoD kept being rejected, and the
current proposed Layer A/B/C plan.

Spot-checked all four primary active feature docs
(save-results, interaction-logging, action-overview-diagram,
state-reset-and-confirmation-dialogs) against the current code
paths — no drift.

Rewrote every in-repo reference to the moved docs across
`CLAUDE.md` files, `README.md`, `CHANGELOG.md`, benchmarks,
scripts, test suites, and source-code comments (57 files). Left
`standalone_interface_legacy.html` untouched (frozen snapshot)
and `.claude/plan.md` as-is.

Added `docs/README.md` and `docs/performance/history/README.md`
as browse indexes.

https://claude.ai/code/session_01XVPNYXZQ6SRZBxF6ccEYSe
- Delete `expert_backend/tests/test_ui_regressions.py`. The test
  asserted content in `standalone_interface.html` which was
  decommissioned on 2026-04-20 (renamed to
  `standalone_interface_legacy.html`, superseded by the
  auto-generated `frontend/dist-standalone/standalone.html`). The
  regressions the test guarded are now covered by the parity
  scripts (`scripts/check_*.py`) and the Vitest suite.

- In `frontend/src/utils/userObservableInvariants.test.ts`:
  replace `Map<string, any>` with `Map<string, NodeMeta>` and
  `Map<string, EdgeMeta>`, and drop the unused `meta` binding in
  the "combined pairs filter" describe block. Clears the four
  `@typescript-eslint/no-explicit-any` / `no-unused-vars` errors.

https://claude.ai/code/session_01XVPNYXZQ6SRZBxF6ccEYSe
Bump `pyproject.toml` to 0.6.0 and promote the unreleased work to
a tagged `[0.6.0] — 2026-04-20` section in the CHANGELOG.

Scope vs 0.5.0:

- Auto-generated single-file standalone bundle replaces the hand-
  maintained `standalone_interface.html`; legacy file frozen as
  `standalone_interface_legacy.html`.
- Layer-4 parity guard (Vitest runtime twin + Python static check).
- Action Overview diagram (map-pin overlay on N-1 NAD) with
  severity, topology-first anchoring, combined-pair curves.
- Perf: `display:none` on inactive SVG tabs (600k → 200k live DOM
  nodes).
- Full set of SLD highlight / session-reload / overload-halo /
  pin-severity / anchor / standalone-rendering fixes documented
  inline in the CHANGELOG.
- Docs tree reorganised into features/, performance/ (+ history/),
  architecture/, proposals/, data/ with consolidated
  rendering-LoD-strategies proposal.

No git tag is created in this commit — the release tag should be
created explicitly after this lands.

https://claude.ai/code/session_01XVPNYXZQ6SRZBxF6ccEYSe
@marota
marota merged commit 65904bb into main Apr 20, 2026
7 checks passed
marota pushed a commit that referenced this pull request Apr 22, 2026
… dynamic fix

Captures the post-0.6.0 work: svgPatch DOM-recycling (PR #108),
Action Overview filters + unsimulated pins (PR #105, #107),
code-quality gate + 5 decomposition passes (PR #104, #106),
docs reorganisation (PR #103), App.tsx hook extraction
(PR #109), and the dynamic reco_ reconnection-action fix on
the current branch.

https://claude.ai/code/session_01Tzp2fdUas3Y9vNZy6dxxuC
marota pushed a commit that referenced this pull request Apr 24, 2026
Follow-up to the root/frontend/backend CLAUDE.md + README refresh.
Audits the remaining project docs against PRs merged 2026-04-21 →
2026-04-23 and updates the eight that had actually drifted.

frontend/README.md (HIGH)
  Replaced the stock Vite-template boilerplate with a real frontend
  orientation: npm scripts, source-tree map (hooks, components,
  utils incl. the utils/svg/* split from PR #104), pointer to the
  auto-generated standalone bundle, testing + lint commands, and
  cross-refs to CLAUDE.md / PARITY_AUDIT.md / docs/README.md.

expert_backend/tests/CLAUDE.md (MEDIUM)
  Full rewrite of the test-file inventory: added the PR #104
  decomposition suites (test_simulation_helpers.py,
  test_analysis_helpers.py, test_diagram_helpers.py), the patch-
  endpoint coverage (test_diagram_patch_helpers.py,
  test_n1_diagram_fast_path.py) from PR #108, the regression
  guards (test_resimulate_regression.py,
  test_second_contingency_reset.py,
  test_get_n1_variant_clones_from_n_state.py,
  test_configurable_mw.py) that were added since 2026-04-11, and
  the dynamic reco_* reconnection path from PR #110. Replaced the
  frontend inventory with a structural summary matching the
  current ~60-file Vitest layout, listed the scripts/pypsa_eur
  pytest coverage, and documented the tests removed by PR #103 /
  #104 (test_ui_regressions.py, standaloneInterface.test.ts,
  cssRegression.test.ts).

docs/features/combined-actions.md (MEDIUM)
  Added a "Recent updates (PR #114, release 0.6.5)" section
  covering LS/curtailment in combined pairs, Simulate Combined
  moved out of the card + clickable sub-action badges,
  target_max_rho on the user-selected overload set, and Explore-
  Pairs re-estimation aligned with the pre-computed betas.
  Rewrote the "Standalone Interface" section to describe the
  auto-generated bundle, and dropped the checklist line that
  required manual standalone_interface.html mirroring. Added a
  row to the key-files table for the ActionCard sub-action badges
  and the ComputedPairsTable / ExplorePairsTab split.

docs/features/state-reset-and-confirmation-dialogs.md (MEDIUM)
  Replaced the standalone_interface.html section with a pointer
  to the auto-generated bundle, and expanded the "What reset()
  clears" list to match the current RecommenderService.reset()
  implementation (drain order + fast-path caches +
  _layout_cache + NAD-prefetch state, with the
  add-a-new-cache-goes-here guardrail).

docs/features/detachable-viz-tabs.md (MEDIUM)
  Removed the "standalone_interface.html mirror" row and the
  follow-up caveat that said the single-file interface doesn't
  support detaching — both are obsolete now that the bundle is
  auto-generated from the React tree.

docs/architecture/app-refactoring-plan.md (MEDIUM)
  Added a "Status: SHIPPED" banner at the top summarising both
  refactor waves (Phase 1 via PR #74, Phase 2 hook extraction
  via PR #109) and pointing readers at the current source of
  truth (frontend/CLAUDE.md + CHANGELOG.md 0.6.5). Preserved the
  original plan below the banner for historical value.

docs/architecture/phase2-state-management-optimization.md (LOW)
  Added a "Status: Partially shipped" banner — memoization +
  React.memo pass shipped under PR #75, superseded in part by
  PR #109 (useN1Fetch / useDiagramHighlights extractions),
  orchestrator hooks still deferred.

docs/features/frontend-ui-improvements.md (LOW)
  Scope header now names `frontend/dist-standalone/standalone.html`
  (auto-generated, PR #101) instead of the decommissioned
  hand-maintained file.

https://claude.ai/code/session_01RsvHjjFbAauF3NvD9BNT5V
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.

2 participants