real-world-rails
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseRails Pattern Research
Rails模式研究
What This Is
这是什么
The Real World Rails repository is a collection of 200+ production Rails
application source code. The directory contains the full source of
each app — models, migrations, schema, controllers, views, concerns, gems.
The directory contains Rails engines.
apps/engines/Notable apps in the collection include Discourse, Mastodon, GitLab, Chatwoot,
Gumroad, Spree, Solidus, Redmine, Canvas LMS, Loomio, Fat Free CRM,
Locomotive CMS, Camaleon CMS, and many others. Recent additions include
37signals apps: Upright (monitoring), Fizzy (kanban), and Campfire (chat).
Real World Rails仓库是一个包含200多个生产环境Rails应用源代码的集合。目录下包含每个应用的完整源代码——模型、迁移文件、数据库架构、控制器、视图、关注点模块、gem依赖。目录下则包含Rails引擎。
apps/engines/该集合中的知名应用包括Discourse、Mastodon、GitLab、Chatwoot、Gumroad、Spree、Solidus、Redmine、Canvas LMS、Loomio、Fat Free CRM、Locomotive CMS、Camaleon CMS等。近期新增的应用包括37signals的几款产品:Upright(监控工具)、Fizzy(看板工具)和Campfire(聊天工具)。
Locating the Repository
定位仓库
Look for a directory called with an subdirectory.
Check the current working directory first, then . If
not found, ask the user where it lives.
real-world-railsapps/~/src/real-world-rails寻找名为的目录,该目录下应有子目录。首先检查当前工作目录,然后检查。如果未找到,请询问用户仓库的位置。
real-world-railsapps/~/src/real-world-railsWhat To Do
操作步骤
The user gives you a topic. Spin up parallel agents to search the apps for
how real codebases implement that pattern. Read actual code — models,
schemas, migrations, associations, validations, query patterns — not just
file names. Synthesize what you find into a clear analysis.
If the user's wording suggests they want help choosing a pattern for their
current project (words like "compare for us", "which fits best",
"adversarial", "debate", "evaluate for our project"), also spin up adversarial
agents that each argue for a different pattern in the context of the current
project's architecture and goals.
用户给出一个主题后,启动并行Agent搜索各个应用,查看真实代码库如何实现该模式。要阅读实际代码——包括模型、数据库架构、迁移文件、关联关系、验证规则、查询模式——而不仅仅是文件名。将发现的内容整理成清晰的分析报告。
如果用户的表述表明他们需要为当前项目选择合适的模式(例如使用“为我们对比”、“哪种更合适”、“对比分析”、“辩论”、“针对我们的项目评估”等词汇),还需要启动对立观点的Agent,针对当前项目的架构和目标,分别为不同的模式进行论证。