Documentation
¶
Overview ¶
Package schematic implements the pre-worker that analyses bead scope before Smith starts. The schematic is drawn before the smith starts forging.
Schematic can:
- Emit a focused implementation plan appended to Smith's prompt
- Decompose large beads into sub-beads via bd, blocking the parent
- Skip entirely for small/simple beads
- Request human clarification for ambiguous beads and block work until clarified
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Action ¶
type Action string
Action describes what the Schematic decided to do.
const ( // ActionPlan means the bead is implementable as-is; a focused plan was // produced to guide Smith. ActionPlan Action = "plan" // ActionDecompose means the bead was too large or multi-part and has been // split into sub-beads. The parent bead should be blocked. ActionDecompose Action = "decompose" // ActionSkip means the bead was simple enough that no schematic was needed. ActionSkip Action = "skip" // ActionClarify means the bead requires human clarification and should not // be worked on yet. ActionClarify Action = "clarify" )
type Config ¶
type Config struct {
// Enabled controls whether Schematic runs at all. Defaults to true when
// the global setting is enabled.
Enabled bool
// WordThreshold is the minimum word count in the bead description to
// trigger automatic schematic analysis. Beads below this are skipped
// unless they have the decompose tag. Default: 100.
WordThreshold int
// MaxTurns limits the AI session length. Default: 10.
MaxTurns int
// ExtraFlags are additional CLI flags forwarded to the Claude session
// (e.g. model selection, auth tokens). Mirrors pipeline.Params.ExtraFlags.
ExtraFlags []string
}
Config controls Schematic behavior.
func DefaultConfig ¶
func DefaultConfig() Config
DefaultConfig returns sensible defaults for Schematic.
type Result ¶
type Result struct {
// Action is what the Schematic decided.
Action Action
// Plan is a focused implementation plan for Smith (only when Action=ActionPlan).
Plan string
// SubBeads is the list of sub-beads created (only when Action=ActionDecompose).
SubBeads []SubBead
// Reason is a human-readable explanation of the decision.
Reason string
// Duration is how long the analysis took.
Duration time.Duration
// CostUSD is the estimated cost of the AI session.
CostUSD float64
// Quota holds rate-limit quota data from the AI session, if available.
Quota *provider.Quota
// Error is set if the schematic failed.
Error error
}
Result captures the outcome of a Schematic analysis.
Click to show internal directories.
Click to hide internal directories.