| name | new-input |
| description | Generate committed example inputs by profiling real workloads: workload
scripts, generation, inspection, and validation. Use when asked to add an
input or example for a language, profiler, or configuration.
|
| argument-hint | [language, origin, format, or guidance] |
| allowed-tools | Bash(pnpm generate-inputs *) |
Generate committed example inputs in examples/input/ by profiling real
workloads.
Input
$ARGUMENTS
Workflow
If loaded from /new-format, skip step 1 and return to that workflow after step
3: the remaining steps assume the converter already exists.
Check support
- Determine each input's language, origin, and format, then check they're
supported:
- Format not registered in
src/formats/registry.ts: STOP, load
/new-format, and follow its workflow instead; it implements the format
end-to-end and returns here to generate inputs
- Origin not registered in
src/origins/specs/index.ts: load /new-origin
and follow its workflow first; input filenames carry the origin's
registered ID, and every committed input must resolve to it
Generate
-
Add or update workload scripts in scripts/inputs/, one per emitting
language (<lang>.sh, sharing the _common.sh helpers), then run
pnpm generate-inputs <langs>:
- Profile a real, popular program with realistic input. NEVER a toy workload
or synthetic input
- Native-only tools run in Docker via
docker_capture; host tools may need
additions to scripts/inputs/flake.nix
- Name outputs
<lang>.<origin>.<config?>.<base|current>.<ext>; the second
token must be the origin's registered ID, and the extension must match the
converter's extension
- When a profiler can export multiple supported formats, export all from a
single recording
- Keep every input under GitHub's 100 MB limit (
verify_generated_input
fails oversized captures). An oversized input means the workload does too
much work while recording (high-volume configs like nativemem record
every event): shrink the workload's input or iteration count, not the
profiler flags, so the capture stays realistic
-
Inspect the generated bytes by hand: confirm each file is the intended
format, the workload's own code dominates the samples, and the origin's
evidence (marker entries or a parser origin hint) is present
Validate
-
Convert each input with node src/cli/index.ts <input>, and each
base/current pair as a diff. Sanity-check the output against the workload
-
Run the detected-input-origins test (pnpm test src/origins/index.test.ts):
every committed input must resolve to the origin in its filename. NEVER
commit an input that resolves elsewhere: give the origin a marker or a parser
origin hint, or make the workload realistic enough to carry the origin's
evidence
Document and finish
-
For a language we don't list yet: add a languageMetas entry (name, aliases,
extensions) in src/cli/languages.ts and generation instructions in
docs/languages/<language>.md, then verify the docs render with
node src/cli/index.ts --help <language>. If a new config token needs a
display label beyond title-casing, add it to configNames in
src/cli/examples.ts
-
pnpm update-examples, then pnpm update-readme