tracerkit 1.17.0 → 1.17.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/README.md CHANGED
@@ -98,7 +98,6 @@ Same skills, same workflow. Storage is configured per-project:
98
98
 
99
99
  ```bash
100
100
  tracerkit config storage github # set current project to use GitHub
101
- tracerkit config github.repo org/repo # set target repo
102
101
  ```
103
102
 
104
103
  PRDs and plans become GitHub Issues with `tk:prd` and `tk:plan` labels. On `/tk:check` pass, issues are closed with `completed` reason and any related PRs are linked automatically. Each project can use a different backend; local is the default. See [Configuration](docs/configuration.md) for details.
package/dist/bin.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { a as e, f as t, i as n, l as r, n as i, o as a, p as o, r as s, s as c, t as l, u } from "./uninstall-Ba_zfPOx.js";
2
+ import { a as e, f as t, i as n, l as r, n as i, o as a, p as o, r as s, s as c, t as l, u } from "./uninstall-CNw_7khV.js";
3
3
  import { existsSync as d, readFileSync as f, statSync as p } from "node:fs";
4
4
  import { dirname as m, join as h, resolve as g } from "node:path";
5
5
  import { fileURLToPath as _ } from "node:url";
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import { c as e, i as t, n, o as r, r as i, t as a, u as o } from "./uninstall-Ba_zfPOx.js";
1
+ import { c as e, i as t, n, o as r, r as i, t as a, u as o } from "./uninstall-CNw_7khV.js";
2
2
  export { r as COMMANDS, e as DEPRECATED_SKILLS, o as SKILL_NAMES, i as init, n as migrateStorage, a as uninstall, t as update };
@@ -25,32 +25,29 @@ function _(t) {
25
25
  throw Error("Invalid .tracerkit/config.json — expected valid JSON");
26
26
  }
27
27
  return {
28
- storage: v(i.storage),
29
- paths: y(i.paths),
30
- github: b(i.github)
28
+ storage: ee(i.storage),
29
+ paths: v(i.paths),
30
+ github: y(i.github)
31
31
  };
32
32
  }
