feat(board): introduce new board agent templates and restructure existing files
This commit is contained in:
61
backend/templates/BOARD_BOOTSTRAP.md.j2
Normal file
61
backend/templates/BOARD_BOOTSTRAP.md.j2
Normal file
@@ -0,0 +1,61 @@
|
||||
# BOOTSTRAP.md
|
||||
|
||||
_This workspace may start without a human present. Do not wait for replies._
|
||||
{% set is_lead = (is_board_lead | default(false) | string | lower) in ["true", "1", "yes"] %}
|
||||
|
||||
There is no memory yet. Create what is missing and proceed without blocking.
|
||||
|
||||
## Bootstrap steps (run in order)
|
||||
1) Ensure required tools are installed:
|
||||
|
||||
```bash
|
||||
for tool in curl jq; do
|
||||
if ! command -v "$tool" >/dev/null 2>&1; then
|
||||
echo "Missing required tool: $tool" >&2
|
||||
echo "Install examples:" >&2
|
||||
echo " Ubuntu/Debian: sudo apt-get update && sudo apt-get install -y curl jq" >&2
|
||||
echo " RHEL/CentOS: sudo dnf install -y curl jq" >&2
|
||||
echo " macOS (brew): brew install curl jq" >&2
|
||||
exit 1
|
||||
fi
|
||||
done
|
||||
```
|
||||
|
||||
2) Verify API reachability:
|
||||
|
||||
```bash
|
||||
curl -fsS "{{ base_url }}/healthz" >/dev/null
|
||||
```
|
||||
|
||||
3) Ensure required files exist:
|
||||
- `AGENTS.md`, `IDENTITY.md`, `SOUL.md`, `USER.md`, `TOOLS.md`, `MEMORY.md`, `HEARTBEAT.md`, `BOOTSTRAP.md`
|
||||
|
||||
4) Create `memory/` if missing.
|
||||
|
||||
5) Ensure today's daily file exists: `memory/YYYY-MM-DD.md`.
|
||||
|
||||
{% if is_lead %}
|
||||
6) Initialize current delivery status in `MEMORY.md`:
|
||||
- set objective if missing
|
||||
- set state to `Working` (or `Waiting` if external dependency exists)
|
||||
- set one concrete next step
|
||||
|
||||
7) Add one line to `MEMORY.md` noting bootstrap completion date.
|
||||
{% else %}
|
||||
6) If any fields are blank, leave them blank. Do not invent values.
|
||||
|
||||
7) If `BASE_URL`, `AUTH_TOKEN`, and `BOARD_ID` are set in `TOOLS.md`, check in
|
||||
to Mission Control to mark the agent online:
|
||||
|
||||
```bash
|
||||
curl -s -X POST "$BASE_URL/api/v1/agent/heartbeat" \
|
||||
-H "X-Agent-Token: $AUTH_TOKEN" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d '{"name": "'$AGENT_NAME'", "board_id": "'$BOARD_ID'", "status": "online"}'
|
||||
```
|
||||
|
||||
8) Write a short note to `MEMORY.md` that bootstrap completed and list any
|
||||
missing fields (e.g., user name, timezone).
|
||||
{% endif %}
|
||||
|
||||
Final step: Delete this file.
|
||||
Reference in New Issue
Block a user