Skip to content

Releases: IranTransitionProject/baft

v0.3.0 — Typed Contracts, Local Setup Guide

21 Mar 00:23

Choose a tag to compare

What's New

Typed I/O Contracts

All 13 worker configs now use Pydantic models as the source of truth for I/O schemas via input_schema_ref / output_schema_ref. Models live in src/baft/contracts/:

  • core.py — SP, IA, DE, XV, IN contracts (Tier 1-2 pipeline)
  • audit.py — TN, LA, PA, RT, AS contracts (Tier 3 audit pipeline)
  • monitor.py — SA, WT, NI contracts (background/scheduled workers)

All enums use Python 3.11+ StrEnum. All classes have docstrings. 91 contract tests.

Design Invariants

New docs/DESIGN_INVARIANTS.md documenting baft-specific constraints and their binding to Loom framework invariants. Includes Mermaid silo-to-worker access graph and epistemic quarantine rules.

Local Setup Guide

New docs/SETUP.md — complete 10-step guide for setting up the full ITP analytical system locally. Covers all four repositories, NATS, Ollama, DuckDB import, MCP gateway configuration for Claude Desktop, and daily analyst workflow.

Configuration Improvements

  • Governance audit threshold extracted from DE system prompt to itp_tier_rules.yaml
  • All stale invariant cross-references updated after Loom v0.7.0 renumbering

Built on Loom v0.8.0

Requires Loom v0.8.0 or later.

Installation

See the Local Setup Guide for complete instructions.

# Quick start (requires loom cloned adjacent)
git clone https://github.com/IranTransitionProject/baft.git
cd baft
uv sync --extra dev
uv run pytest tests/ -v -m "not e2e"   # 295 tests

Stats

  • 13 worker configs, 3 pipeline tiers, 5 scheduled actors
  • 295 unit tests across 7 test files (including 91 contract tests)
  • Typed Pydantic contracts for all workers, all lint clean