Skip to content

Commit a0ce91e

Browse files
brtkwrclaude
andcommitted
docs: add CONTRIBUTING.md, CLAUDE.md, AGENTS.md, enable workflow_dispatch
CONTRIBUTING.md documents the conventional-commits → semver mapping the tag bump action uses, the release flow, and how to manually re-trigger a release with `gh workflow run ci.yaml` instead of an empty trigger commit. CLAUDE.md and AGENTS.md @-reference README + CONTRIBUTING so AI assistants pick up repo context automatically; both warn against direct edits (update the underlying docs instead). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent a1f0da8 commit a0ce91e

4 files changed

Lines changed: 96 additions & 0 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: CI
33
on:
44
push:
55
branches: [main]
6+
workflow_dispatch:
67

78
jobs:
89
test:

AGENTS.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# AGENTS.md
2+
3+
Context for AI coding assistants (Cursor, Aider, Codex, etc.) working in this repo.
4+
5+
> ⚠️ Don't edit this file directly. Update [README.md](./README.md) for user-facing docs or [CONTRIBUTING.md](./CONTRIBUTING.md) for repo conventions. This file just stitches them together for assistants.
6+
7+
@README.md
8+
9+
@CONTRIBUTING.md

CLAUDE.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# CLAUDE.md
2+
3+
@AGENTS.md

CONTRIBUTING.md

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
# Contributing
2+
3+
## Commit messages
4+
5+
This repo uses [Conventional Commits](https://www.conventionalcommits.org/). Every commit on `main` should be prefixed with a type that determines the next semver bump:
6+
7+
| Type | Bump | Use for |
8+
| ----------- | ----- | --------------------------------------------- |
9+
| `feat:` | minor | New user-visible feature |
10+
| `fix:` | patch | Bug fix |
11+
| `docs:` | patch | Documentation only |
12+
| `style:` | patch | Formatting, gofmt, lint |
13+
| `refactor:` | patch | Code change without user-visible effect |
14+
| `test:` | patch | Test changes only |
15+
| `chore:` | patch | Build/tooling/housekeeping |
16+
| `build:` | patch | Build system / dependency bumps |
17+
| `perf:` | patch | Performance improvement |
18+
| `ci:` | none | CI config only (excluded from changelog) |
19+
20+
Add `!` after the type, or include `BREAKING CHANGE:` in the body, to force a **major** bump:
21+
22+
```
23+
feat!: rename --user flag to --as
24+
25+
BREAKING CHANGE: --user is no longer recognised. Migrate to --as.
26+
```
27+
28+
Subject style (matches the rest of the repo):
29+
30+
- lowercase, no trailing period
31+
- imperative mood ("add X", not "added X")
32+
- one short line; details go in the body
33+
- no Linear ticket prefixes (this is OSS)
34+
35+
## Versioning
36+
37+
Tags are bumped automatically by [`mathieudutour/github-tag-action`](https://github.com/mathieudutour/github-tag-action) on every push to `main`:
38+
39+
- `feat:` → minor (e.g. v0.1.0 → v0.2.0)
40+
- `fix:` / most others → patch (e.g. v0.1.0 → v0.1.1)
41+
- `feat!:` or `BREAKING CHANGE:` → major (e.g. v0.1.0 → v1.0.0)
42+
- If unsure, the action falls back to **patch** (`default_bump: patch`)
43+
- `ci:` commits are excluded from changelogs but still trigger a patch bump unless they're the only change. Prefer `chore:` for tooling tweaks that should appear in the changelog.
44+
45+
The action also produces grouped changelogs (see `.goreleaser.yaml`):
46+
47+
- 🚀 Features
48+
- 🐛 Bug fixes
49+
- 📚 Documentation
50+
- 🛠 Maintenance
51+
- Other
52+
53+
## Release flow
54+
55+
Every push to `main` runs `ci.yaml`:
56+
57+
1. `test.yaml` (build + go test + go vet)
58+
2. Tag bump
59+
3. GoReleaser publishes:
60+
- GitHub release with darwin/linux × amd64/arm64 archives + checksums
61+
- Homebrew formula push to [`agentic-utils/homebrew-tap`](https://github.com/agentic-utils/homebrew-tap)
62+
63+
### Manual release
64+
65+
The workflow supports `workflow_dispatch` so you can trigger a release without pushing a no-op commit:
66+
67+
```
68+
gh workflow run ci.yaml --repo agentic-utils/zeltapp-cli
69+
```
70+
71+
Useful for re-running after a failed release once the underlying issue (e.g. a token rotation) is fixed.
72+
73+
## Local development
74+
75+
```
76+
go test -cover ./...
77+
gofmt -s -l . # report files needing simplification
78+
gofmt -s -w cmd/zeltapp # apply
79+
go vet ./...
80+
go build -o zeltapp ./cmd/zeltapp
81+
```
82+
83+
CI runs all of the above. Keep `gofmt -s` clean to preserve the Go Report Card A+ grade.

0 commit comments

Comments
 (0)