The Fabric Token SDK project leverages AI agents to streamline development, maintenance, and testing. To ensure consistent and high-quality results when using AI agents, please follow the guidelines below.
The AGENTS.md file in the root directory is the primary source of truth for AI agents. It provides a comprehensive overview of the project's architecture, key components, building instructions, and development conventions.
When starting a session with an AI agent, ensure it has read this file to understand the project's specific context.
Before asking an agent to implement a feature or fix a bug, ensure it performs a research phase.
- Goal: Understand existing patterns and dependencies.
- Action: Use tools like
grep_search,glob, andread_fileto map the codebase. - Verification: Always verify assumptions by reading the actual source code.
Never apply a fix based on an observation alone.
- Goal: Confirm the failure state and prevent regressions.
- Action: Ask the agent to create a reproduction script or a new test case that fails before implementing the fix.
The agent must adhere to the project's Go coding standards.
- Goal: Maintain a seamless and maintainable codebase.
- Action: Reference Writing idiomatic, effective, and clean Go code and ensure the agent uses
make lint-auto-fixafter making changes.
Validation is the only path to finality.
- Goal: Ensure correctness and prevent regressions.
- Action: Every change must include a testing strategy. For new features, this means adding unit tests or integration tests. For bug fixes, it means verifying the fix with the reproduction case.
- Mandate: Always run
make unit-testsand relevant integration tests (e.g.,make integration-tests-fabtoken-fabric-t1).
Keep changes focused and minimal.
- Goal: Reduce complexity and make reviews easier.
- Action: Instruct the agent to perform surgical updates rather than broad refactorings, unless specifically requested.
- Bug Fixing: Research -> Reproduce -> Strategy -> Fix -> Validate.
- Feature Addition: Research -> Design -> Strategy -> Implement -> Test -> Validate.
- Documentation: Research -> Draft -> Review -> Refine.
If an agent provides suboptimal results, provide specific feedback based on the project's conventions.
Update AGENTS.md if there are persistent misunderstandings about the project's architecture or standards.