Repository navigation
Add AGENTS.md file - #4162
Add AGENTS.md file#4162
Conversation
Summary of ChangesHello, 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 a new documentation file, Highlights
Changelog
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
Code Review
This pull request introduces a new AGENTS.md file, which serves as a comprehensive guide to the COLMAP codebase, primarily for AI agents. It also includes minor improvements to the .gitignore file. The new documentation is well-structured and detailed. I've provided a couple of suggestions to improve the accuracy of the build instructions and the module dependency hierarchy described in AGENTS.md.
## Summary Adds a reusable [Agent Skill](https://agentskills.io) (`.agents/skills/colmap-review/SKILL.md`) that instructs coding agents (Codex, Gemini CLI, Cursor, Claude Code, etc.) to perform maintainer-grade code reviews on COLMAP changes — uncommitted diffs, commits/branches, or GitHub PRs — without modifying code. This complements `AGENTS.md` (#4162): agents load only the short frontmatter description by default and pull in the full review instructions on demand (e.g. `"review this"` or `"review my PR"`), and `AGENTS.md` links to it for harnesses without native skill discovery, keeping regular coding sessions lean. ### What it covers - **Modularity, readability & diff size:** Prefers short, cohesive functions with self-documenting names and tightly scoped (`const`) variables over long functions with wide scopes or opaque blocks, checks whether sub-steps can be extracted into helpers or already exist in COLMAP (`math/`, `geometry/`, `sensor/`, `scene/`, `estimators/`), removes dead code and speculative options, and pushes scattered `if/else` plumbing behind existing domain abstractions (`Camera`, `Rig`, `Frame`, `TwoViewGeometry`). - **Geometric, numerical & SfM/MVS correctness:** Non-perspective/fisheye/spherical camera rays (`CamRayFromImg` vs. `CamFromImg`), pixel-center (`+0.5`) vs. integer-grid coordinate conventions, panoramic seam wrap-around, solver conditioning/degeneracies (including on the final RANSAC inlier set) and convergence/`allFinite()` checks, RANSAC vs. Ceres outlier/cheirality residual semantics, missing Ceres manifolds (`EigenQuaternionManifold`, `SphereManifold`), `target_from_source` frame and `Rig` composition, and `FlatHashMap` iteration nondeterminism. - **Safety, `pycolmap` & CI portability:** Precondition checks before mutating `Reconstruction`/`Database`, clean exception propagation (`THROW_CHECK*`) over `LOG(FATAL)` in library/worker code, schema/format backwards compatibility, `pycolmap` container lifetime/GIL/STL copy-conversion/`None`/option-parity hazards, and feature-gate/CUDA/HIP/headless/Windows/formatting portability. - **Performance & empirical evidence:** `O(N^2)` patterns, hot-loop copies/allocations, and requiring benchmark justification (e.g. ETH3D or multi-seed synthetic sweeps) for algorithmic or default-parameter changes. - **Tests & conventions:** Focused C++ regression tests (`*_test.cc`) over bloated `pycolmap` pipeline tests, catching vacuous assertions, reusing COLMAP matchers (`ReconstructionEq`, `Rigid3dNear`, `SynthesizeDataset`, in-memory SQLite), and checking concrete repo conventions (`FlatHashMap`/`NodeHashMap`, strong IDs, `target_from_source`, SPDX headers). - **Actionable output contract:** Every finding must be verified against connected callers in the repo and have either a concrete failure trigger or a concrete simplification, grouped into `Must fix` / `Should fix` / `Nit` with a diff-reduction summary and verdict.
Iterated together with Claude on this to provide context for coding agents to get started in new sessions. This is supposedly the standard way to provide context for various AI tools (Claude, Gemini, Codex, ...).