Skip to content

Split AGENTS.md into short agent rules and developer guides - #14892

Open
bhouse-nexthop wants to merge 2 commits into
apache:mainfrom
bhouse-nexthop:agents-docs
Open

bhouse-nexthop wants to merge 2 commits into
apache:mainfrom
bhouse-nexthop:agents-docs

Conversation

@bhouse-nexthop

Copy link
Copy Markdown
Collaborator

Description

An alternative layout for the guidance in #14872. Most of what an agent needs to know also helps people, so it lives in developer guides, and AGENTS.md stays a short map. Agents load AGENTS.md on every task, so every line in it costs context.

File Holds
AGENTS.md Where each subject lives, plus a short table of rules most tasks need
docs/development/building.md Incremental builds, unit tests, running the simulator from source, build pitfalls. Links INSTALL.md, ui/README.md, PRE_COMMIT.md and tools/docker/README.md for the rest
docs/development/coding-conventions.md Layout, keeping changes small, Java, VOs and schema, API, ConfigKey settings, logging, unit tests
docs/development/writing.md Plain English, code comments, commit messages, PR descriptions, review replies
docs/development/pull-requests.md Branch targets, the two-approval merge rule, CI re-runs, updating a PR, checking a merge
docs/development/test-lab.md A nested KVM lab on one host: management server, three KVM hosts, Ceph, upgrade testing, fault injection, CKS
CONTRIBUTING.md A pointer to docs/development

Changes from #14872's content:

  • Dropped "use get, not is, for boolean getters". The VOs use is far more often (about 230 to 51).
  • Left out personal workflow rules: branch names, rebase --onto instead of cherry-pick, and "agents never commit". Agents now confirm with the person they work for before pushing or posting.
  • "One-line commit messages" became a one-line subject; the PR title is the squash commit subject anyway.
  • "No inline comments" became "comment only to explain why, and prefer extracting a method".
  • Covers @bernardodemarco's asks on agents directives from work, project and hobby experience #14872: logging, unit tests, method size, the UI and the Java version (via INSTALL.md).

The AI-assisted contribution policy stays in #14848; these files link to CONTRIBUTING.md for it.

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • Build/CI
  • Test (unit or integration test code)

Documentation only.

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

How Has This Been Tested?

  • pre-commit run on every changed file: markdownlint, codespell, license headers, gitleaks.
  • The conventions were checked against the code on main: the view re-creation in DatabaseUpgradeChecker, the engine/schema downloads, the simulator steps in .github/workflows/ci.yml.
  • test-lab.md describes a lab we have been running for PR testing over the last few weeks, with our addresses and names replaced by examples.

AGENTS.md is loaded into every agent task, so it stays short and points at
guides that people use too: building and unit tests, code conventions,
writing, pull requests, and a nested KVM test lab.

Signed-off-by: Brad House <bhouse@nexthop.ai>
@codecov

codecov Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 20.92%. Comparing base (58fda71) to head (6c119b6).

Additional details and impacted files
@@             Coverage Diff              @@
##              main   #14892       +/-   ##
============================================
+ Coverage     3.86%   20.92%   +17.06%     
- Complexity       0    21149    +21149     
============================================
  Files          494     6057     +5563     
  Lines        42888   549556   +506668     
  Branches      8141    73477    +65336     
============================================
+ Hits          1657   115019   +113362     
- Misses       40999   421086   +380087     
- Partials       232    13451    +13219     
Flag Coverage Δ
uitests 3.86% <ø> (ø)
unittests 22.37% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

…, refactor exception

Signed-off-by: Brad House <bhouse@nexthop.ai>

This branch has not been deployed

No deployments
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.

1 participant