AI image editing orchestrator - prompt optimization with 12-point constraint rule set and Replicate API integration
JavaScriptOpen Source
The problem
What's broken without this
π―
Prompt drift across edits
Generative models produce inconsistent results when you make sequential edits without explicit constraints, breaking visual coherence.
β±οΈ
Manual prompt engineering
Writing detailed, constraint-aware prompts for each image edit requires domain expertise and takes minutes per iteration.
π«
Unintended model behaviors
Image models hallucinate unwanted details or ignore spatial/stylistic requirements without a structured rule framework.
The difference
Why it matters
β Without
Manual work
Slow iteration
Repeated mistakes
β With this
12-point constraint rule set prevents hallucination and drift
Converts high-level edit intents into production-ready prompts automatically
Tracks spatial rules (position, scale, lighting) explicitly in prompt structure
Under the hood
How it works
π₯
Define edit intent + constraints
You specify the target object, edit type (device swap, style transfer, etc.), elements to preserve, and spatial/lighting rules.
βοΈ
Apply 12-point constraint rule set
The prompt builder evaluates your intent against rules for composition, lighting, interactions, and forbidden elements, then synthesizes a detailed prompt.
π¬
Send to Replicate API
The optimized prompt is sent to a generative image model, which produces an edited image respecting all specified constraints.
What it does
Core capabilities
β‘
Fast
Optimized for speed and efficiency.
π―
Reliable
Built to work consistently.
π
Integrates
Works with your existing tools.
Instead of rewriting prompts for every edit, you define constraints once and the system generates consistent, rule-compliant prompts for each variation.
arc-web/Claude-Creative-Director
Codebase
Built with care
π»
JavaScript
Built in JavaScript for type safety and reliability.
ποΈ
Architecture
SDK/Library
π¦
Key deps
dotenv, replicate
π
Open Source (MIT / PolyForm)
Fork it, extend it, ship it. It's yours.
Built by
Mike Ensor Arc Web
AI automation, marketing technology, building tools that work.
Mike builds open-source AI tools for agencies, marketers, and operators who are done waiting for software to catch up. All Arc Web projects are open source by default β fork them, extend them, ship them.