管理多会话多阶段项目,维护并同步 MISSION.md、PROGRESS.md 与 NEXT_STEPS.md,实现长期进度无缝追踪。
Skill Name: long-term-task-progress
Version: 2.1
License: MIT-0
Author: OpenClaw Community Purpose: A universal protocol for managing long-term, multi-stage projects in OpenClaw. Ensures that any project can be resumed seamlessly after days or weeks of pause.
Trigger: When user initiates a project that will span multiple sessions, or explicitly asks for progress management.
The LTPM (Long-term Task Progress Management) protocol transforms OpenClaw's short-term conversation memory into structured long-term documents. It ensures that when you return to a project after days or weeks, you can instantly understand:
This skill is designed for OpenClaw's always-on background service architecture:
When you start a new long-term project:
bash
# Example project initialization
projects/
└── {project_name}/
├── MISSION.md # Required: Project goals
├── PROGRESS.md # Required: Current status
└── NEXT_STEPS.md # Required: Action items
These three documents are mandatory for any project managed under LTPM:
FilePurposeUpdates**MISSION.mdProject definition: goals, success criteria, deliverables, constraintsOnly when goals changePROGRESS.mdCurrent status: stage, completed milestones, blockers, recent activityEvery session / milestoneNEXT_STEPS.md**Action queue: prioritized atomic tasks, next immediate actionAfter each work session
Add folders/files as needed based on project nature:
Project TypeOptional Folders/FilesCode Developmentarchitecture.md, docs/, tests/, src/Artistic Creationassets/, references/, style_guide.mdLong-form Writingoutline.md, research/, chapters/Business Operationsconfig/, scripts/, logs/Researchhypothesis.md, findings/, data/
markdown
# {Project Name}
**Created**: {YYYY-MM-DD}
**Version**: {x.y}
**Status**: Active / Paused / Completed
## Vision
What are we building/creating? Why does it matter?
## Success Criteria
- [ ] Criterion 1
- [ ] Criterion 2
- [ ] Criterion 3
## Deliverables
- Primary: {main output}
- Secondary: {supporting outputs}
## Constraints
- Budget / Time / Resources
- Technical limitations
- Dependencies
## Stakeholders
- Owner: {name}
- Contributors: {names}
markdown
# Progress Tracker: {Project Name}
**Last Updated**: {YYYY-MM-DD HH:MM}
**Overall Progress**: {x%}
## Current Stage
{Stage Name} - {Brief description}
## Milestones
### ✅ Completed
- [YYYY-MM-DD] Milestone 1
- [YYYY-MM-DD] Milestone 2
### 🔄 In Progress
- [YYYY-MM-DD] Current task...
### ⏳ Pending
- [ ] Future milestone 1
- [ ] Future milestone 2
## Blockers
- 🚧 Blocker 1: {description}
- 🚧 Blocker 2: {description}
## Recent Activity
- {YYYY-MM-DD HH:MM}: {What was accomplished}
- {YYYY-MM-DD HH:MM}: {What was discussed}
## Notes
{Cross-session context that must be preserved}
markdown
# Next Steps: {Project Name}
**Last Updated**: {YYYY-MM-DD HH:MM}
## Immediate Priority (Next Session)
1. [ ] {Atomic task 1}
2. [ ] {Atomic task 2}
## Short-term (This Week)
- [ ] Task A
- [ ] Task B
## Medium-term (This Month)
- [ ] Task C
- [ ] Task D
## Waiting On
- ⏳ {Item}: Waiting for {who/what}
This skill implements a dual-track collaboration mechanism, combining passive background monitoring with active milestone tracking:
Design Philosophy: Designed for OpenClaw's always-on background service. This is a low-power, high-compatibility solution that works transparently without requiring user intervention.
Trigger: Detection of HEARTBEAT.md changes + time threshold exceeded
Action:
[Auto-Sync] snapshot in PROGRESS.mdTechnical Implementation:
Silence thresholds are adaptive based on project complexity and session activity:
Project Complexity Factors:
ComplexityFile CountIndicatorsBase ThresholdSimple< 10 filesSingle module15 minMedium10-50 filesMultiple modules10 minComplex50-200 filesMulti-layer architecture5 minVery Complex> 200 filesDistributed system3 min
Session Activity Indicators:
Adaptive Threshold Calculation:
text
effective_threshold = base_threshold × activity_multiplier × complexity_factor
Silence Thresholds (configurable, default values):
Configuration File ( .ltpm/config.json):
json
{
"thresholds": {
"simple": 15,
"medium": 10,
"complex": 5,
"very_complex": 3
},
"activity_multipliers": {
"high": 0.5,
"normal": 1.0,
"low": 2.0
}
}
When system resource consumption is low, use file system watcher instead of heartbeat mechanism:
Detection Logic:
python
# Pseudocode for trigger mode selection
if system_resources_available():
use_file_watcher = True
trigger_mode = "file_watcher" # fswatch/inotify
else:
use_file_watcher = False
trigger_mode = "heartbeat" # Default HEARTBEAT.md
File Watcher Configuration:
ToolPlatformCommandfswatchmacOS/Linuxfswatch -o projects/``inotifywaitLinuxinotifywait -m -r projects/``FileSystemWatcherWindowsPowerShell API
File Watcher Behavior:
., *.md, *.json, *.yaml in project directory.git/, node_modules/, __pycache__/Resource Check:
Last-Write-Wins + Timestamp-Based Detection:
Conflict Detection:
python
def detect_conflict(progress_file):
current_mtime = get_modified_time(progress_file)
last_known_mtime = get_stored_mtime(progress_file)
if current_mtime != last_known_mtime:
# External modification detected
return True
return False
Resolution Strategy:
.auto-save backup before overwritingConflict Resolution Flow:
text
[Write Attempt]
↓
[Check if file modified since last read]
↓ (yes)
[Create .auto-save backup]
↓
[Write new content]
↓
[Update stored timestamp]
Backup File Naming:
PROGRESS.md.auto-save.{timestamp}Design Philosophy: Complement to passive mechanism. Ensures important decision paths are precisely captured.
Trigger:
Action:
update_progress directiveAutomatic Backup:
PROGRESS.md.auto-save.{YYYYMMDD-HHMMSS}Backup Configuration:
json
{
"backup": {
"enabled": true,
"max_count": 5,
"directory": "."
}
}
Backup Restoration:
bash
# List backups
ls -la PROGRESS.md.auto-save.*
# Restore from backup
cp PROGRESS.md.auto-save.20240315-143022 PROGRESS.md
Add clear trigger prompts to remind users when to actively record:
Trigger Prompt Template (EN):
text
┌─────────────────────────────────────────────────────────────┐
│ 📌 **Time to Record Progress!** │
│ │
│ Consider updating PROGRESS.md when you: │
│ ✓ Complete a significant task (file edits, code changes) │
│ ✓ Make an important decision or discover something │
│ ✓ Finish a work session / "talk to you later" │
│ ✓ Achieve a milestone or stage completion │
│ │
│ Quick Commands: │
│ /checkpoint - Save current progress │
│ /mark_milestone - Mark key milestone │
└─────────────────────────────────────────────────────────────┘
触发提示模板 (中文):
text
┌─────────────────────────────────────────────────────────────┐
│ 📌 **记录进度时机!** │
│ │
│ 以下情况请主动更新 PROGRESS.md: │
│ ✓ 完成重要任务(文件编辑、代码修改) │
│ ✓ 做出重要决定或发现新信息 │
│ ✓ 结束工作会话 / "下次再聊" │
│ ✓ 达成里程碑或阶段完成 │
│ │
│ 快速命令: │
│ /checkpoint - 保存当前进度 │
│ /mark_milestone - 标记关键里程碑 │
└─────────────────────────────────────────────────────────────┘
When to Show Trigger Prompts:
Chinese Triggers (触发词):
CategoryKeywordsStart"开始项目", "新建任务", "启动"Progress"进度", "完成", "做到了", "搞定了"Pause"暂停", "先这样", "下次继续"End"结束", "再见", "回头聊", "先撤了"Milestone"里程碑", "阶段完成", "搞定了"
English Triggers:
CategoryKeywordsStart"start project", "new task", "begin"Progress"progress", "completed", "done", "finished"Pause"pause", "continue later", "talk later"End"end", "goodbye", "see you", "bye"Milestone"milestone", "stage done", "achieved"
Trigger Detection Logic:
python
def detect_trigger_intent(user_message):
chinese_triggers = {
"start": ["开始", "新建", "启动"],
"progress": ["进度", "完成", "搞定"],
"pause": ["暂停", "先这样", "下次"],
"end": ["结束", "再见", "回头"],
"milestone": ["里程碑", "阶段"]
}
# Return matched category
Optional Format Configuration:
json
{
"format": {
"default": "markdown",
"supported": ["markdown", "json", "yaml"]
}
}
JSON Format Template:
json
{
"project": {
"name": "Project Name",
"created": "2024-01-01",
"version": "1.0",
"status": "active"
},
"progress": {
"overall": 75,
"current_stage": "API Implementation",
"milestones": {
"completed": [
{"date": "2024-01-01", "description": "Initial setup"},
{"date": "2024-01-15", "description": "Database design"}
],
"in_progress": [
{"date": "2024-02-01", "description": "API endpoints"}
],
"pending": [
{"description": "Frontend integration"}
]
},
"blockers": [
{"description": "API key pending", "severity": "high"}
]
},
"activity": [
{"timestamp": "2024-02-01T10:30:00Z", "action": "Completed user auth module"}
],
"next_steps": {
"immediate": [
{"task": "Write unit tests", "priority": 1}
]
}
}
YAML Format Template:
yaml
project:
name: Project Name
created: 2024-01-01
version: 1.0
status: active
progress:
overall: 75
current_stage: API Implementation
milestones:
completed:
- date: 2024-01-01
description: Initial setup
- date: 2024-01-15
description: Database design
in_progress:
- date: 2024-02-01
description: API endpoints
pending:
- description: Frontend integration
blockers:
- description: API key pending
severity: high
activity:
- timestamp: 2024-02-01T10:30:00Z
action: Completed user auth module
next_steps:
immediate:
- task: Write unit tests
priority: 1
Format Conversion:
bash
# Convert Markdown to JSON
ltpm convert --from md --to json projects/myproject/
# Convert JSON to YAML
ltpm convert --from json --to yaml projects/myproject/
When to Trigger Active Milestone:
In PROGRESS.md, introduce status identifiers:
IdentifierSourceMeaning[Auto-Sync]PassiveAuto-generated snapshot by background mechanism[Milestone]ActiveKey milestone recorded by Agent
Problem: As progress chains grow, context window may overflow
Solution: When PROGRESS.md records exceed 5 milestones, Agent MUST execute consolidate_progress:
This matrix defines where each type of information should be stored:
Information TypePROGRESS.mdNEXT_STEPS.mdMISSION.mdSeparate DocTodo - Current 3 items✅ Summary✅ Full list❌❌Todo - Backlog❌✅ Full list❌❌Decisions - Conclusion✅ Summary❌✅ Archive❌Decisions - Reasoning❌❌✅ Archive✅ (if complex)Issues - Active Blockers✅ Current❌❌❌Issues - All Known❌ Summary❌❌✅ (ISSUE.md)Notes - Meeting Points❌❌❌✅ (notes/)Technical Details❌❌✅ (if core)✅ (docs/)Changelog - Recent 5✅❌❌❌Changelog - Full❌❌❌✅ (CHANGELOG.md)References❌❌✅ (if key)✅ (refs/)
projects/{project_name}/NEXT_STEPS.md before tackling each taskPROGRESS.md after each milestoneNEXT_STEPS.md - ensure next action is clearPROGRESS.md with current statusSince OpenClaw workspace may have multiple roles (小白, Code-Pilot, Nimo), establish clear principles:
resume {project} (reading the three MD files)text
projects/
└── campaign_system/
├── MISSION.md # Project goals
├── PROGRESS.md # Current status
├── NEXT_STEPS.md # Action queue
├── architecture.md # Technical design
├── docs/
│ └── api_spec.md
├── src/
│ └── (code files)
└── logs/
└── (development logs)
text
projects/
└── novel_writing/
├── MISSION.md # Book vision
├── PROGRESS.md # Current chapter
├── NEXT_STEPS.md # Next scenes
├── outline.md # Story outline
├── research/
│ └── (background materials)
└── chapters/
├── chapter_01.md
└── chapter_02.md
CommandDescriptioninit_project {name}Initialize LTPM structure for new projectcheckpointManually trigger progress save (active)sync_memoryForce MEMORY.md updateresume {project}Load project context from docsnextShow next immediate actionmark_milestone {desc}Mark a key milestone (active)auto_sync_statusCheck if current state is safely synced
Use compact format in MEMORY.md project index:
markdown
## 活跃项目索引 (LTPM)
- [P] **Campaign System** (75%) | Next: `Confirm API` | Blocker: None
- [P] **Novel writing** (12%) | Next: `Chapter 3 outline` | Blocker: Research needed
- [On-Hold] **Legacy project** | Reason: Waiting external approval
This section lists all tools, skills, and installations required to use the extended features of LTPM v2.1.
ToolPurposeInstallationfswatchFile system watcher for macOS/Linuxbrew install fswatch (macOS) / apt install fswatch (Linux)inotify-toolsFile system watcher for Linuxapt install inotify-tools (Linux)jqJSON processingbrew install jq (macOS) / apt install jq (Linux)python3Script executionPre-installed on most systemspyyamlYAML parsingpip install pyyaml
SkillPurposefile_operationsRead/write project documentsmemory_managementUpdate MEMORY.md indextask_trackingManage NEXT_STEPS.mdauto_completionBackground monitoring
Create .ltpm/config.json in project root:
json
{
"version": "2.1",
"thresholds": {
"simple": 15,
"medium": 10,
"complex": 5,
"very_complex": 3
},
"activity_multipliers": {
"high": 0.5,
"normal": 1.0,
"low": 2.0
},
"trigger_mode": "auto",
"backup": {
"enabled": true,
"max_count": 5,
"directory": "."
},
"format": {
"default": "markdown",
"supported": ["markdown", "json", "yaml"]
},
"file_watcher": {
"enabled": true,
"debounce_seconds": 2,
"ignore_patterns": [".git/*", "node_modules/*", "__pycache__/*"]
},
"natural_language": {
"enabled": true,
"languages": ["en", "zh-CN"]
}
}
For advanced users, add these commands to your shell:
bash
# Initialize LTPM in current directory
ltpm init
# Convert between formats
ltpm convert --from md --to json
# Check sync status
ltpm status
# Force backup
ltpm backup
# Restore from backup
ltpm restore --latest
This skill is designed to be shared across users. It creates a universal protocol for long-term task management in OpenClaw.
Version History: