forge-orkes 0.80.2 → 0.80.3

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": "forge-orkes",
3
- "version": "0.80.2",
3
+ "version": "0.80.3",
4
4
  "description": "Set up the Forge meta-prompting framework for Claude Code in your project",
5
5
  "bin": {
6
6
  "create-forge": "./bin/create-forge.js"
@@ -168,6 +168,7 @@ BEGIN {
168
168
  cur_noid_key = ""
169
169
  n_ids = 0
170
170
  n_noid = 0
171
+ n_other_headings = 0
171
172
  }
172
173
 
173
174
  /^## / {
@@ -179,6 +180,10 @@ BEGIN {
179
180
  if ($0 ~ /^## Needs Resolution/) { section = "NEEDS_RESOLUTION"; next }
180
181
  if ($0 ~ /^## Amendment Log/) { section = "AMENDMENT"; next }
181
182
  section = "OTHER"
183
+ n_other_headings++
184
+ w = $0
185
+ sub(/^## /, "", w)
186
+ other_heading_order[n_other_headings] = w
182
187
  other_buf = other_buf $0 "\n"
183
188
  next
184
189
  }
@@ -313,6 +318,23 @@ END {
313
318
  exit 1
314
319
  }
315
320
 
321
+ # Unrecognized top-level `## ` sections (issue #45) are preserved verbatim
322
+ # in context-log.md's "Other Sections" by design — never guessed onto a
323
+ # milestone — but a large or multi-heading OTHER bucket usually means the
324
+ # source context.md uses a section vocabulary this tool doesn't know about
325
+ # (e.g. a project-specific "## Active Streams"), and that content silently
326
+ # missing its own per-milestone home is easy to overlook. Loud, not fatal:
327
+ # nothing is lost (it's right there in context-log.md), so this warns
328
+ # without changing the exit code.
329
+ if (n_other_headings > 0 && length(other_buf) > 500) {
330
+ headings_list = other_heading_order[1]
331
+ for (i = 2; i <= n_other_headings; i++) headings_list = headings_list ", " other_heading_order[i]
332
+ print "forge-context-migrate: WARNING — " length(other_buf) " byte(s) across " \
333
+ n_other_headings " unrecognized heading(s) (" headings_list ") landed in" \
334
+ " context-log.md's \"Other Sections\" instead of a per-milestone file — review" \
335
+ " it; if that content is milestone-scoped, re-file it into context/{id}.md by hand" > "/dev/stderr"
336
+ }
337
+
316
338
  print "forge-context-migrate: " n_ids " milestone id(s) processed"
317
339
  }
318
340
  AWKEOF
@@ -251,6 +251,56 @@ BADRC=$?
251
251
  [ "$BADRC" -ne 0 ] && pass "unresolvable id scheme exits non-zero instead of silently producing 0 shards" || fail "unresolvable id scheme should exit non-zero (exit $BADRC)"
252
252
  check_has "unresolvable id scheme prints an ERROR line" "$BADOUT" "ERROR"
253
253
 
254
+ # --- large unrecognized-section warning (issue #45) -------------------------
255
+ # A project-specific top-level heading (e.g. "## Active Streams") this tool
256
+ # doesn't know about is preserved verbatim in context-log.md's "Other
257
+ # Sections" by design — but silently doing that with a large amount of
258
+ # content is easy to overlook. Must warn (not fail — nothing is lost) when
259
+ # the OTHER bucket is substantial, and stay silent when it's small/absent.
260
+ # Deliberately alongside a resolving Locked Decisions id, so this warning
261
+ # fires independent of (and isn't masked by) the zero-shards guard above.
262
+
263
+ WARNROOT="$(mktemp -d)"
264
+ trap 'rm -rf "$ROOT" "$LBLROOT" "$BADROOT" "$WARNROOT"' EXIT INT TERM
265
+ WARNSRC="$WARNROOT/context.md"
266
+ WARNDEST="$WARNROOT/.forge"
267
+ mkdir -p "$WARNDEST"
268
+
269
+ {
270
+ printf '## Locked Decisions\n\n### m-53 — numeric decision\n\n- **Decision**: fine.\n\n'
271
+ printf '## Active Streams\n\n### m-HC01 — some stream\n\n'
272
+ # 600 bytes — over the 500-byte warn floor
273
+ printf 'x%.0s' $(seq 1 600)
274
+ printf '\n\n## Needs Resolution\n\n(none)\n\n## Amendment Log\n\n(none)\n'
275
+ } > "$WARNSRC"
276
+
277
+ WARNOUT="$("$MIGRATE" --source "$WARNSRC" --dest "$WARNDEST" --dry-run 2>&1)"
278
+ WARNRC=$?
279
+ [ "$WARNRC" -eq 0 ] && pass "large unrecognized-section run still exits 0 (warning, not a failure)" || fail "large unrecognized-section run should exit 0 (exit $WARNRC)"
280
+ check_has "large unrecognized-section run prints a WARNING line" "$WARNOUT" "WARNING"
281
+ check_has "warning names the unrecognized heading" "$WARNOUT" "Active Streams"
282
+
283
+ SMALLROOT="$(mktemp -d)"
284
+ trap 'rm -rf "$ROOT" "$LBLROOT" "$BADROOT" "$WARNROOT" "$SMALLROOT"' EXIT INT TERM
285
+ SMALLSRC="$SMALLROOT/context.md"
286
+ SMALLDEST="$SMALLROOT/.forge"
287
+ mkdir -p "$SMALLDEST"
288
+
289
+ cat > "$SMALLSRC" <<'FIXTURE'
290
+ ## Locked Decisions
291
+
292
+ ### m-53 — numeric decision
293
+
294
+ - **Decision**: fine.
295
+
296
+ ## Some Small Aside
297
+
298
+ A short unrecognized note, well under the warn floor.
299
+ FIXTURE
300
+
301
+ SMALLOUT="$("$MIGRATE" --source "$SMALLSRC" --dest "$SMALLDEST" --dry-run 2>&1)"
302
+ check_absent "a small unrecognized section stays silent (no WARNING)" "$SMALLOUT" "WARNING"
303
+
254
304
  # --- summary -----------------------------------------------------------------
255
305
 
256
306
  printf '\n%s passed, %s failed\n' "$PASSED" "$FAILED"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "forge": {
3
- "version": "0.80.2",
3
+ "version": "0.80.3",
4
4
  "default_tier": "standard",
5
5
  "beads_integration": false,
6
6
  "context_gates": {