1.4 KiB
REQUIREMENTS
pick
0 001 pick must be a compiled single-file Zig CLI with no runtime dependencies beyond the OS. [core]
0 002 pick must read TSV records from stdin and write selected TSV fields to stdout only. [stream]
0 003 pick must have no filesystem mutation, network access, shell execution, expression language, regex evaluation, hidden config, prompts, color, pager, JSON default, or daemon behavior. [agent-safe]
1 004 pick FIELD... must select 1-based numeric fields from headerless TSV input and preserve input record order.
1 005 pick --header FIELD... must resolve field names from the first TSV record, emit the selected header, and then emit selected fields from subsequent records.
1 006 Missing fields must emit empty TSV fields rather than failing a pipeline.
1 007 Usage errors must exit nonzero and write diagnostics to stderr, never stdout.
1 008 zig build test must prove numeric selection, header selection, missing fields, help/error stdout-stderr separation, CRLF input tolerance, invalid field rejection, and one forbidden near miss. [verification]
1 009 Project smoke tests must run under POSIX sh and exercise pick through pipe-oriented stdin/stdout/stderr behavior without leaving required generated artifacts. [posix]
1 010 pick must process stdin incrementally for pipeline-sized streams and must not print noisy diagnostics when downstream consumers close stdout early. [pipeline]