Metadata-Version: 2.4
Name: exactor
Version: 0.1.0
Summary: Enforce the discipline your AGENTS.md only suggests.
Project-URL: Homepage, https://github.com/HeinrichvH/Exactor
Project-URL: Repository, https://github.com/HeinrichvH/Exactor
Project-URL: Issues, https://github.com/HeinrichvH/Exactor/issues
Project-URL: Changelog, https://github.com/HeinrichvH/Exactor/releases
Author-email: Heinrich von Helmolt <heinrich.vonhelmolt@aquilo-solutions.com>
License: MIT License
        
        Copyright (c) 2026 Heinrich
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: agents,claude-code,delegation,hooks,llm,research,subagents
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS
Classifier: Operating System :: POSIX
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Topic :: Utilities
Requires-Python: >=3.11
Requires-Dist: pyyaml>=6.0
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == 'dev'
Description-Content-Type: text/markdown

# exactor

*Disciplinam quam AGENTS.md tantum suggerit, impone.*  
Enforce the discipline your AGENTS.md only suggests.

Exactor is a Claude Code hooks layer that makes subagent delegation mandatory, not optional. Configure once in `.exactor.yml` — your researcher, explorer, and log digger fire every time, not just when the model decides to.

## The problem

You write in your AGENTS.md: *"use the researcher tool for web questions."*  
The model reads it. Sometimes follows it. Often doesn't.

Exactor turns that suggestion into a constraint. A `WebSearch` call triggers your researcher. A `grep` triggers your explorer. The raw tool never fires. Not sometimes — always.

## How it works

Claude Code fires hooks before and after every tool call. Exactor sits in those hooks, matches tool calls against rules you define in `.exactor.yml`, and routes them to the configured worker instead. Workers are plain shell commands — bring your own.

```yaml
# .exactor.yml
workers:
  research:
    command: "research {query}"
  explore:
    command: "explore {query}"

intercept:
  - tool: WebSearch
    route_to: research
  - tool: Bash
    match: "^(grep|rg|find)\\b"
    route_to: explore
```

## Recipes

Ready-made configs for common researcher and explorer tools live in [`recipes/`](recipes/).
Copy the one matching your setup and drop it in your repo root.

- [`recipes/vibe`](recipes/vibe) — [Mistral Vibe](https://github.com/mistralai/mistral-vibe)
  as a mandatory researcher
- more coming (Claude CLI, Perplexity, Ollama — contributions welcome)

## Worker contract

A worker is any CLI that:

- accepts the intercepted query via `{query}` substitution
- reads nothing from stdin (by default; configurable via `stdin:`)
- writes the result to stdout
- writes errors to stderr
- exits 0 on success, non-zero on failure

Pass flags via `args:`, secrets via `env:`. See [`recipes/vibe/.exactor.yml`](recipes/vibe/.exactor.yml)
for a complete example.

## Status

Early development. Core hook dispatcher and SQLite working-memory cache
are in place. Structured worker invocation (`args` / `env` / `stdin` / `cwd`)
landed.

## Installation

```bash
pipx install exactor
exactor init
```

*Published to PyPI soon.*

## License

MIT