33
- function v(e) {
33
+ function ee(e) {
34
34
  return typeof e == "string" && m.includes(e) ? e : f;
35
35
  }
36
- function y(e) {
37
- let t = C(e) ? e : {};
36
+ function v(e) {
37
+ let t = S(e) ? e : {};
38
38
  return {
39
39
  prds: typeof t.prds == "string" ? t.prds : h.prds,
40
40
  plans: typeof t.plans == "string" ? t.plans : h.plans
41
41
  };
42
42
  }
43
- function b(e) {
44
- let t = C(e) ? e : {}, n = C(t.labels) ? t.labels : {};
45
- return {
46
- ...typeof t.repo == "string" ? { repo: t.repo } : {},
47
- labels: {
48
- prd: typeof n.prd == "string" ? n.prd : g.labels.prd,
49
- plan: typeof n.plan == "string" ? n.plan : g.labels.plan
50
- }
51
- };
43
+ function y(e) {
44
+ let t = S(e) ? e : {}, n = S(t.labels) ? t.labels : {};
45
+ return { labels: {
46
+ prd: typeof n.prd == "string" ? n.prd : g.labels.prd,
47
+ plan: typeof n.plan == "string" ? n.plan : g.labels.plan
48
+ } };
52
49
  }
53
- function x(r, i) {
50
+ function b(r, i) {
54
51
  let o = c(r, ".tracerkit", "config.json");
55
52
  t(s(o), { recursive: !0 });
56
53
  let l = {};
@@ -59,31 +56,31 @@ function x(r, i) {
59
56
  } catch {
60
57
  l = {};
61
58
  }
62
- let u = S(l, i);
59
+ let u = x(l, i);
63
60
  a(o, JSON.stringify(u, null, 2) + "\n");
64
61
  }
65
- function S(e, t) {
62
+ function x(e, t) {
66
63
  let n = { ...e };
67
- for (let e of Object.keys(t)) C(n[e]) && C(t[e]) ? n[e] = S(n[e], t[e]) : n[e] = t[e];
64
+ for (let e of Object.keys(t)) S(n[e]) && S(t[e]) ? n[e] = x(n[e], t[e]) : n[e] = t[e];
68
65
  return n;
69
66
  }
70
- function C(e) {
67
+ function S(e) {
71
68
  return typeof e == "object" && !!e && !Array.isArray(e);
72
69
  }
73
- var w = [
70
+ var C = [
74
71
  "tk:brief",
75
72
  "tk:prd",
76
73
  "tk:plan",
77
74
  "tk:check"
78
- ], T = ["tk:verify"], E = {
75
+ ], w = ["tk:verify"], T = {
79
76
  force: "--force",
80
77
  help: "--help",
81
78
  version: "--version"
82
- }, D = [
79
+ }, E = [
83
80
  "brief",
84
81
  "progress",
85
82
  "archive"
86
- ], O = [
83
+ ], D = [
87
84
  {
88
85
  name: "init",
89
86
  args: "[path]",
@@ -109,44 +106,44 @@ var w = [
109
106
  args: "[path]",
110
107
  desc: "Migrate artifacts between local and GitHub storage backends"
111
108
  }
112
- ], k = c(s(u(import.meta.url)), "..", "skills");
113
- function A(e, t = "") {
109
+ ], O = c(s(u(import.meta.url)), "..", "skills");
110
+ function k(e, t = "") {
114
111
  let n = r(e, { withFileTypes: !0 }), i = [];
115
112
  for (let r of n) {
116
113
  let n = t ? `${t}/${r.name}` : r.name;
117
- r.isDirectory() ? i.push(...A(c(e, r.name), n)) : i.push(n);
114
+ r.isDirectory() ? i.push(...k(c(e, r.name), n)) : i.push(n);
118
115
  }
119
116
  return i.sort();
120
117
  }
121
- function j(e) {
118
+ function A(e) {
122
119
  return `.claude/skills/tk:${e}`;
123
120
  }
124
- function M(e) {
121
+ function j(e) {
125
122
  return e.slice(18);
126
123
  }
127
- function N(e, t) {
124
+ function M(e, t) {
128
125
  let n = e;
129
- return t.paths.prds !== h.prds && (n = n.replaceAll(h.prds, t.paths.prds)), t.paths.plans !== h.plans && (n = n.replaceAll(h.plans, t.paths.plans)), t.github?.repo && (n = n.replaceAll("{{github.repo}}", t.github.repo)), t.github?.labels?.prd && (n = n.replaceAll("{{github.labels.prd}}", t.github.labels.prd)), t.github?.labels?.plan && (n = n.replaceAll("{{github.labels.plan}}", t.github.labels.plan)), n;
126
+ return t.paths.prds !== h.prds && (n = n.replaceAll(h.prds, t.paths.prds)), t.paths.plans !== h.plans && (n = n.replaceAll(h.plans, t.paths.plans)), t.github?.labels?.prd && (n = n.replaceAll("{{github.labels.prd}}", t.github.labels.prd)), t.github?.labels?.plan && (n = n.replaceAll("{{github.labels.plan}}", t.github.labels.plan)), n;
130
127
  }
131
- function P(e, r, i) {
132
- let o = i ?? A(k).map(j);
128
+ function N(e, r, i) {
129
+ let o = i ?? k(O).map(A);
133
130
  for (let i of o) {
134
- let o = c(k, M(i)), l = c(e, i);
135
- t(s(l), { recursive: !0 }), a(l, N(n(o, "utf8"), r));
131
+ let o = c(O, j(i)), l = c(e, i);
132
+ t(s(l), { recursive: !0 }), a(l, M(n(o, "utf8"), r));
136
133
  }
137
134
  return { copied: o };
138
135
  }
139
- function F(e) {
136
+ function P(e) {
140
137
  return l("sha256").update(e).digest("hex");
141
138
  }
142
- function I(t, r) {
143
- let i = A(k).map(j), a = [], o = [], s = [];
139
+ function F(t, r) {
140
+ let i = k(O).map(A), a = [], o = [], s = [];
144
141
  for (let l of i) {
145
142
  let i = c(t, l);
146
143
  if (!e(i)) s.push(l);
147
144
  else {
148
- let e = N(n(c(k, M(l)), "utf8"), r);
149
- F(Buffer.from(e)) === F(n(i)) ? a.push(l) : o.push(l);
145
+ let e = M(n(c(O, j(l)), "utf8"), r);
146
+ P(Buffer.from(e)) === P(n(i)) ? a.push(l) : o.push(l);
150
147
  }
151
148
  }
152
149
  return {
@@ -157,10 +154,10 @@ function I(t, r) {
157
154
  }
158
155
  //#endregion
159
156
  //#region src/commands/update.ts
160
- function L(t, n) {
161
- if (!w.some((n) => e(c(t, ".claude", "skills", n)))) throw Error("TracerKit not initialized — run `tracerkit init` first");
162
- let r = _(t), { unchanged: a, modified: o, missing: s } = I(t, r), l = [];
163
- for (let n of T) {
157
+ function I(t, n) {
158
+ if (!C.some((n) => e(c(t, ".claude", "skills", n)))) throw Error("TracerKit not initialized — run `tracerkit init` first");
159
+ let r = _(t), { unchanged: a, modified: o, missing: s } = F(t, r), l = [];
160
+ for (let n of w) {
164
161
  let r = c(t, ".claude", "skills", n);
165
162
  e(r) && (i(r, {
166
163
  recursive: !0,
@@ -173,7 +170,7 @@ function L(t, n) {
173
170
  ...u ? o : []
174
171
  ];
175
172
  if (d.length > 0) {
176
- P(t, r, d);
173
+ N(t, r, d);
177
174
  for (let e of a) l.push(`✓ ${e}`);
178
175
  for (let e of s) l.push(`✓ ${e} (added)`);
179
176
  if (u) for (let e of o) l.push(`✓ ${e} (replaced)`);
@@ -186,14 +183,14 @@ function L(t, n) {
186
183
  }
187
184
  //#endregion
188
185
  //#region src/commands/init.ts
189
- function ee(t) {
190
- if (w.some((n) => e(c(t, ".claude", "skills", n)))) return L(t, { force: !1 });
191
- let { copied: n } = P(t, _(t));
186
+ function te(t) {
187
+ if (C.some((n) => e(c(t, ".claude", "skills", n)))) return I(t, { force: !1 });
188
+ let { copied: n } = N(t, _(t));
192
189
  return n.map((e) => `✓ ${e}`);
193
190
  }
194
191
  //#endregion
195
192
  //#region src/commands/migrate-storage.ts
196
- var te = {
193
+ var L = {
197
194
  created: "tk:created",
198
195
  in_progress: "tk:in-progress",
199
196
  done: "tk:done"
@@ -225,7 +222,7 @@ function B(e) {
225
222
  return t.length === 0 ? "<!-- tk:metadata\n-->" : `<!-- tk:metadata\n${t.map(([e, t]) => `${e}: ${t}`).join("\n")}\n-->`;
226
223
  }
227
224
  function V(e) {
228
- return te[e] ?? "tk:created";
225
+ return L[e] ?? "tk:created";
229
226
  }
230
227
  function H(e) {
231
228
  let t = e.match(/<!--\s*tk:metadata\n([\s\S]*?)-->\n*([\s\S]*)$/);
@@ -288,7 +285,7 @@ function q(e) {
288
285
  let t = e;
289
286
  if (t.code === "ENOENT") return /* @__PURE__ */ Error("gh CLI not found — install it: https://cli.github.com");
290
287
  let n = (t.stderr ?? t.message ?? "").toLowerCase();
291
- return n.includes("not logged in") || n.includes("authentication") ? /* @__PURE__ */ Error("Not authenticated with GitHub. Run: gh auth login") : n.includes("rate limit") || n.includes("403") ? /* @__PURE__ */ Error("GitHub rate limit exceeded. Wait and retry.") : n.includes("not found") || n.includes("404") ? /* @__PURE__ */ Error("Repository not found. Check github.repo in .tracerkit/config.json") : e instanceof Error ? e : Error(String(e));
288
+ return n.includes("not logged in") || n.includes("authentication") ? /* @__PURE__ */ Error("Not authenticated with GitHub. Run: gh auth login") : n.includes("rate limit") || n.includes("403") ? /* @__PURE__ */ Error("GitHub rate limit exceeded. Wait and retry.") : n.includes("not found") || n.includes("404") ? /* @__PURE__ */ Error("Repository not found. Check your git remote configuration.") : e instanceof Error ? e : Error(String(e));
292
289
  }
293
290
  function J(e) {
294
291
  try {
@@ -305,23 +302,11 @@ function J(e) {
305
302
  }
306
303
  }
307
304
  function Y(e, t) {
308
- return e.github.repo ? e.github.repo : t([
309
- "repo",
310
- "view",
311
- "--json",
312
- "nameWithOwner",
313
- "-q",
314
- ".nameWithOwner"
315
- ]);
316
- }
317
- function X(e, t, n) {
318
- let r = n([
305
+ let n = t([
319
306
  "issue",
320
307
  "list",
321
- "--repo",
322
- e,
323
308
  "--label",
324
- t,
309
+ e,
325
310
  "--state",
326
311
  "all",
327
312
  "--json",
@@ -329,9 +314,9 @@ function X(e, t, n) {
329
314
  "--limit",
330
315
  "1000"
331
316
  ]);
332
- return JSON.parse(r || "[]");
317
+ return JSON.parse(n || "[]");
333
318
  }
334
- function Z(e, t) {
319
+ function X(e, t) {
335
320
  return t.some((t) => {
336
321
  if (t.body) {
337
322
  let { metadata: n } = H(t.body);
@@ -340,48 +325,40 @@ function Z(e, t) {
340
325
  return W(t.title) === e;
341
326
  });
342
327
  }
343
- function ne(e, t, n) {
344
- for (let r of t) n([
328
+ function Z(e, t) {
329
+ for (let n of e) t([
345
330
  "label",
346
331
  "create",
347
- r,
348
- "--repo",
349
- e,
332
+ n,
350
333
  "--force"
351
334
  ]);
352
335
  }
353
- function re(e, t, n) {
354
- let r = [
336
+ function ne(e, t) {
337
+ let n = [
355
338
  "issue",
356
339
  "create",
357
- "--repo",
358
- e,
359
340
  "--title",
360
- t.title,
341
+ e.title,
361
342
  "--body",
362
- t.body
343
+ e.body
363
344
  ];
364
- for (let e of t.labels) r.push("--label", e);
365
- let i = n(r).match(/\/(\d+)\s*$/);
366
- return i ? parseInt(i[1], 10) : 0;
345
+ for (let t of e.labels) n.push("--label", t);
346
+ let r = t(n).match(/\/(\d+)\s*$/);
347
+ return r ? parseInt(r[1], 10) : 0;
367
348
  }
368
- function ie(e, t, n) {
369
- n([
349
+ function re(e, t) {
350
+ t([
370
351
  "issue",
371
352
  "close",
372
- String(t),
373
- "--repo",
374
- e
353
+ String(e)
375
354
  ]);
376
355
  }
377
- function ae(e, t, n) {
378
- let r = n([
356
+ function ie(e, t) {
357
+ let n = t([
379
358
  "pr",
380
359
  "list",
381
- "--repo",
382
- e,
383
360
  "--search",
384
- t,
361
+ e,
385
362
  "--state",
386
363
  "merged",
387
364
  "--json",
@@ -389,20 +366,18 @@ function ae(e, t, n) {
389
366
  "--limit",
390
367
  "5"
391
368
  ]);
392
- return JSON.parse(r || "[]");
369
+ return JSON.parse(n || "[]");
393
370
  }
394
- function oe(e, t, n, r) {
395
- r([
371
+ function ae(e, t, n) {
372
+ n([
396
373
  "issue",
397
374
  "comment",
398
- String(t),
399
- "--repo",
400
- e,
375
+ String(e),
401
376
  "--body",
402
- n
377
+ t
403
378
  ]);
404
379
  }
405
- function se(e) {
380
+ function oe(e) {
406
381
  for (let t of e) {
407
382
  let e = R[t];
408
383
  if (e) return e;
@@ -412,52 +387,52 @@ function se(e) {
412
387
  function Q(e, n) {
413
388
  t(s(e), { recursive: !0 }), a(e, n);
414
389
  }
415
- function ce(e, t) {
390
+ function $(e, t) {
416
391
  let n = t?.runGh ?? J, r = _(e);
417
- return r.storage === "local" ? le(e, r, n) : ue(e, r, n);
418
- }
419
- function le(e, t, n) {
420
- let r = [], i = Y(t, n), a = K(e, t);
421
- if (a.length === 0) return x(e, { storage: p }), r.push("No artifacts found — nothing to migrate."), r.push(`✓ Storage switched to "${p}".`), r;
422
- let o = t.github.labels?.prd ?? "tk:prd", s = t.github.labels?.plan ?? "tk:plan";
423
- ne(i, [
392
+ return r.storage === "local" ? se(e, r, n) : le(e, r, n);
393
+ }
394
+ function se(e, t, n) {
395
+ let r = [], i = K(e, t);
396
+ if (i.length === 0) return b(e, { storage: p }), r.push("No artifacts found — nothing to migrate."), r.push(`✓ Storage switched to "${p}".`), r;
397
+ let a = t.github.labels?.prd ?? "tk:prd", o = t.github.labels?.plan ?? "tk:plan";
398
+ Z([
399
+ a,
424
400
  o,
425
- s,
426
- ...[...new Set(a.map((e) => V(e.metadata.status ?? "created")))]
401
+ ...[...new Set(i.map((e) => V(e.metadata.status ?? "created")))]
427
402
  ], n);
428
- let c = X(i, o, n), l = X(i, s, n);
429
- for (let e of a) {
430
- let t = e.type === "prd" ? o : s, a = e.type === "prd" ? c : l;
431
- if (Z(e.slug, a)) {
403
+ let s = Y(a, n), c = Y(o, n);
404
+ for (let e of i) {
405
+ let t = e.type === "prd" ? a : o, i = e.type === "prd" ? s : c;
406
+ if (X(e.slug, i)) {
432
407
  r.push(`⚠ skip ${e.type} "${e.slug}" — already exists on GitHub`);
433
408
  continue;
434
409
  }
435
- let u = e.metadata.status ?? "created", d = V(u), f = `${B(e.metadata)}\n\n${e.body.replace(/^\n/, "")}`, p = re(i, {
410
+ let l = e.metadata.status ?? "created", u = V(l), d = `${B(e.metadata)}\n\n${e.body.replace(/^\n/, "")}`, f = ne({
436
411
  title: `[${t}] ${e.slug}: ${e.title}`,
437
- body: f,
438
- labels: [t, d]
412
+ body: d,
413
+ labels: [t, u]
439
414
  }, n);
440
- u === "done" ? (ie(i, p, n), $(i, e.slug, p, n), r.push(`✓ ${e.type} "${e.slug}" → issue #${p} (closed)`)) : r.push(`✓ ${e.type} "${e.slug}" → issue #${p}`);
415
+ l === "done" ? (re(f, n), ce(e.slug, f, n), r.push(`✓ ${e.type} "${e.slug}" → issue #${f} (closed)`)) : r.push(`✓ ${e.type} "${e.slug}" → issue #${f}`);
441
416
  }
442
- return x(e, { storage: p }), r.push(`✓ Storage switched to "${p}".`), r;
417
+ return b(e, { storage: p }), r.push(`✓ Storage switched to "${p}".`), r;
443
418
  }
444
- function $(e, t, n, r) {
445
- let i = ae(e, t, r);
446
- i.length !== 0 && oe(e, n, `Linked PR: ${i.map((e) => `#${e.number}`).join(", ")}`, r);
419
+ function ce(e, t, n) {
420
+ let r = ie(e, n);
421
+ r.length !== 0 && ae(t, `Linked PR: ${r.map((e) => `#${e.number}`).join(", ")}`, n);
447
422
  }
448
- function ue(t, n, r) {
449
- let i = [], a = Y(n, r), o = n.github.labels?.prd ?? "tk:prd", s = n.github.labels?.plan ?? "tk:plan", l = X(a, o, r), u = X(a, s, r), d = [...l.map((e) => ({
423
+ function le(t, n, r) {
424
+ let i = [], a = n.github.labels?.prd ?? "tk:prd", o = n.github.labels?.plan ?? "tk:plan", s = Y(a, r), l = Y(o, r), u = [...s.map((e) => ({
450
425
  ...e,
451
426
  type: "prd"
452
- })), ...u.map((e) => ({
427
+ })), ...l.map((e) => ({
453
428
  ...e,
454
429
  type: "plan"
455
430
  }))];
456
- if (d.length === 0) return x(t, { storage: f }), i.push("No GitHub issues found — nothing to migrate."), i.push(`✓ Storage switched to "${f}".`), i;
457
- for (let r of d) {
431
+ if (u.length === 0) return b(t, { storage: f }), i.push("No GitHub issues found — nothing to migrate."), i.push(`✓ Storage switched to "${f}".`), i;
432
+ for (let r of u) {
458
433
  let { metadata: a, body: o } = H(r.body ?? ""), s = a.slug ?? W(r.title);
459
434
  if (!s) continue;
460
- let l = r.labels.map((e) => e.name), u = a.status ?? se(l), d = c(t, r.type === "prd" ? n.paths.prds : n.paths.plans, `${s}.md`);
435
+ let l = r.labels.map((e) => e.name), u = a.status ?? oe(l), d = c(t, r.type === "prd" ? n.paths.prds : n.paths.plans, `${s}.md`);
461
436
  if (e(d)) {
462
437
  i.push(`⚠ skip ${r.type} "${s}" — local file already exists`);
463
438
  continue;
@@ -472,14 +447,14 @@ function ue(t, n, r) {
472
447
  }
473
448
  i.push(`✓ ${r.type} "${s}" → ${d}`);
474
449
  }
475
- return x(t, { storage: f }), i.push(`✓ Storage switched to "${f}".`), i;
450
+ return b(t, { storage: f }), i.push(`✓ Storage switched to "${f}".`), i;
476
451
  }
477
452
  //#endregion
478
453
  //#region src/commands/uninstall.ts
479
- function de(t) {
480
- if (!w.some((n) => e(c(t, ".claude", "skills", n)))) throw Error("TracerKit not initialized — nothing to uninstall");
454
+ function ue(t) {
455
+ if (!C.some((n) => e(c(t, ".claude", "skills", n)))) throw Error("TracerKit not initialized — nothing to uninstall");
481
456
  let n = [];
482
- for (let r of w) {
457
+ for (let r of C) {
483
458
  let a = c(t, ".claude", "skills", r);
484
459
  e(a) && (i(a, {
485
460
  recursive: !0,
@@ -489,4 +464,4 @@ function de(t) {
489
464
  return n;
490
465
  }
491
466
  //#endregion
492
- export { P as a, T as c, f as d, _ as f, L as i, E as l, ce as n, O as o, x as p, ee as r, D as s, de as t, w as u };
467
+ export { N as a, w as c, f as d, _ as f, I as i, T as l, $ as n, D as o, b as p, te as r, E as s, ue as t, C as u };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tracerkit",
3
- "version": "1.17.0",
3
+ "version": "1.17.2",
4
4
  "description": "Spec-driven workflow for AI coding agents — PRD → plan → verify. Pure Markdown skills, zero runtime deps.",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -2,7 +2,7 @@
2
2
  description: Session briefing — shows active features, progress, and suggested focus. Use at the start of a session to orient.
3
3
  ---
4
4
 
5
- **Config**: read `.tracerkit/config.json` (default: `local`). Follow matching `<!-- if:local/github -->` blocks. GitHub: use `github.repo` from config or git remote.
5
+ **Config**: read `.tracerkit/config.json` (default: `local`). Follow matching `<!-- if:local/github -->` blocks.
6
6
 
7
7
  # Session Briefing
8
8
 
@@ -3,13 +3,13 @@ description: Verify implementation against plan. Shows progress, finds blockers,
3
3
  argument-hint: '[slug]'
4
4
  ---
5
5
 
6
- **Config**: read `.tracerkit/config.json` (default: `local`). Follow matching `<!-- if:local/github -->` blocks. GitHub: use `github.repo` from config or git remote.
6
+ **Config**: read `.tracerkit/config.json` (default: `local`). Follow matching `<!-- if:local/github -->` blocks.
7
7
 
8
8
  # Check Implementation
9
9
 
10
10
  Check implementation against a plan. Update checks, stamp findings, transition status, and mark complete when done.
11
11
 
12
- **Interactive prompts**: use `AskUserQuestion` for all user-facing questions selections and confirmations.
12
+ **Interactive prompts**: use `AskUserQuestion` when available for selections and confirmations; otherwise present options as a numbered list.
13
13
 
14
14
  ## Pre-loaded context
15
15
 
@@ -52,7 +52,7 @@ For each `.md` file in `.tracerkit/prds/`:
52
52
  6. If plan issue exists, count progress from checkboxes in its body (see Progress Algorithm below). Show `—` if no plan.
53
53
  <!-- end:github -->
54
54
 
55
- Use `AskUserQuestion` with each feature as an option to let the user pick which to verify.
55
+ Present each feature as an option and let the user pick which to verify. Use `AskUserQuestion` when available; otherwise present as a numbered list.
56
56
 
57
57
  ## Progress Algorithm
58
58
 
@@ -64,12 +64,12 @@ Count `- [x]` and `- [ ]` lines under each `## Phase N` heading. Per-phase: `Pha
64
64
 
65
65
  <!-- if:local -->
66
66
 
67
- Read `.tracerkit/plans/<slug>.md`. If missing, list plans and use `AskUserQuestion` to select one.
67
+ Read `.tracerkit/plans/<slug>.md`. If missing, list plans and ask the user to select one (use `AskUserQuestion` when available).
68
68
 
69
69
  <!-- end:local -->
70
70
  <!-- if:github -->
71
71
 
72
- Find plan issue: open issue with label `{{github.labels.plan}}`, title matching `[{{github.labels.plan}}] <slug>:`. If missing, list plans and use `AskUserQuestion` to select one.
72
+ Find plan issue: open issue with label `{{github.labels.plan}}`, title matching `[{{github.labels.plan}}] <slug>:`. If missing, list plans and ask the user to select one (use `AskUserQuestion` when available).
73
73
 
74
74
  <!-- end:github -->
75
75
 
@@ -3,13 +3,13 @@ description: Turn a PRD into a multi-phase implementation plan using tracer-bull
3
3
  argument-hint: '[slug]'
4
4
  ---
5
5
 
6
- **Config**: read `.tracerkit/config.json` (default: `local`). Follow matching `<!-- if:local/github -->` blocks. GitHub: use `github.repo` from config or git remote.
6
+ **Config**: read `.tracerkit/config.json` (default: `local`). Follow matching `<!-- if:local/github -->` blocks.
7
7
 
8
8
  # PRD to Plan
9
9
 
10
10
  Break a PRD into phased vertical slices (tracer bullets).
11
11
 
12
- **Interactive prompts**: use `AskUserQuestion` for all user-facing questions — selections, confirmations, and approval steps.
12
+ **Interactive prompts**: use `AskUserQuestion` when available for selections, confirmations, and approval steps; otherwise present options as a numbered list.
13
13
 
14
14
  <!-- if:local -->
15
15
 
@@ -36,7 +36,7 @@ Output: a GitHub Issue with label `{{github.labels.plan}}`.
36
36
 
37
37
  The argument (if provided) is: $ARGUMENTS
38
38
 
39
- Use argument as `<slug>`. If empty, list available PRDs and use `AskUserQuestion` with each PRD as an option.
39
+ Use argument as `<slug>`. If empty, list available PRDs and ask the user to select one (use `AskUserQuestion` when available; otherwise present as a numbered list).
40
40
 
41
41
  ## Workflow
42
42
 
@@ -44,12 +44,12 @@ Use argument as `<slug>`. If empty, list available PRDs and use `AskUserQuestion
44
44
 
45
45
  <!-- if:local -->
46
46
 
47
- Read `.tracerkit/prds/<slug>.md`. If missing, list PRDs and use `AskUserQuestion` to select one. If `.tracerkit/plans/<slug>.md` exists, use `AskUserQuestion` with options: "Overwrite existing" / "Pick a new name".
47
+ Read `.tracerkit/prds/<slug>.md`. If missing, list PRDs and ask the user to select one. If `.tracerkit/plans/<slug>.md` exists, ask: "Overwrite existing" / "Pick a new name". Use `AskUserQuestion` when available; otherwise present as a numbered list.
48
48
 
49
49
  <!-- end:local -->
50
50
  <!-- if:github -->
51
51
 
52
- Find PRD issue: open issue with label `{{github.labels.prd}}`, title matching `[{{github.labels.prd}}] <slug>:`. If missing, list PRDs and use `AskUserQuestion` to select one. If plan issue with label `{{github.labels.plan}}` and matching title exists, use `AskUserQuestion` with options: "Update existing plan" / "Use a new name".
52
+ Find PRD issue: open issue with label `{{github.labels.prd}}`, title matching `[{{github.labels.prd}}] <slug>:`. If missing, list PRDs and ask the user to select one. If plan issue with label `{{github.labels.plan}}` and matching title exists, ask: "Update existing plan" / "Use a new name". Use `AskUserQuestion` when available; otherwise present as a numbered list.
53
53
 
54
54
  <!-- end:github -->
55
55
 
@@ -112,7 +112,7 @@ Each phase: thin vertical slice through all layers (schema → service → API
112
112
 
113
113
  - 1 module touched → 2–3 phases max
114
114
  - 2–3 modules touched → 3–5 phases max
115
- - 4+ modules or 6+ phases → stop and use `AskUserQuestion`: "PRD touches 4+ modules. Split before planning?" with options: "Split the PRD" (Recommended) / "Continue anyway"
115
+ - 4+ modules or 6+ phases → stop and ask: "PRD touches 4+ modules. Split before planning?" with options: "Split the PRD" (Recommended) / "Continue anyway". Use `AskUserQuestion` when available.
116
116
 
117
117
  Count "modules touched" by scanning the PRD's New Modules and Schema Changes sections.
118
118
 
@@ -124,7 +124,7 @@ Assign an agent tag to tasks where appropriate:
124
124
 
125
125
  ### 5. Quiz the user
126
126
 
127
- Present breakdown (title, user stories covered, done-when per phase). Use `AskUserQuestion`: "How's the granularity?" with options: "Looks good, proceed" (Recommended) / "Merge some phases" / "Split a phase". Iterate until approved.
127
+ Present breakdown (title, user stories covered, done-when per phase). Ask: "How's the granularity?" with options: "Looks good, proceed" (Recommended) / "Merge some phases" / "Split a phase". Use `AskUserQuestion` when available; otherwise present as a numbered list. Iterate until approved.
128
128
 
129
129
  ### 6. Save plan
130
130
 
@@ -149,7 +149,7 @@ Then update PRD frontmatter: add `plan: .tracerkit/plans/<slug>.md` field.
149
149
  <!-- end:local -->
150
150
  <!-- if:github -->
151
151
 
152
- Ensure labels exist: `gh label create {{github.labels.plan}} --repo {{github.repo}} --force`, `gh label create tk:in-progress --repo {{github.repo}} --force`.
152
+ Ensure labels exist: `gh label create {{github.labels.plan}} --force`, `gh label create tk:in-progress --force`.
153
153
 
154
154
  Create GitHub Issue — title: `[{{github.labels.plan}}] <slug>: Plan: <Feature Title>`, labels: `{{github.labels.plan}}`, `tk:in-progress`.
155
155
 
@@ -217,11 +217,11 @@ Carried forward from PRD verbatim.
217
217
  Gaps found in the PRD needing resolution. Blank if none.
218
218
  ```
219
219
 
220
- Print one line per phase: `Phase N — <title> (<condition summary>)`. Then use `AskUserQuestion`: "What's next?" with options: "Start implementing" (Recommended) / "Run `/tk:check <slug>`" / "Done for now".
220
+ Print one line per phase: `Phase N — <title> (<condition summary>)`. Then ask: "What's next?" with options: "Start implementing" (Recommended) / "Run `/tk:check <slug>`" / "Done for now". Use `AskUserQuestion` when available; otherwise present as a numbered list.
221
221
 
222
222
  ## Execution guidance
223
223
 
224
- When implementing this plan, **always offer to create a feature branch** before writing any code. Use `AskUserQuestion`: "Create branch `feat/<slug>`?" with options: "Yes, create branch" (Recommended) / "No, stay on current branch". If accepted, create the branch from the default branch.
224
+ When implementing this plan, **always offer to create a feature branch** before writing any code. Ask: "Create branch `feat/<slug>`?" with options: "Yes, create branch" (Recommended) / "No, stay on current branch". Use `AskUserQuestion` when available. If accepted, create the branch from the default branch.
225
225
 
226
226
  ### During implementation
227
227
 
@@ -3,13 +3,13 @@ description: Create a PRD through user interview, codebase exploration, and modu
3
3
  argument-hint: <idea>
4
4
  ---
5
5
 
6
- **Config**: read `.tracerkit/config.json` (default: `local`). Follow matching `<!-- if:local/github -->` blocks. GitHub: use `github.repo` from config or git remote.
6
+ **Config**: read `.tracerkit/config.json` (default: `local`). Follow matching `<!-- if:local/github -->` blocks.
7
7
 
8
8
  # PRD Writing
9
9
 
10
10
  Skip satisfied steps. If argument provided, skip to Step 2.
11
11
 
12
- **Interactive prompts**: use `AskUserQuestion` for all user-facing questions — choices, confirmations, and interview questions. This provides structured selection UI instead of plain text prompts.
12
+ **Interactive prompts**: use `AskUserQuestion` when available for choices, confirmations, and interview questions (structured selection UI); otherwise present options as a numbered list.
13
13
 
14
14
  ## Pre-loaded context
15
15
 
@@ -36,12 +36,12 @@ If empty, go to Step 1; derive slug after gathering the idea. If provided, deriv
36
36
 
37
37
  <!-- if:local -->
38
38
 
39
- Output: `.tracerkit/prds/<slug>.md`. If exists, use `AskUserQuestion` with options: "Overwrite existing" / "Pick a new name".
39
+ Output: `.tracerkit/prds/<slug>.md`. If exists, ask: "Overwrite existing" / "Pick a new name" (use `AskUserQuestion` when available).
40
40
 
41
41
  <!-- end:local -->
42
42
  <!-- if:github -->
43
43
 
44
- Output: GitHub Issue with label `{{github.labels.prd}}`, title `[{{github.labels.prd}}] <slug>: <Feature Title>`. If matching issue exists, use `AskUserQuestion` with options: "Update existing issue" / "Use a new slug".
44
+ Output: GitHub Issue with label `{{github.labels.prd}}`, title `[{{github.labels.prd}}] <slug>: <Feature Title>`. If matching issue exists, ask: "Update existing issue" / "Use a new slug" (use `AskUserQuestion` when available).
45
45
 
46
46
  <!-- end:github -->
47
47
 
@@ -59,7 +59,7 @@ Map current state: data models, services, API routes, frontend, tests. Note exis
59
59
 
60
60
  ### 3. Interview
61
61
 
62
- One question at a time. Lead with your recommended answer (mark it `(Recommended)` and list first). Explore code instead of asking when possible. Use `AskUserQuestion` with 2–4 options for each interview question — structured choices are faster than free-text.
62
+ One question at a time. Lead with your recommended answer (mark it `(Recommended)` and list first). Explore code instead of asking when possible. Present 2–4 options for each question — structured choices are faster than free-text. Use `AskUserQuestion` when available; otherwise present as a numbered list.
63
63
 
64
64
  | Branch | Key questions | Skip when |
65
65
  | ---------------- | --------------------------------------- | -------------------------------- |
@@ -73,7 +73,7 @@ One question at a time. Lead with your recommended answer (mark it `(Recommended
73
73
 
74
74
  ### 3b. Gray areas
75
75
 
76
- Surface ambiguities, contradictions, unstated assumptions. For each gray area, use `AskUserQuestion` with proposed resolution options. Resolve all before continuing.
76
+ Surface ambiguities, contradictions, unstated assumptions. For each gray area, present proposed resolution options (use `AskUserQuestion` when available). Resolve all before continuing.
77
77
 
78
78
  ### 4. Design modules
79
79
 
@@ -81,7 +81,7 @@ Sketch modules. Favor **deep modules** — simple interface (1-3 entry points) h
81
81
 
82
82
  Shallow signals: many small 1:1 functions, callers compose multiple calls, feature changes require interface changes.
83
83
 
84
- Present modules. Use `AskUserQuestion` (multiSelect) to confirm which modules need tests.
84
+ Present modules. Confirm which need tests (multiSelect). Use `AskUserQuestion` when available; otherwise present as a checklist for the user to confirm.
85
85
 
86
86
  ### 5. Write PRD
87
87
 
@@ -101,7 +101,7 @@ status: created
101
101
  <!-- end:local -->
102
102
  <!-- if:github -->
103
103
 
104
- Ensure labels exist: `gh label create {{github.labels.prd}} --repo {{github.repo}} --force`, `gh label create tk:created --repo {{github.repo}} --force`.
104
+ Ensure labels exist: `gh label create {{github.labels.prd}} --force`, `gh label create tk:created --force`.
105
105
 
106
106
  Create GitHub Issue — title: `[{{github.labels.prd}}] <slug>: <Feature Title>`, labels: `{{github.labels.prd}}`, `tk:created`.
107
107
 
@@ -136,4 +136,4 @@ PRD body structure (same for local file and issue body). Omit empty sections. No
136
136
 
137
137
  ---
138
138
 
139
- Then use `AskUserQuestion`: "What's next?" with options: "Run `/tk:plan <slug>`" (Recommended) / "Done for now".
139
+ Then ask: "What's next?" with options: "Run `/tk:plan <slug>`" (Recommended) / "Done for now". Use `AskUserQuestion` when available; otherwise present as a numbered list.