trekoon 0.4.6 → 0.4.7
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.
|
@@ -139,6 +139,25 @@ compact specs: `\?`, `\.`, `\{`, `\(`, `\[` etc. fail before records are
|
|
|
139
139
|
created. Prefer prose over exact regex in descriptions. Rephrase operators
|
|
140
140
|
like `!=` as words to avoid escaping confusion.
|
|
141
141
|
|
|
142
|
+
Bare `|` inside field values is a field separator and will silently corrupt
|
|
143
|
+
records when the spec omits an explicit `|<status>` field. A single shell
|
|
144
|
+
pipe (`cmd a | cmd b`) in a Verify line on a 3-field task spec or 4-field
|
|
145
|
+
subtask spec (epic create/expand) splits into one extra field, and the parser
|
|
146
|
+
treats that trailing fragment as the status — but does not validate it.
|
|
147
|
+
Creation succeeds and the record only breaks on the next status transition.
|
|
148
|
+
Concrete failure: `--task "task-x|API|Verify: bun test foo | tail -20"`
|
|
149
|
+
splits to `[task-x, API, "Verify: bun test foo ", " tail -20"]`; ` tail -20`
|
|
150
|
+
becomes the status, and the bad status only surfaces on the next update.
|
|
151
|
+
|
|
152
|
+
Escape literal `|` as `\|` or rephrase to avoid the character. `||` fallbacks
|
|
153
|
+
(`cmd a || cmd b`) and other multi-pipe constructs are caught loudly by the
|
|
154
|
+
parser: every unescaped `|` adds a field, so multi-pipe input overshoots the
|
|
155
|
+
field-count gate and fails before any record is written. The empty-field gate
|
|
156
|
+
fires on a different shape — a single bare middle pipe like
|
|
157
|
+
`key|title||desc`. Either way, the silent failure mode is specifically the
|
|
158
|
+
single-pipe / no-explicit-status case. Specs that already pass `|<status>`
|
|
159
|
+
fail loudly even on a single unescaped `|`.
|
|
160
|
+
|
|
142
161
|
Spec shape (status optional, defaults to `todo`):
|
|
143
162
|
|
|
144
163
|
- `--task <temp-key>|<title>|<description>` or `<temp-key>|<title>|<description>|<status>`
|
|
@@ -150,8 +169,13 @@ non-`todo` status.
|
|
|
150
169
|
|
|
151
170
|
One-shot rules:
|
|
152
171
|
|
|
153
|
-
- Declare tasks/subtasks with plain temp keys, e.g. `task-api`, `sub-tests`.
|
|
154
|
-
-
|
|
172
|
+
- Declare tasks/subtasks with plain temp keys, e.g. `task-api`, `sub-api-tests`.
|
|
173
|
+
- Temp keys form a flat namespace per command. Every `--task` and `--subtask`
|
|
174
|
+
key must be unique across the whole `epic create` / `epic expand` call, not
|
|
175
|
+
per parent task. Prefix subtask keys with the parent task key
|
|
176
|
+
(`sub-api-tests`, `sub-ui-states`) to stay safe across re-runs.
|
|
177
|
+
- Refer to records created in the same command as `@task-api` or
|
|
178
|
+
`@sub-api-tests`.
|
|
155
179
|
- Use `@task-key` as the subtask parent ref and in `--dep` specs.
|
|
156
180
|
- `--dep <source>|<depends-on>` points from blocked item to prerequisite.
|
|
157
181
|
- `epic create` returns `result.mappings` and counts. Use those real UUIDs in
|
package/docs/commands.md
CHANGED
|
@@ -179,6 +179,25 @@ Rules:
|
|
|
179
179
|
- Subtask cascade is accepted for consistency but just updates one subtask
|
|
180
180
|
- Success response includes `data.cascade` with changed/unchanged IDs and counts
|
|
181
181
|
|
|
182
|
+
## Epic create and expand
|
|
183
|
+
|
|
184
|
+
### Temp-key rules
|
|
185
|
+
|
|
186
|
+
Temp keys in `--task` and `--subtask` share one flat namespace per `epic create` / `epic expand` invocation — reusing a key across any two records in the same call fails the batch. Prefix subtask keys with the parent task key to keep them unique (e.g. `task-a-sub-1` under `task-a`).
|
|
187
|
+
|
|
188
|
+
`task create-many` and `subtask create-many` use their own scoped namespaces, independent of each other and of `epic create`.
|
|
189
|
+
|
|
190
|
+
Escape any literal `|` inside field values as `\|`. A single bare `|` in a spec without an explicit `|<status>` field silently pushes the trailing text into the status slot — creation succeeds and the record only breaks on the next status update. Multi-pipe constructs like `||` fail loudly on the field-count check. See the planning skill for the full pipe-escape rules.
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
trekoon epic create \
|
|
194
|
+
--title "Launch" \
|
|
195
|
+
--task "task-a|First task|Description|todo" \
|
|
196
|
+
--task "task-b|Second task|Description|todo" \
|
|
197
|
+
--subtask "@task-a|task-a-sub-1|First subtask|Description|todo" \
|
|
198
|
+
--subtask "@task-b|task-b-sub-1|Second subtask|Description|todo"
|
|
199
|
+
```
|
|
200
|
+
|
|
182
201
|
## Status machine
|
|
183
202
|
|
|
184
203
|
Statuses: `todo`, `in_progress`, `done`, `blocked`. The hyphenated `in-progress`
|
package/docs/quickstart.md
CHANGED
|
@@ -93,11 +93,15 @@ trekoon --toon epic create \
|
|
|
93
93
|
--description "Ship one-shot planning workflows" \
|
|
94
94
|
--task "task-a|First task|First description|todo" \
|
|
95
95
|
--task "task-b|Second task|Second description|todo" \
|
|
96
|
-
--subtask "@task-a|sub-a|First subtask|Subtask description|todo" \
|
|
96
|
+
--subtask "@task-a|sub-a-first|First subtask|Subtask description|todo" \
|
|
97
97
|
--dep "@task-b|@task-a" \
|
|
98
|
-
--dep "@sub-a|@task-a"
|
|
98
|
+
--dep "@sub-a-first|@task-a"
|
|
99
99
|
```
|
|
100
100
|
|
|
101
|
+
All temp keys (task and subtask) must be unique across the whole command — they share one flat namespace. Prefix subtask keys with the parent task key to stay unique.
|
|
102
|
+
|
|
103
|
+
Escape any literal `|` inside field values as `\|`. A bare `|` on a spec without an explicit `|<status>` field silently pushes trailing text into the status slot (e.g. `Verify: bun test foo | tail` lets `tail` become the status, and creation still succeeds). Specs that already pass `|<status>` fail loudly on the same input. See the planning skill for full rules.
|
|
104
|
+
|
|
101
105
|
This is better than sequential creates because later records can reference
|
|
102
106
|
earlier ones with `@temp-key`, and you get one atomic operation with mappings
|
|
103
107
|
and counts in the response.
|
package/package.json
CHANGED
package/src/commands/epic.ts
CHANGED
|
@@ -776,7 +776,7 @@ export async function runEpic(context: CliContext): Promise<CliResult> {
|
|
|
776
776
|
|
|
777
777
|
const duplicateTempKey = findDuplicateExpandTempKey(parsedTasks.specs, parsedSubtasks.specs);
|
|
778
778
|
if (duplicateTempKey !== null) {
|
|
779
|
-
return failBatchSpec("epic.create", `Duplicate temp key '${duplicateTempKey}' across --task and --subtask specs.`, {
|
|
779
|
+
return failBatchSpec("epic.create", `Duplicate temp key '${duplicateTempKey}' across --task and --subtask specs. Temp keys share one flat namespace per epic create — prefix subtask temp keys with the parent task key (e.g. sub-<task-key>-tests) to disambiguate.`, {
|
|
780
780
|
tempKey: duplicateTempKey,
|
|
781
781
|
});
|
|
782
782
|
}
|
|
@@ -849,7 +849,7 @@ export async function runEpic(context: CliContext): Promise<CliResult> {
|
|
|
849
849
|
|
|
850
850
|
const duplicateTempKey = findDuplicateExpandTempKey(parsedTasks.specs, parsedSubtasks.specs);
|
|
851
851
|
if (duplicateTempKey !== null) {
|
|
852
|
-
return failBatchSpec("epic.expand", `Duplicate temp key '${duplicateTempKey}' across --task and --subtask specs.`, {
|
|
852
|
+
return failBatchSpec("epic.expand", `Duplicate temp key '${duplicateTempKey}' across --task and --subtask specs. Temp keys share one flat namespace per epic expand — prefix subtask temp keys with the parent task key (e.g. sub-<task-key>-tests) to disambiguate.`, {
|
|
853
853
|
tempKey: duplicateTempKey,
|
|
854
854
|
});
|
|
855
855
|
}
|
package/src/commands/help.ts
CHANGED
|
@@ -126,7 +126,9 @@ const EPIC_HELP = [
|
|
|
126
126
|
" --task <temp-key>|<title>|<description>|<status> (explicit status)",
|
|
127
127
|
` --subtask <parent-ref>|<temp-key>|<title>|<description> (status defaults to todo) (${"@"}<temp-key> for new parents)`,
|
|
128
128
|
` --subtask <parent-ref>|<temp-key>|<title>|<description>|<status> (explicit status)`,
|
|
129
|
+
" Temp keys in --task and --subtask share one namespace per command. Prefix subtask keys with parent task key.",
|
|
129
130
|
` --dep <source-ref>|<depends-on-ref> (refs can be IDs or ${"@"}<temp-key>)`,
|
|
131
|
+
" Escape literal | inside field values (\\|); bare | is a field separator and will silently corrupt records.",
|
|
130
132
|
" Escapes in compact specs: \\| for |, \\\\ for \\, \\n, \\r, \\t",
|
|
131
133
|
"",
|
|
132
134
|
"List:",
|