Skip to content

Commit 851010f

Browse files
committed
docs: add repository community standards, issue templates, and security/funding documentation
1 parent 6d48807 commit 851010f

12 files changed

Lines changed: 323 additions & 37 deletions

.github/FUNDING.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Funding configurations
2+
github: [posecode-dev]
3+
custom: ["https://posecode.org"]
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve Posecode
4+
title: '[BUG] '
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots/Recordings**
24+
If applicable, add screenshots or screen recordings to help explain your problem.
25+
26+
**Environment info:**
27+
- OS: [e.g. macOS, Windows]
28+
- Browser: [e.g. Chrome, Safari]
29+
- Posecode package version: [e.g. 0.1.0]
30+
31+
**Additional context**
32+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea or enhancement for this project
4+
title: '[FEATURE] '
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. "I'm always frustrated when..."
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context, mockup drawings, or design details about the feature request here.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: Movement Rendering / Biomechanical Error
3+
about: Report a movement that doesn't render correctly or triggers joint range-of-motion warnings
4+
title: '[MOVEMENT] '
5+
labels: movement, bug
6+
assignees: ''
7+
8+
---
9+
10+
**Which movement is having an issue?**
11+
Name of the preset/movement: (e.g., deadlift, squat, waltz-box) or paste the shared link if it's a custom script.
12+
13+
**Describe the rendering or biomechanical issue**
14+
Explain what is wrong with the visual animation or which joint warnings are triggered (e.g. "Knee flexion triggers warning at 95 degrees during descent").
15+
16+
**Provide the `.posecode` source**
17+
If it's a custom movement or you modified an existing preset, paste the full `.posecode` script block here:
18+
19+
```posecode
20+
# Paste code here
21+
```
22+
23+
**What is the expected posture/movement?**
24+
A brief description or link to medical/biomechanical standard data detailing how it should look or what the actual joint limit should be.
25+
26+
**Are you interested in sending a PR to fix this?**
27+
- [ ] Yes (Check out CONTRIBUTING.md for details on adding/editing presets)
28+
- [ ] No

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
## Description
2+
3+
Please include a summary of the changes and the reasoning behind them. If this PR resolves an open issue, link to it here:
4+
Fixes # (issue number)
5+
6+
## Type of Change
7+
8+
- [ ] Bug fix (non-breaking change which fixes an issue)
9+
- [ ] New feature (non-breaking change which adds functionality)
10+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
11+
- [ ] Movement/Preset addition (adding a new `.posecode` script and registering it)
12+
- [ ] Documentation update
13+
14+
## Checklist
15+
16+
- [ ] My code follows the code style guidelines of this project
17+
- [ ] I have performed a self-review of my own code
18+
- My changes generate no new TypeScript/compiler warnings or errors:
19+
- [ ] Running `npm run typecheck` passes successfully
20+
- [ ] Running `npm run build` compiles without errors
21+
- [ ] I have run the unit test suite (`npm test`) and all tests pass
22+
- [ ] If applicable, I have run the fidelity evals (`npm run eval`) and all checks pass
23+
- [ ] If I added a new movement, I ran `node scripts/generate-content-pages.mjs` to regenerate the static pages

CODE_OF_CONDUCT.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.
6+
7+
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8+
9+
## Our Standards
10+
11+
Examples of behavior that contributes to a positive environment for our community include:
12+
13+
* Demonstrating empathy and kindness toward other people
14+
* Being respectful of differing opinions, viewpoints, and experiences
15+
* Giving and gracefully accepting constructive feedback
16+
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17+
* Focusing on what is best for the overall community, and not just for us as individuals
18+
19+
Examples of unacceptable behavior include:
20+
21+
* The use of sexualized language or imagery, and unwelcome sexual attention or advances
22+
* Trolling, insulting or derogatory comments, and personal or political attacks
23+
* Public or private harassment
24+
* Publishing others' private information, such as a physical or email address, without their explicit permission
25+
* Other conduct which could reasonably be considered inappropriate in a professional setting
26+
27+
## Enforcement Responsibilities
28+
29+
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
30+
31+
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
32+
33+
## Scope
34+
35+
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
36+
37+
## Enforcement
38+
39+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at **hello@posecode.org**. All complaints will be reviewed and investigated promptly and fairly.
40+
41+
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
42+
43+
## Attribution
44+
45+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][version].
46+
47+
[homepage]: https://www.contributor-covenant.org
48+
[version]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html

