├── langchain.js, ├── src ├── components │ ├── LangGraphPrompt.tsx │ ├── ui │ │ ├── use-toast.ts │ │ ├── aspect-ratio.tsx │ │ ├── skeleton.tsx │ │ ├── collapsible.tsx │ │ ├── label.tsx │ │ ├── textarea.tsx │ │ ├── separator.tsx │ │ ├── progress.tsx │ │ ├── input.tsx │ │ ├── toaster.tsx │ │ ├── sonner.tsx │ │ ├── checkbox.tsx │ │ ├── slider.tsx │ │ ├── switch.tsx │ │ ├── tooltip.tsx │ │ ├── badge.tsx │ │ ├── hover-card.tsx │ │ ├── popover.tsx │ │ ├── avatar.tsx │ │ ├── toggle.tsx │ │ ├── radio-group.tsx │ │ ├── alert.tsx │ │ ├── scroll-area.tsx │ │ ├── resizable.tsx │ │ ├── toggle-group.tsx │ │ ├── button.tsx │ │ ├── tabs.tsx │ │ ├── accordion.tsx │ │ ├── card.tsx │ │ ├── input-otp.tsx │ │ ├── calendar.tsx │ │ ├── breadcrumb.tsx │ │ ├── pagination.tsx │ │ ├── table.tsx │ │ └── drawer.tsx │ ├── ErrorBoundary.tsx │ ├── PromptLibrary.tsx │ ├── MainNav.tsx │ ├── constants │ │ └── categories.ts │ └── PromptOptimizer.tsx ├── vite-env.d.ts ├── main.tsx ├── lib │ └── utils.ts ├── tools │ ├── types.ts │ ├── index.ts │ └── prompt │ │ └── promptGenerator.ts ├── services │ ├── openRouterService.ts │ ├── templateService.ts │ ├── toolService.ts │ ├── langchainService.ts │ ├── langGraphService.ts │ ├── __tests__ │ │ ├── openRouterService.test.ts │ │ └── settingsService.test.ts │ └── storageService.ts ├── templates │ ├── topology.md │ ├── complex-analysis.md │ ├── category-theory.md │ ├── number-theory.md │ ├── set-theory.md │ ├── abstract-algebra.md │ ├── zero-shot.md │ ├── symbolic-systems.md │ ├── direct-instruction.md │ ├── mathematical-logic.md │ ├── step-by-step.md │ ├── tree-of-thoughts.md │ ├── chain-of-thought.md │ ├── role-playing.md │ ├── task-decomposition.md │ ├── few-shot.md │ ├── token-optimization.md │ ├── red-teaming.md │ ├── constitutional-ai.md │ └── system-dynamics.md ├── App.css ├── test │ └── setup.ts ├── App.tsx ├── index.css └── contexts │ └── EditModalContext.tsx ├── .dockerignore ├── bun.lockb ├── public ├── favicon.ico ├── og-image.png ├── templates │ ├── topology copy.md │ ├── number-theory.md │ ├── set-theory copy.md │ ├── prompt-chaining.md │ ├── zero-shot.md │ ├── context-window.md │ ├── knowledge-graphs.md │ ├── semantic-control.md │ ├── temporal-reasoning.md │ ├── causal-inference.md │ ├── output-sanitization.md │ ├── prompt-injection.md │ ├── response-shaping.md │ ├── jailbreak-prevention.md │ ├── prompt-compression.md │ ├── automatic-reasoning.md │ ├── multi-agent.md │ ├── temperature-control.md │ ├── self-reflection.md │ ├── context-distillation.md │ ├── direct-instruction.md │ ├── meta-prompting.md │ ├── recursive-prompting.md │ ├── socratic-method.md │ ├── chain-of-verification.md │ ├── emergent-abilities.md │ ├── retrieval-augmented.md │ ├── adversarial-prompting.md │ ├── step-by-step.md │ ├── recursive-refinement.md │ ├── self-consistency.md │ ├── chain-of-thought.md │ ├── role-playing.md │ ├── tree-of-thoughts.md │ ├── react-framework.md │ ├── task-decomposition.md │ ├── few-shot.md │ ├── token-optimization.md │ ├── red-teaming.md │ ├── constitutional-ai.md │ ├── memory-systems.md │ ├── tool-using-agents.md │ ├── multi-agent-systems.md │ ├── topology.md │ ├── system-dynamics.md │ ├── complex-analysis.md │ ├── category-theory.md │ ├── systematic-suppression.md │ ├── set-theory.md │ ├── abstract-algebra.md │ ├── conversational-agents.md │ ├── symbolic-systems.md │ ├── vector-memory.md │ ├── time-weighted-memory.md │ ├── buffer-memory.md │ ├── mathematical-logic.md │ ├── summary-memory.md │ ├── conversation-memory.md │ ├── zero-shot-agent.md │ ├── entity-memory.md │ ├── plan-and-execute.md │ ├── structured-chat.md │ ├── autonomous-agents.md │ ├── react-agent.md │ ├── agent-executor.md │ ├── sql-chain.md │ ├── vector-store.md │ ├── supervisor-agent.md │ ├── team-chat.md │ ├── xml-agent.md │ ├── api-chain.md │ ├── agent-network.md │ ├── openai-functions.md │ ├── hierarchical-agents.md │ ├── retrieval-qa.md │ ├── sequential-chain.md │ └── router-chain.md └── placeholder.svg ├── .aider.tags.cache.v3 └── cache.db ├── postcss.config.js ├── sample.env ├── Dockerfile ├── components.json ├── jest.config.js ├── vite.config.ts ├── fly.toml ├── tsconfig.node.json ├── .github └── workflows │ └── fly-deploy.yml ├── tsconfig.json ├── tsconfig.app.json ├── eslint.config.js ├── .gitignore ├── index.html └── tailwind.config.ts /langchain.js,: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/components/LangGraphPrompt.tsx: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .git 3 | .env* 4 | !dist/ 5 | cache.* 6 | -------------------------------------------------------------------------------- /bun.lockb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/reflective-engineer/HEAD/bun.lockb -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/reflective-engineer/HEAD/public/favicon.ico -------------------------------------------------------------------------------- /public/og-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/reflective-engineer/HEAD/public/og-image.png -------------------------------------------------------------------------------- /.aider.tags.cache.v3/cache.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ruvnet/reflective-engineer/HEAD/.aider.tags.cache.v3/cache.db -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /src/components/ui/use-toast.ts: -------------------------------------------------------------------------------- 1 | import { useToast, toast } from "@/hooks/use-toast"; 2 | 3 | export { useToast, toast }; 4 | -------------------------------------------------------------------------------- /src/main.tsx: -------------------------------------------------------------------------------- 1 | import { createRoot } from 'react-dom/client' 2 | import App from './App.tsx' 3 | import './index.css' 4 | 5 | createRoot(document.getElementById("root")!).render(); 6 | -------------------------------------------------------------------------------- /src/components/ui/aspect-ratio.tsx: -------------------------------------------------------------------------------- 1 | import * as AspectRatioPrimitive from "@radix-ui/react-aspect-ratio" 2 | 3 | const AspectRatio = AspectRatioPrimitive.Root 4 | 5 | export { AspectRatio } 6 | -------------------------------------------------------------------------------- /src/lib/utils.ts: -------------------------------------------------------------------------------- 1 | import { clsx, type ClassValue } from "clsx" 2 | import { twMerge } from "tailwind-merge" 3 | 4 | export function cn(...inputs: ClassValue[]) { 5 | return twMerge(clsx(inputs)) 6 | } 7 | -------------------------------------------------------------------------------- /sample.env: -------------------------------------------------------------------------------- 1 | # OpenRouter Configuration 2 | VITE_OPENROUTER_KEY=your_openrouter_key_here 3 | VITE_ENCRYPTION_KEY=your_encryption_key_here 4 | 5 | # API Keys 6 | ANTHROPIC_API_KEY=your_anthropic_api_key_here 7 | OPENAI_API_KEY=your_openai_api_key_here -------------------------------------------------------------------------------- /src/components/ui/skeleton.tsx: -------------------------------------------------------------------------------- 1 | import { cn } from "@/lib/utils" 2 | 3 | function Skeleton({ 4 | className, 5 | ...props 6 | }: React.HTMLAttributes) { 7 | return ( 8 |
12 | ) 13 | } 14 | 15 | export { Skeleton } 16 | -------------------------------------------------------------------------------- /src/tools/types.ts: -------------------------------------------------------------------------------- 1 | import { z } from "zod"; 2 | 3 | export type ToolCategory = 'prompt' | 'analysis' | 'utilities'; 4 | 5 | export interface Tool { 6 | id: string; 7 | name: string; 8 | description: string; 9 | category: ToolCategory; 10 | icon: React.ComponentType; 11 | schema?: z.ZodType; 12 | execute: (input: any) => Promise; 13 | } 14 | -------------------------------------------------------------------------------- /src/components/ui/collapsible.tsx: -------------------------------------------------------------------------------- 1 | import * as CollapsiblePrimitive from "@radix-ui/react-collapsible" 2 | 3 | const Collapsible = CollapsiblePrimitive.Root 4 | 5 | const CollapsibleTrigger = CollapsiblePrimitive.CollapsibleTrigger 6 | 7 | const CollapsibleContent = CollapsiblePrimitive.CollapsibleContent 8 | 9 | export { Collapsible, CollapsibleTrigger, CollapsibleContent } 10 | -------------------------------------------------------------------------------- /src/tools/index.ts: -------------------------------------------------------------------------------- 1 | import { z } from "zod"; 2 | import { Tool, ToolCategory } from "./types"; 3 | 4 | export const toolRegistry = new Map(); 5 | 6 | export function registerTool(tool: Tool) { 7 | toolRegistry.set(tool.id, tool); 8 | } 9 | 10 | export function getToolsByCategory(category: ToolCategory): Tool[] { 11 | return Array.from(toolRegistry.values()) 12 | .filter(tool => tool.category === category); 13 | } 14 | -------------------------------------------------------------------------------- /src/services/openRouterService.ts: -------------------------------------------------------------------------------- 1 | import { OpenAI } from "@langchain/openai"; 2 | 3 | export function createOpenRouterClient(apiKey: string) { 4 | return new OpenAI({ 5 | baseURL: "https://openrouter.ai/api/v1", 6 | apiKey, 7 | modelName: "openai/gpt-3.5-turbo", 8 | configuration: { 9 | baseHeaders: { 10 | "HTTP-Referer": "*", 11 | "X-Title": "Reflective Engineer", 12 | "Origin": "*" 13 | } 14 | } 15 | }); 16 | } 17 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM nginx:alpine 2 | 3 | # Copy the built static files to nginx's serve directory 4 | COPY dist /usr/share/nginx/html 5 | 6 | # Copy a custom nginx config if needed 7 | # COPY nginx.conf /etc/nginx/conf.d/default.conf 8 | 9 | # Expose port 8080 as required by Fly.io 10 | EXPOSE 8080 11 | 12 | # Update nginx config to listen on port 8080 13 | RUN sed -i 's/listen\(.*\)80;/listen 8080;/' /etc/nginx/conf.d/default.conf 14 | 15 | # Start Nginx 16 | CMD ["nginx", "-g", "daemon off;"] 17 | -------------------------------------------------------------------------------- /components.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://ui.shadcn.com/schema.json", 3 | "style": "default", 4 | "rsc": false, 5 | "tsx": true, 6 | "tailwind": { 7 | "config": "tailwind.config.ts", 8 | "css": "src/index.css", 9 | "baseColor": "slate", 10 | "cssVariables": true, 11 | "prefix": "" 12 | }, 13 | "aliases": { 14 | "components": "@/components", 15 | "utils": "@/lib/utils", 16 | "ui": "@/components/ui", 17 | "lib": "@/lib", 18 | "hooks": "@/hooks" 19 | } 20 | } -------------------------------------------------------------------------------- /jest.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('jest').Config} */ 2 | export default { 3 | preset: 'ts-jest', 4 | testEnvironment: 'jsdom', 5 | setupFilesAfterEnv: ['/src/test/setup.ts'], 6 | moduleNameMapper: { 7 | '^@/(.*)$': '/src/$1', 8 | '\\.(css|less|scss|sass)$': 'identity-obj-proxy' 9 | }, 10 | transform: { 11 | '^.+\\.tsx?$': 'ts-jest' 12 | }, 13 | testMatch: ['**/__tests__/**/*.test.ts?(x)'], 14 | moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'] 15 | }; 16 | -------------------------------------------------------------------------------- /src/templates/topology.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Topology Fundamentals 3 | domain: mathematics 4 | category: Topology 5 | overview: Study of geometric properties and spatial relations unaffected by continuous deformation. 6 | --- 7 | 8 | # Open Sets 9 | (X,τ) - topological space 10 | U ∈ τ ⟹ U is open 11 | 12 | # Continuity 13 | f: X → Y is continuous 14 | ∀V∈τY: f⁻¹(V)∈τX 15 | 16 | # Connectedness 17 | X = A ∪ B, A∩B = ∅ 18 | A,B open ⟹ X disconnected 19 | 20 | # Compactness 21 | {Uα}α∈I open cover 22 | ∃ finite subcover -------------------------------------------------------------------------------- /public/templates/topology copy.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Topology Fundamentals 3 | domain: mathematics 4 | category: Topology 5 | overview: Study of geometric properties and spatial relations unaffected by continuous deformation. 6 | --- 7 | 8 | # Open Sets 9 | (X,τ) - topological space 10 | U ∈ τ ⟹ U is open 11 | 12 | # Continuity 13 | f: X → Y is continuous 14 | ∀V∈τY: f⁻¹(V)∈τX 15 | 16 | # Connectedness 17 | X = A ∪ B, A∩B = ∅ 18 | A,B open ⟹ X disconnected 19 | 20 | # Compactness 21 | {Uα}α∈I open cover 22 | ∃ finite subcover -------------------------------------------------------------------------------- /src/templates/complex-analysis.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Complex Analysis Foundations 3 | domain: mathematics 4 | category: Complex Analysis 5 | overview: Advanced study of complex functions, including integration, series expansions, and residue theory. 6 | --- 7 | 8 | # Complex Integration 9 | ∮ f(z)dz = 2πi∑Res(f,ak) 10 | 11 | # Series Expansions 12 | Let f(z) = ∑(n=0 to ∞) an(z-z₀)ⁿ 13 | 14 | # Residue Theory 15 | Res(f,a) = 1/(2πi)∮ f(z)dz 16 | 17 | # Conformal Mappings 18 | w = f(z) preserves angles 19 | ∂u/∂x = ∂v/∂y 20 | ∂u/∂y = -∂v/∂x -------------------------------------------------------------------------------- /src/templates/category-theory.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Category Theory Concepts 3 | domain: mathematics 4 | category: Category Theory 5 | overview: Abstract mathematical framework dealing with mathematical structures and relationships between them. 6 | --- 7 | 8 | # Basic Definitions 9 | C = (Ob(C), hom(C), ∘) 10 | F: C → D (Functor) 11 | 12 | # Natural Transformations 13 | η: F ⇒ G 14 | ∀X∈Ob(C): ηX: F(X) → G(X) 15 | 16 | # Universal Properties 17 | Initial Object: ∀X∃!f:I→X 18 | Terminal Object: ∀X∃!f:X→T 19 | 20 | # Adjunctions 21 | F ⊣ G 22 | Hom(F(A),B) ≅ Hom(A,G(B)) -------------------------------------------------------------------------------- /vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vite"; 2 | import react from "@vitejs/plugin-react-swc"; 3 | import path from "path"; 4 | import { componentTagger } from "lovable-tagger"; 5 | 6 | // https://vitejs.dev/config/ 7 | export default defineConfig(({ mode }) => ({ 8 | server: { 9 | host: "::", 10 | port: 8080, 11 | }, 12 | plugins: [ 13 | react(), 14 | mode === 'development' && componentTagger(), 15 | ].filter(Boolean), 16 | resolve: { 17 | alias: { 18 | "@": path.resolve(__dirname, "./src"), 19 | }, 20 | }, 21 | })); 22 | -------------------------------------------------------------------------------- /fly.toml: -------------------------------------------------------------------------------- 1 | # fly.toml app configuration file generated for reflective-engineer on 2024-12-18T17:09:16Z 2 | # 3 | # See https://fly.io/docs/reference/configuration/ for information about how to use this file. 4 | # 5 | 6 | app = 'reflective-engineer' 7 | primary_region = 'sjc' 8 | 9 | [build] 10 | 11 | [http_service] 12 | internal_port = 8080 13 | force_https = true 14 | auto_stop_machines = 'stop' 15 | auto_start_machines = true 16 | min_machines_running = 0 17 | processes = ['app'] 18 | 19 | [[vm]] 20 | memory = '1gb' 21 | cpu_kind = 'shared' 22 | cpus = 1 23 | -------------------------------------------------------------------------------- /src/templates/number-theory.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Number Theory Principles 3 | domain: mathematics 4 | category: Number Theory 5 | overview: Study of integers and their properties, including prime numbers, congruences, and arithmetic functions. 6 | --- 7 | 8 | # Congruence Relations 9 | a ≡ b (mod n) 10 | if n|(a-b) 11 | 12 | # Prime Numbers 13 | π(x) - prime counting function 14 | p#n - primorial function 15 | 16 | # Multiplicative Functions 17 | φ(n) - Euler totient 18 | μ(n) - Möbius function 19 | 20 | # Quadratic Reciprocity 21 | (a/p) - Legendre symbol 22 | (a/b) - Jacobi symbol -------------------------------------------------------------------------------- /public/templates/number-theory.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Number Theory Principles 3 | domain: mathematics 4 | category: Number Theory 5 | overview: Study of integers and their properties, including prime numbers, congruences, and arithmetic functions. 6 | --- 7 | 8 | # Congruence Relations 9 | a ≡ b (mod n) 10 | if n|(a-b) 11 | 12 | # Prime Numbers 13 | π(x) - prime counting function 14 | p#n - primorial function 15 | 16 | # Multiplicative Functions 17 | φ(n) - Euler totient 18 | μ(n) - Möbius function 19 | 20 | # Quadratic Reciprocity 21 | (a/p) - Legendre symbol 22 | (a/b) - Jacobi symbol -------------------------------------------------------------------------------- /src/templates/set-theory.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Set Theory Foundations 3 | domain: mathematics 4 | category: Set Theory 5 | overview: Exploration of fundamental set theory concepts and their applications in mathematical reasoning. 6 | --- 7 | 8 | # Basic Definitions 9 | Let U be the universal set 10 | Let A, B be subsets of U 11 | Let ∅ be the empty set 12 | 13 | # Operations 14 | - Union: A ∪ B 15 | - Intersection: A ∩ B 16 | - Complement: A' 17 | - Difference: A \ B 18 | 19 | # Properties 20 | 1. Commutative Laws 21 | 2. Associative Laws 22 | 3. Distributive Laws 23 | 4. DeMorgan's Laws -------------------------------------------------------------------------------- /src/tools/prompt/promptGenerator.ts: -------------------------------------------------------------------------------- 1 | import { z } from "zod"; 2 | import { Tool } from "../types"; 3 | import { Brain } from "lucide-react"; 4 | 5 | export const promptGeneratorTool: Tool = { 6 | id: 'prompt-generator', 7 | name: 'Prompt Generator', 8 | description: 'Generate structured prompts using templates', 9 | category: 'prompt', 10 | icon: Brain, 11 | schema: z.object({ 12 | domain: z.string(), 13 | context: z.string(), 14 | output: z.string() 15 | }), 16 | execute: async (input) => { 17 | // Implementation 18 | return input; 19 | } 20 | }; 21 | -------------------------------------------------------------------------------- /public/templates/set-theory copy.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Set Theory Foundations 3 | domain: mathematics 4 | category: Set Theory 5 | overview: Exploration of fundamental set theory concepts and their applications in mathematical reasoning. 6 | --- 7 | 8 | # Basic Definitions 9 | Let U be the universal set 10 | Let A, B be subsets of U 11 | Let ∅ be the empty set 12 | 13 | # Operations 14 | - Union: A ∪ B 15 | - Intersection: A ∩ B 16 | - Complement: A' 17 | - Difference: A \ B 18 | 19 | # Properties 20 | 1. Commutative Laws 21 | 2. Associative Laws 22 | 3. Distributive Laws 23 | 4. DeMorgan's Laws -------------------------------------------------------------------------------- /tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2022", 4 | "lib": ["ES2023"], 5 | "module": "ESNext", 6 | "skipLibCheck": true, 7 | 8 | /* Bundler mode */ 9 | "moduleResolution": "bundler", 10 | "allowImportingTsExtensions": true, 11 | "isolatedModules": true, 12 | "moduleDetection": "force", 13 | "noEmit": true, 14 | 15 | /* Linting */ 16 | "strict": true, 17 | "noUnusedLocals": false, 18 | "noUnusedParameters": false, 19 | "noFallthroughCasesInSwitch": true 20 | }, 21 | "include": ["vite.config.ts"] 22 | } 23 | -------------------------------------------------------------------------------- /.github/workflows/fly-deploy.yml: -------------------------------------------------------------------------------- 1 | # See https://fly.io/docs/app-guides/continuous-deployment-with-github-actions/ 2 | 3 | name: Fly Deploy 4 | on: 5 | push: 6 | branches: 7 | - main 8 | jobs: 9 | deploy: 10 | name: Deploy app 11 | runs-on: ubuntu-latest 12 | concurrency: deploy-group # optional: ensure only one action runs at a time 13 | steps: 14 | - uses: actions/checkout@v4 15 | - uses: superfly/flyctl-actions/setup-flyctl@master 16 | - run: flyctl deploy --remote-only 17 | env: 18 | FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }} 19 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [], 3 | "references": [ 4 | { "path": "./tsconfig.app.json" }, 5 | { "path": "./tsconfig.node.json" } 6 | ], 7 | "compilerOptions": { 8 | "baseUrl": ".", 9 | "paths": { 10 | "@/*": ["./src/*"] 11 | }, 12 | "noImplicitAny": false, 13 | "noUnusedParameters": false, 14 | "skipLibCheck": true, 15 | "allowJs": true, 16 | "noUnusedLocals": false, 17 | "strictNullChecks": false, 18 | "esModuleInterop": true, 19 | "jsx": "react-jsx", 20 | "types": ["jest", "node", "@testing-library/jest-dom"] 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/templates/abstract-algebra.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Group Theory Analysis 3 | domain: mathematics 4 | category: Abstract Algebra 5 | overview: Investigation of algebraic structures using group theory and ring theory. 6 | --- 7 | 8 | # Structures 9 | Let G be a group with operation • 10 | Let H be a subgroup of G 11 | Let N be a normal subgroup of G 12 | 13 | # Properties 14 | P(x): "x is a homomorphism" 15 | Q(x): "x preserves group structure" 16 | R(x): "x maps to kernel" 17 | 18 | # Objectives 19 | 1. Prove fundamental homomorphism theorem 20 | 2. Show group action properties 21 | 3. Analyze quotient groups -------------------------------------------------------------------------------- /src/templates/zero-shot.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Zero-Shot Prompting 3 | domain: prompt-engineering 4 | category: Basic Frameworks 5 | overview: Direct prompting without examples, relying on the model's pre-trained knowledge. 6 | --- 7 | 8 | # Core Components 9 | 1. Clear Instructions 10 | 2. Task Definition 11 | 3. Output Format 12 | 4. Constraints 13 | 14 | # Implementation 15 | - Direct Question/Task 16 | - No Examples Provided 17 | - Clear Output Specification 18 | 19 | # Best Practices 20 | 1. Be Explicit 21 | 2. Define Context 22 | 3. Specify Format 23 | 4. Set Constraints 24 | 25 | # Validation 26 | - Accuracy Check 27 | - Consistency Test 28 | - Output Verification 29 | -------------------------------------------------------------------------------- /public/templates/prompt-chaining.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Prompt Chaining 3 | domain: prompt-engineering 4 | category: Specialized 5 | overview: Connecting multiple prompts in sequence for complex task completion. 6 | --- 7 | 8 | # Core Components 9 | 1. Chain Design 10 | 2. State Management 11 | 3. Data Flow 12 | 4. Error Handling 13 | 14 | # Implementation 15 | - Define Sequence 16 | - Manage State 17 | - Control Flow 18 | - Handle Errors 19 | 20 | # Best Practices 21 | 1. Clear Dependencies 22 | 2. Data Validation 23 | 3. Error Recovery 24 | 4. Chain Optimization 25 | 26 | # Validation 27 | - Chain Completion 28 | - Data Integrity 29 | - Error Handling 30 | - Output Quality 31 | -------------------------------------------------------------------------------- /public/templates/zero-shot.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Zero-Shot Prompting 3 | domain: prompt-engineering 4 | category: Basic Frameworks 5 | overview: Direct prompting without examples, relying on the model's pre-trained knowledge. 6 | --- 7 | 8 | # Core Components 9 | 1. Clear Instructions 10 | 2. Task Definition 11 | 3. Output Format 12 | 4. Constraints 13 | 14 | # Implementation 15 | - Direct Question/Task 16 | - No Examples Provided 17 | - Clear Output Specification 18 | 19 | # Best Practices 20 | 1. Be Explicit 21 | 2. Define Context 22 | 3. Specify Format 23 | 4. Set Constraints 24 | 25 | # Validation 26 | - Accuracy Check 27 | - Consistency Test 28 | - Output Verification 29 | -------------------------------------------------------------------------------- /public/templates/context-window.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Context Window 3 | domain: prompt-engineering 4 | category: Optimization 5 | overview: Optimizing prompt design for effective use of model context windows. 6 | --- 7 | 8 | # Core Components 9 | 1. Window Size 10 | 2. Content Priority 11 | 3. Token Usage 12 | 4. Memory Management 13 | 14 | # Implementation 15 | - Size Analysis 16 | - Prioritize Content 17 | - Optimize Tokens 18 | - Manage Memory 19 | 20 | # Best Practices 21 | 1. Efficient Usage 22 | 2. Content Focus 23 | 3. Token Economy 24 | 4. Memory Optimization 25 | 26 | # Validation 27 | - Window Utilization 28 | - Content Fit 29 | - Token Efficiency 30 | - Memory Usage 31 | -------------------------------------------------------------------------------- /public/templates/knowledge-graphs.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Knowledge Graphs 3 | domain: prompt-engineering 4 | category: Specialized 5 | overview: Using graph-based knowledge representation for enhanced prompting. 6 | --- 7 | 8 | # Core Components 9 | 1. Node Definition 10 | 2. Edge Relations 11 | 3. Graph Structure 12 | 4. Query Methods 13 | 14 | # Implementation 15 | - Define Entities 16 | - Map Relations 17 | - Build Structure 18 | - Query Graph 19 | 20 | # Best Practices 21 | 1. Clear Ontology 22 | 2. Relation Types 23 | 3. Graph Maintenance 24 | 4. Query Optimization 25 | 26 | # Validation 27 | - Graph Accuracy 28 | - Query Performance 29 | - Data Consistency 30 | - Result Quality 31 | -------------------------------------------------------------------------------- /public/templates/semantic-control.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Semantic Control 3 | domain: prompt-engineering 4 | category: Specialized 5 | overview: Controlling semantic aspects of model outputs through precise prompting. 6 | --- 7 | 8 | # Core Components 9 | 1. Semantic Rules 10 | 2. Content Control 11 | 3. Style Management 12 | 4. Output Shaping 13 | 14 | # Implementation 15 | - Define Rules 16 | - Apply Controls 17 | - Manage Style 18 | - Shape Output 19 | 20 | # Best Practices 21 | 1. Clear Guidelines 22 | 2. Consistent Rules 23 | 3. Style Coherence 24 | 4. Quality Checks 25 | 26 | # Validation 27 | - Rule Adherence 28 | - Style Consistency 29 | - Content Control 30 | - Output Quality 31 | -------------------------------------------------------------------------------- /public/templates/temporal-reasoning.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Temporal Reasoning 3 | domain: prompt-engineering 4 | category: Specialized 5 | overview: Enabling time-based reasoning and temporal relationship understanding. 6 | --- 7 | 8 | # Core Components 9 | 1. Time Representation 10 | 2. Event Sequencing 11 | 3. Causal Relations 12 | 4. Temporal Logic 13 | 14 | # Implementation 15 | - Define Timeline 16 | - Order Events 17 | - Map Causality 18 | - Apply Logic 19 | 20 | # Best Practices 21 | 1. Clear Chronology 22 | 2. Event Relations 23 | 3. Causal Chains 24 | 4. Time Consistency 25 | 26 | # Validation 27 | - Timeline Accuracy 28 | - Event Order 29 | - Causal Logic 30 | - Time Coherence 31 | -------------------------------------------------------------------------------- /src/templates/symbolic-systems.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Symbolic Systems Analysis 3 | domain: computer-science 4 | category: Symbolic Systems 5 | overview: Analysis of symbolic computation and representation systems in artificial intelligence and formal languages. 6 | --- 7 | 8 | # Core Concepts 9 | Let Σ be a finite alphabet of symbols 10 | Let L be a formal language over Σ 11 | Let A be an automaton that recognizes L 12 | 13 | # Properties 14 | P(x): "x is a valid symbol in Σ" 15 | Q(x): "x is a valid string in L" 16 | R(x): "x is recognized by A" 17 | 18 | # Objectives 19 | 1. Define formal grammar rules 20 | 2. Construct finite state machines 21 | 3. Analyze language recognition patterns -------------------------------------------------------------------------------- /public/templates/causal-inference.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Causal Inference 3 | domain: prompt-engineering 4 | category: Specialized 5 | overview: Analyzing and inferring cause-effect relationships in prompt engineering. 6 | --- 7 | 8 | # Core Components 9 | 1. Causal Models 10 | 2. Variable Relations 11 | 3. Effect Analysis 12 | 4. Inference Rules 13 | 14 | # Implementation 15 | - Build Models 16 | - Map Relations 17 | - Analyze Effects 18 | - Apply Rules 19 | 20 | # Best Practices 21 | 1. Clear Variables 22 | 2. Relation Mapping 23 | 3. Effect Testing 24 | 4. Rule Validation 25 | 26 | # Validation 27 | - Model Accuracy 28 | - Relation Logic 29 | - Effect Prediction 30 | - Rule Consistency 31 | -------------------------------------------------------------------------------- /public/templates/output-sanitization.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Output Sanitization 3 | domain: prompt-engineering 4 | category: Safety 5 | overview: Ensuring safe and appropriate model outputs through systematic sanitization. 6 | --- 7 | 8 | # Core Components 9 | 1. Content Filters 10 | 2. Safety Checks 11 | 3. Format Validation 12 | 4. Clean-up Rules 13 | 14 | # Implementation 15 | - Filter Content 16 | - Check Safety 17 | - Validate Format 18 | - Apply Rules 19 | 20 | # Best Practices 21 | 1. Clear Standards 22 | 2. Thorough Checks 23 | 3. Format Control 24 | 4. Regular Updates 25 | 26 | # Validation 27 | - Filter Accuracy 28 | - Safety Level 29 | - Format Compliance 30 | - Rule Effectiveness 31 | -------------------------------------------------------------------------------- /public/templates/prompt-injection.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Prompt Injection 3 | domain: prompt-engineering 4 | category: Safety 5 | overview: Understanding and preventing malicious prompt injection attacks. 6 | --- 7 | 8 | # Core Components 9 | 1. Attack Vectors 10 | 2. Defense Methods 11 | 3. Detection Systems 12 | 4. Prevention Strategies 13 | 14 | # Implementation 15 | - Identify Vectors 16 | - Build Defenses 17 | - Deploy Detection 18 | - Prevent Attacks 19 | 20 | # Best Practices 21 | 1. Security First 22 | 2. Input Validation 23 | 3. Output Sanitization 24 | 4. Regular Testing 25 | 26 | # Validation 27 | - Attack Detection 28 | - Defense Strength 29 | - System Security 30 | - Prevention Rate 31 | -------------------------------------------------------------------------------- /public/templates/response-shaping.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Response Shaping 3 | domain: prompt-engineering 4 | category: Optimization 5 | overview: Controlling and optimizing the structure and format of model responses. 6 | --- 7 | 8 | # Core Components 9 | 1. Format Design 10 | 2. Structure Control 11 | 3. Output Rules 12 | 4. Quality Standards 13 | 14 | # Implementation 15 | - Design Format 16 | - Control Structure 17 | - Apply Rules 18 | - Maintain Quality 19 | 20 | # Best Practices 21 | 1. Clear Format 22 | 2. Consistent Structure 23 | 3. Explicit Rules 24 | 4. Quality Checks 25 | 26 | # Validation 27 | - Format Compliance 28 | - Structure Adherence 29 | - Rule Following 30 | - Output Quality 31 | -------------------------------------------------------------------------------- /public/templates/jailbreak-prevention.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Jailbreak Prevention 3 | domain: prompt-engineering 4 | category: Safety 5 | overview: Implementing safeguards against attempts to bypass model restrictions. 6 | --- 7 | 8 | # Core Components 9 | 1. Security Bounds 10 | 2. Detection Methods 11 | 3. Prevention Systems 12 | 4. Response Protocols 13 | 14 | # Implementation 15 | - Set Boundaries 16 | - Detect Attempts 17 | - Prevent Bypass 18 | - Handle Violations 19 | 20 | # Best Practices 21 | 1. Strong Boundaries 22 | 2. Active Monitoring 23 | 3. Quick Response 24 | 4. Regular Updates 25 | 26 | # Validation 27 | - Boundary Strength 28 | - Detection Rate 29 | - Prevention Success 30 | - Response Time 31 | -------------------------------------------------------------------------------- /public/templates/prompt-compression.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Prompt Compression 3 | domain: prompt-engineering 4 | category: Optimization 5 | overview: Techniques for compressing prompts while maintaining effectiveness. 6 | --- 7 | 8 | # Core Components 9 | 1. Content Analysis 10 | 2. Compression Methods 11 | 3. Information Density 12 | 4. Quality Control 13 | 14 | # Implementation 15 | - Analyze Content 16 | - Apply Compression 17 | - Optimize Density 18 | - Check Quality 19 | 20 | # Best Practices 21 | 1. Clear Goals 22 | 2. Efficient Methods 23 | 3. Quality Focus 24 | 4. Regular Testing 25 | 26 | # Validation 27 | - Compression Ratio 28 | - Information Retention 29 | - Output Quality 30 | - Performance Impact 31 | -------------------------------------------------------------------------------- /public/templates/automatic-reasoning.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Automatic Reasoning 3 | domain: prompt-engineering 4 | category: Cutting Edge 5 | overview: Enabling autonomous reasoning and decision-making in language models. 6 | --- 7 | 8 | # Core Components 9 | 1. Logic Framework 10 | 2. Decision Trees 11 | 3. Inference Rules 12 | 4. Validation System 13 | 14 | # Implementation 15 | - Define Rules 16 | - Build Logic Chains 17 | - Test Inference 18 | - Validate Results 19 | 20 | # Best Practices 21 | 1. Clear Logic Rules 22 | 2. Systematic Testing 23 | 3. Error Handling 24 | 4. Result Validation 25 | 26 | # Validation 27 | - Logic Soundness 28 | - Inference Accuracy 29 | - Decision Quality 30 | - Result Reliability 31 | -------------------------------------------------------------------------------- /public/templates/multi-agent.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Multi-Agent Framework 3 | domain: prompt-engineering 4 | category: Cutting Edge 5 | overview: Coordinating multiple AI agents for complex problem-solving. 6 | --- 7 | 8 | # Core Components 9 | 1. Agent Roles 10 | 2. Communication Protocol 11 | 3. Task Distribution 12 | 4. Result Integration 13 | 14 | # Implementation 15 | - Define Agents 16 | - Set Protocols 17 | - Assign Tasks 18 | - Coordinate Actions 19 | 20 | # Best Practices 21 | 1. Clear Role Definition 22 | 2. Effective Communication 23 | 3. Task Management 24 | 4. Result Synthesis 25 | 26 | # Validation 27 | - Role Performance 28 | - Communication Quality 29 | - Task Completion 30 | - Integration Success 31 | -------------------------------------------------------------------------------- /public/templates/temperature-control.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Temperature Control 3 | domain: prompt-engineering 4 | category: Optimization 5 | overview: Managing model temperature settings for optimal response characteristics. 6 | --- 7 | 8 | # Core Components 9 | 1. Temperature Settings 10 | 2. Response Variance 11 | 3. Output Control 12 | 4. Quality Balance 13 | 14 | # Implementation 15 | - Set Temperature 16 | - Monitor Variance 17 | - Control Output 18 | - Balance Quality 19 | 20 | # Best Practices 21 | 1. Task Alignment 22 | 2. Variance Control 23 | 3. Output Monitoring 24 | 4. Quality Focus 25 | 26 | # Validation 27 | - Setting Effectiveness 28 | - Variance Level 29 | - Output Control 30 | - Quality Metrics 31 | -------------------------------------------------------------------------------- /public/templates/self-reflection.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Self-Reflection 3 | domain: prompt-engineering 4 | category: Cutting Edge 5 | overview: Enabling models to analyze and improve their own responses through metacognition. 6 | --- 7 | 8 | # Core Components 9 | 1. Self-Analysis 10 | 2. Error Detection 11 | 3. Quality Assessment 12 | 4. Improvement Strategy 13 | 14 | # Implementation 15 | - Monitor Output 16 | - Analyze Process 17 | - Identify Issues 18 | - Apply Corrections 19 | 20 | # Best Practices 21 | 1. Clear Metrics 22 | 2. Process Transparency 23 | 3. Improvement Tracking 24 | 4. Quality Control 25 | 26 | # Validation 27 | - Analysis Accuracy 28 | - Improvement Rate 29 | - Error Detection 30 | - Output Quality 31 | -------------------------------------------------------------------------------- /public/templates/context-distillation.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Context Distillation 3 | domain: prompt-engineering 4 | category: Specialized 5 | overview: Extracting and condensing essential context for more efficient prompting. 6 | --- 7 | 8 | # Core Components 9 | 1. Context Analysis 10 | 2. Key Extraction 11 | 3. Information Density 12 | 4. Relevance Filtering 13 | 14 | # Implementation 15 | - Analyze Context 16 | - Extract Essentials 17 | - Optimize Density 18 | - Filter Content 19 | 20 | # Best Practices 21 | 1. Clear Criteria 22 | 2. Information Priority 23 | 3. Density Balance 24 | 4. Quality Control 25 | 26 | # Validation 27 | - Information Retention 28 | - Compression Ratio 29 | - Relevance Score 30 | - Output Quality 31 | -------------------------------------------------------------------------------- /public/templates/direct-instruction.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Direct Instruction 3 | domain: prompt-engineering 4 | category: Basic Frameworks 5 | overview: Clear, explicit instructions with specific expectations and desired outcomes. 6 | --- 7 | 8 | # Core Components 9 | 1. Clear Objectives 10 | 2. Explicit Instructions 11 | 3. Expected Outcomes 12 | 4. Success Criteria 13 | 14 | # Implementation 15 | - Precise Language 16 | - Clear Requirements 17 | - Specific Goals 18 | - Measurable Results 19 | 20 | # Best Practices 21 | 1. Be Explicit 22 | 2. Avoid Ambiguity 23 | 3. Set Clear Goals 24 | 4. Define Success 25 | 26 | # Validation 27 | - Instruction Clarity 28 | - Goal Achievement 29 | - Output Accuracy 30 | - Requirement Match 31 | -------------------------------------------------------------------------------- /public/templates/meta-prompting.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Meta-Prompting 3 | domain: prompt-engineering 4 | category: Advanced Prompting 5 | overview: Using prompts to generate, refine, and optimize other prompts. 6 | --- 7 | 8 | # Core Components 9 | 1. Prompt Analysis 10 | 2. Strategy Generation 11 | 3. Refinement Loop 12 | 4. Quality Assessment 13 | 14 | # Implementation 15 | - Analyze Requirements 16 | - Generate Strategies 17 | - Test Variations 18 | - Optimize Results 19 | 20 | # Best Practices 21 | 1. Clear Objectives 22 | 2. Iterative Testing 23 | 3. Performance Metrics 24 | 4. Continuous Refinement 25 | 26 | # Validation 27 | - Strategy Effectiveness 28 | - Output Quality 29 | - Goal Alignment 30 | - Refinement Impact 31 | -------------------------------------------------------------------------------- /public/templates/recursive-prompting.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Recursive Prompting 3 | domain: prompt-engineering 4 | category: Advanced Prompting 5 | overview: Using output from one prompt as input for subsequent prompts in a recursive pattern. 6 | --- 7 | 8 | # Core Components 9 | 1. Initial Prompt 10 | 2. Output Analysis 11 | 3. Recursive Chain 12 | 4. Termination Condition 13 | 14 | # Implementation 15 | - Define Base Case 16 | - Chain Responses 17 | - Monitor Progress 18 | - Control Depth 19 | 20 | # Best Practices 21 | 1. Clear Base Cases 22 | 2. Progress Tracking 23 | 3. Depth Control 24 | 4. Quality Gates 25 | 26 | # Validation 27 | - Chain Coherence 28 | - Progress Metrics 29 | - Termination Check 30 | - Result Quality 31 | -------------------------------------------------------------------------------- /public/templates/socratic-method.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Socratic Method 3 | domain: prompt-engineering 4 | category: Advanced Prompting 5 | overview: Using systematic questioning to guide reasoning and discovery. 6 | --- 7 | 8 | # Core Components 9 | 1. Question Formulation 10 | 2. Answer Analysis 11 | 3. Follow-up Questions 12 | 4. Knowledge Discovery 13 | 14 | # Implementation 15 | - Ask Open Questions 16 | - Analyze Responses 17 | - Guide Discovery 18 | - Build Understanding 19 | 20 | # Best Practices 21 | 1. Clear Questions 22 | 2. Active Listening 23 | 3. Guided Exploration 24 | 4. Knowledge Building 25 | 26 | # Validation 27 | - Question Quality 28 | - Response Depth 29 | - Learning Progress 30 | - Understanding Level 31 | -------------------------------------------------------------------------------- /src/templates/direct-instruction.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Direct Instruction 3 | domain: prompt-engineering 4 | category: Basic Frameworks 5 | overview: Clear, explicit instructions with specific expectations and desired outcomes. 6 | --- 7 | 8 | # Core Components 9 | 1. Clear Objectives 10 | 2. Explicit Instructions 11 | 3. Expected Outcomes 12 | 4. Success Criteria 13 | 14 | # Implementation 15 | - Precise Language 16 | - Clear Requirements 17 | - Specific Goals 18 | - Measurable Results 19 | 20 | # Best Practices 21 | 1. Be Explicit 22 | 2. Avoid Ambiguity 23 | 3. Set Clear Goals 24 | 4. Define Success 25 | 26 | # Validation 27 | - Instruction Clarity 28 | - Goal Achievement 29 | - Output Accuracy 30 | - Requirement Match 31 | -------------------------------------------------------------------------------- /public/templates/chain-of-verification.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Chain of Verification 3 | domain: prompt-engineering 4 | category: Advanced Prompting 5 | overview: Systematic verification of reasoning and outputs through sequential validation steps. 6 | --- 7 | 8 | # Core Components 9 | 1. Step Validation 10 | 2. Logic Verification 11 | 3. Consistency Check 12 | 4. Error Detection 13 | 14 | # Implementation 15 | - Define Checkpoints 16 | - Verify Logic 17 | - Test Consistency 18 | - Correct Errors 19 | 20 | # Best Practices 21 | 1. Clear Criteria 22 | 2. Sequential Checks 23 | 3. Error Handling 24 | 4. Documentation 25 | 26 | # Validation 27 | - Accuracy Rate 28 | - Error Detection 29 | - Consistency Level 30 | - Correction Success 31 | -------------------------------------------------------------------------------- /public/templates/emergent-abilities.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Emergent Abilities 3 | domain: prompt-engineering 4 | category: Cutting Edge 5 | overview: Exploring and leveraging unexpected capabilities that emerge in large language models. 6 | --- 7 | 8 | # Core Components 9 | 1. Capability Discovery 10 | 2. Pattern Analysis 11 | 3. Scaling Effects 12 | 4. Application Methods 13 | 14 | # Implementation 15 | - Systematic Testing 16 | - Pattern Recognition 17 | - Scale Analysis 18 | - Capability Mapping 19 | 20 | # Best Practices 21 | 1. Thorough Testing 22 | 2. Documentation 23 | 3. Validation Methods 24 | 4. Safety Checks 25 | 26 | # Validation 27 | - Reproducibility 28 | - Consistency 29 | - Scale Dependence 30 | - Safety Assessment 31 | -------------------------------------------------------------------------------- /public/templates/retrieval-augmented.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Retrieval Augmented Generation 3 | domain: prompt-engineering 4 | category: Specialized 5 | overview: Enhancing language model outputs with external knowledge retrieval. 6 | --- 7 | 8 | # Core Components 9 | 1. Knowledge Base 10 | 2. Retrieval System 11 | 3. Context Integration 12 | 4. Response Generation 13 | 14 | # Implementation 15 | - Index Knowledge 16 | - Query System 17 | - Merge Context 18 | - Generate Response 19 | 20 | # Best Practices 21 | 1. Quality Sources 22 | 2. Efficient Retrieval 23 | 3. Context Balance 24 | 4. Source Attribution 25 | 26 | # Validation 27 | - Retrieval Accuracy 28 | - Integration Quality 29 | - Response Relevance 30 | - Source Validity 31 | -------------------------------------------------------------------------------- /src/templates/mathematical-logic.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Mathematical Logic Foundations 3 | domain: mathematics 4 | category: Mathematical Logic 5 | overview: Exploration of fundamental mathematical logic concepts using set theory and predicate calculus. 6 | --- 7 | 8 | # Sets and Axioms 9 | Let A be the set of all logical propositions. 10 | Let T be the subset of A that are tautologies. 11 | Let C be the subset of A that are contradictions. 12 | 13 | # Predicates 14 | P(x): "x is a well-formed formula" 15 | Q(x): "x is satisfiable" 16 | R(x): "x is valid" 17 | 18 | # Objectives 19 | 1. Prove completeness theorem using predicate calculus 20 | 2. Demonstrate soundness of the system 21 | 3. Show relationship between syntax and semantics -------------------------------------------------------------------------------- /public/templates/adversarial-prompting.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Adversarial Prompting 3 | domain: prompt-engineering 4 | category: Cutting Edge 5 | overview: Testing and improving model robustness through adversarial prompt techniques. 6 | --- 7 | 8 | # Core Components 9 | 1. Attack Vectors 10 | 2. Defense Mechanisms 11 | 3. Robustness Testing 12 | 4. Security Analysis 13 | 14 | # Implementation 15 | - Design Attacks 16 | - Test Defenses 17 | - Measure Impact 18 | - Improve Robustness 19 | 20 | # Best Practices 21 | 1. Ethical Testing 22 | 2. Controlled Environment 23 | 3. Documentation 24 | 4. Response Analysis 25 | 26 | # Validation 27 | - Attack Success Rate 28 | - Defense Effectiveness 29 | - Model Stability 30 | - Security Metrics 31 | -------------------------------------------------------------------------------- /public/templates/step-by-step.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Step by Step 3 | domain: prompt-engineering 4 | category: Basic Frameworks 5 | overview: Sequential instruction processing with clear progression and validation at each stage. 6 | --- 7 | 8 | # Core Components 9 | 1. Task Breakdown 10 | 2. Sequential Steps 11 | 3. Progress Tracking 12 | 4. Validation Points 13 | 14 | # Implementation 15 | - Clear Instructions 16 | - Ordered Progression 17 | - Checkpoint System 18 | - Result Verification 19 | 20 | # Best Practices 21 | 1. Clear Step Definition 22 | 2. Progress Monitoring 23 | 3. Error Handling 24 | 4. Success Criteria 25 | 26 | # Validation 27 | - Step Completion 28 | - Order Adherence 29 | - Result Accuracy 30 | - Process Efficiency 31 | -------------------------------------------------------------------------------- /src/templates/step-by-step.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Step by Step 3 | domain: prompt-engineering 4 | category: Basic Frameworks 5 | overview: Sequential instruction processing with clear progression and validation at each stage. 6 | --- 7 | 8 | # Core Components 9 | 1. Task Breakdown 10 | 2. Sequential Steps 11 | 3. Progress Tracking 12 | 4. Validation Points 13 | 14 | # Implementation 15 | - Clear Instructions 16 | - Ordered Progression 17 | - Checkpoint System 18 | - Result Verification 19 | 20 | # Best Practices 21 | 1. Clear Step Definition 22 | 2. Progress Monitoring 23 | 3. Error Handling 24 | 4. Success Criteria 25 | 26 | # Validation 27 | - Step Completion 28 | - Order Adherence 29 | - Result Accuracy 30 | - Process Efficiency 31 | -------------------------------------------------------------------------------- /public/templates/recursive-refinement.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Recursive Refinement 3 | domain: prompt-engineering 4 | category: Cutting Edge 5 | overview: Iteratively improving outputs through recursive self-improvement and refinement cycles. 6 | --- 7 | 8 | # Core Components 9 | 1. Initial Output 10 | 2. Self-Analysis 11 | 3. Improvement Cycle 12 | 4. Convergence Check 13 | 14 | # Implementation 15 | - Generate Base Output 16 | - Analyze Quality 17 | - Identify Improvements 18 | - Apply Refinements 19 | 20 | # Best Practices 21 | 1. Clear Metrics 22 | 2. Iteration Limits 23 | 3. Quality Gates 24 | 4. Convergence Criteria 25 | 26 | # Validation 27 | - Quality Improvement 28 | - Convergence Speed 29 | - Stability Check 30 | - Output Consistency 31 | -------------------------------------------------------------------------------- /public/templates/self-consistency.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Self-Consistency 3 | domain: prompt-engineering 4 | category: Advanced Prompting 5 | overview: Ensuring consistent reasoning and outputs across multiple prompt iterations. 6 | --- 7 | 8 | # Core Components 9 | 1. Multiple Paths 10 | 2. Consistency Check 11 | 3. Solution Alignment 12 | 4. Consensus Building 13 | 14 | # Implementation 15 | - Generate Solutions 16 | - Compare Approaches 17 | - Identify Patterns 18 | - Resolve Conflicts 19 | 20 | # Best Practices 21 | 1. Diverse Reasoning 22 | 2. Pattern Recognition 23 | 3. Conflict Resolution 24 | 4. Quality Metrics 25 | 26 | # Validation 27 | - Solution Coherence 28 | - Pattern Consistency 29 | - Conflict Resolution 30 | - Output Stability 31 | -------------------------------------------------------------------------------- /src/templates/tree-of-thoughts.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Tree of Thoughts 3 | domain: prompt-engineering 4 | category: Advanced Frameworks 5 | overview: Strategic thinking process that explores multiple reasoning paths simultaneously. 6 | --- 7 | 8 | # Framework Structure 9 | Let T be the set of thoughts 10 | Let P be the set of paths 11 | Let E be the evaluation function 12 | 13 | # Components 14 | 1. Thought Generation: T → {t₁, t₂, ..., tₙ} 15 | 2. Path Exploration: P(T) → {p₁, p₂, ..., pₘ} 16 | 3. Evaluation: E(p) → [0,1] 17 | 18 | # Implementation 19 | ∀t ∈ T: 20 | Generate k branches 21 | Evaluate E(t) 22 | Select max(E(t)) 23 | 24 | # Optimization 25 | - Prune low-value branches 26 | - Depth-first vs Breadth-first 27 | - Parallel evaluation 28 | -------------------------------------------------------------------------------- /public/templates/chain-of-thought.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Chain of Thought 3 | domain: prompt-engineering 4 | category: Basic Frameworks 5 | overview: Step-by-step reasoning process that breaks down complex problems into logical sequences. 6 | --- 7 | 8 | # Core Components 9 | 1. Problem Statement 10 | 2. Reasoning Steps 11 | 3. Intermediate Conclusions 12 | 4. Final Solution 13 | 14 | # Implementation 15 | - Clear Initial Setup 16 | - Logical Progression 17 | - Step Validation 18 | - Solution Synthesis 19 | 20 | # Best Practices 21 | 1. Break Down Complex Tasks 22 | 2. Show Working Process 23 | 3. Validate Each Step 24 | 4. Connect Conclusions 25 | 26 | # Validation 27 | - Logic Flow 28 | - Step Coherence 29 | - Reasoning Validity 30 | - Solution Accuracy 31 | -------------------------------------------------------------------------------- /public/templates/role-playing.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Role Playing 3 | domain: prompt-engineering 4 | category: Basic Frameworks 5 | overview: Assuming specific personas or roles to guide model behavior and expertise. 6 | --- 7 | 8 | # Core Components 9 | 1. Role Definition 10 | 2. Expertise Parameters 11 | 3. Behavioral Guidelines 12 | 4. Response Patterns 13 | 14 | # Implementation 15 | - Clear Role Specification 16 | - Domain Knowledge 17 | - Consistent Behavior 18 | - Appropriate Language 19 | 20 | # Best Practices 21 | 1. Define Clear Boundaries 22 | 2. Maintain Character 23 | 3. Specify Expertise 24 | 4. Set Constraints 25 | 26 | # Validation 27 | - Role Adherence 28 | - Knowledge Accuracy 29 | - Behavioral Consistency 30 | - Language Appropriateness 31 | -------------------------------------------------------------------------------- /public/templates/tree-of-thoughts.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Tree of Thoughts 3 | domain: prompt-engineering 4 | category: Advanced Frameworks 5 | overview: Strategic thinking process that explores multiple reasoning paths simultaneously. 6 | --- 7 | 8 | # Framework Structure 9 | Let T be the set of thoughts 10 | Let P be the set of paths 11 | Let E be the evaluation function 12 | 13 | # Components 14 | 1. Thought Generation: T → {t₁, t₂, ..., tₙ} 15 | 2. Path Exploration: P(T) → {p₁, p₂, ..., pₘ} 16 | 3. Evaluation: E(p) → [0,1] 17 | 18 | # Implementation 19 | ∀t ∈ T: 20 | Generate k branches 21 | Evaluate E(t) 22 | Select max(E(t)) 23 | 24 | # Optimization 25 | - Prune low-value branches 26 | - Depth-first vs Breadth-first 27 | - Parallel evaluation 28 | -------------------------------------------------------------------------------- /src/templates/chain-of-thought.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Chain of Thought 3 | domain: prompt-engineering 4 | category: Basic Frameworks 5 | overview: Step-by-step reasoning process that breaks down complex problems into logical sequences. 6 | --- 7 | 8 | # Core Components 9 | 1. Problem Statement 10 | 2. Reasoning Steps 11 | 3. Intermediate Conclusions 12 | 4. Final Solution 13 | 14 | # Implementation 15 | - Clear Initial Setup 16 | - Logical Progression 17 | - Step Validation 18 | - Solution Synthesis 19 | 20 | # Best Practices 21 | 1. Break Down Complex Tasks 22 | 2. Show Working Process 23 | 3. Validate Each Step 24 | 4. Connect Conclusions 25 | 26 | # Validation 27 | - Logic Flow 28 | - Step Coherence 29 | - Reasoning Validity 30 | - Solution Accuracy 31 | -------------------------------------------------------------------------------- /src/templates/role-playing.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Role Playing 3 | domain: prompt-engineering 4 | category: Basic Frameworks 5 | overview: Assuming specific personas or roles to guide model behavior and expertise. 6 | --- 7 | 8 | # Core Components 9 | 1. Role Definition 10 | 2. Expertise Parameters 11 | 3. Behavioral Guidelines 12 | 4. Response Patterns 13 | 14 | # Implementation 15 | - Clear Role Specification 16 | - Domain Knowledge 17 | - Consistent Behavior 18 | - Appropriate Language 19 | 20 | # Best Practices 21 | 1. Define Clear Boundaries 22 | 2. Maintain Character 23 | 3. Specify Expertise 24 | 4. Set Constraints 25 | 26 | # Validation 27 | - Role Adherence 28 | - Knowledge Accuracy 29 | - Behavioral Consistency 30 | - Language Appropriateness 31 | -------------------------------------------------------------------------------- /public/templates/react-framework.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: ReAct Framework 3 | domain: prompt-engineering 4 | category: Advanced Prompting 5 | overview: Combining reasoning and action in a synergistic prompt engineering approach. 6 | --- 7 | 8 | # Core Components 9 | 1. Reasoning Step 10 | 2. Action Planning 11 | 3. Observation Integration 12 | 4. Response Generation 13 | 14 | # Implementation 15 | - Analyze Situation 16 | - Plan Actions 17 | - Execute Steps 18 | - Observe Results 19 | - Adjust Approach 20 | 21 | # Best Practices 22 | 1. Clear Reasoning Chain 23 | 2. Explicit Actions 24 | 3. Detailed Observations 25 | 4. Iterative Refinement 26 | 27 | # Validation 28 | - Logic Coherence 29 | - Action Effectiveness 30 | - Observation Accuracy 31 | - Result Quality 32 | -------------------------------------------------------------------------------- /public/templates/task-decomposition.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Task Decomposition 3 | domain: prompt-engineering 4 | category: Basic Frameworks 5 | overview: Breaking complex tasks into smaller, manageable subtasks for systematic processing. 6 | --- 7 | 8 | # Core Components 9 | 1. Task Analysis 10 | 2. Subtask Definition 11 | 3. Dependency Mapping 12 | 4. Integration Plan 13 | 14 | # Implementation 15 | - Complex Task Breakdown 16 | - Subtask Organization 17 | - Sequential Processing 18 | - Result Integration 19 | 20 | # Best Practices 21 | 1. Logical Breakdown 22 | 2. Clear Dependencies 23 | 3. Progress Tracking 24 | 4. Result Synthesis 25 | 26 | # Validation 27 | - Subtask Completion 28 | - Dependency Adherence 29 | - Integration Success 30 | - Overall Accuracy 31 | -------------------------------------------------------------------------------- /src/templates/task-decomposition.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Task Decomposition 3 | domain: prompt-engineering 4 | category: Basic Frameworks 5 | overview: Breaking complex tasks into smaller, manageable subtasks for systematic processing. 6 | --- 7 | 8 | # Core Components 9 | 1. Task Analysis 10 | 2. Subtask Definition 11 | 3. Dependency Mapping 12 | 4. Integration Plan 13 | 14 | # Implementation 15 | - Complex Task Breakdown 16 | - Subtask Organization 17 | - Sequential Processing 18 | - Result Integration 19 | 20 | # Best Practices 21 | 1. Logical Breakdown 22 | 2. Clear Dependencies 23 | 3. Progress Tracking 24 | 4. Result Synthesis 25 | 26 | # Validation 27 | - Subtask Completion 28 | - Dependency Adherence 29 | - Integration Success 30 | - Overall Accuracy 31 | -------------------------------------------------------------------------------- /src/templates/few-shot.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Few-Shot Prompting 3 | domain: prompt-engineering 4 | category: Basic Frameworks 5 | overview: Learning from a small number of examples to guide model behavior and responses. 6 | --- 7 | 8 | # Core Components 9 | 1. Example Selection 10 | 2. Pattern Recognition 11 | 3. Context Adaptation 12 | 4. Response Generation 13 | 14 | # Implementation 15 | - Provide 2-3 Examples 16 | - Follow Consistent Format 17 | - Match Target Task 18 | - Maintain Context 19 | 20 | # Best Practices 21 | 1. Choose Representative Examples 22 | 2. Use Clear Formatting 23 | 3. Balance Example Count 24 | 4. Maintain Consistency 25 | 26 | # Validation 27 | - Pattern Matching 28 | - Output Conformity 29 | - Example Relevance 30 | - Format Consistency 31 | -------------------------------------------------------------------------------- /public/templates/few-shot.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Few-Shot Prompting 3 | domain: prompt-engineering 4 | category: Basic Frameworks 5 | overview: Learning from a small number of examples to guide model behavior and responses. 6 | --- 7 | 8 | # Core Components 9 | 1. Example Selection 10 | 2. Pattern Recognition 11 | 3. Context Adaptation 12 | 4. Response Generation 13 | 14 | # Implementation 15 | - Provide 2-3 Examples 16 | - Follow Consistent Format 17 | - Match Target Task 18 | - Maintain Context 19 | 20 | # Best Practices 21 | 1. Choose Representative Examples 22 | 2. Use Clear Formatting 23 | 3. Balance Example Count 24 | 4. Maintain Consistency 25 | 26 | # Validation 27 | - Pattern Matching 28 | - Output Conformity 29 | - Example Relevance 30 | - Format Consistency 31 | -------------------------------------------------------------------------------- /src/templates/token-optimization.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Token Optimization 3 | domain: efficiency 4 | category: Optimization Frameworks 5 | overview: Techniques for optimizing token usage and improving prompt efficiency. 6 | --- 7 | 8 | # Optimization Space 9 | Let T be token set 10 | Let C be context window 11 | Let E be efficiency function 12 | 13 | # Core Techniques 14 | 1. Token Reduction 15 | min(|T|) subject to: 16 | - Meaning preservation 17 | - Context retention 18 | - Clarity maintenance 19 | 20 | 2. Context Management 21 | C = {t ∈ T | Relevant(t)} 22 | 23 | 3. Efficiency Metrics 24 | E(T) = Quality/TokenCount 25 | 26 | # Implementation 27 | - Token counting 28 | - Compression strategies 29 | - Context pruning 30 | - Format optimization 31 | -------------------------------------------------------------------------------- /public/templates/token-optimization.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Token Optimization 3 | domain: efficiency 4 | category: Optimization Frameworks 5 | overview: Techniques for optimizing token usage and improving prompt efficiency. 6 | --- 7 | 8 | # Optimization Space 9 | Let T be token set 10 | Let C be context window 11 | Let E be efficiency function 12 | 13 | # Core Techniques 14 | 1. Token Reduction 15 | min(|T|) subject to: 16 | - Meaning preservation 17 | - Context retention 18 | - Clarity maintenance 19 | 20 | 2. Context Management 21 | C = {t ∈ T | Relevant(t)} 22 | 23 | 3. Efficiency Metrics 24 | E(T) = Quality/TokenCount 25 | 26 | # Implementation 27 | - Token counting 28 | - Compression strategies 29 | - Context pruning 30 | - Format optimization 31 | -------------------------------------------------------------------------------- /src/templates/red-teaming.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Red Team Analysis 3 | domain: security 4 | category: Safety Frameworks 5 | overview: Systematic approach to identifying and exploiting potential vulnerabilities in AI systems. 6 | --- 7 | 8 | # Framework Components 9 | Let V be vulnerability space 10 | Let A be attack vectors 11 | Let D be defense mechanisms 12 | 13 | # Analysis Structure 14 | 1. Surface Mapping 15 | V: System → {v₁, v₂, ..., vₙ} 16 | 17 | 2. Vector Analysis 18 | A: V → {a₁, a₂, ..., aₘ} 19 | 20 | 3. Defense Planning 21 | D: A → {d₁, d₂, ..., dₖ} 22 | 23 | # Implementation 24 | ∀v ∈ V: 25 | Identify(Attack Vectors) 26 | Assess(Impact) 27 | Design(Mitigations) 28 | 29 | # Documentation 30 | - Vulnerability reports 31 | - Attack scenarios 32 | - Defense strategies 33 | -------------------------------------------------------------------------------- /tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "useDefineForClassFields": true, 5 | "lib": ["ES2020", "DOM", "DOM.Iterable"], 6 | "module": "ESNext", 7 | "skipLibCheck": true, 8 | 9 | /* Bundler mode */ 10 | "moduleResolution": "bundler", 11 | "allowImportingTsExtensions": true, 12 | "isolatedModules": true, 13 | "moduleDetection": "force", 14 | "noEmit": true, 15 | "jsx": "react-jsx", 16 | 17 | /* Linting */ 18 | "strict": false, 19 | "noUnusedLocals": false, 20 | "noUnusedParameters": false, 21 | "noImplicitAny": false, 22 | "noFallthroughCasesInSwitch": false, 23 | 24 | "baseUrl": ".", 25 | "paths": { 26 | "@/*": ["./src/*"] 27 | } 28 | }, 29 | "include": ["src"] 30 | } 31 | -------------------------------------------------------------------------------- /public/templates/red-teaming.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Red Team Analysis 3 | domain: security 4 | category: Safety Frameworks 5 | overview: Systematic approach to identifying and exploiting potential vulnerabilities in AI systems. 6 | --- 7 | 8 | # Framework Components 9 | Let V be vulnerability space 10 | Let A be attack vectors 11 | Let D be defense mechanisms 12 | 13 | # Analysis Structure 14 | 1. Surface Mapping 15 | V: System → {v₁, v₂, ..., vₙ} 16 | 17 | 2. Vector Analysis 18 | A: V → {a₁, a₂, ..., aₘ} 19 | 20 | 3. Defense Planning 21 | D: A → {d₁, d₂, ..., dₖ} 22 | 23 | # Implementation 24 | ∀v ∈ V: 25 | Identify(Attack Vectors) 26 | Assess(Impact) 27 | Design(Mitigations) 28 | 29 | # Documentation 30 | - Vulnerability reports 31 | - Attack scenarios 32 | - Defense strategies 33 | -------------------------------------------------------------------------------- /src/App.css: -------------------------------------------------------------------------------- 1 | #root { 2 | max-width: 1280px; 3 | margin: 0 auto; 4 | padding: 2rem; 5 | text-align: center; 6 | } 7 | 8 | .logo { 9 | height: 6em; 10 | padding: 1.5em; 11 | will-change: filter; 12 | transition: filter 300ms; 13 | } 14 | .logo:hover { 15 | filter: drop-shadow(0 0 2em #646cffaa); 16 | } 17 | .logo.react:hover { 18 | filter: drop-shadow(0 0 2em #61dafbaa); 19 | } 20 | 21 | @keyframes logo-spin { 22 | from { 23 | transform: rotate(0deg); 24 | } 25 | to { 26 | transform: rotate(360deg); 27 | } 28 | } 29 | 30 | @media (prefers-reduced-motion: no-preference) { 31 | a:nth-of-type(2) .logo { 32 | animation: logo-spin infinite 20s linear; 33 | } 34 | } 35 | 36 | .card { 37 | padding: 2em; 38 | } 39 | 40 | .read-the-docs { 41 | color: #888; 42 | } 43 | -------------------------------------------------------------------------------- /src/templates/constitutional-ai.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Constitutional AI 3 | domain: prompt-engineering 4 | category: Cutting Edge 5 | overview: Framework for implementing ethical constraints and behavioral guidelines in AI systems. 6 | --- 7 | 8 | # Core Principles 9 | Let C be the set of constraints 10 | Let B be the set of behaviors 11 | Let V be the value function 12 | 13 | # Constitutional Rules 14 | ∀b ∈ B: 15 | Assert(Ethical(b)) 16 | Verify(Safe(b)) 17 | Ensure(Aligned(b)) 18 | 19 | # Implementation 20 | 1. Define Boundaries 21 | - Ethical limits 22 | - Safety parameters 23 | - Behavioral constraints 24 | 25 | 2. Enforcement 26 | - Rule validation 27 | - Behavior monitoring 28 | - Response filtering 29 | 30 | # Verification 31 | - Compliance checking 32 | - Boundary testing 33 | - Value alignment 34 | -------------------------------------------------------------------------------- /public/templates/constitutional-ai.md: -------------------------------------------------------------------------------- 1 | --- 2 | title: Constitutional AI 3 | domain: prompt-engineering 4 | category: Cutting Edge 5 | overview: Framework for implementing ethical constraints and behavioral guidelines in AI systems. 6 | --- 7 | 8 | # Core Principles 9 | Let C be the set of constraints 10 | Let B be the set of behaviors 11 | Let V be the value function 12 | 13 | # Constitutional Rules 14 | ∀b ∈ B: 15 | Assert(Ethical(b)) 16 | Verify(Safe(b)) 17 | Ensure(Aligned(b)) 18 | 19 | # Implementation 20 | 1. Define Boundaries 21 | - Ethical limits 22 | - Safety parameters 23 | - Behavioral constraints 24 | 25 | 2. Enforcement 26 | - Rule validation 27 | - Behavior monitoring 28 | - Response filtering 29 | 30 | # Verification 31 | - Compliance checking 32 | - Boundary testing 33 | - Value alignment 34 | -------------------------------------------------------------------------------- /src/components/ui/label.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | import * as LabelPrimitive from "@radix-ui/react-label" 3 | import { cva, type VariantProps } from "class-variance-authority" 4 | 5 | import { cn } from "@/lib/utils" 6 | 7 | const labelVariants = cva( 8 | "text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70" 9 | ) 10 | 11 | const Label = React.forwardRef< 12 | React.ElementRef, 13 | React.ComponentPropsWithoutRef & 14 | VariantProps 15 | >(({ className, ...props }, ref) => ( 16 | 21 | )) 22 | Label.displayName = LabelPrimitive.Root.displayName 23 | 24 | export { Label } 25 | -------------------------------------------------------------------------------- /src/components/ui/textarea.tsx: -------------------------------------------------------------------------------- 1 | import * as React from "react" 2 | 3 | import { cn } from "@/lib/utils" 4 | 5 | export interface TextareaProps 6 | extends React.TextareaHTMLAttributes {} 7 | 8 | const Textarea = React.forwardRef( 9 | ({ className, ...props }, ref) => { 10 | return ( 11 |