document options input type and UI rendering in SCRIPTS.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-08 16:45:00 +00:00
co-authored by Claude Opus 4.6
parent 2caccc183c
commit 3993c7d1c7
+15
View File
@@ -9,6 +9,17 @@ All task inputs defined in the TASK.md frontmatter are available to the script i
1. **Environment variables**: `INPUT_<NAME>` (uppercase) — e.g. `file_path``$INPUT_FILE_PATH`
2. **Positional arguments**: if `args: [file_path]` is set in TASK.md, the value is passed as `$1`
### Input types and UI rendering
| Type | UI | Notes |
|------|-----|-------|
| `string` | Text field | Free-form text input |
| `string` + `options` | Selectable pills | User picks one from a list |
| `number` | Number field | Numeric input |
| `boolean` | No/Yes toggle | Defaults to `false` if not specified |
Inputs provided by context (e.g. `file_path` from the file browser) are auto-filled and hidden from the form.
## Templates
### 1. File Processor
@@ -168,6 +179,10 @@ inputs:
input_name:
type: string # string, number, boolean
description: What this input is
default: value # optional — default value
options: # optional — renders as selectable pills in UI
- option1
- option2
args: [input_name] # optional — pass inputs as positional args
---