Generated Files Without the Silent Overwrite: Why TDK CLI Treats Local Config as Derived Artifacts
Description and use
TDK CLI generates all required configuration files from a single declarative service.json, protects manual edits with drift detection, and offers explicit regeneration or ignore options.
Problem
Maintaining consistent local infrastructure files (Dockerfiles, Vite configs, nginx configs, etc.) across many services is error‑prone and tedious, especially when AI writes application code but not the surrounding configs.
Outcome
TDK CLI automates generation of all local infrastructure files, treats them as derived artifacts, and provides explicit drift handling to protect hand‑edited customizations, ensuring consistency across services without silent overwrites.
Workflow
- Write a service.json for each service
- Run
tdk upto generate config files and start Tilt/Docker environment - If a generated file is edited,
tdk updetects drift and exits with code 2 - Choose to regenerate with
tdk config regenerateor runtdk up --ignore-driftto keep customizations
Evidence
TDK generates the rest (roughly 17 files for a typical frontend) and treats those outputs as derived artifacts rather than source.
If you edit a generated file by hand, tdk up detects the drift (against a stored snapshot) and stops with exit code 2 instead of silently overwriting.
- Record date: 2026-10-19T23:41:33.358Z