}
/**
- *
- * @param result
- * @param round
+ * @param result - The round execution result.
+ * @param round - 1-indexed round number.
+ * @returns A snapshot for the round history.
*/
function buildRoundSnapshot (result: RoundResult, round: number): RoundSnapshot {
return {
import { runValidation } from '../../validation.js'
/**
- *
- * @param spec
+ * @param spec - Task specification with optional plan metadata.
+ * @returns Formatted plan context string for the actor prompt, or empty if no context.
*/
function buildPlanContext (spec: TaskSpec): string {
const parts: string[] = []
const VALID_ISSUE_TYPES = new Set(['bug-fix', 'feature', 'refactor'])
/**
- *
- * @param value
+ * @param value - Value to check.
+ * @returns Whether value is a valid confidence level.
*/
function isValidConfidence (value: unknown): value is 'high' | 'low' | 'medium' {
return typeof value === 'string' && VALID_CONFIDENCE.has(value)
}
/**
- *
- * @param value
+ * @param value - Value to check.
+ * @returns Whether value is a valid issue type.
*/
function isValidIssueType (value: unknown): value is 'bug-fix' | 'feature' | 'refactor' {
return typeof value === 'string' && VALID_ISSUE_TYPES.has(value)