You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d4ba334
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: .claude/agents/release-manager.md
+13Lines changed: 13 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,6 +44,19 @@ Follow `RUNBOOK.md` for the mechanics and `dev-docs/release-v0.3.0-checklist.md`
44
44
- The `refactron.yaml` schema and the `analyze --json` output shape.
45
45
- The PyPI wrapper's behavior, including which Node version it demands and what it does when the CLI is absent.
46
46
47
+
## Version policy overrides this mapping
48
+
49
+
**Stay in the current minor. Ship patches (`0.4.1`, `0.4.2`, ...) until the
50
+
milestone the next minor stands for is actually delivered.** See the version
51
+
policy in `COMMIT_CONVENTIONS.md`.
52
+
53
+
The mapping below describes what each class of change _would_ be under plain
54
+
semver. Use it to reason about **blast radius**, not to pick the number. In
55
+
practice that means a change the mapping calls a minor — a new additive
56
+
`VerdictReport` field, for instance — still ships as a patch, and the changelog
57
+
carries the signal the version number is not carrying. Do not propose a minor
58
+
bump on the mapping alone, and do not re-raise it once the founder has called it.
59
+
47
60
## Semver mapping
48
61
49
62
-**Patch**: bug fixes that change no public surface. New preconditions from a sidecar are patch (additive observability). Tier reassignments are patch. Internal refactors are patch. **A fix that makes the engine refuse something it used to certify is also a patch**, because the old behavior was a defect, not a contract; say so loudly in the changelog rather than hiding it under a version number.
Copy file name to clipboardExpand all lines: .claude/commands/ship.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,6 +35,7 @@ Then check the invariants that CI enforces late and cheaply here:
35
35
-`node dist/cli/index.js analyze src/ --fail-on high` after a build, since our own self-analysis gate blocks the PR and has caught real style violations in new sidecar code.
36
36
- Locked files untouched: `git diff --name-only main...HEAD | grep -E 'src/(contracts|core/models|adapters/interface)\.ts'` must be empty.
37
37
- Commit hygiene: Conventional Commits, subjects under 72 characters, no AI names, no co-author trailers.
38
+
- Commit granularity: one logical change per commit. Read `git log --oneline main..HEAD` and check no single commit bundles several independent fixes. A commit you could not revert without taking unrelated work with it was too big. Split it before the PR opens, not after.
Copy file name to clipboardExpand all lines: .claude/commands/start.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,7 +49,9 @@ Two habits that have repeatedly paid off in this repo:
49
49
-**Prove the test is red first.** Run it against the pre-fix state and paste the failure. Several "regression tests" here turned out to pass identically on both trees.
50
50
-**Surface what you find.** Work that uncovers a second bug is normal. File it with `/issue` and link it; do not silently fold unrelated fixes into this branch.
51
51
52
-
Commit in logical units with Conventional Commits, subject under 72 characters, no AI names, no co-author trailers. The commit-msg hook enforces this.
52
+
Commit in logical units with Conventional Commits, subject under 72 characters, no AI names, no co-author trailers. The commit-msg hook enforces the message shape; the granularity is on you.
53
+
54
+
**One logical change per commit.** A small fix gets its own commit, even when several came out of the same sitting. The test is whether the commit can be reverted on its own without taking unrelated work with it. Bundling a review's findings into one large commit destroys revert granularity and makes `git bisect` resolve to "one of these ten things". See `COMMIT_CONVENTIONS.md`.
3.**No `--no-verify`.** If a hook fails, fix the underlying issue. The hook exists to catch a class of bug; bypassing it means shipping that bug.
75
75
4.**No `--amend` on a commit that's already been pushed.** Force-push history rewrites are a CR-block.
76
76
5.**`BREAKING CHANGE:` footer is mandatory** for any commit that introduces an API/CLI/file-format break. The footer is what tooling reads to bump major.
77
+
6.**One logical change per commit.** A small fix gets its own commit. Do not bundle several fixes into one large commit because they were found in the same sitting.
78
+
79
+
---
80
+
81
+
## One logical change per commit
82
+
83
+
**The unit is the change, not the work session.** If you fixed five things, that is five commits, even when they are one-line each and even when they all came out of the same review.
84
+
85
+
The test: _can this commit be reverted on its own without taking anything unrelated with it?_ If reverting to undo one fix would also undo four others, the commit was too big.
86
+
87
+
Why this is enforced rather than encouraged:
88
+
89
+
-**Revert granularity is the whole point.** A false verdict traced to one of five bundled fixes cannot be backed out without losing the other four, so the fix becomes a new forward patch under time pressure — the worst moment to be writing code.
90
+
-**`git bisect` resolves to a commit.** A commit containing ten fixes tells you the bug is in one of ten places, which is barely better than not bisecting.
91
+
-**Review attention is per-diff, not per-line.** Ten fixes in one diff get one pass of attention spread thin. The reviewer's third question is sharpest on the third commit and absent on the third hunk of a large one.
92
+
-**`git log --oneline` is the changelog draft.** One subject covering ten fixes means writing the release notes twice.
93
+
94
+
Practical shape, for a review that returns several findings: one commit per finding, each with its own test, in an order where every commit leaves the suite green. Related but separable work — the code fix, the doc correction it implies, the ADR amendment — are separate commits in the same PR, not one commit.
95
+
96
+
The exception is a change that is genuinely atomic: a rename that must move a symbol and every call site together, or a fix whose test cannot pass without it. Those are one commit because splitting them ships a red tree, not because they are convenient together.
77
97
78
98
---
79
99
@@ -127,9 +147,31 @@ Co-Authored-By: Claude <noreply@anthropic.com> # forbidden trailer
127
147
128
148
---
129
149
150
+
## Version policy: the minor is earned, not derived
151
+
152
+
**Stay in the current minor. Ship patch releases (`0.4.1`, `0.4.2`, ...) until
153
+
the milestone that the next minor stands for is actually delivered.**
154
+
155
+
Conventional Commits will suggest a bump, and semver's 0.x rule says a behaviour
156
+
change belongs in the minor. Neither decides it here. In this repository the
157
+
minor marks the product reaching a goal, so `feat:` commits and behaviour changes
158
+
alike land in a patch until that goal is met. Do not propose a minor bump on a
159
+
semver mechanic alone, and do not re-raise it once the call is made.
160
+
161
+
Two consequences to work with rather than argue about:
162
+
163
+
-`^0.4.0` resolves to `>=0.4.0 <0.5.0`, so a patch **does** reach existing users
164
+
automatically where a minor would not. A behaviour change shipped as a patch is
165
+
therefore louder, not quieter, in practice.
166
+
- Because the version number is not carrying the signal, **the changelog has to.**
167
+
Any release that changes what a verdict means leads with that, in plain words,
168
+
above the fix list.
169
+
170
+
---
171
+
130
172
## Why these rules exist
131
173
132
-
-**Conventional Commits** lets `release-manager` agents and `release-please` tooling derive semver bumps + changelog sections automatically. Inconsistent commits mean manual triage at release time.
174
+
-**Conventional Commits** lets `release-manager` agents and `release-please` tooling derive semver bumps + changelog sections automatically. Inconsistent commits mean manual triage at release time — but the bump they _suggest_ is a suggestion; see the version policy above.
133
175
-**No `--no-verify`** is the difference between "we have a working hook" and "we have a hook we work around." Once you bypass once, everyone else does too.
134
176
-**No co-author trailers** keeps `git blame` and contributor stats accurate. The reviewer who shipped it owns it.
135
177
-**Scope vocabulary** makes `git log --grep="(transform-sidecar)"` useful. Without it, the log is grep-hostile.
0 commit comments