# GOKIT Implementation Plan

## Scope
This plan tracks implementation of v1 only. Item 10 (post-v1 roadmap) was intentionally removed.

## Milestones
- [x] M0: Scaffold package, CLI, manifest, aliases
- [x] M1: Single-study enrichment engine (correctness MVP, id2gos path)
- [x] M2: Performance MVP (count-first + caching)
- [x] M3: Batch and expanded formats
- [x] M4: CI hardening and release prep

## M1 Tasks (Current)
- [x] Define CLI contract and command surface
- [x] Implement strict input existence/emptiness validation
- [x] Implement normalized parsers for study/population/associations/obo
- [x] Implement ORA Fisher exact + BH correction
- [x] Implement deterministic output sorting and stable schemas
- [x] Write TSV and JSONL result emitters
- [x] Add single-study integration tests and golden fixture

## M2 Tasks
- [x] `store_items` memory modes
- [x] `term_pop` caching for repeated runs
- [x] ancestor propagation caching
- [x] OBO on-disk cache and invalidation
- [x] benchmark suite + baseline metrics

## M3 Tasks
- [x] `--studies` batch mode
- [x] cross-study ontology-aware similarity matrix (`--compare-semantic`, ancestor-closure Jaccard)
- [x] parquet export
- [x] grouped reporting improvements
- [x] advanced semantic metrics (Resnik/Lin/Wang) and top-pair explanations

## M4 Tasks
- [x] benchmark gates in CI
- [x] py-version matrix expansion
- [x] release docs and migration notes

## Acceptance Criteria
- `gokit enrich` computes real enriched GO terms for `id2gos` input in v1 path.
- Output ordering is deterministic across repeated runs.
- Manifest contains reproducibility metadata for every run.

## v0.1.1 Increment (In Progress)
- [x] Add `gaf`, `gpad`, `gene2go` association readers
- [x] Add `auto` format detection for association files
- [x] Add parser and CLI integration tests for new formats
- [x] Add `--id-type {auto,str,int}` normalization and mixed-ID coverage tests
- [x] Add semantic filters (`--semantic-min-padjsig`, `--semantic-namespace`) and pairwise summary stats
- [x] Improve semantic empty-result UX warnings
- [x] Add committed benchmark baseline and CI baseline regression checks
- [x] Add format-specific quickstart examples in README

## v0.1.2 Increment (In Progress)
- [x] Add `gokit plot` subcommand for figure generation from TSV outputs
- [x] Add term-bar plot for enriched/purifying terms (`over`/`under`)
- [x] Add direction summary plot by namespace at configurable alpha
- [x] Add semantic network plot for multi-study similarity matrices
- [x] Add optional `plot` dependency group (`matplotlib`)
- [x] Add figure-generation integration hook in `gokit enrich` (optional auto-emit)
- [x] Add CI lane covering `.[plot]` extra and headless rendering
- [x] Add direction-aware summary columns to grouped summary outputs
- [x] Add `gokit report` markdown consolidator for run outputs
