Quick actions

Launch an agent from a ticket, set up new worktrees, and save project scripts.

Last updated Jun 17, 2026

Tegment saves three kinds of project automation, each running at a different moment:

You set all three up in Tegment's UI, so you never have to write a config file by hand. Post-creation commands and templates are saved to your repo's .tegment/config.json so they're shared with everyone who opens the project; quick actions are kept in your app settings. The JSON shown below is just what Tegment writes, for reference.

Quick actions#

A quick action launches a coding agent when you create a worktree from a ticket, with a prompt already pointed at that ticket. You set a default per source (Jira, GitHub issue, GitHub PR); when you start work from that source, Tegment runs its default, or you can pick another.

Configure them under Settings → Quick Actions. They can be global or scoped to one project, and they're an app setting, not part of the repo config.

Pick an agent

Each quick action targets an agent. Set it to Any to write one prompt that works across every agent (you pick the concrete agent when you start work, or Tegment uses your default agent), or target a specific one (Claude Code, OpenCode, Gemini, Codex, or Cursor) when you want a prompt tuned to it. See Supported agents for what each one can do.

Write the prompt

A quick action carries a prompt: you write what the agent should do, and Tegment builds the actual command for the chosen agent from its agent settings. The prompt can reference the ticket through variables:

Quick action prompttext
Implement {key}: {title}

Available variables include {key}, {title}, {description}, {type}, {priority}, {labels}, {url}, and {worktreePath}, plus {branch} and {baseBranch} for GitHub PRs. For a long prompt, set the quick action's delivery to a temporary file, and Tegment renders the prompt, writes it out, and passes the file to the agent automatically.

You choose how the agent gets the ticket's context. The cleanest way is to pass just the key and let the agent fetch the rest through Tegment's built-in MCP server, for example with a prompt of Implement {key}. Use the tegment MCP server to fetch the details. You can also hand the agent the content directly with {description}, or lean on whatever integration your agent already has.

Agent commands and flags#

A quick action carries the prompt; the command Tegment actually runs comes from each agent's own settings. Open Settings → AI Agents, pick an agent, and you can adjust how it's launched:

Tegment combines these with the quick action's prompt to build the final command, so you configure an agent once and every quick action that targets it (or Any) inherits that setup.

Post-creation commands#

These run, in order, right after a worktree is created, ideal for getting a fresh checkout ready: install dependencies, copy a local env file, generate types.

.tegment/config.jsonjson
{
  "postCreationCommands": [
    { "name": "Install", "command": "npm install", "continueOnError": false, "order": 0 },
    { "name": "Copy env", "command": "cp {main_repo_path}/.env ./", "continueOnError": true, "order": 1 }
  ]
}

Tegment runs them in sequence and shows progress for each one. You can skip them for a given worktree when you create it.

Templates#

Templates are reusable project scripts you run on demand in a worktree: npm install, a dev server, Storybook, a test watcher, a lint pass. Each opens in a terminal pane.

.tegment/config.jsonjson
{
  "templates": [
    { "name": "Dev server", "command": "npm run dev", "runMode": "visible", "category": "Run", "order": 0 },
    { "name": "Typecheck", "command": "npm run typecheck", "runMode": "background", "order": 1 }
  ]
}