Skip to content

docs: add Go code quality & security checks and bump Go version to 1.26+ - #635

Merged
kevincodex1 merged 6 commits into
Gitlawb:mainfrom
euxaristia:update-go-checks-and-version
Jul 12, 2026
Merged

docs: add Go code quality & security checks and bump Go version to 1.26+#635
kevincodex1 merged 6 commits into
Gitlawb:mainfrom
euxaristia:update-go-checks-and-version

Conversation

@euxaristia

@euxaristia euxaristia commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

This PR adds instructions to run Go formatting, vetting, linting, and vulnerability checks to README/AGENTS.md, and bumps the documented Go requirement/badges from 1.25+ to 1.26+.

Summary by CodeRabbit

  • Documentation
    • Updated Go version requirements to Go 1.26.5+ across English and Chinese docs, including installation and “from source” build steps.
    • Added a Development → Code Quality and Security Checks checklist for commit preparation (formatting, vetting, linting, and vulnerability scanning).
    • Added a new EXTENDING guide covering project instruction discovery, skills, hooks, MCP, and plugin configuration.
  • Chores
    • Rewrote AGENTS.md with clearer repository conventions for AI coding agents, including required quality/security checks and guidance when checks can’t run.

@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@euxaristia, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 1 minute

Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 24af5cbd-d7f0-48d2-88e8-e136dd76f867

📥 Commits

Reviewing files that changed from the base of the PR and between 904f5e6 and 8ff0c87.

📒 Files selected for processing (5)
  • AGENTS.md
  • README.md
  • README_ZH.md
  • docs/EXTENDING.md
  • docs/INSTALL.md

Walkthrough

Documentation now requires Go 1.26.5+ for source builds, adds coding-agent quality and security checks, and introduces a guide to Zero extension, configuration, plugins, hooks, skills, specialists, and MCP.

Changes

Repository guidance and extension documentation

Layer / File(s) Summary
Agent and developer quality checks
AGENTS.md, README.md
Agent and developer instructions require formatting, vetting, pinned linting, and vulnerability scanning commands, with guidance for unavailable checks.
Extension and configuration documentation
docs/EXTENDING.md
Adds guidance for project instructions, specialists, skills, hooks, MCP, plugins, configuration layering, and an end-to-end setup example.
Go version requirements
README.md, README_ZH.md, docs/INSTALL.md
Source-build requirements and Go badges are updated from Go 1.25+ to Go 1.26.5+ across English, Chinese, and installation documentation.

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

Possibly related PRs

  • Gitlawb/zero#307: Updates related agent-facing text in AGENTS.md and may overlap with this rewrite.

Suggested reviewers: Vasanthdev2004, kevincodex1, gnan1990, 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 documentation changes: adding Go code quality/security checks and bumping the documented Go version.
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

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

🧹 Nitpick comments (1)
AGENTS.md (1)

330-337: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Align these commands with CI’s pinned toolchain.

.github/workflows/ci.yml:87-133 pins govulncheck@v1.3.0 and golangci-lint@v2.12.2, limits linting to specific linters, and sets GOTOOLCHAIN from go.mod. This guidance instead installs @latest and runs an unscoped linter, so local results can diverge or later become incompatible. Document the pinned go run ...@version commands, or pin the installed versions and required toolchain settings.

🤖 Prompt for 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.

