goalbuddy 0.3.6 → 0.3.8

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 (81) hide show
  1. package/CHANGELOG.md +61 -0
  2. package/CONTRIBUTING.md +2 -2
  3. package/README.md +27 -10
  4. package/{RELEASE-0.3.5.md → docs/releases/0.3.5.md} +4 -4
  5. package/docs/releases/0.3.7.md +129 -0
  6. package/docs/releases/0.3.8.md +40 -0
  7. package/docs/releases/README.md +83 -0
  8. package/goalbuddy/SKILL.md +21 -10
  9. package/goalbuddy/scripts/check-goal-state.mjs +53 -0
  10. package/goalbuddy/scripts/render-task-prompt.mjs +39 -4
  11. package/{plugins/goalbuddy/skills/goalbuddy/extend → goalbuddy/surfaces}/local-goal-board/README.md +7 -9
  12. package/goalbuddy/{extend → surfaces}/local-goal-board/examples/sample-goal/state.yaml +5 -5
  13. package/{plugins/goalbuddy/skills/goalbuddy/extend → goalbuddy/surfaces}/local-goal-board/examples/subgoal-parent/state.yaml +3 -3
  14. package/goalbuddy/{extend → surfaces}/local-goal-board/examples/subgoal-parent/subgoals/T004-board-view/state.yaml +3 -3
  15. package/{plugins/goalbuddy/skills/goalbuddy/extend → goalbuddy/surfaces}/local-goal-board/scripts/lib/goal-board.mjs +17 -13
  16. package/goalbuddy/{extend → surfaces}/local-goal-board/scripts/local-goal-board.mjs +27 -6
  17. package/{plugins/goalbuddy/skills/goalbuddy/extend → goalbuddy/surfaces}/local-goal-board/test/local-goal-board.test.mjs +63 -12
  18. package/goalbuddy/templates/goal.md +9 -0
  19. package/goalbuddy/templates/state.yaml +7 -6
  20. package/internal/assets/goalbuddy-v0.3.7-release.png +0 -0
  21. package/internal/cli/goal-maker.mjs +177 -717
  22. package/package.json +7 -8
  23. package/plugins/goalbuddy/.claude-plugin/plugin.json +3 -4
  24. package/plugins/goalbuddy/.codex-plugin/plugin.json +5 -6
  25. package/plugins/goalbuddy/README.md +4 -3
  26. package/plugins/goalbuddy/skills/goalbuddy/SKILL.md +21 -10
  27. package/plugins/goalbuddy/skills/goalbuddy/scripts/check-goal-state.mjs +53 -0
  28. package/plugins/goalbuddy/skills/goalbuddy/scripts/render-task-prompt.mjs +39 -4
  29. package/{goalbuddy/extend → plugins/goalbuddy/skills/goalbuddy/surfaces}/local-goal-board/README.md +7 -9
  30. package/plugins/goalbuddy/skills/goalbuddy/{extend → surfaces}/local-goal-board/examples/sample-goal/state.yaml +5 -5
  31. package/{goalbuddy/extend → plugins/goalbuddy/skills/goalbuddy/surfaces}/local-goal-board/examples/subgoal-parent/state.yaml +3 -3
  32. package/plugins/goalbuddy/skills/goalbuddy/{extend → surfaces}/local-goal-board/examples/subgoal-parent/subgoals/T004-board-view/state.yaml +3 -3
  33. package/{goalbuddy/extend → plugins/goalbuddy/skills/goalbuddy/surfaces}/local-goal-board/scripts/lib/goal-board.mjs +2 -2
  34. package/plugins/goalbuddy/skills/goalbuddy/{extend → surfaces}/local-goal-board/scripts/local-goal-board.mjs +27 -6
  35. package/{goalbuddy/extend → plugins/goalbuddy/skills/goalbuddy/surfaces}/local-goal-board/test/local-goal-board.test.mjs +35 -8
  36. package/plugins/goalbuddy/skills/goalbuddy/templates/goal.md +9 -0
  37. package/plugins/goalbuddy/skills/goalbuddy/templates/state.yaml +7 -6
  38. package/examples/extend-catalog-workflow/goal.md +0 -53
  39. package/examples/extend-catalog-workflow/notes/T001-extension-model-map.md +0 -47
  40. package/examples/extend-catalog-workflow/notes/T002-architecture-decision.md +0 -48
  41. package/examples/extend-catalog-workflow/notes/T003-implementation-summary.md +0 -43
  42. package/examples/extend-catalog-workflow/notes/T004-root-extend-folder.md +0 -24
  43. package/examples/extend-catalog-workflow/notes/T005-layout-cleanup.md +0 -46
  44. package/examples/extend-catalog-workflow/notes/T006-catalog-location.md +0 -50
  45. package/examples/extend-catalog-workflow/notes/T999-completion-audit.md +0 -36
  46. package/examples/extend-catalog-workflow/state.yaml +0 -327
  47. package/examples/github-pr-workflow-extension/pr-handoff.md +0 -46
  48. package/examples/improve-goal-maker/goal.md +0 -51
  49. package/examples/improve-goal-maker/notes/T001-repo-map.md +0 -59
  50. package/examples/improve-goal-maker/notes/T002-risk-map.md +0 -37
  51. package/examples/improve-goal-maker/state.yaml +0 -224
  52. package/goalbuddy/extend/github-projects/README.md +0 -105
  53. package/goalbuddy/extend/github-projects/examples/goal-board-sync/state.yaml +0 -63
  54. package/goalbuddy/extend/github-projects/extension.yaml +0 -43
  55. package/goalbuddy/extend/github-projects/scripts/lib/github-projects.mjs +0 -728
  56. package/goalbuddy/extend/github-projects/scripts/lib/goal-state.mjs +0 -362
  57. package/goalbuddy/extend/github-projects/scripts/sync-github-project.mjs +0 -193
  58. package/goalbuddy/extend/github-projects/test/github-projects.test.mjs +0 -267
  59. package/goalbuddy/extend/local-goal-board/extension.yaml +0 -39
  60. package/internal/assets/extend-release.png +0 -0
  61. package/internal/assets/extend-release.svg +0 -83
  62. package/plugins/goalbuddy/skills/goalbuddy/extend/github-projects/README.md +0 -105
  63. package/plugins/goalbuddy/skills/goalbuddy/extend/github-projects/examples/goal-board-sync/state.yaml +0 -63
  64. package/plugins/goalbuddy/skills/goalbuddy/extend/github-projects/extension.yaml +0 -43
  65. package/plugins/goalbuddy/skills/goalbuddy/extend/github-projects/scripts/lib/github-projects.mjs +0 -728
  66. package/plugins/goalbuddy/skills/goalbuddy/extend/github-projects/scripts/lib/goal-state.mjs +0 -362
  67. package/plugins/goalbuddy/skills/goalbuddy/extend/github-projects/scripts/sync-github-project.mjs +0 -193
  68. package/plugins/goalbuddy/skills/goalbuddy/extend/github-projects/test/github-projects.test.mjs +0 -267
  69. package/plugins/goalbuddy/skills/goalbuddy/extend/local-goal-board/extension.yaml +0 -39
  70. /package/goalbuddy/{extend → surfaces}/local-goal-board/assets/goalbuddy-mark.png +0 -0
  71. /package/goalbuddy/{extend → surfaces}/local-goal-board/examples/sample-goal/notes/T001-scout.md +0 -0
  72. /package/goalbuddy/{extend → surfaces}/local-goal-board/examples/subgoal-parent/goal.md +0 -0
  73. /package/goalbuddy/{extend → surfaces}/local-goal-board/examples/subgoal-parent/notes/.gitkeep +0 -0
  74. /package/goalbuddy/{extend → surfaces}/local-goal-board/examples/subgoal-parent/subgoals/T004-board-view/goal.md +0 -0
  75. /package/goalbuddy/{extend → surfaces}/local-goal-board/examples/subgoal-parent/subgoals/T004-board-view/notes/.gitkeep +0 -0
  76. /package/plugins/goalbuddy/skills/goalbuddy/{extend → surfaces}/local-goal-board/assets/goalbuddy-mark.png +0 -0
  77. /package/plugins/goalbuddy/skills/goalbuddy/{extend → surfaces}/local-goal-board/examples/sample-goal/notes/T001-scout.md +0 -0
  78. /package/plugins/goalbuddy/skills/goalbuddy/{extend → surfaces}/local-goal-board/examples/subgoal-parent/goal.md +0 -0
  79. /package/plugins/goalbuddy/skills/goalbuddy/{extend → surfaces}/local-goal-board/examples/subgoal-parent/notes/.gitkeep +0 -0
  80. /package/plugins/goalbuddy/skills/goalbuddy/{extend → surfaces}/local-goal-board/examples/subgoal-parent/subgoals/T004-board-view/goal.md +0 -0
  81. /package/plugins/goalbuddy/skills/goalbuddy/{extend → surfaces}/local-goal-board/examples/subgoal-parent/subgoals/T004-board-view/notes/.gitkeep +0 -0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "goalbuddy",
