File size: 4,364 Bytes
842c3fe
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
---
license: cc-by-4.0
pretty_name: code-theseus
task_categories:
- text-generation
language:
- en
size_categories:
- 10K<n<100K
tags:
- software-engineering
- requirements-engineering
- software-architecture
- reverse-engineering
- c4-model
- code-generation
- coding-agents
- llm
- synthetic
configs:
- config_name: documents
  data_files: documents/train.parquet
  default: true
- config_name: repos
  data_files: repos/train.parquet
---

<div align="center">

# 🚒 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 |



</div>

## 🧭 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.