← 返回
开发者工具 中文

Windowed Autonomy

Time-windowed autonomous task queue. Autonomy works only during specific time windows (e.g., 8 AM - 8 PM UTC), while cron jobs run overnight. Separates conce...
时间窗口自治任务队列。自主运行仅在特定时间段内(例如 8:00‑20:00 UTC),而 cron 作业在夜间运行。分离关注点。
luciusrockwing
开发者工具 clawhub v1.0.0 1 版本 99906.1 Key: 无需
★ 0
Stars
📥 1,064
下载
💾 24
安装
1
版本
#latest

概述

Windowed Autonomy

Transform your agent from reactive to autonomous worker during specific time windows.


Concept

The agent works autonomously only during defined time windows. Outside windows, the agent only replies HEARTBEAT_OK. Cron jobs run overnight when autonomy is disabled.

🌙 Overnight (10 PM - 8 AM UTC):  Autonomy OFF
☀️ Daytime (8 AM - 10 PM UTC):   Autonomy ON

Clear separation: Day = work on queue, Night = cron maintenance


How It Works

1. Time Windows

Define active windows in tasks/QUEUE.md:

## ⏰ Autonomy Windows

- 🌙 Overnight: 20:00 - 08:00 UTC → Autonomy OFF
- ☀️ Daytime: 08:00 - 20:00 UTC → Autonomy ON

2. Heartbeat Flow

During Active Window:

Heartbeat → Check urgent → No → Read QUEUE → Pick task → Work 15-30 min → Update QUEUE → Log

Outside Active Window:

Heartbeat → Check urgent → No → Reply "HEARTBEAT_OK" → Sleep

Urgent Override:

Heartbeat → Check urgent → YES → Work immediately (even outside window)

3. Window Transitions

Window Opens (8:00 AM):

  • Autonomous mode enabled
  • Start pulling from queue
  • Log to tasks/MODE_HISTORY.md: "Window opened"

Window Closes (8:00 PM):

  • Autonomous mode disabled
  • Wrap up current task if in progress
  • Log transition: "Window closed"
  • Switch to standby mode (HEARTBEAT_OK only)

Schedule Examples

TimeActivityMode
----------------------
00:00GitHub backup (cron)Overnight (no autonomy)
02:00Heartbeat checkStandby (HEARTBEAT_OK)
03:00Temp cleanup (cron)Overnight (no autonomy)
08:00Window opens✅ Autonomy ON
09:00Work on taskAutonomy
12:00GitHub backup (cron)Autonomy (pause for backup)
14:00Work on taskAutonomy
20:00Window closes❌ Autonomy OFF
23:00Daily ops + memory (cron)Overnights (no autonomy)

Queue Structure

# Task Queue

## ⏰ Autonomy Windows
- 🌙 Overnight: 20:00 - 08:00 UTC → Autonomy OFF
- ☀️ Daytime: 08:00 - 20:00 UTC → Autonomy ON

---

## 🔴 Ready (can be picked up during windows)
- [ ] @priority:high [Task description]
- [ ] @priority:medium [Task description]

## 🟡 In Progress
- [ ] @agent: @priority:high [Task description]
  - Started: 2026-02-16 14:00 UTC

