Skip to main content

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

Project description

WeaveRx logo: neon pink and green wordmark with Rx medical symbol on a dark cyberpunk background of neural networks and circuit traces

WeaveRx

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

PyPI Python 3.11+ MIT License CI Docs

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.

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: Documentation site · Configuration: configuration.md


Quickstart

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

One-liner demo:

pip install weaverx && weaverx triage --repo Project-MONAI/MONAI --issue 42 --mock

0. Install

pip install weaverx

See Installation for development setup and the full guide.

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

See the full installation guide: installation.md

Quick install:

pip install weaverx

Python 3.11+ required.


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.3
  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: 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: 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: 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: 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 -m "not network" --cov=weaverx

CONTRIBUTING.md · CODE_OF_CONDUCT.md · releasing.md

Contributing: Issues, docs fixes, and PRs are welcome — see CONTRIBUTING.md to get started.


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.3.tar.gz (558.0 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.3-py3-none-any.whl (32.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: weaverx-0.1.3.tar.gz
  • Upload date:
  • Size: 558.0 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.3.tar.gz
Algorithm Hash digest
SHA256 cf786072d82e558a37f78133b3b0d71f5f9149629ce420a7e64017ef6df74a74
MD5 0c798e05a91b6d3411b72d8ce414c7d8
BLAKE2b-256 d9aba6707919fc8b261c54eaf4384718c8fa33f72d1e5957619b7f6146e6eb7a

See more details on using hashes here.

Provenance

The following attestation bundles were made for weaverx-0.1.3.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.3-py3-none-any.whl.

File metadata

  • Download URL: weaverx-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 32.5 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9e2a68eaf1715baa85ef22498019e9d21e9ccc65d8af1778c7ef105be64221fd
MD5 2cda1ae0c18e933455b8dc029d42687b
BLAKE2b-256 5e864f732923e08c25747495c56b7d7aa151117bd1a2d5a0605c77928ffdac0f

See more details on using hashes here.

Provenance

The following attestation bundles were made for weaverx-0.1.3-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