Drover Code now supports a robust Custom Commands system, enabling users to create reusable, context-aware command templates (/implement, /review, /deploy, etc.). This feature brings high usability and agentic orchestration capabilities natively to the Go runtime, operating headlessly or via the TUI.
Custom commands are loaded in the following order of precedence (highest to lowest):
- Project Local:
.drover/commands/*.md - Global:
~/.drover/commands/*.md - Configuration:
Settings.Commands(JSON configuration fallback)
Commands defined in Markdown files utilize a flat YAML frontmatter syntax combined with the template content body.
---
name: security-audit
description: Runs a thorough security audit on the current workspace.
agent: security-specialist
model: claude-haiku-4-5-20251001
risk_tier: 3
subtask: true
---
Perform a security audit using the following requirements:
@security-policy.md
Focus on the components specified here: $1The TemplateExpander evaluates command templates prior to invoking the core agentic loop:
- Positional Arguments:
$1,$2, etc. - Bulk Arguments:
$ARGUMENTS(expands to all remaining unparsed arguments) - Placeholders:
{var}or{var|default} - File Inclusion:
@filename.txt(reads relative to workspace) - Shell Commands:
!`shell_command`(executes locally, 30s timeout)
To maintain Drover's Layer 6 Governance standards, all custom commands are evaluated by Drover Guard before expansion and execution.
- A REST API client (
pkg/guardclient) passes theTenantID,AgentID,RiskTier, andActioncontext to the Guard policy engine. - If Guard denies the request, execution is blocked immediately and the prompt returns an error.
- Decoupling this layer ensures minimal footprint for
drover-codewhile still enforcing strong enterprise safety rails.