Repository navigation
Description
Problem or Motivation
Parent: #2661. No command runs one task group of a staged change in one bounded context. An agent session runs the whole change with the whole repository in context.
Proposed Solution & Architectural Design
devops roadmap implement --item N --group n [--source <checkout>] [--dry-run] runs one step and writes nothing to GitHub. A person runs it in a worktree, and the job (sub-issue 2) runs it for each group.
The engine:
- A new dependency,
pydantic-ai-harness[coder], pinned at one version aspydantic-aiis, with a knowledge base note. - One pydantic-ai
Agentwith the capabilitiesLocalWorkspace(<checkout>),Coder()and the spend capability of the construction point of refactor(ai): Replace PydanticAgent with pydantic-ai Agent #2489. Until that lands, the step records spend asrefine_investigation.pydoes. The allowlist of the shell tool isgit,uv,ruff,mypy,openspecanddevops. Any other program is refused. The model isget_task_model("implement"): a new taskai.tasks.implementinAITasksConfig, default modeldevops-coderwithcontext_window128000. - The budget:
UsageLimitscaps the requests of a run (CONST_ROADMAP_IMPLEMENT_MAX_REQUESTS, 80) and its tool calls.ToolOutputLimitscuts each tool result. The step refuses to start when its inputs measure overai.tasks.implement.context_windowminus the reserve for turns, and says so. A run that reaches a limit ends as stopped, with pydantic-ai's error class as the reason.
The inputs of the step, and nothing else: the instructions (roadmap_implement_step.md: write the failing test first, change only what the group names, keep the rules of AGENTS.md that apply to code, tick each task when its work is done, run the verification command, and stop when it passes), the item's title, problem statement and acceptance criteria, the change's proposal.md, design.md and tasks.md, the one group, and the group's named files packed with ai/context_packer.py. The agent reads more with its tools inside the budget.
The exit of the step, judged by the job and not by the model:
- The group's verification command passes when the job runs it after the agent returns.
ruff check,ruff format --checkandmypy --strictpass on the changed files.- Every task of the group is ticked in
tasks.md, and no task of another group changed. - Then the job commits the worktree as
<group title> (#N). Otherwise the step reports stopped with the reason and the agent's last message, and the worktree is reset to the last commit.
The report is a structured StepOutcome (done or stopped, the reason, the commit, the requests and tokens spent), printed as a table or JSON.
Target Subsystem
src/devops_cli/roadmap/implement_step.py, src/devops_cli/commands/roadmap.py, src/devops_cli/ai/tasks/roadmap_implement_step.md, src/devops_cli/config/settings.py (the task), pyproject.toml, src/devops_cli/ai/knowledge_base/devops_cli/libraries/.
Existing Tool Considered
pydantic-ai-harness Coder and LocalWorkspace, and pydantic-ai UsageLimits. The project builds the step's inputs, exit checks and report, and no agent loop. The Claude Agent SDK, the Copilot coding agent, OpenHands, SWE-agent and Aider are rejected on the parent. Estimated cost: about 800 lines of code and tests, around 300k tokens of agent work and one day of elapsed time, plus upkeep across the 0.x releases of the harness.
Key questions
- Which model serves the step?
devops-coder(qwen3-coder:30b onollama-48gib-fast,OLLAMA_CONTEXT_LENGTH128000). The route getsmax_input_tokens: 128000in the gateway so that an oversized prompt is refused before the backend. - Is one attempt enough? Yes for this item. A stopped step waits on a person. A retry policy is the job's decision (sub-issue 2).
- Is the shell tool safe? The allowlist admits the project's tools only, the step runs in a checkout with no credential in its environment, and the runner (sub-issue 3) adds the limits of the pod.
Acceptance criteria
- With the model faked as a pydantic-ai
FunctionModeland git at the process edge, a step on a group whose fake writes the test and the code ends done, with one commit and the tasks ticked. - A step whose verification fails after the agent returns ends stopped, commits nothing and resets the worktree.
- A step whose inputs measure over the window refuses to start and names the measure.
- A shell call to a program outside the allowlist is refused, and the run goes on.
uv run devops cipasses, anddevops docs generate --sync-readmeis run.
Source: #2661
Activity
dan-petty commentedon Oct 29, 2026
Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones.
Adds a new devops roadmap implement command with a pydantic-ai-harness Coder step.Core pipeline step that the job (sub-issue 2) depends on, but not a defect or security gap.Gives users a bounded-context command that implements one task group and verifies the result.About 800 lines of code and tests, one day of elapsed time, plus new dependency upkeep.Both are roadmap pipeline commands; #2654 stages and sizes task groups, the candidate implements one group with the Coder agent.chore(main): release 0.18.0 (#2685)
fix(roadmap): the status label follows the pull request (#2723)