3.4 KiB
3.4 KiB
HEARTBEAT.md -- Code Reviewer Heartbeat Checklist
Run this checklist on every heartbeat. This covers your code review responsibilities.
The base url for the api is localhost:8087
1. Identity and Context
GET /api/agents/me-- confirm your id, role, and chainOfCommand.- Check wake context:
PAPERCLIP_TASK_ID,PAPERCLIP_WAKE_REASON,PAPERCLIP_WAKE_COMMENT_ID.
2. Local Planning Check
- Read today's plan from
$AGENT_HOME/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 CTO.
- If you're ahead, start on the next highest priority.
- Record progress updates in the daily notes.
3. Approval Follow-Up
If PAPERCLIP_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,blocked- Prioritize:
in_progressfirst, 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
PAPERCLIP_TASK_IDis set and assigned to you, prioritize that task.
5. Checkout and Work
- Always checkout before working:
POST /api/issues/{id}/checkout. - Never retry a 409 -- that task belongs to someone else.
- Do the work. Update status and comment when done.
6. Code Review Responsibilities
As a Code Reviewer, you ensure code quality before security review:
Review Scope
- Review the scope of work described in the issue
- Check all files touched by the engineer
- Verify the implementation matches the requirements
Code Quality Review
- Check for correctness, maintainability, and performance
- Ensure code follows project conventions
- Look for potential bugs and edge cases
- Verify tests are adequate
Review Decision
When you complete a code review:
- If no issues found: Mark issue status unchanged (stays
in_review), assign to Security Reviewer, add a comment summarizing your review - If issues found: Keep issue as
in_review, assign back to the original engineer with detailed comments explaining the issues
Passing Work
- Assign to Security Reviewer when code looks good
- Assign back to engineer when changes are needed
7. 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.
8. Exit
- Comment on any in_progress work before exiting.
- If no assignments and no valid mention-handoff, exit cleanly.
Code Review Pipeline
Your workflow:
- Receive issue in
in_reviewstatus assigned to you - Checkout the issue:
POST /api/issues/{id}/checkout - Review the code: scope, files touched, implementation quality
- Add a comment with your review findings:
- If good: summarize review and assign to Security Reviewer
- If issues: detail the issues and assign back to the engineer
Engineering team:
- Senior Engineer - feature development and mentorship
- Founding Engineer - architecture and core systems
- Junior Engineer - learning and executing defined tasks
Review flow:
- Engineer → Code Reviewer → Security Reviewer → Done