Failures — Build for failure, not just success.
Engineering principles for AI-built software — plus a back-to-basics learning path for backend development.
New: Failures MCP — make your coding agent think about what happens when things go wrong. See mcp/README.md.
Failures MCP (for vibe coding agents)
Install the MCP and your agent starts asking:
- What happens if the provider succeeds but the response is lost?
- Can this be retried safely? What if it happens twice?
- What if two requests modify this record concurrently?
{
"mcpServers": {
"failures": {
"command": "C:/Users/kalej/Documents/Failures/.venv/Scripts/python.exe",
"args": ["C:/Users/kalej/Documents/Failures/mcp_server/server.py"]
}
}
}
Tools: get_principles, review_architecture, analyze_component, generate_failure_cases, review_code, generate_failure_tests, check_idempotency, check_retry_safety, check_transaction_safety.
Principles cover: atomicity, idempotency, timeout/ambiguous outcome, concurrency, ordering, consistency, availability, resource exhaustion, recovery, observability, retry safety.
Knowledge base: principles/ · patterns/ · failures/ · mcp/README.md
Backend Failure Simulations
This repository is also a back-to-basics learning path for backend development.
It is designed for two groups of people:
- Beginners who want a gentle introduction to backend concepts.
- Rusty developers who want a calm way to get back into practice.
The project starts small and stays practical. You learn one idea at a time, then use those ideas to build a simple system.
What this repo is for
This repo is not a large framework and not a production template. It is a teaching project.
You will use it to:
- learn the basics of backend behavior
- see how common failures happen
- practice fixing one problem at a time
- build confidence by making small working things
How to use it
Start here:
Then move in this order:
- Complete the exercises.
- Read the system-building guide.
- Build the authentication component.
- Use the reference files only when you want to compare your work.
Main folders
- docs/ contains the guides, roadmap, and progress notes.
- exercises/ contains the beginner practice files.
- components/ contains the system-building phase.
- reference/ contains finished examples.
- tools/ contains scripts for running and testing the project.
- principles/ failure dimensions (human docs)
- patterns/ engineering patterns (idempotency-key, outbox, circuit breaker)
- failures/ concrete failure scenarios
- mcp/ and mcp_server/ MCP server for coding agents
The learning path
Phase 1: learn the basics
- Database connection pools
- Network retries and timeouts
- Rate limiting
Phase 2: build a small system
- Authentication system
- More components, only if you want to keep going
Simple way to begin
pip install -r requirements.txt
code exercises/ex1_db_starter.py
Work through the TODOs, one method at a time, and run the file often.
Helpful commands
python tools/launcher.py
python tools/test_scenarios.py
code docs/ROADMAP.md
code docs/MY_PROGRESS.md
If you feel stuck
That is normal. Read the error, make one small change, and try again. The goal is steady progress, not speed.
Metadata
Release files for failures-mcp 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| failures_mcp-0.3.1.tar.gz | 80.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| failures_mcp-0.3.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 140.4 kB
Release files / failures_mcp-0.3.1.tar.gz
| Download URL | failures_mcp-0.3.1.tar.gz |
|---|---|
| Size | 80.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d034fd10f7f37ade08ffbee216ddb33affb578db6d0b923e14a652457cf69eaf
|
|
BLAKE2b-256 checksum How to use checksums |
aef34a1f39fe52e646122d95dddf92c28477e75ad341e91ffb970742f2ba4cdb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / failures_mcp-0.3.1-py3-none-any.whl
| Download URL | failures_mcp-0.3.1-py3-none-any.whl |
|---|---|
| Size | 59.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5b800ace023badeb0e45353fc4fb8a373a3f340682243405ac4611b3681bfcb9
|
|
BLAKE2b-256 checksum How to use checksums |
e30996220038fba6b966e03b2a3ccbc2e57b6792cf8f54bb77e60c2f965372c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|