npx claudepluginhub fortunto2/solo-factory --plugin soloThis skill is limited to using the following tools:
Design and implement Schema-Guided Reasoning (SGR) pipelines. Translate domain expert mental checklists into structured reasoning schemas for LLMs.
Generates design tokens/docs from CSS/Tailwind/styled-components codebases, audits visual consistency across 10 dimensions, detects AI slop in UI.
Records polished WebM UI demo videos of web apps using Playwright with cursor overlay, natural pacing, and three-phase scripting. Activates for demo, walkthrough, screen recording, or tutorial requests.
Delivers idiomatic Kotlin patterns for null safety, immutability, sealed classes, coroutines, Flows, extensions, DSL builders, and Gradle DSL. Use when writing, reviewing, refactoring, or designing Kotlin code.
Design and implement Schema-Guided Reasoning (SGR) pipelines. Translate domain expert mental checklists into structured reasoning schemas for LLMs.
Source: Rinat Abdullin — Schema-Guided Reasoning
SGR = guide LLM reasoning through predefined steps via constrained decoding. Instead of free-form text → enforce a schema that defines what steps, in which order, where to focus attention.
Domain expert mental checklist → Pydantic/Zod schema → Constrained decoding → Deterministic dispatch
Parse task from $ARGUMENTS:
Identify the reasoning cascade — interview the domain:
This is the critical step. SGR quality = how well you translate the expert's mental checklist.
Design the schema following SGR patterns:
class NextStep(BaseModel):
current_state: str # thinking space
plan_remaining_steps: list[str] # 1-5 steps, only first used
task_completed: bool # routing gate
function: Union[Tool1, Tool2, ..., ReportCompletion] = Field(
..., description="execute first remaining step"
)
class Analysis(BaseModel):
preliminary: str # initial assessment
classification: Literal["a", "b", "c"] # force categorization
evidence: list[str] # cite sources
gaps: list[GapItem] # structured findings
verdict: Literal["pass", "partial", "fail"] # final decision
reasoning_for_verdict: str # explain after deciding
class SendEmail(BaseModel):
tool: Literal["send_email"] # discriminator
recipient: str
subject: str
body: str
class SearchDB(BaseModel):
tool: Literal["search_db"]
query: str
# Union with Literal discriminator = deterministic routing
Action = Union[SendEmail, SearchDB, ReportDone]
Apply SGR design rules (from references/sgr-rules.md):
Literal["pass", "fail"] not strAnnotated[list[str], MinLen(1), MaxLen(5)]tool: Literal["name"] for routingreasoning_for_X AFTER the enum field, not beforeAnnotated[int, Le(50)] — bake constraints into typesImplement the dispatch loop (if agent):
for i in range(MAX_STEPS):
response = client.beta.chat.completions.parse(
model=MODEL,
response_format=NextStep,
messages=log,
)
job = response.choices[0].message.parsed
if isinstance(job.function, ReportCompletion):
break # done
result = dispatch(job.function) # deterministic routing
log.append(assistant_message(job))
log.append(tool_result(result))
Add to project:
schemas/ or models/ directorydispatch.py or equivalentAudit mode (if $ARGUMENTS = "audit"):
## SGR Pipeline: {domain}
**Pattern:** {NextStep | Analysis Cascade | Tool Dispatch}
**Schemas:** {N} models
**Tools:** {N} (if agent loop)
### Reasoning Cascade
{step 1} → {step 2} → ... → {decision/action}
### Files
- schemas/{name}.py — {N} models
- dispatch.py — tool routing
- tests/test_{name}.py — validation tests
references/sgr-rules.md — design rules and anti-patternsreferences/sgr-demo.py — complete working example (Abdullin's CRM demo, 304 lines Python)references/sgr-patterns.md — cascade patterns for 6 domainsreferences/sgr-full-guide.md — full SGR guide with theory, code, tool calling internalsIn Rust, SGR is even stronger: #[serde(tag = "tool")] gives discriminated union dispatch at zero runtime cost. Enum variants = tools, serde deserialization = constrained decoding.
references/sgr-demo.py — minimal standalone example (304 lines, CRM agent)Cause: Tried to put everything in one model. Fix: Split into analysis model + action model. Cascade, don't flatten.
Cause: Model not supporting constrained decoding, or wrong API.
Fix: Use response_format=Schema (OpenAI), tools with schema (Anthropic). Check references/sgr-rules.md for provider-specific notes.
Cause: No task_completed gate or ReportCompletion tool.
Fix: Always include a completion signal in the Union. Cap loop iterations.