coauthored 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. coauthored-0.1.0/.gitignore +22 -0
  2. coauthored-0.1.0/LICENSE +202 -0
  3. coauthored-0.1.0/PKG-INFO +124 -0
  4. coauthored-0.1.0/README.md +95 -0
  5. coauthored-0.1.0/configs/bots.yaml +32 -0
  6. coauthored-0.1.0/configs/signatures.yaml +482 -0
  7. coauthored-0.1.0/pyproject.toml +89 -0
  8. coauthored-0.1.0/src/coauthored/__init__.py +3 -0
  9. coauthored-0.1.0/src/coauthored/analysis/__init__.py +0 -0
  10. coauthored-0.1.0/src/coauthored/analysis/aggregate.py +154 -0
  11. coauthored-0.1.0/src/coauthored/analysis/figures.py +375 -0
  12. coauthored-0.1.0/src/coauthored/analysis/glmm.py +156 -0
  13. coauthored-0.1.0/src/coauthored/analysis/hypotheses.py +440 -0
  14. coauthored-0.1.0/src/coauthored/analysis/run.py +510 -0
  15. coauthored-0.1.0/src/coauthored/bots.py +46 -0
  16. coauthored-0.1.0/src/coauthored/cli.py +241 -0
  17. coauthored-0.1.0/src/coauthored/dashboard.py +176 -0
  18. coauthored-0.1.0/src/coauthored/guard.py +29 -0
  19. coauthored-0.1.0/src/coauthored/match.py +145 -0
  20. coauthored-0.1.0/src/coauthored/paper.py +313 -0
  21. coauthored-0.1.0/src/coauthored/policy/__init__.py +0 -0
  22. coauthored-0.1.0/src/coauthored/policy/classify.py +85 -0
  23. coauthored-0.1.0/src/coauthored/scan/__init__.py +0 -0
  24. coauthored-0.1.0/src/coauthored/scan/gitlog.py +86 -0
  25. coauthored-0.1.0/src/coauthored/scan/identity.py +34 -0
  26. coauthored-0.1.0/src/coauthored/scan/records.py +54 -0
  27. coauthored-0.1.0/src/coauthored/scan/run.py +77 -0
  28. coauthored-0.1.0/src/coauthored/signatures/__init__.py +0 -0
  29. coauthored-0.1.0/src/coauthored/signatures/catalogue.py +90 -0
  30. coauthored-0.1.0/src/coauthored/signatures/matcher.py +93 -0
  31. coauthored-0.1.0/src/coauthored/survival/__init__.py +0 -0
  32. coauthored-0.1.0/src/coauthored/survival/classify.py +68 -0
  33. coauthored-0.1.0/tests/conftest.py +95 -0
  34. coauthored-0.1.0/tests/fixtures/bots.yaml +5 -0
  35. coauthored-0.1.0/tests/fixtures/catalogue.yaml +19 -0
  36. coauthored-0.1.0/tests/test_aggregate.py +66 -0
  37. coauthored-0.1.0/tests/test_bots.py +45 -0
  38. coauthored-0.1.0/tests/test_cli.py +89 -0
  39. coauthored-0.1.0/tests/test_dashboard.py +34 -0
  40. coauthored-0.1.0/tests/test_glmm.py +56 -0
  41. coauthored-0.1.0/tests/test_guard.py +17 -0
  42. coauthored-0.1.0/tests/test_hypotheses.py +108 -0
  43. coauthored-0.1.0/tests/test_match.py +51 -0
  44. coauthored-0.1.0/tests/test_matcher.py +78 -0
  45. coauthored-0.1.0/tests/test_paper.py +115 -0
  46. coauthored-0.1.0/tests/test_policy.py +35 -0
  47. coauthored-0.1.0/tests/test_run.py +182 -0
  48. coauthored-0.1.0/tests/test_scan.py +65 -0
  49. coauthored-0.1.0/tests/test_survival.py +46 -0
