DOC
Reference
Commands cheatsheet, environment variables, file paths, model recommendations, and glossary.
Reference
Quick-access reference for ulk commands, paths, variables, and terminology.
Essential Commands Cheatsheet
Session lifecycle
| Command | Effect |
|---|---|
/ulk:bruce go | Detect project state, take the most logical action |
/ulk:bruce status | Full project diagnostic |
/ulk:bruce next | Execute next task from docs/todo.md |
/ulk:bruce fix | Find and fix errors |
/ulk:bruce audit | Code quality audit |
/ulk:bruce audit all | 4 parallel audits (code, perf, a11y, SEO) |
/ulk:bruce review | Pre-delivery completeness review |
/ulk:bruce ship | Pre-release checks |
/ulk:bruce sync | Sync with Notion/Linear |
/ulk:godspeed | Quick project diagnostic (30s, cached 30 min) |
/ulk:2b3 | End-of-session: lint → tests → commit → memory capture |
/ulk:xavier | Verify work context (account, repo, last state) |
/ulk:gandalf | Context health check |
/ulk:gandalf status | Quick context zone assessment |
Context hygiene
| Command | Effect |
|---|---|
/rewind | Undo last turn, reformulate from clean state |
/clear | Clear context (use between unrelated tasks) |
/compact | Compact with preservation instructions |
/compact Preserve: X. Discard: Y. | Targeted compact |
/effort low | Minimal reasoning (mechanical tasks) |
/effort medium | Most prompts — efficient default |
/effort high | Default for Opus 4.8 agentic coding |
/effort xhigh | Hardest tasks + long async workflows (was Opus 4.7 default) |
/effort max | Rarely justified |
Audits
| Command | Effect |
|---|---|
/ulk:sargeras | 10-axis full project audit |
/ulk:ed209 | OWASP Top 10 security audit |
/ulk:killbill | Cloud cost audit (Vercel, GitHub, Neon) |
/ulk:blackemperor | All 4 audits in parallel, consolidated report |
/ulk:perf-auditor | Core Web Vitals, bundle, database |
/ulk:a11y-auditor | WCAG 2.1/2.2 accessibility |
/ulk:seo-auditor | SEO technical audit |
/ulk:vision | Code quality, 8 dimensions |
/context-audit | Token health score 0-100 |
/ulk:verify | Spec-to-code conformance (3 dimensions × 3 severities) |
Documentation
| Command | Effect |
|---|---|
/ulk:shuri | Generate/update spec.md, todo.md, CLAUDE.md, README.md |
/ulk:strange | Reverse-engineer spec from code |
/ulk:strange mode=prompt | Reverse-engineer prompt from AI output |
/ulk:lovecraft memory capture | Capture MEMORY.md → docs/_memory/ |
/ulk:lovecraft memory surface | Read-only vault summary for current session |
/ulk:lovecraft memory distribute | Inject vault into CLAUDE.md |
/ulk:lovecraft memory dream | REM consolidation: dedup, normalize, archive |
/ulk:agamotto | Reverse-engineer design from Figma URL → docs/design.md |
Skills
| Command | Effect |
|---|---|
/caveman | Activate terse output mode for session |
/caveman off | Deactivate terse output mode |
/symbols list <file> | List all TypeScript/JavaScript symbols |
/symbols view <file> <symbol> | View one symbol body |
/symbols refs <file> <symbol> | Find references across codebase |
/context-mode query <id> | Retrieve stored verbose output |
/context-mode list | List N most recent stored outputs |
/context-mode stats | Interception rate, tokens saved |
/architecture-diagram | Generate HTML+SVG architecture diagram |
Deployment
| Command | Effect |
|---|---|
/ulk:deploy-vercel | Deploy to Vercel |
/ulk:deploy-netlify | Deploy to Netlify |
/ulk:deploy-cloudflare | Deploy to Cloudflare Workers/Pages |
/ulk:deploy-aws | Deploy to AWS |
/ulk:deploy-docker | Docker build + push |
/ulk:deploy-fly | Deploy to Fly.io |
Installation and maintenance
| Command | Effect |
|---|---|
./install.sh | Install or reinstall ulk |
./install.sh --dry-run | Simulate without writing files |
git pull && ./install.sh | Upgrade to latest version |
ulk install --audit-only | Pre-install audit without writing to ~/.claude/ |
ulk clean | Remove orphan files (renamed/deleted agents) |
ulk clean --dry-run | List orphans without deleting |
ulk skills list | List declared external skills |
ulk skills update | Fetch/install all external skills |
./framework/tools/check-tools.sh | CLI + skills diagnostic |
node framework/cheatheet/generate-registry.cjs | Regenerate registry.json + registry.md |
node framework/cheatheet/generate-commands.cjs | Regenerate commands/ from agents/ |
Managed Agents (cloud)
| Command | Effect |
|---|---|
ulk ma sargeras "<prompt>" | Run sargeras as a Managed Agent |
ulk ma ed209 "<prompt>" | Run ed209 as a Managed Agent |
ulk ma 2b3 "<prompt>" | Run 2b3 as a Managed Agent |
ulk install --audit-only --with-managed-agents | Audit managed agents setup |
RTK (token compression)
| Command | Effect |
|---|---|
rtk proxy <cmd> | Compress a command’s verbose output |
rtk gain | View cumulative savings |
rtk gain --history | Command history with per-command savings |
rtk --version | Verify correct RTK is installed |
Environment Variables
| Variable | Default | Effect |
|---|---|---|
CLAUDE_CODE_DISABLE_1M_CONTEXT | unset | Set to 1 to disable Opus’s 1M context window (4.7/4.8), force 200K (auto-compact at ~155K) |
CLAUDE_AUTOCOMPACT_PCT_OVERRIDE | unset | Set to 80 to trigger compact at 80% rather than at overflow |
ANTHROPIC_API_KEY | required for Managed Agents | Anthropic API key (first-party only — not Bedrock/Vertex) |
AUTO_DREAM_MIN_HOURS | 24 | Minimum hours between auto-dream cycles |
AUTO_DREAM_MIN_SESSIONS | 5 | Minimum sessions between auto-dream cycles |
CHROME_PORT | 9222 | Chrome DevTools Protocol port (mb CLI) |
CHROME_BIN | system | Chrome binary path (mb CLI) |
Write environment variables in ~/.claude/settings.json:
{
"env": {
"CLAUDE_CODE_DISABLE_1M_CONTEXT": "1",
"CLAUDE_AUTOCOMPACT_PCT_OVERRIDE": "80"
}
}
Do not set CLAUDE_CODE_SUBAGENT_MODEL — it overrides all agents’ model: frontmatter declarations.
Important File Paths
Repository structure
| Path | Contents |
|---|---|
framework/agents/ | All 90 agent definitions (markdown files) |
framework/agents/_shared/ | Shared protocols, base rules, model policy |
framework/agents/registry.json | Auto-generated agent registry (count, names, phases, categories) |
framework/cli/ | ulk CLI source (Go) |
framework/packages/core | Shared TypeScript library (parser, types, GitHub client) |
framework/packages/status-board | Project tracking dashboard |
framework/schemas/ | JSON schemas (todo, spec, project, dashboard) |
framework/community-skills/ | Vendored community skills (source) |
framework/tools/ | Shell scripts (cli-registry.json, accountability-report.sh, etc.) |
framework/managed-agents/ | Managed Agents orchestrators and triggers |
framework/cheatheet/ | Registry and command generator scripts |
docs/guides/ | Technical guides (token-optimization, large-codebase, managed-agents) |
docs/research/ | Spike documents (spikes are research notes for features) |
docs/audits/ | Archived audit reports (sargeras, ed209) |
site/ | Documentation site (Astro, ulk.regrets.app) |
~/.claude/ (installed files)
| Path | Contents |
|---|---|
~/.claude/commands/ | Slash commands for each agent |
~/.claude/skills/ | Installed skills (figma-, swift-, kepano-*, etc.) |
~/.claude/hooks/ | Optional hooks (memory loop, auto-dream, accountability) |
~/.claude/agent-memory-local/ | Persistent memory for 9 memory-enabled agents |
~/.claude/state/ | State files (context-mode.sqlite, auto-dream.json, auto-dream.lock) |
~/.claude/settings.json | Global Claude Code settings |
~/.claude/mcp.json | MCP server configuration |
Project-level files (in your project, committed to git)
| Path | Contents |
|---|---|
CLAUDE.md | Project context for Claude Code (stack, agents, doc-mode) |
docs/spec.md | Narrative spec (Obsidian frontmatter + sections) |
docs/todo.md | Kanban board (Obsidian Kanban format) |
docs/design.md | Design source of truth (palette, typography, tokens, anti-patterns) |
docs/backlog/ | Faru doc-mode: one card per folder (CARD.md) |
docs/_memory/ | Cross-session knowledge vault (managed by Lovecraft) |
docs/audits/ | Archived audit reports |
.ulk-reports/ | Accountability trail, audit reports (gitignored) |
.ulk/managed-agents/ids.json | Managed Agent IDs (gitignored) |
Model and Effort Recommendations by Task Type
| Task type | Recommended model | Recommended effort |
|---|---|---|
| Full project audit (sargeras, ed209) | Opus | xhigh |
| Orchestration (bruce, blackemperor) | Opus | xhigh |
| Architecture decision (tony) | Opus | xhigh |
| Design system (stark, agamotto) | Opus | xhigh |
| Error fixing (robocop) | Opus | xhigh |
| Session checkpoint (2b3) | Sonnet | high |
| Task execution (task-runner) | Sonnet | high |
| Doc generation (shuri) | Sonnet | high |
| Deploy (deploy-vercel, etc.) | Sonnet | high |
| Frontend implementation (brique) | Sonnet | high |
| Quick diagnostic (godspeed) | Haiku | low |
| Context monitoring (gandalf) | Haiku | low |
| Mechanical reformatting | Sonnet | low |
| Most day-to-day prompts | Sonnet | medium |
| Heavy planning, trade-off analysis | Opus | xhigh |
Glossary
Agent
A markdown file in framework/agents/ with a YAML frontmatter that defines its role, model, tools, and invocation. When installed, it becomes a Claude Code slash command (/ulk:<name>). Agents have no code dependencies — they are dependency-free markdown files.
Skill
A reusable instruction set installed in ~/.claude/skills/. Skills extend Claude’s capabilities for a specific domain (Figma integration, Swift patterns, Obsidian formatting). They are invoked as slash commands and can be loaded by agents via the loads_skills: frontmatter field.
MCP (Model Context Protocol)
A standardized protocol for connecting Claude to external tools and data sources. MCP servers provide tools (read/write file systems, query databases, call APIs). In ulk, CLIs are preferred over MCPs when available (CLI = 0 tokens vs MCP tool call overhead).
Sub-agent
A Claude Code sub-session spawned by the main session to handle a specific task with a clean context. The sub-agent returns only its synthesis to the main session. Used to prevent context pollution during heavy explorations (reading many files, searching a large codebase).
Phase
A lifecycle stage in the development process. ulk defines 7 phases: define, plan, build, verify, review, ship, orchestrator. Each agent declares its phase in frontmatter. Bruce routes to agents based on the current project phase.
Context rot
Gradual degradation of response quality as the context accumulates irrelevant content — failed attempts, corrected approaches, transitional summaries, repeated information. The 5 context hygiene rules exist specifically to prevent context rot.
Faru
ulk’s default documentation mode since 2026-05-18. A kanban-native, agent-first doc format where each spec is a folder (docs/backlog/YYYY-MM-DD-TYPE-SLUG/) with a CARD.md. One card = one deliverable. The format is git-native and directly dispatched to Claude agents.
Managed Agent
A ulk agent that runs as an autonomous cloud session via the Anthropic Managed Agents API. Triggered by cron, webhook, or CLI. Runs without a local machine. 5 agents are currently ported: sargeras, ed209, lovecraft, 2b3, ci-guard.
Banner Mode
A high-scrutiny operating mode activated by Bruce on critical signals (security finding, scope creep, context >80%, audit warning). In Banner Mode, Bruce triple-checks every routing decision against three questions: why / risks / downstream impact.
Context Manifest
A frontmatter convention that lets agents declare their token budget, loaded files, loaded skills, and MCP usage. Bruce reads these declarations before routing to prevent context overflow. Key fields: context_budget, loads_files, loads_mcps, mcp_cap_strategy.
CLAUDE.md
The project-level instruction file read by Claude Code at session start. It contains the project context, stack, agent configuration, and doc-mode. Committed to git, it is the shared source of truth for team-wide AI behavior in a project.
Auto-Dream
A background memory consolidation cycle inspired by REM sleep. Runs when ≥24 hours have passed and ≥5 sessions have occurred since the last cycle. Merges duplicates, normalizes timestamps, archives obsolete entries, rebuilds the vault index. Write sandbox restricted to docs/_memory/**. Never touches code.
RTK
Rust Token Killer — a CLI proxy that compresses verbose command outputs by 60–90%. Invoked as rtk proxy <cmd>. Included in the base ulk installation.