2.6 KiB
2.6 KiB
Agent Guide
Also see the other related technical documentation in the docs folder.
Tools
These tools are installed and available: Python3, geckodriver, Selenium
Rules
- Prefer extracting code to a shared helper to be reused instead of duplicating code. Always keep high maintainability standards.
- Always place each newly created class into its own file. The file name must match the class name.
- When asked to begin working on a task, create a detailed implementation plan first, present the plan to the user, and ask for approval before beginning with the actual implementation.
- Don't make assumptions in the plan. If necessary, ask all clarifying questions before presenting the final plan.
- When an task is finished, perform a code review to evaluate if the change is clean and maintainable with high software engineering standards. Iterate on the code and repeat the review process until satisfied.
- If there's documnentation present, always keep it updated.
- After every iteration, evaluate if the test coverage would fall below 100%, and write tests if necessary.
- After every iteration, run
dotnet jb cleanupcode --build=False '$file1' '$file2' ...for every C# file you touched. - After every frontend change, verify the results using a geckodriver+Selenium run.
- When browser verification needs the app running, launch the app against a temporary copy of
src\RolemasterDb.App\rolemaster.dbso verification does not mutate the canonical DB.
Git
- Never change the .gitignore file without consent.
- Keep changes small with minimal churn and commit often. If one iteration encompasses many smaller tasks with more than one commit, create a git branch and do the commits there. Let me review the branch before merging it back to master.
- When multiple commits are necessary, pause after every commit and ask the user to give a command to proceed.
- After every iteration, do a git commit with a brief summary of the changes as a commit message.
- If you find unexpected changes in the code (deletions, changes, diff results that were not communicated), never revert them and never restore the old state. Assume that those changes happened with intent.
- Never use
git restore,git checkout --, reset commands, or equivalent rollback actions to discard local changes unless the user explicitly asks for that exact rollback.
Dotnet CLI
- If you need a separate output directory, use a subfolder under
artifacts, and clean it up afterwards. - Avoid running
dotnet buildanddotnet testin parallel in this repo; that can cause file-lock failures inobj\Debug\net10.0.