TruthTrail README.md docs.md privacy.md How it works Pricing npm

Documentation

Get started with TruthTrail

TruthTrail records the product decisions your coding agent makes and puts them on the ticket, where the person who wrote the ticket confirms or rejects them. Pick the guide for your role.

Developers

1. Set up your repo

Run this once in each repo, then commit the result:

npx truthtrail init

init prints exactly what it changed. It adds:

  • .decisions/, where decisions live while you are not logged in
  • a short rules block in AGENTS.md, read by Claude Code, Cursor and Copilot. Your own text is never touched
  • a pointer in CLAUDE.md, if you have one
  • .truthtrail.json (config), and .truthtrail/ in .gitignore
  • a local MCP server entry for each AI tool it finds. Skip it with --no-mcp

Running it again is safe.

2. Claude Code plugin (optional)

The plugin loads the ticket's decisions when a session starts, and reminds Claude to record questions you answered before it stops.

/plugin marketplace add truthtrail/claude-plugin
/plugin install truthtrail@truthtrail

3. Keep coding

Name your branch after the ticket, like KAN-12/date-field or ABC-1234/login. When the ticket doesn't settle something, your agent asks you or makes an assumption, and records it with the record_decision tool. You can also record one yourself:

npx truthtrail decide --question "Empty date field?" --chosen "Use today's date"

Branch without a ticket key? The agent asks once and remembers it for that branch. You can set it yourself with npx truthtrail ticket ABC-1234.

4. Join your team

Once your team lead has connected the tracker, log in once on each laptop. After that, decisions go to the ticket instead of the repo.

npx truthtrail login            # Jira: browser opens, Allow, paste the code
npx truthtrail login --github   # GitHub Issues: enter the code at github.com/login/device
npx truthtrail status           # who you are, connection, queued decisions

A laptop has one TruthTrail login at a time. Logging in with GitHub replaces an Atlassian login, and the other way round.

Offline? Decisions are queued in .truthtrail/outbox.jsonl and sent with your next command, or now with npx truthtrail sync. Already have decisions in .decisions/? Upload them once with npx truthtrail import.

Set up a Jira team

A Jira admin or team lead does this once. You need Jira Cloud.

  1. Connect Jira. Open the connect page, enter your space (project) keys, like KAN, PAY, then Connect Jira and accept on Atlassian. You become an admin for this site in TruthTrail.
  2. Tell developers to run npx truthtrail login in their repo.
  3. Add PR checks (optional). If your code is on GitHub, click Add PR checks on GitHub after connecting, or later from team settings. An owner of the GitHub org installs the TruthTrail App on the code repos. See PR check.

To add more spaces later, connect again with the new keys. Only people who can open a Jira issue can see its decisions.

Set up a GitHub Issues team

An owner of the GitHub organization does this once. Your issues can live in the code repo or in a separate tracker repo.

  1. Install the App. Open the GitHub connect page and install TruthTrail on the tracker repo and on the code repos that should get the PR check.
  2. Pick the tracker repo on the settings page that opens. A branch like ABC-1234/login then means issue #1234 there, whatever the prefix. If some prefixes live in other repos, add one rule per line, like WEB = acme/web-issues.
  3. Choose who confirms. The default is whoever opened the issue. You can also name people or teams, like @acme/product, or allow both.
  4. Tell developers to run npx truthtrail login --github.

Come back to settings any time at team settings.

The PR check

Every pull request whose branch, title or description names a ticket gets a check called TruthTrail. It updates by itself when the reporter answers.

CheckWhen
FailureA decision on the ticket was rejected.
NeutralDecisions are still waiting. Turn on Fail the PR check while decisions are still waiting in team settings to make this a failure.
SuccessEvery decision is confirmed.

To block merging until it passes: in the GitHub repo, open Settings → Branches, edit the rule for your main branch, turn on Require status checks to pass, and add TruthTrail.

For ticket reporters

