Skip to content

docs: add AGENTS.md and CONTRIBUTING.md - #186

Merged
grunch merged 2 commits into
mainfrom
docs/add-agents-contributing
Jul 17, 2026
Merged

docs: add AGENTS.md and CONTRIBUTING.md#186
grunch merged 2 commits into
mainfrom
docs/add-agents-contributing

Conversation

@grunch

@grunch grunch commented Jul 17, 2026

Copy link
Copy Markdown
Member

What

Adds two contributor-facing guides that did not exist in this repository, adapted to the Rust core + Flutter shell architecture:

  • AGENTS.md — follows the MostroP2P/mobile template, adapted to this hybrid project. Covers project structure, the golden rule (logic → Rust, UI → Dart, no crypto in Dart), build/test commands, coding style, and commit/PR conventions. Adds an explicit Language section requiring that everything published to the repo be in English, with localized UI copy (Flutter l10n ARB) as the only exception.
  • CONTRIBUTING.md — follows the MostroP2P/mostro template, adapted to this project. Covers communication channels, contributor workflow, protocol/transport-change guidance (transport v2, kebab-case wire status), PR review conventions (ACK/NACK/utACK/Concept ACK/Nit), formatting checks, and clean-history rules.

Why

The repo had no AGENTS.md or CONTRIBUTING.md. Conventions (English-only, one-PR-per-feature, the Rust/Dart layering, FRB codegen rules) were only implicit or lived in CLAUDE.md. These files make them discoverable to human and agent contributors.

Notes

  • Commands and paths were verified against the actual repo layout (rust/src/api, lib/l10n/app_{en,es,fr,de,it}.arb, flutter_rust_bridge_codegen generate, etc.).
  • Docs-only change; no code touched.

Test plan

  • Render both files on GitHub and confirm links resolve
  • markdownlint MD040 clean (fenced blocks have language specifiers)

Summary by CodeRabbit

  • Documentation
    • Added repository-wide contribution and development guidelines.
    • Documented project architecture, coding conventions, testing, formatting, localization, and build commands.
    • Added guidance for pull requests, commits, protocol changes, generated code, and documentation updates.

Add contributor-facing guidance adapted to the Rust core + Flutter shell
architecture:

- AGENTS.md: project structure, the golden rule (logic in Rust, UI in
  Dart, no crypto in Dart), build/test commands, coding style, commit and
  PR conventions. Mandates that everything published to the repo be in
  English, except localized UI copy.
- CONTRIBUTING.md: communication channels, contributor workflow,
  protocol/transport-change guidance (transport v2, kebab-case wire
  status), PR review conventions (ACK/NACK), formatting checks, and
  clean-history rules.

AGENTS.md follows the MostroP2P/mobile template; CONTRIBUTING.md follows
the MostroP2P/mostro template, both adapted to this hybrid project.
@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@grunch, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 53 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 531fa1b0-435d-4c49-8952-e04816913006

📥 Commits

Reviewing files that changed from the base of the PR and between 5853698 and daf4bee.

📒 Files selected for processing (2)
  • AGENTS.md
  • CONTRIBUTING.md

Walkthrough

Adds repository-wide documentation covering Mostro v2 architecture, Rust/Flutter boundaries, development commands, coding and testing conventions, and contribution workflow requirements.

Changes

Contribution guides

Layer / File(s) Summary
Architecture and development guidance
AGENTS.md
Documents repository structure, Rust/Flutter responsibilities, FRB boundaries, commands, coding conventions, testing practices, and documentation requirements.
Contributor workflow guidance
AGENTS.md, CONTRIBUTING.md
Defines contribution workflow, protocol and transport guidance, review labels, validation commands, commit conventions, and Git history practices.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

  • MostroP2P/app#7: Adds related documentation for the Rust–Dart responsibility boundary.

Poem

A rabbit reads the rules with glee,
Rust guards the core, Dart tends the tree.
Commands and commits now hop in line,
FRB paths glow with guidance fine.
“Contribute well!” sings Bunny bright.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the docs-only addition of AGENTS.md and CONTRIBUTING.md.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/add-agents-contributing

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 58536984c0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread CONTRIBUTING.md Outdated

- **Rust:** `cd rust && cargo fmt && cargo clippy && cargo test` — keep the tree `clippy`-clean.
- **Dart:** `dart format .`, then `flutter analyze && flutter test` — keep it analyzer-warning-free.
- **Bindings:** run `flutter_rust_bridge_codegen generate` after any change to `rust/src/api/`, and commit the regenerated `lib/src/rust/`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Remove the instruction to commit ignored FRB output

In this repo lib/src/rust/ is intentionally ignored (.gitignore) and the CI workflow regenerates it on the fly (.github/workflows/ci.yml notes it is gitignored), so asking contributors to commit the regenerated directory sends them toward git add -f-ing generated bindings that the repository currently does not track. This can bloat reviews and make PRs conflict with the documented CI workflow; the guidance should say to regenerate locally for analysis/tests, not commit that directory, unless the ignore policy is changed too.

Useful? React with 👍 / 👎.

@coderabbitai coderabbitai 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.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@AGENTS.md`:
- Line 39: Update the Flutter launch command documentation in AGENTS.md to avoid
the shell pipeline syntax: use a shell-safe device placeholder such as <device>,
optionally with separate linux, chrome, and android examples, while preserving
the instruction to launch the app on the selected device.

In `@CONTRIBUTING.md`:
- Line 65: Update the Bindings guidance in CONTRIBUTING.md to remove the
instruction to commit regenerated lib/src/rust/ output, while retaining the
requirement to run flutter_rust_bridge_codegen generate after changes to
rust/src/api/.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 67b5cec1-4727-4497-a37d-d721b5dbfd62

📥 Commits

Reviewing files that changed from the base of the PR and between b8514f5 and 5853698.

📒 Files selected for processing (2)
  • AGENTS.md
  • CONTRIBUTING.md

Comment thread AGENTS.md Outdated
Comment thread CONTRIBUTING.md Outdated
- CONTRIBUTING.md: lib/src/rust/ is gitignored and generated on the fly
  (locally and in CI); stop instructing contributors to commit it.
- AGENTS.md: replace 'flutter run -d linux|chrome|android' (parsed as a
  shell pipeline) with 'flutter run -d <device>' and examples.
@grunch

grunch commented Jul 17, 2026

Copy link
Copy Markdown
Member Author

Thanks @coderabbitai and Codex — both findings were valid and are addressed in daf4bee:

  • CONTRIBUTING.md — verified lib/src/rust/ is gitignored (.gitignore:9, 0 tracked files) and CI regenerates it on the fly (ci.yml: "lib/src/rust/ is gitignored and produced on the fly"). Removed the instruction to commit it; it now says to regenerate locally/CI and not commit.
  • AGENTS.md — replaced flutter run -d linux|chrome|android (parsed as a shell pipeline) with flutter run -d <device> plus examples.

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

@grunch Thanks for verifying the generated-binding workflow and correcting both documentation instructions. The updates in daf4bee address the findings. 🐇


If you found this review helpful, would you consider giving us a shout-out on X?

Thank you for using CodeRabbit!

@grunch
grunch merged commit 357f513 into main Jul 17, 2026
3 checks passed
@grunch
grunch deleted the docs/add-agents-contributing branch July 17, 2026 13:58
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.

1 participant