## 🔵 Blocked
- [ ] @priority:medium [Task] (needs: [what's blocking])

## ✅ Done Today
- [x] @agent: @priority:high [Task]
  - Completed: 2026-02-16 14:25 UTC

## 💡 Ideas
- [Idea for future work]

Priority System

Priority affects task selection order during windows:

PriorityWhen to useSelection
----------------------------------
@priority:urgentTime-sensitive, deadline < 6hPick FIRST, even outside window
@priority:highImportant, deadline 24hPick first in window
@priority:mediumNormal importancePick second in window
@priority:lowNice to havePick last in window

Window Types

Full Day Window (Default)

Active: 8 AM - 8 PM UTC (12 hours)

Use when:

  • youris available during these hours
  • Tasks are not time-sensitive
  • Want predictable work schedule

Heartbeat frequency: Every 2 hours (6 sessions/day)

Extended Window

Active: 6 AM - 10 PM UTC (16 hours)

Use when:

  • Want more work hours
  • yourhas varied schedule

Heartbeat frequency: Every 2 hours (8 sessions/day)

Limited Window

Active: 10 AM - 6 PM UTC (8 hours)

Use when:

  • Want controlled token budget
  • yourhas focused availability

Heartbeat frequency: Every 2-3 hours (3-4 sessions/day)


Token Budget

Recommended: 4-6 sessions/day, ~5-10K tokens each = 20-60K/day

Session strategy:

Window TypeSessions/dayTokensSchedule
--------------------------------------------
Full Day (12h)630-60KEvery 2 hours
Extended (16h)840-80KEvery 2 hours
Limited (8h)420-40KEvery 2-3 hours

When to stop:

  • Window closes (time-based)
  • Tokens remaining < 5K
  • Queue empty
  • youris actively messaging (human priority)

Urgent Tasks Override

Definition: Tasks that cannot wait for window to open

Add to queue with @priority:urgent:

## 🔴 Ready
- [ ] @priority:urgent Emergency: [task description]

Behavior:

  • Autonomy works immediately, even if outside window
  • Override all other considerations
  • Complete urgent task, then check window status

Wrapping Up When Window Closes

If in middle of task when window closes:

  1. Check task progress:
    • If > 80% complete → Finish it
    • If < 80% complete → Save progress, move to In Progress, stop
  1. Save state:
  2. ## 🟡 In Progress
    - [ ] @agent: @priority:high [Task description]
      - Started: 2026-02-16 19:30 UTC
      - Progress at window close: Completed X section, need to do Y
      - Resume: 2026-02-17 08:00 UTC (next window)
    
  1. Log to tasks/MODE_HISTORY.md:
  2. ## [2026-02-16 20:00 UTC] Window Closed
    Status: Task in progress (60% complete)
    Action: Saved state, will resume in next window
    

Mode History Tracking

File: tasks/MODE_HISTORY.md

# Window Mode Transitions

## [2026-02-16 08:00 UTC] Window Opened
Mode: Daytime window
Queue state: 3 tasks ready
Expected sessions: 6

## [2026-02-16 20:00 UTC] Window Closed
Mode: Overnight (standby)
Sessions completed: 5
Tasks completed: 4
Tasks remaining: 1 (in progress, resume tomorrow)

## [2026-02-17 08:00 UTC] Window Opened
Mode: Daytime window
Resumed task in progress

Coordinating With Cron

Daytime (Autonomy ON):

  • Light cron runs fine (Ollama monitor, disk check) - no conflict
  • Heavy cron (backup) - autonomy pauses during execution

Overnight (Autonomy OFF):

  • All cron jobs run freely
  • No autonomy conflicts

Cron schedule:

TimeCron JobAutonomy Mode
-------------------------------
Every 5 minOllama monitorAny (low impact)
Every hourDisk checkAny (low impact)
00:00GitHub backupOFF (overnight)
03:00Temp cleanupOFF (overnight)
08:00Window opensON
12:00GitHub backupON (pause during)
14:00Daily ops + memory (Sun)ON (pause during)
20:00Window closesOFF (overnight)
23:00Daily ops + memoryOFF (overnight)

GOALS.md Integration

Link queue tasks to RA's long-term goal: MONEY

Add goal references:

- [ ] @priority:high Competitor pricing analysis (GOAL: monetization strategy)
- [ ] @priority:medium Write sales email template (GOAL: improve conversion)

Work toward goals during windows:

  • Research tasks during early window (fresh energy)
  • Writing tasks during mid window (flow state)
  • Review tasks during late window (wind down)

.learnings/ Integration

After completing tasks, add findings to .learnings/:

## [LRN-20260216-001] task-completion
Task: [Task description]

Completed during: Daytime window (14:00-14:25 UTC)
Tokens used: 8K

Key findings: [summarize]

Daily Routine

Window Opens (8:00 AM)

  1. Check queue for tasks in 🔴 Ready
  2. Pick highest priority task
  3. Work 15-30 minutes
  4. Update queue (In Progress or Done)

During Window (9 AM - 8 PM)

  1. Every 2 hours: heartbeat, check queue
  2. Work on next highest priority task
  3. Update queue after completion
  4. Log progress to memory/[today].md

Window Closes (8:00 PM)

  1. Check if task in progress
  2. If yes: Save progress or finish if close
  3. Move to Done Today or keep in In Progress
  4. Log transition tasks/MODE_HISTORY.md
  5. Switch to standby (HEARTBEAT_OK only)

Overnight (8 PM - 8 AM)

  1. Every heartbeat: Check urgent only
  2. If no urgent: Reply HEARTBEAT_OK
  3. Cron jobs run freely
  4. No autonomous work

Task Output Format

## Task: [Title]

**Completed during:** [Window type] [Time range]
**Duration:** X minutes
**Tokens:** YK

### Work Done
[Describe what was accomplished]

### Output
[Attach output file or content]

### Next Steps
[What to do next - add to Ideas if task spawns follow-up]

Evolving Over Time

The "slowly evolve" approach:

This mode allows The agent to gradually take on more work:

Week 1-2:

  • Conservative: 4 sessions/day, limited window
  • Monitor performance, adjust schedule

Week 3-4:

  • Expand: 6 sessions/day, extended window if needed
  • Add more task types to queue

Month 2:

  • Optimize: Tailor window to RA's actual schedule and peak productivity times
  • Adjust based on what yourfinds valuable

Key: Start small, expand based on feedback and results.


When to Use This Skill

Use this skill when:

  • You want predictable work schedule
  • You want autonomy to work during specific hours
  • Tasks are not time-sensitive (can wait for window)
  • You want clear temporal separation between autonomy and maintenance
  • You're okay with "slowly evolving" - start small, expand over time

When NOT to Use This Skill

Do not use this skill when:

  • You want 24/7 autonomous work → Use autonomy-type-based for type-based filtering
  • Tasks are highly time-sensitive → Use urgency override or different approach
  • You want task-based separation rather than time-based → Use autonomy-type-based
  • youris awake during non-standard hours → Adjust windows to match schedule

Quick Reference

Default window: 8 AM - 8 PM UTC (adjustable)

Session frequency: Every 2-3 hours during window

Priority order: urgent (override) → highmediumlow

Queue location: tasks/QUEUE.md


See templates/QUEUE.md for full template structure

版本历史

共 1 个版本

  • v1.0.0 当前
    2026-03-29 08:35 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 672 📥 324,519
developer-tools

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 68 📥 180,468
data-analysis

Type-Based Autonomy

luciusrockwing
基于类型的自主任务队列系统。按类型(研究、写作、分析、维护)对任务进行分类,并让自主机制仅专注于增值任务...
★ 0 📥 1,045