Edit this page on GitHub ↗

Getting started

Requirements

Install and validate the schemas

git clone https://github.com/HugoXK/latent.git
cd latent
pnpm install

python3 - <<'PY'
import glob, json
for path in glob.glob("data/schemas/*.schema.json"):
    with open(path, encoding="utf-8") as fh:
        json.load(fh)
    print("ok", path)
PY

Run the offline vertical slice

The default reconstructor is a deterministic template, so the whole pipeline is testable without a provider.

export LATENT_DB_PATH=/tmp/latent-demo.sqlite

pnpm latent capture "用土壤菌群做重金属现场检测,但读出还不清楚"
pnpm latent develop <fragment-id>
pnpm latent ask <idea-id>
pnpm latent answer <idea-id> lab.bsl 1
pnpm latent constraints <idea-id>
pnpm latent confirm <idea-id> --all
pnpm latent decide <idea-id> --all pass --reason "design partner pilot"
pnpm latent brief <idea-id>

brief refuses to compile if a constraint, gate or assumption still blocks. That refusal is the feature: an honest “not yet” beats a fluent guess.

Inspect the memory graph

pnpm latent memory search "biosensor"
pnpm latent memory connect <fragment-id> <idea-id>
pnpm latent memory export

memory export writes an open JSON graph. A delete is blocked while references still point at the object; the graph is a record, not a cache.

Open the contact sheet

pnpm dev
# http://127.0.0.1:4310/

/ui is the canonical path and / is an alias. The console is a no-build page served by the API process. Every fragment is a frame on the strip; selecting one opens a single-idea workbench rather than a grid of cards. It stores nothing server-side and holds no token.

Use a model

ModelReconstructor implements the same port and speaks the OpenAI-compatible chat-completions API.

export LATENT_RECONSTRUCTOR=model
export LATENT_MODEL_BASE_URL=https://api.openai.com/v1
export LATENT_MODEL_API_KEY=...
export LATENT_MODEL_NAME=...

# Private fragments are refused unless you opt in.
export LATENT_MODEL_SEND_PRIVATE=true
pnpm latent develop <fragment-id>

The adapter enforces a strict contract: exactly three variants, non-empty assumptions and claims, only inferred/unknown claims, and confidence_basis: "C". A verified claim is rejected and repaired once; a second failure stops the job. There is no silent fallback to the template. A model is not a source.

Read the spec in this order

  1. docs/vision.md — the problem and the thesis.
  2. docs/architecture.md — components, state machine, ports.
  3. docs/prior-art.md — what exists and why this is different.
  4. docs/vertical-igem.md — the first end-to-end vertical.
  5. docs/roadmap.md — what ships next and how it is judged.

Next