--- license: cc-by-4.0 pretty_name: code-theseus task_categories: - text-generation language: - en size_categories: - 10K # 🚢 code-theseus **The design behind 10,000+ open-source repositories: intent, requirements and architecture, aligned with the code, ready for training coding agents.** | 📦 **10,813** | 📄 **21,623** | 🌐 **4** | 🤖 **2** | |:---:|:---:|:---:|:---:| | repositories | document sets | languages: Java, Python, C/C++, C# | generator LLMs | ## 🧭 Why this dataset Coding agents increasingly design before they code, but almost no data connects code to the requirements and architecture behind it: real projects rarely keep these documents, and when they do they are outdated or private. code-theseus recovers them from the source code, at scale. ## 📦 What's inside Every repository comes with three aligned documents, generated from its dependency graph and key project files: | | Document | What it captures | |---|---|---| | 🎯 | **`intent`** | The "initial prompt": mission, problem, capabilities, user workflows, quality expectations | | 📋 | **`requirements`** | `REQ-FUNC-*` / `REQ-NFR-*` items with statement, rationale, acceptance criteria, verification method and priority | | 🏗️ | **`architecture`** | A C4 design (context, container, component) with Mermaid C4 diagrams | …plus the **package-level dependency graph** each document was generated from, and a link to the exact commit it describes. No source code is redistributed: check out `url` at `commit_sha` to recover it. ## 🔁 Does it carry the design? In the paper's Ship of Theseus test, a coding agent rebuilt [Commit0](https://github.com/commit-0/commit0) libraries from these documents alone. With requirements and architecture, it built a module structure **significantly closer to the original** than with intent alone (module F1 0.54 → 0.63), at the same test pass rate. ## 🏢 Use it for - **Fine-tuning** models that write specs from code (graph → intent, requirements, architecture) or code from specs. - **Spec-driven coding agents.** Realistic requirements and architecture briefs as agent inputs. - **Evaluating** the intermediate steps of multi-agent development, not just the final code. - **Research** on requirements engineering, software architecture recovery and traceability. ## 🚀 Quick start ```python from datasets import load_dataset docs = load_dataset("anonymous/code-theseus", "documents", split="train") repos = load_dataset("anonymous/code-theseus", "repos", split="train") graphs = dict(zip(repos["repo_id"], repos["arcan_graph"])) graph = graphs[docs[0]["repo_id"]] # input graph for the first document ``` ## 🗂️ Configs ### `documents` (21,623 rows): one row per (repository, generator) | column | description | |---|---| | `repo_id` | `owner\|repo`; join key to `repos` | | `generator` | `gemma-4-31b-it` / `qwen3.5-122b-a10b` | | `checkpoint` | Hugging Face checkpoint served with vLLM | | `intent`, `requirements`, `architecture` | generated Markdown; null if missing, truncated or empty (56 docs) | | `reasoning_*` | the generator's thinking trace (Qwen only, null otherwise) | ### `repos` (10,813 rows): one row per repository | column | description | |---|---| | `repo_id` | `owner\|repo` | | `branch` | `main` (GitHub corpus) or `commit0` ([Commit0](https://github.com/commit-0/commit0) libraries) | | `url` | GitHub URL | | `commit_sha` | analysed commit; documents describe the repository at this commit | | `language`, `description`, `stars` | GitHub metadata at collection time | | `arcan_graph` | package-level dependency graph from [Arcan](https://www.arcan.tech/): `nodes` (`vertex_id`, `name`, `component_type`, `fan_in`, `fan_out`, `lines_of_code`, `pagerank`) and weighted `edges` (`source`/`target` are `vertex_id`s) | ## 📜 License [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). This covers the generated documents and dependency graphs. The original repositories keep their own licenses.