brainstorming
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).
adversarial-zodUse this skill to gate Zod 4 schema code in TypeScript and TanStack Start apps with a pass/fail adversarial review — a single blind reviewer subagent judges a diff or file set against 24 decidable rules covering silent Zod 3-to-4 semantic breaks (defaults, enum-keyed records, boolean coercion), removed APIs (including the z.interface hallucination), unified…
Independent GitHub snapshot · Automated classification · Original documentation governs
A currency and correctness gate for Zod schema code in TypeScript apps — a pass/fail gate: a single blind reviewer subagent judges the work against this gate's rules with an adversarial mandate, and the work passes only when every rule is PASS or N/A. This skill renders verdicts; it never fixes the work.
Rules are pinned to zod 4.4.x (package root since zod@4.0.0, July 2025) and, for the start- category, the TanStack Start v1 RC (.validator() current, .inputValidator() deprecated).
z.interface() hallucination..default() short-circuiting, exhaustive enum-keyed records, z.coerce.boolean() on string flags).Do not apply to Zod 3 codebases (the reviewer prompt's precondition aborts with "GATE NOT APPLICABLE"), or when the user wants explanations and refactors rather than a verdict — that is the curated zod distillation skill's job. The two start- rules go N/A outside TanStack apps; the rest of the gate works in any TypeScript project using Zod 4.
Follow these steps exactly — the gate's value is that every review runs the same way.
package.json in the target paths — the Zod-4 precondition and the pkg-, compose-native-json-schema, and start- adapter rules are decided by its dependency pins even when the diff does not touch it.references/ (all sem-*.md, gone-*.md, err-*.md, dep-*.md, compose-*.md, start-*.md, pkg-*.md files).If the same rule flips verdicts across re-reviews of an unchanged target, or a human reads the evidence and overrides the verdict, that is a decidability bug in the rule — record it in gotchas.md and sharpen the rule; do not override the gate.
The reviewer returns, per rule: PASS | FAIL | N/A, evidence (file:line or a quote — required for PASS as well as FAIL), and for every FAIL, the fix that flips the rule to PASS once applied — the named change plus its location, never a restatement of the violation. The final report follows assets/templates/verdict.md.
| # | Category | Prefix | Covers |
|---|---|---|---|
| 1 | Silent Semantic Breaks | sem- | .prefault() for parsed defaults, z.partialRecord() for sparse enum keys, z.stringbool() for string flags |
| 2 | Removed APIs | gone- | .ip()/.cidr(), single-arg z.record(), error params trio, .errors getter, function factory, z.interface() hallucination |
| 3 | Error Customization & Formatting | err- | Unified error param over message, top-level z.treeifyError/z.flattenError/z.prettifyError |
| 4 | Deprecated Method Forms | dep- | Top-level string formats, z.strictObject/z.looseObject, .extend over .merge, z.enum over z.nativeEnum, z.int(), no z.promise() |
| 5 | Composition, Recursion & Codecs | compose- | Getter recursion, z.codec() for bidirectional wire transforms, native z.toJSONSchema() |
| 6 | TanStack Start Integration | start- | Bare schema to .validator(), adapter-free validateSearch |
| 7 | Packaging & Imports | pkg- | Root "zod" import path, zod/mini reserved for hard bundle constraints |
zod (curated) — the teaching-style distillation for Zod usage; use it when the goal is explanation or refactoring rather than a verdict.adversarial-tanstack — the framework-level gate for TanStack Start apps; run both on a Start diff for full coverage (its serverfn-validate-input checks that a validator exists; this gate's start- rules check the validator uses current Zod 4 patterns).| File | Description |
|---|---|
| references/reviewer-prompt.md | Self-contained prompt template for the blind reviewer |
| assets/templates/verdict.md | Verdict report template |
| references/_sections.md | Category definitions and ordering |
| metadata.json | Version and source references |