Skip to content

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

R Workflow Engine

One-file paste prompt for producing a complete tidyverse R analysis script in an owner-familiar coding style. It is not an installable R package, Airflow replacement, or job scheduler.

Paste ENGINE.md into an AI together with a short owner brief. The model produces one R script with a thin configuration layer, named stage functions, a quality gate, and non-transforming publication outputs.

Workflow

Stage Responsibility
Prep Read, join, tidy, complete a panel when required, and apply the analysis window
Analyze Split by named groups and apply one parameterized metric function
Expand Optionally add forecasts as columns on existing rows
Assure Apply the single automatic quality gate
Publish Send the validated tibbles to Excel, Shiny, or both without recomputation
flowchart LR
    A["Thin CONFIG"] --> B["Prep"]
    B --> C["Analyze"]
    C --> D["Optional expand"]
    D --> E["Assure gate"]
    E --> F["Excel or Shiny"]
Loading

How to use

  1. Copy ENGINE.md.
  2. Paste it into ChatGPT, Grok, or DeepSeek.
  3. Attach an owner brief, or allow the generic in-memory demonstration to run.
  4. Review the generated tidyverse R script and execute it against the intended data.

The owner brief supplies file paths, join keys, date column, analysis window, grouping variables, forecast choice, publication target, and business recodes. The engine chooses appropriate column names and charts while preserving the locked workflow structure.

Implemented case study

The engine is applied in the FulfillIQ portfolio project:

That implementation demonstrates the engine's named configuration, stage functions, explicit skips, assurance gate, and Excel publication path on a seller-performance analysis.

Design dialect

  • Familiar %>%-based tidyverse pipelines
  • Ordinary verbs used directly after libraries are attached
  • Practical intermediate objects and linear stage bodies
  • Named lists and explicit column roles
  • map() over group names rather than column positions
  • imap() for visible, direct openxlsx workbook construction
  • One reusable metric function
  • A single quality gate before publication
  • Necessary unfamiliar techniques isolated and briefly explained
  • Publication from validated objects without hidden recomputation

This is my preferred analytical dialect, not a copy of a former employer's internal framework.

Development method

Grok Bot coordinated Grok, ChatGPT, and DeepSeek through independent drafting, cross-critique, and controlled synthesis. Disagreements were resolved against the engine's locked requirements rather than by majority vote. The owner retained final keep/cut authority.

Repository contents

Limitations

  • Generated code still requires human review and execution against the intended data.
  • The repository is a prompt-based analytical specification, not an R package.
  • The engine does not replace source-specific measurement design.

License

MIT. Copyright 2026 Mark Ciganovic.

About

One-file paste prompt that emits tidyverse R reports (Prep, Analyze, Expand, Assure, Publish) to Excel and Shiny.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors