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]
D -->|Coder| E[REFACTOR]
E -.->|feedback| B
subgraph "ATDD Lifecycle"
B
C
D
E
end
Installation
From PyPI
pip install atdd
Upgrade
pip install --upgrade atdd
Uninstall (Consumer Repos)
If you want to remove ATDD entirely:
- Uninstall the package:
python -m pip uninstall atdd
- Manually delete ATDD artifacts in the repo:
.atdd/ Managed blocks in CLAUDE.md, AGENTS.md, etc.
Uninstalling ATDD does not remove or revert any repo files.
For Development
git clone https://github.com/afokapu/atdd.git
cd atdd
pip install -e ".[dev]"
atdd --help
Quick Start
atdd init # Initialize ATDD + GitHub infrastructure
atdd gate # START EVERY SESSION WITH THIS
atdd new <slug> # Create GitHub issue + WMBT sub-issues
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 output. No gate = no guarantees.
What It Does
ATDD provides:
- Issue Tracking - GitHub Issues + Project v2 custom fields as source of truth
- Convention Enforcement - YAML-based conventions validated via pytest
- ATDD Lifecycle - Planner → Tester → Coder phase gates with state machine transitions
- Agent Config Sync - Keep ATDD rules in sync across AI agent config files
- Design System Compliance - Hierarchy, token, and adoption validators for frontend
Commands
Project Initialization
atdd init # Bootstrap .atdd/, GitHub labels, Project v2 fields, CLAUDE.md
atdd init --force # Reinitialize (overwrites existing)
Creates:
your-project/
├── CLAUDE.md # With managed ATDD block
└── .atdd/
├── manifest.yaml # Issue tracking
└── config.yaml # Agent sync + release configuration
Also sets up on GitHub:
- Labels:
atdd-issue,atdd-wmbt,atdd:RED,atdd:GREEN,atdd:REFACTOR, archetype labels - Project v2 custom fields:
ATDD:Status,ATDD:Train,ATDD:Archetypes, etc.
Issue Management
Issues are the source of truth, backed by GitHub Issues with Project v2 custom fields.
atdd new <slug> # Create parent issue + WMBT sub-issues
atdd new <slug> --archetypes be,contracts # Specify archetypes
atdd new <slug> --train <id> # Assign to train
atdd list # List all issues
atdd update <N> --status <STATUS> # Update status (swaps labels automatically)
atdd update <N> --status COMPLETE --train <id> # COMPLETE runs gate tests, artifact + release verification
atdd update <N> --status COMPLETE --force # Bypass gate/artifact/release checks (train still enforced)
atdd close-wmbt <N> <WMBT_ID> # Close a WMBT sub-issue
atdd archive <N> # Close parent + all sub-issues
State machine transitions:
INIT → PLANNED → RED → GREEN → REFACTOR → COMPLETE
↕ ↕ ↕ ↕
BLOCKED BLOCKED BLOCKED BLOCKED → OBSOLETE
Archetypes: db, be, fe, contracts, wmbt, wagon, train, telemetry, migrations
Each archetype includes gate tests in the issue template (e.g., fe issues get GT-020 for TypeScript architecture and GT-021 for design system compliance).
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
ATDD Gate (Bootstrap Protocol)
Agents often skip instruction files. The gate solves this by injecting rules via mandatory tool output.
atdd gate # Show gate verification info
atdd gate --json # Output as JSON
Protocol:
- Run
atdd gatefirst - Agent must confirm: which files were loaded, the reported hash, key constraints
- If files are missing/unsynced: run
atdd syncthenatdd gateagain
Why this works: Gate output is mandatory tool output — agent can't ignore it. Proves which ATDD files were actually loaded and forces consistency across all agents.
Validation
Four validator phases matching the ATDD lifecycle:
atdd validate # Run all validators (two-stage: fast then platform)
atdd validate planner # Planning validators (wagons, trains, URNs, WMBTs)
atdd validate tester # Testing validators (contracts, telemetry, test naming)
atdd validate coder # Implementation validators (architecture, boundaries, design system)
atdd validate coach # Coach validators (issues, registries, release, gate completion)
atdd validate --quick # Fast smoke test
atdd validate --no-split # Single-pass execution (skip two-stage split)
atdd validate --coverage # With coverage report
atdd validate --html # With HTML report
By default, atdd validate runs in two stages: fast file-parsing tests in parallel, then API-bound platform tests sequentially with shared session fixtures.
Release Versioning
ATDD enforces release versioning via coach validators. Configure the version file and tag prefix in .atdd/config.yaml:
release:
version_file: "pyproject.toml" # or package.json, VERSION, etc.
tag_prefix: "v"
Validation (atdd validate coach) 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
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 (issue.py, initializer.py, sync.py, gate.py)
│ ├── conventions/ # Coach conventions (issue.convention.yaml)
│ ├── overlays/ # Agent-specific additions
│ ├── schemas/ # JSON schemas (config, project fields, label taxonomy)
│ ├── templates/ # Issue templates, ATDD.md
│ ├── utils/ # Graph builder, URN resolver, repo utilities
│ └── validators/ # Coach validators (issues, registries, release, traceability)
├── planner/
│ ├── conventions/ # Planning conventions
│ ├── schemas/ # Planning schemas
│ └── validators/ # Planning validators
├── tester/
│ ├── conventions/ # Testing conventions
│ ├── schemas/ # Testing schemas
│ └── validators/ # Testing validators
└── coder/
├── conventions/ # Coding conventions (architecture, design system, boundaries)
├── schemas/ # Coder schemas
└── validators/ # Implementation validators (architecture, design system compliance)
Development
Setup
git clone https://github.com/afokapu/atdd.git
cd atdd
pip install -e ".[dev]"
Run Tests
# All validators from source
PYTHONPATH=src python3 -m pytest src/atdd/ -v
# Specific phase
PYTHONPATH=src python3 -m pytest src/atdd/planner/validators/ -v
# With coverage
PYTHONPATH=src python3 -m pytest --cov=atdd --cov-report=html
Adding Validators
- Create
src/atdd/{phase}/validators/test_{name}.py - Write pytest test functions with
@pytest.mark.{phase}marker - 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, jsonschema
ghCLI (authenticated, withprojectscope for issue management)
Dev dependencies: pytest, pytest-xdist, pytest-html
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-1.3.6.tar.gz.
File metadata
- Download URL: atdd-1.3.6.tar.gz
- Upload date:
- Size: 598.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2363890a9fc53821221b4dbfc0747eab6f9b649798b9aa988f484a5228c9f011
|
|
| MD5 |
6a9ffff080ecd8576e8d741ac16da8e3
|
|
| BLAKE2b-256 |
41bc631d384bb40b8e44ebee9dbae346d954dc998312581a53ad3ba4cef4874e
|
Provenance
The following attestation bundles were made for atdd-1.3.6.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-1.3.6.tar.gz -
Subject digest:
2363890a9fc53821221b4dbfc0747eab6f9b649798b9aa988f484a5228c9f011 - Sigstore transparency entry: 1006702650
- Sigstore integration time:
-
Permalink:
afokapu/atdd@cbde2b43ce6cdd875de31d7d48b5699b57abcfe9 -
Branch / Tag:
refs/tags/v1.3.6 - Owner: https://github.com/afokapu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@cbde2b43ce6cdd875de31d7d48b5699b57abcfe9 -
Trigger Event:
push
-
Statement type:
File details
Details for the file atdd-1.3.6-py3-none-any.whl.
File metadata
- Download URL: atdd-1.3.6-py3-none-any.whl
- Upload date:
- Size: 715.0 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 |
c107b856d62bc1aa90aeda6aae95e4723c8878ce9347fed26d6a2805e826ba8f
|
|
| MD5 |
8b1866e76f87579f4276860efdd92063
|
|
| BLAKE2b-256 |
cd7814fa595b629f2305378c886ee82ba482d779438bd6037bbe78b8e3a39965
|
Provenance
The following attestation bundles were made for atdd-1.3.6-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-1.3.6-py3-none-any.whl -
Subject digest:
c107b856d62bc1aa90aeda6aae95e4723c8878ce9347fed26d6a2805e826ba8f - Sigstore transparency entry: 1006702653
- Sigstore integration time:
-
Permalink:
afokapu/atdd@cbde2b43ce6cdd875de31d7d48b5699b57abcfe9 -
Branch / Tag:
refs/tags/v1.3.6 - Owner: https://github.com/afokapu
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@cbde2b43ce6cdd875de31d7d48b5699b57abcfe9 -
Trigger Event:
push
-
Statement type: