원클릭으로
designing-mas-plugins
Design evaluation plugins following 12-Factor + MAESTRO principles
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Design evaluation plugins following 12-Factor + MAESTRO principles
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Compacts verbose context into structured summary. Use after pollution sources (searches, logs, JSON) or at phase milestones.
Create a pull request from the current branch. Analyzes commits, generates title+body from PR template, pauses for approval, then pushes and creates PR. Use after committing changes.
Designs concise, streamlined backend systems matching exact task requirements. Use when planning APIs, data models, system architecture, or when the user requests backend design work.
Audits and aligns project documentation against authority chains (project docs and Claude Code infrastructure). Detects broken references, duplicates, scope creep, and chain breaks. Use when reviewing documentation health, fixing stale references, or enforcing single-source-of-truth.
Interactive Q&A to build UserStory.md from user input. Use when the user wants to create a user story document or start the assisted workflow.
Generates prd.json task tracking file from PRD.md requirements document. Use when initializing Ralph loop or when the user asks to convert PRD to JSON format for autonomous execution.
| name | designing-mas-plugins |
| description | Design evaluation plugins following 12-Factor + MAESTRO principles |
| compatibility | Designed for Claude Code |
| metadata | {"argument-hint":["component-name"],"allowed-tools":"Read, Grep, Glob, WebSearch, WebFetch"} |
Target: $ARGUMENTS
Trigger this skill when:
MUST READ:
docs/archive/best-practices/mas-design-principles.md
Each plugin is a pure function:
evaluate(context: BaseModel) -> BaseModel
def evaluate(self, context: TierContext) -> TierResult:
# Pure function - no side effects, no shared state
# All inputs from context parameter
# All outputs in return value
return TierResult(...)
Plugin manages its own context - no global state access.
def get_context_for_next_tier(
self, result: TierResult
) -> NextTierContext:
# Explicit context passing
# Next tier only sees what this method returns
return NextTierContext(
relevant_data=result.extract_relevant(),
)
All data uses validated models - no raw dicts.
class TierResult(BaseModel):
score: float = Field(ge=0.0, le=1.0)
reasoning: str
metrics: dict[str, float]
Plugin handles its own errors and timeouts.
def evaluate(self, context: TierContext) -> TierResult:
try:
result = self._compute(context)
return TierResult(score=result, error=None)
except Exception as e:
# Return structured error, don't raise
return TierResult(score=0.0, error=str(e))
Errors produce structured partial results, not exceptions.
One metric or tier per plugin.
Before implementing a plugin, verify:
evaluate() parameterself.cache = {} (breaks stateless)return {"score": 0.5} (use models)raise ValueError() (return error)config.get_global() (use settings)from abc import ABC, abstractmethod
from pydantic import BaseModel, Field
class PluginContext(BaseModel):
"""Input context from previous tier."""
data: str
metadata: dict[str, str]
class PluginResult(BaseModel):
"""Structured output."""
score: float = Field(ge=0.0, le=1.0)
reasoning: str
error: str | None = None
class EvaluatorPlugin(ABC):
@property
@abstractmethod
def name(self) -> str: ...
@property
@abstractmethod
def tier(self) -> int: ...
@abstractmethod
def evaluate(
self, context: PluginContext
) -> PluginResult: ...
@abstractmethod
def get_context_for_next_tier(
self, result: PluginResult
) -> BaseModel: ...
class MyPlugin(EvaluatorPlugin):
def __init__(self, settings):
self.settings = settings
@property
def name(self) -> str:
return "my_evaluator"
@property
def tier(self) -> int:
return 1
def evaluate(
self, context: PluginContext
) -> PluginResult:
try:
score = self._compute(context)
return PluginResult(
score=score, reasoning="...",
)
except Exception as e:
return PluginResult(
score=0.0, reasoning="", error=str(e),
)
def get_context_for_next_tier(
self, result: PluginResult
) -> BaseModel:
return NextTierContext(score=result.score)
def _compute(self, context: PluginContext) -> float:
...
Test plugins in isolation with mocked context:
def test_plugin_happy_path():
plugin = MyPlugin(settings)
context = PluginContext(data="test", metadata={})
result = plugin.evaluate(context)
assert result.score >= 0.0
assert result.error is None
def test_plugin_error_handling():
plugin = MyPlugin(settings)
context = PluginContext(data="bad", metadata={})
result = plugin.evaluate(context)
# Structured error, not exception
assert result.error is not None