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
- Search for
new MastraFactory, itsboardsandincludeDefaultBoardsoptions,defineBoard,configVersion, and the installedGithubIntegration,PlatformGithubIntegration,LinearIntegration, orPlatformLinearIntegrationconstructors and theirrulesoptions. - Read the existing rule configuration and its tests before editing.
- Import rule helpers and types from the same local Factory module used by the deployment.
- For custom-board handlers or phase semantics (
kind,role), edit the installeddefineBoard()definition. For tool-result rules, addtools: { <toolName>: { onResult } }to the installeddefineBoard()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.
