Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Documents the saved-vs-template preset model and the Load, Save, Delete, and Bootstrap contract for lingtai-tui presets.
56% 96%+40 ptsof test cases passed
Passed 24 of 25 test cases with the skill, and 14 of 25 without it.
Does Lingtai TUI's preset Validate() function reject a preset if its tier field is left empty or omitted in JSON?
State that an empty or omitted tier field is allowed by Validate.
This test ran on v1. v2 is the current version and hasn’t been tested on gemini-3.6-flash yet.
3 of 3 safety checks passed
Evidence: tui/internal/preset/preset.go — List, Load, Validate,
Save, Delete, RefreshTemplates, BuiltinPresets, AutoSavedName.
~/.lingtai-tui/presets/templates/ holds the 4 TUI-owned built-ins (one per
provider family: codex, claude, openai, anthropic);
~/.lingtai-tui/presets/saved/ holds user-owned clones. There is no in-band
"is_template" field — Source (SourceTemplate / SourceSaved) is set
purely from which directory a file was loaded from, and is never
serialized. Two presets with byte-identical JSON but different directories
are treated differently.
Load(name) looks in saved/ first, then templates/. A saved preset with
the same name as a template wins — the user's variant overrides. List()
returns saved presets first (alphabetical), then the templates. Treat the
templates' exact relative order as an implementation detail for anything
beyond the first-run default (codex is listed first).
A saved preset falls back to the template only when the saved file is
genuinely absent; a malformed saved override blocks fallback. Load
distinguishes "file doesn't exist" (errors.Is(err, fs.ErrNotExist), falls
through to the next directory) from a real failure — invalid JSON,
permission error, or a path that is a directory — which is surfaced to the
caller with the underlying cause preserved rather than collapsed into a
generic not-found. Only when both the saved and template files are
absent does Load return the not-found error.
Validate() is not auto-invoked by Save or LoadValidate() mirrors the kernel's own load-time
validation gauntlet (description.summary non-empty; a non-empty tier
must be one of 1..5, while an empty tier is allowed;
llm.provider/llm.model non-empty; context_limit shape; base_url is
optional for every family). It exists so
callers — notably the preset editor's commit path — can refuse to save
Next to this one in the catalogue, plus more from the same author.