@plot-pm/board 0.19.0 → 0.20.0

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/plot-plan-meta.sh CHANGED
@@ -166,6 +166,16 @@
166
166
  # charter name is a bare word with no structure to check, so a
167
167
  # template documents the marker inside an outer comment block,
168
168
  # where this pattern cannot see it.
169
+ # `→ commit abc1234` / `→ commit abc1234, def5678` /
170
+ # `→ owner/repo@abc1234` name the COMMITS that completed the
171
+ # slice, reported as `waves[].branches[].commits` in line order.
172
+ # The commit spelling of `→ #N` / `→ owner/repo#N`, for a slice
173
+ # pushed straight to the default branch with no PR. A commit is
174
+ # 7 or more lowercase hex digits; a cross-repository one keeps
175
+ # its `owner/repo@` prefix because a consumer must tell it from
176
+ # one of this repository. ABSENT where none is named, never [];
177
+ # both slice dialects read it from the branch-carrying line.
178
+ # It adds nothing to `prs`: a commit is not a PR.
169
179
  # prs PR numbers, sorted and unique, read from EITHER spelling:
170
180
  # `→ #NNN` / `→ owner/repo#NNN` links in the `## Branches`
171
181
  # section, OR `PR: #NNN` in a `## Waves` `### ` heading. The
@@ -173,6 +183,10 @@
173
183
  # are a plan's evidence, and plot-host.sh resolves where each
174
184
  # one lives. An absent PR contributes nothing — not "", not 0 —
175
185
  # the same rule `Issue:` follows.
186
+ # deferred_prs PR numbers read from a branch line or slice heading that
187
+ # carries a `deferred:`/`moved:` annotation, in document order.
188
+ # Every one is also in `prs`. The release record reads the last
189
+ # PR of `prs` that is not here. [] when no deferred line names one.
176
190
  # malformed_prs near-miss annotations, verbatim — currently `→#NNN` with no
177
191
  # space. Reported rather than dropped: "no annotation" is a
178
192
  # claim the sweep acts on, so a typo that reads as absence
@@ -240,11 +254,17 @@
240
254
  # Empty until /plot-release records it; the tag stays the git
241
255
  # truth and this merely reflects it.
242
256
  # design_raw the design transition record as written (`## Status`
243
- # `Design:` or front matter `design:` — who/when, and what the
244
- # design work is); "" if absent. Reported for any plan that
257
+ # `Design:` or front matter `design:` — who/when/channel, e.g.
258
+ # "2026-10-12, alice, cli"); "" if absent. Reported for any plan that
245
259
  # carries the line, whatever its phase: a plan that WENT
246
260
  # THROUGH design keeps the record after moving on, exactly as
247
261
  # `approved_raw` outlives the Approved phase.
262
+ # spike_approved_raw the `Spike approved:` record as written (`## Status`);
263
+ # "" if absent. Read by the spike rules, never decided here.
264
+ # tracer true when `## Status` says `Tracer: yes`; the key is ABSENT
265
+ # otherwise, because no line is no reading
266
+ # waves[].branches[].spike true when the branch line carries a bare
267
+ # `<!-- spike -->`; ABSENT otherwise
248
268
  # approved_raw the approval transition record as written (`## Status`
249
269
  # `Approved:` or front matter `approved:` — who/when/channel,
250
270
  # e.g. "2026-07-30, alice, in-session"); "" if absent
@@ -255,6 +275,8 @@
255
275
  # record left empty (a bookkeeping fault plot-reconcile-scan
256
276
  # reports), and a consumer that needs a DATE must read this
257
277
  # rather than infer one from the phase.
278
+ # verified_raw the `Verified:` record of `## Status`, outside fences; "" if
279
+ # absent or a placeholder. The board passes it to verificationOf.
258
280
  # started_raw implementation-start records, one raw string per
259
281
  # `Started:` line in `## Status` (repeatable; front matter
260
282
  # `started:` contributes one entry); [] if absent.
