Repository navigation
perf(source-control): move the commit skill's rationale out of its hub #12704
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
6ac94cf
perf(source-control): move the commit skill's rationale out of its hub
kyle-sexton 5d80bd5
Merge branch 'main' into host-run/12666-commit-skill-cut
kyle-sexton 9a365b4
fix(source-control): keep the release-record rule in the commit hub
kyle-sexton 6e8daa7
test(source-control): make three commit eval cases fire the skill
kyle-sexton 2ea70e7
test(source-control): name the commit skill in the trailer-model case
kyle-sexton File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
.changes/source-control/host-run-12666-commit-skill-cut-688a2fe5.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| --- | ||
| bump: patch | ||
| --- | ||
|
|
||
| ### Changed | ||
|
|
||
| - move the commit skill's rationale out of its hub | ||
|
|
||
| The /source-control:commit SKILL.md body drops from 28,967 to 25,098 | ||
| bytes (frontmatter stripped). Explanatory prose moves verbatim to | ||
| reference files read on demand; every command, table and gate stays in | ||
| the hub. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
plugins/source-control/skills/commit/reference/changelog-fragments.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| # What the changelog-fragment step writes | ||
|
|
||
| Detail behind Task step 7 in [SKILL.md](../SKILL.md), which runs | ||
| `write-changelog-fragments.sh` with the drafted message. | ||
|
|
||
| For each listed plugin the staged change touches, it writes the fragment in place of the hand | ||
| version bump and CHANGELOG entry, through the repository's own `new-changelog-fragment.sh`. | ||
| The bump comes from the Conventional Commits type: `feat` minor; `fix` and `perf` patch; | ||
| `build`, `chore`, `ci`, `docs`, `refactor`, `style` and `test` none; `!` or a `BREAKING CHANGE` | ||
| footer major. The subject and body go under `### Added` (`feat`), `### Fixed` (`fix`) or | ||
| `### Changed` (anything else), and a `none` fragment gets one line saying why no release is | ||
| needed. A later commit on the branch with a releasing type adds its entry to the branch's fragment and raises the | ||
| bump only upward. On exit 2 for a subject it cannot map, rerun with | ||
| `--level major|minor|patch|none`. In a repository without the list, and for a plugin the list | ||
| does not name, it writes nothing, and the repository's own release record (a version bump plus | ||
| CHANGELOG entry) still applies. |
49 changes: 49 additions & 0 deletions
49
plugins/source-control/skills/commit/reference/config-probes.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| # Repository-context probes: why each one is shaped as it is | ||
|
|
||
| Detail behind the `## Repository context. Gather first` section in [SKILL.md](../SKILL.md). The | ||
| hub keeps the commands, the probe list and the combination table; this file keeps the reasons. | ||
|
|
||
| ## The two pipes in the git calls | ||
|
|
||
| **The two pipes are the bound and belong in the command.** The Bash tool returns a command's | ||
| complete output into context before there is anything to decide about, so a read-time cap ("read | ||
| only the summary line") bounds nothing; `head` and `tail` truncate before the result exists. These | ||
| are ordinary body Bash calls, not pre-compute, so the one-invocation composition that applies to the | ||
| `## Pre-computed context` block does not apply here. | ||
|
|
||
| ## Why probes 2 and 3 omit `--exclude-standard` | ||
|
|
||
| Probes 2 and 3 deliberately omit `--exclude-standard`, so a gitignored file is still listed: the | ||
| personal overlay is expected to be gitignored, and an untracked team file has to be *seen* before it | ||
| can be reported as untracked. | ||
|
|
||
| ## Why probe 2 exists, and what a nonzero exit means | ||
|
|
||
| A single `--error-unmatch` call cannot separate the last two rows; it exits nonzero for both. That | ||
| is the whole reason probe 2 exists. | ||
|
|
||
| **A nonzero exit from probe 1 is a result, not a failure**. It answers the question, and probe 2 | ||
| resolves which answer it is. The unknown-value rule is narrower than that: only a probe that could | ||
| not run at all (git unavailable, not a repository) yields an unknown value to carry on past. Never | ||
| fold `present but UNTRACKED` into "unknown". They mean opposite things, and treating the untracked | ||
| case as unknown is exactly what readmits a file the resolution rules exclude. | ||
|
|
||
| ## Why the git lines stay out of pre-compute | ||
|
|
||
| Keep the repository-context git lines out of `## Pre-computed context`: the harness composes that block into one | ||
| shell invocation, and a worktree-isolated agent refuses a git-bearing compound command it cannot | ||
| statically verify. | ||
|
|
||
| ## Why every probe anchors at `:/` | ||
|
|
||
| **Every repo-scoped probe anchors at the repository root**, via the `:/` magic pathspec, never at | ||
| the session's current directory. A session started in a subdirectory would otherwise look for | ||
| `<cwd>/.claude/` and report both repo-scoped layers absent. Silently dropping the team convention | ||
| and `trailer_policy`, and producing a commit with the wrong subject shape or attribution. Never | ||
| substitute a resolved root path into a probe instead: a repository root containing `$(…)`, a | ||
| backtick, or a double quote is *not* made safe by wrapping the substituted text in double quotes | ||
| (the substitution still evaluates, or the quote terminates the argument), and `:/` never | ||
| substitutes the root at all. This matches the root-resolution requirement | ||
| [`config-resolution.md`](../../../reference/config-resolution.md) | ||
| already states for resolution itself; the probes must not disagree with it. `exec-bit-check.sh` | ||
| anchors itself the same way. |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.