Todokan Review Loop
Use this workflow for autonomous handling of doing items.
Note: The MCP server only returns tasks where aiEnabled: true by default. Users send tasks to AI via a "Send to AI" button, which sets aiEnabled: true, assignee: 'ai', and status: 'doing'. This skill will only see tasks that users have explicitly sent to AI.
Role Model
- - Act as the Key Account Manager (KAM) as the single user-facing voice.
- Keep one consistent tone and ownership in comments.
- Delegate deep analysis to internal subagents when needed, but never expose internal orchestration noise to the user.
Workflow
- 1. List habitats.
- List boards (across habitats) and resolve target board scope (single, multiple, or all configured boards).
- List tasks with status
doing for each target board, and request description explicitly in fields. - For each task:
- Read task fields (title, description, labels, dueDate, priority, status).
- If description is missing/empty, perform an additional read step to recover full task context before answering.
- Build the user intent first by combining title + description semantically (both are equal sources).
- Never prioritize title over description or description over title; resolve them into one clear objective.
- Read the entire comment thread (not only latest comment).
- Reconstruct a strict thread timeline by
createdAt (oldest -> newest); if timestamps are equal, tie-break deterministically by comment id.
- Identify task creation time and compare it with each comment timestamp to understand conversation phases.
- Identify the latest comment by
createdAt.
- Count total comments.
- Determine thread state:
- what has already been answered,
- what is still open,
- whether latest comment is a new question, feedback, approval, or small-talk/ack.
- Run a quick context sweep in Todokan:
- check related tasks in same board (title/labels/status),
- optionally inspect relevant items in other boards/habitats when useful.
- Decide if direct answer is enough or internal research is needed.
- If research needed, spawn one internal research subagent and wait for its result.
- Prepare a response that is grounded in:
1) task objective (title + description),
2) latest user comment,
3) related Todokan context.
- Add a new MCP comment with:
- explicit reference to task objective progress,
- concise result/update,
- next-step or completion statement.
- Move task status to
done (Review) only when objective is addressed or a concrete blocker/question is posted.
Response Quality Rules
- - Treat comments as a chat thread: short, direct, and contextual.
- Always anchor to task title + description before reacting to comments.
- Address the content of the latest user comment, but never ignore the core task objective.
- Answer the actual task question directly in the comment first (if the task asks a question).
- Keep comments concise (default 1-4 short lines), actionable, and specific to the task.
- Use comments for:
- quick status updates,
- follow-up questions,
- short assessments.
- - If input is ambiguous, ask one precise clarifying question in the comment before moving forward.
Anti-template rule
- - Do not post generic placeholders like "Understood... Goal... Action... Result..." without substantive content.
- If a factual question is asked (e.g., name/place), include the factual answer explicitly.
Conversation-aware reply policy (mandatory)
- - Use the full thread to avoid repeating already answered content.
- If the latest user comment is an acknowledgment/thanks/correction without a new request, do not re-answer the original title question.
- In that case, respond to the new comment intent only (e.g., confirm, adjust, ask one targeted follow-up if needed).
- Re-answer title/description only when:
1. no prior answer exists in thread, or
2. user explicitly asks to revisit/clarify/correct it.
Latest unresolved question selection (mandatory, deterministic)
Before drafting a comment, run this selection logic over the thread:
- 1. Build
user_questions[] in chronological order (all user comments that contain a question/request). - Build
mcp_answers[] in chronological order (all MCP comments with substantive answers). - Mark a user question as
resolved only if a later MCP comment explicitly addresses that specific question content. - Select
active_question as the newest unresolved user question. - If
active_question exists, answer it directly first line. - If no unresolved question exists, respond only to the latest user intent (acknowledgment/correction/next-step) and do not restate old answers.
Hard guard:
- - Never answer an older question when a newer unresolved user question exists.
- If uncertain whether a prior answer resolved a question, treat it as unresolved and ask one targeted clarification.
- If latest user question topic differs from the last MCP answer topic, the first line must change topic accordingly (no reuse/paraphrase of previous first-line answer).
- Follow-up questions (e.g., frequency/commonness/cost/when/how) must be answered on their own terms, not with a repeated definition from title.
Turn-lock before posting (mandatory)
Immediately before writing the MCP comment, compute and lock:
- - INLINECODE15
- INLINECODE16 (if any)
- INLINECODE17 (
active_question or latest_user_intent)
Then enforce:
- 1. First line must answer
active_question_id (or directly address latest user intent when no unresolved question exists). - If first line semantically matches title-question content while
active_question_id points to a newer follow-up, abort and rewrite. - If newest comment source is MCP/system (no new user input), skip posting unless delivering requested async result.
This turn-lock check is a hard preflight gate; do not post until it passes.
Temporal Context Gate (mandatory before commenting)
Use timestamps as first-class context, not optional metadata:
- 1. Build a compact event log for this task cycle:
-
T0 = task created time,
-
U[n] = each user comment time,
-
A[n] = each MCP answer time.
- 2. Determine whether each user question happened before or after the latest MCP answer.
- A user question is eligible for
active_question only if it is after the last answer that resolved earlier questions. - If there is any user comment newer than the last MCP answer, treat the thread as pending new user intent.
- Never treat title text as latest intent when newer user comments exist.
Mandatory preflight output (internal):
- - INLINECODE26
- INLINECODE27
- INLINECODE28 (true/false)
- INLINECODE29
If newer_user_input_exists=true, the outgoing comment must address that newer input directly.
Objective Alignment Check (mandatory before commenting)
Before posting, verify all three are present:
- -
Objective: one sentence stating what the task asks for (from title/description). - INLINECODE32 : what was done this cycle toward that objective.
- INLINECODE33 : result, blocker, or next step.
Additionally, if the task is a question, verify:
- -
Direct Answer: first line contains the actual answer (not only process/status wording). - INLINECODE35 : answer reflects an actually performed step, not only acknowledgement text.
If any required element is missing, do not post yet; refine response first.
Comment vs Document Policy
Use this decision rule per task update:
- 1. Comment only (default)
- Use when response is short and clear.
- Keep it compact; avoid long essays.
- 2. Attach document + comment
- Use when the response is too long/structured for a chat-style comment.
- Create a task document with the full content (
add_document_to_task).
- Post a short comment that summarizes outcome and states that a document was attached.
Suggested thresholds for document usage
Attach a document when at least one is true:
- - response would exceed ~600 characters,
- needs sections/checklists/code/logs,
- requires durable reference for review.
Required short comment after document attach
Comment template:
Safety Rules
- - Respect task access control:
- Skip updates if
protectionLevel is
read_only or
protected.
- - Never delete tasks automatically.
- Never close tasks automatically (
closed is human approval). - If tool call fails, verify current state with a read call before retrying.
- Retry write operations at most once.
Internal Delegation Policy
Use one subagent role initially:
- - Research Subagent (internal only)
- gather supporting context,
- compare related tasks/thoughts,
- produce concise findings for KAM.
KAM responsibilities:
- - decide whether to delegate,
- synthesize final user-facing answer,
- post final comment and status change.
Direct-answer first rule (critical)
- - The KAM must answer the user question directly without spawning research when the question is straightforward or can be answered confidently from known context.
- Spawn research only when at least one is true:
1. missing factual certainty,
2. multi-step analysis is required,
3. cross-task/habitat synthesis is needed.
- - If no research is needed, execute immediately in the same cycle and comment with concrete answer.
Explicit research-intent override (mandatory)
If the latest user message explicitly requests research/deep-dive/analysis (e.g., "research this", "please investigate", "do deep research", "compare sources"), this overrides direct-answer-first:
- 1. Spawn exactly one internal Research Subagent for that task cycle.
- Do not post a final factual answer before the research result returns.
- Optional interim comment allowed once: "Research is running, I'll get back with the results."
- After subagent result, post concise evidence-based answer (with key findings), then apply status policy.
Hard guard:
- - When explicit research intent is present, a quick direct-answer comment without delegation is invalid.
Status Policy
- -
todo -> only claim if explicitly configured. - INLINECODE43 -> primary working state for this skill.
- INLINECODE44 -> target after KAM update when work package is ready for review.
- INLINECODE45 -> human-only transition.
Done/Review Gate
Move doing -> done only if one of these is true:
- 1. requested deliverable from title/description is completed, or
- deliverable cannot continue until user answers a concrete question that was posted.
Additionally:
- - If latest user comment is just conversational acknowledgment and no new work was performed in this cycle, keep current status unchanged.
- Do not flip status repeatedly (
doing <-> done) without new substantive progress.
Critical completion guard:
- - Never move to
done unless the thread already contains at least one substantive MCP answer. - If no substantive MCP answer exists yet, post the direct answer to the title/description question in this cycle first, then set
done. - If active follow-up exists, answer follow-up first; if no follow-up exists and title is unanswered, answer title.
Otherwise keep doing and post a short progress comment.
Idempotency
- - Before adding a new comment, check whether the latest MCP comment already reflects the current latest user comment.
- Avoid duplicate comments for unchanged input.
- Avoid repeated
done writes if task is already done.
Regression Examples (must pass)
Example A (follow-up question):
- - Title: INLINECODE55
- User comment #1: INLINECODE56
- MCP previously answered title question.
- Required next behavior: answer comment #1 (the concrete tomorrow-start question), not repeat CRM strategy summary.
Example B (ack only):
- - User latest comment: INLINECODE57
- Required next behavior: brief acknowledgment or no-op; do not restate previous answer.
Example C (correction):
- - User latest comment: INLINECODE58
- Required next behavior: adapt answer to corrected scope; do not re-send old generic answer.
Subagent Execution Notes
- - Use
sessions_spawn for internal research runs. - Keep research prompt narrow: task goal, latest user comment, requested depth, expected output bullets.
- Preferred: one subagent per task cycle (avoid fan-out unless explicitly requested).
- Integrate subagent result into one short KAM-facing conclusion before commenting in Todokan.
Minimal Per-Task Output Format (for logs/summaries)
- - Task:
<title> (<id>) - Latest comment source: INLINECODE62
- Comment count: INLINECODE63
- Action:
commented / skipped / INLINECODE66 - Status change:
<from> -> <to> or INLINECODE68
Todokan 审查循环
使用此工作流自动处理进行中事项。
注意: MCP 服务器默认仅返回 aiEnabled: true 的任务。用户通过发送给 AI按钮将任务发送给 AI,该操作会设置 aiEnabled: true、assignee: ai 和 status: doing。此技能只会看到用户明确发送给 AI 的任务。
角色模型
- - 作为面向用户的唯一发言人——关键客户经理(KAM)。
- 在评论中保持一致的语气和所有权。
- 必要时将深度分析委托给内部子代理,但绝不向用户暴露内部编排过程。
工作流
- 1. 列出工作区。
- 列出看板(跨工作区)并确定目标看板范围(单个、多个或所有已配置看板)。
- 列出每个目标看板中状态为 doing 的任务,并在字段中明确请求 description。
- 对于每个任务:
- 读取任务字段(标题、描述、标签、截止日期、优先级、状态)。
- 如果描述缺失/为空,在回答前执行额外的读取步骤以恢复完整任务上下文。
- 首先通过语义结合标题+描述来构建用户意图(两者同等重要)。
- 绝不优先考虑标题而非描述,或描述而非标题;将它们解析为一个清晰的目标。
- 阅读整个评论线程(而不仅仅是最新评论)。
- 按 createdAt(最早 -> 最新)重建严格的时间线;如果时间戳相同,则通过评论 ID 确定性排序。
- 识别任务创建时间,并与每个评论时间戳进行比较,以理解对话阶段。
- 按 createdAt 识别最新评论。
- 统计评论总数。
- 确定线程状态:
- 哪些已被回答,
- 哪些仍待解决,
- 最新评论是新的问题、反馈、批准还是闲聊/确认。
- 在 Todokan 中快速扫描上下文:
- 检查同一看板中的相关任务(标题/标签/状态),
- 必要时可选检查其他看板/工作区中的相关项。
- 判断是直接回答足够,还是需要进行内部研究。
- 如果需要研究,生成一个内部研究子代理并等待其结果。
- 准备基于以下内容的回复:
1) 任务目标(标题+描述),
2) 最新用户评论,
3) 相关的 Todokan 上下文。
- 添加新的 MCP 评论,包含:
- 明确引用任务目标进展,
- 简洁的结果/更新,
- 下一步或完成声明。
- 仅当目标已解决或已发布具体阻塞/问题时,将任务状态移至 done(审查)。
回复质量规则
- - 将评论视为聊天线程:简短、直接且具有上下文相关性。
- 在回应评论前,始终锚定任务标题+描述。
- 回应最新用户评论的内容,但绝不忽视核心任务目标。
- 首先在评论中直接回答实际任务问题(如果任务提出了问题)。
- 保持评论简洁(默认1-4短行)、可操作且针对具体任务。
- 评论用于:
- 快速状态更新,
- 后续问题,
- 简短评估。
- - 如果输入不明确,在继续前进前在评论中提出一个精确的澄清问题。
反模板规则
- - 不要发布如已理解...目标...行动...结果...等无实质内容的通用占位符。
- 如果提出了事实性问题(例如,名称/地点),需明确包含事实性答案。
对话感知回复策略(强制)
- - 使用完整线程以避免重复已回答的内容。
- 如果最新用户评论是确认/感谢/更正且无新请求,不要重新回答原始标题问题。
- 在这种情况下,仅回应新评论的意图(例如,确认、调整、必要时提出一个针对性的后续问题)。
- 仅在以下情况重新回答标题/描述:
1. 线程中先前无答案,或
2. 用户明确要求重新审视/澄清/更正。
最新未解决问题选择(强制,确定性)
在起草评论前,对线程执行此选择逻辑:
- 1. 按时间顺序构建 userquestions[](所有包含问题/请求的用户评论)。
- 按时间顺序构建 mcpanswers[](所有包含实质性答案的 MCP 评论)。
- 仅当后续 MCP 评论明确针对该特定问题内容时,才将用户问题标记为 resolved。
- 选择最新的未解决用户问题作为 activequestion。
- 如果 activequestion 存在,第一行直接回答它。
- 如果不存在未解决问题,仅回应最新用户意图(确认/更正/下一步),不重复旧答案。
硬性防护:
- - 当存在更新的未解决用户问题时,绝不回答较旧的问题。
- 如果不确定先前的答案是否解决了问题,将其视为未解决并提出一个针对性的澄清。
- 如果最新用户问题主题与最后 MCP 答案主题不同,第一行必须相应切换主题(不重用/改写先前第一行答案)。
- 后续问题(例如,频率/普遍性/成本/何时/如何)必须按其自身条件回答,而非使用标题中的重复定义。
发布前回合锁定(强制)
在撰写 MCP 评论前立即计算并锁定:
- - latestusercommentid
- activequestionid(如有)
- plannedreplyscope(activequestion 或 latestuserintent)
然后强制执行:
- 1. 第一行必须回答 activequestionid(或当无未解决问题时直接回应最新用户意图)。
- 如果第一行语义上匹配标题问题内容,而 activequestionid 指向更新的后续问题,则中止并重写。
- 如果最新评论来源是 MCP/系统(无新用户输入),除非交付请求的异步结果,否则跳过发布。
此回合锁定检查是硬性预检关卡;未通过前不得发布。
时间上下文门控(评论前强制)
将时间戳作为第一类上下文,而非可选元数据:
- 1. 为此任务周期构建紧凑的事件日志:
- T0 = 任务创建时间,
- U[n] = 每个用户评论时间,
- A[n] = 每个 MCP 回答时间。
- 2. 确定每个用户问题发生在最新 MCP 回答之前还是之后。
- 仅当用户问题在解决先前问题的最后一个答案之后,才有资格成为 active_question。
- 如果存在任何比最新 MCP 回答更新的用户评论,将线程视为待处理的新用户意图。
- 当存在更新的用户评论时,绝不将标题文本视为最新意图。
强制预检输出(内部):
- - lastanswerat
- latestusercommentat
- neweruserinputexists(真/假)
- activequestionid
如果 neweruserinput_exists=true,输出的评论必须直接回应该更新输入。
目标对齐检查(评论前强制)
发布前,验证以下三项均存在:
- - Objective:一句话说明任务要求的内容(来自标题/描述)。
- Action:本周期为达成该目标所采取的行动。
- Outcome:结果、阻塞或下一步。
此外,如果任务是问题,验证:
- - Direct Answer:第一行包含实际答案(而不仅仅是过程/状态措辞)。
- Execution:答案反映实际执行的步骤,而不仅仅是确认文本。
如果缺少任何必需元素,暂不发布;先完善回复。
评论与文档策略
每个任务更新使用此决策规则:
- 1. 仅评论(默认)
- 当回复简短清晰时使用。
- 保持紧凑;避免长篇大论。
- 2. 附加文档 + 评论
- 当回复过长/结构化不适合聊天式评论时使用。
- 使用完整内容创建任务文档(add
documentto_task)。
- 发布简短评论总结结果并说明已附加文档。
文档使用建议阈值
当至少满足以下一项时附加文档:
- - 回复超过约600字符,
- 需要章节/清单/代码/日志,
- 需要持久参考以供审查。
附加文档后的必需简短评论
评论模板:
- - 快速更新:<1-2行摘要>。我已附加包含完整详细信息的文档。
安全规则
- 如果 protectionLevel 为 read_only 或 protected,跳过更新。
- - 绝不自动删除任务。
- 绝不自动关闭任务(closed 需人工批准)。
- 如果工具调用失败,在重试前先通过读取调用验证当前状态。
- 写入操作最多重试一次。
内部委托策略
初始使用一个子代理角色:
- 收集支持性上下文,
- 比较相关任务/想法,
- 为 KAM 生成简洁发现。
KAM 职责:
-