How coderamp-labs/gitrules works
Gitrules is a browser-based composer for AI coding context files. Users select agents, rules, and MCP presets, edit them in a persistent workspace, then generate files and a one-click installer script. A separate recommendation flow ingests repository context and uses an LLM to suggest a minimal selection. The graph includes the documented search and MCP-facing capabilities; some route and UI wiring is inferred only from module names or README descriptions because those sources were not sampled.
Main entry points: actions_loader.py Action loader · main.py FastAPI application · workspace_manager.js Workspace state · generate.py File generation
Components 18
Web workspace
- FastAPI application
app/main.py - Workspace state
app/static/js/workspace_manager.js - Context controls
app/static/js/context_manager.js - File tree UI
app/static/js/file_tree.js - Monaco editor UI
app/static/js/monaco_editor.js
Action catalog
- Action presets
app/actions - Action models
app/models/actions.py - Action loader
app/services/actions_loader.py - Action API
app/routes/actions.py - Fuzzy search
app/services/search_service.py
Generation and install
- File generation
app/routes/generate.py - Install script sharing
app/routes/generate.py
Discovery and recommendations
- Recommendations API
app/routes/recommend.py - Repository ingestion
app/services/smart_ingest.py - Tool recommendation
app/services/recommend_tools.py
Other components
- Workspace user
- Gitingest service
- LLM service
Connections 18
- Workspace user → FastAPI application: opens workspace
- FastAPI application → Workspace state: serves workspace
- Workspace state → Context controls: manages contexts
- Workspace state → File tree UI: renders files
- Workspace state → Monaco editor UI: edits files
- FastAPI application → Action API: mounts routes
- Action API → Action loader: loads actions
- Action loader → Action presets: reads presets
- Action loader → Action models: builds models
- Fuzzy search → Action loader: searches catalog
- FastAPI application → File generation: mounts routes
- File generation → Action loader: loads selections
- File generation → Install script sharing: generates installer
- Workspace user → Recommendations API: requests suggestions
- Recommendations API → Repository ingestion: ingests repository
- Repository ingestion → Gitingest service: submits repository
- Recommendations API → Tool recommendation: requests selection
- Tool recommendation → LLM service: requests recommendations