BuildBotsBetter
GALAXY

Grok Bot Galaxy, 3 Days: Build a Company with Bots

Autonomous Bot Teams, Operational Soul, Verification CLIs, Hostile Inputs & Fleet Safety

Progress
0%

Select Your Operating System

Terminal commands, shell scripts, and scheduling configurations adjust dynamically.

Day 1 • Step 1 of 13 Est: 5 minutes

Bot Team Architecture & Company Handbook

Design a collaborative bot team with distinct roles rather than an ephemeral chat. As Roman Huet (Grok Bot Galaxy 3-Day Livestream host and developer advocate) demonstrated on Day 1 [00:30]-[00:38], bots are long-lived teammates with persistent memory, directed by a chief-of-staff orchestrator and guided by a short shared company doc every bot reads [00:24], [04:16].

Execute Step Action

Run this command block in your terminal to implement the architecture:

PowerShell
# Initialize company directory and shared context handbook New-Item -ItemType Directory -Force -Path "company_workspace\context" | Out-Null @" # Company Handbook (Shared Context) - Mission: Rapid MVP delivery with autonomous agent teams - Roles: Chief-of-Staff (Router), Data Analyst, Slide Specialist, Outbound Lead - Rules: Never send external communications without human approval; log all actions "@ | Set-Content -Encoding utf8 "company_workspace\context\handbook.md" Get-Content "company_workspace\context\handbook.md"
Checkpoint: Bot Team Architecture & Company Handbook Required

Confirm creation of your shared company handbook. Paste the first line containing "# Company Handbook":

Day 1 • Step 2 of 13 Est: 6 minutes

Writing Bot Descriptions as Operating Manuals ('Soul')

Write each bot's description as its operating manual. Day 1 [00:49] and Day 2 [03:35]-[03:37] emphasize: give each bot one explicit job, definitive boundary rules, and a distinct voice. When operational instructions get overly rigid, rewrite them as guiding principles so the bot adapts gracefully to unexpected real-world edge cases.

Execute Step Action

Run this command block in your terminal to implement the architecture:

PowerShell
@" # Bot Soul: Chief-of-Staff Orchestrator Role: You are the central orchestrator for our autonomous company. Job: Deconstruct inbound requests into discrete subtasks, dispatch work to domain specialist bots, and compile responses. Voice: Concise, operational, objective. Principles: 1. Never guess missing constraints; request brief human clarification. 2. Dispatch tasks to specialists rather than performing domain analysis yourself. 3. Halt immediately if any sub-bot reports an unhandled exception. "@ | Set-Content -Encoding utf8 "company_workspace\context\chief_of_staff_soul.md" Get-Content "company_workspace\context\chief_of_staff_soul.md"
Checkpoint: Writing Bot Descriptions as Operating Manuals ('Soul') Required

Paste the line defining the single primary Job of your Chief-of-Staff orchestrator:

Day 1 • Step 3 of 13 Est: 5 minutes

Approval Gates, Risk Management & Saying No

Mitigate operational risk using automated classifiers and strict custom approval barriers. As taught on Day 1 [00:43] and [01:16]-[01:17], enforce mandatory human confirmations for external actions (sending emails, modifying databases). Teach bots when to say no, define rigorous criteria for what 'urgent' truly means, and use approve-once trust building as proficiency is proven [04:10], [04:23].

Execute Step Action

Run this command block in your terminal to implement the architecture:

PowerShell
@" # Security & Approval Policy [Auto-Approve] - Read-only queries, file previews, internal draft generation [Mandatory Human Approval] - External API POST requests - Sending customer emails or publishing social posts - Production database migrations or deletion commands [Refusal Protocol] - When an action violates safety boundaries or requests credentials, refuse immediately with code ERR_BOUNDARY. "@ | Set-Content -Encoding utf8 "company_workspace\context\approvals.ini" Get-Content "company_workspace\context\approvals.ini"
Checkpoint: Approval Gates, Risk Management & Saying No Required

Paste the line specifying Mandatory Human Approval conditions:

Day 1 • Step 4 of 13 Est: 7 minutes