CONTRIBUTING.md

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
# Contributing to Posecode
2+
3+
Thank you for your interest in contributing to Posecode! We welcome contributions from developers, biomechanists, and creators.
4+
5+
To maintain a high-quality codebase, please review the contribution guidelines below.
6+
7+
---
8+
9+
## Workspace Architecture
10+
11+
Posecode is structured as an npm-based monorepo using **npm workspaces**:
12+
13+
- `packages/posecode-parser`: Text parser converting `.posecode` to validated, ROM-clamped IR (pure TypeScript).
14+
- `packages/posecode-render`: 3D Forward Kinematics and CCD IK WebGL renderer (Three.js).
15+
- `packages/posecode-embed`: Light `<posecode-player>` web component for embedding 3D figures in blogs/docs.
16+
- `packages/posecode-share`: Permalink codec/compressor for creating short, shareable links.
17+
- `packages/posecode-lsp`: Language Server Protocol implementation for editor autocompletion and diagnostic warnings.
18+
- `packages/posecode-mcp`: Model Context Protocol server exposing parser, authoring guide, and renderer to LLM agents.
19+
- `packages/posecode-eval`: Biomechanical scoring evaluations and headless regression testing.
20+
- `playground`: The main interactive web sandbox (Vite + TypeScript).
21+
22+
---
23+
24+
## Local Development & Setup
25+
26+
### 1. Prerequisites
27+
Ensure you have **Node.js 20+** installed.
28+
29+
### 2. Install Dependencies
30+
Run the following command at the monorepo root to link all workspace packages:
31+
```bash
32+
npm install
33+
```
34+
35+
### 3. Run the Playground
36+
Start the local Vite dev server:
37+
```bash
38+
npm run dev
39+
```
40+
Open your browser to `http://localhost:5173`.
41+
42+
### 4. Build the Project
43+
To compile the production build:
44+
```bash
45+
npm run build
46+
```
47+
48+
---
49+
50+
## Testing & Quality Control
51+
52+
We run a strict set of checks on all PRs to ensure regressions are not introduced.
53+
54+
### Unit Tests
55+
Run the unit test suite across all packages using Vitest:
56+
```bash
57+
npm test
58+
```
59+
60+
### Biomechanical Invariant Evals
61+
The fidelity scorecard headlessly solves FK and IK constraints for all example movements to verify biomechanical invariants (e.g., verifying that a deadlift maintains a flat back and matches vertical shins):
62+
```bash
63+
npm run eval
64+
```
65+
66+
### Type Checking
67+
Run compiler typechecks on all workspaces:
68+
```bash
69+
npm run typecheck
70+
```
71+
72+
---
73+
74+
## How to Add a New Example Movement
75+
76+
To add a new movement preset to the catalog:
77+
78+
1. **Write the `.posecode` script**: Create a file named `spec/examples/<your-movement-id>.posecode` and write your movement steps.
79+
2. **Import the script**: Open `playground/src/presets.ts` and add an import at the top of the file using the `?raw` loader:
80+
```typescript
81+
import yourMovement from "../../spec/examples/your-movement-id.posecode?raw";
82+
```
83+
3. **Register the Preset**: Append a new preset object to the `PRESETS` array with standard taxonomy metadata:
84+
```typescript
85+
{
86+
id: "your-movement-id",
87+
label: "Friendly Movement Name",
88+
domain: "Fitness", // e.g. Fitness, Dance, Physiotherapy, Yoga, Mobility, etc.
89+
bodyPart: "Upper legs", // Target body region
90+
target: "Quadriceps", // Main target muscle group
91+
equipment: "Body weight", // e.g. Body weight, Chair, Wall, Bar, Box
92+
difficulty: "Beginner", // Beginner, Intermediate, Advanced
93+
source: yourMovement
94+
}
95+
```
96+
4. **Regenerate Static Pages**: Statically generated pages must be updated before committing:
97+
```bash
98+
node scripts/generate-content-pages.mjs
99+
```
100+
5. **Verify Fidelity**: Run the eval suite to make sure the movement compiles warning-free and conforms to safety limits:
101+
```bash
102+
npm run eval
103+
```
104+
105+
---
106+
107+
## Coding Conventions
108+
109+
- **TypeScript First**: All core library files must be written in strongly-typed TypeScript.
110+
- **Framework-Agnostic Core**: Keep packages under `packages/` dependency-light and decoupled from frontend frameworks (like React or Vue) to maximize embeddability.
111+
- **Range of Motion Clamping**: Never bypass the `posecode-parser` ROM bounds. All custom rigs or movements must adhere to healthy physical thresholds.

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
<h1 align="center">Posecode</h1>
1+
<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/>
44
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">
8-
<a href="https://posecode.org/play"><b>Live playground</b></a> ·
8+
<a href="https://posecode.org/play"><b>Live playground</b></a> ·
99
<a href="https://posecode.org/moves/">Movement library</a> ·
1010
<a href="https://posecode.org/spec.html">Language spec</a> ·
1111
<a href="spec/examples">Examples</a> ·
@@ -51,7 +51,7 @@ Posecode takes the opposite, lightweight approach:
5151

