Skip to content

docs: refresh all CLAUDE.md guides β€” correct, de-duplicate, trim (~68% smaller) - #702

Open
ari-nz wants to merge 6 commits into
mainfrom
docs/claude-md-refresh
Open

docs: refresh all CLAUDE.md guides β€” correct, de-duplicate, trim (~68% smaller)#702
ari-nz wants to merge 6 commits into
mainfrom
docs/claude-md-refresh

Conversation

@ari-nz

@ari-nz ari-nz commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

What

A full refresh of every CLAUDE.md in the repo (14 files), plus a README diagram fix and a pyproject.toml maintainers addition.

Each doc was reviewed against the actual current source, then either rewritten (where it described code that doesn't exist) or corrected and condensed (where the narrative was sound but stale/bloated). Guiding principle: state a fact once, then point β€” versions, markers, coverage config, deps, and API signatures now point to their source of truth (pyproject.toml, _sdk_metadata.py, source files, or the owning doc) instead of being restated and drifting.

The numbers

The 14 CLAUDE.md files went from ~10,360 lines to ~3,300 β€” roughly a 68% cut (net +1,129 / βˆ’8,151 across the 17 changed files). What was removed falls into three buckets:

Category What it was Examples
Outdated / fabricated Docs describing APIs, commands, and classes that don't exist in the code bucket documented multi-cloud + encryption + resumable downloads (it's a GCS-only signed-URL wrapper); notebook/dataset/system/wsi/qupath invented service methods, CLI commands, and handler classes; application had a wrong version_number= param repeated ~9Γ—; coverage claimed "85% enforced" (it's 70/75 in codecov.yml); "NEW in v1.0.0-beta.7" framing (package is 1.4.0); scheduled-workflow filenames all renamed since
Duplicated Facts restated from a canonical source, or verbatim source dumps Verbatim Pydantic models / function bodies (platform reproduced ~450 lines of _sdk_metadata.py); ASCII diagrams re-drawing a sentence; marker lists / coverage numbers / schema versions copied from pyproject.toml; two identical workflow tables in .github; a duplicate file list in utils
Extra Generic content that isn't repo-specific ~330 lines of "Tips and Tricks" that teach grep/git/pytest; aspirational "Future Enhancements" / "Monitoring & Observability" / "Performance Optimization" sections describing nonexistent code; marketing ("battle-tested across thousands of CI/CD runs")

The six module docs (bucket, dataset, notebook, system, wsi, qupath) were majority-fabricated and were rewritten from scratch; the rest were corrected in place.

Also in this PR

  • README light-mode fix β€” the platform-workflow mermaid diagram had a hardcoded 'theme':'dark' init that rendered as white-on-dark dumped onto GitHub's light background. Removed it so GitHub's theme-aware default handles both modes. (The SOFTWARE_ARCHITECTURE.md / specifications/*.md diagrams never had this and were left alone.)
  • Two new mermaid diagrams (theme-free): a verified module-dependency graph in src/aignostics/CLAUDE.md (which also corrected the stale dependency text) and a run/item/artifact lifecycle state diagram in platform/CLAUDE.md.
  • pyproject.toml β€” added a PEP 621 maintainers array (Oliver Meyer, Arne Baumann).

Reviewing

Six logical commits, each independently reviewable:

  1. Rewrite six fabricated module guides from source
  2. Correct + condense core SDK guides, add mermaid
  3. Correct + condense tests and CI guides
  4. Condense utils and gui guides
  5. README mermaid light-mode fix
  6. pyproject maintainers

Not done (deferrable follow-ups)

  • "Core Responsibilities" bullet sections were not re-added to each module doc. The lean rewrites carry a one-line purpose + src/aignostics/CLAUDE.md's per-module descriptions already cover orientation; happy to add short verified bullet lists as a follow-up if wanted.
  • Unrelated source nit spotted, not touched: qupath/_service.py install_qupath docstring still says the default is "0.5.1" while the actual default is QUPATH_VERSION (0.6.0).

ari-nz added 6 commits July 30, 2026 15:37
bucket, dataset, notebook, system, wsi and qupath CLAUDE.md described APIs,
CLI commands, classes and behaviour that do not exist in the code (multi-cloud
storage, resumable downloads, handler ABCs, fake service methods, wrong QuPath
version, etc.). Rewritten from the actual _service.py/_cli.py/__init__.py of
each module, following a lean template: purpose, real public API, real CLI
commands, non-obvious behaviour, dependencies. Point to source and pyproject
rather than restating.
Root, src/aignostics, platform and application CLAUDE.md: fix stale facts
(coverage 70/75 not 85, package at 1.4.0 not beta.7, no [gui] extra / launchpad
command, application_version= param, phantom service methods, SDK schema
version, State/Output enums vs models) and cut verbatim source dumps, ASCII art
and generic tutorials. Apply DRY: point to pyproject / _sdk_metadata.py /
platform CLAUDE.md instead of restating. Add a verified module-dependency graph
(src/aignostics) and a run/item/artifact lifecycle state diagram (platform) as
theme-safe mermaid.
tests/CLAUDE.md: replace fabricated directory tree and fixtures/ layout with the
real tests/ and tests/resources/ contents, drop the invented COVERAGE_REQUIREMENTS
dict, fix the schema-version and build_run_sdk_metadata examples, point markers
to pyproject; cut generic pytest tutorial content.
.github/CLAUDE.md: fix scheduled-workflow filenames and cadence (hourly + daily,
not 6h/24h), ci-cd job list and triggers, Claude interactive/PR-review triggers,
and the OS-runner test matrix; collapse duplicate tables.
Remove duplicated file lists and doubled MCP/user-agent sections in utils,
fix the load_settings example (pydantic_settings.BaseSettings). Drop the stale
reproduced health snippet in gui and point to system/CLAUDE.md for health
enforcement.
Remove the hardcoded 'theme':'dark' mermaid init from the platform-workflow
sequence diagram so GitHub renders it with its theme-aware default in both
light and dark mode.
Add a PEP 621 maintainers array (Oliver Meyer, Arne Baumann) alongside authors.
@ari-nz
ari-nz requested a review from a team as a code owner July 30, 2026 13:40
@ari-nz

ari-nz commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator Author

Review notes

Posted by Claude (Fable 5) via Claude Code, at the request of @ari-ai-gnostics. I verified the branch against the module source rather than reading the diff top-to-bottom.

This is a strong, high-value change. It removes real liability rather than just trimming prose. Two distinct kinds of change worth separating when reviewing:

1. Six guides rewritten because they were fabricated (bucket, dataset, notebook, system, wsi, qupath). These documented APIs, CLI commands, and classes that do not exist in the code (multi-cloud storage, resumable downloads, handler ABCs, a wrong QuPath version). I spot-checked the bucket rewrite against _service.py/__init__.py: method signatures, chunk constants, and the "GCS-only, no Azure" correction all match. Fabricated docs are worse than none because they mislead confidently β€” deleting them is unambiguously correct.

2. Core guides condensed (root 1872β†’1158, platform 1676β†’711, plus tests/CI/application/utils/gui). I checked the root guide's structure β€” every load-bearing section survived (Development Commands, Architecture Principles, Dependency Graph, SDK Usage, Code Standards, Build System, Testing Requirements, Important Notes). Tighter, not gutted.

Suggestions for reviewers

  • A βˆ’8,151/+1,129 diff is not reviewable line-by-line. The right approach is to verify a sample of the rewritten guides against source, not to eyeball the diff. Trust nothing; re-derive from code.
  • The condensed guides are the higher-risk part, not the rewrites. The rewrites started from a known-false baseline, so any change was an improvement. The condensations started from partly-true text, where it's possible to silently drop a real gotcha. Spend review time there.
  • Flag the root cause in the PR body. Six module guides full of invented APIs suggests the originals were generated without verification against source. This branch fixes the symptom; a note (or a lightweight "docs must be derived from source" check) would help it not recur.
  • Consider splitting out the pyproject.toml maintainer change. Routing author emails to support@ and adding maintainers is unrelated to a docs refresh β€” cleaner as its own PR, though it's trivial.

Net: verifiable and, where I checked, correct. πŸ‘

@codecov

codecov Bot commented Jul 30, 2026

Copy link
Copy Markdown

Codecov Report

βœ… All modified and coverable lines are covered by tests.
βœ… All tests successful. No failed tests found.
see 7 files with indirect coverage changes

@sonarqubecloud

Copy link
Copy Markdown

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