Логотип Decision Commits

Decision Commits

Спільнота
VenTheZone
decision-commits

Write commit messages that capture judgment and decision-making, not just change descriptions. Use when the user wants to elevate their commit history from a log to a record of reasoning, trade-offs, and context.

Огляд

ВидавецьVenTheZone
Репозиторійpi-dots
Назва навичкиdecision-commits
Зірки
41
Форки
0
Файли в пакеті
Лише інструкції
Посилання
  • Інструкції у форматі Markdown

    Файл SKILL.md, який модель завантажує за потреби, тож токени витрачаються лише тоді, коли запит справді відповідає навичці.

  • Працює з будь-якою LLM

    Навички ШІ — це звичайний Markdown, а не код для певного постачальника, тому вони працюють із GPT, Claude, Gemini, Grok або локальною моделлю.

  • Усе необхідне — в інструкціях

    Усе потрібне моделі міститься в інструкціях — жодних додаткових файлів для синхронізації.

  • Відкритий вихідний код

    Опубліковано на GitHub користувачем VenTheZone. Перегляньте вихідний вміст перед установленням.

Встановлення

Установіть навичку ШІ Decision Commits у TypingMind, щоб використовувати її з будь-якою LLM, або додайте її до іншого агента, що читає SKILL.md.

1

Встановити в TypingMind

TypingMind встановлює навичку безпосередньо з її папки GitHub — читає SKILL.md, збирає файли ресурсів у пакет і зберігає результат локально.

  1. Відкрийте застосунок і перейдіть до Плагіни → Навички.
  2. Виберіть «Встановити з GitHub».
  3. Вставте наведений нижче URL папки навички та підтвердьте встановлення.
    https://github.com/VenTheZone/pi-dots/tree/main/pi-dotfiles-niche-skills/skills/decision-commits
  4. Увімкніть навичку в кожному чаті, де хочете її використовувати.
Плагіни → Навички → Нова навичка → За URL GitHub, потім вставте URL папки й натисніть «Продовжити».
2

Встановити в іншому агенті

Будь-який агент, що підтримує формат Agent Skills, може використовувати цю навичку — скопіюйте папку до каталогу навичок цього агента.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/VenTheZone/pi-dots.git /tmp/pi-dots
mkdir -p .claude/skills
cp -r /tmp/pi-dots/pi-dotfiles-niche-skills/skills/decision-commits .claude/skills/decision-commits
Після копіювання перезапустіть Claude Code, щоб завантажити нову навичку.

Використовуйте навичку в TypingMind

Увімкніть навичку Decision Commits в будь-якому чаті TypingMind, і далі модель усе зробить сама. Назва й опис навички містяться в системному промпті, а щойно надходить відповідний запит, модель самостійно завантажує повні інструкції — вам не потрібно викликати навичку вручну, і до фактичного використання вона не витрачає токенів.

Модель самостійно завантажує навичку Decision Commits, щойно надходить відповідний запит.

Працює з будь-якою моделлю ШІ

Навички ШІ — це звичайні інструкції Markdown, а не код для певного постачальника, тому навичка Decision Commits не прив’язана до моделі, для якої її створено. Установіть її один раз у TypingMind і використовуйте з GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama або локальною моделлю, яку ви запускаєте самостійно, — усе з вашими власними ключами API.

  • Завантажується лише за потреби

    Системний промпт містить лише назву й опис. Інструкції завантажуються за першого відповідного запиту, тож невикористана навичка нічого не коштує.

  • Змінюйте моделі під час чату

    Оскільки навичка — це інструкції, а не код, зміна моделі не порушує її роботу: наступна модель читає той самий файл SKILL.md.

Інструкції навички

Це вміст файлу SKILL.md, який завантажує модель. Прочитайте його перед установленням — навичка містить інструкції, яких дотримуватиметься ваша модель.

Decision Commits

Philosophy: Commit history isn't just a log—it's a record of judgment. A good commit message doesn't just describe what changed; it explains why it changed, what decisions were made, and what alternatives were considered.

When to Use

  • The user wants to write better commit messages
  • Reviewing or rewriting commit history for clarity
  • Creating commit templates or guidelines for a team
  • When commit messages feel like trivia instead of reasoning
  • Establishing a culture of decision capture in commit logs

Core Principles

1. The Commit as Decision Record

Every commit should answer:

  • What problem was being solved?
  • Why this solution over alternatives?
  • What trade-offs were made?
  • Who (or what context) benefited?

2. Three-Part Structure

<type>(<scope>): <summary>

<body>

<footer>

Summary (≤50 chars): What changed (imperative mood)

Body (optional): The why and how

  • Problem context
  • Considered alternatives
  • Trade-offs and rationale
  • Who approved / was consulted

Footer (optional): References, breaking changes, co-authors

3. Information Hierarchy

Front-load the decision:

  • ❌ Bad: "Add caching to user service"
  • ✅ Better: "feat(service): add in-memory cache to user service

We had 3 options:

  1. Redis cluster (cost, infrastructure)
  2. LRU in-process cache (simple, same-process)
  3. No cache (keep it simple, accept DB load)

Chose #2 because:

  • Current load: 50 RPS, well within Node memory limits
  • Redis infra overhead not justified yet
  • Allows easy refactor to distributed cache later (see REFACTOR.md)

Cache invalidates on user update events.

Co-authored-by: @teammate "


Framework: DARE Methodology

For each commit, consider:

D — Describe the Problem Context

What was happening? What symptoms or metrics indicated a problem?

A — Alternatives Considered

What other approaches were evaluated? Why were they rejected?

R — Reasoning & Trade-offs

Why was this particular solution chosen? What costs are being paid now vs later?

E — Evidence & Impact

How do we know this is an improvement? What's measured? Who benefits?


Decision Capture Templates

Template 1: Feature Addition

feat(scope): brief imperative summary

PROBLEM: [What user pain point or gap existed?]

ALTERNATIVES:
- Option A: [brief] — REJECTED because [reason]
- Option B: [brief] — REJECTED because [reason]

DECISION: Implement [this approach] because [rationale]

