Phation

v0.2.0
io.github.pnhathuy09/phation Checked 4 days ago Published 11 days ago

Motion rules and ready-made React + Motion interactions so your agent's animations feel right.

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

list_motions List motions

Every entry as one line (slug · name · category · tags). Optional category: Controls, Numbers & data, Text, Sheets & navigation, Media & scenes, Cursor & hover.

ParameterTypeDescription
categorystring

search_motions Search motions

Find entries by what the motion is for or how it should feel, e.g. "tactile quantity stepper", "calm bottom sheet".

ParameterTypeDescription
query *stringWhat the motion is for or how it should feel
categorystring
limitinteger

get_motion Get a motion

Spec (curves, springs, timings), its MOTION values, dependencies and media. The source is left out: add_motion writes it to disk. Pass code: true only to read it.

ParameterTypeDescription
slug *stringEntry slug
codebooleanInclude the full React source (~1–2k tokens)

add_motion Add a motion to the project

Write an entry's file (and its media) into the project, so you never retype it. Will not overwrite unless force. A Studio link (…/m/<slug>?…) in `from` writes its tuned values into MOTION.

ParameterTypeDescription
slug *string
dirstringdefault src/motion
forceboolean
fromstringStudio share link
projectRootstringProject path (default: cwd)
publicDirstringdefault public

get_standard Get the Phation Standard

The motion rules. No section: the ~600-token core (tokens, never-list, reduced motion, workflow). A section ("springs", "recipes", "accessibility", "code") for detail; "all" for everything.

ParameterTypeDescription
sectionstringe.g. "springs", "durations", "recipes", "accessibility", "code", "all"

install_standard Install the standard into the project

Write the standard as project rules for one tool (~600-token core) plus .phation/STANDARD.md (read on demand). AGENTS.md and CLAUDE.md are merged, never replaced.

ParameterTypeDescription
tool *string
forceboolean
projectRootstringProject path (default: cwd)

audit_motion Audit the motion of a page

Play a page in headless Chrome with the given actions, trace every element per frame and score the motion (PASS ≥ 85, no blockers). Returns each issue with time, element and the fix. 15–40 s; the page must be running.

ParameterTypeDescription
url *string
actionsarrayclick:<sel> hover:<sel> focus:<sel> scroll:<px> drag:<sel>:dx,dy hold:<sel>:ms key:<Key> type:<sel>:text wait:<ms>
darkboolean
jsonbooleanAdd raw JSON
mobileboolean
reducedbooleanCheck reduced motion (default true)
rootstringSelector to trace (default body)

animate_ui Animate the user's own UI

Read a .jsx/.tsx file or folder, name each part (button, card, sheet, modal, tabs, toggle, list, number…) and map it to a Phation recipe under one Feel. Default: plan only (~15 tokens a part). apply: true writes <file>.animated.tsx (write: true edits in place), adds one MOTION object and data-phation hooks, and returns only the changed lines; then run audit_motion with the listed actions. Parts marked "⚠ check" are guesses: confirm or fix them with roles: { "<line>": "<role>" }.

ParameterTypeDescription
path *stringFile or folder, relative to projectRoot
applyboolean
feelstringOne Feel for the screen (default fluid)
onlyarrayLimit to these recipe ids, e.g. ["press", "sheet-open"]
projectRootstring
rolesobjectFix detected roles: { "<line>": "button" }
writebooleanEdit the file in place instead of writing <file>.animated.tsx