trekoon 0.4.2 → 0.4.4
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 +29 -10
- package/docs/ai-agents.md +48 -4
- package/docs/commands.md +34 -25
- package/docs/machine-contracts.md +1 -1
- package/docs/quickstart.md +9 -9
- package/package.json +2 -2
- package/src/board/asset-root.ts +73 -0
- package/src/board/assets/app.js +5 -3
- 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 +15 -0
- package/src/board/routes.ts +94 -83
- package/src/board/server.ts +35 -8
- package/src/board/snapshot.ts +6 -0
- package/src/board/types.ts +2 -34
- package/src/board/wal-watcher.ts +170 -28
- package/src/commands/board.ts +20 -42
- package/src/commands/help.ts +11 -12
- package/src/commands/init.ts +0 -29
- package/src/commands/quickstart.ts +1 -1
- 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/runtime/version.ts +10 -2
- package/src/storage/database.ts +9 -2
- package/src/storage/migrations.ts +19 -2
- package/src/storage/path.ts +0 -36
- package/src/sync/service.ts +47 -27
- package/src/board/install.ts +0 -196
|
@@ -5,60 +5,43 @@ description: "Use for Trekoon-based planning and execution: creating epics, task
|
|
|
5
5
|
|
|
6
6
|
# Trekoon Skill
|
|
7
7
|
|
|
8
|
-
Trekoon is
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
Trekoon is the source of truth for tracked implementation work: plans,
|
|
9
|
+
readiness, owners, blockers, progress, verification evidence, and completion.
|
|
10
|
+
Use this file as the router. Load references only when the current mode needs
|
|
11
|
+
them.
|
|
11
12
|
|
|
12
|
-
|
|
13
|
-
into the right mode quickly, keep momentum, and finish work rather than
|
|
14
|
-
stalling in analysis.
|
|
13
|
+
## Mode Contracts
|
|
15
14
|
|
|
16
|
-
|
|
15
|
+
- `trekoon plan <goal>`: create an execution-ready epic in Trekoon.
|
|
16
|
+
- `trekoon <id>`: orient on the epic/task/subtask and report current state,
|
|
17
|
+
blockers, and next action.
|
|
18
|
+
- `trekoon <id> execute`: own the epic until it is done, hard-blocked, or needs
|
|
19
|
+
user input. Use subagents by default for meaningful work that can run
|
|
20
|
+
independently when the harness exposes them.
|
|
21
|
+
- `trekoon <id> team execute`: same completion contract, using Claude Agent
|
|
22
|
+
Teams only when the user explicitly asks and the environment supports it.
|
|
17
23
|
|
|
18
|
-
|
|
24
|
+
Do not stop at analysis when Trekoon shows ready work. Do not invent a parallel
|
|
25
|
+
plan outside Trekoon.
|
|
19
26
|
|
|
20
|
-
|
|
21
|
-
- `trekoon <epic-id>` → **orient** on the current state and report the next
|
|
22
|
-
concrete action.
|
|
23
|
-
- `trekoon <epic-id> execute` → **own the epic until it is done, hard-blocked,
|
|
24
|
-
or requires user input**.
|
|
25
|
-
- `trekoon <epic-id> team execute` → same execution contract, but use Agent
|
|
26
|
-
Teams only when the environment supports it and the user explicitly wants it.
|
|
27
|
+
## Load Rules
|
|
27
28
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
- break a feature into epics, tasks, subtasks, or dependencies
|
|
37
|
-
- create backlog or sprint-ready work items
|
|
38
|
-
- check epic/task status, progress, readiness, or blockers
|
|
39
|
-
- execute a Trekoon epic end to end with sub-agents
|
|
40
|
-
- coordinate parallel implementation lanes from tracked work
|
|
41
|
-
|
|
42
|
-
Do **not** use this skill for generic coding work that is not meant to be
|
|
43
|
-
tracked in Trekoon.
|
|
44
|
-
|
|
45
|
-
## Command router
|
|
46
|
-
|
|
47
|
-
When invoked with arguments, determine the mode first, then load only the
|
|
48
|
-
reference needed for that mode.
|
|
49
|
-
|
|
50
|
-
### 1. Route by first argument
|
|
29
|
+
| Situation | Load |
|
|
30
|
+
|---|---|
|
|
31
|
+
| Any Trekoon request | This file |
|
|
32
|
+
| Plan, break down, design tracked work | `reference/harness-primitives.md`, then `reference/planning.md` |
|
|
33
|
+
| Execute, implement, complete tracked work | `reference/harness-primitives.md`, then `reference/execution.md` |
|
|
34
|
+
| User explicitly asks for Claude team execution | `reference/harness-primitives.md`, then `reference/execution-with-team.md` |
|
|
35
|
+
| Sync gaps, conflicts, shared-storage questions | `reference/sync.md` |
|
|
36
|
+
| Status transition error or status uncertainty | `reference/status-machine.md` |
|
|
51
37
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
| `trekoon <epic-id>` | Orient | None beyond this file unless needed | User knows current state, next ready action, and blockers |
|
|
56
|
-
| `trekoon <epic-id> execute` | Execute | `reference/execution.md` | Epic is done, all remaining work is blocked, or user input is required |
|
|
57
|
-
| `trekoon <epic-id> team execute` | Team execute | `reference/execution-with-team.md` | Same as execute, using Agent Teams |
|
|
38
|
+
`reference/harness-primitives.md` is required before planning or execution
|
|
39
|
+
because those modes may need local task displays, user questions, subagents,
|
|
40
|
+
review agents, testing tools, and Trekoon evidence recording.
|
|
58
41
|
|
|
59
|
-
|
|
42
|
+
## Route Input
|
|
60
43
|
|
|
61
|
-
|
|
44
|
+
Resolve the first non-mode argument as an epic, task, or subtask:
|
|
62
45
|
|
|
63
46
|
```bash
|
|
64
47
|
trekoon --toon epic show <id> 2>/dev/null || \
|
|
@@ -66,173 +49,79 @@ trekoon --toon task show <id> 2>/dev/null || \
|
|
|
66
49
|
trekoon --toon subtask show <id> 2>/dev/null
|
|
67
50
|
```
|
|
68
51
|
|
|
69
|
-
If
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
If the user asked to execute a task or subtask, make forward progress on that
|
|
74
|
-
requested entity first; continue broader epic execution only if that matches the
|
|
75
|
-
user's intent.
|
|
76
|
-
|
|
77
|
-
### 3. Interpret missing or extra text
|
|
52
|
+
If the ID is a task or subtask, resolve its parent epic and scope `session`,
|
|
53
|
+
`suggest`, and `epic progress` to that epic. If the user asked to execute a task
|
|
54
|
+
or subtask, start with that item; continue broader epic execution only when it
|
|
55
|
+
matches the user intent.
|
|
78
56
|
|
|
79
|
-
| User
|
|
57
|
+
| User signal | Mode |
|
|
80
58
|
|---|---|
|
|
81
|
-
|
|
|
82
|
-
| `
|
|
83
|
-
| `
|
|
84
|
-
| `
|
|
85
|
-
| `
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
trekoon
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
## Clarification tool rule
|
|
144
|
-
|
|
145
|
-
When planning or execution needs user input, use the harness's user-question
|
|
146
|
-
tool rather than burying the question inside narration:
|
|
147
|
-
|
|
148
|
-
- OpenCode: `question`
|
|
149
|
-
- Claude Code: `AskUserQuestion`
|
|
150
|
-
|
|
151
|
-
Ask narrow, decision-shaping questions. Prefer one clear question with concrete
|
|
152
|
-
options over a broad list of speculative unknowns.
|
|
153
|
-
|
|
154
|
-
## Non-negotiable defaults
|
|
155
|
-
|
|
156
|
-
- Always include `--toon` on every Trekoon command.
|
|
157
|
-
- Prefer the smallest sufficient scope.
|
|
158
|
-
- Prefer transactional bulk commands over many single-item commands.
|
|
159
|
-
- Prefer `--append` for progress notes, completion notes, and blocker notes.
|
|
160
|
-
- Preview replace before `--apply`.
|
|
161
|
-
- Prefer `--ids` over `--all` for bulk updates.
|
|
162
|
-
- Treat Trekoon state updates as part of the workflow, not as after-the-fact
|
|
163
|
-
bookkeeping.
|
|
164
|
-
- Never edit `.trekoon/trekoon.db` directly.
|
|
165
|
-
- Treat `.trekoon` as shared repo-scoped operational state in git worktrees.
|
|
166
|
-
- Keep `.trekoon` gitignored; do not commit the SQLite DB as a recovery fix.
|
|
167
|
-
- Never run `trekoon wipe --yes --toon` unless the user explicitly asks for it.
|
|
168
|
-
- Create branches, commits, merges, or PRs only when the user explicitly asks
|
|
169
|
-
and the current harness policy allows it.
|
|
170
|
-
|
|
171
|
-
## Status machine
|
|
172
|
-
|
|
173
|
-
See `reference/status-machine.md` for the canonical transition table and
|
|
174
|
-
`task done` auto-transition exception.
|
|
175
|
-
|
|
176
|
-
## Epic lifecycle
|
|
177
|
-
|
|
178
|
-
Epics follow the same status machine as tasks — they must transition through
|
|
179
|
-
`in_progress` to reach `done`.
|
|
180
|
-
|
|
181
|
-
```bash
|
|
182
|
-
# Start: mark epic in_progress before dispatching any work
|
|
183
|
-
trekoon --toon epic update <epic-id> --status in_progress
|
|
184
|
-
|
|
185
|
-
# Finish: mark epic done after all tasks are verified done
|
|
186
|
-
trekoon --toon epic update <epic-id> --status done
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
## Execution mode selection
|
|
190
|
-
|
|
191
|
-
Choose the lightest mode that will still move the work forward.
|
|
192
|
-
|
|
193
|
-
| Situation | Mode | First move |
|
|
194
|
-
|---|---|---|
|
|
195
|
-
| One ready task, narrow scope, or user asked to continue personally | Single-agent execution | `session --epic <epic-id>` |
|
|
196
|
-
| Multiple ready tasks across separable subsystems or owners | Orchestrated execution | Read `reference/execution.md`, then `task ready --epic <epic-id> --limit 50` |
|
|
197
|
-
| User explicitly asked for team execution and Agent Teams are available | Team execution | Read `reference/execution-with-team.md` |
|
|
198
|
-
|
|
199
|
-
Single-agent loop shape: **session → claim → work → task done → repeat**.
|
|
200
|
-
Read `reference/execution.md` for the full loop, including subtask discipline,
|
|
201
|
-
update/recovery policy, and the canonical command sequences.
|
|
202
|
-
|
|
203
|
-
## Delegation policy
|
|
204
|
-
|
|
205
|
-
Prefer one sub-agent per execution lane, not one sub-agent per tiny task.
|
|
206
|
-
|
|
207
|
-
- Spawn sub-agents when 2+ ready tasks are independent, touch different
|
|
208
|
-
subsystems, or can be grouped into bounded lanes.
|
|
209
|
-
- Keep each lane small enough to verify and report clearly.
|
|
210
|
-
- Avoid delegation when the scope is tiny, the tasks are tightly coupled, or the
|
|
211
|
-
overhead exceeds the gain.
|
|
212
|
-
- When tasks share the same directory roots, owners, or subsystem context, group
|
|
213
|
-
them into one lane.
|
|
214
|
-
|
|
215
|
-
## Setup and fallback
|
|
216
|
-
|
|
217
|
-
If Trekoon is unavailable or storage diagnostics require repair:
|
|
59
|
+
| ID only | Orient: `session --epic <epic-id>` or show the item |
|
|
60
|
+
| `status`, `progress`, `analyze`, `review`, `check` | Analyze: `epic progress`, targeted show, then `suggest --epic` |
|
|
61
|
+
| `plan`, `break down`, `design`, `architect` | Plan |
|
|
62
|
+
| `execute`, `implement`, `do`, `complete`, `start`, `run` | Execute |
|
|
63
|
+
| `team execute`, `execute with team` | Team execute |
|
|
64
|
+
|
|
65
|
+
## Completion Rules
|
|
66
|
+
|
|
67
|
+
- Plan mode is complete only when the epic exists, tasks/subtasks/dependencies
|
|
68
|
+
exist in Trekoon, the graph is validated, and the user gets the epic ID plus
|
|
69
|
+
first execution wave.
|
|
70
|
+
- Orient mode is complete when the user knows current state, blockers, ready
|
|
71
|
+
work, and the likely next command.
|
|
72
|
+
- Execute mode is complete only when the epic is marked `done`, all remaining
|
|
73
|
+
work is blocked with recorded reasons, or real user input is required.
|
|
74
|
+
|
|
75
|
+
## Execution Defaults
|
|
76
|
+
|
|
77
|
+
- Start with `trekoon --toon session`; scope with `--epic <id>` when known.
|
|
78
|
+
- If ready work exists, keep moving. After each `task done`, inspect
|
|
79
|
+
`unblocked`, `warning`/`openSubtaskIds`, and `next`.
|
|
80
|
+
- When executing an epic, use subagents by default for any meaningful work that
|
|
81
|
+
can run independently. Keep small or tightly coupled tasks in the parent
|
|
82
|
+
agent.
|
|
83
|
+
- Use your context for orchestration, dependency decisions, user communication,
|
|
84
|
+
and final synthesis. Your job is to finish the epic, not personally perform
|
|
85
|
+
every implementation step.
|
|
86
|
+
- If a higher-priority harness rule blocks subagents without explicit user
|
|
87
|
+
wording, ask immediately and explain that Trekoon execution preserves the
|
|
88
|
+
parent context for orchestration.
|
|
89
|
+
- For non-trivial implementation, run relevant tests and a separate review pass
|
|
90
|
+
when a review agent/skill is available. Record checks and review results in
|
|
91
|
+
Trekoon before closing work.
|
|
92
|
+
|
|
93
|
+
## Non-Negotiables
|
|
94
|
+
|
|
95
|
+
- Use `--toon` on every Trekoon command.
|
|
96
|
+
- Treat Trekoon updates as workflow state, not after-the-fact bookkeeping.
|
|
97
|
+
- Prefer smallest sufficient reads: `session`, `suggest`, `task ready`,
|
|
98
|
+
`task next`, `dep list`, `dep reverse`, targeted `show`.
|
|
99
|
+
- Prefer transactional/bulk commands for planning and narrow `--ids` for bulk
|
|
100
|
+
updates.
|
|
101
|
+
- Append progress, verification, and blocker notes with `--append`; do not
|
|
102
|
+
rewrite descriptions unless fixing the plan itself.
|
|
103
|
+
- Preview search/replace before `--apply`.
|
|
104
|
+
- Never edit `.trekoon/trekoon.db` directly. Keep `.trekoon` gitignored.
|
|
105
|
+
- Never run `trekoon wipe --yes --toon` unless the user explicitly asks.
|
|
106
|
+
- Create branches, commits, merges, pushes, or PRs only when the user explicitly
|
|
107
|
+
asks and the harness policy allows it.
|
|
108
|
+
- Use `--compact` in subagent prompts and noisy reads.
|
|
109
|
+
|
|
110
|
+
## Status Reminder
|
|
111
|
+
|
|
112
|
+
Normal status flow is `todo -> in_progress -> done`; `blocked` requires an
|
|
113
|
+
appended reason. Use `task done` for task completion because it auto-transitions
|
|
114
|
+
from `todo` or `blocked` through `in_progress`. Load
|
|
115
|
+
`reference/status-machine.md` for transition errors or uncertainty.
|
|
116
|
+
|
|
117
|
+
## Recovery
|
|
118
|
+
|
|
119
|
+
If Trekoon diagnostics show `recoveryRequired`, stop task selection and run:
|
|
218
120
|
|
|
219
121
|
```bash
|
|
220
122
|
trekoon --toon init
|
|
221
123
|
trekoon --toon sync status
|
|
222
|
-
trekoon --toon quickstart
|
|
223
|
-
trekoon --toon help sync
|
|
224
124
|
```
|
|
225
125
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
## Tool capability guidance
|
|
230
|
-
|
|
231
|
-
- Use your harness's structured file search and file read tools for code
|
|
232
|
-
inspection whenever possible.
|
|
233
|
-
- Use symbol-aware tools when available; fall back to content search otherwise.
|
|
234
|
-
- Run Trekoon commands, build/lint/test flows, and explicit git operations via
|
|
235
|
-
your shell tool.
|
|
236
|
-
- Use `--compact` on Trekoon commands in sub-agent prompts to reduce token usage.
|
|
237
|
-
|
|
238
|
-
## User manual input:
|
|
126
|
+
If sync is behind or conflicts exist, resolve that before claiming work. Load
|
|
127
|
+
`reference/sync.md` for conflict handling.
|