dotbot
结构化、可审计的人工智能辅助团队开发。
什么是dotbot?
大多数人工智能编码工具都会给你一个结果,但没有记录你是如何到达那里的——没有团队成员可以遵循的决策轨迹,没有办法在会话之间继续工作,也没有管理大型项目的框架。
dotbot将人工智能辅助编码封装在一个管理、透明的工作流程中,每个步骤都被跟踪:
多工作流平台
- 工作流驱动的管道 -在中定义多步骤管道
workflow.yaml包含任务、依赖关系、表单配置、MCP服务器和环境要求。一个项目可以同时安装多个工作流,每个工作流都可以独立运行、重新运行和停止。 - 类型化任务系统 -任务可以是
prompt(AI执行),script(PowerShell,无LLM),mcp(工具调用),task_gen(动态生成子任务),或prompt_template(具有特定工作流提示的AI)。脚本、MCP和task_gen任务完全绕过了人工智能——它们自动促进过去的分析,跳过工作树隔离,跳过验证钩子。这使得AI编排的工作流中的确定性管道阶段成为可能。 - 企业注册处 -团队在git托管或本地注册表中发布工作流、堆栈、工具和技能。
dotbot registry add链接注册表(私有或公共);dotbot init -Workflow registry:name从它安装。注册表根据registry.yaml清单中包含GitHub、Azure DevOps和GitLab的版本兼容性检查和身份验证失败提示。 - 工作流和堆栈 - 工作流 (例如。
start-from-jira)定义操作管道——dotbot做什么。 堆栈 (例如。dotnet,dotnet-blazor)添加特定技术的技能、钩子和MCP工具——项目使用的技术。堆栈由以下元素相加组成extends链。设置深度合并default -> workflows -> stacks.
执行引擎
- 两阶段执行 -分析解决了歧义,识别了文件,并构建了一个上下文包。实现消耗该包并编写代码。任务流程:
todo -> analysing -> analysed -> in-progress -> done. - 按任务隔离git工作树 -每个任务都在独立的分支上运行在自己的工作树中,完成后合并回主任务。
- 按任务模型选择 -任务可以指定一个覆盖流程级默认值的模型(例如,Sonnet用于简单任务,Opus用于复杂任务)。在足以减少代币支出的情况下,使用更便宜的模型。
- 多槽并发执行 -工作流引擎通过插槽感知锁定并行运行同一工作流中的多个任务,缩短了大型任务队列的时钟时间。
- 多供应商 -切换 克劳德, 法典,以及 双子座 每个提供程序都有自己的CLI包装器、流解析器和模型配置。
- 可配置的权限模式 -选择每个提供程序在自主执行期间如何处理权限检查。Claude支持旁路和自动模式(AI分类安全);Codex支持旁路和全自动;Gemini支持YOLO和自动编辑。仪表板检测已安装的提供程序、其版本和身份验证状态。
仪表板和可观察性
- Web仪表板 -七个选项卡UI(概述、产品、路线图、流程、决策、工作流、设置),带有显示进度药丸、每个工作流运行/停止控件和管道阶段过滤的工作流卡。
- 清单驱动的工作流 -工作流对话框由以下驱动
workflow.yaml表单模式,带有可见性标志,用于提示、文件上传、面试和自动工作流选项。 - JSONL审计跟踪 -会话日志捕获令牌计数、成本、回合边界、挂钟间隙、代理完成原因和错误详细信息。每个AI会话、问题、答案和代码更改都是版本控制的。
- 项目健康诊断 -
dotbot doctor扫描过时锁、孤立工作树、设置完整性、依赖关系问题和任务队列健康状况。
协作与控制
- 操作员转向 -通过心跳/耳语系统引导人工智能进行中期会话。
/status和/verifyslash命令在自主执行期间工作。 - 项目访谈 -引导需求收集流程,生成产品文档,然后自动生成任务路线图。
- 人在循环问答 -当任务需要人工输入时,dotbot会通过以下方式将问题发送给利益相关者 团队, 电子邮件,或 Jira.
- 专为团队设计 -整个
.bot/目录位于您的仓库中。通过git,每个人都可以看到任务队列、会话历史和计划。
基础
- 零依赖工具 -MCP服务器和web UI是纯PowerShell。不需要npm、pip或Docker。Windows、macOS和Linux上的跨平台。
- 安全 -PathSanitizer从AI输出中剥离绝对路径,隐私扫描覆盖整个仓库,预提交钩子在暂存文件上运行gitleaks。
先决条件
必修的:
推荐的MCP服务器:
快速开始
1.全局安装dotbot(一次性)
Install-Module Dotbot -Scope CurrentUserAlternative install methods (CI/CD pipelines, contributors, or environments without PowerShellGet)
单行(CI/CD、脚本):
irm https://raw.githubusercontent.com/andresharpe/dotbot/main/install-remote.ps1 | iexGit克隆(贡献者):
cd ~
git clone https://github.com/andresharpe/dotbot dotbot-install
cd dotbot-install
pwsh install.ps1重新启动终端,以便 dotbot 命令可用。
2.将dotbot添加到您的项目中
cd your-project
dotbot init这创建了一个 .bot/ 目录中包含MCP服务器、web UI、自主运行时、代理、技能和工作流。
保持.bot/用git跟踪。 - dotbot提交.bot/在...期间dotbot init因为任务工作树使用连接/符号链接返回共享状态,完整性检查依赖于git可见性。 - 如果你添加.bot/到.gitignore(或全局忽略文件)、工作树创建和MCP服务器将自动失败。 - 唯一应该被忽略的路径已经被覆盖了.bot/.gitignore(.control/,profile/,运行时状态)。 - 框架文件位于.bot/systems/,.bot/hooks/,以及.bot/recipes/受到预提交钩子的保护——直接编辑被拒绝;跑dotbot init --force以更新它们。 - 已提交的SHA256清单.bot/.manifest.json(再生dotbot init --force)让验证钩子捕获绕过预提交保护的篡改git commit --no-verify.
工作流和堆栈
dotbot init -Workflow start-from-jira # Install a workflow
dotbot init -Stack dotnet-blazor,dotnet-ef # Install stacks
dotbot init -Workflow start-from-jira -Stack dotnet # Both
dotbot list # List available workflows and stacks- 工作流程 -通过以下方式定义包含任务、依赖项、脚本和表单配置的多步骤管道
workflow.yaml。一个项目可以安装多个工作流。每个都可以独立运行和重新运行(dotbot run). - 堆栈 (可组合)-添加特定于技术的技能、钩子、验证脚本和MCP工具。堆栈可以声明
extends自动包含家长(例如。dotnet-blazor扩展dotnet).
申请订单: default ->工作流->堆栈(依赖关系已解决)。设置被深度合并;文件被覆盖。
企业注册
团队可以在git仓库中发布工作流、堆栈、工具和技能 registry.yaml 显示:
dotbot registry add myorg https://github.com/myorg/dotbot-extensions.git
dotbot registry add myorg C:\repos\myorg-dotbot-extensions # Local path
dotbot registry update # Update all registries
dotbot registry update myorg # Update one registry
dotbot init -Workflow myorg:custom-workflow # Use from registry3.配置MCP服务器
添加到AI工具的MCP设置(Claude、Warp等):
{
"mcpServers": {
"dotbot": {
"command": "pwsh",
"args": ["-NoProfile", "-File", ".bot/systems/mcp/dotbot-mcp.ps1"]
}
}
}4.启动用户界面
.bot\go.ps1打开web仪表板(默认端口8686,如果繁忙,自动选择下一个可用端口)。
截图
Overview Product Workflow Settings
命令
dotbot help # Show all commands
dotbot init # Add dotbot to current project
dotbot init -Force # Reinitialize (preserves workspace data)
dotbot init -Workflow # Install with a workflow
dotbot init -Stack # Install with a tech stack
dotbot list # List available workflows and stacks
dotbot run # Run/rerun a workflow
dotbot workflow add # Add a workflow to existing project
dotbot workflow remove # Remove an installed workflow
dotbot workflow list # List installed workflows
dotbot registry add # Add an enterprise extension registry
dotbot registry update [name] # Update registry (all or named)
dotbot registry list # List registries and available content
dotbot doctor # Run project health checks
dotbot status # Check installation status
dotbot update # Update global installation通过PowerShell库更新:
Update-Module Dotbot建筑
.bot/
├── systems/ # Core systems
│ ├── mcp/ # MCP server (stdio, auto-discovers tools)
│ │ ├── tools/ # One folder per tool (metadata.yaml + script.ps1)
│ │ └── modules/ # NotificationClient, PathSanitizer, SessionTracking
│ ├── ui/ # Pure PowerShell HTTP server + vanilla JS frontend
│ └── runtime/ # Autonomous loop, worktree manager, provider CLIs
│ └── ProviderCLI/ # Stream parsers for Claude, Codex, Gemini
├── workflows/ # Installed workflows (each with workflow.yaml + recipes/)
│ └── / # workflow.yaml, recipes/, (optional systems/, workspace/)
├── settings/ # Default settings + provider configurations
│ ├── settings.default.json
│ ├── theme.default.json
│ └── providers/ # claude.json, codex.json, gemini.json
├── recipes/ # AI content
│ ├── agents/ # Specialized personas (implementer, planner, reviewer, tester)
│ ├── skills/ # Reusable capabilities (status, verify, write-test-plan, write-unit-tests)
│ ├── prompts/ # Numbered step-by-step processes (00-interview → 99-autonomous-task)
│ ├── includes/ # Shared prompt fragments
│ └── research/ # Research templates
├── workspace/ # Version-controlled runtime state
│ ├── tasks/ # Task queue (todo/analysing/analysed/in-progress/done/…)
│ ├── sessions/ # Session history + run logs
│ ├── product/ # Product docs (mission, tech stack, entity model)
│ ├── plans/ # Execution plans
│ ├── decisions/ # Architecture decision records
│ └── reports/ # Generated reports
├── hooks/ # Project-specific scripts (dev, scripts, verify)
├── init.ps1 # IDE integration setup
└── go.ps1 # Launch UI serverMCP工具
dotbot MCP服务器公开了33个工具,从中自动发现 systems/mcp/tools/:
任务管理 (15): task_create, task_create_bulk, task_get_next, task_get_context, task_list, task_get_stats, task_mark_todo, task_mark_analysing, task_mark_analysed, task_mark_in_progress, task_mark_done, task_mark_needs_input, task_mark_skipped, task_answer_question, task_approve_split
决策跟踪 (7): decision_create, decision_get, decision_list, decision_update, decision_mark_accepted, decision_mark_deprecated, decision_mark_superseded
会话管理 (5): session_initialize, session_get_state, session_get_stats, session_update, session_increment_completed
计划 (3): plan_create, plan_get, plan_update
转向: steering_heartbeat
发展: dev_start, dev_stop
工作流和堆栈可以添加自己的工具(例如。 start-from-jira 添加 repo_clone, repo_list, atlassian_download, research_status).
看 .bot/README.md 获取完整的工具文档。
测试
包含约500个断言的四层测试金字塔:
| 层 | 它涵盖了什么 | 凭据 |
|---|---|---|
| 1-结构 | 语法验证、模块导出、工作流清单解析、任务创建、条件评估、多工作流隔离 | 无 |
| 2-组件 | MCP工具生命周期、任务类型、决策跟踪、提供者CLI、通知客户端、工作流集成、UI服务器启动 | 无 |
| 3-模拟提供者 | 使用模拟Claude CLI分析/执行流、速率限制检测、流解析 | 无 |
| 4-E2E | 与真正的人工智能提供商API完全端到端 | API密钥 |
pwsh tests/Run-Tests.ps1 # Run layers 1-3
pwsh tests/Run-Tests.ps1 -Layer 1 # Structure tests
pwsh tests/Run-Tests.ps1 -Layer 2 # Component tests
pwsh tests/Run-Tests.ps1 -Layer 3 # Mock provider tests
pwsh tests/Run-Tests.ps1 -Layer 4 # E2E (requires API key)CI在Windows、macOS和Linux上的每次推送和PR上运行第1-3层。第4层按计划或手动触发运行。
故障排除
dotbot 安装后找不到命令 -重新启动终端。安装程序添加 ~/dotbot/bin 到你的路径。
Windows上的脚本执行被阻止 -快跑 Set-ExecutionPolicy RemoteSigned -Scope CurrentUser 然后再试一次。
PowerShell版本错误 -需要PowerShell 7+。与核对 $PSVersionTable.PSVersion 和 升级 如果需要的话。
许可证
麻省理工学院
