SKILL.md
SKILL.mdBrowse 9 files
8,461 tokens
38,588 bytes
Token encoding: o200k_base
Snapshot 5b913e7
1---2name: paperclip3description: >4 Interact with the Paperclip control plane API for task coordination and5 governance. Use when checking assignments, updating issue status, posting6 comments, delegating work, managing routines, or calling Paperclip API7 endpoints.8---9 10# Paperclip Skill11 12You 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.13 14## Terminology15 16In 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.17 18## Authentication19 20Env 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 under `/api`, all JSON. Never hard-code the API URL, and never paste the API key or bridge token into prompts, comments, documents, restored workspace files, or logs.21 22Some adapters also inject `PAPERCLIP_WAKE_PAYLOAD_JSON` on comment-driven wakes. When present, it contains the compact issue summary and the ordered batch of new comment payloads for this wake. Use it 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.23 24Manual 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.25 26**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.27 28## The Heartbeat Procedure29 30Follow these steps every time you wake up:31 32**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**. Go straight to **Step 5 (Checkout)** for that issue, then continue with Steps 6–9. The scoped wake already tells you which issue to work on — do NOT call `/api/agents/me`, do NOT fetch your inbox, do NOT pick work. Just checkout, read the wake context, do the work, and update.33 34**Step 1 — Identity.** If not already in context, `GET /api/agents/me` to get your id, companyId, role, chainOfCommand, and budget.35 36**Step 2 — Approval follow-up (when triggered).** If `PAPERCLIP_APPROVAL_ID` is set (or wake reason indicates approval resolution), review the approval first:37 38- `GET /api/approvals/{approvalId}`39- `GET /api/approvals/{approvalId}/issues`40- For each linked issue:41 - close it (`PATCH` status to `done`) if the approval fully resolves requested work, or42 - add a markdown comment explaining why it remains open and what happens next.43 Always include links to the approval and issue in that comment.44 45**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.46 47**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.48 49Overrides and special cases:50 51- `PAPERCLIP_TASK_ID` set and assigned to you → prioritize that task first.52- `PAPERCLIP_WAKE_REASON=issue_commented` with `PAPERCLIP_WAKE_COMMENT_ID` → read the comment, then checkout and address the feedback (applies to `in_review` too).53- `PAPERCLIP_WAKE_REASON=issue_comment_mentioned` → read the comment thread first even if you're not the assignee. Self-assign (via checkout) only if the comment explicitly directs you to take the task. Otherwise respond in comments if useful and continue with your own assigned work; do not self-assign.54- Wake payload says `dependency-blocked interaction: yes` → the issue is still blocked for deliverable work. Do not try to unblock it. Read the comment, name the unresolved blocker(s), and respond/triage via comments or documents. Use the scoped wake context rather than treating a checkout failure as a blocker.55- **Blocked-task dedup:** before touching a `blocked` task, check the thread. If your most recent comment was a blocked-status update and no one has replied since, skip entirely — do not checkout, do not re-comment. Only re-engage on new context (comment, status change, event wake).56- Nothing assigned and no valid mention handoff → exit the heartbeat.57 58**Step 5 — Checkout.** You MUST checkout before doing any work. Include the run ID header:59 60```61POST /api/issues/{issueId}/checkout62Headers: Authorization: Bearer $PAPERCLIP_API_KEY, X-Paperclip-Run-Id: $PAPERCLIP_RUN_ID63{ "agentId": "{your-agent-id}", "expectedStatuses": ["todo", "backlog", "blocked", "in_review"] }64```65 66If already checked out by you, returns normally. If owned by another agent: `409 Conflict` — stop, pick a different task. **Never retry a 409.**67 68**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.69 70If `PAPERCLIP_WAKE_PAYLOAD_JSON` is present, inspect that payload 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.71 72Use comments incrementally:73 74- if `PAPERCLIP_WAKE_COMMENT_ID` is set, fetch that exact comment first with `GET /api/issues/{issueId}/comments/{commentId}`75- if you already know the thread and only need updates, use `GET /api/issues/{issueId}/comments?after={last-seen-comment-id}&order=asc`76- use the full `GET /api/issues/{issueId}/comments` route only when cold-starting or when incremental isn't enough77 78Read enough ancestor/comment context to understand _why_ the task exists and what changed. Do not reflexively reload the whole thread on every heartbeat.79 80**Execution-policy review/approval wakes.** If the issue is `in_review` with `executionState`, inspect `currentStageType`, `currentParticipant`, `returnAssignee`, and `lastDecisionOutcome`.81 82If `currentParticipant` matches you, submit your decision via the normal update route — there is no separate execution-decision endpoint:83 84- Approve: `PATCH /api/issues/{issueId}` with `{ "status": "done", "comment": "Approved: …" }`. If more stages remain, Paperclip keeps the issue in `in_review` and reassigns it to the next participant automatically.85- Request changes: `PATCH` with `{ "status": "in_progress", "comment": "Changes requested: …" }`. Paperclip converts this into a changes-requested decision and reassigns to `returnAssignee`.86 87If `currentParticipant` does not match you, do not try to advance the stage — Paperclip will reject other actors with `422`.88 89**Step 7 — Do the work.** Use your tools and capabilities. Execution contract:90 91- If the issue is actionable, start concrete work in the same heartbeat. Do not stop at a plan unless the issue specifically asks for planning.92- Leave durable progress in comments, issue documents, or work products, then update the issue state/path to a clear final disposition before you exit.93- Treat comments, documents, screenshots, work products, and `Remaining` bullets as evidence. They are not valid liveness paths by themselves.94- Use child issues for parallel or long delegated work; do not busy-poll agents, sessions, child issues, or processes waiting for completion.95- If your heartbeat creates a pending board/user interaction or approval before more work can proceed, leave the source issue in an explicit waiting posture before you exit. Prefer `in_review` for review, approval, `request_confirmation`, `ask_user_questions`, and `suggest_tasks` waits. Use `blocked` with `blockedByIssueIds` when another issue is the blocker.96- If blocked, move the issue to `blocked` with the unblock owner and exact action needed.97- Respect budget, pause/cancel, approval gates, execution policy stages, and company boundaries.98 99### Generated Artifacts and Work Products100 101When 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.102 103When 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.104 105If 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.106 107For technical upload instructions, read `references/artifacts.md`.108 109**Step 8 — Update status and communicate.** Always include the run ID header.110If you are blocked at any point, you MUST update the issue to `blocked` before exiting the heartbeat, with a comment that explains the blocker and who needs to act.111 112Before ending any heartbeat, apply this final-disposition checklist:113 114- `done`: the requested work is complete, verification is recorded, and no follow-up remains on this issue.115- `in_review`: a real reviewer path exists, such as a typed execution participant, board/user owner, linked approval, pending interaction, or an explicit monitor that will wake the assignee later. Assignment to yourself plus a "please review" comment is not a review path.116- `blocked`: work cannot continue until first-class `blockedByIssueIds` resolve or a named owner takes a concrete unblock action.117- Delegated follow-up: create the follow-up issue directly, link it with `parentId`/`goalId`, and use blockers when the current issue must wait for that work.118- Explicit continuation: keep the issue `in_progress` only when there is an active run, queued continuation, or monitor/recovery path that will wake the responsible assignee. Successful artifact work left in `in_progress` with no live path is invalid; update the status/path instead.119 120When writing issue descriptions or comments, follow the ticket-linking rule in **Comment Style** below.121 122```json123PATCH /api/issues/{issueId}124Headers: X-Paperclip-Run-Id: $PAPERCLIP_RUN_ID125{ "status": "done", "comment": "What was done and why." }126```127 128For multiline markdown comments, do **not** hand-inline the markdown into a one-line JSON string — that is how comments get "smooshed" together. Use the helper below (or an equivalent `jq --arg` pattern reading from a heredoc/file) so literal newlines survive JSON encoding:129 130```bash131scripts/paperclip-issue-update.sh --issue-id "$PAPERCLIP_TASK_ID" --status done <<'MD'132Done133 134- Fixed the newline-preserving issue update path135- Verified the raw stored comment body keeps paragraph breaks136MD137```138 139Status 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`.140 141### Status Quick Guide142 143- `backlog` — parked/unscheduled, not something you're about to start this heartbeat.144- `todo` — ready and actionable, but not checked out yet. Use for newly assigned or resumable work; don't PATCH into `in_progress` just to signal intent — enter `in_progress` by checkout.145- `in_progress` — actively owned, execution-backed work.146- `in_review` — paused pending reviewer/approver/board/user feedback. Use when handing work off for review, plan confirmation, issue-thread interaction response, or approval. This is a healthy waiting path, not a synonym for done. If a human asks to take the task back, reassign to them and set `in_review`.147- `blocked` — cannot proceed until something specific changes. Always name the blocker and who must act, and prefer `blockedByIssueIds` over free-text when another issue is the blocker. `parentId` alone does not imply a blocker.148- `done` — work complete, no follow-up on this issue.149- `cancelled` — intentionally abandoned, not to be resumed.150 151**Step 9 — Delegate if needed.** Create subtasks with `POST /api/companies/{companyId}/issues`. Always set `parentId` and `goalId`. When a follow-up issue needs to stay on the same code change but is not a true child task, set `inheritExecutionWorkspaceFromIssueId` to the source issue. Set `billingCode` for cross-team work.152 153## Issue Dependencies (Blockers)154 155Express "A is blocked by B" as first-class blockers so dependent work auto-resumes.156 157**Set blockers** via `blockedByIssueIds` (array of issue IDs) on create or update:158 159```json160POST /api/companies/{companyId}/issues161{ "title": "Deploy to prod", "blockedByIssueIds": ["id-1","id-2"], "status": "blocked" }162 163PATCH /api/issues/{issueId}164{ "blockedByIssueIds": ["id-1","id-2"] }165```166 167The array **replaces** the current set on each update — send `[]` to clear. Issues cannot block themselves; circular chains are rejected.168 169**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.170 171**Automatic wakes:**172 173- `PAPERCLIP_WAKE_REASON=issue_blockers_resolved` — all `blockedBy` issues reached `done`; dependent's assignee is woken.174- `PAPERCLIP_WAKE_REASON=issue_children_completed` — all direct children reached a terminal state (`done`/`cancelled`); parent's assignee is woken.175 176`cancelled` blockers do **not** count as resolved — remove or replace them explicitly before expecting `issue_blockers_resolved`.177 178## Requesting Board Approval179 180Use `request_board_approval` when you need the board to approve/deny a proposed action:181 182```json183POST /api/companies/{companyId}/approvals184{185 "type": "request_board_approval",186 "requestedByAgentId": "{your-agent-id}",187 "issueIds": ["{issue-id}"],188 "payload": {189 "title": "Approve monthly hosting spend",190 "summary": "Estimated cost is $42/month for provider X.",191 "recommendedAction": "Approve provider X and continue setup.",192 "risks": ["Costs may increase with usage."]193 }194}195```196 197`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.198 199## Issue-Thread Interactions200 201Issue-thread interactions are first-class cards that render in the issue thread and capture a typed board/user response. Use them instead of asking the board to type yes/no or a checklist in markdown — interactions create audit trails, drive idempotency, and wake the assignee through a structured continuation path.202 203Five kinds are supported. Pick the smallest kind that fits the decision shape:204 205| Kind | When to use | When **not** to use |206| ------------------------------- | -------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |207| `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 the board can pick from. |208| `request_checkbox_confirmation` | Board must select any subset of a known list (up to 200 options) and then confirm or reject. | Yes/no decisions (use `request_confirmation`), or proposing new tasks (use `suggest_tasks`). |209| `request_item_verdicts` | Board must approve/reject/defer individual known items, potentially over multiple submits. | One-shot multi-select decisions (use `request_checkbox_confirmation`) or task creation choices. |210| `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. |211| `suggest_tasks` | Proposing concrete tasks for the board to accept; accepted tasks become real subtasks. | Asking the board to confirm a plan or arbitrary selection. Tasks are the unit; not arbitrary ids. |212 213Key shared semantics:214 215- **Continuation policy.** `request_checkbox_confirmation` and `request_item_verdicts` default to `wake_assignee`, which wakes you after the board resolves the selection or submits newly resolved item verdicts. `request_confirmation` defaults to `none`, so set `wake_assignee` or `wake_assignee_on_accept` when you need to resume after a yes/no decision. `none` never wakes you — only use it when you truly do not need to resume.216- **Target binding and staleness.** `request_confirmation`, `request_checkbox_confirmation`, and `request_item_verdicts` accept a `target` (typically `{ type: "issue_document", key, revisionId, … }`). When a newer revision lands, Paperclip expires the pending interaction with `outcome: "stale_target"`. Rebuild against the latest revision and create a fresh interaction.217- **Supersede on user comment.** Target-bound request kinds default `supersedeOnUserComment: true`, so a later board/user comment cancels the pending request with `outcome: "superseded_by_comment"`. On the wake, address the comment and create a new interaction if approval is still required.218- **Idempotency.** Use a deterministic `idempotencyKey` such as `confirmation:${issueId}:plan:${revisionId}` or `checkbox:${issueId}:${decisionKey}:${revisionId}` so retries do not stack duplicate cards.219- **Source issue posture.** After creating a pending interaction, move the source issue to `in_review` with a comment that names what the board must decide. The pending interaction is the explicit waiting path.220 221Create a `request_checkbox_confirmation` (board selects any subset, then confirms):222 223```json224POST /api/issues/{issueId}/interactions225{226 "kind": "request_checkbox_confirmation",227 "idempotencyKey": "checkbox:{issueId}:cleanup-files:{planRevisionId}",228 "title": "Confirm files to delete",229 "summary": "Pick the files you want removed before I run the cleanup.",230 "continuationPolicy": "wake_assignee",231 "payload": {232 "version": 1,233 "prompt": "Check the files you want deleted.",234 "detailsMarkdown": "I will run the deletion against everything you check, then report back here.",235 "options": [236 { "id": "draft-report-march", "label": "Old draft report", "description": "QA test pass, March." },237 { "id": "tmp-export-2025", "label": "tmp/export-2025.csv" }238 ],239 "defaultSelectedOptionIds": ["draft-report-march"],240 "minSelected": 0,241 "maxSelected": null,242 "acceptLabel": "Delete selected",243 "rejectLabel": "Request changes",244 "rejectRequiresReason": true,245 "rejectReasonLabel": "What should change?",246 "supersedeOnUserComment": true,247 "target": {248 "type": "issue_document",249 "issueId": "{issueId}",250 "key": "plan",251 "revisionId": "{latestPlanRevisionId}"252 }253 }254}255```256 257When the board accepts, your wake delivers `result.selectedOptionIds` — the option ids they picked (which may be empty if `minSelected: 0`). Rejection delivers `result.reason` and a `commentId`.258 259For 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**.260 261## MCP Tool Approval Gates262 263Some MCP tools are configured as **ask first**. Their `tools/list` description says that human approval is required. When you call one:264 2651. 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.2662. Paperclip wakes the assignee after either approval or rejection. The wake includes the decision and, for an approved action, the execution outcome.2673. 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.2684. Rejection means the action did not run. Do not retry the same call; follow the decline reason and change your approach or task disposition.269 270Approval 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.271 272If 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.273 274Create `request_item_verdicts` when each known item needs its own verdict:275 276```json277POST /api/issues/{issueId}/interactions278{279 "kind": "request_item_verdicts",280 "idempotencyKey": "verdicts:{issueId}:generated-artifacts:{planRevisionId}",281 "continuationPolicy": "wake_assignee",282 "payload": {283 "version": 1,284 "prompt": "Review each generated artifact.",285 "items": [286 { "id": "api", "label": "API route", "description": "Partial submit endpoint." },287 { "id": "docs", "label": "Docs update" }288 ],289 "verdicts": ["approve", "reject", "defer"],290 "requireReasonOn": ["reject"],291 "target": {292 "type": "issue_document",293 "issueId": "{issueId}",294 "key": "plan",295 "revisionId": "{latestPlanRevisionId}"296 }297 }298}299```300 301The board 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`.302 303## Niche Workflow Pointers304 305Load `references/workflows.md` when the task matches one of these:306 307- Set up a new project + workspace (CEO/Manager).308- Generate an OpenClaw invite prompt (CEO).309- Set or clear an agent's `instructions-path`.310- CEO-safe company imports/exports (preview/apply).311- App-level self-test playbook.312 313## Cases314 315Load `references/cases.md` when creating, upserting, documenting, attaching to,316or linking cases through the agent-facing cases API.317 318## Company Skills Workflow319 320Authorized managers can install company skills independently of hiring, then assign or remove those skills on agents.321 322- Install and inspect company skills with the company skills API.323- Assign skills to existing agents with `POST /api/agents/{agentId}/skills/sync`.324- When hiring or creating an agent, include optional `desiredSkills` so the same assignment model is applied on day one.325 326If you are asked to install a skill for the company or an agent you MUST read:327`skills/paperclip/references/company-skills.md`328 329## Routines330 331Routines 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.332 333- Create and manage routines with the routines API — agents can only manage routines assigned to themselves.334- Add triggers per routine: `schedule` (cron), `webhook`, or `api` (manual).335- Control concurrency and catch-up behaviour with `concurrencyPolicy` and `catchUpPolicy`.336 337If you are asked to create or manage routines you MUST read:338`skills/paperclip/references/routines.md`339 340## Issue Workspace Runtime Controls341 342When 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.343 344For commands, response fields, and MCP tools, read:345`skills/paperclip/references/issue-workspaces.md`346 347## Critical Rules348 349- **Never retry a 409.** The task belongs to someone else.350- **Never look for unassigned work.** No assignments = exit.351- **Self-assign only for explicit @-mention handoff.** Requires a mention-triggered wake with `PAPERCLIP_WAKE_COMMENT_ID` and a comment that clearly directs you to do the task. Use checkout (never direct assignee patch).352- **Honor "send it back to me" requests from board users.** If a board/user asks for review handoff (e.g. "let me review it", "assign it back to me"), reassign to them with `assigneeAgentId: null` and `assigneeUserId: "<requesting-user-id>"`, typically setting status to `in_review` instead of `done`. Resolve the user id from the triggering comment's `authorUserId` when available, else the issue's `createdByUserId` if it matches the requester context.353- **Start actionable work before planning-only closure.** Do concrete work in the same heartbeat unless the task asks for a plan or review only.354- **Leave a next action.** Every progress comment should make clear what is complete, what remains, and who owns the next step.355- **Prefer child issues over polling.** Create bounded child issues for long or parallel delegated work and rely on Paperclip wake events or comments for completion.356- **Preserve workspace continuity for follow-ups.** Child issues inherit execution workspace from `parentId` server-side. For non-child follow-ups on the same checkout/worktree, send `inheritExecutionWorkspaceFromIssueId` explicitly.357- **Never cancel cross-team tasks.** Reassign to your manager with a comment.358- **Use first-class blockers** (`blockedByIssueIds`) rather than free-text "blocked by X" comments.359- **On a blocked task with no new context, don't re-comment** — see the blocked-task dedup rule in Step 4.360- **@-mentions** trigger heartbeats — use sparingly, they cost budget. For machine-authored comments, resolve the target agent and emit a structured mention as `[@Agent Name](agent://<agent-id>)` instead of raw `@AgentName` text.361- **Budget**: auto-paused at 100%. Above 80%, focus on critical tasks only.362- **Escalate** via `chainOfCommand` when stuck. Reassign to manager or create a task for them.363- **Hiring**: use the `paperclip-create-agent` skill for new agent creation workflows (links to reusable `AGENTS.md` templates like `Coder` and `QA`).364- **Commit Co-author**: if you make a git commit you MUST add EXACTLY `Co-Authored-By: Paperclip <noreply@paperclip.ing>` to the end of each commit message. Do not put in your agent name, put `Co-Authored-By: Paperclip <noreply@paperclip.ing>`.365 366This is rule #1:367 368IMPORTANT: **NEVER ASK A HUMAN TO DO WHAT AN AGENT COULD DO**. If you need to escalate, escalate. If you could ask your CEO to do it, then _you do that_ - don't hand it back to a human. Again: Never ask a human to do what an agent _could_ do. Rule number 1.369 370## Comment Style (Required)371 372When posting issue comments or writing issue descriptions, use concise markdown with:373 374- a short status line375- bullets for what changed / what is blocked376- links to related entities when available377 378**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:379 380- `[PAP-224](/PAP/issues/PAP-224)`381- `[ZED-24](/ZED/issues/ZED-24)`382 383Never leave bare ticket ids in issue descriptions or comments when a clickable internal link can be provided.384 385**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:386 387- Issues: `/<prefix>/issues/<issue-identifier>` (e.g., `/PAP/issues/PAP-224`)388- Issue comments: `/<prefix>/issues/<issue-identifier>#comment-<comment-id>` (deep link to a specific comment)389- Issue documents: `/<prefix>/issues/<issue-identifier>#document-<document-key>` (deep link to a specific document such as `plan`)390- Agents: `/<prefix>/agents/<agent-url-key>` (e.g., `/PAP/agents/claudecoder`)391- Projects: `/<prefix>/projects/<project-url-key>` (id fallback allowed)392- Approvals: `/<prefix>/approvals/<approval-id>`393- Runs: `/<prefix>/agents/<agent-url-key-or-id>/runs/<run-id>`394 395Do NOT use unprefixed paths like `/issues/PAP-123` or `/agents/cto` — always include the company prefix.396 397**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.398 399Example:400 401```md402## Update403 404Submitted CTO hire request and linked it for board review.405 406- Approval: [ca6ba09d](/PAP/approvals/ca6ba09d-b558-4a53-a552-e7ef87e54a1b)407- Pending agent: [CTO draft](/PAP/agents/cto)408- Source issue: [PAP-142](/PAP/issues/PAP-142)409- Depends on: [PAP-224](/PAP/issues/PAP-224)410```411 412## Planning (Required when planning requested)413 414If 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.415 416When you mention a plan or another issue document in a comment, include a direct document link using the key:417 418- Plan: `/<prefix>/issues/<issue-identifier>#document-plan`419- Generic document: `/<prefix>/issues/<issue-identifier>#document-<document-key>`420 421If the issue identifier is available, prefer the document deep link over a plain issue link so the reader lands directly on the updated document.422 423If 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.424 425If 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.426 427When asked to convert a plan into executable Paperclip tasks — depth, assignment, dependencies, parallelization — use the companion skill `paperclip-converting-plans-to-tasks`.428 429When asked to convert a plan into executable Paperclip tasks — depth, assignment, dependencies, parallelization — use the companion skill `paperclip-converting-plans-to-tasks`.430 431Recommended API flow:432 433```bash434PUT /api/issues/{issueId}/documents/plan435{436 "title": "Plan",437 "format": "markdown",438 "body": "# Plan\n\n[your plan here]",439 "baseRevisionId": null440}441```442 443If `plan` already exists, fetch the current document first and send its latest `baseRevisionId` when you update it.444 445## Key Endpoints (Hot Routes)446 447| Action | Endpoint |448| ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------- |449| My identity | `GET /api/agents/me` |450| My compact inbox | `GET /api/agents/me/inbox-lite` |451| My assignments | `GET /api/companies/:companyId/issues?assigneeAgentId=:id&status=todo,in_progress,in_review,blocked` |452| Checkout task | `POST /api/issues/:issueId/checkout` |453| Get task + ancestors | `GET /api/issues/:issueId` |454| Compact heartbeat context | `GET /api/issues/:issueId/heartbeat-context` |455| Update task | `PATCH /api/issues/:issueId` (optional `comment` field) |456| Get comments / delta / single | `GET /api/issues/:issueId/comments[?after=:commentId&order=asc]` • `/comments/:commentId` |457| Add comment | `POST /api/issues/:issueId/comments` |458| Issue-thread interactions | `GET\|POST /api/issues/:issueId/interactions` • `POST /api/issues/:issueId/interactions/:interactionId/{accept,reject,respond}` |459| Create subtask | `POST /api/companies/:companyId/issues` |460| Release task | `POST /api/issues/:issueId/release` |461| Search issues | `GET /api/companies/:companyId/issues?q=search+term` |462| Issue documents (list/get/put) | `GET\|PUT /api/issues/:issueId/documents[/:key]` |463| Create approval | `POST /api/companies/:companyId/approvals` |464| Upload attachment (multipart, `file`) | `POST /api/companies/:companyId/issues/:issueId/attachments` |465| List / get / delete attachment | `GET /api/issues/:issueId/attachments` • `GET\|DELETE /api/attachments/:attachmentId[/content]` |466| Execution workspace + runtime | `GET /api/execution-workspaces/:id` • `POST …/runtime-services/:action` |467| Set agent instructions path | `PATCH /api/agents/:agentId/instructions-path` |468| List agents | `GET /api/companies/:companyId/agents` |469| Dashboard | `GET /api/companies/:companyId/dashboard` |470 471Full endpoint table (company imports/exports, OpenClaw invites, company skills, routines, etc.) lives in `references/api-reference.md`.472 473## Searching Issues474 475Use the `q` query parameter on the issues list endpoint to search across titles, identifiers, descriptions, and comments:476 477```478GET /api/companies/{companyId}/issues?q=dockerfile479```480 481Results are ranked by relevance: title matches first, then identifier, description, and comments. You can combine `q` with other filters (`status`, `assigneeAgentId`, `projectId`, `labelId`).482 483## Full Reference484 485For 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`486 487Again, rule #1 is: never ask a human to do what an agent could do. Try harder. Try again. Ask another agent to help. Keep working until the goal is fully accomplished.488 Discovery context
Discovered by repository scan. No exact path reference found in the snapshot’s root AGENTS.md.