Metadata-Version: 2.5
Name: takumai
Version: 0.0.1
Summary: Validate pack manifests for specialist agent harnesses
Author: sandsong-labs
License-Expression: MIT
License-File: LICENSE
Keywords: agents,harness,manifest,validation
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Typing :: Typed
Requires-Python: >=3.11
Provides-Extra: dev
Requires-Dist: build; extra == 'dev'
Requires-Dist: pytest; extra == 'dev'
Requires-Dist: ruff; extra == 'dev'
Requires-Dist: twine; extra == 'dev'
Description-Content-Type: text/markdown

# takumai

takumai is a harness for packs: bundles of specialist agents, blueprints, policy, and verification. This release provides a validator for `pack.toml` manifests.

## Status

Pre-alpha (0.0.1). The manifest format may change.

## Install

```sh
pip install takumai
```

Requires Python 3.11 or newer.

## Usage

Validate a pack directory or manifest file:

```sh
takumai validate examples/devops
takumai validate examples/devops/pack.toml --strict --format json
takumai --version
```

Exit codes: `0` valid, `1` issues found, `2` manifest could not be loaded. `--strict` also checks that referenced files exist.

```python
from takumai import load, validate

for issue in validate(load("examples/devops/pack.toml")):
    print(f"{issue.path}: {issue.message}")
```

## Manifest

```toml
[pack]
name = "devops"
version = "0.1.0"
description = "Infrastructure changes"

[[specialists]]
name = "scoper"
role = "reader"
description = "Turns a ticket into a change plan"
skills = ["skills/scoping"]
tools = ["read_file", "search_code"]
input = "contracts/ticket.json"
output = "contracts/change_plan.json"

[[specialists]]
name = "iac_author"
role = "builder"
description = "Writes infrastructure-as-code changes"
skills = ["skills/terraform"]
tools = ["read_file", "write_file", "terraform_plan"]
input = "contracts/change_plan.json"
output = "contracts/change_set.json"

[[specialists]]
name = "verifier"
role = "verifier"
description = "Checks that a change holds"
skills = ["skills/verification"]
tools = ["read_file", "run_check"]
input = "contracts/change_set.json"
output = "contracts/verdict.json"

[[blueprints]]
name = "infra_change"

[[blueprints.nodes]]
id = "scope"
kind = "agentic"
specialist = "scoper"
next = ["implement"]

[[blueprints.nodes]]
id = "implement"
kind = "agentic"
specialist = "iac_author"
next = ["checks"]

[[blueprints.nodes]]
id = "checks"
kind = "deterministic"
run = "checks/static.sh"
next = ["verify"]

[[blueprints.nodes]]
id = "verify"
kind = "agentic"
specialist = "verifier"

[policy]
risk_tiers = ["low", "medium", "high"]
human_gate_at = "high"
write_allowlist = ["infra/**"]
```

Rules enforced:

- Names are unique; each specialist has 1 to 3 skills and a non-empty tool allowlist.
- Every blueprint node is reachable and a terminal node exists.
- A blueprint with a builder also has a deterministic node or a verifier.
- Scenarios are visible only to verifier specialists.
- `human_gate_at` is a declared risk tier.

## Development

```sh
pip install -e ".[dev]"
ruff check . && ruff format --check . && pytest
```

## License

MIT. See `LICENSE`.