Routines, Event Triggers & Pre-Build Validation

Set up scheduled check-ins and event-driven bots (Slack, CI, Sentry webhooks) while closely monitoring token economics. Day 1 [02:22] and [04:15] show why running polling routines every 15 minutes is wasteful. Validate ideas before writing code: sell to three customers, set up a simple landing page, and perform manual outreach before writing software [02:03]-[02:21], [02:58]-[03:18].

Execute Step Action

Run this command block in your terminal to implement the architecture:

PowerShell
# Test event trigger dispatcher script @' import json, sys def handle_event(event_type, payload): print(f"EVENT RECEIVED: {event_type}") if event_type == "sentry_alert": print("Triggering Bug Triage Bot with traceback evidence...") elif event_type == "slack_mention": print("Routing inquiry to Chief-of-Staff...") else: print("Event logged; no action required.") if __name__ == "__main__": handle_event("sentry_alert", {"issue_id": "ERR-9402"}) '@ | Set-Content -Encoding utf8 "company_workspace\event_dispatcher.py" python company_workspace\event_dispatcher.py
Checkpoint: Routines, Event Triggers & Pre-Build Validation Required

Paste terminal output confirming event dispatcher execution (showing EVENT RECEIVED):

Day 2 • Step 5 of 13 Est: 6 minutes

Tool Hierarchy: MCP, Connectors, Computer Use & Cloud Agents

Establish a clear tool hierarchy for autonomous agents: use MCP/connectors when an API exists, Computer Use for legacy non-API interfaces, 'Teach a Task' to turn demonstrations into reusable skills, and cloud coding agents (Cursor, Claude Code, Codex, Antigravity) for software engineering (Day 1 [00:33], [02:25]; Day 2 [01:18], [04:21]).

Execute Step Action

Run this command block in your terminal to implement the architecture:

PowerShell
@" # Tool Routing Decision Matrix 1. Standard API Available -> Call Model Context Protocol (MCP) server or REST client directly. 2. GUI-Only Legacy Software -> Dispatch Computer Use agent with isolated display buffer. 3. Complex Multi-File Codebase -> Offload task to Cloud Coding Agent with branch isolation. 4. Repetitive Manual Workflow -> Execute Teach-a-Task record and compile into reusable skill script. "@ | Set-Content -Encoding utf8 "company_workspace\context\tool_matrix.txt" Get-Content "company_workspace\context\tool_matrix.txt"
Checkpoint: Tool Hierarchy: MCP, Connectors, Computer Use & Cloud Agents Required

Paste the line describing delegation for Complex Multi-File Codebase tasks:

Day 2 • Step 6 of 13 Est: 8 minutes

Shipping an Extensible MVP: Logic Before Graphics

Structure your MVP so AI agents can reliably implement and test it. Day 2 [00:27]-[00:29] and [02:03]-[02:10] prove: prioritize a tight core loop, implement business logic and data structures before visual flair, build scaffolding and debug panels, and document schema signatures with explicit verification checklists [03:27].

Execute Step Action

Run this command block in your terminal to implement the architecture:

PowerShell
@' # Core Game Logic MVP: Battle Arena Engine class Character: def __init__(self, name: str, hp: int, power: int): self.name = name self.hp = hp self.power = power def attack(self, target: "Character") -> int: damage = min(self.power, target.hp) target.hp -= damage return damage if __name__ == "__main__": c1 = Character("GrokBot-Titan", 100, 25) c2 = Character("Bug-Crawler", 80, 15) dmg = c1.attack(c2) print(f"BATTLE: {c1.name} dealt {dmg} damage to {c2.name}. Remaining HP: {c2.hp}") '@ | Set-Content -Encoding utf8 "company_workspace\core_mvp.py" python company_workspace\core_mvp.py
Checkpoint: Shipping an Extensible MVP: Logic Before Graphics Required

Paste terminal output confirming battle engine execution (showing BATTLE: ... damage):

Day 2 • Step 7 of 13 Est: 7 minutes

Autonomous Self-Verification & Generator-Critic Pairs

Require agents to prove their own work. Day 1 [04:11], [04:47]-[04:50] and Day 2 [05:25] establish: write deterministic verification CLIs instead of ephemeral one-liners, maintain an active feature map, capture screenshots/videos on PRs, and pair a code generator with an adversarial critic before permitting any merge.

Execute Step Action

Run this command block in your terminal to implement the architecture:

PowerShell
@' # Deterministic Verification Script import subprocess, sys def verify_mvp(): proc = subprocess.run(["python", "company_workspace/core_mvp.py"], capture_output=True, text=True) if proc.returncode != 0: sys.exit(f"VERIFICATION FAILURE: {proc.stderr}") if "Remaining HP: 55" not in proc.stdout: sys.exit("LOGIC ERROR: Unexpected damage outcome.") print("PASS: Generator output verified by independent critic harness.") if __name__ == "__main__": verify_mvp() '@ | Set-Content -Encoding utf8 "company_workspace\verify_critic.py" python company_workspace\verify_critic.py
Checkpoint: Autonomous Self-Verification & Generator-Critic Pairs Required

Paste terminal output confirming test pass (showing PASS: Generator output verified):

Day 3 • Step 8 of 13 Est: 7 minutes

Running an Autonomous Software Factory

Operate a continuous software delivery factory on Day 3 [00:14]-[00:17]: keep pull requests small, deploy implementer + verifier agent pairs, configure a QA bot that triggers on green test runs, and use a 'ringleader' bot that launches cloud coding agents that must reproduce a bug before writing a single line of fix code [02:28]-[02:30], [05:08]-[05:09].

Execute Step Action

Run this command block in your terminal to implement the architecture:

PowerShell
@' # Ringleader Bug Reproduction & Dispatcher Protocol import sys, os sys.path.insert(0, os.path.abspath("company_workspace")) from core_mvp import Character def test_reproduce_defect(): print("Ringleader received: 'Character attacks dead target'") hero = Character("GrokBot-Titan", 100, 25) dead_foe = Character("Bug-Crawler", 0, 15) print(f"Target initial HP: {dead_foe.hp}") dmg = hero.attack(dead_foe) if dead_foe.hp <= 0: print(f"REPRODUCED DEFECT: Hero attacked a 0 HP target, dealt {dmg} damage without status check.") print("Authorizing fix branch: 'fix/reject-dead-target-attack'") return True return False if __name__ == "__main__": test_reproduce_defect() '@ | Set-Content -Encoding utf8 "company_workspace\ringleader_factory.py" python company_workspace\ringleader_factory.py
Checkpoint: Running an Autonomous Software Factory Required

Paste terminal output confirming bug reproduction protocol (showing REPRODUCED DEFECT or Authorizing fix branch):

Day 3 • Step 9 of 13 Est: 8 minutes

Public Launch, Production Glue & Hostile Inputs

Execute a real public launch (Day 3 [00:19], [01:30]): remember 'if you are not embarrassed by your first version, you launched too late'. Complete production glue (DNS, OAuth redirects). Treat user input as hostile: implement rate limits, handle HTTP 429s, filter profanity, and sanitize prompts to stop prompt injection [01:47]-[01:49], [02:09]-[02:17].

Execute Step Action

Run this command block in your terminal to implement the architecture:

PowerShell
@' # Hostile Input Sanitizer & Prompt Injection Guard import re BANNED_PATTERNS = [ r"ignore previous instructions", r"system prompt", r"delete profile", r"format drive" ] def sanitize_user_input(text: str) -> str: if len(text) > 500: raise ValueError("Input exceeds maximum length (500 chars).") for pat in BANNED_PATTERNS: if re.search(pat, text, re.IGNORECASE): raise SecurityError(f"Hostile input blocked: {pat}") return text.strip() class SecurityError(Exception): pass if __name__ == "__main__": sample = "Hello! Please challenge my bot to a match." clean = sanitize_user_input(sample) print(f"SANITIZED INPUT OK: {clean}") '@ | Set-Content -Encoding utf8 "company_workspace\input_guard.py" python company_workspace\input_guard.py
Checkpoint: Public Launch, Production Glue & Hostile Inputs Required

