Metadata-Version: 2.4
Name: allfly-crew
Version: 0.0.2
Summary: Allfly's unified AI toolset, starting with PR/code review, built with crewAI and AWS Bedrock
Author-email: allfly-dev <engineering@allfly.io>
License-Expression: MIT
Requires-Python: <3.14,>=3.10
Requires-Dist: crewai[bedrock]
Description-Content-Type: text/markdown

# allfly-crew

`allfly-crew` is Allfly's unified AI toolset: a home for company-wide automation
built on [crewAI](https://github.com/crewAIInc/crewAI) and AWS Bedrock, designed so
new capabilities can be added over time without restructuring.

The first feature is **PR/code review**: crewAI agents that read a project's review
standards and a git diff, then produce structured findings (file, line, severity,
comment). It ships in two modes:

- **`diff`** — a single generalist reviewer, driven by `review_criteria.md`.
- **`categorized`** — one specialist agent per rule category (one subdirectory of
  `.md` rule files = one category), run concurrently via `asyncio.gather`, each
  scoped to only its own category's rules.

## Layout

```
src/allfly_crew/
├── main.py          # top-level entrypoint, dispatches to sub-crews
├── reviews/         # the PR/code review sub-crew
│   ├── crew.py               # diff mode (single generalist reviewer)
│   ├── categorized_review.py # categorized mode (specialist agents)
│   ├── config/                # agents.yaml / tasks.yaml for diff mode
│   ├── standards/              # universal rule content (future)
│   └── tools/
│       └── git_diff_tool.py
├── architecture/    # placeholder for a future sub-crew
└── devops/          # placeholder for a future sub-crew
```

## Usage

```bash
uv sync

# Single-reviewer diff mode
uv run python -m allfly_crew.main reviews diff <repo_path> <base_ref> [head_ref]

# Categorized mode: one specialist reviewer per rules_dir subdirectory
uv run python -m allfly_crew.main reviews categorized <rules_dir> <repo_path> <base_ref> [head_ref]
```

Requires AWS Bedrock credentials and a `BEDROCK_MODEL_ID` environment variable
(see `.env.example`).

More sub-crews (architecture, devops, ...) and a universal rule-selection model
(`allfly-crew.toml`) are planned; see `prompt.md` for the full roadmap.

## Installing as a CLI

Once published to PyPI, install as a standalone tool (no venv activation needed):

```bash
uv tool install allfly-crew
# or
pipx install allfly-crew

allfly-crew reviews diff <repo_path> <base_ref> [head_ref]
```

## Release Procedures

- This project uses "trunk" based development off of `master`.
- PRs are allowed but always folded back to `master`.
- **To release**: go to the repo's Actions tab, run the **Publish** workflow, and
  choose a bump type (`patch`, `minor`, `major`). It bumps the version in
  `pyproject.toml`, tags the release, builds with `uv build`, publishes to PyPI,
  and creates a GitHub release.
