@webappwiz/arbor 0.0.18 → 0.0.20

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 (3) hide show
  1. package/README.md +2 -1
  2. package/index.js +10 -3
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -137,7 +137,8 @@ in silence: it is the one thing that makes the work resumable.
137
137
 
138
138
  A `ARBOR.md` that is there gets checked against the shape the agent skill
139
139
  prescribes (`# <task>`, `## Goal`, `## Next` with something unchecked in it, a
140
- `## Blocked` question once escalated), and anything off is printed under it.
140
+ `## Blocked` with `- [ ] Q1.` items once escalated, and none left open after),
141
+ and anything off is printed under it.
141
142
  Warnings only, never a refusal: the agent that wrote the file is the one that
142
143
  runs `show` on it, and a rough plan still beats none.
143
144
 
package/index.js CHANGED
@@ -227,6 +227,8 @@ import { Markdown } from "webappwiz/md";
227
227
  var SECTIONS = ["Goal", "Files", "Done", "Next", "Notes", "Blocked"];
228
228
  var REQUIRED = ["Goal", "Files", "Next"];
229
229
  var UNCHECKED = /^[ \t]*- \[ \]/m;
230
+ var QUESTION = /^[ \t]*- \[[ xX]\] Q\d+\./m;
231
+ var OPEN_QUESTION = /^[ \t]*- \[ \] (Q\d+)\./gm;
230
232
  function checkPlan(text, { task, escalated = false }) {
231
233
  const md = Markdown.parse(text);
232
234
  const problems = [];
@@ -255,10 +257,15 @@ function checkPlan(text, { task, escalated = false }) {
255
257
  }
256
258
  const blocked = section("Blocked");
257
259
  if (escalated && blocked === null) {
258
- problems.push("escalated with no ## Blocked section: state what needs verifying and the question a human must answer");
260
+ problems.push("escalated with no ## Blocked section: add `- [ ] Q1.` items for what the reviewer must do");
259
261
  }
260
- if (blocked !== null && !blocked.includes("?")) {
261
- problems.push("## Blocked asks nothing: a human needs one specific question to answer");
262
+ if (blocked !== null && !QUESTION.test(blocked)) {
263
+ problems.push("## Blocked lists nothing: add `- [ ] Q1.` items for what the reviewer must do");
264
+ }
265
+ const open = blocked === null ? [] : [...blocked.matchAll(OPEN_QUESTION)];
266
+ if (!escalated && open.length > 0) {
267
+ const numbers = open.map((match) => match[1]).join(", ");
268
+ problems.push(`## Blocked has open ${numbers}: ask the reviewer before merging`);
262
269
  }
263
270
  const known = SECTIONS.map((section2) => section2.toLowerCase());
264
271
  for (const section2 of md.sections) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webappwiz/arbor",
3
- "version": "0.0.18",
3
+ "version": "0.0.20",
4
4
  "description": "Runs several AI coding agents on one repository at once, each in its own git worktree",
5
5
  "license": "MIT",
6
6
  "author": "Jared Johnson",
@@ -17,7 +17,7 @@
17
17
  "access": "public"
18
18
  },
19
19
  "dependencies": {
20
- "webappwiz": "^0.0.18",
20
+ "webappwiz": "^0.0.20",
21
21
  "zod": "^4.4.3"
22
22
  },
23
23
  "main": "./index.js",