Skip to content

Commit f25c0d0

Browse files
satraclaude
andcommitted
refactor(027)!: rename ohbm2026→abstractatlas + ohbmcli→aacli (US1, data preserved)
Mechanical, behavior-preserving rename (US1 / the shippable MVP slice): - `git mv src/ohbm2026 → src/abstractatlas`; surgically rewrite imports + `ohbm2026.<module>` refs across src/, tests/, scripts/, .github/, docs/ (README + CLAUDE.md pre-SPECKIT). Two passes: `(from|import) ohbm2026` and `ohbm2026.<X>` EXCEPT `ohbm2026.parquet`. - pyproject: package name→abstractatlas; `aacli = abstractatlas.cli:main`; legacy per-stage `ohbm-*` scripts dropped (most pointed at Stage-5-moved modules; functions remain importable). - Deprecation shims (FR-003/SC-007): `ohbmcli` entry point warns then delegates to aacli; `src/ohbm2026/__init__.py` meta-path shim redirects `import ohbm2026[.*]` → `abstractatlas[.*]` with a DeprecationWarning. Both labeled with removal follow-up. DATA PRESERVED (FR-004) — NOT renamed: `ohbm2026.parquet`, `/ohbm2026/` route, `SITE_MODE='ohbm'`, `OHBM2026_*` CI vars, conference `kind`, `ohbm2026.ui.*`/`analytics` localStorage keys, `--ohbm2026-parquet` flag, `ohbm2026_state_key`, on-disk paths/state-keys. No data regen, no site re-publish, byte-identical. Site (TypeScript) untouched — it never imports the Python package (T007 verified no-op). Verified: full suite `Ran 1034 — OK (skipped=1)`, identical to baseline (SC-002); import smoke test OK; constitution-check --full exit 0; residual `git grep 'ohbm2026|ohbmcli'` = only data-identity, shims, historical specs. US2 (ingestor arch) + US3 (LinkML schema) follow in later slices. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 9455c83 commit f25c0d0

233 files changed

Lines changed: 1063 additions & 964 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.

.github/scripts/resolve-data-channel.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
# Dropbox shared links OR Cloudflare R2 (e.g. https://aadata.cirrusscience.org/
4646
# <sha256>/<file>.parquet). This script and the site loader are unchanged — the
4747
# URL is opaque to both; loader.ts only rewrites Dropbox hosts, so R2 URLs pass
48-
# through verbatim. `ohbmcli upload-atlas-package` emits a ready-to-paste
48+
# through verbatim. `aacli upload-atlas-package` emits a ready-to-paste
4949
# channel entry in exactly the shape above.
5050

5151
set -euo pipefail

.github/workflows/deploy-ui.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ on:
3030
- 'site/**'
3131
- '.github/workflows/deploy-ui.yml'
3232
- 'specs/008-ui-rewrite/contracts/references.yaml'
33-
- 'src/ohbm2026/ui_data/link_check.py'
33+
- 'src/abstractatlas/ui_data/link_check.py'
3434
workflow_dispatch:
3535
inputs:
3636
target:
@@ -191,7 +191,7 @@ jobs:
191191
# the deploy when a citation 4xx's or times out (T086 / T088).
192192
# Runs on both targets — a broken reference shouldn't reach
193193
# sandbox either.
194-
run: PYTHONPATH=src python -m ohbm2026.ui_data.link_check specs/008-ui-rewrite/contracts/references.yaml
194+
run: PYTHONPATH=src python -m abstractatlas.ui_data.link_check specs/008-ui-rewrite/contracts/references.yaml
195195

196196
# Resolve the parquet URLs from the keyed registry variable, using the
197197
# channel this ref declares in site/data-channel.json. The same

.github/workflows/pr-preview.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414
- 'site/**'
1515
- '.github/workflows/pr-preview.yml'
1616
- 'specs/008-ui-rewrite/contracts/references.yaml'
17-
- 'src/ohbm2026/ui_data/link_check.py'
17+
- 'src/abstractatlas/ui_data/link_check.py'
1818
workflow_dispatch:
1919

2020
permissions:
@@ -71,7 +71,7 @@ jobs:
7171
# Same check that gates the production deploy in deploy-ui.yml —
7272
# mirrored here so PR previews surface a broken reference BEFORE
7373
# the merge instead of failing at deploy time.
74-
run: PYTHONPATH=src python -m ohbm2026.ui_data.link_check specs/008-ui-rewrite/contracts/references.yaml
74+
run: PYTHONPATH=src python -m abstractatlas.ui_data.link_check specs/008-ui-rewrite/contracts/references.yaml
7575

