Skip to content

Commit 9dcc3ab

Browse files
committed
Merge origin/main into feat/humanized-figure
Resolve comment-only conflicts in mannequin.ts: keep the rewritten figure doc comments and adopt main's no-em-dash comment style.
2 parents 51779dd + 90d33f5 commit 9dcc3ab

160 files changed

Lines changed: 15978 additions & 293 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
<h1 align="center">◆ Posecode</h1>
22

33
<p align="center"><b>Kinematic motion as text.</b> Mermaid gave LLMs a way to draw diagrams.<br/>
4-
Posecode gives them a way to <i>show movement</i>exercises, physiotherapy, posture<br/>
4+
Posecode gives them a way to <i>show movement</i>: exercises, physiotherapy, posture,<br/>
55
as a tiny human-readable language that renders to an animated 3D figure in the browser.</p>
66

77
<p align="center">
88
<a href="https://posecode.org/play"><b>▶ Live playground</b></a> ·
9-
<a href="spec/SPEC.md">Language spec</a> ·
9+
<a href="https://posecode.org/moves/">Movement library</a> ·
10+
<a href="https://posecode.org/spec.html">Language spec</a> ·
1011
<a href="spec/examples">Examples</a> ·
1112
<a href="packages/posecode-mcp">MCP server</a>
1213
</p>
1314

1415
<table align="center">
1516
<tr>
16-
<td align="center"><img src="docs/media/deadlift.gif" width="230" alt="Deadlift rendered from .posecode text"/><br/><sub><code>pelvis: hinge</code> deadlift</sub></td>
17-
<td align="center"><img src="docs/media/squat.gif" width="230" alt="Body-weight squat rendered from .posecode text"/><br/><sub><code>knees: flex 95</code> squat</sub></td>
18-
<td align="center"><img src="docs/media/lateral-raise.gif" width="230" alt="Lateral raise rendered from .posecode text"/><br/><sub><code>shoulders: abduct 90</code> lateral raise</sub></td>
17+
<td align="center"><img src="docs/media/deadlift.gif" width="230" alt="Deadlift rendered from .posecode text"/><br/><sub><code>pelvis: hinge</code>, deadlift</sub></td>
18+
<td align="center"><img src="docs/media/squat.gif" width="230" alt="Body-weight squat rendered from .posecode text"/><br/><sub><code>knees: flex 95</code>, squat</sub></td>
19+
<td align="center"><img src="docs/media/lateral-raise.gif" width="230" alt="Lateral raise rendered from .posecode text"/><br/><sub><code>shoulders: abduct 90</code>, lateral raise</sub></td>
1920
</tr>
2021
</table>
2122

@@ -25,13 +26,13 @@ as a tiny human-readable language that renders to an animated 3D figure in the b
2526

