Add task for Refinement #27
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
New task
refine-item: conception work on a work item, without codeGoal
A task for conception work: clarifying, specifying and splitting a work item (forge issue or tracker item), without changing code. Today the only option is
implement-issue -interactivewith the instruction "don't write code", which the agent doesn't always follow and the factory doesn't enforce. Trigger: #23 was too large and too vague for a local model; splitting it needs its own kind of session.Behavior
The agent:
Implementation
Follow the existing patterns;
review-pris the closest one (read-only, limited tools).internal/dispatch/dispatch.go,Tasks:"refine-item": {Name: "refine-item", Role: config.RoleRefine, Target: "work_item", ReadOnly: true, MCPTools: [...]}MCPTools:whoami,get_repo,get_issue,list_issues,get_pull_request,get_pull_request_diff,list_pull_requests,comment_on_issue. Not:push_branch,create_pull_request,post_review,set_labels.Target: "work_item"withReadOnly: truecreates nofactory/*branch and doesn't expect a pull request at the end. Wherever the dispatcher assumes that, add a case for this task.dispatch.go, next to the review check viaListReviews):GetIssuebefore and after the run and compare (likereviewsBefore).refineininternal/config/config.go:RoleRefine = "refine"toRoles.roles.refineis missing,refine-itemuses theimplementrole. All roles are required today (config.go, "roles.%s is required"); this must not change for the existing four, so existing configs stay valid.FACTORY_AGENT_REFINE,FACTORY_MODEL_REFINEandFACTORY_BUDGET_REFINEwork like for the other roles.prompts/refine-item.tmpl, built fromprompts/implement-issue.tmpl(repository, work item with forge/tracker distinction, account, shell commands, MCP servers, the skill). No branch line.skills/refine-item/SKILL.mdwith valid frontmatter (name: refine-item,description). Content: the behavior above, plus:implement-issue),FACTORY_*_REFINEvariables) anddocs/developing-the-factory.md(where conception work goes in the improvement loop: before step 1).docs/decisions/NNNN-refine-item.md: why a separate task with its own role, why read-only, why nocreate_issueyet.Out of scope
create_issue). It needs a new forge operation in every backend plusforgetest, and a decision on how many issues one run may create. Separate issue. Until then, a person creates the sub-items from the comment.Done when
just checkpasses.internal/dispatch/dispatch_test.go:refine-itemgets only the tools listed above, and the harness gets read-only shell commands (noallowed_shell),internal/config: a config withoutroles.refineis valid andrefine-itemusesimplement;FACTORY_AGENT_REFINEoverrides it.refine-itemskill exists with valid frontmatter, and the README describes the task.Verification by hand (in the
factory-devsandbox)factory run refine-item -repo dario/factory -item 23 -interactive: the agent asks questions, posts a split only after you agree, and edits no files (git -C <run>/work statusis clean).-interactiveon a deliberately vague test issue: exactly one comment with questions, then the run ends successfully.Changes to skills
This PR adds a skill. AGENTS.md requires an evidence section in the PR: link #23, the failed run on it (review of its PR), and the interactive split session, if it has happened by then.
Two notes:
I've implemented the
refine-itemtask for the factory. Here's a summary:Implementation Complete
RoleRefine = "refine"constant and updatedRolesarrayrefine-itemtask with read-only MCP tools and success checking for new commentsprompts/refine-item.tmpltemplateskills/refine-item/SKILL.mdwith headless and interactive modesTesting
All tests pass (except race detector which requires cgo):
Pull Request
I've opened pull request #28 to merge this into main. The PR includes:
Notes
🤖 Written by an AI agent (factory) using this account.