.agents/commands/comet/work-on-jira-ticket.md
Command: cursor work-on-jira-ticket
Fetch a Jira ticket by link, build full context (title, description, comments, type, status, priority, assignee, labels), and generate an actionable implementation plan.
This workflow will:
main.https://comet-ml.atlassian.net/browse/OPIK-1234worktree to work in an isolated git worktree. Defaults to no worktree when the argument is omitted — the command never prompts about worktrees."This command needs Jira MCP configured. Set MCP config/env, run
make cursor(Cursor) ormake claude(Claude CLI), then retry."
Stop here.
main, propose a new branch following Opik naming convention:
{USERNAME}/OPIK-{TICKET-NUMBER}-{TICKET-SUMMARY}
https://comet-ml.atlassian.net/browse/OPIK-2180andrescrz/OPIK-2180-add-cursor-git-workflow-ruleOPIK-<number>).assignee = currentUser() AND status = "To Do" ORDER BY updated DESC (max 10).OPIK-#### — Summary (Status) and stop if ticket not found.[author @ date] summary with important snippets..agents/rules/* (git workflow, security, code style, routing).agents/skills/opik-backend/*.agents/skills/opik-frontend/*.agents/skills/python-sdk/* and .agents/skills/typescript-sdk/*Worktree usage is strictly opt-in:
worktree was passed as an argument: Use a worktree (continue to 6b).If the EnterWorktree tool is not available (e.g., running in Cursor or another editor) even when worktree was passed, fall back to 6c without prompting.
Slugify {TICKET-SUMMARY} for the worktree name: replace any character not in [A-Za-z0-9._-] with -, collapse consecutive - into one, and trim leading/trailing -. Then call EnterWorktree with name {USERNAME}-OPIK-{TICKET-NUMBER}-{SLUGIFIED-SUMMARY}.
Inside the worktree, fetch the latest remote state and create the properly named branch based on origin/main (using the same slugified summary):
git fetch origin
git checkout -b {USERNAME}/OPIK-{TICKET-NUMBER}-{SLUGIFIED-SUMMARY} origin/main
The worktree intentionally branches off origin/main regardless of the parent checkout's current branch or local main state, and skips the rebase-strategy prompt — isolation is the whole point of the worktree.
Do not inspect or prompt about the parent checkout's working tree (staged, unstaged, or untracked files; current branch). Worktrees are physically isolated, so parent state has no effect on the worktree and is not the agent's concern in this path.
Continue with implementation in the worktree directory.
git stash push -m "WIP: before OPIK-{TICKET-NUMBER}"{TICKET-SUMMARY} the same way as step 6b: replace any character not in [A-Za-z0-9._-] with -, collapse consecutive - into one, and trim leading/trailing -.main, create branch following Opik conventions:
git checkout main
git pull origin main
git checkout -b {USERNAME}/OPIK-{TICKET-NUMBER}-{SLUGIFIED-SUMMARY}
git stash popBased on Jira context and Opik agent guidance, suggest implementing the feature/bugfix:
.agents/rules/* and domain guidance in .agents/skills/*Commit Message Format: Use semantic commits. The first commit on a branch is critical because PR title is derived from it:
First Commit (PR-title source, required):
[OPIK-####] [BE/FE/SDK/DOCS] <type>: <description>
Allowed ticket-key variants (when applicable):
[issue-####] [BE/FE/SDK/DOCS] <type>: <description>
[NA] [BE/FE/SDK/DOCS] <type>: <description>
Follow-up Commits (preferred):
<type>(<scope>): <description>
where <type> is one of: feat, fix, refactor, test, docs, chore.
Last-resort fallback (discouraged):
Revision N: <description>
Component Types:
[BE] - Backend changes (Java, API endpoints, services)[FE] - Frontend changes (React, TypeScript, UI components)[SDK] - SDK changes (Python, TypeScript SDKs)[DOCS] - Documentation updates, README changes, comments, swagger/OpenAPI documentationExamples:
[OPIK-1234] [BE] feat: add create trace endpoint
[OPIK-1234] [FE] feat: add project custom metrics UI dashboard
[OPIK-1234] [DOCS] docs: update API documentation
[issue-1234] [SDK] feat: add new Python SDK method
fix(metrics): handle empty dashboard responses
test(api): cover project metrics endpoint pagination
Revision 2: small follow-up rename after emergency patch
git push or git push --force-with-lease to a branch with an open PR in comet-ml/opik, invoke the _pr-description-sync sub-skill (.agents/commands/comet/_pr-description-sync.md) immediately after the push completes. The sub-skill is a no-op when no PR exists, when the description is already in sync, or when the user has opted out of refreshes for this repo. This keeps the PR description aligned with what was actually shipped instead of what was claimed when the PR was opened.The command is successful when:
make cursor (Cursor) or make claude (Claude CLI)End Command