In `@AGENTS.md` around lines 330 - 337, The Go quality and security check
instructions in AGENTS.md use unpinned, CI-inconsistent tooling. Update the
documented commands to match the versions, GOTOOLCHAIN setting, and explicitly
enabled linters defined in .github/workflows/ci.yml, using pinned go run
commands for govulncheck and golangci-lint (or equivalent pinned installations),
and retain the required formatting and vetting checks.
🤖 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`:
- Around line 328-337: Reduce AGENTS.md below the approximately 8 KiB
instruction-file guideline by removing the Go quality and security checklist
added under “Repository Guidelines for coding agents.” Relocate this guidance to
a smaller, appropriately scoped local instruction file, or retain only essential
instructions in AGENTS.md while preserving the required checks and
tool-installation prompts.

In `@README.md`:
- Line 9: Update the Go version references in the README, including the badge
and source-build note, to state the exact minimum requirement of Go 1.26.5+
instead of Go 1.26+, consistent with the go.mod requirement.

---

Nitpick comments:
In `@AGENTS.md`:
- Around line 330-337: The Go quality and security check instructions in
AGENTS.md use unpinned, CI-inconsistent tooling. Update the documented commands
to match the versions, GOTOOLCHAIN setting, and explicitly enabled linters
defined in .github/workflows/ci.yml, using pinned go run commands for
govulncheck and golangci-lint (or equivalent pinned installations), and retain
the required formatting and vetting checks.
🪄 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: 18d87834-abf8-40c2-9dd7-c2ced71646e4

📥 Commits

Reviewing files that changed from the base of the PR and between aa73a76 and c1527a5.

📒 Files selected for processing (4)
  • AGENTS.md
  • README.md
  • README_ZH.md
  • docs/INSTALL.md

Comment thread AGENTS.md Outdated
Comment thread README.md Outdated
@euxaristia

Copy link
Copy Markdown
Contributor Author

All requested changes are addressed, and whitespace issues (trailing newlines at EOF) are resolved. @coderabbitai please re-review.

@coderabbitai

coderabbitai Bot commented Jul 10, 2026

Copy link
Copy Markdown
🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
gh pr view 635 --repo Gitlawb/zero --json files,commits -q '.files[].path'
echo "---diff---"
gh pr diff 635 --repo Gitlawb/zero

Length of output: 4711


🏁 Script executed:

#!/bin/bash
git clone --depth 1 --branch main https://github.com/Gitlawb/zero.git /tmp/repo 2>/dev/null || true
cd /tmp/repo || exit 0
git fetch origin pull/635/head:pr635 --depth 1 2>&1 | tail -5
git checkout pr635 2>&1 | tail -5
for f in AGENTS.md README.md README_ZH.md docs/INSTALL.md; do
  echo "== $f =="
  tail -c 50 "$f" | xxd | tail -5
done

Length of output: 822


🏁 Script executed:

#!/bin/bash
cd /tmp/repo || exit 0
for f in AGENTS.md README.md README_ZH.md docs/INSTALL.md; do
  echo "== $f =="
  tail -c 5 "$f" | od -c
done

Length of output: 671


🏁 Script executed:

#!/bin/bash
cd /tmp/repo || exit 0
for f in AGENTS.md README.md README_ZH.md docs/INSTALL.md; do
  echo "== $f =="
  python3 -c "
data = open('$f','rb').read()
print(repr(data[-5:]))
"
done

Length of output: 453


All four files end with a single trailing newline and no stray blank lines, so the whitespace fix looks good. The diff also confirms:

  • Go version bumped to 1.26.5+ consistently across README.md, README_ZH.md, and docs/INSTALL.md (badge + prose).
  • golangci-lint and govulncheck are now invoked via pinned versions (@v2.12.2 / @v1.3.0) in both AGENTS.md and README.md, matching your stated intent to align with CI.

One minor nit (not blocking): in README.md a new ### Cross-Compile Examples heading was added right above the pre-existing Cross-compile examples: plain-text line, so now there are two adjacent headings/labels for the same section. You may want to remove the old plain-text line or merge it into the new heading to avoid duplication — but this is cosmetic and up to you.

Thanks for confirming — I'll go ahead and re-review.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@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.

Docs-only change — I read all four files and ran build/vet against current main, both clean. The go.mod directive is untouched here; the actual Go 1.26.5 bump landed in #607, and this PR just brings the README badges, install docs, and a new code-quality/security-checks section in AGENTS.md and README.md in line with that (1.25+ -> 1.26.5+). So it's complementary doc alignment, not a duplicate bump. No regressions, no forbidden references. Approving.

One small note: in the new README "Code Quality and Security Checks" section, the pinned go run lint command uses github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.12.2 but the go install block just below drops the /v2/ segment — those should match, or the install command will not resolve to v2.12.2.

@Vasanthdev2004

Copy link
Copy Markdown
Collaborator

@gnanam1990 docs-only #635 if you want a glance — aligns README/AGENTS.md install + a new code-quality/security-checks section with the 1.26.5 bump from #607. Approved with one nit (golangci-lint install path is missing the /v2/ segment).

@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: 6

🤖 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 `@docs/EXTENDING.md`:
- Line 107: Update the fenced code block documenting the skills-directory tree
in EXTENDING.md to use the text language identifier, changing the opening fence
to ```text so it satisfies markdownlint MD040.
- Line 46: Correct the Windows user configuration path in the
personal-guidelines documentation to use %AppData%\zero\ZERO.md instead of
including a second Roaming segment, and update the associated config.json and
personal specialists path references consistently.
- Line 5: Update the relative Markdown links in docs/EXTENDING.md, including the
README reference and the links near the additionally affected sections, so they
resolve from the repository root rather than under docs/. Preserve each link’s
target while correcting its relative path, including SPECIALISTS.md and any
other affected references.
- Line 304: Align the end-to-end hook example in EXTENDING.md with the preceding
configuration: either add a `git push --force` hook to the shown
`.zero/hooks.json` configuration or revise the summary to claim only the
configured `rm -rf` block, keeping the example and description consistent.
- Around line 103-105: Update the skills documentation around the user-level
discovery statement and the project plugin section to distinguish unsupported
standalone project skill discovery from supported plugin-bundled skills. State
that project plugins may bundle skills, which are merged into the active run,
while standalone project skill directories remain unavailable; keep the existing
guidance for shared skills in AGENTS.md or hooks.
- Around line 283-291: Update the configuration precedence section in the “Three
layers” documentation to accurately describe all five sources and their actual
resolution order. Remove the contradictory “Three layers” wording and ensure
environment variables and CLI flags are ordered consistently with the documented
highest-priority rule, or explicitly separate their precedence rules when their
scopes differ.
🪄 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: a8b37369-b3c5-40c5-891b-5f4ab0b25f69

