Skip to content

docs: Add review discipline guidelines to CLAUDE.md - #68

Merged
ilblackdragon merged 3 commits into
nearai:mainfrom
zmanian:docs/review-discipline-guidelines
Feb 14, 2026
Merged

ilblackdragon merged 3 commits into
nearai:mainfrom
zmanian:docs/review-discipline-guidelines

Conversation

@zmanian

@zmanian zmanian commented Feb 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Codifies lessons learned from Illia's review fixes on the libSQL backend PR (feat: add libSQL/Turso embedded database backend #47) -- patterns we missed that should be caught systematically going forward
  • Bans .expect() alongside .unwrap() in production code, adds mechanical grep checks
  • New "Review & Fix Discipline" section: fix all pattern instances not just the flagged one, propagate architectural changes to satellite types, schema translation must include indexes and seed data, feature flag testing in isolation

Test plan

  • Verify CLAUDE.md renders correctly on GitHub
  • No code changes, documentation only

Generated with Claude Code

Codifies lessons learned from Illia's review fixes on the libSQL
backend PR -- patterns we missed that should be caught systematically
going forward.

- Ban .expect() alongside .unwrap() in production code
- Add mechanical grep checks before committing
- New "Review & Fix Discipline" section covering:
  - Fix all instances of a pattern, not just the one flagged
  - Propagate architectural changes to satellite types
  - Schema translation must include indexes and seed data
  - Feature flag testing with each feature in isolation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @zmanian, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces significant updates to the project's documentation, specifically enhancing the CLAUDE.md file. The primary goal is to codify lessons learned from past code reviews into actionable guidelines, improving code quality and consistency across the codebase. It focuses on stricter error handling practices and establishes a new 'Review & Fix Discipline' section to guide developers in addressing issues more comprehensively.

Highlights

  • Error Handling Guidelines Updated: The documentation now explicitly bans the use of .expect() in production code, alongside .unwrap(), and recommends mechanical grep checks for both before committing.
  • New Review & Fix Discipline Section: A comprehensive new section has been added, outlining best practices for code review and bug fixing. This includes fixing patterns across the codebase, propagating architectural changes to related types, ensuring thorough schema translation (including indexes and seed data), and isolated testing for feature flags.
Changelog
  • CLAUDE.md
    • Updated error handling guidelines to include .expect() alongside .unwrap() as forbidden in production code.
    • Added a new guideline to grep for .unwrap() and .expect() before committing.
    • Introduced a new top-level section titled 'Review & Fix Discipline' with several sub-sections.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request significantly improves the development guidelines in CLAUDE.md by codifying important review and fix disciplines. The explicit ban on .expect() alongside .unwrap() in production code is a great step for robustness. The new 'Review & Fix Discipline' section provides excellent, practical advice on holistic bug fixing, handling architectural changes, schema migrations, and feature flag testing. I've added one minor suggestion to refine one of the grep commands for mechanical verification to make it more concise and robust. Overall, these are valuable additions that will help maintain code quality and consistency.

Comment thread CLAUDE.md Outdated
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@ilblackdragon
ilblackdragon merged commit d9ff86d into nearai:main Feb 14, 2026
11 checks passed
@github-actions github-actions Bot mentioned this pull request Feb 14, 2026
@zmanian
zmanian deleted the docs/review-discipline-guidelines branch February 14, 2026 05:51
serrrfirat pushed a commit to serrrfirat/ironclaw that referenced this pull request Feb 16, 2026
* docs: Add review discipline guidelines to CLAUDE.md

Codifies lessons learned from Illia's review fixes on the libSQL
backend PR -- patterns we missed that should be caught systematically
going forward.

- Ban .expect() alongside .unwrap() in production code
- Add mechanical grep checks before committing
- New "Review & Fix Discipline" section covering:
  - Fix all instances of a pattern, not just the one flagged
  - Propagate architectural changes to satellite types
  - Schema translation must include indexes and seed data
  - Feature flag testing with each feature in isolation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Apply suggestions from code review

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Illia Polosukhin <ilblackdragon@gmail.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
jaswinder6991 pushed a commit to jaswinder6991/ironclaw that referenced this pull request Feb 26, 2026
* docs: Add review discipline guidelines to CLAUDE.md

Codifies lessons learned from Illia's review fixes on the libSQL
backend PR -- patterns we missed that should be caught systematically
going forward.

- Ban .expect() alongside .unwrap() in production code
- Add mechanical grep checks before committing
- New "Review & Fix Discipline" section covering:
  - Fix all instances of a pattern, not just the one flagged
  - Propagate architectural changes to satellite types
  - Schema translation must include indexes and seed data
  - Feature flag testing with each feature in isolation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Apply suggestions from code review

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Illia Polosukhin <ilblackdragon@gmail.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
bkutasi pushed a commit to bkutasi/ironclaw that referenced this pull request Mar 28, 2026
* docs: Add review discipline guidelines to CLAUDE.md

Codifies lessons learned from Illia's review fixes on the libSQL
backend PR -- patterns we missed that should be caught systematically
going forward.

- Ban .expect() alongside .unwrap() in production code
- Add mechanical grep checks before committing
- New "Review & Fix Discipline" section covering:
  - Fix all instances of a pattern, not just the one flagged
  - Propagate architectural changes to satellite types
  - Schema translation must include indexes and seed data
  - Feature flag testing with each feature in isolation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Apply suggestions from code review

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: Illia Polosukhin <ilblackdragon@gmail.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants