Skip to content

Using comindly with agents

An agent connected to comindly (see Getting started, or on a team server's Your access page, which also covers signing in through your organisation's gateway with no token) sees comindly's tools. An agent that runs comindly serve reaches the engine of the profile in use: the local one, or a team server after comindly use. It decides when to call them; you ask in plain words. This page shows what to ask, what happens, and the habits that keep the answers good.

What to ask

You want to know Ask, for example Tool the agent uses
Where something lives "Where do we retry outgoing HTTP calls?" search
A symbol by name "Find the OrderService class." find
Everything around a symbol "Show me what calls and what is called by susar_due." zoom
What a change can break "What breaks in other services if I change record_audit_event's signature?" ripple
What to read before a change "What should I read before changing PaymentClient.charge?" context_pack
How a request flows "Trace what happens after a subject is enrolled." thread, flow
Which services talk, and how "Who calls GET /api/v1/subjects/{id}? Which queues receive trial-events?" contracts
How the repositories fit together "Which repositories are indexed and who depends on whom?" repos
How code is written here "Which conventions should I follow in the payments repo?" guide
Why code is the way it is "Why is this lock here? Did anyone try something else?" why
Whether a planned change is safe "I am about to change auth.py and errors.py. Anything I should know?" preflight
Ideas for what to ask "What can I ask about the payments module?" suggest

The agent can also write to the team's ledger:

You want to Say Tool
Record a decision, dead end or rule "Remember that a TTL of None means cache entries never expire." remember
Retire or confirm a record "That constraint about pinning the client no longer applies: archive it." review
Keep working notes on a task "Open a discussion for LIN-123 and post the plan and each choice you make." discussion

Names in answers are the ones you see in the UI: methods as Class.method, contracts as http:GET /api/v1/subjects/{} or sqs:visit-scheduling, locations as path:line.

How a good session looks

  1. Before editing, the agent runs preflight (or zoom and why) for the files or symbols it plans to touch. It learns the callers in other repositories, the contracts the code serves, and the constraints and failed attempts recorded about it.
  2. While editing, the hooks put the records about each file in front of the agent just before it writes to it.
  3. After a surprise (a reverted approach, an invariant nobody wrote down, a trap) the agent records it with remember, so the next person or agent does not repeat it.

To nudge an agent that does not reach for comindly, name it: "use comindly to check what depends on this first".

Install as a plugin

One command sets up comindly in every agent on this machine that takes plugins: the MCP server, the skill with the full playbook and, where the agent supports them, the hooks.

comindly init-agents --install          # shows what it would do
comindly init-agents --install --yes    # does it
Agent What it gets How
Claude Code MCP server, skill, hooks a local plugin marketplace, then claude plugin install comindly@comindly
Gemini CLI MCP server, skill, hooks gemini extensions link
Cursor MCP server, skill, an always-on rule copied to ~/.cursor/plugins/local/comindly; reload the window
Codex MCP server, skill a local plugin marketplace, then codex plugin add comindly@comindly

The plugins never name a server. They start comindly serve and comindly hook, which answer from the profile in use: the local engine, or a team server after comindly use. Switch with comindly use, and every agent follows without reinstalling; the session-start hook says which one answers. When the team server takes agents through a gateway, --install asks the server for the gateway's address and points the plugins there instead, so each person signs in with the organisation's account. On a machine without a browser (over SSH, or Linux without a display) it keeps comindly serve, which uses the command line's own sign-in: approve it once with comindly use <url> <name>, which prints a code to enter at the server's /device page on any device. Run --install --yes again after upgrading comindly, or after switching between a local engine and a team server with a gateway. The plugins need the comindly command on this machine; for an agent with no local install, connect it through the team server's Your access page instead. They start it as comindly, so its folder must be on PATH; --install says so when it is not.

A comindly server or hooks added by hand earlier (claude mcp add, init-hooks, an mcp.json entry) would run next to the plugin's, so --install lists them and, with --yes, takes them out: through claude mcp remove for Claude Code, and for the others by editing the settings file, keeping the previous one as <file>.json.bak.

To install by hand, or to check a plugin in, comindly init-agents --plugin <agent> --out <dir> writes one agent's plugin to a folder.

Telling agents when to use it

comindly sends agents short guidance on when to reach for each tool: as the MCP server's instructions when they connect, and at the start of each session through the hooks. A repository can carry the full playbook, where agents read it before they look at their tools and your team can adjust it: how comindly sees the code, a change step by step, how to read notes and trust, and how to write and review records:

comindly init-agents >> AGENTS.md          # or CLAUDE.md
comindly init-agents --skill               # a Claude Code skill for .claude/skills/comindly/SKILL.md

The app's Get started page shows both, ready to copy.

Get started: the guidance for agents, as an AGENTS.md section or a Claude Code skill Get started: the guidance for agents, as an AGENTS.md section or a Claude Code skill

Hooks

comindly init-hooks claude prints two hooks for Claude Code:

  • Session start: when the repository you are working in is indexed, the guidance on when to use comindly's tools, then up to eight trusted records about the repository.
  • Before an edit (Edit, MultiEdit, Write): up to four trusted records about that file.

A record is shown once per session. Hooks ask the engine of the profile in use, so they work signed in to a team server too. They never start the local engine, and when no answer comes within 3 seconds they add nothing. For other agents, comindly init-hooks cursor, gemini, codex or generic prints the two commands to run from the agent's own hooks; they print the same context as plain markdown.

The ledger, from an agent's side

Records are short, typed and anchored to symbols: decision, attempt (a failed or reverted approach, with evidence), constraint, gotcha, intent and question.

  • Every record shows who wrote it: the person, or the agent and the person it works for ("claude-code for Ada Lovelace"), and when.
  • An agent's record without evidence starts as unverified and appears in the Ledger page's review queue; with evidence (a commit, a test, an MR) it is trusted enough for hooks.
  • Agents can confirm, archive, invalidate, supersede or dispute records. When an agent tries to retire a record a person wrote or confirmed, the record stays and is flagged for a person.
  • Deleting a record is for people only, from the app or comindly erase.

Good records are neutral facts a future engineer would want before editing, not summaries of a session. comindly refuses records that look like secrets or that try to give an agent instructions. See The ledger for trust levels and review.

Conventions

guide returns the conventions comindly measured in the code (naming, error base classes, where HTTP clients live, which internal library wraps requests, how tests mock) and the ones the team added or edited. The team's own are marked "set by the team". Edit them on the Conventions page or with comindly conventions add|edit|rm|restore.

When something is off

Symptom Check
The agent lists no comindly tools Restart the agent after adding the server; run the comindly serve command yourself to see errors.
"no index here yet" The profile in use and the engine's index location: comindly use, comindly config, comindly doctor.
An index in a bucket fails to load The engine's environment needs storage credentials (Storage).
search finds nothing The index was built with the team setting embed=false; set it to true and index again.
Hooks add nothing The local engine is not running (hooks never start it): run any command, or comindly engine start.
Answers miss recent code The index is older than the code: re-run comindly link (CI usually does).
New conventions or records do not show A running MCP server loads them at start; restart the agent.