@microvac/adapter-codex-local 0.0.0-stage → 0.1.0-rc.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/format-event.d.ts +2 -0
- package/dist/cli/format-event.d.ts.map +1 -0
- package/dist/cli/format-event.js +218 -0
- package/dist/cli/format-event.js.map +1 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +2 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/quota-probe.d.ts +3 -0
- package/dist/cli/quota-probe.d.ts.map +1 -0
- package/dist/cli/quota-probe.js +104 -0
- package/dist/cli/quota-probe.js.map +1 -0
- package/dist/index.d.ts +41 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +268 -0
- package/dist/index.js.map +1 -0
- package/dist/index.test.d.ts +2 -0
- package/dist/index.test.d.ts.map +1 -0
- package/dist/index.test.js +125 -0
- package/dist/index.test.js.map +1 -0
- package/dist/server/acp.cli-version.test.d.ts +2 -0
- package/dist/server/acp.cli-version.test.d.ts.map +1 -0
- package/dist/server/acp.cli-version.test.js +151 -0
- package/dist/server/acp.cli-version.test.js.map +1 -0
- package/dist/server/acp.d.ts +31 -0
- package/dist/server/acp.d.ts.map +1 -0
- package/dist/server/acp.js +608 -0
- package/dist/server/acp.js.map +1 -0
- package/dist/server/acp.quota.test.d.ts +2 -0
- package/dist/server/acp.quota.test.d.ts.map +1 -0
- package/dist/server/acp.quota.test.js +176 -0
- package/dist/server/acp.quota.test.js.map +1 -0
- package/dist/server/acp.test.d.ts +2 -0
- package/dist/server/acp.test.d.ts.map +1 -0
- package/dist/server/acp.test.js +1263 -0
- package/dist/server/acp.test.js.map +1 -0
- package/dist/server/adapter-auth-promotion.d.ts +102 -0
- package/dist/server/adapter-auth-promotion.d.ts.map +1 -0
- package/dist/server/adapter-auth-promotion.js +210 -0
- package/dist/server/adapter-auth-promotion.js.map +1 -0
- package/dist/server/adapter-auth-promotion.test.d.ts +2 -0
- package/dist/server/adapter-auth-promotion.test.d.ts.map +1 -0
- package/dist/server/adapter-auth-promotion.test.js +615 -0
- package/dist/server/adapter-auth-promotion.test.js.map +1 -0
- package/dist/server/auth-check.d.ts +8 -0
- package/dist/server/auth-check.d.ts.map +1 -0
- package/dist/server/auth-check.js +8 -0
- package/dist/server/auth-check.js.map +1 -0
- package/dist/server/auth-precedence.d.ts +16 -0
- package/dist/server/auth-precedence.d.ts.map +1 -0
- package/dist/server/auth-precedence.js +20 -0
- package/dist/server/auth-precedence.js.map +1 -0
- package/dist/server/auth-precedence.test.d.ts +2 -0
- package/dist/server/auth-precedence.test.d.ts.map +1 -0
- package/dist/server/auth-precedence.test.js +100 -0
- package/dist/server/auth-precedence.test.js.map +1 -0
- package/dist/server/cli-version.d.ts +45 -0
- package/dist/server/cli-version.d.ts.map +1 -0
- package/dist/server/cli-version.js +95 -0
- package/dist/server/cli-version.js.map +1 -0
- package/dist/server/codex-args.d.ts +13 -0
- package/dist/server/codex-args.d.ts.map +1 -0
- package/dist/server/codex-args.js +64 -0
- package/dist/server/codex-args.js.map +1 -0
- package/dist/server/codex-args.test.d.ts +2 -0
- package/dist/server/codex-args.test.d.ts.map +1 -0
- package/dist/server/codex-args.test.js +257 -0
- package/dist/server/codex-args.test.js.map +1 -0
- package/dist/server/codex-auth-cache.d.ts +179 -0
- package/dist/server/codex-auth-cache.d.ts.map +1 -0
- package/dist/server/codex-auth-cache.js +520 -0
- package/dist/server/codex-auth-cache.js.map +1 -0
- package/dist/server/codex-auth-cache.test.d.ts +2 -0
- package/dist/server/codex-auth-cache.test.d.ts.map +1 -0
- package/dist/server/codex-auth-cache.test.js +530 -0
- package/dist/server/codex-auth-cache.test.js.map +1 -0
- package/dist/server/codex-auth-copyback.d.ts +53 -0
- package/dist/server/codex-auth-copyback.d.ts.map +1 -0
- package/dist/server/codex-auth-copyback.js +123 -0
- package/dist/server/codex-auth-copyback.js.map +1 -0
- package/dist/server/codex-auth-copyback.test.d.ts +2 -0
- package/dist/server/codex-auth-copyback.test.d.ts.map +1 -0
- package/dist/server/codex-auth-copyback.test.js +507 -0
- package/dist/server/codex-auth-copyback.test.js.map +1 -0
- package/dist/server/codex-auth-merge-decision.cjs +170 -0
- package/dist/server/codex-auth-merge-decision.d.ts +22 -0
- package/dist/server/codex-auth-merge-decision.d.ts.map +1 -0
- package/dist/server/codex-auth-merge-decision.js +58 -0
- package/dist/server/codex-auth-merge-decision.js.map +1 -0
- package/dist/server/codex-auth-merge-decision.test.d.ts +2 -0
- package/dist/server/codex-auth-merge-decision.test.d.ts.map +1 -0
- package/dist/server/codex-auth-merge-decision.test.js +215 -0
- package/dist/server/codex-auth-merge-decision.test.js.map +1 -0
- package/dist/server/codex-auth-merge-extract.sh +73 -0
- package/dist/server/codex-auth-merge-scripts.d.ts +21 -0
- package/dist/server/codex-auth-merge-scripts.d.ts.map +1 -0
- package/dist/server/codex-auth-merge-scripts.js +40 -0
- package/dist/server/codex-auth-merge-scripts.js.map +1 -0
- package/dist/server/codex-auth-merge.test.d.ts +2 -0
- package/dist/server/codex-auth-merge.test.d.ts.map +1 -0
- package/dist/server/codex-auth-merge.test.js +714 -0
- package/dist/server/codex-auth-merge.test.js.map +1 -0
- package/dist/server/codex-auth-seed-write.d.ts +30 -0
- package/dist/server/codex-auth-seed-write.d.ts.map +1 -0
- package/dist/server/codex-auth-seed-write.js +41 -0
- package/dist/server/codex-auth-seed-write.js.map +1 -0
- package/dist/server/codex-home.d.ts +169 -0
- package/dist/server/codex-home.d.ts.map +1 -0
- package/dist/server/codex-home.js +822 -0
- package/dist/server/codex-home.js.map +1 -0
- package/dist/server/codex-home.test.d.ts +2 -0
- package/dist/server/codex-home.test.d.ts.map +1 -0
- package/dist/server/codex-home.test.js +1287 -0
- package/dist/server/codex-home.test.js.map +1 -0
- package/dist/server/config-schema.d.ts +3 -0
- package/dist/server/config-schema.d.ts.map +1 -0
- package/dist/server/config-schema.js +67 -0
- package/dist/server/config-schema.js.map +1 -0
- package/dist/server/device-login-export.d.ts +56 -0
- package/dist/server/device-login-export.d.ts.map +1 -0
- package/dist/server/device-login-export.js +230 -0
- package/dist/server/device-login-export.js.map +1 -0
- package/dist/server/device-login-export.test.d.ts +2 -0
- package/dist/server/device-login-export.test.d.ts.map +1 -0
- package/dist/server/device-login-export.test.js +245 -0
- package/dist/server/device-login-export.test.js.map +1 -0
- package/dist/server/device-login-parse.d.ts +20 -0
- package/dist/server/device-login-parse.d.ts.map +1 -0
- package/dist/server/device-login-parse.js +155 -0
- package/dist/server/device-login-parse.js.map +1 -0
- package/dist/server/device-login-parse.test.d.ts +2 -0
- package/dist/server/device-login-parse.test.d.ts.map +1 -0
- package/dist/server/device-login-parse.test.js +269 -0
- package/dist/server/device-login-parse.test.js.map +1 -0
- package/dist/server/device-login-runner.d.ts +69 -0
- package/dist/server/device-login-runner.d.ts.map +1 -0
- package/dist/server/device-login-runner.js +110 -0
- package/dist/server/device-login-runner.js.map +1 -0
- package/dist/server/device-login-runner.test.d.ts +2 -0
- package/dist/server/device-login-runner.test.d.ts.map +1 -0
- package/dist/server/device-login-runner.test.js +201 -0
- package/dist/server/device-login-runner.test.js.map +1 -0
- package/dist/server/engine-availability.test.d.ts +2 -0
- package/dist/server/engine-availability.test.d.ts.map +1 -0
- package/dist/server/engine-availability.test.js +41 -0
- package/dist/server/engine-availability.test.js.map +1 -0
- package/dist/server/execute.acp-fallback.test.d.ts +2 -0
- package/dist/server/execute.acp-fallback.test.d.ts.map +1 -0
- package/dist/server/execute.acp-fallback.test.js +123 -0
- package/dist/server/execute.acp-fallback.test.js.map +1 -0
- package/dist/server/execute.auth-precedence.test.d.ts +2 -0
- package/dist/server/execute.auth-precedence.test.d.ts.map +1 -0
- package/dist/server/execute.auth-precedence.test.js +137 -0
- package/dist/server/execute.auth-precedence.test.js.map +1 -0
- package/dist/server/execute.auth.test.d.ts +2 -0
- package/dist/server/execute.auth.test.d.ts.map +1 -0
- package/dist/server/execute.auth.test.js +197 -0
- package/dist/server/execute.auth.test.js.map +1 -0
- package/dist/server/execute.d.ts +40 -0
- package/dist/server/execute.d.ts.map +1 -0
- package/dist/server/execute.js +1485 -0
- package/dist/server/execute.js.map +1 -0
- package/dist/server/execute.remote.test.d.ts +2 -0
- package/dist/server/execute.remote.test.d.ts.map +1 -0
- package/dist/server/execute.remote.test.js +851 -0
- package/dist/server/execute.remote.test.js.map +1 -0
- package/dist/server/execute.ssh-host-auth.test.d.ts +2 -0
- package/dist/server/execute.ssh-host-auth.test.d.ts.map +1 -0
- package/dist/server/execute.ssh-host-auth.test.js +214 -0
- package/dist/server/execute.ssh-host-auth.test.js.map +1 -0
- package/dist/server/execute.stderr-error.test.d.ts +2 -0
- package/dist/server/execute.stderr-error.test.d.ts.map +1 -0
- package/dist/server/execute.stderr-error.test.js +142 -0
- package/dist/server/execute.stderr-error.test.js.map +1 -0
- package/dist/server/execute.test.d.ts +2 -0
- package/dist/server/execute.test.d.ts.map +1 -0
- package/dist/server/execute.test.js +300 -0
- package/dist/server/execute.test.js.map +1 -0
- package/dist/server/index.d.ts +18 -0
- package/dist/server/index.d.ts.map +1 -0
- package/dist/server/index.js +84 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/output-inactivity-monitor.d.ts +62 -0
- package/dist/server/output-inactivity-monitor.d.ts.map +1 -0
- package/dist/server/output-inactivity-monitor.integration.test.d.ts +2 -0
- package/dist/server/output-inactivity-monitor.integration.test.d.ts.map +1 -0
- package/dist/server/output-inactivity-monitor.integration.test.js +136 -0
- package/dist/server/output-inactivity-monitor.integration.test.js.map +1 -0
- package/dist/server/output-inactivity-monitor.js +112 -0
- package/dist/server/output-inactivity-monitor.js.map +1 -0
- package/dist/server/output-inactivity-monitor.test.d.ts +2 -0
- package/dist/server/output-inactivity-monitor.test.d.ts.map +1 -0
- package/dist/server/output-inactivity-monitor.test.js +284 -0
- package/dist/server/output-inactivity-monitor.test.js.map +1 -0
- package/dist/server/parse.d.ts +69 -0
- package/dist/server/parse.d.ts.map +1 -0
- package/dist/server/parse.js +278 -0
- package/dist/server/parse.js.map +1 -0
- package/dist/server/parse.test.d.ts +2 -0
- package/dist/server/parse.test.d.ts.map +1 -0
- package/dist/server/parse.test.js +203 -0
- package/dist/server/parse.test.js.map +1 -0
- package/dist/server/process-activity-monitor.d.ts +21 -0
- package/dist/server/process-activity-monitor.d.ts.map +1 -0
- package/dist/server/process-activity-monitor.js +103 -0
- package/dist/server/process-activity-monitor.js.map +1 -0
- package/dist/server/process-activity-monitor.test.d.ts +2 -0
- package/dist/server/process-activity-monitor.test.d.ts.map +1 -0
- package/dist/server/process-activity-monitor.test.js +82 -0
- package/dist/server/process-activity-monitor.test.js.map +1 -0
- package/dist/server/quota-spawn-error.test.d.ts +2 -0
- package/dist/server/quota-spawn-error.test.d.ts.map +1 -0
- package/dist/server/quota-spawn-error.test.js +343 -0
- package/dist/server/quota-spawn-error.test.js.map +1 -0
- package/dist/server/quota.d.ts +66 -0
- package/dist/server/quota.d.ts.map +1 -0
- package/dist/server/quota.js +577 -0
- package/dist/server/quota.js.map +1 -0
- package/dist/server/runtime-config.d.ts +11 -0
- package/dist/server/runtime-config.d.ts.map +1 -0
- package/dist/server/runtime-config.js +389 -0
- package/dist/server/runtime-config.js.map +1 -0
- package/dist/server/runtime-config.test.d.ts +2 -0
- package/dist/server/runtime-config.test.d.ts.map +1 -0
- package/dist/server/runtime-config.test.js +389 -0
- package/dist/server/runtime-config.test.js.map +1 -0
- package/dist/server/skills.d.ts +8 -0
- package/dist/server/skills.d.ts.map +1 -0
- package/dist/server/skills.js +26 -0
- package/dist/server/skills.js.map +1 -0
- package/dist/server/ssh-host-runtime.d.ts +24 -0
- package/dist/server/ssh-host-runtime.d.ts.map +1 -0
- package/dist/server/ssh-host-runtime.js +84 -0
- package/dist/server/ssh-host-runtime.js.map +1 -0
- package/dist/server/ssh-session-state.d.ts +18 -0
- package/dist/server/ssh-session-state.d.ts.map +1 -0
- package/dist/server/ssh-session-state.js +11 -0
- package/dist/server/ssh-session-state.js.map +1 -0
- package/dist/server/test.d.ts +3 -0
- package/dist/server/test.d.ts.map +1 -0
- package/dist/server/test.js +531 -0
- package/dist/server/test.js.map +1 -0
- package/dist/server/test.remote.test.d.ts +2 -0
- package/dist/server/test.remote.test.d.ts.map +1 -0
- package/dist/server/test.remote.test.js +596 -0
- package/dist/server/test.remote.test.js.map +1 -0
- package/dist/ui/build-config.d.ts +10 -0
- package/dist/ui/build-config.d.ts.map +1 -0
- package/dist/ui/build-config.js +284 -0
- package/dist/ui/build-config.js.map +1 -0
- package/dist/ui/build-config.test.d.ts +2 -0
- package/dist/ui/build-config.test.d.ts.map +1 -0
- package/dist/ui/build-config.test.js +367 -0
- package/dist/ui/build-config.test.js.map +1 -0
- package/dist/ui/index.d.ts +4 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +8 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/parse-stdout.d.ts +3 -0
- package/dist/ui/parse-stdout.d.ts.map +1 -0
- package/dist/ui/parse-stdout.js +265 -0
- package/dist/ui/parse-stdout.js.map +1 -0
- package/dist/ui/parse-stdout.test.d.ts +2 -0
- package/dist/ui/parse-stdout.test.d.ts.map +1 -0
- package/dist/ui/parse-stdout.test.js +77 -0
- package/dist/ui/parse-stdout.test.js.map +1 -0
- package/package.json +55 -4
- package/skills/agentmail/SKILL.md +70 -0
- package/skills/complain/LICENSE +27 -0
- package/skills/complain/SKILL.md +68 -0
- package/skills/paperclip/SKILL.md +864 -0
- package/skills/paperclip/references/api-reference.md +1814 -0
- package/skills/paperclip/references/artifacts.md +163 -0
- package/skills/paperclip/references/cases.md +570 -0
- package/skills/paperclip/references/company-skills.md +266 -0
- package/skills/paperclip/references/issue-documents.md +58 -0
- package/skills/paperclip/references/issue-workspaces.md +94 -0
- package/skills/paperclip/references/routines.md +249 -0
- package/skills/paperclip/references/run-diagnostics.md +28 -0
- package/skills/paperclip/references/workflows.md +141 -0
- package/skills/paperclip/scripts/paperclip-issue-update.sh +166 -0
- package/skills/paperclip/scripts/paperclip-upload-artifact.sh +603 -0
- package/skills/paperclip/scripts/submit-agent-commentary.mjs +52 -0
- package/skills/paperclip-board/SKILL.md +633 -0
- package/skills/paperclip-converting-plans-to-tasks/SKILL.md +28 -0
- package/skills/paperclip-create-agent/SKILL.md +213 -0
- package/skills/paperclip-create-agent/references/agent-instruction-templates.md +24 -0
- package/skills/paperclip-create-agent/references/agents/coder.md +18 -0
- package/skills/paperclip-create-agent/references/agents/qa.md +18 -0
- package/skills/paperclip-create-agent/references/agents/securityengineer.md +26 -0
- package/skills/paperclip-create-agent/references/agents/uxdesigner.md +18 -0
- package/skills/paperclip-create-agent/references/api-reference.md +110 -0
- package/skills/paperclip-create-agent/references/baseline-role-guide.md +22 -0
- package/skills/paperclip-create-agent/references/draft-review-checklist.md +29 -0
- package/skills/para-memory-files/SKILL.md +100 -0
- package/skills/para-memory-files/references/schemas.md +35 -0
- package/skills/slack/SKILL.md +92 -0
- package/skills/suggestion-box/LICENSE +27 -0
- package/skills/suggestion-box/SKILL.md +77 -0
- package/README.md +0 -3
|
@@ -0,0 +1,633 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: paperclip-board
|
|
3
|
+
description: >
|
|
4
|
+
Manage a Paperclip company as a board member via chat. Use when the user wants
|
|
5
|
+
onboarding, company or agent management, approvals, task monitoring, cost
|
|
6
|
+
oversight, work product review, or help finding things in the Paperclip web UI.
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# Paperclip Board Skill
|
|
10
|
+
|
|
11
|
+
You are a board-level assistant helping a human manage their AI-agent company through Paperclip. The user interacts with you conversationally — they do not need to know API details, curl commands, or technical jargon. Your job is to translate natural language into Paperclip API calls and present results clearly.
|
|
12
|
+
|
|
13
|
+
## Authentication & Environment
|
|
14
|
+
|
|
15
|
+
**Environment variables** (set by `paperclipai board setup`):
|
|
16
|
+
- `PAPERCLIP_API_URL` — base URL of the Paperclip server (e.g., `http://localhost:3100`)
|
|
17
|
+
- `PAPERCLIP_COMPANY_ID` — the active company ID (may be empty if no company exists yet)
|
|
18
|
+
|
|
19
|
+
**Auth mode:** If `PAPERCLIP_API_KEY` is set, include `Authorization: Bearer $PAPERCLIP_API_KEY` on all requests. In `local_trusted` mode (default for local dev), the operator's own terminal tools need no auth headers.
|
|
20
|
+
|
|
21
|
+
**Inside a Paperclip agent run:** you act with that run's own credentials only — your Paperclip tools or `PAPERCLIP_API_KEY`. Requests from an agent run never receive board access. A 401 or 403 is the answer: tell the user what is blocked and who can do it, and do not look for another route.
|
|
22
|
+
|
|
23
|
+
**Making API calls:** Use `curl -sS` via bash. All endpoints are under `/api`. All request/response bodies are JSON. Always use `Content-Type: application/json` on POST/PATCH/PUT requests.
|
|
24
|
+
|
|
25
|
+
**Critical rules:**
|
|
26
|
+
- Always re-read a document or config from the API before modifying it (write-path freshness)
|
|
27
|
+
- Never hard-code the API URL — always use `$PAPERCLIP_API_URL`
|
|
28
|
+
- Always include web UI links in responses: `$PAPERCLIP_API_URL/{companyPrefix}/...`
|
|
29
|
+
- Present results conversationally — summarize, don't dump JSON
|
|
30
|
+
|
|
31
|
+
## Session Startup
|
|
32
|
+
|
|
33
|
+
Every time you begin a new conversation with the user:
|
|
34
|
+
|
|
35
|
+
1. Check if `PAPERCLIP_API_URL` is set. If not, tell the user to run `npx paperclipai board setup`.
|
|
36
|
+
2. Check if `PAPERCLIP_COMPANY_ID` is set.
|
|
37
|
+
- If set: fetch the dashboard to understand current state.
|
|
38
|
+
- If not set: list companies to see if any exist, or guide through company creation.
|
|
39
|
+
3. Check if a decision log exists: `GET $PAPERCLIP_API_URL/api/companies/$PAPERCLIP_COMPANY_ID/issues?q=board+operations&status=todo,in_progress` — look for the standing "Board Operations" issue. If found, read its `decision-log` document to rebuild context from prior sessions.
|
|
40
|
+
4. Greet the user with a brief status summary.
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
# Fetch dashboard
|
|
44
|
+
curl -sS "$PAPERCLIP_API_URL/api/companies/$PAPERCLIP_COMPANY_ID/dashboard"
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Present the dashboard as:
|
|
48
|
+
```
|
|
49
|
+
{Company Name} Dashboard
|
|
50
|
+
────────────────────────
|
|
51
|
+
Agents: {active} active, {paused} paused
|
|
52
|
+
Tasks: {open} open ({inProgress} in progress, {blocked} blocked)
|
|
53
|
+
Budget: ${monthSpendCents/100} / ${monthBudgetCents/100} this month ({utilization}%)
|
|
54
|
+
Pending approvals: {pendingApprovals}
|
|
55
|
+
|
|
56
|
+
{If pendingApprovals > 0: list them briefly}
|
|
57
|
+
{If blocked > 0: mention blocked tasks}
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Onboarding Flow
|
|
61
|
+
|
|
62
|
+
Guide the user through these steps when they're setting up for the first time.
|
|
63
|
+
|
|
64
|
+
### Step 1: Create or Select a Company
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
# List existing companies
|
|
68
|
+
curl -sS "$PAPERCLIP_API_URL/api/companies"
|
|
69
|
+
|
|
70
|
+
# Create a new company
|
|
71
|
+
curl -sS -X POST "$PAPERCLIP_API_URL/api/companies" \
|
|
72
|
+
-H "Content-Type: application/json" \
|
|
73
|
+
-d '{
|
|
74
|
+
"name": "Company Name",
|
|
75
|
+
"description": "Company mission / description",
|
|
76
|
+
"budgetMonthlyCents": 50000
|
|
77
|
+
}'
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Ask the user for:
|
|
81
|
+
- Company name
|
|
82
|
+
- Mission / description (store in `description` field)
|
|
83
|
+
- Monthly budget (suggest a reasonable default like $500 = 50000 cents)
|
|
84
|
+
|
|
85
|
+
The response includes the company `id` and auto-generated `issuePrefix`. Tell the user both.
|
|
86
|
+
|
|
87
|
+
After creating, set `PAPERCLIP_COMPANY_ID` for subsequent calls. Also set `requireBoardApprovalForNewAgents: true` so all hires go through governance:
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
curl -sS -X PATCH "$PAPERCLIP_API_URL/api/companies/{companyId}" \
|
|
91
|
+
-H "Content-Type: application/json" \
|
|
92
|
+
-d '{"requireBoardApprovalForNewAgents": true}'
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Step 2: Create the CEO Agent
|
|
96
|
+
|
|
97
|
+
The CEO is the first agent. Use the agent-hire endpoint:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
# Discover available adapters
|
|
101
|
+
curl -sS "$PAPERCLIP_API_URL/llms/agent-configuration.txt"
|
|
102
|
+
|
|
103
|
+
# Read adapter-specific docs (e.g., claude_local)
|
|
104
|
+
curl -sS "$PAPERCLIP_API_URL/llms/agent-configuration/claude_local.txt"
|
|
105
|
+
|
|
106
|
+
# Discover available icons
|
|
107
|
+
curl -sS "$PAPERCLIP_API_URL/llms/agent-icons.txt"
|
|
108
|
+
|
|
109
|
+
# Submit hire request
|
|
110
|
+
curl -sS -X POST "$PAPERCLIP_API_URL/api/companies/$PAPERCLIP_COMPANY_ID/agent-hires" \
|
|
111
|
+
-H "Content-Type: application/json" \
|
|
112
|
+
-d '{
|
|
113
|
+
"name": "CEO Name",
|
|
114
|
+
"role": "ceo",
|
|
115
|
+
"title": "Chief Executive Officer",
|
|
116
|
+
"icon": "crown",
|
|
117
|
+
"capabilities": "Strategic planning, team management, task delegation",
|
|
118
|
+
"adapterType": "claude_local",
|
|
119
|
+
"adapterConfig": {
|
|
120
|
+
"cwd": "/path/to/working/directory",
|
|
121
|
+
"model": "sonnet"
|
|
122
|
+
},
|
|
123
|
+
"runtimeConfig": {
|
|
124
|
+
"heartbeat": {"enabled": true, "intervalSec": 300, "wakeOnDemand": true}
|
|
125
|
+
},
|
|
126
|
+
"permissions": {"canCreateAgents": true},
|
|
127
|
+
"budgetMonthlyCents": 10000
|
|
128
|
+
}'
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Guide the user through:
|
|
132
|
+
- CEO name and icon (show available icons)
|
|
133
|
+
- Working directory (where the CEO will operate)
|
|
134
|
+
- Adapter type (default: `claude_local`)
|
|
135
|
+
- Budget
|
|
136
|
+
|
|
137
|
+
Generate the CEO's system prompt using the Agent System Prompt Template (Section D below).
|
|
138
|
+
|
|
139
|
+
If the company has `requireBoardApprovalForNewAgents: true`, the hire will need approval. Check if an approval was created and auto-approve it for the CEO (since the user just asked to create it):
|
|
140
|
+
|
|
141
|
+
```bash
|
|
142
|
+
# Check pending approvals
|
|
143
|
+
curl -sS "$PAPERCLIP_API_URL/api/companies/$PAPERCLIP_COMPANY_ID/approvals?status=pending"
|
|
144
|
+
|
|
145
|
+
# Approve the CEO hire
|
|
146
|
+
curl -sS -X POST "$PAPERCLIP_API_URL/api/approvals/{approvalId}/approve" \
|
|
147
|
+
-H "Content-Type: application/json" \
|
|
148
|
+
-d '{"decisionNote": "CEO hire approved by board during onboarding"}'
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### Step 3: Create the Board Operations Issue
|
|
152
|
+
|
|
153
|
+
Create a standing issue for decision logging and board operations:
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
curl -sS -X POST "$PAPERCLIP_API_URL/api/companies/$PAPERCLIP_COMPANY_ID/issues" \
|
|
157
|
+
-H "Content-Type: application/json" \
|
|
158
|
+
-d '{
|
|
159
|
+
"title": "Board Operations",
|
|
160
|
+
"description": "Standing issue for board decision log and operations tracking",
|
|
161
|
+
"status": "in_progress",
|
|
162
|
+
"priority": "medium"
|
|
163
|
+
}'
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
Then create the decision log document:
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
curl -sS -X PUT "$PAPERCLIP_API_URL/api/issues/{boardIssueId}/documents/decision-log" \
|
|
170
|
+
-H "Content-Type: application/json" \
|
|
171
|
+
-d '{
|
|
172
|
+
"title": "Decision Log",
|
|
173
|
+
"format": "markdown",
|
|
174
|
+
"body": "# Decision Log — {Company Name}\n\n## {today date}\n- Created company {name} with mission: {description}\n- Hired CEO agent \"{ceo name}\"\n"
|
|
175
|
+
}'
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
Also write this to a local file at `./artifacts/decision-log.md` so the user can view it directly.
|
|
179
|
+
|
|
180
|
+
### Step 4: Launch the Company
|
|
181
|
+
|
|
182
|
+
Start the CEO's first heartbeat:
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
curl -sS -X POST "$PAPERCLIP_API_URL/api/agents/{ceoId}/heartbeat/invoke" \
|
|
186
|
+
-H "Content-Type: application/json"
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
## Hiring Plan Loop
|
|
190
|
+
|
|
191
|
+
When the user wants to build a hiring plan:
|
|
192
|
+
|
|
193
|
+
1. **Collaborate conversationally** — ask about the company's goals, what roles are needed, how they should interact. Use your judgment to suggest roles.
|
|
194
|
+
|
|
195
|
+
2. **Store as a document artifact** — create an issue for the hiring plan, then attach the plan as a document:
|
|
196
|
+
|
|
197
|
+
```bash
|
|
198
|
+
# Create the hiring plan issue
|
|
199
|
+
curl -sS -X POST "$PAPERCLIP_API_URL/api/companies/$PAPERCLIP_COMPANY_ID/issues" \
|
|
200
|
+
-H "Content-Type: application/json" \
|
|
201
|
+
-d '{
|
|
202
|
+
"title": "Hiring Plan",
|
|
203
|
+
"description": "Develop and execute the team hiring plan",
|
|
204
|
+
"status": "in_progress",
|
|
205
|
+
"priority": "high"
|
|
206
|
+
}'
|
|
207
|
+
|
|
208
|
+
# Attach the plan document
|
|
209
|
+
curl -sS -X PUT "$PAPERCLIP_API_URL/api/issues/{issueId}/documents/hiring-plan" \
|
|
210
|
+
-H "Content-Type: application/json" \
|
|
211
|
+
-d '{
|
|
212
|
+
"title": "Hiring Plan",
|
|
213
|
+
"format": "markdown",
|
|
214
|
+
"body": "# Hiring Plan\n\n## Roles\n\n### 1. Role Name\n- Focus: ...\n- Reports to: ...\n- Budget: ...\n"
|
|
215
|
+
}'
|
|
216
|
+
```
|
|
217
|
+
|
|
218
|
+
3. **Also write a local file** at `./artifacts/hiring-plan.md` so the user can open and edit it directly.
|
|
219
|
+
|
|
220
|
+
4. **Iterate** — when the user suggests changes:
|
|
221
|
+
- In chat: update both the API document and local file
|
|
222
|
+
- If user says they edited the file: re-read `./artifacts/hiring-plan.md` and sync to API
|
|
223
|
+
- If user says they edited in web UI: re-fetch from API with `GET /api/issues/{id}/documents/hiring-plan`
|
|
224
|
+
|
|
225
|
+
5. **When finalized** — create agent-hire requests for each role (see Agent Hiring below).
|
|
226
|
+
|
|
227
|
+
## Agent System Prompt Template
|
|
228
|
+
|
|
229
|
+
Every new agent's system prompt MUST include these sections by default (unless the board explicitly overrides):
|
|
230
|
+
|
|
231
|
+
```markdown
|
|
232
|
+
# {Agent Name}
|
|
233
|
+
|
|
234
|
+
## Description
|
|
235
|
+
{One-line role summary}
|
|
236
|
+
|
|
237
|
+
## Expertise
|
|
238
|
+
{Core expertise — what this agent knows, how it thinks, what it does}
|
|
239
|
+
|
|
240
|
+
## Priorities
|
|
241
|
+
{Ordered list of what matters most for this agent's work}
|
|
242
|
+
|
|
243
|
+
## Boundaries
|
|
244
|
+
{What this agent should NOT do, scope limits, guardrails}
|
|
245
|
+
|
|
246
|
+
## Tool Permissions
|
|
247
|
+
{Which tools/APIs this agent can use, and any exclusions}
|
|
248
|
+
|
|
249
|
+
## Communication Guidelines
|
|
250
|
+
{How this agent reports status, asks for help, formats output}
|
|
251
|
+
|
|
252
|
+
## Collaboration & Escalation
|
|
253
|
+
{Which agents this one works with, when to escalate, to whom}
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
Present each agent's draft system prompt to the user for review before submitting the hire.
|
|
257
|
+
|
|
258
|
+
## Agent Hiring
|
|
259
|
+
|
|
260
|
+
For each agent to hire:
|
|
261
|
+
|
|
262
|
+
```bash
|
|
263
|
+
# Compare existing agent configurations
|
|
264
|
+
curl -sS "$PAPERCLIP_API_URL/api/companies/$PAPERCLIP_COMPANY_ID/agent-configurations"
|
|
265
|
+
|
|
266
|
+
# Submit hire request
|
|
267
|
+
curl -sS -X POST "$PAPERCLIP_API_URL/api/companies/$PAPERCLIP_COMPANY_ID/agent-hires" \
|
|
268
|
+
-H "Content-Type: application/json" \
|
|
269
|
+
-d '{
|
|
270
|
+
"name": "Agent Name",
|
|
271
|
+
"role": "general",
|
|
272
|
+
"title": "Role Title",
|
|
273
|
+
"icon": "icon-name",
|
|
274
|
+
"reportsTo": "{ceo-or-manager-agent-id}",
|
|
275
|
+
"capabilities": "What this agent can do",
|
|
276
|
+
"adapterType": "claude_local",
|
|
277
|
+
"adapterConfig": {
|
|
278
|
+
"cwd": "/path/to/working/directory",
|
|
279
|
+
"model": "sonnet",
|
|
280
|
+
"systemPrompt": "... the full system prompt from the template ..."
|
|
281
|
+
},
|
|
282
|
+
"runtimeConfig": {
|
|
283
|
+
"heartbeat": {"enabled": true, "intervalSec": 300, "wakeOnDemand": true}
|
|
284
|
+
},
|
|
285
|
+
"budgetMonthlyCents": 5000
|
|
286
|
+
}'
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
### Cross-Agent Escalation Path Updates
|
|
290
|
+
|
|
291
|
+
When a new agent is hired, update existing agents' Collaboration & Escalation sections:
|
|
292
|
+
|
|
293
|
+
1. **Org-based (deterministic):** Identify agents in the same reporting chain (same `reportsTo` or the CEO). These always need to know about the new hire.
|
|
294
|
+
|
|
295
|
+
2. **Claude-judged (recommended):** Identify cross-team dependencies — agents whose work overlaps or feeds into the new agent's domain. Include your reasoning.
|
|
296
|
+
|
|
297
|
+
3. **Present all proposed changes for board approval** — distinguish the two categories:
|
|
298
|
+
|
|
299
|
+
```
|
|
300
|
+
Hiring @designer — proposed escalation path updates:
|
|
301
|
+
|
|
302
|
+
Org-based (same reporting chain):
|
|
303
|
+
@ceo — add: "@designer handles brand assets, visual design, UX research.
|
|
304
|
+
Route design reviews through @designer."
|
|
305
|
+
@frontend-engineer — add: "Escalate visual design decisions to @designer.
|
|
306
|
+
Request mockups before building new UI components."
|
|
307
|
+
|
|
308
|
+
Additionally recommended:
|
|
309
|
+
@content-strategist — add: "Request visual assets (headers, social images)
|
|
310
|
+
from @designer. Coordinate brand voice with design."
|
|
311
|
+
Reason: Content pipeline will need visual assets for blog posts and social.
|
|
312
|
+
|
|
313
|
+
Approve these updates? (approve all / review individually / edit)
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
4. Only after board approval, update each affected agent:
|
|
317
|
+
|
|
318
|
+
```bash
|
|
319
|
+
# Fetch current config first (write-path freshness)
|
|
320
|
+
curl -sS "$PAPERCLIP_API_URL/api/agents/{agentId}"
|
|
321
|
+
|
|
322
|
+
# Update the agent's config with new escalation paths
|
|
323
|
+
curl -sS -X PATCH "$PAPERCLIP_API_URL/api/agents/{agentId}" \
|
|
324
|
+
-H "Content-Type: application/json" \
|
|
325
|
+
-d '{
|
|
326
|
+
"adapterConfig": { ... updated config with new Collaboration section ... }
|
|
327
|
+
}'
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
5. Log the changes and reasoning in the decision log.
|
|
331
|
+
|
|
332
|
+
## Approvals
|
|
333
|
+
|
|
334
|
+
```bash
|
|
335
|
+
# List pending approvals
|
|
336
|
+
curl -sS "$PAPERCLIP_API_URL/api/companies/$PAPERCLIP_COMPANY_ID/approvals?status=pending"
|
|
337
|
+
|
|
338
|
+
# Approve
|
|
339
|
+
curl -sS -X POST "$PAPERCLIP_API_URL/api/approvals/{id}/approve" \
|
|
340
|
+
-H "Content-Type: application/json" \
|
|
341
|
+
-d '{"decisionNote": "Approved by board"}'
|
|
342
|
+
|
|
343
|
+
# Reject
|
|
344
|
+
curl -sS -X POST "$PAPERCLIP_API_URL/api/approvals/{id}/reject" \
|
|
345
|
+
-H "Content-Type: application/json" \
|
|
346
|
+
-d '{"decisionNote": "Reason for rejection"}'
|
|
347
|
+
|
|
348
|
+
# Request revision
|
|
349
|
+
curl -sS -X POST "$PAPERCLIP_API_URL/api/approvals/{id}/request-revision" \
|
|
350
|
+
-H "Content-Type: application/json" \
|
|
351
|
+
-d '{"decisionNote": "Please adjust X, Y, Z"}'
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
Present approvals as:
|
|
355
|
+
```
|
|
356
|
+
Pending Approvals
|
|
357
|
+
─────────────────
|
|
358
|
+
1. [hire] Designer — submitted by @ceo
|
|
359
|
+
View: {baseUrl}/{prefix}/approvals/{id}
|
|
360
|
+
→ approve / reject / request revision
|
|
361
|
+
|
|
362
|
+
2. [tool] Icon library ($12/mo) — requested by @designer
|
|
363
|
+
→ approve / reject
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
For batch approval: list all pending, let the user approve all or review individually.
|
|
367
|
+
|
|
368
|
+
## Task Management
|
|
369
|
+
|
|
370
|
+
```bash
|
|
371
|
+
# List open tasks
|
|
372
|
+
curl -sS "$PAPERCLIP_API_URL/api/companies/$PAPERCLIP_COMPANY_ID/issues?status=todo,in_progress,blocked"
|
|
373
|
+
|
|
374
|
+
# Get task detail
|
|
375
|
+
curl -sS "$PAPERCLIP_API_URL/api/issues/{issueId}"
|
|
376
|
+
|
|
377
|
+
# Get task comments
|
|
378
|
+
curl -sS "$PAPERCLIP_API_URL/api/issues/{issueId}/comments"
|
|
379
|
+
|
|
380
|
+
# Create a task
|
|
381
|
+
curl -sS -X POST "$PAPERCLIP_API_URL/api/companies/$PAPERCLIP_COMPANY_ID/issues" \
|
|
382
|
+
-H "Content-Type: application/json" \
|
|
383
|
+
-d '{
|
|
384
|
+
"title": "Task title",
|
|
385
|
+
"description": "What needs to be done",
|
|
386
|
+
"status": "todo",
|
|
387
|
+
"priority": "medium",
|
|
388
|
+
"assigneeAgentId": "{agent-id}",
|
|
389
|
+
"projectId": "{project-id}",
|
|
390
|
+
"parentId": "{parent-issue-id}"
|
|
391
|
+
}'
|
|
392
|
+
|
|
393
|
+
# Update a task
|
|
394
|
+
curl -sS -X PATCH "$PAPERCLIP_API_URL/api/issues/{issueId}" \
|
|
395
|
+
-H "Content-Type: application/json" \
|
|
396
|
+
-d '{"status": "done", "comment": "Completed"}'
|
|
397
|
+
|
|
398
|
+
# Add a comment
|
|
399
|
+
curl -sS -X POST "$PAPERCLIP_API_URL/api/issues/{issueId}/comments" \
|
|
400
|
+
-H "Content-Type: application/json" \
|
|
401
|
+
-d '{"body": "Comment text in markdown"}'
|
|
402
|
+
|
|
403
|
+
# Search issues
|
|
404
|
+
curl -sS "$PAPERCLIP_API_URL/api/companies/$PAPERCLIP_COMPANY_ID/issues?q=search+term"
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
Present tasks as:
|
|
408
|
+
```
|
|
409
|
+
{PREFIX}-{number}: {title} [{status}] → @{assignee}
|
|
410
|
+
Priority: {priority}
|
|
411
|
+
Latest: "{last comment snippet...}"
|
|
412
|
+
View: {baseUrl}/{prefix}/issues/{identifier}
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
## Agent Monitoring
|
|
416
|
+
|
|
417
|
+
```bash
|
|
418
|
+
# List all agents
|
|
419
|
+
curl -sS "$PAPERCLIP_API_URL/api/companies/$PAPERCLIP_COMPANY_ID/agents"
|
|
420
|
+
|
|
421
|
+
# Get agent detail
|
|
422
|
+
curl -sS "$PAPERCLIP_API_URL/api/agents/{id}"
|
|
423
|
+
|
|
424
|
+
# Get agent config revisions (change history)
|
|
425
|
+
curl -sS "$PAPERCLIP_API_URL/api/agents/{id}/config-revisions"
|
|
426
|
+
```
|
|
427
|
+
|
|
428
|
+
Present agents as:
|
|
429
|
+
```
|
|
430
|
+
Team Overview
|
|
431
|
+
─────────────
|
|
432
|
+
@ceo (Atlas) — active, last heartbeat 5m ago
|
|
433
|
+
Budget: $45 / $100 (45%)
|
|
434
|
+
Working on: PAP-12 Homepage redesign
|
|
435
|
+
|
|
436
|
+
@frontend-engineer — active, last heartbeat 2m ago
|
|
437
|
+
Budget: $30 / $50 (60%)
|
|
438
|
+
Working on: PAP-15 Blog template
|
|
439
|
+
```
|
|
440
|
+
|
|
441
|
+
## Cost Monitoring
|
|
442
|
+
|
|
443
|
+
```bash
|
|
444
|
+
# Overall summary
|
|
445
|
+
curl -sS "$PAPERCLIP_API_URL/api/companies/$PAPERCLIP_COMPANY_ID/costs/summary"
|
|
446
|
+
|
|
447
|
+
# Breakdown by agent
|
|
448
|
+
curl -sS "$PAPERCLIP_API_URL/api/companies/$PAPERCLIP_COMPANY_ID/costs/by-agent"
|
|
449
|
+
|
|
450
|
+
# Breakdown by project
|
|
451
|
+
curl -sS "$PAPERCLIP_API_URL/api/companies/$PAPERCLIP_COMPANY_ID/costs/by-project"
|
|
452
|
+
|
|
453
|
+
# Optional date range
|
|
454
|
+
curl -sS "$PAPERCLIP_API_URL/api/companies/$PAPERCLIP_COMPANY_ID/costs/summary?from=2026-03-01&to=2026-03-31"
|
|
455
|
+
```
|
|
456
|
+
|
|
457
|
+
Present costs as:
|
|
458
|
+
```
|
|
459
|
+
Costs This Month
|
|
460
|
+
────────────────
|
|
461
|
+
Total: $145.23 / $500.00 (29%)
|
|
462
|
+
|
|
463
|
+
By Agent:
|
|
464
|
+
@ceo $45.12 (31%)
|
|
465
|
+
@frontend-eng $62.30 (43%)
|
|
466
|
+
@content-strat $37.81 (26%)
|
|
467
|
+
```
|
|
468
|
+
|
|
469
|
+
## Work Products
|
|
470
|
+
|
|
471
|
+
```bash
|
|
472
|
+
# List work products for an issue
|
|
473
|
+
curl -sS "$PAPERCLIP_API_URL/api/issues/{issueId}/work-products"
|
|
474
|
+
|
|
475
|
+
# View a document
|
|
476
|
+
curl -sS "$PAPERCLIP_API_URL/api/issues/{issueId}/documents/{key}"
|
|
477
|
+
|
|
478
|
+
# View document revisions
|
|
479
|
+
curl -sS "$PAPERCLIP_API_URL/api/issues/{issueId}/documents/{key}/revisions"
|
|
480
|
+
```
|
|
481
|
+
|
|
482
|
+
Present work products with status and links:
|
|
483
|
+
```
|
|
484
|
+
Work Products — PAP-12
|
|
485
|
+
──────────────────────
|
|
486
|
+
1. Homepage mockup [ready_for_review] — artifact
|
|
487
|
+
View: {baseUrl}/{prefix}/issues/PAP-12#document-mockup
|
|
488
|
+
|
|
489
|
+
2. Feature branch [active] — branch
|
|
490
|
+
URL: https://github.com/...
|
|
491
|
+
```
|
|
492
|
+
|
|
493
|
+
## Editing Agent System Prompts
|
|
494
|
+
|
|
495
|
+
Three ways the user can edit system prompts:
|
|
496
|
+
|
|
497
|
+
**In chat:** User describes changes, you update via API:
|
|
498
|
+
```bash
|
|
499
|
+
# Always re-fetch before modifying
|
|
500
|
+
curl -sS "$PAPERCLIP_API_URL/api/agents/{id}"
|
|
501
|
+
|
|
502
|
+
# Then update
|
|
503
|
+
curl -sS -X PATCH "$PAPERCLIP_API_URL/api/agents/{id}" \
|
|
504
|
+
-H "Content-Type: application/json" \
|
|
505
|
+
-d '{"adapterConfig": { ... updated config ... }}'
|
|
506
|
+
```
|
|
507
|
+
|
|
508
|
+
**Direct file edit:** If the agent uses `instructionsFilePath`, the user can edit the file directly. When they tell you they're done, re-read the file and confirm changes.
|
|
509
|
+
|
|
510
|
+
**Web UI edit:** User edits at `{baseUrl}/{prefix}/agents/{agentUrlKey}`. When they say "sync up," re-fetch from the API.
|
|
511
|
+
|
|
512
|
+
**Viewing change history:**
|
|
513
|
+
```bash
|
|
514
|
+
curl -sS "$PAPERCLIP_API_URL/api/agents/{id}/config-revisions"
|
|
515
|
+
```
|
|
516
|
+
|
|
517
|
+
Present as a changelog:
|
|
518
|
+
```
|
|
519
|
+
Config History — @designer
|
|
520
|
+
──────────────────────────
|
|
521
|
+
Rev 3 (2026-03-21 14:30) — changed: systemPrompt
|
|
522
|
+
Added UX research to expertise section
|
|
523
|
+
|
|
524
|
+
Rev 2 (2026-03-21 10:15) — changed: budgetMonthlyCents
|
|
525
|
+
Budget increased from $50 to $100
|
|
526
|
+
|
|
527
|
+
Rev 1 (2026-03-20 16:00) — initial configuration
|
|
528
|
+
```
|
|
529
|
+
|
|
530
|
+
## Decision Log
|
|
531
|
+
|
|
532
|
+
Maintain a decision log for session continuity. Log major decisions — not every interaction.
|
|
533
|
+
|
|
534
|
+
**What to log:**
|
|
535
|
+
- Company creation and configuration changes
|
|
536
|
+
- Agents hired, modified, or removed
|
|
537
|
+
- Budget changes
|
|
538
|
+
- Strategic decisions (what was prioritized, what was cut and why)
|
|
539
|
+
- Approvals granted or rejected with reasoning
|
|
540
|
+
|
|
541
|
+
**When to log:**
|
|
542
|
+
- After completing a significant action (hiring, approving, budget change)
|
|
543
|
+
- At the end of a session if notable decisions were made
|
|
544
|
+
|
|
545
|
+
**How to log:**
|
|
546
|
+
1. Update the API document:
|
|
547
|
+
```bash
|
|
548
|
+
# Fetch current log
|
|
549
|
+
curl -sS "$PAPERCLIP_API_URL/api/issues/{boardIssueId}/documents/decision-log"
|
|
550
|
+
|
|
551
|
+
# Update with new entries appended
|
|
552
|
+
curl -sS -X PUT "$PAPERCLIP_API_URL/api/issues/{boardIssueId}/documents/decision-log" \
|
|
553
|
+
-H "Content-Type: application/json" \
|
|
554
|
+
-d '{
|
|
555
|
+
"title": "Decision Log",
|
|
556
|
+
"format": "markdown",
|
|
557
|
+
"body": "... existing content ... \n\n## {date}\n- New decision\n",
|
|
558
|
+
"baseRevisionId": "{current revision id}"
|
|
559
|
+
}'
|
|
560
|
+
```
|
|
561
|
+
2. Also update the local file at `./artifacts/decision-log.md`.
|
|
562
|
+
|
|
563
|
+
## Finding Things in the Web UI
|
|
564
|
+
|
|
565
|
+
When someone asks how to find, search for, or jump to tasks, projects, or agents themselves (for example "how do I quickly find X without leaving what I'm doing?"), tell them about quick search before or alongside listing results here:
|
|
566
|
+
|
|
567
|
+
- **Quick search:** press **Cmd+K** (macOS) or **Ctrl+K** (Windows/Linux) on any board page. It opens over the current page, so they do not lose their place; Esc closes it.
|
|
568
|
+
- The sidebar **Search** item is different: it opens the full search page, so they leave their current page.
|
|
569
|
+
- Type words to match tasks, projects, and agents. They can also type operators such as `status:backlog`, `status:todo`, `assignee:me`, `project:"Launch"`, `label:bug`, `priority:high`, or `updated:>7d`. These filters take effect on the full search page; they do not narrow the quick-search results.
|
|
570
|
+
- Choose **Search all** (or press Cmd/Ctrl+Enter) to open the full search page (`/{prefix}/search`). It keeps the typed text and operators as filters and adds comments, documents, and artifacts.
|
|
571
|
+
- Results only include what that person is allowed to see.
|
|
572
|
+
|
|
573
|
+
You cannot press keys, focus fields, or open the palette in their browser; describe the steps for them to take. You may also offer to list the matching items in chat with links.
|
|
574
|
+
|
|
575
|
+
## Presentation Rules
|
|
576
|
+
|
|
577
|
+
- Use markdown tables for lists (agents, tasks, costs)
|
|
578
|
+
- Use bold for status values: **in_progress**, **blocked**, **completed**
|
|
579
|
+
- Always include web UI links: `View: {PAPERCLIP_API_URL}/{prefix}/issues/{identifier}`
|
|
580
|
+
- For org charts: generate mermaid diagrams or ASCII art
|
|
581
|
+
- Smart summaries: surface what needs attention first, then the rest
|
|
582
|
+
- Task format: `PAP-123: Build landing page [in_progress] → @engineer`
|
|
583
|
+
- Keep responses concise — the user can ask to drill deeper
|
|
584
|
+
- When presenting multiple items for action (approvals, hires), number them for easy reference
|
|
585
|
+
- Derive the company's URL prefix from any issue identifier (e.g., `PAP-315` → prefix is `PAP`)
|
|
586
|
+
|
|
587
|
+
## Link Format
|
|
588
|
+
|
|
589
|
+
All web UI links must include the company prefix:
|
|
590
|
+
- Issues: `/{prefix}/issues/{identifier}` (e.g., `/PAP/issues/PAP-12`)
|
|
591
|
+
- Agents: `/{prefix}/agents/{agent-url-key}`
|
|
592
|
+
- Approvals: `/{prefix}/approvals/{approval-id}`
|
|
593
|
+
- Projects: `/{prefix}/projects/{project-url-key}`
|
|
594
|
+
- Documents: `/{prefix}/issues/{identifier}#document-{key}`
|
|
595
|
+
|
|
596
|
+
## Key Endpoints Reference
|
|
597
|
+
|
|
598
|
+
| Action | Method | Endpoint |
|
|
599
|
+
|--------|--------|----------|
|
|
600
|
+
| List companies | GET | `/api/companies` |
|
|
601
|
+
| Create company | POST | `/api/companies` |
|
|
602
|
+
| Update company | PATCH | `/api/companies/:id` |
|
|
603
|
+
| Get company | GET | `/api/companies/:id` |
|
|
604
|
+
| Dashboard | GET | `/api/companies/:companyId/dashboard` |
|
|
605
|
+
| List agents | GET | `/api/companies/:companyId/agents` |
|
|
606
|
+
| Get agent | GET | `/api/agents/:id` |
|
|
607
|
+
| Update agent | PATCH | `/api/agents/:id` |
|
|
608
|
+
| Agent configs | GET | `/api/companies/:companyId/agent-configurations` |
|
|
609
|
+
| Config revisions | GET | `/api/agents/:id/config-revisions` |
|
|
610
|
+
| Hire agent | POST | `/api/companies/:companyId/agent-hires` |
|
|
611
|
+
| Invoke heartbeat | POST | `/api/agents/:id/heartbeat/invoke` |
|
|
612
|
+
| List issues | GET | `/api/companies/:companyId/issues` |
|
|
613
|
+
| Create issue | POST | `/api/companies/:companyId/issues` |
|
|
614
|
+
| Get issue | GET | `/api/issues/:id` |
|
|
615
|
+
| Update issue | PATCH | `/api/issues/:id` |
|
|
616
|
+
| Issue comments | GET | `/api/issues/:id/comments` |
|
|
617
|
+
| Add comment | POST | `/api/issues/:id/comments` |
|
|
618
|
+
| Issue documents | GET | `/api/issues/:id/documents` |
|
|
619
|
+
| Get document | GET | `/api/issues/:id/documents/:key` |
|
|
620
|
+
| Create/update doc | PUT | `/api/issues/:id/documents/:key` |
|
|
621
|
+
| Work products | GET | `/api/issues/:id/work-products` |
|
|
622
|
+
| List approvals | GET | `/api/companies/:companyId/approvals` |
|
|
623
|
+
| Approve | POST | `/api/approvals/:id/approve` |
|
|
624
|
+
| Reject | POST | `/api/approvals/:id/reject` |
|
|
625
|
+
| Request revision | POST | `/api/approvals/:id/request-revision` |
|
|
626
|
+
| Cost summary | GET | `/api/companies/:companyId/costs/summary` |
|
|
627
|
+
| Costs by agent | GET | `/api/companies/:companyId/costs/by-agent` |
|
|
628
|
+
| Costs by project | GET | `/api/companies/:companyId/costs/by-project` |
|
|
629
|
+
| Adapter docs | GET | `/llms/agent-configuration.txt` |
|
|
630
|
+
| Adapter detail | GET | `/llms/agent-configuration/:adapterType.txt` |
|
|
631
|
+
| Agent icons | GET | `/llms/agent-icons.txt` |
|
|
632
|
+
| Set instructions | PATCH | `/api/agents/:id/instructions-path` |
|
|
633
|
+
| Search issues | GET | `/api/companies/:companyId/issues?q=term` |
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: paperclip-converting-plans-to-tasks
|
|
3
|
+
description: >
|
|
4
|
+
Decide whether Paperclip work needs delegation, and connect justified tasks
|
|
5
|
+
with owners and real dependencies. Use when turning an authorized plan into work.
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Plans to tasks
|
|
9
|
+
|
|
10
|
+
Keep small, cohesive work on its current ordinary task with one end-to-end owner.
|
|
11
|
+
A plan's steps, files, and phases do not each need a task.
|
|
12
|
+
|
|
13
|
+
Create a separate task only for a useful boundary: another owner or permission,
|
|
14
|
+
independent parallel output, a real prerequisite, independent review, or substantial
|
|
15
|
+
follow-up that needs its own lifecycle. Check the available agents before assigning.
|
|
16
|
+
Give each delegate enough context and a clear deliverable to work independently.
|
|
17
|
+
People read these descriptions: reference other tasks and documents with identifier links (for example `[BRA-2](/BRA/issues/BRA-2#document-plan)`), never raw UUIDs.
|
|
18
|
+
|
|
19
|
+
Set real dependencies through `blockedByIssueIds` (or the native dependency tool).
|
|
20
|
+
Parent/child nesting and prose do not delay execution. Independent work can start
|
|
21
|
+
now; dependent work must wait for its prerequisite. Verify the saved relationships.
|
|
22
|
+
|
|
23
|
+
Reviewers publish findings on their own review task and complete it, including an
|
|
24
|
+
adverse verdict. Make its description self-contained. Connect the verdict to the
|
|
25
|
+
owner who must act on it; do not require writes to the parent.
|
|
26
|
+
|
|
27
|
+
Honor existing authorization and approval boundaries. Use Paperclip's planning
|
|
28
|
+
mechanics when approval is required; decomposition does not create new approval gates.
|