ANKLE field kit / embeddable protocol

@Command Widget Kit

This is the user-facing layer for the thing Mercer described: a SoundCloud/YouTube-style embed, but connected to identity, credits, analytics, provenance, and Hermes. A builder can place ANKLE widgets on their own site while aleqth.com stays the account, data, and agent layer.

1. Drop It In

Add one script tag. Signed-in users get their ANKLE identity, credits, and Hermes terminal. Anonymous users still get install/sign-in paths.

2. Wrap Media

Any site can mark a div as an ANKLE widget. The first real target is a discplayer/music embed: iframe, analytics, top-up, and Hermes context in one shell.

3. Track Usage

Mount/open/ask/top-up events write into the analytics spine, so the operator view can see which external widgets are actually moving.

External OS Layer

Any site can become an ANKLE surface. The widget registers the host page, then writes source/media usage into the same SURF metadata graph used by aleqth-built pages. That is the @command layer: outside websites stay themselves, but their embeds, assets, and interactions become attributable inside the ANKLE database.

<script src="https://ankle.website/atcmd/widget.js" data-base="https://aleqth.com" defer></script>
<script>
  window.addEventListener("load", function () {
    window.atcmd.registerSurface({
      title: document.title,
      tags: ["portfolio", "discplayer", "music"]
    });

    window.atcmd.attributeSource({
      url: "https://discis.netlify.app",
      title: "discplayer",
      widget: "discplayer",
      role: "embed",
      tags: ["music", "catalogue", "player"]
    });
  });
</script>

Activation Flow

StepWhat HappensSystem Layer
DiscoverA builder finds @command from ankle.website, ankle.md, a friend's embed, or the extension.ANKLE product surface
InstallThey paste the script tag or use the extension to inject it into the current site.@command runtime
RegisterThe widget calls /atcmd/surface/register and creates a deterministic external surface id.aleqth.com API
MountThey add data-ankle-widget blocks for players, used-in cards, sources, or approved modules.widget registry
AttributeSources and media write into SURF through /atcmd/source.used-in graph
Declare ToolsThe host publishes what @command/Hermes can safely do via /atcmd/host/capabilities.MCP-like bridge
BuildThe user asks /build; @command returns HTML, CSS, iframe/srcdoc, and patch instructions.builder planner
ConfirmThe extension stages the plan, shows the target and risks, and only mutates the page after APPLY PREVIEW.extension confirmation layer
OperateHermes sees the registry, surface, sources, credit state, and can help edit or explain the page.agent layer

Domain Roles

DomainRoleWhy It Matters
ankle.websitePublic install and distributionNormal people learn to get the field kit, install @command, and start participating.
ankle.mdProtocol canon and static referenceStable spec/docs mirror for agents, builders, and verification.
aleqth.comAuthenticated runtimeIdentity, credits, Whop fulfillment, SURF writes, dashboards, and God-eye analytics live here.
External hostsActivated surfacesThey keep their own domain/design while joining the ANKLE graph.

Registry / App Layer

The Whop lesson is that builders need a place to make applications, attach them to a community, and monetize access. @command needs the same product shape for websites: approved modules enter a registry, agents can discover them, and external hosts can mount them with one attribute instead of copying custom code every time.

{
  "registry": "/atcmd/registry",
  "manifest": "/atcmd/manifest",
  "states": ["proposed", "sandboxed", "approved", "core", "monetized"],
  "mount": "<div data-ankle-widget=\"used-in\" data-url=\"https://discis.netlify.app\"></div>"
}

Discplayer Embed Contract

<div
  data-ankle-widget="discplayer"
  data-src="https://discis.netlify.app"
  data-title="discplayer"
  data-height="520"></div>
<script src="https://ankle.website/atcmd/widget.js" data-base="https://aleqth.com" defer></script>

Backlink / Used-In Card

This is the visible part of the asset-backlink idea: an external site can show who used an image, player, track, object, or page after it has been attributed into SURF.

<div
  data-ankle-widget="used-in"
  data-url="https://discis.netlify.app"
  data-title="Where this player is used"></div>
<script src="https://ankle.website/atcmd/widget.js" data-base="https://aleqth.com" defer></script>

Host Builder / MCP-like Bridge

If a builder wants @command to help build their own site, the host declares a scoped capability surface. The terminal can then generate code, iframe artifacts, and patch plans. The extension can apply a contained browser preview after the user confirms; persistent writes still require a host-side save/deploy capability.

<div
  data-ankle-widget="builder"
  data-title="@command builder"
  data-prompt="Add a SURF-aware gallery and top-up button"></div>
<script
  src="https://ankle.website/atcmd/widget.js"
  data-base="https://aleqth.com"
  data-builder="true"
  defer></script>

Widget Commands

CommandWhat It Does
/installOpens the extension/app install path so someone can participate across the web.
/creditsOpens the Whop-backed credit pack flow on aleqth.com.
/widgetReturns builders to this kit.
/discplayerExplains the external music-widget target and opens this section.
/activateExplains how the current page becomes an ANKLE external surface.
/registryLists approved/candidate widgets and app modules.
/build requestGenerates a host-site build plan with HTML, CSS, iframe/srcdoc, and safe patch instructions.
/source URLAttributes an external source to the current ANKLE surface.
/used-in URLShows where an attributed source has appeared.

Analytics Contract

Custom widgets can report events without building a backend client:

window.atcmd.track("widget.play", {
  widget: "discplayer",
  widget_id: "mercer-demo",
  source_url: "https://discis.netlify.app",
  meta: { track: "uploaded folder" }
});

Used-In Contract

Backlinks are available for any attributed external asset, so the system can answer: who used this image, player, track, page, or media source?

fetch("https://aleqth.com/atcmd/source/usage?url=" +
  encodeURIComponent("https://discis.netlify.app"))
  .then(r => r.json())
  .then(console.log);

What Is Built vs. Next

Built now: standalone forgot-password login, external widget mounting, widget event analytics, top-up/install visibility, a first discplayer wrapper, external surface registration, source attribution into the used-in/SURF graph, a public @command registry, manifest, visible backlink card, MCP-like host capability declaration, and build-plan generation. Built in the extension lane: staged review, APPLY PREVIEW, copy-code fallback, and builder-widget handoff. Next: richer God-eye analytics, host save adapters, and per-builder API keys.