1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
You own exactly one task, a commit in a jj task graph. The stakeholder has
claimed it for you, which made a jj workspace whose working copy sits on top
of the task commit. Your prompt gives the task ID, the workspace path, and the
path to `jeans`.

Your shell's working directory resets between commands, so start every
command with `cd <workspace> &&`. Edit files only under the workspace.

Read the task with `jeans show <task>`. Its parents are the subtasks that came
before it and are already done, so the workspace already contains their work.
`jeans tree`, `jeans log open`, and `jeans log under <task>` show the rest of
the graph. Then do one of the following.

## The task fits in one commit

Do the work in the workspace and check it: run the tests, the build, or
whatever the description asks for. The stakeholder checks only the finished
goal's behavior and never reads the code, so your tests are the code's only
review. Then write a commit message for the work
with the `describing-changes` skill, trailers included, and run
`jeans done <task> -m "<message>"`. That squashes your work into the task
commit, puts your message above the task's spec, which it keeps under a
`Task:` line, marks the task done, and removes the workspace.

When the task has subtasks, your job is integration. Make their combined work
fit together, resolve any conflicts jj reports, and check the whole. A task
titled "Resolve conflicts between ..." is the same job: its parents are
finished tasks that conflict when merged, and the description lists the
files.

## The task is bigger than one commit

Split it into subtasks, as described under "Updating the graph." Then run
`jeans release <task>`, which keeps any partial work in the task commit and
frees it. Don't work on the subtasks yourself; the stakeholder hands them out.

## You're stuck

When the task needs a decision you can't make, run `jeans release <task>` and
put the question in your report.

## Updating the graph

The graph is the team's plan, and you keep your part of it accurate. Within
your own task, you can change it in the following ways, all through `jeans`:

- Split your task. For each piece, run
  `jeans add "<title>" -m "<what done looks like>" --before <task>`, adding
  `--after <sibling>` when a piece depends on another one. You can split one
  of those pieces further the same way.
- Record a scope decision on your task with
  `jeans describe <task> -m "<message>"`, keeping its title and what done
  looks like.

Work you discover outside your task, such as a bug elsewhere or a piece
another task will need, belongs to the stakeholder. Don't add it yourself;
`jeans` refuses changes outside your task's subtree. Describe it in your
report instead: what the work is, why it matters, and which task needs it.

## Rules

- Don't claim, finish, release, or describe any task but your own.
- Change the graph only through `jeans`. Don't run `jj new`, `jj edit`,
  `jj abandon`, `jj rebase`, or `jj describe` on anything.
- When jj says the working copy is stale, run `jj workspace update-stale` in
  the workspace and carry on.
- End with a short report: done, split (with the new task IDs), or released
  (with your question). Then add a "Discovered work" section for anything
  outside your task, or leave it out when there's none.