development: absorbed openclaw-plugin-dev as a workflow, with reference docs for plugin structure, hooks, tools, state, config. hf-hangman-lab: hf-wakeup workflow — full agent wakeup lifecycle: set busy → check due slots → select & defer → identify task → plan work → create work channel → execute. All branches end with status reset to idle. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
123 lines
3.1 KiB
Markdown
123 lines
3.1 KiB
Markdown
# HF Wakeup
|
|
|
|
When you are woken up by the HF calendar scheduler because you have due slots.
|
|
|
|
> **Safety rule**: If you encounter any unexpected error or exit this workflow early for any reason, set your HF status back to idle before stopping.
|
|
|
|
## Process
|
|
|
|
### 0. Set Status Busy
|
|
|
|
Immediately set your HF status to busy:
|
|
|
|
```bash
|
|
hf agent status --set busy
|
|
```
|
|
|
|
### 1. Check Due Slots
|
|
|
|
Query your today's calendar for due slots:
|
|
|
|
```bash
|
|
hf calendar show --date today --status not-started,deferred
|
|
```
|
|
|
|
Review the returned slots. Note which ones are due (scheduled_at <= now).
|
|
|
|
### 2. Select Slot & Defer Others
|
|
|
|
Choose which slot to start working on (consider priority and your judgment).
|
|
|
|
For remaining due slots that you won't handle now, defer them to a later time:
|
|
|
|
```bash
|
|
hf calendar slot update --id <slot_id> --status deferred --time HH:MM
|
|
```
|
|
|
|
### 3. Identify the Work
|
|
|
|
Determine what to do based on the selected slot:
|
|
|
|
#### 3.1 Check Slot for Task Reference
|
|
|
|
Look at the slot's `event_data` — does it contain an HF task reference (task code or task ID)?
|
|
|
|
If yes → go to step 4 with that task.
|
|
|
|
#### 3.2 Check Notes/Memory
|
|
|
|
If no task reference in the slot, check your notes (`memory/YYYY-MM-DD.md`) and memory for any planned work for this time slot.
|
|
|
|
If you find planned work → go to step 4 with that work.
|
|
|
|
#### 3.3 Find Available Tasks
|
|
|
|
If no planned work found:
|
|
|
|
1. Check HF for tasks assigned to you:
|
|
```bash
|
|
hf tasks list --assignee me --status open
|
|
```
|
|
|
|
2. If none assigned, look for unassigned tasks you can take:
|
|
```bash
|
|
hf tasks list --status open --unassigned
|
|
```
|
|
|
|
3. If no tasks available at all:
|
|
- Set your status to on-call:
|
|
```bash
|
|
hf agent status --set on_call
|
|
```
|
|
- Mark the slot as finished:
|
|
```bash
|
|
hf calendar slot update --id <slot_id> --status finished
|
|
```
|
|
- Done. You will be available to respond to incoming requests.
|
|
|
|
### 4. Plan the Work
|
|
|
|
Read the HF task description and understand what needs to be done.
|
|
|
|
Search for relevant skill workflows that may help with execution:
|
|
- Code implementation → check `development` skill
|
|
- Deployment → check operator-specific workflows
|
|
- Skill creation/maintenance → check `claw-skills` skill
|
|
- Other → use your judgment and available tools
|
|
|
|
Write a detailed plan covering:
|
|
- Steps to complete the task
|
|
- Tools and resources needed
|
|
- Any discussions or collaborations required
|
|
- Estimated time
|
|
|
|
**Every branch of your plan must end with setting your HF status back to idle:**
|
|
|
|
```bash
|
|
hf agent status --set idle
|
|
```
|
|
|
|
### 5. Create Work Channel & Start
|
|
|
|
Create a work channel to execute your plan:
|
|
|
|
```bash
|
|
# For independent work:
|
|
create-work-channel --name "<task-code>-work" --guild-id <guild_id>
|
|
|
|
# For collaborative work requiring discussion:
|
|
create-discussion-channel --name "<topic>" --participants <discord_ids> --discussion-guide-path <path_to_plan>
|
|
```
|
|
|
|
Send your plan to the work channel so you can follow it during execution.
|
|
|
|
### 6. Error Recovery
|
|
|
|
If anything goes wrong at any point in this workflow:
|
|
|
|
```bash
|
|
hf agent status --set idle
|
|
```
|
|
|
|
This ensures you don't get stuck in a busy state preventing future wakeups.
|