Skip to content

HYPERFLEET-1105: align plugins to use ticket-hygiene.md as source of truth#42

Open
rafabene wants to merge 1 commit into
openshift-hyperfleet:mainfrom
rafabene:HYPERFLEET-1105-align-plugins-ticket-hygiene
Open

HYPERFLEET-1105: align plugins to use ticket-hygiene.md as source of truth#42
rafabene wants to merge 1 commit into
openshift-hyperfleet:mainfrom
rafabene:HYPERFLEET-1105-align-plugins-ticket-hygiene

Conversation

@rafabene
Copy link
Copy Markdown
Contributor

Summary

  • Replace all hardcoded component lists, activity types, and story point scales across JIRA-related skills with dynamic fetches from the architecture repo's ticket-hygiene.md standard
  • Document correct argument order for jira issue link (Blocks relationship) in jira-ticket-creator skill and references
  • Add clarification to architecture-impact skill that it operates on code repos, not JIRA components

Affected plugins

  • hyperfleet-jira (skills: jira-ticket-creator, jira-triage, jira-story-pointer; command: triage)
  • hyperfleet-work-triage (skills: bugs-triage, open-prs)
  • hyperfleet-devtools (skill: architecture-impact)

Test plan

  • Verify jira-ticket-creator skill fetches valid components from ticket-hygiene.md before creating tickets
  • Verify jira-triage skill validates components against fetched standard instead of hardcoded list
  • Verify triage command builds JQL dynamically from fetched component list
  • Verify open-prs skill validates --component flag against fetched standard
  • Verify bugs-triage skill uses fetched standard for component validation
  • Verify jira issue link argument order documentation is correct

@openshift-ci openshift-ci Bot requested review from Mischulee and ciaranRoche May 29, 2026 14:40
@openshift-ci
Copy link
Copy Markdown

openshift-ci Bot commented May 29, 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 vkareh 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

@rafabene rafabene force-pushed the HYPERFLEET-1105-align-plugins-ticket-hygiene branch from 63ee64b to b4b5374 Compare May 29, 2026 14:42
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 29, 2026

📝 Walkthrough

Summary by CodeRabbit

  • Documentation

    • Multiple skills now fetch and validate against the authoritative ticket-hygiene.md for components, activity types, and story-point scales instead of hardcoded lists
    • Broadened component validation and --component handling; open-PRs and triage flows updated accordingly
    • Expanded JIRA linking guidance with clarified argument order for "Blocks" relationships
    • Clarified architecture-impact skill description
  • Chores

    • Version bumps: devtools → 0.5.1, jira → 0.5.3, work-triage → 0.2.1

Walkthrough

This PR systematizes how plugin documentation references ticket field requirements by establishing ticket-hygiene.md (from the architecture repo) as the single authoritative source. Instead of maintaining hardcoded component lists and validation rules across multiple skill documents, instructions now fetch the document at runtime via curl and validate against the fetched content. The PR also adds comprehensive documentation for JIRA issue link "Blocks" relationship semantics, clarifying argument order to prevent link direction inversions. Plugin versions are bumped across three plugins to reflect these documentation updates.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

