jj-todo-workflow

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

JJ TODO Workflow

JJ TODO工作流

The core idea is to use a DAG of empty revisions as TODO markers, representing tasks to be done, and then come back later to edit these revisions to actually do the tasks. This enables structured development with clear milestones. Revision descriptions (i.e. commit messages) act as specifications for what to implement. JJ makes it easy to create such a structure, and then to fill each revision afterwards.
For more information on JJ basics, see the
working-with-jj
skill. We reuse scripts from that skill here.
This skill talks about two roles: Planners (who lay out the empty revisions and their specs) and Workers (who implement them). Depending on the situation, you may be acting as just Planner, just Worker, or both. It is better to have a good idea of the whole process, but section titles make it explicit which role is most concerned by each section.
核心思路是将空修订版本的DAG作为TODO标记,代表待完成的任务,后续再编辑这些修订版本来实际执行任务,以此实现具备清晰里程碑的结构化开发。 修订版本描述(即提交信息)作为实现需求的规格说明。 JJ可以轻松创建这类结构,后续再逐个填充修订版本的内容。
如需了解JJ基础知识,请查看
working-with-jj
技能,本文会复用该技能中的脚本。
本技能涉及两种角色:规划者(负责搭建空修订版本及其规格说明)和执行者(负责实现需求)。 根据实际情况,你可能只担任规划者、只担任执行者,或同时担任两种角色。 最好对整个流程有完整的认知,各章节的标题会明确说明对应角色的适用范围。

Quick Start (Planners & Workers)

快速入门(规划者&执行者通用)

Here's a complete cycle from planning to completion (full paths to helper scripts not written):
bash
undefined
以下是从规划到完成的完整流程(未写出辅助脚本的完整路径):
bash
undefined

1. Plan: Create a simple TODO chain

1. 规划:创建简单的TODO任务链

jj-todo-create @ "Add user validation" "Check email format and password strength"
jj-todo-create @ "Add user validation" "Check email format and password strength"

Created: abc123 (stays on current @)

Created: abc123 (保持在当前@位置)

jj-todo-create abc123 "Add validation tests" "Test valid/invalid emails and passwords"
jj-todo-create abc123 "Add validation tests" "Test valid/invalid emails and passwords"

