release/v1: refactor v1.0 — cleanup, naming rule, pkg/, docs - #70
Merged
Conversation
… 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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}.gosingular no 's'.contacts → by target:
bin/contact/import.go— read csv/vcf/mab → outbin/brain/import-contact.go— upsert into brainbin/onlyoffice/import-contact.go— reconcile into OO CRMpkg/contact— type + parsersObezl. internal/ → pkg/: cli, cmdbin, contact, duckstats, httpapi. internal/ keeps 2dph-specific.