Define your development workflow once in YAML. Get specialized AI agents that collaborate like a real team.
pip install playfile && pf initQuick Start β’ Examples β’ Documentation β’ GitHub
AI assistants are great at coding but terrible at following process.
Tools like Claude Code have subagents that can delegate to specialists. But they only do it when the main agent wants to.
- β The architect might skip writing tests
- β The coder might ignore the spec
- β The reviewer might never run
Playfile enforces your workflow with rigor.
- β Every step runs
- β Every agent executes
- β Every validation passes
No shortcuts. No skipped steps. No "forgot to test the edge cases."
Built for CI/CD and automation from day one.
agents:
- id: architect
role: "Software Architect"
model: "claude-sonnet-4"
instructions: ".play/agents/architect.md"
- id: coder
role: "Senior Developer"
model: "claude-sonnet-4"tasks:
- id: feature
description: "Full feature development with TDD"
steps:
- id: spec
agent: { use: architect }
- id: tests
agent:
use: tester
context_from: [spec] # Tester sees the spec
- id: implementation
agent:
use: coder
context_from: [spec, tests] # Coder sees both
validate:
command: "pytest" # Must pass before continuingpf run feature --prompt "Add rate limiting to the API"The architect designs the complete solution β The tester writes comprehensive tests β The coder implements against both spec and tests β The reviewer validates the work
Each agent has clear context and a single responsibility.
Stop getting half-finished code. Multi-agent workflows ensure every part of the feature gets built: frontend, backend, tests, docs.
Define your process once. Run it anytime. Same workflow, same quality, every time.
Each agent sees exactly what it needs. Specs flow to testers. Tests flow to coders. No information overload, no missing requirements.
Tests must pass. Files must exist. Builds must succeed. Catch issues before they compound.
Language-agnostic. Python, TypeScript, Go, Rust, or anything else. Playfile orchestrates the workflow, not the code.
TDD, bug fixes, quick iterations, code review pipelines. Start with smart defaults or build your own.
# Install
pip install playfile
# Initialize your project
pf init
# Run a workflow
pf run feature --prompt "Add user authentication"The Prompt:
pf run feature --prompt "Add REST API with auth, rate limiting, and OpenAPI docs"What Happens:
- Architect β designs the complete system
- Tester β writes comprehensive tests
- Coder β implements everything
- Refactorer β cleans up code quality
- Reviewer β validates best practices
The result: Complete API with authentication, rate limiting, comprehensive tests, and OpenAPI documentation. Not just the happy path. Error handling, edge cases, the whole system.
πͺ One prompt. One run. Complete feature.
Check out examples/calc3d: a Flask calculator app with 3D rendering, built entirely by Playfile's TDD workflow.
cd examples/calc3d
pf run feature --prompt "Add calculation history with undo"Watch how the architect, tester, coder, refactorer, and reviewer collaborate to build a complete, tested feature.
Playfile is designed for automation. Here's a GitHub Actions example:
name: AI Feature Development
on:
workflow_dispatch:
inputs:
feature_request:
description: 'Feature to build'
required: true
jobs:
build-feature:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- run: pip install playfile
- run: pf run feature --prompt "${{ github.event.inputs.feature_request }}"
- uses: peter-evans/create-pull-request@v5
with:
title: "AI: ${{ github.event.inputs.feature_request }}"π₯ The workflow runs completely autonomously. Spec β Test β Implement β Review β PR. No human intervention.
Run pf init and get production-ready workflows:
| Workflow | Command | Pipeline |
|---|---|---|
| Full TDD cycle | pf run feature |
Architect β Tester β Coder β Refactorer β Reviewer |
| Quick iterations | pf run quick |
Coder β Tester β Reviewer |
| Bug fixes | pf run fix |
Debugger β Fix β Validate β Review |
Plus specialized agents and tool configurations. Use as-is or customize to match your process.
| Use Case | Description |
|---|---|
| π€ Automated feature development | Run complete TDD cycles in CI (spec, test, implement, review) with no human in the loop |
| π Nightly code improvements | Schedule refactoring, security audits, or performance optimization workflows |
| π Pull request validation | Enforce review workflows on every PR (architecture check, test coverage, code quality) |
| π Bulk migrations | Update APIs, refactor patterns, or migrate dependencies across your entire codebase |
| β‘ Development acceleration | Local workflows that enforce your team's best practices automatically |
| π οΈ Custom CI pipelines | Build any automated development workflow your team needs |
- β Main agent can call specialists
- β Delegation happens if agent decides to
- β Steps might get skipped
- β No guarantees about process
- β Great for interactive coding
- β Enforced workflows: Every step runs, guaranteed
- β Mandatory validation: Tests must pass, builds must succeed
- β CI-first design: Run unattended in automation pipelines
- β Reproducible: Same input β same process β same output
- β Auditable: Track exactly which agent did what, when
π‘ If you need rigor, reproducibility, and automation, Playfile is your tool.
Workflows enforce every step (spec, test, implement, review)
Designed to run in GitHub Actions, GitLab CI, Jenkins, or any pipeline
Same workflow definition β identical execution every time
Set it and forget it. Workflows run autonomously.
Know exactly which agent did what at each step
Parallel agent execution for maximum speed