Doc system test

project-lifecycle map

Project lifecycle: map

A target folder on the user's machine - create, rerun, upgrade and update, the stacked templates, the state file and the merge.

domain/

feature

  • Create - cyanprint create: add a template to a target folder, or rerun or upgrade it if the folder already has it.
  • File clash record - The file_conflicts list in the state file: every file clash of the last run and how it was settled.
  • Managed files - The list of paths the stacked templates make, kept in the state file per template and as one union.
  • State file - The .cyan_state.yaml file in a target folder: one record per stacked template, plus managed files and file clash records.
  • Update - cyanprint update: move every stacked template in a target folder to its latest version, or a picked one.

architecture/

flow

  • Batch run - The shared run behind create and update: run previous and current specs, stack each list, three-way merge, write, save state, run commands.
  • Template stacking - How several templates installed into one target folder are run side by side and laid on top of each other on the user's machine.

implementation/

algorithm

  • Created folder cleanup - How a headless create that stops on a question removes the folders it made, leaving the disk as it was.
  • Exit codes and errors - What the CLI exits with on success and failure, interactive and headless.
  • Git dirty check - Why update stops on uncommitted changes, and what it does without git or in headless mode.
  • Output paths - How paths from template output and resolver replies become files on disk.
  • Post-template commands - How the commands that templates list are run in the target folder after files are written.
  • Three-way merge - How create and update fold new template output into a target folder without losing the user's edits, and why the base is rebuilt instead of stored.