Context Profiles
Different roles need different context. Profiles scope which docs, rules, and context an agent loads — without changing shared pins.
Profile inheritance
Profiles can extend a base so shared rules are written once:
yaml
# .chub/profiles/base.yaml
name: Base
description: "Shared rules for all roles"
rules:
- "Follow coding conventions in .chub/context/conventions.md"
- "Run tests before committing"
context:
- conventions.md
- architecture.mdyaml
# .chub/profiles/backend.yaml
name: Backend Developer
extends: base # inherits base rules and context
description: "Context for backend/API development"
pins:
- openai/chat
- stripe/api
context:
- api-conventions.md
rules:
- "Use Zod for all request validation"Commands
sh
chub profile use backend # Activate profile
chub profile use none # Clear active profile
chub profile list # Show available profilesMonorepo auto-profile
In .chub/config.yaml, set auto_profile to automatically switch profiles based on file paths:
yaml
auto_profile:
- path: "packages/api/**"
profile: backend
- path: "packages/web/**"
profile: frontendWhen an agent opens a file in packages/api/, the backend profile is loaded automatically.
MCP integration
Start the MCP server with a profile:
sh
chub mcp --profile backendAgents get focused, relevant context instead of the full registry.