Skip to main content
Lead rules are a lightweight way to give your team lead a “house style” for how you want work done. When you create a team (or designate a lead), gg can load lead instructions from a lead.md file and use them as onboarding context for the lead.

What lead rules are (and aren’t)

  • They are: a markdown playbook for coordination (testing expectations, PR style, communication patterns, safety rules).
  • They aren’t: a security boundary. If you want to restrict commands, use Process Manager permissions.

Where lead rules live

gg supports two scopes:
  • Global (applies to all workspaces):
    • $HOME/.agents/gg/lead.md
  • Workspace (repo-specific):
    • <workspace>/.agents/gg/lead.md
Workspace rules let you capture repo-specific conventions without polluting your global defaults.

What to include

Good lead instructions usually cover:
  • “What does success look like?” (definition of done)
  • Testing / checks you expect before declaring completion
  • How to handle tool approvals (ask before running installs, etc.)
  • Coding conventions (formatting, naming, commit style)
  • How to communicate (short updates, when to broadcast vs DM)
  • Escalation rules (when to ask a human)

Editing lead rules

You can edit lead rules either:
  • in-app (Preferences / Rules), or
  • directly in the lead.md file on disk.