7676
# Resolve the parquet URLs from the keyed registry variable, using the
7777
# channel this PR branch declares in site/data-channel.json. A PR can

CLAUDE.md

Lines changed: 45 additions & 12 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 73 additions & 73 deletions
Large diffs are not rendered by default.

docs/abstracts-book-plan.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ the per-abstract pipeline introduced in Stage 11.1 — each abstract
1212
pandoc-renders in parallel with content+toolchain caching, then a
1313
two-pass assembly attaches a page-numbered author index.
1414

15-
DOCX export was **retired in Stage 11.1 US3** (`ohbmcli book --format docx`
15+
DOCX export was **retired in Stage 11.1 US3** (`aacli book --format docx`
1616
exits 2 with a pointer at `--format md` and `--format pdf`). The
1717
real-corpus DOCX hit 2.8 GB even after figure resizing — too large
1818
for Word to open — and the markdown bundle + PDF cover every use
@@ -39,7 +39,7 @@ live under `specs/011-abstracts-book/`:
3939
optional Tufte styling).
4040
- `data-model.md` — three layers (Stage-1 inputs → markdown-bearing
4141
in-memory model → outputs with figure-filename contract).
42-
- `contracts/cli.md``ohbmcli book` flags, error path table,
42+
- `contracts/cli.md``aacli book` flags, error path table,
4343
known limitations.
4444
- `quickstart.md` — operator runbook for install + first run.
4545

@@ -53,13 +53,13 @@ uv pip install --python .venv/bin/python ".[abstracts_book]"
5353
brew install pandoc tectonic
5454

5555
# Markdown-only first run (no system deps needed):
56-
PYTHONPATH=src .venv/bin/python -m ohbm2026.cli book --format md
56+
PYTHONPATH=src .venv/bin/python -m abstractatlas.cli book --format md
5757

5858
# Full PDF run:
59-
PYTHONPATH=src .venv/bin/python -m ohbm2026.cli book --format pdf --sort poster_id
59+
PYTHONPATH=src .venv/bin/python -m abstractatlas.cli book --format pdf --sort poster_id
6060

