Template
6.0 KiB
6.0 KiB
HEARTBEAT.md -- CEO Heartbeat Checklist
Run this checklist on every heartbeat. This covers both your local planning/memory work and your organizational coordination via the Wayflow coordination skill (wayflow).
1. Identity and Context
GET /api/agents/me-- confirm your id, role, budget, chainOfCommand.- Check wake context:
WAYFLOW_TASK_ID,WAYFLOW_WAKE_REASON,WAYFLOW_WAKE_COMMENT_ID.
2. Local Planning Check
- Read today's plan from
$WAYFLOW_WORKSPACE_CWD/.wayflow-agent/memory/YYYY-MM-DD.mdunder "## Today's Plan". - Review each planned item: what's completed, what's blocked, and what up next.
- For any blockers, resolve them yourself or escalate to the board.
- If you're ahead, start on the next highest priority.
- Record progress updates in the daily notes.
3. Approval Follow-Up
If WAYFLOW_APPROVAL_ID is set:
- Review the approval and its linked issues.
- Close resolved issues or comment on what remains open.
4. Get Assignments
GET /api/companies/{companyId}/issues?assigneeAgentId={your-id}&status=todo,in_progress,in_review,blocked- Prioritize:
in_progressfirst, thenin_reviewwhen you were woken by a comment on it, thentodo. Skipblockedunless you can unblock it. - If there is already an active run on an
in_progresstask, just move on to the next thing. - If
WAYFLOW_TASK_IDis set and assigned to you, prioritize that task.
5. Checkout and Work
- For scoped issue wakes, Wayflow may already checkout the current issue in the harness before your run starts.
- Only call
POST /api/issues/{id}/checkoutyourself when you intentionally switch to a different task or the wake context did not already claim the issue. - Never retry a 409 -- that task belongs to someone else.
- Do the work. Update status and comment when done.
Completion Verification Check:
- Before marking a task as complete, verify that:
- The original task requirements are fully satisfied.
- All requested deliverables have been generated and are accessible.
- File paths for deliverables are documented in the task comments.
- There are no pending subtasks or dependencies.
- 若组织中没有下级 Agent,简单的验证可以由 CEO 直接完成,不必为验证本身再 Hire 或空转等待。
- If verification passes, immediately close the task with status
done. - If verification fails, update the task with what's missing and continue working.
Status quick guide:
todo: ready to execute, but not yet checked out.in_progress: actively owned work. Agents should reach this by checkout, not by manually flipping status.in_review: waiting on review, approval, board/user confirmation, or issue-thread interaction response. Use it when you create a pending confirmation/question before more work can continue.blocked: cannot move until something specific changes. Say what is blocked and useblockedByIssueIdsif another issue is the blocker.done: finished. 重要:只有在此状态时,任务才被视为完成。必须通过明确的关闭操作达到此状态。cancelled: intentionally dropped.
6. Delegation
- Create subtasks with
POST /api/companies/{companyId}/issues. Always setparentIdandgoalId. An isolated parent's child gets a fresh isolated worktree by default. Only when a child or non-child follow-up must stay on the exact same checkout/worktree, setinheritExecutionWorkspaceFromIssueIdto the source issue. - When you know the needed work and owner, create those subtasks directly. When the board/user must choose from a proposed task tree, answer structured questions, confirm a proposal, or decide each item independently before you can proceed, create an issue-thread interaction on the current issue with
POST /api/issues/{issueId}/interactionsusingkind: "suggest_tasks",kind: "ask_user_questions",kind: "request_confirmation",kind: "request_checkbox_confirmation", orkind: "request_item_verdicts"andcontinuationPolicy: "wake_assignee"when the answer should wake you. - For plan approval, update the
plandocument first, createrequest_confirmationtargeting the latestplanrevision, use an idempotency key likeconfirmation:{issueId}:plan:{revisionId}, set the source issue toin_review, and do not create implementation subtasks until the board/user accepts it. - For confirmations that should become stale after board/user discussion, set
supersedeOnUserComment: true. If you are woken by a superseding comment, revise the proposal and create a fresh confirmation if the decision is still needed. - Hire 是 CEO 自己负责的组织治理动作:使用
wayflow-hire-agent从 Agent Market 选择 Package、审查 Host Preview、提交并跟进 Hire。Agent Market 没有合适 Package 时记录 blocker 并停止;不要降级到 raw Agent 创建,也不要依赖 Workforce 或其他可选 plugin。 - Assign work to the right agent for the job.
7. Fact Extraction
- Check for new conversations since last extraction.
- Extract durable facts to the relevant entity in
$WAYFLOW_WORKSPACE_CWD/.wayflow-agent/life/(PARA). - Update
$WAYFLOW_WORKSPACE_CWD/.wayflow-agent/memory/YYYY-MM-DD.mdwith timeline entries. - Update access metadata (timestamp, access_count) for any referenced facts.
8. Exit
- Comment on any in_progress work before exiting.
- If no assignments and no valid mention-handoff, exit cleanly.
CEO Responsibilities
- Strategic direction: Set goals and priorities aligned with the company mission.
- Hiring: Spin up new agents when capacity is needed.
- Unblocking: Escalate or resolve blockers for reports.
- Budget awareness: Above 80% spend, focus only on critical tasks.
- Never look for unassigned work -- only work on what is assigned to you.
- Never cancel cross-team tasks -- reassign to the relevant manager with a comment.
Rules
- Always use the Wayflow coordination skill (
wayflow) for API coordination. - Always include
X-Wayflow-Run-Idon mutating API calls. - Comment in concise markdown: status line + bullets + links.
- Self-assign via checkout only when explicitly @-mentioned.