Handle SLEAP GitHub support workflow for issues and discussions. Use when the user says "support", provides a GitHub issue/discussion number like "#2512", or asks to investigate a user report from talmolab/sleap. Scaffolds investigation folders, downloads posts with images, analyzes problems, and drafts friendly responses.
Handle GitHub issues and discussions from talmolab/sleap with a systematic investigation process.
When given an issue/discussion number:
# Check both issues AND discussions (users often post in wrong category)
gh issue view 2512 --repo talmolab/sleap --json number,title,body,author,createdAt,comments 2>/dev/null || \
gh api repos/talmolab/sleap/discussions/2512 2>/dev/null
First, check if an investigation already exists:
ls -d scratch/*-*2512* 2>/dev/null || echo "No existing investigation"
If none exists, create one:
mkdir -p scratch/$(date +%Y-%m-%d)-{issue|discussion}-2512-{short-description}
For Issues:
gh issue view NUMBER --repo talmolab/sleap --json number,title,body,author,createdAt,comments,labels > scratch/.../issue.json
For Discussions:
gh api repos/talmolab/sleap/discussions/NUMBER > scratch/.../discussion.json
Extract image URLs from the post body and download:
# Parse markdown image links: 
grep -oP '!\[.*?\]\(\K[^)]+' scratch/.../issue.json | while read url; do
wget -P scratch/.../images/ "$url"
done
Convert the JSON to readable markdown with inline images:
# Issue/Discussion #NUMBER: Title
**Author**: @username
**Created**: YYYY-MM-DD
**Platform**: (extract from post if mentioned)
**SLEAP Version**: (extract from post if mentioned)
## Original Post
[post body with images referenced inline]
## Comments
[any replies]
Create scratch/.../README.md:
# Investigation: Issue/Discussion #NUMBER
**Date**: YYYY-MM-DD
**Post**: https://github.com/talmolab/sleap/{issues|discussions}/NUMBER
**Author**: @username
**Type**: Bug Report | Usage Question | Feature Request
## Summary
[1-2 sentence summary of the issue]
## Key Information
- **Platform**: Windows/macOS/Linux
- **SLEAP Version**: X.Y.Z
- **GPU**: (if relevant)
- **Dataset**: (if described)
## Preliminary Analysis
[Initial thoughts on what might be happening]
## Areas to Investigate
- [ ] Check area 1
- [ ] Check area 2
## Files
- `USER_POST.md` - Original post content
- `images/` - Downloaded screenshots
- `RESPONSE_DRAFT.md` - Draft response (when ready)
Before deep investigation, check if the issue was already fixed:
# Get user's SLEAP version from their post (look for sleap doctor output or sleap.__version__)
USER_VERSION="1.4.0" # example
# Check sleap releases for fixes
gh release list --repo talmolab/sleap --limit 20
gh release view v1.5.0 --repo talmolab/sleap --json body -q '.body' | grep -i "fix"
# For sleap-io issues
gh release list --repo talmolab/sleap-io --limit 10
gh release view v0.6.0 --repo talmolab/sleap-io --json body -q '.body'
# For sleap-nn/training issues
gh release list --repo talmolab/sleap-nn --limit 10
gh release view v0.2.0 --repo talmolab/sleap-nn --json body -q '.body'
If a fix exists in a newer version:
If investigating an unfixed bug:
# Clone repos if not present
[ -d scratch/repos/sleap-io ] || gh repo clone talmolab/sleap-io scratch/repos/sleap-io
[ -d scratch/repos/sleap-nn ] || gh repo clone talmolab/sleap-nn scratch/repos/sleap-nn
# Checkout user's version
cd scratch/repos/sleap-io && git fetch --tags && git checkout v0.5.0
cd scratch/repos/sleap-nn && git fetch --tags && git checkout v0.1.5
# Now you're looking at the code they're actually running
Use git blame to find potential culprits:
# Find when a suspicious function was last changed
git blame -L 50,100 sleap/io/main.py
# Check if a line was changed recently
git log --oneline -5 -- path/to/file.py
# Find the commit that introduced a specific change
git log -S "function_name" --oneline
Determine the issue type:
Usage Question: Check if documentation covers this. Common topics:
Bug Report: Try to reproduce. Check:
Feature Request: Note for tracking, no immediate action needed.
When to request SLP file:
Suggest upload to https://slp.sh - our SLP file sharing service.
If SLP provided: Download and analyze:
sio show path/to/file.slp --summary
sio show path/to/file.slp --videos
sio show path/to/file.slp --skeleton
Create RESPONSE_DRAFT.md following this structure:
Hi @{username},
Thanks for the post!
[Restate understanding: "If I understand correctly, you're seeing X when you try to Y..."]
[Provide solution OR request more info]
[If requesting info, give EXPLICIT instructions:]
- Use `sleap doctor` CLI for diagnostics
- Provide copy-paste terminal commands
- Assume non-technical user
Let us know if that works for you!
Cheers,
:heart: Talmo & Claude :robot:
<details>
<summary><b>Extended technical analysis</b></summary>
[Detailed investigation notes, code traces, version checks]
</details>
:heart: Talmo & Claude :robot:Terminal commands must be copy-paste ready:
# Good - one-liner, no environment activation needed
sleap doctor
# Good - uses uvx for isolated execution
uvx sio show your_file.slp --summary
# Bad - assumes environment knowledge
source activate sleap && python -c "import sleap; print(sleap.__version__)"
For data/I/O issues - Check talmolab/sleap-io:
../sleap-io (preferred)gh repo clone talmolab/sleap-io scratch/repos/sleap-iosleap-io/docs/examples.md, sleap-io/docs/formats/SLP.mdsio show --help for inspection commandsFor training/inference issues - Check talmolab/sleap-nn:
../sleap-nn (preferred)gh repo clone talmolab/sleap-nn scratch/repos/sleap-nnsleap-track with different settingsALWAYS confirm with the developer before posting:
Never post automatically - support responses represent the project.