Run artifact

workspace/targets/jq/blueprint/FEATURE-VALUE-004.md

FEATURE: Type and Numeric Primitives

FieldValue
Version20260822 V1
DescriptionProvide jq type, length, numeric conversion, predicate, and math primitives.
Depends OnARCHITECTURE.md, FEATURE-VALUE-001.md, FEATURE-VALUE-003.md
Providestype, length, utf8bytelength, numeric predicates, conversions, math builtins
Consumesjq value model, ordered generator evaluator

Intent

Implement type, length, utf8bytelength, numeric predicates, tonumber, toboolean, tostring, and the standard math functions exercised by the corpus. Preserve jq's stream behavior, numeric equivalence, Unicode codepoint semantics, and runtime errors for invalid input types.

Programmatic Acceptance

=== AC value-004-conformance ===
Intent: The implementation passes the authoritative corpus slice covering type, length, numeric predicates, conversions, and math functions.
Suite: scoped
Requires: executable=python3; scope=test

import json import os import subprocess import sys

select = r"length|type|sqrt|floor|tonumber" result = subprocess.run( [sys.executable, "sources/run_conformance.py", "--select", select, "--json"], capture_output=True, text=True, env={**os.environ, "JQ": f"{os.getcwd()}/jq"}, ) print(result.stdout) print(result.stderr, file=sys.stderr) report = json.loads(result.stdout) summary = report["summary"] assert sum(summary.values()) > 0 assert summary["fail"] == 0 and summary["error"] == 0 assert result.returncode == 0 === END AC value-004-conformance ===

User Acceptance

Guardrails