@@ -0,0 +1,22 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ .venv/
4
+ .pytest_cache/
5
+ .mypy_cache/
6
+ .ruff_cache/
7
+ .coverage
8
+ coverage.xml
9
+ dist/
10
+ build/
11
+ *.egg-info/
12
+ .env
13
+ .env.*
14
+ # clones and raw per-commit logs never enter git (aggregates only; raw goes to the HF dataset)
15
+ work/
16
+ data/raw/
17
+ cache/
18
+
19
+ # planning files stay private (lesson from sandbank/cpilens history rewrites)
20
+ MISSION.md
21
+ DECISIONS.md
22
+ paper/paper.filled.md
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright 2026 Thanatchon Chongmankhong
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
@@ -0,0 +1,124 @@
1
+ Metadata-Version: 2.5
2
+ Name: coauthored
3
+ Version: 0.1.0
4
+ Summary: Count AI-attributed commits (Co-authored-by trailers, AI-agent accounts, generated-with markers) in any git history, and the pre-registered study of AI co-authorship in the repositories that build AI.
5
+ Project-URL: Homepage, https://github.com/thanatchon36/coauthored
6
+ Project-URL: Paper, https://github.com/thanatchon36/coauthored/blob/main/paper/coauthored.pdf
7
+ Project-URL: Dataset, https://huggingface.co/datasets/thanatchon36/coauthored
8
+ Project-URL: Issues, https://github.com/thanatchon36/coauthored/issues
9
+ Author: Thanatchon Chongmankhong
10
+ License-Expression: Apache-2.0
11
+ License-File: LICENSE
12
+ Keywords: ai-attribution,co-authored-by,coding-agents,git,mining-software-repositories,provenance
13
+ Classifier: License :: OSI Approved :: Apache Software License
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
16
+ Classifier: Topic :: Software Development :: Version Control :: Git
17
+ Requires-Python: >=3.11
18
+ Requires-Dist: polars>=1.0
19
+ Requires-Dist: pydantic>=2.7
20
+ Requires-Dist: pyyaml>=6
21
+ Requires-Dist: typer>=0.12
22
+ Requires-Dist: zstandard>=0.22
23
+ Provides-Extra: analysis
24
+ Requires-Dist: matplotlib>=3.9; extra == 'analysis'
25
+ Requires-Dist: numpy>=1.26; extra == 'analysis'
26
+ Requires-Dist: scipy>=1.13; extra == 'analysis'
27
+ Requires-Dist: statsmodels>=0.14; extra == 'analysis'
28
+ Description-Content-Type: text/markdown
29
+
30
+ <p align="center"><img src="https://raw.githubusercontent.com/thanatchon36/coauthored/main/docs/assets/logo.svg" alt="coauthored logo" width="120"></p>
31
+
32
+ <h1 align="center">coauthored</h1>
33
+
34
+ [![CI](https://github.com/thanatchon36/coauthored/actions/workflows/ci.yml/badge.svg)](https://github.com/thanatchon36/coauthored/actions/workflows/ci.yml)
35
+ [![License](https://img.shields.io/badge/license-Apache--2.0-green)](https://github.com/thanatchon36/coauthored/blob/main/LICENSE)
36
+ [![Data](https://img.shields.io/badge/data-CC--BY--4.0-blue)](https://github.com/thanatchon36/coauthored/blob/main/LICENSE-DATA)
37
+ [![Status](https://img.shields.io/badge/status-preprint-orange)](https://github.com/thanatchon36/coauthored/blob/main/STATUS.md)
38
+ [![Pre-registered](https://img.shields.io/badge/pre--registered-27a6847-blue)](https://github.com/thanatchon36/coauthored/blob/main/PREREGISTRATION.md)
39
+
40
+ ⬇️ **[Download the PDF](https://github.com/thanatchon36/coauthored/blob/main/paper/coauthored.pdf)** ·
41
+ 🤗 **[Dataset](https://huggingface.co/datasets/thanatchon36/coauthored)** ·
42
+ 📊 **[Figures](https://github.com/thanatchon36/coauthored/blob/main/results/figures/)** · 🧾 **[Pre-registration](https://github.com/thanatchon36/coauthored/blob/main/PREREGISTRATION.md)** ·
43
+ 🔀 **[Deviations](https://github.com/thanatchon36/coauthored/blob/main/DEVIATIONS.md)** · 🔁 **[Reproduce](https://github.com/thanatchon36/coauthored/blob/main/REPRODUCE.md)** · ⚖️ **[Responsible use](https://github.com/thanatchon36/coauthored/blob/main/RESPONSIBLE_USE.md)**
44
+
45
+ **How Much of the Code That Trains the Models Declares AI Help? AI Co-Authorship Trailers in AI Infrastructure
46
+ Repositories, 2023–2026.** `coauthored` counts the commits in a git history that carry an explicit AI attribution: a
47
+ `Co-authored-by:` trailer naming an AI tool, a commit by an AI-agent account, or a tool's generated-with marker.
48
+ The pre-registered study in this repository measures that share month by month in 42 open-source repositories that
49
+ train, fine-tune, evaluate and serve AI models (S1), 12 open-source coding-agent harnesses (S2), and 42 popular
50
+ non-AI repositories matched on stars, language and activity (S3), from the full history of all 96 read on one day.
51
+
52
+ > Independent personal research. Public data only. Does not represent the views of any employer or institution.
53
+
54
+ ## Result
55
+
56
+ <p align="center"><img src="https://raw.githubusercontent.com/thanatchon36/coauthored/main/results/figures/f1_monthly_share.png" alt="Monthly AI-attributed share of commits by stratum, 2023 to September 2026" width="860"></p>
57
+
58
+ In July–September 2026, **8.7% of commits to AI-infrastructure repositories were AI-attributed** (95% CI
59
+ 4.0–14.5%), about one in 11, up from 0.5% over 2025 and almost none in 2024. **Matched non-AI repositories were
60
+ at a similar level**, 7.1% (2.3–12.6%), and the coding-agent harnesses, which started earlier, were not clearly
61
+ ahead (10.3%, 1.6–23.7%). The intervals are too wide to tell the groups apart: there is no evidence that "AI
62
+ building AI" runs ahead of popular open source, and no proof that it does not.
63
+
64
+ | pre-registered hypothesis | result |
65
+ |---|---|
66
+ | H1 S1 share in 2026-Q3 ≥ 5% | supported on the point estimate (8.7%); the CI reaches 4.0% |
67
+ | H2 S1 above S3 every month, odds ratio ≥ 2 | not supported (OR 1.24, CI 0.45–4.75) |
68
+ | H3 S1 steeper than S3 | not supported (slope difference 0.025 logit/month, CI −0.080 to 0.077) |
69
+ | H4 harnesses above S1 | not supported (+1.6 points, CI −9.0 to 15.8) |
70
+ | H5 Claude Code the top tool every quarter from 2025-Q2 | not supported (it leads only from 2026-Q1) |
71
+ | H6 ≥ 80% of attributed pull requests keep attribution after merge | **supported** (184 of 200, 92%) |
72
+ | H7 disclosure policies, higher share (exploratory) | positive (+2.9 points), confounded |
73
+
74
+ Every share is a **lower bound** on AI involvement, and an attributed commit is not a commit "written by AI":
75
+ the trailer says a tool took part, not how much of the change it produced. Attribution is not adoption either:
76
+ it can be switched off, lost at merge (rarely, in this sample), dropped when code is exported from an internal
77
+ monorepo, or never added. The review of the draft and how each point was handled are in
78
+ [docs/review.md](https://github.com/thanatchon36/coauthored/blob/main/docs/review.md).
79
+
80
+ ## Run it on your own organisation
81
+
82
+ ```bash
83
+ uv tool install git+https://github.com/thanatchon36/coauthored # or: pip install git+https://github.com/thanatchon36/coauthored
84
+ coauthored report --org <your-org> # monthly AI-attributed share of every public repository since 2024-01
85
+ ```
86
+
87
+ It lists the organisation's repositories with the GitHub CLI (`gh`, logged in), clones them with commit objects
88
+ only, needs no paid service or API key, and prints repository-level aggregates. Read
89
+ [RESPONSIBLE_USE.md](https://github.com/thanatchon36/coauthored/blob/main/RESPONSIBLE_USE.md) before you publish anything: this measures projects, not people.
90
+
91
+ ## Reproduce the paper
92
+
93
+ ```bash
94
+ uv sync --all-extras
95
+ uv run coauthored analyze --draws 2000 # every table, figure and number, from committed aggregates, no network
96
+ uv run coauthored paper # PDF and web page (needs pandoc and typst)
97
+ ```
98
+
99
+ `analyze` is byte-reproducible. The paper build fills every number from `results/numbers.json` and refuses
100
+ numbers typed by hand. [REPRODUCE.md](https://github.com/thanatchon36/coauthored/blob/main/REPRODUCE.md) covers re-scanning the repositories and redrawing the
101
+ survival sample.
102
+
103
+ ## What is here
104
+
105
+ | path | content |
106
+ |---|---|
107
+ | `src/coauthored/` | scanner, signature matcher, aggregation, analysis, paper and dashboard builders |
108
+ | `configs/` | frozen signature catalogue (52 entries, 28 tools, three public evidence commits each), bot list, repository lists |
109
+ | `data/` | snapshot manifest (head SHAs), repository-month aggregates, survival, size and policy samples |
110
+ | `results/` | `numbers.json`, tables, figures |
111
+ | `paper/` | paper source, PDF, template |
112
+ | `docs/` | phase reports, policy review, label sample, web paper and dashboard |
113
+
114
+ As pre-registered, only aggregates are released: no per-commit records, and the survival and size samples carry
115
+ no PR numbers or commit SHAs. The [Hugging Face dataset](https://huggingface.co/datasets/thanatchon36/coauthored) (aggregates only) is built by
116
+ `scripts/build_hf_dataset.py`.
117
+
118
+ ## Citation
119
+
120
+ See [CITATION.cff](https://github.com/thanatchon36/coauthored/blob/main/CITATION.cff).
121
+
122
+ ## License
123
+
124
+ Code: [Apache-2.0](https://github.com/thanatchon36/coauthored/blob/main/LICENSE). Data: [CC BY 4.0](https://github.com/thanatchon36/coauthored/blob/main/LICENSE-DATA).
@@ -0,0 +1,95 @@
1
+ <p align="center"><img src="docs/assets/logo.svg" alt="coauthored logo" width="120"></p>
2
+
3
+ <h1 align="center">coauthored</h1>
4
+
5
+ [![CI](https://github.com/thanatchon36/coauthored/actions/workflows/ci.yml/badge.svg)](https://github.com/thanatchon36/coauthored/actions/workflows/ci.yml)
6
+ [![License](https://img.shields.io/badge/license-Apache--2.0-green)](LICENSE)
7
+ [![Data](https://img.shields.io/badge/data-CC--BY--4.0-blue)](LICENSE-DATA)
8
+ [![Status](https://img.shields.io/badge/status-preprint-orange)](STATUS.md)
9
+ [![Pre-registered](https://img.shields.io/badge/pre--registered-27a6847-blue)](PREREGISTRATION.md)
10
+
11
+ ⬇️ **[Download the PDF](paper/coauthored.pdf)** ·
12
+ 🤗 **[Dataset](https://huggingface.co/datasets/thanatchon36/coauthored)** ·
13
+ 📊 **[Figures](results/figures/)** · 🧾 **[Pre-registration](PREREGISTRATION.md)** ·
14
+ 🔀 **[Deviations](DEVIATIONS.md)** · 🔁 **[Reproduce](REPRODUCE.md)** · ⚖️ **[Responsible use](RESPONSIBLE_USE.md)**
15
+
16
+ **How Much of the Code That Trains the Models Declares AI Help? AI Co-Authorship Trailers in AI Infrastructure
17
+ Repositories, 2023–2026.** `coauthored` counts the commits in a git history that carry an explicit AI attribution: a
18
+ `Co-authored-by:` trailer naming an AI tool, a commit by an AI-agent account, or a tool's generated-with marker.
19
+ The pre-registered study in this repository measures that share month by month in 42 open-source repositories that
20
+ train, fine-tune, evaluate and serve AI models (S1), 12 open-source coding-agent harnesses (S2), and 42 popular
21
+ non-AI repositories matched on stars, language and activity (S3), from the full history of all 96 read on one day.
22
+
23
+ > Independent personal research. Public data only. Does not represent the views of any employer or institution.
24
+
25
+ ## Result
26
+
27
+ <p align="center"><img src="results/figures/f1_monthly_share.png" alt="Monthly AI-attributed share of commits by stratum, 2023 to September 2026" width="860"></p>
28
+
29
+ In July–September 2026, **8.7% of commits to AI-infrastructure repositories were AI-attributed** (95% CI
30
+ 4.0–14.5%), about one in 11, up from 0.5% over 2025 and almost none in 2024. **Matched non-AI repositories were
31
+ at a similar level**, 7.1% (2.3–12.6%), and the coding-agent harnesses, which started earlier, were not clearly
32
+ ahead (10.3%, 1.6–23.7%). The intervals are too wide to tell the groups apart: there is no evidence that "AI
33
+ building AI" runs ahead of popular open source, and no proof that it does not.
34
+
35
+ | pre-registered hypothesis | result |
36
+ |---|---|
37
+ | H1 S1 share in 2026-Q3 ≥ 5% | supported on the point estimate (8.7%); the CI reaches 4.0% |
38
+ | H2 S1 above S3 every month, odds ratio ≥ 2 | not supported (OR 1.24, CI 0.45–4.75) |
39
+ | H3 S1 steeper than S3 | not supported (slope difference 0.025 logit/month, CI −0.080 to 0.077) |
40
+ | H4 harnesses above S1 | not supported (+1.6 points, CI −9.0 to 15.8) |
41
+ | H5 Claude Code the top tool every quarter from 2025-Q2 | not supported (it leads only from 2026-Q1) |
42
+ | H6 ≥ 80% of attributed pull requests keep attribution after merge | **supported** (184 of 200, 92%) |
43
+ | H7 disclosure policies, higher share (exploratory) | positive (+2.9 points), confounded |
44
+
45
+ Every share is a **lower bound** on AI involvement, and an attributed commit is not a commit "written by AI":
46
+ the trailer says a tool took part, not how much of the change it produced. Attribution is not adoption either:
47
+ it can be switched off, lost at merge (rarely, in this sample), dropped when code is exported from an internal
48
+ monorepo, or never added. The review of the draft and how each point was handled are in
49
+ [docs/review.md](docs/review.md).
50
+
51
+ ## Run it on your own organisation
52
+
53
+ ```bash
54
+ uv tool install git+https://github.com/thanatchon36/coauthored # or: pip install git+https://github.com/thanatchon36/coauthored
55
+ coauthored report --org <your-org> # monthly AI-attributed share of every public repository since 2024-01
56
+ ```
57
+
58
+ It lists the organisation's repositories with the GitHub CLI (`gh`, logged in), clones them with commit objects
59
+ only, needs no paid service or API key, and prints repository-level aggregates. Read
60
+ [RESPONSIBLE_USE.md](RESPONSIBLE_USE.md) before you publish anything: this measures projects, not people.
61
+
62
+ ## Reproduce the paper
63
+
64
+ ```bash
65
+ uv sync --all-extras
66
+ uv run coauthored analyze --draws 2000 # every table, figure and number, from committed aggregates, no network
67
+ uv run coauthored paper # PDF and web page (needs pandoc and typst)
68
+ ```
69
+
70
+ `analyze` is byte-reproducible. The paper build fills every number from `results/numbers.json` and refuses
71
+ numbers typed by hand. [REPRODUCE.md](REPRODUCE.md) covers re-scanning the repositories and redrawing the
72
+ survival sample.
73
+
74
+ ## What is here
75
+
76
+ | path | content |
77
+ |---|---|
78
+ | `src/coauthored/` | scanner, signature matcher, aggregation, analysis, paper and dashboard builders |
79
+ | `configs/` | frozen signature catalogue (52 entries, 28 tools, three public evidence commits each), bot list, repository lists |
80
+ | `data/` | snapshot manifest (head SHAs), repository-month aggregates, survival, size and policy samples |
81
+ | `results/` | `numbers.json`, tables, figures |
82
+ | `paper/` | paper source, PDF, template |
83
+ | `docs/` | phase reports, policy review, label sample, web paper and dashboard |
84
+
85
+ As pre-registered, only aggregates are released: no per-commit records, and the survival and size samples carry
86
+ no PR numbers or commit SHAs. The [Hugging Face dataset](https://huggingface.co/datasets/thanatchon36/coauthored) (aggregates only) is built by
87
+ `scripts/build_hf_dataset.py`.
88
+
89
+ ## Citation
90
+
91
+ See [CITATION.cff](CITATION.cff).
92
+
93
+ ## License
94
+
95
+ Code: [Apache-2.0](LICENSE). Data: [CC BY 4.0](LICENSE-DATA).
@@ -0,0 +1,32 @@
1
+ version: '1'
2
+ bot_suffix_rule: true
3
+ bots:
4
+ - id: github-action-legacy
5
+ email: action@github\.com
6
+ query: author-email:action@github.com
7
+ notes: Identity commonly configured in workflows ("GitHub Action").
8
+ evidence:
9
+ - https://github.com/dennislee928/Smart_Zone/commit/6cb40c79aedbbe76b4e2e9685a400d45ebcdf470
10
+ - https://github.com/Brantford-Data/arena-tracker/commit/53b0a7bbe20c775acc2c847333c376aa9c45b259
11
+ - https://github.com/aikyalabs-dev/AikyaLabs-Simple-ChordTrack/commit/e576bb8488d4675d9ced513caf3b35dc63ab9edf
12
+ - id: renovate-bot
13
+ email: bot@renovateapp\.com
14
+ query: author-email:bot@renovateapp.com
15
+ evidence:
16
+ - https://github.com/andrew-soltan-peloton/next-netlify-isr-test/commit/46bfeb349592979aa26d224c8987270f5650ac99
17
+ - https://github.com/Patocity/CityTech-blog-theme/commit/03a0fe91b0cb9ad1df290bd72039b0aebd6e0e47
18
+ - https://github.com/Coleus99/gatsby-starter-netlify-cms-2024/commit/187f832ee136dd61eb5d58a92bd03859a783a7a0
19
+ - id: snyk-bot
20
+ email: snyk-bot@snyk\.io
21
+ query: author-email:snyk-bot@snyk.io
22
+ evidence:
23
+ - https://github.com/Cratis/Chronicle/commit/3db80b1845545acd2dcdfd727c7bba028d6e9c53
24
+ - https://github.com/mhoerche/dashy/commit/7990401be6ddde6af00dc0db7f493553e621ab2e
25
+ - https://github.com/KabriAcid/jambite/commit/d05416b7474a55dd0feca128dfcce4d9c6cd7e3e
26
+ - id: semantic-release-bot
27
+ email: semantic-release-bot@martynus\.net
28
+ query: author-email:semantic-release-bot@martynus.net
29
+ evidence:
30
+ - https://github.com/HanseltimeIndustries/pkgtest-setup-action/commit/3789ef26d183435efa7db6a0e2f2463c998644a3
31
+ - https://github.com/revenuebee/revenuebee.github.io/commit/e44c048aef1ab3201eff05450614a32e6ce4b6bb
32
+ - https://github.com/jimcullenaus/lemmy-daily-games-bot/commit/445b578f0d38b660aa077b0e78c4ba69a6d56672