# CLI-038: print-mode stdin+positional test

## Status: done

## Objective

Add unit tests to verify stdin+positional combined prompt behavior in print-mode.ts,
and add/verify E2E spawn scenario for TC-04.

## Plan

1. Add TC-01/TC-02/TC-03 unit tests to print-mode-integration.test.ts (resolvePrompt logic)
2. Add TC-04 spawn-based E2E test to headless-e2e.test.ts (or skip with reason if provider required)
3. Run `pnpm --filter @robota-sdk/agent-cli test` to verify all pass

## Affected Files

- `packages/agent-cli/src/__tests__/headless-e2e.test.ts`
- `packages/agent-cli/src/__tests__/print-mode-integration.test.ts`

## Evidence

- GATE-IMPLEMENT PASS — 2026-05-25
- GATE-VERIFY PASS — 2026-05-25: TC-01/02/03 pass in headless-e2e.test.ts (CLI-038 describe block); TC-04 marked it.skip (manual, requires built CLI + provider key)
- GATE-COMPLETE PASS — 2026-05-25: spec archived to done/, all TC checkboxes ticked
