Implement DeltaWire v1 as a standalone Go CLI.
Do not stop after proposing another plan. After the mandatory grounding phase, implement the complete v1, run every required validation, and return the evidence report described at the end.
Only stop before implementation when:
- the current repository is not appropriate
- required tooling is unavailable
- a verified repository fact contradicts this specification
- a required dependency cannot be verified
- continuing would require inventing an API, format, result, or benchmark claim
Do not commit, push, tag, publish a release, or create a remote repository.
Working name:
DeltaWire
Command:
deltawire
Public value statement:
Generate large, verified test and eval datasets from compact declarative plans.
DeltaWire is a repository-local deterministic data materializer.
The intended workflow is:
human or coding agent
↓
compact DeltaWire generation plan
↓
deterministic expansion
↓
record-schema validation
↓
dataset assertions
↓
managed JSON or NDJSON output
↓
reproducibility receipt and CI check
The coding agent should write the compact plan.
The coding agent should not generate the expanded dataset itself when DeltaWire can deterministically derive it.
This shipped system requires two slices.
Compile a compact, versioned generation plan into a canonical JSON or NDJSON dataset.
The v1 generation primitives are:
- static defaults
- schema-once tuple rows
- Cartesian matrices
- integer ranges
- base-record variants
- deterministic string interpolation
- JSON Pointer set and omit operations
Ensure that generated data is:
- deterministic
- schema-valid
- assertion-valid
- bounded in size
- protected from path traversal
- protected from accidental overwrite
- reproducible from committed plans
- checkable in CI
- attributable to exact plan, schema, and output hashes
Do not build beyond these two slices.
DeltaWire v1 is not:
- an LLM API proxy
- a prompt router
- a model gateway
- a benchmark runner
- an eval scorer
- an arbitrary scripting engine
- a random-data generator
- a fuzzing framework
- a database
- a general template language
- a JSON compression proxy
- a semantic-delta protocol for source code
- a Boatstack dependency
- an Intelligence Flow dependency
- a tokenizer implementation
- a CSV or Parquet generator
- a YAML-based tool
Do not add:
- model SDKs
- model calls
- embeddings
- judge calls
- HTTP clients
- runtime network access
- shell execution
- plugin execution
- JavaScript
- Python
- Lua
- CEL
- JSONata
- jq
- arbitrary expressions
- environment-variable interpolation
- wall-clock-generated values
- unseeded randomness
- timestamps in deterministic state
- UUID generation
- remote schema references
The initial claim is not “DeltaWire saves X% of model tokens.”
The initial verified claim is:
DeltaWire can deterministically materialize and verify a full dataset from
a smaller declarative representation.
Model-specific token savings remain an evaluation question.
Before writing code, run and record:
pwd
git status --short
git rev-parse --show-toplevel
git rev-parse HEAD
git branch --show-current
git remote -v
go version
go env GOVERSION
find . -maxdepth 3 -type f | sort | sed -n '1,240p'
Repository rules:
-
The intended repository basename is
deltawire. -
If the current repository is an unrelated project such as Boatstack or intelligence-flow, stop. Do not place DeltaWire inside it.
-
If this is an existing DeltaWire repository with at least one commit:
create or use branch: feat/deltawire-v1Prefer a dedicated worktree:
../deltawire-worktrees/v1Do not overwrite an existing branch or worktree.
-
If this is a new empty Git repository:
remain in place use branch feat/deltawire-v1 do not create a commit -
If this directory is not a Git repository:
confirm that the directory basename is deltawire git init -b feat/deltawire-v1 do not create a commit -
Record verified facts in:
docs/00-grounding.md
Use the table:
Claim | Evidence | Verification command
Do not copy assumptions from this prompt into the grounding document.
Use Go.
Use the installed stable Go version only.
If go version reports a development or release-candidate build, stop and
report it.
Use the Go standard library for:
- CLI parsing
- JSON parsing
- canonical output
- hashing
- file operations
- embedded initialization templates
- tests
Do not use a CLI framework.
One third-party runtime dependency is permitted:
- an established JSON Schema Draft 2020-12 validator
Before choosing it:
-
Verify the actual module path.
-
Verify that the module exists.
-
Verify that the selected version exists.
-
Verify that it supports record validation against Draft 2020-12.
-
Pin an actual version in go.mod.
-
Record the dependency and license in:
THIRD_PARTY_NOTICES.md
Do not invent a module version.
Do not permit the schema library to fetch remote resources.
DeltaWire v1 permits:
- one local schema document
- internal fragment references beginning with
#
DeltaWire v1 rejects:
- http:// references
- https:// references
- file:// references
- absolute schema references
- relative references to another file
Use a custom loader or pre-validation to guarantee that no schema validation path performs network I/O.
Do not add any other third-party runtime module without stopping and explaining why it is essential.
Create approximately this structure:
.
├── cmd/
│ └── deltawire/
│ └── main.go
├── internal/
│ ├── cli/
│ ├── config/
│ ├── plan/
│ ├── engine/
│ ├── schema/
│ ├── store/
│ └── report/
├── assets/
│ └── init/
│ ├── config.json
│ ├── INSTRUCTIONS.md
│ └── deltawire-plan.schema.json
├── schemas/
│ └── deltawire-plan.schema.json
├── examples/
│ └── auth-eval/
│ ├── auth-case.schema.json
│ └── auth-eval.dw.json
├── docs/
│ ├── 00-grounding.md
│ ├── architecture.md
│ ├── plan-format.md
│ ├── verification.md
│ ├── plan-integration.md
│ ├── claims.md
│ └── research-next.md
├── scripts/
│ ├── validate.sh
│ ├── check-determinism.sh
│ └── check-runtime-boundary.sh
├── .github/
│ └── workflows/
│ └── ci.yml
├── README.md
├── go.mod
├── go.sum
└── THIRD_PARTY_NOTICES.md
Adjust package-file decomposition when required, but preserve these architectural boundaries:
- plan parses and validates plan documents
- engine performs pure deterministic expansion
- schema wraps record-schema validation
- store owns repository paths, managed outputs, state, and atomic writes
- report produces deterministic JSON and Markdown reports
- cli owns command parsing and presentation
- cmd/deltawire contains only process entry-point wiring
Do not create a public Go SDK in v1.
Keep implementation packages under internal/.
DeltaWire consists of:
- A standalone CLI binary installed on the developer machine.
- A repository-local
.deltawire/directory created bydeltawire init.
Development installation:
go install ./cmd/deltawire
Repository installation:
deltawire init --repo .
deltawire init must create:
.deltawire/
config.json
INSTRUCTIONS.md
state.json
plans/
schemas/
It must not:
- modify root AGENTS.md
- modify CLAUDE.md
- modify Cursor rules
- modify Gemini configuration
- modify CI configuration
- modify .gitignore
- render an example unless
--exampleis explicitly supplied - overwrite an existing modified file
Use go:embed for initialization assets.
Support:
deltawire init --repo .
deltawire init --repo . --dry-run
deltawire init --repo . --example
init must be idempotent.
A second identical invocation must produce no file changes.
If an initialization file exists and differs from the embedded version, refuse to overwrite it and report the exact path.
Do not provide an automatic force flag for initialization in v1.
Use this versioned configuration shape:
{
"version": "deltawire.config.v1",
"plans_dir": ".deltawire/plans",
"schemas_dir": ".deltawire/schemas",
"state_file": ".deltawire/state.json",
"limits": {
"max_plan_bytes": 1048576,
"max_schema_bytes": 1048576,
"max_records": 100000,
"max_output_bytes": 104857600
}
}Configuration requirements:
- strict JSON
- reject unknown fields
- reject duplicate object keys
- reject unsupported versions
- all paths are repository-root relative
- absolute paths are invalid
- path traversal is invalid
- symlink escape from the repository is invalid
- output paths under
.git/are invalid - generated dataset paths under
.deltawire/are invalid - state_file is the only managed output permitted under
.deltawire/
Do not interpolate environment variables.
Generation plans use:
*.dw.json
Schema version:
deltawire.plan.v1
All paths in plans are repository-root relative.
Use this exact conceptual shape:
{
"version": "deltawire.plan.v1",
"id": "auth-eval",
"description": "Authorization evaluation cases",
"record_schema": ".deltawire/schemas/auth-case.schema.json",
"output": {
"path": "evals/generated/auth-cases.ndjson",
"format": "ndjson",
"pretty": false
},
"defaults": {
"suite": "auth",
"expected": "deny"
},
"sets": {
"non_admin_roles": ["guest", "member"],
"routes": ["billing", "admin"]
},
"generators": [
{
"kind": "matrix",
"name": "non-admin routes",
"dimensions": [
{
"name": "role",
"set": "non_admin_roles"
},
{
"name": "route",
"set": "routes"
}
],
"record": {
"id": "auth/${role}/${route}",
"input": {
"role": "${role}",
"route": "/${route}"
}
}
},
{
"kind": "rows",
"name": "admin routes",
"columns": [
"/id",
"/input/role",
"/input/route",
"/expected"
],
"rows": [
[
"auth/admin/billing",
"admin",
"/billing",
"allow"
],
[
"auth/admin/admin",
"admin",
"/admin",
"allow"
]
]
},
{
"kind": "variants",
"name": "missing-role edge cases",
"base": {
"id": "auth/role/base",
"input": {
"role": "guest",
"route": "/admin"
}
},
"variants": [
{
"name": "empty",
"set": {
"/id": "auth/role/empty",
"/input/role": ""
}
},
{
"name": "null",
"set": {
"/id": "auth/role/null",
"/input/role": null
}
},
{
"name": "omitted",
"set": {
"/id": "auth/role/omitted"
},
"omit": [
"/input/role"
]
}
]
}
],
"assertions": {
"count": 9,
"unique": [
"/id"
],
"coverage": [
{
"path": "/expected",
"values": [
"allow",
"deny"
]
}
]
}
}Create and maintain:
schemas/deltawire-plan.schema.json
The installed copy must be:
.deltawire/schemas/deltawire-plan.schema.json
The Go parser remains authoritative.
The JSON Schema exists for:
- editor support
- external validation
- documentation
- fixture testing
Tests must prove that the JSON Schema and Go parser accept all valid examples and reject representative invalid examples.
Plan and configuration parsing must:
- use JSON numbers without silently converting all numbers to float64
- reject unknown fields
- reject duplicate object keys
- reject trailing non-whitespace data
- reject unsupported version strings
- return stable error codes with JSON Pointer or field-path locations
- never panic on user input
Standard DisallowUnknownFields is not enough because it does not reject
duplicate keys.
Add an explicit duplicate-key detection pass.
Do not normalize malformed input into a valid plan.
defaults must be a JSON object.
Defaults are applied before generator-specific records.
Deep-merge rules:
- object + object: recursively merge
- scalar overrides scalar
- array replaces array
- null replaces the existing value
- generator data overrides defaults
- variant patches override defaults and base
- omission occurs after all merges
Defaults must not contain interpolation placeholders.
sets is a collection of named ordered scalar arrays.
Permitted set values:
- string
- JSON number
- boolean
- null
Objects and arrays are not permitted as set entries in v1.
Set names must be unique.
A matrix generator has:
- kind: matrix
- unique name
- ordered dimensions
- one record template
Each dimension must define exactly one source:
valuessetrange
Inline values:
{
"name": "role",
"values": ["guest", "member"]
}Named set:
{
"name": "role",
"set": "roles"
}Integer range:
{
"name": "index",
"range": {
"start": 0,
"end_exclusive": 100,
"step": 1
}
}Range rules:
- integers only
- step cannot be zero
- direction must agree with start and end
- overflow must be detected
- count must be computable before generation
Dimension names must match:
[A-Za-z_][A-Za-z0-9_]*
Dimension names must be unique within a generator.
Every dimension must be referenced by the record template.
Iteration order:
- generators remain in plan order
- dimensions remain in declared order
- values remain in declared order
- the last dimension changes fastest
Do not sort declared values.
Only matrix-record templates support interpolation.
Syntax:
${dimension_name}
Rules:
-
If the complete JSON string is exactly one placeholder:
"${index}"preserve the original scalar type.
-
If a placeholder appears inside a larger string:
"case-${index}"convert string, JSON number, or boolean to deterministic text.
-
Embedded null, object, or array values are invalid.
-
Unknown placeholders are errors.
-
Unclosed placeholders are errors.
-
Environment variables are never consulted.
-
Functions and expressions are not supported.
-
Interpolation is recursive through objects and arrays.
A rows generator has:
- kind: rows
- unique name
- ordered JSON Pointer columns
- ordered row arrays
Example:
{
"kind": "rows",
"name": "explicit cases",
"columns": [
"/id",
"/input/value",
"/expected"
],
"rows": [
["empty", "", "reject"],
["null", null, "reject"]
]
}Rules:
- columns use RFC 6901 JSON Pointer syntax
- columns must be unique
- every row length must exactly match column count
- v1 permits object-path creation
- v1 does not permit setting array indexes through row columns
- conflicting parent and child columns are invalid
- defaults are applied first
- row values are applied second
- row order is preserved
A variants generator has:
- kind: variants
- unique name
- one base JSON object
- ordered variants
Each variant has:
- unique name within the generator
- optional
set - optional
omit
set keys are RFC 6901 JSON Pointers.
omit values are RFC 6901 JSON Pointers.
Rules:
- defaults are applied
- base is deep-merged
- set operations are applied
- omit operations are applied last
- set and omit cannot target the same pointer
- omission of a nonexistent path is an error
- v1 patch operations may target object properties
- v1 patch operations may not mutate array indexes
- variant order is preserved
Generator names must be unique inside one plan.
Plan IDs must be unique across all discovered plans.
Output paths must be unique across all discovered plans.
Do not silently merge outputs from multiple plans.
Support only:
json
ndjson
JSON output is one array of generated records.
When pretty=false:
- canonical compact JSON
- exactly one trailing newline
When pretty=true:
- deterministic two-space indentation
- exactly one trailing newline
- one canonical compact JSON object per line
- records must be JSON objects
- exactly one newline after every record
- no array wrapper
Canonical output rules:
- object keys sorted deterministically
- strings encoded consistently
- JSON numbers preserved without float conversion where possible
- no insignificant nondeterminism
- no timestamps
- no runtime-specific map ordering
- no platform-specific line endings
The same plan, schema, configuration, and binary semantics must produce byte-identical output.
record_schema describes one generated record.
Every record must be validated before it is committed to output.
The schema:
- must be strict JSON
- must remain inside the repository
- must remain below the configured schema byte limit
- must not contain remote or external-file references
- may use internal fragment references beginning with
#
Record generation fails on the first schema-invalid record.
The error must include:
- plan ID
- generator name
- zero-based generator record index
- schema failure location
- concise reason
Do not write or modify the target output when any record fails validation.
Assertions are evaluated across the complete generated dataset.
V1 supports:
{
"count": 100
}count is required.
It acts as a fanout contract.
A plan whose projected count differs from the asserted count must fail before writing output.
{
"unique": ["/id"]
}Rules:
- JSON Pointer must resolve on every record
- resolved value must be scalar
- canonical scalar value is used for comparison
- duplicate value reports both record indexes
{
"coverage": [
{
"path": "/expected",
"values": ["allow", "deny"]
}
]
}Rules:
- path must resolve to a scalar
- every declared value must appear at least once
- extra observed values are permitted
- missing required values fail generation
Do not add arbitrary predicates in v1.
Before generating:
- calculate projected record count
- detect integer overflow
- reject count above max_records
- reject count different from assertions.count
During generation:
- count output bytes
- stop before exceeding max_output_bytes
- delete temporary output
- leave existing output and state unchanged
Plan and schema files must be checked against configured byte limits before parsing.
Do not add a command-line flag that silently bypasses limits.
Users can explicitly edit repository configuration and commit the changed limits.
The internal/engine package must be deterministic and side-effect free.
Inputs:
- validated plan
- compiled record validator
- generation limits
- record callback
Outputs:
- generated records through callback
- deterministic statistics
- assertion result
- structured errors
The engine package must not:
- read files
- write files
- access the network
- execute commands
- read environment variables
- use time
- use randomness
- depend on CLI packages
- depend on store packages
The same inputs must yield the same record sequence and statistics.
All user-controlled paths must be resolved against the selected repository root.
Reject:
- absolute paths
..traversal outside the repository- output paths under
.git - dataset outputs under
.deltawire - symlink escapes
- paths whose nearest existing parent resolves outside the repository
- output paths that collide with config, state, plan, or schema files
Test on the current platform using temporary directories.
Implement path logic so it remains portable across Windows, macOS, and Linux.
Do not rely on string-prefix comparison alone.
DeltaWire owns only outputs recorded in:
.deltawire/state.json
State schema:
{
"version": "deltawire.state.v1",
"entries": [
{
"plan_id": "auth-eval",
"plan_path": ".deltawire/plans/auth-eval.dw.json",
"schema_path": ".deltawire/schemas/auth-case.schema.json",
"output_path": "evals/generated/auth-cases.ndjson",
"plan_sha256": "...",
"schema_sha256": "...",
"output_sha256": "...",
"record_count": 9,
"plan_source_bytes": 1234,
"schema_source_bytes": 567,
"output_bytes": 8901
}
]
}State rules:
- no timestamps
- no absolute paths
- entries sorted by plan path
- SHA-256 lowercase hex
- plan hash uses canonical semantic plan representation
- schema hash uses canonical JSON representation
- output hash uses exact generated bytes
- source byte counts use actual source-file lengths
Render behavior:
-
If output does not exist:
- generation may proceed
-
If output exists and no state entry owns it:
- refuse to overwrite
- return unmanaged-output error
-
If output exists and its current hash differs from recorded output hash:
- refuse to overwrite
- return modified-managed-output error
-
If output exists and matches recorded output hash:
- safe regeneration is permitted
Support:
deltawire render <plan>
deltawire render <plan> --dry-run
deltawire render <plan> --force
--force requirements:
- explicit user invocation only
- never used by init
- never used by check
- never suggested in agent instructions
- cannot bypass path safety
- cannot bypass schema validation
- cannot bypass assertions
- cannot bypass size limits
- prints which existing managed or unmanaged output would be replaced
Agents must be instructed not to use --force without explicit human approval.
Generation must use a temporary file in the target directory.
Required sequence:
- Parse and validate config.
- Parse and validate plan.
- Resolve and validate paths.
- Calculate projected count.
- Compile record schema.
- Stream records into a temporary output.
- Validate every record.
- Track assertions.
- Enforce output byte limit.
- Finalize assertions.
- Flush and close temporary output.
- Calculate output hash.
- Prepare deterministic new state.
- Replace target output atomically.
- Replace state atomically.
If any step before target replacement fails:
- delete temporary files
- leave current output unchanged
- leave state unchanged
If output replacement succeeds but state replacement fails:
- attempt to restore the previous output
- report the state-write failure
- document that
deltawire checkdetects any interrupted state transition
Do not write partial final output.
Implement:
deltawire init
deltawire validate
deltawire render
deltawire check
deltawire inspect
deltawire doctor
deltawire version
All commands support:
--repo <path>
Default repository path:
current working directory
deltawire validate <plan>
deltawire validate --all
Behavior:
- no repository mutation
- validate plan syntax
- validate plan semantics
- compile record schema
- generate to a discard sink
- validate every record
- evaluate assertions
- report projected record and byte statistics
deltawire render <plan>
deltawire render --all
deltawire render <plan> --dry-run
deltawire render <plan> --force
Behavior:
- perform complete validation
- enforce managed-output rules
- write output and state only after success
--all discovers:
<plans_dir>/**/*.dw.json
Discovery order must be lexicographically sorted by repository-relative path.
Before writing any output in --all mode:
- load all plans
- validate unique plan IDs
- validate unique output paths
- preflight all counts and paths
Do not partially render the first plans and then discover a collision later.
deltawire check <plan>
deltawire check --all
Behavior:
- no repository mutation
- deterministically regenerate to a hash/count sink
- compare semantic plan hash
- compare schema hash
- compare exact output hash
- compare record count
- compare state entry
- report missing output
- report stale output
- report modified output
- report stale state
- report unmanaged collision
This is the CI command.
Do not trust state without regenerating.
deltawire inspect <plan>
deltawire inspect <plan> --format json
deltawire inspect <plan> --format markdown
Default format:
human-readable text
The deterministic JSON report includes:
- plan ID
- plan path
- schema path
- output path
- output format
- projected record count
- assertion summary
- plan source bytes
- schema source bytes
- projected output bytes
- plan-only byte amplification numerator and denominator
- cold byte amplification numerator and denominator
- generation primitives used
- exact validate command
- exact render command
- exact check command
Do not store floating-point ratios in state.
Display ratios only in reports.
Definitions:
plan_only_wire_amplification =
output_bytes / plan_source_bytes
cold_wire_amplification =
output_bytes / (plan_source_bytes + schema_source_bytes)
Label these as byte-level representation measurements.
Do not call them model-token savings.
Markdown format must produce a plan-ready block:
### DeltaWire generation contract
- Plan: `.deltawire/plans/auth-eval.dw.json`
- Record schema: `.deltawire/schemas/auth-case.schema.json`
- Output: `evals/generated/auth-cases.ndjson`
- Projected records: `9`
- Assertions: exact count, unique `/id`, coverage `/expected`
- Generate: `deltawire render .deltawire/plans/auth-eval.dw.json`
- Verify: `deltawire check .deltawire/plans/auth-eval.dw.json`This is the generic integration surface for:
- Boatstack plans
- coding-agent plans
- benchmark plans
- eval plans
- CI documentation
Do not parse or modify arbitrary Markdown plans in v1.
deltawire doctor
Validate:
- repository root
- configuration
- plans directory
- schemas directory
- state schema
- duplicate plan IDs
- duplicate output paths
- state paths remain inside repository
- managed outputs exist or are reported missing
- no remote schema references
- embedded initialization assets are available
No writes.
No network.
Print:
- semantic binary version or
dev - Go runtime version
- supported config version
- supported plan version
- supported state version
No timestamp.
Use stable error codes in stderr.
At minimum:
DW_USAGE
DW_CONFIG_INVALID
DW_PLAN_INVALID
DW_SCHEMA_INVALID
DW_ASSERTION_FAILED
DW_OUTPUT_DRIFT
DW_OUTPUT_UNMANAGED
DW_OUTPUT_MODIFIED
DW_PATH_ESCAPE
DW_LIMIT_EXCEEDED
DW_STATE_INVALID
DW_INTERNAL
Process exit codes:
0 success
1 internal failure
2 usage or configuration failure
3 plan, schema, or assertion failure
4 output/state drift or overwrite refusal
5 path or resource-limit violation
Tests must assert both stable error code and process exit code.
Do not expose Go stack traces for user input errors.
deltawire init must create:
.deltawire/INSTRUCTIONS.md
Use content equivalent to:
# DeltaWire repository instructions
Use DeltaWire for repetitive generated test, fixture, benchmark, or evaluation
data.
Do not manually generate or edit a managed output when the data can be derived
from a DeltaWire plan.
Workflow:
1. Create or edit a `.deltawire/plans/*.dw.json` generation plan.
2. Keep the record schema under `.deltawire/schemas/`.
3. Run `deltawire validate <plan>`.
4. Run `deltawire inspect <plan> --format markdown` when preparing a coding plan.
5. Run `deltawire render <plan>`.
6. Run `deltawire check <plan>` before claiming completion.
Never use `deltawire render --force` without explicit human approval.
Do not claim model-token savings from byte-amplification measurements.
Generated data is complete only when:
- record-schema validation passes
- dataset assertions pass
- the output hash matches repository state
- `deltawire check` exits successfullyDo not generate agent-vendor-specific adapters in v1.
Create:
examples/auth-eval/auth-case.schema.json
Use a strict Draft 2020-12 schema equivalent to:
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "auth-case",
"type": "object",
"required": [
"id",
"suite",
"input",
"expected"
],
"properties": {
"id": {
"type": "string",
"minLength": 1
},
"suite": {
"const": "auth"
},
"input": {
"type": "object",
"required": [
"route"
],
"properties": {
"role": {
"type": [
"string",
"null"
]
},
"route": {
"type": "string",
"minLength": 1
}
},
"additionalProperties": false
},
"expected": {
"enum": [
"allow",
"deny"
]
}
},
"additionalProperties": false
}The $schema URI identifies the dialect and must not be fetched.
The $id is an identifier and must not be fetched.
Test that external $ref values are rejected.
Create:
examples/auth-eval/auth-eval.dw.json
Use the nine-record example defined earlier in this specification.
Also ensure:
- the example validates
- render output is deterministic
- count is exactly 9
/idis unique/expectedcovers allow and deny- omitted role remains valid
- null role remains valid
- empty role remains valid
Do not claim that the example is a benchmark.
It is a deterministic fixture.
When:
deltawire init --example
create the example as repository-local files:
.deltawire/schemas/auth-case.schema.json
.deltawire/plans/auth-eval.dw.json
Set the example output to:
testdata/generated/auth-cases.ndjson
Do not render it automatically.
Print:
deltawire validate .deltawire/plans/auth-eval.dw.json
deltawire inspect .deltawire/plans/auth-eval.dw.json --format markdown
deltawire render .deltawire/plans/auth-eval.dw.json
deltawire check .deltawire/plans/auth-eval.dw.json
Add comprehensive tests for:
- valid config
- unknown config field rejected
- duplicate config key rejected
- unsupported config version rejected
- valid plan
- unknown plan field rejected
- duplicate plan key rejected
- trailing JSON rejected
- unsupported plan version rejected
- numeric values preserve intended representation
- inline values
- named sets
- integer range
- dimension order
- Cartesian count
- last dimension changes fastest
- exact-placeholder type preservation
- embedded-placeholder string conversion
- unknown placeholder rejected
- unclosed placeholder rejected
- unused dimension rejected
- zero range step rejected
- inconsistent range direction rejected
- range overflow rejected
- projected-count overflow rejected
- valid rows
- row order
- defaults applied
- exact row width required
- duplicate columns rejected
- invalid JSON Pointer rejected
- parent/child column collision rejected
- array-index mutation rejected
- defaults then base then set then omit
- variant order
- duplicate variant name rejected
- set/omit collision rejected
- missing omit path rejected
- invalid pointer rejected
- array-index mutation rejected
- recursive object merge
- array replacement
- scalar replacement
- null replacement
- exact count
- count mismatch before write
- unique success
- duplicate unique value reports both indexes
- missing unique path
- non-scalar unique value rejected
- coverage success
- missing coverage value
- missing coverage path
- valid record
- invalid record
- error includes plan ID
- error includes generator name
- error includes record index
- internal fragment reference works
- HTTP reference rejected
- HTTPS reference rejected
- file reference rejected
- relative external-file reference rejected
- JSON compact
- JSON pretty
- NDJSON
- stable key ordering
- stable newline behavior
- stable JSON number behavior
- repeated execution produces identical bytes
- plan byte limit
- schema byte limit
- record count limit
- output byte limit
- temporary file removed on failure
- existing output unchanged on failure
- valid nested output
- absolute output rejected
- traversal rejected
- .git output rejected
- .deltawire dataset output rejected
- existing symlink escape rejected
- new-file parent symlink escape rejected
- output collision rejected
- new output accepted
- unmanaged existing output refused
- matching managed output replaced
- modified managed output refused
- force is explicit
- force does not bypass validation
- force does not bypass paths
- state entries sorted
- state contains no timestamp
- state uses repository-relative paths
- first initialization
- second initialization is idempotent
- dry-run writes nothing
- modified embedded file is not overwritten
- example created only with --example
- every command help surface
- required exit-code mapping
- stable error codes
- validate performs no writes
- check performs no writes
- inspect Markdown is deterministic
- doctor performs no writes
- version contains no timestamp
Create temporary Git repositories and exercise the real compiled CLI.
- Initialize repository.
- Initialize DeltaWire with example.
- Validate example.
- Inspect Markdown contract.
- Render example.
- Check example.
- Record output SHA-256.
- Render again.
- Record output SHA-256 again.
- Assert identical hashes.
- Assert second check succeeds.
- Render example.
- Manually modify generated output.
- Run check.
- Assert
DW_OUTPUT_DRIFTorDW_OUTPUT_MODIFIED. - Run normal render.
- Assert overwrite is refused.
- Assert modified file remains unchanged.
Do not use --force in this integration.
- Create the intended output manually before first render.
- Run render.
- Assert
DW_OUTPUT_UNMANAGED. - Assert the file remains unchanged.
- Modify the plan so one record violates the schema.
- Render.
- Assert failure.
- Assert existing output and state remain byte-identical.
- Render.
- Change plan semantics.
- Run check.
- Assert drift.
- Render.
- Run check.
- Assert success.
- Create symlink from a path inside the repository to a directory outside.
- Target output through the symlink.
- Assert render fails.
- Assert no external file is created.
Skip only when the current platform cannot create symlinks, and report the skip explicitly.
- Create two valid plans with the same output path.
- Run
render --all. - Assert failure before any output is written.
Run the same inspect and render operations in separate processes.
Assert:
- identical inspect JSON
- identical inspect Markdown
- identical generated output
- identical state entry
Add:
scripts/check-determinism.sh
It must:
- Create two independent temporary repositories.
- Initialize the same DeltaWire example in both.
- Render both.
- Compare:
- output files
- state files
- inspect JSON
- inspect Markdown
- Use
cmp. - Fail on any difference.
Also run:
go test -count=20 ./...
Do not seed output with temporary paths.
Do not include absolute repository paths in deterministic reports or state.
Add:
scripts/check-runtime-boundary.sh
Use Go tooling plus source inspection.
Assert that project-owned runtime packages do not directly import:
net
net/http
net/rpc
os/exec
plugin
math/rand
crypto/rand
Assert that engine packages do not directly import:
os
io/fs
path/filepath
time
runtime
internal/cli
internal/store
It is acceptable for CLI/store packages to use filesystem packages.
Reject source references to:
- OpenAI
- Anthropic
- Gemini model SDKs
- model inference endpoints
- embedding clients
- shell command execution
Do not simply grep dependency names and claim proof.
Use:
go list -f '{{.ImportPath}}: {{join .Imports " "}}' ./...
and test the actual package boundaries.
Also test that remote $ref values are rejected before schema compilation.
Create:
scripts/validate.sh
It must use:
set -euo pipefail
It must print every command before running it.
Run, in order:
- gofmt verification
- go mod tidy verification
- go test ./...
- go test -race ./...
- go test -count=20 ./...
- go vet ./...
- runtime-boundary check
- determinism check
- build static binary
- run example lifecycle
- git diff --check
Suggested build:
mkdir -p dist
CGO_ENABLED=0 go build -trimpath -o dist/deltawire ./cmd/deltawire
Do not suppress failures.
Do not use:
|| true
Do not automatically rewrite golden files.
The validation script must clean generated temporary files.
The final repository may ignore:
dist/
Add a minimal GitHub Actions workflow using official GitHub actions.
Required checks:
- Linux: full validation script
- macOS: go test and build
- Windows: go test and build
- static builds for:
- linux amd64
- linux arm64
- darwin amd64
- darwin arm64
- windows amd64
Do not add an automated release workflow in v1.
Do not reference a GitHub release that does not exist.
The currently verified installation path is:
go install ./cmd/deltawire
A public binary installer remains future work.
Lead with user value:
# DeltaWire
Generate large, verified test and eval datasets from compact declarative plans.
Instead of asking a coding agent to emit hundreds or thousands of repetitive
records, define the decisions, dimensions, defaults, and edge cases once.
DeltaWire materializes the complete JSON or NDJSON dataset, validates every
record, checks dataset-level invariants, and records reproducible hashes.
The agent defines the data.
DeltaWire performs the repetition.
Your tests and evals consume ordinary files.Include:
- installation
- repository initialization
- minimal example
- commands
- plan integration
- safety behavior
- current claim status
- explicit non-goals
Do not describe DeltaWire as universal LLM compression.
Document:
compact generation plan
↓
strict parser
↓
preflight count and path checks
↓
deterministic record stream
↓
record-schema verifier
↓
dataset assertions
↓
atomic managed output
↓
reproducibility state
Explain the two slices:
- generation
- reliability boundary
Document every field and exact semantic rule.
Include matrix, rows, ranges, variants, interpolation, defaults, assertions, and path resolution.
Document:
- schema validation
- assertions
- deterministic hashing
- managed outputs
- check behavior
- size limits
- atomic writes
- path safety
Explain how any coding plan can include:
deltawire inspect <plan> --format markdown
Provide a generic plan section.
Do not couple it to Boatstack.
Include a Boatstack-compatible example only as ordinary Markdown, not as code or a dependency.
Use:
- deterministic plan expansion
- JSON and NDJSON materialization
- per-record schema validation
- count, uniqueness, and coverage assertions
- managed-output protection
- deterministic state and hashes
- repository installation through
deltawire init - no model call in DeltaWire runtime
- no runtime network requirement
- fixture-specific byte amplification from compact plans to generated output
Make clear that this is a byte-level property of fixtures.
- model-token savings
- prompt-token amortization
- retry-rate effects
- performance across model tokenizers
- eval-quality improvements
- benchmark-development speed
- broader semantic-delta use cases
Future work only:
- exact tokenizer adapters
- schema-once model grammars
- source-span references
- dictionary coding
- columnar model-facing formats
- semantic deltas
- deterministic code patch materialization
- paired model experiments
- agent integration adapters
Do not implement these in v1.
The example and inspect command may report:
plan_source_bytes
schema_source_bytes
output_bytes
And derive:
plan-only byte amplification
cold byte amplification
The report must say:
Byte amplification measures representation expansion.
It does not establish tokenizer-specific savings.
Do not present fixture results as general product performance.
Do not add an approximate “characters divided by four” token estimate.
Public and implementation claims must use these levels:
Supported by tests or deterministic inspection.
Seen in a named example or fixture, without generalization.
Not yet established.
Forbidden claims:
- saves 50% of tokens
- universally reduces LLM cost
- improves benchmark quality
- improves eval quality
- works with every schema
- replaces fuzzing
- replaces synthetic-data systems
- zero compute
- compression without tradeoffs
Allowed statement:
DeltaWire makes it possible to measure whether compact generation plans
reduce model output while preserving exact generated data.
Do not:
- let the agent generate the expanded golden dataset and hardcode it
- implement examples without using the real engine
- make tests pass by weakening schema validation
- treat JSON parser success as record correctness
- use unordered map iteration for record order
- silently coerce invalid values
- silently drop duplicate IDs
- silently skip invalid records
- continue after assertion failure
- write output before all validation succeeds
- overwrite unmanaged files
- use absolute paths in state
- add timestamps to state
- add random IDs
- use network schema loading
- use external processes for generation
- create a plugin system
- implement arbitrary expressions
- add a model API
- add token-savings benchmark numbers
- add a public installer that points to nonexistent releases
- modify unrelated repositories
- commit or push
Run:
./scripts/validate.sh
Then run manually:
go install ./cmd/deltawire
Create a fresh temporary repository and run:
deltawire init --repo . --example
deltawire validate --repo . .deltawire/plans/auth-eval.dw.json
deltawire inspect --repo . .deltawire/plans/auth-eval.dw.json --format markdown
deltawire render --repo . .deltawire/plans/auth-eval.dw.json
deltawire check --repo . .deltawire/plans/auth-eval.dw.json
deltawire doctor --repo .
Record all exit codes.
Run:
go list -m all
go mod graph
git diff --check
git status --short
git diff --stat
Do not state that validation passed unless all required commands actually exited successfully.
Return exactly these sections.
Include:
- repository root
- branch
- starting commit or empty-repository state
- Go version
- dependency selected
- commands used to verify the dependency
Describe what was built without marketing language.
List exact paths.
List:
- defaults
- sets
- matrix
- ranges
- rows
- variants
- interpolation
- assertions
- output formats
List:
- strict parsing
- duplicate-key rejection
- record-schema validation
- assertions
- path safety
- size limits
- managed-output protection
- atomic writes
- deterministic hashes
Provide a table:
Requirement | Exact command or test | Exit code | Result
Include actual output excerpts.
Do not write only “all tests pass.”
Include:
- output hash from run one
- output hash from run two
- state hash from run one
- state hash from run two
cmpresult
Name the tests proving:
- unmanaged files are preserved
- modified managed outputs are preserved
- invalid generation leaves previous output unchanged
- force does not bypass validation
Name the traversal and symlink tests.
Paste:
go list -m all
Explain the JSON Schema dependency and why it is present.
Show that DeltaWire contains:
- no model client
- no runtime network path
- no shell execution path
- no randomness in generation
- no wall-clock data in state
Paste the output of:
deltawire inspect ... --format markdown
Include byte measurements, clearly labeled as fixture-specific.
Verified: list verified v1 properties
Observed: list fixture-only observations
Being evaluated: model-token savings retry effects benchmark-development speed eval-development speed cross-model behavior
Paste:
git status --short
git diff --stat
State:
No model call was added.
No benchmark was run.
No token-savings claim was made.
No CSV, Parquet, YAML, or arbitrary scripting was added.
No Boatstack dependency was added.
No release or remote repository was created.
No commit or push was performed.