Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# AGENTS.md — commit-analyzer

> Clearcover's fork of `@semantic-release/commit-analyzer`: a semantic-release plugin that parses git commits using conventional-changelog conventions and returns the appropriate release type (major / minor / patch / null).

## Quick start

```bash
# Install
npm install

# Test — must pass before every PR (runs lint first via pretest, then ava with coverage)
npm test

# Lint only
npm run lint
```

## Domain position

**Layer:** Shared Services — developer tooling / CI-CD infrastructure
**Domain:** Analytics Domain (closest fit; this is a cross-cutting build tool, not a runtime service)

**This service owns:**
- Release-type determination logic for Clearcover's semantic-release pipelines

**Observed callers:** consumed as a semantic-release plugin in other Clearcover repos' CI configs
**Observed dependencies:** `conventional-commits-parser`, `conventional-commits-filter`, `conventional-changelog-angular`, `debug`, `import-from`, `lodash`

> Absence means not observed in this scan, not that the integration doesn't exist.

## Tech stack

- **Language/runtime:** Node.js >=8.3
- **Test:** ava (via `nyc ava -v`; coverage collected by nyc)
- **Lint:** xo (with prettier, printWidth 120)

## Project structure

```
index.js — plugin entry point; exports analyzeCommits()
lib/
analyze-commit.js — matches a single commit against release rules
compare-release-types.js — orders major > minor > patch
default-release-rules.js — built-in rule set
default-release-types.js — ordered list of release type strings
load-parser-config.js — resolves conventional-changelog preset/config
load-release-rules.js — loads and validates custom release rules from plugin config
test/ — ava test files + fixtures
```

## Boundaries

**Always:** run `npm test` before pushing · respect domain boundaries above · no secrets in commits
**Ask first:** changes to default release rules (affects all consuming repos) · new external deps · peer dependency version bumps
**Never:** push to master · skip failing tests · modify release type ordering without understanding downstream impact

> ⚠️ Auto-generated by AI agent and audited against actual repo files at generation time. Review and update when this repo next changes.
1 change: 1 addition & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@AGENTS.md
Loading