Skip to main content
A Trail is a set of rules and procedures the company has written down for a process, such as invoices or payroll. Trail Rule Stats reports the numbers behind each Trail: how many rules it holds, how they split, how old they are, and how often the Trail is queried. Display name “Trail Rule Stats”. Off by default; enable it per agent. The tool returns numbers only. It does not return the text of any rule, and it does not decide whether a Trail is good enough to rely on. The agent reads the numbers and judges.

Authentication and enablement

  • No external integration. It reads Trails in the running agent’s workspace.
  • Off by default. Not seeded into new agents.
  • An agent sees only its own workspace’s Trails.

Inputs

  • trails (optional): Trail names or ids. Leave it out to get every Trail in the workspace. One name returns that Trail. Several names return those Trails.
There is no required field. An empty list means every Trail.

Output

One block per Trail, newest Trail first. Counts are of approved rules unless the label says otherwise.
  • Size: approved, draft, and rejected rules. Draft is “Needs review” in the app, and rejected is “Retired”. Also the counts of approved aspects and entities, and of domains and clusters.
  • Mix: approved rules by class (hard_constraint, conditional, procedural, style) and by source (document, repository, manual). A rule linked to a document counts as document even when a repository is linked too. Otherwise a rule linked to a repository counts as repository, and the rest count as manual. Every key is present, with 0 when the Trail has none. Auto-approved is a separate count and overlaps the source counts.
  • Age: when the Trail was created and last changed, and the newest and oldest approved rule. Last changed is the latest of the Trail’s own update, any rule being added, and the rule history log.
  • Usage: queries in total, in the last 7 days, and in the last 30 days; when it was last queried; and how many approved rules have never been served. These come from the same log as the Activity tab. The total matches the query count on the Trails list. A list or filter of rules appears in Activity as a read and is not counted as a query.
  • Sharing: whether the Trail is public, and since when.
A Trail nobody has queried returns zero queries, no last-query time, and every approved rule counted as never served.

Limits and side effects

  • Read-only. It does not create, edit, approve, or query rules for retrieval, so it writes no Activity row.
  • No rule text is returned.

Expected errors

  • An unknown Trail name or id. The error lists the valid names.
  • Workspace missing from the call.
A workspace with no Trails is not an error. The tool says so and returns an empty list.