一键导入
odin-jira
Analyzes a TEN JIRA issue, implements a fix across EUX repositories, creates PRs, and reports back to JIRA with results and reviewer tags.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Analyzes a TEN JIRA issue, implements a fix across EUX repositories, creates PRs, and reports back to JIRA with results and reviewer tags.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Generates a file showing how the content of a SED is mapped between Neessi-dto, ACL-SED and RINA-SED. Use this when asked to generate a SED flow mapping, sedFlyt, or field mapping for any SED type (e.g. H120, F001, H065).
QA review of a TEN JIRA issue. Scores issue quality 1–10 and posts constructive feedback as a comment if the score is 7 or lower.
Analyzes a TEN JIRA issue and posts an implementation plan as a comment. Does not implement anything — planning only.
Interact with JIRA using acli. Create, search, view, edit, comment, and transition issues in the TEN project.
Pushes current branch to GitHub and triggers build/deploy workflows for EUX services. Safety: refuses to deploy from main. Frontend defaults to parallel.
Syncs eux-full-stack-dev.agent.md with current frontend and backend versions, patterns, and dependencies. Run when any part of the EUX stack changes.
| name | odin-jira |
| description | Analyzes a TEN JIRA issue, implements a fix across EUX repositories, creates PRs, and reports back to JIRA with results and reviewer tags. |
Takes a TEN JIRA issue key (e.g. TEN-742), analyzes the problem, implements a fix across the relevant EUX repositories, creates pull requests, and reports back to JIRA.
TEN. Never create or modify issues in other projects.main or master: Always create a feature branch. Never push directly to main or master.--yes on acli edit, transition, and assign commands to avoid interactive prompts.fix/<ISSUE-KEY>-<short-description>.When commenting on JIRA after creating PRs, use proper ADF mention nodes so reviewers receive JIRA notifications. Plain text names do NOT trigger notifications.
Use these Atlassian account IDs to build ADF mention nodes:
| Repository | Reviewer | Atlassian Account ID |
|---|---|---|
eux-web-app | Dey Rittik | 62f25d6ef15eecaf500fbbe8 |
eux-rina-api | Arild Spikkeland | 557058:db5de1a2-5606-4749-8a0e-03d7f89682a3 |
eux-fagmodul-journalfoering | Arild Spikkeland | 557058:db5de1a2-5606-4749-8a0e-03d7f89682a3 |
eux-nav-rinasak | Vegard Hillestad | 712020:9222ebea-ab05-497c-81f6-38a689b6d0f4 |
eux-neessi | Vegard Hillestad | 712020:9222ebea-ab05-497c-81f6-38a689b6d0f4 |
eux-person-oppdatering | Knut Bjørnar Wålberg | 62b035ab673f2103622cb2a9 |
eux-barnetrygd | Knut Bjørnar Wålberg | 62b035ab673f2103622cb2a9 |
eux-legacy-rina-events | Torsten Kirschner | 557058:941fd5b5-9b73-45a6-b54a-cc95bd6bf555 |
eux-all-rina-events | Torsten Kirschner | 557058:941fd5b5-9b73-45a6-b54a-cc95bd6bf555 |
Multiple repos may be changed — mention all relevant people.
Always use ADF JSON for JIRA comments. Always use --body-file to pass ADF — never pass ADF inline via --body (shell escaping will mangle the JSON and acli will post it as raw text).
/tmp/odin-comment.json).--body-file.cat > /tmp/odin-comment.json << 'ENDOFJSON'
{"version":1,"type":"doc","content":[{"type":"paragraph","content":[{"type":"text","text":"Comment text"}]}]}
ENDOFJSON
acli jira workitem comment create --key TEN-123 --body-file /tmp/odin-comment.json
rm -f /tmp/odin-comment.json
{"version":1,"type":"doc","content":[...nodes]}
Paragraph:
{"type":"paragraph","content":[{"type":"text","text":"Some text"}]}
Heading (level 1-3):
{"type":"heading","attrs":{"level":3},"content":[{"type":"text","text":"Title"}]}
Bullet list:
{"type":"bulletList","content":[
{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"Item"}]}]}
]}
Bold text:
{"type":"text","text":"bold text","marks":[{"type":"strong"}]}
Link:
{"type":"text","text":"click here","marks":[{"type":"link","attrs":{"href":"https://example.com"}}]}
Mention (triggers JIRA notification):
{"type":"mention","attrs":{"id":"<accountId>","text":"@Display Name","accessLevel":""}}
Example — mention Vegard Hillestad:
{"type":"mention","attrs":{"id":"712020:9222ebea-ab05-497c-81f6-38a689b6d0f4","text":"@Vegard Hillestad","accessLevel":""}}
### ADF guidelines
- **NEVER pass ADF inline via `--body`** — always write to a temp file and use `--body-file`.
- Keep ADF as single-line JSON (no pretty-printing) inside the file.
- Use heredoc with single-quoted delimiter (`<< 'ENDOFJSON'`) to prevent shell variable expansion.
## Command reference (acli)
### View an issue
```bash
acli jira workitem view TEN-123
acli jira workitem view TEN-123 --json
acli jira workitem view TEN-123 --fields "summary,status,comment,assignee,reporter,description"
cat > /tmp/odin-comment.json << 'ENDOFJSON'
{"version":1,"type":"doc","content":[{"type":"paragraph","content":[{"type":"text","text":"Comment text"}]}]}
ENDOFJSON
acli jira workitem comment create --key TEN-123 --body-file /tmp/odin-comment.json
rm -f /tmp/odin-comment.json
acli jira workitem search --jql "project = TEN AND key = TEN-123" --limit 1
When invoked with a JIRA issue key (e.g. /odin-jira TEN-742):
First, determine the current user's identity:
acli jira auth status
Assign the issue to the person who initiated the skill, and transition it to "Under arbeid":
acli jira workitem assign --key TEN-742 --assignee "@me" --yes
acli jira workitem transition --key TEN-742 --status "Under arbeid" --yes
Then add a comment announcing that work is in progress:
cat > /tmp/odin-comment.json << 'ENDOFJSON'
{"version":1,"type":"doc","content":[{"type":"paragraph","content":[{"type":"text","text":"🤖 Odin is analyzing this issue and working on a fix. Stand by for updates."}]}]}
ENDOFJSON
acli jira workitem comment create --key TEN-742 --body-file /tmp/odin-comment.json
rm -f /tmp/odin-comment.json
Fetch the full issue details to understand what needs to be done:
acli jira workitem view TEN-742 --json
Read the summary, description, and comments carefully. Understand:
Check for an existing plan: Look through the comments for one with the heading "Odin's plan" (posted by odin-plan). If a plan comment exists, use it as the primary guide for which repositories to change, which files to modify, and what the changes should be. Still verify the plan against the code, but follow its structure and intent.
Before attempting implementation, evaluate whether the issue description or the plan contains enough information to act on. A description is sufficient if you can answer all of these:
If the description is sufficient → proceed to Step 4.
If the description is insufficient → comment on the JIRA issue explaining what is missing, then stop. Do not attempt implementation. Example:
acli jira workitem comment create --key TEN-742 \
--body '{"version":1,"type":"doc","content":[
{"type":"heading","attrs":{"level":3},"content":[{"type":"text","text":"🤖 Odin — Trenger mer informasjon"}]},
{"type":"paragraph","content":[{"type":"text","text":"Kunne ikke starte automatisk fiks fordi beskrivelsen mangler nødvendige detaljer."}]},
{"type":"heading","attrs":{"level":3},"content":[{"type":"text","text":"Hva mangler"}]},
{"type":"bulletList","content":[
{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"<konkret detalj som mangler, f.eks. hvilken SED-type, feilmelding, steg for å reprodusere>"}]}]}
]},
{"type":"paragraph","content":[{"type":"text","text":"Oppdater beskrivelsen med de manglende detaljene, og kjør Odin på nytt."}]}
]}'
Tailor the "What is missing" bullets to the specific gaps. Be concrete — say exactly what information would unblock implementation.
Use the EUX Architecture document (navikt/eux-architecture README.md) to understand the platform and identify which repositories are involved.
To read the architecture overview:
cat eux-architecture/README.md
Or if not locally available:
gh api repos/navikt/eux-architecture/contents/README.md --jq '.content' | base64 -d
Based on the issue analysis:
For each repository that needs changes, determine the default branch (main or master), ensure it is up to date with GitHub, then create the feature branch from it:
cd <repo-directory>
DEFAULT_BRANCH=$(git remote show origin | grep 'HEAD branch' | awk '{print $NF}')
git checkout "$DEFAULT_BRANCH"
git pull origin "$DEFAULT_BRANCH"
git checkout -b fix/TEN-742-short-description
Use the same branch name pattern across all repos: fix/<ISSUE-KEY>-<short-description>.
CRITICAL:
main/master).git pull before branching to ensure you branch from the latest remote state.After creating the feature branch, if the repository contains a package.json with a version field, bump it:
Determine bump type based on the scope of the change:
1.2.3 → 1.3.0) — for feature-level changes, new behavior, or significant fixes.1.2.3 → 1.2.4) — for small bugfixes, typo corrections, or trivial changes.Append a prerelease suffix derived from the branch name, converted to UPPERCASE:
<bumped-version>-FIX-<ISSUE-KEY>-<SHORT-DESCRIPTION>fix/TEN-742-missing-sed-type → version 1.3.0-FIX-TEN-742-MISSING-SED-TYPEApply the change using npm version (or edit package.json directly if npm is not available):
# Read current version
CURRENT=$(node -p "require('./package.json').version")
# Decide bump type (minor or patch) based on your analysis
# For a significant fix:
BUMPED=$(node -p "const [ma,mi,pa] = '${CURRENT}'.replace(/-.*/, '').split('.').map(Number); \`\${ma}.\${mi+1}.0\`")
# For a small bugfix:
# BUMPED=$(node -p "const [ma,mi,pa] = '${CURRENT}'.replace(/-.*/, '').split('.').map(Number); \`\${ma}.\${mi}.\${pa+1}\`")
# Build the suffix from the branch name (strip 'fix/' prefix, uppercase everything)
SUFFIX=$(git branch --show-current | sed 's|^fix/||' | tr '[:lower:]' '[:upper:]' | tr '/' '-')
# Set the new version
NEW_VERSION="${BUMPED}-${SUFFIX}"
npm version "$NEW_VERSION" --no-git-tag-version --allow-same-version
git add package.json package-lock.json 2>/dev/null
git commit -m "chore: bump version to ${NEW_VERSION}
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>"
Note: The version bump commit must come before any functional code changes so the version is set from the start of the branch.
Make the necessary code changes in each repository. Follow the coding patterns and conventions already established in each repo. Use the appropriate developer agent if available:
eux-java-dev agent patternseux-kotlin-dev agent patternseux-full-stack-dev agent patternsFor each repository with changes:
Review the diff to ensure correctness:
git --no-pager diff
Run the build if a build system is available:
# Maven-based projects
mvn compile -q
# or for Node.js projects
npm run build
Run tests if available:
mvn test -q
# or
npm test
Verify no unintended files were changed.
For each repository:
git add -A
git commit -m "fix: <concise description of the fix>
Resolves TEN-742
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>"
git push -u origin fix/TEN-742-short-description
For each repository, create a PR using the GitHub CLI:
gh pr create \
--title "fix: <concise description> (TEN-742)" \
--body "Resolves [TEN-742](https://jira.adeo.no/browse/TEN-742)
## Changes
- <bullet list of what was changed and why>
## Verification
- <how the fix was verified>" \
--base main
Collect all PR URLs for the JIRA comment.
After pushing (both on initial PR creation and after subsequent updates), deploy the eux-web-app feature branch to the odin test environments so changes can be verified before merge.
Only for eux-web-app changes (never deploy backends from this skill):
gh workflow run build-and-deploy-to-q.yaml \
--repo navikt/eux-web-app \
--ref fix/TEN-742-short-description \
-f environment=q2-odin
gh workflow run build-and-deploy-to-q.yaml \
--repo navikt/eux-web-app \
--ref fix/TEN-742-short-description \
-f environment=q1-odin
After triggering, verify the workflows started:
gh run list --repo navikt/eux-web-app --branch fix/TEN-742-short-description --limit 2
Create a detailed comment on the JIRA issue summarizing what was done. The comment MUST include:
Build the ADF comment dynamically. Use mention nodes (not plain text) for reviewer tags. Example structure:
cat > /tmp/odin-result-comment.json << 'ENDOFJSON'
{"version":1,"type":"doc","content":[{"type":"heading","attrs":{"level":3},"content":[{"type":"text","text":"🤖 Odin — Fix implemented"}]},{"type":"paragraph","content":[{"type":"text","text":"Changes have been implemented for TEN-742."}]},{"type":"heading","attrs":{"level":3},"content":[{"type":"text","text":"Summary"}]},{"type":"paragraph","content":[{"type":"text","text":"<description of what was changed>"}]},{"type":"heading","attrs":{"level":3},"content":[{"type":"text","text":"Pull Requests"}]},{"type":"bulletList","content":[{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"eux-neessi: ","marks":[{"type":"strong"}]},{"type":"text","text":"PR #123","marks":[{"type":"link","attrs":{"href":"https://github.com/navikt/eux-neessi/pull/123"}}]}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"type":"text","text":"Reviewers"}]},{"type":"paragraph","content":[{"type":"text","text":"Tagging for review: Vegard Hillestad"}]}]}
ENDOFJSON
acli jira workitem comment create --key TEN-742 --body-file /tmp/odin-result-comment.json
rm -f /tmp/odin-result-comment.json
Important: Always include working links to every PR that was created. Use the actual PR URLs returned by gh pr create.
main).These steps apply every time changes are requested — whether from a GitHub PR review, from the user in the same conversation after the initial implementation, or from a subsequent /odin-jira invocation. Any push of updated code to a PR MUST be followed by a JIRA comment and an odin deploy.
If feedback comes from a PR review, read the review comments:
gh pr view <PR-NUMBER> --repo navikt/<repo> --comments
gh api repos/navikt/<repo>/pulls/<PR-NUMBER>/reviews --jq '.[].body'
If feedback comes from the user in the current conversation, use what they said directly.
Check out the existing feature branch, make the changes, and verify:
cd <repo-directory>
git checkout fix/TEN-742-short-description
git pull
Make the code changes, then verify (build/test as in Step 6).
git add -A
git commit -m "fix: <concise summary of what changed>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>"
git push
If eux-web-app was changed, trigger builds to the odin test environments (same as Step 8.5).
Add a JIRA comment summarizing what was modified. Do this after every push — not just the first one. The comment MUST include:
Example:
cat > /tmp/odin-update-comment.json << 'ENDOFJSON'
{"version":1,"type":"doc","content":[{"type":"heading","attrs":{"level":3},"content":[{"type":"text","text":"🤖 Odin — Update pushed"}]},{"type":"paragraph","content":[{"type":"text","text":"Updated PR based on feedback:"}]},{"type":"bulletList","content":[{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"<summary of each modification made>"}]}]}]},{"type":"paragraph","content":[{"type":"text","text":"Branch redeployed to q2-odin and q1-odin for verification."}]}]}
ENDOFJSON
acli jira workitem comment create --key TEN-742 --body-file /tmp/odin-update-comment.json
rm -f /tmp/odin-update-comment.json
Repeat steps R1–R5 for every round of feedback within the same conversation or across invocations.