From 16790e447e0f264da6df2ee61b086be277d698a7 Mon Sep 17 00:00:00 2001 From: Dmitry Kuleshov Date: Fri, 10 Jul 2026 14:49:05 +0300 Subject: [PATCH 1/6] Changes under test --- AGENTS.md | 7 +- README.md | 2 +- content/prompts/100-single-session-task.md | 24 +- content/prompts/98-analyse-task.md | 601 ------------------ content/prompts/99-autonomous-task.md | 279 -------- .../prompts/98-analyse-task.md | 328 ---------- .../prompts/99-autonomous-task.md | 312 --------- .../prompts/01-plan-product.md | 2 +- src/README.md | 33 +- src/cli/workflow-add.ps1 | 17 + src/cli/workflow-remove.ps1 | 17 + src/mcp/tools/decision-create/script.ps1 | 87 +-- src/packaging/homebrew/dotbot.rb | 2 +- src/packaging/scoop/dotbot.json | 2 +- .../Dotbot.Content/Dotbot.Content.psm1 | 2 +- .../Dotbot.Decision/Dotbot.Decision.psd1 | 21 + .../Dotbot.Decision/Dotbot.Decision.psm1 | 427 +++++++++++++ .../Dotbot.Decision/Private/Imports.ps1 | 9 + .../Modules/Dotbot.Task/Dotbot.Task.psm1 | 24 + src/ui/modules/NotificationPoller.psm1 | 29 + src/ui/modules/SettingsAPI.psm1 | 75 +++ tests/Test-Components.ps1 | 108 ++++ tests/Test-WorkflowManifest.ps1 | 86 +-- 23 files changed, 802 insertions(+), 1692 deletions(-) delete mode 100644 content/prompts/98-analyse-task.md delete mode 100644 content/prompts/99-autonomous-task.md delete mode 100644 content/workflows/start-from-jira/prompts/98-analyse-task.md delete mode 100644 content/workflows/start-from-jira/prompts/99-autonomous-task.md create mode 100644 src/runtime/Modules/Dotbot.Decision/Dotbot.Decision.psd1 create mode 100644 src/runtime/Modules/Dotbot.Decision/Dotbot.Decision.psm1 create mode 100644 src/runtime/Modules/Dotbot.Decision/Private/Imports.ps1 diff --git a/AGENTS.md b/AGENTS.md index 586fb818..7b680bc4 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -4,7 +4,7 @@ Guidance for AI agents (Claude Code, Codex, etc.) working in this repository. `C ## Project Overview -dotbot is a structured AI-assisted development framework built entirely in **PowerShell 7+**. It wraps AI coding workflows in managed, auditable processes with two-phase execution (analysis → implementation), per-task git worktree isolation, and a web dashboard for monitoring. +dotbot is a structured AI-assisted development framework built entirely in **PowerShell 7+**. It wraps AI coding workflows in managed, auditable processes with single-session task execution, per-task git worktree isolation, and a web dashboard for monitoring. ## Commands @@ -61,10 +61,9 @@ The PowerShell framework (`src/runtime/`, `src/mcp/`, `src/ui/`, `src/cli/`, `sr `src/runtime/Modules/ContentResolver/` implements project-over-framework lookup. A project can override any content item (agents/skills/prompts/workflows/stacks/recipes) by placing it under `/content//`, or override hook scripts by placing them under `/hooks//`; the runtime falls back to `` otherwise. Merge is by filename — a project file replaces the framework file of the same name; framework-only files still run. APIs: `Resolve-DotbotContent`, `Get-DotbotContentItems`, `Get-DotbotHookChain`. -### Two-phase execution +### Single-session execution -1. **Analysis** (`98-analyse-task.md`): explores codebase, builds context package, may propose splits. Task: `todo → analysing → analysed`. -2. **Implementation** (`99-autonomous-task.md`): consumes context, writes code, tests, commits with `[task:XXXXXXXX]` tag. Task: `analysed → in-progress → done`. +Each task runs in one provider session driven by `100-single-session-task.md`. That session handles discovery, implementation, verification, and commit (with a `[task:XXXXXXXX]` tag), then marks the task done. If human input is needed it pauses on `needs-input` and resumes the same task. Task lifecycle: `todo -> analysing -> analysed -> in-progress -> done`; the task-runner auto-promotes through `analysing`/`analysed` (there is no separate analysis provider session). ### Git worktree isolation diff --git a/README.md b/README.md index 6fcdad19..98ad9ed3 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ dotbot wraps AI-assisted coding in a managed, transparent workflow where every s - **Workflows and stacks** - **Workflows** (e.g. `start-from-jira`) define operational pipelines - what dotbot does. **Stacks** (e.g. `dotnet`, `dotnet-blazor`) add tech-specific skills, hooks, and MCP tools - what tech the project uses. Stacks compose additively with `extends` chains. Settings deep-merge across `default -> workflows -> stacks`. ### Execution engine -- **Two-phase execution** - Analysis resolves ambiguity, identifies files, and builds a context package. Implementation consumes that package and writes code. Tasks flow: `todo -> analysing -> analysed -> in-progress -> done`. +- **Single-session execution** - Each task runs in one provider session that does discovery, implementation, verification, and commit, pausing only when human input is needed. Tasks flow: `todo -> analysing -> analysed -> in-progress -> done`. - **Per-task git worktree isolation** - Each task runs in its own worktree on an isolated branch, squash-merged back to main on completion. - **Per-task model selection** - Tasks can specify a model (e.g. Sonnet for simple tasks, Opus for complex ones) that overrides the process-level default. Use cheaper models where they suffice to reduce token spend. - **Multi-slot concurrent execution** - The workflow engine runs multiple tasks from the same workflow in parallel with slot-aware locking, shortening wall-clock time for large task queues. diff --git a/content/prompts/100-single-session-task.md b/content/prompts/100-single-session-task.md index 8e6ecc72..8378d6d4 100644 --- a/content/prompts/100-single-session-task.md +++ b/content/prompts/100-single-session-task.md @@ -12,12 +12,12 @@ You are an autonomous AI coding agent. Complete this task in the current provide Built-in tools (`Read`, `Write`, `Edit`, `Bash`, `Glob`, `Grep`, `WebSearch`, `WebFetch`) are always available. Do not use ToolSearch for them. -The Bash tool runs Bash, not PowerShell. If you need PowerShell semantics, run `pwsh -Command "