Metadata-Version: 2.5
Name: covenant-cli
Version: 0.4.0
Summary: Scaffold governed agent services with built-in governance, exit reports, and memory.
Project-URL: Homepage, https://github.com/asalsali/covenant-cli
Project-URL: Issues, https://github.com/asalsali/covenant-cli/issues
Author: Alex Salsali
License: Covenant Public License v1.0
        
        Copyright (c) 2026 Alex Salsali
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to use,
        copy, modify, merge, publish, and distribute the Software, subject to the
        following conditions:
        
        1. The above copyright notice and this permission notice shall be included in
           all copies or substantial portions of the Software.
        
        2. Commercial use is permitted for individual developers and teams generating
           less than $1M USD annual revenue.
        
        3. Organizations generating more than $1M USD annual revenue must contact
           the author for a commercial license.
        
        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,cli,governance,openai,pydantic,scaffold
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Code Generators
Requires-Python: >=3.10
Requires-Dist: click>=8.0
Requires-Dist: jinja2>=3.0
Requires-Dist: rich>=13.0
Description-Content-Type: text/markdown

# covenant-cli

[![PyPI](https://img.shields.io/pypi/v/covenant-cli)](https://pypi.org/project/covenant-cli/)
[![Python 3.10+](https://img.shields.io/badge/python-3.10%2B-blue)](https://www.python.org/downloads/)
[![License: Covenant Public License](https://img.shields.io/badge/license-Covenant%20Public-green)](LICENSE)

**Scaffold governed agent services.** Exit reports, typed I/O, memory inheritance -- from the first line of code.

## Why Covenant CLI?

Every AI agent framework gives you tools to *build* agents. None give you tools to *govern* them.

Covenant CLI scaffolds projects where governance is structural, not aspirational:

- **Exit reports** -- every service run writes what worked, what failed, and what the next run should know
- **Typed I/O** -- Pydantic models for every agent input and output, no `Dict[str, Any]`
- **Memory inheritance** -- agents read prior learnings before acting, not after failing
- **Registry tracking** -- every service and agent registered before it runs
- **Convention rules** -- IDE-native governance rules for Cursor and Claude Code

The difference between an agent that works once and an agent you can trust is governance.

## Quick Start

```bash
pip install covenant-cli

# Create a governed project
covenant init my-project
cd my-project

# Add a governed service
covenant add-service research-agent

# Check project health
covenant status
```

## Commands

| Command | Description |
|---------|-------------|
| `covenant init <name>` | Create a new governed project with GOVERNANCE.md, registry, memory, and convention rules |
| `covenant add-service <name>` | Add a governed service with manager, agents, typed schemas, and exit reports |
| `covenant status` | Show project health: services, recent exit reports, warnings |
| `covenant remember [query]` | Search exit reports, memos, and consolidated summaries by keyword |
| `covenant memo send/list/read` | Cross-service communication via structured memos |
| `covenant consolidate` | Distill exit reports into summaries, optionally archive |

## User Journeys

Four documented paths through the tool:

- [First-Time Setup](USER-JOURNEYS.md#journey-1-first-time-setup) -- scaffold a governed project from scratch
- [Iterative Development](USER-JOURNEYS.md#journey-2-iterative-development) -- the learning loop across runs
- [Debugging a Failing Agent](USER-JOURNEYS.md#journey-3-debugging-a-failing-agent) -- trace failures through exit reports
- [Team Onboarding](USER-JOURNEYS.md#journey-4-team-onboarding) -- orient a new team member in minutes

## The Governance Delta

Without covenant-cli, your agents:
- Run without purpose documentation
- Pass untyped data between steps
- Fail silently and repeat mistakes
- Have no memory of prior runs

With covenant-cli, your agents:
- Declare their mandate before acting
- Use Pydantic models for all I/O
- Write exit reports on every run
- Read inheritance before starting
- Track token usage and cost per run
- Coordinate through structured memos

Same agent SDK. Same model. Different discipline.

## Project Structure

```
my-project/
├── GOVERNANCE.md              # 18 governance rules
├── registry/agents.json       # Service and agent registry
├── memory/
│   ├── inheritance/           # Exit reports from prior runs
│   └── memos/                 # Cross-service communication
├── .cursor/rules/             # Cursor IDE governance rules
├── .claude/rules/             # Claude Code governance rules
└── services/
    └── my-service/
        ├── manager.py         # Orchestrator with exit reports
        ├── agents/            # One agent per file
        ├── schemas/types.py   # Pydantic models
        └── tools.py           # Shared tools
```

## What's New in v0.4.0

- **Usage tracking** -- token consumption and cost per service run, visible in `covenant status`
- **`covenant memo`** -- cross-service communication via structured memos (send/list/read)
- **`covenant consolidate`** -- distill exit reports into summaries with optional archiving
- **`covenant remember`** -- now searches memos and consolidated summaries (compiled-truth boost)
- **Status dashboard** -- unread memo count, last consolidation date, token totals per service
- **3 new governance rules** -- track usage, communicate via memos, consolidate regularly

## Credits

Inspired by [mutta](https://github.com/maestromaximo/agent-sdk-mutta) by Alejandro Garcia Polo.

## License

[Covenant Public License v1.0](LICENSE) -- free for individuals and teams under $1M revenue. Contact the author for commercial licensing.
