Skip to content

new_feature.agent

new_feature.agent

Build and launch coding-agent prompts for feature worktrees.

AgentLaunchOptions dataclass

Capture optional command-line agent and prompt selection.

agent_required_error(*, prompt_requested: bool) -> NewFeatureError

Explain how to select an agent when a launch was requested without one.

build_initial_prompt(name: str) -> str

Return the implementation prompt for a newly created feature.

build_setup_prompt() -> str

Return the repository-configuration prompt for a coding agent.

resolve_prompt(default: str, configured: str | None, override: str | None) -> str

Select an explicit prompt override, configured prompt, or default prompt.

resolve_agent(config: ProjectConfig, override: str | None) -> AgentCommand | None

Resolve an optional named or shell-form agent selection into a command.

launch_interactive_agent(agent: AgentCommand, worktree: Path, env: dict[str, str], prompt: str) -> int

Launch an agent in a worktree with its allocated environment and prompt.