Metadata-Version: 2.4
Name: pose-platform
Version: 1.24.0
Summary: Pose CLI — open motion-analysis toolkit for sports scientists
License: Pose Platform License v1.0
Project-URL: Homepage, https://posecap.com/posecli/
Project-URL: Documentation, https://posecap.com/posecli/docs/
Project-URL: Repository, https://github.com/posecap/pose-platform
Keywords: motion-analysis,sports-science,biomechanics,skeleton-tracking,pose-estimation
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Science/Research
Classifier: License :: Other/Proprietary License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: numpy<2,>=1.24
Requires-Dist: pandas>=2.0
Requires-Dist: scipy>=1.11
Requires-Dist: pyyaml>=6.0
Provides-Extra: llm
Requires-Dist: openai>=1.50; extra == "llm"
Requires-Dist: anthropic>=0.30; extra == "llm"
Provides-Extra: server
Requires-Dist: fastapi>=0.110; extra == "server"
Requires-Dist: uvicorn>=0.29; extra == "server"
Requires-Dist: pydantic>=2.0; extra == "server"
Requires-Dist: httpx>=0.27; extra == "server"

# pose Platform

可进化运动分析 AI 平台 — 三层架构，支持无限扩展产品线。

## 文档索引

| 文档 | 说明 |
|------|------|
| [docs/architecture/concept.html](docs/architecture/concept.html) | 完整概念图（浏览器打开） |
| [docs/architecture/ARCHITECTURE.md](docs/architecture/ARCHITECTURE.md) | 架构决策记录（ADR） |
| [docs/architecture/changelog.md](docs/architecture/changelog.md) | 概念图变更历史 |
| [docs/architecture/cross_region_strategy.md](docs/architecture/cross_region_strategy.md) | US/CN 跨区用户数据方案 |
| [docs/cn_region_deployment.md](docs/cn_region_deployment.md) | CN Region 阿里云部署方案 |
| [docs/cn_region_llm_integration.md](docs/cn_region_llm_integration.md) | CN Region LLM 集成方案 |
| [docs/guides/pose-cli.md](docs/guides/pose-cli.md) | pose CLI 安装与使用指南 |
| [docs/guides/researcher-onboarding.md](docs/guides/researcher-onboarding.md) | **研究者上手全指南**（环境搭建→工具开发→接入App） |
| [docs/guides/add-new-product-line.md](docs/guides/add-new-product-line.md) | 新增产品线操作手册 |
| [docs/guides/data-hub-ingest.md](docs/guides/data-hub-ingest.md) | DataHub 数据摄入指南 |
| [docs/api/mcp-tools.md](docs/api/mcp-tools.md) | MCP Tool 接口文档 |
| [docs/operations.md](docs/operations.md) | 日常运营维护手册（每日 Checklist、反馈处理、发布流程） |

## 目录结构

```
pose_platform/
├── pose-manifest.json          # 平台版本锁定（所有产品线对齐点）
├── CLAUDE.md                   # 平台级 Skill（全局知识）
├── requirements.txt
│
├── pose_platform_core/                   # 平台层（不按产品线分，单次搭建永久复用）
│   ├── product_interface.py    # 产品线接入协议
│   ├── gap_registry.py         # 能力缺口统一管理
│   ├── monitoring.py           # 统一监控与日志
│   └── version_manager.py      # manifest 版本管理
│
├── capabilities/               # 能力层（所有产品线共享）
│   ├── mcp_server.py           # 统一 MCP Server 入口
│   ├── tools/
│   │   ├── base.py             # Tool 基类
│   │   ├── loader.py           # JointData3D 加载器
│   │   ├── registry.py         # Tool 注册表（单例）
│   │   ├── energy_tool.py      # detect_peak_energy
│   │   ├── stats_tool.py       # stats
│   │   ├── velocity_tool.py    # detect_velocity
│   │   ├── badminton_rules.py  # 羽毛球生物力学规则集
│   │   └── new_product_line_tool.py  # create_product_line ← 扩展入口
│   └── skills/
│       ├── badminton/SKILL.md  # 羽毛球专项知识
│       └── general/SKILL.md    # 通用运动分析知识
│
├── products/                   # 产品层（每条独立迭代）
│   ├── pose_cli/               # 产品线 A：开发者 CLI 工具
│   │   ├── CLAUDE.md
│   │   ├── product.py
│   │   └── cli.py
│   ├── sports_assistant/       # 产品线 B：智能运动助手 APP
│   │   ├── CLAUDE.md
│   │   ├── product.py
│   │   ├── backend/api.py
│   │   └── ios_stub/README.md
│   └── .product_template/      # 新产品线模板（复制即用）
│       └── CLAUDE.md
│
├── evals/
│   └── core/test_platform.py   # 平台核心测试（无 pytest 依赖）
│
├── data/
│   └── sample.csv              # JointData3D 格式示例数据
│
└── .claude/
    ├── settings.json           # MCP Server 注册 + 权限配置
    ├── agents/
    │   └── product-line-builder.md  # 新产品线创建 Subagent
    └── commands/
        └── new-product.md      # /new-product 快捷命令
```

## 快速开始

```bash
# 1. 安装（含 pose CLI 全局命令）
pip install -e .

# 2. 运行平台测试
python evals/core/test_platform.py

# 3. 分析数据
pose analyze data/sample.csv
pose analyze data/sample.csv --tool detect_peak_energy

# 4. 查看 Gap Registry
pose gaps list

# 5. 启动带上下文的 Claude Code 对话（需已安装 claude CLI）
pose chat ./data

# 6. 启动运动助手后端
uvicorn products.sports_assistant.backend.api:app --reload

# 7. 查看版本信息
pose version
```

> 详细用法见 [docs/guides/pose-cli.md](docs/guides/pose-cli.md)

## 创建新产品线

### 方法一：通过 Tool（代码方式）
```python
from capabilities.tools.new_product_line_tool import NewProductLineTool
import json, pathlib, tempfile

tool = NewProductLineTool()
result = json.loads(tool.safe_run({
    "product_id":    "rehab_app",
    "display_name":  "运动康复评估",
    "target_users":  "物理治疗师和康复患者",
    "core_feature":  "追踪康复进度，评估动作恢复情况",
    "gap_namespace": "rehab",
    "sport_skill":   "general",
}, pathlib.Path(tempfile.mkdtemp())))
print(json.dumps(result, ensure_ascii=False, indent=2))
```

### 方法二：通过 Claude Code Subagent
在 Claude Code 中输入：
```
/new-product
```
或者：
```
我想创建一个面向物理治疗师的运动康复评估产品线
```

### 方法三：手动复制模板
```bash
cp -r products/.product_template products/my_new_product
# 编辑 CLAUDE.md 和 product.py
python products/my_new_product/product.py  # 注册
```

## 核心设计原则

1. **平台层不感知产品** — 能力层和平台层对所有产品线透明
2. **能力层是护城河** — Tool 经过 eval 验证，关闭的 Gap 必须有测试用例
3. **Gap 飞轮自动加速** — 任何产品线的用户反馈都驱动能力层进化
4. **manifest 是唯一真相** — 所有版本信息集中在一个文件中

## 版本说明

- `pose-manifest.json` 中 `platform_version` 是主版本号
- 每个 Tool 有独立版本，互不影响
- 新产品线接入时声明 `uses_platform` 版本
- `python -m products.pose_cli.cli version` 查看完整版本报告