@@ -307,7 +329,7 @@ if [ ${#files[@]} -eq 0 ] && [ ${#missing[@]} -eq 0 ]; then
307
329
  fi
308
330
 
309
331
  for f in ${missing[@]+"${missing[@]}"}; do
310
- printf '{"file":"%s","format":"none","error":"file not found","phase_raw":"","phase":"NONE","phase_alt_raw":"","phase_alt":"NONE","type":"","title":"","sprint":"","story":"","assignee":"","branches":[],"prs":[],"issues":[],"malformed_prs":[],"changelog":[],"long_wave_names":[],"unread_branch_headings":[],"unread_waits":[],"review_raw":"","review":"NONE","impl_raw":"","impl":"NONE","design_raw":"","approved_raw":"","released_raw":"","delivered_raw":"","started_raw":[]}\n' \
332
+ printf '{"file":"%s","format":"none","error":"file not found","phase_raw":"","phase":"NONE","phase_alt_raw":"","phase_alt":"NONE","type":"","title":"","sprint":"","story":"","assignee":"","branches":[],"prs":[],"deferred_prs":[],"issues":[],"malformed_prs":[],"changelog":[],"long_wave_names":[],"unread_branch_headings":[],"unread_waits":[],"review_raw":"","review":"NONE","impl_raw":"","impl":"NONE","design_raw":"","spike_approved_raw":"","approved_raw":"","released_raw":"","delivered_raw":"","verified_raw":"","started_raw":[]}\n' \
311
333
  "$(printf '%s' "$f" | sed 's/\\/\\\\/g; s/"/\\"/g')"
312
334
  done
313
335
 
@@ -482,11 +504,11 @@ function reset_state() {
482
504
  fm_title = ""; fm_sprint = ""; fm_story = ""; fm_assignee = ""
483
505
  fm_review = ""; fm_impl = ""; fm_approved = ""; fm_started = ""; fm_released = ""
484
506
  fm_delivered = ""; fm_design = ""
485
- fm_rounds = ""
486
- canon_state = ""; canon_phase = ""; canon_type = ""
507
+ canon_spike_approved = ""; canon_tracer = ""
508
+ fm_rounds = ""; canon_state = ""; canon_phase = ""; canon_type = ""
487
509
  canon_sprint = ""; canon_story = ""; canon_assignee = ""; status_assignee = ""
488
510
  canon_review = ""; canon_impl = ""; canon_approved = ""; canon_released = ""
489
- canon_delivered = ""; canon_design = ""
511
+ canon_delivered = ""; canon_design = ""; canon_verified = ""
490
512
  canon_rounds = ""
491
513
  h1_title = ""
492
514
  # "" means the plan carries no readable round — NOT zero. Emitted by omitting
@@ -495,18 +517,15 @@ function reset_state() {
495
517
  block_rounds = ""
496
518
  in_fm = 0; section = ""; in_comment = 0; in_challenge = 0; in_fence = 0; slices_seen = 0; slice_shape = ""
497
519
  delete branches; n_branches = 0
498
- delete prs; n_prs = 0
520
+ delete prs; n_prs = 0; delete dprs; n_dprs = 0
499
521
  delete malformed_prs; n_malformed_prs = 0
500
522
  fm_issue = ""; canon_issue = ""
501
523
  delete issues; n_issues = 0
502
524
  delete wave_names; delete wave_of; delete wave_seq; delete wave_count
503
- delete deferred_of; delete deferred_why; delete claimed_of; delete ordered_b; n_waves = 0
504
- delete branch_heading
505
- delete waits_of; delete waits_set; delete waits_n
525
+ delete deferred_of; delete deferred_why; delete claimed_of; delete ordered_b; delete spike_of; n_waves = 0
526
+ delete branch_heading; delete waits_of; delete waits_set; delete waits_n
506
527
  delete unread_waits_branch; delete unread_waits_value; n_unread_waits = 0
507
- delete builds_of; delete builds_set
508
- delete agent_of; delete agent_set
509
- delete started; n_started = 0
528
+ delete builds_of; delete agent_of; delete commits_of; delete started; n_started = 0
510
529
  fm_changelog = ""
511
530
  delete changelog; n_changelog = 0; changelog_seen = 0; cl_open = 0
512
531
  }
@@ -645,7 +664,7 @@ function emit_record( fmt, praw, palt_raw, traw, title, sprint, story, assigne
645
664
  for (i = 1; i <= nb; i++) out = out (i > 1 ? "," : "") "\"" jesc(sorted_b[i]) "\""
646
665
  out = out "],\"prs\":["
647
666
  for (i = 1; i <= np; i++) out = out (i > 1 ? "," : "") sorted_p[i]
648
- out = out "],\"issues\":["
667
+ out = out "],\"deferred_prs\":["; for (i = 1; i <= n_dprs; i++) out = out (i > 1 ? "," : "") (dprs[i] + 0); out = out "],\"issues\":["
649
668
  for (i = 1; i <= ni; i++) {
650
669
  # Numeric issues output as JSON numbers; string issues (Jira keys) as quoted.
651
670
  if (sorted_i[i] in issue_is_str)
@@ -676,6 +695,8 @@ function emit_record( fmt, praw, palt_raw, traw, title, sprint, story, assigne
676
695
  out = out (first ? "" : ",") "{\"branch\":\"" jesc(ordered_b[i]) "\",\"deferred\":" deferred_of[i] \
677
696
  ",\"deferred_reason\":\"" jesc(deferred_why[i]) "\"" \
678
697
  ",\"claimed\":\"" jesc(claimed_of[i]) "\""
698
+ # ABSENT, NOT false, where the branch line carries no `<!-- spike -->`.
699
+ if (spike_of[i] == 1) out = out ",\"spike\":true"
679
700
  # ABSENT, NOT EMPTY ARRAY, where no prerequisite was declared. The key
680
701
  # appears only on a branch whose line carries a `waits:` annotation, so a
681
702
  # consumer reading `waits_on` gets a list of one or more names or no key
@@ -691,14 +712,18 @@ function emit_record( fmt, praw, palt_raw, traw, title, sprint, story, assigne
691
712
  # ABSENT, NOT EMPTY, for the same reason `waits_on` is: a slice that
692
713
  # names no deliverable emits no key, so a consumer reads a name or
693
714
  # nothing. An empty string would read as a deliverable called "".
694
- if (builds_set[i] == 1) out = out ",\"builds\":\"" jesc(builds_of[i]) "\""
715
+ if (builds_of[i] != "") out = out ",\"builds\":\"" jesc(builds_of[i]) "\""
695
716
  # ABSENT, NOT EMPTY, the rule the three annotations above already keep.
696
717
  # Dispatch reads the PRESENCE of this key to decide whether the plan names
697
718
  # a kind at all, so an `"agent":""` would read as a charter called "" and
698
719
  # send it looking for `.plot/charters/.json`.
699
720
  # NOTE: no apostrophe may appear in this awk region — the whole program is
700
721
  # one single-quoted shell string, and one closes it mid-comment.
701
- if (agent_set[i] == 1) out = out ",\"agent\":\"" jesc(agent_of[i]) "\""
722
+ if (agent_of[i] != "") out = out ",\"agent\":\"" jesc(agent_of[i]) "\""
723
+ # ABSENT, NOT EMPTY, as the annotations above: the commits the slice line
724
+ # names as its completion, `abc1234` or `owner/repo@abc1234`, in line order.
725
+ # Hex and owner/repo characters need no escaping.
726
+ if (commits_of[i] != "") { cm = commits_of[i]; gsub(/,/, "\",\"", cm); out = out ",\"commits\":[\"" cm "\"]" }
702
727
  out = out "}"
703
728
  first = 0
704
729
  }
@@ -754,9 +779,12 @@ function emit_record( fmt, praw, palt_raw, traw, title, sprint, story, assigne
754
779
  out = out ",\"review_raw\":\"" jesc(review) "\",\"review\":\"" norm_review(review) "\""
755
780
  out = out ",\"impl_raw\":\"" jesc(impl) "\",\"impl\":\"" norm_impl(impl) "\""
756
781
  out = out ",\"design_raw\":\"" jesc(design) "\""
782
+ out = out ",\"spike_approved_raw\":\"" jesc(canon_spike_approved) "\""
783
+ # ABSENT unless `## Status` says `Tracer: yes`: no line is no reading.
784
+ if (tolower(canon_tracer) ~ /^(yes|true)/) out = out ",\"tracer\":true"
757
785
  out = out ",\"approved_raw\":\"" jesc(approved) "\""
758
786
  out = out ",\"released_raw\":\"" jesc(released) "\""
759
- out = out ",\"delivered_raw\":\"" jesc(delivered) "\""
787
+ out = out ",\"delivered_raw\":\"" jesc(delivered) "\",\"verified_raw\":\"" jesc(canon_verified) "\""
760
788
  out = out ",\"started_raw\":["
761
789
  for (i = 1; i <= n_started; i++) out = out (i > 1 ? "," : "") "\"" jesc(started[i]) "\""
762
790
  out = out "]"
@@ -800,6 +828,174 @@ function store_waits(n, b, k) {
800
828
  }
801
829
  delete pending_unread_value; pending_unread_n = 0
802
830
  }
831
+ # Reads every annotation that binds to the line carrying a branch name, into
832
+ # claim_note, defer_note, line_waits[], builds_note and agent_note. Called by BOTH
833
+ # slice dialects before their branch match, which clobbers RSTART/RLENGTH.
834
+ function read_notes() {
835
+ # Claim reflection, written by the worker after its ref push succeeds. This is
836
+ # a reflection, not the claim: git refs remain authoritative. Computed before
837
+ # the branch loop below — match() clobbers RSTART/RLENGTH, which that loop
838
+ # needs to advance.
839
+ claim_note = (index($0, "claimed:") > 0) ? marker_value($0, "claimed") : ""
840
+ # THE REASON FOR THE DEFERRAL, and not merely the fact of one.
841
+ #
842
+ # `<!-- deferred: verified already implemented 2026-08-17 — startRepair() at
843
+ # fleet.ts:806 -->` was tested for presence and the sentence after the colon
844
+ # was dropped on the floor. So the board could say `deferred` beside `no
845
+ # commits` and never say that the first is the REASON for the second — a
846
+ # reader with no access to the plan file saw a branch nobody started and no
847
+ # statement that nobody should.
848
+ #
849
+ # Extracted the same way and in the same place as the claim note, for the same
850
+ # reason: `match()` in the branch loop below clobbers RSTART/RLENGTH, so
851
+ # anything read from the whole line must be read before it runs.
852
+ #
853
+ # Newlines are already impossible here — awk hands this rule one line, and the
854
+ # documented contract is that an annotation binds to the line carrying the
855
+ # branch name. A deferral whose text is wrapped onto a continuation line is
856
+ # not seen, exactly as `deferred` itself was not.
857
+ # `moved:` IS THE SAME ANSWER AS `deferred:`, and CLAUDE.md has said so since
858
+ # the reconcile scan was written: *"`deferred:`/`moved:` in the plan means
859
+ # reapable"*. `plot-reconcile-scan.sh:504` matches both in one arm; this
860
+ # parser matched only the first, so a slice given up with the other word read
861
+ # as still outstanding — to the board, the delivery gate and the fleet alike.
862
+ # Measured 2026-09-04 on `feature/the-reaper-sweeps-every-kind`: annotated
863
+ # `moved:` into the slice that superseded it, still `deferred:false` here.
864
+ #
865
+ # The two words differ in what they tell a READER — given up, versus taken
866
+ # somewhere else — and the reason is kept verbatim, so the distinction is not
867
+ # lost by being read alike.
868
+ defer_note = (index($0, "deferred:") > 0 || index($0, "moved:") > 0) ? marker_value($0, "deferred|moved") : ""
869
+ # THE PREREQUISITES THIS BRANCH NAMES: `<!-- waits: bug/other-branch -->`.
870
+ #
871
+ # A LIST, not one name. Several `<!-- waits: … -->` comments on a line, or one
872
+ # `<!-- waits: x, y -->`, give the same list in document order, duplicates
873
+ # removed — see parse_waits(). The old greedy `sub()` took only the LAST
874
+ # annotation when a line carried two, which silently dropped every other
875
+ # prerequisite a slice had cleared for merge eligibility by itself (#1153).
876
+ #
877
+ # Each value is a BRANCH NAME, so it stops at the first whitespace or comma
878
+ # rather than running to the closing marker the way a deferral reason does: a
879
+ # reason is a sentence, a branch name is a token, and trailing prose inside
880
+ # the comment would silently become part of a name that then matches nothing.
881
+ #
882
+ # `deferred:` is a judgement and `waits:` is a checkable fact, so the two are
883
+ # separate annotations and both may sit on one line. Read here, beside the
884
+ # other two, for the same reason: `match()` in the branch loop below clobbers
885
+ # RSTART/RLENGTH, so anything read from the whole line must be read first.
886
+ #
887
+ # Presence is separate from the value, because ABSENT and
888
+ # EMPTY are different answers — a branch declaring no prerequisite emits no
889
+ # `waits_on` key at all, never `[]`.
890
+ #
891
+ # A value that does not look like a branch is NOT dropped — parse_waits()
892
+ # queues it in pending_unread_value[], and once the branch this line claims is
893
+ # known (below), it is copied into unread_waits_branch[]/unread_waits_value[].
894
+ # A line with no branch claim never drains the queue, so a `waits:` syntax
895
+ # example in prose — not on a branch line — stays silent, as today.
896
+ delete line_waits
897
+ parse_waits($0, line_waits)
898
+ # WHAT THIS SLICE BUILDS: `<!-- builds: normalizeVersion, a shared helper -->`.
899
+ #
900
+ # AN ANNOTATION, NOT A FIELD LINE, and that is what makes it work in BOTH
901
+ # slice dialects with no dialect-specific code. Annotations bind to the line
902
+ # carrying the branch name — the list item in one spelling, the `### `
903
+ # heading in the other — and both dialects already read `deferred:`,
904
+ # `claimed:` and `waits:` with the identical block. A `Builds:` field line
905
+ # would have had two spellings to parse, and the template writes the LIST
906
+ # dialect, so the heading-only version would be absent from every plan
907
+ # created from it.
908
+ #
909
+ # IT BELONGS TO THE SLICE, NEVER TO THE PLAN. A plan builds several things
910
+ # and each slice builds one; a plan-level list is searched as a whole and
911
+ # reported against the wrong slice.
912
+ #
913
+ # The value runs to the closing marker, the way `deferred:` does and unlike
914
+ # `waits:`. A prerequisite is a branch NAME and stops at whitespace; a
915
+ # deliverable is a name plus enough words to search for — `normalizeVersion,
916
+ # a shared helper` — and cutting it at the first space would leave the half
917
+ # that identifies it.
918
+ #
919
+ # Presence is the value being non-empty, exactly as
920
+ # `waits:` does: a slice declaring nothing emits no key, so a consumer reads
921
+ # a deliverable or nothing and never a blank string that looks like one.
922
+ builds_note = ($0 ~ /<!--[ \t]*builds:[ \t]*/) ? marker_value($0, "builds") : ""
923
+ # WHICH KIND OF AGENT THIS SLICE NEEDS: `<!-- agent: reviewer -->`.
924
+ #
925
+ # `--agent <name>` was the only selector and only an operator could type it.
926
+ # `plot-registryd` hands a queued slice to a free agent with no `--agent`
927
+ # anywhere in the path, so an unattended fleet ran every slice as the same
928
+ # undifferentiated worker. The declaration has to live in the PLAN to reach a
929
+ # dispatch nobody is watching.
930
+ #
931
+ # PER-BRANCH, NEVER A `## Status` FIELD. Every Status field is plan-level, so
932
+ # one there could declare a single kind for a plan with several slices — and a
933
+ # reviewer slice beside an implementer slice is the population this is for.
934
+ #
935
+ # The value runs to the closing marker, the way `builds:` does and unlike
936
+ # `waits:`. A charter name is a bare word today, so both rules agree; this one
937
+ # is chosen because it does not silently truncate if a name grows a space.
938
+ #
939
+ # IT CANNOT VALIDATE ITS VALUE, and that is the difference from `waits:` above.
940
+ # A prerequisite has branch-prefix structure, which is what keeps a SYNTAX
941
+ # EXAMPLE in prose from reading as a declaration; a charter name is a bare word
942
+ # with no structure to check. What protects the templates instead is NESTING:
943
+ # their documentation sits inside an outer `<!-- ... -->` block, so the inner
944
+ # `agent:` carries no `<!--` of its own and this pattern never matches it —
945
+ # the same accident of shape that already keeps `builds:` out of the parse of
946
+ # a template. Documenting it as a bare `<!-- agent: reviewer -->` line would
947
+ # hand a kind to every plan created from that template. A test pins it.
948
+ #
949
+ # Presence is the value being non-empty, as all three
950
+ # annotations before it do: a slice naming no kind emits no key, so dispatch
951
+ # reads a name or nothing and never a blank string that looks like one.
952
+ agent_note = ($0 ~ /<!--[ \t]*agent:[ \t]*/) ? marker_value($0, "agent") : ""
953
+ }
954
+ # The commits a slice line names as its completion: `→ commit abc1234`,
955
+ # `→ commit abc1234, def5678` and `→ owner/repo@abc1234`, the commit spellings of
956
+ # `→ #N` and `→ owner/repo#N`. Returns them comma-joined, a cross-repo one keeping
957
+ # its `owner/repo@` prefix because a reader must tell it apart. A commit is 7 or
958
+ # more lowercase hex digits, so prose after the arrow is never read as one.
959
+ function commit_list(s, out, m, h) {
960
+ h = "[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f]+"
961
+ while (match(s, "→ (commit " h "(, ?" h ")*|[A-Za-z0-9._-]+/[A-Za-z0-9._-]+@" h ")")) {
962
+ m = substr(s, RSTART, RLENGTH); s = substr(s, RSTART + RLENGTH)
963
+ sub(/^→ (commit )?/, "", m); gsub(/, ?/, ",", m)
964
+ out = out (out == "" ? "" : ",") m
965
+ }
966
+ return out
967
+ }
968
+ # Stores the annotations read_notes() found, and the commits the line names,
969
+ # against branch n (named b), at the moment either dialect claims it.
970
+ function keep_branch(n, b) {
971
+ # THE FLAG accepts the bare form as well as the annotated one.
972
+ #
973
+ # It matched `deferred:` only, so `<!-- deferred -->` — the annotation with
974
+ # nothing after it — read as NOT deferred at all: the strongest statement a
975
+ # plan can make about a branch, dropped for want of a colon. A reader
976
+ # writing the shorter form has said the branch will not be built; the
977
+ # parser now hears it.
978
+ deferred_of[n] = ($0 ~ /<!--[ \t]*(deferred|moved)[ \t]*(:|-->)/) ? "true" : "false"
979
+ # The reason travels with the flag. Empty on every non-deferred branch, and
980
+ # empty is also the honest answer for the bare form: the branch IS deferred
981
+ # and no reason was recorded, which is a different statement from a reason
982
+ # of "".
983
+ deferred_why[n] = defer_note
984
+ spike_of[n] = ($0 ~ /<!--[ \t]*spike[ \t]*-->/) ? 1 : 0
985
+ # Claim reflection, written by the worker after its ref push succeeds. This
986
+ # is a reflection, not the claim: git refs remain authoritative.
987
+ claimed_of[n] = claim_note
988
+ # The prerequisites travel with the branch, flattened as waits_of[n,1..k]
989
+ # since this awk has no nested arrays. Presence is tracked separately so a
990
+ # branch that declares none emits no key.
991
+ store_waits(n, b)
992
+ builds_of[n] = builds_note
993
+ # The kind travels with the branch, presence tracked separately so a slice
994
+ # declaring none emits no key.
995
+ agent_of[n] = agent_note
996
+ ordered_b[n] = b
997
+ commits_of[n] = commit_list($0)
998
+ }
803
999
  # The longest wave name that still reads as a label, not prose. A JUDGEMENT, not
804
1000
  # a measurement: the longest legitimate name in the estate is `Offered first`
805
1001
  # (13), and the offender this exists to catch is a 53-character sentence, so the
@@ -985,10 +1181,13 @@ section == "status" {
985
1181
  # capture to avoid storing empties. These four are scalars, and now do the
986
1182
  # same: a placeholder no longer counts as a value, so ORDER STOPS MATTERING.
987
1183
  else if (lower ~ /^[ \t]*[-*]?[ \t]*\**design[:*]/ && canon_design == "") canon_design = strip_placeholder(val_after_colon($0))
1184
+ else if (lower ~ /^[ \t]*[-*]?[ \t]*\**spike approved[:*]/ && canon_spike_approved == "") canon_spike_approved = strip_placeholder(val_after_colon($0))
1185
+ else if (lower ~ /^[ \t]*[-*]?[ \t]*\**tracer[:*]/ && canon_tracer == "") canon_tracer = strip_placeholder(val_after_colon($0))
988
1186
  else if (lower ~ /^[ \t]*[-*]?[ \t]*\**rounds[:*]/ && canon_rounds == "") canon_rounds = val_after_colon($0)
989
1187
  else if (lower ~ /^[ \t]*[-*]?[ \t]*\**approved[:*]/ && canon_approved == "") canon_approved = strip_placeholder(val_after_colon($0))
990
1188
  else if (lower ~ /^[ \t]*[-*]?[ \t]*\**released[:*]/ && canon_released == "") canon_released = strip_placeholder(val_after_colon($0))
991
1189
  else if (lower ~ /^[ \t]*[-*]?[ \t]*\**delivered[:*]/ && canon_delivered == "") canon_delivered = strip_placeholder(val_after_colon($0))
1190
+ else if (lower ~ /^[ \t]*[-*]?[ \t]*\**verified[:*]/ && canon_verified == "") canon_verified = strip_placeholder(val_after_colon($0))
992
1191
  else if (lower ~ /^[ \t]*[-*]?[ \t]*\**started[:*]/) {
993
1192
  _s = strip_placeholder(val_after_colon($0))
994
1193
  if (_s != "") started[++n_started] = _s
@@ -1071,126 +1270,7 @@ section == "slices" && slice_shape != "heading" {
1071
1270
  note_branch_heading()
1072
1271
  next
1073
1272
  }
1074
- # Claim reflection, written by the worker after its ref push succeeds. This is
1075
- # a reflection, not the claim: git refs remain authoritative. Computed before
1076
- # the branch loop below — match() clobbers RSTART/RLENGTH, which that loop
1077
- # needs to advance.
1078
- claim_note = (index($0, "claimed:") > 0) ? marker_value($0, "claimed") : ""
1079
- # THE REASON FOR THE DEFERRAL, and not merely the fact of one.
1080
- #
1081
- # `<!-- deferred: verified already implemented 2026-08-17 — startRepair() at
1082
- # fleet.ts:806 -->` was tested for presence and the sentence after the colon
1083
- # was dropped on the floor. So the board could say `deferred` beside `no
1084
- # commits` and never say that the first is the REASON for the second — a
1085
- # reader with no access to the plan file saw a branch nobody started and no
1086
- # statement that nobody should.
1087
- #
1088
- # Extracted the same way and in the same place as the claim note, for the same
1089
- # reason: `match()` in the branch loop below clobbers RSTART/RLENGTH, so
1090
- # anything read from the whole line must be read before it runs.
1091
- #
1092
- # Newlines are already impossible here — awk hands this rule one line, and the
1093
- # documented contract is that an annotation binds to the line carrying the
1094
- # branch name. A deferral whose text is wrapped onto a continuation line is
1095
- # not seen, exactly as `deferred` itself was not.
1096
- # `moved:` IS THE SAME ANSWER AS `deferred:`, and CLAUDE.md has said so since
1097
- # the reconcile scan was written: *"`deferred:`/`moved:` in the plan means
1098
- # reapable"*. `plot-reconcile-scan.sh:504` matches both in one arm; this
1099
- # parser matched only the first, so a slice given up with the other word read
1100
- # as still outstanding — to the board, the delivery gate and the fleet alike.
1101
- # Measured 2026-09-04 on `feature/the-reaper-sweeps-every-kind`: annotated
1102
- # `moved:` into the slice that superseded it, still `deferred:false` here.
1103
- #
1104
- # The two words differ in what they tell a READER — given up, versus taken
1105
- # somewhere else — and the reason is kept verbatim, so the distinction is not
1106
- # lost by being read alike.
1107
- defer_note = (index($0, "deferred:") > 0 || index($0, "moved:") > 0) ? marker_value($0, "deferred|moved") : ""
1108
- # THE PREREQUISITES THIS BRANCH NAMES: `<!-- waits: bug/other-branch -->`.
1109
- #
1110
- # A LIST, not one name. Several `<!-- waits: … -->` comments on a line, or one
1111
- # `<!-- waits: x, y -->`, give the same list in document order, duplicates
1112
- # removed — see parse_waits(). The old greedy `sub()` took only the LAST
1113
- # annotation when a line carried two, which silently dropped every other
1114
- # prerequisite a slice had cleared for merge eligibility by itself (#1153).
1115
- #
1116
- # Each value is a BRANCH NAME, so it stops at the first whitespace or comma
1117
- # rather than running to the closing marker the way a deferral reason does: a
1118
- # reason is a sentence, a branch name is a token, and trailing prose inside
1119
- # the comment would silently become part of a name that then matches nothing.
1120
- #
1121
- # `deferred:` is a judgement and `waits:` is a checkable fact, so the two are
1122
- # separate annotations and both may sit on one line. Read here, beside the
1123
- # other two, for the same reason: `match()` in the branch loop below clobbers
1124
- # RSTART/RLENGTH, so anything read from the whole line must be read first.
1125
- #
1126
- # `has_waits` carries presence separately from the value, because ABSENT and
1127
- # EMPTY are different answers — a branch declaring no prerequisite emits no
1128
- # `waits_on` key at all, never `[]`.
1129
- #
1130
- # A value that does not look like a branch is NOT dropped — parse_waits()
1131
- # queues it in pending_unread_value[], and once the branch this line claims is
1132
- # known (below), it is copied into unread_waits_branch[]/unread_waits_value[].
1133
- # A line with no branch claim never drains the queue, so a `waits:` syntax
1134
- # example in prose — not on a branch line — stays silent, as today.
1135
- delete line_waits
1136
- has_waits = (parse_waits($0, line_waits) > 0)
1137
- # WHAT THIS SLICE BUILDS: `<!-- builds: normalizeVersion, a shared helper -->`.
1138
- #
1139
- # AN ANNOTATION, NOT A FIELD LINE, and that is what makes it work in BOTH
1140
- # slice dialects with no dialect-specific code. Annotations bind to the line
1141
- # carrying the branch name — the list item in one spelling, the `### `
1142
- # heading in the other — and both dialects already read `deferred:`,
1143
- # `claimed:` and `waits:` with the identical block. A `Builds:` field line
1144
- # would have had two spellings to parse, and the template writes the LIST
1145
- # dialect, so the heading-only version would be absent from every plan
1146
- # created from it.
1147
- #
1148
- # IT BELONGS TO THE SLICE, NEVER TO THE PLAN. A plan builds several things
1149
- # and each slice builds one; a plan-level list is searched as a whole and
1150
- # reported against the wrong slice.
1151
- #
1152
- # The value runs to the closing marker, the way `deferred:` does and unlike
1153
- # `waits:`. A prerequisite is a branch NAME and stops at whitespace; a
1154
- # deliverable is a name plus enough words to search for — `normalizeVersion,
1155
- # a shared helper` — and cutting it at the first space would leave the half
1156
- # that identifies it.
1157
- #
1158
- # `has_builds` carries presence separately from the value, exactly as
1159
- # `waits:` does: a slice declaring nothing emits no key, so a consumer reads
1160
- # a deliverable or nothing and never a blank string that looks like one.
1161
- builds_note = ($0 ~ /<!--[ \t]*builds:[ \t]*/) ? marker_value($0, "builds") : ""
1162
- has_builds = (builds_note != "")
1163
- # WHICH KIND OF AGENT THIS SLICE NEEDS: `<!-- agent: reviewer -->`.
1164
- #
1165
- # `--agent <name>` was the only selector and only an operator could type it.
1166
- # `plot-registryd` hands a queued slice to a free agent with no `--agent`
1167
- # anywhere in the path, so an unattended fleet ran every slice as the same
1168
- # undifferentiated worker. The declaration has to live in the PLAN to reach a
1169
- # dispatch nobody is watching.
1170
- #
1171
- # PER-BRANCH, NEVER A `## Status` FIELD. Every Status field is plan-level, so
1172
- # one there could declare a single kind for a plan with several slices — and a
1173
- # reviewer slice beside an implementer slice is the population this is for.
1174
- #
1175
- # The value runs to the closing marker, the way `builds:` does and unlike
1176
- # `waits:`. A charter name is a bare word today, so both rules agree; this one
1177
- # is chosen because it does not silently truncate if a name grows a space.
1178
- #
1179
- # IT CANNOT VALIDATE ITS VALUE, and that is the difference from `waits:` above.
1180
- # A prerequisite has branch-prefix structure, which is what keeps a SYNTAX
1181
- # EXAMPLE in prose from reading as a declaration; a charter name is a bare word
1182
- # with no structure to check. What protects the templates instead is NESTING:
1183
- # their documentation sits inside an outer `<!-- ... -->` block, so the inner
1184
- # `agent:` carries no `<!--` of its own and this pattern never matches it —
1185
- # the same accident of shape that already keeps `builds:` out of the parse of
1186
- # a template. Documenting it as a bare `<!-- agent: reviewer -->` line would
1187
- # hand a kind to every plan created from that template. A test pins it.
1188
- #
1189
- # `has_agent` carries presence separately from the value, as all three
1190
- # annotations before it do: a slice naming no kind emits no key, so dispatch
1191
- # reads a name or nothing and never a blank string that looks like one.
1192
- agent_note = ($0 ~ /<!--[ \t]*agent:[ \t]*/) ? marker_value($0, "agent") : ""
1193
- has_agent = (agent_note != "")
1273
+ read_notes()
1194
1274
  # ONE LIST ITEM, AT MOST ONE CLAIM — an `if`, not the `while` this was.
1195
1275
  #
1196
1276
  # The old loop walked the line taking every backticked name on it, which is
@@ -1208,33 +1288,7 @@ section == "slices" && slice_shape != "heading" {
1208
1288
  if (n_waves == 0) { wave_names[++n_waves] = "" }
1209
1289
  wave_of[n_branches] = n_waves
1210
1290
  wave_seq[n_branches] = ++wave_count[n_waves]
1211
- # THE FLAG accepts the bare form as well as the annotated one.
1212
- #
1213
- # It matched `deferred:` only, so `<!-- deferred -->` — the annotation with
1214
- # nothing after it — read as NOT deferred at all: the strongest statement a
1215
- # plan can make about a branch, dropped for want of a colon. A reader
1216
- # writing the shorter form has said the branch will not be built; the
1217
- # parser now hears it.
1218
- deferred_of[n_branches] = ($0 ~ /<!--[ \t]*(deferred|moved)[ \t]*(:|-->)/) ? "true" : "false"
1219
- # The reason travels with the flag. Empty on every non-deferred branch, and
1220
- # empty is also the honest answer for the bare form: the branch IS deferred
1221
- # and no reason was recorded, which is a different statement from a reason
1222
- # of "".
1223
- deferred_why[n_branches] = defer_note
1224
- # Claim reflection, written by the worker after its ref push succeeds. This
1225
- # is a reflection, not the claim: git refs remain authoritative.
1226
- claimed_of[n_branches] = claim_note
1227
- # The prerequisites travel with the branch, flattened as waits_of[n,1..k]
1228
- # since this awk has no nested arrays. Presence is tracked separately so a
1229
- # branch that declares none emits no key.
1230
- store_waits(n_branches, b)
1231
- builds_of[n_branches] = builds_note
1232
- builds_set[n_branches] = has_builds
1233
- # The kind travels with the branch, presence tracked separately so a slice
1234
- # declaring none emits no key.
1235
- agent_of[n_branches] = agent_note
1236
- agent_set[n_branches] = has_agent
1237
- ordered_b[n_branches] = b
1291
+ keep_branch(n_branches, b)
1238
1292
  }
1239
1293
  line = $0
1240
1294
  # `→ #N` and `→ owner/repo#N` are both annotations: /plot-deliver instructs
@@ -1245,7 +1299,7 @@ section == "slices" && slice_shape != "heading" {
1245
1299
  while (match(line, /→ ([A-Za-z0-9._-]+\/[A-Za-z0-9._-]+)?#[0-9]+/)) {
1246
1300
  p = substr(line, RSTART, RLENGTH)
1247
1301
  sub(/^.*#/, "", p)
1248
- prs[++n_prs] = p
1302
+ prs[++n_prs] = p; if ($0 ~ /<!--[ \t]*(deferred|moved)[ \t]*(:|-->)/) dprs[++n_dprs] = p
1249
1303
  line = substr(line, RSTART + RLENGTH)
1250
1304
  }
1251
1305
  # A near-miss is REPORTED, never silently dropped. `→#44` (no space) is the
@@ -1289,59 +1343,8 @@ section == "slices" && slice_shape == "heading" {
1289
1343
  wave_names[++n_waves] = wname
1290
1344
  note_branch_heading()
1291
1345
 
1292
- # Claim/deferral annotations bind to the line carrying the branch name, which
1293
- # is the heading. Read before any match() below, which clobbers RSTART/RLENGTH.
1294
- claim_note = (index($0, "claimed:") > 0) ? marker_value($0, "claimed") : ""
1295
- # `moved:` IS THE SAME ANSWER AS `deferred:`, and CLAUDE.md has said so since
1296
- # the reconcile scan was written: *"`deferred:`/`moved:` in the plan means
1297
- # reapable"*. `plot-reconcile-scan.sh:504` matches both in one arm; this
1298
- # parser matched only the first, so a slice given up with the other word read
1299
- # as still outstanding — to the board, the delivery gate and the fleet alike.
1300
- # Measured 2026-09-04 on `feature/the-reaper-sweeps-every-kind`: annotated
1301
- # `moved:` into the slice that superseded it, still `deferred:false` here.
1302
- #
1303
- # The two words differ in what they tell a READER — given up, versus taken
1304
- # somewhere else — and the reason is kept verbatim, so the distinction is not
1305
- # lost by being read alike.
1306
- defer_note = (index($0, "deferred:") > 0 || index($0, "moved:") > 0) ? marker_value($0, "deferred|moved") : ""
1307
- # WHAT THIS SLICE BUILDS: `<!-- builds: normalizeVersion, a shared helper -->`.
1308
- #
1309
- # AN ANNOTATION, NOT A FIELD LINE, and that is what makes it work in BOTH
1310
- # slice dialects with no dialect-specific code. Annotations bind to the line
1311
- # carrying the branch name — the list item in one spelling, the `### `
1312
- # heading in the other — and both dialects already read `deferred:`,
1313
- # `claimed:` and `waits:` with the identical block. A `Builds:` field line
1314
- # would have had two spellings to parse, and the template writes the LIST
1315
- # dialect, so the heading-only version would be absent from every plan
1316
- # created from it.
1317
- #
1318
- # IT BELONGS TO THE SLICE, NEVER TO THE PLAN. A plan builds several things
1319
- # and each slice builds one; a plan-level list is searched as a whole and
1320
- # reported against the wrong slice.
1321
- #
1322
- # The value runs to the closing marker, the way `deferred:` does and unlike
1323
- # `waits:`. A prerequisite is a branch NAME and stops at whitespace; a
1324
- # deliverable is a name plus enough words to search for — `normalizeVersion,
1325
- # a shared helper` — and cutting it at the first space would leave the half
1326
- # that identifies it.
1327
- #
1328
- # `has_builds` carries presence separately from the value, exactly as
1329
- # `waits:` does: a slice declaring nothing emits no key, so a consumer reads
1330
- # a deliverable or nothing and never a blank string that looks like one.
1331
- builds_note = ($0 ~ /<!--[ \t]*builds:[ \t]*/) ? marker_value($0, "builds") : ""
1332
- has_builds = (builds_note != "")
1333
- # The prerequisites, read exactly as the list-item spelling reads them — see
1334
- # parse_waits() and the comment at the list-item block for why the value is a
1335
- # list, why it stops at whitespace/comma, and how an unreadable value reaches
1336
- # unread_waits instead of being dropped.
1337
- delete line_waits
1338
- has_waits = (parse_waits($0, line_waits) > 0)
1339
- # The agent kind, read exactly as the list-item spelling reads it. Both
1340
- # dialects emit the same waves[], so a field added to one only would break that
1341
- # contract the first time a plan migrated. See the list-item block for why the
1342
- # value runs to the closing marker and why this one cannot validate itself.
1343
- agent_note = ($0 ~ /<!--[ \t]*agent:[ \t]*/) ? marker_value($0, "agent") : ""
1344
- has_agent = (agent_note != "")
1346
+ # Annotations bind to the line carrying the branch name, which is the heading.
1347
+ read_notes()
1345
1348
 
1346
1349
  # The branch is the `Branch:` value, matched against the known prefixes exactly
1347
1350
  # as the old shape matched the backticked name. Written unquoted in the heading
@@ -1355,25 +1358,14 @@ section == "slices" && slice_shape == "heading" {
1355
1358
  # the heading opened a wave and yielded nothing. The backticks are optional on
1356
1359
  # both sides and stripped from the name. Measured 2026-09-28 over 357 plans:
1357
1360
  # 2 records change, 355 byte-identical.
1358
- hmeta = $0
1359
- if (match(hmeta, "Branch:[ \t]*`?(" PREFIXES ")/[^ \t,)`]+`?")) {
1360
- b = substr(hmeta, RSTART, RLENGTH)
1361
+ if (match($0, "Branch:[ \t]*`?(" PREFIXES ")/[^ \t,)`]+`?")) {
1362
+ b = substr($0, RSTART, RLENGTH)
1361
1363
  sub(/^Branch:[ \t]*/, "", b)
1362
1364
  gsub(/`/, "", b)
1363
1365
  branches[++n_branches] = b
1364
1366
  wave_of[n_branches] = n_waves
1365
1367
  wave_seq[n_branches] = ++wave_count[n_waves]
1366
- # Bare `<!-- deferred -->` sets the flag with no reason, same as the old
1367
- # shape; `deferred:` carries the reason.
1368
- deferred_of[n_branches] = ($0 ~ /<!--[ \t]*(deferred|moved)[ \t]*(:|-->)/) ? "true" : "false"
1369
- deferred_why[n_branches] = defer_note
1370
- claimed_of[n_branches] = claim_note
1371
- store_waits(n_branches, b)
1372
- builds_of[n_branches] = builds_note
1373
- builds_set[n_branches] = has_builds
1374
- agent_of[n_branches] = agent_note
1375
- agent_set[n_branches] = has_agent
1376
- ordered_b[n_branches] = b
1368
+ keep_branch(n_branches, b)
1377
1369
  }
1378
1370
 
1379
1371
  # The PR is the `PR: #NNN` value in the heading. Absent PR: contributes
@@ -1382,7 +1374,7 @@ section == "slices" && slice_shape == "heading" {
1382
1374
  if (match($0, /PR:[ \t]*#[0-9]+/)) {
1383
1375
  p = substr($0, RSTART, RLENGTH)
1384
1376
  sub(/^.*#/, "", p)
1385
- prs[++n_prs] = p
1377
+ prs[++n_prs] = p; if ($0 ~ /<!--[ \t]*(deferred|moved)[ \t]*(:|-->)/) dprs[++n_dprs] = p
1386
1378
  }
1387
1379
  next
1388
1380
  }