### Setup Pingfusi with npx Source: https://github.com/alex-durango/pingfusi/blob/main/README.md Run this command to set up Pingfusi for your coding agents. It installs and performs onboarding. ```sh npx pingfusi setup ``` -------------------------------- ### Quick start by hand: clone a site with pingfusi CLI Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/use-cases/copy-anything.mdx Run these commands in order to scaffold a new clone, start the snapshot receiver, serve the clone, and run the next step. The viewport width is 1728 px by default. `next` will not file the final page round early; it routes capture, layout, interaction, and motion through their gates first. ```sh pingfusi new acme https://www.example.com/ 1728 # scaffold targets/acme/ (1728 = viewport width in px — the default; measured throughout) ``` ```sh pingfusi sink # snapshot receiver on :7799 (separate terminal) ``` ```sh pingfusi serve acme # serve the clone + capture tools on :8080 ``` ```sh pingfusi next acme # run the exact command printed; repeat after each step ``` -------------------------------- ### Pingfusi CLI Commands Source: https://github.com/alex-durango/pingfusi/blob/main/README.md List of CLI commands for Pingfusi: setup, doctor, ask, and studio. The full command documentation is in docs/COMMANDS.md. ```sh pingfusi setup install + onboarding pingfusi doctor check the install; prints a fix per problem pingfusi ask "" ask a human reviewer, from any directory pingfusi studio [ping_id] local viewer for review results — sessions, recordings, transcripts, key moments, agent findings (contract: docs/STUDIO.md) ``` -------------------------------- ### pingfusi adopt, publish: register and host a review-only target Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/use-cases/your-own.mdx Register a review-only target once, then host the static bundle (index.html at its root) to get a hosted, byte-verified public URL. The comment notes that a live dev server publishes with `pingfusi tunnel launch-copy --url http://localhost:3000` instead. ```sh pingfusi adopt launch-copy https://your-product.example/ cp -R dist/. targets/launch-copy/clone/ # your rendered draft page pingfusi publish targets/launch-copy/clone --name launch-copy \ --record launch-copy-draft.json # hosted, byte-verified public URL ``` -------------------------------- ### Scaffold and serve target site Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/develop/improving-the-kit.mdx Commands to scaffold a new target, start the snapshot receiver, and serve the clone with tools. ```sh node harness/new-target.js siteA https://www.example.com/ 1728 # scaffold targets/siteA/ node tools/sink.js & # snapshot receiver :7799 node harness/serve.js siteA # serve clone + /tools :8080 ``` -------------------------------- ### pingfusi motion install Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/commands.mdx Installs the motion engine's dependencies. Lazy — the core CLI runs without them. ```APIDOC ## pingfusi motion install ### Description Installs the motion engine's dependencies. Lazy — the core CLI runs without them. ### Method CLI ### Command `pingfusi motion install` ``` -------------------------------- ### pingfusi CLI command overview Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/commands.mdx Lists all pingfusi CLI commands with brief descriptions. Includes setup, doctor, where, remove, ask, publish, and studio. The studio command is a local results viewer with many options and caveats. ```text pingfusi setup first contact — interactive onboarding pingfusi doctor read-only preflight; a fix command per miss pingfusi where print the installed kit's directory pingfusi remove clean uninstall (also sweeps older-generation installs) pingfusi ask "" [--options "A,B,C"] [--context "…"] one advisory question to a human reviewer, from any directory. text-only: the reviewer sees just the question string — anything they must look at goes through `pingfusi publish` + a review round instead pingfusi ask result passive answer snapshot (free; does not renew) pingfusi publish host a self-contained site or seekable MP4 (`--target`, `--record`, and `--json` available) pingfusi studio [ping_id ...] LOCAL RESULTS VIEWER: fetches a round's results over the wire and caches them — JSON + media bytes — under /.pingfusi/studio/ (signed media urls die in ~1h and objects are retention-swept; the cache outlives both), then serves a read-only page at http://localhost:7788: per-session recording playback, think-aloud transcript (click-to-seek), questionnaire matrix with per-item means, reviewer comments, and the agent-written findings in annotations.json — rendered as a findings tab plus a per-session "key moments" rail (evidence anchors seek the recording; time_ms+end_ms anchors mark clips). The ANALYSIS IS THE AGENT'S JOB: the command prints which cached rounds have transcripts but no annotations yet, and docs/STUDIO.md is the authoring contract. `--port N`, `--open` (browser stays opt-in), `--fetch-only`, `--no-media`, `--json` (carries analysis_needed paths). No ids = refresh cached in-flight rounds + serve. Never a review surface: verdicts come from the independent reviewer; the studio only shows them. A second, purely local axis: MACHINE RUNS — the rig harness plays builds by virtual gamepad and writes .pingfusi/studio/runs// (a pingfusi-rig-run/v1 receipt plus optional recording, screenshots, annotations), which the studio serves read-only. Runs appear grouped by gym: per-gym pass/fail with failure causes and an fps-across-builds chart, plus a per-run view (events, warnings, fps sparkline, recording with event seek). Machine runs are labeled as such: a RUN is never a review round — no reviewer, no filing, no charge. Its RECORDING may still be filed as ordinary video stimulus, told to the reviewer as machine-played; the run's own findings never travel with it ``` -------------------------------- ### motion-items.json receipt example Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/clone/workflow.mdx Shows the per-element bookkeeping written to targets//motion-items.json (schema pingfusi/motion-items@2). The 'action' field records what the pass did (css-inherited, player-applied, or skipped), 'verify' holds the machine check result (pass, warn, or skipped), and 'status' mirrors verify; pass and receipted skipped are terminal, anything else stays pending for pingfusi next. ```json { "schema": "pingfusi/motion-items@2", "items": [ { "id": "pass-css-6564ab92", "selector": ".hero", "scope": ".hero", "tier": "introspected-css", "action": "css-inherited", "verify": "pass", "receipt": "1 track(s) carried by the captured CSS; @keyframes fadeIn present …", "source": "motion-pass", "status": "pass" } ] } ``` -------------------------------- ### pingfusi sink Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/commands.mdx Starts the snapshot receiver on port 7799. ```APIDOC ## pingfusi sink ### Description Starts the snapshot receiver on port 7799. ### Method CLI ### Command `pingfusi sink` ``` -------------------------------- ### Install motion engine dependencies and run selftests Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/develop/motion-engine.mdx Install this package's node dependencies on demand and run the engine's own selftests from the repo root. The core CLI runs without these dependencies present; there is no npm postinstall. ```sh pingfusi motion install # install this package's node deps ``` ```sh npm --prefix packages/motion test # the engine's own selftests (from the repo root) ``` -------------------------------- ### Print behavior worksheet Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/clone/runbook.mdx Print one row per behavior (observed and declared) with its disposition. Every unresolved row gets a ready-to-send one-sided poll question for the reviewer. ```shell pingfusi behavior-worksheet ``` -------------------------------- ### Run pingfusi ask with options and context Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/develop/core.mdx Use this command to file an ask without a target or targets/ directory, runnable from any directory with a review login. State is recorded per-ask in ~/.pingfusi/asks/.json. The output confirms the ask is filed and ping completes with 1/1 responses. ```bash $ pingfusi ask "Which tagline reads better for a developer tool?" \ --options "Draft first,Review everything" --context "two candidates for the launch page" ✓ ask filed — ping 3f2b… (1 result, advisory; recorded: ~/.pingfusi/asks/3f2b….json) Ping complete: 1/1 responses received. ``` -------------------------------- ### Prompt the agent to render and review a video with pingfusi Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/use-cases/video-review.mdx Use this prompt to instruct the agent to render an intro animation and have a human check it against the brief using pingfusi. The agent publishes the render, the reviewer provides timestamped feedback, and the agent re-renders until the verdict matches. ```txt Render the intro animation, then have a human check it matches the brief with pingfusi. ``` -------------------------------- ### Build clone by capture (pingfusi capture-build) Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/clone/playbook.mdx Builds a clone from the captured DOM, self-hosting CSS and fonts while stripping scripts and CSP but preserving the doctype. Exits 0 on success; a failed asset download is loud, never silent. ```shell pingfusi capture-build # self-hosts CSS+fonts, strips scripts/CSP, PRESERVES the doctype ``` -------------------------------- ### File Video Review with Brief Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/skills/review-video-with-pingfusi.mdx Files a video review round against a caller-owned state file when matching a render to a brief. Requires current_brief, prompt_history, and requirements; n_target is 1 and approve_verdicts defaults to 'Matches the prompt'. ```js const core = require("pingfusi/packages/core"); const { ping_id } = await core.review.file(stateFile, { media_type: "video", video_url, current_brief, prompt_history, // [{ id, text, state: "active"|"replaced"|"context", replaced_by? }] requirements, // [{ id, text, prompt_ids }] n_target: 1, approve_verdicts: ["Matches the prompt"], // local bookkeeping, stripped before the wire }); ``` -------------------------------- ### One-call capture with pxCaptureAll Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/clone/runbook.mdx Use on a hosted session (Step 0) on the live tab to settle, enumerate, and capture live.json, coverage.json, and dom.html in one call. Later on the clone tab, call with {prefix:'clone'}. Read the returned report before advancing; aborted:"settle-not-stable" means nothing was captured. ```javascript await pxCaptureAll('') // settle → enumerate → live.json + coverage.json + dom.html ``` -------------------------------- ### Run behavior capture with pingfusi CLI Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/clone/runbook.mdx Use this command to run behavior discovery for a named target. It launches a Chrome instance with throttling disabled, proves the compositor is advancing, and writes behaviors-*.json files. It is invisible by default (headless=new) and only shows a window with --headful. ```sh pingfusi behavior-capture # both sides, probe-gated, writes behaviors-*.json directly ``` -------------------------------- ### pingfusi motion sample Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/commands.mdx The deterministic sampled-tier machine chain. ```APIDOC ## pingfusi motion sample ### Description The deterministic sampled-tier machine chain. ### Method CLI ### Command `pingfusi motion sample …` ``` -------------------------------- ### Run pixel diff locally (visual and strict) Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/clone/runbook.mdx Run the pixel diff tool against live and clone snapshots. The first command with --visual checks visual identity (exit 0 = pass). The second command without --visual performs a strict comparison that also flags structural CSS differences. ```sh node tools/pixel-diff.js live.json clone.json --visual # "does it look identical?" exit 0 = pass node tools/pixel-diff.js live.json clone.json # strict: also flags structural CSS ``` -------------------------------- ### Inject behavior capture with marquee and hover triggers Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/clone/runbook.mdx Set up behavior capture on the LIVE tab by injecting tools/behavior-capture.js, defining pxRegion, and specifying marquee selectors and hover triggers. Then send the behavior data to the local endpoint. ```javascript opts = { marqueeSelectors: [["logo_belt", ".belt-wrapper"]], hoverTriggers: [["nav_product", "nav a[href*=product]"]] } ``` ```javascript await pxBehaviorSend('http://localhost:7799/behaviors-live.json', opts) ``` -------------------------------- ### Require pingfusi/packages/core and list core verbs Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/develop/core.mdx Shows how to load the core package and enumerates the available verbs: core.ping, core.review.file, core.review.wait, core.review.verify, core.draft.push, core.draft.status, core.draft.delete, and the primitives core.wire, core.rounds, core.drafts, core.tunnel. The core is CommonJS with zero dependencies. ```javascript const core = require("pingfusi/packages/core"); // core.ping / core.pingResult — one question // core.review.file / core.review.wait / core.review.verify — a full round // core.draft.push / core.draft.status / core.draft.delete — a hosted draft // primitives underneath: core.wire, core.rounds, core.drafts, core.tunnel ``` -------------------------------- ### pingfusi capture-build Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/commands.mdx Builds the clone from the captured live DOM. ```APIDOC ## pingfusi capture-build ### Description Builds the clone from the captured live DOM. ### Method CLI ### Command `pingfusi capture-build ` ### Parameters - **name** (string) - Required - The name of the clone target. ``` -------------------------------- ### pingfusi serve Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/commands.mdx Serves the clone along with capture tools. ```APIDOC ## pingfusi serve ### Description Serves the clone along with capture tools. ### Method CLI ### Command `pingfusi serve [port]` ### Parameters - **name** (string) - Required - The name of the clone target. - **port** (number) - Optional - The port to serve on. ``` -------------------------------- ### Run pixel-diff.js with --visual and strict modes Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/clone/playbook.mdx Use these commands to compare live and clone JSON files. The --visual flag checks only pixel-determining properties and exits 0 on pass; strict mode also flags structural differences. ```sh node tools/pixel-diff.js live.json clone.json --visual # "does it look identical?" exit 0 = pass node tools/pixel-diff.js live.json clone.json # strict: also flags structure ``` -------------------------------- ### Publish Video Render Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/skills/review-video-with-pingfusi.mdx Publishes an MP4 render through Pingfusi hosting, creating a player wrapper and returning a direct asset_url. The hosted-video cap is 25 MB per render; use a long-lived public host that serves Range requests if the file cannot fit. ```sh pingfusi publish --name -round-1 \ --record .pingfusi/video//round-1.json --json ``` -------------------------------- ### Adopt, publish, and review a draft Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/use-cases/copy-anything.mdx Registers a draft with its original site and viewport width, hosts the production build, then sends a review round for human feedback. The viewport width is in pixels and defaults to 1728. ```sh pingfusi adopt mydraft https://original-site.com/ 1728 # register your draft + the original it should match (1728 = viewport width in px — the default) pingfusi publish dist --target mydraft # host the production build with Pingfusi pingfusi review mydraft file # a human reviewer answers in minutes ``` -------------------------------- ### core.review.file: file a generic review round with judgment steps Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/use-cases/your-own.mdx Files a review round with judgment-shaped steps and a binary verdict list against a state file. The `approve_verdicts` array marks the unmistakable approving verdict. Requires the `pingfusi/packages/core` module and a draft.json file with a `url` property. ```js const core = require("pingfusi/packages/core"); const draft = JSON.parse(require("fs").readFileSync("targets/launch-copy/draft.json", "utf8")); const { ping_id } = await core.review.file("launch-copy-review.json", { url: draft.url, instructions: "You are reading the launch page for a developer tool. Judge the copy, not the code.", steps: [ { text: "Read the hero. Do you know what the product does?", options: ["Clear", "Vague"], check: null }, { text: "Read the rest. Pin a comment on anything confusing or overclaiming.", check: null }, { text: "Verdict.", options: ["Ship it", "Needs changes"], check: null }, ], n_target: 3, verdict_options: ["Ship it", "Needs changes"], approve_verdicts: ["Ship it"], }); ``` -------------------------------- ### Run pixel-diff to measure computed style Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/clone/playbook.mdx Run the pixel-diff tool to compare the element's computed style between live and clone. The PAINT bucket lists visible differences to fix; STRUCTURAL differences are demoted. ```shell node tools/pixel-diff.js --inspect el_live.json el_clone.json ``` -------------------------------- ### Run comparison assist when stalled Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/clone/runbook.mdx When score/status print STALLED, run this to file a scoped side-by-side diagnostic round. --compare is required; bare pingfusi assist refuses. One open assist per target. ```bash pingfusi assist --compare ``` -------------------------------- ### pingfusi draft push Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/commands.mdx Uploads the clone as a HOSTED draft with a stable public URL. ```APIDOC ## pingfusi draft push ### Description Uploads the clone as a HOSTED draft with a stable public URL that survives your machine sleeping (review default). ### Method CLI ### Command `pingfusi draft push` ### Parameters - **name** (string) - Required - The name of the clone target. ``` -------------------------------- ### CLI: pingfusi ask with options and context Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/use-cases/quick-question.mdx Run this command to ask a quick question from the CLI. The ask command automatically chains wait legs until an answer arrives or the caller cancels. The reviewer receives only the question string and tappable options; no URLs, images, or pages are opened. ```sh pingfusi ask "Which tagline reads better for a developer tool?" \ --options "Draft first,Review everything" --context "two candidates for the launch page" ``` -------------------------------- ### pingfusi ledger Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/commands.mdx Shows the audit trail. ```APIDOC ## pingfusi ledger ### Description Shows the audit trail. ### Method CLI ### Command `pingfusi ledger ` ### Parameters - **name** (string) - Required - The name of the clone target. ``` -------------------------------- ### Clone a website with pingfusi Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/use-cases/copy-anything.mdx Use this command to clone any website pixel-perfect through an evidence-driven iteration loop. The command is a natural-language instruction to the pingfusi agent. ```text clone www.example.com. use pingfusi. ``` -------------------------------- ### pingfusi new Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/commands.mdx Scaffolds a clone target with the given name, URL, and optional width. ```APIDOC ## pingfusi new ### Description Scaffolds a clone target with the given name, URL, and optional width. ### Method CLI ### Command `pingfusi new [width]` ### Parameters - **name** (string) - Required - The name of the clone target. - **url** (string) - Required - The URL of the target site. - **width** (number) - Optional - The width for the clone. ``` -------------------------------- ### pingfusi motion tune Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/commands.mdx Converges difficult timing/spring/easing behavior. ```APIDOC ## pingfusi motion tune ### Description Converges difficult timing/spring/easing behavior. ### Method CLI ### Command `pingfusi motion tune …` ``` -------------------------------- ### Open a hosted capture session with pingfusi capture open Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/clone/runbook.mdx Opens a 24-hour hosted capture session on the review service, returning a sink_url. Use this default path when the page's CSP permits the service origin. Each delivery call answers with 'ok — N bytes, sha256 …'; a 409 means the payload was truncated and nothing was stored, so re-send. ```sh pingfusi capture open # → sink_url (24h session on the review service) ``` -------------------------------- ### Publish before state with pingfusi publish Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/skills/beautify-with-pingfusi.mdx Publishes the untouched page to Pingfusi hosting and records an immutable receipt. Use a unique name for the before state and specify the built directory. ```sh pingfusi publish --name -before \ --record .pingfusi/beautify//before.json --json ``` -------------------------------- ### pingfusi motion apply-sampled Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/commands.mdx The deterministic sampled-tier machine chain. ```APIDOC ## pingfusi motion apply-sampled ### Description The deterministic sampled-tier machine chain. ### Method CLI ### Command `pingfusi motion apply-sampled …` ``` -------------------------------- ### pingfusi CLI command overview Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/commands.mdx Lists all top-level pingfusi commands with their arguments and brief descriptions. Covers scaffolding, adoption, building, serving, drafts, tunneling, sink, scoring, diffing, routing, motion utilities, review, waiting, status, gating, advancing, and ledger. ```text pingfusi new [width] scaffold a clone target pingfusi adopt [width] register an external draft for review-only pingfusi capture-build build the clone from the captured live DOM pingfusi serve [port] serve the clone + capture tools pingfusi draft push upload the clone as a HOSTED draft — stable public url, survives your machine sleeping (review default) pingfusi draft status|delete re-verify / delete the hosted draft pingfusi tunnel [--url ] fallback for apps that truly require a live server (named cloudflared tunnel → ngrok → anonymous quick tunnel; the last is rate-limited and says so) pingfusi sink snapshot receiver (:7799) pingfusi score live-vs-clone score + delta vs last run pingfusi diff raw numeric diff (--visual | strict) pingfusi next [--json] route the next failure to the right utility ``` ```text pingfusi motion pass re-run the build motion pass standalone (capture-build runs it automatically; receipts + warnings, never a gate) pingfusi motion install install the motion engine's deps (lazy — the core CLI runs without them) pingfusi motion verify-introspected … exact live-vs-clone diff of the page's own engine declarations pingfusi motion sample|apply-sampled|verify-sampled … the deterministic sampled-tier machine chain pingfusi motion capture|trace … capture CSS/WAAPI or fitted JS/canvas motion pingfusi motion gate|export … replay-check and export a reusable motion entry pingfusi motion loop|nudge|tune … converge difficult timing/spring/easing behavior ``` ```text pingfusi review file [--results 1..20] file a scope-pinned review round (default 1) pingfusi review poll "q" 1-result mid-round micro-check with a reviewer pingfusi wait continue a pending ping through client-safe wait legs pingfusi status phase table + next required action pingfusi gate run one gate read-only (exit 0/1) pingfusi advance record a phase (gate must pass) pingfusi ledger the audit trail ``` -------------------------------- ### core.tunnel.startPublicTunnel({ origin | port, allowQuick, hint }) Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/develop/core.mdx Opens the most stable transport available — an operator-provisioned named cloudflared tunnel, then ngrok, then (only with allowQuick, and with a printed warning) an anonymous quick tunnel. Anonymous quick tunnels are rate-limited: they 429 under real use, and a throttled url mid-round burns a paid round exactly like a dead one. It returns { url, kind, detail, stop(), onExit(cb) } and verifies nothing — proving the url serves the right bytes is the caller's gate. ```APIDOC ## core.tunnel.startPublicTunnel({ origin | port, allowQuick, hint }) ### Description Opens the most stable transport available — an operator-provisioned named cloudflared tunnel, then ngrok, then (only with allowQuick, and with a printed warning) an anonymous quick tunnel. Anonymous quick tunnels are rate-limited: they 429 under real use, and a throttled url mid-round burns a paid round exactly like a dead one. It returns { url, kind, detail, stop(), onExit(cb) } and verifies nothing — proving the url serves the right bytes is the caller's gate. ### Parameters - **origin** (string) - Optional - The origin URL to tunnel to (alternative to port). - **port** (number) - Optional - The local port to tunnel to (alternative to origin). - **allowQuick** (boolean) - Optional - Whether to allow anonymous quick tunnels. - **hint** (string) - Optional - A hint for the tunnel. ### Returns - **url** (string) - The public URL of the tunnel. - **kind** (string) - The kind of tunnel (e.g., 'named', 'ngrok', 'quick'). - **detail** (string) - Additional details. - **stop** (function) - Stops the tunnel. - **onExit** (function) - Registers a callback for when the tunnel exits. ``` -------------------------------- ### pingfusi motion loop Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/commands.mdx Converges difficult timing/spring/easing behavior. ```APIDOC ## pingfusi motion loop ### Description Converges difficult timing/spring/easing behavior. ### Method CLI ### Command `pingfusi motion loop …` ``` -------------------------------- ### Capture and POST clone page to localhost Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/clone/runbook.mdx Load the capture code on the clone tab (same-origin localhost, no CSP) and send the capture to the local server. Returns "ok clone.json". ```javascript await pxSend('http://localhost:7799/clone.json') // capture + POST, returns "ok clone.json" ``` -------------------------------- ### draft.push(dir) Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/develop/core.mdx Uploads a static bundle (index.html at its root) with the create → upload → finalize → byte-verify sequence: after finalizing, the served bytes are fetched and compared against the local index.html with the service's known /assets/ → /d//assets/ rewrite applied. A push that doesn't verify throws — a record is returned only for a draft that provably serves. ```APIDOC ## draft.push(dir) ### Description Uploads a static bundle (index.html at its root) with the create → upload → finalize → byte-verify sequence: after finalizing, the served bytes are fetched and compared against the local index.html with the service's known /assets/ → /d//assets/ rewrite applied. A push that doesn't verify throws — a record is returned only for a draft that provably serves. ### Parameters - **dir** (string) - Required - Directory containing the static bundle (index.html at its root). ``` -------------------------------- ### File custom review round with core.review.file Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/skills/beautify-with-pingfusi.mdx Files a single custom review round against the current public URL. Uses the Pingfusi core API to create a review with steps, verdict options, and no evidence requirement. The review state is saved to a JSON file. ```js const fs = require("node:fs"); const path = require("node:path"); const { execFileSync } = require("node:child_process"); const kit = execFileSync("pingfusi", ["where"], { encoding: "utf8" }).trim(); const core = require(path.join(kit, "packages/core")); const stateFile = path.resolve(".pingfusi/beautify//review.json"); fs.mkdirSync(path.dirname(stateFile), { recursive: true }); const currentDraft = JSON.parse(fs.readFileSync(".pingfusi/beautify//current.json", "utf8")); const currentPublicUrl = currentDraft.url; // the just-published, verified record const verdicts = ["Professionally polished", "Needs another pass"]; const { ping_id } = await core.review.file(stateFile, { url: currentPublicUrl, title: "Is this page professionally designed?", instructions: "Judge the current page on its own purpose. Add sticky comments or draw on exact current-page regions that still feel generic, messy, inconsistent, or hard to use.", steps: [ { text: "First impression: does this feel intentionally and professionally designed?", options: ["Clearly polished", "Almost there", "Still rough"], check: null }, { text: "Check hierarchy, typography, spacing, alignment, color, and contrast. Pin a sticky comment or draw on every current-page region that needs a specific change.", check: null }, { text: "Check desktop and phone layouts, interaction states, and any motion. Note clipping, awkward wrapping, weak affordances, or distracting effects.", check: null }, { text: "FINAL REQUIRED STEP — verdict. Pick one exactly.", options: verdicts, check: null }, ], verdict_options: verdicts, approve_verdicts: [verdicts[0]], n_target: 1, // The single-page reviewer stores sticky comments and drawings directly; // it does not upload a reviewer screenshot. require_evidence: "none", }); ``` -------------------------------- ### Probe localhost sink reachability with fetch Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/clone/runbook.mdx Probes whether the page can POST to a localhost sink (node tools/sink.js) to skip the network round-trip. A clean ~4s abort or a 45s hang with no sink log entry indicates the automation extension is blackholing page→localhost; a 45s hang on a site with strict connect-src indicates the site's CSP. Use the hosted session if this probe fails. ```js fetch('http://localhost:7799/probe.json',{method:'POST',body:'{"probe":1}'}) .then(r=>r.text()).then(t=>window.__post=t).catch(e=>window.__post='ERR:'+e.message) ``` -------------------------------- ### File Video Review Without Brief Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/skills/review-video-with-pingfusi.mdx Files a video review round when judging any other video without a brief. Uses title, video_headline, video_intro, steps, and verdict_options; n_target is 3 and approve_verdicts is 'Ready to run'. url and draft_url must be absent. ```js const { ping_id } = await core.review.file(stateFile, { media_type: "video", video_url, title: "Launch video, third cut", // PUBLIC — on the browsing row video_headline: "Does this ad land?", // private, top of the reviewer's panel video_intro: "Watch it once at full speed, then scrub back to anything that made you hesitate.", steps: [ // private; your questions { text: "Would you keep watching past the first five seconds?", options: ["Yes", "No"] }, { text: "What is this selling, in your words?" }, ], verdict_options: ["Ready to run", "Needs another cut"], // private n_target: 3, approve_verdicts: ["Ready to run"], }); ``` -------------------------------- ### pingfusi motion verify-introspected Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/commands.mdx Exact live-vs-clone diff of the page's own engine declarations. ```APIDOC ## pingfusi motion verify-introspected ### Description Exact live-vs-clone diff of the page's own engine declarations. ### Method CLI ### Command `pingfusi motion verify-introspected …` ``` -------------------------------- ### pingfusi motion commands Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/clone/workflow.mdx List of root commands for the temporal engine, including pass, verify-introspected, sample, apply-sampled, verify-sampled, capture, trace, loop, and export. Each command is invoked with specific arguments and options. ```sh pingfusi motion pass [--no-probe] # re-run the build motion pass standalone pingfusi motion verify-introspected pingfusi motion sample [--fps 60] [--frames 240] pingfusi motion apply-sampled pingfusi motion verify-sampled pingfusi motion capture --trigger 'hover:.card' --out targets//motion/card-capture pingfusi motion trace --trigger 'scroll-through:#stage/80/16' --out targets//motion/circle-trace pingfusi motion loop targets//motion/open-trace --out targets//motion/open-round pingfusi motion export targets//motion/circle-trace --out targets//motion/library ``` -------------------------------- ### Build the pingfusi Desktop Extension with npx @anthropic-ai/mcpb pack Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/desktop-extension.mdx Run this command from the source directory to package the extension into pingfusi.mcpb. The canonical signed download is available at https://pingfusi.com/pingfusi.mcpb. ```bash npx @anthropic-ai/mcpb pack desktop-extension pingfusi.mcpb ``` -------------------------------- ### pingfusi motion nudge Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/commands.mdx Converges difficult timing/spring/easing behavior. ```APIDOC ## pingfusi motion nudge ### Description Converges difficult timing/spring/easing behavior. ### Method CLI ### Command `pingfusi motion nudge …` ``` -------------------------------- ### pingfusi motion verify-sampled Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/commands.mdx The deterministic sampled-tier machine chain. ```APIDOC ## pingfusi motion verify-sampled ### Description The deterministic sampled-tier machine chain. ### Method CLI ### Command `pingfusi motion verify-sampled …` ``` -------------------------------- ### draft.status(record, indexPath) Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/develop/core.mdx Re-runs the rewrite-aware verify on a recorded draft. ```APIDOC ## draft.status(record, indexPath) ### Description Re-runs the rewrite-aware verify on a recorded draft. ### Parameters - **record** (object) - Required - The draft record to verify. - **indexPath** (string) - Required - Path to the local index.html file. ``` -------------------------------- ### Workflow CLI commands Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/clone/workflow.mdx Commands for managing workflow phases: status, gate, advance, ledger, capture-build, and review-qa. Review depth defaults to 1 result; each completed result costs 1 credit. ```sh node harness/workflow.js status # phase table + the next required action node harness/workflow.js gate # run ONE gate read-only (exit 0/1) — no state change node harness/workflow.js advance [--evidence "…"] [--force] node harness/workflow.js ledger # the audit trail (receipts) node harness/capture-build.js [domFile] # the default build step: clone FROM the captured DOM node harness/review-qa.js file --draft [--region "the header"] [--results 1..20] # file the review round (default 1) ``` -------------------------------- ### Run behavior gate Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/clone/runbook.mdx Execute the behavior gate on the clone workflow. Misses are reported with exact deltas, and motion receipts appear as informational lines that never fail the gate. ```shell node harness/workflow.js gate behavior ``` -------------------------------- ### Outer loop diagram Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/develop/improving-the-kit.mdx Shows the meta-loop: cloning real sites improves the kit, and every miss becomes a tool check, fixture, and instruction. ```text OUTER (improve the kit) ── for each target site ──▶ INNER (clone it to green) ▲ │ └──────── every MISS the gate didn't catch ─────────┘ becomes: tool check + fixture + generalized instruction ``` -------------------------------- ### pingfusi diff Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/commands.mdx Shows a raw numeric diff between live and clone, with optional visual or strict modes. ```APIDOC ## pingfusi diff ### Description Shows a raw numeric diff between live and clone, with optional visual or strict modes. ### Method CLI ### Command `pingfusi diff [--visual | strict]` ### Parameters - **live** (string) - Required - The live URL or identifier. - **clone** (string) - Required - The clone URL or identifier. - **--visual** (flag) - Optional - Use visual diff mode. - **strict** (flag) - Optional - Use strict diff mode. ``` -------------------------------- ### pingfusi advance Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/commands.mdx Records a phase, but the gate must pass first. ```APIDOC ## pingfusi advance ### Description Records a phase, but the gate must pass first. ### Method CLI ### Command `pingfusi advance ` ### Parameters - **name** (string) - Required - The name of the clone target. - **phase** (string) - Required - The phase to record. ``` -------------------------------- ### Cache layout for pingfusi studio Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/studio.mdx Shows the directory structure and files cached by `pingfusi studio ` under `/.pingfusi/studio//`. The cache is the durable copy; signed media URLs expire in about an hour and recordings are retention-swept. ```text .pingfusi/studio// result.json # pingfusi-studio-cache/v1 — status, responses, comments annotations.json # pingfusi-studio-annotations/v1 — YOUR AGENT WRITES THIS media/response-. # each session's recording, downloaded ``` -------------------------------- ### Clone a website header with pingfusi Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/use-cases/copy-anything.mdx Use this command to clone just the header of a website. It is a natural-language instruction to the pingfusi agent. ```text clone header of www.example.com. use pingfusi. ``` -------------------------------- ### Clone a website hero with pingfusi Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/use-cases/copy-anything.mdx Use this command to clone just the hero section of a website. It is a natural-language instruction to the pingfusi agent. ```text clone hero of www.example.com. use pingfusi. ``` -------------------------------- ### pingfusi next dispatcher routing Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/commands.mdx Describes the agent-facing dispatcher `pingfusi next `. Routes evidence by type: layout evidence to pixel diff and layout review, interaction-state evidence to behavior capture, and temporal evidence (timing, easing, spring, stagger, scroll/pointer-driven, canvas, or WebGL motion) to the `pingfusi motion …` machine utilities. ```text pingfusi next ``` -------------------------------- ### pingfusi motion pass Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/commands.mdx Re-runs the build motion pass standalone. Capture-build runs it automatically; receipts and warnings are produced, never a gate. ```APIDOC ## pingfusi motion pass ### Description Re-runs the build motion pass standalone. Capture-build runs it automatically; receipts and warnings are produced, never a gate. ### Method CLI ### Command `pingfusi motion pass ` ### Parameters - **name** (string) - Required - The name of the clone target. ``` -------------------------------- ### pingfusi motion trace Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/commands.mdx Captures CSS/WAAPI or fitted JS/canvas motion. ```APIDOC ## pingfusi motion trace ### Description Captures CSS/WAAPI or fitted JS/canvas motion. ### Method CLI ### Command `pingfusi motion trace …` ``` -------------------------------- ### Create cloudflared tunnel Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/clone/workflow.mdx Provision a named cloudflared tunnel once for the tunnel fallback. Commands create the tunnel and route DNS to the host. ```bash cloudflared tunnel create pingfusi ``` ```bash cloudflared tunnel route dns pingfusi ``` -------------------------------- ### core.review.verify: verify fresh and act on comments Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/use-cases/your-own.mdx Verifies the review outcome. A cached approval is never trusted, so always verify fresh. `ok:true` only on the approving verdict "Ship it". If not ok, act on `outcome.comments`, re-push the draft, and file the next round. ```js const outcome = await core.review.verify("launch-copy-review.json"); // outcome = { ok, status, verdict, round, comments } — ok:true only on "Ship it" ``` -------------------------------- ### Inspect element with pxInspect Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/clone/playbook.mdx Use pxInspect to localize the element that paints the mark on both pages. Supports text, aria, selector, or coordinates. Save the results as el_live.json and el_clone.json. ```javascript copy(pxInspect({ text: "sign in" })) // also {aria:/cart/}, {sel:".x"}, {at:[x,y]} ``` -------------------------------- ### Deliver DOM by hand with pxSendDom Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/clone/runbook.mdx Use to send the DOM to a hosted session or local sink when not using the one-call path. If CSP blocks POST, use pxStash and batched pxRead; for big pages or 409, use pxSaveDom. ```javascript await pxSendDom('/dom.html') // hosted session (Step 0) — or ``` ```javascript await pxSendDom('http://localhost:7799/dom.html') // local sink, when localhost works ``` -------------------------------- ### Score the clone Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/develop/improving-the-kit.mdx Runs visual PASS/FAIL scoring, prints fix list and delta vs last run, and records to scores.jsonl. ```sh node harness/score.js siteA # visual PASS/FAIL, fix list, and Δ vs the last run ``` -------------------------------- ### Send DOM to local server (pxSendDom) Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/clone/playbook.mdx Captures the post-hydration DOM after the page has settled. Requires the page to be settled (pxScrollSettle returns stable:true) before calling; otherwise the capture may miss late-hydrating sections. ```javascript await pxSendDom('http://localhost:7799/dom.html') // strips the automation's own overlay (#24) ``` -------------------------------- ### pingfusi adopt Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/commands.mdx Registers an external draft for review-only purposes. ```APIDOC ## pingfusi adopt ### Description Registers an external draft for review-only purposes. ### Method CLI ### Command `pingfusi adopt [width]` ### Parameters - **name** (string) - Required - The name of the draft. - **url** (string) - Required - The URL of the external draft. - **width** (number) - Optional - The width for the draft. ``` -------------------------------- ### pingfusi draft status Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/commands.mdx Re-verifies the hosted draft. ```APIDOC ## pingfusi draft status ### Description Re-verifies the hosted draft. ### Method CLI ### Command `pingfusi draft status` ### Parameters - **name** (string) - Required - The name of the clone target. ``` -------------------------------- ### pingfusi ask: advisory question for micro-choices Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/use-cases/your-own.mdx Use this command to settle a micro-choice during drafting with a single advisory question (1 credit). The question must be answerable from its text alone, as the ping card carries no URL or media. ```sh pingfusi ask "Which headline reads better for a developer-tool launch?" \ --options "Draft first,Review everything" --context "landing page hero" ``` -------------------------------- ### pingfusi score Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/commands.mdx Provides a live-vs-clone score and delta vs the last run. ```APIDOC ## pingfusi score ### Description Provides a live-vs-clone score and delta vs the last run. ### Method CLI ### Command `pingfusi score ` ### Parameters - **name** (string) - Required - The name of the clone target. ``` -------------------------------- ### Prompt agent to review a page with pingfusi Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/use-cases/review-anything.mdx Use this prompt to ask the agent to have a human review a published artifact. The agent publishes the page, files the review round, and acts on the comments. ```text Is my pricing page confusing anywhere? Have a human review it with pingfusi. ``` -------------------------------- ### Reassemble live chunks with validator Source: https://github.com/alex-durango/pingfusi/blob/main/docs7/clone/runbook.mdx Reassemble the saved chunk files into the final snapshot. Verifies byte count against pxStash's report and checks shape before writing. ```shell node tools/reassemble.js live.json --bytes chunk-*.txt ```