1 files changed,
+30,
-1
1@@ -249,7 +249,7 @@ bug agent edit abc1234 --parent def5678
2 - `--from-file <path>`: Read message from a file
3 - `--parent <bugID>`: Parent issue short or full ID (optional, issues only; at least one of `--title`, message content, or `--parent` must be provided)
4
5-**Note:** A parent link can only be added when the issue has none; parent links cannot be changed or removed afterwards.
6+**Note:** A parent link can only be added when the issue has none; parent links cannot be changed or removed afterwards. Links that would close a dependency cycle are rejected.
7
8 **Important:** When editing the message, `--message`, `--stdin`, and `--from-file` are **mutually exclusive**. You must choose exactly one method to provide the message content.
9
10@@ -309,6 +309,35 @@ New findings:
11 EOF
12 ```
13
14+### Tracking Epics and Subtasks with Parent Links
15+
16+Use `--parent` to group subtasks under a parent epic or tracking issue. In `bug ls`, children nest under their parent with tree markers (`├─`, `└─`).
17+
18+**Default sort is oldest first:** within a parent, subtasks display top-to-bottom in creation order (oldest first, youngest last). Creation order therefore doubles as priority order when the user plans work with `bug ls`.
19+
20+**Recommended flow — parent first:**
21+1. Create the parent epic first:
22+ ```bash
23+ bug agent new --title "Epic: checkout rewrite" --message "..."
24+ ```
25+2. Create each subtask in the order it should be addressed, highest priority first:
26+ ```bash
27+ bug agent new --title "Step 1: ..." --message "..." --parent <epicID>
28+ bug agent new --title "Step 2: ..." --message "..." --parent <epicID>
29+ ```
30+3. `bug ls` now lists Step 1 above Step 2 under the epic, so the user reads the plan top-down.
31+
32+**Alternative flow — children first:**
33+1. Create the subtasks in the order they should be addressed.
34+2. Create the parent epic afterwards.
35+3. Link each child to the parent:
36+ ```bash
37+ bug agent edit <childID> --parent <epicID>
38+ ```
39+Because display order follows creation order, the first-created subtask still appears first.
40+
41+**Limits:** a parent link can only be added when the issue has none; links cannot be changed or removed afterwards, and links that would close a dependency cycle are rejected.
42+
43 ### bug agent open [bugID]
44
45 Open a closed bug/issue.