[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-108027":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":15,"stars7d":13,"stars30d":16,"stars90d":15,"forks30d":15,"starsTrendScore":14,"compositeScore":17,"rankGlobal":10,"rankLanguage":10,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":21,"hasPages":19,"topics":22,"createdAt":10,"pushedAt":29,"updatedAt":30,"readmeContent":31,"aiSummary":32,"trendingCount":15,"starSnapshotCount":15,"syncStatus":33,"lastSyncTime":34,"discoverSource":35},108027,"The-Trinity","InfRec-Cardinal\u002FThe-Trinity","InfRec-Cardinal","Official implementation of The Trinity: Capability-Driven Recursive Self-Improvement for Multimodal Agents.","https:\u002F\u002Ftrinity-rsi.github.io\u002F",null,"JavaScript",78,7,1,0,23,48.51,"MIT License",false,"main",true,[23,24,25,26,27,28],"ai-agents","capability-learning","harness","multimodal-agents","real2sim2real","recursive-self-improvement","2026-11-22 19:21:26","2026-11-21 10:43:46","\u003Cp align=\"center\">\n  \u003Cimg src=\"assets\u002Finfrec.png\" alt=\"InfRec Cardinal AI Lab\" width=\"240\">\n\u003C\u002Fp>\n\n\u003Ch1 align=\"center\">The Trinity\u003C\u002Fh1>\n\n\u003Cp align=\"center\">\n  \u003Cstrong>Capability-Driven Recursive Self-Improvement for Multimodal Agents\u003C\u002Fstrong>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">The Trinity Research Team\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Ca href=\"paper\u002FThe-Trinity.pdf\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPaper-PDF-B31B1B?style=flat-square\" alt=\"Paper PDF\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Farxiv.org\u002Fabs\u002F2610.36077\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FarXiv-2610.36077-B31B1B?style=flat-square&amp;logo=arxiv&amp;logoColor=white\" alt=\"arXiv 2610.36077\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FInfRec-Cardinal\u002FThe-Trinity\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FGitHub-181717?style=flat-square&amp;logo=github&amp;logoColor=white\" alt=\"GitHub\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Ftrinity-rsi.github.io\u002F\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FProject%20Page-2088A2?style=flat-square&amp;logo=googlechrome&amp;logoColor=white\" alt=\"Project Page\">\u003C\u002Fa>\n  \u003Ca href=\"https:\u002F\u002Fmp.weixin.qq.com\u002Fs\u002FbAj8nOQ46RlNU9BWouPjmA\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F%E4%B8%AD%E6%96%87%E8%A7%A3%E8%AF%BB-07C160?style=flat-square&amp;logo=wechat&amp;logoColor=white\" alt=\"微信公众号中文解读\">\u003C\u002Fa>\n  \u003Ca href=\"#citation\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FCitation-BibTeX-7042C1?style=flat-square&amp;logo=bookstack&amp;logoColor=white\" alt=\"Citation BibTeX\">\u003C\u002Fa>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Cstrong>English\u003C\u002Fstrong> · \u003Ca href=\"README.zh-CN.md\">简体中文\u003C\u002Fa>\n\u003C\u002Fp>\n\n### Overview\n\nhttps:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F0d1db0d1-ada7-4972-948d-f77db8509ec0\n\n### Examples\n\nhttps:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F25c4f8e8-d749-48e1-a5e4-f5b80fc4fab9\n\n## 🔥 Updates!!\n\n- **Oct 30, 2026:** 🔥 Codes released!\n- **Oct 26, 2026:** 🤗 Paper release! The Trinity reached **#1** on [Hugging Face Daily Papers](https:\u002F\u002Fhuggingface.co\u002Fpapers\u002F2610.36077).\n\n## 📑 Open-Source Plan\n\n1. [x] Release code.\n2. [ ] Release simulation environments.\n3. [ ] Release Harness.\n4. [ ] Release Router.\n5. [ ] Prepare the [demo website](#try-and-play).\n\n## 📖 Introduction\n\n**The Trinity** is a recursive self-improvement framework that couples world generation with agent Harness evolution. It organizes heterogeneous multimodal tasks by shared capability requirements and connects three roles through verified execution feedback:\n\n- **Creator** builds simplified, verifiable worlds for capability learning.\n- **Explorer** interacts with worlds and evolves reusable capability modules through selective inheritance.\n- **Evolver** organizes task requirements into a hierarchical capability tree.\n\n**Capability-Driven Real2Sim2Real** connects learning in generated worlds with evaluation on original tasks. A **Capability-Aware Harness Router** selects compatible module configurations for each task. See the [technical report](paper\u002FThe-Trinity.pdf) for the method, experiments, and reported results.\n\n![Overview of The Trinity: Creator, Explorer, and Evolver connect multimodal task-space expansion with capability-driven Harness evolution.](assets\u002Foverview.png)\n\n\u003Ca id=\"try-and-play\">\u003C\u002Fa>\n\n## 🕹️ Try and Play with The Trinity!\n\nWe are preparing an interactive demo website for phased testing to help you explore The Trinity and better understand how it works.\n\n## 🗂️ Code Structure and Release Scope\n\nThis release contains the integrated command-line entry point, task discovery and splitting, trajectory analysis and capability induction, Creator–Explorer training, Harness routing, prompts, and accounting utilities.\n\n| Path | Purpose |\n| --- | --- |\n| [cli.mjs](cli.mjs), [src\u002F](src\u002F) | Integrated commands and cross-stage handoffs |\n| [pipeline\u002F](pipeline\u002F) | Stage 1: evidence-backed task discovery, taxonomy, and train\u002Funseen split |\n| [stage2\u002F](stage2\u002F) | Stage 2: trajectory analysis, capability induction, and training export |\n| [harness\u002F](harness\u002F) | Environment generation, module evolution, evaluation, and routing |\n| [config\u002Fproviders.json](config\u002Fproviders.json) | Model-provider presets |\n| [paper\u002F](paper\u002F), [assets\u002F](assets\u002F) | Technical report and project figures |\n\n## 🛠️ Requirements\n\n- **Node.js 22 or later.** The JavaScript packages use built-in Node APIs and declare no npm dependencies.\n- **Python 3.10 or later.** Stage 2 declares `anthropic>=1.0`; install its package as shown below.\n- **Model access** compatible with the configured provider transport. Stage 1 additionally needs working web search. Model names and API versions in the presets must be supported by your account.\n- **For full training:** Linux with `\u002Fusr\u002Fbin\u002Fbwrap` (Bubblewrap), usable user namespaces, and `\u002Fbin\u002Fbash`. The Creator sandbox requires these facilities; WSL must satisfy the same requirements. See [creator-sandbox.mjs](harness\u002Fsrc\u002Fcreator-sandbox.mjs).\n- **For PDF source extraction:** `pdftotext` or Python with `pypdf`. Scanned PDFs require an external OCR workflow.\n- Benchmark-specific software, data, and execution access required by your adapter.\n\n## 🚀 Installation\n\nThe commands below use Bash and run from the repository root:\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FInfRec-Cardinal\u002FThe-Trinity.git\ncd The-Trinity\npython3 -m venv .venv\nsource .venv\u002Fbin\u002Factivate\npython -m pip install -e .\u002Fstage2\nexport TRINITY_PYTHON=\"$PWD\u002F.venv\u002Fbin\u002Fpython\"\nnode cli.mjs stage2 --help\n```\n\nNo `npm install` is needed. `TRINITY_PYTHON` defaults to `python3`; on Windows it can point to `.venv\\Scripts\\python.exe`. Native Windows does not provide the Linux Creator sandbox required for full training.\n\nConfigure a provider through environment variables. Replace the placeholders with values supported by your account:\n\n```bash\nexport TRINITY_PROVIDER=anthropic\nexport ANTHROPIC_API_KEY='your-api-key'\nexport TRINITY_MODEL='account-available-model'\nexport TRINITY_API_VERSION='supported-api-version'\nexport PIPELINE_DATA_DIR=\"$PWD\u002Fruns\u002Fstage1\u002Fdata\"\nexport PIPELINE_EXPORT_DIR=\"$PWD\u002Fruns\u002Fstage1\u002Fexports\"\n```\n\nThe code does not automatically load `.env` files. Keep credentials in your environment. The built-in transport uses the Anthropic Messages protocol, streaming, adaptive thinking, and tools; an arbitrary chat-completions endpoint is not interchangeable. Provider presets are configuration defaults, not a guarantee that a service or model is available.\n\n## 🧭 Usage\n\nComplete the [environment adapter](#environment-adapter) before running exploration or training. Commands that invoke models, search, or benchmarks consume the corresponding resources. Use a new output directory for each `explore`, `train`, and `route` run.\n\n### 1. Discover tasks and export the split\n\n```bash\nnode cli.mjs stage1 connect-test\nnode cli.mjs stage1 search\nnode cli.mjs stage1 status\n```\n\n`connect-test` makes real model and search requests. A completed search automatically exports a task tree and handoff. Check that search status is `done` and the split has no gaps or errors; an `incomplete` result may still exit successfully. Select the actual dated export:\n\n```bash\nexport HANDOFF=\"$PWD\u002Fruns\u002Fstage1\u002Fexports\u002Fstage2-handoff-YYYYMMDD.json\"\n```\n\nAn interrupted search resumes with `stage1 search`. If its budget is exhausted, use `node cli.mjs stage1 budget --turns 80 --searches 32` before resuming. Running `search` after a completed search starts a new search. `search --new` resets the current search state.\n\n### 2. Explore training tasks\n\n```bash\nnode cli.mjs explore \\\n  --handoff \"$HANDOFF\" \\\n  --adapter local\u002Fadapter.json \\\n  --out runs\u002Fexplore-train\n```\n\nThis collects five episodes per training task with frozen initial instances and exports canonical trajectories, `runs.json`, and an execution ledger. The adapter supplies the environment and action budget.\n\n### 3. Analyse trajectories and induce capabilities\n\n```bash\nnode cli.mjs stage2 all \\\n  --handoff \"$HANDOFF\" \\\n  --runs runs\u002Fexplore-train\u002Fruns.json \\\n  --out runs\u002Fstage2\n```\n\n`all` imports training records, builds digests, analyses and reviews failures, induces capabilities, assigns tasks, and writes trees. Its training workflow does not use unseen exploration records. Individual commands are listed by `node cli.mjs stage2 --help`.\n\n### 4. Inspect the training configuration, then train\n\nThe optional `prepare` command exports the validated training configuration:\n\n```bash\nnode cli.mjs prepare \\\n  --stage2 runs\u002Fstage2 --adapter local\u002Fadapter.json \\\n  --out runs\u002Ftraining-config.json\n```\n\nThe output file must not already exist. `train` rebuilds the configuration from Stage 2 and the adapter; it does not read the file exported by `prepare`.\n\n```bash\nnode cli.mjs train \\\n  --stage2 runs\u002Fstage2 --adapter local\u002Fadapter.json \\\n  --out runs\u002Ftrain\n```\n\nTraining performs Creator construction and audits, local module evolution, and evaluation. Successful completion writes `training-complete.json` and `routing-candidates.json`, alongside checkpoints and execution evidence.\n\n### 5. Build a routing plan and evaluate\n\nCreate `local\u002Frouting-plan.json` for your benchmark environments. Training exports the candidate pool, but does not generate a complete routing plan. The plan requires schema `trinity-routing-plan-v1`, a `protocolId`, `split` (`train` or `unseen`), `candidates`, and ordered `tasks`. Each task supplies `taskId`, `benchmarkId`, `world`, `publicTask`, positive integer `budget`, and positive integer `modelCallBudget`.\n\nUse the frozen candidate records from `runs\u002Ftrain\u002Frouting-candidates.json`. Public task context must exclude private capability labels and evaluation outcomes. Before the first evaluation of each benchmark\u002FHarness pair, supply exactly five `preparationWorlds`, or provide a valid previously frozen skill artifact through `skillDirectory`. See the full [routing plan contract](harness\u002Fsrc\u002Frouter-protocol.mjs) and [evaluation skill preparation](harness\u002Fsrc\u002Fevaluation-skills.mjs).\n\n```bash\nnode cli.mjs route \\\n  --plan local\u002Frouting-plan.json --adapter local\u002Fadapter.json \\\n  --training-run runs\u002Ftrain --out runs\u002Froute\n```\n\n### 6. Collect accounting\n\n```bash\nnode cli.mjs metrics \\\n  runs\u002Fstage1\u002Fdata runs\u002Fexplore-train runs\u002Fstage2 runs\u002Ftrain runs\u002Froute \\\n  > runs\u002Fmetrics.json\n```\n\nThe report aggregates recorded model usage, episode costs, benchmark scores, routing results, and accounting warnings. Monetary cost is not calculated; `monetaryCost` is `null`. Check `accountingComplete` and warnings before comparing runs.\n\n### Unseen exploration after training\n\nCollect unseen records only after the referenced training run has completed:\n\n```bash\nnode cli.mjs explore \\\n  --handoff \"$HANDOFF\" --adapter local\u002Fadapter.json \\\n  --cohort unseen --training-run runs\u002Ftrain --out runs\u002Fexplore-unseen\n```\n\nThe completion record must match the handoff and unseen cohort. These records support post-training analysis and evaluation; they are not additional training inputs. Unseen routing uses a plan with `split: \"unseen\"` and the completed training run. See [protocol-state.mjs](harness\u002Fsrc\u002Fprotocol-state.mjs) for the enforced bindings.\n\n\u003Ca id=\"environment-adapter\">\u003C\u002Fa>\n\n## 🔌 Environment Adapter\n\nCreate your own `local\u002Fadapter.json` and `local\u002Fdriver.mjs`. A minimal configuration shape is:\n\n```json\n{\n  \"driverModule\": \".\u002Fdriver.mjs\",\n  \"driverOptions\": {},\n  \"actionBudget\": 4\n}\n```\n\n`driverModule` resolves relative to the adapter JSON. The module must export `createDriver(options)`, returning your driver. The action budget above is an example; choose the budget required by your experiment. A configuration file alone does not implement an environment.\n\n| Driver member | Required behavior |\n| --- | --- |\n| `loadBenchmark(task)` | Load a benchmark and return a serializable world descriptor. |\n| `fingerprint(world)` | Return stable evidence identifying the environment build. |\n| `instanceManifest(world, trials)` | Return exactly `trials` reproducible instance descriptors. |\n| `reset(world, instance)` | Start a session containing `observation` and `actionSchema`; support reset without an instance for audits. |\n| `initialState(session)` | Return stable initial-state evidence for matched execution. |\n| `step(session, action)` | Return boolean `done` and `success`, `observation`, and finite nonnegative `cost`; optional `score` and `reward` must be finite. Success requires a terminal receipt. |\n| `close(session)` | Optional session cleanup. |\n| `designContract`, `buildContract` | Define the Creator design and build output contracts for training. |\n| `validateDesign(design, node)` | Validate a proposed design before construction. |\n| `materialize(design, proposal, context)` | Build a world from the Creator workspace and proposal. |\n| `inspect(world, design, buildDigest)` | Provide native inspection evidence for the built environment. |\n| `creatorAuditPlan(world, design)` | Provide executable audit plans used to verify Creator worlds. |\n\nThe first seven members cover exploration and environment execution; full training also requires the Creator members. Consult [integration.mjs](src\u002Fintegration.mjs), [explorer.mjs](harness\u002Fsrc\u002Fexplorer.mjs), [creator-coding.mjs](harness\u002Fsrc\u002Fcreator-coding.mjs), and [creator-audits.mjs](harness\u002Fsrc\u002Fcreator-audits.mjs) for exact contracts. Environments must support reproducible resets and host-verifiable outcomes.\n\nThe default agent backend uses the configured provider. Advanced integrations can set `agentCommand` and `agentOptions` in the adapter to use the [command-agent protocol](harness\u002Fsrc\u002Fagent.mjs).\n\n## ⚙️ Configuration and Outputs\n\n| Setting | Meaning |\n| --- | --- |\n| `TRINITY_PROVIDER` | Provider preset from [providers.json](config\u002Fproviders.json). |\n| `TRINITY_API_KEY` | Fallback API key; provider-specific key variables take precedence. |\n| `TRINITY_MODEL`, `TRINITY_API_VERSION` | Override the model and API version for the active provider. |\n| `TRINITY_BASE_URL`, `TRINITY_AUTH` | Override endpoint and authentication (`x-api-key` or `bearer`). |\n| `TRINITY_WEB_SEARCH`, `TRINITY_EFFORT` | Search mode and reasoning effort supported by the provider. |\n| `TRINITY_PROVIDERS_FILE` | Use an external provider configuration file. |\n| `TRINITY_PYTHON`, `TRINITY_NODE` | Python executable used by the integrated Stage 2 command, and Node executable used for Stage 2 protocol verification. |\n| `PIPELINE_DATA_DIR`, `PIPELINE_EXPORT_DIR` | Stage 1 state and export locations; defaults are `pipeline\u002Fdata` and `pipeline\u002Fexports`. |\n| `PIPELINE_PDFTOTEXT`, `PIPELINE_PDF_PYTHON` | Optional executable overrides for PDF extraction. |\n\nStage 1 currently excludes audio task inputs. Its default unseen fraction is `18\u002F46`, applied per direction with provenance eligibility and at least one training task retained; discovered task counts are not fixed. To change a completed library's split, run `node cli.mjs stage1 split --unseen-fraction 0.4` followed by `node cli.mjs stage1 export` before downstream work.\n\nTraining settings such as iterations, action budget, build attempts, and screening are read from the adapter with defaults in [harness\u002Fconfig\u002Fdefaults.json](harness\u002Fconfig\u002Fdefaults.json). Training and validation each require five episodes.\n\n| Output directory | Main contents |\n| --- | --- |\n| `runs\u002Fstage1\u002Fdata`, `runs\u002Fstage1\u002Fexports` | Search state, captured evidence, checkpoints, task trees, and dated handoffs |\n| `runs\u002Fexplore-train` | `runs.json`, canonical `records\u002F`, frozen instances, and `events.jsonl` |\n| `runs\u002Fstage2` | Analyses, reviewed capability catalogue, assignments, and trees |\n| `runs\u002Ftrain` | Checkpoints, Creator evidence, summary, routing candidates, and completion record |\n| `runs\u002Froute` | Frozen plan, evaluation skills, execution ledger, and hashed routing predictions |\n\nPreserve the complete run directories: later stages verify source ledgers and artifact hashes, not just copied summary files.\n\n\u003Ca id=\"citation\">\u003C\u002Fa>\n\n## 📝 Paper and Citation\n\n**The Trinity: Capability-Driven Recursive Self-Improvement for Multimodal Agents**\n\nThe Trinity Research Team, 2026.\n\n[Read the technical report](paper\u002FThe-Trinity.pdf) · [Visit the project page](https:\u002F\u002Ftrinity-rsi.github.io\u002F)\n\n```bibtex\n@misc{tang2026trinity,\n  title={The Trinity: Capability-Driven Recursive Self-Improvement for Multimodal Agents},\n  author={Tang, Weidong and Wang, Ruiheng and Zhang, Jingxuan and Wang, Hexin and Chen, Haoyuan and Zhang, Zhengfeiyang and Ma, Yixing and Jiang, Zichen and Guo, Ziyu and Li, Haodong and Jiao, Zhengbo and Cui, Zhiqing and Yin, Xinxiang and Liang, Shuo and Wan, Zhenglin and Lin, Hongzhan and Zhao, Wangbo and Zhang, Kaipeng and Zhou, Pengfei and Zhang, Odin and You, Yang},\n  year={2026},\n  eprint={2610.36077},\n  archivePrefix={arXiv},\n  primaryClass={cs.AI},\n  doi={10.48550\u002FarXiv.2610.36077},\n  url={https:\u002F\u002Farxiv.org\u002Fabs\u002F2610.36077}\n}\n```\n\n## 📄 License\n\nThe source code is released under the [MIT License](LICENSE). External benchmark resources and dependencies remain subject to their respective licenses.\n","The Trinity 是一个面向多模态智能体的能力驱动型递归自优化框架，通过 Creator（世界生成）、Explorer（能力探索）和 Evolver（能力演化）三角色协同，实现从真实任务→仿真环境→真实任务（Real2Sim2Real）的闭环能力进化。核心特点包括：基于共享能力需求组织异构多模态任务、构建可验证的简化世界用于能力学习、支持模块化能力继承与组合、配备能力感知的 Harness 路由器实现任务-模块动态匹配。适用于需要持续提升跨模态泛化能力、在有限真实数据下开展安全可控能力演化的多模态 AI 系统研发场景。",2,"2026-11-24 04:33:21","CREATED_QUERY"]