Paste terminal output confirming input guard validation (showing SANITIZED INPUT OK):

Day 3 • Step 10 of 13 Est: 7 minutes

Launch Telemetry, Growth & Bot Team Health

Track production telemetry and maintain agent team hygiene: configure a 15-minute launch pulse bot (Day 3 [01:51]), measure retention before revenue, onboard bots with 101/201/301 courses, run weekly dissent and standup meetings, eliminate bot sprawl, and ensure each bot suggests at least one operational improvement every week [03:08]-[03:10], [03:26], [04:18]-[04:41].

Execute Step Action

Run this command block in your terminal to implement the architecture:

PowerShell
@' # 15-Minute Launch Pulse Reporter from datetime import datetime, timezone def generate_launch_pulse(active_users: int, error_count: int, pr_merged: int): now = datetime.now(timezone.utc).strftime("%Y-%m-%d %H:%M:%S UTC") print(f"=== LAUNCH PULSE [{now}] ===") print(f"Active Users: {active_users} | Unhandled Errors: {error_count} | Autonomous PRs Merged: {pr_merged}") print("Health Status: OPTIMAL (Error rate < 0.1%)") if __name__ == "__main__": generate_launch_pulse(1420, 1, 18) '@ | Set-Content -Encoding utf8 "company_workspace\launch_pulse.py" python company_workspace\launch_pulse.py
Checkpoint: Launch Telemetry, Growth & Bot Team Health Required

Paste terminal output confirming launch pulse generation (showing Health Status: OPTIMAL):

Day 3 • Step 11 of 13 Est: 6 minutes

Livestream Retrospective & Principles of Restraint

Internalize core lessons from the 72-hour retrospective (Day 3 [07:42]-[07:54]): ship the MVP as soon as you have alignment, recognize distribution as your core advantage, exercise restraint by actively un-shipping non-essential features, solve challenges by hand before delegating to bots, keep complete prompt transcripts, and remember that humans provide vision, taste, and judgment.

Execute Step Action

Run this command block in your terminal to implement the architecture:

PowerShell
@" # 72-Hour Retrospective Principles 1. Shipping > Perfection: Release early and close the user feedback loop immediately. 2. Restraint: Actively un-ship features that distract from the core loop. 3. Prototype by Hand: Do not build an agent until a human has resolved the workflow manually. 4. Complete Provenance: Preserve every system prompt, transcript, and test artifact. 5. Irreplaceable Human Value: Vision, taste, ethics, and strategic direction. "@ | Set-Content -Encoding utf8 "company_workspace\context\retrospective.txt" Get-Content "company_workspace\context\retrospective.txt"
Checkpoint: Livestream Retrospective & Principles of Restraint Required

Paste the retrospective rule on Prototype by Hand:

Capstone • Step 12 of 13 Est: 15 minutes

Capstone: Build Your Company of Bots

Build your own operational company of bots for a real-world task: implement a chief-of-staff orchestrator, at least two domain specialist bots with written operating manuals, one scheduled routine, one deterministic verification harness that produces proof, and a 1-page company doc. Compatible with Grok Bot, Antigravity CLI, or any agent CLI.

Execute Step Action

Run this command block in your terminal to implement the architecture:

PowerShell
@' # Capstone Company of Bots Runner import os, subprocess, sys class BotCompany: def __init__(self, name: str): self.name = name self.roster = ["Chief-of-Staff", "Market-Scanner", "Code-Builder"] def run_company_cycle(self): print(f"=== {self.name} AUTONOMOUS OPERATING CYCLE ===") # Validate existence of required handbook and approvals policy handbook = os.path.join("company_workspace", "context", "handbook.md") approvals = os.path.join("company_workspace", "context", "approvals.ini") if not os.path.exists(handbook) or not os.path.exists(approvals): sys.exit("ERROR: Required company handbook or approvals policy missing.") # Execute critic harness to validate core logic res = subprocess.run([sys.executable, os.path.join("company_workspace", "verify_critic.py")], capture_output=True, text=True) if res.returncode != 0: sys.exit(f"ERROR: Critic harness check failed: {res.stderr}") for bot in self.roster: print(f"[{bot}] Status: Active | Approvals: Enforced | Evidence: Captured") print("VALIDATION: Full cycle confirmed with deterministic proof checks.") return True if __name__ == "__main__": company = BotCompany("Galaxy-Alpha-Ventures") company.run_company_cycle() '@ | Set-Content -Encoding utf8 "company_workspace\capstone_company.py" python company_workspace\capstone_company.py
Checkpoint: Capstone: Build Your Company of Bots Required

