Prima Get an API key

Primacode

Brain and citations

Giving the desktop tool the same repository the chat writes into, so an answer can cite a section a person can open. Decided, not built.

Planned Decided and written down. Not built, or built and not yet released. Do not integrate against it until the card says live.

What it does

Nothing yet on the desktop side. The decision is that after sign-in the tool fetches the tenant's own repository from the account service, clones it into the application data directory, and points its knowledge layer at that clone. Engravings push with the tenant's own token.

The citation format is already settled by the chat, which writes into the same repository: file § heading, with a line number. It points at a section a person can open, not at a character range.

Chunking by heading is what makes that true. The chunk boundary and the citation target are the same object by construction; a fixed-window splitter makes them two objects that drift apart.

Until this ships, the two tools do not share a knowledge base, and the desktop tool has whatever repository the person pointed it at by hand.

Inputs and outputs

Planned input The tenant's repository, fetched from the account service after sign-in.
Planned storage A clone in the application data directory.
Citation label path § heading, with the line number, as the chat already writes it.
Writes Engravings, pushed with the tenant's own token rather than a shared service token.
Package that will hold it

Configuration

Nothing to configure yet This card describes a decision. There is no setting to change.

Limits

  • Everything here is planned. If you are integrating against it, wait for the card to say live.
  • It depends on the per-tenant repository work, which is itself decided and not built. See the Stone cloning card.
  • The desktop tool and the chat writing into one repository is also what makes the actor identity question urgent: the same person has to resolve to the same actor string from both, or the record shows one human as two.

Example

the citation this produces, once it is pointed at a repository

handbook/holidays.md § Carry-over  (Line 42)

Source of truth

  • philosophers_stone/operations/prima-onboarding-implementation-plan.md § W9 (fetch the tenant's repository after sign-in, clone it, point the knowledge layer at it, push with the tenant token)
  • prima-chat/server/wiki.ts (`chunkMarkdown` and `citationLabel`, the citation format both tools share)
  • philosophers_stone/platform/primacode.md § The claim record (one repository written by both tools, and the open actor question)