Run artifact

workspace/targets/jq/blueprint/FEATURE-Executable-Entry-Point.md

FEATURE: Executable jq Entry Point

FieldValue
Version20260822 V1
DescriptionProvides the executable jq command and its basic stdin-to-stdout filter interface.
Depends OnARCHITECTURE.md
Provides./jq -c program execution
Consumesinterpreter parser and evaluator

Workflow

  1. Start the executable at the application root as ./jq.
  2. Accept the exercised -c '<program>' interface.
  3. Read JSON input from standard input.
  4. Compile and evaluate the jq program for each input value.
  5. Emit each generated result as one compact JSON line.
  6. Exit successfully after all inputs complete.

The implementation must support multiple input values and preserve output order. The executable may delegate to modular Python files beside it, but the delivered command remains the root-level executable named jq.

Interface

InputContract
Arguments-c followed by one jq program string.
Standard inputJSON values in the corpus input format.
Standard outputOne compact JSON value per generated result line.
Standard errorDiagnostics only.
Success status0.

Programmatic Acceptance

=== AC exec-001-conformance ===
Intent: The executable runs the basic identity interface successfully.
Requires: executable=python3; scope=test

import subprocess

result = subprocess.run( ["./jq", "-c", "."], input="true\nfalse\nnull\n1\n", capture_output=True, text=True, ) assert result.returncode == 0 assert result.stdout.splitlines() == ["true", "false", "null", "1"]

=== END AC exec-001-conformance ===

=== AC exec-001-process ===
Intent: The executable accepts the declared -c interface and completes a supplied identity filter successfully.

import json import subprocess

payload = "null\n" result = subprocess.run( ["./jq", "-c", "."], input=payload, capture_output=True, text=True, ) print(result.stdout) print(result.stderr, file=import("sys").stderr) assert result.returncode == 0 assert result.stdout.splitlines() == [payload.strip()] === END AC exec-001-process ===

User Acceptance

Guardrails