docs: add Verification patterns and Bug Fixing Process sections to AGENTS.md
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -252,6 +252,27 @@ curl -X POST http://localhost:8080/webhooks/nexus \
|
||||
|
||||
---
|
||||
|
||||
## Verification patterns
|
||||
|
||||
- Always run tests after making code changes. Report exact result: pass/fail count and any failure messages.
|
||||
- Never say "tests pass" without running `make test` yourself.
|
||||
- When adding a feature, also test boundary cases and error paths, not just the happy path.
|
||||
- After fixing a bug, add a regression test that reproduces the original failure. The regression test must fail before your fix and pass after. If you cannot write such a test, your fix may not be addressing the root cause.
|
||||
- When a test fails, do NOT delete, skip, or weaken it. Investigate: is the test wrong (rewrite it) or is your code wrong (fix the code)?
|
||||
- Use `make check` (lint + format + typecheck + test) as the final gate before considering a task complete.
|
||||
|
||||
---
|
||||
|
||||
## Bug Fixing Process
|
||||
|
||||
- Reproduce first: identify the exact failing behavior. If possible, capture it as a failing test.
|
||||
- Minimal change: edit only the lines required to fix the bug. Do not rewrite larger sections "for cleanliness" unless you also rewrite the tests.
|
||||
- After fixing, verify with the same command that failed before (e.g., `make test`, a curl command, or a manual check).
|
||||
- Check for side effects: does your fix change behavior in an unrelated area? Run the full `make test` to be sure — partial test runs may miss regressions in other modules.
|
||||
- Document the fix: after resolving, briefly note what went wrong and how you diagnosed it. This becomes part of the team knowledge base for future reference.
|
||||
|
||||
---
|
||||
|
||||
## Notes
|
||||
|
||||
- **AI-generated code:** all code in this repository was generated by an AI assistant (Claude). Review carefully before production use.
|
||||
|
||||
Reference in New Issue
Block a user