3
- "version": "0.3.6",
4
- "description": "A /goal operating system for Codex and Claude Code: subgoals, parallel-agent-ready boards, dark mode, receipts, and verification.",
3
+ "version": "0.3.8",
4
+ "description": "A /goal operating loop for Codex and Claude Code: goal oracles, local boards, receipts, and verification.",
5
5
  "type": "module",
6
6
  "bin": {
7
7
  "goalbuddy": "internal/cli/goal-maker.mjs",
@@ -9,22 +9,22 @@
9
9
  },
10
10
  "files": [
11
11
  ".agents/plugins/marketplace.json",
12
+ "CHANGELOG.md",
12
13
  "README.md",
13
- "RELEASE-0.3.5.md",
14
14
  "CONTRIBUTING.md",
15
- "examples",
15
+ "docs/releases",
16
16
  "plugins/goalbuddy",
17
17
  "internal/assets",
18
18
  "internal/cli",
19
19
  "goalbuddy/SKILL.md",
20
20
  "goalbuddy/agents",
21
21
  "goalbuddy/scripts",
22
- "goalbuddy/extend",
22
+ "goalbuddy/surfaces",
23
23
  "goalbuddy/templates"
24
24
  ],
25
25
  "scripts": {
26
- "check": "node --check internal/cli/*.mjs goalbuddy/scripts/*.mjs && node --test internal/test/*.test.mjs",
27
- "test": "node --test internal/test/*.test.mjs",
26
+ "check": "node --check internal/cli/*.mjs goalbuddy/scripts/*.mjs goalbuddy/surfaces/local-goal-board/scripts/*.mjs goalbuddy/surfaces/local-goal-board/scripts/lib/*.mjs && node --test internal/test/*.test.mjs goalbuddy/surfaces/local-goal-board/test/*.test.mjs",
27
+ "test": "node --test internal/test/*.test.mjs goalbuddy/surfaces/local-goal-board/test/*.test.mjs",
28
28
  "pack:dry-run": "npm pack --dry-run",
29
29
  "postinstall": "node internal/cli/postinstall.mjs",
30
30
  "publish:check": "node internal/cli/check-publish-version.mjs && npm run pack:dry-run",
@@ -51,7 +51,6 @@
51
51
  "cli",
52
52
  "workflow",
53
53
  "agent",
54
- "extensions",
55
54
  "verification"
56
55
  ],
57
56
  "author": "tolibear",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "goalbuddy",
3
- "version": "0.3.6",
4
- "description": "Turn broad Claude Code work into verified GoalBuddy boards with subgoals, parallel-agent-ready handoffs, dark mode, and receipts.",
3
+ "version": "0.3.8",
4
+ "description": "Turn broad Codex and Claude Code work into pressured /goal runs with oracles, local boards, receipts, and verification.",
5
5
  "author": {
6
6
  "name": "tolibear",
7
7
  "email": "support@tolibear.com",
@@ -18,7 +18,6 @@
18
18
  "goal",
19
19
  "task-board",
20
20
  "receipts",
21
- "workflow",
22
- "extensions"
21
+ "workflow"
23
22
  ]
24
23
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "goalbuddy",
3
- "version": "0.3.6",
4
- "description": "Turn broad Codex and Claude Code work into verified GoalBuddy boards with subgoals, parallel-agent-ready handoffs, dark mode, and receipts.",
3
+ "version": "0.3.8",
4
+ "description": "Turn broad Codex and Claude Code work into pressured /goal runs with oracles, local boards, receipts, and verification.",
5
5
  "author": {
6
6
  "name": "tolibear",
7
7
  "email": "support@tolibear.com",
@@ -18,14 +18,13 @@
18
18
  "goal",
19
19
  "task-board",
20
20
  "receipts",
21
- "workflow",
22
- "extensions"
21
+ "workflow"
23
22
  ],
24
23
  "skills": "./skills/",
25
24
  "interface": {
26
25
  "displayName": "GoalBuddy",
27
- "shortDescription": "Verified goal boards with subgoals, parallel-agent-ready handoffs, and dark mode",
28
- "longDescription": "GoalBuddy packages a structured goal workflow for broad, long-running, or ambiguous engineering work in Codex or Claude Code. It creates durable goal charters, task boards, optional depth-1 subgoals, visual board surfaces, parallel-agent-ready handoffs, receipts, verification gates, extension handoffs, and compatibility guidance for teams moving from goal-maker.",
26
+ "shortDescription": "Goal oracles, local boards, receipts, and proof loops for /goal",
27
+ "longDescription": "GoalBuddy packages a structured goal workflow for broad, long-running, or ambiguous engineering work in Codex or Claude Code. It creates durable goal charters, goal oracles, task boards, optional depth-1 subgoals, local board surfaces, parallel-agent-ready handoffs, receipts, verification gates, and compatibility guidance for teams moving from goal-maker.",
29
28
  "developerName": "tolibear",
30
29
  "category": "Coding",
31
30
  "capabilities": [
@@ -1,8 +1,8 @@
1
1
  # GoalBuddy Plugin (Codex + Claude Code)
2
2
 
3
- GoalBuddy packages the canonical `goal-prep` skill as a plugin so teams can install the reusable workflow in **Codex** and **Claude Code**, while keeping the npm CLI for local setup, doctor checks, and extension management.
3
+ GoalBuddy packages the canonical `goal-prep` skill as a plugin so teams can install the reusable workflow in **Codex** and **Claude Code**, while keeping the npm CLI for local setup, doctor checks, and the built-in local board surface.
4
4
 
5
- Version 0.3.5 is the Subgoals, Parallel Agents, and Dark Mode release: depth-1 child boards, a shared multi-board local hub, readable dark-mode boards, stricter agent contracts, deterministic prompt rendering, and conservative parallel planning for long-running work.
5
+ Version 0.3.8 keeps the Goalmaxxed core and adds board-hub guardrails so agents reuse the shared local board hub instead of stopping it after an unregistered board URL returns 404.
6
6
 
7
7
  ## What It Contains
8
8
 
@@ -56,8 +56,9 @@ goalbuddy --target claude # installs for Claude Code only
56
56
  For local CLI testing before npm publish:
57
57
 
58
58
  ```bash
59
- node internal/cli/goal-maker.mjs --catalog-url extend/catalog.json
59
+ node internal/cli/goal-maker.mjs
60
60
  node internal/cli/goal-maker.mjs doctor
61
+ node internal/cli/goal-maker.mjs board docs/goals/<slug> --once --json
61
62
  ```
62
63
 
63
64
  ## Release Notes
@@ -12,9 +12,17 @@ GoalBuddy is for autonomous, long-running Codex or Claude Code work where the PM
12
12
  The loop is:
13
13
 
14
14
  ```text
15
- raw user intent -> intake compiler -> discovery/plan validation/execution board -> one active task -> receipt -> board update -> repeat
15
+ raw user intent -> intake compiler -> goal oracle -> local work surface -> one active task -> receipt -> proof loop -> repeat
16
16
  ```
17
17
 
18
+ GoalBuddy's core invariant is:
19
+
20
+ ```text
21
+ Intent -> Oracle -> Surface -> Loop -> Proof
22
+ ```
23
+
24
+ No oracle, no serious goal. A goal oracle is the observable signal that tells the PM whether the original owner outcome is actually true yet. It may be a test suite, browser walkthrough, demo transcript, generated artifact, benchmark, source-backed answer, release check, or final human decision. Weak proof creates weak goals, so record the oracle before shaping tasks and keep testing against it until final completion.
25
+
18
26
  ## Invocation Boundary
19
27
 
20
28
  There are two different modes:
@@ -31,7 +39,7 @@ Allowed `$goal-prep` actions:
31
39
  - run the bundled GoalBuddy update checker and mention a newer version if one is available;
32
40
  - ask diagnostic intake questions and wait when required;
33
41
  - create or repair only `docs/goals/<slug>/goal.md`, `docs/goals/<slug>/state.yaml`, `docs/goals/<slug>/notes/`, and the generated `.goalbuddy-board/` visual board artifact;
34
- - create and open the selected visual board surface for the goal;
42
+ - create and open the built-in local GoalBuddy board surface for the goal unless the user opts out;
35
43
  - optionally run the GoalBuddy board checker against that `state.yaml`;
36
44
  - verify GoalBuddy agent availability, if this can be done without touching implementation work, and record `installed`, `bundled_not_installed`, `missing`, or `unknown` truthfully;
37
45
  - print exactly `/goal Follow docs/goals/<slug>/goal.md.`;
@@ -69,25 +77,27 @@ Extract:
69
77
  - authority: `requested | approved | inferred | needs_approval | blocked`;
70
78
  - proof type: `test | demo | artifact | metric | review | source_backed_answer | decision`;
71
79
  - completion proof: the observable signal for full outcome completion;
80
+ - goal oracle: the live check, walkthrough, artifact, metric, or decision that will keep pressure on the goal and prevent early completion;
72
81
  - likely misfire: how `/goal` could succeed at the wrong thing;
73
82
  - blind spots: important risks, choices, or success dimensions the user may not have named yet;
74
83
  - existing plan facts: user-provided steps, files, constraints, or sequencing that must be preserved but still validated.
75
84
 
76
- Ask the visual-board question early, before detailed task shaping:
85
+ Use the local GoalBuddy board as the default work surface for broad GoalBuddy runs. Ask only when the user has not already implied they want the default local surface, the goal is unusually quick/private, or board setup would materially distract from the requested prep:
77
86
 
78
87
  ```text
79
- Do you want to set up a visual board for this?
88
+ Do you want the local GoalBuddy board for this goal?
80
89
  ```
81
90
 
82
91
  Recommended options:
83
92
 
84
93
  1. Local live board (Recommended) - starts immediately, requires no credentials, and lets the user watch tasks populate inside Codex or Claude Code.
85
- 2. GitHub Projects - best when stakeholders need a shared external board and the user can approve GitHub credentials/project details.
86
- 3. No visual board - best for quick or private goals where the file board is enough.
94
+ 2. No visual board - best for quick or private goals where the file board is enough.
87
95
 
88
96
  If the user chooses the local live board, create the goal directory, `notes/`, and an initial minimal `state.yaml` as soon as the slug is known, then run `npx goalbuddy board docs/goals/<slug>` and open the printed local URL in the AI coding agent's in-app browser (the Codex in-app Browser, the Claude Code preview, or the user's regular browser). The default local hub is `http://goalbuddy.localhost:41737/`, and board URLs normally look like `http://goalbuddy.localhost:41737/<slug>/`. In short: start the local board before filling the task list so the board pops up right away and cards populate live as `state.yaml` changes. Include the printed board URL in the final prep response as an actual clickable Markdown link, for example `[Open GoalBuddy board](http://goalbuddy.localhost:41737/<slug>/)`. Do not put the board URL only in a code block, quote, HTML comment, or prose that the UI cannot click.
89
97
 
90
- If the user chooses GitHub Projects, ask for approval and the required project target before any live write. Create or sync the GitHub Project at the same early point as the local board: after the goal root and skeleton `state.yaml` exist, before the detailed task list is finished, then sync again as tasks populate. Run a dry-run sync first when possible. Missing GitHub credentials or project details should not block local board creation or goal prep; record the missing requirement in `visual_board.github_projects` and seed a PM setup task.
98
+ If `http://goalbuddy.localhost:41737/<slug>/` returns 404, do not assume the existing process is stale and do not stop it. First check `http://127.0.0.1:41737/api/boards`. If that endpoint returns board JSON, the port is the shared multi-board hub; rerun `npx goalbuddy board docs/goals/<slug>` with the absolute goal path if needed so the new goal registers on the same port. Only stop a specific process on 41737 when `/api/boards` is missing, returns 404, or otherwise proves the listener is not a current GoalBuddy multi-board hub.
99
+
100
+ If the user wants an external board, GitHub sync, Slack digest, Linear handoff, or any other custom integration, do not install a GoalBuddy catalog item. Treat it as normal implementation work: create a concrete task that designs and verifies that integration inside the target repo or asks the operator for the required credentials and scope.
91
101
 
92
102
  Ask before board creation when the request is vague, strategic, improvement-oriented, or open-ended and the user has not explicitly said to use defaults. Ask one guided question at a time with 2-3 options and a recommended default, then wait. Continue the diagnostic intake until the user's answers are sufficient to choose the board shape. Do not create or repair `docs/goals/<slug>/` until the diagnostic intake is complete or the user explicitly accepts defaults.
93
103
 
@@ -134,7 +144,7 @@ Stop after each question. Do not create files, repair an existing board, run che
134
144
 
135
145
  Minimum diagnostic ladder for vague, strategic, or improvement-oriented goals:
136
146
 
137
- 1. Visual board: ask "Do you want to set up a visual board for this?"
147
+ 1. Goal surface: use the local live board by default, or ask "Do you want the local GoalBuddy board for this goal?" when board handling is unresolved.
138
148
  2. Intent target: what kind of improvement or outcome matters most?
139
149
  3. Success proof: what evidence would convince the user this worked?
140
150
  4. Scope and non-goals: what should remain untouched or explicitly out of scope?
@@ -173,7 +183,7 @@ Do:
173
183
  - classify the goal as `specific`, `open_ended`, `existing_plan`, `recovery`, or `audit`;
174
184
  - create or repair `docs/goals/<slug>/`;
175
185
  - create `goal.md`, `state.yaml`, and `notes/`;
176
- - if requested, start the local visual board immediately and open it in the AI coding agent's in-app browser (Codex in-app Browser, Claude Code preview, or the user's regular browser) before filling the task list;
186
+ - start the local board immediately and open it in the AI coding agent's in-app browser (Codex in-app Browser, Claude Code preview, or the user's regular browser) before filling the task list, unless the user opts out;
177
187
  - seed a role-tagged task board that matches the input shape;
178
188
  - make the first active task safe;
179
189
  - verify Scout, Worker, and Judge agent availability or record an explicit truthful state;
@@ -234,7 +244,7 @@ Use this skill for goals that are broad, multi-hour, ambiguous, high-risk, alrea
234
244
 
235
245
  For a one-change task, do not create a GoalBuddy board.
236
246
 
237
- Scout and Judge tasks may identify optional extension, plugin, publishing, reporting, or channel opportunities as improvement candidates. Treat those as normal board tasks. Extensions are supporting surfaces; `state.yaml` remains board truth.
247
+ Scout and Judge tasks may identify optional publishing, reporting, integration, plugin, or channel opportunities as improvement candidates. Treat those as normal board tasks with concrete implementation plans. `state.yaml` remains board truth.
238
248
 
239
249
  ## The Four Primitives
240
250
 
@@ -274,6 +284,7 @@ The charter answers:
274
284
  What did the user originally ask for?
275
285
  What are we trying to improve?
276
286
  What input shape did the intake identify?
287
+ What is the goal oracle?
277
288
  What constraints are non-negotiable?
278
289
  Is this goal specific, open-ended, existing-plan, recovery, or audit?
279
290
  What likely misfire must the PM avoid?
@@ -53,6 +53,38 @@ function nestedScalar(section, key) {
53
53
  return null;
54
54
  }
55
55
 
