LifeStack documentation
All project documentation lives under docs/ (except the repository README.md at the root, which is the HuggingFace Space and GitHub entry point).
Repository: https://github.com/oki-dokii/Meta-R2
Quick links
Core system
| Doc |
Code |
Description |
| lifestack_env.md |
core/lifestack_env.py |
LifeStackEnv, WorldEngine, reset/step/rollout, OpenEnv shim |
| reward.md |
core/reward.py, scripts/train_trl.py |
compute_reward, compute_task_reward, 10 GRPO reward heads |
| task.md |
core/task.py |
Task, Route, Milestone, ExoEvent dataclasses |
| memory.md |
agent/memory.py |
LifeStackMemory, ChromaDB collections, few-shot injection |
| conflict_generator.md |
agent/conflict_generator.py |
Crisis scenario templates, TaskGenerator, 8 domains |
Training & configuration
| Doc |
Description |
| training_guide.md |
End-to-end guide: Colab, server, resume, common errors |
| train_trl.md |
LifeStackGRPOTrainer, JSON-boundary masking, 5-stage curriculum |
| configuration.md |
GRPOConfig via _make_grpo_config, reward weights per stage |
| kaggle_train.md |
Notebook-specific setup (T4, session timeouts, OOM tips) |
Scripts & evaluation
| Doc |
Description |
| eval.md |
scripts/eval.py random-policy baseline |
| scripts.md |
All scripts under scripts/ with usage examples |
Application & deployment
| Doc |
Description |
| app.md |
Flask demo app_flask.py on port 7860, routes, MODEL_REGISTRY |
| DEPLOYMENT.md |
start.sh dual-service, ports 7860 + 8000, env vars, Docker |
Meta & pitch
Maintenance rule
When you add a feature or a new doc file, add a one-line entry in the appropriate table above. See CONTRIBUTING.md for the full doc-first rule.
Last updated: 2026-04-26.