You wrote the ticket, so you decide whether the agent's choices are right. You don't need to install anything.

  • TruthTrail keeps one summary comment on your ticket. It's updated in place as decisions arrive, so it may sit higher up the thread, marked “edited”.
  • You're @mentioned when a decision is waiting for you.
  • Reply in a new comment on the same ticket:
ReplyWhat it does
/confirm D-2The decision is right.
/reject D-2 Show an error insteadThe decision is wrong. The agent reads your reason and reworks it.
/confirmer @rahulGitHub Issues only: let someone else confirm this issue.

In the summary, self-confirmed means the person who made the decision also confirmed it. Replaced means a newer decision took its place.

See every decision for your tickets on the decision history page.

For QA

  • The ticket's summary comment lists confirmed and rejected decisions. Test against those, not only the acceptance criteria.
  • A confirmed decision explains behaviour that would otherwise look like a defect.
  • From a checkout of the code: npx truthtrail why src/checkout/total.ts:42 shows the decisions behind a line, and npx truthtrail list --ticket KAN-12 lists a ticket's decisions.

Commands

CommandWhat it does
initSet up the repo (rules, config, MCP entries)
decideRecord a decision: --question, --chosen, optional --options, --reason, --ticket, --type assumption
list --ticket KEYList a ticket's decisions
why file:lineShow the decisions behind a line of code
check --base mainCheck the branch's decisions locally
ticket [KEY]Show or set the ticket for this branch
move D-3 KEYMove a decision to another ticket
withdraw D-3Withdraw a decision you recorded
login, login --githubLog in with Atlassian or GitHub
statusWho you are, connections, queued decisions
syncSend queued decisions now
outbox, outbox drop IDSee queued decisions, or drop one
importUpload existing .decisions/ files once
connectOpen the page where a team lead connects Jira
logoutForget this laptop's session

Run any of them with npx truthtrail <command>. Add --help for options.

MCP tools

Your agent uses these through the local MCP server that init sets up. Where MCP is blocked, it falls back to the commands above.

ToolWhat it does
record_decisionRecord a decision or assumption for the current ticket
list_decisionsRead the ticket's decisions before implementing
whyDecisions behind a file or line
check_branchCheck the branch's decisions
list_pending, resolve_pendingQuestions you answered that aren't recorded yet
set_ticketRemember the ticket for this branch
move_decision, withdraw_decisionFix a decision on the wrong ticket, or withdraw one

Config

.truthtrail.json in the repo root:

KeyMeaning
ticketPatternHow ticket keys look. Default [A-Z][A-Z0-9]+-\d+, matched case-insensitively
decisionsDirWhere local records live. Default .decisions
storagerepo, server or both. Unset: server when logged in, else repo
jiraSiteYour Jira site, so logged-out teammates get a reminder
serverTruthTrail server URL. The TRUTHTRAIL_SERVER environment variable wins

Troubleshooting

“Not logged in. Run npx truthtrail login.”
Run npx truthtrail login, or npx truthtrail login --github for GitHub Issues teams.
“Space (project) KAN isn't connected to TruthTrail.”
Your team lead adds the space on the connect page.
“ABC-12 isn't connected to TruthTrail. Ask your team lead to pick the tracker repo…”
On GitHub Issues, the lead hasn't picked a tracker repo for that prefix yet. They do it in team settings.
“…could be in more than one connected GitHub org.”
Run the command inside a clone of the right org's repo, so TruthTrail can tell from the git remote.
The decision isn't on the ticket
Run npx truthtrail status. If decisions are waiting in the outbox, run npx truthtrail sync. A held one shows why; fix it and sync again, or drop it with npx truthtrail outbox drop <id>. Also look for the summary comment higher up the thread.
Recorded on the wrong ticket
npx truthtrail move D-3 KAN-14. The old ticket shows it as moved.
status shows a broken connection
The team lead reconnects: Jira at /connect, GitHub at /connect/github.
No TruthTrail check on a pull request
The branch, title or description must contain the ticket key, and the TruthTrail App must be installed on that repo. For Jira teams, the GitHub org must be linked in team settings.

Still stuck? Email modhdhairya@gmail.com.