Skip to content

docs: add concise AGENTS development guide#178

Merged
kongenpei merged 3 commits intomainfrom
codex/agents-md-dev-guide
Apr 1, 2026
Merged

docs: add concise AGENTS development guide#178
kongenpei merged 3 commits intomainfrom
codex/agents-md-dev-guide

Conversation

@kongenpei
Copy link
Copy Markdown
Collaborator

@kongenpei kongenpei commented Apr 1, 2026

Summary

Add a concise AGENTS.md with explicit repo development guidance focused on local build/test/check flow and PR hygiene.

Changes

  • Add new AGENTS.md at repo root with:
    • Goal options (including “Make CLI better”)
    • Fast dev loop commands
    • CI-aligned pre-PR checks
    • Test/check command reference
    • Commit/PR rules and sensitive-data reminder
  • Add explicit rule to draft/fill .github/pull_request_template.md before opening a real PR
  • Include CI-aligned go-licenses pre-PR check when dependencies change

Test Plan

  • Unit tests pass
  • Manual local verification confirms the lark xxx command works as expected

Notes:

  • Re-ran make unit-test on commit f7537e6.
  • Current failures are in shortcuts/mail only:
    • TestConfirmSendMissingScopeReply
    • TestConfirmSendMissingScopeReplyAll
    • TestConfirmSendMissingScopeForward
  • Error observed: SetStoredToken() error = exit status 154.
  • This PR is docs-only (AGENTS.md) and does not change runtime behavior.

Related Issues

  • None

Summary by CodeRabbit

  • Documentation
    • Added a developer guide covering local development workflow, test/check targets and pre-PR verification steps, contribution requirements, commit/PR formatting rules, and a reminder not to commit secrets.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 1, 2026

📝 Walkthrough

Walkthrough

Added AGENTS.md, a maintainer/developer guide describing selectable PR goals, a fast local development loop (including make build and python3 scripts/fetch_meta.py), required pre-PR checks (unit tests, go mod tidy, golangci-lint, optional license checks), test targets, and commit/PR conventions.

Changes

Cohort / File(s) Summary
Documentation
AGENTS.md
New developer/maintainer guide outlining PR goals, local dev loop (make build, python3 scripts/fetch_meta.py, make unit-test), pre-PR verification steps (go mod tidy, pinned golangci-lint --new-from-rev=origin/main, optional go-licenses), test/check targets (unit/integration/full/vet/race+coverage), and commit/PR rules (Conventional Commits, PR title/description guidance, do not commit secrets).

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Suggested reviewers

  • liangshuo-1

Poem

🐇 I nibble on docs and tidy the trail,
I hop through build steps without fail,
Tests checked and lint in view,
Commit with care—conventional too,
Hooray for AGENTS, a crisp developer tale!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding a new AGENTS.md development guide to the repository documentation.
Description check ✅ Passed The PR description covers all required template sections: Summary explains the addition clearly, Changes lists specific updates including the AGENTS.md file content and new rules, Test Plan includes both checkboxes with one checked and detailed notes about test execution.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/agents-md-dev-guide

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

@greptile-apps
Copy link
Copy Markdown

greptile-apps bot commented Apr 1, 2026

Greptile Summary

This PR adds a new AGENTS.md developer guide at the repo root, documenting the local build/test workflow, pre-PR checks, commit conventions, and sensitive-data reminders. It is a docs-only change with no impact on runtime behaviour.

  • The guide is largely accurate: golangci-lint version (v2.1.6), go-licenses version (v2.0.1), and the go mod tidy guard all match their counterparts in .github/workflows/lint.yml.
  • The govulncheck step that exists in lint.yml (currently continue-on-error: true) is not mentioned; adding it as an informational step would keep the guide fully in sync with CI.
  • make unit-test includes -gcflags="all=-N -l" and no -timeout flag, while CI runs with neither of those options plus -timeout=5m; a brief note about this divergence would help avoid surprise CI failures.

Confidence Score: 5/5

Safe to merge — docs-only change with no runtime impact; all remaining findings are P2 quality suggestions.

All findings are P2 style/completeness suggestions (missing govulncheck note, minor flag divergence between make unit-test and CI). Neither blocks correct CI behaviour nor introduces incorrect guidance that would cause a developer to miss a hard CI gate. The license-check concern from the previous review thread has been addressed by adding step 4 to the pre-PR checklist.

No files require special attention.

Important Files Changed

Filename Overview
AGENTS.md New developer guide: commands and versions are largely accurate against CI workflows, but govulncheck is absent and make unit-test flags diverge slightly from what tests.yml runs.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Start Dev Work] --> B[make build]
    B --> C[Edit code]
    C --> D[make unit-test]
    D --> E{Tests pass?}
    E -- No --> C
    E -- Yes --> F[Run changed command manually
./lark-cli ...]
    F --> G[Pre-PR Checks]
    G --> G1[go mod tidy
check go.mod/go.sum unchanged]
    G1 --> G2[golangci-lint
--new-from-rev=origin/main]
    G2 --> G3{Dependencies
changed?}
    G3 -- Yes --> G4[go-licenses check
./... --disallowed_types=...]
    G3 -- No --> G5[govulncheck ⚠️
informational only]
    G4 --> G5
    G5 --> H[Draft PR from
.github/pull_request_template.md]
    H --> I[Open PR]
