Skip to content

Commit 501a341

Browse files
committed
dotfiles: claude: ajay-ship: add Test Plan + lowercase commit guidance
Extends the ship command for Phabricator/fbsource repos: populate the Test Plan field with copy-pasteable reproduction commands and blank output blocks. Also codifies lowercase-first-word-after-scope in commit subjects so generated messages match repo convention.
1 parent 31b92a7 commit 501a341

1 file changed

Lines changed: 27 additions & 1 deletion

File tree

dotfiles/claude/commands/ajay-ship.md

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,33 @@ Generate a `/tmp` shell script that will stage, commit, and (for git) push the u
1818

1919
3. **Identify the intended files for this commit.** Default to every modified/added/deleted/untracked path. If the diff contains files that look unrelated to the dominant theme of the change (e.g. a stray edit in an unrelated subtree, or untracked scratch files), ask the user via `AskUserQuestion` which group(s) to include before continuing. Any file that's dirty in the working tree but NOT going into this commit must be listed under "Files NOT staged" in the script header so the user can spot drift.
2020

21-
4. **Draft a commit message** that matches the repo's recent style. Read the last ~20 commits and copy the convention you see — for example, the dotfiles repo uses `<scope>: <short subject>` with an optional bulleted body explaining the *why* (not the *what*). Don't invent a style. The subject should be short (≤72 chars); the body is optional and used only when the change has non-obvious motivation worth recording. For large repos (such as a monorepo), inspect current changes in the relevant project or current directory; it will not be useful to look at overall last ~20 commits.
21+
4. **Draft a commit message** that matches the repo's recent style. Read the last ~20 commits and copy the convention you see — for example, the dotfiles repo uses `<scope>: <short subject>` with an optional bulleted body explaining the *why* (not the *what*). Don't invent a style. The subject should be short (≤72 chars); the body is optional and used only when the change has non-obvious motivation worth recording. For large repos (such as a monorepo), inspect current changes in the relevant project or current directory; it will not be useful to look at overall last ~20 commits. Always use lowercase for the first word after the scope prefix — e.g. `[nrf54h20] add ...` not `[nrf54h20] Add ...`, `dotfiles: fish: add ...` not `dotfiles: fish: Add ...`.
22+
23+
For repos that use a Test Plan field (e.g. fbsource/Phabricator), populate it with a minimal fenced code block listing the relevant commands (existing and new) that a reviewer can copy-paste to reproduce. No prose — just the commands. After the commands block, add a blank output block for the user to paste results into, with a tiny note like `<output of: `command`>`. If you can predict what the output will be, prepopulate it as expected output (clearly marked as "expected", not actual). If the change modifies behavior of an existing command, use before/after sections. Example:
24+
25+
```
26+
echo 'hello_world'
27+
```
28+
29+
before:
30+
```
31+
<output of: `echo 'hello_world'` before>
32+
```
33+
34+
after:
35+
```
36+
<output of: `echo 'hello_world'` after>
37+
```
38+
39+
For new commands with no "before", just use a single output block:
40+
41+
```
42+
make push BOARD=loma_evt1
43+
```
44+
45+
```
46+
<output of: `make push BOARD=loma_evt1`>
47+
```
2248

2349
5. **Write the script** to `/tmp/ship-<repo-basename>-<theme>-<YYYYMMDD-HHMMSS>.sh` using the template below, then `chmod +x` it.
2450

0 commit comments

Comments
 (0)