Orchestrate work across companies, workers, and AI — from a single terminal.
Built for Claude Code. Structure your context, define specialized workers, and let the Ralph loop execute your projects.
What is HQ?
HQ is a filesystem-based operating system that gives Claude Code persistent memory, specialized workers, and multi-company orchestration. One terminal. Every business. Full autonomy.
Companies
Each business gets isolated context — credentials, knowledge, workers, and projects never cross-contaminate.
Workers
Specialized AI agents with domain knowledge, tools, and learned rules. Route tasks to the right expert.
Commands
Slash commands that encode complex workflows. /prd plans projects, /run dispatches workers, /handoff preserves context.
Ralph Loop
Plan → Execute → Review → Learn. Every project runs through this cycle until acceptance criteria pass.
Install in 30 Seconds
One command to create your HQ. Two more to keep it synced and updated.
npx create-hqcreate-hq
One-command installer. Creates your HQ with commands, workers, knowledge bases, and project scaffolding.
npm i -g @indigoai/hq-cli@indigoai/hq-cli
Module management. Sync external knowledge, workers, and tools into your HQ with merge, link, or copy strategies.
hq sync start@indigoai/hq-cloud
Cloud sync engine. Access your HQ from any device. S3-backed with real-time file watching.
01 — Create your HQ
$ npx create-hq
╭─────────────────────────────────────╮
│ │
│ HQ — Personal OS for AI Workers │
│ │
╰─────────────────────────────────────╯
✓ Created .claude/commands/ (17 slash commands)
✓ Created workers/ (26 AI workers)
✓ Created knowledge/ (5 knowledge bases)
✓ Created workspace/ (threads, checkpoints)
✓ Created starter-projects/ (3 templates)
Next steps:
cd hq
claude
/setup02 — Manage modules
$ npm install -g @indigoai/hq-cli
$ hq modules list
hq-core v5.0.0 merge ✓ synced
ralph-method v2.1.0 link ✓ synced
dev-patterns v1.4.0 link ✓ synced
$ hq modules sync
Syncing hq-core... ✓ 3 files updated
Syncing ralph-method... ✓ up to date
Syncing dev-patterns... ✓ up to date03 — Sync to cloud
$ hq sync init
Authenticating with IndigoAI...
✓ Connected to hq.indigoai.com
$ hq sync start
✓ Background sync active
✓ Watching 847 files across 16 companies
✓ Access your HQ at hq.indigoai.comHow It Works
HQ runs inside Claude Code. You type commands, workers execute, and the system learns.
01 — Define workers with domain knowledge
# workers/public/backend-dev/worker.yaml
name: backend-dev
type: CodeWorker
team: dev-team
description: Endpoints, business logic, APIs
skills:
- name: implement-endpoint
description: Build a REST or GraphQL endpoint
steps:
- Read the PRD acceptance criteria
- Check existing route patterns
- Implement with tests
- Run quality gates
instructions: |
Always use existing auth middleware.
Follow repository naming conventions.
Include error handling for all edge cases.03 — Dispatch workers to execute
> /run backend-dev implement-endpoint
Worker: backend-dev
Skill: implement-endpoint
Company: acme (auto-detected from cwd)
Reading PRD... US-003 "Update API middleware"
Reading knowledge... companies/acme/knowledge/auth.md
Checking patterns... repos/private/acme-api/src/middleware/
Implementing...
✓ Created src/middleware/clerk-auth.ts
✓ Updated src/routes/index.ts
✓ Added tests in __tests__/clerk-auth.test.ts
✓ All 14 tests passing
Quality gates:
✓ TypeScript — no errors
✓ Lint — clean
✓ Tests — 14/14 passed02 — Plan projects with /prd
> /prd
Planning project: user-auth-migration
Generated 5 stories:
US-001 Set up Clerk provider P0 ■■■■■
US-002 Migrate session handling P0 ■■■■■
US-003 Update API middleware P0 ■■■■■
US-004 Add role-based access P1 ■■■□□
US-005 Integration tests P1 ■■■□□
PRD saved → companies/acme/projects/user-auth-migration/prd.json
Branch created → feature/user-auth-migration04 — CLAUDE.md governs behavior
# .claude/CLAUDE.md (excerpt)
## Company Isolation
- Infer active company from cwd, worker, or repo
- NEVER read credentials from another company
- NEVER mix company knowledge in outputs
## Workers
Worker-first rule: Before specialized tasks,
check workers/registry.yaml for a match.
Use /run {worker} {skill} — workers carry
domain instructions + learned rules.
## Ralph Loop
Plan → Execute → Review → Learn
Every project runs through this cycle
until acceptance criteria pass.Built for Operators
Whether you're a solo founder, an agency, or an enterprise team — HQ scales with your complexity.
Solo Founder
You're running 3 businesses from one laptop. Context-switching kills your output.
HQ isolates each company — credentials, knowledge, and workers stay separate. Switch context in one command.
Agency / Studio
10+ clients, each with their own repos, brand guidelines, and deploy targets. AI keeps mixing them up.
Company isolation enforces boundaries. Workers inherit the right company context automatically. No cross-contamination.
Enterprise Team
Your AI toolchain is fragmented — ChatGPT for writing, Copilot for code, custom scripts for everything else.
HQ unifies everything under one orchestrator. Workers handle code, content, design, and ops. PRDs drive execution end-to-end.
Directory Architecture
Everything has a place. Companies, workers, knowledge, and projects — all isolated yet interconnected.
hq/
├── .claude/
│ ├── commands/ # 35 slash commands (/prd, /run, /handoff...)
│ ├── hooks/ # PreToolUse, PostToolUse, PreCompact
│ ├── policies/ # Hard/soft enforcement rules
│ └── skills/ # Reusable skill definitions
├── companies/
│ ├── manifest.yaml # Source of truth: company → resources
│ ├── liverecover/
│ │ ├── knowledge/ # Embedded git repo
│ │ ├── settings/ # Credentials by service (aws/, linear/, stripe/...)
│ │ ├── policies/ # Company-scoped rules
│ │ ├── projects/ # PRDs + execution state
│ │ ├── workers/ # Company-scoped AI workers
│ │ └── data/ # Exports, reports, checkpoints
│ ├── indigo/
│ ├── personal/
│ └── ... # 16 companies, fully isolated
├── knowledge/
│ ├── public/ # Symlinks → repos/public/knowledge-*
│ └── private/ # Internal knowledge bases
├── repos/
│ ├── public/ # Open-source repos (hq, slack-mcp, ralph...)
│ └── private/ # Client repos (vyg, indigo-nx, moonflow...)
├── workers/
│ └── public/ # Shared workers (dev-team, content-team, qa...)
├── workspace/
│ ├── threads/ # Session continuity (handoff.json, thread files)
│ ├── orchestrator/ # Project execution state
│ ├── reports/ # Generated reports
│ └── social-drafts/ # Content queue
├── settings/ # Shared config (orchestrator.yaml)
└── CLAUDE.md # System prompt — all rules live hereINDEX.md System
Hierarchical INDEX.md files provide a navigable map of HQ. Commands auto-update them so the map stays current.
projects/INDEX.mdAll project PRDs and status
workspace/orchestrator/INDEX.mdRalph loop workflow state
companies/*/knowledge/INDEX.mdCompany knowledge maps
workers/*/INDEX.mdWorker directories
knowledge/public/INDEX.mdPublic knowledge bases
workspace/reports/INDEX.mdGenerated reports
Auto-Updated By
Company Isolation
Each company owns its own settings, data, and knowledge — fully isolated contexts with dedicated credentials.
Company A
Each company is an isolated context with its own credentials, data, and knowledge.
Company B
Workers and commands can be scoped to a specific company.
Personal
Personal context for individual workflows and social presence.
Worker Hierarchy
Specialized AI workers organized into teams. Each has a YAML definition, skills, verification, and state machine lifecycle.
Dev Team (12)
Content Team (5)
Utility (3)
Custom (You Create) (4)
Slash Commands
Organized into categories — from session management to deployment. Each command maps to a Claude skill.
Session
6Context reanchoring
Save thread state
Hand off to fresh session
Scan and suggest next tasks
Capture learnings
Auto-capture learnings
Workers
3Execute worker skills
Scaffold new worker
View worker metrics
Projects
3Plan project, generate PRD
Execute project (Ralph loop)
Execute single task
Content
6Build content idea into posts
Research and suggest posts
Choose what to post
Preview, select images, approve
Post to social platforms
Remove AI writing patterns
Design
3Generate images
Generate SVG graphics
A/B design iterations with git
System
6Sync modules from manifest
Audit and enforce policies
Search HQ (qmd-powered)
Reindex (semantic + full-text)
Interactive setup wizard
Force exit plan mode
Deploy
2Deploy to production
Publish content kit
Knowledge System
Three-tier knowledge architecture with semantic search. Workers load relevant knowledge automatically from their context.base paths.
qmd searchFastBM25 keyword
Fast exact-match keyword search across all HQ content
qmd vsearchMediumSemantic vector
Conceptual/meaning-based search using embeddings
qmd queryBest qualityHybrid + re-ranking
BM25 + vector search combined with result re-ranking
Public (8)
Private (2)
Company-Level (3)
Knowledge Repos
Every knowledge folder is its own git repo, symlinked into HQ. Independent versioning, sharing, and publishing per knowledge base.
Transparent Reading
qmd, Glob, Grep, and Read all follow symlinks. No special handling needed — knowledge is accessed like any file.
Independent Versioning
Each knowledge base is its own git repo. Commit, push, and share independently from HQ.
Module Sync
modules/modules.yaml manages the repo inventory. /hq-sync keeps symlinks current.
Repo Mapping
repos/public/ralph-methodology/docs·publicrepos/public/knowledge-workers·publicrepos/public/knowledge-hq-core·publicrepos/private/knowledge-company-a·privaterepos/private/knowledge-company-b·privateThe Ralph Loop
Simple for-loop orchestration: read PRD, pick task, spawn fresh agent, execute, verify, checkpoint, repeat.
One task at a time
No context overload. Each agent handles exactly one user story.
Fresh context per task
Sub-agent spawns with 100% clean context. Orchestrator stays lean (<30%).
Back pressure
Every task must pass typecheck, build, and tests before completion.
Simple loops
for-loop orchestration over complex frameworks. PRD is the source of truth.
Feature branches
All work on feature/{project-name}. Never commit to main. PR when done.
Auto-checkpoint
Thread state saved after every task — git context, worker state, files touched.
Worker State Machine
Every worker follows the same lifecycle: load context, plan, execute, verify, checkpoint.
Worker registered, awaiting invocation
Loading context from knowledge bases and worker.yaml
Analyzing task, determining approach
Performing the skill — writing code, generating reports
Running typecheck, build, tests — back pressure gate
Auto-checkpoint, metrics logging, thread save
Task done, output delivered, state persisted
Failure caught — can retry or escalate
Skill Execution Flow
Skills are atomic, verifiable operations with typed inputs and outputs. Mutating skills trigger automatic state management.
Skill Schema
| Field | Type | Description |
|---|---|---|
| id | string | Unique skill identifier |
| interface.inputs | array | Typed parameters: name, type, required, default |
| interface.outputs | array | Result types with destination paths |
| verification | array | Shell commands that must pass before completion |
| mutating | boolean | If true, triggers auto-checkpoint + metrics logging |
Thread Lifecycle
Sessions are captured as thread JSON files with full git context, worker state, and continuation hints.
Thread Schema
T-20260123-143052-slug·Unique timestamped identifierfeature/my-project·Active branch at time of save["abc1234: feat: ..."]·Commits made during sessionbackend-dev·Worker that executed the skillcompleted·idle | loading | executing | verifying | completed | error["workspace/reports/..."]·All files modified during session["Run tests", "Deploy"]·Continuation hints for next sessionLearning System
Rules are captured from task execution and injected directly into the files they govern. The system gets smarter with every session.
Tier 1
Highest/remember (user correction)
Immediate injection into governing file
Tier 2
High/learn (auto-capture post-task)
Classified and injected into relevant file
Tier 3
NormalEvent log append
workspace/learnings/*.json (analysis/dedup)
Injection Targets
worker.yaml instructions: blockcommand .md ## Rules sectionRelevant knowledge file (committed to repo)CLAUDE.md ## Learned RulesBuild your HQ today
One command to install. Open source. Free forever. Or work with Indigo to get a custom HQ for your team.
Install & Customize
npx create-hq
17 commands, 26 workers, 5 knowledge bases — ready in 30 seconds. Customize your workers, add companies, and start orchestrating.
View on GitHubBuild With Indigo
Get a custom HQ built, configured, and handed off — worker architecture, knowledge bases, and orchestration pipelines your team actually uses.
HQ Advisory Services