56
+ function pathScalar(path, key) {
57
+ const lines = text.split(/\r?\n/);
58
+ let depth = 0;
59
+ for (const line of lines) {
60
+ if (!line.trim()) continue;
61
+ const indent = line.match(/^ */)[0].length;
62
+ if (indent < depth * 2) depth = Math.floor(indent / 2);
63
+
64
+ if (depth < path.length && indent === depth * 2 && new RegExp(`^\\s{${indent}}${path[depth]}:\\s*$`).test(line)) {
65
+ depth += 1;
66
+ continue;
67
+ }
68
+
69
+ if (depth === path.length && indent === depth * 2) {
70
+ const match = line.match(new RegExp(`^\\s{${indent}}${key}:\\s*(.*?)\\s*$`));
71
+ if (match) return clean(match[1]);
72
+ }
73
+ }
74
+ return null;
75
+ }
76
+
77
+ function isWeakProof(value) {
78
+ if (value === null || value === undefined) return true;
79
+ const normalized = String(value).trim().toLowerCase();
80
+ return normalized === ""
81
+ || normalized === "unknown"
82
+ || normalized === "tbd"
83
+ || normalized === "todo"
84
+ || normalized === "none"
85
+ || /^<.*>$/.test(normalized);
86
+ }
87
+
56
88
  function sectionText(section) {
57
89
  const lines = text.split(/\r?\n/);
58
90
  const start = lines.findIndex((line) => new RegExp(`^${section}:\\s*$`).test(line));
@@ -225,6 +257,11 @@ const allowedAgentStatuses = new Set(["installed", "bundled_not_installed", "mis
225
257
  const continuousUntilFullOutcome = nestedScalar("rules", "continuous_until_full_outcome") === true;
226
258
  const missingInputOrCredentialsDoNotStopGoal =
227
259
  nestedScalar("rules", "missing_input_or_credentials_do_not_stop_goal") === true;
260
+ const goalPressureRequiresOracle = nestedScalar("rules", "goal_pressure_requires_oracle") !== false;
261
+ const noCompletionOnWeakProof = nestedScalar("rules", "no_completion_on_weak_proof") !== false;
262
+ const completionProof = pathScalar(["goal", "intake"], "completion_proof");
263
+ const oracleSignal = pathScalar(["goal", "oracle"], "signal");
264
+ const oracleFinalProof = pathScalar(["goal", "oracle"], "final_proof");
228
265
  const legacySignals = [
229
266
  /^gate:\s*$/m,
230
267
  /^artifact_policy:\s*$/m,
@@ -244,6 +281,19 @@ if (!["active", "blocked", "done"].includes(goalStatus)) {
244
281
  errors.push(`goal.status must be active, blocked, or done; got ${goalStatus || "<missing>"}`);
245
282
  }
246
283
 
284
+ if (goalPressureRequiresOracle) {
285
+ if (isWeakProof(oracleSignal)) {
286
+ warnings.push("goal.oracle.signal is missing or placeholder-like; weak oracles make /goal finish too early.");
287
+ }
288
+ if (isWeakProof(oracleFinalProof)) {
289
+ warnings.push("goal.oracle.final_proof is missing or placeholder-like; final completion needs receipt-backed proof.");
290
+ }
291
+ }
292
+
293
+ if (isWeakProof(completionProof)) {
294
+ warnings.push("goal.intake.completion_proof is missing or placeholder-like; record the observable signal that proves the full original outcome.");
295
+ }
296
+
247
297
  function agentStatusWarning(agent, status) {
248
298
  const agentLabel = agent[0].toUpperCase() + agent.slice(1);
249
299
  if (status === "bundled_not_installed") {
@@ -532,6 +582,9 @@ function escapeRegExp(value) {
532
582
  }
533
583
 
534
584
  if (goalStatus === "done") {
585
+ if (noCompletionOnWeakProof && (isWeakProof(completionProof) || isWeakProof(oracleSignal) || isWeakProof(oracleFinalProof))) {
586
+ errors.push("done goals require concrete completion proof, goal.oracle.signal, and goal.oracle.final_proof; weak proof cannot close a goal");
587
+ }
535
588
  const finalAudit = tasks.some((task) => {
536
589
  if (!["judge", "pm"].includes(task.type) || task.status !== "done") return false;
537
590
  if (!task.receipt.present || task.receipt.value === null) return false;
@@ -2,7 +2,7 @@
2
2
  import { existsSync, readFileSync } from "node:fs";
3
3
  import { basename, dirname, resolve } from "node:path";
4
4
  import { fileURLToPath } from "node:url";
5
- import { parseGoalStateText } from "../extend/local-goal-board/scripts/lib/goal-board.mjs";
5
+ import { parseGoalStateText } from "../surfaces/local-goal-board/scripts/lib/goal-board.mjs";
6
6
 
7
7
  const ROLE_DEFAULTS = {
8
8
  scout: { agent: "goal_scout", reasoning: "low", sandbox: "read-only" },
@@ -45,6 +45,7 @@ export function renderTaskPrompt(options) {
45
45
  fork_context_allowed: role !== "worker",
46
46
  board_path: board.path,
47
47
  child_board_paths: childBoardPaths(board),
48
+ goal_oracle: board.goal.oracle || null,
48
49
  slice_policy: board.document.rules?.slice_policy || null,
49
50
  warnings,
50
51
  },
@@ -141,6 +142,12 @@ function promptWarnings(board, task) {
141
142
  const warnings = [];
142
143
  const role = normalizeRole(task.type);
143
144
  if (task.id !== board.activeTask) warnings.push(`Task ${task.id} is not the active task on this board.`);
145
+ if (isWeakProof(board.goal.oracle?.signal)) {
146
+ warnings.push("goal.oracle.signal is missing or placeholder-like; keep the goal pressured by a concrete completion oracle.");
147
+ }
148
+ if (isWeakProof(board.goal.oracle?.final_proof)) {
149
+ warnings.push("goal.oracle.final_proof is missing or placeholder-like; do not mark the goal complete without receipt-backed proof.");
150
+ }
144
151
  if (role === "worker") {
145
152
  if (stringList(task.allowed_files).length === 0) warnings.push(`Worker task ${task.id} has no allowed_files.`);
146
153
  if (stringList(task.verify).length === 0) warnings.push(`Worker task ${task.id} has no verify commands.`);
@@ -211,6 +218,17 @@ function isTrue(value) {
211
218
  return value === true || String(value).toLowerCase() === "true";
212
219
  }
213
220
 
221
+ function isWeakProof(value) {
222
+ if (value === null || value === undefined) return true;
223
+ const normalized = String(value).trim().toLowerCase();
224
+ return normalized === ""
225
+ || normalized === "unknown"
226
+ || normalized === "tbd"
227
+ || normalized === "todo"
228
+ || normalized === "none"
229
+ || /^<.*>$/.test(normalized);
230
+ }
231
+
214
232
  function stringList(value) {
215
233
  return Array.isArray(value) ? value.filter((item) => item !== null && item !== undefined).map(String) : [];
216
234
  }
@@ -219,29 +237,43 @@ function receiptSchema(role) {
219
237
  if (role === "worker") {
220
238
  return {
221
239
  result: "done | blocked",
240
+ task_id: "<T###>",
241
+ board_path: "<path to state.yaml>",
222
242
  changed_files: [],
223
- commands: [{ cmd: "<command>", status: "pass | fail | not_run" }],
224
- summary: "<=120 words",
243
+ commands: [],
244
+ summary: "<=120 words>",
225
245
  remaining_blockers: [],
246
+ verification_attempts: 1,
247
+ stopped_because: null,
226
248
  };
227
249
  }
228
250
  if (role === "judge") {
229
251
  return {
230
252
  result: "done | blocked",
253
+ task_id: "<T###>",
254
+ board_path: "<path to state.yaml>",
231
255
  decision: "approved | rejected | approve_subgoal | reject_subgoal | not_complete | complete",
232
256
  full_outcome_complete: false,
257
+ rationale: "<=120 words>",
233
258
  evidence: [],
259
+ subgoal_contract: null,
260
+ parallel_safety: null,
234
261
  blocked_tasks: [],
262
+ missing_evidence: [],
235
263
  required_board_updates: [],
236
264
  };
237
265
  }
238
266
  return {
239
267
  result: "done | blocked",
240
- summary: "<=120 words",
268
+ task_id: "<T###>",
269
+ board_path: "<path to state.yaml>",
270
+ summary: "<=120 words>",
241
271
  evidence: [],
242
272
  facts: [],
243
273
  contradictions: [],
244
274
  ambiguity_requiring_judge: [],
275
+ commands: [],
276
+ note_needed: false,
245
277
  };
246
278
  }
247
279
 
@@ -261,6 +293,9 @@ function formatPrompt(payload) {
261
293
  lines.push("- child_board_paths:");
262
294
  for (const path of payload.metadata.child_board_paths) lines.push(` - ${path}`);
263
295
  }
296
+ if (payload.metadata.goal_oracle) {
297
+ lines.push(`- goal_oracle: ${JSON.stringify(payload.metadata.goal_oracle)}`);
298
+ }
264
299
  if (payload.metadata.slice_policy) {
265
300
  lines.push(`- slice_policy: ${JSON.stringify(payload.metadata.slice_policy)}`);
266
301
  }
@@ -2,7 +2,7 @@
2
2
 
3
3
  Generate a small local GoalBuddy board for a goal directory and watch it update live while agents work.
4
4
 
5
- The extension keeps `state.yaml` authoritative. It writes static web app files into the goal directory and serves them from a local-only Node server. The browser subscribes to Server-Sent Events, so cards update as `state.yaml`, `notes/`, or linked depth-1 sub-goal state changes without a manual reload.
5
+ The surface keeps `state.yaml` authoritative. It writes static web app files into the goal directory and serves them from a local-only Node server. The browser subscribes to Server-Sent Events, so cards update as `state.yaml`, `notes/`, or linked depth-1 sub-goal state changes without a manual reload.
6
6
 
7
7
  ## Use When
8
8
 
@@ -14,11 +14,10 @@ The extension keeps `state.yaml` authoritative. It writes static web app files i
14
14
  ## Generate And Serve
15
15
 
16
16
  ```bash
17
- node extend/local-goal-board/scripts/local-goal-board.mjs \
18
- --goal docs/goals/<slug>
17
+ npx goalbuddy board docs/goals/<slug>
19
18
  ```
20
19
 
21
- The generated app includes the bundled `assets/goalbuddy-mark.png`, so the board keeps the GoalBuddy mark after the extension is installed or copied elsewhere.
20
+ The generated app includes the bundled `assets/goalbuddy-mark.png`, so the board keeps the GoalBuddy mark anywhere the package is installed.
22
21
 
23
22
  The command writes:
24
23
 
@@ -34,8 +33,7 @@ Then it starts or reuses the shared local board hub at `http://goalbuddy.localho
34
33
  ## Check Without A Long-Running Server
35
34
 
36
35
  ```bash
37
- node extend/local-goal-board/scripts/local-goal-board.mjs \
38
- --goal docs/goals/<slug> \
36
+ npx goalbuddy board docs/goals/<slug> \
39
37
  --once \
40
38
  --json
41
39
  ```
@@ -63,9 +61,9 @@ Clicking a card opens a detail modal with the task objective, status, assignee,
63
61
  ## Verification
64
62
 
65
63
  ```bash
66
- node --test extend/local-goal-board/test/*.test.mjs
67
- node extend/local-goal-board/scripts/local-goal-board.mjs \
68
- --goal extend/local-goal-board/examples/sample-goal \
64
+ node --test goalbuddy/surfaces/local-goal-board/test/*.test.mjs
65
+ node goalbuddy/surfaces/local-goal-board/scripts/local-goal-board.mjs \
66
+ --goal goalbuddy/surfaces/local-goal-board/examples/sample-goal \
69
67
  --once \
70
68
  --json
71
69
  ```
@@ -1,8 +1,8 @@
1
1
  version: 2
2
2
 
3
3
  goal:
4
- title: "Local Kanban Board Extension"
5
- slug: "local-kanban-board-extension"
4
+ title: "Local Goal Board Surface"
5
+ slug: "local-goal-board-surface"
6
6
  kind: specific
7
7
  tranche: "Demonstrate local GoalBuddy board rendering."
8
8
  status: active
@@ -30,7 +30,7 @@ tasks:
30
30
  type: worker
31
31
  assignee: Worker
32
32
  status: blocked
33
- objective: "Catalog and document the local board extension."
33
+ objective: "Catalog and document the local board surface."
34
34
  receipt:
35
35
  result: blocked
36
36
  summary: "T003 is blocked during the progressive board motion demo."
@@ -78,7 +78,7 @@ tasks:
78
78
  type: scout
79
79
  assignee: Scout
80
80
  status: done
81
- objective: "List the extension launch paths."
81
+ objective: "List the board launch paths."
82
82
  receipt:
83
83
  result: done
84
84
  summary: "T009 completed during the progressive board motion demo."
@@ -118,7 +118,7 @@ tasks:
118
118
  type: worker
119
119
  assignee: Worker
120
120
  status: done
121
- objective: "Prepare final extension packaging check."
121
+ objective: "Prepare final board packaging check."
122
122
  receipt:
123
123
  result: done
124
124
  summary: "T014 completed during the progressive board motion demo."
@@ -31,10 +31,10 @@ tasks:
31
31
  status: active
32
32
  objective: "Build the sub-goal board view."
33
33
  allowed_files:
34
- - goalbuddy/extend/local-goal-board/scripts/lib/goal-board.mjs
35
- - goalbuddy/extend/local-goal-board/test/local-goal-board.test.mjs
34
+ - goalbuddy/surfaces/local-goal-board/scripts/lib/goal-board.mjs
35
+ - goalbuddy/surfaces/local-goal-board/test/local-goal-board.test.mjs
36
36
  verify:
37
- - node --test goalbuddy/extend/local-goal-board/test/local-goal-board.test.mjs
37
+ - node --test goalbuddy/surfaces/local-goal-board/test/local-goal-board.test.mjs
38
38
  stop_if:
39
39
  - "Need files outside allowed_files."
40
40
  subgoal:
@@ -24,16 +24,16 @@ tasks:
24
24
  result: done
25
25
  summary: "Child board payload needs normal columns and task details."
26
26
  evidence:
27
- - goalbuddy/extend/local-goal-board/scripts/lib/goal-board.mjs
27
+ - goalbuddy/surfaces/local-goal-board/scripts/lib/goal-board.mjs
28
28
  - id: T002
29
29
  type: worker
30
30
  assignee: Worker
31
31
  status: active
32
32
  objective: "Render the read-only embedded child board."
33
33
  allowed_files:
34
- - goalbuddy/extend/local-goal-board/scripts/lib/goal-board.mjs
34
+ - goalbuddy/surfaces/local-goal-board/scripts/lib/goal-board.mjs
35
35
  verify:
36
- - node --test goalbuddy/extend/local-goal-board/test/local-goal-board.test.mjs
36
+ - node --test goalbuddy/surfaces/local-goal-board/test/local-goal-board.test.mjs
37
37
  stop_if:
38
38
  - "Need files outside allowed_files."
39
39
  receipt: null
@@ -6,8 +6,8 @@ import { fileURLToPath } from "node:url";
6
6
  const VALID_STATUSES = new Set(["queued", "active", "blocked", "done"]);
7
7
  const COLUMN_ORDER = ["todo", "in-progress", "blocked", "completed"];
8
8
  const __dirname = dirname(fileURLToPath(import.meta.url));
9
- const extensionRoot = resolve(__dirname, "../..");
10
- const logoAssetPath = join(extensionRoot, "assets", "goalbuddy-mark.png");
9
+ const surfaceRoot = resolve(__dirname, "../..");
10
+ const logoAssetPath = join(surfaceRoot, "assets", "goalbuddy-mark.png");
11
11
 
12
12
  export class GoalBoardError extends Error {
13
13
  constructor(message) {
@@ -228,8 +228,7 @@ export async function startBoardServer(options = {}) {
228
228
 
229
229
  const route = routeBoardRequest(url.pathname, boards, initialBoard);
230
230
  if (!route.board) {
231
- response.writeHead(404);
232
- response.end("Not found");
231
+ sendUnregisteredBoardPath(response, url.pathname, boards, baseUrl);
233
232
  return;
234
233
  }
235
234
  if (route.pathname === "/api/board") {
@@ -400,6 +399,28 @@ function routeBoardRequest(pathname, boards, initialBoard) {
400
399
  return matches[0] || { board: null, pathname };
401
400
  }
402
401
 
402
+ function sendUnregisteredBoardPath(response, pathname, boards, baseUrl) {
403
+ response.writeHead(404, {
404
+ "Content-Type": "text/plain; charset=utf-8",
405
+ "Cache-Control": "no-store",
406
+ });
407
+ const registeredBoards = [...boards.values()].map((board) => {
408
+ const summary = boardSummary(board, baseUrl);
409
+ return `- ${summary.title}: ${summary.url}`;
410
+ });
411
+ response.end([
412
+ `GoalBuddy board path is not registered in this local hub: ${pathname}`,
413
+ "",
414
+ "This server is the GoalBuddy multi-board hub. Do not stop it just because a /<slug>/ board URL returned 404.",
415
+ "Start or rerun `npx goalbuddy board <goal-dir>` to register that goal on this same port, then open the printed /<slug>/ URL.",
416
+ "",
417
+ "Registered boards:",
418
+ registeredBoards.length ? registeredBoards.join("\n") : "- none",
419
+ "",
420
+ `Hub API: ${baseUrl}/api/boards`,
421
+ ].join("\n"));
422
+ }
423
+
403
424
  function stripBoardPathPrefix(pathname, boardPath) {
404
425
  const prefix = boardPath.endsWith("/") ? boardPath.slice(0, -1) : boardPath;
405
426
  if (pathname === prefix) return "/";
@@ -527,9 +548,9 @@ function serveStatic(appDir, pathname, response) {
527
548
  return;
528
549
  }
529
550
 
530
- const extension = cleanPath.match(/\.[^.]+$/)?.[0] || "";
551
+ const fileExtension = cleanPath.match(/\.[^.]+$/)?.[0] || "";
531
552
  response.writeHead(200, {
532
- "Content-Type": textTypes[extension] || "application/octet-stream",
553
+ "Content-Type": textTypes[fileExtension] || "application/octet-stream",
533
554
  "Cache-Control": "no-store",
534
555
  });
535
556
  response.end(readFileSync(file));
@@ -580,8 +601,8 @@ function usage() {
580
601
  console.log(`GoalBuddy Local Goal Board
581
602
 
582
603
  Usage:
583
- node extend/local-goal-board/scripts/local-goal-board.mjs --goal docs/goals/<slug>
584
- node extend/local-goal-board/scripts/local-goal-board.mjs --goal docs/goals/<slug> --once --json
604
+ npx goalbuddy board docs/goals/<slug>
605
+ npx goalbuddy board docs/goals/<slug> --once --json
585
606
 
586
607
  Options:
587
608
  --goal <path> Goal directory containing state.yaml.