🚥 Pre-merge checks | ✅ 6
✅ Passed checks (6 passed)
Check name Status Explanation
Title check ✅ Passed Title clearly identifies the main change: aligning plugins to use ticket-hygiene.md as a centralized source of truth for configuration.
Description check ✅ Passed Description comprehensively covers the changeset: dynamic fetches replacing hardcoded values, documentation of jira issue link argument order, and clarification on architecture-impact skill scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Sec-02: Secrets In Log Output ✅ Passed No Go source code files exist in this repository. All PR changes are JSON manifests and markdown documentation. SEC-02 check is not applicable—there are no log statements to audit.

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

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

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: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@hyperfleet-jira/commands/triage.md`:
- Around line 50-56: The JQL construction that injects component names into the
clause (the step that builds `component not in (...)` from ticket-hygiene.md) is
vulnerable to injection; validate and sanitize each component name (the values
you insert into the JQL list) by enforcing a strict whitelist regex such as
`^[A-Za-z0-9_ -]+$` and reject or escape any value that fails validation, ensure
multi-word names are single-quoted after validation, or preferably avoid
string-built JQL entirely by using the JIRA API's structured query/parameterized
endpoints to pass components as parameters instead of interpolating them into
JQL.
🪄 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: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 4d3b7957-0419-45ac-9bcf-a50a5c8c9846

📥 Commits

Reviewing files that changed from the base of the PR and between 6e28c01 and b4b5374.

📒 Files selected for processing (13)
  • hyperfleet-devtools/.claude-plugin/plugin.json
  • hyperfleet-devtools/skills/architecture-impact/SKILL.md
  • hyperfleet-jira/.claude-plugin/plugin.json
  • hyperfleet-jira/commands/triage.md
  • hyperfleet-jira/skills/jira-story-pointer/SKILL.md
  • hyperfleet-jira/skills/jira-ticket-creator/SKILL.md
  • hyperfleet-jira/skills/jira-ticket-creator/references/activity-types.md
  • hyperfleet-jira/skills/jira-ticket-creator/references/cli-examples.md
  • hyperfleet-jira/skills/jira-ticket-creator/references/pitfalls.md
  • hyperfleet-jira/skills/jira-triage/SKILL.md
  • hyperfleet-work-triage/.claude-plugin/plugin.json
  • hyperfleet-work-triage/skills/bugs-triage/SKILL.md
  • hyperfleet-work-triage/skills/open-prs/SKILL.md

Comment thread hyperfleet-jira/commands/triage.md
Copy link
Copy Markdown
Contributor

@pnguyen44 pnguyen44 left a comment

Choose a reason for hiding this comment

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

The "Valid Components" line in the output template was updated to reference ticket-hygiene.md, but the "Valid Activity Types" line just below it is still hardcoded. Same treatment needed:

Valid Activity Types: [list from ticket-hygiene.md fetched in step 0]

@rafabene rafabene marked this pull request as draft May 29, 2026 15:21
@rafabene rafabene marked this pull request as ready for review May 29, 2026 15:21
@openshift-ci openshift-ci Bot requested a review from ma-hill May 29, 2026 15:21
@rafabene rafabene marked this pull request as draft May 29, 2026 15:21
@rafabene rafabene marked this pull request as ready for review May 29, 2026 15:22
@openshift-ci openshift-ci Bot requested a review from vkareh May 29, 2026 15:22
@rafabene rafabene marked this pull request as draft May 29, 2026 15:23
@rafabene rafabene marked this pull request as ready for review May 29, 2026 15:24
@openshift-ci openshift-ci Bot requested a review from pnguyen44 May 29, 2026 15:24
@rafabene rafabene closed this May 29, 2026
@rafabene rafabene reopened this May 29, 2026
…truth

Replace hardcoded component lists, activity types, and story point scales
across all JIRA-related skills with dynamic fetches from the architecture
repo's ticket-hygiene.md standard. Also document correct argument order
for jira issue link (Blocks relationship).
@rafabene rafabene force-pushed the HYPERFLEET-1105-align-plugins-ticket-hygiene branch from b4b5374 to 223893e Compare May 29, 2026 15:31
```bash
curl -sL https://raw.githubusercontent.com/openshift-hyperfleet/architecture/main/hyperfleet/standards/ticket-hygiene.md 2>/dev/null
```

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This section says not to rely on hardcoded values, but the story point scale (0, 1, 3, 5, 8, 13) shows up in two places below (section 4 and Step 4) without referencing ticket-hygiene.md. jira-story-pointer handles this well by keeping the inline values but adding "The scale below should match. If in doubt, fetch the latest." Same treatment here would keep things consistent.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed — the hardcoded Activity Types list in the triage output template now references ticket-hygiene.md, same as Components. See 223893e.

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: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@hyperfleet-jira/skills/jira-triage/SKILL.md`:
- Around line 30-37: Replace the current silent curl fetch with a failing,
explicit fetch: introduce a HYGIENE_URL variable (use a pinned ref/tag/commit
instead of main), fetch into a ticket_hygiene variable using a curl invocation
that fails on HTTP errors, check the command exit status and that ticket_hygiene
is non-empty, and if either check fails emit a clear stderr error and exit
non-zero so triage does not proceed without the authoritative ticket-hygiene.md.
🪄 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: Central YAML (base), Organization UI (inherited)

Review profile: CHILL

Plan: Enterprise

Run ID: 497a0062-2f09-4892-aa13-b8194e0b0f9a

📥 Commits

Reviewing files that changed from the base of the PR and between b4b5374 and 223893e.

📒 Files selected for processing (13)
  • hyperfleet-devtools/.claude-plugin/plugin.json
  • hyperfleet-devtools/skills/architecture-impact/SKILL.md
  • hyperfleet-jira/.claude-plugin/plugin.json
  • hyperfleet-jira/commands/triage.md
  • hyperfleet-jira/skills/jira-story-pointer/SKILL.md
  • hyperfleet-jira/skills/jira-ticket-creator/SKILL.md
  • hyperfleet-jira/skills/jira-ticket-creator/references/activity-types.md
  • hyperfleet-jira/skills/jira-ticket-creator/references/cli-examples.md
  • hyperfleet-jira/skills/jira-ticket-creator/references/pitfalls.md
  • hyperfleet-jira/skills/jira-triage/SKILL.md
  • hyperfleet-work-triage/.claude-plugin/plugin.json
  • hyperfleet-work-triage/skills/bugs-triage/SKILL.md
  • hyperfleet-work-triage/skills/open-prs/SKILL.md
✅ Files skipped from review due to trivial changes (7)
  • hyperfleet-jira/.claude-plugin/plugin.json
  • hyperfleet-devtools/skills/architecture-impact/SKILL.md
  • hyperfleet-jira/skills/jira-story-pointer/SKILL.md
  • hyperfleet-devtools/.claude-plugin/plugin.json
  • hyperfleet-jira/skills/jira-ticket-creator/references/cli-examples.md
  • hyperfleet-jira/skills/jira-ticket-creator/references/activity-types.md
  • hyperfleet-work-triage/.claude-plugin/plugin.json
🚧 Files skipped from review as they are similar to previous changes (4)
  • hyperfleet-work-triage/skills/bugs-triage/SKILL.md
  • hyperfleet-jira/skills/jira-ticket-creator/SKILL.md
  • hyperfleet-work-triage/skills/open-prs/SKILL.md
  • hyperfleet-jira/commands/triage.md

Comment on lines +30 to +37
Field requirements, valid components, activity types, and story point scales are defined in **ticket-hygiene.md** in the architecture repo. Before triaging, fetch the current standard:

```bash
curl -sL https://raw.githubusercontent.com/openshift-hyperfleet/architecture/main/hyperfleet/standards/ticket-hygiene.md 2>/dev/null
```

Use the fetched document as the source of truth for all validation in this skill. Do NOT rely on hardcoded values.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Fail fast on standards fetch; don’t silently continue with unknown validation source.

The current curl ... 2>/dev/null flow can fail silently and still allow triage logic to continue without authoritative rules. Make this step explicit and blocking (check exit code/content), and prefer a pinned ref (tag/commit SHA) to avoid non-deterministic behavior from main.

Suggested doc update
-```bash
-curl -sL https://raw.githubusercontent.com/openshift-hyperfleet/architecture/main/hyperfleet/standards/ticket-hygiene.md 2>/dev/null
-```
+```bash
+HYGIENE_URL="https://raw.githubusercontent.com/openshift-hyperfleet/architecture/<PINNED_REF>/hyperfleet/standards/ticket-hygiene.md"
+ticket_hygiene="$(curl -fsSL "$HYGIENE_URL")" || {
+  echo "Failed to fetch ticket-hygiene.md from architecture repo" >&2
+  exit 1
+}
+[ -n "$ticket_hygiene" ] || { echo "ticket-hygiene.md is empty" >&2; exit 1; }
+```

As per coding guidelines, "Apply these language-agnostic code review checks from HyperFleet standards ... Security (SEC-01 to SEC-03) ... Validate input at system boundaries."

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@hyperfleet-jira/skills/jira-triage/SKILL.md` around lines 30 - 37, Replace
the current silent curl fetch with a failing, explicit fetch: introduce a
HYGIENE_URL variable (use a pinned ref/tag/commit instead of main), fetch into a
ticket_hygiene variable using a curl invocation that fails on HTTP errors, check
the command exit status and that ticket_hygiene is non-empty, and if either
check fails emit a clear stderr error and exit non-zero so triage does not
proceed without the authoritative ticket-hygiene.md.

Comment on lines +58 to +61
3. If `--component` is provided, fetch the valid component list from ticket-hygiene.md and validate the value against it:
```bash
curl -sL https://raw.githubusercontent.com/openshift-hyperfleet/architecture/main/hyperfleet/standards/ticket-hygiene.md 2>/dev/null
```
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

curl is listed as a forbidden command in this skill's Security section ("NEVER execute..."). This new curl in Step 1 conflicts with that rule. An LLM might refuse to run it. Either add curl to the approved commands list with a note that it's only for fetching ticket-hygiene.md, or move the component validation to use a pre-loaded reference instead.

Copy link
Copy Markdown
Contributor

@pnguyen44 pnguyen44 left a comment

Choose a reason for hiding this comment

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

Nit: repeated curl URL across 7 files

This PR introduces the same curl -sL https://raw.githubusercontent.com/...ticket-hygiene.md in 7 places. Within hyperfleet-jira, you could create a single references/ticket-hygiene-fetch.md with the URL and fetch instructions, then have each skill load it. Same pattern already used for references/activity-types.md and references/pitfalls.md. That would bring it down from 7 copies to 2 (one per plugin).

---
name: architecture-impact
description: Analyzes code changes in HyperFleet component repositories (API, Sentinel, Adapter, Broker) to determine if architecture documentation needs updates using directory-based scope and complete document reading with single comprehensive LLM analysis. Activates when users ask "analyze architecture impact", "check if docs need update", or use /architecture-impact.
description: Analyzes code changes in HyperFleet component repositories (API, Sentinel, Adapter, Broker) to determine if architecture documentation needs updates using directory-based scope and complete document reading with single comprehensive LLM analysis. Activates when users ask "analyze architecture impact", "check if docs need update", or use /architecture-impact. Note - this skill operates on code repositories, not JIRA components. For the full list of valid JIRA components, see ticket-hygiene.md in the architecture repo.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The description field drives skill triggering. Adding "JIRA components" and "ticket-hygiene.md" here could cause false triggers when users talk about JIRA. This clarification would be better placed in the skill body instead of the frontmatter description.

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.

2 participants