📥 Commits

Reviewing files that changed from the base of the PR and between 2eb9eb5 and 5d99fa4.

📒 Files selected for processing (3)
  • AGENTS.md
  • README.md
  • docs/EXTENDING.md
💤 Files with no reviewable changes (1)
  • README.md
✅ Files skipped from review due to trivial changes (1)
  • AGENTS.md

Comment thread docs/EXTENDING.md Outdated
Comment thread docs/EXTENDING.md Outdated
Comment thread docs/EXTENDING.md Outdated
Comment thread docs/EXTENDING.md Outdated
Comment thread docs/EXTENDING.md Outdated
Comment thread docs/EXTENDING.md Outdated

@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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/EXTENDING.md (1)

238-238: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Document the MCP server command using separate arguments.

The surrounding stdio configuration uses a binary in command and flags in args, but this instruction presents zero serve --mcp as a single command. Users may try to execute a binary literally named zero serve --mcp. Show it as command: "zero" with args: ["serve", "--mcp"] to match the documented schema.

Proposed clarification
-The server speaks MCP over stdio. Configure it from the receiving side as a `stdio` server whose command is `zero serve --mcp`.
+The server speaks MCP over stdio. Configure it from the receiving side as a `stdio` server with `command: "zero"` and `args: ["serve", "--mcp"]`.
🤖 Prompt for 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.

In `@docs/EXTENDING.md` at line 238, Update the MCP stdio configuration guidance
in the surrounding documentation to represent the executable as command "zero"
and pass "serve" and "--mcp" as separate args, matching the documented schema.
🤖 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.

Outside diff comments:
In `@docs/EXTENDING.md`:
- Line 238: Update the MCP stdio configuration guidance in the surrounding
documentation to represent the executable as command "zero" and pass "serve" and
"--mcp" as separate args, matching the documented schema.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 45e0e7e0-10cb-48d7-83ac-b360cef2608d

📥 Commits

Reviewing files that changed from the base of the PR and between 5d99fa4 and 904f5e6.

📒 Files selected for processing (1)
  • docs/EXTENDING.md

@euxaristia
euxaristia force-pushed the update-go-checks-and-version branch from 904f5e6 to 8ff0c87 Compare July 11, 2026 22:26
@euxaristia

Copy link
Copy Markdown
Contributor Author

Rebased onto main to resolve the AGENTS.md conflict. Main's new MCP credential-boundaries paragraph from #597 landed in the section this PR moves to docs/EXTENDING.md, so I ported that paragraph into EXTENDING.md at the same spot.

@kevincodex1 kevincodex1 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@kevincodex1
kevincodex1 merged commit 5a5b7fd into Gitlawb:main Jul 12, 2026
7 checks passed
@euxaristia
euxaristia deleted the update-go-checks-and-version branch July 17, 2026 21:05
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