@jabworks/condux 0.25.0 → 0.25.2

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": "@jabworks/condux",
3
- "version": "0.25.0",
3
+ "version": "0.25.2",
4
4
  "description": "OpenCode plugin for the condux workflow toolkit — bundles the condux skills and injects the specialist agents (coder, explorer, planner, researcher) plus an opt-in plan-review listener.",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -106,11 +106,18 @@ const distPointToSegment = (px, py, x1, y1, x2, y2) => {
106
106
  return Math.hypot(px - nx, py - ny);
107
107
  };
108
108
 
109
+ // Distance from a point to a box: zero inside it, else to its nearest edge.
110
+ const distPointToBox = (px, py, box) =>
111
+ Math.hypot(Math.max(box.x0 - px, 0, px - box.x1), Math.max(box.y0 - py, 0, py - box.y1));
112
+
109
113
  // Distance from a box to a segment: zero when the segment enters the box,
110
- // else the nearest of the box's corners. Label attribution measures this, not
111
- // the box centre — a long start-anchored label beside a vertical edge has its
112
- // centre far from the line and its near edge right on it, and real diagrams
113
- // (the 2026-09-08 reporting one, six of seven labels) are drawn that way.
114
+ // else the nearer of two measures — a box corner to the segment, or a segment
115
+ // endpoint to the box. Label attribution measures this, not the box centre —
116
+ // a long start-anchored label beside a vertical edge has its centre far from
117
+ // the line and its near edge right on it, and real diagrams (the 2026-09-08
118
+ // reporting one, six of seven labels) are drawn that way. Corners alone miss
119
+ // the other shape: an arrow whose tip faces the middle of a wide label's side
120
+ // is far from every corner (section-loop.html's step 1: 63.1 against 7.25).
114
121
  const distBoxToSegment = (box, x1, y1, x2, y2) => {
115
122
  if (liangBarsky(x1, y1, x2, y2, box)) return 0;
116
123
 
@@ -121,7 +128,11 @@ const distBoxToSegment = (box, x1, y1, x2, y2) => {
121
128
  [box.x1, box.y1],
122
129
  ];
123
130
 
124
- return Math.min(...corners.map(([px, py]) => distPointToSegment(px, py, x1, y1, x2, y2)));
131
+ return Math.min(
132
+ ...corners.map(([px, py]) => distPointToSegment(px, py, x1, y1, x2, y2)),
133
+ distPointToBox(x1, y1, box),
134
+ distPointToBox(x2, y2, box),
135
+ );
125
136
  };
126
137
 
127
138
  const fmt = (n) => Math.round(n * 10) / 10;
@@ -18,8 +18,8 @@ No under-planning for a cross-cutting feature.
18
18
  ## Live Context
19
19
 
20
20
  ```!
21
- git status --short
22
- git log --oneline -5
21
+ git status --short 2>/dev/null || echo "(not a git repository yet)"
22
+ git log --oneline -5 2>/dev/null || echo "(no commits yet)"
23
23
  ```
24
24
 
25
25
  ## Operating Rules
@@ -106,6 +106,15 @@ Every tier ends with `preflight` then `finalize` — no exceptions.
106
106
  After the user picks, load **only** that skill, run it, then return to the nearest
107
107
  checkpoint and re-present the menu until the user chooses Done.
108
108
 
109
+ **When the question tool caps the options.** CP-1 and CP-3 have five rows, and
110
+ some hosts' question tools take four (Claude Code's AskUserQuestion does). The
111
+ first four rows go on buttons, recommended first. The fifth row rides in the
112
+ free-text slot the tool adds ("Other"), and the question text names it:
113
+ "Plan ready — how do we proceed? (or type 'revise' to rework the plan)" for
114
+ CP-1, "(or say done)" for CP-3. Never merge two rows into one button to make
115
+ room — "Use agents" for the two agent rows is exactly the erosion this rule
116
+ prevents. A host with no cap, or a plain-text menu, shows every row.
117
+
109
118
  ### CP-1 — Plan ready
110
119
 
111
120
  *After draft-plan sign-off (LARGE) or the inline plan (MEDIUM). Plan review already
@@ -248,6 +257,7 @@ Stop if you catch yourself doing any of these:
248
257
  | Tests / lint / typecheck mid-implementation | Save it all for `finalize` |
249
258
  | Spawning agents for a task you can just do | Default is to implement yourself |
250
259
  | Omitting the subagent options from a checkpoint menu | The default shapes the recommendation, never the menu — present every CP-1 row |
260
+ | Merging or dropping rows to fit a four-option question tool | Four rows on buttons, the fifth named in the question text and taken through "Other" |
251
261
  | Silently skipping discovery on a LARGE task | Ask — it's a soft gate, not a free pass |
252
262
  | Rewriting a test spec to make it pass | Stop and ask — never silently edit specs |
253
263
  | Auto-running code-review, commits, or agents | They're checkpoint choices; run only when picked |