Prompt Logic Gates (PLG) is a revolutionary paradigm that shifts prompt engineering away from ad-hoc text editing and treats prompt construction as a discrete, visual logical circuit.
By visually routing text elements through logical operations, prompt engineers can systematically combine, filter, isolate, and debug prompt behaviors in real-time inside a beautiful visual compiler IDE.
graph LR
subgraph Raw Input Layer
A[File Node: prompt.txt]
B[Prompt Box: PS1 Graphics]
C[Prompt Box: Abandoned Hospital]
end
subgraph Logical Execution Layer
AND{AND Gate}
end
subgraph Output Monitor Layer
FV[Prompt File Viewer]
end
A -->|File State| AND
B -->|Prompt A| AND
C -->|Prompt B| AND
AND -->|Compiled Stream| FV
- ⚡ Visual Prompt Programming: Build prompts like logical circuits using custom React Flow nodes.
- ⛓️ File Stream Baselines: Pass robust prompt states downstream through dedicated baselines.
- 🎛️ Custom Logic Gates:
- AND Gate: Merge prompt fragments dynamically.
- OR Gate: Toggle and alternate stylistic paths.
- NOT Gate: Suppress unwanted concepts and append explicit negation instructions (e.g. "avoid concept") directly to the baseline.
- 🔮 Live Compiler Engine: See compiled output in real-time as you connect, disconnect, and tweak nodes.
- 📚 obsidian-Compatible Compounding Wiki: Full technical specifications and architecture design logs are built-in.
- Frontend: React (v18) & Vite
- Visual Flow Library: @xyflow/react (React Flow)
- Icons: Lucide React
- Styling: Premium custom Vanilla CSS
All technical specifications, compiler logic, node parameters, and architectural guides are maintained in the local wiki. Check out the entry points below:
- Wiki Catalog Entrypoint - Complete catalog of the visual logic wiki.
- Vision & Concept Overview - Core ideas, problems solved, and baseline mechanisms.
- Compiler & Logic Specifications - Categories, keywords, semantic weights, conflict matrices, and AI prompts.
- Architecture & Execution Flow - Reactive sync, execution topological sort order, and engine internals.
- Nodes & Handles Guide - complete reference of input/output pins, custom logic elements, and node structure.
- Workflows & Examples - Construction recipes, prompt circuit exports, and user guides.
Make sure you have Node.js (v18+) installed.
-
Clone the repository:
git clone https://github.com/WithSJ/Prompt-Logic-Gates-PLG-.git cd Prompt-Logic-Gates-PLG- -
Install dependencies:
npm install
-
Run the development server:
npm run dev
-
Build the application for production:
npm run build
Contributions to the Prompt Logic Gates IDE are highly appreciated!
To assist new contributors and developers, we have established a dedicated Developer Documentation suite:
- 🛠️ Setup & Running Locally: Follow the step-by-step installation and Vite dev server guides in documentation/development/setup.md.
- 📏 Coding Standards & Rules: Review pure Vanilla CSS classes, React Flow canvas synchronization, and topological compiler specifications in documentation/development/standards.md.
- 🤖 LLM Agent Auto-Maintenance: Learn how to use AI coding assistants to automatically update index catalogs and chronological log ledgers in documentation/development/llm-automation.md.
If you are using AI agents (like Gemini, Claude, or ChatGPT) to modify the codebase, please instruct them to read AGENTS.md first. It specifies strict logging formats and entry schemas to keep the repository documentation pristine and automated!
This project is open-source. See the repository page for licensing details.