Skip to content

Consider TTY detection for non-interactive mode in support file confirmation #175

@markcallen

Description

@markcallen

Context

When --force is used and a support file (AGENTS.md, CLAUDE.md, GEMINI.md) already exists, Ballast prompts the user for confirmation before overwriting. In non-interactive mode (CI env vars or --yes flag), it aborts instead of prompting.

The PRD states that 'non-interactive' includes non-TTY stdin, but the current implementations only detect:

  • CI environment variables (e.g. CI=true)
  • The --yes flag

Question

Should we also detect when stdin is not a TTY (i.e. !isatty(stdin)) and treat that as non-interactive?

Trade-offs

  • Pro: More correct — piped/redirected stdin is genuinely non-interactive
  • Con: TTY detection is platform-specific and fragile; some CI environments allocate a pseudo-TTY

Related

Raised during Copilot review of PR #172.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions