Don’t start with tools, start with yourself: a guide to building a personal AI infrastructure
Compiled based on @DanielMiessler's Personal AI Infrastructure (PAI) framework. Don't start from tools, start from yourself. Before choosing any AI tool, take time to figure out your goals, beliefs, and way of working. Architectural design matters far more than model selection. A good context management system + an average model often outperforms a top-tier model with no context.
Source: github.com/danielmiessler/Personal_AI_Infrastructure
01 · Core Idea: Why build personal AI infrastructure?
The starting point of the PAI framework is not "how to use AI tools better," but a deeper question — the creative potential of most people has never truly been activated. The ultimate goal of an AI assistant is not to help you reply to emails or summarize documents, but to help you discover, clarify, and continuously pursue your life goals.
Ordinary AI chat tools (such as ChatGPT and Claude) are stateless: every conversation starts from scratch, and they do not remember who you are, what you are doing, or where you want to go. PAI's core proposition is to upgrade AI from a "one-off Q&A tool" into a digital assistant (DA) that continuously learns and deeply understands you.
This digital assistant has three key characteristics:
- Goal-oriented: always operates around your vision and goals, rather than around tools or technology
- Continuous learning: extracts signals from every interaction and keeps improving its understanding of you
- Deep Context: Understand your preferences, history, ways of thinking, and current challenges
02 · TELOS Identity System
Define “who you are” with 10 files
TELOS is the cornerstone of the entire PAI framework. It builds a complete personal profile through 10 Markdown files, allowing AI to understand the full picture of you at any moment.
2.1 Ten Core Files
| File | Content | Example Question |
|---|---|---|
| MISSION.md | Your life mission | “What is the meaning of my existence?” |
| GOALS.md | Current goals | “What do I want to achieve in the next 1–3 years?” |
| PROJECTS.md | Projects in progress | “What specific things do I have on hand?” |
| BELIEFS.md | Core beliefs | “What do I believe is right?” |
| MODELS.md | Thinking models | “What framework do I use to understand the world?” |
| STRATEGIES.md | Execution strategy | “What method do I tend to use to solve problems?” |
| NARRATIVES.md | Shaping Your Story | “Which experiences have defined who I am today?” |
| LEARNED.md | Lessons Learned | “What have I learned from the mistakes I made in the past?” |
| CHALLENGES.md | Current Challenges | “What is holding me back?” |
| IDEAS.md | Ideas Worth Exploring | “What directions are worth digging into more deeply?” |
2.2 Why This Matters
Once your AI assistant has read these 10 files, it is no longer a generic chatbot, but a “colleague” who understands your background. It knows what you’re doing, what you want, and how you think. That means you don’t have to explain your situation from scratch in every conversation—the AI already knows.
2.3 Practical Advice
You don’t need to make it perfect at the start. Even if each file has only 3–5 sentences, that’s fine. Over time, you can keep adding to and revising them. The key is to build this framework first and let iteration happen naturally.
03 · Three-Layer Memory Architecture (Hot / Warm / Cold)
TELOS defines “who you are,” while the memory system records “what happened” and “what was learned.” PAI adopts a three-layer memory architecture:
3.1 Hot Memory
Purpose: capture immediate signals from recent interactions. This includes preferences from the current conversation, decisions just made, recent feedback, and evaluations. Hot memory is short-term and helps the AI maintain coherence within the current session.
3.2 Warm Memory
Function: store patterns and insights accumulated in the medium term. For example, workflows you use repeatedly, newly emerging interest areas, changes in your work focus over the past few weeks. Warm memory helps AI identify trends and habits.
3.3 Cold Memory
Function: preserve long-term knowledge and historical experience. This includes key decisions, major lessons, and long-term preferences from the past few months or even years. Cold memory ensures AI does not lose the wisdom you have accumulated.
3.4 Signal Capture Mechanism
Every interaction generates signals, including your ratings and feedback, emotional changes, the results of success or failure, and explicitly stated preferences. These signals are classified and stored in different layers of memory, forming a continuous learning loop.
04 · Skill System and Decision Hierarchy
PAI has a very pragmatic framework for judging "when to use AI."
4.1 Decision Priority Chain
Goal → Code → CLI tool → Prompt → Agent skill
The core logic of this hierarchy is prioritizing determinism:
- Goal: first clarify what problem you want to solve Code: if it can be solved with deterministic code, use code — the result is 100% predictable
- CLI tool: package the code into a command-line tool for easy reuse
- Prompt: introduce an AI prompt only when intelligent judgment is needed
- Agent skill: the highest level, packaging the prompt into reusable agent capability
4.2 Why not use AI directly?
AI models are probabilistic — the same prompt may produce different results. For problems with deterministic solutions (format conversion, data calculation, file operations), code is more reliable than AI. Only when understanding, reasoning, or creativity is required is it worth invoking AI's probabilistic capability.
4.3 Modular Design of Skills
Each skill is an independent module, following the UNIX philosophy — do one thing, and do it well. Skills can be combined with one another to form complex workflows.
05 · User/System Separation Architecture
5.1 Two Core Directories
PAI/ ├── USER/ ← 你的所有个性化内容 │ ├── identity/ ← 姓名、声音、个性 │ ├── preferences/ ← 技术栈、工具偏好 │ ├── workflows/ ← 工作流定义 │ ├── skills/ ← 自定义技能 │ ├── hooks/ ← 事件钩子 │ └── memory/ ← 记忆数据 └── SYSTEM/ ← PAI基础设施代码
5.2 Why Separate Them
This design solves a key problem: when the system is updated, your personalized configuration will not be overwritten. Your identity, memory, and workflow belong to you as assets, independent of version iterations of the underlying tools.
5.3 Six Layers of Customization
| Layer | Content | Description |
|---|---|---|
| Identity | Name, voice, personality | How the AI addresses you, and what tone it uses when speaking to you |
| Preferences | Tech stack, tools | Your preferred programming language, editor, and platform |
| Workflow | Execution mode | Your standard process for handling specific tasks |
| Skills | Available capabilities | Specific capabilities AI can invoke |
| Hooks | Event-driven responses | Actions that trigger automatically at specific events (session start, tool execution) |
| Memory | Signal capture | What information is worth remembering |
06 · 16 guiding principles
Principle 1: User-centered
All design revolves around the user's goals and needs, not the possibilities of the technology.
Principle 2: Scientific method as the foundational algorithm
“Hypothesis → Experiment → Measurement → Iteration” is the meta-method for solving all problems. Don’t guess; verify.
Principle 3: Clarity of thought comes first
Good prompts come from clear thinking. Before writing a prompt, first figure out exactly what you want.
Principle 4: Architecture matters more than the model
Don’t get hung up on whether to use GPT-4 or Claude—the system design (context management, memory, workflows) is far more important than model selection. Good architecture can adapt to any model.
Principle 5: Deterministic infrastructure
Use templates, fixed processes, and structured outputs to reduce AI unpredictability. Put probabilistic AI on a deterministic track.
Principle 6: Code First, Prompt Second
If a problem can be solved deterministically with code, don’t hand it over to probabilistic AI.
Principle 7: Specifications / Tests / Evaluation First
First, write down clearly what you want (specification), how to tell whether it succeeds (test), and how to measure quality (evaluation), then start implementing.
Principle 8: UNIX Philosophy
Each component does one thing, and does it well. Components are composed through clear interfaces.
Principle 9: Engineering Discipline
Treat AI infrastructure like production-grade software—with version control, tests, and documentation.
Principle 10: CLI as the Preferred Interface
A command-line interface is faster, more scriptable, and easier to automate than a graphical interface.
Principle 11: Decision Hierarchy
Goal → Code → CLI → Prompts → Agents, progressing in order from deterministic to probabilistic.
Principle 12: Skill Management
Modular capabilities that automatically route to the appropriate skill based on context.
Principle 13: Memory System
Capture every piece of information worth knowing, forming the foundation for continuous learning.
Principle 14: Agent Personalization
Different Agents have different personalities and strengths, just like different roles on a team.
Principle 15: Science as a Meta-Cycle
Keep the cycle of “hypothesis → experiment → measurement → iteration” running continuously, so the system keeps evolving.
Principle 16: Allow Saying “I Don’t Know”
Explicitly allow AI to admit uncertainty. That is far more valuable than making things up.
07 · Security and Permission System
7.1 Design Philosophy
The goal of the security system is to protect users without getting in the way of the workflow. Good security design should be almost imperceptible, yet firmly block dangerous operations.
7.2 Permission Verification
Every operation goes through a permission check, and dangerous operations (such as deleting files or sending sensitive information) require explicit confirmation. The system should avoid crude switches that require “bypassing all permission checks.”
08 · Event Hook System (Hooks)
8.1 What Is a Hook
A hook is an action that is triggered automatically when a specific event occurs, similar to an “if...then...” rule.
8.2 Typical Events
Session start: load user context, check to-dos, show today’s summary Before tool execution: verify permissions, record the intent of the operation After tool execution: capture result signals, update memory Session end: save learning outcomes, generate a session summary
8.3 Value
Hooks turn an AI assistant from “passive response” into “proactive service.” It doesn’t wait for you to ask before answering; instead, it proactively offers help at the right moment.
09 · Practical Roadmap: How to Start from Scratch
Phase 1: Build the Identity Foundation (Week 1)
- Create a folder to serve as the root directory for your “AI infrastructure”,
- Create 10 Markdown files according to the TELOS framework
- Start each file with 3-5 sentences; it doesn’t need to be perfect
- Focus your effort on MISSION.md, GOALS.md, and PROJECTS.md
Phase 2: Building persistent context (Weeks 2-3)
- Integrate the TELOS files into a system prompt or context file for AI conversations
- Set up a simple log file and record key takeaways after each important interaction
- Start distinguishing between hot/warm/cold memory—what information is temporary, and what is long-term
Phase 3: Developing common skills (Weeks 4-6)
- Identify your 3-5 most frequent workflows
- Write a standardized prompt template for each workflow
- Write the parts that can be automated with code as scripts
- Package the prompt + scripts into reusable “skills”
Phase 4: Establishing a feedback loop (ongoing)
- After each use of AI, briefly evaluate the quality of the result
- Review the TELOS files regularly and update goals and projects
- Analyze which skills work well and what needs improvement
- Keep iterating—this is a never-ending process
10 · Key Takeaways
Don’t start with the tool; start with yourself. Before choosing any AI tool, take time to clarify your goals, beliefs, and working style.
Architectural design matters far more than model selection. A good context management system + an ordinary model often outperforms a top-tier model with no context.
Determinism first, probabilistic methods as a supplement. Use code when code can solve the problem; bring in AI only when intelligent judgment is needed.
Continuous learning is a core value. A static AI assistant is just a tool; an AI assistant that learns is a partner.
Start simple and allow for iteration. You don’t need to get everything right at once. First build the minimum viable TELOS framework, then refine it gradually as you use it.
This document was compiled from Daniel Miessler’s Personal AI Infrastructure project, and written with practical recommendations. The original project was built with TypeScript and the Bun runtime, and integrates natively with Claude Code.