Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,13 @@ bin/reasoner/ bakeoff.go (D18 CPU OpenAI tool-call bake-off)
internal/ shared Go (brain/rank is cgo-free; facts D16; cli flaggy D23; chats; gitlog; websearch; reasoner; duckstats)
bin/qa/ stats.go (DuckDB quantiles / JSONL count; gcc CGO, not Zig)
bin/watch/ corpus watcher (used by bin/brain/watch.go)
bin/tools/ vendored python libs behind bin/* (kblib, yamlout, websearch)
bin/tools/ web-search fixtures (Go testdata for internal/websearch)
bin/cgo/ zig zcc zc++ (CGO via zig cc, not gcc)
bin/stack/ start start-assistant stop status (compose + PicoClaw agent)
bin/docker-entrypoint container entrypoint (api: serve|search|watch|index|add|mail-sync)
compose.yaml docker composition (root level, not docker/)
Dockerfile api (Zig CGO, Go write path; no CPython)
var/ kb.lbug, var/mail/*, caches (gitignored)
.venv/ legacy python facts tools only (kblib/contradict)
```

## Mail pipeline
Expand Down
13 changes: 6 additions & 7 deletions PLAN.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ detective method: **a fact needs ≥2 independent sources or it is
docs/ published docs (this conversation → docs/ as md)
skills/ in-project skills (web-search, postgres, brain, picoclaw, diataxis-docs)
bin/
facts/extract.go audit.go crm.go # D14 shebang; Python implementation
kb/index Python bulk write (called by bin/brain/index.go)
kb/add Python incremental write (called by bin/brain/add.go)
facts/extract.go audit.go crm.go # D14 shebang; Go implementation
kb/index deprecated bash shim → bin/brain/index.go
kb/add deprecated bash shim → bin/brain/add.go
brain/index.go rebuild FTS + HNSW (incl. --with-mail)
brain/add.go incremental leaf write (no rebuild)
brain/get.go stats.go eval.go # Go read (cgo); Python bin/kb/* CI fallback
brain/get.go stats.go eval.go # Go read (cgo)
brain/watch.go
brain/search.go deduction: facts → info → web
cli/complete.go flaggy bash/zsh/fish complete (D23)
Expand All @@ -90,7 +90,6 @@ detective method: **a fact needs ≥2 independent sources or it is
db/psql-yq (vendored)
ssh-tunnel onlyoffice pg tunnel 5433
var/kb.lbug single embedded store (gitignored)
.venv/ legacy python facts tools only (kblib)
```

## Schema (first pass)
Expand Down Expand Up @@ -118,7 +117,7 @@ Common props on every node/edge: `root`, `confidence`, `evidence[]`, `how`,
## Tooling conventions

- `bin/{subject}/{method}` — line 2 is a usage comment (mirrors `psql-yq`).
- bash + python primary; golang via Go shebang when a compiled helper is right.
- bash + golang primary (Go shebang); no Python in-tree.
- YAML default output, `--json` for machines. Slice with mikefarah/yq.
- Everything that touches the network / DB is read-only, throttled, cached.
- Tests (TDD) gate every commit; `gh` + CI/CD on every push.
Expand Down Expand Up @@ -222,5 +221,5 @@ publishing; corpus walk must skip permission-denied entries; leaf text needs
UTF-8 sanitization before FTS.

Decisions (2026-08-18): exclude arc-1 junk (external/, docs/chats/, bin/chats.bin,
qa/load_test_*.py); keep Python in-tree deprecated for A/B; M365 WIP same PR;
qa/load_test_*.py); Python fully removed (2026-08-19); M365 WIP same PR;
go-ollama+go-xls now, rest verify.
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# 2dph — deductionphile

[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Python](https://img.shields.io/badge/Python-3.12+-3776AB.svg)](https://python.org)
[![uv](https://img.shields.io/badge/uv-managed-261230.svg)](https://docs.astral.sh/uv)
[![Go](https://img.shields.io/badge/Go-1.24+-00ADD8.svg)](https://go.dev)
[![Tests](https://github.com/eSlider/2dph/actions/workflows/ci.yml/badge.svg)](https://github.com/eSlider/2dph/actions/workflows/ci.yml)
[![Latest Release](https://img.shields.io/github/v/tag/eSlider/2dph?sort=semver&label=release)](https://github.com/eSlider/2dph/releases)
[![GitHub Stars](https://img.shields.io/github/stars/eSlider/2dph?style=social)](https://github.com/eSlider/2dph/stargazers)
Expand Down Expand Up @@ -132,8 +131,7 @@ bin/brain/search.go "invoice from last week" # same s

- **LadybugDB** — single `var/kb.lbug`, Cypher + HNSW + BM25, embedded.
Read tools (`get` / `stats` / `eval`) are Go + Zig CGO (`bin/cgo/zcc`).
Python fallbacks stay for CI until the runner fetches Zig. Incremental
write is `bin/brain/add.go` (Python `kblib.add_leafs`). Bulk rebuild is
Incremental write is `bin/brain/add.go`; bulk rebuild is
Compose profile `index` (`bin/brain/index.go --rebuild`).
- **potion-multilingual-128M** — 256-dim embeddings (Go/Ladybug, CPU, no Ollama)
runtime dependency.
Expand Down
4 changes: 3 additions & 1 deletion bin/brain/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,9 @@ func hasBareWithChats(args []string) bool {
}

func factsFromExtract(root string) []brain.LeafInput {
cmd := exec.Command("python3", filepath.Join(root, "bin", "facts", "extract"), "--json", "--dry-run")
cmd := exec.Command(filepath.Join(root, "bin", "cgo", "zig"), "go", "run",
"-tags=system_ladybug,facts_extract",
filepath.Join(root, "bin", "facts", "extract.go"), "--json", "--dry-run")
cmd.Dir = root
out, err := cmd.Output()
if err != nil {
Expand Down
Empty file removed bin/facts/__init__.py
Empty file.
124 changes: 0 additions & 124 deletions bin/facts/crm

This file was deleted.

Loading
Loading