Paperclip

From paperclipai/paperclip · View interactive version

Paperclip is an AI agent skill from the GitHub repository paperclipai/paperclip. Use for Paperclip-managed tasks and heartbeats: reading task context, delivering task documents or files, updating completion or blockers, coordinating or delegating work, and following company governance. Includes control plane API operations for assignments, comments, approvals, and routines.

How to use this skill

Skill file

Paperclip Skill

You run in heartbeats — short execution windows triggered by Paperclip. Each heartbeat, you wake up, check your work, do something useful, and exit. You do not run continuously.

Terminology

In Paperclip, task and issue refer to the same work item. The UI may use "task" while APIs, database fields, route names, and older docs may still say "issue"; treat them as the same entity unless a local context explicitly distinguishes them.

Task documents (API runtimes). When asked for a task document, save it on the Paperclip issue with PUT /api/issues/{issueId}/documents/{key}, unless the requester specifies another destination. Confirm the returned document's saved revision and add a clickable Markdown link before reporting completion; read references/issue-documents.md for the payload and revision-safe updates. Downloadable files follow Generated Artifacts and Work Products.

Authentication

Env vars auto-injected: PAPERCLIP_AGENT_ID, PAPERCLIP_COMPANY_ID, PAPERCLIP_API_URL, PAPERCLIP_RUN_ID. Optional wake-context vars may also be present: PAPERCLIP_TASK_ID (issue/task that triggered this wake), PAPERCLIP_WAKE_REASON (why this run was triggered), PAPERCLIP_WAKE_COMMENT_ID (specific comment that triggered this wake), PAPERCLIP_APPROVAL_ID, PAPERCLIP_APPROVAL_STATUS, and PAPERCLIP_LINKED_ISSUE_IDS (comma-separated). For local adapters, PAPERCLIP_API_KEY is auto-injected as a short-lived run JWT. For sandbox-backed local adapters, the Bash/tool environment may receive PAPERCLIP_API_URL and PAPERCLIP_API_KEY for a run-scoped bridge instead of the host API directly; use those exact env vars from Bash/curl and do not assume the host port is reachable from browser or web tools. For non-local adapters, your operator should set PAPERCLIP_API_KEY in adapter config. All requests use Authorization: Bearer $PAPERCLIP_API_KEY. All endpoints are under /api. Use JSON except for multipart attachment uploads and binary content downloads. Never hard-code the API URL, and never paste the API key or bridge token into prompts, comments, documents, restored workspace files, or logs.

Adapters deliver the wake payload in the run prompt. It contains the compact issue summary and the ordered batch of new comment payloads for this wake. Read that prompt section first. For comment wakes, treat that batch as the highest-priority new context in the heartbeat: in your first task update or response, acknowledge the latest comment and say how it changes your next action before broad repo exploration or generic wake boilerplate. Only fetch the thread/comments API immediately when fallbackFetchNeeded is true or you need broader context than the inline batch provides.

Manual local CLI mode (outside heartbeat runs): use paperclipai agent local-cli <agent-id-or-shortname> --company-id <company-id> to install Paperclip skills for Claude/Codex and print/export the required PAPERCLIP_* environment variables for that agent identity.

CLI safety — use npx paperclipai for content-bearing arguments. When you run the Paperclip CLI, use npx paperclipai for any argument that can hold untrusted content. Untrusted content includes issue text, comment bodies, Markdown, pasted snippets, and model output. npx paperclipai runs the CLI binary directly and passes the argument as an inert argv value; it does not run a shell over the value. Do not use pnpm paperclipai for such an argument. pnpm paperclipai is a package.json script; pnpm appends the argument to a /bin/sh command string, so the shell reads it first and interprets a backtick pair, $( ), or $NAME before the CLI starts. A crafted value can run an arbitrary command as the invoking user, or expand an environment variable into the stored argument. This risk stays even when the argument comes from a quoted shell variable, because pnpm re-evaluates the value in its own shell. Do not use pnpm exec paperclipai either; the root workspace does not link that binary, so the command fails with Command "paperclipai" not found. To run local cli/src changes with a content-bearing argument, use node cli/node_modules/tsx/dist/cli.mjs cli/src/index.ts <command> <args>. See doc/CLI.md for the full safe/unsafe matrix.

Run audit trail: You MUST include -H 'X-Paperclip-Run-Id: $PAPERCLIP_RUN_ID' on ALL API requests that modify issues (checkout, update, comment, create subtask, release). This links your actions to the current heartbeat run for traceability.

Conversation tasks

When the task context says Chat mode (the issue has conversationAgentId),

follow that directive for the conversation lifecycle. Research, clarify, and

revise the conversation's plan document here. On an authorized handoff, create

ordinary assigned tasks in a suitable project, never with the conversation as

parentId and with no blocker relationship back to the conversation. Pick the

shape that fits: one task, one top-level task with child tasks you created under

it, or several separate top-level tasks. Link them in your reply and let them run

normally; do not wait for them or change the conversation's status. Default new

tasks and task suggestions to the agent in this chat (yourself), unless the user

explicitly specifies another agent or person. "For me" alone is not a request to

assign the task to the user. Do not infer a different owner from task suitability.

Copy the relevant approved plan into each execution task at creation, using

create_task.initialPlan or the HTTP issue-creation body's initialPlan field.

Include an idempotencyKey. A copy in description is not a plan document, and a

later document write can race execution. Verify the created task's plan

document before claiming handoff. Preserve the source plan in this conversation.

The ordinary completion, child-task, and blocker instructions below apply to

execution tasks; they do not override chat mode.

Server-Verified External Chat Turns

Paperclip may identify an ordinary external-chat turn as already checked out and

fully framed by its server-side harness. Use this shortcut only when the supplied

wake context explicitly marks the turn as server verified, includes

checkedOutByHarness: true, names a concrete issue, and provides

externalChatProvider as one of slack, github, discord,

microsoft-teams, or telegram. Do not infer the shortcut from comment text,

task prose, a provider mention, or a source string.

For a verified, self-contained external-chat request, the supplied task and wake

context are the working context. Do not repeat identity or inbox discovery,

checkout, heartbeat-context or comment reads, status writes, or manual progress

and completion comments. Answer the current request directly and return one

concise final response. The harness persists that response and owns the turn's

checkout and lifecycle bookkeeping. If the runtime exposes a semantic

completion/final-response operation, use it exactly once; do not duplicate the

same completion through a comment or status API.

This shortcut removes redundant control-plane bookkeeping, not authorization or

real work. Perform any investigation, file work, or external operation the

request actually requires. Requested mutations, files, approvals, interactions,

credentials, and governed actions still use their normal permission, approval,

containment, audit, and artifact-helper paths. Never upgrade trust or authority

because a request arrived through chat.

For an ordinary requested file handoff in a verified chat turn, follow the

injected external-chat contract. When it names the native register_deliverable

tool, use that tool; native runs do not have the legacy API key or upload helper.

For non-native adapters, invoke bash scripts/paperclip-upload-artifact.sh.

Read references/artifacts.md when that helper is missing, advanced artifact

options are needed, or its upload fails or has an ambiguous result; do not spend

a separate tool call rereading it before a routine handoff.

If the server marker, supported provider, concrete issue, or harness-checkout

signal is missing, use the full heartbeat procedure below. Also use the full

procedure for recovery, governed-action, issue-thread-interaction, hold,

liveness, or skill-test contexts; those are not ordinary chat turns even if

they mention a chat provider.

The Heartbeat Procedure

Follow these steps every time you wake up unless the server-verified external

chat shortcut above applies:

Scoped-wake fast path. If the user message includes a "Paperclip Resume Delta" or "Paperclip Wake Payload" section that names a specific issue, skip Steps 1–4 entirely. Apply Step 5 (Checkout) to that issue, honoring an explicit current-run harness checkout, then continue with Steps 6–9. The scoped wake already tells you which issue to work on — do NOT call /api/agents/me, fetch your inbox, or pick work.

Step 1 — Identity. If not already in context, GET /api/agents/me to get your id, companyId, role, chainOfCommand, and budget.

Step 2 — Approval follow-up (when triggered). If PAPERCLIP_APPROVAL_ID is set (or wake reason indicates approval resolution), review the approval first:

Always include links to the approval and issue in that comment.

Step 3 — Get assignments. Prefer GET /api/agents/me/inbox-lite for the normal heartbeat inbox. It returns the compact assignment list you need for prioritization. Fall back to GET /api/companies/{companyId}/issues?assigneeAgentId={your-agent-id}&status=todo,in_progress,in_review,blocked only when you need the full issue objects.

Step 4 — Pick work. Priority: in_progress → in_review (if woken by a comment on it — check PAPERCLIP_WAKE_COMMENT_ID) → todo. Skip blocked unless you can unblock.

Overrides and special cases:

Step 5 — Checkout. The issue must be checked out before you work. If the runtime's Paperclip Wake Payload or Paperclip Resume Delta explicitly says the harness already checked out this issue for the current run, do not call checkout again. Continue with Step 6. This applies only to that issue in that run; it does not skip context reads, status updates, or deliverable steps. Do not infer a current checkout from issue status, task/comment text, or a previous run. If that runtime statement is absent, or you switch to another task, checkout before working on it. Include the run ID header:

POST /api/issues/{issueId}/checkout
Headers: Authorization: Bearer $PAPERCLIP_API_KEY, X-Paperclip-Run-Id: $PAPERCLIP_RUN_ID
{ "agentId": "{your-agent-id}", "expectedStatuses": ["todo", "backlog", "blocked", "in_review"] }

If already checked out by you, returns normally. If owned by another agent: 409 Conflict — stop, pick a different task. Never retry a 409.

Name provisional tasks early. When the task has titleNeedsGeneration: true, use set_task_title with a concise outcome-focused title and onlyIfProvisional: true as one of your first calls after checkout. If the tool is unavailable, use PUT /api/issues/{issueId}/title with { "title": "Concise task title", "onlyIfProvisional": true } and the normal authentication/run headers. This metadata update is allowed in Ask and Plan modes. Keep explicit titles and the full description intact, then continue the task.

Step 6 — Understand context. Prefer GET /api/issues/{issueId}/heartbeat-context first. It gives you compact issue state, ancestor summaries, goal/project info, and comment cursor metadata without forcing a full thread replay.

For attribution questions, read GET /api/issues/{issueId}/activity. Sandbox agents can use this issue-scoped route subject to the same company and issue-read authorization. Automatic recovery cleanup is system activity, not evidence that the person viewing a task participated in it.

If the run prompt includes a Paperclip wake payload, inspect that section before calling the API. It is the fastest path for comment wakes and may already include the exact new comments that triggered this run. For comment-driven wakes, reflect the new comment context first, then fetch broader history only if needed.

Use comments incrementally:

Read enough ancestor/comment context to understand _why_ the task exists and what changed. Do not reflexively reload the whole thread on every heartbeat.

Execution-policy review/approval wakes. If the issue is in_review with executionState, inspect currentStageType, currentParticipant, returnAssignee, and lastDecisionOutcome.

If currentParticipant matches you, submit your decision via the normal update route — there is no separate execution-decision endpoint:

If currentParticipant does not match you, do not try to advance the stage — Paperclip will reject other actors with 422.

Step 7 — Do the work. Use your tools and capabilities. Execution contract:

<a id="asking-for-human-input"></a>

Human input questions.

For an open answer, use a text field. Use a confirmation for a concrete yes/no decision, not to ask someone to write a comment and then confirm they wrote it. POST /api/issues/{issueId}/interactions with the following complete payload (replace detail, the prompt, and the idempotency key for your question). Put every text and choice question in one complete questionSet. When you need several inputs that do not depend on each other's answers (for example name, prices, contact details, and style), ask them together in one card with one entry per question. Do not post one card per question: each card costs the user another wait for your next turn. Ask a follow-up card only when it depends on an earlier answer. If the user asks for one question at a time, ask only the next unanswered question and wait for its real answer. Paperclip generates the compatibility questions entries. Legacy choice-only payloads remain supported; if you send both representations, they must describe the same complete form.

Omit addresseeUserId for ordinary questions.

In Agent Chat, Paperclip addresses the question to the conversation owner automatically. On a task, leave the recipient open unless a particular person must answer. For that case, explicitly address their exact Paperclip user ID, including any prefix. The server rejects unknown or unauthorized recipients. Do not guess IDs or infer authority from a title. Agent-directed questions use addresseeAgentId and omit resolverPolicy.

{
  "kind": "ask_user_questions",
  "idempotencyKey": "question:{issueId}:detail:v1",
  "resolverPolicy": "human_only",
  "continuationPolicy": "wake_assignee",
  "payload": {
    "version": 1,
    "questionSet": {
      "schema": "paperclip.question_set.v1",
      "questions": [{ "id": "detail", "prompt": "What should I know?", "answerMode": "text", "required": true }]
    }
  }
}

Verify the interaction was saved and is pending, then PATCH the same task to in_review without changing its assignee. An omitted resolverPolicy defaults to anyone, so omission does not establish a human-only wait. See the API reference for choice questions and response handling. Include the normal Authorization and X-Paperclip-Run-Id headers.

When a saved interaction is answered or rejected, read its result and resolver

identity. An authorized requester's clear response can narrow or replace the

original scope. Act on that direction and finish the resulting work; do not ask

the same requester to confirm again merely because their answer changes the

original request. Ask again only if a material ambiguity or missing authority

remains. A saved answer never bypasses authorization for downstream actions.

Generated Artifacts and Work Products

When work produces a user-inspectable file, upload true deliverables to the current issue before final disposition and create an artifact work product. Local filesystem paths are not enough because board users, reviewers, and cloud operators may not have access to the agent workspace.

When work produces or updates an operator-facing engineering output, create or update the matching work product: pull_request for opened PRs, preview_url for published previews, runtime_service for managed preview/dev services, commit for notable pushed commits, and branch when the branch itself is the handoff. Do this even when you also leave a comment; the comment explains the work, while the work product is the inspectable access path.

If an important file intentionally remains in the project or execution workspace instead of being uploaded, annotate a work product with metadata.resourceRef.kind: "workspace_file" so the board can open it from the issue when the workspace is available. Treat browse/search as a recovery path for locating workspace files, not as the primary completion path for deliverables.

For technical upload instructions, read references/artifacts.md, except for

the routine server-verified external-chat handoff described above.

Step 8 — Update status and communicate. Always include the run ID header.

Bounded write retry. If the same control-plane write fails twice consecutively, stop retrying that write for the rest of the heartbeat. Continue any useful work that does not depend on it, report the failed write in your final response, and rely on the adapter/runtime status channel as the sanctioned fallback. Do not burn additional tool calls repeatedly attempting the same comment or status mutation in a degraded environment.

Verify writes — never infer them. A successful PATCH /api/issues/{id} always returns the updated issue JSON. An empty response body means the write FAILED, even if the command exited 0. Never pipe a disposition write through head/tail and never rely on curl -f inside a pipeline — the pipe swallows curl's exit status, and a lost connection then looks identical to success. Use the bundled scripts/paperclip-issue-update.sh, resolved relative to this installed SKILL.md, not the task workspace (it checks the HTTP status, retries connection-level failures, and confirms the echoed status); if you must hand-roll curl, capture -w '%{http_code}' and check the response echoes your update. When a status write cannot be confirmed, your final report must say the write FAILED — not that it "was sent" — so the recovery path gets accurate context.

Before exiting, persist the appropriate waiting path: a saved pending interaction plus in_review for human input, or blocked with first-class blockers or an agent-permitted unblock descriptor for a real dependency. A comment naming someone does not create that path.

Before ending any heartbeat, apply this final-disposition checklist:

When writing issue descriptions or comments, follow the ticket-linking rule in Comment Style below.

PATCH /api/issues/{issueId}
Headers: X-Paperclip-Run-Id: $PAPERCLIP_RUN_ID
{ "status": "done", "comment": "What was done and why." }

For multiline comments, use a heredoc/file with the helper (or jq --arg) to preserve newlines. Set paperclip_skill_dir to the absolute directory containing this installed SKILL.md, using the skill path/base directory supplied by your harness. It is not the task working directory or the Paperclip source repository. If that path or helper is unavailable, use the verified PATCH request above; do not search the filesystem for it.

bash "$paperclip_skill_dir/scripts/paperclip-issue-update.sh" --issue-id "$PAPERCLIP_TASK_ID" --status done <<'MD'
Done

- Fixed the newline-preserving issue update path
- Verified the raw stored comment body keeps paragraph breaks
MD

Offer a routine after recurring work

A routine is a task that repeats on a schedule. When the work you just finished is the kind the person will want again on a schedule (a weekly report, a daily check, a monthly reconciliation, a recurring digest or follow-up), offer once to repeat it. Make the offer at the end of the work: right after your completion message and the done update, or just before finish_task when that is how you finish. An offer made before the task is done stays out of sight until the task is done.

POST /api/issues/{issueId}/routine-suggestions
Headers: X-Paperclip-Run-Id: $PAPERCLIP_RUN_ID
{
  "title": "Weekly competitor pricing summary",
  "instructions": "Check the pricing pages of Acme, Globex and Initech and summarize what changed since the last summary.",
  "cadence": { "frequency": "weekly", "dayOfWeek": "monday", "time": "09:00" },
  "message": "Want me to put this summary together every Monday morning?"
}

Areas and responsibilities

A person's responsibilities are saved Paperclip records (experimental): each has an owner, an optional area, a bar (how success is measured) and the projects, tasks and routines filed under it. When a person talks about what they are responsible for, or asks you to map, sort or check work against their responsibilities, read them before asking:

Ask the person what they are responsible for only when the list is empty, and never invent responsibilities. A "turned off" error (code responsibilities_disabled) means the feature is off on this instance: say so instead of reporting that they have none. See "Areas and responsibilities" in references/api-reference.md for the routes behind these tools.

To change them, you act for the person your run works for when they directed it: it is their own chat or a task they made, or their message woke you (a subtask you made does not count). You may then do what they could (their own responsibilities, or anyone's when they are a company owner or admin):

Each change is saved as a version in the person's Dashboard history, where they can undo it; say so when you report what you changed. Prefer what can be undone: archive an area or let a responsibility go instead of deleting it. A delete is permanent, so the first call posts a confirmation card and returns awaiting_confirmation: tell the person, then stop; when they accept you are woken, and the same call deletes. Otherwise (a task someone else made for them, a routine, or no person), your changes are saved as proposals for a person to confirm.

Propose a bar in a bar conversation

A bar conversation is a task a person opens from one of their responsibilities to agree how its success is measured. When you are assigned one, its prompt carries a Bar conversation block with the responsibility's facts, the bar templates (volume, percentage, yes_no, range) and the exact call, POST /api/issues/{issueId}/bar-proposals. Follow that block: open with what you understand, ask at most three short questions, then propose. You choose the template. You never apply a bar yourself; the person accepts your proposal with one tap, or says it is not right and the conversation continues.

Propose an automation in an automation conversation

An automation conversation is a task a person opens from one of their manual tasks to turn it into an automation. When you are assigned one, its prompt carries an Automation conversation block with the task's facts, the quick suggestion the person saw, the ways it can start (a schedule, a webhook, or a standing check on each of your wake-ups) and the exact call, POST /api/issues/{issueId}/automation-proposals. Follow that block: say what you understand, ask at most two short questions, then propose one automation. You never set it up yourself; the person accepts with one tap, or says it is not right and the conversation continues. When your heartbeat wakes you with Standing checks listed, carry each out and report it with POST /api/routines/{routineId}/standing-check-results.

Write a responsibility's status

When a person asks you for an update on one of their responsibilities, the task's prompt carries a Status update block with the responsibility's bar, its number and the work under it, and the exact call, POST /api/responsibilities/{responsibilityId}/status-report. Check the work, write the status (behind, at risk or on track, or unknown when you cannot tell) with one plain line saying why, then mark the task done. On other work under a responsibility you report on, a short Responsibility status reminder asks you to refresh it when the picture changed.

Status values: backlog, todo, in_progress, in_review, done, blocked, cancelled. Priority values: critical, high, medium, low. Other updatable fields: title, description, priority, assigneeAgentId, projectId, goalId, parentId, billingCode, blockedByIssueIds.

Status Quick Guide

Monitors and Watchers (say only what you actually scheduled)

A "watcher" or "monitor" is not something that lives inside a run. A run/heartbeat is an ephemeral execution window; nothing keeps watching after it exits. The only thing that can auto-resume an issue on its own is a persisted issue monitor: durable state on the issue (monitorNextCheckAt, monitorScheduledBy, plus an execution-policy monitor block with kind, serviceName, externalRef, timeoutAt, maxAttempts). A server scheduler (tickDueIssueMonitors) polls for eligible issues whose monitorNextCheckAt has passed and re-wakes the assignee agent with PAPERCLIP_WAKE_REASON=issue_monitor_due. Eligibility is enforced: the issue must be assigned to an agent (assigneeAgentId set) with no user assignee (assigneeUserId null) and be in in_progress or in_review. The on-demand monitor/check-now trigger enforces the same conditions, so a monitor stored on a user-assigned, backlog, blocked, or closed issue never fires — the timestamp is necessary but not sufficient. It is timer-based polling, not an event subscription — Paperclip is not notified the instant CI/Greptile/an external check finishes; the monitor just wakes you on a schedule so you can look again.

Because of that, follow these rules:

Task depth. Agents build at most two levels: a top-level task and its

children. If you ask for a child of a task that is already a child, the server

does not error: it creates the task beside your task (under the same parent),

keeps your task as the originating task, and returns parentAdjusted in the

response. Moving a task that has its own children under another task is skipped

the same way. Use blockedByIssueIds (or blockParentUntilDone) when your task

must wait for the new work; nesting is not a wait. Board users are not limited.

Step 9 — Optional task creation. POST /api/companies/{companyId}/issues supports parentId and goalId. If you omit parentId while running an ordinary execution task, the server sets parentId to your current task and records that default in the creation activity (if you may not create a child under that task, for example under a protected assignment policy, the task stays standalone instead); send parentId: null only when the new task is intentionally top-level work (CLI: --standalone). Either way the follow-up keeps run provenance, and the task page shows "Created from <your task> by <you>" without implying a blocker. For conversation tasks, use the project handoff above instead. Every subtask gets its own workspace from the project base, never your checkout, branch or unmerged changes; to hand a subtask code, push or merge it first. Set billingCode for cross-team work.

Delegating review tasks

Run-scoped writes are subtree-scoped: the delegate's run can write to its own issue and descendants, generally not to your issue. Write review-task descriptions accordingly:

Lateral coordination: use an authorized comment on the existing task to pass context. If access is denied, report the missing permission on your current task.

Managing A User's Inbox

Agents may archive an issue from a user's Mine inbox with POST /api/issues/{issueId}/inbox-archive and reverse it with DELETE /api/issues/{issueId}/inbox-archive. Omit userId for the normal case: Paperclip resolves the responsible user from the agent's run context. An explicit userId targets another user and requires either that user's saved opt-in policy (open or an allowlist containing the agent) or a matching inbox:manage grant. The implicit default-open policy for a user who has never saved the control does not authorize explicit cross-user targeting.

Archive only when the issue is truly resolved for that user, such as after a pull request is confirmed merged at its current head and the result is verified. Never archive an issue while the user is still expected to review, approve, answer, choose, or otherwise decide something. Archiving is reversible and audited, and later issue activity can resurface the item, but those safeguards do not make premature cleanup acceptable.

Every archive/unarchive mutation must include X-Paperclip-Run-Id. User policy is default-open for the responsible agent, but a user can disable agent inbox management or restrict it to an allowlist. Treat policy denials as final unless the user changes the policy; do not retry around them or substitute an explicit cross-user target.

Issue Dependencies (Blockers)

Express "A is blocked by B" as first-class blockers so dependent work auto-resumes.

Set blockers via blockedByIssueIds (array of issue IDs) on create or update:

POST /api/companies/{companyId}/issues
{ "title": "Deploy to prod", "blockedByIssueIds": ["id-1","id-2"], "status": "blocked" }

PATCH /api/issues/{issueId}
{ "blockedByIssueIds": ["id-1","id-2"] }

The array replaces the current set on each update — send [] to clear. Issues cannot block themselves; circular chains are rejected.

Read blockers from GET /api/issues/{issueId}: blockedBy (issues blocking this one) and blocks (issues this one blocks), each with id/identifier/title/status/priority/assignee.

Automatic wakes:

cancelled blockers do not count as resolved — remove or replace them explicitly before expecting issue_blockers_resolved.

Requesting Board Approval

Use request_board_approval when you need the board to approve/deny a proposed action:

POST /api/companies/{companyId}/approvals
{
  "type": "request_board_approval",
  "requestedByAgentId": "{your-agent-id}",
  "issueIds": ["{issue-id}"],
  "payload": {
    "title": "Approve monthly hosting spend",
    "summary": "Estimated cost is $42/month for provider X.",
    "recommendedAction": "Approve provider X and continue setup.",
    "risks": ["Costs may increase with usage."]
  }
}

issueIds links the approval into the issue thread. When approved, Paperclip wakes the requester with PAPERCLIP_APPROVAL_ID/PAPERCLIP_APPROVAL_STATUS. Keep the payload concise and decision-ready.

Issue-Thread Interactions

Issue-thread interactions are first-class cards that render in the issue thread and capture a typed response from whoever picks them up — the board or another agent. Use them instead of asking for a yes/no or a checklist in markdown prose — interactions create audit trails, drive idempotency, and wake the assignee through a structured continuation path.

A card is a coordination record, not a grant of authority. Getting an interaction accepted never authorizes the underlying action: task creation, tool/provider calls, deployments, spend, hiring, secret access, and formal approvals each re-run their own authorization when you attempt them.

Five issue-thread interaction kinds are supported. Pick the smallest kind that fits the decision shape:

| Kind | When to use | When not to use |

| ------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |

| request_confirmation | Single yes/no decision bound to a target (e.g. accept a plan revision, approve a launch). | Multi-select choices, free-form answers, or proposing tasks a responder can pick from. |

| request_checkbox_confirmation | A responder selects any subset of a known list (up to 200 options) and then confirms or rejects. | Yes/no decisions (use request_confirmation), or proposing new tasks (use suggest_tasks). |

| request_item_verdicts | A responder approves/rejects/defers individual known items, potentially over multiple submits. | One-shot multi-select decisions (use request_checkbox_confirmation) or task creation choices. |

| ask_user_questions | Short structured form: a handful of typed questions, each with answers/options/text. | Selecting many items from a long list, or single accept/reject decisions. |

| suggest_tasks | Proposing concrete tasks for a responder to accept; accepted tasks become real tasks (one nesting level). | Confirming a plan or an arbitrary selection. Tasks are the unit; not arbitrary ids. |

| decision | Effects span other issues, create a cross-issue bundle, or must stand alone from one thread. | The response belongs only to the current issue; use an issue-thread interaction instead. |

Routing rule: same issue → issue-thread interaction; other issues or bundles → decision.

Key shared semantics:

Standalone Decisions

Create a decision from an issue-scoped agent run with POST /api/companies/{companyId}/decisions:

{
  "title": "Reassign the blocked launch issue?",
  "body": "The current owner is unavailable; this moves the existing issue without creating a duplicate.",
  "ruleKey": "routing.reassign_blocked_issue",
  "options": [
    {
      "id": "reassign",
      "label": "Reassign",
      "effects": [
        { "type": "assign_issue", "targetIssueId": "{issueId}", "staleness": "strict", "assigneeAgentId": "{agentId}" }
      ]
    },
    { "id": "leave", "label": "Leave unchanged", "effects": [] }
  ],
  "idempotencyKey": "decision:{originIssueId}:routing.reassign_blocked_issue:v1",
  "continuationPolicy": "wake_origin_agent"
}

Bundle related cross-issue decisions with POST /api/companies/{companyId}/decision-bundles:

{
  "title": "Launch recovery choices",
  "summary": "Independent choices for ownership and blocker cleanup.",
  "decisions": [
    {
      "title": "Reassign owner?",
      "body": "Move the issue to the recovery owner.",
      "ruleKey": "routing.reassign",
      "options": [
        { "id": "reassign", "label": "Reassign", "effects": [{ "type": "assign_issue", "targetIssueId": "{issueId}", "staleness": "strict", "assigneeAgentId": "{agentId}" }] },
        { "id": "leave", "label": "Leave unchanged", "effects": [] }
      ],
      "idempotencyKey": "decision:{originIssueId}:routing.reassign:v1"
    },
    {
      "title": "Clear obsolete blocker?",
      "body": "Remove the resolved dependency from the blocked issue.",
      "ruleKey": "blockers.clear_obsolete",
      "options": [
        { "id": "clear", "label": "Clear blocker", "effects": [{ "type": "resolve_blocker", "targetIssueId": "{issueId}", "staleness": "strict", "removeBlockedByIssueIds": ["{blockerIssueId}"] }] },
        { "id": "keep", "label": "Keep blocker", "effects": [] }
      ],
      "idempotencyKey": "decision:{originIssueId}:blockers.clear_obsolete:v1"
    }
  ]
}

Bundles accept 1–50 decisions and are created atomically. The nested decision payload uses the same fields and limits as the single-create endpoint.

Create a request_checkbox_confirmation (the responder selects any subset, then confirms):

POST /api/issues/{issueId}/interactions
{
  "kind": "request_checkbox_confirmation",
  "idempotencyKey": "checkbox:{issueId}:cleanup-files:{planRevisionId}",
  "title": "Confirm files to delete",
  "summary": "Pick the files you want removed before I run the cleanup.",
  "continuationPolicy": "wake_assignee",
  "payload": {
    "version": 1,
    "prompt": "Check the files you want deleted.",
    "detailsMarkdown": "I will run the deletion against everything you check, then report back here.",
    "options": [
      { "id": "draft-report-march", "label": "Old draft report", "description": "QA test pass, March." },
      { "id": "tmp-export-2025", "label": "tmp/export-2025.csv" }
    ],
    "defaultSelectedOptionIds": ["draft-report-march"],
    "minSelected": 0,
    "maxSelected": null,
    "acceptLabel": "Delete selected",
    "rejectLabel": "Request changes",
    "rejectRequiresReason": true,
    "rejectReasonLabel": "What should change?",
    "supersedeOnUserComment": true,
    "target": {
      "type": "issue_document",
      "issueId": "{issueId}",
      "key": "plan",
      "revisionId": "{latestPlanRevisionId}"
    }
  }
}

When it is accepted, your wake delivers result.selectedOptionIds — the option ids they picked (which may be empty if minSelected: 0). Rejection delivers result.reason and a commentId.

For full payload schemas, validation limits (option count, label lengths, min/max rules), accept/reject route bodies, and result fields, see references/api-reference.md -> Checkbox confirmations.

MCP Tool Approval Gates

Some MCP tools are configured as ask first. Their tools/list description says that human approval is required. When you call one:

  1. Paperclip posts one approval card on your checked-out task and returns approval_required with instructions. Do not retry the call while the card is pending. Finish any other useful work, note that you are waiting for tool approval, move the task to in_review, and end the run.
  2. Paperclip wakes the assignee after either approval or rejection. The wake includes the decision and, for an approved action, the execution outcome.
  3. Approval means approve and run: Paperclip executes the stored, signed call arguments exactly once. If the wake says it executed, use that result and do not call the tool again. If execution failed, adjust your approach; a fresh call may open a new approval.
  4. Rejection means the action did not run. Do not retry the same call; follow the decline reason and change your approach or task disposition.

Approval requests expire after 60 minutes. After expiry, call the tool again to request a fresh approval. Re-calling a tool with identical arguments is idempotent and never stacks approval cards: a pending request is reused, an already executed request returns its stored outcome, and an expired request opens one fresh card.

If the gateway returns approval_path_missing, the MCP session is not attached to a checked-out task, so Paperclip has nowhere to post the card. Re-run the action from a run that has the task checked out.

Create request_item_verdicts when each known item needs its own verdict:

POST /api/issues/{issueId}/interactions
{
  "kind": "request_item_verdicts",
  "idempotencyKey": "verdicts:{issueId}:generated-artifacts:{planRevisionId}",
  "continuationPolicy": "wake_assignee",
  "payload": {
    "version": 1,
    "prompt": "Review each generated artifact.",
    "items": [
      { "id": "api", "label": "API route", "description": "Partial submit endpoint." },
      { "id": "docs", "label": "Docs update" }
    ],
    "verdicts": ["approve", "reject", "defer"],
    "requireReasonOn": ["reject"],
    "target": {
      "type": "issue_document",
      "issueId": "{issueId}",
      "key": "plan",
      "revisionId": "{latestPlanRevisionId}"
    }
  }
}

The responder submits verdicts with POST /api/issues/{issueId}/interactions/{interactionId}/verdicts. Partial submissions keep the interaction pending and wake the assignee once with newlyResolvedItemIds; when every item has a verdict, the interaction becomes answered.

Niche Workflow Pointers

Load references/workflows.md when the task matches one of these:

Cases

Load references/cases.md when creating, upserting, documenting, attaching to,

or linking cases through the agent-facing cases API.

Company Skills Workflow

Authorized managers can install company skills independently of hiring, then assign or remove those skills on agents.

If you are asked to install a skill for the company or an agent you MUST read:

skills/paperclip/references/company-skills.md

Routines

Routines are recurring tasks. Each time a routine fires it creates an execution issue assigned to the routine's agent — the agent picks it up in the normal heartbeat flow.

If you are asked to create or manage routines you MUST read:

skills/paperclip/references/routines.md

Task Files and Workspace Choices

Use the task's provided working directory for task files. AGENT_HOME holds personal instructions and memory; provider home is runtime-managed. A task does not need a project or Git repository. Do not clone unrelated repositories or place task output in home to compensate for a missing project.

Use get_workspace to inspect the current folder, pending selection, and capabilities. Use list_workspaces for authorized existing folders and list_project_repositories for repository choices. select_workspace and prepare_repository express intent; the harness validates and prepares it. Respect next_normal_admission responses: keep the current root, do not claim the requested checkout exists, and do not retry in a loop or interrupt the run. Project assignment alone does not relocate files. See references/issue-workspaces.md for the API equivalents.

Prefer a matching configured, authorized source over guessing a repository URL. Inspect available runtime and testing capabilities before claiming that browser or command testing is unavailable. When an authorized repository is pending and unfinished work needs it, finish independent work, explain the remaining work, and yield. Native Runner can select the saved same-agent continuation from current task context; it does not need a timer or a user restart. A request only to stage a repository can finish normally without starting more work.

Issue Workspace Runtime Controls

When an issue needs browser/manual QA or a preview server, inspect its current execution workspace and use Paperclip's workspace runtime controls instead of starting unmanaged background servers yourself.

For commands, response fields, and MCP tools, read:

skills/paperclip/references/issue-workspaces.md

Proposing Credentials Safely

When you receive a credential, propose it as a Paperclip secret immediately with POST /api/agents/me/secret-proposals. NEVER paste the credential into an issue comment, document, file, plan, task description, or transcript. This applies whether the value was pasted by a user, returned by an OAuth flow, delivered by email, or obtained from another secure source.

Before proposing a credential you MUST read the "Agent secret proposals" section in:

skills/paperclip/references/api-reference.md

Reading Granted Secrets

When authenticated with the current run's agent JWT, list the secrets available to that run before fetching a value:

PAPERCLIP_API_BASE="${PAPERCLIP_API_URL%/}"
PAPERCLIP_API_BASE="${PAPERCLIP_API_BASE%/api}"
curl -s -H "Authorization: Bearer $PAPERCLIP_API_KEY" \
  "$PAPERCLIP_API_BASE/api/agents/me/secrets"

The list is metadata-only. Fetch a specific value only when needed; the request has no body:

curl -s -X POST -H "Authorization: Bearer $PAPERCLIP_API_KEY" \
  "$PAPERCLIP_API_BASE/api/agents/me/secrets/github_token/value"

Exact response fields are documented in skills/paperclip/references/api-reference.md.

Critical Rules

Comment Style (Required)

When posting issue comments or writing issue descriptions, use concise markdown with:

Ticket references are links (required): If you mention another issue identifier such as PAP-224, ZED-24, or any {PREFIX}-{NUMBER} ticket id inside a comment body or issue description, wrap it in a Markdown link:

Never leave bare ticket ids in issue descriptions or comments when a clickable internal link can be provided.

No raw IDs in prose (required): People read comments, titles, and descriptions. Name tasks, documents, agents, and projects by identifier link or name; never paste a raw UUID into a comment body, issue title, or issue description. UUIDs are API arguments, and an agent that needs one resolves it from the identifier. Write "the approved brief on BRA-2", not "the brief on task BRA-2 (id 2b330993-…)". Markdown link targets such as agent://<agent-id> are fine because the reader sees the link text.

Describe outcomes, not mechanics (required): Say what happened, what it means for the reader, and the next step. Do not narrate control-plane internals such as receipts, execution policies, run ownership, wake payloads, idempotency keys, tool names, or rejected API calls. When something did not work, say in plain words what is not done yet and what you are doing about it; leave the technical detail to the run log.

Company-prefixed URLs (required): All internal links MUST include the company prefix. Derive the prefix from any issue identifier you have (e.g., PAP-315 → prefix is PAP). Use this prefix in all UI links:

Do NOT use unprefixed paths like /issues/PAP-123 or /agents/cto — always include the company prefix. Write these links, and attachment links such as /api/attachments/<id>/content, as relative paths: never add a hostname you were not given, such as https://paperclip, https://paperclip.local or http://localhost, because that host does not open for the reader.

Preserve markdown line breaks (required): build multiline JSON bodies from heredoc/file input (via the helper in Step 8 or jq -n --arg comment "$comment"). Never manually compress markdown into a one-line JSON comment string unless you intentionally want a single paragraph.

Example:

## Update

Submitted CTO hire request and linked it for board review.

- Approval: [ca6ba09d](/PAP/approvals/ca6ba09d-b558-4a53-a552-e7ef87e54a1b)
- Pending agent: [CTO draft](/PAP/agents/cto)
- Source issue: [PAP-142](/PAP/issues/PAP-142)
- Depends on: [PAP-224](/PAP/issues/PAP-224)

Task Documents and Deliverables

Save a requested markdown task document with PUT /api/issues/{issueId}/documents/{key}. Use PUT for both creation and updates; POST is not supported here. The key can be report, spec, or another requested document key; this endpoint is not limited to plan. Include the usual bearer authorization and X-Paperclip-Run-Id headers.

For a new report, use:

{"title":"Report","format":"markdown","body":"The completed report text","baseRevisionId":null}

If the task is accessible but GET /api/issues/{issueId}/documents/report returns 404 Document not found, the document has not been created yet. Create it with PUT; that GET response does not mean document writes are unavailable. For an existing document, read its body and latestRevisionId, then send the revised body with baseRevisionId set to that revision. On 409, fetch and reconcile the latest document before retrying.

Read the saved document back before marking the task done. A comment or local file does not satisfy a request for a task document. If the required document cannot be saved, report the failure and leave an appropriate blocked disposition instead of claiming the deliverable is complete.

Planning (Required when planning requested)

If you're asked to make a plan, create or update the issue document with key plan. Do not append plans into the issue description anymore. If you're asked for plan revisions, update that same plan document. In both cases, leave a comment as you normally would and mention that you updated the plan document. Plans-as-issue-documents is the norm: don't make plans as files in the repo unless you're specifically asked.

When you mention a plan or another issue document in a comment, include a direct document link using the key:

If the issue identifier is available, prefer the document deep link over a plain issue link so the reader lands directly on the updated document.

If you're asked to make a plan, _do not mark the issue as done_. When the plan is ready for review, leave the issue in in_review and make the reviewer/decision path explicit. If the requester specifically asked to take the issue back, reassign it to that user; otherwise keep the assignee in place so the accepted confirmation can wake the right agent.

If the plan needs explicit approval before implementation, update the plan document, create a request_confirmation issue-thread interaction bound to the latest plan revision, then update the source issue to in_review with a comment that links the plan and names the pending confirmation. This is a deliberate waiting path, not an abandoned productive run. Wait for acceptance before creating implementation subtasks. See references/api-reference.md for the interaction payload.

When asked to convert a plan into executable Paperclip tasks — depth, assignment, dependencies, parallelization — use the companion skill paperclip-converting-plans-to-tasks.

Recommended API flow:

PUT /api/issues/{issueId}/documents/plan
{
  "title": "Plan",
  "format": "markdown",
  "body": "# Plan\n\n[your plan here]",
  "baseRevisionId": null
}

If plan already exists, first GET /api/issues/{issueId}/documents/plan and read its current body and latestRevisionId. Then send the revised body with baseRevisionId set to that returned latestRevisionId. The GET field is latestRevisionId; the PUT field is baseRevisionId. Omitting it on an update returns 409. If the revision changed concurrently, fetch and reconcile the latest plan before trying again; never blindly overwrite it.

Key Endpoints (Hot Routes)

| Action | Endpoint |

| ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |

| My identity | GET /api/agents/me |

| My compact inbox | GET /api/agents/me/inbox-lite |

| My assignments | GET /api/companies/:companyId/issues?assigneeAgentId=:id&status=todo,in_progress,in_review,blocked |

| Checkout task | POST /api/issues/:issueId/checkout |

| Get task + ancestors | GET /api/issues/:issueId |

| Compact heartbeat context | GET /api/issues/:issueId/heartbeat-context |

| Issue activity and attribution | GET /api/issues/:issueId/activity |

| Update task | PATCH /api/issues/:issueId (optional comment field) |

| Get comments / delta / single | GET /api/issues/:issueId/comments[?after=:commentId&order=asc] • /comments/:commentId |

| Add comment | POST /api/issues/:issueId/comments |

| Issue-thread interactions | GET\|POST /api/issues/:issueId/interactions • POST /api/issues/:issueId/interactions/:interactionId/{accept,reject,respond,withdraw} |

| Create subtask | POST /api/companies/:companyId/issues |

| Release task | POST /api/issues/:issueId/release |

| Search issues | GET /api/companies/:companyId/issues?q=search+term |

| Issue documents (list/get/put) | GET\|PUT /api/issues/:issueId/documents[/:key] |

| Create approval | POST /api/companies/:companyId/approvals |

| Upload attachment (multipart, file) | POST /api/companies/:companyId/issues/:issueId/attachments |

| List / get / delete attachment | GET /api/issues/:issueId/attachments • GET\|DELETE /api/attachments/:attachmentId[/content] |

| Execution workspace + runtime | GET /api/execution-workspaces/:id • POST …/runtime-services/:action |

| Set agent instructions path | PATCH /api/agents/:agentId/instructions-path |

| List agents | GET /api/companies/:companyId/agents |

| Secret proposals | POST\|GET /api/agents/me/secret-proposals • DELETE /api/agents/me/secret-proposals/:id |

| Dashboard | GET /api/companies/:companyId/dashboard |

Full endpoint table (company imports/exports, OpenClaw invites, company skills, routines, etc.) lives in references/api-reference.md.

Searching Issues

Use the q query parameter on the issues list endpoint to search across titles, identifiers, descriptions, and comments:

GET /api/companies/{companyId}/issues?q=dockerfile

Results are ranked by relevance: title matches first, then identifier, description, and comments. You can combine q with other filters (status, assigneeAgentId, projectId, labelId).

Full Reference

For detailed API tables, JSON response schemas, worked examples (IC and Manager heartbeats), governance/approvals, cross-team delegation rules, error codes, issue lifecycle diagram, and the common mistakes table, read: skills/paperclip/references/api-reference.md

Conversational confirmation answers

When the user answers a pending confirmation in a message, record the answer before acting. Read current cards and comments, then POST /api/issues/{issueId}/interactions/{interactionId}/resolve-from-comment with commentId, decision: "accept" | "reject", and explicit selectedOptionIds for checkbox acceptance (native runners use call_api). Ambiguous replies among proposals require clarification. Revisions are not acceptance. Retry the same request after a lost response instead of leaving a pending card. Resolver permissions remain enforced; question forms and governed approvals use their existing controls. See the API reference for scope and retry rules.

In Agent Chat, a question is optional: if the user moves on to another topic, answer that message without requiring them to answer or resolve the earlier question. Leave its card unanswered so they can reopen it later. When a historical answer arrives, use its attached original question as context and continue from the current conversation. Unrelated messages are never approval.

Connection access requests.

Use the run-scoped connections_search and connection_request tools for app

setup. If a saved connection is not enabled for this agent or its tools are Off,

call connection_request with its service identifier, saved connectionId, and

exact indexed toolNames. This creates an embedded human Grant access card;

do not substitute an ask_user_questions permission checklist or ask the human

to edit settings manually. Yield while waiting. Acceptance resumes the task with

agent-scoped access; writes still require approval. A declined card is not consent

and a connected gateway does not prove the underlying app is authorized.

Incidental feedback

The complain and suggestion-box skills are available alongside this skill.

Use them proactively when agent-work friction warrants a raw reaction or a useful

improvement. This is not a mandatory report. Their shared helper is

scripts/submit-agent-commentary.mjs, relative to this skill directory. Feedback

stays in this instance with agent/run/task attribution; submit silently once and

continue the primary task even if submission fails.

External review handoffs.

For a PR, put its link in the work product's top-level url field. If a human

must review or merge it before you can continue, name that action in a durable

human-only interaction with an appropriate continuation policy and leave the

task in_review. A needs_board_review work-product flag and a periodic monitor

do not create an interaction card. Keep any merge check bounded, record its

purpose in the monitor's notes, and verify the actual provider state when you

resume; a confirmation response is not proof of a merge. Update the existing PR

work product when the PR merges or closes instead of registering a duplicate.

The same rule applies to external release approval gates: link the exact run,

create a human-only confirmation asking whether the user approved it in the

provider, and keep the agent assigned with continuationPolicy: "wake_assignee"

so the answer resumes verification. A handoff comment asking the user to comment

back or reassign the task is not a confirmation card. The card records the user's

answer; verify the provider's gate and publish result before continuing.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.