Skip to Content
Joring Docs
Developers

Writing a good trail

The rules that an agent or a person follows, so that a trail reads well and surfaces at the right moment.

GET /v1/authoring-guide and the get_authoring_guide MCP tool return this guide as data, with the current limits and the list of trails that already exist in the team. This page explains the reasons for the rules.

The one rule

A trail is the company's standard recipe for one job task with an AI tool. The employee in the target role reads every field while they do the task. So write in the second person, as instructions. Never write about the trail, the learner, the person who wrote the trail, or the employee's deliverable.

Good: "Paste the objection, then ask for three counterpoints grounded in our pricing page." Not: "This trail helps account executives handle objections."

The document

FieldWhat goes thereLimits
titleThe task, as the employee would name it3 to 160 characters
target_roleThe job role, for example "Account Executive"Up to 120
descriptionThe task in one or two sentences20 to 2,000
toolsThe AI tools this recipe is for, from the supported list (chatgpt, claude, ...)At least one
trigger.whenThe moment in the work when the trail appliesUp to 600
trigger.keywordsPhrases that the employee would really type1 to 25, each 2 to 60 characters; fewer than 3 gives a warning
trigger.examplesRealistic prompts, each with expect: match or no_matchUp to 8, each up to 500 characters
setup_guideMarkdown: what to open, paste or prepare before the first promptUp to 40,000
promptsOrdered steps, each with a label and a body. Use {{snake_case}} placeholders for anything the employee supplies1 to 12; label up to 120, body up to 8,000

The full JSON Schema comes with the guide response.

How surfacing works

When an employee starts to type in an AI tool, Joring compares the draft with every live trail in their team and in the Joring catalog. It uses the trigger, the keywords and the examples. Then it picks the single best trail, or none. Two trails that describe the same task compete with each other, so extend the existing trail instead of writing a second one.

That is what trigger.examples are for. Write three to six prompts that an employee would really type. Include at least one prompt that is close to the task but should not surface this trail. run-examples runs each prompt against the live catalog. All of them must pass before you can publish the trail.

Before publishing

Joring refuses to publish a trail until:

  • the title, role, description, at least one tool, the trigger, a setup guide and at least one prompt are present, each within its limits;
  • the setup guide has no unfinished image uploads;
  • the last run of the examples passed, if the trail has examples;
  • a restricted trail has at least one person or team with access.

GET /v1/trails/{id} and get_trail return publish_issues with exactly this list, so an agent can work through it in a loop.

A workflow that produces good trails

  1. Read the guide and list the existing trails.
  2. Draft the full document and create the trail.
  3. Read publish_issues. Fix the errors and consider the warnings.
  4. Add examples and run them. If a "should match" prompt loses to another trail, make trigger.when and the keywords more specific, or narrow the task.
  5. Decide who sees the trail. New trails start as restricted: only the people with access see them. To show the trail to everyone in the team, set visibility to all_teams.
  6. Publish, then tell the person what went live.

On this page