# `smart-commit-host-agent` 0.1.4 Release Notes

## Summary

`smart-commit-host-agent` 0.1.4 adds Conventional / Semantic commit-message scope control, aligned with `smart-commit-cli` 0.1.22.

This release lets operators require or strip `(scope)` in typed commit subjects. Host-agent still uses a single commit-message turn: `required` fails immediately, and `forbidden` strips scope without a second turn.

## Highlights

- new `commitMessage.scope` setting: `auto` (default), `required`, or `forbidden`
- generation prompt overlay, hybrid draft prefix rules, and final validation
- `required` demands `type(scope):` on typed subjects; missing scope fails validation immediately (no correction retry)
- `forbidden` strips typed `(scope)` (`feat(auth):` → `feat:`; `feat(api)!:` → `feat!:`) without an extra Host-Agent turn
- Gitmoji and untyped subjects are left unchanged
- README and configuration docs cover `commitMessage.scope`
- `peerReference.cliVersion` is `0.1.22`

## Why This Release Matters

Teams that enforce Conventional or Semantic subjects often need a hard rule for `(scope)`: always present, or never present.

With 0.1.4, commit-message generation and validation honor that policy in the same JSON config used for review and PR/MR flows. Host-agent does not add CLI flag or environment overlays for this setting; configure it in the config file.

## Notable Behavior Updates

### `commitMessage.scope`

Applies to Conventional / Semantic typed subjects (`type:` / `type!:`). Gitmoji and untyped subjects are left unchanged.

| Value | Behavior |
| --- | --- |
| `auto` (default) | keep whatever scope the model or draft produced |
| `required` | typed subjects must include `(scope)`; missing scope fails validation immediately |
| `forbidden` | typed `(scope)` is stripped without a second turn |

The setting overrides any conflicting scope preference in the selected commit-message skill. Hybrid drafts follow the same prefix rules: `required` may add a missing draft scope and must keep an existing one; `forbidden` strips a draft scope.

Example:

```json
{
  "smartCommitHostAgent": {
    "commitMessage": {
      "validation": {
        "protocol": "conventional"
      },
      "scope": "required"
    }
  }
}
```

## Available Commands

See [`docs/releases/0.1.0-draft.md`](./0.1.0-draft.md) for the command list. In 0.1.4:

- `commit-message generate` / `bridge` honor `commitMessage.scope` in addition to `structure`, `skill`, `hybridGenerate`, and `validation.protocol`

## Stability Notes

- no LLM HTTP transport; exit `10` means pause for Host-Agent turn response
- no chunked / hybrid review and no correction / PR content repair turns
- `required` does not open a second commit-message turn; invalid output fails the command
- additive command surface growth remains preferred during `0.1.x`

## Suggested Upgrade Path

1. install or bump to `smart-commit-host-agent@0.1.4`
2. if Conventional / Semantic subjects must always or never include `(scope)`, set `commitMessage.scope` to `required` or `forbidden`
3. dry-run `smart-commit-host-agent commit-message generate --config ./smart-commit.host-agent.json --output json` and confirm the subject matches the chosen scope policy
4. skill loops stay the same: `needs_host_agent` → write response → `--session` resume. `scope` does not add a second commit-message turn

## Verification

Before publish:

1. run `npm test`
2. run `npm run pack:dry-run`
3. review [`CHANGELOG.md`](../../CHANGELOG.md)
4. review this note against the intended release scope
5. confirm `node out/cli.js --version` prints `0.1.4`

## Known Follow-Up Areas

- no chunked / hybrid review; no correction repair turns
- optional smoke-test script for common skill loops
- keep `package.json` free of private Git remote URLs (npm consumers use the published package / jsDelivr docs)
