theoryforge: Systematic theory development

Package Web application Open Materials

Abstract

Twin R and Python packages for representing scientific theories as versioned, machine-checkable objects. theoryforge validates theory files, evaluates their specification, derives testable implications, compares amendments, and exports diagrams and preregistration materials.

Overview

theoryforge (Bernabeu, 2026a, 2026b) represents a scientific theory as a versioned, machine-checkable document. Constructs, propositions, predictions, alternatives and provenance are linked by identifiers, so the package can validate the specification, derive implications, compare amendments and export a reviewable dossier. The checks assess the completeness and internal coherence of a specification, which is a separate matter from whether the theory is true. Figure 1 sets out that workflow, from the theory file to the dossier.

Workflow diagram: a structured theory file is validated, used to derive testable implications, compared with a rival theory and preserved as a versioned dossier
The theoryforge Workflow, From Theory File to Dossier. The dashed return path carries an amended theory back through the same checks that the first version passed.

Reproducible Theory Development

Store the theory document, schema version, validation report, derived implications, data-generating assumptions and checksum together. The R documentation, Python documentation, browser apps and companion blog post show how the same specification supports formalisation, testing and preregistration.

References

Bernabeu, P. (2026a). theoryforge: Systematic theory development (Version 0.6.0) [Computer software]. Comprehensive R Archive Network (CRAN). https://doi.org/10.32614/CRAN.package.theoryforge

Bernabeu, P. (2026b). theoryforge: Systematic theory development (Version 0.6.0) [Computer software]. PyPI. https://pypi.org/project/theoryforge/0.6.0/

Documentation

R documentation Python documentation Browser apps

Comments are provided by Disqus and are not loaded automatically. Loading them connects your browser to Disqus, which may use cookies and process data under its privacy policy. See this site's privacy notice for details.