Skip to contents

Assembles a reviewer-facing audit bundle: the header, the rigour-checklist table, the severity list, the test record, the evidence, the provenance list and the appended preregistration document. The output is deterministic, so the same theory always yields the same dossier.

Usage

tf_dossier(theory)

Arguments

theory

A theory object (named list), e.g. from tf_read().

Value

The dossier Markdown as a single string (LF line endings, single trailing newline).

Details

The header gives the checklist version, the aggregate score, the checklist coverage, the gate and the blockers that failed. The rigour table prints n/a for an item with nothing to assess. The severity list gives each prediction's claim-form rubric values and, when the prediction declares a severity, that value too, with a note when it exceeds the rubric by more than 0.2. The test record lists every test outcome in file order, with what it found and the observation, date and registration it records, and with the post-data severity of tf_post_data_severity() where it can be computed, an open bound written as -inf or inf. The evidence lists the prediction each entry supports, its direction and its DOI. The implied independencies appear once, in the preregistration.

Examples

theory <- tf_theory("demo-1", "A demonstration theory") |>
  tf_add_construct("c_arousal", "Arousal", "Bodily activation.") |>
  tf_add_construct("c_threat", "Perceived threat", "Appraised danger.") |>
  tf_add_proposition("p1", "c_arousal", "c_threat", "causes",
                     mechanism = "Activation raises salience of threat cues.") |>
  tf_add_prediction("h1", "Effect is exactly 0.30.", "point")
cat(tf_dossier(theory))
#> # theoryforge dossier: A demonstration theory
#> 
#> - Theory ID: demo-1
#> - Maturity: building
#> - Checklist version: 2.0
#> - Aggregate rigour score: 63.0/100
#> - Checklist coverage: 0.92
#> - Gate: blocked
#> - Blockers failed: 1 (derivation_chain)
#> 
#> ## Rigour checklist
#> 
#> | item | status | score | weight |
#> | --- | --- | --- | --- |
#> | falsifiability | pass | 1.0 | 0.15 |
#> | precision | pass | 1.0 | 0.1 |
#> | risk_severity | pass | 0.9 | 0.1 |
#> | parsimony | n/a | n/a | 0.08 |
#> | non_redundancy | pass | 1.0 | 0.1 |
#> | construct_clarity | warn | 0.0 | 0.08 |
#> | scope | warn | 0.0 | 0.06 |
#> | logical_why | pass | 1.0 | 0.08 |
#> | causal_testability | pass | 1.0 | 0.06 |
#> | diagnosticity | warn | 0.0 | 0.06 |
#> | formalisation | warn | 0.0 | 0.05 |
#> | derivation_chain | fail | 0.0 | 0.08 |
#> 
#> ## Severity (pre-data rubric of claim form)
#> 
#> - h1: severity 0.9, risk 0.9
#> 
#> ## Test record
#> 
#> _No test outcomes recorded._
#> 
#> ## Evidence
#> 
#> _No evidence recorded._
#> 
#> ## Provenance
#> 
#> 1. tf_theory: demo-1
#> 2. tf_add_construct: c_arousal
#> 3. tf_add_construct: c_threat
#> 4. tf_add_proposition: p1
#> 5. tf_add_prediction: h1
#> 
#> ## Preregistration
#> 
#> # Preregistration: A demonstration theory
#> 
#> - Theory ID: demo-1
#> - Schema version: 1.0
#> - Maturity: building
#> - Derivation references resolve: no
#> 
#> ## Hypotheses
#> 1. [point] Effect is exactly 0.30. (derives from: —)
#>    - Test record: untested
#> 
#> ## Implied conditional independencies (derived from the causal graph, not predictions)
#> _None: every pair of constructs in the causal graph is adjacent._
#> 
#> ## Severity (pre-data rubric of claim form)
#> - h1: severity 0.9, risk 0.9