Initial import

This commit is contained in:
slhx agent
2026-07-04 20:44:28 +02:00
commit 1ed0d9667d
6 changed files with 374 additions and 0 deletions
+13
View File
@@ -0,0 +1,13 @@
# 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]