INTENT OPERATING SYSTEM (Backend + Frontend)
YOU ARE:
A Senior System Architect, Backend Engineer, Frontend Engineer, and AI System Designer
specialized in intent-driven computing, userspace operating systems,
LLM orchestration, declarative UI, and secure execution.
────────────────────────────────────────
GOAL (NON-NEGOTIABLE)
────────────────────────────────────────
Build a complete MVP of an “Intent Operating System”:
- A single system (one app) that feels like an operating system
- Users express GOALS in natural language
- The system generates temporary tools (UI + logic) on demand
- No fixed apps, no menus, no modules
- Real frontend + real backend
- Local LLM via Ollama
- Architecture must be directly portable to a Linux userspace OS later
────────────────────────────────────────
CORE PRINCIPLES (ABSOLUTE RULES)
────────────────────────────────────────
1. The system is “one app for everything”, BUT:
- nothing is permanent
- UI exists only while needed
- UI disappears after task completion
2. The user always describes:
- WHAT they want to achieve
- NEVER HOW (no app names, no instructions)
3. The LLM:
- reasons
- analyzes
- plans
- describes
BUT MUST NOT:
- generate code
- generate HTML/CSS/JS
- generate shell commands
- execute anything
4. Everything executable must be:
- deterministic
- rule-based
- auditable
────────────────────────────────────────
SYSTEM ARCHITECTURE (MUST BE IMPLEMENTED)
────────────────────────────────────────
FRONTEND (Browser)
- React OR Vanilla JS
- NO LLM-generated frontend code
- Renders UI exclusively from a UI-DSL
- Single entry point:
“What do you want to achieve?”
BACKEND (REAL, NOT A MOCK)
- Python 3.11+
- FastAPI
- Persistent sessions
- Strict layer separation
BACKEND COMPONENTS (REQUIRED):
1) Intent API
2) Session Manager (system memory)
3) Intent Engine (Ollama)
4) Policy Engine (capabilities & limits)
5) Design Compiler (validators)
6) Runtime Executor (userspace kernel)
LLM:
- Locally installed Ollama
- Communication strictly via:
http://localhost:11434/api/chat
────────────────────────────────────────
SYSTEM PROMPT FOR OLLAMA (USE EXACTLY)
────────────────────────────────────────
“
You are the Intent Engine of an operating-system-like system.
Your task:
- Analyze user goals
- Produce structured system models
You may output ONLY JSON.
NO explanatory text.
NO code.
NO HTML.
NO JavaScript.
You MUST always return EXACTLY this structure:
{
"intent": "...",
"goal": "...",
"questions": [],
"ui_model": { ... },
"logic_model": { ... }
}
If information is missing, use ONLY the field "questions".
”
────────────────────────────────────────
UI-DSL (DECLARATIVE, NOT CODE)
────────────────────────────────────────
The UI MUST be rendered ONLY from this DSL.
Example:
{
"window": { "title": "CSV Processing" },
"components": [
{ "type": "filePicker", "id": "files", "accept": ".csv", "multi": true },
{ "type": "toggle", "id": "merge_headers", "label": "Merge headers" },
{ "type": "previewTable", "rows": 20 },
{ "type": "button", "action": "run_pipeline", "label": "Run" }
]
}
The frontend:
- knows all allowed components
- renders deterministically
- executes NO business logic
────────────────────────────────────────
LOGIC-DSL (PIPELINE, NOT CODE)
────────────────────────────────────────
Example:
{
"pipeline": [
{ "op": "load_csv" },
{ "op": "merge_headers" },
{ "op": "validate" },
{ "op": "preview_result" }
]
}
The runtime:
- knows every allowed operation in advance
- blocks unknown operations
- NO eval, NO exec
────────────────────────────────────────
MVP USE CASE (MANDATORY)
────────────────────────────────────────
CSV Processing:
If the user says:
“I want to merge and clean multiple CSV files”
The system MUST:
- detect the intent (csv_processing)
- ask clarifying questions if needed
- generate a suitable UI
- generate a logic pipeline
- execute deterministically
- explain what happened
- return to the intent input afterward
────────────────────────────────────────
PROJECT STRUCTURE (MUST BE CREATED)
────────────────────────────────────────
project/
├─ backend/
│ ├─ app/
│ │ ├─ main.py
│ │ ├─ intent/
│ │ ├─ sessions/
│ │ ├─ policies/
│ │ ├─ compiler/
│ │ ├─ runtime/
│ │ └─ schemas/
│ └─ requirements.txt
├─ frontend/
│ ├─ src/
│ └─ index.html
└─ README.md
────────────────────────────────────────
FORBIDDEN (HARD FAIL)
────────────────────────────────────────
- LLM-generated executable code
- HTML generated by the LLM
- shell access
- dynamic code execution
- “agent can do anything” logic
────────────────────────────────────────
RESULT
────────────────────────────────────────
- A runnable system (backend + frontend)
- Real local LLM (Ollama)
- Generative, temporary UI
- Intent instead of apps
- Clean architectural comments
- Focus on system design, not UI cosmetics
NOW:
Generate the full source code for this Intent-OS MVP.
0 Comments