Skip to content

release/v1: refactor v1.0 — cleanup, naming rule, pkg/, docs - #70

Merged
eSlider merged 7 commits into
mainfrom
release/v1
Aug 21, 2026
Merged

release/v1: refactor v1.0 — cleanup, naming rule, pkg/, docs#70
eSlider merged 7 commits into
mainfrom
release/v1

Conversation

@eSlider

@eSlider eSlider commented Aug 21, 2026

Copy link
Copy Markdown
Owner

release/v1 — refactor v1.0

Replaces PR #69 (same branch, renamed). Plan: docs/refactor-v1.0.md, epic gitea #65.

P1-P7 — cleanup, compose, MCP 5→3, tests qa→test/, config deploy→etc/, docs rework.

Naming rule (D14, apply ALWAYS, also var/ etc/): bin/{subject}/{verb}-{object}.go singular no 's'.

contacts → by target:

  • bin/contact/import.go — read csv/vcf/mab → out
  • bin/brain/import-contact.go — upsert into brain
  • bin/onlyoffice/import-contact.go — reconcile into OO CRM
  • pkg/contact — type + parsers

Obezl. internal/ → pkg/: cli, cmdbin, contact, duckstats, httpapi. internal/ keeps 2dph-specific.

… fixtures

- rm bin/kb/{add,index,search,watch} (deprecated; Go replacements in bin/brain)
- rm bin/serve.go (replaced by bin/brain/serve.go)
- rm bin/tools/web-search fixtures (unused test data)
- httpapi Ingest now execs bin/brain/add.go --json
- ci: drop bash -n bin/kb/search
- docs/refactor-v1.0.md: measure-first plan + A/B (epic #65)
…earch fixtures to testdata

- spec.go: stats/ingest no longer exposed as MCP tools (stay OpenAPI paths)
- spec_test.go: assert minimal surface (search/get/audit only)
- websearch: move fixtures from bin/tools to internal/websearch/testdata
- skills/brain/tools.md regenerated
- docs/refactor-v1.0.md: status P1/P2/P3/P4, corrected counts
…cs rework

P5 tests taxonomy:
- qa/ → test/{system,stress}; system is the offline CI tier
- test/README.md: how to run each tier (system/stress/integration)
- historical load-test report → docs/load-test-summary-2026-08-11.md

P6 FHS config:
- deploy/{searxng,picoclaw} → etc/{searxng,picoclaw}
- compose + skill/docs paths updated; docker compose config -q clean

P7 documentation:
- README: add 'What's in 2dph today' (store, HNSW, BM25, hybrid, graph-hop,
  ACID, incremental, DuckDB as auxiliary)
- docs/README index: test taxonomy + etc/ config

Epic #65, milestone v1.0.
- README: 'Tool layout' table (bin/{subject}/{method}.go) + explain bin/cgo
  as the CGO toolchain (not CI/CD); move cli/complete.go out of table
- test/README: drop verbose stress-gate details; keep tier table + commands
- PLAN: architecture map now matches reality (no deprecated kb/, adds
  test/, etc/, contacts/ci/qa/watch subjects)
…→ pkg/

Rule (D14, apply ALWAYS, also for var/ etc/): bin/{subject}/{verb}-{object}.go
singular, no trailing 's'. subject = object/system you act on; verb = action.

contacts → split by target:
- bin/contact/import.go        read/normalize csv/vcf/mab → out (pure)
- bin/brain/import-contact.go  upsert contacts into the brain (info leafs)
- bin/onlyoffice/import-contact.go  reconcile contacts into OO CRM
- pkg/contact                  Contact type + parsers + Load/Dedupe/Render

Generic (no 2dph deps) internal/ → pkg/ (public reusable):
- cli, cmdbin, contact, duckstats, httpapi
- 36 import sites updated; internal/ keeps 2dph-specific (brain, chats, facts,
  gitlog, mailconv, mdleaves, ocr, reasoner, websearch)

AGENTS.md documents the rule; docs/skills/PLAN paths synced.
Tools (bin/{subject}/{verb}-{object}.go):
- contact/import.go → contact/list.go (reads, imports nothing)
- markdown/import.go → markdown/split-leaf.go
- qa/stats.go → jsonl/stats.go (subject = data acted on; tag jsonl_stats)
- reasoner/bakeoff.go → reasoner/bench.go (tag reasoner_bench)
- cli/complete.go → shell/complete.go (subject = the shell)
- git/import.go folded → brain/import-git.go (writes leafs, like import-contact;
  old tool printed into the void — no caller, no writer)

Libs out of bin/ (D14):
- bin/mail/sync → internal/mailsync; bin/watch → internal/corpuswatch
- internal/mdleaves → internal/markdown (domain name, not output-type —
  no mdroot/mdcontent namespace creep)
- pkg/cmdbin → pkg/repo (Root + ExecFile of the checkout)
- pkg/duckstats/duckstats.go → pkg/duckdb/stats.go

facts/: crm.go → prove-crm.go (verb!), audit_db.go → audit-db.go;
audit.go runtime exec path updated.

Deleted: bin/brain/serve_exec.go (zero refs; CI fallback duplication).

skills/: agent-skills standard layout — brain/tools.md → brain/references/,
web-search/reference/ → references/.

docs/AGENTS/PLAN/README paths synced; complete.go entries updated.
@eSlider
eSlider merged commit aa789f9 into main Aug 21, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant