Skip to content

Commit ea3695d

Browse files
committed
DOC: Clarify WIP: prefix workflow; align AI docs with hook
Three fixes so Documentation/AI/ reflects kw-commit-msg.py: - WIP: is accepted locally (for in-progress commits) and rejected at merge by ghostflow-check-main; document this two-layer workflow. - Remove BUILD: from the prefix table — the hook regex rejects it. - Consolidate the prefix list in git-commits.md; enforced-code-style.md now delegates rather than duplicating.
1 parent ac544b4 commit ea3695d

File tree

2 files changed

+17
-11
lines changed

2 files changed

+17
-11
lines changed

Documentation/AI/enforced-code-style.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,8 @@ Do not use `--no-verify` to bypass — the format check exists to keep CI green.
2828

2929
The `kw-commit-msg.py` hook enforces:
3030
- Subject line ≤78 characters
31-
- Standard prefix required (`ENH:` `BUG:` `COMP:` `DOC:` `STYLE:` `PERF:` `BUILD:`)
32-
- `WIP:` is **not** allowed by `ghostflow-check-main` — use `[WIP]` in the
33-
PR title instead (see [git-commits.md](./git-commits.md))
31+
- Approved commit-subject prefix — see
32+
[git-commits.md § Prefixes](./git-commits.md#prefixes) for the list
3433

3534
KWStyle also checks that every header has the doxygen `\class` tag. See
3635
[compiler-cautions.md](./compiler-cautions.md) section 12a for the

Documentation/AI/git-commits.md

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,21 @@ subject should be scannable in `git log --oneline`.
2929
| `DOC:` | Documentation only |
3030
| `STYLE:` | Formatting, naming, no logic change |
3131
| `PERF:` | Performance improvement |
32-
| `BUILD:` | Build-system / CMake changes |
33-
34-
> **Do not use `WIP:` as a commit-subject prefix.** It is not in the
35-
> `ghostflow-check-main` allowed list and will reject the PR. To mark a PR
36-
> as work-in-progress, use a `[WIP]` prefix in the **PR title** (the GitHub
37-
> "WIP" app gates merging on it) but keep individual commit subjects on a
38-
> standard prefix like `ENH:` or `BUG:`. When the PR is ready, remove
39-
> `[WIP]` from the title.
32+
| `WIP:` | Transient commits for development testing only |
33+
34+
> **`WIP:` on commit subjects is a two-layer opt-in — use it deliberately.**
35+
> The local `kw-commit-msg.py` hook **intentionally** accepts `WIP:` so
36+
> developers can commit probe tests, A/B experiments, and other work they
37+
> know is not suitable for `main` — without renaming the prefix on every
38+
> iteration. `ghostflow-check-main` (the GitHub App gating PR merge) then
39+
> rejects any commit whose subject begins with `WIP:`, which is the
40+
> intended safety net: `WIP:` commits cannot accidentally land on `main`.
41+
> Before marking the PR ready for review, remove, reword, fixup, or squash
42+
> `WIP:` commits into standard-prefix commits.
43+
>
44+
> To mark an entire PR (rather than individual commits) as
45+
> work-in-progress, add `[WIP]` to the **PR title** — the GitHub "WIP" app
46+
> gates merging on that string; remove it when the PR is ready.
4047
4148
## Commit Message Length
4249

0 commit comments

Comments
 (0)