Skip to content

development-principles

Universal principles for all TheOneKit projects.

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”.

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.

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.

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.

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.