TRADE-OFFS:
- Accept: [short-term cost]
- Defer: [future work]
- Avoid: [what we're NOT doing]

IMPACT: [who benefits, measurable change]
- [specific improvement]

Template 2: Refactoring

refactor(scope): brief imperative summary

WHY: [Why is this refactor needed? Code smell, testability, performance?]
- Current state: [describe problematic pattern]
- Target state: [desired pattern]

SCOPE: [What files/modules are affected? Boundaries?]

RISK MITIGATION:
- [How was safety verified? Tests? Gradual rollout?]
- [How to roll back if needed?]

References:
- See issue #123
- See ARCHITECTURE.md section on [topic]

Template 3: Bug Fix

fix(scope): brief imperative summary

SYMPTOM: [What broke? User-visible or metric?]
- Example: "Users saw 500 errors when..."

ROOT CAUSE: [Why did it happen?]
- Chain of events: [step 1] → [step 2] → [bug]
- Missing assumption: [what we didn't account for]

FIX: [What changed? How does it prevent recurrence?]

VERIFICATION:
- Manual: [how to reproduce before/after]
- Automated: [test added? existing test updated?]

PREVENTION: [Will this happen again? Monitoring? Tests?]

Template 4: Research/Spike

spike(scope): brief imperative summary

QUESTION: [What unknown are we investigating?]

APPROACH: [How did we explore? Tools, prototypes, spikes?]

FINDINGS:
- [Key discovery 1]
- [Key discovery 2]

DECISION: [Based on findings, what's the next step?]
- Adopt approach X, because...
- Need more research on Y...
- Reject Z because...

EVIDENCE: [Links to spikes, PRs, docs, benchmarks]

Examples: Bad vs Good

Example 1: API Change

❌ Weak:

feat: update auth endpoints

✅ Decision-focused:

feat(auth): switch from API keys to JWTs for user auth

PROBLEM: API keys were long-lived (90 days) and couldn't be revoked per-session.
Security incident on 2026-03-15 showed compromised key needed immediate revocation.

ALTERNATIVES:
1. Short-lived API keys (1h expiry) — REJECTED: requires client refetch logic
2. OAuth2 with refresh tokens — REJECTED: too heavy for our mobile clients
3. JWT with short expiry (15m) + refresh endpoint — CHOSEN

DECISION: JWTs give per-session control via blacklist and short expiry.
Refresh tokens allow seamless UX without long-lived credentials.

TRADE-OFFS:
- Accept: Added Redis blacklist lookup on every request (+2ms latency)
- Defer: Key rotation UI for users (tracking issue #456)
- Avoid: Full OAuth2 complexity

IMPACT:
- Can revoke any session immediately on logout/compromise
- Mobile clients get transparent token refresh
- No client-side secret management

Tested load: 1000 RPS benchmark in PR #789 shows <1% latency increase.

Example 2: Refactoring

❌ Weak:

refactor: move utils to lib

✅ Decision-focused:

refactor(utils): extract pure functions to @repo/utils package

WHY: The utils/ directory became a dumping ground (47 files, mixed concerns).
Testing was difficult because utils imported from server/, app/, tests/ inconsistently.

SCOPE: Moving only pure functions (no DB, no network) to @repo/utils.
Leaving file-system and env-dependent helpers in utils/ (future work).

RISK MITIGATION:
- Added comprehensive test coverage in @repo/utils before moving (coverage: 96%)
- Updated imports in all affected packages in same PR (no intermediate breaking state)
- Added `eslint-plugin-boundaries` to prevent future cross-import regressions

After merge, CI will run full integration tests. If boundary violations detected,
we'll add explicit public APIs in @repo/utils before removal.

Related: See ARCHITECTURE.md "Module Boundaries" section updated in this PR.

Integration with Git Workflow

Commit Templates

Add to .gitmessage:

text
# Please enter the commit message for your changes. Lines starting
# with '#' will be ignored, and an empty message aborts the commit.
#
# On branch feature/auth
# Changes to be committed:
#   modified:   src/auth/service.ts
#
# ------------------------ JUNIOR WRITER ABOVE THIS LINE ------------------------
#
# PROBLEM: [What problem are you solving?]
#
# ALTERNATIVES CONSIDERED:
# - [Option]: [Why not?]
#
# DECISION & RATIONALE:
#
# TRADE-OFFS:
# - Accept:
# - Defer:
# - Avoid:
#
# IMPACT / VERIFICATION:
#
# ------------------------ JUNIOR WRITER BELOW THIS LINE ------------------------

Pre-commit Hook

Use commitlint with custom rules:

  • Require body for feat, refactor, fix unless summary ≤ 30 chars AND scope present
  • Disallow vague words: "stuff", "things", "various", "update"
  • Require PROBLEM: or WHY: section for non-trivial changes

Example .commitlintrc.json:

json
{
  "rules": {
    "body-max-line-length": [2, "always", 100],
    "body-min-length": [1, "always", 10],
    "footer-max-line-length": [2, "always", 100],
    "header-full-stop": [2, "never", "."]
  }
}

Conventional Commits with Decision Weight

Enhance conventional commits with decision clarity:

TypeRequired Body?Must Capture Decision?
featYes (if > trivial)Yes — problem, alternatives, rationale
fixYesYes — root cause, verification
refactorYesYes — why refactor, risk mitigation
docsNoNo (unless architectural docs)
choreNoNo
testNoNo
spikeYesYes — question, findings, decision

Decision Capture in Pull Requests

Use commits as building blocks for PR description:

  1. Each commit should be a self-contained decision unit

  2. PR description aggregates the decisions:

    This PR comprises N commits, each capturing a specific decision:
    - Commit abc123: "feat(auth): switch to JWTs" — Problem X, chose Y
    - Commit def456: "refactor: extract token service" — Enabled by abc123
    - Commit ghi789: "test: add JWT revocation tests" — Verification of abc123
  3. Link related decisions:

    See also: #issue456 (future work deferred in commit abc123)

Code Review Lens

When reviewing commits, ask:

  • Does the message explain why or just what?
  • Are alternatives documented (so we don't re-litigate)?
  • Are trade-offs explicit?
  • Would someone 6 months from now understand the reasoning?
  • Does the commit stand alone as a decision record?

If answer is "no" to any, request clarification in review.


Long-term Benefits

Onboarding

New team members read commit history to understand why the code is this way, not just what it does.

Incident Post-mortems

When something breaks, commit decisions reveal the assumptions at the time.

Architecture Evolution

See how and why architectural decisions changed over time.

Reducing Bus Factor

Decision capture distributes context beyond the original author.


Related Skills

  • git-workflow — Git operations, branching, PRs (use together!)
  • write-a-skill — Create skills (meta)
  • improve-codebase-architecture — Architecture decision records
  • request-refactor-plan — Refactor planning with decision rationale

Quick Reference Card

The Decision Commit Checklist:
□ Does the message explain WHY (not just what)?
□ Are alternatives considered and rejected?
□ Are trade-offs explicit (accept/defer/avoid)?
□ Is there evidence or verification described?
□ Would this be useful reading 6 months from now?

TYPES WITH DECISIONS:
✓ feat, fix, refactor, spike → MUST capture decision
✗ docs, chore, test → usually not needed (unless architectural)

Remember: A commit without judgment is just a changelog entry. A commit with judgment is an institutional memory. Write for the future reader.

Поширені запитання

Що робить навичка ШІ Decision Commits?

Write commit messages that capture judgment and decision-making, not just change descriptions. Use when the user wants to elevate their commit history from a log to a record of reasoning, trade-offs, and context.

Навіщо використовувати Decision Commits у TypingMind?

Тому що ви встановлюєте її один раз і використовуєте з будь-якою моделлю. Decision Commits — це звичайний Markdown, а не код для конкретного постачальника, тому та сама навичка працює з GPT-5, Claude, Gemini, Grok або локальною моделлю. Ви можете змінити модель навіть посеред чату, і навичка продовжить працювати. TypingMind використовує ваші власні ключі API, тож ви платите безпосередньо постачальникам замість передплати за кожне місце користувача, а ваші навички й чати залишаються у вашому сховищі.

Як встановити Decision Commits у TypingMind?

Відкрийте в TypingMind Плагіни → Навички → Встановити з GitHub і вставте https://github.com/VenTheZone/pi-dots/tree/main/pi-dotfiles-niche-skills/skills/decision-commits. TypingMind прочитає файл SKILL.md і встановить навичку, яку можна вмикати окремо для кожного чату.

Які моделі ШІ можуть використовувати Decision Commits?

Будь-яка модель, яку ви підключите в TypingMind. Навички ШІ — це звичайні інструкції у форматі Markdown, а не код для конкретного постачальника, тому GPT, Claude, Gemini, Grok і локальні моделі можуть завантажувати цю навичку, коли запит їй відповідає.

Зі скількома моделями ШІ можна використовувати Decision Commits?

Зі скількома забажаєте. Якщо модель підтримує навички, ви можете використовувати з нею Decision Commits — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama та інші — усе в TypingMind із власними ключами API.

Чи безкоштовна навичка ШІ Decision Commits?

Навичку опубліковано на GitHub: VenTheZone. Умови ліцензування дивіться в репозиторії. Ви платите лише своєму постачальнику ШІ за використані токени.

Що таке навички ШІ?

Навичка ШІ — це багаторазовий набір інструкцій, який навчає модель ШІ виконувати одне конкретне завдання. Він відповідає відкритому формату Agent Skills: файл SKILL.md із назвою та описом, а також скрипти, шаблони чи довідкові файли, які можуть знадобитися моделі. Модель читає інструкції лише тоді, коли ваш запит відповідає навичці, тому встановлена навичка нічого не коштує, доки її не використано.

Чим навички ШІ відрізняються від плагінів або серверів MCP?

Плагін або сервер MCP надає моделі нові інструменти для виклику — код, який десь виконується й повертає результат. Натомість навичка ШІ надає моделі знання та порядок дій: як підійти до завдання, яких кроків дотримуватися та яким має бути якісний результат. Навички — це звичайний Markdown, тож їм не потрібні ні сервер, ні ключ API, ні середовище виконання, і вони працюють із будь-якою моделлю.

Усі

Створіть власний ШІ-простір уже зараз

Підпишіться на нашу розсилку, щоб дізнаватися про нові функції та майбутні розіграші 👇