Back to the catalog

sustainable-rails

Review and design Rails applications using sustainability principles from 'Sustainable Web Development with Ruby on Rails' by David Bryant C

Open source Open in the app JSON README (API)

About

Review and design Rails applications using sustainability principles from 'Sustainable Web Development with Ruby on Rails' by David Bryant Copeland.

Details

Kind
Plugins
Topic
No topic detected
Publisher
mcrundo
Origin
gemini
Category
ferramentas
Version
1.0.0
Last push
2026-05-19T00:56:57Z
Repository state
ativo
Added
2026-08-30 14:13:39
Updated
2026-08-30 14:13:39
Origin id
mcrundo/sustainable-rails-gemini

README

# Sustainable Rails Extension for Gemini CLI

A Gemini CLI extension based on [Sustainable Web Development with Ruby on Rails](https://sustainable-rails.com) by David Bryant Copeland.

This is the Gemini CLI port of [sustainable-rails-skill](https://github.com/mcrundo/sustainable-rails-skill) (Claude Code). The reference material is identical; the wrapper format is adapted for Gemini's extension system (manifest, TOML commands, subagent).

## Install

```bash
gemini extensions install https://github.com/mcrundo/sustainable-rails-gemini
```

Then restart Gemini CLI (slash-command and agent definitions are loaded on startup).

## Components

- **`GEMINI.md`** — Always-loaded context with architecture, principles, and the reference index.
- **`/sustainable:review`** — Slash command that reviews uncommitted (or staged / branch) changes.
- **`/sustainable:analyze`** — Slash command that runs a full codebase sustainability audit.
- **`@sustainable-rails-reviewer`** — Subagent invokable directly; both commands above delegate to it.
- **`references/`** — 25 condensed reference files (core / patterns / topics / examples).

## What It Checks

- **Business logic placement** — Logic belongs in service classes, not Active Records
- **Database integrity** — Constraints (NOT NULL, FK, CHECK, unique indexes) enforce correctness
- **Model health** — Thin models, minimal callbacks, no scope-as-business-logic
- **Controller health** — Controllers as "configuration", no business logic
- **Boundary classes** — Jobs, mailers, rake tasks delegate to services
- **Routes** — Canonical `resources` with `only:`, no unused routes
- **Testing strategy** — System tests for flows, unit tests for services, constraint tests for models

## Core Idea

> Business logic is complex and changes frequently. Classes used everywhere (Active Records) amplify bugs. Therefore: keep Active Records simple, put business logic in isolated service classes where bugs are contained.

## Notes

- Subagents are a preview feature in Gemini CLI (introduced April 2026) and the schema may evolve. If a future Gemini CLI release changes the `agents/*.md` frontmatter, update `agents/sustainable-rails-reviewer.md` accordingly.
- The `references/` tree is copied from the Claude Code version and will drift over time. The canonical source is the Claude repo; bring changes here manually.

More