Update Pearls
Write the user's requested change into DESIGN.md. Make the edit surgical — add, modify, or remove only the sections affected by t…
Claude CodeGeneric
Write the user's requested change into DESIGN.md. Make the edit surgical — add, modify, or remove only the sections affected by the change. Do not rewrite unrelated parts of the document.
Next, use red-green testing on the consistency test to bring TEST_CASES.md and main_test.go into full consistency with the updated design:
1. Run `RUN_CONSISTENCY_CHECKS=1 go test -v -run TestConsistency_DesignToTestCases -count=1` to check whether TEST_CASES.md is consistent with the new DESIGN.md.
2. If the test fails, read the checker output to understand what is inconsistent. Update TEST_CASES.md to resolve the inconsistencies. Re-run the test. Repeat until it passes.
3. Run `RUN_CONSISTENCY_CHECKS=1 go test -v -run TestConsistency_TestCasesToTests -count=1` to check whether main_test.go is consistent with the updated TEST_CASES.md.
4. If the test fails, read the checker output to understand what is inconsistent. Update main_test.go to resolve the inconsistencies. Re-run the test. Repeat until it passes.
Then, use red-green testing on main_test.go to bring the implementation into full consistency with the updated tests:
5. Run `make build && go test -v -count=1 ./...` (or with `-tags testcontainers` if no local Postgres is available) to execute the full test suite.
6. If any tests fail, read the failures and update main.go and/or schema.sql to make them pass. Re-run the test suite. Repeat until all tests pass.
7. Run `RUN_CONSISTENCY_CHECKS=1 go test -v -run TestConsistency_DesignToSchema -count=1` to verify schema.sql is still consistent with DESIGN.md. If it fails, fix schema.sql and repeat.
Important rules:
- DESIGN.md is the source of truth. All other files derive from it.
- Never weaken or remove a test to make it pass. Fix the implementation instead.
- Each red-green cycle should make incremental progress. If a cycle is not making progress after 3 attempts, stop and report the issue to the user.
- Keep changes minimal and focused on what the user asked for. Do not refactor unrelated code.
$ARGUMENTS
Maintain Update Pearls?
Let people know it's listed here — add the badge (live metrics, light/dark aware) or a plain link to your README or docs.
[Update Pearls on getagentictools](https://getagentictools.com/loops/alanchin-dev-update-pearls?ref=badge) npx agentictools info loops/alanchin-dev-update-pearls The second line is the CLI lookup for this page — handy in READMEs and docs.