Skip to content

Commit ed2a0a5

Browse files
chore: simplify AGENTS.md / CLAUDE.md (#3692)
Removes redundant and verbose sections from `AGENTS.md` and `CLAUDE.md` to keep the agent instructions concise. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Documentation** * Updated repository contribution guidance to reflect the Go workspace setup and `make`-based workflows. * Standardized pre-commit checks to use `make fmt`, `make lint`, and `make test`. * Clarified commit signing requirements and now call for signed commits. * Consolidated one guidance file into a single reference to the main repository instructions. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent daebade commit ed2a0a5

2 files changed

Lines changed: 9 additions & 51 deletions

File tree

AGENTS.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22

33
## Project Structure & Module Organization
44

5-
This repo is a Go workspace (`go.work`) containing multiple Go modules:
5+
This repo is a Go workspace (`go.work`) containing multiple Go modules, built using make.
66

77
- `service/`: main OpenTDF server and platform services (binary entrypoint: `service/main.go`).
88
- `sdk/`: Go SDK and generated clients.
9+
- `otdfctl/`: Command line for interacting with server, providing CLI for all SDK operations.
910
- `lib/*/`: shared libraries (e.g., `lib/ocrypto`, `lib/identifier`).
1011
- `protocol/` and `service/`: protobuf sources; generated Go lives under `protocol/go/` and docs under `docs/grpc/` + `docs/openapi/`.
1112
- `tests-bdd/`: BDD/integration-style tests (Godog) and feature files (`tests-bdd/features/`).
@@ -26,22 +27,21 @@ Prefer `make` targets at repo root:
2627
- Go formatting is enforced: run `make fmt` (uses `golangci-lint fmt`; Go uses tabs for indentation).
2728
- Imports should be goimports-compatible; keep package names lowercase; exported identifiers use `PascalCase`.
2829
- Protobuf changes must pass `buf lint` and should be regenerated via `make proto-generate`.
29-
- Always run `gofumpt` on Go files after making changes
30-
- The project uses `gofumpt` (stricter than `gofmt`) for formatting
31-
- Before completing Go-related tasks, run: `~/go/bin/gofumpt -w <files>`
30+
- Always run `make fmt` on Go files after making changes.
31+
- Always use signed commits with 'conventional commit' messages.
3232

3333
## Testing Guidelines
3434

3535
### Required Tests Before Committing
3636

3737
**CRITICAL**: All Go code changes must pass these checks before being marked as complete:
3838

39-
1. **Linting**: `golangci-lint run ./path/to/changed/files.go`
40-
- Must pass with 0 issues
39+
1. **Linting**: `make lint`
40+
- Must pass with 0 new issues
4141
- Fixes common issues: formatting, shadowing, unused code, suspicious constructs
4242
- Never let the user discover linting issues from CI
4343

44-
2. **Unit Tests**: `go test ./...` (or `make test` from repo root)
44+
2. **Unit Tests**: `make test` from repo root
4545
- All existing tests must continue to pass
4646
- Add tests for new functionality
4747

@@ -59,7 +59,7 @@ Prefer `make` targets at repo root:
5959
## Commit & Pull Request Guidelines
6060

6161
- Commit messages follow Conventional Commits (e.g., `feat(sdk): ...`, `fix(core): ...`).
62-
- DCO sign-off is required: use `git commit -s -m "feat(scope): summary"`. See `CONTRIBUTING.md`.
62+
- DCO sign-off is required: use `git commit -S -s -m "feat(scope): summary"` (`-S` = cryptographic signing, `-s` = DCO). See `CONTRIBUTING.md`.
6363
- PRs should describe changes, include testing notes, and update docs/tests when applicable (see `.github/pull_request_template.md`).
6464

6565
## Security & Configuration Tips

CLAUDE.md

Lines changed: 1 addition & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1 @@
1-
# Claude Code Instructions
2-
3-
## Overview
4-
5-
This file provides instructions for AI agents working on the OpenTDF Platform codebase.
6-
7-
**For complete repository guidelines, coding standards, and development workflow, see [AGENTS.md](AGENTS.md).**
8-
9-
## Critical Requirements
10-
11-
### Before Completing ANY Go Code Changes
12-
13-
**MANDATORY CHECKS** - Run these before marking work as complete:
14-
15-
1. **Linting**: `golangci-lint run ./path/to/changed/files.go`
16-
- Must pass with 0 issues
17-
- User should NEVER discover linting issues from CI
18-
19-
2. **Unit Tests**: `go test ./...` or `make test`
20-
- All existing tests must pass
21-
- Add tests for new functionality
22-
23-
3. **README Tests** (if SDK changes): `cd sdk && go test -run TestREADMECodeBlocks`
24-
- Ensures documentation examples remain compilable
25-
26-
### Formatting
27-
28-
- Run `gofumpt -w <files>` on all changed Go files before completing
29-
- Use tabs for indentation (Go standard)
30-
31-
### Key Guidelines from AGENTS.md
32-
33-
- **Project Structure**: Go workspace with multiple modules (service, sdk, lib/*)
34-
- **Build Commands**: Use `make` targets (build, test, lint, fmt)
35-
- **Commit Style**: Conventional Commits with DCO sign-off (`git commit -s`)
36-
- **Testing**: Unit tests, BDD tests, integration tests - see AGENTS.md for details
37-
38-
## Remember
39-
40-
✅ Run linting checks proactively - don't let CI catch issues
41-
✅ Test changes locally before marking complete
42-
✅ Follow patterns and conventions in AGENTS.md
43-
✅ Update documentation when changing APIs
1+
@AGENTS.md

0 commit comments

Comments
 (0)