smart-commit-copilot-cli 0.1.0 → 0.1.1
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 +19 -0
- package/README.md +144 -221
- package/docs/publish.md +23 -27
- package/docs/release-checklist.md +6 -4
- package/docs/releases/0.1.1-draft.md +55 -0
- package/docs/verification.md +48 -0
- package/package.json +11 -5
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,25 @@ The format is based on Keep a Changelog, and this project follows Semantic Versi
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [0.1.1] - 2026-04-14
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- repeatable `npm run smoke:test` command for real CLI command-path regression checks
|
|
14
|
+
- `docs/verification.md` to document the command-level verification flow
|
|
15
|
+
- AI report fallback coverage in the smoke regression path
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
|
|
19
|
+
- GitHub Actions CI now runs `npm run smoke:test` on Node 20 in addition to `npm test`
|
|
20
|
+
- release checklist now points to the repeatable verification flow instead of relying only on manual spot-checks
|
|
21
|
+
- publish guidance is now easier to reuse for follow-up releases after `0.1.0`
|
|
22
|
+
|
|
23
|
+
### Fixed
|
|
24
|
+
|
|
25
|
+
- command-level release verification now explicitly covers relative and absolute `--config` paths
|
|
26
|
+
- command-level release verification now explicitly checks that `--no-commit --no-push` leaves `HEAD` unchanged
|
|
27
|
+
|
|
9
28
|
## [0.1.0] - 2026-04-13
|
|
10
29
|
|
|
11
30
|
### Added
|
package/README.md
CHANGED
|
@@ -1,101 +1,131 @@
|
|
|
1
1
|
# smart-commit CLI
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
`smart-commit CLI` is a shell-first tool for automated commit review, commit-message generation, and report workflows.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Use it when you want the same workflow to run from a terminal, script, hook, or agent.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
It can:
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
- inspect staged changes
|
|
10
|
+
- generate or validate commit messages
|
|
11
|
+
- run AI-assisted review gating
|
|
12
|
+
- optionally commit and push
|
|
13
|
+
- persist pass history
|
|
14
|
+
- generate work reports
|
|
10
15
|
|
|
11
|
-
|
|
12
|
-
2. Generate or validate commit messages
|
|
13
|
-
3. Run AI-assisted review gating
|
|
14
|
-
4. Persist pass history and generate work reports
|
|
16
|
+
Install package:
|
|
15
17
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
- `bridge`
|
|
20
|
-
- `report generate`
|
|
21
|
-
- `schema print`
|
|
22
|
-
|
|
23
|
-
## Who It Is For
|
|
18
|
+
```bash
|
|
19
|
+
npm install -g smart-commit-copilot-cli
|
|
20
|
+
```
|
|
24
21
|
|
|
25
|
-
|
|
22
|
+
Run command:
|
|
26
23
|
|
|
27
|
-
|
|
28
|
-
-
|
|
29
|
-
|
|
30
|
-
- external agents
|
|
31
|
-
- CI or local automation
|
|
24
|
+
```bash
|
|
25
|
+
smart-commit --help
|
|
26
|
+
```
|
|
32
27
|
|
|
33
|
-
|
|
28
|
+
Or use `npx` directly:
|
|
34
29
|
|
|
35
|
-
|
|
30
|
+
```bash
|
|
31
|
+
npx smart-commit-copilot-cli --help
|
|
32
|
+
```
|
|
36
33
|
|
|
37
|
-
|
|
38
|
-
- the easiest way to try it is from a local checkout
|
|
39
|
-
- command examples below use `smart-commit`
|
|
34
|
+
## Quick Start
|
|
40
35
|
|
|
41
|
-
|
|
36
|
+
### 1. Prepare your API key
|
|
42
37
|
|
|
43
38
|
```bash
|
|
44
|
-
|
|
39
|
+
export SMART_COMMIT_API_KEY="your-api-key"
|
|
45
40
|
```
|
|
46
41
|
|
|
47
|
-
|
|
42
|
+
### 2. Create a config file
|
|
48
43
|
|
|
49
|
-
|
|
44
|
+
Create `smart-commit.json` in your repository:
|
|
50
45
|
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
|
|
46
|
+
```json
|
|
47
|
+
{
|
|
48
|
+
"smartCommitCli": {
|
|
49
|
+
"connection": {
|
|
50
|
+
"baseUrl": "https://api.openai.com/v1",
|
|
51
|
+
"apiKey": "env:SMART_COMMIT_API_KEY",
|
|
52
|
+
"model": "gpt-5"
|
|
53
|
+
},
|
|
54
|
+
"review": {
|
|
55
|
+
"threshold": 6,
|
|
56
|
+
"language": "zh"
|
|
57
|
+
},
|
|
58
|
+
"commitMessage": {
|
|
59
|
+
"language": "zh",
|
|
60
|
+
"autoGenerate": true,
|
|
61
|
+
"hybridGenerate": false,
|
|
62
|
+
"validation": {
|
|
63
|
+
"protocol": "none",
|
|
64
|
+
"pattern": "",
|
|
65
|
+
"extractTicketIdFromBranch": true,
|
|
66
|
+
"requireTicketIdInMessage": false
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"git": {
|
|
70
|
+
"autoStageWhenNothingStaged": true,
|
|
71
|
+
"autoCommit": false,
|
|
72
|
+
"autoPush": false
|
|
73
|
+
},
|
|
74
|
+
"passHistory": {
|
|
75
|
+
"enabled": true,
|
|
76
|
+
"dirPath": ".smart-commit-cli",
|
|
77
|
+
"maxEntries": 5000
|
|
78
|
+
},
|
|
79
|
+
"reporting": {
|
|
80
|
+
"language": "zh",
|
|
81
|
+
"weekStartsOn": "monday",
|
|
82
|
+
"outputDirPath": ".smart-commit-cli/reports",
|
|
83
|
+
"prompt": "",
|
|
84
|
+
"ai": {
|
|
85
|
+
"enabled": false
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"output": {
|
|
89
|
+
"format": "json",
|
|
90
|
+
"logLevel": "info"
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
54
94
|
```
|
|
55
95
|
|
|
56
|
-
|
|
96
|
+
### 3. Validate the config
|
|
57
97
|
|
|
58
98
|
```bash
|
|
59
|
-
|
|
99
|
+
smart-commit config resolve --config ./smart-commit.json
|
|
60
100
|
```
|
|
61
101
|
|
|
62
|
-
|
|
102
|
+
This is the recommended first command because it shows:
|
|
63
103
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
104
|
+
- merged config after CLI args, env vars, file config, and defaults
|
|
105
|
+
- secret redaction
|
|
106
|
+
- validation errors before real execution
|
|
67
107
|
|
|
68
|
-
|
|
108
|
+
For human-readable output:
|
|
69
109
|
|
|
70
110
|
```bash
|
|
71
|
-
|
|
111
|
+
smart-commit config resolve --config ./smart-commit.json --output text
|
|
72
112
|
```
|
|
73
113
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
- `smartCommitCli`
|
|
77
|
-
- `apiKey: "env:SMART_COMMIT_API_KEY"`
|
|
78
|
-
- JSON output by default
|
|
114
|
+
### 4. Run a safe preflight
|
|
79
115
|
|
|
80
|
-
|
|
116
|
+
Stage some changes first:
|
|
81
117
|
|
|
82
118
|
```bash
|
|
83
|
-
|
|
119
|
+
git add -A
|
|
84
120
|
```
|
|
85
121
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
- final merged config after CLI args, env vars, file config, and defaults
|
|
89
|
-
- secret redaction in output
|
|
90
|
-
- early validation before real automation wiring
|
|
91
|
-
|
|
92
|
-
### 5. Run a safe preflight on your repo
|
|
122
|
+
Then run:
|
|
93
123
|
|
|
94
124
|
```bash
|
|
95
125
|
smart-commit bridge --repo . --config ./smart-commit.json --dry-run
|
|
96
126
|
```
|
|
97
127
|
|
|
98
|
-
This
|
|
128
|
+
This checks:
|
|
99
129
|
|
|
100
130
|
- repository path is valid
|
|
101
131
|
- current directory is inside Git
|
|
@@ -103,90 +133,63 @@ This is the recommended first real command. It checks:
|
|
|
103
133
|
- commit message can be resolved
|
|
104
134
|
- bridge input is ready for execution
|
|
105
135
|
|
|
106
|
-
###
|
|
136
|
+
### 5. Run review-only mode
|
|
137
|
+
|
|
138
|
+
This is the safest way to start using the tool in a real workflow:
|
|
107
139
|
|
|
108
140
|
```bash
|
|
109
141
|
smart-commit bridge --repo . --config ./smart-commit.json --no-commit --no-push
|
|
110
142
|
```
|
|
111
143
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
- review runs
|
|
115
|
-
- commit message logic runs
|
|
116
|
-
- no Git side effects happen
|
|
144
|
+
It will:
|
|
117
145
|
|
|
118
|
-
|
|
146
|
+
- run review
|
|
147
|
+
- run commit-message logic
|
|
148
|
+
- return structured output
|
|
149
|
+
- avoid Git side effects
|
|
119
150
|
|
|
120
|
-
If you only want the shortest
|
|
151
|
+
If you only want the shortest path:
|
|
121
152
|
|
|
122
|
-
1. `smart-commit
|
|
123
|
-
2.
|
|
124
|
-
3. `smart-commit
|
|
125
|
-
4.
|
|
126
|
-
5.
|
|
127
|
-
6.
|
|
153
|
+
1. install `smart-commit-copilot-cli`
|
|
154
|
+
2. export `SMART_COMMIT_API_KEY`
|
|
155
|
+
3. create `smart-commit.json`
|
|
156
|
+
4. run `smart-commit config resolve`
|
|
157
|
+
5. run `smart-commit bridge --dry-run`
|
|
158
|
+
6. run `smart-commit bridge --no-commit --no-push`
|
|
128
159
|
|
|
129
160
|
## Core Commands
|
|
130
161
|
|
|
131
|
-
###
|
|
132
|
-
|
|
133
|
-
Use this to inspect the final config after all sources are merged.
|
|
162
|
+
### Resolve config
|
|
134
163
|
|
|
135
164
|
```bash
|
|
136
165
|
smart-commit config resolve --config ./smart-commit.json
|
|
137
166
|
```
|
|
138
167
|
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
- you are debugging precedence issues
|
|
142
|
-
- you want to verify `env:VAR_NAME` resolution
|
|
143
|
-
- you want to confirm defaults before automation rollout
|
|
144
|
-
|
|
145
|
-
### `bridge`
|
|
146
|
-
|
|
147
|
-
This is the main automation entrypoint.
|
|
148
|
-
|
|
149
|
-
```bash
|
|
150
|
-
smart-commit bridge --repo . --config ./smart-commit.json
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
Typical modes:
|
|
154
|
-
|
|
155
|
-
- preflight only:
|
|
168
|
+
### Bridge preflight
|
|
156
169
|
|
|
157
170
|
```bash
|
|
158
171
|
smart-commit bridge --repo . --config ./smart-commit.json --dry-run
|
|
159
172
|
```
|
|
160
173
|
|
|
161
|
-
-
|
|
174
|
+
### Review-only bridge
|
|
162
175
|
|
|
163
176
|
```bash
|
|
164
177
|
smart-commit bridge --repo . --config ./smart-commit.json --no-commit --no-push
|
|
165
178
|
```
|
|
166
179
|
|
|
167
|
-
|
|
180
|
+
### Full bridge execution
|
|
168
181
|
|
|
169
182
|
```bash
|
|
170
183
|
smart-commit bridge --repo . --config ./smart-commit.json
|
|
171
184
|
```
|
|
172
185
|
|
|
173
|
-
###
|
|
174
|
-
|
|
175
|
-
Generate a Markdown report from pass history.
|
|
186
|
+
### Generate a report
|
|
176
187
|
|
|
177
188
|
```bash
|
|
178
189
|
smart-commit report generate --repo . --config ./smart-commit.json --period weekly
|
|
179
190
|
```
|
|
180
191
|
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
- you want a local work report
|
|
184
|
-
- you want scheduled summaries
|
|
185
|
-
- you want agent-readable reporting output
|
|
186
|
-
|
|
187
|
-
### `schema print`
|
|
188
|
-
|
|
189
|
-
Print machine-facing JSON Schema for integration contracts.
|
|
192
|
+
### Print machine-readable schema
|
|
190
193
|
|
|
191
194
|
```bash
|
|
192
195
|
smart-commit schema print --target bridge
|
|
@@ -194,29 +197,24 @@ smart-commit schema print --target bridge
|
|
|
194
197
|
|
|
195
198
|
## Output Modes
|
|
196
199
|
|
|
197
|
-
Default machine-facing
|
|
200
|
+
Default mode is machine-facing JSON:
|
|
198
201
|
|
|
199
202
|
```bash
|
|
200
203
|
smart-commit bridge --repo . --config ./smart-commit.json
|
|
201
204
|
```
|
|
202
205
|
|
|
203
|
-
|
|
206
|
+
For a terminal-friendly summary:
|
|
204
207
|
|
|
205
208
|
```bash
|
|
206
209
|
smart-commit bridge --repo . --config ./smart-commit.json --output text
|
|
207
210
|
```
|
|
208
211
|
|
|
209
|
-
|
|
212
|
+
Recommended usage:
|
|
210
213
|
|
|
211
|
-
-
|
|
212
|
-
-
|
|
214
|
+
- use JSON for hooks, agents, and automation
|
|
215
|
+
- use text for manual debugging
|
|
213
216
|
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
- debugging manually
|
|
217
|
-
- checking behavior in a terminal
|
|
218
|
-
|
|
219
|
-
## How Configuration Works
|
|
217
|
+
## Configuration Rules
|
|
220
218
|
|
|
221
219
|
Config precedence from high to low:
|
|
222
220
|
|
|
@@ -228,99 +226,52 @@ Config precedence from high to low:
|
|
|
228
226
|
|
|
229
227
|
Special rule:
|
|
230
228
|
|
|
231
|
-
-
|
|
232
|
-
|
|
233
|
-
Recommended format:
|
|
234
|
-
|
|
235
|
-
```json
|
|
236
|
-
{
|
|
237
|
-
"smartCommitCli": {
|
|
238
|
-
"connection": {
|
|
239
|
-
"baseUrl": "https://api.openai.com/v1",
|
|
240
|
-
"apiKey": "env:SMART_COMMIT_API_KEY",
|
|
241
|
-
"model": "gpt-5"
|
|
242
|
-
},
|
|
243
|
-
"review": {
|
|
244
|
-
"threshold": 6,
|
|
245
|
-
"language": "zh"
|
|
246
|
-
},
|
|
247
|
-
"git": {
|
|
248
|
-
"autoCommit": true,
|
|
249
|
-
"autoPush": true
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
```
|
|
254
|
-
|
|
255
|
-
The CLI still supports legacy `smartCommit.*` keys for migration, but `smartCommitCli` is the long-term recommended format.
|
|
256
|
-
|
|
257
|
-
## Common Rollout Patterns
|
|
258
|
-
|
|
259
|
-
### Local Manual Testing
|
|
260
|
-
|
|
261
|
-
Use:
|
|
262
|
-
|
|
263
|
-
```bash
|
|
264
|
-
smart-commit bridge --repo . --config ./smart-commit.json --dry-run --output text
|
|
265
|
-
```
|
|
266
|
-
|
|
267
|
-
### Husky Pre-Commit
|
|
268
|
-
|
|
269
|
-
Use review-only mode:
|
|
270
|
-
|
|
271
|
-
```bash
|
|
272
|
-
smart-commit bridge --repo . --config ./smart-commit.json --no-commit --no-push
|
|
273
|
-
```
|
|
274
|
-
|
|
275
|
-
Reference files:
|
|
276
|
-
|
|
277
|
-
- [`examples/hooks/smart-commit-bridge.sh`](./examples/hooks/smart-commit-bridge.sh)
|
|
278
|
-
- [`examples/hooks/husky-pre-commit.sh`](./examples/hooks/husky-pre-commit.sh)
|
|
279
|
-
|
|
280
|
-
### Cursor Hook
|
|
281
|
-
|
|
282
|
-
Use the same review-only bridge command behind a shell wrapper.
|
|
229
|
+
- values like `env:SMART_COMMIT_API_KEY` are resolved from the current process environment after merge and before validation
|
|
283
230
|
|
|
284
|
-
|
|
231
|
+
Canonical format:
|
|
285
232
|
|
|
286
|
-
-
|
|
233
|
+
- `smartCommitCli` is the recommended long-term format
|
|
234
|
+
- legacy `smartCommit.*` is supported for migration
|
|
287
235
|
|
|
288
|
-
|
|
236
|
+
## Automation-Friendly Capabilities
|
|
289
237
|
|
|
290
|
-
|
|
238
|
+
This package is designed to work well in shell-driven automation scenarios.
|
|
291
239
|
|
|
292
|
-
|
|
293
|
-
- `status`
|
|
294
|
-
- `error.code`
|
|
240
|
+
Typical examples include:
|
|
295
241
|
|
|
296
|
-
|
|
242
|
+
- Git hook style workflows
|
|
243
|
+
- editor or IDE hook workflows
|
|
244
|
+
- external agent workflows
|
|
245
|
+
- local automation scripts
|
|
246
|
+
- CI or scheduled reporting flows
|
|
297
247
|
|
|
298
|
-
|
|
299
|
-
- [`examples/agent/report-agent.mjs`](./examples/agent/report-agent.mjs)
|
|
248
|
+
For machine integrations, the recommended pattern is:
|
|
300
249
|
|
|
301
|
-
|
|
250
|
+
- call `smart-commit bridge` or `smart-commit report generate`
|
|
251
|
+
- consume stdout as JSON
|
|
252
|
+
- branch on `schemaVersion`, `status`, and `error.code`
|
|
302
253
|
|
|
303
|
-
|
|
254
|
+
## Reporting
|
|
304
255
|
|
|
305
|
-
|
|
256
|
+
If `passHistory.enabled=true`, successful runs are written to local history and can be summarized later:
|
|
306
257
|
|
|
307
258
|
```bash
|
|
308
259
|
smart-commit report generate --repo . --config ./smart-commit.json --period weekly
|
|
309
260
|
```
|
|
310
261
|
|
|
311
|
-
AI-enhanced reporting
|
|
262
|
+
Optional AI-enhanced reporting:
|
|
312
263
|
|
|
313
264
|
```bash
|
|
314
265
|
smart-commit report generate --repo . --config ./smart-commit.json --period weekly --report-ai
|
|
315
266
|
```
|
|
316
267
|
|
|
317
|
-
If AI generation fails, the CLI falls back to local Markdown
|
|
268
|
+
If AI generation fails, the CLI falls back to local Markdown automatically.
|
|
318
269
|
|
|
319
270
|
## Troubleshooting
|
|
320
271
|
|
|
321
272
|
### `connection.apiKey references missing environment variable`
|
|
322
273
|
|
|
323
|
-
Your config contains
|
|
274
|
+
Your config contains:
|
|
324
275
|
|
|
325
276
|
```json
|
|
326
277
|
"apiKey": "env:SMART_COMMIT_API_KEY"
|
|
@@ -336,7 +287,7 @@ export SMART_COMMIT_API_KEY="your-api-key"
|
|
|
336
287
|
|
|
337
288
|
### `--repo is required`
|
|
338
289
|
|
|
339
|
-
`bridge` and `report generate`
|
|
290
|
+
`bridge` and `report generate` require a repository path or a path inside a Git repository.
|
|
340
291
|
|
|
341
292
|
### No staged diff found
|
|
342
293
|
|
|
@@ -353,40 +304,12 @@ git add -A
|
|
|
353
304
|
smart-commit bridge --repo . --config ./smart-commit.json --dry-run
|
|
354
305
|
```
|
|
355
306
|
|
|
356
|
-
##
|
|
357
|
-
|
|
358
|
-
Start here first:
|
|
359
|
-
|
|
360
|
-
- [`docs/getting-started.md`](./docs/getting-started.md)
|
|
361
|
-
|
|
362
|
-
Then use these based on task:
|
|
363
|
-
|
|
364
|
-
- [`docs/configuration.md`](./docs/configuration.md)
|
|
365
|
-
- [`docs/integrations.md`](./docs/integrations.md)
|
|
366
|
-
- [`docs/contracts.md`](./docs/contracts.md)
|
|
367
|
-
- [`examples/config/smart-commit.json`](./examples/config/smart-commit.json)
|
|
368
|
-
|
|
369
|
-
Release and maintenance docs:
|
|
370
|
-
|
|
371
|
-
- [`docs/release-checklist.md`](./docs/release-checklist.md)
|
|
372
|
-
- [`docs/publish.md`](./docs/publish.md)
|
|
373
|
-
- [`docs/releases/0.1.0-draft.md`](./docs/releases/0.1.0-draft.md)
|
|
374
|
-
- [`docs/roadmap.md`](./docs/roadmap.md)
|
|
375
|
-
|
|
376
|
-
## Development
|
|
377
|
-
|
|
378
|
-
Build:
|
|
379
|
-
|
|
380
|
-
```bash
|
|
381
|
-
npm run build
|
|
382
|
-
```
|
|
383
|
-
|
|
384
|
-
Test:
|
|
385
|
-
|
|
386
|
-
```bash
|
|
387
|
-
npm test
|
|
388
|
-
```
|
|
389
|
-
|
|
390
|
-
CI:
|
|
307
|
+
## Recommended First Rollout
|
|
391
308
|
|
|
392
|
-
-
|
|
309
|
+
1. create `smart-commit.json`
|
|
310
|
+
2. run `smart-commit config resolve`
|
|
311
|
+
3. run `smart-commit bridge --dry-run`
|
|
312
|
+
4. run `smart-commit bridge --no-commit --no-push`
|
|
313
|
+
5. embed the same command into your automation flow
|
|
314
|
+
6. enable pass history
|
|
315
|
+
7. add reporting
|
package/docs/publish.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Publish Guide
|
|
2
2
|
|
|
3
|
-
This guide covers the practical steps for
|
|
3
|
+
This guide covers the practical steps for publishing the next npm release of this package.
|
|
4
4
|
|
|
5
5
|
## Current Assumption
|
|
6
6
|
|
|
@@ -26,10 +26,12 @@ Current package name:
|
|
|
26
26
|
|
|
27
27
|
For the current repository state, the safest order is:
|
|
28
28
|
|
|
29
|
-
1.
|
|
30
|
-
2.
|
|
29
|
+
1. update the package version and changelog
|
|
30
|
+
2. run the release verification commands
|
|
31
|
+
3. create and push a Git tag for the target version
|
|
32
|
+
4. create a GitHub Release using the matching release draft text
|
|
31
33
|
3. log in to npm
|
|
32
|
-
4. publish `smart-commit-copilot-cli
|
|
34
|
+
4. publish the matching `smart-commit-copilot-cli` version
|
|
33
35
|
|
|
34
36
|
This gives you:
|
|
35
37
|
|
|
@@ -65,20 +67,30 @@ npm run pack:dry-run
|
|
|
65
67
|
|
|
66
68
|
This shows the exact files that would be included in the published tarball, based on the `files` field in [`package.json`](../package.json).
|
|
67
69
|
|
|
70
|
+
## Release Verification Commands
|
|
71
|
+
|
|
72
|
+
Run:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
npm test
|
|
76
|
+
npm run smoke:test
|
|
77
|
+
npm run pack:dry-run
|
|
78
|
+
```
|
|
79
|
+
|
|
68
80
|
## Exact GitHub Release Steps
|
|
69
81
|
|
|
70
82
|
Create and push the release tag:
|
|
71
83
|
|
|
72
84
|
```bash
|
|
73
|
-
git tag
|
|
74
|
-
git push smart-commit-cli
|
|
85
|
+
git tag vX.Y.Z
|
|
86
|
+
git push smart-commit-cli vX.Y.Z
|
|
75
87
|
```
|
|
76
88
|
|
|
77
89
|
Then create a GitHub Release:
|
|
78
90
|
|
|
79
|
-
- tag: `
|
|
80
|
-
- title: `
|
|
81
|
-
- description: use the content from [`docs/releases
|
|
91
|
+
- tag: `vX.Y.Z`
|
|
92
|
+
- title: `vX.Y.Z`
|
|
93
|
+
- description: use the content from the matching draft in [`docs/releases`](./releases)
|
|
82
94
|
|
|
83
95
|
## Exact npm Publish Steps
|
|
84
96
|
|
|
@@ -102,7 +114,7 @@ npm publish --access public
|
|
|
102
114
|
|
|
103
115
|
Package that will be published:
|
|
104
116
|
|
|
105
|
-
- `smart-commit-copilot-cli@
|
|
117
|
+
- `smart-commit-copilot-cli@X.Y.Z`
|
|
106
118
|
|
|
107
119
|
## Suggested Final Verification After Publish
|
|
108
120
|
|
|
@@ -115,21 +127,5 @@ npm view smart-commit-copilot-cli version
|
|
|
115
127
|
Then test a fresh install path:
|
|
116
128
|
|
|
117
129
|
```bash
|
|
118
|
-
npx smart-commit-copilot-cli --help
|
|
130
|
+
npx smart-commit-copilot-cli@X.Y.Z --help
|
|
119
131
|
```
|
|
120
|
-
|
|
121
|
-
## Suggested First Release Shape
|
|
122
|
-
|
|
123
|
-
Recommended first public scope:
|
|
124
|
-
|
|
125
|
-
- `config resolve`
|
|
126
|
-
- `bridge`
|
|
127
|
-
- `report generate`
|
|
128
|
-
- `schema print`
|
|
129
|
-
- example configs and integration templates
|
|
130
|
-
|
|
131
|
-
Recommended non-goals for the first release:
|
|
132
|
-
|
|
133
|
-
- broad plugin ecosystem promises
|
|
134
|
-
- advanced multi-repository orchestration
|
|
135
|
-
- unstable breaking changes to machine-facing JSON contracts
|
|
@@ -13,16 +13,18 @@ Use this checklist before the first public release and for later release candida
|
|
|
13
13
|
## Build
|
|
14
14
|
|
|
15
15
|
- Run `npm test`
|
|
16
|
+
- Run `npm run smoke:test`
|
|
16
17
|
- Run `smart-commit schema print --target bridge` and spot-check the output
|
|
17
18
|
- Run `smart-commit config resolve` against the example config
|
|
18
19
|
- Confirm GitHub Actions CI passes on the target branch
|
|
19
20
|
|
|
20
21
|
## Runtime
|
|
21
22
|
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
23
|
+
- Confirm `docs/verification.md` still matches the actual command coverage
|
|
24
|
+
- If a manual spot-check is still needed, dry-run `bridge` in a temporary Git repository
|
|
25
|
+
- If a manual spot-check is still needed, run `bridge` with mock review and commit-message providers
|
|
26
|
+
- If a manual spot-check is still needed, run `report generate` from a repository with pass-history records
|
|
27
|
+
- If a manual spot-check is still needed, run `report generate --report-ai` with a mock provider and confirm fallback behavior still works
|
|
26
28
|
|
|
27
29
|
## Package
|
|
28
30
|
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# `smart-commit-copilot-cli` 0.1.1 Draft Release Notes
|
|
2
|
+
|
|
3
|
+
## Summary
|
|
4
|
+
|
|
5
|
+
`smart-commit-copilot-cli` 0.1.1 is a stability and release-quality update for the standalone CLI.
|
|
6
|
+
|
|
7
|
+
This release focuses on making the core command paths easier to verify before publish and safer to evolve during later iterations.
|
|
8
|
+
|
|
9
|
+
## Highlights
|
|
10
|
+
|
|
11
|
+
- repeatable `npm run smoke:test` regression command
|
|
12
|
+
- command-level verification coverage for the main onboarding commands
|
|
13
|
+
- AI report fallback now covered in the smoke regression flow
|
|
14
|
+
- CI now runs both unit tests and smoke verification
|
|
15
|
+
- clearer verification and release-check guidance for follow-up versions
|
|
16
|
+
|
|
17
|
+
## Why This Release Matters
|
|
18
|
+
|
|
19
|
+
This version improves confidence in the CLI as it continues to evolve:
|
|
20
|
+
|
|
21
|
+
- command explanations can now be backed by a repeatable regression path
|
|
22
|
+
- release validation no longer depends only on manual spot-checks
|
|
23
|
+
- the most important user-facing commands have a stronger end-to-end safety net
|
|
24
|
+
|
|
25
|
+
## Included Verification Coverage
|
|
26
|
+
|
|
27
|
+
The smoke regression flow now covers:
|
|
28
|
+
|
|
29
|
+
1. `smart-commit config resolve --config ./smart-commit.json --output text`
|
|
30
|
+
2. `smart-commit config resolve --config /absolute/path/to/smart-commit.json`
|
|
31
|
+
3. `smart-commit bridge --repo . --config ./smart-commit.json --dry-run`
|
|
32
|
+
4. `smart-commit bridge --repo . --config ./smart-commit.json --no-commit --no-push`
|
|
33
|
+
5. `smart-commit report generate --repo . --config ./smart-commit.json --period weekly`
|
|
34
|
+
6. `smart-commit report generate --repo . --config ./smart-commit.json --period weekly --report-ai`
|
|
35
|
+
7. `smart-commit report generate --repo . --config ./smart-commit.json --period weekly --report-ai` with AI fallback
|
|
36
|
+
8. `smart-commit bridge --repo . --config ./smart-commit.json`
|
|
37
|
+
|
|
38
|
+
## Stability Notes
|
|
39
|
+
|
|
40
|
+
- `smartCommitCli` remains the canonical config format
|
|
41
|
+
- legacy `smartCommit.*` remains a compatibility input layer
|
|
42
|
+
- command-level regression coverage is stronger, but no breaking contract change is introduced in this release
|
|
43
|
+
|
|
44
|
+
## Suggested Upgrade Path
|
|
45
|
+
|
|
46
|
+
1. update to `0.1.1`
|
|
47
|
+
2. run `npm test`
|
|
48
|
+
3. run `npm run smoke:test`
|
|
49
|
+
4. publish only after both checks pass
|
|
50
|
+
|
|
51
|
+
## Known Follow-Up Areas
|
|
52
|
+
|
|
53
|
+
- upstream/push-path smoke coverage if remote validation needs to be exercised regularly
|
|
54
|
+
- broader release automation once the versioning flow is stable
|
|
55
|
+
- continued refinement of user onboarding and reporting depth
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Verification
|
|
2
|
+
|
|
3
|
+
Use this document when you want a fast regression check for the core CLI commands.
|
|
4
|
+
|
|
5
|
+
## Command
|
|
6
|
+
|
|
7
|
+
Run:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm run smoke:test
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
This command:
|
|
14
|
+
|
|
15
|
+
- builds the CLI
|
|
16
|
+
- creates temporary Git repositories
|
|
17
|
+
- uses mock providers instead of real external AI calls
|
|
18
|
+
- verifies the core command paths discussed during onboarding
|
|
19
|
+
|
|
20
|
+
## Covered Commands
|
|
21
|
+
|
|
22
|
+
The smoke test checks these command shapes:
|
|
23
|
+
|
|
24
|
+
- `smart-commit config resolve --config ./smart-commit.json --output text`
|
|
25
|
+
- `smart-commit config resolve --config /absolute/path/to/smart-commit.json`
|
|
26
|
+
- `smart-commit bridge --repo . --config ./smart-commit.json --dry-run`
|
|
27
|
+
- `smart-commit bridge --repo . --config ./smart-commit.json --no-commit --no-push`
|
|
28
|
+
- `smart-commit report generate --repo . --config ./smart-commit.json --period weekly`
|
|
29
|
+
- `smart-commit report generate --repo . --config ./smart-commit.json --period weekly --report-ai`
|
|
30
|
+
- `smart-commit report generate --repo . --config ./smart-commit.json --period weekly --report-ai` with AI failure fallback
|
|
31
|
+
- `smart-commit bridge --repo . --config ./smart-commit.json`
|
|
32
|
+
|
|
33
|
+
## What It Verifies
|
|
34
|
+
|
|
35
|
+
- relative and absolute `--config` paths both work
|
|
36
|
+
- `config resolve` returns the expected merged config shape
|
|
37
|
+
- `bridge --dry-run` completes preflight without creating a commit
|
|
38
|
+
- `bridge --no-commit --no-push` runs review without changing `HEAD`
|
|
39
|
+
- `report generate` writes a local Markdown report from pass history
|
|
40
|
+
- `report generate --report-ai` uses the AI report path when enabled
|
|
41
|
+
- `report generate --report-ai` falls back to local Markdown if AI generation fails
|
|
42
|
+
- default `bridge` creates a local commit when `autoCommit=true` and `autoPush=false`
|
|
43
|
+
|
|
44
|
+
## Notes
|
|
45
|
+
|
|
46
|
+
- The smoke test does not push to a remote
|
|
47
|
+
- The smoke test does not require a real API key value
|
|
48
|
+
- Temporary repositories are created under the system temp directory
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "smart-commit-copilot-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"private": false,
|
|
5
|
-
"description": "
|
|
5
|
+
"description": "CLI for AI-assisted commit review, commit message generation, Git workflow automation, and work reports.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"type": "commonjs",
|
|
8
8
|
"engines": {
|
|
@@ -19,9 +19,14 @@
|
|
|
19
19
|
"smart-commit",
|
|
20
20
|
"cli",
|
|
21
21
|
"git",
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
22
|
+
"commit",
|
|
23
|
+
"commit-message",
|
|
24
|
+
"code-review",
|
|
25
|
+
"ai",
|
|
26
|
+
"copilot",
|
|
27
|
+
"git-hooks",
|
|
28
|
+
"hook",
|
|
29
|
+
"reporting",
|
|
25
30
|
"automation",
|
|
26
31
|
"agent"
|
|
27
32
|
],
|
|
@@ -33,6 +38,7 @@
|
|
|
33
38
|
"build": "npm run clean && tsc -p ./tsconfig.build.json",
|
|
34
39
|
"test": "npm run clean && tsc -p ./tsconfig.json && node --test --test-reporter=spec out/test/*.test.js",
|
|
35
40
|
"check": "npm test",
|
|
41
|
+
"smoke:test": "npm run build && node ./scripts/smoke-test.mjs",
|
|
36
42
|
"pack:dry-run": "npm pack --dry-run",
|
|
37
43
|
"prepack": "npm run build",
|
|
38
44
|
"prepublishOnly": "npm test"
|