Documentation
¶
Overview ¶
Package prompt builds prompts for Smith (Claude Code) workers from bead metadata.
Prompts combine repo context (AGENTS.md), bead description, coding standards, and per-anvil overrides into a single instruction string for Claude.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadCustomTemplate ¶
LoadCustomTemplate reads a custom template file for an anvil. Returns empty string if the file doesn't exist.
Types ¶
type BeadContext ¶
type BeadContext struct {
// BeadID is the unique bead identifier.
BeadID string
// Title is the bead title.
Title string
// Description is the full bead description.
Description string
// IssueType is the bead type (bug, feature, task, etc.).
IssueType string
// Priority is the bead priority (0-4).
Priority int
// Parent is the parent bead ID (if any).
Parent string
// Branch is the git branch created for this work.
Branch string
// AnvilName is the name of the anvil (repo label).
AnvilName string
// AnvilPath is the path to the main repo.
AnvilPath string
// WorktreePath is the path to the worker's worktree.
WorktreePath string
// SchematicPlan is an optional implementation plan produced by the
// Schematic pre-worker. When non-empty it is included in the prompt.
SchematicPlan string
// Iteration is the current Smith-Warden cycle (1 = first attempt).
// On iteration 2+ the prompt includes prior feedback.
Iteration int
// PriorFeedback is pre-formatted feedback from the previous iteration
// (Warden review or Temper build/test failure). Set on iteration 2+.
PriorFeedback string
// PriorFeedbackSource describes where the feedback came from
// (e.g. "Warden review" or "build/test verification").
PriorFeedbackSource string
// PriorDiff is the git diff from the previous iteration's changes.
// Included in the prompt on iteration 2+ so Smith can see what it
// already implemented without re-exploring the codebase.
PriorDiff string
// CopilotCombinedMode, when true, appends a self-review checklist to
// the prompt so Smith reviews its own diff against Warden criteria.
CopilotCombinedMode bool
// WardenRules is a pre-formatted checklist of learned Warden rules.
// Injected into the self-review section when CopilotCombinedMode is true.
WardenRules string
}
BeadContext holds the information needed to build a Smith prompt.
Click to show internal directories.
Click to hide internal directories.