Skip to content

Latest commit

 

History

76 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Intent Compiler

Stop writing prompts. Compile intent into AI systems.

Intent Compiler is a reactive workflow system that turns a high-level goal into a structured, executable plan. You write the goal in plain language. It compiles into step-by-step workflows, or into instruction files like CLAUDE.md, .cursorrules, and AGENTS.md.

Overview

Complex technical tasks fail on poorly defined context, shifting requirements, and generic prompts. Intent Compiler works in stages.

  1. Identifying Intent: Capture the core objective of the user.
  2. Refining Context: LLMs suggest project types, target audiences, and technical constraints.
  3. Compiling Behavior: Turn the refined intent into actionable steps or specialized instruction files.

Features

  • Smart Suggestions: Field recommendations from an LLM (Project, Audience, Style, Tone), tailored to your intent.
  • Reactive Workflows: Run, refine or modify each step on its own.
  • Instruction Generator: Exports intents into 6+ specialized formats including CLAUDE.md, AGENTS.md, .cursorrules, and .windsurfrules.
  • Multi-Agent Orchestration: Coordinates specialized AI agents for complex system building, with role matching and a skill registry.
  • Intelligent Model Orchestration: A 3-tier model strategy (Quality, Efficiency, Speed) that picks the LLM for each sub-task.
  • Dynamic Provider Support: Fetches and selects models from OpenRouter, Groq, OpenAI, and Ollama in real time.
  • Local LLM Support (Ollama): Private inference on models running on your own machine.
  • Project Scan Engine: Detects your project's name and tech stack (Next.js, React, Tailwind, TS) for zero-click context.
  • Quality Scoring System: 6-dimensional evaluation (correctness, specificity, executability, safety, compatibility, brevity) with validation gates.
  • Vibe Mode: A high-fidelity UI view for fast architectural building with reusable templates.
  • Intelligent Questioning: Asks targeted questions to clear up vague intent.
  • Step Validation: Execution-time validation with rollback and error recovery.

Architecture

Intent Compiler is built on a fullstack Next.js (App Router) architecture, tuned for low latency and a high-fidelity UI.

  • Frontend (React/Framer Motion): A glassmorphic, reactive interface managed by a central ContextForm and WorkflowContainer. It uses framer-motion for micro-animations and z-index layering to keep the UI stacked correctly.
  • Model Orchestration Layer (lib/aicc): A custom internal abstraction (AICC). It handles multi-provider authentication, model property extraction (context length, capabilities), and dynamic tier-based selection.
  • Compiler Logic (lib/contextCompiler): Builds refined prompts, grades result quality, and formats structured output.
  • API Layer (app/api): Serverless endpoints for real-time suggestion fetching, workflow compilation, and model list synchronization.

Tech Stack

Repository Structure

/app
  /api                    → Serverless API endpoints
    /analysis             → Project and repo analysis endpoints
    /compilation          → Intent compilation and workflow generation
    /execution            → Step execution and validation
    /generation           → Instruction file generation (CLAUDE.md, etc.)
    /model-selection      → Model routing and recommendations
    /suggestions          → LLM-powered field suggestions
    /validation           → Quality scoring and validation gates
  /workflow               → Interactive workflow execution page
/components
  /ui                     → Reusable glassmorphic components
  ContextForm.tsx         → Main intent entry & context refinement engine
  ExecutionPanel.tsx      → Step execution interface
  FileTree.tsx            → Project structure visualization
  HistoryPanel.tsx        → Workflow history and versioning
  InputForm.tsx           → Structured input collection
  IntelligentQuestionsModal.tsx → AI-driven clarification UI
  ModelRecommendationBadge.tsx    → Model selection indicators
  RepoInput.tsx           → Repository URL input with analysis
  StepCard.tsx            → Individual workflow step component
  TierBadge.tsx           → Quality/Efficiency/Speed tier indicator
  VibeLibrary.tsx         → Template browser and selector
  WelcomeIntro.tsx        → Onboarding and example carousel
  WorkflowContainer.tsx   → Step-by-step execution orchestrator
/lib
  /core                   → Core utilities (JSON guard, OpenAI, storage)
  aicc.ts                 → AI Control Center - multi-provider abstraction
  agentOrchestrator.ts    → Multi-agent coordination and dispatch
  contextCompiler.ts    → Structured prompt building & compilation
  contextEngineer.ts     → Advanced context refinement pipeline
  db.ts                   → SQLite database interface
  dynamicRoles.ts         → Role definition and matching system
  executionEngine.ts      → Workflow execution with rollback support
  fileExporter.ts         → ZIP, PDF export functionality
  instructionAssembler.ts → Multi-format instruction file builder
  instructionQuality.ts   → Quality scoring for generated instructions
  intelligentQuestioner.ts → AI-driven intent clarification
  jsonGuard.ts            → Robust JSON parsing with fallbacks
  knowledgeBase.ts        → Domain knowledge and best practices
  logger.ts               → Structured logging system
  modelRouter.ts          → Intelligent model selection by task type
  phaseWorkflow.ts        → Phased workflow state management
  projectAnalyzer.ts      → Automatic project structure detection
  repoAnalyzer.ts         → GitHub repository analysis
  roleDatabase.ts         → Agent role definitions and skills
  roleMatcher.ts          → Intelligent agent-role matching
  schemas.ts              → Zod validation schemas
  skillsRegistry.ts       → Agent capabilities registry
  stepQuality.ts          → Step-level quality validation
  superIntelligentModel.ts → Advanced model orchestration
  tierConfig.ts           → Tier-based model configuration
  types.ts                → TypeScript type definitions
  validationCheckpoint.ts → Execution validation gates
  vibeStorage.ts          → Vibe template persistence

Installation

Prerequisites

  • Node.js 18.x or higher
  • npm or yarn

Setup

  1. Clone the repository:
    git clone https://github.com/PantheraLabs/IntentCompiler.git
    cd IntentCompiler
  2. Install dependencies:
    npm install
  3. Configure environment variables. Create a .env file in the root:
    OPENAI_API_KEY=your_openai_key
    OPENROUTER_API_KEY=your_openrouter_key
    GROQ_API_KEY=your_groq_key
    (See .env.example for all required fields)

Usage

1. Identify your Intent

Enter a high-level goal on the home screen. Use the Example Carousel for inspiration.

2. Refine Context

The system suggests a project type, an audience, and constraints. The Smart Suggestion Chips fill the form quickly.

3. Select your Tier

The system automatically optimizes for Speed (suggestions), Efficiency (refinement), or Quality (final compilation). You can override the models in the dropdowns.

4. Compile & Execute

  • Compile Workflow: Generates a structured execution plan you can run step-by-step.
  • Compile Instruction File: Generates a CLAUDE.md or .cursorrules file from your intent.

Development

Run the development server locally:

npm run dev

The app runs at http://localhost:3000.

Linting & Formatting

npm run lint

Roadmap

  • Support for local LLM providers (Ollama).
  • Integrate project context auto-detection/scanning.
  • Export workflows directly to JSON/YAML for CLI runners.
  • Multi-turn intent refinement (chat-based context building).
  • Performance benchmarking for different model tiers.

License

Copyright (c) 2026 Rishi Praseeth Krishnan. All rights reserved.

This software and its source code are for viewing and reference only. No license is granted to use, copy, modify, distribute, or create derivative works without express written permission. See the LICENSE file for the full restrictive terms.

About

Compile structured intent into reliable AI workflows — no prompt engineering required

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages