Documentation Index
Fetch the complete documentation index at: https://smithers.sh/llms.txt
Use this file to discover all available pages before exploring further.
// Props
import { DecisionTable } from "smithers-orchestrator";
type DecisionTableProps = {
id?: string;
rules: DecisionRule[];
default?: ReactElement; // rendered when no rule matches
strategy?: "first-match" | "all-match"; // default "first-match"
skipIf?: boolean;
};
type DecisionRule = {
when: boolean; // evaluated at render time
then: ReactElement;
label?: string;
};
<DecisionTable
rules={[
{
when: triage.severity === "critical",
then: (
<Task id="page-oncall" output={outputs.page} agent={pagerAgent}>
Page the on-call engineer immediately.
</Task>
),
},
{
when: triage.severity === "high",
then: <Task id="assign-senior" output={outputs.assign}>{{ assignee: "senior-pool" }}</Task>,
},
]}
default={<Task id="default-assign" output={outputs.assign}>{{ assignee: "general-pool" }}</Task>}
/>
Notes
first-match builds nested Branches; order matters.
all-match wraps every matching rule in a Parallel; no ordering guarantee.