Skip to main content

Deterministic, local-first LLM orchestration framework implementing the CIV pattern.

Project description

No-Slop Harness Banner

No-Slop Harness

Python 3.11+ Version License Tests Code style: ruff Type checking: mypy

Deterministic, local-first LLM orchestration framework implementing the CIV (Coordinator-Implementor-Verifier) pattern for zero-slop, high-fidelity software engineering.

Overview

No-Slop Harness is an agentic framework that enforces structured, verifiable LLM workflows. It rejects the "black-box agent" model in favor of a three-phase pipeline where each phase has explicit constraints, validated schemas, and deterministic handoffs.

The CIV Pattern

┌─────────────┐     ┌─────────────┐     ┌─────────────┐
│ Coordinator │ ──▶ │ Implementor │ ──▶ │  Verifier   │
│   (plan)    │     │  (execute)  │     │  (validate) │
└─────────────┘     └─────────────┘     └─────────────┘
       │                                       │
       └─────────── feedback loop ─────────────┘
  • Coordinator: Decomposes user requests into a DAG of typed Task objects
  • Implementor: Executes tasks using a constrained toolset (read_file, write_file, edit_file_ast, bash_execute)
  • Verifier: Validates output via tests, linting, type checking — rejects slop before it merges

Key Features

  • Deterministic scheduling — Kahn's algorithm with priority-aware topological sort
  • Sandboxed execution — command allowlisting, blocklisting, timeout enforcement, output truncation
  • Structured inter-agent protocolCIVMessage schema enforces typed communication between phases
  • AST-aware editing — tree-sitter powered code modifications with syntax validation fallback
  • Pydantic schema enforcement — every tool call, task, and message is validated at the boundary
  • Zero external dependencies for core — only pydantic, rich, click, tree-sitter

Quick Start

Installation

Recommended: pipx (isolated, works on all distros including Arch, Debian 12+, Ubuntu 24.04+, Fedora)

# Install pipx if you don't have it
sudo pacman -S pipx        # Arch
sudo apt install pipx       # Debian/Ubuntu
sudo dnf install pipx       # Fedora

# Install from GitHub
pipx install git+https://github.com/iknowkungfubar/no-slop-harness.git

# Or with inference support (adds httpx for LLM API calls)
pipx install git+https://github.com/iknowkungfubar/no-slop-harness.git[inference]

uv (fast, modern, venv-based)

uv tool install git+https://github.com/iknowkungfubar/no-slop-harness.git[inference]

venv (traditional, works everywhere)

python -m venv .venv
source .venv/bin/activate
pip install git+https://github.com/iknowkungfubar/no-slop-harness.git[inference]

pip --break-system-packages (quick, not recommended)

pip install --break-system-packages git+https://github.com/iknowkungfubar/no-slop-harness.git

PyPI install. no-slop-harness is available on PyPI. Install directly:

pipx install no-slop-harness[inference]

Or from source: pip install git+https://github.com/iknowkungfubar/no-slop-harness.git[inference]

Extras reference:

Extra Adds Size
(none) Core: schemas, orchestration, CLI, verifier, plugin system ~5MB
[inference] httpx — OpenAI-compatible LLM API client +3MB
[dev] pytest, ruff, mypy — development tools +15MB

Basic Usage

# Initialize a pipeline session
no-slop init --sandbox-allowlist echo --sandbox-allowlist python

# Check pipeline status
no-slop status

Programmatic Usage

Synchronous (core only):

from no_slop_harness.orchestrator import PipelineOrchestrator
from no_slop_harness.schemas import Task, SandboxConfig

sandbox = SandboxConfig(
    allowed_commands=["echo", "python", "pytest"],
    timeout_seconds=120,
)

pipeline = PipelineOrchestrator(sandbox_config=sandbox)

tasks = [
    Task(task_id="add_model", description="Create User model", action="Add SQLAlchemy model"),
    Task(task_id="add_tests", description="Add unit tests", action="Write pytest suite", dependencies=["add_model"]),
]
msg = pipeline.ingest_tasks(tasks)

while task := pipeline.next_task():
    pipeline.report_result(task.task_id, "done", success=True)
    pipeline.verify_task(task.task_id)
    pipeline.verification_complete(task.task_id, passed=True)

print(pipeline.status())

Full pipeline with LLM (requires [inference]):

import asyncio
from no_slop_harness.runner import CIVPipeline

async def main():
    pipeline = CIVPipeline(
        base_url="http://localhost:1234/v1",
        model="qwen/qwen3.6-35b-a3b",
    )
    result = await pipeline.run("Add a hello() function to demo.py")
    print(result["success"], result["summary"])

asyncio.run(main())

Architecture

src/no_slop_harness/
├── __init__.py              # Package version
├── cli.py                   # Click-based CLI (init, status, list, verify, report)
├── runner.py                # End-to-end CIV pipeline runner
├── schemas.py               # Pydantic models (Task, CIVMessage, ToolCall, SandboxConfig, PipelineState)
├── orchestrator.py          # CIV PipelineOrchestrator lifecycle
├── async_orchestrator.py    # Async pipeline for parallel task execution
├── dag.py                   # Topological sort (Kahn's) + DAG validation
├── pipeline_scheduler.py    # TaskScheduler + ResultCollector
├── sandbox.py               # Sandboxed command execution (allowlist, blocklist, timeout)
├── ast_editor.py            # Tree-sitter AST editor with regex fallback
├── verifier.py              # Test/lint/typecheck runner
├── worktree.py              # Git worktree isolation per task
├── sdlc.py                  # .sdlc/ context injection (ADRs, standards, memory)
├── constrained.py           # llguidance grammar-enforced JSON output
├── rag.py                   # RAG + self-healing hallucination detection
├── advanced_metrics.py      # Token entropy, variance penalty, inter-step timing
├── tla_bridge.py            # TLA+ formal verification bridge (spec gen + TLC)
├── llm_client.py            # LLM provider abstraction with retry logic
├── logging_config.py        # Structured logging (JSON formatter, PipelineLogger)
├── metrics.py               # Observability (counters, timers, histograms)
├── plugin.py                # Plugin system (discovery, registration, lifecycle hooks)
├── errors.py                # Exception hierarchy
├── agents/                  # CIV agent implementations
│   ├── coordinator.py       # Task decomposition agent
│   ├── implementor.py       # Task execution agent with constrained toolset
│   └── verifier.py          # Automated verification agent
├── providers/               # LLM provider backends
│   └── openai_compatible.py # OpenAI-compatible API (LM Studio, OpenRouter, vLLM, Ollama)
└── prompts/                 # Agent system prompt templates
    ├── coordinator.txt
    ├── implementor.txt
    └── verifier.txt

Development

See CONTRIBUTING.md for development setup and guidelines.

Running Tests

pip install -e ".[dev]"
python -m pytest tests/ -v

Code Quality

python -m ruff check src/ tests/
python -m mypy src/ --ignore-missing-imports

Documentation

Contributing

Contributions are welcome! Please read CONTRIBUTING.md for detailed guidelines on our development process, coding standards, PR workflow, and code of conduct.

License

Apache 2.0 — see LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

no_slop_harness-0.9.1.tar.gz (1.6 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

no_slop_harness-0.9.1-py3-none-any.whl (75.4 kB view details)

Uploaded Python 3

File details

Details for the file no_slop_harness-0.9.1.tar.gz.

File metadata

  • Download URL: no_slop_harness-0.9.1.tar.gz
  • Upload date:
  • Size: 1.6 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for no_slop_harness-0.9.1.tar.gz
Algorithm Hash digest
SHA256 99805bf117209c771b33f998969428fc8a50a5920e5c2d99c379aa18cc822120
MD5 ee02a19d80fab51aa46c13948e2724a3
BLAKE2b-256 b99cc7a9d978f74b12be488476e7786cbf8b777689565b9f8475284113c60718

See more details on using hashes here.

File details

Details for the file no_slop_harness-0.9.1-py3-none-any.whl.

File metadata

File hashes

Hashes for no_slop_harness-0.9.1-py3-none-any.whl
Algorithm Hash digest
SHA256 95c8f9323019432b9dd39abc694ad12446191110ebfbf9f50b2225a7f8557eba
MD5 e2e715734e6616de9ad0f6e17e8afa92
BLAKE2b-256 7032155bde4e8d31f1ad8f615d0693b397ebbc0f9e6b047b7869c5e1999f5f71

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page