# =============================================================================
# TAKT UI Labels — English
# =============================================================================
# User-facing display strings (not AI prompts).
# Template variables use {variableName} syntax.
# =============================================================================

# ===== Interactive Mode UI =====
interactive:
  sourceContextLabel: "Source Context"
  userCommentLabel: "User Comment"
  conversationLabel: "Conversation:"
  noTranscript: "(No local transcript. Summarize the current session context.)"
  formalSpecPrompt: "Enable formal specification mode (Alloy, Quint)? Change the mode default with assistant.formal_spec.mode (or the legacy scalar assistant.formal_spec)."
  ui:
    intro: "Interactive mode - describe your task. When ready, use /go to create the instruction and run it, or /tell to send an additional instruction to a running task."
    introGrillMe: "Grill Me mode - clarify requirements one question at a time with a recommended option. When ready, use /go to create and run the instruction, or /tell to send an additional instruction to a running task."
    introWithoutTell: "Interactive mode - describe your task. When ready, use /go to create the instruction and run it."
    introGrillMeWithoutTell: "Grill Me mode - clarify requirements one question at a time with a recommended option. When ready, use /go to create and run the instruction."
    resume: "Resuming previous session"
    noConversation: "No conversation yet. Please describe your task first."
    thinking: "Assistant is thinking..."
    creatingInstruction: "Creating instruction..."
    summarizeFailed: "Failed to summarize conversation. Please try again."
    continuePrompt: "Okay, continue describing your task."
    proposed: "Proposed task instruction:"
    actionPrompt: "What would you like to do?"
    actions:
      execute: "Execute now"
      createIssue: "Create Issue"
      saveTask: "Save as Task"
      continue: "Continue editing"
    cancelled: "Cancelled"
    acceptNoAssistant: "No assistant response found. Please describe your task first."
    retryNoOrder: "No previous order (order.md) found. /retry is only available during retry."
    retryUnavailable: "/retry is only available in Retry mode from `takt list`."
    pasteImageUnavailable: "/paste-image is only available for image attachment during interactive input."
    verifyUnavailable: "/verify is only available in formal specification mode."
    personaFallback: "No persona available for the first step. Falling back to assistant mode."
  modeSelection:
    prompt: "Select interactive mode:"
    assistant: "Assistant"
    assistantDescription: "Ask clarifying questions before generating instructions"
    grill-me: "Grill Me"
    grill-meDescription: "Resolve requirements one recommended question at a time"
    persona: "Persona"
    personaDescription: "Converse as the first agent's persona"
  providerSelection:
    prompt: "Select provider:"
  runSelector:
    confirm: "Reference a previous run's results?"
    prompt: "Select a run to reference:"
    noRuns: "No previous runs found."
  continueNoSession: "No previous assistant session found. Starting a new session."
  mcpUnavailable: "Task-state lookup is unavailable for provider {provider}; the conversation will continue without it. Reason: {error}"
  resumeSessionLoaded: "Session loaded. Subsequent AI calls will use this session."
  sessionSelector:
    prompt: "Resume from a recent session?"
    newSession: "New session"
    newSessionDescription: "Start a fresh conversation"
    noSessions: "No resumable sessions were found. Starting a new session."
    lastResponse: "Last: {response}"
    messages: "{count} messages"
  previousTask:
    success: "✅ Previous task completed successfully"
    error: "❌ Previous task failed: {error}"
    userStopped: "⚠️ Previous task was interrupted by user"
    workflow: "Workflow: {workflowName}"
    timestamp: "Executed: {timestamp}"
  commands:
    accept: "Accept latest assistant response"
    go: "Create instruction & run"
    tell: "Send an additional instruction to a running task"
    retry: "Review & rerun with previous instructions"
    replay: "Rerun immediately with previous instructions"
    cancel: "Exit interactive mode"
    open: "Open the running task directory"
    resume: "Load a previous session"
    pasteImage: "Attach clipboard image"
    setup: "Configure exec agents"
    workflow: "Switch workflow"
    mode: "Switch interactive mode"
    provider: "Switch provider"
    model: "Use a model for this conversation"
    effort: "Use reasoning effort for this conversation"
    verify: "Verify the current formal specification"

