Skip to content

Knowledge Bases

Built-in Knowledge

HQ ships with 10 knowledge bases in core/knowledge/public/:

Knowledge BasePathContents
Ralphcore/knowledge/public/Ralph/Coding methodology — overview, core concepts, back-pressure, specifications, implementation
Workerscore/knowledge/public/workers/Worker framework — Ralph loop pattern, skill schema, state machines, templates
HQ Corecore/knowledge/public/hq-core/HQ system docs — agent session contract, thread and checkpoint schemas
AI Security Frameworkcore/knowledge/public/ai-security-framework/Security framework — principles, checklists, templates
Agent Browsercore/knowledge/public/agent-browser/Browser automation — auth profiles, social posting, Tauri testing
Brand Voicecore/knowledge/public/brand-voice/Brand-voice packs and their schema
Getting Startedcore/knowledge/public/getting-started/HQ cheatsheet, quick-start guide, learning path
Dev Teamcore/knowledge/public/dev-team/Development patterns, troubleshooting, workflows
Loomcore/knowledge/public/loom/Agent patterns reference — architecture, state machines, thread system
Projectscore/knowledge/public/projects/Project templates — README template for new projects

core/ is replaced when you run /update-hq, so don’t edit these files. Put your own knowledge in personal/knowledge/ or companies/{co}/knowledge/.

Personal and Company Knowledge

After running /setup, you’ll have personal knowledge:

personal/knowledge/
├── profile.md # Your identity, role, goals
└── voice-style.md # Writing voice and style preferences

Each company has its own knowledge folder at companies/{co}/knowledge/. For a cloud-backed company, that folder syncs to the company vault, so teammates get the same files.

Knowledge bases are plain directories inside HQ. Don’t symlink knowledge into repos/: cloud sync records a symlink as a marker and teammates receive no content.

  • Company knowledge stays a plain directory with no Git metadata. It syncs through the company vault.
  • Personal knowledge may use an embedded Git repo when you want separate version history.

If you have older knowledge bases that are symlinks into repos/, hq reindex converts them into real directories.

Adding New Knowledge

  1. Create a directory:
Terminal window
mkdir -p personal/knowledge/my-topic

For company knowledge, use companies/{co}/knowledge/my-topic instead.

  1. Add content (markdown files)

  2. Optional, personal knowledge only: give it its own version history:

Terminal window
cd personal/knowledge/my-topic
git init
git add . && git commit -m "init knowledge repo"
  1. Update the search index:
Terminal window
hq index sync

Using Knowledge in Workers

Workers reference knowledge bases in their worker.yaml:

context:
base:
- core/knowledge/public/Ralph/
- core/knowledge/public/workers/
- companies/my-company/knowledge/

When a worker runs, your AI tool loads these paths as context, giving the worker access to all relevant knowledge.

Search Across Knowledge

All knowledge bases are indexed by qmd:

Terminal window
/search "deployment best practices"

This searches across HQ content and indexed repos.