Metadata-Version: 2.4
Name: work-intelligence-agent
Version: 0.1.0
Summary: CLI tool that automates weekly work reporting by scanning git history across multiple repositories
License-Expression: MIT
Requires-Python: >=3.11
Requires-Dist: fastmcp
Provides-Extra: test
Requires-Dist: hypothesis; extra == 'test'
Requires-Dist: pytest; extra == 'test'
Description-Content-Type: text/markdown

# Work Intelligence Agent

Automated weekly work reporting from git history across multiple repositories.

## What It Does

Point the agent at a directory (or list of repos) and an author name, and it produces a clean markdown report of the week's work — grouped by day, organized by repository, with similar commits summarized together.

## Installation

Requires Python 3.11+ and `git` on your PATH.

```bash
pip install work-intelligence-agent
```

Or run directly with `uvx`:

```bash
uvx work-intelligence-agent --author "Your Name" --parent-directory ~/projects
```

## CLI Usage

```bash
# Scan a parent directory for repos and generate a report
work-intelligence --author "Jane Doe" --parent-directory ~/projects

# Specify repos explicitly
work-intelligence --author "Jane Doe" --repositories ~/projects/repo-a ~/projects/repo-b

# Custom date range
work-intelligence --author "Jane Doe" --parent-directory ~/projects \
  --start-date 2025-01-06 --end-date 2025-01-12

# Write output to a file
work-intelligence --author "Jane Doe" --parent-directory ~/projects --output report.md
```

### CLI Options

| Option | Description |
|--------|-------------|
| `--author` | Author name for filtering commits (required) |
| `--parent-directory` | Directory to scan recursively for git repos |
| `--repositories` | Explicit list of repo paths |
| `--start-date` | Start date, YYYY-MM-DD (default: 7 days ago) |
| `--end-date` | End date, YYYY-MM-DD (default: today) |
| `--output` | Output file path (default: stdout) |
| `--config` | Config file path (default: `.kiro/work-intelligence.json`) |

## Configuration File

Place a JSON config at `.kiro/work-intelligence.json` to set defaults:

```json
{
  "author": "Jane Doe",
  "parent_directory": "~/projects",
  "date_range": {
    "start": "2025-01-06",
    "end": "2025-01-12"
  }
}
```

CLI arguments override config file values.

## MCP Server

The agent also runs as an MCP server for integration with AI tools like Kiro.

```json
{
  "mcpServers": {
    "work-intelligence-agent": {
      "command": "uvx",
      "args": ["--from", "work-intelligence-agent", "work-intelligence-mcp"]
    }
  }
}
```

The server exposes three tools:

- **`generate_report`** — Full weekly report generation
- **`scan_repos`** — Discover git repos under a directory
- **`extract_history`** — Extract raw commit history

## Development

```bash
# Install with test dependencies
pip install -e ".[test]"

# Run tests
pytest

# Run the MCP server locally
work-intelligence-mcp
```

## License

MIT
