AI工作流智能引导工具

通过智能引导、无缝过渡和仓库模式架构,将AI代理从混乱编码转变为智能工作流编排器,适用于多AI代理开发场景。

  • by Hive-Academy
  • TypeScript
  • 本地部署
  • 125 星标
  • 更新于
在 GitHub 查看 Hive-Academy/Anubis-MCP

使用说明

𓂀𓁢𓋹𝔸ℕ𝕌𝔹𝕀𝕊𓋹𓁢𓂀 - 人工智能工作流程的智能指导

将您的AI代理从混乱的编码器转变为具有三种强大功能的智能工作流编排器:

智能工作流管理的三大支柱

智能引导 | 无缝转换 | 存储库模式架构

NPM包 • Docker Hub • 网站


快速启动

选项1:NPX(推荐)

添加到MCP客户端配置

{
  "mcpServers": {
    "anubis": {
      "command": "npx",
      "args": ["-y", "@hive-academy/anubis"],
      "env": {
        "PROJECT_ROOT": "C:\\path\\to\\projects"
      }
    }
  }
}

选项2:Docker(MCP配置)

对于Unix/Linux/macOS(mcp.json):

{
  "mcpServers": {
    "anubis": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-v",
        "${PWD}:/app/workspace",
        "-v",
        ".anubis:/app/.anubis",
        "hiveacademy/anubis"
      ]
    }
  }
}

对于Windows(mcp.json):

{
  "mcpServers": {
    "anubis": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-v",
        "C:\\path\\to\\your\\project:/app/workspace",
        "-v",
        "C:\\path\\to\\your\\project\\.anubis:/app/.anubis",
        "hiveacademy/anubis"
      ]
    }
  }
}

初始化自定义模式(代理规则)

一旦你让mcp服务器运行,你需要为你正在使用的代理初始化规则(自定义模式)

支持的代理: cursor • copilot • roocode • kilocode

步骤1:初始化智能制导

Please initialize Anubis workflow rules for [your-agent-name] by calling the init_rules MCP tool

步骤2:启动工作流程

Begin a new workflow for [your-project] with Anubis guidance

ROOCODE设置示例

1-安装MCP服务器:

{
  "mcpServers": {
    "anubis": {
      "command": "npx",
      "args": ["-y", "@hive-academy/anubis"],
      "env": {
        "PROJECT_ROOT": "C:\\path\\to\\projects"
      }
    }
  }
}

2-然后确保您处于代码模式,并要求它为您生成自定义Anubis模式

Please initialize Anubis workflow rules for roocode by calling the init_rules MCP tool

3-重新加载窗口,您应该在模式下拉列表中看到自定义模式。激活它并让它创建你的第一个任务

4-如果你没有记忆库文件,作为第一项任务,让它为你生成它们。

光标设置示例

对于Cursor用户,这里有一个完整的设置示例:

  1. 在游标中安装MCP服务器:
    • 打开光标设置(Cmd/Ctrl + ,)
    • 导航到“扩展”→ “MCP服务器”
    • 添加新的服务器配置:
    "anubis": {
      "command": "npx",
      "args": ["-y", "@hive-academy/anubis"],
       "env": {
         "PROJECT_ROOT": "C:\\path\\to\\projects"
       }
    }
    
  2. 初始化游标规则
  • 确保mcp服务器工作正常且处于活动状态。
  • 请代理人 Please initialize Anubis workflow rules for cursor by calling the init_rules MCP tool.
  • 您应该看到在.cursor/rules处生成了一个名为的文件 000-workflow-core.mdc
  • 转到光标规则,确保规则文件已添加并处于活动状态。

现在,您已准备好开始第一项任务🚀.

提示:重要的第一步任务是生成内存库文件 请代理人 Please create a task to analyze codebase and generate memory-bank files (ProjectOverview.md, TechnicalArchitecture.md, and DeveloperGuide.md)

Claude代码设置示例

  • 要安装mcp服务器,请使用以下命令 claude mcp add anubis npx -y @hive-academy/anubis

    确保您位于要安装此程序的poject根目录上。

  • 要确保正确安装,请运行 claude mcp list 您应该看到一个名为的服务器 anubis.

  • 现在,您需要执行一个非常重要的步骤:

    • 下载此规则标记文件 阿努比斯规则
    • 将其保存在项目中,例如文件夹名称中 rules 以及文件名 anubis-rules.md.
    • 然后打开CLAUDE.md文件并添加以下内容: Anubis Workflow @rules/anubis-rules.md

🏆 最新成果(v1.2.11)

存储库模式实施成功 🎯

225%完成率 -迁移了9项服务,超过了目标(目标:4项服务)

已成功迁移服务:

  • ✅ workflow-guidance.service.ts -增强的可测试性和可维护性
  • ✅ step-progress-tracker.service.ts -清洁状态管理
  • ✅ workflow-bootstrap.service.ts -简化引导过程
  • ✅ progress-calculator.service.ts -纯业务逻辑功能
  • ✅ step-query.service.ts -灵活的数据访问策略
  • ✅ step-execution.service.ts -可靠的执行跟踪
  • ✅ role-transition.service.ts -一致的角色管理
  • ✅ execution-data-enricher.service.ts -高效的数据聚合
  • ✅ workflow-guidance-mcp.service.ts -标准化MCP操作

技术卓越成就 🚀

95%类型安全 -增强了整个代码库的TypeScript合规性
零编译错误 -完全消除TypeScript构建问题
可维护性提高75% -通过存储库模式更清晰地分离关注点

MCP协议合规性 🤖

多代理支持 -全面的模板系统,用于:

  • ✅ 光标IDE -智能工作流指导集成
  • ✅ GitHub Copilot -增强的AI助手功能
  • ✅ 房间代码 -简化开发工作流程
  • ✅ Kilo代码 -高级自动化支持

性能优化 ⚡

数据库优化 - 434,176 → 421,888字节(优化存储)
增强的查询性能 -存储库模式实现了高效的数据访问
改进状态管理 -基于ExecutionId的工作流跟踪


🏗️ 卓越建筑

🏆 最近的成就(v1.2.11)

存储库模式实施成功

  • 225%完成率:迁移了9项服务,超过了目标(目标:4)
  • 95%类型安全:增强了整个代码库的TypeScript合规性
  • 零编译错误:完全消除TypeScript构建问题
  • 可维护性提高75%:更清晰的关注点分离

服务已成功迁移

  • 工作流指南.service.ts
  • 循序渐进的跟踪服务.ts
  • workflow-boottrap.service.ts
  • 进度计算器.服务.ts
  • step-query.service.ts
  • step-execution.service.ts
  • 角色转换服务.ts
  • 执行-数据丰富器.service.ts
  • 工作流指南mcp.service.ts

技术亮点

  • ✅ 零TypeScript编译错误 -达到95%的型号安全性
  • ✅ 9服务迁移 -超过4个服务目标225%
  • ✅ 6存储库实现 -完整的数据访问抽象层
  • ✅ 100+存储库方法 -全面的数据库操作
  • ✅ 坚实的原则 -具有依赖注入的干净架构
  • ✅ 事务支持 -跨复杂操作的数据完整性

利用存储库模式的服务

// Example: Service with Repository Pattern
@Injectable()
export class WorkflowGuidanceService {
  constructor(
    @Inject('IProjectContextRepository')
    private readonly projectContextRepository: IProjectContextRepository,
    @Inject('IWorkflowRoleRepository')
    private readonly workflowRoleRepository: IWorkflowRoleRepository,
  ) {}

  // 75% maintenance reduction through abstraction layer
}

仓库:工作流执行•步骤进度•项目上下文•工作流引导•进度计算•工作流角色


🚀 主要特点

存储库模式架构

  • 清洁数据访问层:将业务逻辑与数据持久性分离
  • 增强的可测试性:模拟友好的存储库界面
  • 符合SOLID原则:依赖倒置和单一责任
  • 安全操作类型:全面的TypeScript覆盖率

MCP协议合规性

  • 多代理支持:光标、复制副本、RooCode、KiloCode模板
  • 标准化交互:官方模型上下文协议实施
  • 增强的AI集成:针对LLM工作流自动化进行了优化

性能优化

  • 数据库大小缩减: 434176 → 421888 字节优化存储
  • 增强的查询性能:存储库模式实现了高效的数据访问
  • 改进状态管理:基于ExecutionId的工作流跟踪

核心价值1:人工智能代理的智能引导

您的AI代理会收到每个开发任务的逐步智能规则:

// Before Anubis: Chaotic, directionless coding
"Create a user authentication system" →  Where do I start?

// With Anubis: Intelligent guidance at every step
"Create a user authentication system" →
   Requirements Analysis (Researcher Role)
   System Architecture (Architect Role)
   Enhanced Implementation with Subtasks (Senior Dev Role)
   Quality Validation (Code Review Role)
   Delivery Preparation (Integration Engineer Role)

优点:

  • 开发速度提高30-50% 具有结构化工作流程
  • 缺陷减少40-60% 通过质量门
  • 100%符合MCP标准 指导而非执行

核心价值2:无缝的任务和角色转换

在角色或继续任务之间切换时,永远不要失去上下文:

// Seamless context preservation across transitions
{
  "currentRole": "architect",
  "completedSteps": ["requirements", "design"],
  "context": {
    "decisions": ["JWT for auth", "PostgreSQL for storage"],
    "rationale": "Scalability and security requirements",
    "nextSteps": ["Enhanced Implementation with Subtasks by Senior Dev role"]
  }
}
// → Switch roles without losing any context!

特征:

  • 智能上下文保存 角色切换之间
  • 自动任务切换 完整的历史
  • 基于角色的边界 专注的专业知识
  • 暂停和恢复 随时工作流程

智能角色系统

角色 智能目的 关键权力
产品经理 战略编排 项目设置、任务创建、工作流管理
建筑师 系统设计 技术架构、实施规划
高级开发人员 代码表现 高质量的实现、测试
代码审查 质量卫士 安全验证、性能审查、批准

真实世界的例子

// 1. Agent receives intelligent guidance
const guidance = await get_step_guidance({
  executionId: 'auth-system-123',
  roleId: 'senior-developer'
});

// 2. Anubis provides structured rules
{
  "guidance": {
    "step": "Implement JWT authentication",
    "approach": [
      "1. Create User model with Prisma",
      "2. Implement password hashing with bcrypt",
      "3. Create JWT token generation service",
      "4. Add authentication middleware"
    ],
    "qualityChecklist": [
      "SOLID principles applied",
      "Unit tests coverage > 80%",
      "Security best practices",
      "Error handling implemented"
    ],
    "context": {
      "previousDecisions": ["PostgreSQL", "JWT strategy"],
      "nextRole": "code-review"
    }
  }
}

// 3. Agent executes with confidence and reports
await report_step_completion({
  result: 'success',
  metrics: {
    filesCreated: 8,
    testsWritten: 15,
    coverage: 85
  }
});

// 4. Quality delivery complete! ✅

技术卓越

企业级架构:

  • 后端:NestJS v11+TypeScript
  • 数据库:Prisma ORM+SQLite/PostgreSQL
  • 主控程序: @rekog/mcp-nest v1.5.2
  • 工作流引擎:存储库模式+DDD架构
  • 运行时:Node.js≥18.0.0

生产就绪:

  • 符合MCP的架构
  • 零执行违规
  • 75%的测试覆盖率
  • 低于50毫秒的缓存响应

📚 文档


🤝 贡献

# Development setup
npm install && npm run db:init && npm run start:dev

# Quality checks
npm run test && npm run lint

标准:MCP合规性•SOLID原则•领域驱动设计•循证开发


许可证

MIT许可证-请参阅 许可证 文件以获取详细信息。


阿努比斯承诺

智能引导 ✨ 无缝转换 ✨ 优质交付

将您的人工智能工作流程从混乱转变为智能。用现代MCP兼容架构为您的代理提供古人的规则。

准备好提升了吗?立即将Anubis添加到您的MCP配置中!