mirror of
https://github.com/alkimake/paperclip.git
synced 2026-06-14 01:50:39 +09:00
chore: improve worktree tooling and security docs
This commit is contained in:
parent
548721248e
commit
8bdf4081ee
17 changed files with 1100 additions and 123 deletions
|
|
@ -63,6 +63,7 @@ curl -sS "$PAPERCLIP_API_URL/llms/agent-icons.txt" \
|
|||
- adapter type
|
||||
- optional `desiredSkills` from the company skill library when this role needs installed skills on day one
|
||||
- adapter and runtime config aligned to this environment
|
||||
- leave timer heartbeats off by default; only set `runtimeConfig.heartbeat.enabled=true` with an `intervalSec` when the role genuinely needs scheduled recurring work or the user explicitly asked for it
|
||||
- capabilities
|
||||
- run prompt in adapter config (`promptTemplate` where applicable)
|
||||
- source issue linkage (`sourceIssueId` or `sourceIssueIds`) when this hire came from an issue
|
||||
|
|
@ -83,7 +84,7 @@ curl -sS -X POST "$PAPERCLIP_API_URL/api/companies/$PAPERCLIP_COMPANY_ID/agent-h
|
|||
"desiredSkills": ["vercel-labs/agent-browser/agent-browser"],
|
||||
"adapterType": "codex_local",
|
||||
"adapterConfig": {"cwd": "/abs/path/to/repo", "model": "o4-mini"},
|
||||
"runtimeConfig": {"heartbeat": {"enabled": true, "intervalSec": 300, "wakeOnDemand": true}},
|
||||
"runtimeConfig": {"heartbeat": {"enabled": false, "wakeOnDemand": true}},
|
||||
"sourceIssueId": "<issue-id>"
|
||||
}'
|
||||
```
|
||||
|
|
@ -136,6 +137,7 @@ Before sending a hire request:
|
|||
- Avoid secrets in plain text unless required by adapter behavior.
|
||||
- Ensure reporting line is correct and in-company.
|
||||
- Ensure prompt is role-specific and operationally scoped.
|
||||
- Keep timer heartbeats opt-in. Most hires should rely on assignment/on-demand wakeups unless the job explicitly needs a schedule.
|
||||
- If board requests revision, update payload and resubmit through approval flow.
|
||||
|
||||
For endpoint payload shapes and full examples, read:
|
||||
|
|
|
|||
|
|
@ -47,8 +47,7 @@ Request body matches agent create shape:
|
|||
},
|
||||
"runtimeConfig": {
|
||||
"heartbeat": {
|
||||
"enabled": true,
|
||||
"intervalSec": 300,
|
||||
"enabled": false,
|
||||
"wakeOnDemand": true
|
||||
}
|
||||
},
|
||||
|
|
@ -80,6 +79,7 @@ Response:
|
|||
If company setting disables required approval, `approval` is `null` and the agent is created as `idle`.
|
||||
|
||||
`desiredSkills` accepts company skill ids, canonical keys, or a unique slug. The server resolves and stores canonical company skill keys.
|
||||
Leave timer heartbeats disabled by default. Only set `runtimeConfig.heartbeat.enabled=true` and include an `intervalSec` when the role truly needs scheduled recurring work or the user explicitly requested it.
|
||||
|
||||
## Approval Lifecycle
|
||||
|
||||
|
|
|
|||
|
|
@ -120,6 +120,17 @@ Headers: X-Paperclip-Run-Id: $PAPERCLIP_RUN_ID
|
|||
{ "status": "blocked", "comment": "What is blocked, why, and who needs to unblock it." }
|
||||
```
|
||||
|
||||
For 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 so literal newlines survive JSON encoding:
|
||||
|
||||
```bash
|
||||
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
|
||||
```
|
||||
|
||||
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`.
|
||||
|
||||
**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.
|
||||
|
|
@ -303,6 +314,20 @@ Never leave bare ticket ids in issue descriptions or comments when a clickable i
|
|||
|
||||
Do NOT use unprefixed paths like `/issues/PAP-123` or `/agents/cto` — always include the company prefix.
|
||||
|
||||
**Preserve markdown line breaks (required):** When posting comments through shell commands, build the JSON payload from multiline stdin or another multiline source. Do not flatten a list or multi-paragraph update into a single quoted JSON line. Preferred helper:
|
||||
|
||||
```bash
|
||||
scripts/paperclip-issue-update.sh --issue-id "$PAPERCLIP_TASK_ID" --status in_progress <<'MD'
|
||||
Investigating comment formatting
|
||||
|
||||
- Pulled the raw stored comment body
|
||||
- Compared it with the run's final assistant message
|
||||
- Traced whether the flattening happened before or after the API call
|
||||
MD
|
||||
```
|
||||
|
||||
If you cannot use the helper, use `jq -n --arg comment "$comment"` with `comment` read from a heredoc or file. Never manually compress markdown into a one-line JSON `comment` string unless you intentionally want a single paragraph.
|
||||
|
||||
Example:
|
||||
|
||||
```md
|
||||
|
|
|
|||
|
|
@ -616,6 +616,7 @@ POST /api/companies/{companyId}/agent-hires
|
|||
If company policy requires approval, the new agent is created as `pending_approval` and a linked `hire_agent` approval is created automatically.
|
||||
|
||||
**Do NOT** request hires unless you are a manager or CEO. IC agents should ask their manager.
|
||||
Leave timer heartbeats off by default for new hires. Only enable a scheduled heartbeat when the role truly needs recurring timed work or the user explicitly asked for one.
|
||||
|
||||
Use `paperclip-create-agent` for the full hiring workflow (reflection + config comparison + prompt drafting).
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue