Self-generation of .rules
/AGENT.md
#35534
Cretezy
started this conversation in
Feature Ideas / Enhancements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi. I've been working on a prompt which can help scaffold
.rules
files with a basic overview of the project being worked on. I think having a built-in method of running this prompt (e.g. a menu item in the agent panel's top-right menu called "Generate rules") could be useful, and I'm currently looking for feedback on this feature before starting implementation. This feature isn't required to run the following prompt, although having a one-click button would definitely simplify it's usage.Here's the prompt:
I've found this generates a very strong base of the
.rules
file to be refined by a human after. I've tested this with Sonnet 4 and Gemini 2.5 Pro/Flash, and they have all yielded good results (I haven't tested other models, but I assume most SOTA models would give good results too).Here's an example of the prompt's result on Zed's codebase
Zed Project Rules and Structure
Overview
Zed is a high-performance, multiplayer code editor written in Rust. It's built from the ground up with collaboration, AI integration, and extensibility as core features.
Language and Toolchain
Core Technologies and Frameworks
GUI Framework
Key Libraries and Services
Project Structure
Workspace Organization
The project uses a Cargo workspace with 180+ internal crates organized in
/crates/
:Core Infrastructure
gpui
: GPU-accelerated UI frameworkutil
: Common utilities and macroscollections
: Custom collection typesfs
: File system abstractionrpc
: Remote procedure call systemproto
: Protocol definitionsEditor Core
editor
: Core text editing functionalitytext
: Text manipulation and rope data structurelanguage
: Language support and LSP integrationproject
: Project management and file operationsworkspace
: Workspace and pane managementbuffer_diff
: Text diffing algorithmsUI Components
ui
: Base UI components and stylingtheme
: Theme system and managementmenu
: Menu systempicker
: Fuzzy finder interfacecommand_palette
: Command palette implementationterminal_view
: Integrated terminalFeatures
search
: Search and replace functionalitydiagnostics
: Error/warning displaycopilot
/supermaven
: AI code completionvim
: Vim keybindings modegit_ui
: Git integration UIdebugger_ui
: Debug adapter protocol supportextensions_ui
: Extension managementCollaboration
collab
: Server-side collaboration logiccollab_ui
: Client-side collaboration UIcall
: Audio/video calling featureschannel
: Team channels and messagingclient
: Client networking layerAI Integration
language_model
: AI language model abstractionlanguage_models
: Collection of LLM providersassistant_*
: AI assistant features and toolsanthropic
,open_ai
,google_ai
: Provider-specific implementationsExtension System
extension
: Core extension runtimeextension_host
: Extension hosting and managementlanguage_extension
: Language-specific extensions/extensions/
Key Directories
/assets/
: Icons, fonts, and other static resources/docs/
: Documentation (mdBook format)/script/
: Build, deployment, and utility scripts/extensions/
: Built-in and example extensions/.github/workflows/
: CI/CD pipeline definitionsDevelopment Guidelines
Code Style
anyhow::Result
Architecture Patterns
Testing
Build and Deployment
Build System
/script/
CI/CD Pipeline
Infrastructure
Extension Development
Key Configuration Files
Cargo.toml
: Workspace and dependency managementrust-toolchain.toml
: Rust version pinningclippy.toml
: Linting configuration.github/workflows/ci.yml
: Main CI pipelinecompose.yml
: Local development servicesDockerfile-*
: Container definitions for different servicesDevelopment Workflow
script/bootstrap
for initial setupcargo run
starts the development versionscript/linux
orscript/bundle-mac
for platform buildsscript/zed-local --dev-server-token
This structure enables rapid development while maintaining code quality and supporting the complex requirements of a modern collaborative code editor.
Beta Was this translation helpful? Give feedback.
All reactions