Key Takeaways
- AI doesn't replace foundational engineering principles; it makes them more critical, according to Matt Pocock on the Latent Space podcast.
- Domain-Driven Design (DDD) offers composable building blocks for complex systems, proving essential in the AI era by aligning code with human language.
- Creating a 'unified domain model' ensures both humans and AI speak the exact same language, leading to much clearer and more effective interactions with AI models.
- Matt Pocock has a specific tool, his "Ubiquitous Language skill" within
mattpocock/skills, which scans codebases, refines terminology, and generates a precise reference document. - The core insight: consistent language through Matt Pocock's Ubiquitous Language Skill for AI Alignment drastically improves AI collaboration and output quality.
The Matt Pocock's Ubiquitous Language Skill for AI Alignment
Matt Pocock proposes a direct, practical method for founders and builders to ensure their AI systems understand their domain as well as their human team does. It's about eliminating ambiguity from the start by building a shared, consistent language.
Type: method
Name: Matt Pocock's Ubiquitous Language Skill for AI Alignment
Components:
- 1. Scan Codebase for Terminology: Use a tool (like Matt Pocock's skill) to scan your project's codebase and identify all relevant and potentially ambiguous terms used within the software.
- 2. Refine Terms with Stakeholders: Collaborate with clients, team members, or domain experts to define and refine each term, ensuring a shared, unambiguous understanding across all parties.
- 3. Generate a Ubiquitous Language Document: Create a clear, accessible document (e.g., a Markdown file in your repository) that formally defines all agreed-upon terms and their specific contexts (e.g., 'mole' in a health app vs. a zoo app).
- 4. Keep Document Accessible During AI Interaction: Keep this Ubiquitous Language document open and reference it constantly when writing prompts or interacting with AI models. This ensures your inputs use the precise, shared terminology.
- 5. Enable AI Search and Alignment: Configure your AI to reference this document and use its defined terms when searching within your repository or generating responses, thus promoting alignment and clarity in AI output.
When This Works (and When It Doesn't)
This framework is effective in any domain where the goal is to align AI with human understanding, reach a shared design concept, and encourage the AI to question assumptions, both its own and the user's, to achieve clarity. Pocock himself notes he keeps his ubiquitous language document open "whenever I'm prompting," allowing for “so much more clarity” in conversations with AI. It's especially powerful for complex projects, larger teams, or any scenario where misinterpretation by an AI could lead to significant rework or incorrect outcomes. Think heavily regulated industries, intricate financial systems, or medical applications where precision is paramount.
However, this skill is an investment. For simple, single-purpose AI scripts, a personal chatbot, or very small, non-collaborative projects, the overhead of formalizing a ubiquitous language might outweigh the benefits. If your domain is simple and terms are universally understood, you might not need this level of rigor. The framework shines when ambiguity is a real and present danger, threatening to derail AI effectiveness or team communication.
What to Do With This
Let's say you're a 27-year-old founder building a new AI-powered legal tech tool. Your app helps lawyers draft contracts and summarize case files, using terms like "brief," "pleading," "discovery," and "stipulation." These terms are clear to lawyers but can have slightly different nuances in various contexts, which an LLM might miss. Here's how to apply Matt Pocock's skill this week:
1. Scan Codebase for Terminology: Get your lead developer to run a simple script (or manually identify) every key legal term present in your database schemas, API definitions, and core logic. Make a raw list: Motion, Docket, Deposition, Claim. You'll find dozens.
2. Refine Terms with Stakeholders: Schedule a 90-minute working session with your head of product, a senior engineer, and a legal expert on your advisory board. Go through your list, one by one. For example, clarify "Brief": Is it always an appellate brief, or can it be a pre-trial brief? Define it: "Brief: A written legal argument submitted to a court, specifying whether it's an appellate, trial, or amicus brief based on context markers."
3. Generate a Ubiquitous Language Document: Create a legal_domain_language.md file in your main repository. Populate it with the refined terms and their precise definitions. Commit it and make sure it's part of your project's onboarding for any new team member or AI agent integration.
4. Keep Document Accessible During AI Interaction: When you're prompting your AI model to draft a section of a contract or summarize a case, pull up your legal_domain_language.md. If you ask it to "summarize the discovery," explicitly add, "referencing our definition of 'discovery' as 'the pre-trial phase where parties exchange evidence.'" This direct reference improves AI output quality dramatically, as Pocock experienced.
5. Enable AI Search and Alignment: If you're building a RAG system or fine-tuning an LLM, ingest this legal_domain_language.md as part of its training or context window. For an internal AI assistant, configure it so that when a team member asks about a pleading, the AI first consults this document to ensure it's using the agreed-upon definition before generating a response.