% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/setup.R
\name{setup_coregage}
\alias{setup_coregage}
\title{Initialise a CoreGage run session}
\usage{
setup_coregage(cfg)
}
\arguments{
\item{cfg}{A named list of paths produced by sourcing project_config.R.
Must contain: \code{rule_registry}, \code{reports}, \code{feedback}.}
}
\value{
A named list (the \emph{state} object) containing:
\code{rule_registry}, \code{active_rules}, \code{session},
\code{issues}, \code{summary_log}, \code{review_log}.
}
\description{
Reads the rule registry (rule_registry.xlsx), builds the active rule
switch vector, and initialises all empty master tables required for
a check run. This is the first function called in every run.
}
\examples{
\donttest{
tmp_rep <- tempdir()
cfg <- list(
  rule_registry = system.file("extdata", "rule_registry.xlsx",
                              package = "rCoreGage"),
  trial_checks  = tmp_rep,
  study_checks  = tmp_rep,
  inputs        = tmp_rep,
  reports       = tmp_rep,
  feedback      = tmp_rep
)
state <- setup_coregage(cfg)
}
}
