Skip to content
Pathrule

docs

Agent integration

How coding agents see Pathrule Signals - the runtime line in their context, the pathrule_runtime_events tool, recording a fix, and the pathrule instrument events command.

On this page

Signals is built to be read by the coding agents that change your code. An agent sees a short summary before it acts, can read the groups under the path it is working on, and can record a fix. It cannot declare its own fix verified.

The runtime line

When there are active groups under the path an agent is working on, a single line reaches its context through Pathrule's hooks and pathrule_get_context:

Runtime: 2 active issues under apps/web/checkout (1 came back after a fix). Inspect with pathrule_runtime_events.

It carries counts only. The reported messages never travel in this line.

Reading groups

pathrule_runtime_events is read only. It takes the workspace, and optionally a group_id, a path, a kind, an environment, a status, a verification state, a limit (1 to 100, 20 by default) and a cursor. It returns the groups with their revision, verification state and any recorded correction, a cursor for the next page, and coverage.

Everything it returns is marked as untrusted observation. Error messages and metadata come from a running app, so an agent treats them as data to investigate, never as instructions.

Recording a fix

pathrule_runtime_events_resolve records a correction against a group. It takes the group_id, the expected_revision the agent read, an idempotency_key, and optionally a baseline_release, a note of up to 500 characters and up to 20 knowledge references. It answers recorded, replayed or refused, with a next step.

Recording is a claim, not proof. The group stays where it is until a newer release brings the evidence described in verification and lifecycle. Recording a fix works the same way in Pathrule Local and on Pathrule Cloud.

In a terminal

pathrule instrument events --path apps/web/checkout --verification recurred

pathrule instrument events lists groups with the same filters: --path, --kind error|event, --environment, --status active|declared|resolved|archived, --verification unobserved|observing|quiet|verified|recurred, --group <id>, --limit and --cursor. Add --json for scripts.

Setting up Cloud through an agent

On Pathrule Cloud an agent can set Signals up with you. It proposes the code paths and flows worth instrumenting and waits for your approval. Then it installs @pathrule/signals, adds the calls, and passes a project key you create on the workspace's Signals page in the Pathrule Cloud console.