patch-discipline-small-diffs

Plan minimal-change patches with explicit file boundaries and commit steps.

Updated Jan 30, 2026
One-click install
npx skills add https://github.com/AntonBespalov/WC_IST --skill patch-discipline-small-diffs
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: patch-discipline-small-diffs
Source: https://github.com/AntonBespalov/WC_IST/tree/main/.codex/skills/patch-discipline-small-diffs
Command: npx skills add https://github.com/AntonBespalov/WC_IST --skill patch-discipline-small-diffs

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Дисциплина маленьких патчей для уже выбранного решения: ограничивает область изменений, требует минимальный дифф, разбивку на комиты и запрет скрытых рефакторингов. Использовать после выбора архитектуры, safety-границ, тестов и доказательств; не использовать как стартовый skill для недоописанной или safety-critical задачи.

Core Features & Use Cases

  • Минимальный дифф: менять только то, что требуется для цели.
  • Не трогать лишнее: не переименовывать/не форматировать/не рефакторить соседний код без причины.
  • Ограничить область: явно перечислить файлы/модули, которые можно менять.
  • Соблюдать стандарт кода: комментарии на русском и требования к UTF-8/CRLF по docs/CODING_STANDARD_RU.md.
  • STM32CubeIDE: если патч добавляет новую папку с кодом — обновить include paths и sourceEntries в .cproject (см. docs/HOW_TO_USE_RU.md / раздел 5).
  • Разбивка на шаги (если изменение крупнее):
  1. инфраструктура/тесты,
  2. функциональное изменение,
  3. (опционально) рефакторинг после и отдельным коммитом.
  • Стабильные интерфейсы: не менять публичные API модулей без явного запроса.

Quick Start

Apply this skill to implement the smallest possible patch set that clearly documents the changes and blocks hidden refactors.

Frequently Asked Questions about patch-discipline-small-diffs

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I keep code patches small and predictable during implementation?

Disciplined small patches require modifying only what is necessary for the chosen solution, explicitly listing file boundaries, avoiding hidden refactors, and breaking larger changes into separate commits for infrastructure, features, and optional refactoring.

When should I avoid using a small diff approach for code changes?

Avoid using small patch discipline as a starting point for under-described or safety-critical tasks; apply it only after architecture, safety bounds, tests, and proofs are established for the chosen solution.

How do I split a large code change into safe commits?

Split large code changes into safe commits by sequencing infrastructure and tests first, functional changes second, and optional refactoring as a separate final commit to ensure stable interfaces and clear documentation.

Do I need to update STM32CubeIDE project files when adding new code folders?

Yes, when a patch adds a new code folder in STM32CubeIDE, you must update include paths and sourceEntries in the .cproject file to maintain stable build configurations and adhere to coding standards.

What are the limitations of enforcing minimal diffs in code review?

Enforcing minimal diffs limits changes to explicitly defined file boundaries, prevents modifying public APIs without explicit requests, and blocks hidden refactoring of adjacent code to maintain strict predictability during code review.