Skip to main content

Clarification Protocol for Otter Raft orchestration

Project description

Stackwright Pro - Otter Raft Python SDK

Python orchestration layer implementing the Clarification Protocol for Pro Otter Raft.

Hybrid Architecture

The otter raft uses a Python + code-puppy hybrid approach:

┌─────────────────────────────────────────────────────────────┐
│                   CLI Adapter (Python)                       │
│                                                              │
│   --spawn (default)  →  Spawns code-puppy with foreman prompt │
│   --phases           →  Executes via ForemanSession (debug)  │
└─────────────────────────────────────────────────────────────┘

SPAWN mode (default) gives you the full interactive code-puppy experience with:

  • Rich TUI for asking questions
  • Specialist otter coordination
  • Certificate pinning for approved tools only

PHASES mode is a legacy debugging mode that runs the Python state machine directly.

Installation

cd python
pip install -e .

Or with uv:

cd python
uv pip install -e .

Quick Start

from stackwright_pro.raft import ClarificationOrchestrator, ClarificationConfig

config = ClarificationConfig(
    defaults={"brand.tone": "Professional"},
    allow_dont_know=True,
)

orchestrator = ClarificationOrchestrator(config=config)

# Ask user for clarification
response = orchestrator.router.ask(request)

Components

  • Clarification Protocol: Human-in-the-loop for LLMs
  • Channel Router: TUI → CLI args → Config → Defaults
  • Conflict Detector: Detects preference vs. choice conflicts
  • Escalation Handler: Handles stubborn users

Documentation

Development

# Install dev dependencies
pip install pytest pydantic rich

# Run tests
cd python
python -m pytest tests/ -v

License

Proprietary - Per Aspera LLC

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

stackwright_pro_raft-1.0.0a13.tar.gz (176.0 kB view details)

Uploaded Source

Built Distribution

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

stackwright_pro_raft-1.0.0a13-py3-none-any.whl (17.0 kB view details)

Uploaded Python 3

File details

Details for the file stackwright_pro_raft-1.0.0a13.tar.gz.

File metadata

  • Download URL: stackwright_pro_raft-1.0.0a13.tar.gz
  • Upload date:
  • Size: 176.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for stackwright_pro_raft-1.0.0a13.tar.gz
Algorithm Hash digest
SHA256 f58b0738b3f48efaa0a7782abd9f8fbce26d8a07f0f7a721708e133b7b00d390
MD5 f8b5f18caf7219108fabcec6401bbcb9
BLAKE2b-256 6460ec8cd980224062307cee84dd114fdd6029dfe0e5b35018b6363b94a057de

See more details on using hashes here.

File details

Details for the file stackwright_pro_raft-1.0.0a13-py3-none-any.whl.

File metadata

  • Download URL: stackwright_pro_raft-1.0.0a13-py3-none-any.whl
  • Upload date:
  • Size: 17.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Arch Linux","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for stackwright_pro_raft-1.0.0a13-py3-none-any.whl
Algorithm Hash digest
SHA256 eea38f8bf65f0c50283062e08c12002e1758855e1b180601ebfaa703543e628e
MD5 63d63eed53462929b1aca47799fce263
BLAKE2b-256 48b5b9673e1b525188cf9c0fe44f875c3458272029d19771a5c7abe056fd21f6

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