# @hyperprior/pi-subagent

Launch isolated subagent runs through `pi` subprocesses.

## Installation

```bash
pi install npm:@hyperprior/pi-subagent
```

## Features

- `hyperpi_subagent` tool with execution modes:
  - `single`: one task
  - `parallel`: run multiple tasks with bounded concurrency
  - `chain`: sequential tasks where each task can reference `{previous}`
- Per-task model/tool/cwd overrides
- `/subagent <task>` quick command for one-off runs

## Example payloads

```json
{
  "mode": "single",
  "task": "List the top 3 risks in the current diff.",
  "model": "sonnet",
  "tools": "bash,git"
}
```

```json
{
  "mode": "parallel",
  "tasks": [
    { "task": "Run targeted tests for payment module.", "agent": "qa" },
    { "task": "Run static scan for hardcoded secrets.", "agent": "security" }
  ]
}
```

```json
{
  "mode": "chain",
  "chain": [
    { "task": "Summarize open PR comments." },
    { "task": "Create a patch plan based on previous summary: {previous}" }
  ]
}
```

## Notes

All plugins in this monorepo are namespaced under `@hyperprior` and built to be loaded as individual pi packages.
