@cleepi/git 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +67 -0
- package/README.md +120 -0
- package/SPEC.md +90 -0
- package/package.json +39 -0
- package/prompts/commit.md +199 -0
- package/skills/git-commit/SKILL.md +212 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Changelog — @cleepi/git
|
|
2
|
+
|
|
3
|
+
All notable changes to this package are documented here.
|
|
4
|
+
|
|
5
|
+
Format: [Keep a Changelog 1.1.0](https://keepachangelog.com/en/1.1.0/).
|
|
6
|
+
Versioning: [SemVer](https://semver.org/spec/v2.0.0.html). Pre-`1.0.0`,
|
|
7
|
+
minor bumps may include breaking changes.
|
|
8
|
+
|
|
9
|
+
## [Unreleased]
|
|
10
|
+
|
|
11
|
+
## [0.1.0] — 2026-05-28
|
|
12
|
+
|
|
13
|
+
Initial release. Cleepi's git conventions as a pi package. Per
|
|
14
|
+
[spec DRAFT-001](../../docs/DRAFT-001-cleepi-git-v0.1.0/spec.md)
|
|
15
|
+
(accepted 2026-05-28).
|
|
16
|
+
|
|
17
|
+
### Added
|
|
18
|
+
|
|
19
|
+
- **`skills/git-commit/SKILL.md`** — canonical commit-message
|
|
20
|
+
convention. Conventional Commits + AngularJS type set
|
|
21
|
+
(`feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`,
|
|
22
|
+
`chore`, `build`, `ci`, `revert`). Hard rules: subject-line
|
|
23
|
+
only, NEVER `Co-authored-by:`, no `Signed-off-by:`, no emoji,
|
|
24
|
+
no trailing period, imperative + present tense + lowercase
|
|
25
|
+
first letter. Anti-pattern table with 8 worked examples.
|
|
26
|
+
- **`prompts/commit.md`** — `/commit <type> <message>` slash
|
|
27
|
+
command. Resolves domain from cwd (nearest `packages/<n>/`
|
|
28
|
+
ancestor) and ticket-id from cwd → git branch → ask.
|
|
29
|
+
Strips any `Co-authored-by:` injected by AI tooling before
|
|
30
|
+
passing to `git commit`. Warns on unstaged changes; never
|
|
31
|
+
auto-`git add -A` without asking.
|
|
32
|
+
- **`SPEC.md`** — package purpose-and-scope.
|
|
33
|
+
- **`README.md`** — install, examples, soft-aware integration
|
|
34
|
+
with `@cleepi/sdd`.
|
|
35
|
+
|
|
36
|
+
### Decisions captured in spec DRAFT-001
|
|
37
|
+
|
|
38
|
+
- New `@cleepi/git` package rather than folding into
|
|
39
|
+
`@cleepi/coding` or `@cleepi/sdd` — keeps package taxonomy
|
|
40
|
+
clean, leaves room for branch / PR / rebase additions.
|
|
41
|
+
- Subject-line only, no body, no footers — Honza-mandated.
|
|
42
|
+
Cleepi commit history reads as a list of one-liners.
|
|
43
|
+
- Ticket-id highly recommended but not required — matches the
|
|
44
|
+
same gradient as `sdd`'s `DRAFT-NNN` vs real-ticket strictness.
|
|
45
|
+
- Both skill and `/commit` prompt ship in v0.1.0 — skill carries
|
|
46
|
+
the convention; prompt is ergonomic glue.
|
|
47
|
+
|
|
48
|
+
### Known limitations
|
|
49
|
+
|
|
50
|
+
- `/commit` is designed for interactive pi sessions. In `--print`
|
|
51
|
+
non-interactive mode the AI tends to shortcut to bare
|
|
52
|
+
`<type>: <message>` format without resolving domain/ticket-id
|
|
53
|
+
from cwd. If you script commits, write the assembled message
|
|
54
|
+
yourself per the skill.
|
|
55
|
+
|
|
56
|
+
### Not in this release (deferred)
|
|
57
|
+
|
|
58
|
+
- `commit-msg` git hook (convention-led, not enforced).
|
|
59
|
+
- Branch naming, PR templates, rebase discipline. v0.2.0+
|
|
60
|
+
candidates that justify keeping `@cleepi/git` separate.
|
|
61
|
+
- Type extension via config. Teams wanting other types edit a
|
|
62
|
+
project-scope copy of the skill.
|
|
63
|
+
- Multi-line bodies, `BREAKING CHANGE:` footer. Use `!` syntax
|
|
64
|
+
for breaks; put rationale in the spec, not the commit.
|
|
65
|
+
|
|
66
|
+
[Unreleased]: https://github.com/cleevio/cleepi/compare/git-v0.1.0...HEAD
|
|
67
|
+
[0.1.0]: https://github.com/cleevio/cleepi/releases/tag/git-v0.1.0
|
package/README.md
ADDED
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
# @cleepi/git
|
|
2
|
+
|
|
3
|
+
Cleepi's git conventions as a pi package. Install in any repo
|
|
4
|
+
where you want a clean, standardised commit history — and never
|
|
5
|
+
another `Co-authored-by: Claude` line ever again.
|
|
6
|
+
|
|
7
|
+
## What's in the box
|
|
8
|
+
|
|
9
|
+
- **Skill** (`skills/git-commit/SKILL.md`) — the canonical
|
|
10
|
+
commit-message convention (Conventional Commits + AngularJS
|
|
11
|
+
types, with monorepo-aware domain and ticket-id discipline).
|
|
12
|
+
Loaded automatically when you ask about commits, or
|
|
13
|
+
explicitly with `/skill:git-commit`.
|
|
14
|
+
- **Prompt** — `/commit <type> <message>`. Resolves domain
|
|
15
|
+
(from cwd) and ticket-id (from cwd → branch → ask), assembles
|
|
16
|
+
the message, strips any `Co-authored-by:` slop, asks before
|
|
17
|
+
committing.
|
|
18
|
+
|
|
19
|
+
## The 30-second version
|
|
20
|
+
|
|
21
|
+
Every cleepi commit follows this shape:
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
<type>(<domain>): [<ticket-id> ]<message>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Examples:
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
feat(crew): AC-201 add reviewer pre-step
|
|
31
|
+
refactor(sdd): AC-202 collapse Why-now into Why
|
|
32
|
+
docs(crew): fix README install path
|
|
33
|
+
chore(meta): bump prettier
|
|
34
|
+
fix(atlassian): DRAFT-007 handle empty JQL response
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
**Hard rules (non-negotiable):**
|
|
38
|
+
|
|
39
|
+
- One line. No body. No footers.
|
|
40
|
+
- **NEVER `Co-authored-by:`.** Not for AI assistants. Not for
|
|
41
|
+
anyone. Strip it if your tooling tries to add it.
|
|
42
|
+
- No `Signed-off-by:` either.
|
|
43
|
+
- No emoji, no trailing period.
|
|
44
|
+
- Imperative, present tense, lowercase first letter of message.
|
|
45
|
+
|
|
46
|
+
For the full discipline (type table, domain rules, ticket-id
|
|
47
|
+
resolution chain, anti-patterns, voice), see
|
|
48
|
+
[`skills/git-commit/SKILL.md`](skills/git-commit/SKILL.md). It's
|
|
49
|
+
the source of truth.
|
|
50
|
+
|
|
51
|
+
## Install
|
|
52
|
+
|
|
53
|
+
Global (every pi session gets the convention):
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
pi install git:github.com/cleevio/cleepi/packages/git
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Project-local (recommended for repos adopting the convention as
|
|
60
|
+
their actual standard):
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
cd <repo>
|
|
64
|
+
pi install -l git:github.com/cleevio/cleepi/packages/git
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## How `/commit` works
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
/commit feat add reviewer pre-step
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
1. Validates `feat` against the Angular type set.
|
|
74
|
+
2. Resolves domain: cwd is inside `packages/crew/` → `crew`.
|
|
75
|
+
3. Resolves ticket-id: cwd is under
|
|
76
|
+
`docs/AC-201-reviewer-prestep/` → `AC-201`.
|
|
77
|
+
4. Assembles: `feat(crew): AC-201 add reviewer pre-step`.
|
|
78
|
+
5. Strips any `Co-authored-by:` injected anywhere.
|
|
79
|
+
6. Shows you the message + the staged diff summary.
|
|
80
|
+
7. Asks `[y / N / edit]` before running `git commit`.
|
|
81
|
+
|
|
82
|
+
If you call `/commit` outside a `packages/<n>/` directory, or
|
|
83
|
+
on a branch with no ticket pattern, it asks you for the
|
|
84
|
+
missing pieces. Manual `--domain=...` and ticket-id tokens in
|
|
85
|
+
the args always win.
|
|
86
|
+
|
|
87
|
+
## Tuning
|
|
88
|
+
|
|
89
|
+
Don't edit the package source — it gets overwritten on
|
|
90
|
+
`pi update`. Instead, copy the skill into your project (or
|
|
91
|
+
user) scope and edit there:
|
|
92
|
+
|
|
93
|
+
```bash
|
|
94
|
+
cp .pi/agent/git-commit/SKILL.md .pi/skills/git-commit/SKILL.md
|
|
95
|
+
# edit .pi/skills/git-commit/SKILL.md
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Project scope wins on collision.
|
|
99
|
+
|
|
100
|
+
## Soft-aware integration with `@cleepi/sdd`
|
|
101
|
+
|
|
102
|
+
`/commit` and `@cleepi/sdd`'s `/journal` share the same
|
|
103
|
+
ticket-id resolution chain (cwd → branch → ask). When `sdd` is
|
|
104
|
+
installed alongside `git`, ticket detection is consistent. When
|
|
105
|
+
it isn't, branch-name and ask-user fallbacks still work.
|
|
106
|
+
|
|
107
|
+
There is no hard dependency.
|
|
108
|
+
|
|
109
|
+
## Related
|
|
110
|
+
|
|
111
|
+
- [SPEC.md](./SPEC.md) — what this package is and isn't.
|
|
112
|
+
- [CHANGELOG.md](./CHANGELOG.md) — release history.
|
|
113
|
+
- Root cleepi [spec DRAFT-001](../../docs/DRAFT-001-cleepi-git-v0.1.0/spec.md) —
|
|
114
|
+
the v0.1.0 design rationale.
|
|
115
|
+
- [`@cleepi/sdd`](../sdd/) — sibling package; shares ticket
|
|
116
|
+
resolution.
|
|
117
|
+
- [Conventional Commits 1.0.0](https://www.conventionalcommits.org/)
|
|
118
|
+
— the upstream convention.
|
|
119
|
+
- [AngularJS commit message guidelines](https://github.com/angular/angular/blob/main/CONTRIBUTING.md#-commit-message-format)
|
|
120
|
+
— the upstream type set.
|
package/SPEC.md
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: "@cleepi/git"
|
|
3
|
+
status: shipped
|
|
4
|
+
created: 2026-05-28
|
|
5
|
+
owner: Honza
|
|
6
|
+
related:
|
|
7
|
+
- ../../docs/DRAFT-001-cleepi-git-v0.1.0/spec.md
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# `@cleepi/git`
|
|
11
|
+
|
|
12
|
+
## What this package is
|
|
13
|
+
|
|
14
|
+
A pi package that ships Cleepi's git conventions as durable
|
|
15
|
+
instructions. Install it in any repo and pi sessions there know
|
|
16
|
+
how to write commits the cleepi way.
|
|
17
|
+
|
|
18
|
+
Two things ship in v0.1.0:
|
|
19
|
+
|
|
20
|
+
- **Skill** (`skills/git-commit/SKILL.md`) — the canonical
|
|
21
|
+
commit-message convention. Loaded on demand or with
|
|
22
|
+
`/skill:git-commit`.
|
|
23
|
+
- **Prompt** — `/commit <type> <message>`. Resolves domain
|
|
24
|
+
(from cwd) and ticket-id (from cwd → branch → ask), assembles
|
|
25
|
+
the message, strips any AI-tooling-injected `Co-authored-by:`,
|
|
26
|
+
and runs `git commit`.
|
|
27
|
+
|
|
28
|
+
The convention itself is documented in the skill, not here.
|
|
29
|
+
Read [`skills/git-commit/SKILL.md`](skills/git-commit/SKILL.md)
|
|
30
|
+
for the canonical version.
|
|
31
|
+
|
|
32
|
+
## What this package is not
|
|
33
|
+
|
|
34
|
+
- **Not a lint or hook enforcer.** The skill instructs; it
|
|
35
|
+
doesn't police. No `commit-msg` hook ships. Enforcement is
|
|
36
|
+
deferred until friction shows up.
|
|
37
|
+
- **Not a branch / PR / rebase toolkit.** v0.1.0 ships *only*
|
|
38
|
+
the commit-message convention. Branch naming, PR templates,
|
|
39
|
+
and rebase discipline are v0.2.0+ candidates.
|
|
40
|
+
- **Not a changelog generator.** Commits don't auto-write
|
|
41
|
+
changelog entries. That's `@cleepi/sdd`'s `/changelog`.
|
|
42
|
+
The link between commit and changelog is the ticket-id,
|
|
43
|
+
read by humans.
|
|
44
|
+
- **Not configurable.** The Angular type set is fixed
|
|
45
|
+
(`feat`, `fix`, `docs`, `style`, `refactor`, `perf`, `test`,
|
|
46
|
+
`chore`, `build`, `ci`, `revert`). Teams wanting extra types
|
|
47
|
+
edit a project-scope copy of the skill.
|
|
48
|
+
- **Not opinionated about ticket trackers.** Ticket-id can be
|
|
49
|
+
`AC-NNN`, `LIN-NNN`, `gh-NN`, `DRAFT-NNN`, anything matching
|
|
50
|
+
`[A-Z]+-[0-9]+`. The skill doesn't validate.
|
|
51
|
+
- **Not a hard dependency on `@cleepi/sdd`.** Soft-aware: when
|
|
52
|
+
sdd is loaded, the ticket-folder resolution chain matches
|
|
53
|
+
`/journal`'s. When sdd isn't loaded, the branch-name and
|
|
54
|
+
ask-user fallbacks still work.
|
|
55
|
+
|
|
56
|
+
## Design at a glance
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
packages/git/
|
|
60
|
+
package.json
|
|
61
|
+
README.md
|
|
62
|
+
SPEC.md ← this file
|
|
63
|
+
CHANGELOG.md
|
|
64
|
+
skills/git-commit/SKILL.md ← the canonical convention
|
|
65
|
+
prompts/commit.md ← /commit
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## The format (one-line summary)
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
<type>(<domain>): [<ticket-id> ]<message>
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Subject line only. No body. No footers. **No `Co-authored-by:`.**
|
|
75
|
+
See the skill for the full discipline.
|
|
76
|
+
|
|
77
|
+
## Versioning
|
|
78
|
+
|
|
79
|
+
Per-package SemVer. Pre-`1.0.0`, minor bumps may include
|
|
80
|
+
breaking changes (per SemVer §4).
|
|
81
|
+
|
|
82
|
+
## Related
|
|
83
|
+
|
|
84
|
+
- [`skills/git-commit/SKILL.md`](./skills/git-commit/SKILL.md) —
|
|
85
|
+
canonical convention.
|
|
86
|
+
- [CHANGELOG.md](./CHANGELOG.md) — release history.
|
|
87
|
+
- Root cleepi [spec DRAFT-001](../../docs/DRAFT-001-cleepi-git-v0.1.0/spec.md) —
|
|
88
|
+
the v0.1.0 design rationale.
|
|
89
|
+
- [`@cleepi/sdd`](../sdd/) — soft-aware sibling; `/commit`
|
|
90
|
+
shares ticket-resolution logic with `/journal`.
|
package/package.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@cleepi/git",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Cleepi git conventions: conventional-commits skill + /commit prompt with monorepo-aware domain and ticket-id resolution. Subject-line-only commits; no body, no footers, no Co-authored-by ever.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"pi-package",
|
|
7
|
+
"cleepi",
|
|
8
|
+
"git",
|
|
9
|
+
"commit",
|
|
10
|
+
"conventional-commits",
|
|
11
|
+
"angular"
|
|
12
|
+
],
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "git+https://github.com/honzanemecek/cleepi.git",
|
|
17
|
+
"directory": "packages/git"
|
|
18
|
+
},
|
|
19
|
+
"bugs": "https://github.com/honzanemecek/cleepi/issues",
|
|
20
|
+
"homepage": "https://github.com/honzanemecek/cleepi/tree/main/packages/git#readme",
|
|
21
|
+
"publishConfig": {
|
|
22
|
+
"access": "public"
|
|
23
|
+
},
|
|
24
|
+
"pi": {
|
|
25
|
+
"skills": [
|
|
26
|
+
"./skills"
|
|
27
|
+
],
|
|
28
|
+
"prompts": [
|
|
29
|
+
"./prompts"
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
"files": [
|
|
33
|
+
"skills",
|
|
34
|
+
"prompts",
|
|
35
|
+
"SPEC.md",
|
|
36
|
+
"CHANGELOG.md",
|
|
37
|
+
"README.md"
|
|
38
|
+
]
|
|
39
|
+
}
|
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Craft and run a cleepi-style git commit. Resolves domain (from cwd) and ticket-id (from cwd → branch → ask), assembles the message, strips any Co-authored-by, and runs git commit.
|
|
3
|
+
argument-hint: "<type> <message>"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
The user wants to commit. Args: **$ARGUMENTS**
|
|
7
|
+
|
|
8
|
+
## Critical: required tool calls BEFORE any commit
|
|
9
|
+
|
|
10
|
+
The whole point of `/commit` is to assemble
|
|
11
|
+
`<type>(<domain>): [<ticket-id> ]<message>`. You cannot do that
|
|
12
|
+
without knowing cwd, staged paths, and branch name. **Therefore,
|
|
13
|
+
before running `git commit`, you MUST run these tool calls—in
|
|
14
|
+
this order—so resolution has data:**
|
|
15
|
+
|
|
16
|
+
1. `bash: pwd`
|
|
17
|
+
2. `bash: git diff --cached --name-only`
|
|
18
|
+
3. `bash: git rev-parse --abbrev-ref HEAD`
|
|
19
|
+
4. `bash: git status --porcelain`
|
|
20
|
+
|
|
21
|
+
If you skip any of these you will produce a bare
|
|
22
|
+
`feat: message` commit, which is a **resolution failure**, not
|
|
23
|
+
a valid output. A `git commit` call without a preceding
|
|
24
|
+
resolution trace from these four tool calls is a bug.
|
|
25
|
+
|
|
26
|
+
Load `/skill:git-commit` if you haven't — it has the full
|
|
27
|
+
convention, type table, anti-patterns, and hard rules.
|
|
28
|
+
|
|
29
|
+
## Then: required output shape
|
|
30
|
+
|
|
31
|
+
After the four tool calls, your reply MUST contain this block
|
|
32
|
+
before the `git commit` call:
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
## Resolution
|
|
36
|
+
- type: <type> (from args)
|
|
37
|
+
- domain: <domain> (from cwd: <pwd-output>)
|
|
38
|
+
- ticket-id: <id-or-none> (from <staged-paths|branch|args|none>)
|
|
39
|
+
- message: <normalised-message>
|
|
40
|
+
- assembled: <type>(<domain>): [<ticket-id> ]<message>
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
No exceptions. No "auto-confirm" mode skips this. No "just
|
|
44
|
+
commit" shortens it. The user cannot inspect resolution they
|
|
45
|
+
cannot see; the Resolution block must always appear.
|
|
46
|
+
|
|
47
|
+
A `<type>: <msg>` shape commit (no `(<domain>)` clause) is a
|
|
48
|
+
**resolution failure**. If you are about to produce one, STOP
|
|
49
|
+
and walk resolution again.
|
|
50
|
+
|
|
51
|
+
## Resolve the parts
|
|
52
|
+
|
|
53
|
+
### 1. Type
|
|
54
|
+
|
|
55
|
+
First word of `$ARGUMENTS` is the type. Validate against the
|
|
56
|
+
Angular set (`feat`, `fix`, `docs`, `style`, `refactor`, `perf`,
|
|
57
|
+
`test`, `chore`, `build`, `ci`, `revert`). If the first token
|
|
58
|
+
isn't a valid type, **stop** and ask the user which type to use,
|
|
59
|
+
quoting the type table.
|
|
60
|
+
|
|
61
|
+
### 2. Domain
|
|
62
|
+
|
|
63
|
+
Resolve from cwd:
|
|
64
|
+
|
|
65
|
+
- If `cwd` is inside `packages/<n>/...`, domain = `<n>`.
|
|
66
|
+
- Otherwise, **ask** the user: *"Domain? (free-form area name —
|
|
67
|
+
e.g. `meta`, `docs`, `ci`, `infra`, `release`)."*
|
|
68
|
+
- If the user passed a `--domain=<x>` style override anywhere
|
|
69
|
+
in `$ARGUMENTS`, that wins.
|
|
70
|
+
|
|
71
|
+
Don't use sub-areas of a package (`crew-agents`, `sdd-skill`).
|
|
72
|
+
Use the package short name.
|
|
73
|
+
|
|
74
|
+
### 3. Ticket-id
|
|
75
|
+
|
|
76
|
+
Resolve in this order (manual override always wins):
|
|
77
|
+
|
|
78
|
+
a. **Explicit token in `$ARGUMENTS`** matching `[A-Z]+-[0-9]+`
|
|
79
|
+
(excluding any token that's clearly part of the message).
|
|
80
|
+
If found, use it.
|
|
81
|
+
|
|
82
|
+
b. **Ticket-id pattern in any staged file path.** Run
|
|
83
|
+
`git diff --cached --name-only` and grep the paths for
|
|
84
|
+
`(?:^|/)(<ticket-pattern>)-[^/]+/` where ticket-pattern is
|
|
85
|
+
`[A-Z]+-[0-9]+` or `DRAFT-[0-9]+`. Common matches:
|
|
86
|
+
`docs/AC-NNN-slug/...`, `packages/<n>/docs/AC-NNN-slug/...`.
|
|
87
|
+
If exactly one ticket-id matches across all staged paths,
|
|
88
|
+
use it. If multiple, list them and ask.
|
|
89
|
+
|
|
90
|
+
c. **Ticket-id pattern visible in the working tree near the
|
|
91
|
+
change.** If (b) found nothing, check whether the parent
|
|
92
|
+
repo has a single recently-modified `docs/<ticket-id>-slug/`
|
|
93
|
+
folder (`ls -t docs/ packages/*/docs/ 2>/dev/null | head`)
|
|
94
|
+
that matches the type of change. Surface this as a
|
|
95
|
+
*candidate*, not an auto-pick — ask the user to confirm.
|
|
96
|
+
|
|
97
|
+
d. **Git branch name.** Run `git rev-parse --abbrev-ref HEAD`.
|
|
98
|
+
Grep the result for `[A-Z]+-[0-9]+`. If matched, use the
|
|
99
|
+
first match.
|
|
100
|
+
|
|
101
|
+
e. **Ask the user**: *"Ticket-id? (e.g. `AC-123`, or empty to
|
|
102
|
+
skip.)"* Include any candidates surfaced by (c) in the
|
|
103
|
+
question. If they leave it empty:
|
|
104
|
+
|
|
105
|
+
- For type `feat`/`fix`/`refactor`/`perf`: gently note that
|
|
106
|
+
a ticket-id is highly recommended for these; ask once more
|
|
107
|
+
if they want to provide one. If they still skip, proceed
|
|
108
|
+
without.
|
|
109
|
+
- For other types: proceed without.
|
|
110
|
+
|
|
111
|
+
### 4. Message
|
|
112
|
+
|
|
113
|
+
Everything in `$ARGUMENTS` after the type token, minus any
|
|
114
|
+
extracted ticket-id token. Trim.
|
|
115
|
+
|
|
116
|
+
Apply message style from the skill:
|
|
117
|
+
|
|
118
|
+
- Imperative, present tense (`add`, not `added`/`adds`).
|
|
119
|
+
- Lowercase first letter (after ticket-id if present).
|
|
120
|
+
- No trailing period.
|
|
121
|
+
- Target 50–72 chars total assembled length; hard cap 100.
|
|
122
|
+
|
|
123
|
+
If the message clearly violates these (past tense, capitalized
|
|
124
|
+
first word, trailing period), rewrite to match. Tell the user
|
|
125
|
+
in your reply that you normalised it.
|
|
126
|
+
|
|
127
|
+
## Check staging
|
|
128
|
+
|
|
129
|
+
Run `git status --porcelain`. If there are unstaged changes:
|
|
130
|
+
|
|
131
|
+
- Print the list of unstaged files.
|
|
132
|
+
- Ask: *"Unstaged changes present. `[stage all / commit staged
|
|
133
|
+
only / cancel]`?"*
|
|
134
|
+
- On `stage all`: run `git add -A` then continue.
|
|
135
|
+
- On `commit staged only`: continue with whatever is currently
|
|
136
|
+
staged.
|
|
137
|
+
- On `cancel`: stop. Don't commit.
|
|
138
|
+
|
|
139
|
+
Never auto-`git add -A` without asking.
|
|
140
|
+
|
|
141
|
+
## Assemble
|
|
142
|
+
|
|
143
|
+
```
|
|
144
|
+
<type>(<domain>): [<ticket-id> ]<message>
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Examples (target shape):
|
|
148
|
+
|
|
149
|
+
```
|
|
150
|
+
feat(crew): AC-201 add reviewer pre-step
|
|
151
|
+
docs(crew): fix README install path
|
|
152
|
+
chore(meta): bump prettier
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## Strip `Co-authored-by:` (hard rule)
|
|
156
|
+
|
|
157
|
+
Before passing the message to `git commit`, scan it for any
|
|
158
|
+
line matching `(?i)co-authored-by:`. **Remove the line and
|
|
159
|
+
everything after it.** This rule overrides everything,
|
|
160
|
+
including explicit user input that included such a line.
|
|
161
|
+
|
|
162
|
+
Same for `Signed-off-by:`.
|
|
163
|
+
|
|
164
|
+
If you removed anything, mention it in your reply: *"Stripped
|
|
165
|
+
`Co-authored-by:` per the `git-commit` skill's hard rule."*
|
|
166
|
+
|
|
167
|
+
## Confirm + commit
|
|
168
|
+
|
|
169
|
+
Show the user:
|
|
170
|
+
|
|
171
|
+
- The final assembled message (one line).
|
|
172
|
+
- The resolution trace in one compact line: *"resolved:
|
|
173
|
+
domain=`X` (from cwd), ticket=`Y` (from <source>)"*. This
|
|
174
|
+
exists so the user can spot a wrong resolution before the
|
|
175
|
+
commit lands. Don't skip this even when the user said
|
|
176
|
+
"auto-confirm."
|
|
177
|
+
- Brief summary of what's about to be committed: file count, a
|
|
178
|
+
sample of paths from `git diff --cached --name-only`.
|
|
179
|
+
|
|
180
|
+
Ask: *"Commit? `[y / N / edit]`"*
|
|
181
|
+
|
|
182
|
+
- `y`: run `git commit -m "<assembled-message>"`. Report the
|
|
183
|
+
resulting commit hash and short summary.
|
|
184
|
+
- `edit`: ask the user what to change; re-assemble; re-confirm.
|
|
185
|
+
- `N` (default): stop. Don't commit.
|
|
186
|
+
|
|
187
|
+
If the user pre-authorised auto-confirmation, treat that as
|
|
188
|
+
standing consent for the *confirm step only* — still show the
|
|
189
|
+
resolution trace so wrong resolutions are visible after the fact.
|
|
190
|
+
|
|
191
|
+
## Discipline check
|
|
192
|
+
|
|
193
|
+
If at any point you almost wrote a multi-line commit, almost
|
|
194
|
+
included `Co-authored-by:`, or almost used a type outside the
|
|
195
|
+
Angular set, **stop and reload the skill**. These mistakes are
|
|
196
|
+
the exact reason this prompt exists.
|
|
197
|
+
|
|
198
|
+
Be concise throughout. No throat-clearing in your reply. The
|
|
199
|
+
user wants the commit done, not a summary of what you did.
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: git-commit
|
|
3
|
+
description: Cleepi's commit-message convention. Conventional Commits + AngularJS types, with monorepo-aware domain (package short name), optional ticket-id, subject-line only (no body, no footers, NEVER Co-authored-by). Load when about to write a git commit message in a cleepi-style repo, or when asked about commit conventions.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# git-commit
|
|
7
|
+
|
|
8
|
+
You are about to write a git commit message in a cleepi-style
|
|
9
|
+
repo. Follow this convention exactly. The rules below are not
|
|
10
|
+
suggestions.
|
|
11
|
+
|
|
12
|
+
## The format
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
<type>(<domain>): [<ticket-id> ]<message>
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Examples (the only shape you produce):
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
feat(crew): AC-201 add reviewer pre-step
|
|
22
|
+
refactor(sdd): AC-202 collapse Why-now into Why
|
|
23
|
+
docs(crew): fix README install path
|
|
24
|
+
chore(meta): bump prettier
|
|
25
|
+
fix(atlassian): DRAFT-007 handle empty JQL response
|
|
26
|
+
test(git): cover ticket-id detection
|
|
27
|
+
build(crew): pin pi-subagents to 0.25.0
|
|
28
|
+
ci(meta): run smoke tests on pull request
|
|
29
|
+
revert(sdd): undo phase-3 AGENTS.md change
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Real `git log` from a cleepi repo should read as a clean list
|
|
33
|
+
of one-liners like the above. No multi-line messages anywhere.
|
|
34
|
+
|
|
35
|
+
## Hard rules
|
|
36
|
+
|
|
37
|
+
These are non-negotiable. AI tooling and humans both break them.
|
|
38
|
+
The skill exists to stop that.
|
|
39
|
+
|
|
40
|
+
- **Subject line only.** One line. No body. No footers.
|
|
41
|
+
- **NEVER `Co-authored-by:`.** Not for AI assistants. Not for
|
|
42
|
+
pair programmers. Not for "credit." If your tooling tries to
|
|
43
|
+
append one, **strip it before committing.** This is a hard
|
|
44
|
+
rule, not a preference.
|
|
45
|
+
- **No `Signed-off-by:`** either. Same reason. The skill doesn't
|
|
46
|
+
ship a DCO workflow; commits stay clean.
|
|
47
|
+
- **No emoji, no decorations.** `feat(crew):` not `✨ feat(crew):`.
|
|
48
|
+
- **No breaking change footer.** If a change is breaking, use
|
|
49
|
+
the bang syntax (`feat(crew)!: ...`) and put the *rationale*
|
|
50
|
+
in the spec, not in the commit.
|
|
51
|
+
- **No trailing period** on the subject line.
|
|
52
|
+
- **Imperative, present tense, lowercase first letter** of the
|
|
53
|
+
message after the colon (or after the ticket-id if present).
|
|
54
|
+
"add x," not "Adds x" or "Added x" or "Add x.".
|
|
55
|
+
|
|
56
|
+
## Types
|
|
57
|
+
|
|
58
|
+
Fixed AngularJS / Conventional Commits set. No extension via
|
|
59
|
+
config; teams wanting other types edit a project-scope copy of
|
|
60
|
+
this skill.
|
|
61
|
+
|
|
62
|
+
| Type | Use for |
|
|
63
|
+
|---|---|
|
|
64
|
+
| `feat` | New feature or user-visible capability |
|
|
65
|
+
| `fix` | Bug fix |
|
|
66
|
+
| `docs` | Documentation only (README, comments, skill files) |
|
|
67
|
+
| `style` | Formatting, whitespace, no code semantics change |
|
|
68
|
+
| `refactor` | Code change that's neither feat nor fix |
|
|
69
|
+
| `perf` | Performance improvement |
|
|
70
|
+
| `test` | Adding or fixing tests |
|
|
71
|
+
| `chore` | Build glue, deps, tooling that's neither ci nor build |
|
|
72
|
+
| `build` | Build system, package config, dependency bumps |
|
|
73
|
+
| `ci` | CI config, workflows, automation |
|
|
74
|
+
| `revert` | Reverting a previous commit |
|
|
75
|
+
|
|
76
|
+
If you can't pick between two types, prefer the more specific
|
|
77
|
+
one. `feat` is overused; if the change is an internal cleanup,
|
|
78
|
+
it's `refactor`, not `feat`.
|
|
79
|
+
|
|
80
|
+
## Domain
|
|
81
|
+
|
|
82
|
+
In a cleepi-style monorepo, **domain = the affected package's
|
|
83
|
+
short name** (`crew`, `sdd`, `git`, `atlassian`, `coding`,
|
|
84
|
+
`base`, etc.). One package per commit. If a change spans two
|
|
85
|
+
packages, split into two commits.
|
|
86
|
+
|
|
87
|
+
Outside the `packages/` tree, domain is a free-form feature
|
|
88
|
+
area:
|
|
89
|
+
|
|
90
|
+
- `meta` — repo-level meta files (root README, root CHANGELOG,
|
|
91
|
+
AGENTS.md, CONSTITUTION.md)
|
|
92
|
+
- `docs` — repo-level docs/ and specs (when not tied to a
|
|
93
|
+
package)
|
|
94
|
+
- `ci` — repo-level CI config
|
|
95
|
+
- `infra` — infra-as-code, deployment glue
|
|
96
|
+
- `release` — release prep, version bumps, tags
|
|
97
|
+
|
|
98
|
+
Don't use sub-areas of a package as the domain (`crew-agents`
|
|
99
|
+
or `sdd-skill`). Use the package name (`crew`, `sdd`); the
|
|
100
|
+
commit message says what changed.
|
|
101
|
+
|
|
102
|
+
## Ticket-id
|
|
103
|
+
|
|
104
|
+
**Highly recommended. Not required.**
|
|
105
|
+
|
|
106
|
+
Format: `[A-Z]+-[0-9]+`. Cleepi ticket prefixes include
|
|
107
|
+
`AC-NNN` (Atlassian), `LIN-NNN` (Linear), `gh-NN` (GitHub
|
|
108
|
+
issue), `DRAFT-NNN` (pre-tracker work that's still spec'd).
|
|
109
|
+
|
|
110
|
+
When present, the ticket-id sits **directly after the colon**,
|
|
111
|
+
single space before the message:
|
|
112
|
+
|
|
113
|
+
```
|
|
114
|
+
feat(crew): AC-201 add reviewer pre-step
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
NOT `[AC-201]`, NOT `(AC-201)`, NOT `AC-201:`. Just the bare
|
|
118
|
+
token, then space, then message.
|
|
119
|
+
|
|
120
|
+
When omitted (small chores, typos, doc tweaks):
|
|
121
|
+
|
|
122
|
+
```
|
|
123
|
+
docs(crew): fix README install path
|
|
124
|
+
chore(meta): bump prettier
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
The skill won't fail a commit for missing ticket-id, but it
|
|
128
|
+
will gently flag the omission for `feat`/`fix`/`refactor`/`perf`
|
|
129
|
+
commits, since those are the ones that should anchor on a
|
|
130
|
+
spec'd ticket.
|
|
131
|
+
|
|
132
|
+
## Message style
|
|
133
|
+
|
|
134
|
+
- **Imperative, present tense.** "add X," "fix Y," "remove Z."
|
|
135
|
+
Not "added," "fixes," "removing."
|
|
136
|
+
- **Lowercase first letter** of the message (after the ticket-id
|
|
137
|
+
if present). Acronyms and proper nouns stay cased.
|
|
138
|
+
- **No trailing period.**
|
|
139
|
+
- **Concise but specific.** "fix bug" is useless. "fix off-by-one
|
|
140
|
+
in pagination" is a commit message.
|
|
141
|
+
- **Around 50–72 characters total** is the target. Hard cap 100.
|
|
142
|
+
- **No "and"** if you can avoid it. "feat(crew): add X and refactor
|
|
143
|
+
Y" → two commits.
|
|
144
|
+
|
|
145
|
+
## Anti-patterns (don't do these)
|
|
146
|
+
|
|
147
|
+
| ❌ Bad | ✓ Good | Why |
|
|
148
|
+
|---|---|---|
|
|
149
|
+
| `feat: add reviewer` | `feat(crew): AC-201 add reviewer pre-step` | Missing domain, ticket, specificity. |
|
|
150
|
+
| `Update README` | `docs(crew): fix install path in README` | No type, no domain, vague. |
|
|
151
|
+
| `feat(crew): Added reviewer.` | `feat(crew): AC-201 add reviewer pre-step` | Past tense + trailing period + missing ticket. |
|
|
152
|
+
| `feat(crew-agents): add reviewer` | `feat(crew): AC-201 add reviewer pre-step` | Domain is package, not sub-area. |
|
|
153
|
+
| `feat(crew): AC-201 add reviewer\n\nCo-authored-by: Claude` | `feat(crew): AC-201 add reviewer pre-step` | Subject-line only. NEVER Co-authored-by. |
|
|
154
|
+
| `feat(crew): ✨ add reviewer` | `feat(crew): add reviewer pre-step` | No emoji. |
|
|
155
|
+
| `feat(crew,sdd): cross-package change` | `feat(crew): ...` + `feat(sdd): ...` | Split into two commits. |
|
|
156
|
+
| `wip: stuff` | (don't commit yet, or `chore(<domain>): wip <specific>`) | "wip" as type isn't in the set. If you must, use `chore` and be specific. |
|
|
157
|
+
|
|
158
|
+
## Resolution chain for `/commit`
|
|
159
|
+
|
|
160
|
+
When invoked via the `/commit` slash command, the prompt resolves
|
|
161
|
+
context in this order (manual args always win):
|
|
162
|
+
|
|
163
|
+
1. **Type** — first arg to `/commit`. Required. Validated against
|
|
164
|
+
the type table above.
|
|
165
|
+
2. **Domain** — nearest `packages/<n>/` ancestor of cwd → package
|
|
166
|
+
short name. Outside packages, prompt asks (or accepts a
|
|
167
|
+
free-form arg).
|
|
168
|
+
3. **Ticket-id** — explicit token in args → ticket-id pattern in
|
|
169
|
+
any **staged file path** (e.g. `docs/AC-NNN-slug/...`) →
|
|
170
|
+
candidate surfaced from recently-modified `docs/<ticket>-slug/`
|
|
171
|
+
folders in the repo (asks for confirmation, never auto-picks)
|
|
172
|
+
→ git branch name (grep `[A-Z]+-[0-9]+`) → ask user.
|
|
173
|
+
|
|
174
|
+
This differs from `@cleepi/sdd`'s `/journal` chain because
|
|
175
|
+
`/commit` runs from inside *code*, not the ticket folder.
|
|
176
|
+
`/journal` walks up from cwd; `/commit` reads staged paths
|
|
177
|
+
and branch name instead.
|
|
178
|
+
4. **Message** — remaining args to `/commit`.
|
|
179
|
+
5. **Co-authored-by strip** — defence-in-depth: scan the
|
|
180
|
+
assembled message for any `Co-authored-by:` line and remove
|
|
181
|
+
it before passing to `git commit`. This rule overrides
|
|
182
|
+
everything else, including the user's explicit input.
|
|
183
|
+
|
|
184
|
+
**Resolution is non-skippable.** Even when the user says "just
|
|
185
|
+
commit" or auto-confirms, type/domain/ticket-id resolution
|
|
186
|
+
still runs. The user can skip the *confirmation* step; they
|
|
187
|
+
cannot skip resolution. A bare `feat: <msg>` commit is a
|
|
188
|
+
resolution failure, not a valid output.
|
|
189
|
+
|
|
190
|
+
## Voice and length
|
|
191
|
+
|
|
192
|
+
The skill mirrors the `@cleepi/sdd` discipline:
|
|
193
|
+
|
|
194
|
+
- **Concise.** Cleepi commits are one-liners. So is the message.
|
|
195
|
+
- **Specific.** "fix bug" is not a commit message; it's a
|
|
196
|
+
shrug. Name the thing.
|
|
197
|
+
- **No filler.** "Various improvements" → no. List the actual
|
|
198
|
+
changes in separate commits.
|
|
199
|
+
- **Imperative.** Read the message after "If applied, this
|
|
200
|
+
commit will…" — it should fit naturally.
|
|
201
|
+
|
|
202
|
+
If you cannot describe a change as one specific imperative line
|
|
203
|
+
under ~70 characters, the commit is too big. Split it.
|
|
204
|
+
|
|
205
|
+
## When the user disagrees
|
|
206
|
+
|
|
207
|
+
If the user wants a body, footer, or `Co-authored-by:`, push
|
|
208
|
+
back once with a one-liner referencing this skill. If they
|
|
209
|
+
insist, **don't comply silently** — instead, write the message
|
|
210
|
+
their way *and* add a one-line note in your reply that you
|
|
211
|
+
overrode the cleepi convention at their explicit request.
|
|
212
|
+
That way the next session sees the deviation logged.
|