mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-13 15:38:22 +01:00
## Thinking Path > - Paperclip is the open source app people use to manage AI agents for work. > - Agents read runtime prompts, tool help, skills, and role instructions. > - Several of these texts tell agents to create child tasks as a normal next step. > - One accepted-plan prompt even forbids work on the current task. > - Task parentage is useful, but it does not need a prompt that encourages task creation. > - This pull request removes those prompts and keeps the task APIs available. ## Linked Issues or Issue Description Refs #10642. This change adjusts prompt wording; it does not add delegation-cycle guards. **Current behavior** Prompts tell agents to create children after plan approval, use children for long work, and create a task just to pass context. Onboarding requires a child even for a single request. **Proposed behavior** Continue work on the current task. Keep explicit assignments, optional task creation, parentage, dependencies, and approval gates. Use the separate-task recipes when the user requests that structure or when continuing existing work. **Reason and benefit** Reduce needless task trees without removing subtask support. Keep the patch limited to wording, existing test expectations, and generated catalog data. ## What Changed - Align accepted-plan prompts and remove direct child-creation advice from runtime and error text. - Make task tool descriptions neutral. Keep their fields, defaults, and handlers. - Update the main skill, onboarding, CEO instructions, company templates, specialist workflows, and matching guides. - Keep historical release snapshots intact. Refresh the explicitly seeded schema fixture's catalog digest; the server still verifies historical release snapshot hashes. - Refresh the affected generated catalogs, capability inventory, semantic contracts, and fixture manifest. ## Verification - Final tested head: `c6e304d0c105cdbfbe0b2ab0a233307fcd91a04b`. - All 66 check runs are complete: 60 pass, one is neutral, and five are skipped by CI conditions. Snyk also passes. No checks fail or remain pending. - [PR CI](https://github.com/paperclipai/paperclip/actions/runs/42846226554) passes typecheck, build, server/general tests, all eight E2E shards, Runner support, Runner Rust, and the aggregate verify gate. [Windows](https://github.com/paperclipai/paperclip/actions/runs/42846226546) and [Docker Runner](https://github.com/paperclipai/paperclip/actions/runs/42846226108) also pass. - [Greptile](https://github.com/paperclipai/paperclip/pull/20362#issuecomment-6751419835) and [Paperclip review](https://github.com/paperclipai/paperclip/pull/20362#issuecomment-6751454010) give this exact head 5/5. All six inline threads are resolved. Neither current summary has findings. - Merged master `bf0220d34a156c81853755c3d1365ddc527037de`. Resolved three generated-file conflicts with the canonical generators. - Local verification passes: 473 focused prompt, continuation, UI, catalog, runtime and native-execution tests; Runner TypeScript build; generated metadata; UI token gates; and diff checks. - The prior head `c22018cb0f` failed three SDK evidence tests because two source hashes were stale. Reproduced all three failures locally. The existing generator refreshed only the hashes for the denial-copy file and its test. All 53 affected evidence/source-pin tests then passed, including private-value rejection. No scanner logic, assertions, or runtime dependency pins changed. Current CI confirms the support suite passes. - A prior commit failed the Rust process reaping test. Its cause remains unproven. No Rust code or assertions changed. Later Rust runs pass; this does not establish the cause of the earlier failure. - Local preflight built shared/plugin SDK packages, then stopped because `cargo` is absent. Current-head CI supplies Rust and full build coverage. `pnpm verify --explain` selects broad required CI; full local suites were not repeated. ## Risks - Wording changes guide the model; they do not enforce a ban on subtasks. - Existing installed skill versions and saved custom instructions need their normal refresh process. This PR does not migrate company configuration. - Existing approved task assignments and approval gates remain in effect. ## Model Used - OpenAI GPT-6, through Codex, with reasoning, tool use, and code execution. The exact routed model ID and context-window size were not exposed in this session. ## Checklist - [x] I have included a thinking path that traces from project context to this change - [x] I have specified the model used (with version and capability details) - [x] I have checked ROADMAP.md and confirmed this PR does not duplicate planned core work - [x] I have searched GitHub for duplicate or related PRs and linked them above - [x] I have either (a) linked existing issues with `Fixes: #` / `Closes #` / `Refs #` OR (b) described the issue in-PR following the relevant issue template - [x] I have not referenced internal/instance-local Paperclip issues or links (only public GitHub `#NNN` / `github.com/paperclipai/paperclip` URLs) - [x] My branch name describes the change (e.g. `docs/...`, `fix/...`) and contains no internal Paperclip ticket id or instance-derived details - [x] I have run tests locally and they pass - [x] I have added or updated tests where applicable - [x] I have updated relevant documentation to reflect my changes - [x] I have considered and documented any risks above - [x] All Paperclip CI gates are green - [x] Greptile is 5/5 with no open P2s, recommendations, or follow-ups - [x] I will address all Greptile and reviewer comments before requesting merge --------- Co-authored-by: Paperclip <noreply@paperclip.ing>
152 lines
4.3 KiB
Markdown
152 lines
4.3 KiB
Markdown
---
|
|
title: Task Workflow
|
|
summary: Checkout, work, update, and delegate patterns
|
|
---
|
|
|
|
This guide covers the standard patterns for how agents work on tasks.
|
|
|
|
## Checkout Pattern
|
|
|
|
Before doing any work on a task, checkout is required:
|
|
|
|
```
|
|
POST /api/issues/{issueId}/checkout
|
|
{ "agentId": "{yourId}", "expectedStatuses": ["todo", "backlog", "blocked", "in_review"] }
|
|
```
|
|
|
|
This is an atomic operation. If two agents race to checkout the same task, exactly one succeeds and the other gets `409 Conflict`.
|
|
|
|
**Rules:**
|
|
- Always checkout before working
|
|
- Never retry a 409 — pick a different task
|
|
- If you already own the task, checkout succeeds idempotently
|
|
|
|
## Work-and-Update Pattern
|
|
|
|
While working, keep the task updated:
|
|
|
|
```
|
|
PATCH /api/issues/{issueId}
|
|
{ "comment": "JWT signing done. Still need token refresh. Continuing next heartbeat." }
|
|
```
|
|
|
|
When finished:
|
|
|
|
```
|
|
PATCH /api/issues/{issueId}
|
|
{ "status": "done", "comment": "Implemented JWT signing and token refresh. All tests passing." }
|
|
```
|
|
|
|
Always include the `X-Paperclip-Run-Id` header on state changes.
|
|
|
|
## Blocked Pattern
|
|
|
|
If you can't make progress:
|
|
|
|
```
|
|
PATCH /api/issues/{issueId}
|
|
{ "status": "blocked", "comment": "Need DBA review for migration PR #38. Reassigning to @EngineeringLead." }
|
|
```
|
|
|
|
Never sit silently on blocked work. Comment the blocker, update the status, and escalate.
|
|
|
|
## Delegation Pattern
|
|
|
|
If work is delegated, task creation supports a parent relationship:
|
|
|
|
```
|
|
POST /api/companies/{companyId}/issues
|
|
{
|
|
"title": "Implement caching layer",
|
|
"assigneeAgentId": "{reportAgentId}",
|
|
"parentId": "{parentIssueId}",
|
|
"goalId": "{goalId}",
|
|
"status": "todo",
|
|
"priority": "high"
|
|
}
|
|
```
|
|
|
|
Always set `parentId` to maintain the task hierarchy. Set `goalId` when applicable.
|
|
|
|
## Confirmation Pattern
|
|
|
|
When the board/user must explicitly accept or reject a proposal, create a `request_confirmation` issue-thread interaction instead of asking for a yes/no answer in markdown.
|
|
|
|
```
|
|
POST /api/issues/{issueId}/interactions
|
|
{
|
|
"kind": "request_confirmation",
|
|
"idempotencyKey": "confirmation:{issueId}:{targetKey}:{targetVersion}",
|
|
"continuationPolicy": "wake_assignee",
|
|
"payload": {
|
|
"version": 1,
|
|
"prompt": "Accept this proposal?",
|
|
"acceptLabel": "Accept",
|
|
"rejectLabel": "Request changes",
|
|
"rejectRequiresReason": true,
|
|
"supersedeOnUserComment": true
|
|
}
|
|
}
|
|
```
|
|
|
|
Use `continuationPolicy: "wake_assignee"` when acceptance should wake you to continue. For `request_confirmation`, rejection does not wake the assignee by default; the board/user can add a normal comment with revision notes.
|
|
|
|
## Plan Approval Pattern
|
|
|
|
When a plan needs approval before implementation:
|
|
|
|
1. Create or update the issue document with key `plan`.
|
|
2. Fetch the saved document so you know the latest `documentId`, `latestRevisionId`, and `latestRevisionNumber`.
|
|
3. Create a `request_confirmation` targeting that exact `plan` revision.
|
|
4. Use an idempotency key such as `confirmation:${issueId}:plan:${latestRevisionId}`.
|
|
5. Wait for acceptance before implementation.
|
|
6. If a board/user comment supersedes the pending confirmation, revise the plan and create a fresh confirmation if approval is still needed.
|
|
|
|
Plan approval targets look like this:
|
|
|
|
```
|
|
"target": {
|
|
"type": "issue_document",
|
|
"issueId": "{issueId}",
|
|
"documentId": "{documentId}",
|
|
"key": "plan",
|
|
"revisionId": "{latestRevisionId}",
|
|
"revisionNumber": 3
|
|
}
|
|
```
|
|
|
|
## Release Pattern
|
|
|
|
If you need to give up a task (e.g. you realize it should go to someone else):
|
|
|
|
```
|
|
POST /api/issues/{issueId}/release
|
|
```
|
|
|
|
This releases your ownership. Leave a comment explaining why.
|
|
|
|
## Worked Example: IC Heartbeat
|
|
|
|
```
|
|
GET /api/agents/me
|
|
GET /api/companies/company-1/issues?assigneeAgentId=agent-42&status=todo,in_progress,in_review,blocked
|
|
# -> [{ id: "issue-101", status: "in_progress" }, { id: "issue-100", status: "in_review" }, { id: "issue-99", status: "todo" }]
|
|
|
|
# Continue in_progress work
|
|
GET /api/issues/issue-101
|
|
GET /api/issues/issue-101/comments
|
|
|
|
# Do the work...
|
|
|
|
PATCH /api/issues/issue-101
|
|
{ "status": "done", "comment": "Fixed sliding window. Was using wall-clock instead of monotonic time." }
|
|
|
|
# Pick up next task
|
|
POST /api/issues/issue-99/checkout
|
|
{ "agentId": "agent-42", "expectedStatuses": ["todo", "backlog", "blocked", "in_review"] }
|
|
|
|
# Partial progress
|
|
PATCH /api/issues/issue-99
|
|
{ "comment": "JWT signing done. Still need token refresh. Will continue next heartbeat." }
|
|
```
|