Feature Library

v0.3.2
com.featurelibrary/parts Checked 4 days ago Published 15 days ago

Measured WebGPU and web UI parts with guides and pitfalls.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

find_parts Find parts for a job

Free. Ranks the library’s parts for a job described in words, with why each fits and what it costs on the target platform (median ms a frame at 1920×1080 on a measured machine and tier). Strong matches for the job come first (each part says match: strong or loose, and which of the job’s words it matched), then looser ones; when nothing plainly does the job, every result is loose and nothingFits says so: build that piece yourself rather than force a part to fit; within each, parts that fit the platform and budget lead, then those over the budget (overBudget), then those that need WebGPU on…

ParameterTypeDescription
job *stringWhat the part has to do, e.g. "date range filter for a dashboard" or "grass that bends round a walker".
approachstringOptional: follow (the default: the library as it is) or inspire (your own concept first; parts and looks as references; default rules as advice). Accessibility and the licence bind in both. Also setta…
budgetnumberMs a frame the part may cost on that platform (the worse of GPU and CPU).
kitstringOptional: a kit id (e.g. dashboard) to search only its parts and those of the kits it is built on.
limitintegerAt most this many parts (default 10).
platformstringThe target: desktop (the reference laptop, the default), laptop (integrated GPU), phone, a machine id from a part’s costs, or "no-webgpu" for browsers without it.

get_kit Get a kit for a kind of build

Free. A tested set of parts for a kind of build (by kit id, or matched to the purpose in words), built on the foundations, with a tone applied when given: the parts with why, role, stack, needs and costs, the optional candidates, the glue you build yourself, what the library lacks, the tone’s settings and per-part knobs, and the looks that fit, at the level asked for (exact, tuned or inspired: what may change, what must stay); and the page shapes the purpose calls for (starting points for the page as a whole), or, when none fits, how to compose one.

ParameterTypeDescription
purpose *stringA kit id, or the kind of build in words, e.g. "a calm dashboard for finance".
approachstringOptional: follow (the default: the library as it is) or inspire (your own concept first; parts and looks as references; default rules as advice). Accessibility and the licence bind in both. Also setta…
levelstringHow closely the build follows a look: exact (the look as shipped; the dials and switches only, the default), tuned (also the look’s knobs, in range, then check_look) or inspired (your own look carry…
platformstringOptional target platform for the costs shown, as for find_parts.
tonestringOptional tone id from the catalogue (e.g. strict, refined, playful).

get_part Get a part’s card

The free card always (summary, role, needs, costs, public API signatures, pitfall titles, pairs-with). With a licence token that owns the part: the licensed card too, with every pitfall in full, the guide, documented signatures, the module’s files and the changelog. Read every pitfall before building with it.

ParameterTypeDescription
id *stringThe part id (an old id resolves to the renamed part).

get_recipe Get a recipe for a build

Licensed (needs a licence token). The wiring for a scenario: the kit that fits, the steps in order (tier, install, tokens, wiring between the parts, glue, what to build yourself, tone, checks), and for each part you own its pitfalls in full and its guide. Parts you don’t own are listed with their titles, to buy or replace.

ParameterTypeDescription
scenario *stringThe build in words, or a kit id.
approachstringOptional: follow (the default: the library as it is) or inspire (your own concept first; parts and looks as references; default rules as advice). Accessibility and the licence bind in both. Also setta…
levelstringHow closely the build follows a look: exact (the look as shipped; the dials and switches only, the default), tuned (also the look’s knobs, in range, then check_look) or inspired (your own look carry…
platformstringOptional target platform, as for find_parts.
tonestringOptional tone id.

install Install a part

Licensed (needs a licence token that owns the part). Returns the part’s module/ files, each marked with the licence and this fetch, plus NOTICE.md where there is one and the licence; and first, save: a link and one shell command that write exactly those files to disk (use it: the files carry invisible markers that copying them out of the reply loses). The files also come as resources. Pin a version to be sure of what you get. Also takes a look id (e.g. splash, with a whole-library licence): the look’s stylesheet, its backdrop where it has one, the shared dials and the plain tokens, and the…

ParameterTypeDescription
id *stringThe part id, or a look id.
pathstringOptional: one file of it, as listed in files (e.g. module/charts.ts): returned as plain text, marked, with its SHA-256. For clients that cannot show the files as resources, or a reply too large to rea…
versionstringOptional: the version to install. A part serves its current version only; a look also serves the earlier versions it keeps (library-<commit>, listed in its reply).

get_playbook Read a playbook

Free. The library’s playbooks: how parts are placed, moved, made accessible and kept fast, with the reason for every rule and a checklist. Without an id, the list (title, summary, the parts each covers); with an id, the playbook in full as markdown. get_kit and get_recipe name the playbooks that cover their parts: read those (playbooks) before wiring the parts; the ones under playbooksIfUsed only when the build uses that part or does that work.

ParameterTypeDescription
idstringOptional: the playbook id, e.g. placement or accessibility.

check_look Check a build’s touch on a look

Free. Runs the library’s own checker on how a build uses a look: each override is one of the look’s knobs, of its kind and in range; each switch is one of its options; and text contrast holds (WCAG AA) in each mode at the dials’ extremes with the overrides applied. Returns ok, the problems in sentences, the label the build may use ("In Splash", "Splash, tuned"; none for inspired) and, for a tuned build that passes, the stylesheet to load after the look’s.

ParameterTypeDescription
look *stringThe look id, e.g. splash.
approachstringOptional: follow (the default: the library as it is) or inspire (your own concept first; parts and looks as references; default rules as advice). Accessibility and the licence bind in both. Also setta…
dialsobjectOptional: { liveliness, fidelity, density }, each 0 to 100; the look’s own for any left out.
levelstringOptional: tuned when overrides are given, otherwise exact.
modestringOptional: check one mode; every mode the look has when left out.
overridesobjectOptional: knob values, { "--accent": "#0f6e66" } for every mode, or per mode { "light": {…}, "dark": {…} }.
switchesobjectOptional: switch values by attribute, e.g. { "data-splash-drips": "liquid" }.

check Check versions, licences and the checklist

Free. The rules version (its hash) and the catalogue version, the checks to run on the build before calling it done, the runnable checks (get_check) that prove the ones a checklist can’t, and, with a licence token, the account’s licences and the parts it owns. Pass evidence (what the checks returned, area by area) and it says whether the build may be called done, and what is missing.

ParameterTypeDescription
approachstringOptional: follow (the default: the library as it is) or inspire (your own concept first; parts and looks as references; default rules as advice). Accessibility and the licence bind in both. Also setta…
decisionsarrayOptional: the library defaults this build broke, as design decisions: [{ rule, chose, why }]. The person’s wishes win over defaults; say why for each.
evidenceobjectOptional, before calling a build done: { layout: [layoutProbe.steps/toggle results], rings: [layoutProbe.rings results], motion: { reducedMotion: true, how }, performance: { msPerUpdate, target }, pla…

get_check Get a runnable check

Free. Scripts you run on your own build, in its page, for what a checklist can’t prove: layout-probe measures that nothing moves when the view changes state (column edges, row tops, controls that come and go) and that every focus ring shows whole. Without an id, the list with what each proves and how to run it; with an id, the script itself as text. Run them at every width you claim and pass the results to check({ evidence }).

ParameterTypeDescription
idstringOptional: the check id, e.g. layout-probe.

get_shape Get a page shape

Free. The page shapes: starting points for a whole page by kind (app workspace, dashboard, product reveal, service landing, story, personal homepage, event, shop, game), each with its reader’s job, reading path, first screen, header, structure, phone, motion, what fits and what not to do. Without an id, the list; with an id, the shape in full; with "compose", the method for a page no shape fits, with a worked example. A shape is where to start, never a template: pick one or compose, and name it in your notes.

ParameterTypeDescription
idstringOptional: a shape id, or "compose".

get_brief Get the rules

Free. The agent protocol (rules.md) to follow, in order, when building with the library’s parts. Also the resource feature-store://rules.md.

ParameterTypeDescription
approachstringOptional: follow (the default: the library as it is) or inspire (your own concept first; parts and looks as references; default rules as advice). Accessibility and the licence bind in both. Also setta…