算法艺术创作
algorithmic-art
通过代码和可调参数创作生成艺术与交互式视觉效果。
adversarial-ts-patterns【设计与创意】Use this skill to gate TypeScript and React application code with a pass/fail adversarial review of design-pattern usage — a single blind reviewer subagent judges a diff or file set against 18 decidable rules covering implicit state machines (boolean-flag lifecycles, useEffect chains, stored derived state, non-exhaustive union matches) and over-engin…
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
A design-pattern usage gate for TypeScript and React application code — 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.
The gate judges in both directions. Over-abstraction — Gang of Four and enterprise machinery ported from Java/C# where idiomatic TypeScript reaches for a function, a module, or a tagged union. Under-modeling — implicit state machines whose impossible states compile: boolean-flag lifecycles, effect chains, hand-synced derived state, silent default branches.
Do not apply to non-TypeScript 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 job of the curated implementation-design-patterns and implementation-functional-patterns skills. React-specific rules go N/A in non-React TypeScript projects; the rest of the gate works in any TypeScript application.
Follow these steps exactly — the gate's value is that every review runs the same way.
layer-no-single-impl-interface and layer-no-di-container-in-app rules require searching beyond the diff for second implementations and registrations.references/ (all state-*.md, create-*.md, behave-*.md, layer-*.md, react-*.md, oo-*.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 | State Modeling & Machines | state- | Discriminated unions over boolean flags, no effect chains, no stored derived state, exhaustive matches with never |
| 2 | Creational Ports | create- | No getInstance() singletons, no factory-class hierarchies, no builders for option bags |
| 3 | Behavioral Ports | behave- | Functions over single-method classes, unions over State/Visitor hierarchies, no event buses inside a React tree |
| 4 | Enterprise Layers | layer- | No pass-through repositories, no DI containers with single implementations, no single-implementation interfaces |
| 5 | React Composition | react- | No component inheritance, hooks over logic-only HOCs, props over imperative handles |
| 6 | OO Ceremony | oo- | No static-only container classes, no trivial accessor pairs |
implementation-design-patterns (curated) — the teaching-style reference for when a GoF class form is warranted; use it when the goal is guidance or refactoring rather than a verdict.implementation-functional-patterns (curated) — the GoF-to-functional map this gate's create-/behave- rules enforce the reviewable subset of.adversarial-tanstack / adversarial-zod — framework- and library-level gates for TanStack Start apps; run alongside this gate for full coverage of a Start diff.| 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 |