ATDD Platform - Acceptance Test Driven Development toolkit
Project description
ATDD
Acceptance Test Driven Development toolkit for structured planning and convention enforcement.
ATDD covers the full software lifecycle, not just code. It starts from a job to be done (e.g., user problem or goal), turns it into deterministic requirements, validates them with tests, and then drives implementation.
flowchart LR
A[Job to be Done] -->|Planner| B[Wagon + Acceptance Criteria]
B -->|Tester| C[RED Tests]
C -->|Coder| D[GREEN Code]
Installation
From PyPI
pip install atdd
Upgrade
pip install --upgrade atdd
For Development
# Clone the repo
git clone https://github.com/afokapu/atdd.git
cd atdd
# Install in editable mode with dev dependencies
pip install -e ".[dev]"
# Verify installation
atdd --help
Quick Start
atdd init # Initialize ATDD in your project
atdd gate # ⚠️ START EVERY SESSION WITH THIS
atdd session new <task> # Create a planning session
atdd sync # Sync rules to agent config files
atdd validate # Run all validators
⚠️
atdd gateis required. 🤖 Tell your agent: "Runatdd gateand follow ATDD rigorously." Agents skip instruction files but can't ignore tool ou
tput. No gate = no ATDD guarantees.
What It Does
ATDD provides:
- Session Management - Structured planning documents with templates and tracking
- Convention Enforcement - YAML-based conventions validated via pytest
- ATDD Lifecycle - Planner → Tester → Coder phase gates
- Agent Config Sync - Keep ATDD rules in sync across AI agent config files
flowchart LR
A[Job to be Done] -->|Planner| B[Wagon + Acceptance Criteria]
B -->|Tester| C[RED Tests]
C -->|Coder| D[GREEN Code]
D -->|Coder| E[REFACTOR]
E -.->|feedback| B
subgraph "ATDD Lifecycle"
B
C
D
E
end
Commands
Project Initialization
atdd init # Create atdd-sessions/, .atdd/, and CLAUDE.md
atdd init --force # Reinitialize (overwrites existing)
Creates:
your-project/
├── CLAUDE.md # With managed ATDD block
├── atdd-sessions/
│ ├── SESSION-TEMPLATE.md
│ └── archive/
└── .atdd/
├── manifest.yaml # Session tracking
└── config.yaml # Agent sync configuration
Session Management
atdd session new <slug> # Create new session
atdd session new <slug> --type <type> # Specify type
atdd session list # List all sessions
atdd session archive <id> # Archive session
atdd session sync # Sync manifest with files
Session types: implementation, migration, refactor, analysis, planning, cleanup, tracking
Agent Config Sync
Sync ATDD rules to agent config files using managed blocks that preserve user content:
atdd sync # Sync all enabled agents from config
atdd sync --agent claude # Sync specific agent only
atdd sync --verify # Check if files are in sync (for CI)
atdd sync --status # Show sync status for all agents
Supported agents:
| Agent | File |
|---|---|
| claude | CLAUDE.md |
| codex | AGENTS.md |
| gemini | GEMINI.md |
| qwen | QWEN.md |
Configure which agents to sync in .atdd/config.yaml:
version: "1.0"
sync:
agents:
- claude # Enabled by default
# - codex # Uncomment to sync AGENTS.md
# - gemini # Uncomment to sync GEMINI.md
# - qwen # Uncomment to sync QWEN.md
Multi-agent setup: To use multiple agents with consistent rules, enable them all in config and run sync:
sync:
agents:
- claude
- codex
- gemini
- qwen
atdd sync # Creates/updates CLAUDE.md, AGENTS.md, GEMINI.md, QWEN.md
ATDD Gate (Bootstrap Protocol)
Agents often skip instruction files. The gate solves this by injecting rules via mandatory tool output.
Protocol:
-
Run this command first:
atdd gate -
Agent must paste output and confirm:
- Which file(s) were loaded
- The reported hash
- The key constraints
-
If files are missing/unsynced:
atdd sync atdd gate # Re-verify
Example output:
============================================================
ATDD Gate Verification
============================================================
Loaded files:
- CLAUDE.md (hash: d04f897c6691dc13...)
Key constraints:
1. No ad-hoc tests - follow ATDD conventions
2. Domain layer NEVER imports from other layers
3. Phase transitions require quality gates
------------------------------------------------------------
Before starting work, confirm you have loaded these rules.
------------------------------------------------------------
Why this works:
- Gate output is mandatory tool output - agent can't ignore it
- Proves which ATDD files were actually loaded
- Forces consistency across all agents
Rule: If ATDD rules matter, start with atdd gate. No gate = no guarantees.
Validation
atdd validate # Run all validators
atdd validate planner # Planning validators only
atdd validate tester # Testing validators only
atdd validate coder # Implementation validators only
atdd validate --quick # Fast smoke test
atdd validate --coverage # With coverage report
atdd validate --html # With HTML report
Release Versioning
ATDD enforces release versioning via coach validators. Recommended: keep a single root VERSION file as the canonical source (first line like 1.2.3 - short summary; trailing summary is ignored). Configure the version file and tag prefix in .atdd/config.yaml:
release:
version_file: "VERSION" # recommended single source of truth
tag_prefix: "v"
If you also publish with language-specific manifests (e.g., pyproject.toml, package.json), keep their version fields in sync with VERSION.
Validation (atdd validate coach or atdd validate) requires:
- Version file exists and contains a version
- Git tag on HEAD matches
{tag_prefix}{version}
URN Graph UI
Visualize URN traceability as an interactive graph with search, family filters, and node inspection.
pip install atdd[viz]
atdd urn viz # Launch on default port 8502
atdd urn viz --port 9000 # Custom port
atdd urn viz --root wagon:my-wagon # Subgraph from root
atdd urn viz --family wagon --family feature # Filter families
Default port is 8502 to avoid conflicts with consumer repo Streamlit apps on 8501.
Other Commands
atdd status # Platform status
atdd inventory # Generate artifact inventory
atdd inventory --format json # Inventory as JSON
atdd registry update # Update all registries
atdd --help # Full help
Project Structure
src/atdd/
├── cli.py # Entry point
├── coach/
│ ├── commands/ # CLI command implementations
│ ├── conventions/ # Coach conventions (YAML)
│ ├── overlays/ # Agent-specific additions
│ ├── schemas/ # JSON schemas
│ ├── templates/ # Session templates, ATDD.md
│ └── validators/ # Coach validators
├── planner/
│ ├── conventions/ # Planning conventions
│ ├── schemas/ # Planning schemas
│ └── validators/ # Planning validators
├── tester/
│ ├── conventions/ # Testing conventions
│ ├── schemas/ # Testing schemas
│ └── validators/ # Testing validators
└── coder/
├── conventions/ # Coding conventions
├── schemas/ # Coder schemas
└── validators/ # Implementation validators
Development
Setup
git clone https://github.com/afokapu/atdd.git
cd atdd
pip install -e ".[dev]"
Run Tests
# All tests
pytest
# Specific phase
pytest src/atdd/planner/validators/
# With coverage
pytest --cov=atdd --cov-report=html
Adding Validators
- Create
src/atdd/{phase}/validators/test_{name}.py - Write pytest test functions
- Run
atdd validate {phase}
Validators are auto-discovered by pytest.
Adding Conventions
- Create
src/atdd/{phase}/conventions/{name}.convention.yaml - Reference in validators via
Path(__file__).parent.parent / "conventions" / "..."
Requirements
- Python 3.10+
- pyyaml
Dev dependencies: pytest, pytest-xdist
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file atdd-0.7.11.tar.gz.
File metadata
- Download URL: atdd-0.7.11.tar.gz
- Upload date:
- Size: 551.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d44803e4625b2a2d19dab7d865fe30832d17f9292b34890018b6da890521d5e
|
|
| MD5 |
074dffa2e928335f9d0702156a938642
|
|
| BLAKE2b-256 |
ba6551dbbadb203f522465767f87697a5abfc47e51cffab143eb1834f7abde1f
|
Provenance
The following attestation bundles were made for atdd-0.7.11.tar.gz:
Publisher:
publish.yml on afokapu/atdd
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
atdd-0.7.11.tar.gz -
Subject digest:
9d44803e4625b2a2d19dab7d865fe30832d17f9292b34890018b6da890521d5e - Sigstore transparency entry: 924377939
- Sigstore integration time:
-
Permalink:
afokapu/atdd@ad45429702e64627eebd2ba3a48486902cd6f8b1 -
Branch / Tag:
refs/tags/v0.7.11 - Owner: https://github.com/afokapu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ad45429702e64627eebd2ba3a48486902cd6f8b1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file atdd-0.7.11-py3-none-any.whl.
File metadata
- Download URL: atdd-0.7.11-py3-none-any.whl
- Upload date:
- Size: 662.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a9183f5342f8dd1b67a2adfb00cadd09d354277de5e6ff2c50774e0faf54ff87
|
|
| MD5 |
3fbad9e83b87b8eafbc7c7770c3b17e1
|
|
| BLAKE2b-256 |
3f515ed245ccb38ae47b69bbf40e143f98b65cae6a29d7be67a246f0a96592b3
|
Provenance
The following attestation bundles were made for atdd-0.7.11-py3-none-any.whl:
Publisher:
publish.yml on afokapu/atdd
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
atdd-0.7.11-py3-none-any.whl -
Subject digest:
a9183f5342f8dd1b67a2adfb00cadd09d354277de5e6ff2c50774e0faf54ff87 - Sigstore transparency entry: 924377940
- Sigstore integration time:
-
Permalink:
afokapu/atdd@ad45429702e64627eebd2ba3a48486902cd6f8b1 -
Branch / Tag:
refs/tags/v0.7.11 - Owner: https://github.com/afokapu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ad45429702e64627eebd2ba3a48486902cd6f8b1 -
Trigger Event:
push
-
Statement type: