write_spec
Validate and save a complete spec.yaml so chip requirements, clock, pins, and tile assumptions stay authoritative; invalid specs are rejected without being saved.
Instructions
Check and save spec.yaml, the short spec of the chip. It is the only source of the clock, the pin meanings and the requirements, and the owner reads it to judge what you plan to build. Send the full file as YAML text in content; it is saved exactly as you wrote it (comments are kept) only if it is valid, and an invalid file is not saved.
Format (version 1; unknown keys are rejected): version: 1 # optional, must be 1 title: "One line name" summary: "What the chip does and why, in plain English." clock_hz: 10000000 # required, integer > 0 (Tiny Tapeout pins manage up to ~66 MHz) tiles: "1x1" # optional, default "1x1"; allowed: 1x1, 1x2, 2x2, 3x2, 3x4, 4x2, 4x4, 5x4, 6x2, 6x4, 8x2, 8x4 reset: "rst_n, active-low, synchronous" # plain English; write 'none' if there is no reset pins: # optional; bit numbers 0-7 as integer keys ui: {0: "enable", 1: "mode"} # inputs ui_in[bit] uo: {0: "count bit 0"} # outputs uo_out[bit] uio: {} # bidirectional uio[bit] requirements: # at least one - id: R1 # R followed by a number, unique: R1, R2, R10 text: "The counter adds 1 each clock while enable is high." limit: {min: 0, typ: 1, max: 2, unit: "V"} # optional; at least one of min/typ/max open_questions: # optional; write your assumptions here - "Assumed 10 MHz; please confirm."
Tiles are the chip area rented on Tiny Tapeout, and bigger tiles cost the owner money: keep "1x1" unless the design cannot fit. Never change tiles yourself: ask the owner, or in a headless run with nobody to ask, keep the current tile and write the assumption to open_questions. A bad tiles value lists the allowed ones.
After a valid save the tool copies the clock and tiles into src/config.json and info.yaml for you (you cannot edit those files); a clock above 66 MHz is saved with a warning.
On errors ok is false and details.errors lists {path, message} (for example pins.ui.8 or requirements[1].id). Fix them and call again. Then write tests whose docstrings say 'Covers: R1' for the requirement ids.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"project": "<project>",
"content": "<content>"
},
"name": "write_spec"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| content | Yes | ||
| project | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| details | No | ||
| summary | Yes | ||
| artifacts | No | ||
| next_hints | No |