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.0a14.tar.gz (178.9 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.0a14-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: stackwright_pro_raft-1.0.0a14.tar.gz
  • Upload date:
  • Size: 178.9 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.0a14.tar.gz
Algorithm Hash digest
SHA256 06059c68e133aa44c5dc36e558e3d6b6f46bd2586ab28229fa4b9280426f2099
MD5 ecccae9e50a444909629f9496188f0f7
BLAKE2b-256 df36111fe9859b13051d865a59fc683f5bb9b649d4d4a8922ed26685ebc2a28a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: stackwright_pro_raft-1.0.0a14-py3-none-any.whl
  • Upload date:
  • Size: 18.2 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.0a14-py3-none-any.whl
Algorithm Hash digest
SHA256 c6f6fdcdaccc59fcc5ccc912e8365a660878b9c644d305fdb59349ff97ca3d5e
MD5 bab89451d2e7cca8e7a0a157a33efbf1
BLAKE2b-256 a66f50153941bf5f0dcafe7a106eab1cca30fc6fb9a8840306d208f46bcbd06b

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