Skip to content

ADR-0100: artifactr's commands: every action a command, or listed with its reason

Status: Accepted Date: 2026-11-01 Deciders: Alex Nodeland Implements: lattice RFC-0014's artifactr catalog (phase 1, #916); on lattice ADR-0041; beside ADR-0099

Context

RFC-0014 gives each package a static catalog of commands, which portr, portalr's client and the parity test read without a database. artifactr's covers workspaces, threads, messages, artifacts, revisions, proposals, runs, feedback, deferred answers and files' reads. Its exit asks that every action of artifactr's be some command's gate, or listed with a reason.

artifactr already offers six of these as capabilities through its provider (ADR-0099), and serves sixteen tools from its own MCP server.

Decision

  • artifactr.commands, a layer of its own, imports only pydantic and lattice-core's capabilities and commands. CATALOG reads no database and opens no workspace.
  • 24 commands, artifactr.<name>, version 1.0.0, each gated by the action artifactr's workspace asks for it:
    • The core toolset's reads and writes, RFC-0014's table. The reads are read, reads_private.
    • artifactr.read_thread and artifactr.read_artifact are resources too, by artifactr://{tenant}/{workspace}/....
    • artifactr.read_events is in automations, and artifactr.give_feedback in feedback.
    • Routes go into portalr's app, /portalr/app/t/{tenant}/w/{workspace}/....
    • The six the provider offers keep their names (artifactr.list_artifacts ... artifactr.archive_artifact), so a client sees one tool for each.
    • artifactr.create_artifact's kind is any string here. A bound provider, which knows the application's types, narrows it, as ADR-0099's does.
  • Not exposed, portalr's alone: artifactr.answer_deferred, since a deferred call is answered by a person, never a model; and artifactr.set_focus, what a person has open.
  • Listed, with a reason, in LISTED:
    • artifactr:open, asked before every command in a workspace;
    • the runner's bookkeeping, claim_thread, save_cursor and read_cursors;
    • a run's own record and use_model;
    • create_native_file and run_connected_code, whose commands come in 0.3.x with native files' check-out and connected apps (#924).
  • Published as schemas/artifactr.commands.json, with what is listed, regenerated by artifactr:schema and checked for drift. Its sets are sorted, so the document is the same from one run to the next.
  • Search, RFC-0014's artifactr_search, comes with the read it needs, which artifactr doesn't have yet.

Options considered

Option A: A static catalog now, bound with portr (chosen)

Pros: phase 1's exit, the catalogs and their schemas, needs no runtime, and the parity test reads it as it is. Cons: the catalog and the provider declare the six shared capabilities twice until portr binds the catalog, which then replaces the provider.

Option B: The catalog bound to the workspaces now, beside the MCP server

Cons: post_message waiting for a turn, and the continuity RFC-0014 describes, are portr's. Binding them here would build a third surface beside the MCP server and the provider.

Consequences

  • Easier: the parity test, portalr's CommandName and portr's tools read one list of artifactr's commands.
  • Harder: a new artifactr action needs a command or a line in LISTED, and a renamed command is a new one.
  • To revisit: the provider (ADR-0099) and the MCP server, once portr binds the catalog.

Action items

  1. artifactr.commands, its schema and LISTED, tested against artifactr's actions.
  2. The bound provider, with portr (#917).
  3. Search, and native files' and connected apps' commands (#924).