tdd-agent-loops
Skill2 starsChanged 4 months agoMITView on GitHub
Test-driven development for agent systems: red-green-refactor on graphs, mocked LLM fixtures, pytest-asyncio, trace assertions. Use when adding agent nodes, fixing loop bugs, or building pattern repos.
Files
TDD for Agent Loops
Inspired by mattpocock/skills tdd — adapted for LangGraph.
Red → Green → Refactor
- Red — Write failing test for routing or node output (mock LLM)
- Green — Minimal node/routing fix
- Refactor — Extract helpers only when second test needs it
What to test
| Layer | Test |
| Routing | route_after_quality returns retry/pass/escalate |
| Nodes | Given state in, partial state out (no real LLM) |
| Integration | Full graph with FakeLLM fixture |
| Repo-fix | Clone fixture repo, assert branch + patch count |
Fixtures
@pytest.fixture
def fake_llm():
return FakeLLM(responses=[{"content": "..."}])Async
@pytest.mark.asyncio
async def test_graph_happy_path(tmp_path):
...Avoid
- Tests that only assert "graph compiles"
- Snapshotting full LLM prose (flaky)
- Hitting live Groq in CI
Reference
loop-engine-agent-platform/tests/test_repo_fix.py*-agent-pattern/tests/— minimal pattern coverage
Other versions4 projects use a version of this.
Word for word · 4
- vpeetla-ai/aegisai-enterprise-agent-platform★ 2100% same
- vpeetla-ai/multi-agent-system-pattern★ 2100% same
- vpeetla-ai/reflection-agent-pattern★ 2100% same
- vpeetla-ai/swarm-agent-pattern★ 2100% same
Edited · 0
None found.
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository13 other files it gives its agents.
- AGENTS.mdAGENTS.md
- aegis-gatewaySkill
- agentic-engineeringSkill
- deploy-vercel-renderSkill
- governed-ai-stackSkill
- grill-with-contextSkill
- hitl-side-effectsSkill
- langgraph-orchestrationSkill
- loop-engineeringSkill
- portfolio-adrSkill
- rag-governanceSkill
- repo-fix-prSkill
- setup-vpeetla-skillsSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
Reviews can't be read right now.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

