← Documentation
Conventions

Agent rules files

Every modern AI coding agent reads a rules file at the start of each session — CLAUDE.md for Claude Code, .cursorrules for Cursor, GEMINI.md for Gemini CLI, and so on. Sprintra generates these files for your repo so every agent automatically follows your ticket-key conventions, workflow rules, and PR formatting.

Why rules files matter for GitHub integration

Sprintra's GitHub integration auto-links pull requests to stories by reading the PR's title, body, and branch name for ticket references like PROJ-42. If the agent opening the PR doesn't include the ticket, the PR is captured but not linked — the story doesn't move.

The rules file is how you tell the agent “always include the ticket key in PR bodies you create.” Once the file is in your repo, the agent reads it every session and behaves accordingly. No per-PR reminder needed.

Files Sprintra generates

FileUsed byAuto-generated today
CLAUDE.mdClaude CodeYes
AGENTS.mdAntigravityYes
GEMINI.mdGemini CLIRoadmap
.cursorrulesCursorRoadmap
.codex/instructions.mdOpenAI Codex CLIRoadmap
.github/pull_request_template.mdAll humans + agentsRoadmap

How to generate the files

The recommended workflow:

# From your repo root
npx @sprintra/cli@latest plugin link --project=<your-project-id>

This writes the .sprintra/project.json marker (so Sprintra knows which workspace this repo belongs to) and generates the rules files supported today. The files are checked into git so your whole team gets them.

Inside Claude Code specifically, you can also ask the agent: “Generate a fresh CLAUDE.md for this project” — it'll call the Sprintra MCP tool that builds the file from your current project state.

What goes in a rules file

Sprintra-generated files include:

  • The project's ticket key (e.g. PROJ) so the agent knows what prefix to use.
  • Workflow rules: always create a story before coding, reference it in commits and PR bodies, end sessions with a digest.
  • A list of the project's active features and recent decisions, so the agent has context without re-fetching.
  • Branch naming conventions, the PR-body template, and which automation rules are in effect for this project.

Pull request template (recommended addition)

For mixed human + agent workflows, a .github/pull_request_template.md file gives both groups a clear nudge. A minimal one:

## Summary

<!-- What does this PR do? -->

## Linked story

Closes: PROJ-____

## Test plan

- [ ] ...

GitHub shows the template every time someone opens a PR. The Closes: PROJ-____ line is enough for Sprintra's linker to recognize the ticket once the user fills it in.

Honest limits

Rules files are guidance, not enforcement. An agent can technically open a PR without reading the file; a human can ignore the PR template. Sprintra captures the ticketless PR but doesn't move any story status. For teams that need a hard gate, a future Sprintra status check (sprintra/has-ticket) will block merges of PRs that don't reference a story — on the roadmap.