`query.rs` is the read side, over a `&Mind<S>` with no store file, no daemon and no index. A `PipelineDocumentView` is four fields: the id, because a `PipelineDocument` does not carry its key and a client must never derive one; the document; the facts of its admission; and its status. The facts come from the commit receipts and from their `writes` alone, so a document a later batch cited as a strong read keeps the receipt that wrote it, and `admitted_at` is that receipt's `committed_at` -- the `now` admission was passed -- never the store's `stored_at`. A pipeline document the image holds and no receipt wrote is an integrity fault and refuses; the store has one writer and the receipt is its proof. Status is derived per call through `docs::Docs`, the same owner the admission rules ask, so a withdrawn resolution reopens its subject for a reader exactly when it reopens it for a rule. `closing_resolution` is `in_force_unless`'s own body asked for the resolution rather than the bool, so there is no second derivation to drift. Four reads: `view` by id, `query` over the filters (root, repo, cut, kinds, in force, faculty, an admission window), `open_items` for one campaign's unanswered questions, standing findings, follow-ups, unreported specs and unjudged reports, and `history` for every resolution a subject ever had or every assignment of a repo to this mind, withdrawn ones included with their reasons. A query is ordered by `(admitted_at, id)`, capped at 200, and carries `matched`, the count before the cap, so a truncation is never a short page that reads like the whole answer. `semantic` is accepted by the type and refused typed until Cut 11 owns the index; no substring filter lives here to become a second answer to "the text of a document". `cargo test -p huginn-mind --lib`: 56 passed, 0 failed, 0 warnings (46 + the ten tests). `cargo check --workspace` clean. No dependency, no target, no kind, no schema, no epoch; `Cargo.toml` and `Cargo.lock` untouched. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
55 lines
2.3 KiB
Markdown
55 lines
2.3 KiB
Markdown
# Huginn Agent Instructions
|
|
|
|
## Purpose
|
|
|
|
Huginn is the memory organ. It owns each agent instance's mind as typed
|
|
CultCache state, admits what may steer that instance next, and keeps the
|
|
provenance of every admitted claim. Generic `.cc` inspection is CultCache
|
|
Studio's job, not Huginn's.
|
|
|
|
## Body And Authority
|
|
|
|
- Project root: `F:\Projects\Huginn`
|
|
- Upstream: `https://github.com/GameCult/Huginn.git`
|
|
- Body: a Rust workspace of `huginn-mind`, `huginn-daemon`, and
|
|
`eureka-state` under `crates/`. Canonical CultCache, CultNet, and CultMesh
|
|
runtimes come from `F:\Projects\CultLib\packages`. `huginn-mind` is live:
|
|
it persists, admits and reads back an instance's mind, queries and derived
|
|
status included, over `cultcache-rs` and `epiphany-pipeline` pinned by git
|
|
rev. `huginn-daemon` and `eureka-state`
|
|
are stubs with no dependencies; nothing here publishes or connects yet.
|
|
- Owned: an instance's memory documents, their admission and the read side
|
|
that derives their status, in `huginn-mind`,
|
|
over a redb CultCache store at `<state_root>/minds/<instance>/mind.redb`.
|
|
Their CultNet publication is owned here and not built; `huginn-daemon` is a
|
|
stub.
|
|
- To depend on: Qdrant, directly, once retrieval exists. Unreachable Qdrant is
|
|
to be a loud refusal, never a fallback store. No crate connects to it yet.
|
|
- Forbidden: a second writer of mind state; mind state in version control;
|
|
generic `.cc` inspection, which is CultCache Studio's; renderer-owned truth.
|
|
|
|
## Repo Discipline
|
|
|
|
- Prefer CultLib's typed Rust APIs over ad hoc decoding. JSON is a schema
|
|
publication or debug boundary, not the internal state shape.
|
|
- The Eureka cut map in `Epiphany/notes/eureka-pipeline-state-cut.md` owns
|
|
what each crate does next. Read the cut before the crate.
|
|
- Verification proves the invariant, not the spelling: single writer, loud
|
|
refusal, provenance preserved, typed handoff between crates.
|
|
- Do not touch `.voidbot/`. It is legacy Persona state whose migration belongs
|
|
to the portable-Persona work.
|
|
|
|
## Voice
|
|
|
|
- Speak as Huginn: dry, exacting, curious, unsentimental.
|
|
- Return with evidence, not vibes.
|
|
|
|
## Commands
|
|
|
|
```powershell
|
|
cargo check --workspace
|
|
cargo test --workspace
|
|
```
|
|
|
|
The global Cult of the Sleeping Colossus defaults in `~/.claude/CLAUDE.md` and
|
|
`F:\Projects\CLAUDE.md` apply here.
|