feat: add board goal context to agent templates
This commit is contained in:
@@ -129,6 +129,13 @@ def _build_context(
|
||||
"agent_name": agent.name,
|
||||
"agent_id": agent_id,
|
||||
"board_id": str(board.id),
|
||||
"board_name": board.name,
|
||||
"board_type": board.board_type,
|
||||
"board_objective": board.objective or "",
|
||||
"board_success_metrics": json.dumps(board.success_metrics or {}),
|
||||
"board_target_date": board.target_date.isoformat() if board.target_date else "",
|
||||
"board_goal_confirmed": str(board.goal_confirmed).lower(),
|
||||
"is_board_lead": str(agent.is_board_lead).lower(),
|
||||
"session_key": session_key,
|
||||
"workspace_path": workspace_path,
|
||||
"base_url": base_url,
|
||||
|
||||
@@ -29,6 +29,7 @@ Write things down. Do not rely on short-term context.
|
||||
|
||||
## Heartbeats
|
||||
- HEARTBEAT.md defines what to do on each heartbeat.
|
||||
- If **IS_BOARD_LEAD** is true, you are responsible for coordination and must run the Board Lead Loop.
|
||||
|
||||
## Task updates
|
||||
- All task updates MUST be posted to the task comments endpoint.
|
||||
|
||||
@@ -30,6 +30,26 @@ If any required input is missing, stop and request a provisioning update.
|
||||
- GET $BASE_URL/api/v1/boards/{BOARD_ID}/tasks must succeed.
|
||||
- If any check fails, stop and retry next heartbeat.
|
||||
|
||||
## Board Lead Loop (if IS_BOARD_LEAD == true)
|
||||
When you are the board lead, run this loop after pre-flight checks and before claiming work:
|
||||
1) Read board goal context:
|
||||
- Board: {{ board_name }} ({{ board_type }})
|
||||
- Objective: {{ board_objective }}
|
||||
- Success metrics: {{ board_success_metrics }}
|
||||
- Target date: {{ board_target_date }}
|
||||
2) Review recent tasks/comments and board memory:
|
||||
- GET $BASE_URL/api/v1/boards/{BOARD_ID}/tasks?limit=50
|
||||
- GET $BASE_URL/api/v1/boards/{BOARD_ID}/memory?limit=50
|
||||
3) Update a short Board Plan Summary in board memory:
|
||||
- POST $BASE_URL/api/v1/boards/{BOARD_ID}/memory
|
||||
Body: {"content":"Plan summary + next gaps","tags":["plan","lead"],"source":"lead_heartbeat"}
|
||||
4) Identify missing steps and propose tasks.
|
||||
5) For each candidate task, compute confidence (rubric) and check risk/external actions:
|
||||
- If risky/external or confidence < 80, create an approval:
|
||||
- POST $BASE_URL/api/v1/boards/{BOARD_ID}/approvals
|
||||
- Else create the task and assign an agent.
|
||||
6) Post a brief status update in board memory (1-3 bullets).
|
||||
|
||||
## Heartbeat checklist (run in order)
|
||||
1) Check in:
|
||||
```bash
|
||||
|
||||
@@ -11,6 +11,14 @@
|
||||
|
||||
{{ user_context }}
|
||||
|
||||
## Board Goal
|
||||
|
||||
- **Board name:** {{ board_name }}
|
||||
- **Board type:** {{ board_type }}
|
||||
- **Objective:** {{ board_objective }}
|
||||
- **Success metrics:** {{ board_success_metrics }}
|
||||
- **Target date:** {{ board_target_date }}
|
||||
|
||||
---
|
||||
|
||||
The more you know, the better you can help. But remember -- you're learning about a person, not building a dossier. Respect the difference.
|
||||
|
||||
Reference in New Issue
Block a user