Skip to main content

AI-powered GitHub issue and PR triage for the medical AI community

Project description

WeaveRx — medical AI GitHub issue triage

WeaveRx

Medical AI GitHub issue triage with auditable drafts, local safeguards, and human-in-the-loop defaults.

WeaveRx helps maintainers triage issues faster — reproducibility blockers, dataset access, subgroup performance, privacy/DICOM, and clinical validation requests — with sources (issue excerpts that grounded the decision) and safeguard scores (local heuristics, no extra LLM calls).

Built for medical AI maintainers and research groups who need practical tooling — not a gatekeeper bot.

CI PyPI Release Python MIT License GitHub stars Docs

Contents: Features · Quickstart · See it in action · Installation · Safety · Reference · Docs


Features

  • Domain-tuned — eight medical AI categories (reproducibility, DICOM/privacy, clinical validation, subgroup performance, and more)
  • Safety by default — dry-run unless you explicitly post; --confirm required for GitHub writes; local safeguard heuristics on every draft
  • Auditablesources cite issue excerpts; safeguard scores are computed locally with no LLM on that path
  • Your LLM stack — Grok, Anthropic, or OpenAI-compatible endpoints via LiteLLM; mock mode for offline CI and demos

Full docs: docs/index.md · Configuration: docs/configuration.md


Quickstart

Requires Python 3.11+. Environment variables: docs/configuration.md.

1. Mock (zero API keys)

weaverx triage --repo Project-MONAI/MONAI --issue 42 --mock

2. Dry-run (real GitHub, offline LLM)

weaverx triage --repo Project-MONAI/MONAI --issue 1234 --mock-llm --dry-run

3. Real LLM (Grok example)

export XAI_API_KEY=xai-...
weaverx triage --repo Project-MONAI/MONAI --issue 1234 --dry-run --json

More providers: LLM providers · examples/llm_provider_examples.md

4. JSON for automation

weaverx triage --repo Project-MONAI/MONAI --issue 42 --mock --json

See it in action

Command (no API keys): weaverx triage --repo Project-MONAI/MONAI --issue 42 --mock

Clean triage

WeaveRx CLI: category, status, sources, clean safeguard, draft panel

Typical output: reproducibility category, ready_for_review status, source excerpts, CLEAN safeguard (0.0/10), and a postable draft in the green panel.

Text capture (accessibility / no images)

See examples/captures/triage-clean.txt.

Safeguard warning

Safeguard checks are advisory — they flag drafts for review; they never auto-block posting.

WeaveRx CLI: HIGH RISK safeguard flags and red draft panel border

When heuristics fire (e.g. credential-like patterns, heavy repetition), the table shows Safeguard flags, status escalates to HIGH RISK / REVIEW RECOMMENDED, and the draft panel border turns yellow or red.

Text capture + JSON

Try it: weaverx triage --repo Project-MONAI/MONAI --issue 42 --mock -v

Example JSON output
{
  "repo": "Project-MONAI/MONAI",
  "status": "ready_for_review",
  "issue": { "number": 42, "title": "Unable to reproduce nnU-Net training results on BraTS subset" },
  "analysis": { "category": "reproducibility-environment", "priority": "high" },
  "sources": [{ "type": "issue_body", "snippet": "...", "reason": "..." }],
  "draft_response": "Hi @researcher-dev — thank you for documenting this carefully...",
  "safeguard": { "score": 0.0, "status": "clean", "triggered": [] },
  "llm": { "provider": "mock", "model": "mock" },
  "dry_run": true
}

Full JSON: examples/sample_triage_output.json


Installation

pip install weaverx

Or install from GitHub:

pip install git+https://github.com/FratresMedAI/WeaveRx.git@v0.1.1

Contributors / local dev:

git clone https://github.com/FratresMedAI/WeaveRx.git
cd WeaveRx
pip install -e ".[dev]"

Documentation: fratresmedai.github.io/WeaveRx


Safety and responsible use

WeaveRx is human-in-the-loop by design. Drafts require maintainer review before posting.

  1. Never paste patient data in GitHub issues. Privacy flags are heuristic, not guaranteed.
  2. Default is read-only. Writes need --post-comment/--apply-labels and --confirm.
  3. Use --dry-run on repos you don't maintain.
  4. Use --mock in CI and local demos without tokens.
  5. Review safeguard warnings before posting flagged drafts.

Not for clinical use — maintainer support tooling only, not medical advice or a clinical decision system. Does not replace IRB, legal, or compliance review.

Read more: ETHICS.md · SECURITY.md · SUPPORT.md


GitHub Action

Dry-run triage when issues are opened:

- uses: FratresMedAI/WeaveRx@v0.1.1
  with:
    repo: ${{ github.repository }}
    issue_number: ${{ github.event.issue.number }}
    dry_run: "true"
    llm_provider: "grok"
  env:
    XAI_API_KEY: ${{ secrets.XAI_API_KEY }}

GitHub Actions log showing WeaveRx dry-run triage output

See action.yml and .github/workflows/triage-on-issue.yml.


Reference

LLM providers
Provider CLI API key env Default model
Grok --llm-provider grok XAI_API_KEY xai/grok-2-latest
Anthropic --llm-provider anthropic ANTHROPIC_API_KEY anthropic/claude-3-5-sonnet-20241022
OpenAI-compatible --llm-provider openai OPENAI_API_KEY openai/gpt-4o

Override: WEAVERX_LLM_MODEL, WEAVERX_LLM_PROVIDER. Details: docs/reference/llm-providers.md

Medical AI categories
Category What we look for
Dataset Access & Licensing Download links, usage terms, attribution
Model Performance (Pathology/Subgroup) Accuracy on specific diseases or patient groups
Reproducibility & Environment MONAI/nnU-Net versions, CUDA/PyTorch, can't reproduce results
Clinical Validation Request External validation, reader studies, deployment
Privacy/Compliance/DICOM PHI, de-identification, HIPAA/GDPR, DICOM metadata
Bug Crashes, incorrect outputs
Feature/Integration Request New capabilities, framework hooks
Documentation Missing or unclear tutorials and API docs

Full table: docs/reference/categories.md

Draft safeguards

Local-only checks after every draft — advisory, never auto-block posting. See Safeguard warning above.

Score Status Meaning
0.0 – 2.9 clean No meaningful red flags
3.0 – 6.9 review_recommended Skim draft before posting
7.0 – 10.0 high_risk Multiple or severe heuristics fired

Full reference: docs/reference/safeguards.md

CLI reference
weaverx triage --repo owner/repo [--issue N | --recent N] [options]

Key flags: --mock, --dry-run, --json, --llm-provider, --confirm, --post-comment, --safeguards

Full reference: docs/reference/cli.md


Related projects

  • MONAI — open-source medical AI framework
  • nnU-Net — self-configuring segmentation
  • LiteLLM — unified LLM API (used by WeaveRx)
  • Safire — related audit tooling from the same org

Citing WeaveRx

If you use WeaveRx in research or evaluations, cite via CITATION.cff (GitHub can generate a BibTeX entry from that file).


Roadmap (near-term)

  1. Embedding-based duplicate detection — optional weaverx[embeddings] extra
  2. PR triage mode--pr for pull request review drafts
  3. Expanded provider presets — more medical-AI-tuned prompt templates

See CHANGELOG.md for release history.


Development and contributing

pip install -e ".[dev]"
pre-commit install
ruff check .
mypy src/weaverx
pytest --cov=weaverx

CONTRIBUTING.md · CODE_OF_CONDUCT.md · docs/releasing.md


License

MIT — see LICENSE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

weaverx-0.1.1.tar.gz (611.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

weaverx-0.1.1-py3-none-any.whl (29.2 kB view details)

Uploaded Python 3

File details

Details for the file weaverx-0.1.1.tar.gz.

File metadata

  • Download URL: weaverx-0.1.1.tar.gz
  • Upload date:
  • Size: 611.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for weaverx-0.1.1.tar.gz
Algorithm Hash digest
SHA256 160b4ccdeb6de6cb6f3a9e8e4ffb7947dded653f5a55e2f1cb837f5e5f131c15
MD5 26cb43866a4a9f1888a6bf483d4addda
BLAKE2b-256 9552c483600c33911581533fe3f06bc78c75ddc896c5f9fc4b5ff731e0634e11

See more details on using hashes here.

Provenance

The following attestation bundles were made for weaverx-0.1.1.tar.gz:

Publisher: release.yml on FratresMedAI/WeaveRx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file weaverx-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: weaverx-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 29.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for weaverx-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fd7006c84d5b925e06a6564d9a05c43874a9d90c26ddb31ca044e2354847b7ce
MD5 bb6800a8a139f122c614f8b5842cc89c
BLAKE2b-256 ffaaf18e11cd242992b454502b633094d2d90c63fb5697f216b601dbbaf5030e

See more details on using hashes here.

Provenance

The following attestation bundles were made for weaverx-0.1.1-py3-none-any.whl:

Publisher: release.yml on FratresMedAI/WeaveRx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page