@tritard/waterbrother 0.6.0 → 0.6.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/router.js +12 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tritard/waterbrother",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "Waterbrother: Grok-powered coding CLI with local tools, sessions, operator modes, and approval controls",
5
5
  "type": "module",
6
6
  "bin": {
package/src/router.js CHANGED
@@ -22,14 +22,15 @@ function looksLikeWorkRequest(text) {
22
22
  function inferPassFromText(text) {
23
23
  const l = lower(text);
24
24
  if (!l) return null;
25
- if (/^(ship it|accept|merge it|looks good ship it)\b/.test(l)) return { intent: "accept", confidence: "high" };
26
- if (/^(fix these|fix that|address those|redo|rebuild|try again|patch it|build it|go ahead|go$|implement it)\b/.test(l)) return { intent: "build", confidence: "high" };
27
- if (/^(check it|what'?s wrong|what is wrong|review it|challenge( harder)?|find bugs|poke holes|stress test it)\b/.test(l)) return { intent: "challenge", confidence: "high" };
28
- if (/^(what am i not thinking of|what else|what if|surprise me|invent|give me alternatives|think wider|out of the box)\b/.test(l)) return { intent: "invent", confidence: "high" };
29
- if (/^(should we|which should|which option|what should we|think deeper|tell me more about|compare |tradeoff|jwt or |sessions or |oauth|oauth2)\b/.test(l)) return { intent: "decide", confidence: "medium" };
25
+ // Decision detail must be checked before generic "decide" "tell me more about 2" is detail, not decide
30
26
  if (/^[1-9]\d*$/.test(l)) return { intent: "choose", confidence: "high", optionIndex: Number.parseInt(l, 10) };
31
27
  const moreMatch = l.match(/^(tell me more about|more on|details on|expand)\s+(\d+)\b/);
32
28
  if (moreMatch) return { intent: "decision-detail", confidence: "high", optionIndex: Number.parseInt(moreMatch[2], 10) };
29
+ if (/^(ship it|accept|merge it|looks good ship it)\b/.test(l)) return { intent: "accept", confidence: "high" };
30
+ if (/^(rebuild|try again|patch it|build it|go ahead|implement it)\b/.test(l)) return { intent: "build", confidence: "high" };
31
+ if (/^(check it|what'?s wrong|what is wrong|review it|challenge( harder)?|find bugs|poke holes|stress test it)\b/.test(l)) return { intent: "challenge", confidence: "high" };
32
+ if (/^(what am i not thinking of|what else|what if|surprise me|invent|give me alternatives|think wider|out of the box)\b/.test(l)) return { intent: "invent", confidence: "high" };
33
+ if (/^(should we|which should|which option|what should we|think deeper|compare |tradeoff|jwt or |sessions or |oauth|oauth2)\b/.test(l)) return { intent: "decide", confidence: "medium" };
33
34
  if (/^ignore\b/.test(l)) return { intent: "ignore", confidence: "medium" };
34
35
  return null;
35
36
  }
@@ -62,8 +63,13 @@ export function routeNaturalInput(text, { task = null } = {}) {
62
63
  return { kind: "choose-recommended-and-build", confidence: "high", raw };
63
64
  }
64
65
  }
66
+ if (task.state === "build-ready") {
67
+ if (/^(go|go ahead|do it|build it)\b/i.test(raw)) {
68
+ return { kind: "build", confidence: "high", raw };
69
+ }
70
+ }
65
71
  if (task.state === "review-ready") {
66
- if (/^(fix these|fix them|address those|redo)\b/i.test(raw)) {
72
+ if (/^(fix these|fix them|fix that|address those|redo)\b/i.test(raw)) {
67
73
  return { kind: "fix-review-findings", confidence: "high", raw };
68
74
  }
69
75
  if (/^(think deeper|re-think|rethink|step back)\b/i.test(raw)) {