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
feat: add commit-msg hook and simplify session-commit
Add a Husky commit-msg hook that validates conventional commit
type prefix, authorship trailer, and no em dashes. Remove the
redundant commit-user command and strip progress/blocker logging
from session-commit.
Co-Authored-By: Claude <noreply@anthropic.com>
Automate end-of-session cleanup: stage and commit.
9
9
10
10
## Steps
11
11
12
-
1.**Assess changes**— run these in parallel:
12
+
1.**Assess changes**-- run these in parallel:
13
13
-`git status`
14
14
-`git diff HEAD`
15
15
-`git branch --show-current`
16
16
-`git log --oneline -10`
17
17
18
-
2.**Stage everything**— if there are unstaged or untracked changes:
18
+
2.**Stage everything**-- if there are unstaged or untracked changes:
19
19
- Use `git add <specific-files>` (not `git add .`)
20
20
- Never stage files that likely contain secrets (.env, credentials, etc.)
21
21
- Skip if everything is already staged
22
22
23
-
3.**Update progress log** — read `docs/claude-progress.txt`, then prepend a new entry at the top (after the header line) following the format in `docs/references/claude-progress-readme.md`.
24
-
- Analyze the staged diff to determine what was done
25
-
- Use today's actual date
26
-
- Be concise but complete
27
-
- Stage the updated file: `git add docs/claude-progress.txt`
23
+
3.**Draft and commit** -- follow all rules from `docs/references/commit-message-guide.md`:
- Body is optional if the subject is descriptive enough, otherwise explain what and why
26
+
- No em dashes anywhere in the message
28
27
29
-
4.**Migrate blockers** — if the progress entry you just wrote has a `Blockers:` line that is NOT `None`:
30
-
- Read `docs/agent-struggles.json`
31
-
- For each blocker, append an entry:
32
-
33
-
```json
34
-
{
35
-
"date": "<today>",
36
-
"description": "<blocker text from progress entry>",
37
-
"cause": "<your best short assessment>",
38
-
"suggestion": "<what would fix or prevent this>",
39
-
"resolved": false
40
-
}
41
-
```
42
-
43
-
- Stage: `git add docs/agent-struggles.json`
44
-
45
-
5. **Draft and commit** — follow all rules from `docs/references/commit-message-guide.md`. Determine authorship mode (tandem vs autonomous) from the guide. Use a HEREDOC:
28
+
Determine authorship mode (tandem vs autonomous) from the guide. Use a HEREDOC:
6.**Verify**— run `git status` and `git log --oneline -1` to confirm success.
41
+
4. **Verify** -- run `git status` and `git log --oneline -1` to confirm success. If the commit fails due to the commit-msg hook, read the error output, fix the message, and create a NEW commit (never amend).
59
42
60
43
## Rules
61
44
62
-
- Analyze the FULL diff for accurate progress and commit message
45
+
- Analyze the FULL diff for an accurate commit message
63
46
- Never commit secrets or sensitive files
64
-
- If commit fails due to pre-commit hook, fix and create a NEW commit (never amend)
47
+
- If commit fails due to pre-commit or commit-msg hook, fix and create a NEW commit (never amend)
0 commit comments