Loading...
Loading...
Compare original and translation side by side
type: Tasktype: Taskmemory/schema/Task.md---
title: Task
type: schema
entity: Task
version: 1
schema:
description: string, what needs to be done
status?(enum): [active, blocked, done, abandoned], current state
assigned_to?: string, who is working on this
steps?(array): string, ordered steps to complete
current_step?: integer, which step number we're on (1-indexed)
context?: string, key context needed to resume after memory loss
started?: string, when work began
completed?: string, when work finished
blockers?(array): string, what's preventing progress
parent_task?: Task, parent task if this is a subtask
settings:
validation: warn
---memory/schema/Task.md---
title: Task
type: schema
entity: Task
version: 1
schema:
description: string, what needs to be done
status?(enum): [active, blocked, done, abandoned], current state
assigned_to?: string, who is working on this
steps?(array): string, ordered steps to complete
current_step?: integer, which step number we're on (1-indexed)
context?: string, key context needed to resume after memory loss
started?: string, when work began
completed?: string, when work finished
blockers?(array): string, what's preventing progress
parent_task?: Task, parent task if this is a subtask
settings:
validation: warn
---write_notenote_type="Task"metadatawrite_note(
title="Descriptive task name",
directory="tasks",
note_type="Task",
metadata={
"status": "active",
"priority": "high",
"current_step": 1,
"steps": ["First step", "Second step", "Third step"]
},
tags=["task"],
content="""# Descriptive task namewrite_notenote_type="Task"metadatawrite_note(
title="Descriptive task name",
directory="tasks",
note_type="Task",
metadata={
"status": "active",
"priority": "high",
"current_step": 1,
"steps": ["First step", "Second step", "Third step"]
},
tags=["task"],
content="""# Descriptive task name
**Why both frontmatter and observations?** Fields in `metadata` (stored as frontmatter) power `search_notes` with `metadata_filters`. Fields as observations (`- [status] active`) power `schema_validate`. Include queryable fields in both places for full coverage.
**为何同时使用前置元数据(frontmatter)和观测项?** `metadata`中的字段(存储为前置元数据)支持`search_notes`的`metadata_filters`功能。观测项中的字段(如`- [status] active`)支持`schema_validate`功能。将可查询字段同时放入两处以实现全面覆盖。parent_task [[Other Task]]related_to [[Some Note]]note_typeswrite_note(note_type="Task")tasknote_types=["task"]parent_task [[Other Task]]note_typeswrite_note(note_type="Task")tasknote_types=["task"]search_notes(note_types=["task"], status="active")current_stepcontextcurrent_stepsearch_notes(note_types=["task"], status="active")current_stepcontextcurrent_stepundefinedundefined
Update frontmatter too:
```yaml
current_step: 3
同时更新前置元数据:
```yaml
current_step: 3status: done
completed: YYYY-MM-DDstatus: done
completed: YYYY-MM-DDsearch_notes(note_types=["task"], status="active")current_stepcontextsearch_notes(note_types=["task"], status="active")current_stepcontext| Query | What it finds |
|---|---|
| All tasks |
| Active tasks |
| Blocked tasks |
| My tasks |
| Tasks with blockers |
| Validate all tasks against schema |
| Detect drift between schema and actual task notes |
| 查询语句 | 查询结果 |
|---|---|
| 所有任务 |
| 活跃任务 |
| 受阻任务 |
| 我的任务 |
| 包含阻碍项的任务 |
| 验证所有任务是否符合schema |
| 检测schema与实际任务笔记之间的偏差 |
activeparent_task [[X]]schema_validate(noteType="Task")activeparent_task [[X]]schema_validate(noteType="Task")