trekoon 0.4.1 → 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 -765
- package/.agents/skills/trekoon/reference/execution-with-team.md +91 -141
- package/.agents/skills/trekoon/reference/execution.md +188 -159
- package/.agents/skills/trekoon/reference/harness-primitives.md +77 -0
- package/.agents/skills/trekoon/reference/planning.md +213 -213
- package/.agents/skills/trekoon/reference/status-machine.md +21 -0
- package/.agents/skills/trekoon/reference/sync.md +82 -0
- package/README.md +29 -8
- package/docs/ai-agents.md +65 -6
- package/docs/commands.md +149 -5
- package/docs/machine-contracts.md +123 -0
- package/docs/quickstart.md +55 -3
- package/package.json +1 -1
- package/src/board/assets/app.js +47 -13
- package/src/board/assets/components/Component.js +20 -8
- package/src/board/assets/components/Workspace.js +9 -3
- package/src/board/assets/components/helpers.js +4 -0
- package/src/board/assets/runtime/delegation.js +8 -0
- package/src/board/assets/runtime/focus-trap.js +48 -0
- package/src/board/assets/state/actions.js +45 -4
- package/src/board/assets/state/api.js +304 -17
- package/src/board/assets/state/store.js +82 -11
- package/src/board/assets/state/url.js +10 -0
- package/src/board/assets/state/utils.js +2 -1
- package/src/board/event-bus.ts +81 -0
- package/src/board/routes.ts +430 -40
- package/src/board/server.ts +86 -10
- package/src/board/snapshot.ts +6 -0
- package/src/board/wal-watcher.ts +313 -0
- package/src/commands/board.ts +52 -17
- package/src/commands/epic.ts +7 -9
- package/src/commands/error-utils.ts +54 -1
- package/src/commands/help.ts +75 -10
- package/src/commands/migrate.ts +153 -24
- package/src/commands/quickstart.ts +7 -0
- package/src/commands/skills.ts +17 -5
- package/src/commands/subtask.ts +71 -10
- package/src/commands/suggest.ts +6 -13
- package/src/commands/task.ts +137 -88
- package/src/domain/batch-validation.ts +329 -0
- package/src/domain/cascade-planner.ts +412 -0
- package/src/domain/dependency-rules.ts +15 -0
- package/src/domain/mutation-service.ts +842 -187
- package/src/domain/search.ts +113 -0
- package/src/domain/tracker-domain.ts +167 -693
- package/src/domain/types.ts +56 -2
- package/src/export/render-markdown.ts +1 -2
- package/src/index.ts +37 -0
- package/src/runtime/cli-shell.ts +44 -0
- package/src/runtime/daemon.ts +700 -0
- package/src/storage/backup.ts +166 -0
- package/src/storage/database.ts +268 -4
- package/src/storage/migrations.ts +441 -22
- package/src/storage/path.ts +8 -0
- package/src/storage/schema.ts +5 -1
- package/src/sync/event-writes.ts +38 -11
- package/src/sync/git-context.ts +226 -8
- package/src/sync/service.ts +679 -156
|
@@ -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,106 +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
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
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
|
-
```
|
|
81
|
+
Work through your TaskList assignment.
|
|
82
|
+
Claim each Trekoon task before editing:
|
|
83
|
+
trekoon --toon task claim <trekoon-task-id> --owner <your-name>
|
|
84
|
+
|
|
85
|
+
Use task done for completion. Read and report unblocked tasks, warnings,
|
|
86
|
+
and next candidate via SendMessage.
|
|
127
87
|
|
|
128
|
-
|
|
88
|
+
Communicate blockers and coordination needs via SendMessage.
|
|
89
|
+
```
|
|
129
90
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
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.
|
|
133
94
|
|
|
134
|
-
## Coordinate
|
|
95
|
+
## Coordinate
|
|
135
96
|
|
|
136
97
|
Your job as team lead:
|
|
137
98
|
|
|
138
|
-
1.
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
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:
|
|
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:
|
|
147
104
|
```bash
|
|
148
105
|
trekoon --toon task update <task-id> --owner <teammate-name>
|
|
149
106
|
```
|
|
150
|
-
5.
|
|
151
|
-
|
|
152
|
-
6. **Check progress** — periodically run `epic progress` to gauge completion:
|
|
107
|
+
5. Use SendMessage to direct teammates.
|
|
108
|
+
6. Check progress:
|
|
153
109
|
```bash
|
|
154
110
|
trekoon --toon epic progress <epic-id>
|
|
155
111
|
```
|
|
156
|
-
7.
|
|
112
|
+
7. When all teammates are blocked, run:
|
|
157
113
|
```bash
|
|
158
114
|
trekoon --toon suggest --epic <epic-id>
|
|
159
115
|
```
|
|
160
116
|
|
|
161
|
-
##
|
|
117
|
+
## Recovery
|
|
118
|
+
|
|
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.
|
|
162
122
|
|
|
163
|
-
|
|
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.
|
|
123
|
+
For `status_transition_invalid`, inspect current status with:
|
|
171
124
|
|
|
172
|
-
|
|
125
|
+
```bash
|
|
126
|
+
trekoon --toon --compact task show <id>
|
|
127
|
+
```
|
|
173
128
|
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
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:
|
|
177
131
|
|
|
178
|
-
|
|
132
|
+
```bash
|
|
133
|
+
trekoon --toon task ready --epic <epic-id>
|
|
134
|
+
```
|
|
179
135
|
|
|
180
|
-
|
|
136
|
+
## Verify And Close
|
|
181
137
|
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
trekoon --toon epic progress <epic-id>
|
|
185
|
-
```
|
|
138
|
+
Use the standard execution verification rules: review, automated tests, manual
|
|
139
|
+
checks, DX quality, and Trekoon evidence notes.
|
|
186
140
|
|
|
187
|
-
|
|
188
|
-
```bash
|
|
189
|
-
trekoon --toon suggest --epic <epic-id>
|
|
190
|
-
```
|
|
191
|
-
Should return no actionable suggestions.
|
|
141
|
+
After all work is verified:
|
|
192
142
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
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
|
+
```
|
|
197
148
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
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.
|
|
202
152
|
|
|
203
|
-
## Team
|
|
153
|
+
## Team Tools
|
|
204
154
|
|
|
205
155
|
| Purpose | Tool |
|
|
206
|
-
|
|
207
|
-
| Create
|
|
208
|
-
| Manage shared
|
|
209
|
-
| Spawn teammates | `Agent`
|
|
156
|
+
|---|---|
|
|
157
|
+
| Create team | `TeamCreate` |
|
|
158
|
+
| Manage shared tasks | `TaskCreate` / `TaskList` / `TaskUpdate` / `TaskGet` |
|
|
159
|
+
| Spawn teammates | `Agent` with `team_name` |
|
|
210
160
|
| Communicate | `SendMessage` |
|
|
211
161
|
| Clean up | `TeamDelete` |
|