agentleFS
nmarques93nmarques93/jira-triage-skills/skills/ci-workflow/SKILL.md

ci-workflow

Skill0 starsChanged 4 months agoMITView on GitHub

Top-level orchestrator for Customer Investigation ticket processing. Runs the full pipeline: triage open tickets → request enrichment on thin tickets → link clustered bugs → propose autofixes for eligible bugs. All Jira writes require explicit confirmation before posting.

The file

Show its rules and text

We split this skill into the rules it gives an agent

18 rules. About 0 are common, 15 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈15

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    The engineer is never cut out of the loop: Every Jira write is previewed and confirmed before it happens.

    line 12
  2. Distinctive:

    If a specific phase argument is provided, run only that phase.

    line 51
  3. Distinctive:

    Before starting, fetch open CI tickets and print a brief status snapshot:

    line 57
  4. Distinctive:

    No Jira writes happen during this step.

    line 70
  5. Very specific:

    If the user runs /ci-workflow <PROJECT> triage, stop after this phase.

    line 89
  6. Distinctive:

    Wait for explicit confirmation.

    line 128
  7. Very specific:

    Call createIssueLink for each confirmed pair.

    line 129
  8. Very specific:

    Check getJiraIssueRemoteIssueLinks first to avoid creating duplicate links.

    line 133
  9. Distinctive:

    Do not link tickets across different cluster names.

    line 134
  10. Distinctive:

    If a more specific link type is available (e.g.

    line 135
  11. Distinctive:

    If more than one eligible ticket exists, ask which to fix:

    line 157
  12. Distinctive:

    Write the spec anyway.

    line 172
  13. Distinctive:

    After all requested phases complete, output a summary:

    line 182
  14. Distinctive:

    Never: write to Jira without an explicit yes from the user.

    line 222
  15. Distinctive:

    Never: run Phase 4 on tickets with Medium or Low triage confidence.

    line 225
  16. Distinctive:

    If Jira MCP is unavailable, stop at Step 0 and report the connection issue.

    line 227
  17. Distinctive:

    If the codebase has no AGENTS.md/CLAUDE.md or documented conventions, ci-autofix proceeds with best-effort context (README, existing code …

    line 228
  18. Distinctive:

    If the user interrupts mid-phase, stop cleanly.

    line 231

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

CI Workflow

End-to-end orchestrator for the Customer Investigation ticket pipeline. Runs all sub-skills in sequence, collects their proposed actions into a single confirmation step per phase, and stops cleanly if anything fails.

The engineer is never cut out of the loop. Every Jira write is previewed and confirmed before it happens. Autofix PRs are always opened as drafts.


Usage

/ci-workflow <PROJECT> [--kb-url <KB_URL>] [--issue-type <TYPE>] [phase]

Examples:
  /ci-workflow MYPROJ
  /ci-workflow MYPROJ --kb-url https://support.example.com
  /ci-workflow MYPROJ triage
  /ci-workflow MYPROJ enrich
  /ci-workflow MYPROJ autofix

Phases: triage | enrich | link | autofix
  • PROJECT — Jira project key (required)
  • --kb-url — Base URL of your product knowledge base (optional, enables KB check in triage)
  • --issue-type — Jira issue type to target (default: "Customer Investigation")
  • phase — Run only one phase instead of the full pipeline

Phase overview

Phase 1 — Triage      Classify open CI tickets. Post AI Triage comment on each.
Phase 2 — Enrich      Detect thin tickets. Post enrichment request on each.
Phase 3 — Link        Create Jira issue links between clustered bug tickets.
Phase 4 — Autofix     For eligible bugs: find code, write spec, implement, open draft PR.

Phases run sequentially. Each phase's output feeds the next (e.g., triage classifications gate which tickets are eligible for autofix).

If a specific phase argument is provided, run only that phase.


Step 0 — Orientation

Before starting, fetch open CI tickets and print a brief status snapshot:

CI queue — <PROJECT> — <date>

Open tickets:          N
Already triaged:       N  (have AI Triage comment)
Already enriched:      N  (have AI Enrich comment)
Eligible for autofix:  N  (Bug, High confidence, confirmed repro, single-service)

Running: [full pipeline | triage only | ...]

No Jira writes happen during this step. This gives a sense of queue size before any work begins.


Phase 1 — Triage

Invoke the triage logic from ci-triage/SKILL.md, passing PROJECT, --kb-url (if provided), and --issue-type.

Key steps:

  1. Fetch open CI tickets (limit 50, paginate if needed).
  2. Skip tickets that already have an AI Triage comment.
  3. For each remaining ticket: run KB check (fetch and verify article content), existing bug check, and assign classification + confidence.
  4. Confirmation gate: Show all proposed triage comments. Wait for yes/no.
  5. Post comments on confirmed tickets.
  6. Report: N classified, N skipped, N posted.

If the user runs /ci-workflow <PROJECT> triage, stop after this phase.


Phase 2 — Enrich

Invoke the enrich logic from ci-enrich/SKILL.md.

Key steps:

  1. Re-use the ticket list from Phase 1 (no second fetch needed if run together).
  2. Skip tickets already enriched, KB-answerable, or with sufficient detail.
  3. Score each ticket: thin if missing 2+ of (steps, expected, actual, env, confirmed repro).
  4. Confirmation gate: Show all proposed enrichment comments. Wait for yes/no.
  5. Post comments on confirmed tickets.
  6. Report: N thin, N skipped, N posted.

If the user runs /ci-workflow <PROJECT> enrich, stop after this phase.


Phase 3 — Link clusters

For each bug cluster identified in Phase 1 (classification Bug — [cluster name], confidence High), create formal Jira issue links between the clustered tickets.

Steps:

  1. Identify clusters: groups of 2+ tickets sharing the same cluster name from triage.
  2. For each cluster, propose the links:
Ready to create issue links for bug clusters?

Cluster: "export timeout" (<PROJECT>-12, <PROJECT>-18, <PROJECT>-24)
  → Link <PROJECT>-18 "is related to" <PROJECT>-12
  → Link <PROJECT>-24 "is related to" <PROJECT>-12

Create these N links? (yes/no)
  1. Wait for explicit confirmation.
  2. Call createIssueLink for each confirmed pair. Use link type "is related to".
  3. Report: N links created across N clusters.

Guardrails:

  • Check getJiraIssueRemoteIssueLinks first to avoid creating duplicate links.
  • Do not link tickets across different cluster names.
  • If a more specific link type is available (e.g. "duplicates"), prefer it for near-identical reproductions of the same bug.

If the user runs /ci-workflow <PROJECT> link, stop after this phase.


Phase 4 — Autofix

For each ticket that meets all autofix gate conditions, propose and open a draft fix PR.

Gate conditions (from ci-autofix/SKILL.md):

GatePass condition
ClassificationAI Triage classifies ticket as Bug (cluster or standalone)
ConfidenceAI Triage confidence is High
Repro confirmedConfirmed reproduction by support, or detailed payload/trace
ScopeSingle endpoint, single UI component, or single data model in the codebase

Steps:

  1. List all tickets passing all four gates.
  2. If more than one eligible ticket exists, ask which to fix:
N tickets are eligible for autofix:

  <PROJECT>-42: [summary] — Bug standalone, High confidence
  <PROJECT>-51: [summary] — Bug (cluster), High confidence

Fix all of these in sequence, or pick one? (all / <PROJECT>-XX)
  1. For each selected ticket, run the full autofix flow from ci-autofix/SKILL.md.
  2. Complete one ticket end-to-end before starting the next. Do not interleave.

If a ticket fails the autofix flow:

  • Write the spec anyway.
  • Post a failure note to Jira (after confirmation) explaining what was attempted.
  • Continue to the next eligible ticket.

If the user runs /ci-workflow <PROJECT> autofix, stop after this phase.


Final report

After all requested phases complete, output a summary:

CI Workflow — run complete (<PROJECT> · <date>)

Phase 1 — Triage
  Tickets scanned:        N
  Already triaged:        N  (skipped)
  Comments posted:        N
    KB-answerable:        N
    Bug clusters:         N  (list cluster names)
    Standalone bugs:      N
    Docs gaps:            N
    Needs investigation:  N

Phase 2 — Enrich
  Tickets evaluated:      N
  Already enriched:       N  (skipped)
  Enrichment posted:      N

Phase 3 — Link
  Clusters found:         N
  Issue links created:    N

Phase 4 — Autofix
  Eligible tickets:       N
  PRs opened:             N  (list PR links)
  Specs written:          N
  Failed / skipped:       N

Next suggested actions:
  - Review draft PRs: [links]
  - Tickets needing more info: [keys]
  - Cluster tickets to monitor: [keys]

Guardrails

  • Never write to Jira without an explicit yes from the user.
  • Never push directly to main or master.
  • Never open a non-draft PR.
  • Never run Phase 4 on tickets with Medium or Low triage confidence.
  • Never interleave implementation work across multiple autofix tickets.
  • If Jira MCP is unavailable, stop at Step 0 and report the connection issue.
  • If the codebase has no AGENTS.md/CLAUDE.md or documented conventions, ci-autofix proceeds with best-effort context (README, existing code patterns) and notes the gap in its spec. Triage and enrich phases are unaffected either way.
  • If the user interrupts mid-phase, stop cleanly. Do not partially post comments.

Using skills directly

Each sub-skill can be invoked independently for targeted use:

Direct invocationUse when
/ci-triage <PROJECT>Only want to classify, no enrich or autofix
/ci-enrich <PROJECT>Queue is already triaged, just sweep for thin tickets
/ci-autofix <TICKET-KEY>Jump straight to fixing a specific ticket
/ci-workflow <PROJECT>Full sweep before sprint planning

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.