Skip to content

docs: refresh repository agent guidelines#734

Merged
gnanam1990 merged 2 commits into
mainfrom
docs/refresh-agents-guidelines
Jul 18, 2026
Merged

docs: refresh repository agent guidelines#734
gnanam1990 merged 2 commits into
mainfrom
docs/refresh-agents-guidelines

Conversation

@anandh8x

@anandh8x anandh8x commented Jul 18, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • require all contributors and coding agents to read CONTRIBUTING.md before opening a pull request
  • align repository guidance with the current Makefile, CI build and smoke flow, Go toolchain, security checks, and advisory lint policy
  • document focused PR scope, generated-report handling, race testing, and preservation of unrelated working-tree changes
  • remove obsolete AGENTS.md frontmatter whose globs and alwaysApply fields are not interpreted by Zero

Scope

Documentation only. This pull request changes AGENTS.md and no other file.

Verification

  • go fmt ./...
  • go vet ./...
  • go test ./...
  • go run ./cmd/zero-release build
  • go run ./cmd/zero-release smoke
  • pinned golangci-lint command
  • govulncheck: no vulnerabilities found
  • git diff --check
  • verified origin/main...HEAD contains only AGENTS.md

Summary by CodeRabbit

  • Documentation
    • Rewrote repository contribution and pull request guidelines with clearer expectations for review readiness, commit scope, and describing changes with supporting verification.
    • Expanded development conventions covering formatting, testing (including race detection), build/release workflow guidance, and safer contribution practices.
    • Added a stricter, ordered validation checklist covering tests, builds/smoke checks, linting guidance, security scanning, and diff hygiene.
    • Clarified which checks are required versus advisory and how to handle failures.

@github-actions

github-actions Bot commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Zero automated PR review

Verdict: No blockers found

Blockers

  • None found.

Validation

  • [pass] Diff hygiene: git diff --check
  • [pass] Tests: go test ./...
  • [pass] Build: go run ./cmd/zero-release build
  • [pass] Smoke build: go run ./cmd/zero-release smoke

Scope

Head: 5fb01dae770b
Changed files (1): AGENTS.md

This deterministic review checks validation status and basic diff hygiene. A human reviewer still owns product judgment and design quality.

@coderabbitai

coderabbitai Bot commented Jul 18, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b9065dcd-6e84-4202-a53d-db48b05eef2d

📥 Commits

Reviewing files that changed from the base of the PR and between f90fd85 and 5fb01da.

📒 Files selected for processing (1)
  • AGENTS.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • AGENTS.md

Walkthrough

AGENTS.md was rewritten with repository contribution rules, updated implementation conventions, and an ordered validation checklist covering formatting, vetting, tests, builds, linting, security scanning, and diff hygiene.

Changes

Repository guidance

Layer / File(s) Summary
Contribution and implementation conventions
AGENTS.md
Adds contribution and pull request rules, updates Go and build command guidance, clarifies testing and race-detector expectations, preserves repository restrictions, and adds working-tree guidance.
Required validation checklist
AGENTS.md
Defines ordered formatting, vetting, testing, build and smoke-test, lint, security, and diff checks, with instructions for handling failures.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • Gitlawb/zero#635: Updates AGENTS.md with related validation, linting, and security guidance.
  • Gitlawb/zero#689: Updates AGENTS.md with overlapping lint and security validation instructions.
  • Gitlawb/zero#661: Modifies AGENTS.md with related repository contribution guidance.

Suggested reviewers: vasanthdev2004, kevincodex1, jatmn

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: a documentation refresh of repository agent guidelines.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/refresh-agents-guidelines

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@AGENTS.md`:
- Line 57: Update the “Diff hygiene” guidance in AGENTS.md to validate the
complete staged and unstaged diff before committing or opening a pull request.
Replace the working-tree-only git diff --check command with git diff HEAD
--check, or explicitly instruct checking both cached and unstaged diffs.
- Line 47: Update the Formatting guidance in AGENTS.md to use make fmt-check as
the validation command. Retain go fmt ./... and make fmt only as remediation
commands, clearly distinguishing them from the non-mutating formatting check.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 64c95f6e-b8e8-4eb4-8de8-e1fabefafb0e

📥 Commits

Reviewing files that changed from the base of the PR and between 7796022 and f90fd85.

📒 Files selected for processing (1)
  • AGENTS.md

Comment thread AGENTS.md Outdated
Comment thread AGENTS.md Outdated

@gnanam1990 gnanam1990 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

APPROVE — accurate and well-structured. Verified every factual claim against Makefile on main:

  • make fmt-check, make fmt, make vet, make test all exist ✅
  • "make lint runs fmt-check + vet, not golangci-lint" — matches exactly (lint: fmt-check vet) ✅
  • internal/perfbench/reports/ holds only .gitkeep + README.md (0 tracked JSON), so the "don't commit reports" guidance is accurate and forward-looking ✅
  • Removing the obsolete globs/alwaysApply frontmatter is correct — Zero doesn't interpret those ✅

CodeRabbit's two findings (use make fmt-check; use git diff HEAD --check) are already reflected in the current head — its suggestions diff against an older commit, so the CHANGES_REQUESTED is stale and safe to dismiss.

Optional non-blocking nit: the "don't commit reports" rule isn't enforced by .gitignore — an internal/perfbench/reports/*.json ignore entry would give it teeth. Fine as a fast-follow. Merge is kevin's call per the program gate.

@anandh8x
anandh8x requested a review from Vasanthdev2004 July 18, 2026 16:03

@gnanam1990 gnanam1990 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re-approve (prior approval was auto-dismissed by 5fb01da). No regressions — the new commit just makes the formatting step non-mutating (make fmt-check as the check; go fmt/make fmt as remediation) and uses git diff HEAD --check. All factual claims still verified against the Makefile; both CodeRabbit findings now fully resolved. LGTM.

@Vasanthdev2004 Vasanthdev2004 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving. I checked the guidance claims against the repo rather than taking them on faith, and they hold: make lint really is fmt-check plus vet only (so calling the pinned golangci run advisory and separate is right), make test really is the race-enabled suite, the zero-release build and smoke commands exist as documented, and the generated-reports rule matches the contract in internal/perfbench/reports/README.md. The frontmatter removal is better than cosmetic: nothing in the codebase parses globs or alwaysApply, and AGENTS.md is injected raw into the project context, so that block was pure prompt noise on every run. The scope, working-tree preservation, and CONTRIBUTING-first rules also line up with where the repo has been heading this week.

One nit, take it or leave it: "Never edit files under third_party/" survived the refresh, but there is no third_party directory in the repo. Since this PR exists to remove guidance that no longer matches reality, that line is a candidate for the same treatment. Not blocking on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants