Same change, two notes
GitHub's --generate-notes writes one line for each pull request, from its title. These are the lines for three pull requests of the v0.6.0 range of typescript-patterns-enforcer. We rebuilt them from the titles.
What GitHub writes
* Check shell-written TypeScript files with an advisory Stop hook by @gagoar in https://github.com/gagoar/typescript-patterns-enforcer/pull/33
* Add six syntactic checks from the audit and relax magic numbers in named constants by @gagoar in https://github.com/gagoar/typescript-patterns-enforcer/pull/35
* Fold the audit findings into the skill and review agent (v0.5.15) by @gagoar in https://github.com/gagoar/typescript-patterns-enforcer/pull/32
A foghorn entry for the first of them
It says what changed for you, and it shows the output.
Check TypeScript files written through a shell with an advisory Stop hook (#33)
The mechanical checks ran from a
PostToolUsehook, and that hook only sees files that the Edit and Write tools wrote. A.tsfile written by a shell heredoc or a script never reached the checks.[...] It is advisory: it reports through
systemMessageand always exits 0, so it cannot trap a session.New output (a
.tsfile written through a shell, then the session stops):ts-patterns: mechanical violations in TypeScript files changed this session (the edit hook does not see files written through a shell): src/list.ts: L1:64 no-zero-comparison `.length` compared with zero: coerce it (`!!x.length`, `!x.length`) (see SKILL.md Core Rule 10).
What a good note does
- It says what changed for you. A pull request title says what a developer did.
- It shows the old output and the new output. Two blocks take five seconds to read.
- It says who is affected and how to check. One line names them. One line gives a command.
- It credits the people who helped, and admits what we do not know. A hedge that marks a real doubt is content, not filler.
How it works
- You run
/foghorn:draft v1.2.0..v1.3.0. foghorn reads git history, merged pull requests and linked issues, with read-only commands. - It drops internal changes, sorts the rest as breaking, security, feature or fix, and shows you the table. You can change it.
- It writes each entry in the voice. For a change of behavior it reads the diff or runs the code, so the before and after are real. It never invents an example.
- Code checks the draft, and a prose pass polishes it. A breaking release with no preface fails. So does a behavior change with no old and new output.
- You read the draft and you publish it. foghorn never publishes.
What it touches
- It reads git history and GitHub with read-only commands.
- One script starts a process:
scripts/gh-read.ts. It allows a fixed list of read-onlyghcommands. It givesghonly a short list of environment variables, and it never prints the credential. - MIT license. No account and no telemetry in the scripts.
Install
foghorn needs two helper plugins for the prose step. They come from the same marketplace.
/plugin install unmistakable@gago-plugins
/plugin install iceberg@gago-plugins
/foghorn:draft v1.2.0..v1.3.0collects the changes of the range, drafts the notes, checks them and polishes them./foghorn:check RELEASE.mdruns the checker on a file and explains each finding. It changes nothing./foghorn:voiceshows, picks or edits the voice.
Limits
foghorn needs a model, and a draft takes minutes. A model can misread a diff, so you must read every draft. The checker looks for an example. It cannot prove that the example is true.
If your pull request titles are good and your readers need only a list, use gh release create --generate-notes. It is instant and free.
About the name
A foghorn is a loud signal that tells people what is ahead. We named the plugin for what release notes do.