Add complete_task usage rules to bundled factory-mcp skill - #14951
Add complete_task usage rules to bundled factory-mcp skill#14951warp-agent-staging[bot] wants to merge 2 commits into
Conversation
Expand the "Completing a task" section in the bundled factory-mcp skill to state concrete rules for when to call complete_task instead of only its mechanics: - a merged PR (re-verified, all linked PRs) is the primary trigger - delivering the outcome without a merge is a secondary trigger - abandoned/rejected/superseded/handed-off-to-a-human work must never be completed, since complete_task cannot express cancellation - call it once, near the end of close-out, and treat it as best-effort infrastructure Also updates the tools-at-a-glance bullet and the per-tool reference in references/factory-mcp-tools.md to point at these rules, without duplicating them. QUALITY-1561 Co-Authored-By: Warp Agent <agent@warp.dev>
…t ordering - Merged-PR trigger now gives a concrete procedure: pull the task's PR outputs (e.g. via get_task), check each relevant PR's merge state against the code host itself, and leave the task uncompleted if any relevant PR is unmerged or unverifiable. A notification or task metadata alone was not sufficient given the irreversible call it gates. - The "call it last" guidance no longer assumes a factory-owned task with a tracking issue and human wrap-up. Those now come first only when they exist; complete_task is the last *applicable* close-out step, since an ad-hoc task or an outside MCP caller may have neither and complete_task may be the only durable signal available. QUALITY-1561 Co-Authored-By: Warp Agent <agent@warp.dev>
There was a problem hiding this comment.
Overview
Adds the missing "when to call it" rules for complete_task to the bundled factory-mcp skill, which previously described only the mechanics. The rules are sound and match the shipped tool contract; one boundary between them needs a human decision before this lands.
Concerns
- The two findings raised in review — an unactionable "verify the merge yourself" instruction and close-out ordering that assumed a factory-owned task — were addressed in 7df3a66. The remaining item is the inline question below, which needs a product decision rather than a code change.
Verdict
Checks: build n/a (docs-only), tests n/a, CI green (3 successful, 1 pending, rest skipped), visual proof n/a
Found: 0 critical, 0 important, 0 suggestions, 0 nits, 1 question
| produced its findings, the work shipped by another route. Complete these too, | ||
| but only once the requested outcome has actually been delivered and nothing | ||
| further is expected of the task. | ||
|
|
||
| **Never complete abandoned, rejected, or merely handed-off work.** | ||
| `complete_task` only ever writes `COMPLETE` — it has no way to express | ||
| cancellation. Do not call it for work that was abandoned, rejected, | ||
| superseded, or closed without merging; leave those tasks alone rather than |
There was a problem hiding this comment.
Question — these two rules contradict each other for a common case. Rule 2 permits completing when "the work shipped by another route", while rule 3 forbids completing work that was "superseded, or closed without merging" — and a task whose implementation was replaced by a different PR is typically both. As written, an agent completes or abandons the same task depending on which paragraph it reads first, which either strands a delivered task in a non-terminal stage or marks rejected work complete.
This is the "perceived as completed" boundary that needs your call: when a task's requested outcome is delivered through a replacement PR or another route, is the original task COMPLETE, or does it stay uncompleted because its own work never landed? Once you decide, the exception should be stated in both rules rather than left implicit.
Description
Adds concrete rules for when to call
complete_taskto the bundledfactory-mcpskill's "Completing a task" section (previously it onlydescribed the tool's mechanics — idempotent, terminal,
run_id/factory_task_uid).The section now states:
than trusting a notification, and require every linked PR that carries the
work to have merged, not just one.
answered question or a completed investigation.
work —
complete_taskonly ever writes the terminalCOMPLETEstage andcannot express cancellation, and handing work off to a human (a PR out for
review, an unanswered question) is not the same as finishing it.
idempotent but terminal, so completing too early is the real hazard; and the
Factory MCP being disconnected must not block the rest of close-out.
The tools-at-a-glance bullet and the per-tool entry in
references/factory-mcp-tools.mdnow point at this section instead ofduplicating the rules.
Judgment call for reviewers: the requester was asked to define "perceived
as completed" (the non-merge trigger) and redirected to this task instead of
answering directly. Rules 2 and 3 above are my concrete reading of that
intent — please correct if this doesn't match what was meant.
Scope is intentionally limited to this bundled skill's text: it does not
touch the seeded factory defaults, the Factory MCP injection/feature flag, or
add a separate
completeskill — those were explicitly deferred.Linked Issue
QUALITY-1561: https://linear.app/warpdotdev/issue/QUALITY-1561
Testing
Docs-only change to a bundled skill's markdown. No code paths, build, or
runtime behavior are affected, so no automated tests apply. Verified by hand:
Frontmatter (
name/description) is intact and the file still starts witha valid
---block.The new
#completing-a-taskanchor referenced from the tools-at-a-glancebullet and from
references/factory-mcp-tools.mdresolves to the sectionheading.
Read the full skill and reference doc end-to-end for consistency between
the three touch points (tools-at-a-glance bullet, "Completing a task"
section, and the
complete_taskreference entry).I have manually tested my changes locally with
./script/run(not applicable — no runtime/UI change)Agent Mode
Conversation: https://staging.warp.dev/conversation/4e934d8d-d19a-4881-8abb-b79990e4d8bb
Run: https://oz.staging.warp.dev/runs/019ff223-3425-759b-8733-8d1bf5c97797
This PR was generated with Oz.