5252
## The Idea in 30 Seconds
5353

54-
A `.posecode` file describes human movements as a sequence of timed steps with targeted joint movements and range-of-motion rules:
54+
A `.posecode` file describes human movements as a sequence of timed steps with targeted joint movements and range-of-motion rules:
5555

5656
| 1. Write `.posecode` | 2. Render 3D Animation |
5757
| :--- | :--- |
@@ -63,19 +63,19 @@ A `.posecode` file describes human movements as a sequence of timed steps with t
6363

6464
Choose the integration path that fits your use case:
6565

66-
### 🌐 Live Playground (No installation)
66+
### Live Playground (No installation)
6767
Instantly preview, edit, and share movements in the browser:
68-
👉 **[posecode.org/play](https://posecode.org/play)**
68+
**[posecode.org/play](https://posecode.org/play)**
6969

70-
### 🤖 MCP Server (For AI Agents)
70+
### MCP Server (For AI Agents)
7171
Teach your AI agent (in Claude Desktop, Cursor, etc.) to read, write, and render Posecode natively using our Model Context Protocol server:
7272
```bash
7373
# Add to your MCP client config (e.g. claude_desktop_config.json):
7474
npx posecode-mcp
7575
```
7676
*See the [MCP Package README](packages/posecode-mcp/README.md) for full configuration options.*
7777

78-
### 📦 Web Component Embed (For Blogs & Docs)
78+
### Web Component Embed (For Blogs & Docs)
7979
Embed an interactive, low-poly 3D player on any page using a single `<script>` tag:
8080
```html
8181
<script src="https://unpkg.com/posecode-embed/dist/posecode-embed.js"></script>
@@ -84,7 +84,7 @@ Embed an interactive, low-poly 3D player on any page using a single `<script>` t
8484
```
8585
*See the [Embed Package README](packages/posecode-embed/README.md) for customizing autoplay, controls, speed, and styling.*
8686

87-
### 💻 Core Libraries (For custom JS/TS apps)
87+
### Core Libraries (For custom JS/TS apps)
8888
Build custom rendering or parsing logic directly in your own applications:
8989
```bash
9090
# Parser only (converts text to range-of-motion clamped IR)
@@ -123,17 +123,17 @@ For where Posecode spreads fastest and the per-domain go-to-market plan, see [`d
123123

124124
## Scope (v0.1)
125125

126-
Single-person movement across fitness, physio, desk, dance, education & rehab · Mermaid-style DSL · ROM safety clamping (authored **and IK-solved** angles) · forward kinematics · ground-lock **and ROM-constrained reach-to-target IK** · hip-hinge · lying/seated poses · scene props (chair/wall/bar) · a single-DOF hand rig · live playground.
126+
Single-person movement across fitness, physio, desk, dance, education & rehab · Mermaid-style DSL · ROM safety clamping (authored **and IK-solved** angles) · forward kinematics · ground-lock **and ROM-constrained reach-to-target IK** · hip-hinge · lying/seated poses · scene props (chair/wall/bar) · a single-DOF hand rig · live playground.
127127

128-
Deferred: two-person / partner movements + collision detection, deeper props (load, bands, rings), multi-joint fingers, FBX/GLB export, hosted SaaS editor and the expert-verified motion marketplace.
128+
Deferred: two-person / partner movements + collision detection, deeper props (load, bands, rings), multi-joint fingers, FBX/GLB export, hosted SaaS editor and the expert-verified motion marketplace.
129129

130130
---
131131

132132
## Background
133133

134134
This project follows a design study, *"Kinematic Motion Definition Protocols for Large Language Models"*, which argues for a semantic DSL over diffusion models, specifies ROM-based safety constraints from clinical normative data, and lays out the open-core commercialization path. The spec cross-references its sections (§4 DSL, §5 biomechanics, §6 client rendering, §7 strategy).
135135

136-
> ⚠️ Posecode's range-of-motion values are general literature data, not medical advice. Consult a qualified professional for physiotherapy or exercise prescription.
136+
> Posecode's range-of-motion values are general literature data, not medical advice. Consult a qualified professional for physiotherapy or exercise prescription.
137137
138138
---
139139

0 commit comments

Comments
 (0)