swarm-ticket-drafter

star 0

Turn approved audit findings into GitHub issues on erp-mafia/gnubok. Used by /swarm after user approval, but also standalone when you have findings from another source (manual review, old report files). Handles dedup against open issues, issue formatting, label assignment, and batch creation with partial-failure tolerance.

tombii By tombii schedule Updated 4/22/2026

name: swarm-ticket-drafter description: "Turn approved audit findings into GitHub issues on erp-mafia/gnubok. Used by /swarm after user approval, but also standalone when you have findings from another source (manual review, old report files). Handles dedup against open issues, issue formatting, label assignment, and batch creation with partial-failure tolerance."

swarm-ticket-drafter

Converts a list of approved audit findings into GitHub issues on erp-mafia/gnubok. One finding → one issue.

When to use

  • Invoked by the /swarm orchestrator in step 8 (post-approval ticket creation).
  • Standalone: you have a findings report file (e.g., an old .swarm/{timestamp}/findings.md) and want to turn approved items into tickets.

Input shape

For each finding:

Field Example
agent vat (short name)
title Missing VIES timeout handling
severity critical | high | medium | low
file lib/vat/vies-client.ts:47
description When VIES responds slowly, the request hangs with no timeout, blocking the invoice save flow.
suggestedFix Wrap the fetch in AbortController with 10s timeout; show Swedish "VIES-valideringen tog för lång tid" on timeout.

Workflow

1. Dedup check (skip if orchestrator already did it)

mcp__github__list_issues(owner="erp-mafia", repo="gnubok", state="open", perPage=100)

Paginate if needed. For each finding, check open issues for:

  • Title keyword overlap (3+ significant words)
  • Same file path mentioned in body
  • Same domain + similar symptom

Flag matches as duplicates. Duplicates are not created.

2. Confirm approval

If the caller hasn't explicitly provided an approval list, show the proposed issues and ask:

Create these N issues? (yes / no / specific numbers)

Never create issues without confirmation.

3. Create issues

For each approved, non-duplicate finding, call:

mcp__github__issue_write(
  method="create",
  owner="erp-mafia",
  repo="gnubok",
  title="[{agent}] {title}",
  body=<see template below>,
  labels=["audit", "severity-{severity}"]
)

Body template (exact format — don't paraphrase):

**Severity**: {severity}
**File**: `{file}`

### Description
{description}

### Suggested fix
{suggestedFix}

---
_Generated by `/swarm` audit._

4. Handle label failures gracefully

If the issue creation fails with a "label not found" error, retry the exact same call with labels=[]. Don't abort the batch.

Record which issues got labels and which didn't, for the final report.

5. Report results

Return a compact summary:

Created N issues on erp-mafia/gnubok:
- #123 [vat] Missing VIES timeout handling → https://github.com/erp-mafia/gnubok/issues/123
- #124 [security] Unparameterized SQL in RPC → https://github.com/erp-mafia/gnubok/issues/124

Skipped M duplicates:
- {title} (already tracked: #142)

Failed K:
- {title}: {error reason}

Rules

  • One issue per finding. Never batch multiple findings into a single issue.
  • Never create without approval. Approval comes from the caller (usually the user via /swarm).
  • Never create for duplicates. If a dupe was flagged, skip and note it.
  • Partial failure tolerance. A single ticket failure must not stop the batch.
  • Issue title convention: [{agent-short-name}] {title}. Keep titles under 80 chars — truncate with if needed.
  • No automation of comments, assignments, or project-board moves. Just create the issue with title, body, and labels.
Install via CLI
npx skills add https://github.com/tombii/gnubok --skill swarm-ticket-drafter
Repository Details
star Stars 0
call_split Forks 0
navigation Branch main
article Path SKILL.md
More from Creator