@windyroad/architect 0.21.4-preview.1105 → 0.21.4-preview.1106

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@windyroad/architect",
3
- "version": "0.21.4-preview.1105",
3
+ "version": "0.21.4-preview.1106",
4
4
  "description": "Architecture decision enforcement for AI coding agents",
5
5
  "bin": {
6
6
  "windyroad-architect": "./bin/install.mjs"
@@ -112,19 +112,41 @@ trap cleanup_compendium EXIT
112
112
 
113
113
  # --- Field extractors ------------------------------------------------------
114
114
 
115
- # Read a frontmatter scalar field (single line `key: value`).
115
+ # Read a frontmatter scalar or block-list field. Scalars are returned as-is;
116
+ # block lists are compacted to the same `[item, item]` shape as inline lists.
116
117
  # Strips surrounding quotes and leading/trailing whitespace.
117
118
  get_frontmatter_field() {
118
119
  local file="$1" field="$2"
119
120
  awk -v f="$field" '
121
+ function emit_list( i) {
122
+ if (!list_count || list_emitted) return
123
+ printf "["
124
+ for (i = 1; i <= list_count; i++) {
125
+ if (i > 1) printf ", "
126
+ printf "%s", list[i]
127
+ }
128
+ print "]"
129
+ list_emitted = 1
130
+ }
120
131
  /^---$/ { fm = !fm; if (!fm) exit; next }
132
+ in_list && /^ - / {
133
+ item = $0
134
+ sub(/^ - */, "", item)
135
+ list[++list_count] = item
136
+ next
137
+ }
138
+ in_list { emit_list(); exit }
121
139
  fm && $0 ~ "^"f":" {
122
140
  sub("^"f": *", "")
123
141
  gsub(/^["'"'"']|["'"'"']$/, "")
124
142
  sub(/^ +/, ""); sub(/ +$/, "")
125
- print
126
- exit
143
+ if (length($0)) {
144
+ print
145
+ exit
146
+ }
147
+ in_list = 1
127
148
  }
149
+ END { emit_list() }
128
150
  ' "$file"
129
151
  }
130
152
 
@@ -162,12 +184,17 @@ get_chosen() {
162
184
  }
163
185
 
164
186
  # Extract top-level bullet lines (`- ...`) from a section. Skips nested
165
- # ` - ...` sub-bullets to keep the compendium dense. Capped at N entries.
187
+ # ` - ...` sub-bullets to keep the compendium dense. Capped at N entries;
188
+ # a cap of 0 preserves every item.
166
189
  get_bullets() {
167
190
  local file="$1" section="$2" cap="${3:-5}"
168
191
  get_section "$file" "$section" \
169
- | awk '/^- / { sub(/^- */, ""); print }' \
170
- | head -"$cap"
192
+ | awk -v cap="$cap" '/^- / {
193
+ sub(/^- */, "")
194
+ print
195
+ count++
196
+ if (cap > 0 && count >= cap) exit
197
+ }'
171
198
  }
172
199
 
173
200
  # Compact-join bullets onto one line, truncating each to N chars + "...".
@@ -259,8 +286,8 @@ truncate_with_ellipsis() {
259
286
 
260
287
  emit_entry() {
261
288
  local file="$1"
262
- local id title status oversight superseded supersede_ticket
263
- local chosen drivers confirmation related
289
+ local id title status oversight superseded superseded_by supersede_ticket
290
+ local chosen drivers confirmation related amends supplements
264
291
 
265
292
  id=$(basename "$file" | grep -oE '^[0-9]+')
266
293
  title=$(get_title "$file")
@@ -270,6 +297,9 @@ emit_entry() {
270
297
  esac
271
298
  oversight=$(get_frontmatter_field "$file" "human-oversight")
272
299
  superseded=$(get_frontmatter_field "$file" "supersedes")
300
+ superseded_by=$(get_frontmatter_field "$file" "superseded-by")
301
+ amends=$(get_frontmatter_field "$file" "amends")
302
+ supplements=$(get_frontmatter_field "$file" "supplements")
273
303
  # ADR-066 amendment (P316): when the oversight value is
274
304
  # `rejected-pending-supersede`, surface the tracking ticket parenthetically
275
305
  # so the compendium badge shows both the disposition AND the supersede in
@@ -284,10 +314,9 @@ emit_entry() {
284
314
  return 1
285
315
  fi
286
316
 
287
- # Confirmation: cap 5 bullets, ≤ 110 chars each, joined with "; " on one line.
288
- # This is the routine-compliance scannable view; the full Confirmation list
289
- # remains in the per-ADR body for deep-dive surfaces.
290
- if ! confirmation=$(get_bullets "$file" "Confirmation" 5 | strip_links | compact_join_bullets 110); then
317
+ # Confirmation: preserve every top-level item, ≤ 110 chars each, joined
318
+ # with "; " on one line for the routine-compliance scannable view.
319
+ if ! confirmation=$(get_bullets "$file" "Confirmation" 0 | strip_links | compact_join_bullets 110); then
291
320
  return 1
292
321
  fi
293
322
 
@@ -317,6 +346,15 @@ emit_entry() {
317
346
  badges="${badges} | **Supersedes:** ${superseded}"
318
347
  fi
319
348
  echo "${badges}"
349
+ if [ -n "$superseded_by" ] && [ "$superseded_by" != "[]" ]; then
350
+ echo "**Superseded-by:** ${superseded_by}"
351
+ fi
352
+ if [ -n "$amends" ] && [ "$amends" != "[]" ]; then
353
+ echo "**Amends:** ${amends}"
354
+ fi
355
+ if [ -n "$supplements" ] && [ "$supplements" != "[]" ]; then
356
+ echo "**Supplements:** ${supplements}"
357
+ fi
320
358
  if [ -n "$chosen" ]; then
321
359
  echo "**Chosen:** ${chosen}"
322
360
  fi