~3.2k lines of Python remain vs ~8.8k Go. Search/HTTP/git/web are Go. Python still does Ladybug write, mail/md convert, facts, and CLI get/stats/eval via ExecFile.
D6: write stays Python until the Go Ladybug add path is safe. Do not port kblib.upsert_leaf in v1.
bin/kb/{get,stats,eval} — read path (HTTP already has get/stats)
bin/chats/refresh-linkedin-session — CDP
bin/ci/semver
Shims only: bin/web/search, bin/git/import, bin/mail/index_mail.
Go wrappers that still exec Python: brain/{index,get,stats,eval}.go, mail/import.go, markdown/import.go.
Slices (one PR each)
bin/brain/{get,stats,eval}.go call internal/brain (cgo). No ExecFile to bin/kb/*. Python bin/kb/{get,stats,eval} stay as fallbacks until CI has ladybug.
bin/markdown/import.go — real Go leaf split (or keep wrap until mistune port).
bin/mail/import.go — real Go convert; docling stays isolated subprocess until OCR issue 6.
bin/facts/*.go shebangs (issue 13 remainder).
Compose profile index (issue 4): Python only in that image; API image has no CPython.
brain/add write path = v2 after upsert+index tests. Then delete kblib write.
Test
Layout: get.go/stats.go/eval.go must not contain ExecFile or bin/kb/.
Eval control questions live in a cgo-free package (CI).
go test ./... still cgo-free. Recall gate in CI may keep bin/kb/eval until ladybug is on the runner.
## Why
~3.2k lines of Python remain vs ~8.8k Go. Search/HTTP/git/web are Go. Python still does Ladybug **write**, mail/md convert, facts, and CLI get/stats/eval via `ExecFile`.
D6: write stays Python until the Go Ladybug add path is safe. Do not port `kblib.upsert_leaf` in v1.
## Inventory (tracked)
Still real Python:
- `bin/kb/index` + `kblib.py` — rebuild / FTS+HNSW write
- `bin/mail/import` + `mailconv.py` — JSON→md (docling)
- `bin/md/import` + `mdleaves.py` — mistune leafs
- `bin/facts/{extract,audit,crm}` — 2-source facts
- `bin/kb/{get,stats,eval}` — read path (HTTP already has get/stats)
- `bin/chats/refresh-linkedin-session` — CDP
- `bin/ci/semver`
Shims only: `bin/web/search`, `bin/git/import`, `bin/mail/index_mail`.
Go wrappers that still exec Python: `brain/{index,get,stats,eval}.go`, `mail/import.go`, `markdown/import.go`.
## Slices (one PR each)
1. `bin/brain/{get,stats,eval}.go` call `internal/brain` (cgo). No `ExecFile` to `bin/kb/*`. Python `bin/kb/{get,stats,eval}` stay as fallbacks until CI has ladybug.
2. `bin/markdown/import.go` — real Go leaf split (or keep wrap until mistune port).
3. `bin/mail/import.go` — real Go convert; docling stays isolated subprocess until OCR issue 6.
4. `bin/facts/*.go` shebangs (issue 13 remainder).
5. Compose profile `index` (issue 4): Python only in that image; API image has no CPython.
6. `brain/add` write path = v2 after upsert+index tests. Then delete `kblib` write.
## Test
- Layout: `get.go`/`stats.go`/`eval.go` must not contain `ExecFile` or `bin/kb/`.
- Eval control questions live in a cgo-free package (CI).
- `go test ./...` still cgo-free. Recall gate in CI may keep `bin/kb/eval` until ladybug is on the runner.
Related: #4 sidecar, #7 adapters, #13 facts shebang.
Slice 1 in review: GitHub https://github.com/eSlider/2dph/pull/18 — bin/brain/{get,stats,eval}.go call internal/brain (cgo). Python bin/kb/{get,stats,eval} stays CI fallback. Control questions in internal/brain/rank.
Slice 1 in review: GitHub https://github.com/eSlider/2dph/pull/18 — `bin/brain/{get,stats,eval}.go` call `internal/brain` (cgo). Python `bin/kb/{get,stats,eval}` stays CI fallback. Control questions in `internal/brain/rank`.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Why
~3.2k lines of Python remain vs ~8.8k Go. Search/HTTP/git/web are Go. Python still does Ladybug write, mail/md convert, facts, and CLI get/stats/eval via
ExecFile.D6: write stays Python until the Go Ladybug add path is safe. Do not port
kblib.upsert_leafin v1.Inventory (tracked)
Still real Python:
bin/kb/index+kblib.py— rebuild / FTS+HNSW writebin/mail/import+mailconv.py— JSON→md (docling)bin/md/import+mdleaves.py— mistune leafsbin/facts/{extract,audit,crm}— 2-source factsbin/kb/{get,stats,eval}— read path (HTTP already has get/stats)bin/chats/refresh-linkedin-session— CDPbin/ci/semverShims only:
bin/web/search,bin/git/import,bin/mail/index_mail.Go wrappers that still exec Python:
brain/{index,get,stats,eval}.go,mail/import.go,markdown/import.go.Slices (one PR each)
bin/brain/{get,stats,eval}.gocallinternal/brain(cgo). NoExecFiletobin/kb/*. Pythonbin/kb/{get,stats,eval}stay as fallbacks until CI has ladybug.bin/markdown/import.go— real Go leaf split (or keep wrap until mistune port).bin/mail/import.go— real Go convert; docling stays isolated subprocess until OCR issue 6.bin/facts/*.goshebangs (issue 13 remainder).index(issue 4): Python only in that image; API image has no CPython.brain/addwrite path = v2 after upsert+index tests. Then deletekblibwrite.Test
get.go/stats.go/eval.gomust not containExecFileorbin/kb/.go test ./...still cgo-free. Recall gate in CI may keepbin/kb/evaluntil ladybug is on the runner.Related: #4 sidecar, #7 adapters, #13 facts shebang.
Slice 1 in review: GitHub https://github.com/eSlider/2dph/pull/18 —
bin/brain/{get,stats,eval}.gocallinternal/brain(cgo). Pythonbin/kb/{get,stats,eval}stays CI fallback. Control questions ininternal/brain/rank.Slice 1 merged: GitHub https://github.com/eSlider/2dph/pull/18 (
54201d8).bin/brain/{get,stats,eval}.go→internal/brain. Pythonbin/kb/{get,stats,eval}remains CI fallback.Still open on this issue: markdown/import Go, mail/import Go, facts shebangs (also #13), Compose
indexprofile (#4), write pathbrain/add= v2.