State management shouldn’t require you to be the runtime.
Directive is an open-source runtime for TypeScript that replaces manual state orchestration with declarative constraints. Built by a solo engineer, hardened by 1,400+ tests, designed to scale from UI state to AI agent coordination.
1,400+ Tests
Defense-in-depth coverage across the full runtime
~3KB Gzipped
Tree-shakeable, zero dependencies
TypeScript-First
Full type inference, zero codegen
The Project
What It Does
Most state management libraries ask you to describe how things change. Directive asks you to describe what must be true. You declare constraints – rules about your system’s valid states – and the runtime resolves them automatically. When facts change, constraints evaluate, requirements emerge, and resolvers execute. No manual wiring, no action dispatching, no forgotten edge cases.
Why It Exists
Directive was born from building a game engine. When managing dozens of interconnected systems – physics, rendering, AI, audio – it became clear that traditional state management doesn’t scale. Every state change triggered a cascade of manual orchestration: check this flag, update that dependency, notify these listeners. The realization was simple – state management shouldn’t require you to be the runtime.
Where It’s Going
Directive is heading toward AI agent orchestration, where autonomous systems need to declare goals and let the runtime coordinate their resolution. The same constraint-driven model that manages UI state can manage multi-agent workflows, real-time collaboration, and complex business logic. Framework-agnostic by design, with developer experience at the core.
Directive is opinionated about how state should work. Read the full philosophy →
The Team
Creator & Lead
Jason Comes
Engineer · Tech Enthusiast · Stack Strategist
20+ years building for the web – from freelance beginnings to senior engineering roles. The idea behind Directive came from a hobby project – building Minglingo, a real-time social app where wrangling complex, interconnected systems demanded something better. Instead of reaching for another library, the answer was to build one that met entirely new constraints. So Directive was born!
Equal parts engineer and visionary. Obsessed with application development, user experience, UI design, site performance, SEO, typography, and building tools that actually feel good to use.
Engineering Standards
Every change goes through architecture review, security audit, and runtime hardening analysis. The constraint engine, resolver pipeline, and effects system are continuously stress-tested.
1,400+
tests passing
20+
hardening fixes shipped
100+
reviews completed
Directive is built in the open. Contributions, bug reports, and RFCs are welcome on GitHub.
Powered by Directive. This website uses a Directive module with facts, derivations, constraints, and resolvers – zero useState, zero useEffect. Get started →

