{
  "slug": "mechanic-tower-defense-power-grid",
  "skill": "mechanic-tower-defense-power-grid",
  "upstream": "GameSkill original (onsite/<slug>/original)",
  "sourceHash": "71edfde82f0c0d87b711b825ef20d1b82eadd132b53d90d3eda4fd5d3805ad92",
  "date": "2026-10-28",
  "engine": "Canvas 2D in Chrome 156 headless",
  "env": [
    "Node v20.19.2",
    "No runtime dependencies (plain ES modules + Canvas 2D)",
    "puppeteer-core 24 from package-lock.json",
    "Google Chrome 156 headless, touch emulation on"
  ],
  "trigger": "static",
  "passed": 39,
  "total": 39,
  "commands": [
    "(cd ../original && sh -c npm ci --silent --no-audit --no-fund && node --test --test-reporter=tap test/logic.test.mjs)",
    "(cd ../original && node test/browser.test.mjs)",
    "(cd . && cp ../original/shots/td-night.png screenshot.png)"
  ],
  "checks": [
    {
      "criterion": "trigger",
      "name": "SKILL.md description says when to use it",
      "pass": true,
      "detail": "Tower-defense power-grid rules on top of an ordinary path-and-waves game. Towers fire only while linked to the power sou"
    },
    {
      "criterion": "trigger",
      "name": "triggers on: \"Add a power grid with relays and pylons to my tower defense game\"",
      "pass": true,
      "detail": "rank 1/118, overlap 6"
    },
    {
      "criterion": "trigger",
      "name": "triggers on: \"My tower defense towers turn on and off randomly when I build, how should power capacity be allocated\"",
      "pass": true,
      "detail": "rank 1/118, overlap 5"
    },
    {
      "criterion": "trigger",
      "name": "triggers on: \"Tower defense night waves with a movable spotlight that buffs towers\"",
      "pass": true,
      "detail": "rank 1/118, overlap 5"
    },
    {
      "criterion": "trigger",
      "name": "does not trigger on: \"Export my Godot game for the web\"",
      "pass": true,
      "detail": "rank 31/118, overlap 0"
    },
    {
      "criterion": "trigger",
      "name": "does not trigger on: \"Make pixel art sprites with Aseprite\"",
      "pass": true,
      "detail": "rank 23/118, overlap 0"
    },
    {
      "criterion": "runs",
      "name": "power-grid rules tests (links, BFS, capacity order, sell recompute, beam, lamps, night sight, wave fights): a tower in the source range is connected and powered",
      "pass": true
    },
    {
      "criterion": "runs",
      "name": "power-grid rules tests (links, BFS, capacity order, sell recompute, beam, lamps, night sight, wave fights): a tower out of range is not connected until a relay bridges it",
      "pass": true
    },
    {
      "criterion": "runs",
      "name": "power-grid rules tests (links, BFS, capacity order, sell recompute, beam, lamps, night sight, wave fights): relays chain; towers never pass power on",
      "pass": true
    },
    {
      "criterion": "runs",
      "name": "power-grid rules tests (links, BFS, capacity order, sell recompute, beam, lamps, night sight, wave fights): capacity: towers past the budget stay unpowered (priority, then hops, then age)",
      "pass": true
    },
    {
      "criterion": "runs",
      "name": "power-grid rules tests (links, BFS, capacity order, sell recompute, beam, lamps, night sight, wave fights): build order beats distance: a new tower never browns out an older one",
      "pass": true
    },
    {
      "criterion": "runs",
      "name": "power-grid rules tests (links, BFS, capacity order, sell recompute, beam, lamps, night sight, wave fights): selling a relay cuts everything downstream and reports it",
      "pass": true
    },
    {
      "criterion": "runs",
      "name": "power-grid rules tests (links, BFS, capacity order, sell recompute, beam, lamps, night sight, wave fights): selling a tower frees capacity for a waiting tower",
      "pass": true
    },
    {
      "criterion": "runs",
      "name": "power-grid rules tests (links, BFS, capacity order, sell recompute, beam, lamps, night sight, wave fights): the source cannot be sold, cells cannot be shared, one source only",
      "pass": true
    },
    {
      "criterion": "runs",
      "name": "power-grid rules tests (links, BFS, capacity order, sell recompute, beam, lamps, night sight, wave fights): beam moves at a capped speed toward its target",
      "pass": true
    },
    {
      "criterion": "runs",
      "name": "power-grid rules tests (links, BFS, capacity order, sell recompute, beam, lamps, night sight, wave fights): night: towers see only 70% of their range unless the enemy is lit",
      "pass": true
    },
    {
      "criterion": "runs",
      "name": "power-grid rules tests (links, BFS, capacity order, sell recompute, beam, lamps, night sight, wave fights): lamps: the source and powered relays light their surroundings",
      "pass": true
    },
    {
      "criterion": "runs",
      "name": "power-grid rules tests (links, BFS, capacity order, sell recompute, beam, lamps, night sight, wave fights): beam: +25% damage and 15% slow on enemies inside it",
      "pass": true
    },
    {
      "criterion": "runs",
      "name": "power-grid rules tests (links, BFS, capacity order, sell recompute, beam, lamps, night sight, wave fights): a powered defence holds a wave; the same layout without its relay leaks",
      "pass": true
    },
    {
      "criterion": "runs",
      "name": "power-grid rules tests (links, BFS, capacity order, sell recompute, beam, lamps, night sight, wave fights): at night the beam rescues a defence that cannot see far enough",
      "pass": true
    },
    {
      "criterion": "runs",
      "name": "power-grid rules tests (links, BFS, capacity order, sell recompute, beam, lamps, night sight, wave fights): exits 0 with no script errors",
      "pass": true,
      "detail": "exit 0"
    },
    {
      "criterion": "runs",
      "name": "demo in headless Chrome: page loads; starting layout is fully powered (9/10) (4 towers)",
      "pass": true
    },
    {
      "criterion": "runs",
      "name": "demo in headless Chrome: tap-to-build a gun next to the source: over capacity, stays unpowered",
      "pass": true
    },
    {
      "criterion": "runs",
      "name": "demo in headless Chrome: a tower out of link range shows NO LINK",
      "pass": true
    },
    {
      "criterion": "runs",
      "name": "demo in headless Chrome: selling the first relay browns out the towers behind it, and frees power",
      "pass": true
    },
    {
      "criterion": "runs",
      "name": "demo in headless Chrome: building the relay back: the older gun gets its power back (build order wins) (spare 1, unpowered 2)",
      "pass": true
    },
    {
      "criterion": "runs",
      "name": "demo in headless Chrome: path cells cannot be built on",
      "pass": true
    },
    {
      "criterion": "runs",
      "name": "demo in headless Chrome: beam tool: tap aims the beam, it travels at its capped speed",
      "pass": true
    },
    {
      "criterion": "runs",
      "name": "demo in headless Chrome: night hides far enemies from the towers (1/3 visible)",
      "pass": true
    },
    {
      "criterion": "runs",
      "name": "demo in headless Chrome: demo: night + brownout + rebuild script runs, beam chases the lead enemy",
      "pass": true
    },
    {
      "criterion": "runs",
      "name": "demo in headless Chrome: demo defence holds the early waves (no reset in 20 s) (lives 20, kills 10)",
      "pass": true
    },
    {
      "criterion": "runs",
      "name": "demo in headless Chrome: frame is drawn (grid, cables, darkness, beam, HUD) (90 colour bins)",
      "pass": true
    },
    {
      "criterion": "runs",
      "name": "demo in headless Chrome: exits 0 with no script errors",
      "pass": true,
      "detail": "exit 0"
    },
    {
      "criterion": "output",
      "name": "screenshot screenshot.png rendered",
      "pass": true
    },
    {
      "criterion": "output",
      "name": "self-check list has at least 3 items",
      "pass": true,
      "detail": "6 items"
    },
    {
      "criterion": "single",
      "name": "one job per skill (reviewed)",
      "pass": true,
      "detail": "One job: the power grid (links, BFS, stable capacity allocation, recompute on sell), the movable light beam and night sight rules of a tower defense. Paths, waves and targeting exist only to exercise those rules."
    },
    {
      "criterion": "bilingual",
      "name": "English SKILL.md",
      "pass": true
    },
    {
      "criterion": "bilingual",
      "name": "Chinese SKILL.zh.md shipped next to SKILL.md",
      "pass": true,
      "detail": "2490 chars"
    },
    {
      "criterion": "bilingual",
      "name": "Chinese guide written",
      "pass": true,
      "detail": "1016 chars"
    }
  ]
}
