Skip to content

TruwellAI/heimdall-protocol

Repository files navigation

Heimdall Protocol

The agency AI operating system — built and shipped through Claude Code in one evening.

"Anything below 9 on any rubric triggers Heimdall to demand a fix from the relevant Bot 00 within 24 hours. Bot 00 returns 3 fix suggestions. Jarvis approves. Fix auto-deploys. Heimdall re-audits."

8 universal doctrines + a Master Build Protocol + a Claude Code skill + an always-on macOS desktop widget. Designed for marketing/operations agencies running 5+ companies on a unified bot stack.

Used in production at NZ Agency. Released MIT so other agencies can adopt, fork, and improve.


What problem this solves

If you're running multi-client AI operations, you hit these walls:

  • Token cost spirals — heavy planning + execution share a single window, cap exhausted fast
  • 30-day-late discovery — influencer reels surface features you already had installed
  • "Just start crushing it out" — building tech without specs leads to constant rework
  • Shipping wrong-ICP / wrong-brand / banned-claim content because there's no pre-deploy gate
  • Quality drift — bots degrade quietly; nobody runs the rubric weekly
  • Operator bottleneck — every decision routes back to the founder

The Heimdall Protocol stack addresses each.


The 8 doctrines

Doctrine What it governs
Ultraplan-First Protocol Fire /ultraplan for complex / multi-step / cross-bot work — splits heavy planning to cloud Opus
REEL Session Protocol Night/morning reel review → mandatory master-doc push at session end
Design-First Build Doctrine 7-phase workflow (Spec → Design → Review → Scaffold → Build → Test → Deploy) before any new tech
Design-First Appendix A: Skills Each phase mapped to existing Claude Code skills/agents/MCP tools
Master Build Protocol 5-Gate pre-BUILD sequence (Purpose → Aesthetic Anchor → Brand Walls → Deployment Context → Differentiation)
Ultron Protocol 5-gate mandatory pre-DEPLOY cascade (Ultron UX → Karen Compliance → Rubric → Psychology → Pillars)
Heimdall Protocol Daily landscape sweep + chief of staff + dashboard hub + Nine-or-Above gatekeeper
Nine-or-Above Doctrine Anything <9 on any rubric → Heimdall demands fix → Bot 00 suggests → Jarvis approves → auto-deploys

The REGISTRY indexes everything new bots should read on session start.


The execution stack (how it all chains)

HEIMDALL daily scan       ←  Continuous intelligence (Claude/Anthropic/AI landscape)
        ↓
REEL Session              ←  Active discovery (operator drops reels)
        ↓
MASTER BUILD PROTOCOL     ←  Pre-build (Purpose · Aesthetic · Walls · Deployment · Diff)
        ↓
DESIGN-FIRST BUILD        ←  7 phases (Spec → Build → Test)
        ↓
ULTRON PROTOCOL           ←  5 pre-deploy gates
        ↓
DEPLOY
        ↓
NINE-OR-ABOVE             ←  Autonomous quality enforcement (Heimdall gatekeeper)
        ↓
MASTER DOC PUSH           ←  REEL Session Step 6 — every artifact propagates

What's included

Doctrines (doctrines/)

Universal markdown doctrine files. Drop them into your repo, adapt the company-specific examples (brand walls, pricing, persona references), and every bot reads them on session start.

Skill: claude-landscape-sweep (skills/)

Reusable Claude Code skill that runs a daily 2-minute briefing on Anthropic / Claude Code / AI ecosystem changes. Closes the "discovered late" gap. Install at ~/.claude/skills/claude-landscape-sweep/.

Skill Inventory cheatsheet (cheatsheets/)

150+ Claude Code skills/agents/MCP tools catalogued by job + by doctrine + by build type. Every new bot reads this on session start to know what tools exist.

Desktop widget (widget/)

Übersicht-based always-on macOS desktop overlay. Three rotating views: Ad Performance · Issues · Per-Company Health. Health score flashes when below 9. Click drills into your full dashboard. See widget/INSTALL.md for setup.

Example state (examples/)

Sample widget_state.json showing the shape your widget data should take.


Quick start (30 minutes)

  1. Read REGISTRY.md — it lists every doctrine in reading order
  2. Adopt doctrines incrementally:
    • Start with REEL Session Protocol (changes your discovery cadence)
    • Then Design-First Build (changes your build cadence)
    • Then Ultron Protocol (gates customer-facing ship)
    • Then Nine-or-Above (autonomous quality)
    • Heimdall + Ultraplan-First once you're running multi-bot
  3. Install the Heimdall skill:
    cp -r skills/claude-landscape-sweep ~/.claude/skills/
    
  4. Install the widget (optional, macOS only) — see widget/INSTALL.md

Adoption notes

What you need to adapt for your agency

The doctrines reference specific examples from NZ Agency's actual production use:

  • Bot personas — Jarvis (strategic orchestrator), Stark (spinup), Heimdall (watchman), Ultron (UX), Karen (compliance), Kondo (UX audit), Midas (pricing), Pip (SEO), Scrooge (accounting), Bart (marketing), per-company Bot 00 chiefs of staff. Marvel/Norse names are universal — keep or rename to your preference.
  • Brand walls — Examples reference NZ Agency brand walls (Teya rule, paid-ads-only-on-X, etc.). Replace with your own brand walls.
  • File paths — Examples use /Users/truwell/Desktop/NZ Agency/master-ops 2/. Replace with your repo path.
  • Companies — TruWell, Apex, Bellamarque, Novira, HomePulse, HVAC Friend, etc. Replace with your client/portfolio names.

The patterns are universal. The examples are concrete. Strip what doesn't apply, keep the framework.

What stays universal

  • The 8 doctrine workflows (don't reinvent these)
  • The 5-Gate Master Build Protocol sequence
  • The 5-Gate Ultron Protocol cascade
  • The 7-Phase Design-First Build order
  • The Nine-or-Above threshold (you can tune the number, but the autonomous-fix loop is the pattern)
  • The REEL Session Protocol learning loop
  • The Heimdall gatekeeper role

Origin

Built and shipped in one evening (2026-05-17) at NZ Agency by Neil Atkinson and Claude (Anthropic). 17 PRs merged in one session, ~4,500 lines of doctrine + tooling. The doctrines were themselves shipped using the doctrines (eating our own dog food).

Released open source so other agency operators don't have to build it from scratch.


What this isn't

  • ❌ Not a Claude Code plugin (it's a methodology + companion tooling)
  • ❌ Not an n8n / Make / Zapier workflow library
  • ❌ Not a SaaS product
  • ❌ Not a substitute for actual ops work (it's the structure you do ops within)

Contributing

PRs welcome. Especially:

  • Doctrine refinements based on production usage
  • New industry-specific Master Build Protocol aesthetic anchors
  • Widget improvements (more views, additional data sources)
  • Skill additions to the Inventory
  • Translations of doctrines to other languages

Open an issue first to discuss large changes.


License

MIT — see LICENSE.

Copy it, fork it, build on it, sell services around it. No restrictions, no royalties.


Built with

Claude Code by Anthropic. Every doctrine, the widget, the skill — all shipped through Claude Code's multi-PR workflow. The Heimdall Protocol is in part a love letter to Claude Code's flexibility.


Heimdall watches the realm.

— Neil Atkinson · NZ Agency · 2026-05-17

About

The agency AI operating system. 8 doctrines + skill + widget + cheatsheet. Built by NZ Agency and Claude (Anthropic) in one evening, shipped MIT so other agencies can adopt.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors