development-principles
Development Principles
Section titled “Development Principles”Universal principles for all TheOneKit projects.
SSOT — No Duplicates
Section titled “SSOT — No Duplicates”NEVER create duplicate methods, functions, classes, packages, modules, or files that serve the same purpose. Search before creating; reuse and extend; one responsibility = one location; consolidate duplicates immediately. No derived fields — see rules/code-conventions.md → “No Derived Fields”.
Errors Over Silent Fallbacks
Section titled “Errors Over Silent Fallbacks”NEVER use silent fallbacks that hide errors. ALWAYS throw exceptions with clear error messages. The only acceptable fallback is explicitly documented, logged, and surfaced to the user.
Automate Over Manual — Git Is Truth
Section titled “Automate Over Manual — Git Is Truth”For any repetitive or pattern-based task, implement in CI/CD scripts that commit results back to git. No hidden state — everything visible in the repo. If the same manual change is needed in multiple places → automate it. Operational arm (recurring-work table, procedure, anti-patterns): docs/replicate-and-automate.md.
Test Pass Gate — Zero Failures Before Done
Section titled “Test Pass Gate — Zero Failures Before Done”ALL unit tests MUST pass before reporting any task “done” — run the full suite after ANY implementation, not just compilation. Zero failures; skipped/ignored tests only with documented justification. Failing tests are fixed as part of the current task; NEVER report “done” with failures pending.
Pre-Delete Reference Check
Section titled “Pre-Delete Reference Check”Before deleting or renaming ANY file, function, class, or type: (1) grep -r "TypeName" across ALL source files (runtime + tests + editor); (2) update every reference before or alongside the deletion; (3) run tests afterwards to confirm zero breakage.
Update Skills After Every Error
Section titled “Update Skills After Every Error”After encountering ANY error (compile, runtime, gotcha), ALWAYS update the relevant skill with a gotcha/warning entry BEFORE continuing — then invoke /t1k:sync-back. Strict form (also fires on a correction applied successfully, not just an error): modules/t1k-kit-feedback/rules/manual-correction-implies-skill-gap.md.