# ===== Workflow Maker =====
workflowMaker:
  basePrompt: "Select a Workflow Maker base:"
  workflowPrompt: "Select a workflow:"
  namePrompt: "Workflow name"
  sources:
    new: "New workflow"
    project: "Project workflows"
    user: "Global workflows"
    builtin: "Builtin workflows"
    repertoire: "Repertoire workflows"
  intro: "Workflow Maker - describe the workflow you want. Use /workflow to change the base, /go to prepare it, or /cancel to exit."
  proposed: "Proposed Workflow Maker instruction:"
  plannedPath: "Planned artifact path: {path}"
  actionPrompt: "What would you like to do?"
  actions:
    execute: "Execute"
    continue: "Continue editing"
  continuePrompt: "Continue editing the Workflow Maker request."
  noWorkflows: "No workflows are available from that source."
  baseChanged: "Workflow Maker base changed to {name}."
  wait: "Please wait until the workflow completes…"
  completed: "Workflow Maker completed. Artifact: {path}. Doctor report: {report}"
  completedWithoutReport: "Workflow Maker completed. Artifact: {path}."
  failed: "Workflow Maker failed. Artifact preserved at {path}. Reason: {reason}. Doctor report: {report}"
  failedWithoutReport: "Workflow Maker failed. Artifact preserved at {path}. Reason: {reason}."
  planningFailed: "Workflow Maker could not prepare the artifact: {reason}"
  ttyRequired: "Workflow Maker requires an interactive terminal (TTY)."

# ===== Exec Mode UI =====
exec:
  common:
    add: "Add"
    back: "Back"
    builtin: "Builtin"
    cancel: "Cancel"
    currentSuffix: "(current)"
    default: "Default"
    delete: "Delete"
    discard: "Discard"
    global: "Global"
    none: "none"
    project: "Project"
    providerDefault: "provider default"
    save: "Save"
    user: "User"
  scope:
    projectDescription: ".takt/facets"
    globalDescription: "~/.takt/facets"
  setup:
    teamConfiguration: "Exec agents"
    assistantSummary: "Assistant agent: {summary}"
    workersSummary: "Worker agents: {count}"
    reviewsSummary: "Review agents: {count}"
    replanSummary: "Replanning agent: {instruction}"
    loopSummary: "Loop detection: {small}/{large}/{max}"
    preset: "Preset"
  actors:
    workers: "Worker agents"
    reviews: "Review agents"
    mustContainOne: "{label} must contain at least one entry."
    deletePrompt: "Delete {label}"
    invalidIndex: "Invalid {label} index: {index}"
  settings:
    assistant: "Assistant agent settings"
    actor: "{name} settings"
    provider: "Provider"
    model: "Model"
    effort: "Effort"
    name: "Name"
    instruction: "Instruction"
    knowledge: "Knowledge"
    policy: "Policy"
    customModel: "Custom input..."
    customModelPrompt: "Custom model"
    customModelRequired: "Custom model must be a non-empty string."
    defaultModel: "Default ({value})"
    defaultEffort: "Default (none)"
  fields:
    provider: "Provider: {value}"
    model: "Model: {value}"
    effort: "Effort: {value}"
    name: "Name: {value}"
    instruction: "Instruction: {value}"
    knowledge: "Knowledge: {value}"
    policy: "Policy: {value}"
    smallLoopThreshold: "Small loop detection threshold: {value}"
    largeLoopThreshold: "Large loop detection threshold: {value}"
    maxSteps: "Max steps: {value}"
    actorInstruction: "instruction: {value}"
  replan:
    settings: "Replanning agent settings"
  loop:
    settings: "Loop detection settings"
    smallThresholdPrompt: "Small loop detection threshold"
    largeThresholdPrompt: "Large loop detection threshold"
    maxStepsPrompt: "Max steps"
  preset:
    menu: "Preset"
    load: "Load preset"
    saveCurrent: "Save current preset"
    delete: "Delete preset"
    saveScope: "Preset save scope"
    deleteScope: "Preset delete scope"
    loadSource: "Preset load source"
    defaultDescription: "Default exec configuration"
    builtinDescription: "builtins/exec/presets"
    projectDescription: ".takt/exec/presets"
    globalDescription: "~/.takt/exec/presets"
    loadFromSource: "Load {source} preset"
    deleteFromSource: "Delete {source} preset"
    namePrompt: "Preset name"
    descriptionPrompt: "Preset description"
    descriptionDefault: "Custom exec preset"
    saved: "Saved {scope} exec preset: {name}"
    deleted: "Deleted {scope} exec preset: {name}"
    exportAsWorkflow: "Export preset as workflow"
    exportNamePrompt: "Workflow name"
    exported: "Exported workflow: {name}"
  facets:
    instructions: "instructions"
    knowledge: "knowledge"
    policies: "policies"
    selectPrompt: "Select {kind} facet"
    multiSelectPrompt: "Select {kind} facets"
    multiSelectInstructions: "↑↓ to move, Space to toggle, Enter to confirm"
    listPrompt: "{kind} facets"
    saveScope: "Facet save scope"
    editedSaveScope: "Edited facet save scope"
    saveGenerated: "Save generated facet?"
    generated: "Generated {kind} facet \"{name}\":"
    created: "Created {scope} {kind} facet: {name}"
    consultationPrompt: "Describe the {kind} facet changes for {name}: "
    namePrompt: "Facet name"
    instructionMenu: "Instruction facet"
    selectExisting: "Select existing ({current})"
    editWithAI: "Edit with AI"
    createWithAI: "Create with AI"
    createWithEditor: "Create with editor"
    openInEditor: "Open in editor"
    restoreDefault: "Restore default ({defaultRef})"
    toggleExisting: "Toggle existing"
    clearAll: "Clear all"

# ===== Workflow Execution UI =====
workflow:
  unconsumedLiveInstructions: "There are {count} unconsumed additional instructions"
  teamLeader:
    decomposeWait: "Team leader is decomposing tasks. This may take some time..."
    feedbackWait: "Team leader is reviewing results and planning next tasks..."
  iterationLimit:
    maxReached: "Reached max iterations ({currentIteration}/{maxSteps})"
    currentStep: "Current step: {currentStep}"
    continueQuestion: "Continue?"
    continueLabel: "Continue (enter additional iterations)"
    continueDescription: "Increase the limit by the entered count"
    stopLabel: "Stop"
    inputPrompt: "Enter additional iterations (>= 1)"
    invalidInput: "Please enter an integer of 1 or greater."
    userInputPrompt: "Enter additional instructions (empty to cancel)"
  notifyComplete: "Workflow complete ({iteration} iterations)"
  notifyAbort: "Aborted: {reason}"
  notifyFailed: "Failed: {reason}"
  sigintGraceful: "Ctrl+C: Aborting workflow..."
  sigintTimeout: "Graceful shutdown timed out after {timeoutMs}ms"
  sigintForce: "Ctrl+C: Force exit"

# ===== Instruct Mode UI (takt list -> instruct) =====
instruct:
  ui:
    intro: "Instruct mode - describe additional instructions. Commands: /go (create instruction & run), /replay (resubmit previous order), /cancel (exit)"
    resume: "Resuming previous session"
    noConversation: "No conversation yet. Please describe your instructions first."
    summarizeFailed: "Failed to create instruction. Please try again."
    continuePrompt: "Okay, continue describing your instructions."
    proposed: "Proposed additional instructions:"
    actionPrompt: "What would you like to do?"
    actions:
      execute: "Execute now"
      saveTask: "Save as Task"
      continue: "Continue editing"
    cancelled: "Cancelled"
    replayNoOrder: "Previous order (order.md) not found"

# ===== Retry Mode UI (takt list -> retry) =====
retry:
  ui:
    intro: "Retry mode - enter additional instructions. Use /go to review the update, then queue it or continue editing. Use /cancel to exit."
    resume: "Resuming previous session"
    noConversation: "No conversation yet. Please enter additional instructions first."
    summarizeFailed: "Failed to create the instruction. Please try again."
    continuePrompt: "Continue entering additional instructions."
    proposed: "Updated task instruction:"
    actionPrompt: "What would you like to do?"
    actions:
      saveTask: "Save as Task"
      continue: "Continue editing"
    cancelled: "Cancelled"
  usePreviousWorkflowConfirm: "Use previous workflow \"{workflow}\"?"

orderRevision:
  attachmentsHeading: "Attachments"
  ui:
    proposed: "Proposed new order.md:"
    actionPrompt: "Replace the current order with this instruction?"
    actions:
      approve: "Yes (save and run)"
      reject: "No (return to conversation)"

run:
  notifyComplete: "Run complete ({total} tasks)"
  notifyAbort: "Run finished with errors ({failed})"

# ===== Issue Creation UI =====
issue:
  labelSelection:
    prompt: "Label:"
    none: "None"
    custom: "Custom input"
    customPrompt: "Enter label name"
  createdFromIssueComment: "Created an execution Issue: #{issueNumber}{issueUrl}"
  sourceIssueCommentFailed: "Failed to post the execution Issue link on source Issue #{sourceIssueNumber}: {error}"

# ===== Ink TUI =====
tui:
  ui:
    thinking: "Thinking..."
    hint: "Enter: send  Shift+Enter: newline  Tab: complete  ↑↓: move/history  Ctrl+C: cancel"
    placeholder: "Type a task, / for commands"
    queuedHint: "↑ to edit the queued line"
    queuedMore: "+{count} more queued"
    interruptHint: "(Esc to interrupt)"
    responseInterrupted: "Response interrupted."
    instructionInterrupted: "Instruction generation interrupted."
    runFinished: "The workflow run finished. Describe the next task, or /cancel to leave."
    taskSaved: "The task was saved. Describe the next task, or /cancel to leave."
    issueCreated: "The issue was created. Describe the next task, or /cancel to leave."
    promptHint: "Enter: confirm  Esc: cancel"
    promptKeepHint: "Enter: confirm  empty Enter: keep the current value  Esc: cancel"
    promptPlaceholder: "Type your answer"
    model: "Model: {value}"
  errors:
    requiresTty: "--tui requires an interactive terminal. Run takt from a TTY or drop --tui."
    exitedEarly: "The TUI exited before the task conversation finished."
    providerNotConfigured: "No provider is configured. Set one in ~/.takt/config.yaml or pass --provider."
    workflowNotFound: "Workflow not found: {workflow}"
    messageRequired: "Type a message first."
    taskTextRequired: "Task text is required."
    emptyAiResponse: "The assistant returned no response."
    noConversation: "No conversation yet. Describe your task first."
    instructionFailed: "Failed to create the task instruction."
    conversationRebuildFailed: "Failed to switch conversation settings: {error}"
    unsupportedCommand: "That command is not available in the TUI."
    settingNoArguments: "{command} does not accept an argument."
    tellInstructionRequired: "Describe the additional instruction before using /tell."
    tellGenerationFailed: "The additional instruction could not be generated: {error}"
    tellRequiresTty: "The additional instruction was not sent: /tell requires an interactive terminal."
    tellNoCandidates: "No running worktree-clone task can receive an additional instruction."
    tellExcluded: "Running tasks excluded from /tell:\n{tasks}"
    tellCancelled: "Additional instruction was not sent."
    tellStale: "The additional instruction was not sent: {error}"
    settingValueRequired: "{command} requires a value."
    imagePasteFailed: "The image could not be pasted."
  tell:
    selectPrompt: "Select the running task to tell:"
    confirm: "Send this additional instruction?\nTask: {task}\nSummary: {summary}\nWorkflow: {workflow}\nCurrent step: {step}\nRun slug: {runSlug}\nInstruction:\n{content}"
    sent: "Additional instruction sent to {task} (instruction #{instructionId})."
