Course Lessons
Welcome & Orientation Starter
Welcome to AI Like a Pro

Quick Reference
⚡ Cheat Sheet 📐 Prompt Formula 📋 CLAUDE.md Guide
← Back to Course Home
Lesson 17 of 20  —  Module 5: The HivePowered AI Sidekick Workflow 85%
Module 5: The HivePowered AI Sidekick Workflow  Adv. Intermediate

How Prime Works — The 3-Layer AI System

Understand the system Prime built to make AI reliable, repeatable, and team-ready — and how you can apply it.

Why most AI workflows break down

Most people use AI like this:

Think of a task → open Claude → type something → get output → use it

Sometimes it works great. Sometimes it's off. You're never sure which it'll be. And when it goes wrong, you're not sure why.

The problem isn't Claude. The problem is no system.


The 3-Layer System

Prime (Tracy) built a system over months of trial and error. It's the reason HivePowered's AI work is consistent, reliable, and improvable over time.

It has three layers:

Layer 1: DIRECTIVES
  What to do. SOPs written as plain English documents.

        ↓

Layer 2: CLAUDE (You / AI)
  How to do it. Read the directive, make decisions, call the right tools.

        ↓

Layer 3: EXECUTION
  The doing. Scripts and automations that carry out the actual work.

Let's look at each one.


Layer 1: Directives (The SOPs)

Directives are step-by-step instructions written in plain English (Markdown). They live in a directives/ folder.

They answer: What should we do? In what order? With what rules?

Examples from real HivePowered projects:
- content-creation.md — how to research, draft, and publish a blog post
- slack-approval.md — how to send content for Prime approval before publishing
- weekly-report.md — what to include in the weekly status update
- security-checklist.md — what to check before every git commit

Directives are not AI-generated each time — they're written once and reused. They're living documents. When something breaks or a better way is found, the directive gets updated.


Layer 2: Claude (The Decision-Maker)

This is where you and AI operate together.

Claude reads the directive. Claude makes decisions. Claude calls the right tools or scripts. Claude recovers when something goes wrong.

This is the layer that handles ambiguity. The directive says "validate the topic." Claude decides how to validate it — maybe by calling the research script, maybe by checking SEO data, maybe by asking a clarifying question.

The key principle: Claude is probabilistic (it's making educated guesses). Business logic must be deterministic (it does exactly the same thing every time).

That's why Layer 3 exists.


Layer 3: Execution (The Scripts)

Layer 3 is deterministic scripts — Python files, automation workflows, shell commands.

These don't make decisions. They just do one thing, reliably, every time they're called.

Examples:
- publish_to_ghl.py — takes a finished article and posts it. No decisions. Just posts.
- check_seo.py — runs SEO validation. Returns pass/fail. No opinion.
- send_slack.py — sends a Slack message to a specific channel. That's it.

Why this matters: If you put all the logic in the AI conversation, you get 60-70% reliability. If you push deterministic work into scripts, AI can focus on decisions and you get 90-95% reliability.


The learnings file — how the system improves itself

Every project has a directives/learnings.md file. Whenever something breaks, or a better way is discovered, it gets written there immediately.

Example entry:

### GHL Blog API Returns 404 (2026-02-28)
- Problem: Blog endpoint returns 404 even with valid API key
- Root cause: Blogs must be enabled on the sub-account first
- Solution: GHL > Sites > Blogs > enable if not active
- Impact: Always check blog is enabled before running publish script

This file is why the same mistake doesn't happen twice. The system learns and improves — permanently.


How you apply this as a Sidekick

You don't need to build scripts. But you can apply the same principles:

Your directive: Keep a notes file for each client with:
- How to handle their content
- What tone to use
- What to avoid
- Who approves what

Your Claude layer: When you work with AI, reference that notes file. Let Claude handle the drafting. You handle the decisions.

Your execution layer: Anything you do more than twice → build a reusable prompt, a skill, or a template.

The goal is: less time explaining, more time producing.


The self-improving loop

When something doesn't work → fix it → write it down → the system gets smarter.

When something works well → write it down → it becomes a skill or directive.

Over time, your AI system knows more about your clients, your style, and your workflows than any new tool ever could. That knowledge compounds.


Dig deeper


Next lesson: Your daily AI workflow — what to do each morning, how to review AI output, and how to save what you learn.

HivePowered AI — AI Like a Pro Training