Phase 2 of plans/autonomous-survival-bot-prd.md: composable skill
contract per PRD §5.2, with version-safe registry-derived groups.
runtime/skills/index.js — registry + runSkill(id, ctx, args).
Enforces preconditions, hard timeout, normalises every result to {ok, code, detail, worldDelta}, runs validate() and calls recover() on failure. Stable codes via RUNNER_CODES.
runtime/skills/groups.js — dynamic logs, planks, sticks, beds, foods, axes, pickaxes, swords derived from bot.registry. Empty set on missing registry → skills emit code:"unsupported_version" rather than throwing.
Reference skills — gather.logs, survive.eat, explore.wander
wrap existing actions.js primitives behind the new contract.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Summary
Phase 2 of
plans/autonomous-survival-bot-prd.md: composable skillcontract per PRD §5.2, with version-safe registry-derived groups.
runtime/skills/index.js— registry +runSkill(id, ctx, args).Enforces preconditions, hard timeout, normalises every result to
{ok, code, detail, worldDelta}, runsvalidate()and callsrecover()on failure. Stable codes viaRUNNER_CODES.runtime/skills/groups.js— dynamiclogs,planks,sticks,beds,foods,axes,pickaxes,swordsderived frombot.registry. Empty set on missing registry → skills emitcode:"unsupported_version"rather than throwing.gather.logs,survive.eat,explore.wanderwrap existing
actions.jsprimitives behind the new contract.npm testruns 14 tests covering precondition gating,timeout firing
recover(), execute exceptions, validate flippingok→false, mock-registry group filtering.Reflex.js still calls
actions.jsdirectly; wiring the scheduler torunSkill()lands in later phases when the survival curriculum kicksin (Phase 3).
Test plan
npm test— 14/14 passingunknown_skillexecuterecover()validate()failure flipsok→falsewithvalidation_failedfoods()excludes hazardous items (spider_eye,rotten_flesh)🤖 Generated with Claude Code