Loading

Reviews (2): Last reviewed commit: "docs: remove toolchain prerequisite sect..." | Re-trigger Greptile

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

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

10-19: Add a Go toolchain prerequisite note near the dev loop/check commands.

Given the reported local mismatch (go1.25.8 vs go1.24.2), adding a one-line prerequisite (required Go version/source of truth) would prevent setup churn for contributors.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@AGENTS.md` around lines 10 - 19, Add a one-line Go toolchain prerequisite
next to the "Fast Dev Loop" / "Pre-PR Checks" sections stating the required Go
version (e.g., "Requires Go 1.25.8+") and where the source-of-truth is (e.g.,
the module 'go' directive in go.mod or CI/tooling matrix); update the AGENTS.md
text near the listed commands so contributors see the required Go version
upfront and a pointer to check go.mod or the CI config for the authoritative
version.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@AGENTS.md`:
- Around line 10-19: Add a one-line Go toolchain prerequisite next to the "Fast
Dev Loop" / "Pre-PR Checks" sections stating the required Go version (e.g.,
"Requires Go 1.25.8+") and where the source-of-truth is (e.g., the module 'go'
directive in go.mod or CI/tooling matrix); update the AGENTS.md text near the
listed commands so contributors see the required Go version upfront and a
pointer to check go.mod or the CI config for the authoritative version.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: e1aac1dd-4605-4d09-a675-cb946e628f21

📥 Commits

Reviewing files that changed from the base of the PR and between d4e83df and 060a3e5.

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

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 1, 2026

🚀 PR Preview Install Guide

🧰 CLI update

npm i -g https://pkg.pr.new/larksuite/cli/@larksuite/cli@f7537e6028a0eb21800c47719ab55037071cfe68

🧩 Skill update

npx skills add larksuite/cli#codex/agents-md-dev-guide -y -g

@kongenpei
Copy link
Copy Markdown
Collaborator Author

Addressed review suggestions in latest commit (5da8133):\n- Added explicit Go toolchain prerequisite and source-of-truth note near dev/check workflow.\n- Added CI-aligned go-licenses check to pre-PR checks (when dependencies change).

@kongenpei kongenpei requested a review from liangshuo-1 April 1, 2026 07:52
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

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

6-8: Consider varying sentence structure for readability.

Three consecutive sentences begin with "Improve". While clear, varying the opening words can enhance readability.

✍️ Optional rewording suggestion
 - Make CLI better: improve UX, error messages, help text, flags, and output clarity.
-- Improve reliability: fix bugs, edge cases, and regressions with tests.
-- Improve developer velocity: simplify code paths, reduce complexity, keep behavior explicit.
-- Improve quality gates: strengthen tests/lint/checks without adding heavy process.
+- Fix reliability issues: address bugs, edge cases, and regressions with tests.
+- Boost developer velocity: simplify code paths, reduce complexity, keep behavior explicit.
+- Strengthen quality gates: enhance tests/lint/checks without adding heavy process.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@AGENTS.md` around lines 6 - 8, Summary: the three consecutive bullets in
AGENTS.md all start with "Improve", making the paragraph repetitive; change
their openings to vary sentence structure. Locate the three bullets that begin
with the phrases "Improve reliability:", "Improve developer velocity:", and
"Improve quality gates:" and rewrite each opener to use different verbs or
constructions (e.g., "Increase reliability:", "Boost developer velocity:",
"Strengthen quality gates:" or similar alternatives) while keeping the existing
explanatory text intact and preserving the colon/punctuation and intent. Ensure
the revised bullets maintain parallel meaning and tone across the list.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@AGENTS.md`:
- Around line 6-8: Summary: the three consecutive bullets in AGENTS.md all start
with "Improve", making the paragraph repetitive; change their openings to vary
sentence structure. Locate the three bullets that begin with the phrases
"Improve reliability:", "Improve developer velocity:", and "Improve quality
gates:" and rewrite each opener to use different verbs or constructions (e.g.,
"Increase reliability:", "Boost developer velocity:", "Strengthen quality
gates:" or similar alternatives) while keeping the existing explanatory text
intact and preserving the colon/punctuation and intent. Ensure the revised
bullets maintain parallel meaning and tone across the list.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a094e000-d751-4747-a8be-3e81ae81f5be

📥 Commits

Reviewing files that changed from the base of the PR and between 060a3e5 and f7537e6.

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

@kongenpei kongenpei merged commit 17698d5 into main Apr 1, 2026
8 checks passed
@kongenpei kongenpei deleted the codex/agents-md-dev-guide branch April 1, 2026 08:00
tuxedomm pushed a commit that referenced this pull request Apr 3, 2026
* docs: add concise AGENTS development guide

* docs: align AGENTS with toolchain and CI license checks

* docs: remove toolchain prerequisite section

---------

Co-authored-by: kongenpei <kongenpei@users.noreply.github.com>
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.

2 participants