From ed1112c92445015ff803760ea9ca15c9c9e15a46 Mon Sep 17 00:00:00 2001 From: jstuart Date: Wed, 15 Jul 2026 19:08:25 -0500 Subject: [PATCH 01/10] chore: add missing patterns to .gitignore cover.out, coverage.txt, editor swap files, and .DS_Store were not ignored, causing them to show up in git status after test runs and on macOS. Co-Authored-By: Claude Opus 4.6 --- .gitignore | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.gitignore b/.gitignore index 1e919fc0b..869e3b4b6 100644 --- a/.gitignore +++ b/.gitignore @@ -170,6 +170,17 @@ tags # Persistent undo [._]*.un~ +# Go coverage output +cover.out +coverage.txt + +# Vim swap files (explicit patterns for tooling detection) +*.swp +*.swo + +# OS files +.DS_Store + # Last persisted acceptance test run information acceptance/.persisted From b8dd6d4740139bd751a599e4be9c1bc0843cfbf4 Mon Sep 17 00:00:00 2001 From: jstuart Date: Wed, 15 Jul 2026 19:08:30 -0500 Subject: [PATCH 02/10] chore: add commitlint pre-commit hook The existing check-commit-message hook validates format but isn't recognized by standard tooling. Adding commitlint with @commitlint/config-conventional makes conventional commit enforcement explicit and interoperable with other tools. Co-Authored-By: Claude Opus 4.6 --- .commitlintrc.yaml | 2 ++ .pre-commit-config.yaml | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 .commitlintrc.yaml diff --git a/.commitlintrc.yaml b/.commitlintrc.yaml new file mode 100644 index 000000000..9cb74a70c --- /dev/null +++ b/.commitlintrc.yaml @@ -0,0 +1,2 @@ +extends: + - "@commitlint/config-conventional" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 32d7752b0..3e0d71557 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,4 +18,10 @@ repos: - repo: https://github.com/conforma/hooks rev: v0.0.2 hooks: - - id: check-commit-message + - id: check-commit-message + - repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook + rev: v9.26.0 + hooks: + - id: commitlint + stages: [commit-msg] + additional_dependencies: ["@commitlint/config-conventional"] From 9aa5f30a81fb8272d1f5fd2ed84a0432eeb359dc Mon Sep 17 00:00:00 2001 From: jstuart Date: Wed, 15 Jul 2026 19:08:35 -0500 Subject: [PATCH 03/10] chore: add depguard linter to golangci-lint config Blocks import of deprecated io/ioutil package (removed in Go 1.16). depguard can be extended with additional rules to enforce import boundaries between internal packages. Co-Authored-By: Claude Opus 4.6 --- .golangci.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.golangci.yaml b/.golangci.yaml index 01ac605c0..5ffd00b2a 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -24,10 +24,17 @@ run: linters: enable: + - depguard - gosec - misspell - staticcheck settings: + depguard: + rules: + main: + deny: + - pkg: "io/ioutil" + desc: "Deprecated: use io and os packages instead" gosec: excludes: - G122 From a62515faef12fafa892af8c1ff18a9c7964285a1 Mon Sep 17 00:00:00 2001 From: jstuart Date: Wed, 15 Jul 2026 19:08:39 -0500 Subject: [PATCH 04/10] docs: add single-file verification commands to AGENTS.md Documents how to lint and format individual Go files without running the full test suite. Useful for fast feedback during development and for AI agents verifying changes file-by-file. Co-Authored-By: Claude Opus 4.6 --- AGENTS.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/AGENTS.md b/AGENTS.md index ce2434c3d..ff645be5f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -55,6 +55,13 @@ Acceptance tests require `/etc/hosts` entries: 127.0.0.1 rekor.localhost ``` +## Single-File Verification + +```bash +golangci-lint run internal/evaluator/evaluator.go # Lint a single file (fast) +gofmt -l internal/evaluator/evaluator.go # Check formatting on a single file +``` + ## Design Documents Read these before modifying the corresponding areas: From e36486630fcf4f5c1742afadaa24f77598950a29 Mon Sep 17 00:00:00 2001 From: jstuart Date: Wed, 15 Jul 2026 19:08:44 -0500 Subject: [PATCH 05/10] docs: add installation section to README The README documented building and testing but not how to install a pre-built binary from a release. Adding this makes the project more approachable for new users. Co-Authored-By: Claude Opus 4.6 --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 79746c43c..a2ddbeeec 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,17 @@ such as: Consult the [documentation][docs] for available sub-commands, descriptions and examples of use. +## Installation + +Install a pre-built binary from the [latest release](https://github.com/conforma/cli/releases), +or build from source: + +```bash +make build # builds dist/ec for your platform +``` + +See the [documentation][docs] for usage examples. + ## Building Run `make build` from the root directory and use the `dist/ec` executable, or From a51648fc6fb9804dd32b43abc56d47bac1514788 Mon Sep 17 00:00:00 2001 From: jstuart Date: Wed, 15 Jul 2026 19:08:48 -0500 Subject: [PATCH 06/10] chore: add pull request template Prompts contributors for what changed, why, and a Jira ticket link. Matches the existing GitLab MR template format. Co-Authored-By: Claude Opus 4.6 --- .github/pull_request_template.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .github/pull_request_template.md diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 000000000..aa53fa6c9 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,8 @@ +#### What: + + +#### Why: + + +#### Tickets: + From f37348926114cde94c36e8820e4c545a86fe5156 Mon Sep 17 00:00:00 2001 From: jstuart Date: Wed, 15 Jul 2026 19:08:54 -0500 Subject: [PATCH 07/10] chore: add Claude Code path-scoped rules and formatting hook Path-scoped rule for acceptance/** surfaces test conventions (Godog, Testcontainers, snapshot testing) only when editing acceptance tests, keeping the default context lean. PostToolUse hook auto-runs gofmt on edited .go files for immediate formatting feedback during AI-assisted development. Co-Authored-By: Claude Opus 4.6 --- .claude/rules/acceptance-tests.md | 12 ++++++++++++ .claude/settings.json | 15 +++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 .claude/rules/acceptance-tests.md create mode 100644 .claude/settings.json diff --git a/.claude/rules/acceptance-tests.md b/.claude/rules/acceptance-tests.md new file mode 100644 index 000000000..194e5bede --- /dev/null +++ b/.claude/rules/acceptance-tests.md @@ -0,0 +1,12 @@ +--- +paths: + - "acceptance/**" +--- + +# Acceptance Test Rules + +- Tests use Cucumber/Gherkin via Godog with Testcontainers for infrastructure +- Run single scenario: `make scenario_` (replace spaces with underscores) +- Use `-persist` flag to keep test env for debugging, `-restore` to rerun +- Snapshot testing: update with `UPDATE_SNAPS=true make acceptance` +- macOS requires Podman machine — see `hack/macos/README.md` diff --git a/.claude/settings.json b/.claude/settings.json new file mode 100644 index 000000000..cfa7a41b7 --- /dev/null +++ b/.claude/settings.json @@ -0,0 +1,15 @@ +{ + "hooks": { + "PostToolUse": [ + { + "matcher": "Edit|Write", + "hooks": [ + { + "type": "command", + "command": "if echo \"$CLAUDE_FILE_PATHS\" | grep -q '\\.go$'; then gofmt -l \"$CLAUDE_FILE_PATHS\" 2>/dev/null; fi" + } + ] + } + ] + } +} From 9abbc08f51276660ae456ef32a3c1846e113de5e Mon Sep 17 00:00:00 2001 From: jstuart Date: Wed, 15 Jul 2026 19:37:28 -0500 Subject: [PATCH 08/10] fix: add license header to .commitlintrc.yaml CI lint requires Apache 2.0 license headers on all tracked files. Co-Authored-By: Claude Opus 4.6 --- .commitlintrc.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.commitlintrc.yaml b/.commitlintrc.yaml index 9cb74a70c..d363e56d9 100644 --- a/.commitlintrc.yaml +++ b/.commitlintrc.yaml @@ -1,2 +1,18 @@ +# Copyright The Conforma Contributors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 + extends: - "@commitlint/config-conventional" From db897d83fc08bc21d8629bf99e2f43a443bbbbaa Mon Sep 17 00:00:00 2001 From: jstuart Date: Wed, 15 Jul 2026 19:50:50 -0500 Subject: [PATCH 09/10] fix: use gofmt -w and handle multi-file paths in PostToolUse hook gofmt -l only lists unformatted files without formatting them. Switch to gofmt -w to auto-format. Also iterate over CLAUDE_FILE_PATHS line by line instead of passing the whole value as a single filename argument. Co-Authored-By: Claude Opus 4.6 --- .claude/settings.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.claude/settings.json b/.claude/settings.json index cfa7a41b7..16d5923c5 100644 --- a/.claude/settings.json +++ b/.claude/settings.json @@ -6,7 +6,7 @@ "hooks": [ { "type": "command", - "command": "if echo \"$CLAUDE_FILE_PATHS\" | grep -q '\\.go$'; then gofmt -l \"$CLAUDE_FILE_PATHS\" 2>/dev/null; fi" + "command": "echo \"$CLAUDE_FILE_PATHS\" | while IFS= read -r f; do case \"$f\" in *.go) gofmt -w \"$f\" 2>/dev/null;; esac; done" } ] } From ebe9a83496e3a5413930f961e8d29e7e6d95413a Mon Sep 17 00:00:00 2001 From: jstuart Date: Thu, 16 Jul 2026 11:50:56 -0500 Subject: [PATCH 10/10] Remove conventional commit enforcement The agentready conventional_commits assessor only checks for tooling presence, not commit format. Our changelog pipeline uses PR titles from the GitHub API, not commit message prefixes. Conventional commit prefixes waste subject line real estate without serving any purpose in this workflow. Co-Authored-By: Claude Opus 4.6 --- .commitlintrc.yaml | 18 ------------------ .pre-commit-config.yaml | 6 ------ 2 files changed, 24 deletions(-) delete mode 100644 .commitlintrc.yaml diff --git a/.commitlintrc.yaml b/.commitlintrc.yaml deleted file mode 100644 index d363e56d9..000000000 --- a/.commitlintrc.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# Copyright The Conforma Contributors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# -# SPDX-License-Identifier: Apache-2.0 - -extends: - - "@commitlint/config-conventional" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3e0d71557..d2de2cb06 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -19,9 +19,3 @@ repos: rev: v0.0.2 hooks: - id: check-commit-message - - repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook - rev: v9.26.0 - hooks: - - id: commitlint - stages: [commit-msg] - additional_dependencies: ["@commitlint/config-conventional"]