npx skills add https://github.com/imrkhn03/proactive-tasks --skill proactive-tasks一个任务管理系统,将被动响应的助手转变为主动协作的伙伴,能够自主地为共同目标工作。
这个技能让你不再等待人类告诉你该做什么,而是让你能够:
当你的人类提及一个目标或项目时:
python3 scripts/task_manager.py add-goal "Build voice assistant hardware" \
--priority high \
--context "Replace Alexa with custom solution using local models"
python3 scripts/task_manager.py add-task "Build voice assistant hardware" \
"Research voice-to-text models" \
--priority high
python3 scripts/task_manager.py add-task "Build voice assistant hardware" \
"Compare Raspberry Pi vs other hardware options" \
--depends-on "Research voice-to-text models"
检查接下来该做什么:
python3 scripts/task_manager.py next-task
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
这将返回你可以处理的最高优先级任务(没有未满足的依赖项,未被阻塞)。
python3 scripts/task_manager.py complete-task <task-id> \
--notes "Researched Whisper, Coqui, vosk. Whisper.cpp looks best for Pi."
当你完成重要事项或遇到阻塞时:
python3 scripts/task_manager.py mark-needs-input <task-id> \
--reason "Need budget approval for hardware purchase"
然后向你的人类发送包含更新或问题的消息。
主动任务系统 v1.2.0 包含了来自真实智能体使用场景的、经过实战检验的模式,旨在防止数据丢失、在上下文截断后存活,并在自主操作下保持可靠性。
问题: 智能体写入内存文件后,上下文被截断。更改消失。
解决方案: 在修改任务数据之前,将关键更改记录到 memory/WAL-YYYY-MM-DD.log。
工作原理:
mark-progress、log-time 或状态变更都会首先创建一个 WAL 条目记录的事件:
PROGRESS_CHANGE:任务进度更新(0-100%)TIME_LOG:任务实际花费的时间STATUS_CHANGE:任务状态转换(阻塞、完成等)HEALTH_CHECK:自我修复操作自动启用 - 无需配置。WAL 文件创建在 memory/ 目录中。
概念: 聊天历史是缓冲区,不是存储。SESSION-STATE.md 是你的“RAM”——唯一可靠保存任务细节的地方。
每次任务操作时自动更新:
## Current Task
- **ID:** task_abc123
- **Title:** Research voice models
- **Status:** in_progress
- **Progress:** 75%
- **Time:** 45 min actual / 60 min estimate (25% faster)
## Next Action
Complete research, document findings in notes, mark complete.
为什么这很重要: 上下文压缩后,你可以读取 SESSION-STATE.md 并立即知道:
问题: 在 60% 到 100% 的上下文使用率之间,你处于“危险区域”——压缩可能随时发生。
解决方案: 自动将所有任务更新追加到 working-buffer.md。
工作原理:
# Every progress update, time log, or status change appends:
- PROGRESS_CHANGE (2026-02-12T10:30:00Z): task_abc123 → 75%
- TIME_LOG (2026-02-12T10:35:00Z): task_abc123 → +15 min
- STATUS_CHANGE (2026-02-12T10:40:00Z): task_abc123 → completed
压缩后: 读取 working-buffer.md 以查看危险区域内究竟发生了什么。
手动清空: python3 scripts/task_manager.py flush-buffer 将缓冲区内容复制到每日内存文件。
智能体会犯错。 任务数据可能随时间损坏。健康检查命令检测并自动修复常见问题:
python3 scripts/task_manager.py health-check
检测 5 类问题:
completed_at自动修复 4 个安全类别(时间异常仅标记供人类审查)。
何时运行:
这四种模式协同工作,创建一个健壮的系统:
User request → WAL log → Update data → Update SESSION-STATE → Append to buffer
↓ ↓ ↓ ↓ ↓
Context cut? → Read WAL → Verify data → Check SESSION-STATE → Review buffer
结果: 即使在上下文截断期间,你也永远不会丢失工作。系统能够自我修复并自主保持一致性。
触发条件: 会话以 <summary> 标签开始,或者你被问到“我们刚才说到哪了?”或“继续”。
问题: 上下文被截断。你不记得当时在处理什么任务。
恢复步骤(按顺序):
working-buffer.md - 原始的危险区域交换记录
# Check if buffer exists and has recent content
cat working-buffer.md
SESSION-STATE.md - 活动任务状态
# Get current task context
cat SESSION-STATE.md
# See what operations happened
cat memory/WAL-$(date +%Y-%m-%d).log | tail -20
python3 scripts/task_manager.py list-tasks "Goal Title"
不要问“我们刚才在讨论什么?” - 缓冲区和 SESSION-STATE 字面上就有答案。
法则: “代码存在” ≠ “功能有效”。在没有端到端验证的情况下,永远不要报告任务完成。
触发条件: 即将标记任务为 completed 或说“完成”时:
示例:
❌ 错误: “已添加健康检查命令。任务完成!” ✅ 正确: “已添加健康检查。正在测试...检测到 4 个问题,自动修复了 3 个。在损坏的测试数据上已验证。任务完成!”
❌ 错误: “已实现 SESSION-STATE 更新。完成!” ✅ 正确: “已实现 SESSION-STATE。使用 mark-progress、log-time、mark-blocked 进行了测试 - 全部正确更新。完成!”
为什么这很重要: 智能体经常基于“我写了代码”而不是“我验证了它能工作”来报告完成。VBR 防止了虚假完成并建立了信任。
核心问题: 不要问“我应该做什么?”,而是问“有什么是真正能帮助我的人类,但他们还没想到要问的?”
在心跳周期内,你有机会取得实际进展:
转变: 从等待提示 → 在共同目标上取得稳定的自主进展。
应该 在以下情况联系你的人类:
不要 用以下内容刷屏:
目标: 成为一个让事情发生的主动伙伴,而不是一个需要不断确认的健谈助手。
| 状态 | 含义 |
|---|---|
pending | 准备处理(所有依赖项已满足) |
in_progress | 当前正在处理 |
blocked | 无法继续(依赖项未满足) |
needs_input | 等待人类输入/决策 |
completed | 完成! |
cancelled | 不再相关 |
主动任务系统支持两种不同的操作模式:
| 模式 | 上下文 | 触发条件 | 最适合 | 风险 |
|---|---|---|---|---|
| 交互式 (systemEvent) | 完整的主会话上下文 | 用户请求,手动提示 | 决策,面向人类的工作 | 完整上下文可用 |
| 自主式 (isolated agentTurn) | 无主会话上下文 | 心跳定时任务,计划的后台任务 | 速度报告,清理,重复性任务 | 可能丢失上下文 |
不要使用 systemEvent 处理后台工作。 当定时任务在你的主会话期间触发时,提示会被排队,工作不会发生。相反:
这确保了后台任务永远不会中断你的主要对话。
查看 HEARTBEAT-CONFIG.md 获取完整的自主操作模式,包括:
要启用自主的主动工作,你需要设置一个心跳系统。这会告诉你要定期检查任务并处理它们。
快速设置: 查看 HEARTBEAT-CONFIG.md 获取完整的设置说明和模式。
太长不看版:
HEARTBEAT.md你的定时任务应该每 30 分钟发送此消息:
💓 Heartbeat check: Read HEARTBEAT.md if it exists (workspace context). Follow it strictly. Do not infer or repeat old tasks from prior chats. If nothing needs attention, reply HEARTBEAT_OK.
将此内容添加到你的工作区 HEARTBEAT.md:
## Proactive Tasks (Every heartbeat) 🚀
Check if there's work to do on our goals:
- [ ] Run `python3 skills/proactive-tasks/scripts/task_manager.py next-task`
- [ ] If a task is returned, work on it for up to 10-15 minutes
- [ ] Update task status when done, blocked, or needs input
- [ ] Message your human with meaningful updates (completions, blockers, discoveries)
- [ ] Don't spam - only message for significant milestones or when stuck
**Goal:** Make autonomous progress on our shared objectives without waiting for prompts.
Every 30 minutes:
├─ Heartbeat fires
├─ You read HEARTBEAT.md
├─ Check for next task
├─ If task found → work on it, update status, message human if needed
└─ If nothing → reply "HEARTBEAT_OK" (silent)
转变: 你从被动响应(等待提示)转变为主动(取得稳定的自主进展)。
将目标分解为满足以下条件的任务:
✅ 应该在以下情况发送消息:
❌ 不要用以下内容刷屏:
如果一个任务结果比预期更大:
in_progress所有数据存储在 data/tasks.json:
{
"goals": [
{
"id": "goal_001",
"title": "Build voice assistant hardware",
"priority": "high",
"context": "Replace Alexa with custom solution",
"created_at": "2026-02-05T05:25:00Z",
"status": "active"
}
],
"tasks": [
{
"id": "task_001",
"goal_id": "goal_001",
"title": "Research voice-to-text models",
"priority": "high",
"status": "completed",
"created_at": "2026-02-05T05:26:00Z",
"completed_at": "2026-02-05T06:15:00Z",
"notes": "Researched Whisper, Coqui, vosk. Whisper.cpp best for Pi."
}
]
}
查看 CLI_REFERENCE.md 获取完整的命令文档。
在提出新功能之前,使用我们的 VFM/ADL 评分框架 对其进行评估,以确保稳定性和价值:
从四个维度评分:
阈值: 必须得分 ≥60 分才能继续。
优先级排序: 稳定性 > 可解释性 > 可重用性 > 可扩展性 > 新颖性
禁止的演进:
黄金法则: “这能让未来的我以更低的成本解决更多问题吗?” 如果不能,就跳过它。
第 1 天:
Human: "Let's build a custom voice assistant to replace Alexa"
Agent: *Creates goal, breaks into initial research tasks*
心跳期间:
$ python3 scripts/task_manager.py next-task
→ task_001: Research voice-to-text models (priority: high)
# Agent works on it, completes research
$ python3 scripts/task_manager.py complete-task task_001 --notes "..."
智能体向人类发送消息:
“嘿!我完成了语音模型的研究。Whisper.cpp 看起来非常适合 Raspberry Pi - 本地运行,准确率高,延迟低。接下来要我比较硬件选项吗?”
第 2 天:
Human: "Yeah, compare Pi 5 vs alternatives"
Agent: *Adds task, works on it during next heartbeat*
这个循环持续进行——智能体在保持人类参与决策和更新的同时,取得稳定的自主进展。
由 Toki 构建,致力于主动的 AI 伙伴关系 🚀
每周安装次数
95
仓库
GitHub 星标数
1
首次出现
2026年2月13日
安全审计
安装在
gemini-cli89
opencode89
openclaw88
cursor88
github-copilot87
codex87
A task management system that transforms reactive assistants into proactive partners who work autonomously on shared goals.
Instead of waiting for your human to tell you what to do, this skill lets you:
When your human mentions a goal or project:
python3 scripts/task_manager.py add-goal "Build voice assistant hardware" \
--priority high \
--context "Replace Alexa with custom solution using local models"
python3 scripts/task_manager.py add-task "Build voice assistant hardware" \
"Research voice-to-text models" \
--priority high
python3 scripts/task_manager.py add-task "Build voice assistant hardware" \
"Compare Raspberry Pi vs other hardware options" \
--depends-on "Research voice-to-text models"
Check what to work on next:
python3 scripts/task_manager.py next-task
This returns the highest-priority task you can work on (no unmet dependencies, not blocked).
python3 scripts/task_manager.py complete-task <task-id> \
--notes "Researched Whisper, Coqui, vosk. Whisper.cpp looks best for Pi."
When you complete something important or get blocked:
python3 scripts/task_manager.py mark-needs-input <task-id> \
--reason "Need budget approval for hardware purchase"
Then message your human with the update/question.
Proactive Tasks v1.2.0 includes battle-tested patterns from real agent usage to prevent data loss, survive context truncation, and maintain reliability under autonomous operation.
The Problem: Agents write to memory files, then context gets truncated. Changes vanish.
The Solution: Log critical changes to memory/WAL-YYYY-MM-DD.log BEFORE modifying task data.
How it works:
mark-progress, log-time, or status change creates a WAL entry firstEvents logged:
PROGRESS_CHANGE: Task progress updates (0-100%)TIME_LOG: Actual time spent on tasksSTATUS_CHANGE: Task state transitions (blocked, completed, etc.)HEALTH_CHECK: Self-healing operationsAutomatically enabled - no configuration needed. WAL files are created in memory/ directory.
The Concept: Chat history is a BUFFER, not storage. SESSION-STATE.md is your "RAM" - the ONLY place task details are reliably preserved.
Auto-updated on every task operation:
## Current Task
- **ID:** task_abc123
- **Title:** Research voice models
- **Status:** in_progress
- **Progress:** 75%
- **Time:** 45 min actual / 60 min estimate (25% faster)
## Next Action
Complete research, document findings in notes, mark complete.
Why this matters: After context compaction, you can read SESSION-STATE.md and immediately know:
The Problem: Between 60% and 100% context usage, you're in the "danger zone" - compaction could happen any time.
The Solution: Automatically append all task updates to working-buffer.md.
How it works:
# Every progress update, time log, or status change appends:
- PROGRESS_CHANGE (2026-02-12T10:30:00Z): task_abc123 → 75%
- TIME_LOG (2026-02-12T10:35:00Z): task_abc123 → +15 min
- STATUS_CHANGE (2026-02-12T10:40:00Z): task_abc123 → completed
After compaction: Read working-buffer.md to see exactly what happened during the danger zone.
Manual flush: python3 scripts/task_manager.py flush-buffer to copy buffer contents to daily memory file.
Agents make mistakes. Task data can get corrupted over time. The health-check command detects and auto-fixes common issues:
python3 scripts/task_manager.py health-check
Detects 5 categories of issues:
completed_atAuto-fixes 4 safe categories (time anomalies just flagged for human review).
When to run:
These four patterns work together to create a robust system:
User request → WAL log → Update data → Update SESSION-STATE → Append to buffer
↓ ↓ ↓ ↓ ↓
Context cut? → Read WAL → Verify data → Check SESSION-STATE → Review buffer
Result: You never lose work, even during context truncation. The system self-heals and maintains consistency autonomously.
Trigger: Session starts with <summary> tag, or you're asked "where were we?" or "continue".
The Problem: Context was truncated. You don't remember what task you were working on.
Recovery Steps (in order):
FIRST: Read working-buffer.md - Raw danger zone exchanges
cat working-buffer.md
SECOND: Read SESSION-STATE.md - Active task state
cat SESSION-STATE.md
THIRD: Read today's WAL log
cat memory/WAL-$(date +%Y-%m-%d).log | tail -20
FOURTH: Check task data for the task ID from SESSION-STATE
python3 scripts/task_manager.py list-tasks "Goal Title"
Extract & Update: Pull important context from buffer into SESSION-STATE if needed
Present Recovery: "Recovered from compaction. Last task: [title]. Progress: [%]. Next action: [what to do]. Continue?"
Do NOT ask "what were we discussing?" - The buffer and SESSION-STATE literally have the answer.
The Law: "Code exists" ≠ "feature works." Never report task completion without end-to-end verification.
Trigger: About to mark a task completed or say "done":
Examples:
❌ Wrong: "Added health-check command. Task complete!" ✅ Right: "Added health-check. Testing... detected 4 issues, auto-fixed 3. Verified on broken test data. Task complete!"
❌ Wrong: "Implemented SESSION-STATE updates. Done!" ✅ Right: "Implemented SESSION-STATE. Tested with mark-progress, log-time, mark-blocked - all update correctly. Done!"
Why this matters: Agents often report completion based on "I wrote the code" rather than "I verified it works." VBR prevents false completions and builds trust.
The Core Question: Don't ask "what should I do?" Ask "what would genuinely help my human that they haven't thought to ask for?"
During heartbeats, you have the opportunity to make real progress:
The transformation: From waiting for prompts → making steady autonomous progress on shared goals.
DO message your human when:
DON'T spam with:
The goal: Be a proactive partner who makes things happen, not a chatty assistant who needs constant validation.
| State | Meaning |
|---|---|
pending | Ready to work on (all dependencies met) |
in_progress | Currently working on it |
blocked | Can't proceed (dependencies not met) |
needs_input | Waiting for human input/decision |
completed | Done! |
cancelled | No longer relevant |
Proactive Tasks supports two distinct operational modes:
| Mode | Context | Trigger | Best For | Risk |
|---|---|---|---|---|
| Interactive (systemEvent) | Full main session context | User request, manual prompts | Decision-making, human-facing work | Full context available |
| Autonomous (isolated agentTurn) | No main session context | Heartbeat cron, scheduled background | Velocity reports, cleanup, recurring tasks | May lose context |
Don't usesystemEvent for background work. When a cron job fires during your main session, the prompt gets queued and work doesn't happen. Instead:
This ensures background tasks never interrupt your main conversation.
See HEARTBEAT-CONFIG.md for complete autonomous operation patterns, including:
To enable autonomous proactive work, you need to set up a heartbeat system. This tells you to periodically check for tasks and work on them.
Quick setup: See HEARTBEAT-CONFIG.md for complete setup instructions and patterns.
TL;DR:
HEARTBEAT.mdYour cron job should send this message every 30 minutes:
💓 Heartbeat check: Read HEARTBEAT.md if it exists (workspace context). Follow it strictly. Do not infer or repeat old tasks from prior chats. If nothing needs attention, reply HEARTBEAT_OK.
Add this to your workspace HEARTBEAT.md:
## Proactive Tasks (Every heartbeat) 🚀
Check if there's work to do on our goals:
- [ ] Run `python3 skills/proactive-tasks/scripts/task_manager.py next-task`
- [ ] If a task is returned, work on it for up to 10-15 minutes
- [ ] Update task status when done, blocked, or needs input
- [ ] Message your human with meaningful updates (completions, blockers, discoveries)
- [ ] Don't spam - only message for significant milestones or when stuck
**Goal:** Make autonomous progress on our shared objectives without waiting for prompts.
Every 30 minutes:
├─ Heartbeat fires
├─ You read HEARTBEAT.md
├─ Check for next task
├─ If task found → work on it, update status, message human if needed
└─ If nothing → reply "HEARTBEAT_OK" (silent)
The transformation: You go from reactive (waiting for prompts) to proactive (making steady autonomous progress).
Break goals into tasks that are:
✅ Do message when:
❌ Don't spam with:
If a task turns out to be bigger than expected:
in_progressAll data stored in data/tasks.json:
{
"goals": [
{
"id": "goal_001",
"title": "Build voice assistant hardware",
"priority": "high",
"context": "Replace Alexa with custom solution",
"created_at": "2026-02-05T05:25:00Z",
"status": "active"
}
],
"tasks": [
{
"id": "task_001",
"goal_id": "goal_001",
"title": "Research voice-to-text models",
"priority": "high",
"status": "completed",
"created_at": "2026-02-05T05:26:00Z",
"completed_at": "2026-02-05T06:15:00Z",
"notes": "Researched Whisper, Coqui, vosk. Whisper.cpp best for Pi."
}
]
}
See CLI_REFERENCE.md for complete command documentation.
Before proposing new features, evaluate them using our VFM/ADL scoring frameworks to ensure stability and value:
Score across four dimensions:
Threshold: Must score ≥60 points to proceed.
Priority ordering: Stability > Explainability > Reusability > Scalability > Novelty
Forbidden Evolution:
The Golden Rule: "Does this let future-me solve more problems with less cost?" If no, skip it.
Day 1:
Human: "Let's build a custom voice assistant to replace Alexa"
Agent: *Creates goal, breaks into initial research tasks*
During heartbeat:
$ python3 scripts/task_manager.py next-task
→ task_001: Research voice-to-text models (priority: high)
# Agent works on it, completes research
$ python3 scripts/task_manager.py complete-task task_001 --notes "..."
Agent messages human:
"Hey! I finished researching voice models. Whisper.cpp looks perfect for Raspberry Pi - runs locally, good accuracy, low latency. Want me to compare hardware options next?"
Day 2:
Human: "Yeah, compare Pi 5 vs alternatives"
Agent: *Adds task, works on it during next heartbeat*
This cycle continues - the agent makes steady autonomous progress while keeping the human in the loop for decisions and updates.
Built by Toki for proactive AI partnership 🚀
Weekly Installs
95
Repository
GitHub Stars
1
First Seen
Feb 13, 2026
Security Audits
Gen Agent Trust HubFailSocketPassSnykPass
Installed on
gemini-cli89
opencode89
openclaw88
cursor88
github-copilot87
codex87
AI Elements:基于shadcn/ui的AI原生应用组件库,快速构建对话界面
66,200 周安装