feat: D24 fact intervals (--as-of) and bin/stack assistant helpers. (#37)
Tests / Test (push) Skipped
Tests / OCR (tesseract fixture) (push) Skipped
Tests / Release (semver) (push) Skipped
Tests / Test (push) Skipped
Tests / OCR (tesseract fixture) (push) Skipped
Tests / Release (semver) (push) Skipped
Store valid_from/valid_to on leafs and filter search by calendar day without overloading D16 source staleness; stack start/start-assistant wires brain + PicoClaw.
This commit is contained in:
+2
-2
@@ -18,9 +18,9 @@ Evidence-first knowledge graph. Facts need proof or they are
|
||||
| tutorial / howto | [runbook](runbook.md) — run anywhere (uv, Go, Docker) |
|
||||
| explanation | [design](design.md) — two roots, deduction, D17/D20/D18 |
|
||||
| explanation | [roadmap](roadmap.md) — gap to v1 (epic #16) |
|
||||
| howto | [picoclaw](picoclaw.md) — MCP agent profile |
|
||||
| howto | [picoclaw](picoclaw.md) — MCP agent (`bin/stack/start-assistant`) |
|
||||
| howto | [reasoner](reasoner.md) — CPU bake-off (D18) |
|
||||
| reference | [PLAN.md](../PLAN.md) — decisions D1–D22 |
|
||||
| reference | [PLAN.md](../PLAN.md) — decisions D1–D24 |
|
||||
|
||||
Decisions the public face must name: **D3** SearXNG compose, **D6** Go service /
|
||||
Python write sidecar, **D14** `bin/{subject}/{method}.go`, **D15** Gitea origin,
|
||||
|
||||
@@ -68,6 +68,15 @@ binary); conversion prints leafs, brain write is `bin/brain/index.go`.
|
||||
`bin/facts/audit stale` flags leafs whose observed revision is behind the
|
||||
corpus HEAD.
|
||||
|
||||
Fact **interval of truth** (D24 / OQ5): leaf props `valid_from` /
|
||||
`valid_to` (YYYY-MM-DD, inclusive; empty end = open; both empty = legacy
|
||||
always-active). `bin/brain/search.go --as-of YYYY-MM-DD` and MCP/HTTP
|
||||
`as_of` keep hits whose interval covers that day. This is not D16
|
||||
`temporal_freshness` (source freshness vs HEAD). [#36](https://git.produktor.io/eSlider/2dph/issues/36).
|
||||
Existing `kb.lbug` without the columns: open/search/add runs an idempotent
|
||||
`ALTER TABLE Leaf ADD …` (no full rebuild required). Fresh `--rebuild` still
|
||||
creates them in `CREATE NODE TABLE`.
|
||||
|
||||
## Sources (auto-pairing)
|
||||
|
||||
- A: runtime state — `docker ps` (container running), ports actually bound
|
||||
|
||||
@@ -6,6 +6,18 @@ CPU reasoner. Default agent model is `qwen3.5:9b` (RAM path, D18). Weights stay
|
||||
in the reasoner volume, not in the 2dph image.
|
||||
No secrets in git: Ollama needs no key; MCP is local HTTP.
|
||||
|
||||
```bash
|
||||
bin/stack/start-assistant
|
||||
bin/stack/start-assistant --no-attach
|
||||
bin/stack/start-assistant -- -m "search the 2dph brain for LadybugDB"
|
||||
bin/stack/status
|
||||
bin/stack/stop
|
||||
```
|
||||
|
||||
`start-assistant` reuses a healthy brain on `:8630`, starts the CPU reasoner,
|
||||
pulls `qwen3.5:9b` if missing, brings up the gateway with `--no-deps picoclaw`,
|
||||
then `picoclaw agent` (MCP `search` → `get` → `audit`). Gateway-only Compose:
|
||||
|
||||
```bash
|
||||
docker compose --profile picoclaw up -d
|
||||
# already serving :8630 / :11435:
|
||||
|
||||
+5
-1
@@ -41,10 +41,12 @@ Epic [#16](https://git.produktor.io/eSlider/2dph/issues/16) closed.
|
||||
[#29](https://git.produktor.io/eSlider/2dph/issues/29) OQ1 contradiction
|
||||
resolution — **in** (`temporal_freshness`, `authority_pairing`).
|
||||
[#34](https://git.produktor.io/eSlider/2dph/issues/34) D23 flaggy CLI — **in**.
|
||||
[#36](https://git.produktor.io/eSlider/2dph/issues/36) OQ5/D24 fact intervals /
|
||||
as-of — **in** (not D16 `temporal_freshness`).
|
||||
|
||||
## Blockers
|
||||
|
||||
None for epic #16 (closed). Remaining v2: OQ4.
|
||||
None for epic #16 (closed). Remaining v2: OQ4 (deferred).
|
||||
|
||||
```
|
||||
question
|
||||
@@ -60,6 +62,8 @@ question
|
||||
## Not v1
|
||||
|
||||
OQ4 YAML-first leafs.
|
||||
OQ5/D24 fact intervals + as-of — **in**
|
||||
([#36](https://git.produktor.io/eSlider/2dph/issues/36)).
|
||||
OCR (OQ2), duckdb-go (OQ3/D22), and D16 adjudication (OQ1) are in.
|
||||
|
||||
## Close epic #16 when
|
||||
|
||||
+15
-1
@@ -53,12 +53,15 @@ bin/brain/add.go --text "arc-1 runs Matrix" --root facts --source "compose.yml x
|
||||
bin/brain/index.go --rebuild --with-facts --with-chats
|
||||
bin/brain/search.go "LadybugDB vector index" # facts → info → web (D17)
|
||||
bin/brain/search.go "upstream flag" --no-web
|
||||
bin/brain/search.go "who works where" --as-of 2025-01-01 # D24 intervals
|
||||
source <(./bin/cli/complete.go bash) # D23 flaggy complete
|
||||
bin/brain/get.go <id> --body
|
||||
bin/brain/stats.go
|
||||
```
|
||||
|
||||
`--hop N` walks File → Commit → Person from each hit. Empty web results are `throttled`, not absence.
|
||||
`--hop N` walks File → Commit → Person from each hit. `--as-of YYYY-MM-DD`
|
||||
keeps leafs whose `valid_from`/`valid_to` cover that day (empty interval =
|
||||
legacy always-on). Empty web results are `throttled`, not absence.
|
||||
Gap to v1: [roadmap](roadmap.md) / [epic #16](https://git.produktor.io/eSlider/2dph/issues/16).
|
||||
|
||||
Ladybug 0.19: never `DROP INDEX` FTS/VECTOR (ghost catalog). Fresh indexes =
|
||||
@@ -66,6 +69,16 @@ delete `var/kb.lbug` then `--rebuild`.
|
||||
|
||||
## HTTP / MCP
|
||||
|
||||
```bash
|
||||
bin/stack/start # brain :8630, wait until MCP search/get/audit
|
||||
bin/stack/status # YAML: brain / reasoner / picoclaw
|
||||
bin/stack/start-assistant # + qwen3.5:9b + PicoClaw agent (ask the brain)
|
||||
bin/stack/start-assistant --no-attach
|
||||
bin/stack/stop # compose stop; volumes kept
|
||||
```
|
||||
|
||||
Same Compose services by hand:
|
||||
|
||||
```bash
|
||||
docker compose up -d brain # :8630 Zig CGO serve
|
||||
docker compose --profile index run --rm index # rebuild
|
||||
@@ -73,6 +86,7 @@ docker compose --profile picoclaw up brain-mcp # MCP 127.0.0.1:8630
|
||||
```
|
||||
|
||||
`GET /openapi.json`, `POST /mcp`. Agent tool order: `search` → `get` → `audit`.
|
||||
See [picoclaw.md](picoclaw.md).
|
||||
|
||||
## Reasoner (optional, D18)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user