cd /news/developer-tools/rules-for-ai-agents · home topics developer-tools article
[ARTICLE · art-114841] src=gist.github.com ↗ pub= topic=developer-tools verified=true sentiment=· neutral

rules for ai agents

A developer published a set of mandatory coding guidelines for AI agent development, emphasizing branch management, code quality principles, and syntax verification. The rules require contributors to avoid direct commits to main, use descriptive branch names, and run 'node --check' before submitting pull requests.

read2 min views1 publishedAug 29, 2026

This document contains mandatory guidelines to keep our codebase clean, maintainable, and error-free. Every contributor is required to adhere to these rules before and during the development process.

Before you write your first line of code, you must complete the following two steps:

Never commit code directly to the main branch (main

/master

).

Branch Format:change-type/feature-name

Examples:feature/add-login

(for new features)bugfix/fix-broken-api

(for bug fixes)refactor/clean-calc-function

(for code quality improvements)

Ask yourself (or discuss with the team) before you start typing code:

**Do I fully understand the problem or feature that needs to be worked on?****What is the best data structure and logical flow for this implementation?****Does this change have the potential to break existing functionalities (breaking changes)?**How will I test this code to ensure it actually works and is secure?

Apply the following professional programming principles to ensure your code remains highly readable for other engineers:

DRY Principle (Don't Repeat Yourself): Do not write duplicate code. Extract repetitive logic into reusable functions or components.KISS Principle (Keep It Simple, Stupid): Write straightforward logic that goes directly to the point. Avoid over-engineering or making code unnecessarily complex.Meaningful Names: Use variable and function names that clearly describe their purpose (e.g.,isUserLoggedIn

is better thanstatus

). Consistently use English for all naming conventions.Single Responsibility: A single function or module should do only one thing well. If a function grows too long, split it into smaller sub-functions.Remove Dead Code: Do not leave commented-out code or unused variables in the repository.

To ensure your code is free of critical errors before submitting a Pull Request, perform this mandatory verification:

Use the native Node.js command to check the validity of your code's syntax without running it:

node --check filename.js

Note:Ensure the command above yields no errors or warnings before pushing your changes to the remote repository.

git checkout main && git pull origin main

(Ensure your local code is up to date).git checkout -b feature/new-feature-name

(Create a new branch).- Think through and answer the 4 Crucial Questions listed above. - Write your code adhering to professional cleanliness standards.

  • Run node --check <file>

for syntax verification. git add . && git commit -m "feat: clear description of changes"

.git push origin feature/new-feature-name

and open a Pull Request.

── more in #developer-tools 4 stories · sorted by recency
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
Live at https://your-agent.zahid.host
Get free account → Pricing
from €0/mo · no card required
LIVE [news/rules-for-ai-agents] indexed:0 read:2min 2026-08-29 ·