Explain Branch Changes
Turn the current branch's changes into a briefing a person who has never seen code can read. The reader may be a product manager, designer, support agent, marketer, or executive. They care about what changes for users and the business — never about how the code does it.
Write the briefing in the language the user communicates in. If the user writes in Russian, the briefing is in Russian.
The process:
- Collect the branch changes (git)
- Mine the changes and project docs for product meaning
- Translate to human language and deliver the briefing
Step 1: Collect the Changes
Detect the base branch and gather the raw material:
BASE=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@')
if [ -z "$BASE" ]; then
BASE=$(git rev-parse --verify main >/dev/null 2>&1 && echo main || echo master)
fi
git log $BASE..HEAD --pretty=format:"%h %s%n%b"
git diff $BASE...HEAD --stat
git diff $BASE...HEAD
Include uncommitted work (git status --short, git diff HEAD) if present — the reader wants the state of the branch, not just its commits.
Handle the edge cases in the reader's terms, not git's:
- Not a git repository → say this folder has no change history to read, and stop.
- On the base branch / no changes → say there is no work-in-progress here; offer to describe what shipped recently (last ~10 commits on the base branch) instead.
- Huge diff (thousands of lines) → work from
--stat, commit messages, and targeted reads of the most-changed and most user-facing files. Never skip Step 2 because the diff is big.
Step 2: Mine for Product Meaning
The diff says what changed; the surrounding context says why. Gather both:
- Commit messages and branch name — often contain the intent and ticket IDs.
- PR description —
gh pr view if a PR exists (ignore errors if not).
- User-visible strings in the diff — UI labels, button texts, error messages, emails, notification texts, translation files. These are the single best source for a product summary: they show exactly what a user will see.
- Docs touched or nearby — README, CHANGELOG, docs/, design docs,
.archcore/ or similar knowledge bases. If the project documents the changed area, read it to name features the way the project names them.
- Tell-tale files — migrations (data storage changed), feature flags (built but switched off), config/infra files, dependency manifests, test-only changes. See references/change-types.md for how to recognize and phrase each type.
- The code itself — read enough of the changed code to understand the actual behavior change. Use it for understanding only; none of it surfaces in the output.
Do not guess. If the diff shows a change whose purpose is unclear even after reading context, describe the observable effect and mark it as an assumption ("судя по всему" / "it looks like").
Step 3: Translate and Deliver
Consult references/change-types.md to phrase each kind of technical work in human terms, then write the briefing.
Hard rules
- No code artifacts. No file paths, function or class names, commit hashes, branch names, library names, or line references anywhere in the output.
- No jargon. Words like refactoring, endpoint, dependency, migration, API, backend, deploy, merge do not appear. Every such concept has a plain-language equivalent in the reference file.
- Every point answers "so what?" — what a person will notice, or why the business should care. A change with no observable or business effect is grouped under invisible work.
- Fact-lock. Describe only what the diff and context actually show. Never invent features, numbers, or motivations. Uncertainty is stated, not papered over.
- Separate visible from invisible. Users notice some changes (new screens, texts, fixed bugs); other work is internal (cleanup, groundwork, tooling). Present invisible work honestly as "you won't see this, but it matters because…" — never dress it up as a user feature.
Briefing format
Sensible default — adapt, drop empty sections, keep the whole thing readable in under a minute:
[One sentence: what this branch is about, as a headline]
What users will see — bullets of observable changes, each phrased as what a person will see or experience.
Invisible work — internal changes in benefit terms (stability, speed, easier future changes).
Worth knowing — status and caveats in plain terms: the feature is built but switched off; the work looks unfinished; part of the change touches how data is stored, so the release needs extra care.
Section titles go in the user's language (Russian: «Что увидят пользователи», «Невидимая работа», «Стоит знать»).
Writing style
Plain speech, not a press release and not a report:
- Everyday words, active verbs. "Теперь письмо приходит сразу", not "реализована оптимизация процесса отправки уведомлений".
- Concrete over abstract: name the screen, the button, the situation — as a user would name them.
- No empty amplifiers ("значительно улучшает", "ключевая функциональность") and no "не просто X, а Y" constructions.
- Short. 100–250 words for a typical branch. One small fix deserves two sentences, not a report.
Example
Diff shows: new PasswordResetController, an email template, rate-limiter middleware, 12 new UI strings, a DB migration adding a reset_tokens table, plus dependency bumps.
Briefing (user communicates in Russian):
В приложении появляется восстановление пароля.
Что увидят пользователи
- На экране входа появилась ссылка «Забыли пароль?». По ней приходит письмо со ссылкой для смены пароля.
- От слишком частых попыток восстановления стоит защита: после нескольких запросов подряд придётся подождать.
Невидимая работа
- Приложение запоминает выданные ссылки на смену пароля, чтобы каждая работала один раз и недолго. Это про безопасность.
- Обновлены готовые компоненты от сторонних разработчиков: плановая гигиена.
Стоит знать
- Меняется устройство хранения данных, поэтому выпуск этой версии потребует от команды чуть больше внимания, чем обычно.
1---2name: explain-branch-changes3description: Explain the current git branch's changes in plain product language for a non-technical audience — no file paths, no code references, no jargon. Reads the branch diff, commits, and available docs, then produces a short human briefing about what changed and why it matters. Use when the user invokes /explain-branch-changes, asks what a branch does in simple terms, needs a product summary of changes for a PM / designer / stakeholder / support, or says things like 'объясни ветку простыми словами', 'что поменялось для пользователей', 'explain this branch to a non-developer'. Works with any codebase, language, and project structure. NOT for code review or technical diff analysis — use load-branch-changes for that.4---56# Explain Branch Changes78Turn the current branch's changes into a briefing a person who has never seen code can read. The reader may be a product manager, designer, support agent, marketer, or executive. They care about what changes for users and the business — never about how the code does it.910Write the briefing in the language the user communicates in. If the user writes in Russian, the briefing is in Russian.1112The process:13141. Collect the branch changes (git)152. Mine the changes and project docs for product meaning163. Translate to human language and deliver the briefing1718## Step 1: Collect the Changes1920Detect the base branch and gather the raw material:2122```bash23BASE=$(git symbolic-ref refs/remotes/origin/HEAD 2>/dev/null | sed 's@^refs/remotes/origin/@@')24if [ -z "$BASE" ]; then25 BASE=$(git rev-parse --verify main >/dev/null 2>&1 && echo main || echo master)26fi27git log $BASE..HEAD --pretty=format:"%h %s%n%b"28git diff $BASE...HEAD --stat29git diff $BASE...HEAD30```3132Include uncommitted work (`git status --short`, `git diff HEAD`) if present — the reader wants the state of the branch, not just its commits.3334Handle the edge cases in the reader's terms, not git's:3536- **Not a git repository** → say this folder has no change history to read, and stop.37- **On the base branch / no changes** → say there is no work-in-progress here; offer to describe what shipped recently (last ~10 commits on the base branch) instead.38- **Huge diff** (thousands of lines) → work from `--stat`, commit messages, and targeted reads of the most-changed and most user-facing files. Never skip Step 2 because the diff is big.3940## Step 2: Mine for Product Meaning4142The diff says what changed; the surrounding context says why. Gather both:4344- **Commit messages and branch name** — often contain the intent and ticket IDs.45- **PR description** — `gh pr view` if a PR exists (ignore errors if not).46- **User-visible strings in the diff** — UI labels, button texts, error messages, emails, notification texts, translation files. These are the single best source for a product summary: they show exactly what a user will see.47- **Docs touched or nearby** — README, CHANGELOG, docs/, design docs, `.archcore/` or similar knowledge bases. If the project documents the changed area, read it to name features the way the project names them.48- **Tell-tale files** — migrations (data storage changed), feature flags (built but switched off), config/infra files, dependency manifests, test-only changes. See [references/change-types.md](references/change-types.md) for how to recognize and phrase each type.49- **The code itself** — read enough of the changed code to understand the actual behavior change. Use it for understanding only; none of it surfaces in the output.5051Do not guess. If the diff shows a change whose purpose is unclear even after reading context, describe the observable effect and mark it as an assumption ("судя по всему" / "it looks like").5253## Step 3: Translate and Deliver5455Consult [references/change-types.md](references/change-types.md) to phrase each kind of technical work in human terms, then write the briefing.5657### Hard rules5859- **No code artifacts.** No file paths, function or class names, commit hashes, branch names, library names, or line references anywhere in the output.60- **No jargon.** Words like refactoring, endpoint, dependency, migration, API, backend, deploy, merge do not appear. Every such concept has a plain-language equivalent in the reference file.61- **Every point answers "so what?"** — what a person will notice, or why the business should care. A change with no observable or business effect is grouped under invisible work.62- **Fact-lock.** Describe only what the diff and context actually show. Never invent features, numbers, or motivations. Uncertainty is stated, not papered over.63- **Separate visible from invisible.** Users notice some changes (new screens, texts, fixed bugs); other work is internal (cleanup, groundwork, tooling). Present invisible work honestly as "you won't see this, but it matters because…" — never dress it up as a user feature.6465### Briefing format6667Sensible default — adapt, drop empty sections, keep the whole thing readable in under a minute:6869**[One sentence: what this branch is about, as a headline]**7071**What users will see** — bullets of observable changes, each phrased as what a person will see or experience.7273**Invisible work** — internal changes in benefit terms (stability, speed, easier future changes).7475**Worth knowing** — status and caveats in plain terms: the feature is built but switched off; the work looks unfinished; part of the change touches how data is stored, so the release needs extra care.7677Section titles go in the user's language (Russian: «Что увидят пользователи», «Невидимая работа», «Стоит знать»).7879### Writing style8081Plain speech, not a press release and not a report:8283- Everyday words, active verbs. "Теперь письмо приходит сразу", not "реализована оптимизация процесса отправки уведомлений".84- Concrete over abstract: name the screen, the button, the situation — as a user would name them.85- No empty amplifiers ("значительно улучшает", "ключевая функциональность") and no "не просто X, а Y" constructions.86- Short. 100–250 words for a typical branch. One small fix deserves two sentences, not a report.8788### Example8990Diff shows: new `PasswordResetController`, an email template, rate-limiter middleware, 12 new UI strings, a DB migration adding a `reset_tokens` table, plus dependency bumps.9192Briefing (user communicates in Russian):9394> **В приложении появляется восстановление пароля.**95>96> **Что увидят пользователи**97> - На экране входа появилась ссылка «Забыли пароль?». По ней приходит письмо со ссылкой для смены пароля.98> - От слишком частых попыток восстановления стоит защита: после нескольких запросов подряд придётся подождать.99>100> **Невидимая работа**101> - Приложение запоминает выданные ссылки на смену пароля, чтобы каждая работала один раз и недолго. Это про безопасность.102> - Обновлены готовые компоненты от сторонних разработчиков: плановая гигиена.103>104> **Стоит знать**105> - Меняется устройство хранения данных, поэтому выпуск этой версии потребует от команды чуть больше внимания, чем обычно.