validate_asset_against_spec
Checks whether a built sprite matches its spec's structural declarations: canvas size, layer names, frame count, tag and slice names, and palette capacity, reporting any mismatch.
Instructions
Does a built sprite actually match the spec it was built from.
The loop closer. `validate_asset_spec` asks whether a document is well formed and
`plan_asset_spec` asks what it would do; this asks the question that bites, which is
whether the artifact and the declaration agree.
That gap is where this project's worst bugs have lived. A figure shipped with no
keyline at all because the outline was drawn onto an empty layer, and every count in
the result reported success. Three ramps clipped to pure black and beat their own
outline while passing every check that existed. Nothing was comparing what was asked
for against what arrived.
**Structure only, like `build_asset_from_spec`:** canvas size, layer names, frame
count, tag names, slice names and palette capacity. The spec layer declares no pixels,
so this verifies no pixels; `assess_sprite` is where the drawing itself is judged.
Args:
filename: The sprite to check. Defaults to the spec's own ``<name>.aseprite``,
which is what `build_asset_from_spec` would have written.
Returns `ok`, the list of fields `checked`, and a `mismatches` list naming the
declared value, the observed one and what the difference means. `verifiable` is false
when the spec declares nothing this can check, so an empty result is never mistaken
for a passing one.
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": {
"spec": "<spec>"
},
"name": "validate_asset_against_spec"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| spec | Yes | ||
| filename | No |