Skip to content

kodflow/kodflow-gamedev

v0.0.0-r34733b2fd450MIT

Combat animation that is anatomically and martially right, for game projects that enable it. /move briefs a panel (director, anatomy, six martial areas, animation craft, rig, imagery, Godot and three.js) and turns its sourced proposals into measurable constraints; /anim-review measures a sampled clip against them and asks the owner's verdict; /anim-feedback records that verdict as an ADR that every later run reads first; /reference fetches licensed reference images; /meshy generates characters, weapons and props with Meshy, fetches them with their licence and judges them against the rig. Enabled per project, never installed by the user installer.

kodflow-gamedev

Combat animation that is anatomically and martially right, for a game project that enables this plugin in its own .claude/settings.json:

{ "enabledPlugins": { "kodflow-gamedev@kodflow": true } }

scripts/install.sh never installs it for the user, and no Codex copy is generated: its agents and its hook only make sense inside such a project.

Why

A run where the fists, the pommel and the blade beat with every stride; a diagonal cut that reads as a dagger stab; a right hand that reads as a left one. Each looked fine to whoever animated it, and each is measurable. This plugin designs a move from sources before it is animated, measures the clip against what the sources say, and keeps every verdict of the owner, good or bad, as a rule the next run reads first.

Skills

SkillWhat it doesWrites
/move <slug> --tradition <area> --weapon <w>Briefs the panel in parallel, checks every quoted excerpt against its page, has the director keep the governing technique whole, writes the spec and its constraints. Ends pending verdict.docs/anim/<slug>.md, docs/anim/<slug>.constraints.json, docs/anim/sources/, docs/anim/runs/
/anim-review <slug>Samples the clip (three.js adapter or GLB, Godot scene) into pose tracks, measures the move's constraints and every owner-confirmed one, then asks the owner's verdict.nothing itself; hands over to /anim-feedback
/anim-feedback <slug> --verdict good|bad "<words>"Records the verdict as an ADR (JSON header, the owner's words verbatim), written once, superseded never edited.docs/adr/feedback/<YYYYMMDD-HHMMSS>-<slug>-<4hex>.md
/reference <slug>Finds reference images with their licence; fetches the ones kept — committable ones with a manifest, non-commercial ones into an ignored study cache.art/reference/, .cache/anim-ref/
/meshy <asset> --kind character|weapon|propHas the asset agent write the Meshy request, shows its credits and licence in a dry run, and after the owner's go creates, polls and fetches the GLB; then the asset agent and the rig specialist judge it (polycount, scale, orientation, pivot, grip axis) and prepare the retarget of Meshy's skeleton.art/meshy/, docs/anim/assets/, .cache/meshy/

The main thread writes these paths directly — the root-write-allow of this plugin, honoured by kodflow-hooks only where the project enables the plugin — and each skill ends by handing the untracked files to one permanent PR on chore/anim-trail (skills/_shared/trail.md).

Agents

Launched by the skills only (subagent_type: "kodflow-gamedev:<name>"); no routing keyword brings them into another conversation.

AgentArea
gamedev-animation-directormerges the panel, arbitrates, attributes, refuses
anatomy-specialist-biomechanicsjoint ranges, pronation, grip, sequencing
martial-specialist-europeHEMA: German, Italian, I.33, destreza, polearms
martial-specialist-antiquityGreco-Roman: hoplite, legionary, gladiators, pankration
martial-specialist-south-asiaKalaripayattu, Gatka, Silambam, Dhanurveda
martial-specialist-east-asiakoryū, Chinese military manuals, Korean
martial-specialist-southeast-asiaArnis, silat, krabi-krabong, Muay Thai, Bokator
martial-specialist-unarmedboxing, wrestling, judo, grappling, kicks
animation-specialist-combatkey poses, timing, arcs, readability per view
rig-specialist-ikhierarchy, swing/twist, IK, the grip block
reference-specialist-imageryimages and their licences
engine-specialist-threejsthree.js r186 sampling and adapters
engine-specialist-godotGodot 4.7 Skeleton3D sampling
asset-specialist-meshyMeshy requests, judging a generated GLB, the retarget of its auto-rig

All six martial agents answer on every move; the declared tradition's agent governs (its sourced technique is adopted whole) and the five others only remark or name an alternative. Arbitration: owner ADR > anatomy > governing technique > animation craft. The martial agents stay experimental until a good verdict with reach: general credits their culture.

Every agent names a technique in its original language and script, with a transliteration, a translation and a tier-1 or tier-2 source, or files it under unverified. Their starting sources are skills/_shared/source-map.md, dated, with its gaps marked as gaps.

The measuring

  • move-constraints/v1 (skills/_shared/move-constraints.schema.json): joint_angle, frame_pose, vector_angle, velocity, trajectory, phase_offset, reach_ratio, grip, handedness, each hard or soft, proposed until the owner confirms it, observable per view.
  • pose-track/v1 (pose-track.schema.json): world transforms of bones and props and world points of mesh landmarks, per frame, under the rig map's logical names (rig-map.example.json).
  • check-constraints.py exits non-zero when a hard constraint fails, when nothing applies, or when fewer were evaluated than apply.

Samplers: sample-threejs.mjs (Node; a project adapter exporting clips(), meta(clip), rest(), sampleWorld(clip, t), or a GLB with baked clips) and sample-godot.gd (headless Godot). The adapter is the project's code.

The owner's feedback

docs/adr/feedback/.RULES.md is generated by feedback-rules.py (never committed): hard rules, then proposed, then advisory, newest first. The SubagentStart hook hooks/scripts/rules-digest.sh is read-only: it checks that file against the ADRs by hash and hands each agent its areas' rules (2000 characters at most), or says the digest is unavailable and lists the ADRs to read.

Meshy

meshy.py is the only code that talks to Meshy. The key comes from MESHY_API_KEY and nowhere else, goes to api.meshy.ai only and is masked in every line printed; --dry-run builds a request with no key and no call. A create is never resent; polling follows Retry-After and stops at --max-wait with the task id (exit 3). fetch downloads nothing unless --plan names a plan whose licence skills/_shared/licence-policy.md (Meshy outputs) states, names each file by its sha256 and lists it in art/meshy/manifest.json with task id, endpoint, parameters, prompt, plan, licence, the task's creation date and the credits it consumed. inspect reads a GLB's JSON chunk for the review. The API facts it follows are dated in skills/_shared/meshy-api.md.

Scripts

Python 3.9+, standard library only, run as python3 -I: check-constraints.py, feedback-rules.py, cache-source.py, fetch-reference.py, meshy.py. Tests: tests/run-tests.sh (no claude CLI, no network, no key, synthetic fixtures only).