Production-ready agentic primitives and workflow patterns for building reliable AI applications.
TTA.dev is a curated collection of battle-tested, production-ready components for building reliable AI applications. Every component here has:
- β 100% test coverage
- β Real-world production usage
- β Comprehensive documentation
- β Zero known critical bugs
Philosophy: Only proven code enters this repository.
TTA.dev was originally extracted from the Therapeutic Text Adventure (TTA) project.
- TTA.dev (This Repo): The reusable DevOps, infrastructure, and agentic primitives.
- TTA (Game Repo): The narrative storytelling game built on top of this platform.
TTA.dev is organized into platform infrastructure packages and apps for end-user deployments:
TTA.dev/
βββ platform/ # Infrastructure packages (7)
β βββ primitives/ # Core workflow primitives
β βββ observability/ # OpenTelemetry integration
β βββ agent-context/ # Agent context management
β βββ agent-coordination/# Multi-agent orchestration
β βββ integrations/ # Pre-built integrations
β βββ documentation/ # Docs automation
β βββ kb-automation/ # Knowledge base maintenance
β
βββ templates/ # π Vibe Coding Templates (Start Here)
β βββ basic-agent/ # Simple agent with cache/retry
β βββ workflow/ # Multi-step workflow
β
βββ apps/ # User-facing applications (1)
β βββ observability-ui/ # VS Code observability dashboard
β
βββ config/ # Configuration files
βββ data/ # Data artifacts
β βββ ace_playbooks/ # ACE Agent Playbooks
βββ docs/ # Documentation
βββ scripts/ # Automation scripts
βββ tests/ # Integration tests
Core workflow primitives for building reliable, observable agent workflows.
Features:
- π Router, Cache, Timeout, Retry, Memory primitives
- π Composition operators (
>>,|) - β‘ Parallel and conditional execution
- π OpenTelemetry integration
- πͺ Comprehensive error handling
- π Cost reduction via intelligent caching and routing
Installation:
uv add tta-dev-primitivesQuick Start:
See GETTING_STARTED.md for a quick start guide.
OpenTelemetry integration for tracing, metrics, and logging across TTA.dev primitives.
Features:
- π Automatic OpenTelemetry tracing and metrics
- π Structured logging
- π Prometheus-compatible metrics export
- π‘οΈ Graceful degradation when observability backend is unavailable
Installation:
uv add tta-observability-integrationAgent context management and orchestration for multi-agent workflows.
Features:
- π§ Centralized context management for agents
- π Context propagation across primitives
- π Secure handling of agent-specific data
- π€ Facilitates multi-agent coordination
Installation:
uv add universal-agent-contextAtomic DevOps Architecture for multi-agent coordination.
Pre-built integration primitives (Supabase, PostgreSQL, Clerk, JWT).
Automated docs β Logseq sync with AI metadata.
Automated knowledge base maintenance (links, TODOs, flashcards).
LangSmith-inspired observability dashboard with VS Code webview integration.
Features:
- π Real-time trace visualization
- π Primitive-aware debugging
- π― VS Code integration (coming Phase 3)
For a comprehensive quick start guide, including installation and your first workflow, please refer to GETTING_STARTED.md.
- Getting Started Guide - 5-minute quickstart
- Primitives Catalog - Complete reference for all primitives
- Agent Instructions - Guidance for AI agents working on TTA.dev
- GitHub Copilot Instructions - Comprehensive Copilot configuration and best practices
- Architecture Overview - System design and principles
- Coding Standards - Development best practices
- MCP Integration - Model Context Protocol guides
- Workspace Organization - Repository structure and navigation guide
- PR Management Guide - Intelligent PR oversight and automation
- PR Management Quick Reference - Quick commands and best practices
- LLM Cost Guide - Free vs paid model comparison, pricing analysis
- Cost Optimization Patterns - Production patterns for 50-70% cost reduction
- Cline Integration - Enhanced Cline development experience
- AI Libraries Comparison
- Model Selection Guide
- LLM Selection Guide
- Examples
All packages maintain 100% test coverage with comprehensive test suites.
# Run all tests
uv run pytest -v
# Run with coverage
uv run pytest --cov=platform --cov=apps --cov-report=html
# Run specific package tests
uv run pytest platform/primitives/tests/ -v- Python 3.11+
- uv (recommended)
- VS Code with recommended extensions (see
.vscode/extensions.json)
# Clone repository
git clone https://github.com/theinterneti/TTA.dev
cd TTA.dev
# Install dependencies
uv sync --all-extras
# Run tests
uv run pytest -v
# Run quality checks
uv run ruff format .
uv run ruff check . --fix
uvx pyright platform/ apps/We provide VS Code tasks for common operations:
- Press
Cmd/Ctrl+Shift+P - Type "Task: Run Task"
- Select from:
- π§ͺ Run All Tests
- β Quality Check (All)
- π¦ Validate Package
- π Lint Code
- β¨ Format Code
- π PR Dashboard
- π PR Analytics
- π₯ PR Triage
- π₯ PR Health Check
- π‘ PR Recommendations
TTA.dev includes intelligent PR management tools:
# Dashboard - Visual overview of all open PRs
python scripts/pr_manager.py dashboard
# Analytics - Detailed metrics and insights
python scripts/pr_manager.py analyze
# Triage - Categorize and prioritize PRs
python scripts/pr_manager.py triage
# Health Check - Identify PRs needing attention
python scripts/pr_manager.py health-check
# Recommendations - Get actionable next steps
python scripts/pr_manager.py recommendFeatures:
- π Smart categorization (critical, ready-to-merge, stale, etc.)
- π― Priority scoring (0-100) based on urgency and impact
- π₯ Automated health monitoring
- π‘ Actionable recommendations
- π Integration with Logseq TODO system
- π€ Weekly automated monitoring via GitHub Actions
See PR Management Guide for details.
We welcome contributions! However, only battle-tested, proven code is accepted.
Before submitting a PR, ensure:
- β All tests passing (100%)
- β Test coverage >100% (for new code)
- β Documentation complete
- β Ruff + Pyright checks pass
- β TODO compliance (100%) - All Logseq TODOs properly formatted
- β Real-world usage validation
- β No known critical bugs
All TODOs in Logseq journals must follow the TODO Management System:
- Category tag required:
#dev-todoor#user-todo - For
#dev-todo: Must includetype::,priority::,package::properties - For
#user-todo: Must includetype::,audience::,difficulty::properties
Validation:
# Check TODO compliance locally
uv run python scripts/validate-todos.py
# Expected output: 100.0% complianceThe CI will automatically validate TODO compliance on all PRs. Non-compliant TODOs will block the merge.
-
Create feature branch
git checkout -b feature/add-awesome-feature
-
Make changes and validate
./scripts/validate-package.sh <package-name>
-
Commit with semantic message
git commit -m "feat(package): Add awesome feature" -
Create PR
gh pr create --title "feat: Add awesome feature" -
Squash merge after approval
- Ruff with 88 character line length
- Auto-format on save in VS Code
- Ruff with strict rules
- No unused imports or variables
- Pyright in basic mode
- Type hints required for all functions
- pytest with AAA pattern
- 100% coverage required
- All tests must pass
- Google-style docstrings
- README for each package
- Examples for all features
- Phase 3 Examples: See
platform/primitives/examples/PHASE3_EXAMPLES_COMPLETE.mdfor InstrumentedPrimitive pattern guide
All PRs automatically run:
- β Ruff format check
- β Ruff lint check
- β Pyright type check
- β pytest (all tests)
- β Coverage report
- β Multi-OS testing (Ubuntu, macOS, Windows)
- β Multi-Python testing (3.11, 3.12)
Merging requires all checks to pass.
| Package | Version | Tests | Coverage | Status |
|---|---|---|---|---|
| tta-dev-primitives | 0.1.0 | 12/12 β | 100% | π’ Stable |
| tta-observability-integration | 0.1.0 | TBD | TBD | π’ Stable |
| universal-agent-context | 0.1.0 | TBD | TBD | π’ Stable |
- v0.2.0: Add more workflow primitives (saga, circuit breaker)
- v0.3.0: Enhanced observability features
- v1.0.0: First stable release
- TTA - Therapeutic text adventure game (private)
- Augment Code - AI coding assistant
- GitHub Copilot - AI pair programmer
MIT License - see LICENSE for details
Built with:
- Python
- uv - Fast Python package installer
- Ruff - Fast Python linter
- Pyright - Type checker
- pytest - Testing framework
- GitHub Copilot - AI assistance
- Maintainer: @theinterneti
- Issues: GitHub Issues
- Discussions: GitHub Discussions
If you find TTA.dev useful, please consider giving it a star! β
Last Updated: 2025-11-10
Logseq: [[TTA.dev/Readme]]