6161
# All three formats + Tufte typography for the PDF:
62-
PYTHONPATH=src .venv/bin/python -m ohbm2026.cli book --format all --sort poster_id --style tufte
62+
PYTHONPATH=src .venv/bin/python -m abstractatlas.cli book --format all --sort poster_id --style tufte
6363
```
6464

6565
Outputs land at `data/outputs/book/book__<state-key>/`. Figure
@@ -108,7 +108,7 @@ Operator flags:
108108
Single-abstract debug (re-render one chunk in isolation, populating
109109
the cache):
110110
```bash
111-
PYTHONPATH=src .venv/bin/python -m ohbm2026.book.render_per_abstract \
111+
PYTHONPATH=src .venv/bin/python -m abstractatlas.book.render_per_abstract \
112112
--poster-id 0042 --style plain
113113
```
114114

docs/cllm-claims-plan.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ experience overwhelming.
2525

2626
## Execution
2727

28-
1. Run `ohbmcli analyze-figures` first if you want cached figure notes included in
28+
1. Run `aacli analyze-figures` first if you want cached figure notes included in
2929
the claim manuscript.
30-
2. Run `ohbmcli extract-claims` to populate or resume the claim cache.
31-
3. Run `ohbmcli enrich` to merge claim extraction into the enriched abstract data.
32-
4. Run `scripts/build_ui_data.py` (Stage 6) so the SvelteKit site's data package picks up the new fields. (The legacy `ohbmcli export-ui` / `build-ui` commands have been removed; this plan predates Stage 2.1 + Stage 6 and is kept for historical reference only.)
30+
2. Run `aacli extract-claims` to populate or resume the claim cache.
31+
3. Run `aacli enrich` to merge claim extraction into the enriched abstract data.
32+
4. Run `scripts/build_ui_data.py` (Stage 6) so the SvelteKit site's data package picks up the new fields. (The legacy `aacli export-ui` / `build-ui` commands have been removed; this plan predates Stage 2.1 + Stage 6 and is kept for historical reference only.)

docs/clustering-analysis-plan.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ Runtime checks on real data:
102102

103103
## Status
104104

105-
- [x] Added `ohbmcli cluster-benchmark`
105+
- [x] Added `aacli cluster-benchmark`
106106
- [x] Implemented method sweep across `kmeans`, `agglomerative-ward`, `agglomerative-average`, `gaussian-mixture`, and `birch`
107107
- [x] Added label-independent ranking using silhouette, Davies-Bouldin, Calinski-Harabasz, inter/intracluster distance ratio, and cluster-balance terms
108108
- [x] Added test coverage for method execution, metric computation, ranking, CLI wiring, and output writing

docs/ohbm26-plan.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -37,36 +37,36 @@ This is the operational planning document for the repository.
3737

3838
## Architecture
3939

40-
- `src/ohbm2026/graphql_api.py`
40+
- `src/abstractatlas/graphql_api.py`
4141
- GraphQL requests, batching, retries, env loading, author/submission fetches
42-
- `src/ohbm2026/assets.py`
42+
- `src/abstractatlas/assets.py`
4343
- local asset indexing, figure URL extraction, reuse-aware downloads, JSON-only asset refresh, and ingest CLI
44-
- `src/ohbm2026/enrichment.py`
44+
- `src/abstractatlas/enrichment.py`
4545
- author export, HTML-to-markdown conversion, section mapping, local Qwen figure analysis, enriched abstract assembly, and phase-2 CLI
46-
- `src/ohbm2026/neuroscape.py`
46+
- `src/abstractatlas/neuroscape.py`
4747
- stage-one embeddings, semantic graph generation, clustering, and NeuroScape handoff manifest
48-
- `src/ohbm2026/cli.py`
49-
- unified `ohbmcli` command
48+
- `src/abstractatlas/cli.py`
49+
- unified `aacli` command
5050

5151
## Unified CLI
5252

53-
- `ohbmcli ingest`
53+
- `aacli ingest`
5454
- fetch abstracts and figure assets from the API
55-
- `ohbmcli refresh-assets`
55+
- `aacli refresh-assets`
5656
- rebuild `local_assets` from the local JSON database without rerunning abstract extraction
57-
- `ohbmcli authors`
57+
- `aacli authors`
5858
- export author metadata
59-
- `ohbmcli enrich`
59+
- `aacli enrich`
6060
- build enriched abstracts from local databases
61-
- `ohbmcli analyze-figures`
61+
- `aacli analyze-figures`
6262
- analyze local figures with Ollama
63-
- `ohbmcli embed-minilm`
63+
- `aacli embed-minilm`
6464
- generate local MiniLM embeddings
65-
- `ohbmcli embed-voyage`
65+
- `aacli embed-voyage`
6666
- generate Voyage embeddings
67-
- `ohbmcli semantic-analysis`
67+
- `aacli semantic-analysis`
6868
- build the semantic graph and semantic cluster summaries from any local embedding bundle
69-
- `ohbmcli write-manifest`
69+
- `aacli write-manifest`
7070
- write the NeuroScape handoff manifest
7171

7272
## Execution Order
@@ -226,7 +226,7 @@ Checks:
226226
- [x] Create a local MiniLM embedding pipeline and neighbor database.
227227
- [x] Create a purely semantic graph-and-cluster pipeline for the single-year corpus.
228228
- [x] Split the codebase into API, asset, enrichment, and embedding modules.
229-
- [x] Add a unified `ohbmcli` entrypoint.
229+
- [x] Add a unified `aacli` entrypoint.
230230
- [ ] Complete a full cached figure-analysis sweep with local `qwen3.5:35b`.
231231
- [ ] Validate the NeuroScape retraining path against the PR-based workflow and artifact requirements.
232232

docs/per-stage-pattern.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
Every pipeline stage in this repo (Stage 1 fetch, Stage 2 enrich,
44
Stage 3+ analyses, …) satisfies the same six contracts. This doc
55
defines them and points at two canonical reference implementations
6-
**Stage 1 (`src/ohbm2026/fetch_stage.py`)** for a single-fetch
7-
stage, and **Stage 2 (`src/ohbm2026/enrich_stage.py`)** for a
6+
**Stage 1 (`src/abstractatlas/fetch_stage.py`)** for a single-fetch
7+
stage, and **Stage 2 (`src/abstractatlas/enrich_stage.py`)** for a
88
multi-component stage — for each.
99

1010
A new stage author should be able to read this page plus
@@ -111,7 +111,7 @@ Stage 2 reference:
111111
What failures the stage surfaces loudly, with what typed cause,
112112
and at what exit code.
113113

114-
- Typed exception hierarchy in `ohbm2026.exceptions` rooted at a
114+
- Typed exception hierarchy in `abstractatlas.exceptions` rooted at a
115115
cross-stage `OhbmStageError(RuntimeError)`. Stage 1 subclass tree:
116116
`Stage1Error``SchemaContractError`, `CheckpointError`,
117117
`FigureFailureError`. Stage 2 subclass tree: `Stage2Error`
@@ -219,36 +219,36 @@ Stage 2 shipped the per-stage pattern scaffolding with
219219
(`specs/004-enrich-production-wiring/`) wires production runners
220220
through those seams and keeps the orchestrator surface unchanged:
221221

222-
- **Figures**: `src/ohbm2026/stage2_figures.py`
222+
- **Figures**: `src/abstractatlas/stage2_figures.py`
223223
`run_figure_component(abstract, model_id, flex_enabled, client, cwd)`
224224
groups all figures of one abstract into a single OpenAI Responses
225225
API call with manuscript text as context. In-memory JPEG-q85
226226
compression at 1024 px (`compress_image`) + a four-field local
227-
quality probe (`src/ohbm2026/image_quality.py`:
227+
quality probe (`src/abstractatlas/image_quality.py`:
228228
`laplacian_variance`, `mean_brightness`, `native_max_dim`,
229229
`compression_ratio`) populate `local_quality_estimate` on every
230230
record. Pydantic `FigureInterpretationResponse` + a fixed
231231
`model_quality_estimate` enum validate the response server-side.
232-
- **Claims**: `src/ohbm2026/stage2_claims.py`
232+
- **Claims**: `src/abstractatlas/stage2_claims.py`
233233
`run_claims_component(abstract, ..., figure_interpretations)`
234234
issues a single agentic Responses API call with three function
235235
tools registered (`verify_source_quote`, `lookup_eco_code`,
236236
`dedupe_check`). The model orchestrates extract → verify →
237237
annotate → dedupe internally. Post-response validation drops
238238
claims whose source quote isn't a substring of the manuscript
239239
OR whose `evidence_eco_codes` include off-vocabulary ECO IDs.
240-
- **References**: `src/ohbm2026/stage2_references.py` is a thin
240+
- **References**: `src/abstractatlas/stage2_references.py` is a thin
241241
adapter to the existing `openalex.collect_reference_metadata`
242242
async pipeline.
243-
- **Flex tier**: `src/ohbm2026/flex_tier.py`
243+
- **Flex tier**: `src/abstractatlas/flex_tier.py`
244244
`call_with_flex_fallback(...)` wraps each LLM call with a 1-flex +
245245
1-standard retry budget; defaults to flex ON; per-component
246246
disable flags `--no-flex-figures` / `--no-flex-claims`.
247247
- **Concurrency**: `enrich_stage._run_component_concurrent`
248248
fans out per-abstract work across a `ThreadPoolExecutor`
249249
(default 30 in flight). Per-component caps via
250250
`--concurrency-figures` / `--concurrency-claims`.
251-
- **ECO v1 vocabulary** lives at `src/ohbm2026/data/eco_top_codes.json`
251+
- **ECO v1 vocabulary** lives at `src/abstractatlas/data/eco_top_codes.json`
252252
(committed source). The claims component's `lookup_eco_code`
253253
tool draws from it without network access.
254254
- **Provenance extensions**: per-component `flex_tier_enabled`,
@@ -269,7 +269,7 @@ When you write Stage N:
269269
2. **Author the test file first** (Principle IV). One test per
270270
contract element, organized into a class per contract.
271271
3. **Implement the orchestrator** in
272-
`src/ohbm2026/<stage_name>.py`. Use Stage 1's `fetch_stage.py`
272+
`src/abstractatlas/<stage_name>.py`. Use Stage 1's `fetch_stage.py`
273273
as the layout reference. Share helpers via `artifacts.py`,
274274
`exceptions.py`, and `schema_diff.py` where possible.
275275
4. **Add a CLI subcommand** in `cli.py` that delegates to your
@@ -280,12 +280,12 @@ When you write Stage N:
280280

281281
## Common Helpers
282282

283-
- `ohbm2026.artifacts.build_*_path(state_key)` — path derivation
283+
- `abstractatlas.artifacts.build_*_path(state_key)` — path derivation
284284
under gitignored roots.
285-
- `ohbm2026.artifacts.build_dependency_basis` + `build_state_key`
285+
- `abstractatlas.artifacts.build_dependency_basis` + `build_state_key`
286286
deterministic state key from input fingerprint.
287-
- `ohbm2026.exceptions.*` — typed exception hierarchy.
288-
- `ohbm2026.schema_diff.*` — schema-diff / discovery primitives
287+
- `abstractatlas.exceptions.*` — typed exception hierarchy.
288+
- `abstractatlas.schema_diff.*` — schema-diff / discovery primitives
289289
(reusable across stages that talk to GraphQL).
290290
- The constitution lint at
291291
`.specify/scripts/bash/constitution-check.sh` catches the

0 commit comments

Comments
 (0)