2627
Ask an LLM to explain a push-up and it can only give you prose or a flat image.
2728
The model *knows* the biomechanics ("elbows flex, shoulders abduct on the
28-
descent") it just has no syntax to express it that a renderer can read.
29+
descent"), it just has no syntax to express it that a renderer can read.
2930
Diffusion-based text-to-motion models exist, but they're heavy, expensive, and
3031
give you no fine control over the anatomical phases.
3132

3233
Posecode takes the opposite, lightweight approach (see [the research](#background)):
3334

34-
- The LLM writes a small **`.posecode`** document semantic phases, not 3D matrices.
35+
- The LLM writes a small **`.posecode`** document: semantic phases, not 3D matrices.
3536
- A **client-side** parser + Three.js renderer animates it. Generation is a
3637
fraction of a cent of text; rendering runs at 60fps on a phone.
3738
- Every angle is **hard-clamped to a healthy range of motion**, so a model
@@ -70,17 +71,17 @@ npm run eval # fidelity scorecard: geometric invariants over every example
7071

7172
In the playground: pick an example, watch it animate, edit the text live, and
7273
hit **Copy LLM prompt** to get a system prompt that teaches ChatGPT/Claude to
73-
write Posecode for you or wire up the [MCP server](packages/posecode-mcp) so
74+
write Posecode for you, or wire up the [MCP server](packages/posecode-mcp) so
7475
your agent authors, validates, and renders movements natively.
7576

7677
## How Posecode stays honest
7778

7879
Two safety layers ship with the language:
7980

80-
- **ROM clamping** every angle is hard-clamped to healthy range-of-motion
81+
- **ROM clamping**: every angle is hard-clamped to healthy range-of-motion
8182
tables before rendering; a hallucinated `knee: flex 200` renders at its
8283
ceiling with a warning, never an impossible joint.
83-
- **Fidelity evals** [`posecode-eval`](packages/posecode-eval) re-runs the
84+
- **Fidelity evals**: [`posecode-eval`](packages/posecode-eval) re-runs the
8485
real parser → FK → ground-lock pipeline headlessly and scores geometric
8586
invariants ("a deadlift pitches the torso ≥ 50° with vertical shins"). Every
8687
example must pass every invariant in CI.
@@ -92,11 +93,11 @@ Two safety layers ship with the language:
9293
| [`posecode-parser`](packages/posecode-parser) | `.posecode` text → validated, ROM-clamped IR. Pure TypeScript, framework-agnostic. |
9394
| [`posecode-render`](packages/posecode-render) | IR → animated low-poly mannequin (Three.js), forward kinematics + ground-lock CCD IK. |
9495
| [`posecode-share`](packages/posecode-share) | Encode a `.posecode` doc to a URL-safe token so a movement travels as a link. Pure, dependency-free. |
95-
| [`posecode-mcp`](packages/posecode-mcp) | MCP server: lets an LLM agent author, ROM-validate, and get a render link for a movement natively. |
96+
| [`posecode-mcp`](packages/posecode-mcp) | MCP server: lets an LLM agent author, ROM-validate, and get a render link for a movement, natively. |
9697
| [`posecode-eval`](packages/posecode-eval) | Fidelity harness: headless kinematic probing + biomechanical invariant scoring. |
9798
| [`playground`](playground) | Live editor + 3D viewport + warnings + the LLM prompt + shareable links. |
9899

99-
The protocol and both libraries are **MIT-licensed** the open core. See
100+
The protocol and both libraries are **MIT-licensed**: the open core. See
100101
[`spec/SPEC.md`](spec/SPEC.md) for the full language and
101102
[`spec/llm-authoring.md`](spec/llm-authoring.md) for the authoring prompt.
102103
For where Posecode spreads fastest and the per-domain go-to-market plan, see

ROADMAP.md

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,59 @@
1-
# Posecode domains & roadmap
1+
# Posecode: domains & roadmap
22

33
Posecode's vision is broad: **describe any single-person movement as text and render it
44
safely in 3D.** The *protocol* is general; the *current renderer* is deliberately
55
scoped (one figure, forward kinematics, ground-locked hands/feet, no props). This
66
doc maps the domains Posecode can serve, what already works, and what each remaining
7-
domain needs so contributions land where they unlock the most.
7+
domain needs, so contributions land where they unlock the most.
88

99
## Where Posecode fits
1010

1111
| Domain | Example uses | Status |
1212
| --- | --- | --- |
13-
| **Physiotherapy / rehab** | Range-of-motion demos, home-exercise programs, post-op protocols, cervical/shoulder mobility | ✅ Strong fit today the ROM safety clamp is a clinical feature. Many moves render now; equipment (bands, balls) is future. |
13+
| **Physiotherapy / rehab** | Range-of-motion demos, home-exercise programs, post-op protocols, cervical/shoulder mobility | ✅ Strong fit today: the ROM safety clamp is a clinical feature. Many moves render now; equipment (bands, balls) is future. |
1414
| **Ergonomics / desk & posture** | Posture resets, seated/standing stretch breaks, "do this every hour" prompts | ✅ Works today for standing variants; true *seated* needs a chair prop (below). |
1515
| **Yoga & mobility** | Standing poses (chair, side bend, twist), flows, mobility drills | ✅ Standing poses work; floor/inversion/lying poses need lying base poses + a mat. |
16-
| **Movement education / anatomy** | Demonstrate joint actions ("what is shoulder abduction?"), biomechanics teaching | ✅ Excellent fit single-joint demos are exactly what the rig does. |
16+
| **Movement education / anatomy** | Demonstrate joint actions ("what is shoulder abduction?"), biomechanics teaching | ✅ Excellent fit: single-joint demos are exactly what the rig does. |
1717
| **Fitness / strength** | Body-weight and free-form movement coaching | ✅ Core today (squat, curl, raise). Barbell/dumbbell/machine work needs props + grip. |
18-
| **Functional / elderly care** | Sit-to-stand, balance, gentle ROM, fall-prevention drills | 🟡 Partial sit-to-stand works; reaching/balance need reach-IK + props. |
19-
| **Sports technique** | Golf swing, tennis serve, throwing, kicking | 🟡 Partial needs trunk rotation fidelity, weight shift, and implements (club/racket/ball). |
18+
| **Functional / elderly care** | Sit-to-stand, balance, gentle ROM, fall-prevention drills | 🟡 Partial: sit-to-stand works; reaching/balance need reach-IK + props. |
19+
| **Sports technique** | Golf swing, tennis serve, throwing, kicking | 🟡 Partial: needs trunk rotation fidelity, weight shift, and implements (club/racket/ball). |
2020
| **Dance / choreography** | Notating sequences, port de bras, phrases that turn & travel | ✅ Phrases, port de bras, pirouettes, and traveling combos (box-step, grapevine, chassé) work via `turn`/`travel`; partner work is future. |
2121
| **Martial arts** | Stances, strikes, basic forms | 🟡 Stances/strikes partly work; contact and weapons are future. |
22-
| **Sign language / gesture** | Finger-spelling, signs, expressive gesture | 🟡 Partial single-DOF finger curls render visibly (fist, pinch, wave, rough finger-spelling); exact sign language needs multi-joint fingers + wrist orientation. |
22+
| **Sign language / gesture** | Finger-spelling, signs, expressive gesture | 🟡 Partial: single-DOF finger curls render visibly (fist, pinch, wave, rough finger-spelling); exact sign language needs multi-joint fingers + wrist orientation. |
2323

2424
## Engine capabilities that widen the scope
2525

2626
These are the unlocks, roughly in order of leverage:
2727

28-
1. ~~**Hip / waist hinge primitive**~~**shipped (v0.1).** `pelvis: hinge <deg>`
28+
1. ~~**Hip / waist hinge primitive**~~:**shipped (v0.1).** `pelvis: hinge <deg>`
2929
tips the torso forward over the hips while the legs stay planted (the renderer
3030
counter-rotates the hips). Powers `deadlift`, `bent-over-row`, `good-morning`,
3131
and `bow`. Next: hinge with a loaded-bar prop.
32-
2. ~~**Reach-IK (reach a world target)**~~**shipped, now ROM-constrained.**
32+
2. ~~**Reach-IK (reach a world target)**~~:**shipped, now ROM-constrained.**
3333
`reach: <effector> <target>` drives a hand/foot to a body landmark, the
3434
`floor`, or a prop anchor via CCD. Powers `touch-toes`, `cross-body-reach`,
3535
`seated-forward-fold`, and prop grips. The solve clamps every chain joint
36-
into its Range-of-Motion box each iteration solved angles obey the same
37-
hard limits as authored ones and `hands` / `feet` reach or pin both sides
36+
into its Range-of-Motion box each iteration; solved angles obey the same
37+
hard limits as authored ones, and `hands` / `feet` reach or pin both sides
3838
in one line. Next: two-bone analytic solve for straighter elbows/knees.
39-
3. ~~**Scene props with contact anchors**~~**shipped (starter set).** `prop
39+
3. ~~**Scene props with contact anchors**~~:**shipped (starter set).** `prop
4040
chair|wall|bar` adds a scene object with named anchors (`seat`, `wall`, `bar`).
4141
Powers `sit-to-stand`, `box-squat`, `wall-sit`, `dead-hang`, `hanging-knee-raise`.
4242
Next: more props (bench, rings, bands), load cues, anchor-aware ground-lock.
43-
4. ~~**Lying & seated base poses**~~**shipped.** `supine | prone | seated`
43+
4. ~~**Lying & seated base poses**~~:**shipped.** `supine | prone | seated`
4444
start poses (grounded by a bounding-box drop). Powers `glute-bridge`,
4545
`dead-bug`, `cobra`, `seated-forward-fold`. Next: quadruped + chair-seated.
46-
5. ~~**Hand / finger articulation**~~**shipped (single-DOF).** Per-finger
46+
5. ~~**Hand / finger articulation**~~:**shipped (single-DOF).** Per-finger
4747
curl bones + `fingers` group. Powers `make-a-fist`, `pinch-grip`, `hand-wave`,
4848
`finger-spell-demo`. Next: multi-joint fingers for accurate sign language.
49-
6. ~~**Spatial choreography (turn & travel)**~~**shipped.** `turn: <deg>`
49+
6. ~~**Spatial choreography (turn & travel)**~~:**shipped.** `turn: <deg>`
5050
rotates the figure's facing and `travel: <x> <z>` moves it across the floor,
5151
both absolute + carried across phases and returning home on the loop wrap.
5252
Powers `pirouette`, `box-step`, `grapevine`, `waltz-box`, `chasse`,
53-
`walk-cycle`, `quarter-turns` pirouettes, traveling combos, and gait.
53+
`walk-cycle`, `quarter-turns`: pirouettes, traveling combos, and gait.
5454
Standing poses only. Next: footstep-locked travel (true gait), motion
5555
aliveness (velocity-continuous flow + weight shift).
56-
7. **Two-person + collision** partner stretches, assisted rehab, contact sports
56+
7. **Two-person + collision**: partner stretches, assisted rehab, contact sports
5757
(still deferred in the spec).
5858

5959
## Prop / equipment library (future)
@@ -72,17 +72,17 @@ Each prop is a small scene object + an anchor type; movements then reference it
7272
| **Resistance band** | Band pull-aparts, banded rehab, mobility with tension |
7373
| **Dumbbell / barbell / kettlebell** | Loaded strength patterns (needs grip + load cues) |
7474
| **Ball (stability / medicine)** | Core work, balance, throws |
75-
| **Parallettes / dip station** | ✅ Dip bars shipped (`prop dip-bars` triceps dips). Still future: L-sits, push-up variations at height |
75+
| **Parallettes / dip station** | ✅ Dip bars shipped (`prop dip-bars`, triceps dips). Still future: L-sits, push-up variations at height |
7676
| **Foam roller** | Self-myofascial release, mobility drills |
7777

7878
## Current limitations (honest)
7979

8080
- One figure only; partner work and collision are still deferred.
81-
- A **starter** prop set (chair / wall / bar / box / dip bars) no bench,
81+
- A **starter** prop set (chair / wall / bar / box / dip bars): no bench,
8282
rings, bands, or loaded implements yet, and props sit at fixed default
8383
placements.
8484
- Props are visual + reach anchors (no physical sit/lean solve).
85-
- Fingers are **single-DOF** curls good for grip and rough gesture, not exact
85+
- Fingers are **single-DOF** curls, good for grip and rough gesture, not exact
8686
sign language. The head has no facial articulation.
8787

8888
> Range-of-motion values are general literature data, not medical advice.

VERCEL_AGENTS.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Vercel Plugin AI Agent Instructions
1+
# Vercel Plugin: AI Agent Instructions
22

33
> Drop this file into any GitHub repo. AI coding agents (Claude Code, Codex, Cursor, Copilot, Grok Build) will pick it up automatically.
44
@@ -22,25 +22,25 @@ Requires Node.js 18+ and Bun. After install, session context is injected automat
2222

2323
## Key skills (invoke on demand)
2424

25-
- `nextjs` App Router, Server Components, Server Actions, rendering strategies
26-
- `ai-sdk` AI SDK v6: streaming, tool calling, agents, MCP, embeddings
27-
- `ai-gateway` Unified API to 100+ models with failover and cost tracking
28-
- `vercel-functions` Serverless, Edge, Fluid Compute, streaming, Cron Jobs
29-
- `vercel-storage` Blob, Edge Config, Neon Postgres, Upstash Redis
30-
- `deployments-cicd` Deploy, promote, rollback, `--prebuilt`, CI config
31-
- `env-vars` `.env` files, `vercel env`, OIDC tokens
32-
- `routing-middleware` Rewrites, redirects, personalization (Node.js/Edge/Bun)
33-
- `runtime-cache` Per-region KV cache with tag-based invalidation
34-
- `shadcn` shadcn/ui CLI, components, theming, Tailwind integration
35-
- `workflow` Durable execution, DurableAgent, steps, pause/resume
36-
- `vercel-sandbox` Ephemeral VMs for running untrusted/AI-generated code
37-
- `verification` Browser, API, data, and response flow verification
25+
- `nextjs`: App Router, Server Components, Server Actions, rendering strategies
26+
- `ai-sdk`: AI SDK v6: streaming, tool calling, agents, MCP, embeddings
27+
- `ai-gateway`: Unified API to 100+ models with failover and cost tracking
28+
- `vercel-functions`: Serverless, Edge, Fluid Compute, streaming, Cron Jobs
29+
- `vercel-storage`: Blob, Edge Config, Neon Postgres, Upstash Redis
30+
- `deployments-cicd`: Deploy, promote, rollback, `--prebuilt`, CI config
31+
- `env-vars`: `.env` files, `vercel env`, OIDC tokens
32+
- `routing-middleware`: Rewrites, redirects, personalization (Node.js/Edge/Bun)
33+
- `runtime-cache`: Per-region KV cache with tag-based invalidation
34+
- `shadcn`: shadcn/ui CLI, components, theming, Tailwind integration
35+
- `workflow`: Durable execution, DurableAgent, steps, pause/resume
36+
- `vercel-sandbox`: Ephemeral VMs for running untrusted/AI-generated code
37+
- `verification`: Browser, API, data, and response flow verification
3838

3939
## Specialist agents
4040

41-
- `deployment-expert` CI/CD, deploy strategies, environment variables, rollbacks
42-
- `performance-optimizer` Core Web Vitals, caching, rendering, asset optimization
43-
- `ai-architect` AI app design, model selection, streaming, MCP integration
41+
- `deployment-expert`: CI/CD, deploy strategies, environment variables, rollbacks
42+
- `performance-optimizer`: Core Web Vitals, caching, rendering, asset optimization
43+
- `ai-architect`: AI app design, model selection, streaming, MCP integration
4444

4545
## Platform defaults to assume
4646

docs/brand/README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Posecode brand kit
2+
3+
The Posecode logo is a **kinematic figure in an open, energetic pose**: bones as
4+
strokes, joints connected, the same rig the app animates. It hints at the
5+
project (human movement) while staying friendly and legible down to 16px. It is
6+
the exact mark used in the site's nav, favicon, and app icon: one logo,
7+
everywhere, no separate "tiled" variant.
8+
9+
## Palette
10+
11+
| Token | Hex | Use |
12+
| --- | --- | --- |
13+
| Lime | `#c6f24a` | The figure / accent |
14+
| Ink | `#0a0d12` | Dark background |
15+
16+
Type: **Hanken Grotesk** (wordmark), **JetBrains Mono** (code).
17+
18+
## Files
19+
20+
| File | What it is |
21+
| --- | --- |
22+
| `posecode-mark.svg` | The logo, `currentColor` so it inherits the surrounding text color. Source of truth for inline use. |
23+
| `posecode-icon-512.png` | The logo as a flat-lime PNG on a transparent background. Use for READMEs, avatars, anywhere. |
24+
| `posecode-social.png` | 1280×640 GitHub social preview (logo + wordmark + tagline). |
25+
26+
The live favicon (`playground/public/favicon.svg`, plus `favicon-16/32/48/192/512.png`)
27+
and the iOS icon (`playground/public/apple-touch-icon.png`) use this same figure.
28+
The SVG favicon adapts to the tab color (lime on dark UI, ink on light) so it
29+
stays legible without a background tile.
30+
31+
## Using them on GitHub
32+
33+
- **Repo social preview:** Settings → General → Social preview → upload
34+
`posecode-social.png`.
35+
- **Org / project avatar:** upload `posecode-icon-512.png`. (It's transparent, so
36+
on a light avatar background the lime figure will read light; if you want more
37+
contrast there, place it on an `#0a0d12` square first.)
38+
- **README / inline:** reference `posecode-icon-512.png` or `posecode-mark.svg`.

docs/brand/posecode-icon-512.png

12.5 KB
Loading

docs/brand/posecode-mark.svg

Lines changed: 13 additions & 0 deletions
Loading

docs/brand/posecode-social.png

172 KB
Loading

0 commit comments

Comments
 (0)