@soleur/opencode 3.371.0 → 3.372.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soleur/opencode",
3
- "version": "3.371.0",
3
+ "version": "3.372.1",
4
4
  "description": "Soleur AI organization plugin for OpenCode",
5
5
  "type": "module",
6
6
  "bin": {
@@ -448,7 +448,7 @@ while :; do
448
448
  elif [[ "$qread" == "1" && ( "$Q_DQ" == "1" || ( "$queue_seen" == "1" && "$automerge" == "false" ) ) ]]; then
449
449
  # qread is 1 only when the read ran: state OPEN (the gate above) inside this settled block, which needs a
450
450
  # measured `gh pr checks` (tot > 0) and, with a failed `gh pr view`, state UNKNOWN: T24i pins it.
451
- printf 'LEFT THE MERGE QUEUE UNMERGED — PR #%s is OPEN and out of the queue (removal: %s; auto-merge %s): a failed merge_group run or a removal. Do NOT merge it by hand or --admin it. Read it: gh run list --event merge_group --limit 100 --json databaseId,headBranch,conclusion,url --jq '"'"'.[] | select(.headBranch | startswith("gh-readonly-queue/main/pr-%s-"))'"'"'; recovery (ONE re-enqueue): plugins/soleur/skills/ship/references/merge-queue-dequeue.md.\n' "$PR" "$Q_RM" "$([[ "$automerge" == "true" ]] && echo armed || echo disarmed)" "$PR"
451
+ printf 'LEFT THE MERGE QUEUE UNMERGED — PR #%s is OPEN and out of the queue (removal: %s; auto-merge %s): a failed merge_group run or a removal. Do NOT merge it by hand or --admin it. Read it: gh run list --event merge_group --limit 100 --json databaseId,headBranch,conclusion,url --jq '"'"'.[] | select(.headBranch | startswith("gh-readonly-queue/main/pr-%s-"))'"'"' (grouped merging: a member PR'"'"'s group ref names the DEEPEST member — if no run matches, list recent merge_group runs and correlate by headSha/createdAt); recovery (ONE re-enqueue): plugins/soleur/skills/ship/references/merge-queue-dequeue.md.\n' "$PR" "$Q_RM" "$([[ "$automerge" == "true" ]] && echo armed || echo disarmed)" "$PR"
452
452
  exit 1
453
453
  fi
454
454
 
@@ -553,7 +553,7 @@ queue_gate() {
553
553
  [[ -z "$marker" ]] || rm -f "$marker"
554
554
  reason="removal reason: ${rm#removal=}"
555
555
  [[ "$rm" != removal=none && "$rm" != removal=- ]] || reason="seen in the queue earlier, no removal event read"
556
- tag dequeued 13 "PR #$PR was in the merge queue and is no longer (OPEN, $am, $reason): a failed merge_group run or a removal — NOT syncing. Recover (ONE re-enqueue, procedure: plugins/soleur/skills/ship/references/merge-queue-dequeue.md): (1) read why: gh run list --event merge_group --limit 100 --json databaseId,headBranch,conclusion,url --jq '.[] | select(.headBranch | startswith(\"gh-readonly-queue/main/pr-$PR-\"))' then gh run view <databaseId> --log-failed; (2) fix on the branch, git merge origin/main, push; (3) re-arm once: gh pr merge $PR --squash --auto. A second dequeue: stop and report it."
556
+ tag dequeued 13 "PR #$PR was in the merge queue and is no longer (OPEN, $am, $reason): a failed merge_group run or a removal — NOT syncing. Recover (ONE re-enqueue, procedure: plugins/soleur/skills/ship/references/merge-queue-dequeue.md): (1) read why: gh run list --event merge_group --limit 100 --json databaseId,headBranch,conclusion,url --jq '.[] | select(.headBranch | startswith(\"gh-readonly-queue/main/pr-$PR-\"))' then gh run view <databaseId> --log-failed — under grouped merging (max_entries_to_merge=3) a member PR's group ref names the DEEPEST member, so if no run matches pr-$PR- list recent merge_group runs and correlate by headSha/createdAt; (2) fix on the branch, git merge origin/main, push; (3) re-arm once: gh pr merge $PR --squash --auto. A second dequeue: stop and report it."
557
557
  exit 13
558
558
  fi
559
559
  return 0 ;;
@@ -216,6 +216,8 @@ If the feature description references named external systems, prior issues, prio
216
216
 
217
217
  **Grep the ADR corpus for the proposed *mechanism*, not just the cited issue refs.** When the feature description names HOW to do something (a frontmatter flip, a new table, a polling cron, a config tier), grep `knowledge-base/engineering/architecture/decisions/` for the mechanism's keywords and read any hit's `## Decision` + `## Alternatives Considered` BEFORE accepting the framing or confirming a design with the operator. An issue is filed without knowledge of what an ADR decided; a mechanism in an ADR's rejected-alternatives table is explicitly-rejected, not unconsidered — re-scope to "did the ADR leave a gap this still addresses?". **Why:** #5087 — operator-confirmed frontmatter tiering matched the exact alternative ADR-053 (#5096) rejected the day before; caught only at deepen-plan. See `knowledge-base/project/learnings/2026-06-11-brainstorm-grep-adr-corpus-for-proposed-mechanism-not-just-issue-refs.md`. **Also verify any cited ADR *number* → mechanism mapping before threading it into a subagent/leader prompt** — a number carried from prior prose (e.g. "Anthropic-only = ADR-083") can be wrong (ADR-083 is the scoped strong-model consult; the model policy is ADR-053), and leaders will repeat the wrong citation as a given; `git grep "ADR-0NN" main` + read the citing text, and cross-check tree-wide before concluding an ADR is absent (a `git ls-files` glob miss ≠ non-existence). See `knowledge-base/project/learnings/2026-07-04-verify-adr-citation-numbers-before-threading-into-subagent-prompts.md`.
218
218
 
219
+ **Verify knob-issue semantics against vendor docs + the governing ADR's checklist** (#11678).
220
+
219
221
  **When a governing ADR already contains the design, re-verify each *deferral trigger* against LIVE state — the "deferred/blocked" label is the most perishable part of an ADR.** A same-day ADR may record the full design AND label items deferred/blocked; trusting the label re-derives decided work or re-confirms a status that has since cleared. Read the deferral *rationale* and re-run the exact check it implies: `gh run list --workflow=<apply>.yml` if the reason is "pipeline RED"; `gh pr list --state all -L 200 --search "<N> in:body,title"` for a sibling that shipped an item ("Ref #N" merges leave the issue OPEN with the box unchecked); `gh issue view <blocker> --json state,title` to confirm the cited blocker is real and open; grep the IaC/source for the true cross-ref (a mis-cited blocker in prose is corrected by the code). Then the brainstorm's job is certify-and-scope, not explore-and-derive. **Why:** 2026-07-03 #5933 — ADR-082 (same-day) deferred Item 1 "blocked on #5887 (pipeline RED)", but #5887 was fixed, the apply was green, and Item 3 had already shipped via PR #5945; the blocker was mis-cited (#5887 is a closed CI fix; the real cutover is #5274). See `knowledge-base/project/learnings/2026-07-03-brainstorm-re-verify-adr-deferral-triggers-against-live-state.md`. **And re-derive the deferred option's stated BENEFIT, not only its blockers — a deferral record has two halves and only one gets re-checked.** A blocker is written as a risk and reads as something to verify; the benefit is written as fact and is inherited as the whole reason to ship. Name the command that would falsify the benefit and run it. **Why:** 2026-08-12 #7493 — ADR-182 justified `github_repository_file` with "drift would be auto-reconciled by the next apply"; both its blockers cleared against the live API, but `apply-github-infra.yml` has no `schedule:` (it fires only on `push: main` touching `infra/github/*.tf`), so the option would have shipped ownership without timeliness while the ADR and issue both asserted timeliness. See `knowledge-base/project/learnings/2026-08-12-certifying-a-deferral-means-re-deriving-its-benefit-not-just-its-blockers.md`.
220
222
 
221
223
  **Grading a competitor/vendor claim VERIFIED vs UNSUBSTANTIATED means reading every source the artifact already cites — a landing page is one source, not the source of truth.** When a leader/CMO reports "X is not stated on vendor.com," check whether the artifact you're annotating already links subpages (a `/pricing`, a docs/blog post) for that exact claim, and read those before grading. Asserting "unsubstantiated" from an incomplete source check is the same defect class as asserting an unverified figure as fact — just reversed. **Why:** #6827 — Cofounder pricing/memory/ownership were graded "not stated on cofounder.co" from a landing-page-only fetch; the existing `knowledge-base/product/competitive-intelligence.md` table row already linked `cofounder.co/pricing` + a memory post that stated them verbatim. See `knowledge-base/project/learnings/2026-07-22-verify-every-cited-source-and-corrections-must-not-half-sweep.md`.
@@ -85,7 +85,7 @@ gh pr merge <N> --squash --auto
85
85
 
86
86
  - **Never arm a cross-repository (fork) PR, or one touching `.github/**`, without explicit operator confirmation.** `merge_group` runs the candidate's workflows in the base-repo context with repo secrets, so a pre-queue-green fork or workflow edit can exfiltrate them before anyone reads a run. Check each PR before arming: `gh pr view <N> --json isCrossRepository --jq .isCrossRepository` and `gh api repos/{owner}/{repo}/pulls/<N>/files --paginate --jq '.[].filename | select(startswith(".github/"))'` (not `gh pr view --json files`: it stops at 100 files, so a large PR could hide a workflow edit); `true` or any output means stop and ask (the tier confirmation at the decision gate does not cover it).
87
87
  - **Merge queue is active on `main`** (#9454, ADR-270; the `merge_queue` rule lives in `infra/github/ruleset-ci-required.tf`) — `gh pr merge <N> --squash --auto` **enqueues** the PR (a green PR enqueues, so the bullet and the block above agree); the queue handles the up-to-date merge, serialization and the final merge automatically — do not hand-roll update/wait loops, and never push `gh pr update-branch` or a merge of `origin/main` to a PR that is in the queue (a push dequeues it). An admin-bypass merge (only via [settle-then-admin-merge.md](${CLAUDE_PLUGIN_ROOT}/skills/ship/references/settle-then-admin-merge.md)) is the last resort, not the drain path. CodeQL is advisory on `main` (it reports no status on `merge_group`); the post-merge `codeql-main-alert-gate.yml` run is the signal. History: a first adoption (#5800) was reverted the same day for exactly that reason (ADR-032 amendment, upstream `github/codeql-action#1537`); #5840 stays open as the upstream tracker.
88
- - **Dequeue arm — a PR that leaves the queue.** When CI is red on the queue's temp ref `gh-readonly-queue/main/pr-<N>-<sha>`, the failing check-run is on the queue SHA, not the PR head, so `gh pr checks <N>` still reads green. Read the run instead: `gh run list --event merge_group --limit 100 --json databaseId,headBranch,conclusion,url --jq '.[] | select(.headBranch | startswith("gh-readonly-queue/main/pr-<N>-"))'`, (about 8 runs per queue entry, so a smaller `--limit` can miss the PR on a busy queue), then diagnose the failing job from that run. The dequeue is silent (a `failed_checks` removal is re-queued by GitHub 2 to 3.5 minutes later while auto-merge normally stays armed; a red advisory job does not dequeue, so do not push over it): the PR stays OPEN, so `gh pr view <N> --json state,autoMergeRequest` reads `OPEN` with auto-merge armed (`autoMergeRequest` set) or disarmed (`null`); section 7's wait names it (`LEFT THE MERGE QUEUE UNMERGED`, reason from the queue's removal event). Recipe: [merge-queue-dequeue.md](${CLAUDE_PLUGIN_ROOT}/skills/ship/references/merge-queue-dequeue.md). On a conflict or lockfile / `kb-index` drift, the local arm is: merge `origin/main` into the PR branch (merge-pr §3.1 "Route conflicts"), push only for a failure that will recur, and re-arm `gh pr merge <N> --squash --auto` only when `autoMergeRequest` is `null` (the recipe's steps 2 and 3 win over any shorter inline recovery text). Cap it at ONE re-enqueue per PR before escalating to the operator.
88
+ - **Dequeue arm — a PR that leaves the queue.** When CI is red on the queue's temp ref `gh-readonly-queue/main/pr-<N>-<sha>`, the failing check-run is on the queue SHA, not the PR head, so `gh pr checks <N>` still reads green. Read the run instead: `gh run list --event merge_group --limit 100 --json databaseId,headBranch,conclusion,url --jq '.[] | select(.headBranch | startswith("gh-readonly-queue/main/pr-<N>-"))'`, (about 8 runs per queue entry, so a smaller `--limit` can miss the PR on a busy queue; under grouped merging a member PR's group ref names the DEEPEST member — an empty select means correlate recent `merge_group` runs by `headSha`/`createdAt`, not "no run"), then diagnose the failing job from that run. The dequeue is silent (a `failed_checks` removal is re-queued by GitHub 2 to 3.5 minutes later while auto-merge normally stays armed; a red advisory job does not dequeue, so do not push over it): the PR stays OPEN, so `gh pr view <N> --json state,autoMergeRequest` reads `OPEN` with auto-merge armed (`autoMergeRequest` set) or disarmed (`null`); section 7's wait names it (`LEFT THE MERGE QUEUE UNMERGED`, reason from the queue's removal event). Recipe: [merge-queue-dequeue.md](${CLAUDE_PLUGIN_ROOT}/skills/ship/references/merge-queue-dequeue.md). On a conflict or lockfile / `kb-index` drift, the local arm is: merge `origin/main` into the PR branch (merge-pr §3.1 "Route conflicts"), push only for a failure that will recur, and re-arm `gh pr merge <N> --squash --auto` only when `autoMergeRequest` is `null` (the recipe's steps 2 and 3 win over any shorter inline recovery text). Cap it at ONE re-enqueue per PR before escalating to the operator.
89
89
  - **Armed on a merge-queue repo, not yet enqueued: leave it alone** until `[ship.phase7.queue_wait_expired]` (an armed PR that merely reads BEHIND is waiting for GitHub to enqueue it; the ship Phase 7 poll prints `[ship.phase7.queue_wait]`, and `sync-pr-behind.sh` itself refuses it with `kind=queue_wait`; never `gh pr update-branch` it). **Otherwise, if the PR is not in the queue** (an admin-bypass path, or a rejection that names "not up to date"), run `gh pr update-branch <N>` — **but never when both sides moved the `knowledge-base/` file count**, which a server-side merge resolves without the `kb-index` driver; merge `origin/main` locally and push instead (see [merge-pr/SKILL.md](../merge-pr/SKILL.md) §3.1 "Route conflicts"), then wait for CI to go green using **Claude: Monitor tool** / **Grok: AwaitShell** (`plugins/soleur/lib/harness.ts` `pollInstructions()`) — NEVER a backgrounded poll loop (`hr-monitor-not-run-in-background-for-polling`, hook-enforced by `background-poll-prefer-monitor.sh`), then merge.
90
90
 
91
91
  ### 5. Review delegation
@@ -25,7 +25,7 @@ bash "${CLAUDE_PLUGIN_ROOT}/scripts/sync-pr-behind.sh" "$N" --queue-state # <q
25
25
 
26
26
  **Recover (agent-run, ONE re-enqueue).** The short recovery printed on the exit-13 line summarises these steps; where they differ, these steps win.
27
27
 
28
- 1. Read why: `gh run list --event merge_group --limit 100 --json databaseId,headBranch,conclusion,url --jq '.[] | select(.headBranch | startswith("gh-readonly-queue/main/pr-'"$N"'-"))'`, then `gh run view <databaseId> --log-failed` for the failing job. The limit is 100 because one queue entry runs about 8 workflows.
28
+ 1. Read why: `gh run list --event merge_group --limit 100 --json databaseId,headBranch,conclusion,url --jq '.[] | select(.headBranch | startswith("gh-readonly-queue/main/pr-'"$N"'-"))'`, then `gh run view <databaseId> --log-failed` for the failing job. The limit is 100 because one queue entry runs about 8 workflows. Grouped merging (max_entries_to_merge=3): a member PR's group ref is named for the group's DEEPEST member, so a member's own `pr-<N>-` lookup can return zero runs while the group build ran under another member's number — if the select is empty, drop it and correlate the recent `merge_group` runs by `headSha`/`createdAt`.
29
29
  2. Before pushing, read `--queue-state` (a dequeue reached through the marker alone, with no removal event yet, reads `not_queued removal=none` on a second read because the first print consumed the marker: treat that read as still dequeued; after a push or re-arm of your own it means not queued yet). `queued` means GitHub already re-queued the PR: a flake needs no push, and a push removes it from the queue again (`reason=manual`, a full re-queue). `dequeued` with auto-merge armed after a `failed_checks` removal and a flake: wait about 4 minutes and read again, expecting `queued`; do not push. If it still reads `dequeued`, the re-queue is not coming: report it with the failing run URL (step 4) or push a fix for a failure that will recur. Push only a fix for a failure that will recur. Fix it on the PR branch. A conflict or lockfile / `kb-index` drift: `git merge origin/main` locally (merge-pr §3.1 "Route conflicts"), resolve, commit, push.
30
30
  3. Re-arm once, only when `gh pr view "$N" --json autoMergeRequest --jq '.autoMergeRequest'` prints `null`: `gh pr merge "$N" --squash --auto`. When it is armed, do not re-arm. Either way, re-run the Phase 7 poll and wait.
31
31
  4. A second dequeue of the same PR: stop and report it to the operator with the failing run URL. Do not loop.