trekoon 0.4.2 → 0.4.3
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 +97 -208
- package/.agents/skills/trekoon/reference/execution-with-team.md +87 -149
- package/.agents/skills/trekoon/reference/execution.md +170 -380
- package/.agents/skills/trekoon/reference/harness-primitives.md +77 -0
- package/.agents/skills/trekoon/reference/planning.md +193 -330
- package/.agents/skills/trekoon/reference/sync.md +56 -103
- package/README.md +21 -7
- package/docs/ai-agents.md +48 -4
- package/docs/commands.md +2 -2
- package/docs/quickstart.md +3 -3
- package/package.json +1 -1
- package/src/board/assets/app.js +4 -2
- package/src/board/assets/components/Component.js +6 -8
- package/src/board/assets/state/actions.js +3 -0
- package/src/board/assets/state/api.js +48 -34
- package/src/board/assets/state/store.js +3 -0
- package/src/board/event-bus.ts +9 -0
- package/src/board/routes.ts +94 -83
- package/src/board/server.ts +14 -7
- package/src/board/snapshot.ts +6 -0
- package/src/board/wal-watcher.ts +22 -11
- package/src/commands/help.ts +6 -6
- package/src/commands/skills.ts +17 -5
- package/src/domain/mutation-service.ts +61 -42
- package/src/domain/tracker-domain.ts +20 -16
- package/src/domain/types.ts +3 -0
- package/src/export/render-markdown.ts +1 -2
- package/src/runtime/daemon.ts +110 -49
- package/src/storage/database.ts +9 -2
- package/src/storage/migrations.ts +19 -2
- package/src/sync/service.ts +47 -27
|
@@ -1,104 +1,76 @@
|
|
|
1
|
-
# Execution
|
|
1
|
+
# Execution With Agent Teams Reference
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
Teams
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
You are a team lead orchestrator. Use this file only for Claude Code Agent
|
|
4
|
+
Teams when the user explicitly asks for team execution and
|
|
5
|
+
`CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=true`. This is a runtime-specific path,
|
|
6
|
+
not the default subagent path for Codex, OpenCode, Pi, or other harnesses.
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
input is required to continue.
|
|
8
|
+
Team execution is complete only when the epic is marked `done`, all remaining
|
|
9
|
+
work is blocked with recorded reasons, or real user input is required.
|
|
11
10
|
|
|
12
|
-
|
|
13
|
-
`CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS` set to `"true"`. This feature is Claude
|
|
14
|
-
Code only — it is not available in OpenCode or other harnesses.
|
|
11
|
+
Clarify meaningful ambiguity before starting.
|
|
15
12
|
|
|
16
|
-
|
|
13
|
+
## Start
|
|
17
14
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
## Build the execution graph
|
|
22
|
-
|
|
23
|
-
Same as the standard execution reference — use `task ready`, `dep reverse`, and
|
|
24
|
-
lane grouping to construct a runnable graph. See `reference/execution.md` for
|
|
25
|
-
the full scheduler loop and lane grouping rules.
|
|
26
|
-
|
|
27
|
-
## Mark epic in-progress
|
|
28
|
-
|
|
29
|
-
Before dispatching any work, transition the epic so it reflects actual state:
|
|
15
|
+
Build the graph with the standard execution reference: `task ready`,
|
|
16
|
+
`dep reverse`, lane grouping, and first-wave validation. Then mark the epic in
|
|
17
|
+
progress:
|
|
30
18
|
|
|
31
19
|
```bash
|
|
32
20
|
trekoon --toon epic update <epic-id> --status in_progress
|
|
33
21
|
```
|
|
34
22
|
|
|
35
|
-
|
|
36
|
-
execution is interrupted, the epic is at least `in_progress` rather than `todo`.
|
|
23
|
+
## Create Team And Tasks
|
|
37
24
|
|
|
38
|
-
|
|
25
|
+
1. Create the team:
|
|
39
26
|
|
|
40
|
-
|
|
41
|
-
shared task list, then **Agent** with `team_name` to spawn teammates.
|
|
42
|
-
|
|
43
|
-
### Step 1: Create the team
|
|
44
|
-
|
|
45
|
-
```
|
|
27
|
+
```text
|
|
46
28
|
TeamCreate:
|
|
47
29
|
team_name: "<epic-slug>"
|
|
48
30
|
description: "Executing epic <epic-id>: <title>"
|
|
49
31
|
```
|
|
50
32
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
For each task group from the execution graph, create a task:
|
|
33
|
+
2. Create one shared team task per lane:
|
|
54
34
|
|
|
55
|
-
```
|
|
35
|
+
```text
|
|
56
36
|
TaskCreate:
|
|
57
|
-
subject: "<lane
|
|
37
|
+
subject: "<lane>: <task-ids/titles>"
|
|
58
38
|
description: |
|
|
59
|
-
Execute these Trekoon tasks IN ORDER unless task
|
|
39
|
+
Execute these Trekoon tasks IN ORDER unless task descriptions allow
|
|
60
40
|
parallel subtasks:
|
|
61
41
|
- Task <id>: <title>
|
|
62
|
-
- Task <id>: <title>
|
|
63
42
|
|
|
64
|
-
Before
|
|
65
|
-
- claim
|
|
66
|
-
|
|
67
|
-
- append a short start note:
|
|
68
|
-
trekoon --toon task update <id> --append "Starting implementation"
|
|
43
|
+
Before each task:
|
|
44
|
+
- trekoon --toon task claim <id> --owner <lane-name>
|
|
45
|
+
- trekoon --toon task update <id> --append "Starting implementation"
|
|
69
46
|
|
|
70
|
-
While
|
|
71
|
-
-
|
|
72
|
-
-
|
|
73
|
-
-
|
|
74
|
-
-
|
|
75
|
-
trekoon --toon --compact task show <id>
|
|
47
|
+
While working:
|
|
48
|
+
- Complete required subtasks.
|
|
49
|
+
- Append progress notes; do not rewrite task descriptions.
|
|
50
|
+
- Use task done for completion.
|
|
51
|
+
- Use --compact for noisy Trekoon reads.
|
|
76
52
|
|
|
77
53
|
On completion:
|
|
78
|
-
-
|
|
79
|
-
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
54
|
+
- Append verification evidence.
|
|
55
|
+
- trekoon --toon task done <id>
|
|
56
|
+
- Report unblocked tasks, open subtask warnings, and next candidate via
|
|
57
|
+
SendMessage.
|
|
58
|
+
- Report review result or review gap for non-trivial code changes.
|
|
83
59
|
|
|
84
60
|
If blocked:
|
|
85
|
-
-
|
|
86
|
-
-
|
|
87
|
-
-
|
|
61
|
+
- Append blocker reason, dependency id, and exact failing command/output.
|
|
62
|
+
- trekoon --toon task update <id> --append "Blocked by <reason>" --status blocked
|
|
63
|
+
- Notify team lead via SendMessage.
|
|
88
64
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
Report: files changed, verification results, blockers
|
|
65
|
+
Do not create branches, commits, pushes, or PRs unless the user explicitly
|
|
66
|
+
asked and harness policy allows it.
|
|
92
67
|
```
|
|
93
68
|
|
|
94
|
-
Use `blockedBy` via TaskUpdate
|
|
95
|
-
sequential execution.
|
|
69
|
+
Use `blockedBy` via TaskUpdate for team tasks that must run sequentially.
|
|
96
70
|
|
|
97
|
-
|
|
71
|
+
3. Spawn one teammate per parallel lane:
|
|
98
72
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
```
|
|
73
|
+
```text
|
|
102
74
|
Agent:
|
|
103
75
|
name: "developer-1"
|
|
104
76
|
team_name: "<epic-slug>"
|
|
@@ -106,118 +78,84 @@ Agent:
|
|
|
106
78
|
description: "<lane>: <task titles>"
|
|
107
79
|
prompt: |
|
|
108
80
|
You are a developer on team "<epic-slug>".
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
them completed.
|
|
112
|
-
|
|
113
|
-
Before starting each Trekoon task, claim it in Trekoon:
|
|
81
|
+
Work through your TaskList assignment.
|
|
82
|
+
Claim each Trekoon task before editing:
|
|
114
83
|
trekoon --toon task claim <trekoon-task-id> --owner <your-name>
|
|
115
84
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
- todo -> done (INVALID — use task done which auto-transitions)
|
|
119
|
-
- in_progress -> blocked (valid, with reason)
|
|
120
|
-
- blocked -> in_progress (valid, to resume)
|
|
121
|
-
|
|
122
|
-
When you complete a Trekoon task with `task done`, read the response:
|
|
123
|
-
- unblocked: tasks that became ready — report via SendMessage
|
|
124
|
-
- warning: open subtasks — report via SendMessage
|
|
125
|
-
- next: next ready candidate
|
|
85
|
+
Use task done for completion. Read and report unblocked tasks, warnings,
|
|
86
|
+
and next candidate via SendMessage.
|
|
126
87
|
|
|
127
|
-
Communicate
|
|
128
|
-
After completing a task, check TaskList for the next available task.
|
|
88
|
+
Communicate blockers and coordination needs via SendMessage.
|
|
129
89
|
```
|
|
130
90
|
|
|
131
|
-
|
|
91
|
+
Use 3-5 teammates for most epics. Do not over-parallelize. Use
|
|
92
|
+
`general-purpose` for implementation and `Explore`/`Plan` only for read-only
|
|
93
|
+
research or planning.
|
|
132
94
|
|
|
133
|
-
|
|
134
|
-
- Use `general-purpose` for implementation work (has edit/write/bash access)
|
|
135
|
-
- Use `Explore` or `Plan` only for read-only research or planning tasks
|
|
136
|
-
|
|
137
|
-
## Coordinate as team lead
|
|
95
|
+
## Coordinate
|
|
138
96
|
|
|
139
97
|
Your job as team lead:
|
|
140
98
|
|
|
141
|
-
1.
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
3. **Unblock work** — when a teammate reports a blocker, help resolve it or
|
|
147
|
-
reassign.
|
|
148
|
-
4. **Assign ownership** — use TaskUpdate with `owner` to assign tasks to idle
|
|
149
|
-
teammates. Also set Trekoon owner:
|
|
99
|
+
1. Monitor SendMessage updates.
|
|
100
|
+
2. When a teammate reports `unblocked` tasks from `task done`, create new team
|
|
101
|
+
tasks and assign idle teammates.
|
|
102
|
+
3. Help resolve or reassign blockers.
|
|
103
|
+
4. Keep Trekoon owners current:
|
|
150
104
|
```bash
|
|
151
105
|
trekoon --toon task update <task-id> --owner <teammate-name>
|
|
152
106
|
```
|
|
153
|
-
5.
|
|
154
|
-
|
|
155
|
-
6. **Check progress** — periodically run `epic progress` to gauge completion:
|
|
107
|
+
5. Use SendMessage to direct teammates.
|
|
108
|
+
6. Check progress:
|
|
156
109
|
```bash
|
|
157
110
|
trekoon --toon epic progress <epic-id>
|
|
158
111
|
```
|
|
159
|
-
7.
|
|
112
|
+
7. When all teammates are blocked, run:
|
|
160
113
|
```bash
|
|
161
114
|
trekoon --toon suggest --epic <epic-id>
|
|
162
115
|
```
|
|
163
116
|
|
|
164
|
-
##
|
|
165
|
-
|
|
166
|
-
Teammate attempts to fix failures. If can't fix, teammate reports failure with
|
|
167
|
-
error output via SendMessage; dispatch fix instructions in response.
|
|
117
|
+
## Recovery
|
|
168
118
|
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
3. Identify the valid intermediate transition (see `reference/status-machine.md`).
|
|
173
|
-
4. Apply the correct intermediate step, then retry the intended transition.
|
|
174
|
-
5. Only move on to the next task after the target task reaches the intended status or is explicitly marked `blocked`.
|
|
175
|
-
6. Report resolution via SendMessage.
|
|
119
|
+
Use the standard execution recovery rules. Teammates should try to fix failures
|
|
120
|
+
with their local context. If they cannot, they must report exact command/output
|
|
121
|
+
via SendMessage so you can give fix instructions or reassign.
|
|
176
122
|
|
|
177
|
-
|
|
178
|
-
1. Run `trekoon --toon --compact task show <id>` to identify which dependency is unmet.
|
|
179
|
-
2. Append a blocker note: `trekoon --toon task update <id> --append "Blocked: dependency_blocked; depends on <dep-id>"`.
|
|
180
|
-
3. Run `trekoon --toon task ready --epic <epic-id>` to get a ready candidate.
|
|
181
|
-
4. Only then continue with the ready candidate — do not retry the blocked task.
|
|
182
|
-
5. Notify team lead via SendMessage with blocker details.
|
|
123
|
+
For `status_transition_invalid`, inspect current status with:
|
|
183
124
|
|
|
184
|
-
|
|
125
|
+
```bash
|
|
126
|
+
trekoon --toon --compact task show <id>
|
|
127
|
+
```
|
|
185
128
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
progress check. See `reference/execution.md` for details.
|
|
129
|
+
For `dependency_blocked`, inspect the dependency, append a blocker note, then
|
|
130
|
+
continue with a ready candidate from:
|
|
189
131
|
|
|
190
|
-
|
|
132
|
+
```bash
|
|
133
|
+
trekoon --toon task ready --epic <epic-id>
|
|
134
|
+
```
|
|
191
135
|
|
|
192
|
-
|
|
136
|
+
## Verify And Close
|
|
193
137
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
trekoon --toon epic progress <epic-id>
|
|
197
|
-
```
|
|
138
|
+
Use the standard execution verification rules: review, automated tests, manual
|
|
139
|
+
checks, DX quality, and Trekoon evidence notes.
|
|
198
140
|
|
|
199
|
-
|
|
200
|
-
```bash
|
|
201
|
-
trekoon --toon suggest --epic <epic-id>
|
|
202
|
-
```
|
|
203
|
-
Should return no actionable suggestions.
|
|
141
|
+
After all work is verified:
|
|
204
142
|
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
143
|
+
```bash
|
|
144
|
+
trekoon --toon epic progress <epic-id>
|
|
145
|
+
trekoon --toon suggest --epic <epic-id>
|
|
146
|
+
trekoon --toon epic update <epic-id> --status done
|
|
147
|
+
```
|
|
209
148
|
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
dependency state.
|
|
149
|
+
Then send `shutdown_request` to each teammate, delete the team with TeamDelete,
|
|
150
|
+
and return completed tasks, files changed, verification, review, remaining
|
|
151
|
+
blockers, and dependency state.
|
|
214
152
|
|
|
215
|
-
## Team
|
|
153
|
+
## Team Tools
|
|
216
154
|
|
|
217
155
|
| Purpose | Tool |
|
|
218
|
-
|
|
219
|
-
| Create
|
|
220
|
-
| Manage shared
|
|
221
|
-
| Spawn teammates | `Agent`
|
|
156
|
+
|---|---|
|
|
157
|
+
| Create team | `TeamCreate` |
|
|
158
|
+
| Manage shared tasks | `TaskCreate` / `TaskList` / `TaskUpdate` / `TaskGet` |
|
|
159
|
+
| Spawn teammates | `Agent` with `team_name` |
|
|
222
160
|
| Communicate | `SendMessage` |
|
|
223
161
|
| Clean up | `TeamDelete` |
|