Skip to content

Cookbook

Practical recipes and patterns for common spectryn use cases.

Common Patterns

Sync on Every Commit

Keep Jira automatically in sync with your documentation:

yaml
# .github/workflows/jira-sync.yml
on:
  push:
    paths: ['docs/**/*.md']
    branches: [main]

jobs:
  sync:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: pip install spectryn
      - run: |
          for file in docs/*.md; do
            epic=$(basename "$file" .md)
            spectryn -m "$file" -e "$epic" -x --no-confirm
          done

Validate Before Merge

Catch formatting errors in pull requests:

yaml
on:
  pull_request:
    paths: ['docs/**/*.md']

jobs:
  validate:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: pip install spectryn
      - run: spectryn -m docs/EPIC.md -e PROJ-123 --validate

Weekly Sync Report

Get a summary of what changed:

bash
#!/bin/bash
# weekly-sync.sh

spectryn -m EPIC.md -e PROJ-123 -x --no-confirm --export weekly-report.json

# Parse and send to Slack
jq '.results | "Stories: \(.stories_processed), Subtasks: \(.subtasks_created)"' \
  weekly-report.json | xargs -I {} curl -X POST "$SLACK_WEBHOOK" -d '{"text":"{}"}'

Released under the MIT License.