Skip to content

HYPERFLEET-343: add is-ticket-implemented skill to hyperfleet-jira plugin#22

Open
rafabene wants to merge 1 commit intoopenshift-hyperfleet:mainfrom
rafabene:HYPERFLEET-343
Open

HYPERFLEET-343: add is-ticket-implemented skill to hyperfleet-jira plugin#22
rafabene wants to merge 1 commit intoopenshift-hyperfleet:mainfrom
rafabene:HYPERFLEET-343

Conversation

@rafabene
Copy link
Copy Markdown
Contributor

@rafabene rafabene commented Mar 27, 2026

Summary

  • Adds /is-ticket-implemented skill to the hyperfleet-jira plugin
  • Validates whether a JIRA ticket's requirements and acceptance criteria are implemented in the codebase
  • Supports two modes: local (default, analyzes current directory) and remote (pass github flag, infers repo from ticket context)
  • Generates structured acceptance report with completion %, file:line references, and recommended actions

Usage

/is-ticket-implemented HYPERFLEET-123          # local codebase
/is-ticket-implemented HYPERFLEET-123 github   # remote (infers repo from ticket)

Test plan

  • Install plugin locally and invoke /is-ticket-implemented with a ticket that has acceptance criteria
  • Verify local mode finds implementations in the current repo
  • Verify github flag lists repos and infers the correct one
  • Verify report format matches the expected output (completion %, file:line refs)
  • Test with a ticket that has no acceptance criteria (should infer from description)

Summary by CodeRabbit

  • New Features

    • Added auto-activated "Is Ticket Implemented?" skill with the /is-ticket-implemented command to validate JIRA ticket requirements against code; supports local or GitHub mode and can infer the target repository from the ticket.
  • Documentation

    • Added usage details, example natural-language prompts, and description of the acceptance report (completion percentage, implemented/partially implemented/missing items with file/line references, manual verification flags, and recommended next actions).

@openshift-ci openshift-ci bot requested a review from 86254860 March 27, 2026 15:18
@openshift-ci
Copy link
Copy Markdown

openshift-ci bot commented Mar 27, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign ciaranroche for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot requested a review from yasun1 March 27, 2026 15:18
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 27, 2026

Walkthrough

This pull request adds a new auto-activated skill named "is-ticket-implemented" and documents a /is-ticket-implemented command in the README. The skill accepts a required JIRA issue key and an optional github flag, supports local (current repository) and remote (GitHub) modes, validates inputs and prerequisites, fetches ticket content and comments, extracts requirements/acceptance criteria, searches the codebase (or repository via gh), and produces a structured acceptance report with completion percentage and per-criterion statuses.

Sequence Diagram

