MakerAi / Source
CLAUDE.md212 starsChanged 2 months agoMITView on GitHub
This is the main source code directory for MakerAI 3.2, an AI orchestration framework for Delphi. See individual module CLAUDE.md files for detailed guidance on specific subsystems. Open Packages/MakerAiGrp.groupproj to compile all packages. Register in uMakerAi.Chat.Initializations.pas. Environment variables: Use @VAR_NAME syntax (e.g., @OPENAI_API_KEY). See ../CLAUDE.md for project overview, naming conventions, Delphi version compatibility, thread safety details, troubleshooting, and known issues.
- Reads credentials
In this repository6 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- Demos/CLAUDE.mdCLAUDE.md
- Demos-V3_1/CLAUDE.mdCLAUDE.md
- Docs/CLAUDE.mdCLAUDE.md
- Redis/CLAUDE.mdCLAUDE.md
- Resources/CLAUDE.mdCLAUDE.md
The file
We split this CLAUDE.md into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 58
All chat implementations follow: acsIdle → acsConnecting → [acsReasoning] → acsWriting → [acsToolCalling] → acsFinished/acsError
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
CLAUDE.md
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Source Directory Overview
This is the main source code directory for MakerAI 3.2, an AI orchestration framework for Delphi. See individual module CLAUDE.md files for detailed guidance on specific subsystems.
Building
Package Compilation Order (Critical)
1. Packages/MakerAI.dpk - Runtime core (~98 units)
2. Packages/MakerAi.RAG.Drivers.dpk - PostgreSQL connectors
3. Packages/MakerAi.UI.dpk - FMX visual components
4. Packages/MakerAiDsg.dpk - Design-time (requires VCL, DesignIDE)Open Packages/MakerAiGrp.groupproj to compile all packages.
Required Library Paths
All subdirectories (Agents, Chat, ChatUI, Core, Design, Embeddings, MCPClient, MCPServer, Memory, Packages, RAG, Realtime, Resources, Tools, Utils, WebSocket) must be in Delphi Library Path. Memory is easy to miss: the packages compile without it (the .dpk uses relative paths), but an app that uses TAiMemory fails with "File not found: uMakerAi.Memory.dcu".
Module Quick Reference
| Module | Entry Point | Key Classes |
| Core | uMakerAi.Chat.pas | TAiChat (abstract base), TAiMediaFile, TAiChatMessage |
| Chat | uMakerAi.Chat.AiConnection.pas | TAiChatConnection (universal connector) |
| RAG | uMakerAi.RAG.Vectors.pas, uMakerAi.RAG.Graph.Core.pas | TAiVectorStore, TAiRagGraph |
| Agents | uMakerAi.Agents.pas | TAIAgentManager, TAIAgentsNode, TAIBlackboard |
| MCPServer | uMakerAi.MCPServer.Core.pas | TAiMCPServer, IAiMCPTool |
| MCPClient | uMakerAi.MCPClient.Core.pas | TMCPClientItem, transport classes |
| Tools | uMakerAi.Tools.Functions.pas | TAiFunctions, TFunctionActionItem |
| ChatUI | uMakerAi.UI.ChatList.pas | TChatList, TChatBubble, TChatInput |
| Realtime | uMakerAi.Realtime.AiConnection.pas | TAiRealtimeConnection, TAiRealtimeBase, TAiOpenAiRealtimeSTT |
| WebSocket | uMakerAi.WebSocket.Client.pas | TAiWSClient, ITlsTransport, TSChannelTransport, TAndroidSSLTransport, TOpenSSLTransport |
Architecture Patterns
Universal Connector
TAiChatConnection abstracts all LLM providers. Switch providers by setting DriverName:
AiConnection.DriverName := 'OpenAI'; // or 'Claude', 'Gemini', 'Ollama', etc.
AiConnection.Model := 'gpt-5.1-turbo';Driver Registration
New LLM drivers must implement these class methods in TAiChat descendant:
class function GetDriverName: string; override;
class procedure RegisterDefaultParams(Params: TStrings); override;
class function CreateInstance(Sender: TComponent): TAiChat; override;Register in uMakerAi.Chat.Initializations.pas.
Chat State Machine
All chat implementations follow: acsIdle → acsConnecting → [acsReasoning] → acsWriting → [acsToolCalling] → acsFinished/acsError
Media File Handling
TAiMediaFile abstracts files across providers. Load with LoadFromFile(), attach to messages via AddMessageAndRun(prompt, role, [mediaFile]).
Parameter Hierarchy
Three levels (lowest to highest priority):
- Driver defaults (
RegisterDefaultParams) - Model overrides (
TAiChatFactory.RegisterModelParam) - User overrides (
TAiChatFactory.RegisterUserParam)
Environment variables: Use @VAR_NAME syntax (e.g., @OPENAI_API_KEY).
Common Tasks
| Task | Location |
| Add LLM provider | Chat/uMakerAi.Chat.*.pas (inherit TAiChat) |
| Add MCP tool | MCPServer/ (implement IAiMCPTool) |
| Add agent tool | Agents/ (inherit TAiToolBase, register in TEngineRegistry) |
| Modify function calling | Tools/uMakerAi.Tools.Functions.pas |
| Change version/flags | Core/uMakerAi.Version.inc |
Navigation
See ../CLAUDE.md for project overview, naming conventions, Delphi version compatibility, thread safety details, troubleshooting, and known issues.
Module Documentation
| Module | Documentation |
| Core/ | Foundation classes, TAiChat, TAiMediaFile |
| Chat/ | LLM provider drivers |
| Agents/ | Agent orchestration framework |
| RAG/ | Retrieval-Augmented Generation |
| MCPServer/ | MCP server implementations |
| MCPClient/ | MCP client connector |
| Tools/ | Function calling, Shell, ComputerUse |
| ChatUI/ | FMX visual components |
| Realtime/ | Real-time STT drivers (OpenAI WebSocket, Gemini stub) |
| WebSocket/ | RFC 6455 WebSocket client + TLS (SChannel/OpenSSL) |
| Utils/ | Voice monitor, diff updater |
| Design/ | Design-time property editors |
| Resources/ | Embedded resources |
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

