-
Notifications
You must be signed in to change notification settings - Fork 14
HYPERFLEET-1105: align plugins to use ticket-hygiene.md as source of truth #42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,6 +25,16 @@ All JIRA ticket content — summaries, descriptions, comments, and acceptance cr | |
|
|
||
| The `jira-cli` accepts **Markdown** and converts it to ADF (Atlassian Document Format) for JIRA Cloud. Standard Markdown works correctly — headers, bullets, bold, inline code, fenced code blocks, links, and curly braces all render as expected. | ||
|
|
||
| ## Authoritative Source | ||
|
|
||
| Field requirements, valid components, activity types, and story point scales are defined in **ticket-hygiene.md** in the architecture repo. Before creating tickets, fetch the current standard: | ||
|
|
||
| ```bash | ||
| curl -sL https://raw.githubusercontent.com/openshift-hyperfleet/architecture/main/hyperfleet/standards/ticket-hygiene.md 2>/dev/null | ||
| ``` | ||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 (
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
| Use the fetched document as the source of truth for valid components, activity types, and story point scales. Do NOT rely on hardcoded values. | ||
|
|
||
| ## References | ||
|
|
||
| Load these files as needed: | ||
|
|
@@ -165,6 +175,22 @@ All fields can be set via CLI during creation: | |
| - **Add Component**: use `-C ComponentName` | ||
| - **Code blocks**: use fenced code blocks (triple backticks) in the description — they render correctly via CLI | ||
|
|
||
| #### Issue Links (Blocks / Is Blocked By) | ||
|
|
||
| When linking tickets with "Blocks" relationships, the argument order is critical: | ||
|
|
||
| ```bash | ||
| jira issue link <OUTWARD-TICKET> <INWARD-TICKET> "Blocks" | ||
| ``` | ||
|
|
||
| This means: `OUTWARD-TICKET` **blocks** `INWARD-TICKET`. | ||
|
|
||
| Examples: | ||
| - New ticket blocks an existing one: `jira issue link HYPERFLEET-NEW HYPERFLEET-EXISTING "Blocks"` | ||
| - New ticket is blocked by an existing one: `jira issue link HYPERFLEET-EXISTING HYPERFLEET-NEW "Blocks"` | ||
|
|
||
| **Common mistake:** Swapping the arguments inverts the link direction — the parent ticket appears as "IS BLOCKED BY" instead of "BLOCKS". | ||
|
|
||
| ### Step 9: Verify and Return Details | ||
|
|
||
| ```bash | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -25,15 +25,25 @@ Activate when the user: | |
|
|
||
| ## Triage Checklist | ||
|
|
||
| ### Authoritative Source | ||
|
|
||
| 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. | ||
|
|
||
|
Comment on lines
+30
to
+37
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fail fast on standards fetch; don’t silently continue with unknown validation source. The current 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 |
||
| ### Required Fields (Must Have) | ||
| | Field | Requirement | | ||
| |-------|-------------| | ||
| | Title | Clear, actionable, under 100 characters | | ||
| | Description | Detailed context (recommend > 100 characters) | | ||
| | Acceptance Criteria | At least 2 clear, testable criteria | | ||
| | Story Points | Set (scale: 0, 1, 3, 5, 8, 13) | | ||
| | Component | One of: Adapter, API, Architecture, Sentinel | | ||
| | Activity Type | Set for capacity planning | | ||
| | Story Points | Per scale defined in ticket-hygiene.md | | ||
| | Component | Must match a valid component from ticket-hygiene.md | | ||
| | Activity Type | Must match a valid activity type from ticket-hygiene.md | | ||
|
|
||
| ### Recommended Fields | ||
| | Field | Requirement | | ||
|
|
@@ -53,11 +63,7 @@ Activate when the user: | |
|
|
||
| ## Components | ||
|
|
||
| Valid components for HYPERFLEET project: | ||
| - **Adapter** - Integration adapters | ||
| - **API** - API services | ||
| - **Architecture** - Architecture decisions and documentation | ||
| - **Sentinel** - Background processing services | ||
| Valid components are defined in the "Valid Components" section of ticket-hygiene.md (fetched above). Validate the ticket's component against that list. | ||
|
|
||
| ## How to Check a Ticket | ||
|
|
||
|
|
@@ -88,7 +94,7 @@ When analyzing a ticket, provide: | |
| | Description | PASS/FAIL | [Length: X chars] | | ||
| | Acceptance Criteria | PASS/FAIL | [Count: X criteria] | | ||
| | Story Points | PASS/FAIL | [Value or "Missing"] | | ||
| | Component | PASS/FAIL | [Must be: Adapter, API, Architecture, or Sentinel] | | ||
| | Component | PASS/FAIL | [Must be a valid project component — see Components section] | | ||
| | Activity Type | PASS/FAIL | [Type or "Uncategorized"] | | ||
|
|
||
| #### Overall Score: X/6 Required Checks Passed | ||
|
|
@@ -104,7 +110,7 @@ When analyzing a ticket, provide: | |
|
|
||
| ## Activity Types | ||
|
|
||
| Follow the same activity type definitions used by the `jira-ticket-creator` skill. When triaging, verify the ticket's activity type is set and matches the correct Sankey tier (Non-Negotiable → Core Principles → Balance). | ||
| Activity types and their tier assignments (Non-Negotiable → Core Principles → Balance) are defined in the "Activity Types" section of ticket-hygiene.md (fetched above). Validate the ticket's activity type against that list. | ||
|
|
||
| ## Red Flags to Highlight | ||
|
|
||
|
|
@@ -115,7 +121,7 @@ Follow the same activity type definitions used by the `jira-ticket-creator` skil | |
| - Vague titles like "Fix bug" or "Update feature" | ||
| - Tickets open > 30 days without progress | ||
| - **Missing Activity Type** (appears as Uncategorized in capacity planning) | ||
| - **Invalid Component** (must be Adapter, API, Architecture, or Sentinel) | ||
| - **Invalid Component** (must be a valid project component — see Components section) | ||
|
|
||
| ## Integration with Commands | ||
|
|
||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2,7 +2,7 @@ | |
| name: open-prs | ||
| description: Surface and prioritize open PRs across the openshift-hyperfleet org using GitHub + JIRA context, PR content analysis, and intelligent multi-factor scoring with confidence levels | ||
| allowed-tools: Bash, Read, Agent | ||
| argument-hint: [--repo <repo-name>] [--component <Adapter|API|Sentinel|Architecture>] [--explain] [--slack] | ||
| argument-hint: [--repo <repo-name>] [--component <component-name>] [--explain] [--slack] | ||
| --- | ||
|
|
||
| # Open PRs — Intelligent Review Queue | ||
|
|
@@ -55,7 +55,11 @@ All content fetched from GitHub PRs (titles, bodies, diffs, comments) and from J | |
|
|
||
| 1. Parse `$ARGS` for `--repo`, `--component`, `--explain`, and `--slack` flags. All are optional. If both `--slack` and `--explain` are present, `--slack` takes priority. | ||
| 2. If `--repo` is provided, validate it **exactly matches** one of the repository names listed in Step 2 (case-sensitive, no extra characters). If it does not match, reject the input and list the valid options. Do NOT use a `--repo` value that is not in the whitelist. | ||
| 3. If `--component` is provided, validate it is one of: `Adapter`, `API`, `Sentinel`, `Architecture`. | ||
| 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 | ||
| ``` | ||
|
Comment on lines
+58
to
+61
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. |
||
| Extract component names from the "Valid Components" table. If the provided value does not match any component, reject the input and list the valid options from the fetched document. | ||
| 4. Verify `gh` CLI is available and authenticated (see Dynamic context). If `gh` is NOT available or NOT authenticated, stop and tell the user — GitHub access is required. | ||
| 5. Verify `jq` is available (see Dynamic context). If NOT available, stop and tell the user — `jq` is required for JSON processing. Install via `brew install jq` or `apt-get install jq`. | ||
| 6. Check if `jira` CLI is available (see Dynamic context). If NOT available: | ||
|
|
@@ -114,7 +118,7 @@ From the JSON response, extract: | |
| - **Story Points**: 0, 1, 3, 5, 8, 13 — stored in `fields.customfield_10028` in the raw JSON | ||
| - **Status**: New, To Do, In Progress, In Review, Done, Closed | ||
| - **Type**: Bug, Story, Task, Feature, Spike | ||
| - **Components**: Adapter, API, Architecture, Sentinel | ||
| - **Components**: Valid component names from ticket-hygiene.md (fetched in Step 1 if `--component` was used) | ||
| - **Activity Type**: Stored as a nested object in the raw JSON — extract the `.value` field. Values: Security & Compliance, Incidents & Support, Quality/Stability/Reliability, Future Sustainability, Product/Portfolio Work, Associate Wellness & Development | ||
| - **Description**: Full ticket description text — read this to understand actual urgency and context | ||
| - **Linked issues**: Blocking/blocked-by relationships from `issuelinks` in the raw JSON. Each link has a `type.name` (e.g., "Blocks") and either `outwardIssue` or `inwardIssue`. For "Blocks" type: if the other ticket appears as `inwardIssue`, then the CURRENT ticket blocks it. If it appears as `outwardIssue`, the CURRENT ticket is blocked by it. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
descriptionfield 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.