Skip to content

Conversation

@aguidirh
Copy link

What this PR does / why we need it:

This PR introduces a new report-writer agent plugin that generates comprehensive weekly team activity reports by systematically collecting and analyzing data from Atlassian Jira. The agent automates the process of:

  • Discovering Jira boards and sprints for a given project
  • Fetching complete issue data including changelogs and comments
  • Filtering issues by activity within a specific reporting window
  • Generating structured reports with team metrics and contribution summaries

The agent follows a rigorous 5-step workflow to ensure data completeness and accuracy, with mandatory verification checkpoints and comprehensive error handling.

Which issue(s) this PR fixes:

Fixes CLID-473

Special notes for your reviewer:

  • This is a new agent plugin (not a command plugin) that uses the agent framework
  • The plugin requires the Jira MCP server to be configured and running
  • The agent includes detailed documentation on week calculation logic (Monday-Sunday format) and data verification requirements
  • The implementation emphasizes data completeness with mandatory JSON file creation for all fetched issues
  • The README includes setup instructions for both npx and containerized Jira MCP server deployments

Checklist:

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.

@openshift-ci-robot
Copy link

openshift-ci-robot commented Oct 31, 2025

@aguidirh: This pull request references CLID-473 which is a valid jira issue.

Warning: The referenced jira issue has an invalid target version for the target branch this PR targets: expected the sub-task to target the "4.21.0" version, but no target version was set.

In response to this:

What this PR does / why we need it:

This PR introduces a new report-writer agent plugin that generates comprehensive weekly team activity reports by systematically collecting and analyzing data from Atlassian Jira. The agent automates the process of:

  • Discovering Jira boards and sprints for a given project
  • Fetching complete issue data including changelogs and comments
  • Filtering issues by activity within a specific reporting window
  • Generating structured reports with team metrics and contribution summaries

The agent follows a rigorous 5-step workflow to ensure data completeness and accuracy, with mandatory verification checkpoints and comprehensive error handling.

Which issue(s) this PR fixes:

Fixes CLID-473

Special notes for your reviewer:

  • This is a new agent plugin (not a command plugin) that uses the agent framework
  • The plugin requires the Jira MCP server to be configured and running
  • The agent includes detailed documentation on week calculation logic (Monday-Sunday format) and data verification requirements
  • The implementation emphasizes data completeness with mandatory JSON file creation for all fetched issues
  • The README includes setup instructions for both npx and containerized Jira MCP server deployments

Checklist:

  • Subject and description added to both, commit and PR.
  • Relevant issues have been referenced.
  • This change includes docs.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@openshift-ci-robot openshift-ci-robot added the jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. label Oct 31, 2025
@openshift-ci openshift-ci bot requested review from dgoodwin and zaneb October 31, 2025 18:53
@openshift-ci
Copy link

openshift-ci bot commented Oct 31, 2025

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

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-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 31, 2025
@openshift-ci
Copy link

openshift-ci bot commented Oct 31, 2025

Hi @aguidirh. Thanks for your PR.

I'm waiting for a github.com member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@openshift-ci openshift-ci bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Oct 31, 2025
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 31, 2025
@stbenjam
Copy link
Member

/ok-to-test

@openshift-ci openshift-ci bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Oct 31, 2025
@aguidirh aguidirh force-pushed the CLID-473 branch 3 times, most recently from f15ee3e to 502ab18 Compare October 31, 2025 20:43
@aguidirh
Copy link
Author

/jira refresh

@openshift-ci-robot
Copy link

openshift-ci-robot commented Oct 31, 2025

@aguidirh: This pull request references CLID-473 which is a valid jira issue.

In response to this:

/jira refresh

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the openshift-eng/jira-lifecycle-plugin repository.

@@ -0,0 +1,507 @@
---
name: weekly
description: Use this agent when the user requests a team activity report, sprint summary, or weekly status update. Examples:\n\n<example>\nContext: User wants to generate the weekly team activity report.\nuser: "Can you generate this week's team activity report for the CLID project?"\nassistant: "I'll use the Task tool to launch the weekly agent to generate the weekly activity report."\n<tool_use>\n<tool_name>Task</tool_name>\n<parameters>\n<task>Generate weekly team activity report for CLID project</task>\n<agent>weekly</agent>\n</parameters>\n</tool_use>\n</example>\n\n<example>\nContext: User wants a report for a specific sprint with component filtering.\nuser: "I need a report for the oc-mirror component from last week's sprint"\nassistant: "I'll launch the weekly agent to generate a filtered report for the oc-mirror component from last week."\n<tool_use>\n<tool_name>Task</tool_name>\n<parameters>\n<task>Generate team activity report for oc-mirror component with week-offset -1</task>\n<agent>weekly</agent>\n</parameters>\n</tool_use>\n</example>\n\n<example>\nContext: User wants a custom sprint report with additional notes.\nuser: "Create a sprint report for CLID Sprint 278 and include the notes from our standup meeting"\nassistant: "I'll use the weekly agent to generate a custom sprint report with your standup notes."\n<tool_use>\n<tool_name>Task</tool_name>\n<parameters>\n<task>Generate sprint report for CLID Sprint 278 including standup notes</task>\n<agent>weekly</agent>\n</parameters>\n</tool_use>\n</example>
Copy link
Member

Choose a reason for hiding this comment

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

This is probably too much content to inject into the context. I am not sure if anything after the first sentence in needed

Copy link
Author

Choose a reason for hiding this comment

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

description: Use this agent when the user requests a team activity report, sprint summary, or weekly status update.

Everything after the sentence above are only examples, are you saying they are not needed? Is this not going to make it less accuracy ? It was basically auto-generated by claude.

Comment on lines +251 to +253
**Action**: Confirm all issues were successfully fetched and stored with COMPLETE data including changelogs and comments in individual JSON files.

**ABSOLUTE REQUIREMENT**: You MUST verify that all JSON files contain complete data (including changelogs and comments) before proceeding to report generation.
Copy link
Member

Choose a reason for hiding this comment

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

This kind of reiteration for deterministic behavior makes me think Claude had trouble with this? Turning it into a skill with a script that does exactly what you want might be more successful (and cheaper token-wise)

Copy link
Author

Choose a reason for hiding this comment

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

Yes, I had to add it because claude was doing a lot of mistakes related to the data returned by the mcp server as json file.

Some times it was getting only part of the response and some times it was even creating fake data as part of the jira response.

Copy link
Member

Choose a reason for hiding this comment

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

This looks more like a slash command that should be invoked rather than a subagent.

Could it also go into the jira plugin? Then we don't need duplicated steps about setting up the jira mcp server

Copy link
Author

Choose a reason for hiding this comment

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

Currently it is already a jira plugin but as a subagent.

I decided to do that as an agent because I saw agents have their own context windows, which makes more reliable in accuracy. Also I would like to run it autonomous in some kind of weekly job.

Copy link
Member

Choose a reason for hiding this comment

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

This is structured as its own plugin called "report-writer", the jira plugin is here https://github.com/openshift-eng/ai-helpers/tree/main/plugins/jira

For both agents and commands, the only thing in the context window is their descriptions until invoked

Copy link
Member

Choose a reason for hiding this comment

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

Commands are more discoverable than agents, and this is definitely a command-type task to deterministically generate a weekly report.

Unless there's a compelling case/evidence this needs a dedicated context window, I would structure this more like other tools in this repo (a command, with a skill). A skill with a script to extract the JSON files you're looking for will also be much more reliable

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

Labels

jira/valid-reference Indicates that this PR references a valid Jira ticket of any type. ok-to-test Indicates a non-member PR verified by an org member that is safe to test.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants