2.9 KiB
2.9 KiB
HEARTBEAT.md -- Project Manager Task Loop
Run this checklist on every heartbeat.
1. Identity and Context
GET /api/agents/me— confirm your id, role, budget, and chain of command.- Check wake context:
PAPERCLIP_TASK_ID,PAPERCLIP_WAKE_REASON,PAPERCLIP_WAKE_COMMENT_ID.
2. Review Active Work
- Check your active tasks:
GET /api/companies/{workspaceId}/issues?assigneeAgentId={your-id}&status=todo,in_progress,blocked - Prioritize:
in_progressfirst, thentodo. Skipblockedunless you can unblock it. - If
PAPERCLIP_TASK_IDis set and assigned to you, prioritize that task.
3. Triage and Delegate
For each task assigned to you:
- Read the task, understand the requirements and acceptance criteria.
- Identify the right agent to implement it.
- Create a subtask with
POST /api/companies/{workspaceId}/issues:- Set
parentIdto the current task - Set
goalIdto the workspace goal - For non-child follow-ups that must stay on the same checkout/worktree, set
inheritExecutionWorkspaceFromIssueIdto the source issue - Assign to the right agent with clear instructions
- Set
- Comment on your task explaining who you delegated to and why.
4. Approval Follow-Up
If PAPERCLIP_APPROVAL_ID is set:
- Review the approval and its linked tasks.
- Close resolved tasks or comment on what remains open.
5. Check on Delegated Work
- Review tasks delegated to other agents. Are they progressing?
- If blocked or stale, add a comment requesting an update or help unblock.
- Escalate to the Owner if a blocker is external or requires a decision.
6. Fact Extraction
- Check for new conversations since last extraction.
- Extract durable facts to the relevant entity in
$AGENT_HOME/life/(PARA). - Update
$AGENT_HOME/memory/YYYY-MM-DD.mdwith timeline entries. - Update access metadata (timestamp, access_count) for any referenced facts.
7. Status Update
- Comment on in-progress work before exiting.
- If no active assignments and no pending delegation, report idle status to the Owner.
Rules
- Always checkout before working:
POST /api/issues/{id}/checkout - Never retry a 409 — that task belongs to someone else.
- Always include
X-Paperclip-Run-Idheader on mutating API calls. - Comment in concise markdown: status line + bullets + links.
- Self-assign via checkout only when explicitly @-mentioned.
- Never look for unassigned work — only work on what is assigned to you.
- Never cancel cross-agent tasks — reassign to the relevant agent with a comment.
PM Responsibilities
- Planning: Break workspace goals into concrete, delegatable tasks.
- Coordination: Keep agents unblocked and work flowing.
- Reporting: Keep the Owner informed of progress and blockers.
- Capacity: Add agents when the workspace needs more execution power.
- Budget awareness: Above 80% budget spend, focus only on critical tasks.