Plain: Django Fork Rebuilt for AI Coding Agents
1 min read
Originally from plainframework.com
View source
My notes
Summary
Plain is a Python web framework forked from Django by the team behind PullApprove, rebuilt around typed models, explicit routing, and first-party tooling designed for AI coding agents. It ships 29 first-party packages (auth, ORM, background jobs, admin, email) with agent-friendly docs baked in, pre-1.0, and explicitly breaks Django backwards compatibility to iterate faster.
Key Insight
- Positions itself as “Django reshaped for the agent era”. The pitch isn’t better DX for humans, it’s making the framework predictable enough that LLMs reliably write correct code against it.
- Four-layer agent tooling model: rules (always-on guardrails loaded before the agent writes code), docs (full framework docs on demand, sliceable by section), skills (end-to-end workflows triggered by slash commands), CLI (verify correctness + auto-format in one step). This maps cleanly to Claude Code’s own skill/subagent model.
- Models use typed class attributes with explicit
@postgres.register_modeldecorator andtypes.EmailField()style fields, more verbose than Django’s implicitEmailField(), but the explicitness is what makes it legible to agents (no Django metaclass magic). - URLs use
Routerclasses withnamespaceattribute instead of Django’s flaturls.pyconvention, more structure, more deterministic for codegen. - No backwards compatibility commitment. That’s the actual moat vs. Django: willingness to break things to remove ambiguity. Django’s 20-year compat debt is a liability for LLM accuracy.
- Driven by PullApprove’s own product needs, not a community vote. Single-vendor framework with strong opinions, closer to Rails philosophically than Django.
- Postgres-only ORM (
plain.postgres) instead of Django’s DB-agnostic abstraction. Simpler surface area, fewer edge cases for agents to hallucinate around.