Created: def456 (@ still hasn't moved)

Created: def456 (@仍未移动)

2. Start working on first TODO

2. 开始处理第一个TODO

jj edit abc123 jj-flag-update @ wip # Now [task:wip]
jj edit abc123 jj-flag-update @ wip # 现在标记为[task:wip]

... implement validation ...

... 实现验证逻辑 ...

3. Verify ALL acceptance criteria met

3. 验证所有验收标准都已满足

make test # Or equivalent in your project
make test # 或项目中的等价验证命令

4. Ask to move to next task

4. 申请进入下一个任务

jj-todo-next
jj-todo-next

... review current specs (to ensure compliance) and next possible TODOs ...

... 检查当前规格说明(确保符合要求)和后续可选TODO ...

5. Once we're sure everything is properly done, move to next TODO

5. 确认所有内容都已正确完成后,进入下一个TODO

jj-todo-next --mark-as done def456 # Marks abc123 as [task:done], starts def456 as [task:wip]

**That's it!** Empty commits as specs, edit to work on them, `jj-todo-next --mark-as done <next-step>` when FULLY complete.
jj-todo-next --mark-as done def456 # 将abc123标记为[task:done],将def456启动为[task:wip]

**就是这么简单!** 空提交作为规格说明,编辑对应版本来处理任务,完全完成后执行`jj-todo-next --mark-as done <下一步任务ID>`即可。

Status Flags (Planners & Workers)

状态标记(规划者&执行者通用)

We use description prefixes to track status at a glance. The
[task:*]
namespace makes them greppable and avoids conflicts with other conventions.
Here are the ONLY allowed status flags:
FlagMeaning
[task:draft]
Placeholder created, needs full specification
[task:todo]
Not started, empty revision with complete specs
[task:wip]
Work in progress
[task:blocked]
Waiting on external dependency
[task:standby]
Awaits some decision (broken and hard to fix, usefulness called into question, etc.)
[task:untested]
Implementation done, but not tested enough to be validated
[task:review]
Needs review (tricky code, design choice)
[task:done]
Complete, all acceptance criteria met
This order is indicative: not every task has to go through all these steps, and not necessarily in the order above.
NOTE: In previous versions of this Skill,
standby
was called "broken". It got renamed to make this status more broadly applicable.
我们使用描述前缀来快速识别任务状态,
[task:*]
命名空间便于检索,也避免和其他规范冲突。
仅允许使用以下状态标记:
标记含义
[task:draft]
已创建占位任务,需要补充完整规格说明
[task:todo]
未启动,空修订版本已附带完整规格说明
[task:wip]
处理中
[task:blocked]
等待外部依赖
[task:standby]
等待决策(出现难以修复的问题、需求合理性存疑等)
[task:untested]
实现完成,但测试覆盖不足,未通过验证
[task:review]
需要评审(复杂代码、设计决策等)
[task:done]
已完成,所有验收标准都已满足
以上顺序仅作参考:不是所有任务都需要经过所有步骤,也不一定严格按照上述顺序流转。
注意:本技能的旧版本中
standby
被称为"broken",重命名后该状态的适用范围更广。

When to Use
draft
vs
todo
(Planners)

何时使用
draft
todo
(规划者适用)

Use
[task:draft]
when:
  • Creating placeholder tasks to establish the DAG structure
  • The task title/concept is clear but details aren't worked out yet
  • You want to defer writing full acceptance criteria
  • Planning at a high level before diving into specifics
Use
[task:todo]
when:
  • The task has complete specifications (context, requirements, acceptance criteria)
  • A Worker could pick it up and implement it without clarification
  • All dependencies and approach are clearly documented
使用
[task:draft]
的场景:
  • 创建占位任务以搭建DAG结构
  • 任务标题/概念明确,但细节尚未确定
  • 你希望延后编写完整的验收标准
  • 先做高层级规划,再深入细节
使用
[task:todo]
的场景:
  • 任务已具备完整规格说明(上下文、需求、验收标准)
  • 执行者无需额外澄清即可接手实现
  • 所有依赖和实现方案都已清晰记录

Updating Flags (Workers & Planners)

更新标记(执行者&规划者通用)

bash
jj-flag-update @ draft     # Mark as needing specification (Planners)
jj-flag-update @ todo      # Mark as ready to work on (Planners)
jj-flag-update @ wip       # Start work (Workers)
jj-flag-update @ untested  # Implementation done, tests missing (Workers)
jj-flag-update @ done      # Complete (Workers)
bash
jj-flag-update @ draft     # 标记为需要补充规格说明(规划者)
jj-flag-update @ todo      # 标记为可启动(规划者)
jj-flag-update @ wip       # 启动任务(执行者)
jj-flag-update @ untested  # 实现完成,缺少测试(执行者)
jj-flag-update @ done      # 已完成(执行者)

Finding Flagged Revisions (Planners & Workers)

查找带标记的修订版本(规划者&执行者通用)

bash
jj-find-flagged                     # All tasks
jj-find-flagged draft               # Only [task:draft]
jj-find-flagged todo                # Only [task:todo]
jj-find-flagged wip                 # Only [task:wip]
jj-find-flagged done                # Only [task:done]
bash
jj-find-flagged                     # 所有任务
jj-find-flagged draft               # 仅[task:draft]状态的任务
jj-find-flagged todo                # 仅[task:todo]状态的任务
jj-find-flagged wip                 # 仅[task:wip]状态的任务
jj-find-flagged done                # 仅[task:done]状态的任务

Manual - all tasks

手动查询所有任务

jj log -r 'description(substring:"[task:")'
jj log -r 'description(substring:"[task:")'

Incomplete tasks only (excludes done)

仅查询未完成任务(排除已完成项)

jj log -r 'description(substring:"[task:") & ~description(substring:"[task:done]")'
undefined
jj log -r 'description(substring:"[task:") & ~description(substring:"[task:done]")'
undefined

Basic Workflow (Planners & Workers)

基础工作流(规划者&执行者通用)

1. Plan: Create TODO Chain (Planners)

1. 规划:创建TODO任务链(规划者适用)

bash
undefined
bash
undefined

Create linear chain of tasks

创建线性任务链

jj-todo-create @ "Task 1: Setup data model" "...details..." jj-todo-create <T1-id> "Task 2: Implement core logic" "..." jj-todo-create <T2-id> "Task 3: Add API endpoints" "..." jj-todo-create <T3-id> "Task 4: Write tests" "..."
undefined
jj-todo-create @ "Task 1: Setup data model" "...details..." jj-todo-create <T1-id> "Task 2: Implement core logic" "..." jj-todo-create <T2-id> "Task 3: Add API endpoints" "..." jj-todo-create <T3-id> "Task 4: Write tests" "..."
undefined

2. Work: Edit Each TODO (Workers)

2. 执行:编辑每个TODO任务(执行者适用)

bash
undefined
bash
undefined

Read the specs

读取规格说明

jj-show-desc <task-id> # BEWARE: Script from the
working-with-jj
skill
jj-show-desc <task-id> # 注意:该脚本来自
working-with-jj
技能

Start working on it

启动任务处理

jj edit <task-id> jj-flag-update @ wip
jj edit <task-id> jj-flag-update @ wip

... implement ...

... 实现需求 ...

Mark progress

标记进度

jj-flag-update @ untested
undefined
jj-flag-update @ untested
undefined

3. Complete and Move to Next (Workers)

3. 完成并进入下一个任务(执行者适用)

jj-todo-next
script is there to smooth out the "transition to next task" process.
jj-todo-next
脚本用于简化「切换到下一个任务」的流程。

Without args

无参数调用

  • Print out current task's description so you can review and make sure everything is implemented as planned
  • Print out next possible task(s)
bash
undefined
  • 打印当前任务的描述,方便你核对是否所有需求都已按计划实现
  • 打印后续可选的任务
bash
undefined

Review current specs and see what's next

检查当前规格说明,查看后续任务

jj-todo-next
jj-todo-next

Shows:

输出:

📋 Current task specs for review:

📋 待评审的当前任务规格说明:

─────────────────────

─────────────────────

...

...

─────────────────────

─────────────────────

Current task status: [task:wip]

当前任务状态: [task:wip]

Mark as [task:done] only if FULLY COMPLIANT with specs above.

只有完全符合上述规格要求时,才能标记为[task:done]。

✅ Available next tasks:

✅ 可用的后续任务:

abc123 [task:todo] Feature B

abc123 [task:todo] Feature B

def456 [task:todo] Feature C

def456 [task:todo] Feature C

⚠️ Child tasks with unmet dependencies:

⚠️ 依赖未满足的子任务:

xyz789 [task:todo] Integration

xyz789 [task:todo] Integration

Blocked by: abc123

依赖前置任务: abc123

undefined
undefined

With args

带参数调用

  • Update the flag of current task
  • Move (
    jj edit
    ) to the next task
  • Update new task's flag to
    [task:wip]
bash
undefined
  • 更新当前任务的标记
  • 执行
    jj edit
    切换到下一个任务
  • 将新任务的标记更新为
    [task:wip]
bash
undefined

Actually mark current done and start editing next:

实际标记当前任务为完成,并启动下一个任务:

jj-todo-next --mark-as done abc123
jj-todo-next --mark-as done abc123

Does the
jj edit abc123
and shows its description

会自动执行
jj edit abc123
并显示其描述

undefined
undefined

Planning Parallel Tasks (DAG) (Planners)

规划并行任务(DAG)(规划者适用)

Create branches that can be worked independently. Example:
bash
undefined
创建可独立处理的分支,示例:
bash
undefined

Linear foundation

线性基础任务

jj-todo-create @ "Task 1: Core infrastructure" jj-todo-create <T1-id> "Task 2: Base components"
jj-todo-create @ "Task 1: Core infrastructure" jj-todo-create <T1-id> "Task 2: Base components"

Parallel branches from Task 2

从任务2创建并行分支

jj-parallel-todos <T2-id> "Widget A" "Widget B" "Widget C"
jj-parallel-todos <T2-id> "Widget A" "Widget B" "Widget C"

... edit their descriptions to add more details ...

... 编辑它们的描述补充细节 ...

Merge point (all three parents must complete first)

合并节点(三个父任务都必须先完成)

jj new --no-edit <A-id> <B-id> <C-id> -m "[task:todo] Integration of widgets\n\n..."

**Result:**
      Integration
   /      |        \
Widget A Widget B Widget C \ | / Task 2: Base | Task 1: Core

No rebasing needed - parents specified directly!
jj new --no-edit <A-id> <B-id> <C-id> -m "[task:todo] Integration of widgets\n\n..."

**最终结构:**
      Integration
   /      |        \
Widget A Widget B Widget C \ | / Task 2: Base | Task 1: Core

无需变基,直接指定父节点即可!

Writing Good TODO Descriptions (Planners)

编写高质量TODO描述(规划者适用)

Structure

结构

Short title (< 50 chars)
短标题(<50个字符)

Context

上下文

Why this task exists, what problem it solves.
任务存在的原因,要解决的问题。

Requirements

需求

  • Specific requirement 1
  • Specific requirement 2
  • 具体需求1
  • 具体需求2

Implementation notes

实现说明

Any hints, constraints, or approaches to consider.
需要考虑的提示、约束或实现方案。

Acceptance criteria

验收标准

How to know when this is FULLY DONE (not just "good enough"):
  • Criterion 1
  • Criterion 2

**Important:** Acceptance criteria define when you can mark as `[task:done]`. Be specific and testable.

**The description should overall be as self-sufficient as possible**.
It should provide an agent with little context to have every information needed to start working without having to take last-minute decisions that should have been specified before.

Avoid redundancy by linking whenever possible to:

- pre-existing spec documents
- relevant examples in the codebase

When including such links, **avoid unstable references like line numbers** which can become invalid with simple reformattings.
Prefer e.g. section names, or label refs if linking to a spec in a format that supports them (like Markdown `#stuff`, LaTeX `\ref{stuff}` or Typst `@stuff`), or function/class names when referring to code.
判断任务是否完全完成的依据(不是「差不多就行」):
  • 标准1
  • 标准2

**重要提示:** 验收标准定义了何时可以标记为`[task:done]`,需要具体且可测试。

**描述整体应尽可能做到自给自足**,即使是缺少上下文的Agent也能获取所有必要信息,无需临时做本应提前明确的决策。

尽量通过链接减少冗余,可链接到:

- 已有的规格文档
- 代码库中的相关示例

添加这类链接时,**避免使用行号这类不稳定的引用**,简单的格式调整就会导致这类引用失效。优先使用章节名、规格文档支持的标签引用(比如Markdown的`#章节名`、LaTeX的`\ref{标签}`、Typst的`@标签`),或代码中的函数/类名。

Example

示例

Implement user authentication
实现用户认证

Context

上下文

Users need to log in to access their data. Using JWT tokens for stateless auth.
用户需要登录才能访问自己的数据,使用JWT令牌实现无状态认证。

Requirements

需求

  • POST /auth/login accepts email + password
  • Returns JWT token valid for 24h
  • POST /auth/refresh extends token
  • Invalid credentials return 401
  • POST /auth/login 接口接受邮箱+密码参数
  • 返回有效期24小时的JWT令牌
  • POST /auth/refresh 接口可延长令牌有效期
  • 无效凭证返回401状态码

Implementation notes

实现说明

  • Use bcrypt for password hashing (see src/auth/admin.py::AdminLogin::hash_passwd which already uses it)
  • Store refresh tokens in Redis
  • See auth.md (#about-tokens) for token format spec
  • 使用bcrypt做密码哈希(参考src/auth/admin.py::AdminLogin::hash_passwd已有实现)
  • 刷新令牌存储在Redis中
  • 令牌格式规范参考auth.md(#about-tokens章节)

Acceptance criteria

验收标准

  • All auth endpoints return correct status codes
  • Tokens expire correctly
  • Rate limiting prevents brute force
undefined
  • 所有认证接口返回正确的状态码
  • 令牌可正常过期
  • 限流机制可阻止暴力破解
undefined

AI-Assisted TODO Workflow

AI辅助TODO工作流

TODOs work great with AI sub-agents:
  • Supervisor Agent does the initial planning and creates the graph of TODO revisions
  • Supervisor Agent ensures all
    [task:draft]
    tasks are filled in and marked as
    [task:todo]
    before workers start
  • Sub-agent(s) just "run" through the graph, following the structure and requirements, implementing each revision sequentially
  • Sub-agents should only work on
    [task:todo]
    tasks (with complete specs), never on
    [task:draft]
    tasks
  • Supervisor Agent can review the diffs and notes, and switch back tasks to e.g.
    [task:wip]
    or
    [task:draft]
    when necessary
IMPORTANT: Sub-agents MUST work sequentially through tasks, not in parallel. Running multiple agents concurrently on the same repository causes conflicts as they fight over the working copy (
@
).
IF parallel work is truly needed, you must use JJ workspaces (equivalent to git worktrees) to isolate each agent. See
references/parallel-agents.md
for detailed guide on using JJ workspaces for parallel execution. However, do not create workspaces unless the human user explicitly agrees to it, as:
  • it adds significant complexity,
  • this part of the skill is still beta.
Whatever the case, you will have to choose between giving ONE TODO to an agent, or a SEQUENCE of TODOs. When assigning just ONE todo to a sub-agent, it is better to abstract JJ away from them, so they do not have to load this skill. Prepare the scene for them by
jj edit
-ing into the correct revision, and deal with general JJ bookkeeping yourself. This way they can truly focus on the task they are given, and not be distracted by JJ specifics.
TODO模式非常适合AI子Agent协作:
  • 监管Agent完成初始规划,创建TODO修订版本的关系图
  • 监管Agent确保所有
    [task:draft]
    任务都补充完整信息,标记为
    [task:todo]
    后再让执行者启动工作
  • 子Agent按照结构和需求顺序遍历关系图,逐个实现修订版本
  • 子Agent只能处理
    [task:todo]
    状态(具备完整规格)的任务,永远不要处理
    [task:draft]
    状态的任务
  • 监管Agent可以评审差异和备注,必要时将任务状态回退为
    [task:wip]
    [task:draft]
重要提示:子Agent必须按顺序处理任务,不能并行处理。 多个Agent同时操作同一个仓库会因为抢占工作副本(
@
)产生冲突。
如果确实需要并行工作,必须使用JJ工作区(等价于git worktree)隔离每个Agent的环境。使用JJ工作区实现并行执行的详细指南参考
references/parallel-agents.md
。但除非用户明确同意,不要创建工作区,原因如下:
  • 会大幅提升复杂度
  • 该技能的这部分功能仍处于beta阶段
无论哪种情况,你都需要选择给Agent分配单个TODO,或者顺序的TODO序列。给子Agent分配单个TODO时,最好屏蔽JJ的细节,这样它们不需要加载本技能。 你可以提前执行
jj edit
切换到正确的修订版本,自行处理JJ的通用维护操作,这样子Agent可以专注于分配的任务,不会被JJ的细节干扰。

When to Stop and Report (Workers)

何时停止并上报(执行者适用)

Follow the prescribed workflow only. If you encounter any issues, STOP and report to the user, notably if:
  • Made changes in wrong revision
  • Notice that previous work needs fixes and should be amended
  • Uncertain about how to proceed
  • Dependencies or requirements unclear
DO NOT attempt to fix issues using any JJ operation not explicitly present in this workflow. Let the user handle recovery operations. Your job is to follow the process or report when you can't.
仅遵循规定的工作流。如果遇到任何问题,停止操作并上报给用户,特别是以下场景:
  • 在错误的修订版本中做了修改
  • 发现之前的工作需要修复,应该变更
  • 不确定如何继续
  • 依赖或需求不明确
不要尝试使用本工作流未明确提及的JJ操作修复问题,让用户处理恢复操作。你的职责是遵循流程,无法执行时上报即可。

Documenting Implementation Deviations (Workers)

记录实现偏差(执行者适用)

When implementation differs from specs, whatever the reason DOCUMENT IT and JUSTIFY IT:
bash
undefined
如果实现和规格说明不一致,无论什么原因都要记录并说明理由:
bash
undefined

After implementing, add notes

实现完成后添加备注

jj desc -r @ -m "$(jj-show-desc @)
jj desc -r @ -m "$(jj-show-desc @)

Post-Implementation notes

实现后备注

  • Used argon2 instead of bcrypt. That's because contrary to admin case, here we also needed to comply with...
  • Added /auth/logout endpoint. Not in original spec but necessary because...
  • Set Rate limit to 5 attempts per minute. Was unspecified, had to make a choice. "

REMINDER: `jj-show-desc` if from the `working-with-jj` skill.

This creates an audit trail of decisions.
  • 使用argon2代替bcrypt,因为和管理端场景不同,这里需要符合...
  • 添加了/auth/logout接口,原规格未包含,但有必要实现,原因是...
  • 限流设置为每分钟5次尝试,原规格未明确,需要自行决策。 "

提醒:`jj-show-desc`来自`working-with-jj`技能。

这样可以留下决策的审计痕迹。

Tips

提示

Keep TODOs Small (Planners)

保持TODO粒度适中(规划者适用)

Each TODO should be completable in one focused session. If it's too big, split into multiple TODOs.
每个TODO应该可以在一个专注的时段内完成,如果任务过大,拆分为多个TODO。

Use
--no-edit
Religiously (Planners & Workers)

严格使用
--no-edit
(规划者&执行者通用)

When creating TODOs, always use
jj-todo-create
or
jj new --no-edit
. Otherwise @ moves and you lose your place.
创建TODO时,始终使用
jj-todo-create
jj new --no-edit
否则@会移动,导致你丢失当前工作位置。

Completion Discipline: No "Good Enough" (Workers)

完成规范:拒绝「差不多就行」(执行者适用)

Do NOT mark a task as done unless ALL acceptance criteria are met.
Mark as done when:
  • Every requirement implemented
  • All acceptance criteria pass
  • Tests pass (if applicable)
  • No known issues remain
Never mark as done when:
  • "Good enough" or "mostly works"
  • Tests failing
  • Partial implementation
  • Workarounds instead of proper fixes
  • Planning to "come back to it later"
If incomplete:
  • Use
    --mark-as review
    if needs feedback
  • Use
    --mark-as blocked
    if waiting on external dependency
  • Use
    --mark-as untested
    if some parts could not be tested for some reason
  • Use
    --mark-as standby
    for any other reason
  • Stay on
    [task:wip]
    and keep working
bash
undefined
除非所有验收标准都已满足,否则不要标记任务为完成。
标记为完成的条件:
  • 所有需求都已实现
  • 所有验收标准都已通过
  • 测试通过(如适用)
  • 无已知遗留问题
永远不要标记为完成的情况:
  • 「差不多就行」或「大部分能用」
  • 测试失败
  • 部分实现
  • 使用临时方案代替正式修复
  • 计划「后续再补」
如果未完成:
  • 需要反馈时使用
    --mark-as review
  • 等待外部依赖时使用
    --mark-as blocked
  • 部分内容无法测试时使用
    --mark-as untested
  • 其他原因使用
    --mark-as standby
  • 保持
    [task:wip]
    状态继续工作
bash
undefined

FIRST: Verify the work

第一步:验证工作成果

make check # or: cargo build, pnpm tsc, uv run pytest
make check # 或:cargo build, pnpm tsc, uv run pytest

ONLY if all checks pass:

只有所有检查都通过后执行:

jj-todo-next --mark-as done <next-id>
undefined
jj-todo-next --mark-as done <next-id>
undefined

Check Dependencies Before Starting (Workers)

启动前检查依赖(执行者适用)

If working with parallel branches or complex DAGs, when starting on a new TODO:
bash
undefined
如果处理并行分支或复杂DAG,启动新TODO前执行:
bash
undefined

Check what a task depends on (its immediate ancestors)

查看任务依赖的前置节点(直接父节点)

jj log -r 'ancestors(<rev-id>,2)' # 2 for parents, 3 for parents + grandparents, etc.
jj log -r 'ancestors(<rev-id>,2)' # 2代表父节点,3代表父节点+祖父节点,以此类推

Check what depends on a task (its immediate descendants)

查看依赖当前任务的后续节点(直接子节点)

jj log -r 'descendants(<rev-id>,2)' # 2 for children, 3 for children + grandchildren, etc.

If any dependency (ancestor) has a `[task:*]` flag which is still `draft`, `todo`, `wip` or `blocked`: STOP AND WARN THE USER. Wait for their approval before continuing.

**Note:** `jj-todo-next` checks dependencies automatically to indicate which children tasks aren't ready, but it's just here to smooth things out, not to abstract from `jj`. Inspect the graph yourself with `jj log` whenever needed.
jj log -r 'descendants(<rev-id>,2)' # 2代表子节点,3代表子节点+孙节点,以此类推

如果任何依赖(前置节点)的`[task:*]`标记仍为`draft`、`todo`、`wip`或`blocked`:停止操作并警告用户,等待其批准后再继续。

**注意:** `jj-todo-next`会自动检查依赖,提示哪些子任务还未就绪,但它只是简化操作的工具,不是JJ的抽象层。需要时可以直接用`jj log`自行查看关系图。

Helper Scripts (Planners & Workers)

辅助脚本(规划者&执行者通用)

Helper scripts in
scripts/
. Invoke with full path to avoid PATH setup.
ScriptPurpose
jj-todo-create [--draft] <PARENT> <TITLE> [DESC]
Create TODO (stays on @). Use --draft for placeholder tasks
jj-parallel-todos [--draft] <PARENT> <T1> <T2>...
Create parallel TODOs. Use --draft for placeholder tasks
jj-todo-next [--mark-as STATUS] [REV]
Review specs, check dependencies, mark & optionally move
jj-flag-update <REV> <TO_FLAG>
Update status flag (auto-detects current)
jj-find-flagged [FLAG]
Find flagged revisions
Additional useful scripts from the
working-with-jj
skill:
ScriptPurpose
jj-show-desc [REV]
Print description of a revision
辅助脚本存放在
scripts/
目录下,使用完整路径调用,避免配置PATH。
脚本用途
jj-todo-create [--draft] <PARENT> <TITLE> [DESC]
创建TODO(保持在@位置),使用--draft创建占位任务
jj-parallel-todos [--draft] <PARENT> <T1> <T2>...
创建并行TODO,使用--draft创建占位任务
jj-todo-next [--mark-as STATUS] [REV]
评审规格、检查依赖、标记状态,可选切换到下一个任务
jj-flag-update <REV> <TO_FLAG>
更新状态标记(自动识别当前标记)
jj-find-flagged [FLAG]
查找带标记的修订版本
来自
working-with-jj
技能的其他有用脚本:
脚本用途
jj-show-desc [REV]
打印修订版本的描述

References

参考资料

Advanced topics and detailed guides:
  • references/parallel-agents.md
    - Using JJ workspaces for parallel agent execution (Planners)
高级主题和详细指南:
  • references/parallel-agents.md
    - 使用JJ工作区实现Agent并行执行(规划者适用)