Skip to content

Commit 2b6f545

Browse files
authored
Merge pull request #12 from MuteJester/codebase-hygiene
Codebase hygiene + god-file decomposition (behavior-preserving)
2 parents 9c2afd5 + 19ea936 commit 2b6f545

105 files changed

Lines changed: 15317 additions & 15646 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

audit-docs/allele_model_audit.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ The following Allele methods exist on every subclass:
3939
### `_find_anchor`
4040

4141
**Build-time only.** `_find_anchor` runs inside `Allele.__init__`
42-
when one of the bundled-data builders in `.private/scripts/`
42+
when one of the private bundled-data builder scripts
4343
constructs `VAllele("name", gapped_seq, length)` — the constructor
4444
calls `self._find_anchor()` unless `anchor_override=...` was passed.
4545

audit-docs/docs_website_audit.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,10 @@ sibling audits.
9292
| **Designs** (per-slice / per-mechanism scoping pre-implementation) | 17 | `clonal_family_design.md`, `clonal_parent_outcome_design.md`, `clonal_plan_split_design.md`, `d_inversion_design.md`, `d_inversion_extension_design.md`, `paired_end_design.md`, `receptor_revision_design.md`, `shm_segment_rate_design.md`, `v_subregion_shm_rate_design.md`, `np_markov_base_generator_design.md`, `p_nucleotide_design.md`, `fastq_export_design.md`, `allele_usage_estimation_design.md`, `trim_distribution_estimation_design.md`, `np_length_estimation_design.md`, `np_base_model_estimation_design.md`, `p_nucleotide_length_estimation_design.md` |
9393
| **Hubs / contributor entry points** | 6 | `engine_architecture.md`, `adding_a_pass.md`, `validation_matrix.md`, `reference_cartridge.md`, `airr_record_validator.md`, `allele_model_audit.md` |
9494

95-
The `docs/superpowers/plans/` directory holds Claude-
96-
session planning artifacts (e.g.
97-
`2026-05-18-mcp-redesign-v2.md`) — **not user-facing
98-
documentation**, but currently mixed into the same
99-
`docs/` tree.
95+
A private planning directory holds pre-implementation
96+
planning notes (e.g. `2026-05-18-mcp-redesign-v2.md`) —
97+
**not user-facing documentation**, but currently mixed
98+
into the same `docs/` tree.
10099

101100
The `docs/build/` directory holds Python wheel build
102101
artifacts (a side-effect of `python -m build`) — also
@@ -151,7 +150,6 @@ MkDocs Material lands.
151150
- `pin_scaffold_docs_dir_carries_thirty_eight_md_audit_design_files`
152151
- `pin_scaffold_old_docs_dir_exists_as_abandoned_earlier_attempt`
153152
- `pin_scaffold_deploy_docs_workflow_targets_website_dir`
154-
- `pin_scaffold_docs_superpowers_subdir_holds_session_artifacts_not_docs`
155153
- `pin_scaffold_docs_build_subdir_holds_wheel_artefacts_not_docs`
156154

157155
---
@@ -559,10 +557,10 @@ expand this audit.
559557
versioning; the MkDocs migration could add it (via
560558
`mike`). Decision belongs to the framework choice.
561559
- **Search backend.** Same — depends on framework choice.
562-
- **`docs/superpowers/plans/` cleanup.** The Claude-
563-
session planning artefacts should probably move to a
564-
separate `.private/` directory but that's a housekeeping
565-
matter, not a docs structure issue.
560+
- **Private planning-notes cleanup.** The pre-implementation
561+
planning notes should live in a separate private directory,
562+
not under `docs/` — a housekeeping matter, not a docs
563+
structure issue.
566564

567565
---
568566

audit-docs/reference_cartridge_authoring_audit.md

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,12 @@ in three places:
7474
"Populated by `RandomDataConfigBuilder.make_from_reference`",
7575
but `RandomDataConfigBuilder` is no longer importable
7676
anywhere in `src/GenAIRR/`.
77-
2. `.private/scripts/build_imgt_configs.py` still imports
78-
`from GenAIRR.dataconfig.make.random import
79-
RandomDataConfigBuilder` and is **currently broken**
80-
running it would `ModuleNotFoundError` at the top.
77+
2. The IMGT build script (historically a `.private/` script that
78+
imported the removed `RandomDataConfigBuilder`) has since been
79+
ported to a first-class, tracked maintainer tool at
80+
`tools/build_imgt_configs.py`, built on
81+
`ReferenceCartridgeBuilder`. The paragraphs below document the
82+
interim broken-stub state that the port resolved.
8183
3. The build-cache mirror at
8284
`docs/build/lib.linux-x86_64-cpython-312/GenAIRR/dataconfig/make/`
8385
carries the historical implementation as a compile
@@ -129,7 +131,7 @@ reuse them rather than reinvent them.
129131
| Reference site | Pre-slice state | Post-slice state |
130132
|---|---|---|
131133
| [`dataconfig/data_config.py:159-166`](../src/GenAIRR/dataconfig/data_config.py#L159-L166)`DataConfig.build_report` field docstring | "Populated by `RandomDataConfigBuilder.make_from_reference`" (named a removed class) | **[Cleaned]** Docstring now references `GenAIRR.cartridge_builder.ReferenceCartridgeBuilder.build`. Pinned by `test_pin_present_build_report_docstring_now_references_new_builder`. |
132-
| [`.private/scripts/build_imgt_configs.py`](../.private/scripts/build_imgt_configs.py) | `from GenAIRR.dataconfig.make.random import RandomDataConfigBuilder` — broken at module load with `ModuleNotFoundError` | **[Cleaned]** Top-level `raise NotImplementedError(...)` with explicit porting hint to `ReferenceCartridgeBuilder` + audit-doc reference; dead import moved into the unreachable function body for porting reference. Pinned by `test_pin_present_private_build_script_now_raises_explicit_legacy_error`. |
134+
| [`tools/build_imgt_configs.py`](../tools/build_imgt_configs.py) | The legacy build script imported the removed `from GenAIRR.dataconfig.make.random import RandomDataConfigBuilder` | **[Ported]** Rewritten as a first-class, tracked maintainer tool using `ReferenceCartridgeBuilder` (`from_fasta → infer_identity → infer_v_subregions → build`), producing structural cartridges. Pinned by `test_pin_present_imgt_build_tool_uses_reference_cartridge_builder` + `tests/test_build_imgt_configs.py`. |
133135
| `docs/build/lib.linux-x86_64-cpython-312/GenAIRR/dataconfig/make/...` | Historical implementation of `RandomDataConfigBuilder` / `CustomDataConfigBuilder` as a compile artefact | **Unchanged.** Build-cache mirror is not on the import path; regenerated by the next wheel build. Pinned absent by `test_pin_scaffold_historical_random_builder_module_is_gone` (verifies `ModuleNotFoundError` on import). |
134136

135137
### 3.2 Historical shape (for design inspiration only)
@@ -527,9 +529,9 @@ sub-steps:
527529
onto `cfg.build_report`).
528530

529531
6. **Dead-reference cleanup**: update the
530-
`DataConfig.build_report` docstring + update
531-
`.private/scripts/build_imgt_configs.py` to import from
532-
the new module.
532+
`DataConfig.build_report` docstring + port the IMGT build
533+
script to the new module (done: now
534+
`tools/build_imgt_configs.py`).
533535

534536
Cost estimate:
535537

@@ -573,8 +575,8 @@ builder reuses
573575
every bundled cartridge (no producer in live source).
574576
11. `DataConfig.build_report` docstring still names
575577
`RandomDataConfigBuilder` — a dead class.
576-
12. `.private/scripts/build_imgt_configs.py` still imports
577-
from the dead module path.
578+
12. The IMGT build script imported from the dead module path
579+
(since ported to `tools/build_imgt_configs.py`).
578580

579581
### `pin_absence_*` — the gaps the slice closes
580582

@@ -624,12 +626,11 @@ expand the work.
624626
- **Cartridge diff / merge tooling.** A future
625627
`CartridgeDiff` surface could compare two cartridges' build
626628
reports — separate slice.
627-
- **Live-data download (IMGT / OGRDB / etc.).** The
628-
historical `.private/scripts/build_imgt_configs.py`
629-
downloads FASTA from the web. The new builder accepts file
630-
paths or pre-parsed allele lists; download tooling is a
631-
separate concern (the private script can stay private,
632-
updated to import the new builder).
629+
- **Live-data download (IMGT / OGRDB / etc.).** The IMGT
630+
build tool (`tools/build_imgt_configs.py`) downloads FASTA
631+
from the web. The builder itself accepts file paths or
632+
pre-parsed allele lists; download tooling stays a separate
633+
concern in the maintainer tool.
633634
- **GUI / web wrapper.** Out of scope.
634635
- **Auto-bundling.** The builder produces a `DataConfig`
635636
ready for pickling, but the wheel-build process that ships

audit-docs/validation_matrix.md

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)