@llipe.com/dev-tasks 0.16.4 → 0.17.1
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/.claude/agents/developer.md +8 -3
- package/.claude/agents/github-ops.md +186 -58
- package/.claude/agents/technical-writer.md +1 -1
- package/.claude/agents/verifier.md +10 -5
- package/.claude/commands/planner.md +109 -14
- package/.claude/commands/product-engineer.md +27 -3
- package/.claude/hooks/git-guard.sh +200 -27
- package/.claude/skills/activity-init/SKILL.md +4 -0
- package/.claude/skills/activity-publish-github/SKILL.md +84 -15
- package/.claude/skills/implement/SKILL.md +29 -13
- package/.claude/skills/memo-cli-usage/REFERENCE.md +1 -0
- package/.claude/skills/memo-cli-usage/SKILL.md +3 -1
- package/.claude/skills/plan/SKILL.md +6 -0
- package/.github/agents/developer.agent.md +8 -3
- package/.github/agents/github-ops.agent.md +181 -63
- package/.github/agents/planner.agent.md +122 -27
- package/.github/agents/product-engineer.agent.md +27 -3
- package/.github/agents/technical-writer.agent.md +1 -1
- package/.github/agents/verifier.agent.md +10 -5
- package/.github/instructions/implement.instructions.md +29 -13
- package/.github/instructions/plan.instructions.md +6 -0
- package/.github/skills/activity-init/SKILL.md +4 -0
- package/.github/skills/activity-publish-github/SKILL.md +84 -15
- package/.github/skills/memo-cli-usage/REFERENCE.md +1 -0
- package/.github/skills/memo-cli-usage/SKILL.md +3 -1
- package/.kiro/agents/developer.md +8 -3
- package/.kiro/agents/github-ops.md +181 -63
- package/.kiro/agents/planner.md +122 -27
- package/.kiro/agents/product-engineer.md +27 -3
- package/.kiro/agents/technical-writer.md +1 -1
- package/.kiro/agents/verifier.md +10 -5
- package/.kiro/skills/activity-init/SKILL.md +4 -0
- package/.kiro/skills/activity-publish-github/SKILL.md +84 -15
- package/.kiro/skills/memo-cli-usage/REFERENCE.md +1 -0
- package/.kiro/skills/memo-cli-usage/SKILL.md +3 -1
- package/.kiro/steering/implement.md +29 -13
- package/.kiro/steering/plan.md +6 -0
- package/AGENTS.md +2 -0
- package/AGENTS.md.template +2 -0
- package/CHANGELOG.md +31 -0
- package/README.md +79 -7
- package/TESTING.md +62 -1
- package/dist/bin/dev-tasks.d.ts +1 -1
- package/dist/bin/dev-tasks.js +126 -4
- package/dist/bin/dev-tasks.js.map +1 -1
- package/dist/bin/parse-args.d.ts +49 -1
- package/dist/bin/parse-args.d.ts.map +1 -1
- package/dist/bin/parse-args.js +132 -11
- package/dist/bin/parse-args.js.map +1 -1
- package/dist/core/checks/index.d.ts +2 -0
- package/dist/core/checks/index.d.ts.map +1 -1
- package/dist/core/checks/index.js +1 -0
- package/dist/core/checks/index.js.map +1 -1
- package/dist/core/checks/roadmap.d.ts +40 -0
- package/dist/core/checks/roadmap.d.ts.map +1 -0
- package/dist/core/checks/roadmap.js +78 -0
- package/dist/core/checks/roadmap.js.map +1 -0
- package/dist/core/migrate-projects/answers.d.ts +63 -0
- package/dist/core/migrate-projects/answers.d.ts.map +1 -0
- package/dist/core/migrate-projects/answers.js +79 -0
- package/dist/core/migrate-projects/answers.js.map +1 -0
- package/dist/core/migrate-projects/apply.d.ts +51 -0
- package/dist/core/migrate-projects/apply.d.ts.map +1 -0
- package/dist/core/migrate-projects/apply.js +828 -0
- package/dist/core/migrate-projects/apply.js.map +1 -0
- package/dist/core/migrate-projects/classify.d.ts +93 -0
- package/dist/core/migrate-projects/classify.d.ts.map +1 -0
- package/dist/core/migrate-projects/classify.js +170 -0
- package/dist/core/migrate-projects/classify.js.map +1 -0
- package/dist/core/migrate-projects/conventions.d.ts +118 -0
- package/dist/core/migrate-projects/conventions.d.ts.map +1 -0
- package/dist/core/migrate-projects/conventions.js +213 -0
- package/dist/core/migrate-projects/conventions.js.map +1 -0
- package/dist/core/migrate-projects/gh.d.ts +40 -0
- package/dist/core/migrate-projects/gh.d.ts.map +1 -0
- package/dist/core/migrate-projects/gh.js +115 -0
- package/dist/core/migrate-projects/gh.js.map +1 -0
- package/dist/core/migrate-projects/index.d.ts +61 -0
- package/dist/core/migrate-projects/index.d.ts.map +1 -0
- package/dist/core/migrate-projects/index.js +183 -0
- package/dist/core/migrate-projects/index.js.map +1 -0
- package/dist/core/migrate-projects/local-reader.d.ts +8 -0
- package/dist/core/migrate-projects/local-reader.d.ts.map +1 -0
- package/dist/core/migrate-projects/local-reader.js +30 -0
- package/dist/core/migrate-projects/local-reader.js.map +1 -0
- package/dist/core/migrate-projects/map.d.ts +36 -0
- package/dist/core/migrate-projects/map.d.ts.map +1 -0
- package/dist/core/migrate-projects/map.js +75 -0
- package/dist/core/migrate-projects/map.js.map +1 -0
- package/dist/core/migrate-projects/plan.d.ts +71 -0
- package/dist/core/migrate-projects/plan.d.ts.map +1 -0
- package/dist/core/migrate-projects/plan.js +638 -0
- package/dist/core/migrate-projects/plan.js.map +1 -0
- package/dist/core/migrate-projects/planfile.d.ts +149 -0
- package/dist/core/migrate-projects/planfile.d.ts.map +1 -0
- package/dist/core/migrate-projects/planfile.js +608 -0
- package/dist/core/migrate-projects/planfile.js.map +1 -0
- package/dist/core/migrate-projects/roadmap.d.ts +43 -0
- package/dist/core/migrate-projects/roadmap.d.ts.map +1 -0
- package/dist/core/migrate-projects/roadmap.js +54 -0
- package/dist/core/migrate-projects/roadmap.js.map +1 -0
- package/dist/core/migrate-projects/snapshot.d.ts +91 -0
- package/dist/core/migrate-projects/snapshot.d.ts.map +1 -0
- package/dist/core/migrate-projects/snapshot.js +285 -0
- package/dist/core/migrate-projects/snapshot.js.map +1 -0
- package/dist/core/migrate-projects/summary.d.ts +27 -0
- package/dist/core/migrate-projects/summary.d.ts.map +1 -0
- package/dist/core/migrate-projects/summary.js +35 -0
- package/dist/core/migrate-projects/summary.js.map +1 -0
- package/package.json +1 -1
|
@@ -22,11 +22,41 @@
|
|
|
22
22
|
#
|
|
23
23
|
# Rules 1 and 4 read each command's arguments from its own simple-command
|
|
24
24
|
# segment (split at `&&`, `||`, `;`, `|`, `&`, and newlines outside quotes —
|
|
25
|
-
# see
|
|
25
|
+
# see executed_view()), never from the rest of the command string. A
|
|
26
26
|
# chained `gh pr create --base main` is not a push to `main`, a `--tags` in a
|
|
27
27
|
# commit message is not a tag push, and every push or merge in a chain is
|
|
28
28
|
# checked, not only the last one (issue #256).
|
|
29
29
|
#
|
|
30
|
+
# Executed view (issue #339). Rules 1 and 4 judge only text that bash runs:
|
|
31
|
+
# - Quoted heredocs (`<<'ID'`, `<<"ID"`, `<<-'ID'`, ID a plain identifier)
|
|
32
|
+
# are read as heredocs. Their body lines are never parsed for quotes or
|
|
33
|
+
# separators, so an apostrophe in a body cannot glue later commands
|
|
34
|
+
# together. An unquoted delimiter (`<<EOF`) and a `<<<` here-string are
|
|
35
|
+
# expanded by bash and are never relaxed.
|
|
36
|
+
# - A command is relaxed only when every segment's first word is on the
|
|
37
|
+
# allow-list `git`, `gh`, `echo`, `printf`, `cat`. Then heredoc bodies and
|
|
38
|
+
# `echo`/`printf`/`cat` arguments are ignored; `git` and `gh` arguments
|
|
39
|
+
# are always kept.
|
|
40
|
+
# - Anything that could run code keeps the whole command strict (the
|
|
41
|
+
# pre-#339 reading, where heredoc body lines are read as commands, so
|
|
42
|
+
# `bash <<'EOF'` stays blocked): `$(`, a backtick, `$[`, `${`, `<(`, `>(`,
|
|
43
|
+
# an assignment prefix (`X=1 cmd`), or a runner or interpreter word
|
|
44
|
+
# anywhere (`bash`, `sh`, `eval`, `source`, `.`, `env`, `command`, `exec`,
|
|
45
|
+
# `xargs`, `sudo`, `nohup`, `time`, `python*`, `node`, `fish`, ...).
|
|
46
|
+
# Triggers inside a quoted heredoc body are ignored, since bash never
|
|
47
|
+
# expands it; single-quoted text elsewhere still counts.
|
|
48
|
+
# - Also strict, failing toward the old reading on any doubt: `$'`, `!`,
|
|
49
|
+
# a comment (`#` at a word start), any other `<<`, an open quote, an
|
|
50
|
+
# unterminated heredoc, two heredocs on one line, `printf -v`, `git -c`,
|
|
51
|
+
# `--config-env` or `--exec-path`, the plain text `.git/`, `hook` or
|
|
52
|
+
# `.husky` (a text match, not a path check: it narrows writing a hook
|
|
53
|
+
# that runs later, which only branch protection closes), and text fed by
|
|
54
|
+
# a pipe or heredoc to anything but `git commit`,
|
|
55
|
+
# `gh issue` or `gh pr` (an alias or extension cannot shadow a built-in).
|
|
56
|
+
# Rules 2 (Conventional Commits) and 3 (inline `--body`) deliberately read
|
|
57
|
+
# argument text and do not use the executed view. `--body-file <path>`
|
|
58
|
+
# remains the recommended way to pass an issue or PR body.
|
|
59
|
+
#
|
|
30
60
|
# 5. (Issue #178) The same "no write to the default branch" invariant as
|
|
31
61
|
# rule 1, enforced on the mutating GitHub MCP tool surface, not just
|
|
32
62
|
# `Bash`. Before this rule, `.claude/settings.json` matched `"Bash"`
|
|
@@ -222,51 +252,194 @@ tokenize() {
|
|
|
222
252
|
printf '%s' "$1" | xargs -n1 -- printf '%s\n' 2>/dev/null
|
|
223
253
|
}
|
|
224
254
|
|
|
225
|
-
#
|
|
226
|
-
#
|
|
227
|
-
#
|
|
228
|
-
#
|
|
229
|
-
#
|
|
230
|
-
#
|
|
231
|
-
#
|
|
232
|
-
#
|
|
233
|
-
#
|
|
234
|
-
|
|
255
|
+
# Build the executed view of the raw command (issue #339). Prints the mode,
|
|
256
|
+
# `relaxed` or `strict`, on line one, then one simple-command segment per
|
|
257
|
+
# line. Segments split at `&&`, `||`, `;`, `|`, `&`, and newlines outside
|
|
258
|
+
# single or double quotes (backslash escapes honored; `>&`, `<&` and `&>` are
|
|
259
|
+
# redirections, not separators), so every rule that reads a command's
|
|
260
|
+
# arguments reads them from its own segment, never from the rest of the
|
|
261
|
+
# string (issue #256).
|
|
262
|
+
#
|
|
263
|
+
# Quoted heredocs (`<<'ID'`, `<<"ID"`, `<<-'ID'`, ID a plain identifier) are
|
|
264
|
+
# read as heredocs: their body lines are never parsed for quotes or
|
|
265
|
+
# separators, so an apostrophe in a body (`don't`) cannot open a phantom quote
|
|
266
|
+
# that glues later commands together.
|
|
267
|
+
#
|
|
268
|
+
# relaxed: every segment's first word is `git`, `gh`, `echo`, `printf` or
|
|
269
|
+
# `cat`, and nothing in the command can run code (see the header for the
|
|
270
|
+
# triggers). Heredoc bodies are dropped and `echo`/`printf`/`cat` segments
|
|
271
|
+
# are cut to their first word, since bash never runs that text. `git` and
|
|
272
|
+
# `gh` segments are kept whole.
|
|
273
|
+
# strict: anything else, or any doubt. Every segment is kept, and each heredoc
|
|
274
|
+
# body line is a segment of its own (backslash-newline joined), so
|
|
275
|
+
# `bash <<'EOF'` with a push in the body stays blocked. This is the
|
|
276
|
+
# pre-#339 view except for the heredoc body handling.
|
|
277
|
+
#
|
|
278
|
+
# Portable awk only: macOS ships BSD awk, not gawk.
|
|
279
|
+
executed_view() {
|
|
235
280
|
printf '%s\n' "$cmd" | awk '
|
|
281
|
+
function flush() {
|
|
282
|
+
k++; seg[k] = cur; body[k] = 0; fed[k] = cur_fed
|
|
283
|
+
cur = ""; cur_fed = 0; started = 0
|
|
284
|
+
}
|
|
285
|
+
function emit(ch) {
|
|
286
|
+
if (!started && ch != " " && ch != "\t") {
|
|
287
|
+
started = 1; cur_fed = pipe_pending; pipe_pending = 0
|
|
288
|
+
}
|
|
289
|
+
cur = cur ch
|
|
290
|
+
}
|
|
291
|
+
function add_body(line) { k++; seg[k] = line; body[k] = 1 }
|
|
292
|
+
# Read the pending heredoc bodies that start after the newline at i.
|
|
293
|
+
function read_bodies( p, m, e, line, cmp, closed, acc) {
|
|
294
|
+
p = i + 1
|
|
295
|
+
for (m = 1; m <= npend; m++) {
|
|
296
|
+
closed = 0; acc = ""
|
|
297
|
+
while (p <= n) {
|
|
298
|
+
e = index(substr(s, p), "\n")
|
|
299
|
+
if (e == 0) { line = substr(s, p); p = n + 1 }
|
|
300
|
+
else { line = substr(s, p, e - 1); p = p + e }
|
|
301
|
+
cmp = line
|
|
302
|
+
if (pdash[m]) sub(/^\t+/, "", cmp)
|
|
303
|
+
if (cmp == pid[m]) { closed = 1; break }
|
|
304
|
+
if (line ~ /\\$/) { acc = acc substr(line, 1, length(line) - 1); continue }
|
|
305
|
+
add_body(acc line); acc = ""
|
|
306
|
+
}
|
|
307
|
+
if (acc != "") add_body(acc)
|
|
308
|
+
if (!closed) { strict = 1; break }
|
|
309
|
+
}
|
|
310
|
+
npend = 0
|
|
311
|
+
i = p - 1
|
|
312
|
+
}
|
|
236
313
|
{ s = s (NR > 1 ? "\n" : "") $0 }
|
|
237
314
|
END {
|
|
238
|
-
|
|
315
|
+
n = length(s); q = ""; prev = ""; k = 0; cur = ""; started = 0
|
|
316
|
+
cur_fed = 0; pipe_pending = 0; npend = 0; line_openers = 0; strict = 0
|
|
239
317
|
for (i = 1; i <= n; i++) {
|
|
240
|
-
c = substr(s, i, 1)
|
|
318
|
+
c = substr(s, i, 1); c2 = substr(s, i, 2)
|
|
319
|
+
# Strictness triggers, anywhere outside a quoted heredoc body
|
|
320
|
+
# (bodies are consumed by read_bodies and never reach this loop).
|
|
321
|
+
if (c2 == "$(" || c2 == "$[" || c2 == "${" || c2 == "$\047" ||
|
|
322
|
+
c2 == "<(" || c2 == ">(" || c2 == "<<" || c == "`" || c == "!") {
|
|
323
|
+
if (!(q == "" && c2 == "<<")) strict = 1
|
|
324
|
+
}
|
|
241
325
|
if (q != "") {
|
|
242
326
|
# Inside quotes a newline is part of the argument, never a
|
|
243
327
|
# separator: map it to a space so the segment stays whole.
|
|
244
|
-
if (c == "\n") {
|
|
245
|
-
if (c == q) { q = "";
|
|
328
|
+
if (c == "\n") { if (npend) strict = 1; emit(" "); continue }
|
|
329
|
+
if (c == q) { q = ""; emit(c); prev = c; continue }
|
|
246
330
|
if (c == "\\" && q == "\"" && i < n) {
|
|
247
331
|
d = substr(s, i + 1, 1); i++
|
|
248
|
-
if (d != "\n")
|
|
332
|
+
if (d != "\n") { emit(c); emit(d) } # backslash-newline is a continuation
|
|
249
333
|
continue
|
|
250
334
|
}
|
|
251
|
-
|
|
335
|
+
emit(c)
|
|
252
336
|
continue
|
|
253
337
|
}
|
|
254
338
|
if (c == "\\" && i < n) {
|
|
255
339
|
d = substr(s, i + 1, 1); i++
|
|
256
|
-
|
|
340
|
+
# An escaped character is literal: prev must not read it as the `>`
|
|
341
|
+
# or `<` of a `>&`/`<&` redirection (`\>& cmd` backgrounds cmd).
|
|
342
|
+
if (d != "\n") { emit(c); emit(d); prev = c } # backslash-newline is a continuation
|
|
343
|
+
continue
|
|
344
|
+
}
|
|
345
|
+
# A word-start `#` opens a comment: keep the pre-#339 reading.
|
|
346
|
+
if (c == "#" && (prev == "" || prev ~ /[ \t\n;&|()]/)) strict = 1
|
|
347
|
+
if (c == "\"" || c == "\047") { q = c; emit(c); prev = c; continue }
|
|
348
|
+
if (c2 == "<<") {
|
|
349
|
+
if (substr(s, i + 2, 1) == "<") { # a here-string
|
|
350
|
+
strict = 1; emit("<"); emit("<"); emit("<"); i += 2; prev = "<"; continue
|
|
351
|
+
}
|
|
352
|
+
j = i + 2; dash = 0; ok = 0
|
|
353
|
+
if (substr(s, j, 1) == "-") { dash = 1; j++ }
|
|
354
|
+
while (substr(s, j, 1) == " " || substr(s, j, 1) == "\t") j++
|
|
355
|
+
oq = substr(s, j, 1)
|
|
356
|
+
if (oq == "\047" || oq == "\"") {
|
|
357
|
+
e = index(substr(s, j + 1), oq)
|
|
358
|
+
if (e > 0) {
|
|
359
|
+
id = substr(s, j + 1, e - 1); after = substr(s, j + e + 1, 1)
|
|
360
|
+
if (id ~ /^[A-Za-z_][A-Za-z0-9_]*$/ && (after == "" || after ~ /[ \t\n;&|<>)]/)) ok = 1
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
if (!ok) { strict = 1; emit(c); prev = c; continue } # unquoted, arithmetic, ...
|
|
364
|
+
if (++line_openers > 1) strict = 1 # two heredocs on one line
|
|
365
|
+
npend++; pid[npend] = id; pdash[npend] = dash
|
|
366
|
+
for (m = i; m <= j + e; m++) emit(substr(s, m, 1))
|
|
367
|
+
cur_fed = 1 # the heredoc feeds this segment
|
|
368
|
+
i = j + e; prev = oq
|
|
257
369
|
continue
|
|
258
370
|
}
|
|
259
|
-
if (c == "
|
|
260
|
-
|
|
261
|
-
|
|
371
|
+
if (c == "&" && (prev == ">" || prev == "<" || substr(s, i + 1, 1) == ">")) {
|
|
372
|
+
emit(c); prev = c; continue
|
|
373
|
+
}
|
|
374
|
+
if (c == "|" && substr(s, i + 1, 1) == "|") { # `||` is not a pipe
|
|
375
|
+
flush(); i++; prev = c; continue
|
|
376
|
+
}
|
|
377
|
+
if (c == ";" || c == "|" || c == "&" || c == "\n") {
|
|
378
|
+
flush(); prev = c
|
|
379
|
+
if (c == "|") pipe_pending = 1
|
|
380
|
+
if (c == "\n") { line_openers = 0; if (npend) read_bodies() }
|
|
381
|
+
continue
|
|
382
|
+
}
|
|
383
|
+
emit(c); prev = c
|
|
384
|
+
}
|
|
385
|
+
if (q != "" || npend) strict = 1 # an open quote or an unread heredoc
|
|
386
|
+
flush()
|
|
387
|
+
|
|
388
|
+
split("git gh echo printf cat", a, " ")
|
|
389
|
+
for (m in a) allow[a[m]] = 1
|
|
390
|
+
split("bash sh zsh ksh dash ash mksh fish csh tcsh busybox eval source . exec env command builtin xargs sudo doas su nohup time nice ionice timeout setsid stdbuf unbuffer watch parallel script chroot ssh trap node nodejs deno bun perl ruby php lua luajit osascript awk gawk mawk nawk sed tclsh wish expect", a, " ")
|
|
391
|
+
for (m in a) runner[a[m]] = 1
|
|
392
|
+
text = ""
|
|
393
|
+
for (m = 1; m <= k; m++) {
|
|
394
|
+
if (body[m]) continue
|
|
395
|
+
t = seg[m]; sub(/^[ \t]+/, "", t)
|
|
396
|
+
if (t == "") continue
|
|
397
|
+
text = text " " t
|
|
398
|
+
nw = split(t, w, /[ \t]+/)
|
|
399
|
+
if (!(w[1] in allow)) strict = 1
|
|
400
|
+
# Text fed to git or gh is data only for these built-ins; an alias
|
|
401
|
+
# or extension cannot shadow a built-in.
|
|
402
|
+
if (fed[m] && w[1] == "git" && w[2] != "commit") strict = 1
|
|
403
|
+
if (fed[m] && w[1] == "gh" && w[2] != "issue" && w[2] != "pr") strict = 1
|
|
404
|
+
if (w[1] == "printf" && w[2] == "-v") strict = 1
|
|
405
|
+
if (w[1] == "git") {
|
|
406
|
+
for (x = 2; x <= nw; x++) if (w[x] == "-c" || w[x] ~ /^--(config-env|exec-path)/) strict = 1
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
low = tolower(text)
|
|
410
|
+
if (index(low, ".git/") || index(low, "hook") || index(low, ".husky")) strict = 1
|
|
411
|
+
nt = split(text, tok, /[^A-Za-z0-9_.+-]+/)
|
|
412
|
+
for (x = 1; x <= nt; x++) {
|
|
413
|
+
if ((tok[x] in runner) || tok[x] ~ /^(python|pypy)[0-9.]*$/) strict = 1
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
if (strict) {
|
|
417
|
+
print "strict"
|
|
418
|
+
for (m = 1; m <= k; m++) print seg[m]
|
|
419
|
+
exit
|
|
420
|
+
}
|
|
421
|
+
print "relaxed"
|
|
422
|
+
for (m = 1; m <= k; m++) {
|
|
423
|
+
if (body[m]) continue
|
|
424
|
+
t = seg[m]; sub(/^[ \t]+/, "", t)
|
|
425
|
+
split(t, w, /[ \t]+/)
|
|
426
|
+
if (w[1] == "echo" || w[1] == "printf" || w[1] == "cat") print w[1]
|
|
427
|
+
else print seg[m]
|
|
262
428
|
}
|
|
263
|
-
print out
|
|
264
429
|
}'
|
|
265
430
|
}
|
|
266
431
|
|
|
267
|
-
#
|
|
432
|
+
# The executed view, computed once: its segments (the mode line dropped), and
|
|
433
|
+
# the segments joined into one whitespace-normalized line for whole-command
|
|
434
|
+
# checks.
|
|
435
|
+
_exec_out="$(executed_view)"
|
|
436
|
+
exec_segments="$(printf '%s\n' "$_exec_out" | tail -n +2)"
|
|
437
|
+
exec_norm="$(printf '%s' "$exec_segments" | tr '\n' ' ' | tr -s ' ')"
|
|
438
|
+
|
|
439
|
+
# Executed-view segments matching the extended regex $1, whitespace-normalized,
|
|
440
|
+
# one per line.
|
|
268
441
|
segments_matching() {
|
|
269
|
-
|
|
442
|
+
printf '%s\n' "$exec_segments" | tr -s ' \t' ' ' | grep -E -- "$1"
|
|
270
443
|
}
|
|
271
444
|
|
|
272
445
|
# Argument tokens following EACH `git push` in segment $1, one per line.
|
|
@@ -482,7 +655,7 @@ gh_pr_merge_target() {
|
|
|
482
655
|
|
|
483
656
|
# `git push` targeting the default branch (resolved dynamically; not hardcoded
|
|
484
657
|
# to `main` so a repo on `master`/`trunk` is protected identically).
|
|
485
|
-
if printf '%s' "$
|
|
658
|
+
if printf '%s' "$exec_norm" | grep -Eq "$_push_segment_re|[;&|]git +push"; then
|
|
486
659
|
default_branch="$(resolve_default_branch)"
|
|
487
660
|
if push_targets_ref "$default_branch"; then
|
|
488
661
|
block "pushing to '$default_branch' is not allowed. Open a PR; only the user may merge into $default_branch."
|
|
@@ -490,7 +663,7 @@ if printf '%s' "$norm" | grep -Eq "$_push_segment_re|[;&|]git +push"; then
|
|
|
490
663
|
fi
|
|
491
664
|
|
|
492
665
|
# `git merge`: two independent checks.
|
|
493
|
-
if printf '%s' "$
|
|
666
|
+
if printf '%s' "$exec_norm" | grep -Eq "${_cmd_prefix}git +merge([[:space:]]|$)|[;&|]git +merge([[:space:]]|$)"; then
|
|
494
667
|
current_branch="$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo '')"
|
|
495
668
|
default_branch="$(resolve_default_branch)"
|
|
496
669
|
|
|
@@ -637,7 +810,7 @@ if push_is_tag_push; then
|
|
|
637
810
|
fi
|
|
638
811
|
|
|
639
812
|
# Block `gh release create` (cutting a release implies creating a tag).
|
|
640
|
-
if printf '%s' "$
|
|
813
|
+
if printf '%s' "$exec_norm" | grep -Eq 'gh +release +create'; then
|
|
641
814
|
block "cutting a GitHub release is human-only (it creates a tag). See github-ops 'Tags'."
|
|
642
815
|
fi
|
|
643
816
|
|
|
@@ -38,6 +38,10 @@ Check with `gh api repos/<owner>/<repo>/branches/<default-branch>/protection` (a
|
|
|
38
38
|
|
|
39
39
|
See the README "Configure branch protection" step for the exact `gh api` invocation. You **MUST NOT** proceed to treat the project as fully initialized while branch protection remains unconfigured without the user's explicit acknowledgment.
|
|
40
40
|
|
|
41
|
+
## Repository Setup — GitHub Project (Recommended)
|
|
42
|
+
|
|
43
|
+
Alongside branch protection, recommend one GitHub Project per repository, so the PRD, wave and story issues that `activity-publish-github` creates appear on a board that GitHub keeps current without any agent writing to it. Setup is a one-time human step: `docs/runbooks/runbook-configure-github-project.md` keeps the template's Status options and GitHub's default workflows, narrows auto-add to `is:issue`, and names the three views to create by hand. No agent ever writes Project Status; a linked pull request and the issue closing at ship are what move it. Skipping this step changes nothing else in the workflow.
|
|
44
|
+
|
|
41
45
|
## Document Changelog Convention
|
|
42
46
|
|
|
43
47
|
Every document produced by this activity **MUST** include a **Changelog** table as the **first section** after the document title. The changelog tracks the version history of the document.
|
|
@@ -13,27 +13,36 @@ Publish user stories as GitHub Issues so GitHub becomes the source of truth for
|
|
|
13
13
|
|
|
14
14
|
## Goal
|
|
15
15
|
|
|
16
|
-
Take a list of user stories and publish them as GitHub Issues using
|
|
16
|
+
Take a list of user stories and publish them as GitHub Issues using the `gh` CLI, under one PRD tracking issue and one wave tracking issue, so GitHub becomes the source of truth for execution tracking and a GitHub Project can show the hierarchy and per-wave progress with no extra work.
|
|
17
17
|
|
|
18
18
|
## Context
|
|
19
19
|
|
|
20
|
-
This activity assumes the following
|
|
20
|
+
This activity assumes the following documents exist:
|
|
21
21
|
|
|
22
22
|
- `user-stories-[prd-name].md` — The comprehensive list of user stories (produced by the **generate-stories** activity)
|
|
23
|
+
- `docs/roadmap.md` — The roadmap row for this PRD; its `Phase/Wave` cell is the wave `<id>` used in the wave tracking issue title (github-ops § Title Format)
|
|
23
24
|
|
|
24
25
|
## Process
|
|
25
26
|
|
|
26
27
|
1. **Receive Input:** User provides the reference to the user stories file and the GitHub repository target.
|
|
27
28
|
2. **Clarify Publishing Rules:** You **MUST** ask for labeling, milestones, assignees, and any issue template constraints, and you **MUST** align them with `github-ops` conventions.
|
|
28
|
-
3. **
|
|
29
|
-
|
|
30
|
-
|
|
29
|
+
3. **Find or Create the Tracking Issues:** Before any story is created, you **MUST** find or create the PRD tracking issue, then the wave tracking issue. Each is found by its `level:` label plus its title prefix (the title forms are defined by github-ops § Title Format); nothing is stored in a workstream file.
|
|
30
|
+
- PRD: `gh issue list --label "level: prd" --search "[PRD-<name>] in:title" --state open --json number,title --jq 'map(select(.title | startswith("[PRD-<name>]")))'`
|
|
31
|
+
- Wave: `gh issue list --label "level: wave" --search "[PRD-<name>] Wave <id>: in:title" --state open --json number,title --jq 'map(select(.title | startswith("[PRD-<name>] Wave <id>:")))'`
|
|
32
|
+
- The `--jq` filter is applied client-side before counting, because GitHub's `in:title` search tokenises brackets and hyphens leniently and can return siblings such as `[PRD-<name>-v2]`.
|
|
33
|
+
- Exactly one match: reuse that issue number. Zero matches: create the issue with `gh issue create --title ... --label "level: prd" --body-file <path>` (or `level: wave`); tracking issues carry their `level:` label only, never `type:` or `priority:`. More than one match: stop, list the matching issue numbers, and ask the user which one to keep; never pick one silently.
|
|
34
|
+
- The PRD issue body follows the PRD tracking issue template and the wave issue body the wave tracking issue template, both under Issue Formatting Rules.
|
|
35
|
+
4. **Map Stories to Issues:** You **MUST** create one GitHub Issue per user story, labeled `level: story` plus exactly one `type:` label from the github-ops type set (`enhancement`, `bug`, `security`, `refactor`, `test`, `docs`, `chore`, `tech-debt`) and one `priority:` label. When a story fits several types, the github-ops tie-break order picks it; a story is never published with zero or two `type:` labels, and never with a retired one such as `type: other` (D-85).
|
|
36
|
+
5. **Publish to GitHub:** You **MUST** delegate issue creation and metadata application to `github-ops` whenever possible. After each story issue is created, you **MUST** attach it as a sub-issue of the wave issue (see Sub-issue Hierarchy).
|
|
37
|
+
6. **Attach and Verify the Hierarchy:** After all stories are created, attach the wave under the PRD issue if not already attached, read both `sub_issues` lists back, and record the `hierarchy:` result in the publication report.
|
|
38
|
+
7. **Write the PRD Status Comment:** After the hierarchy is verified, create or edit the PRD issue's status comment in the shape of github-ops § Status comment's PRD table, found by its marker and written with implement § Status Comment's find-by-marker, create and PATCH procedure: the published wave's row reads `published`, with its wave issue number. An existing row for this wave is edited in place, never added a second time, and every other wave's row is kept as it is. The PRD issue is the one step 3 resolved, as the report's `PRD issue` line records it; when there is none, run step 3's `level: prd` search again, and with no PRD issue, skip the write. Record `prd_status: written | failed(<reason>) | skipped(no PRD issue)` in the publication report; a refused write is `failed(<reason>)`, and a failed write never stops the publication.
|
|
39
|
+
8. **Save Output.**
|
|
31
40
|
|
|
32
41
|
Execution method rules:
|
|
33
42
|
|
|
34
|
-
-
|
|
35
|
-
-
|
|
36
|
-
- The selected method (`
|
|
43
|
+
- The `gh` CLI is the primary execution path for every call in this activity.
|
|
44
|
+
- A GitHub MCP server is optional; if one is configured in this session, it **MAY** be used instead.
|
|
45
|
+
- The selected method (`gh-cli` or `github-mcp`) **MUST** be recorded in the publication report.
|
|
37
46
|
|
|
38
47
|
If `github-ops` delegation is unavailable in the current runtime, you **MUST** apply `github-ops` issue, label, milestone, and comment conventions directly and explicitly note that fallback in your status output.
|
|
39
48
|
|
|
@@ -46,14 +55,17 @@ Attribution rules:
|
|
|
46
55
|
- "Which GitHub repository should I publish to? (`owner/repo`)"
|
|
47
56
|
- "Do you want labels, milestones, or assignees added?"
|
|
48
57
|
- "Should I use a specific issue template or format?"
|
|
49
|
-
- "Do you want a parent epic issue or project board association?"
|
|
50
58
|
- "Should I skip stories below a certain priority or size?"
|
|
51
59
|
|
|
60
|
+
The tracking-issue hierarchy is not optional, so no question asks for it.
|
|
61
|
+
|
|
52
62
|
## Issue Formatting Rules
|
|
53
63
|
|
|
54
|
-
|
|
64
|
+
### Story issues
|
|
65
|
+
|
|
66
|
+
Each story GitHub Issue **MUST** be created using:
|
|
55
67
|
|
|
56
|
-
- **Title:** `
|
|
68
|
+
- **Title:** the `PRD story` row of github-ops § Title Format
|
|
57
69
|
- **Body:**
|
|
58
70
|
- User Story (role, goal, benefit)
|
|
59
71
|
- Context
|
|
@@ -71,6 +83,53 @@ Each GitHub Issue **MUST** be created using:
|
|
|
71
83
|
|
|
72
84
|
For JS/TS projects, command examples in issues **MUST** prefer `pnpm` and canonical scripts (`pnpm run <script>`).
|
|
73
85
|
|
|
86
|
+
### PRD tracking issue body
|
|
87
|
+
|
|
88
|
+
The PRD issue body is the entry point to the whole PRD: its title line, a link to the PRD file and to its `docs/roadmap.md` row, and the list of waves. It carries no checkboxes, because progress lives in the issue's status comment (github-ops § Status comment) and in the sub-issue progress GitHub derives from the hierarchy. Each wave line is added, or its issue number filled in, by the publish run that creates that wave's tracking issue.
|
|
89
|
+
|
|
90
|
+
```markdown
|
|
91
|
+
# <PRD title>
|
|
92
|
+
|
|
93
|
+
PRD: [docs/requirements/prd-<prd-name>.md](/docs/requirements/prd-<prd-name>.md)
|
|
94
|
+
Roadmap: [docs/roadmap.md](/docs/roadmap.md)
|
|
95
|
+
|
|
96
|
+
## Waves
|
|
97
|
+
|
|
98
|
+
- Wave <id>: #<wave-issue> — <wave title>
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### Wave tracking issue body
|
|
102
|
+
|
|
103
|
+
The wave issue body carries the wave's scope and its artifacts; it carries no checkboxes, because progress lives in the issue's status comment (github-ops § Status comment) and in the sub-issue progress GitHub derives from the hierarchy. `Integration branch` stays `TBD` until the planner starts the run; `Task plan` stays `pending` until the task list exists.
|
|
104
|
+
|
|
105
|
+
```markdown
|
|
106
|
+
Scope: <the wave's scope line from the PRD's delivery table>
|
|
107
|
+
Integration branch: TBD
|
|
108
|
+
|
|
109
|
+
## Artifacts
|
|
110
|
+
|
|
111
|
+
- Specification: [workstream/specification-<prd-name>.md](/workstream/specification-<prd-name>.md)
|
|
112
|
+
- Stories: [workstream/user-stories-<prd-name>.md](/workstream/user-stories-<prd-name>.md)
|
|
113
|
+
- Task plan: pending
|
|
114
|
+
|
|
115
|
+
## Stories
|
|
116
|
+
|
|
117
|
+
- S-001: <title>
|
|
118
|
+
- S-002: <title>
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### Sub-issue hierarchy
|
|
122
|
+
|
|
123
|
+
Stories are sub-issues of the wave issue, and the wave issue is a sub-issue of the PRD issue. Every call is REST through `gh api` with `repo` scope:
|
|
124
|
+
|
|
125
|
+
- Child numeric id: `gh api repos/{o}/{r}/issues/{n} --jq .id` (the sub-issue endpoint takes the numeric id, not the issue number).
|
|
126
|
+
- Attach a story under the wave, immediately after the story is created: `gh api -X POST repos/{o}/{r}/issues/{wave}/sub_issues -F sub_issue_id=<id>`.
|
|
127
|
+
- Attach the wave under the PRD with the same call against `issues/{prd}/sub_issues`, if not already listed there.
|
|
128
|
+
- Verify: `gh api repos/{o}/{r}/issues/{wave}/sub_issues --jq '.[].number'` lists every story created in this run, and the PRD's list contains the wave.
|
|
129
|
+
- Report `hierarchy: verified(<n> of <n>)` when every attach is confirmed, or `hierarchy: failed(<reason>)` naming the first failed attach. A failed attach is reported, never retried silently, and never stops the remaining stories from being created.
|
|
130
|
+
|
|
131
|
+
Every issue body goes through `--body-file <path>`; inline `--body` is blocked by git-guard.
|
|
132
|
+
|
|
74
133
|
All issue formatting and metadata **MUST** conform to `github-ops` conventions.
|
|
75
134
|
|
|
76
135
|
## Output Structure
|
|
@@ -85,6 +144,13 @@ You **MUST** create a publication report:
|
|
|
85
144
|
- Repo: owner/repo
|
|
86
145
|
- Date: YYYY-MM-DD
|
|
87
146
|
|
|
147
|
+
## Tracking Issues
|
|
148
|
+
|
|
149
|
+
- PRD issue: #<number> (reused | created)
|
|
150
|
+
- Wave issue: #<number> (reused | created)
|
|
151
|
+
- Hierarchy: verified(<n> of <n>) | failed(<reason>)
|
|
152
|
+
- prd_status: written | failed(<reason>) | skipped(no PRD issue)
|
|
153
|
+
|
|
88
154
|
## Created Issues
|
|
89
155
|
|
|
90
156
|
| Story ID | Story Title | Issue URL | Labels | Milestone | Assignee |
|
|
@@ -97,7 +163,7 @@ You **MUST** create a publication report:
|
|
|
97
163
|
- Any skipped stories and why
|
|
98
164
|
- Any template or permission limitations
|
|
99
165
|
- Any manual follow-up needed
|
|
100
|
-
- Execution method used: `
|
|
166
|
+
- Execution method used: `gh-cli` or `github-mcp`
|
|
101
167
|
- Assisted-by value used for PR creation/issue closure (if applicable)
|
|
102
168
|
```
|
|
103
169
|
|
|
@@ -111,6 +177,9 @@ You **MUST** create a publication report:
|
|
|
111
177
|
|
|
112
178
|
1. You **MUST** read the user stories file.
|
|
113
179
|
2. You **MUST** ask clarifying questions and confirm the target repo.
|
|
114
|
-
3. You **MUST**
|
|
115
|
-
4. You **MUST**
|
|
116
|
-
5. You **MUST**
|
|
180
|
+
3. You **MUST** find or create the PRD and wave tracking issues before publishing any story; more than one match stops the run.
|
|
181
|
+
4. You **MUST** publish each story as a GitHub Issue by delegating to `github-ops` whenever possible, and attach it as a sub-issue of the wave issue.
|
|
182
|
+
5. You **MUST** attach the wave under the PRD issue, verify the hierarchy, and record the `hierarchy:` result.
|
|
183
|
+
6. You **MUST** create or edit the PRD issue's status comment so the wave's row reads `published`, and record `prd_status` in the publication report.
|
|
184
|
+
7. You **MUST** save the publication report with the tracking issue numbers and issue links.
|
|
185
|
+
8. You **MUST** inform the user that GitHub is now the source of truth for execution tracking.
|
|
@@ -119,10 +119,26 @@ When `workstream/decisions-<feature>.md` exists and was read per step 2 above:
|
|
|
119
119
|
- If drift is detected between local and GitHub, you **MUST** reconcile immediately and report the reconciliation.
|
|
120
120
|
- If schema/data-model changes are in scope, migration artifacts **MUST** be tracked in the task list unless an explicit opt-out rationale is documented.
|
|
121
121
|
|
|
122
|
-
###
|
|
123
|
-
|
|
124
|
-
- You **
|
|
125
|
-
- You **SHOULD** route
|
|
122
|
+
### Status Comment
|
|
123
|
+
|
|
124
|
+
- You **MUST** keep the story's status comment current per `github-ops` § Status comment: create it at the first sub-task completion, edit it in place at every later sub-task completion, at PR open, at each gate recorded, and on block. The template (marker, prefix line, story table) lives in `github-ops` and is never restated here.
|
|
125
|
+
- You **SHOULD** route the status-comment write through `github-ops` whenever possible; when delegation is unavailable, run the commands below directly.
|
|
126
|
+
- Procedure, for story issue `{n}` of `repos/{o}/{r}`:
|
|
127
|
+
1. Find the comment by its marker: `gh api repos/{o}/{r}/issues/{n}/comments --paginate --jq '.[] | select(.body | startswith("<!-- dev-tasks:status -->")) | .id'`.
|
|
128
|
+
2. Absent → create it: `gh issue comment {n} --body-file <path>`.
|
|
129
|
+
3. Present → edit it in place: `gh api -X PATCH repos/{o}/{r}/issues/comments/{id} -F body=@<path>`.
|
|
130
|
+
4. Two or more comments carry the marker → edit the oldest (lowest id), never post another, and report `status_comment: failed(duplicate marker)` so a human removes the extra one.
|
|
131
|
+
5. The marker is the first byte of the body file — no leading blank line, whitespace or BOM — because the `startswith` match on line one is how the comment is found; a marker on line two means a second comment gets posted. The body always goes through a file, never inline.
|
|
132
|
+
- Each write is reported as `status_comment: written | failed(<reason>) | skipped(no issue)`. A task list with no GitHub Issue skips the comment and reports `skipped(no issue)`; a refused write (permissions, locked issue) reports `failed(<reason>)`. A failed write never blocks the sub-task — it is reported, never dropped silently.
|
|
133
|
+
|
|
134
|
+
### Wave Status Update (Main Thread Only)
|
|
135
|
+
|
|
136
|
+
- Under the `planner`, the wave's status comment belongs to the planner: report `wave_status: owned-by-planner` and do nothing further.
|
|
137
|
+
- In the main thread with no planner (the interactive `/developer` command), after PR open and at PR ready you **MUST** look up the story's parent: `gh api repos/{o}/{r}/issues/{n}/parent`.
|
|
138
|
+
- `200` → edit this story's row (state, PR, sub-task count) in the wave issue's status comment, found and edited by the same marker procedure above, and report `wave_status: written`. If the wave issue has no status comment yet, create it from the wave table in `github-ops` § Status comment and report `wave_status: written`.
|
|
139
|
+
- Header lines on this path, which has no integration branch (D-75, RD-17): `Current story` names this story; `Last merged PR` and `Integration HEAD` keep the existing comment's values when editing it and read `none` when creating the comment; `Gates` carries this story's gates.
|
|
140
|
+
- `404` → the story has no parent (published before the hierarchy convention); report `wave_status: skipped(no parent)`. This is expected, not an error.
|
|
141
|
+
- A refused read or write → `wave_status: failed(<reason>)`; it never blocks the sub-task.
|
|
126
142
|
|
|
127
143
|
---
|
|
128
144
|
|
|
@@ -153,19 +169,19 @@ When `workstream/decisions-<feature>.md` exists and was read per step 2 above:
|
|
|
153
169
|
- PRs targeting **`main`**: the **user** reviews and approves.
|
|
154
170
|
|
|
155
171
|
11. The PR **MUST** be merged by the authorized party (planner for integration branches, user for `main`).
|
|
156
|
-
12.
|
|
157
|
-
13. You **MUST NOT** close the issue
|
|
172
|
+
12. Nobody closes the GitHub Issue: not the implementing agent, not the `planner`. It closes when a PR against the default branch carrying `Closes #N` merges: under the `planner` that is the consolidated PR, and in a main-thread run with no planner (the interactive `/developer` command) it is the story PR itself. A story PR into an integration branch closes nothing, because GitHub ignores closing keywords on a PR whose base is not the default branch.
|
|
173
|
+
13. You **MUST NOT** close the issue by hand at any point, before or after the merge; if it is still open after the closing PR merged, report that instead of closing it.
|
|
158
174
|
14. You **MUST** notify the user when the PR is ready for review — explicitly inform them so they can review and merge.
|
|
159
175
|
|
|
160
176
|
---
|
|
161
177
|
|
|
162
178
|
## GitHub Execution Rules Summary
|
|
163
179
|
|
|
164
|
-
| Phase | Rule
|
|
165
|
-
| ------------------ |
|
|
166
|
-
| **Before coding** | Confirm issue open → Create branch (`github-ops`) → First commit → Open draft PR (`github-ops`) → Sync checklists
|
|
167
|
-
| **During coding** | One sub-task at a time → Mark `[x]` locally + GitHub → Wait for approval
|
|
168
|
-
| **Before closing** | All ACs verified → Quality gates pass (test/lint/format/typecheck/audit) → migration confirmation/apply/verify (when applicable) → docs drift check clear → coverage_gate recorded → verifier audit run + summary posted (non-blocking on drift) → PR ready → Approved → Merged →
|
|
180
|
+
| Phase | Rule |
|
|
181
|
+
| ------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
182
|
+
| **Before coding** | Confirm issue open → Create branch (`github-ops`) → First commit → Open draft PR (`github-ops`) → Sync checklists |
|
|
183
|
+
| **During coding** | One sub-task at a time → Mark `[x]` locally + GitHub → Update the status comment (`github-ops` § Status comment) → Wait for approval |
|
|
184
|
+
| **Before closing** | All ACs verified → Quality gates pass (test/lint/format/typecheck/audit) → migration confirmation/apply/verify (when applicable) → docs drift check clear → coverage_gate recorded → verifier audit run + summary posted (non-blocking on drift) → PR ready → Approved → Merged → GitHub closes the issue (`Closes #N` on a default-branch PR) |
|
|
169
185
|
|
|
170
186
|
---
|
|
171
187
|
|
|
@@ -178,7 +194,7 @@ When `workstream/decisions-<feature>.md` exists and was read per step 2 above:
|
|
|
178
194
|
## Final Instructions
|
|
179
195
|
|
|
180
196
|
1. You **MUST** always respect the task list execution order.
|
|
181
|
-
2. You **MUST** keep the GitHub Issue updated with checklist and
|
|
197
|
+
2. You **MUST** keep the GitHub Issue updated with its checklist and its status comment.
|
|
182
198
|
3. You **MUST** ensure branch, PR, and issue naming follow `github-ops` conventions.
|
|
183
199
|
4. You **MUST** stop after each sub-task and request user approval.
|
|
184
|
-
5. You **MUST NOT** close a GitHub Issue
|
|
200
|
+
5. You **MUST NOT** close a GitHub Issue by hand: nobody closes it; it closes when a PR against the default branch carrying `Closes #N` merges.
|
|
@@ -118,6 +118,7 @@ memo write \
|
|
|
118
118
|
--entry-type decision \
|
|
119
119
|
--source agent \
|
|
120
120
|
--provenance "<csv of episodic entry ids this consolidates, if any>" \
|
|
121
|
+
--on-duplicate create-new \
|
|
121
122
|
--json
|
|
122
123
|
```
|
|
123
124
|
|
|
@@ -166,7 +167,8 @@ A `semantic` entry with `--source agent` **MUST** carry `--provenance <csv>` unl
|
|
|
166
167
|
## Agent Mode Rules
|
|
167
168
|
|
|
168
169
|
- Always pass `--json` for parseable output
|
|
169
|
-
- Always pass `--on-duplicate
|
|
170
|
+
- Always pass `--on-duplicate` for writes; in `--json` mode memo-cli fails on a duplicate without it
|
|
171
|
+
- Pass `create-new` for distinct decisions, one entry per decision row (a feature's decision write-back); pass `consolidate` only when restating or updating the same decision, such as re-writing an entry after an amendment on the same story and commit to correct its rationale (D-78)
|
|
170
172
|
- Never log API keys or secrets
|
|
171
173
|
- Bulk delete is blocked in `--json` mode (safety guard)
|
|
172
174
|
|
|
@@ -26,8 +26,10 @@ This activity adapts to the input — it works with a user stories file (from th
|
|
|
26
26
|
2. **Review Available Work:** You **MUST** read the source and list available stories or the issue scope.
|
|
27
27
|
3. **Select Scope:** In Stories Mode, you **MUST** ask which stories to include. In Issue Mode, the scope is the single issue.
|
|
28
28
|
4. **Generate Task List:** You **MUST** produce a `tasks-*.md` file in the required format.
|
|
29
|
+
- **Plan header:** The header carries `Source:` (the source document) and, on the next line, `Wave issue: #N`, its own line with no bold or backticks so the planner can read it at Phase 0. In Stories Mode, take the number from the publication report's `Wave issue` line (`workstream/github-publication-<prd-name>.md`, written by `activity-publish-github`). When the report predates the tracking hierarchy or has no `Wave issue` line, or in Issue Mode, write `Wave issue: none` and add a `> Note:` line under it saying the planner will search for the wave issue at Phase 0. When the plan fully resolves follow-up issues outside its story set, add a `Resolves: #N, #M` line after `Wave issue:`; the planner carries `Closes #N` for each on the consolidated PR (planner D-74). Omit the line when there are none.
|
|
29
30
|
5. **Publish to GitHub:** You **MUST** update the corresponding GitHub Issue(s) with the task checklist by delegating to `github-ops` whenever possible.
|
|
30
31
|
6. **Save Output.**
|
|
32
|
+
7. **Set the Task Plan Line:** When the plan header reads `Wave issue: #N`, set the wave issue body's `Task plan:` line under `## Artifacts` to a root-relative link to the saved task list, after the file is saved: read the body with `gh issue view <N> --json body --jq .body` into a file, change only that line, and write it back with `gh issue edit <N> --body-file <path>`. With `Wave issue: none` there is no wave issue body to edit, and the line stays `pending` until a later plan names the wave issue.
|
|
31
33
|
|
|
32
34
|
## Package Manager and Command Standards
|
|
33
35
|
|
|
@@ -56,6 +58,9 @@ The task list **MUST** follow this structure:
|
|
|
56
58
|
```markdown
|
|
57
59
|
# Implementation Plan - [Name]
|
|
58
60
|
|
|
61
|
+
Source: `[path to the user stories file or refined issue]`
|
|
62
|
+
Wave issue: #N
|
|
63
|
+
|
|
59
64
|
## Relevant Files
|
|
60
65
|
|
|
61
66
|
- `path/to/file1.ts` - [Description]
|
|
@@ -184,4 +189,5 @@ If this is a **greenfield project** or a **new component**, you **MUST** include
|
|
|
184
189
|
8. For schema/data-model changes, you **MUST** include migration lifecycle tasks and an explicit user-confirmation gate before applying migrations unless an opt-out rationale is documented.
|
|
185
190
|
9. You **MUST** update the corresponding GitHub Issue(s) with the task checklist by delegating to `github-ops` whenever possible. If no issue exists, you **MUST** ask the user whether to create one first.
|
|
186
191
|
10. You **MUST** save the task list file.
|
|
192
|
+
10a. When the wave issue is known, you **MUST** set its body's `Task plan:` Artifacts line to the saved task list (Process step 7).
|
|
187
193
|
11. You **MUST** inform the user they can now use the **implement** activity to start coding.
|