AI Analysis Features

slack-ticket’s AI engine is the core differentiator—it doesn’t just copy text from Slack; it understands the conversation and structures it into a proper bug report or feature request.

How It Works

When you run slack-ticket create, the AI processes your Slack thread in two stages:

  1. Thread Collection: The CLI fetches messages from the Slack thread (configurable depth)
  2. AI Processing: The AI analyzes the conversation and generates structured output

Output Schema

The AI generates issues following this structure:

{
  "title": "Short, specific issue title (max 80 chars)",
  "summary": "1-3 sentence description of the issue",
  "steps_to_reproduce": "Numbered steps if inferable, otherwise null",
  "expected_behavior": "What should happen, if inferable",
  "actual_behavior": "What actually happens, if inferable"
}

Title Generation

The AI creates concise, searchable titles:

Titles are truncated to 80 characters maximum to fit GitHub’s requirements.

Summary Extraction

The summary captures the essence of the issue in 1-3 sentences, suitable for:

Context Extraction

When the conversation contains enough context, the AI extracts:

FieldWhen Populated
steps_to_reproduceWhen users describe how to trigger the issue
expected_behaviorWhen someone mentions what should happen
actual_behaviorWhen the actual problem is described

If these cannot be reasonably inferred, they are set to null.


Supported AI Providers

slack-ticket is provider-agnostic—you can switch between providers without changing your workflow.

OpenAI

Recommended models:

Base URL: https://api.openai.com/v1

Anthropic

Recommended models:

Base URL: https://api.anthropic.com

Note: Anthropic uses a different API format. slack-ticket handles this automatically.

Google Gemini

Recommended models:

Base URL: https://generativelanguage.googleapis.com/v1

Ollama (Local)

For teams wanting self-hosted AI:

This option keeps all data local—no external API calls.


Validation & Safety

slack-ticket includes multiple layers of validation to ensure quality and security:

Output Validation

The AI output is validated before creating issues:

  1. JSON Parsing: Ensures valid JSON structure
  2. Required Fields: Title and summary must be present and non-empty
  3. Field Stripping: Removes any disallowed fields the AI might suggest
  4. Content Safety: Strips forbidden content patterns

Forbidden Content

The AI is instructed NOT to suggest:

This keeps issue creation clean and consistent with your team’s conventions.

Retry Logic

If initial parsing fails, slack-ticket:

  1. Strips markdown fences (```json ... ```)
  2. Retries parsing once
  3. Exits with code 4 if persistent failure occurs

Update Command AI

When updating existing issues (slack-ticket update), the AI generates:

{
  "update_summary": "One-line summary of what is new",
  "new_information": "Markdown details, avoiding repetition"
}

The AI compares against the existing issue body to avoid redundancy.


Customization

Timeout Configuration

Adjust AI timeout in your config:

{
  "ai": {
    "timeoutMs": 60000 // Increase for complex threads
  }
}

Model Selection

Choose models based on your priorities:

PriorityRecommended
Qualitygpt-4o or claude-sonnet-4
Speedgpt-4o-mini or claude-3-haiku
CostOllama with llama3
PrivacyOllama (local)

Troubleshooting AI Issues

”AI provider returned non-JSON response”

”AI output validation failed”

”AI request timed out”

”Rate limited (HTTP 429)”


Best Practices

  1. Use descriptive Slack threads: The more context in the conversation, the better the issue
  2. Include error messages: Paste error logs directly in Slack
  3. Mention steps: “I tried X, then Y, and Z happened” helps AI extract reproduction steps
  4. Test with --dry-run: Verify AI output before creating issues

For CLI usage, see Commands Reference.