trekoon 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/skills/trekoon/SKILL.md +126 -14
- package/.agents/skills/trekoon/reference/execution-with-team.md +213 -0
- package/.agents/skills/trekoon/reference/execution.md +210 -0
- package/.agents/skills/trekoon/reference/planning.md +244 -0
- package/README.md +20 -9
- package/docs/ai-agents.md +59 -26
- package/package.json +2 -2
- package/src/board/assets/app.js +5 -0
- package/src/board/assets/components/EpicsOverview.js +13 -0
- package/src/board/assets/components/Workspace.js +27 -12
- package/src/board/assets/components/helpers.js +3 -2
- package/src/board/assets/runtime/delegation.js +69 -1
- package/src/board/assets/state/actions.js +27 -1
- package/src/board/assets/state/store.js +37 -8
- package/src/board/assets/state/utils.js +42 -0
- package/src/board/assets/styles/board.css +68 -0
- package/src/commands/skills.ts +39 -32
|
@@ -10,24 +10,71 @@ Trekoon is a local-first issue tracker for epics, tasks, and subtasks.
|
|
|
10
10
|
This skill is the agent operating guide, not the full CLI reference. Use it to
|
|
11
11
|
pick the right command with the fewest reads and mutations.
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## Skill arguments
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
When invoked with arguments (e.g., `/trekoon <id> [user text]`), resolve the
|
|
16
|
+
argument as a Trekoon entity ID and choose the action based on user intent:
|
|
16
17
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
18
|
+
### 1. Resolve the entity
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
trekoon --toon epic show <id> 2>/dev/null || \
|
|
22
|
+
trekoon --toon task show <id> 2>/dev/null || \
|
|
23
|
+
trekoon --toon subtask show <id> 2>/dev/null
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
If none match, tell the user the ID was not found.
|
|
27
|
+
|
|
28
|
+
### 2. Choose the action
|
|
29
|
+
|
|
30
|
+
Interpret the user's accompanying text (or lack thereof) to decide what to do:
|
|
31
|
+
|
|
32
|
+
| User intent signal | Action |
|
|
33
|
+
|---|---|
|
|
34
|
+
| No text, just an ID | Orient: run `session --epic <epic-id>` (or show the task/subtask) and summarize status, readiness, and next steps |
|
|
35
|
+
| "analyze", "review", "check", "status", "progress" | **Analyze:** run `epic progress <id>` or `task show <id> --all`, then `suggest --epic <id>`, and report findings |
|
|
36
|
+
| "execute", "implement", "do", "complete", "start", "run" | **Execute:** read `reference/execution.md`, scope session to the entity's epic, and begin the execution loop |
|
|
37
|
+
| "plan", "break down", "design", "architect" | **Plan:** read `reference/planning.md` and create or expand the epic graph |
|
|
38
|
+
|
|
39
|
+
### Examples
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
/trekoon abc-123
|
|
43
|
+
→ shows epic/task/subtask abc-123, summarizes status and next candidate
|
|
44
|
+
|
|
45
|
+
/trekoon abc-123 analyze this epic
|
|
46
|
+
→ runs epic progress, suggest, reports readiness and blockers
|
|
47
|
+
|
|
48
|
+
/trekoon abc-123 execute
|
|
49
|
+
→ reads execution reference, starts session --epic, begins work loop
|
|
50
|
+
|
|
51
|
+
/trekoon abc-123 plan the implementation
|
|
52
|
+
→ reads planning reference, decomposes into tasks/subtasks/deps
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
When the entity is a **task or subtask**, resolve its parent epic ID from the
|
|
56
|
+
entity record and scope session/suggest/progress calls to that epic.
|
|
57
|
+
|
|
58
|
+
## Reference guides
|
|
59
|
+
|
|
60
|
+
This skill ships with bundled reference guides for planning and execution. Read
|
|
61
|
+
them when the task calls for it — they extend this command reference with
|
|
62
|
+
methodology and orchestration patterns.
|
|
63
|
+
|
|
64
|
+
| When | Read | What it covers |
|
|
65
|
+
|---|---|---|
|
|
66
|
+
| User asks to plan, design, or architect a feature | `reference/planning.md` | Decomposition into epic/task/subtask DAGs, writing standard, file scopes, owner assignment, dependency modeling, validation |
|
|
67
|
+
| User asks to execute, implement, or complete an epic | `reference/execution.md` | Execution graph building, lane grouping, sub-agent dispatch, task done orchestration, verification, cleanup |
|
|
68
|
+
| User asks to execute task with Agent Team (or just team) AND Agent Teams are available (`CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=true`) | `reference/execution-with-team.md` | TeamCreate/SendMessage pattern, teammate spawning, team coordination, shutdown |
|
|
24
69
|
|
|
25
70
|
**Typical flow:**
|
|
26
|
-
1. `
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
71
|
+
1. Read `reference/planning.md` and create the epic with tasks, subtasks, deps,
|
|
72
|
+
owners.
|
|
73
|
+
2. Read `reference/execution.md` (or `reference/execution-with-team.md` for Agent
|
|
74
|
+
Teams), run `session --epic`, build lane groups, dispatch agents, use
|
|
75
|
+
`task done` responses to orchestrate waves.
|
|
76
|
+
3. This file (SKILL.md) provides the command reference and status machine rules
|
|
77
|
+
that both planning and execution rely on.
|
|
31
78
|
|
|
32
79
|
## Non-negotiable defaults
|
|
33
80
|
|
|
@@ -64,6 +111,35 @@ non-done status.
|
|
|
64
111
|
Recommended statuses for consistent workflows: `todo`, `in_progress`, `done`.
|
|
65
112
|
Use `blocked` with an appended reason when work is stuck.
|
|
66
113
|
|
|
114
|
+
## Epic lifecycle
|
|
115
|
+
|
|
116
|
+
The orchestrator is responsible for managing the epic's status throughout
|
|
117
|
+
execution. Epics follow the same status machine as tasks — they must transition
|
|
118
|
+
through `in_progress` to reach `done`.
|
|
119
|
+
|
|
120
|
+
### Start: mark epic `in_progress`
|
|
121
|
+
|
|
122
|
+
Immediately after session bootstrap and before dispatching any work, transition
|
|
123
|
+
the epic:
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
trekoon --toon epic update <epic-id> --status in_progress
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
This ensures the epic reflects actual state even if execution is interrupted.
|
|
130
|
+
|
|
131
|
+
### Finish: mark epic `done`
|
|
132
|
+
|
|
133
|
+
After all tasks are verified done (see cleanup in execution references), mark
|
|
134
|
+
the epic complete:
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
trekoon --toon epic update <epic-id> --status done
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Since the epic is already `in_progress` from the start step, this is a single
|
|
141
|
+
valid transition.
|
|
142
|
+
|
|
67
143
|
## Default agent loop
|
|
68
144
|
|
|
69
145
|
The primary loop is: **session → claim → work → task done → repeat**.
|
|
@@ -466,3 +542,39 @@ Cross-branch sync matters before merging a feature branch back:
|
|
|
466
542
|
Trekoon stores local state in `.trekoon/trekoon.db`. In git repos and
|
|
467
543
|
worktrees, storage resolves from the shared repository root rather than each
|
|
468
544
|
worktree independently.
|
|
545
|
+
|
|
546
|
+
## Tool selection
|
|
547
|
+
|
|
548
|
+
Check your available tool list to determine which harness you are running in.
|
|
549
|
+
|
|
550
|
+
### Core tools (both harnesses)
|
|
551
|
+
|
|
552
|
+
| Purpose | Claude Code | OpenCode |
|
|
553
|
+
|---------|------------|----------|
|
|
554
|
+
| File search | `Glob` | `glob` |
|
|
555
|
+
| Content search | `Grep` | `grep` |
|
|
556
|
+
| Read files | `Read` | `read` |
|
|
557
|
+
| Edit files | `Edit` | `edit` |
|
|
558
|
+
| Write files | `Write` | `write` |
|
|
559
|
+
| Shell commands | `Bash` | `bash` |
|
|
560
|
+
| Ask user | `AskUserQuestion` | `question` |
|
|
561
|
+
| Web fetch | `WebFetch` | `webfetch` |
|
|
562
|
+
| Web search | `WebSearch` | `websearch` |
|
|
563
|
+
| Directory listing | `Bash(ls)` | `list` |
|
|
564
|
+
|
|
565
|
+
### LSP tools (OpenCode only — use if available)
|
|
566
|
+
|
|
567
|
+
- `lsp goToDefinition`/`lsp findReferences`: navigate symbols safely.
|
|
568
|
+
- `lsp hover`: inspect type signatures.
|
|
569
|
+
- `lsp documentSymbol`/`lsp workspaceSymbol`: search symbols.
|
|
570
|
+
- `lsp goToImplementation`: find interface implementations.
|
|
571
|
+
|
|
572
|
+
**Fallbacks:** use `Grep`/`grep` for symbols, `Bash`/`bash` for compiler
|
|
573
|
+
diagnostics.
|
|
574
|
+
|
|
575
|
+
### General guidance
|
|
576
|
+
|
|
577
|
+
- Do not overuse bash for searching/reading; prefer dedicated tools.
|
|
578
|
+
- Use LSP over grep for symbol navigation when available.
|
|
579
|
+
- Run Trekoon, git, build/lint/test, and verification commands via `Bash`/`bash`.
|
|
580
|
+
- Use `--compact` on Trekoon commands in sub-agent prompts to reduce token usage.
|
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
# Execution with Agent Teams Reference
|
|
2
|
+
|
|
3
|
+
**You are a team lead orchestrator.** Execute work from Trekoon using Agent
|
|
4
|
+
Teams — real parallel Claude Code instances coordinated via TeamCreate,
|
|
5
|
+
TaskCreate, SendMessage, and shared task lists. Each teammate runs in its own
|
|
6
|
+
tmux pane.
|
|
7
|
+
|
|
8
|
+
**Prerequisite:** Agent Teams requires the Claude Code environment variable
|
|
9
|
+
`CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS` set to `"true"`. This feature is Claude
|
|
10
|
+
Code only — it is not available in OpenCode or other harnesses.
|
|
11
|
+
|
|
12
|
+
- [Claude Agent Teams documentation](https://code.claude.com/docs/en/agent-teams.md)
|
|
13
|
+
|
|
14
|
+
**Clarify ambiguity upfront.** If the plan has unclear requirements or meaningful
|
|
15
|
+
tradeoffs, ask the user before starting.
|
|
16
|
+
|
|
17
|
+
## Build the execution graph
|
|
18
|
+
|
|
19
|
+
Same as the standard execution reference — use `task ready`, `dep reverse`, and
|
|
20
|
+
lane grouping to construct a runnable graph. See `reference/execution.md` for
|
|
21
|
+
the full scheduler loop and lane grouping rules.
|
|
22
|
+
|
|
23
|
+
## Mark epic in-progress
|
|
24
|
+
|
|
25
|
+
Before dispatching any work, transition the epic so it reflects actual state:
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
trekoon --toon epic update <epic-id> --status in_progress
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
This must happen once, immediately after building the execution graph. If
|
|
32
|
+
execution is interrupted, the epic is at least `in_progress` rather than `todo`.
|
|
33
|
+
|
|
34
|
+
## Create the team
|
|
35
|
+
|
|
36
|
+
Use **TeamCreate** to set up the team, then **TaskCreate** to populate the
|
|
37
|
+
shared task list, then **Agent** with `team_name` to spawn teammates.
|
|
38
|
+
|
|
39
|
+
### Step 1: Create the team
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
TeamCreate:
|
|
43
|
+
team_name: "<epic-slug>"
|
|
44
|
+
description: "Executing epic <epic-id>: <title>"
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Step 2: Create tasks in the shared task list
|
|
48
|
+
|
|
49
|
+
For each task group from the execution graph, create a task:
|
|
50
|
+
|
|
51
|
+
```
|
|
52
|
+
TaskCreate:
|
|
53
|
+
subject: "<lane description>: <task-ids/titles>"
|
|
54
|
+
description: |
|
|
55
|
+
Execute these Trekoon tasks IN ORDER unless task description says
|
|
56
|
+
parallel subtasks:
|
|
57
|
+
- Task <id>: <title>
|
|
58
|
+
- Task <id>: <title>
|
|
59
|
+
|
|
60
|
+
Before starting each task:
|
|
61
|
+
- claim and assign owner:
|
|
62
|
+
trekoon --toon task update <id> --status in_progress --owner <lane-name>
|
|
63
|
+
- append a short start note:
|
|
64
|
+
trekoon --toon task update <id> --append "Starting implementation"
|
|
65
|
+
|
|
66
|
+
While executing:
|
|
67
|
+
- complete required subtasks, update subtask statuses
|
|
68
|
+
- append meaningful progress notes (do not rewrite task description)
|
|
69
|
+
- respect the status machine: todo -> in_progress -> done (never skip)
|
|
70
|
+
- use --compact to reduce output noise:
|
|
71
|
+
trekoon --toon --compact task show <id>
|
|
72
|
+
|
|
73
|
+
On completion:
|
|
74
|
+
- append final verification evidence
|
|
75
|
+
- mark done: trekoon --toon task done <id>
|
|
76
|
+
(task done auto-transitions from todo/blocked through in_progress)
|
|
77
|
+
- read the response: it includes unblocked downstream tasks and open
|
|
78
|
+
subtask warnings — report these back via SendMessage
|
|
79
|
+
|
|
80
|
+
If blocked:
|
|
81
|
+
- append blocker reason, dependency id, and exact failing command/output
|
|
82
|
+
- set status: trekoon --toon task update <id> --status blocked
|
|
83
|
+
- notify team lead via SendMessage with blocker details
|
|
84
|
+
|
|
85
|
+
Commit after each edit tool usage.
|
|
86
|
+
Report: files changed, test results
|
|
87
|
+
|
|
88
|
+
**Commit format**:
|
|
89
|
+
<imperative verb> <what changed> <- Line 1: max 50 chars
|
|
90
|
+
<blank line> <- Line 2: blank
|
|
91
|
+
<why/context, one point per line> <- Body: max 72 chars per line
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Use `blockedBy` via TaskUpdate to set dependencies between tasks that require
|
|
95
|
+
sequential execution.
|
|
96
|
+
|
|
97
|
+
### Step 3: Spawn teammates
|
|
98
|
+
|
|
99
|
+
For each parallel lane, spawn a teammate using the Agent tool:
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
Agent:
|
|
103
|
+
name: "developer-1"
|
|
104
|
+
team_name: "<epic-slug>"
|
|
105
|
+
subagent_type: "general-purpose"
|
|
106
|
+
description: "<lane>: <task titles>"
|
|
107
|
+
prompt: |
|
|
108
|
+
You are a developer on team "<epic-slug>".
|
|
109
|
+
Check TaskList for your assigned tasks and work through them.
|
|
110
|
+
Use TaskUpdate to claim tasks (set owner to your name) and mark
|
|
111
|
+
them completed.
|
|
112
|
+
|
|
113
|
+
Status machine rules:
|
|
114
|
+
- todo -> in_progress -> done (valid)
|
|
115
|
+
- todo -> done (INVALID — use task done which auto-transitions)
|
|
116
|
+
- in_progress -> blocked (valid, with reason)
|
|
117
|
+
- blocked -> in_progress (valid, to resume)
|
|
118
|
+
|
|
119
|
+
When you complete a Trekoon task with `task done`, read the response:
|
|
120
|
+
- unblocked: tasks that became ready — report via SendMessage
|
|
121
|
+
- warning: open subtasks — report via SendMessage
|
|
122
|
+
- next: next ready candidate
|
|
123
|
+
|
|
124
|
+
Communicate with teammates via SendMessage if you need coordination.
|
|
125
|
+
After completing a task, check TaskList for the next available task.
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
**Teammate count:** 3-5 teammates for most epics. Don't over-parallelize.
|
|
129
|
+
|
|
130
|
+
**Agent types:**
|
|
131
|
+
- Use `general-purpose` for implementation work (has edit/write/bash access)
|
|
132
|
+
- Use `Explore` or `Plan` only for read-only research or planning tasks
|
|
133
|
+
|
|
134
|
+
## Coordinate as team lead
|
|
135
|
+
|
|
136
|
+
Your job as team lead:
|
|
137
|
+
|
|
138
|
+
1. **Monitor progress** — teammates send messages when they complete tasks or
|
|
139
|
+
hit blockers.
|
|
140
|
+
2. **Use task done responses** — when a teammate reports `unblocked` tasks from
|
|
141
|
+
a `task done` response, create new team tasks via TaskCreate for the
|
|
142
|
+
unblocked work and assign to idle teammates.
|
|
143
|
+
3. **Unblock work** — when a teammate reports a blocker, help resolve it or
|
|
144
|
+
reassign.
|
|
145
|
+
4. **Assign ownership** — use TaskUpdate with `owner` to assign tasks to idle
|
|
146
|
+
teammates. Also set Trekoon owner:
|
|
147
|
+
```bash
|
|
148
|
+
trekoon --toon task update <task-id> --owner <teammate-name>
|
|
149
|
+
```
|
|
150
|
+
5. **Send messages** — use SendMessage to direct teammates, never plain text
|
|
151
|
+
output.
|
|
152
|
+
6. **Check progress** — periodically run `epic progress` to gauge completion:
|
|
153
|
+
```bash
|
|
154
|
+
trekoon --toon epic progress <epic-id>
|
|
155
|
+
```
|
|
156
|
+
7. **Get suggestions when stuck** — when all teammates are blocked:
|
|
157
|
+
```bash
|
|
158
|
+
trekoon --toon suggest --epic <epic-id>
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
## Auto-recovery
|
|
162
|
+
|
|
163
|
+
1. If status update fails with `status_transition_invalid`, check current status
|
|
164
|
+
and use the valid intermediate transition.
|
|
165
|
+
2. If status update fails with `dependency_blocked`, refresh with
|
|
166
|
+
`task ready`/`task next` and continue with a ready candidate.
|
|
167
|
+
3. Teammate attempts to fix failures (has context).
|
|
168
|
+
4. If can't fix, teammate reports failure with error output via SendMessage.
|
|
169
|
+
5. Dispatch fix instructions via SendMessage to the teammate.
|
|
170
|
+
6. Same error twice -> stop and ask user.
|
|
171
|
+
|
|
172
|
+
## Verify and close
|
|
173
|
+
|
|
174
|
+
Same verification steps as the standard execution reference: code review,
|
|
175
|
+
automated tests, manual verification, DX quality, record evidence, final
|
|
176
|
+
progress check. See `reference/execution.md` for details.
|
|
177
|
+
|
|
178
|
+
## Shutdown and cleanup
|
|
179
|
+
|
|
180
|
+
After all work is verified:
|
|
181
|
+
|
|
182
|
+
1. **Check everything is done:**
|
|
183
|
+
```bash
|
|
184
|
+
trekoon --toon epic progress <epic-id>
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
2. **Confirm nothing remains:**
|
|
188
|
+
```bash
|
|
189
|
+
trekoon --toon suggest --epic <epic-id>
|
|
190
|
+
```
|
|
191
|
+
Should return no actionable suggestions.
|
|
192
|
+
|
|
193
|
+
3. **Mark epic done** (already `in_progress` from the start step):
|
|
194
|
+
```bash
|
|
195
|
+
trekoon --toon epic update <epic-id> --status done
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
4. **Shutdown teammates** — send `shutdown_request` via SendMessage to each.
|
|
199
|
+
5. **Delete the team** — use TeamDelete to clean up team and task directories.
|
|
200
|
+
6. Merge branch to main (if using branches).
|
|
201
|
+
7. Remove worktree (if using worktrees).
|
|
202
|
+
8. Return final execution summary: completed tasks, remaining blockers,
|
|
203
|
+
dependency state.
|
|
204
|
+
|
|
205
|
+
## Team orchestration tools
|
|
206
|
+
|
|
207
|
+
| Purpose | Tool |
|
|
208
|
+
|---------|------|
|
|
209
|
+
| Create the team | `TeamCreate` |
|
|
210
|
+
| Manage shared task list | `TaskCreate` / `TaskList` / `TaskUpdate` / `TaskGet` |
|
|
211
|
+
| Spawn teammates | `Agent` (with `team_name`) |
|
|
212
|
+
| Communicate | `SendMessage` |
|
|
213
|
+
| Clean up | `TeamDelete` |
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
# Execution Reference
|
|
2
|
+
|
|
3
|
+
**You are an orchestrator.** Execute work from Trekoon, not markdown plan files.
|
|
4
|
+
Spawn and coordinate sub-agents based on the task dependency graph and subsystem
|
|
5
|
+
grouping so independent lanes run in parallel and dependent lanes run
|
|
6
|
+
sequentially.
|
|
7
|
+
|
|
8
|
+
**Clarify ambiguity upfront.** If the plan has unclear requirements or meaningful
|
|
9
|
+
tradeoffs, ask the user before starting.
|
|
10
|
+
|
|
11
|
+
## Build the execution graph
|
|
12
|
+
|
|
13
|
+
Construct a runnable graph from Trekoon entities using the deterministic
|
|
14
|
+
scheduler loop:
|
|
15
|
+
|
|
16
|
+
1. **Get the ready set for batching decisions:**
|
|
17
|
+
```bash
|
|
18
|
+
trekoon --toon task ready --epic <epic-id> --limit 50
|
|
19
|
+
```
|
|
20
|
+
2. **Use reverse lookup when deciding what completed work unblocks:**
|
|
21
|
+
```bash
|
|
22
|
+
trekoon --toon dep reverse <task-or-subtask-id>
|
|
23
|
+
```
|
|
24
|
+
3. **Load full context only when execution details are needed:**
|
|
25
|
+
```bash
|
|
26
|
+
trekoon --toon epic show <epic-id> --all
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Prefer scheduler primitives (`task next`, `task ready`, `dep reverse`) over
|
|
30
|
+
broad scans (`task list --all`, `epic show --all`).
|
|
31
|
+
|
|
32
|
+
## Group tasks into lanes
|
|
33
|
+
|
|
34
|
+
Batch ready tasks by subsystem/domain to minimize repeated context loading:
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
Without: Task 1 (auth/login) -> Agent 1 [explores auth/]
|
|
38
|
+
Task 2 (auth/logout) -> Agent 2 [explores auth/ again]
|
|
39
|
+
|
|
40
|
+
With: Tasks 1-2 (auth/*) -> Agent 1 [explores once, executes both]
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
| Signal | Group together |
|
|
44
|
+
|--------|----------------|
|
|
45
|
+
| Same directory prefix | `src/auth/*` tasks |
|
|
46
|
+
| Same domain/feature | Auth tasks, billing tasks |
|
|
47
|
+
| Same `--owner` value | Tasks assigned to same lane |
|
|
48
|
+
| Same Trekoon intent | Similar task title/description scope |
|
|
49
|
+
|
|
50
|
+
**Limits:** 3-4 tasks max per group. Split if larger.
|
|
51
|
+
|
|
52
|
+
**Parallel:** Groups touch different subsystems.
|
|
53
|
+
**Sequential:** Groups have dependency edges between them.
|
|
54
|
+
|
|
55
|
+
## Mark epic in-progress
|
|
56
|
+
|
|
57
|
+
Before dispatching any work, transition the epic so it reflects actual state:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
trekoon --toon epic update <epic-id> --status in_progress
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
This must happen once, immediately after building the execution graph. If
|
|
64
|
+
execution is interrupted, the epic is at least `in_progress` rather than `todo`.
|
|
65
|
+
|
|
66
|
+
## Dispatch sub-agents
|
|
67
|
+
|
|
68
|
+
For each parallel lane group, spawn a sub-agent with a prompt like:
|
|
69
|
+
|
|
70
|
+
```
|
|
71
|
+
Execute these Trekoon tasks IN ORDER unless task description says parallel
|
|
72
|
+
subtasks:
|
|
73
|
+
- Task <id>: <title>
|
|
74
|
+
- Task <id>: <title>
|
|
75
|
+
|
|
76
|
+
Before starting each task:
|
|
77
|
+
- set status to in_progress and assign owner:
|
|
78
|
+
trekoon --toon task update <id> --status in_progress --owner <lane-name>
|
|
79
|
+
- append a short start note:
|
|
80
|
+
trekoon --toon task update <id> --append "Starting implementation"
|
|
81
|
+
|
|
82
|
+
While executing:
|
|
83
|
+
- complete required subtasks, update subtask statuses
|
|
84
|
+
- append meaningful progress notes (do not rewrite the task description)
|
|
85
|
+
- respect the status machine: todo -> in_progress -> done (never skip)
|
|
86
|
+
|
|
87
|
+
On completion:
|
|
88
|
+
- append final verification evidence
|
|
89
|
+
- mark done: trekoon --toon task done <id>
|
|
90
|
+
(task done auto-transitions from todo/blocked through in_progress)
|
|
91
|
+
- read the response: it includes unblocked downstream tasks and open
|
|
92
|
+
subtask warnings — report these back
|
|
93
|
+
|
|
94
|
+
If blocked:
|
|
95
|
+
- append blocker reason, dependency id, and exact failing command/output
|
|
96
|
+
- set status: trekoon --toon task update <id> --status blocked
|
|
97
|
+
|
|
98
|
+
Use --compact to reduce output noise:
|
|
99
|
+
trekoon --toon --compact task show <id>
|
|
100
|
+
|
|
101
|
+
Commit after each edit. Report: files changed, test results.
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
## Use task done response for orchestration
|
|
105
|
+
|
|
106
|
+
When a sub-agent calls `task done`, the response includes:
|
|
107
|
+
|
|
108
|
+
- **`unblocked`**: array of downstream tasks that became ready. Use this to
|
|
109
|
+
decide what to launch next without re-querying the full readiness graph.
|
|
110
|
+
- **`openSubtaskIds`/`warning`**: if subtasks remain open, decide whether to
|
|
111
|
+
go back or proceed.
|
|
112
|
+
- **`next`**: the next ready candidate with full tree and blockers.
|
|
113
|
+
|
|
114
|
+
**Orchestration flow after each task done:**
|
|
115
|
+
|
|
116
|
+
1. Read `unblocked` from the response.
|
|
117
|
+
2. If unblocked tasks exist, group them by subsystem and dispatch new agents.
|
|
118
|
+
3. If no unblocked tasks, check `next` for the top candidate.
|
|
119
|
+
4. If neither exists, run `suggest --epic <id>` for guidance.
|
|
120
|
+
|
|
121
|
+
## Auto-recovery
|
|
122
|
+
|
|
123
|
+
1. Agent attempts to fix failures (has context).
|
|
124
|
+
2. If can't fix, report failure with error output.
|
|
125
|
+
3. Dispatch fix agent with context.
|
|
126
|
+
4. Same error twice -> stop and ask user.
|
|
127
|
+
|
|
128
|
+
If a status update fails with `status_transition_invalid`, check current status
|
|
129
|
+
and transition through the valid intermediate step.
|
|
130
|
+
|
|
131
|
+
If a status update fails with `dependency_blocked`, refresh with
|
|
132
|
+
`task ready`/`task next` and continue with a ready candidate.
|
|
133
|
+
|
|
134
|
+
## Verify before closing
|
|
135
|
+
|
|
136
|
+
All checks must pass before marking the epic complete:
|
|
137
|
+
|
|
138
|
+
### Code review
|
|
139
|
+
|
|
140
|
+
Run your code-review command/flow. Fix issues before proceeding. Poor DX/UX is
|
|
141
|
+
a bug.
|
|
142
|
+
|
|
143
|
+
### Automated tests
|
|
144
|
+
|
|
145
|
+
Run the full test suite. All tests must pass.
|
|
146
|
+
|
|
147
|
+
### Manual verification
|
|
148
|
+
|
|
149
|
+
Automated tests aren't sufficient. Actually exercise the changes:
|
|
150
|
+
|
|
151
|
+
- **API changes:** Curl endpoints with realistic payloads.
|
|
152
|
+
- **External integrations:** Test against real services.
|
|
153
|
+
- **CLI changes:** Run actual commands, verify output.
|
|
154
|
+
- **Parser changes:** Feed real data, not just fixtures.
|
|
155
|
+
|
|
156
|
+
### DX quality
|
|
157
|
+
|
|
158
|
+
During manual testing, watch for friction: confusing errors, noisy output,
|
|
159
|
+
inconsistent behavior, rough edges. Fix inline or document for follow-up.
|
|
160
|
+
|
|
161
|
+
### Record evidence
|
|
162
|
+
|
|
163
|
+
Append verification results to Trekoon as progress notes:
|
|
164
|
+
|
|
165
|
+
```bash
|
|
166
|
+
trekoon --toon task update <task-id> --append "All 358 tests pass, lint clean"
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
### Final progress check
|
|
170
|
+
|
|
171
|
+
Before closing the epic, confirm completion state:
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
trekoon --toon epic progress <epic-id>
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
Verify: `doneCount` equals `total`, `todoCount`/`blockedCount`/`inProgressCount`
|
|
178
|
+
are all 0.
|
|
179
|
+
|
|
180
|
+
## Cleanup
|
|
181
|
+
|
|
182
|
+
After committing and verifying:
|
|
183
|
+
|
|
184
|
+
1. **Verify all tasks are done:**
|
|
185
|
+
```bash
|
|
186
|
+
trekoon --toon epic progress <epic-id>
|
|
187
|
+
```
|
|
188
|
+
All tasks must be `done` or clearly `blocked` with reason.
|
|
189
|
+
|
|
190
|
+
2. **Mark epic done** (already `in_progress` from the start step):
|
|
191
|
+
```bash
|
|
192
|
+
trekoon --toon epic update <epic-id> --status done
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
3. **Run suggest to confirm nothing remains:**
|
|
196
|
+
```bash
|
|
197
|
+
trekoon --toon suggest --epic <epic-id>
|
|
198
|
+
```
|
|
199
|
+
Should return no actionable suggestions if the epic is cleanly closed.
|
|
200
|
+
|
|
201
|
+
4. **Create a branch** for the work unless trivial. Merge branch to main when
|
|
202
|
+
done.
|
|
203
|
+
|
|
204
|
+
5. **Return final execution summary:** completed tasks, remaining blockers,
|
|
205
|
+
dependency state.
|
|
206
|
+
|
|
207
|
+
## Architectural fit
|
|
208
|
+
|
|
209
|
+
Changes should integrate cleanly with existing patterns. If a change fights the
|
|
210
|
+
architecture, refactor first rather than bolt on. The goal is zero tech debt.
|