fluent-builder-api-patterns

star 3

How to evolve VizCraft’s fluent Builder APIs: chainable methods, predictable defaults, stable id conventions, and careful back-compat overloads. Use when adding new builder methods or refactoring chaining.

ChipiKaf By ChipiKaf schedule Updated 2/23/2026

name: fluent-builder-api-patterns description: "How to evolve VizCraft’s fluent Builder APIs: chainable methods, predictable defaults, stable id conventions, and careful back-compat overloads. Use when adding new builder methods or refactoring chaining." license: Complete terms in LICENSE.txt

Fluent Builder API Patterns

Make chaining predictable

  • Builder methods return the builder (or a nested builder) consistently.
  • Defaults should be documented and stable.
  • Avoid surprising mutations; mutate only the builder instance state.

Keep state internal and serializable

  • Build functions produce data-only scenes/specs that can be serialized.
  • Keep DOM/runtime-only state out of serialized structures.

Use stable id conventions

  • Prefer explicit ids when provided; otherwise use deterministic conventions.
  • Keep ids stable across rebuilds to support runtime patching.

Back-compat without confusion

  • Use overloads to preserve old entry points while enabling typed variants.
  • Separate “legacy registry animations” from “data-only timeline specs”.

Provide internal escape hatches

  • Internal methods (e.g. underscored helpers) are allowed for advanced use.
  • Keep escape hatches documented and intentionally limited.
Install via CLI
npx skills add https://github.com/ChipiKaf/vizcraft --skill fluent-builder-api-patterns
Repository Details
star Stars 3
call_split Forks 0
navigation Branch main
article Path SKILL.md
More from Creator