03 · What You Need to Know
What Belongs in a Reproducible Archive of AI-Assisted Research Code?
Archiving Is Different From Saving a Working Copy
Researchers frequently maintain working directories containing scripts, datasets, temporary files, and evolving outputs. These directories support day-to-day development but are not necessarily suitable for long-term preservation.
An archival release should identify the materials associated with a particular research output and provide enough context for another qualified researcher to understand and, where permitted, execute the analysis.
Archiving therefore involves selection, documentation, version identification, and appropriate preservation arrangements. Merely uploading a directory does not establish that its contents are complete or usable.
The Turing Way emphasizes that reproducible computational research requires access to the relevant code, data, and environment information. The archival record should reflect those dependencies.
1. Preserve the Exact Source Code Used for the Reported Results
The most important code artifact is the version actually used to generate the findings reported in the manuscript.
Research code often changes after analysis, during peer review, or while preparing subsequent publications. A repository's latest revision may therefore differ from the version associated with an earlier paper.
Researchers should identify the relevant Git commit, tag, or release and preserve the corresponding source files.
This includes analytical scripts, preprocessing functions, locally developed modules, and configuration files required to execute the workflow.
Appropriate version control of AI-generated code changes makes it easier to establish which implementation produced each set of results.
The archive should not depend on the original AI system being able to regenerate the code. The accepted executable implementation should already be preserved.
2. Preserve Input Data or Document How They Can Be Accessed
Code cannot reproduce an analysis without the relevant input data.
Researchers should preserve the dataset version used for the original analysis, including the variables and records that entered the computational workflow.
Where practical, the archive should also document the relationship between raw data, cleaned data, and derived analytical datasets.
However, research data may contain confidential participant information, commercially restricted materials, or records governed by institutional agreements.
Public archiving is not always permissible.
When data cannot be released openly, researchers should provide appropriate metadata, data dictionaries, access conditions, or controlled-access procedures. Synthetic or example datasets may help demonstrate code execution, although they do not necessarily permit reproduction of the original findings.
Watch Out
Do not publish identifiable participant data, confidential records, API credentials, or restricted datasets merely to make a computational archive publicly accessible. Reproducibility must be pursued within the ethical, legal, and contractual conditions governing the research materials.
3. Preserve Software Dependencies and Environment Specifications
Research scripts depend on programming languages, packages, libraries, and sometimes external executables or system-level components.
These dependencies may change or become unavailable over time. A script that runs successfully today may fail in a future environment because of changes in package interfaces, default behavior, or compatibility.
Researchers should archive the relevant environment specification, such as a verified Python requirements file, Conda environment record, R lock file, or container definition.
For more complex workflows, additional information about operating systems, numerical libraries, hardware, and external tools may be necessary.
AI can assist with creating reproducible software environment files, but generated configurations should be validated against the environment that produced the research results.
The archive should preserve verified information rather than a plausible dependency list inferred retrospectively from the code.
4. Preserve Dependency Versions, Not Just Package Names
A list containing only package names may be insufficient for long-term reconstruction.
For example, a script that requires a statistical package may behave differently after that package introduces new defaults or changes its computational implementation.
Researchers should preserve the relevant version information and, where appropriate, resolved dependency records.
Transitive dependencies can also matter. These are packages installed indirectly because another package requires them.
A carefully prepared dependency record for research code should distinguish verified requirements from inferred or uncertain information.
For long-term preservation, researchers should also consider whether package repositories, container images, or other external resources will remain accessible.
5. Archive Execution Instructions That Another Researcher Can Follow
A reproducible archive needs instructions explaining how its contents are used.
A README file should ordinarily identify the purpose of the project, required software, directory structure, input files, execution sequence, and expected outputs.
Instructions should explain how to reconstruct the environment and execute the analysis without relying on undocumented knowledge held by the original developer.
For example, a project may require preprocessing before statistical estimation. If the scripts must be executed in a particular order, that order should be explicit.
Researchers should also remove or document dependencies on local file paths, personal directories, and hidden configuration files.
A useful test is whether a collaborator can execute the workflow using only the archived materials and the documented access arrangements.
6. Preserve Unit Tests and Other Verification Evidence
Archiving the code allows others to inspect what was written. Preserving tests provides additional information about what the code was expected to do.
Unit tests can document the intended behavior of questionnaire-scoring functions, data transformations, classification rules, and other consequential operations.
Researchers should preserve the relevant tests, expected outcomes, and instructions for running them.
Where tests were generated with AI assistance, their expectations should be reviewed independently. A passing test suite is not sufficient evidence if the tests reproduce the same incorrect assumptions as the code.
Maintaining unit tests for AI-generated research functions can help future users determine whether a reconstructed environment preserves the intended computational behavior.
Integration tests and end-to-end checks may also be useful when the analysis involves multiple interconnected components.
7. Preserve Reference Outputs for Comparison
Researchers should consider archiving the tables, numerical results, and other outputs associated with the verified analytical release.
These outputs provide a reference against which future executions can be compared.
For example, a collaborator may rerun a regression script and compare the estimated coefficients, standard errors, and sample size with the archived results.
Not every output must be preserved. Temporary files and redundant intermediate artifacts may add little value.
The priority is to retain outputs that help establish whether the analysis has been reconstructed successfully.
For stochastic or numerically sensitive computations, researchers should document the criteria used to judge agreement. Exact numerical identity may not be appropriate across all platforms.
8. Preserve Random Seeds and Relevant Computational Settings
Some research workflows involve random sampling, simulation, bootstrapping, or machine-learning procedures.
These analyses may produce different outputs when executed repeatedly unless relevant sources of randomness are controlled.
Researchers should record random seeds, data-splitting procedures, algorithm settings, and other configurations that affect the results.
Where multiple random-number generators or parallel computing systems are involved, one seed may not control every source of variation.
Even with recorded seeds, exact numerical agreement may depend on software versions, hardware, and algorithm implementations.
Archival documentation should therefore identify the relevant settings and explain any known limits to deterministic reproduction.
9. Preserve Consequential AI-Assistance Records
AI-assisted research programming introduces additional provenance information that may be useful for understanding how the code was developed.
Researchers may wish to preserve the AI tool and model used, significant prompts, relevant generated responses, and consequential human corrections.
However, the archival importance of these records depends on the role AI played in the project.
If AI merely explained a syntax error, the interaction may have limited relevance to reproducing the final analysis.
If AI proposed a missing-data procedure or generated an important analytical function, the interaction may help explain a consequential development decision.
Researchers should therefore preserve AI prompts relevant to research code development when they contribute meaningfully to the research record.
Model information may also be valuable, particularly when AI behavior itself is being studied. In such cases, documenting the AI model and available version information can be essential to interpreting the experiment.
10. Distinguish AI Development Records From AI Runtime Dependencies
Not every AI-assisted project requires the original AI model to remain available.
Suppose AI generated a Python function that was subsequently reviewed, corrected, and saved. If the function executes independently, reproducing the analysis ordinarily requires the final code and its computational environment, not access to the model that generated it.
The situation changes when the research workflow calls an AI model during execution.
For example, a script may submit participant responses to a hosted language model for classification. In that case, the model or service is part of the computational workflow itself.
AI used during code development
The model helped create or modify code that can subsequently execute without the model.
AI used during code execution
The analytical workflow requires model inference or another AI service to generate research outputs.
Runtime AI dependencies may require additional records, including model identifiers, prompts, inference settings, service versions, and authorized inputs and outputs.
If the original model is unavailable, exact reconstruction of its earlier behavior may be impossible. Researchers should document that limitation rather than assume a newer model is an equivalent replacement.
11. Archive the Research Software License and Reuse Conditions
Researchers should identify the conditions under which others may access, modify, or redistribute the archived code.
A software license can clarify permitted reuse, but researchers should ensure that they have the necessary rights to distribute the materials included in the archive.
AI-assisted development may raise additional questions when generated code resembles third-party implementations or incorporates material subject to licensing restrictions.
Researchers should review relevant code origins and dependencies rather than assume that AI-generated material is automatically free of intellectual-property concerns.
Where the project contains restricted software or proprietary components, the archive should explain the applicable access conditions.
12. Use a Stable Archival Release Rather Than Only a Changing Repository
Development repositories are useful for collaboration and version control, but they may continue changing after publication.
Researchers should preserve an identifiable release corresponding to the results reported in a particular manuscript.
Repositories such as Zenodo can assign persistent identifiers to deposited research software. Software Heritage provides another approach to preserving source-code artifacts.
A persistent identifier can make a release easier to cite, but it does not automatically guarantee that every external dependency or dataset remains available.
The archival record should identify the relevant code revision and include or reference the materials necessary to reconstruct the workflow.
Researchers should also consider the retention, preservation, and access policies of the selected repository.
What Is the Minimum Useful Archival Package?
The necessary materials depend on the complexity and purpose of the research, but a useful baseline can be summarized as follows.
| Archival component |
Why it matters |
Typical priority |
| Exact analytical source code |
Preserves the implementation that produced the results |
Essential |
| Input data or authorized access information |
Supports reconstruction of the analysis |
Essential where data are required |
| Environment and dependency records |
Supports software reconstruction |
Essential for dependency-based workflows |
| README and execution instructions |
Explains how to run the analysis |
Essential |
| Verification tests and reference outputs |
Supports checking reconstructed behavior |
Strongly recommended |
| Random seeds and computational settings |
Documents sources of output variation |
Essential when relevant |
| AI prompts and model information |
Documents consequential AI contributions |
Context-dependent |
| License and access conditions |
Clarifies permitted reuse and restrictions |
Strongly recommended |
The archive should be evaluated as a coherent package rather than a collection of unrelated files. Its usefulness depends on whether the materials can be connected to the reported analysis.