sequenceDiagram
    actor User
    participant Skill as is-ticket-implemented
    participant JIRA as JIRA CLI/API
    participant Files as Local Filesystem
    participant GitHub as GitHub API/gh
    participant Tools as Search Tools (Grep, Glob, Agent)
    participant Report as Acceptance Report

    User->>Skill: Invoke with JIRA key (+ optional github flag)
    Skill->>Skill: Validate key & select mode
    Skill->>Tools: Check prerequisites (jira, gh)
    Skill->>JIRA: Fetch issue body & comments
    JIRA-->>Skill: Issue data
    Skill->>Skill: Extract requirements / acceptance criteria
    alt Remote mode
        Skill->>GitHub: Infer repo and fetch files
        GitHub-->>Skill: Repository files
    else Local mode
        Skill->>Files: Read local repo files
        Files-->>Skill: Repository files
    end
    Skill->>Tools: Search/read relevant files
    Tools-->>Skill: Matches with file:line refs
    Skill->>Skill: Classify each criterion (Implemented / Partial / Not Implemented / Manual)
    Skill->>Report: Compute completion % and assemble report
    Report-->>User: Return acceptance report
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically summarizes the main change: adding a new skill to the hyperfleet-jira plugin, with a concrete reference to the skill name and the ticket identifier.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@hyperfleet-jira/skills/is-ticket-implemented/SKILL.md`:
- Line 45: Replace the command that uses the full $ARGUMENTS with the single
positional argument $0 so only the JIRA issue key is passed; specifically change
the shell invocation "jira issue view $ARGUMENTS --comments 50 --plain" to use
"$0" instead of "$ARGUMENTS" (ensure the line containing that exact command in
SKILL.md is updated).
- Around line 69-80: The workflow currently interpolates an inferred repo
(untrusted input) into gh commands without verification; change the logic that
selects the "inferred repo" so it first runs the existing gh repo list command
to collect allowed repos, then validate that the inferred repo string exactly
matches one of those allowed repo names before using it in any gh CLI
interpolation (otherwise prompt the user to pick from the validated list).
Update the place in the skill where repo inference is performed (the steps
describing "Infer the most likely repo" and the subsequent use of that value in
gh commands) to implement this exact-match whitelist check against gh repo list
output and fall back to explicit user selection when no exact match is found.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5c905fb2-8d6e-413c-bf37-6bb5b633d4ed

📥 Commits

Reviewing files that changed from the base of the PR and between 47c5343 and 9fa86e2.

📒 Files selected for processing (2)
  • hyperfleet-jira/README.md
  • hyperfleet-jira/skills/is-ticket-implemented/SKILL.md

…ugin

New skill that validates whether a JIRA ticket's requirements and
acceptance criteria are implemented in the codebase. Supports local
analysis (default) and remote GitHub analysis via `github` flag.
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
hyperfleet-jira/skills/is-ticket-implemented/SKILL.md (1)

83-100: Add validation reminder before using {repo} in shell commands.

While line 80 correctly requires exact-match validation of the inferred repository name, the subsequent gh command examples use the {repo} placeholder without re-emphasizing this requirement. To strengthen defense-in-depth and prevent an AI agent from accidentally interpolating an unvalidated repo name into shell commands, add an explicit reminder.

🛡️ Suggested addition for defense-in-depth

Add a validation reminder immediately before line 83:

 5. If the repo cannot be confidently inferred, show the user the list of repos and ask which one to analyze
 
 Then use `gh` CLI to explore the repository:
+
+**Important:** Only substitute the repo name validated in step 4 above into the `{repo}` placeholder in the following commands.
 
 - List files and directories:
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@hyperfleet-jira/skills/is-ticket-implemented/SKILL.md` around lines 83 - 100,
Add an explicit validation reminder before the gh CLI examples in SKILL.md: call
out that the {repo} placeholder must be the already-validated exact-match
repository name (as enforced earlier around the exact-match validation) or
otherwise validated again before interpolating into any gh api commands; update
the text immediately above the gh api examples that reference {repo} and {path}
to instruct the agent to reuse the validated repo variable or run
server-side/whitelist validation prior to substitution so unvalidated input is
never passed into the gh api commands.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@hyperfleet-jira/skills/is-ticket-implemented/SKILL.md`:
- Around line 83-100: Add an explicit validation reminder before the gh CLI
examples in SKILL.md: call out that the {repo} placeholder must be the
already-validated exact-match repository name (as enforced earlier around the
exact-match validation) or otherwise validated again before interpolating into
any gh api commands; update the text immediately above the gh api examples that
reference {repo} and {path} to instruct the agent to reuse the validated repo
variable or run server-side/whitelist validation prior to substitution so
unvalidated input is never passed into the gh api commands.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7a221f14-ea6c-4774-acf4-b129ce44c0f9

📥 Commits

Reviewing files that changed from the base of the PR and between 9fa86e2 and fb12ccd.

📒 Files selected for processing (2)
  • hyperfleet-jira/README.md
  • hyperfleet-jira/skills/is-ticket-implemented/SKILL.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • hyperfleet-jira/README.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant