Rules
Rules tell an agent how to behave. They are stored like memory but with a
dedicated rule knowledge type, scoped either globally or to a codebase.
- global rules govern the entire development cycle.
- project rules apply only to the current codebase.
Commands
Section titled “Commands”raph rules add "Always run go test before commit" --scope projectraph rules add "Prefer table-driven tests" --scope globalraph rules list --all # both global and project rulesraph rules list --scope globalraph rules rm <node_id>An agent should read rules at the start of a task — --all makes the
distinction between whole-cycle and repo-specific rules explicit.
Over MCP, the equivalent tools are store_rule and list_rules, each taking a
scope of global or project.