create_file
Writes a new source file without overwriting, optionally using an existing sibling as a structural template to match codebase conventions. Optionally runs a verification command.
Instructions
Write a new source file. Never overwrites. Pass model_from to generate BY ANALOGY: the worker is handed an existing sibling as a structural exemplar and traces its shape, naming and error handling rather than inventing its own. Where a codebase already has many files of one kind, this is by far the most reliable way to add another — the worker does not need to know your conventions, it needs to copy them.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| verify | No | Optional shell command run after the file is written, cwd the repo root — e.g. 'pytest tests/test_foo.py -q'. Non-zero exit deletes the file and returns the command's output instead of reporting success — catches a syntactically fine file that is still wrong, which no gate before this can see. | |
| file_path | Yes | ||
| model_from | No | Path to an existing file to use as the structural exemplar. Strongly recommended. | |
| instruction | Yes | ||
| allow_secrets | No |