This document defines strict operational rules for AI agents contributing to the Nevo repository. Agents must follow these rules to ensure safe, minimal, and correct code changes.
-
Every task is tied to a GitHub issue
-
The issue defines:
- Scope
- Target folder
- Expected outcome
-
Do not infer or expand beyond the issue
Before making any changes, the agent must:
-
Identify which folder the issue belongs to:
FrontendBackendContract
-
Restrict all actions to that folder only
❗ NEVER modify multiple folders in a single task
-
Modify only:
- The relevant page folder, OR
- The corresponding
page.tsx
-
Ensure:
- Build succeeds
- UI remains responsive
- Code formatting is consistent
-
Modify only:
- Specific module, controller, or service tied to the issue
-
Ensure:
- Build succeeds
- Formatting is correct
-
Modify only:
- Main contract logic file/module
- Relevant test files
-
Ensure:
- Contracts compile successfully
- All tests pass
- Formatting is correct
⚠️ Contract changes require strict minimalism and correctness
-
Do NOT:
- Refactor unrelated code
- Rename unrelated files
- Introduce unrelated improvements
-
Only implement what is explicitly required
-
NEVER combine:
- Frontend + Backend
- Backend + Contract
- Frontend + Contract
If the current issue requires a feature (from another GitHub issue) that hasn't been implemented yet:
- Do NOT wait for the other issue to be completed
- Instead, create a minimal mock of only what is needed
- The mock should:
- Provide exactly the API or interface required
- Return hardcoded or placeholder data
- Be clearly marked as a mock (in comments, type names like
MockService, or function names) - NOT attempt to implement the full feature from the dependent issue
- Concrete examples:
- Backend API dependency: Create an endpoint that returns hardcoded JSON data
- Contract function dependency: Create a function that returns sample contract data
- External service dependency: Mock the API responses with hardcoded data
- Database queries: Mock the query results with sample data
When an issue requires functionality explicitly linked in another GitHub issue:
- Create a minimal mock version of that functionality
- The mock only needs to provide the minimal data or behavior the current issue requires
- Clearly mark it:
// TODO: Replace with real implementation from issue #XYZ - Do NOT implement the full scope of the dependent issue
- Once the dependent issue is completed, the real implementation will replace the mock
- Agents should complete issues independently without waiting for dependencies
- Mocks are temporary and clearly marked
- Focus on delivering the feature's functionality using mock data
- Maintainers will handle replacing mocks with real implementations later
Before completing a task, the agent must ensure:
- Relevant project builds successfully
- Tests pass (for contract work)
- No syntax or formatting errors exist
- Follow existing patterns in the repository
- Match formatting, naming, and structure
- Do not introduce new patterns unless required
- Do not modify sensitive logic unless explicitly required
- Avoid introducing breaking changes
- Preserve backward compatibility unless instructed otherwise
When completing a task, the agent should:
- Produce minimal diffs
- Clearly reflect issue requirements
- Avoid unnecessary verbosity in code changes
AI agents must:
- Identify the correct folder from the issue
- Modify only necessary files within that folder
- Ensure build/tests pass
- Follow formatting and existing style
- Avoid unrelated or cross-folder changes
Failure to follow these rules will result in rejection of the contribution.