This file provides guidance to Claude Code and OpenCode when working with code in this repository.
bash scripts/setup.sh # Create venv, install deps, symlink ~/bin/jirha
bash scripts/setup.sh --global # Also install the post-PR hook globallyPrerequisites: GitHub CLI (gh auth login), .env with JIRA_EMAIL and JIRA_API_TOKEN (copy from .env.example).
The script auto-bootstraps into the repo venv. Run it as:
jirha <command> # via ~/bin/jirha symlink (works from any directory)
scripts/jirha <command> # directly from repo rootPackage structure — jirha/ Python package with a clean dependency chain:
config.py— constants, field IDs,.envloadingapi.py— Jira connection (get_jira()), PR metrics (_pr_metrics()), shared query helpersops/issues.py— list, show, create, update, transition, close_subtasks commandsops/meta.py— metadata discovery (issue types, fields per project)ops/sprint.py— sprint_status, swimlane assignment, velocity/risk assessmentops/hygiene.py— hygiene checks, SP reassessmentops/release_notes.py— release notes checklist, validation, formattingcli.py— argparse entry point (jirha = jirha.cli:main)
scripts/jirha is a thin shim: bootstraps the repo venv, then delegates to venv/bin/jirha.
Slash commands are in commands/jirha-*.md and invoke jirha <subcommand> $ARGUMENTS.
Skills are in skills/.
Jira conventions skill is at skills/jira-workflow.md.
- Command reference:
AGENTS.md - Custom field IDs, JQL templates, description templates, sprint status format:
docs/jirha-reference.md - SP reference, auto-suggest heuristics, threshold methodology:
docs/sp-heuristics.md
Three files carry the version and must always match: .claude-plugin/plugin.json, .claude-plugin/marketplace.json, and pyproject.toml. Bump all three together (patch for fixes, minor for new/changed commands or skills). CI enforces this — PRs with mismatched versions will fail.
When running in OpenCode:
- Project config is in
opencode.json— registersskills/path and usesAGENTS.mdas instructions - Slash commands in
commands/*.mdare loaded from~/.config/opencode/commands/(set up byscripts/setup.sh) - Skills in
skills/are auto-discovered viaopencode.jsonconfig jirhaCLI must be on PATH (installed viapip install -e .orscripts/setup.sh)
from jira import JIRA
import os
jira = JIRA(server='https://redhat.atlassian.net',
basic_auth=(os.environ['JIRA_EMAIL'], os.environ['JIRA_API_TOKEN']))