格里戈里
一种用于管理编码上下文的桌面应用程序,AI助手可以通过MCP(模型上下文协议)访问。
概述
Grigori帮助您以结构化的方式定义和组织编码标准、架构模式和开发偏好。它运行一个本地MCP服务器,AI编码助手(如Claude Code)可以连接到该服务器,让他们访问您的个性化编码上下文。
特性
编码上下文
- 编码模式 -您一致使用的文档模式(例如,“存储库模式”、“CQRS”)
- 设计首选项 -用基本原理和优先级定义你的编码风格选择
- 回避规则 -指定要避免的模式和做法,并注明严重程度
体系结构上下文
- 架构模式 -使用ASCII图定义分层架构
- 层依赖关系 -指定层之间允许和禁止的依赖关系
- 代码模板 -可重用的代码模板,带有脚手架占位符
- 命名规范 -不同上下文(DTO、存储库等)的文档命名模式
MCP集成
- 内置MCP服务器提供40多种读写上下文工具
- 从Claude Code、Cursor或任何兼容MCP的客户端连接
- AI助手可以在帮助您编码的同时查询您的编码标准
入门指南
先决条件
- .NET 10 SDK
- Windows、macOS或Linux(通过MAUI)
构建与运行
# Clone the repository
git clone https://github.com/andres-m-rodriguez/Grigori.git
cd Grigori
# Build
dotnet build
# Run the desktop app
dotnet run --project src/Grigori.Desktop从克劳德代码连接
添加到您的Claude Code MCP设置中:
{
"mcpServers": {
"grigori": {
"url": "http://localhost:3001/sse"
}
}
}MCP工具
编码上下文工具
| 工具 | 说明 |
|---|---|
get_coding_context | 通过markdown获取完整的编码上下文 |
get_coding_patterns | 以JSON格式获取所有编码模式 |
get_design_preferences | 以JSON格式获取所有设计首选项 |
get_avoidance_rules | 以JSON格式获取所有避免规则 |
search_context | 在所有上下文中搜索关键字 |
add_coding_pattern | 添加新的编码模式 |
add_design_preference | 添加新的设计首选项 |
add_avoidance_rule | 添加新的回避规则 |
架构上下文工具
| 工具 | 说明 |
|---|---|
get_architecture_context | 通过markdown获取完整的架构上下文 |
get_architecture_patterns | 获取所有架构模式 |
get_active_architecture_pattern | 获取当前活动模式 |
add_architecture_pattern | 添加新的架构模式 |
add_architecture_layer | 向图案添加图层 |
add_layer_dependency | 定义允许/禁止的依赖关系 |
get_code_templates | 获取所有代码模板 |
add_code_template | 添加新的代码模板 |
get_naming_conventions | 获取所有命名约定 |
add_naming_convention | 添加新的命名约定 |
项目结构
src/
├── Grigori.Desktop/ # MAUI Blazor Hybrid desktop app
│ ├── Components/ # Blazor pages and components
│ └── Mcp/ # MCP server integration
├── Grigori.Contracts/ # DTOs and repository interfaces
├── Grigori.DataAccess/ # Repository implementations
├── Grigori.Database/ # EF Core DbContext and models
└── Grigori.Common.Pagination/ # Cursor-based pagination技术栈
- .NET 10 -最新。NET运行时
- MAUI混合型 -跨平台桌面用户界面
- 泥浆 -材料设计组件库
- SQLite -本地数据库存储
- Entity Framework Core -ORM
- 最小Mcp -MCP服务器实现
- Blazing奇点 -异步命令状态管理
出口
“设置”页面包括一个导出功能,可以生成 CLAUDE.md-样式文件,适用于不使用MCP的项目。
许可证
麻省理工学院