Paste terminal output confirming capstone company execution (showing VALIDATION: Full cycle confirmed):

Safety • Step 13 of 13 Est: 10 minutes

Build Bot Better & Wipe Resistance

Enforce mandatory fleet safety protections across your company of bots: complete the per-agent onboarding checklist, understand the variable-limit delete guard demo ($tmp = $env:USERPROFILE), maintain off-volume profile backups (${BACKUP_ROOT:-$HOME/Backups}/llm-profiles), execute a practised restore drill, and enforce fail-closed workspace roots.

Execute Step Action

Run this command block in your terminal to implement the architecture:

PowerShell
$check = Join-Path $env:TEMP "bbb-onboarding-checklist.txt"; @("agent:","rules file:","memory location:","permissions:","delete guard:","backup path:","final check:") | Set-Content -Encoding ascii $check; Get-Content $check; Write-Host "Fill every line for this agent. Rerun this checklist for the next agent."
⚠️ The 2026-09-23 Incident Lesson:

Text guards miss variable-derived deletions ($tmp = $env:USERPROFILE). Full protection requires: path inspection, off-volume backups, and a non-destructive restore drill.

2. Variable-Limit Delete Guard Demo

$tmp = $env:USERPROFILE; $literal = $env:USERPROFILE; foreach ($src in @('$tmp','$env:GROK_HOME','python cleanup.py')) { if ($src -like "*$literal*") { "HIT $src" } else { "MISS $src" } }; if ([IO.Path]::GetFullPath($tmp) -eq [IO.Path]::GetFullPath($env:USERPROFILE)) { "REFUSE resolved tmp: it is the user profile. Text guards miss dollar-variables and python cleanup.py. 2026-09-23 Remove-Item of user profile is the example." }

3. Off-Volume Fleet Profile Backup

$dest = "D:\Backups\llm-profiles\$(Get-Date -Format yyyyMMdd-HHmm)"
New-Item -ItemType Directory -Force -Path $dest | Out-Null
foreach ($d in @(".agy", ".claude", ".codex", ".grok", ".grokbot", "AppData\Roaming\Grok Bot")) {
  if (Test-Path "$env:USERPROFILE\$d") {
    robocopy "$env:USERPROFILE\$d" "$dest\$d" /E /NFL /NDL /NJH /NJS
    Write-Host "Backed up $dest\$d"
  }
}
Get-ChildItem $dest

4. Practised Restore Drill

$drill = Join-Path $env:TEMP "bbb-restore-drill"; New-Item -ItemType Directory -Force -Path $drill | Out-Null; $latestBak = Get-ChildItem "D:\Backups\llm-profiles" -ErrorAction SilentlyContinue | Sort-Object LastWriteTime -Descending | Select-Object -First 1; if ($latestBak) { Copy-Item -Recurse $latestBak.FullName (Join-Path $drill "restored-profile"); Write-Host "bbb-restore-proof: restored real profile from $($latestBak.FullName) into $drill" } else { Set-Content -Encoding ascii -Path (Join-Path $drill "proof.txt") -Value "bbb-restore-proof"; Write-Host "bbb-restore-proof: fallback drill completed in $drill" }

5. Fail-Closed Workspace Policy

Always restrict bot execution roots to designated repositories like $HOME/projects/agent_workspace. Never delegate unattended tasks with blanket auto-approval in the user home directory.

Checkpoint: Build Bot Better & Wipe Resistance Required

Paste terminal output from the practised restore drill (showing bbb-restore-proof) or variable demo confirming wipe resistance: