Skills

Configure Factory Rules

Configure board-owned lifecycle, policy, phase-semantics, and tool-result rules, plus...

Install

npx skills add mastra-ai/mastra --skill configure-factory-rules -g -a claude-code -y
Repository
mastra-ai/mastra29.3k
Category
Engineering
Updated
3d ago
License
See repository
Context cost
Mediumabout 3,000 tokens
Runs scripts
No, instructions only

What it does

Configure board-owned lifecycle, policy, phase-semantics, and tool-result rules, plus integration event rules

Configure Factory Rules

Help the user change Factory policy in the typed deployment configuration. Factory rules are trusted server code. Never place deployment policy in this skill, repository instructions, browser code, or a parallel actions system.

Find the configuration

  1. Search for new MastraFactory, its boards and includeDefaultBoards options, defineBoard, configVersion, and the installed GithubIntegration, PlatformGithubIntegration, LinearIntegration, or PlatformLinearIntegration constructors and their rules options.
  2. Read the existing rule configuration and its tests before editing.
  3. Import rule helpers and types from the same local Factory module used by the deployment.
  4. For custom-board handlers or phase semantics (kind, role), edit the installed defineBoard() definition. For tool-result rules, add tools: { <toolName>: { onResult } } to the installed defineBoard() definition of the board whose seat produces the result. For GitHub or Linear rules, configure the installed integration constructor directly.

Do not guess a file path. Factory deployments can assemble MastraFactory from different entry points.

Preserve the public shape

Installed board definitions exclusively own lifecycle handlers: use phases.<phase>.onEnter.<source> and phases.<phase>.onExit.<source> in defineBoard(). Sources are issue, pullRequest, linearIssue, and manual. Work and Review install automatically with preferred defaults. Custom boards are installed through boards; includeDefaultBoards: false supports custom-only installations.

Read the whole SKILL.md on GitHub

More in Engineering