{
  "schemaVersion": "1.0",
  "item": {
    "slug": "primitives-dsl",
    "name": "Universal Game Primitives",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/stusatwork-oss/primitives-dsl",
    "canonicalUrl": "https://clawhub.ai/stusatwork-oss/primitives-dsl",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/primitives-dsl",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=primitives-dsl",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "assets/quick_card.md",
      "references/architecture_mapping.md",
      "references/example_mall_tick.md",
      "references/example_npc_step.md",
      "references/example_shooter.md",
      "SKILL.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-04-30T16:55:25.780Z",
      "expiresAt": "2026-05-07T16:55:25.780Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=network",
        "contentDisposition": "attachment; filename=\"network-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/primitives-dsl"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/primitives-dsl",
    "agentPageUrl": "https://openagent3.xyz/skills/primitives-dsl/agent",
    "manifestUrl": "https://openagent3.xyz/skills/primitives-dsl/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/primitives-dsl/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "What this skill does",
        "body": "Provides a small, portable DSL of six universal primitives that appear across 68K-era loops, Cell/PPU+SPU orchestration, CUDA/GPU kernels, and modern ECS engines.\n\nPrimitives: LOOP · TILEGRID · CONTROLBLOCK · POOL · EVENT · DISPATCHER\n\nUse this skill to:\n\nDesign a game/sim loop that ports cleanly across platforms\nTranslate between architectures (68K ↔ Cell ↔ CUDA ↔ ECS)\nExplain engine structure to AI agents with minimal ambiguity\nProduce \"worked examples\" using the same primitive vocabulary every time"
      },
      {
        "title": "When to use it",
        "body": "Starting a new subsystem and want a portable mental model\nRefactoring chaos into explicit state + flow\nMapping legacy code to modern patterns\nDesigning constrained-device / edge / \"shareware for the future\" loops"
      },
      {
        "title": "When NOT to use it",
        "body": "Don't invent new primitives (keep the vocabulary stable)\nDon't debate engine religion (Unity vs Unreal vs custom). Translate, don't preach.\nDon't skip the concrete artifact: every use must end in a diagram, table, or pseudocode"
      },
      {
        "title": "The DSL (definitions)",
        "body": "LOOP\nA repeated update cycle with explicit phases. Owns time slicing and ordering.\n\nTILEGRID\nA spatial index with stable adjacency rules (2D/3D grids, nav tiles, zone cells, chunk maps).\n\nCONTROLBLOCK\nA compact, authoritative state record (flags, counters, handles, timers) used to coordinate behavior and enforce constraints.\n\nPOOL\nA bounded allocator for frequently-created things (entities, bullets, particles, jobs). No unbounded new in hot paths.\n\nEVENT\nA structured message representing \"something happened\" with minimal payload and explicit routing metadata.\n\nDISPATCHER\nRoutes work and events to handlers (CPU threads, SPUs, GPU kernels, ECS systems). Also where scheduling policy lives."
      },
      {
        "title": "Output contract (what you must produce)",
        "body": "When invoked, produce:\n\nPrimitive Map — Identify which parts of the system correspond to each primitive\nDataflow Sketch — Text diagram or table describing movement of state/events\nOne Worked Example — Or cite an existing example file\nPortability Notes — How this maps to 68K / Cell / CUDA / ECS"
      },
      {
        "title": "Invocation patterns (copy/paste prompts)",
        "body": "\"Apply primitives-dsl to design a loop for ___ . Provide a Primitive Map + Dataflow + Portability.\"\n\n\"Translate this architecture into LOOP/TILEGRID/CONTROLBLOCK/POOL/EVENT/DISPATCHER.\"\n\n\"Given these constraints (___), propose a primitives-dsl design and a worked example.\""
      },
      {
        "title": "Guardrails / style rules",
        "body": "Use primitive names in ALL CAPS\nPrefer tables over paragraphs for mappings\nUse tight pseudocode (no full implementations)\nAlways name the CONTROLBLOCK fields explicitly\nAlways specify POOL bounds (even if guessed)\nEVENTS must have a routing key or channel\nDISPATCHER must declare policy: FIFO, priority, fixed-step, budgeted, etc."
      },
      {
        "title": "References",
        "body": "Quick Card: assets/quick_card.md — One-page reference\nArchitecture Mapping: references/architecture_mapping.md — Platform translation table + full code examples\nWorked Examples:\n\nreferences/example_shooter.md — Classic shooter loop\nreferences/example_mall_tick.md — GLITCHDEXMALL zone sim\nreferences/example_npc_step.md — NPC state machine step"
      },
      {
        "title": "External Resources",
        "body": "Anthropic Skills Repository — Skill creation patterns\nAlien Bash II — 68K source extraction (Glenn Cumming, open domain)\nNVIDIA CUDA Programming Guide — Modern GPU primitive patterns\nCell Broadband Engine Programming Handbook — SPE work distribution"
      }
    ],
    "body": "primitives-dsl — Universal Game Architecture Patterns\nWhat this skill does\n\nProvides a small, portable DSL of six universal primitives that appear across 68K-era loops, Cell/PPU+SPU orchestration, CUDA/GPU kernels, and modern ECS engines.\n\nPrimitives: LOOP · TILEGRID · CONTROLBLOCK · POOL · EVENT · DISPATCHER\n\nUse this skill to:\n\nDesign a game/sim loop that ports cleanly across platforms\nTranslate between architectures (68K ↔ Cell ↔ CUDA ↔ ECS)\nExplain engine structure to AI agents with minimal ambiguity\nProduce \"worked examples\" using the same primitive vocabulary every time\nWhen to use it\nStarting a new subsystem and want a portable mental model\nRefactoring chaos into explicit state + flow\nMapping legacy code to modern patterns\nDesigning constrained-device / edge / \"shareware for the future\" loops\nWhen NOT to use it\nDon't invent new primitives (keep the vocabulary stable)\nDon't debate engine religion (Unity vs Unreal vs custom). Translate, don't preach.\nDon't skip the concrete artifact: every use must end in a diagram, table, or pseudocode\nThe DSL (definitions)\n\nLOOP A repeated update cycle with explicit phases. Owns time slicing and ordering.\n\nTILEGRID A spatial index with stable adjacency rules (2D/3D grids, nav tiles, zone cells, chunk maps).\n\nCONTROLBLOCK A compact, authoritative state record (flags, counters, handles, timers) used to coordinate behavior and enforce constraints.\n\nPOOL A bounded allocator for frequently-created things (entities, bullets, particles, jobs). No unbounded new in hot paths.\n\nEVENT A structured message representing \"something happened\" with minimal payload and explicit routing metadata.\n\nDISPATCHER Routes work and events to handlers (CPU threads, SPUs, GPU kernels, ECS systems). Also where scheduling policy lives.\n\nOutput contract (what you must produce)\n\nWhen invoked, produce:\n\nPrimitive Map — Identify which parts of the system correspond to each primitive\nDataflow Sketch — Text diagram or table describing movement of state/events\nOne Worked Example — Or cite an existing example file\nPortability Notes — How this maps to 68K / Cell / CUDA / ECS\nInvocation patterns (copy/paste prompts)\n\"Apply primitives-dsl to design a loop for ___ . Provide a Primitive Map + Dataflow + Portability.\"\n\n\"Translate this architecture into LOOP/TILEGRID/CONTROLBLOCK/POOL/EVENT/DISPATCHER.\"\n\n\"Given these constraints (___), propose a primitives-dsl design and a worked example.\"\n\nGuardrails / style rules\nUse primitive names in ALL CAPS\nPrefer tables over paragraphs for mappings\nUse tight pseudocode (no full implementations)\nAlways name the CONTROLBLOCK fields explicitly\nAlways specify POOL bounds (even if guessed)\nEVENTS must have a routing key or channel\nDISPATCHER must declare policy: FIFO, priority, fixed-step, budgeted, etc.\nReferences\nQuick Card: assets/quick_card.md — One-page reference\nArchitecture Mapping: references/architecture_mapping.md — Platform translation table + full code examples\nWorked Examples:\nreferences/example_shooter.md — Classic shooter loop\nreferences/example_mall_tick.md — GLITCHDEXMALL zone sim\nreferences/example_npc_step.md — NPC state machine step\nExternal Resources\nAnthropic Skills Repository — Skill creation patterns\nAlien Bash II — 68K source extraction (Glenn Cumming, open domain)\nNVIDIA CUDA Programming Guide — Modern GPU primitive patterns\nCell Broadband Engine Programming Handbook — SPE work distribution"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/stusatwork-oss/primitives-dsl",
    "publisherUrl": "https://clawhub.ai/stusatwork-oss/primitives-dsl",
    "owner": "stusatwork-oss",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/primitives-dsl",
    "downloadUrl": "https://openagent3.xyz/downloads/primitives-dsl",
    "agentUrl": "https://openagent3.xyz/skills/primitives-dsl/agent",
    "manifestUrl": "https://openagent3.xyz/skills/primitives-dsl/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/primitives-dsl/agent.md"
  }
}