Skip to content
Docs menu

Tool reference · Errors, rules & self-improvement

rule_set_phase

Tags a rule with one task phase so it is only loaded during that phase, or clears the tag so it applies to every phase.

local stdio server writes idempotent

When to use

  • A rule only matters while building or planning and clutters other phases.
  • You want to cut how many rules self_rules_context returns per phase.
  • A phase-specific rule should become a general rule again (phase: null).

Parameters

NameTypeDefaultDescription
rule_idrequired integer — —
phase "van" | "plan" | "creative" | "build" | "reflect" | "archive" | null — Phase name or null to clear.

Example

Arguments

{
  "rule_id": 19,
  "phase": "build"
}

Result shape

{
  "rule_id": 19,
  "phase": "build",
  "updated": true
}

Values are illustrative; the keys follow the server's handler. MCP clients receive the result as JSON text content.

Server description

The description the server sends to your agent in tools/list, captured from the v14.7.0 source:

Attach or remove a phase scope on a rule (v8.0 lazy rule loading). Tag-based: manages 'phase:<X>' on the rule's tags. phase=null clears the phase tag (rule becomes core — applies to every phase). Valid phases: van, plan, creative, build, reflect, archive.

Found a mistake? Open an issue on GitHub.

Search