Tech USP: Source of truth is the feature file (defineFeature.ts). The AI changes it pattern by pattern via a code patcher.
How it works
- Pattern schema: typed representation of the
r.*calls - Reader: parses the feature file → typed pattern list
- Patcher: adds, replaces or removes patterns. Custom code between patterns survives
- Renderer: writes a canonical object form (
r.entity({ name, fields })) - AI builder (Enterprise): prompt → patcher calls. Custom code areas stay code, AI generates via tool use
What you get
- Targeted changes: the AI only changes the affected patterns, the rest of the file stays as it is
- Checkable: because features follow a fixed shape, the framework checks every change before it runs
- Custom code stays: the patcher edits what it recognizes as patterns and leaves custom handler bodies alone
Architecture deep dive
packages/feature-ast/in the framework (code): parse + render + patch + patcher- feature-structure: feature-file conventions
Continue in the docs