goalbuddy 0.2.10

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 (68) hide show
  1. package/CONTRIBUTING.md +45 -0
  2. package/LICENSE +21 -0
  3. package/README.md +215 -0
  4. package/examples/extend-catalog-workflow/goal.md +53 -0
  5. package/examples/extend-catalog-workflow/notes/T001-extension-model-map.md +47 -0
  6. package/examples/extend-catalog-workflow/notes/T002-architecture-decision.md +48 -0
  7. package/examples/extend-catalog-workflow/notes/T003-implementation-summary.md +43 -0
  8. package/examples/extend-catalog-workflow/notes/T004-root-extend-folder.md +24 -0
  9. package/examples/extend-catalog-workflow/notes/T005-layout-cleanup.md +46 -0
  10. package/examples/extend-catalog-workflow/notes/T006-catalog-location.md +50 -0
  11. package/examples/extend-catalog-workflow/notes/T999-completion-audit.md +36 -0
  12. package/examples/extend-catalog-workflow/state.yaml +327 -0
  13. package/examples/github-pr-workflow-extension/pr-handoff.md +46 -0
  14. package/examples/improve-goal-maker/goal.md +51 -0
  15. package/examples/improve-goal-maker/notes/T001-repo-map.md +59 -0
  16. package/examples/improve-goal-maker/notes/T002-risk-map.md +37 -0
  17. package/examples/improve-goal-maker/state.yaml +224 -0
  18. package/goal-maker/SKILL.md +18 -0
  19. package/goal-maker/agents/README.md +23 -0
  20. package/goal-maker/agents/config-snippet.toml +5 -0
  21. package/goal-maker/agents/goal_judge.toml +29 -0
  22. package/goal-maker/agents/goal_scout.toml +26 -0
  23. package/goal-maker/agents/goal_worker.toml +28 -0
  24. package/goal-maker/agents/openai.yaml +6 -0
  25. package/goal-maker/scripts/check-goal-state.mjs +370 -0
  26. package/goal-maker/scripts/install-agents.mjs +28 -0
  27. package/goal-maker/templates/agents.md +48 -0
  28. package/goal-maker/templates/goal-prompt.txt +1 -0
  29. package/goal-maker/templates/goal.md +71 -0
  30. package/goal-maker/templates/note.md +22 -0
  31. package/goal-maker/templates/state.yaml +125 -0
  32. package/goalbuddy/SKILL.md +484 -0
  33. package/goalbuddy/agents/README.md +23 -0
  34. package/goalbuddy/agents/config-snippet.toml +5 -0
  35. package/goalbuddy/agents/goal_judge.toml +29 -0
  36. package/goalbuddy/agents/goal_scout.toml +26 -0
  37. package/goalbuddy/agents/goal_worker.toml +28 -0
  38. package/goalbuddy/agents/openai.yaml +6 -0
  39. package/goalbuddy/scripts/check-goal-state.mjs +370 -0
  40. package/goalbuddy/scripts/install-agents.mjs +28 -0
  41. package/goalbuddy/templates/agents.md +48 -0
  42. package/goalbuddy/templates/goal-prompt.txt +1 -0
  43. package/goalbuddy/templates/goal.md +71 -0
  44. package/goalbuddy/templates/note.md +22 -0
  45. package/goalbuddy/templates/state.yaml +125 -0
  46. package/internal/assets/extend-release.png +0 -0
  47. package/internal/assets/extend-release.svg +83 -0
  48. package/internal/assets/goal-maker-flow.png +0 -0
  49. package/internal/cli/check-publish-version.mjs +86 -0
  50. package/internal/cli/goal-maker.mjs +1061 -0
  51. package/package.json +65 -0
  52. package/plugins/goalbuddy/.codex-plugin/plugin.json +48 -0
  53. package/plugins/goalbuddy/README.md +29 -0
  54. package/plugins/goalbuddy/assets/goalbuddy-icon.svg +8 -0
  55. package/plugins/goalbuddy/skills/goalbuddy/SKILL.md +484 -0
  56. package/plugins/goalbuddy/skills/goalbuddy/agents/README.md +23 -0
  57. package/plugins/goalbuddy/skills/goalbuddy/agents/config-snippet.toml +5 -0
  58. package/plugins/goalbuddy/skills/goalbuddy/agents/goal_judge.toml +29 -0
  59. package/plugins/goalbuddy/skills/goalbuddy/agents/goal_scout.toml +26 -0
  60. package/plugins/goalbuddy/skills/goalbuddy/agents/goal_worker.toml +28 -0
  61. package/plugins/goalbuddy/skills/goalbuddy/agents/openai.yaml +6 -0
  62. package/plugins/goalbuddy/skills/goalbuddy/scripts/check-goal-state.mjs +370 -0
  63. package/plugins/goalbuddy/skills/goalbuddy/scripts/install-agents.mjs +28 -0
  64. package/plugins/goalbuddy/skills/goalbuddy/templates/agents.md +48 -0
  65. package/plugins/goalbuddy/skills/goalbuddy/templates/goal-prompt.txt +1 -0
  66. package/plugins/goalbuddy/skills/goalbuddy/templates/goal.md +71 -0
  67. package/plugins/goalbuddy/skills/goalbuddy/templates/note.md +22 -0
  68. package/plugins/goalbuddy/skills/goalbuddy/templates/state.yaml +125 -0
@@ -0,0 +1,83 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="1600" height="900" viewBox="0 0 1600 900" role="img" aria-labelledby="title desc">
2
+ <title id="title">GoalBuddy Extend release graphic</title>
3
+ <desc id="desc">A white-background black-and-red diagram showing a vague Codex goal becoming a GoalBuddy board, then extending to optional add-ons through a GitHub-hosted catalog.</desc>
4
+ <defs>
5
+ <style>
6
+ .bg { fill: #ffffff; }
7
+ .ink { fill: none; stroke: #141414; stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; }
8
+ .thin { fill: none; stroke: #141414; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
9
+ .red { fill: none; stroke: #e1261c; stroke-width: 8; stroke-linecap: round; stroke-linejoin: round; }
10
+ .redfill { fill: #e1261c; }
11
+ .inkfill { fill: #141414; }
12
+ .muted { fill: #5b5f68; }
13
+ text { font-family: Arial, Helvetica, sans-serif; letter-spacing: 0; }
14
+ .label { font-size: 40px; font-weight: 700; }
15
+ .small { font-size: 26px; font-weight: 500; }
16
+ .mono { font-family: Menlo, Consolas, monospace; font-size: 30px; font-weight: 700; }
17
+ .title { font-size: 86px; font-weight: 800; }
18
+ </style>
19
+ </defs>
20
+
21
+ <rect class="bg" width="1600" height="900"/>
22
+
23
+ <text x="110" y="130" class="title inkfill">goalbuddy EXTEND</text>
24
+ <path class="red" d="M960 102 C1105 70 1255 76 1385 112"/>
25
+ <path class="red" d="M1372 91 L1394 116 L1362 130"/>
26
+ <text x="115" y="190" class="small muted">Open-ended Codex work becomes a local board. Optional integrations stay outside the core.</text>
27
+
28
+ <g transform="translate(105 280)">
29
+ <rect x="0" y="0" width="315" height="190" rx="24" class="thin"/>
30
+ <text x="34" y="58" class="label inkfill">vague goal</text>
31
+ <text x="34" y="105" class="small muted">“improve this”</text>
32
+ <path class="thin" d="M36 142 H212"/>
33
+ <path class="thin" d="M36 165 H152"/>
34
+ </g>
35
+
36
+ <path class="ink" d="M445 375 H565"/>
37
+ <path class="ink" d="M542 348 L572 375 L542 402"/>
38
+
39
+ <g transform="translate(600 250)">
40
+ <rect x="0" y="0" width="430" height="250" rx="28" class="ink"/>
41
+ <text x="38" y="62" class="label inkfill">local board</text>
42
+ <g transform="translate(42 98)">
43
+ <circle cx="20" cy="20" r="13" class="redfill"/>
44
+ <text x="52" y="30" class="small inkfill">Scout maps repo</text>
45
+ </g>
46
+ <g transform="translate(42 145)">
47
+ <circle cx="20" cy="20" r="13" class="redfill"/>
48
+ <text x="52" y="30" class="small inkfill">Judge picks scope</text>
49
+ </g>
50
+ <g transform="translate(42 192)">
51
+ <circle cx="20" cy="20" r="13" class="redfill"/>
52
+ <text x="52" y="30" class="small inkfill">Worker patches</text>
53
+ </g>
54
+ </g>
55
+
56
+ <path class="ink" d="M1060 375 H1130"/>
57
+ <path class="ink" d="M1107 348 L1137 375 L1107 402"/>
58
+
59
+ <g transform="translate(1160 245)">
60
+ <rect x="0" y="0" width="330" height="260" rx="28" class="red"/>
61
+ <text x="38" y="64" class="label inkfill">extend</text>
62
+ <text x="38" y="108" class="mono redfill">catalog.json</text>
63
+ <path class="thin" d="M42 144 H255"/>
64
+ <text x="42" y="190" class="small inkfill">publish</text>
65
+ <text x="42" y="228" class="small inkfill">report</text>
66
+ <text x="165" y="190" class="small inkfill">intake</text>
67
+ <text x="165" y="228" class="small inkfill">roles</text>
68
+ </g>
69
+
70
+ <g transform="translate(175 640)">
71
+ <path class="thin" d="M0 0 H1250"/>
72
+ <text x="0" y="62" class="small inkfill">core stays stable</text>
73
+ <text x="355" y="62" class="small inkfill">extensions move through GitHub</text>
74
+ <text x="870" y="62" class="small inkfill">state.yaml remains truth</text>
75
+ <circle cx="305" cy="51" r="7" class="redfill"/>
76
+ <circle cx="820" cy="51" r="7" class="redfill"/>
77
+ </g>
78
+
79
+ <g transform="translate(1110 735)">
80
+ <rect x="0" y="0" width="300" height="72" rx="36" class="red"/>
81
+ <text x="38" y="47" class="mono redfill">npx goalbuddy</text>
82
+ </g>
83
+ </svg>
@@ -0,0 +1,86 @@
1
+ #!/usr/bin/env node
2
+ import { spawnSync } from "node:child_process";
3
+ import { readFileSync } from "node:fs";
4
+ import { dirname, resolve } from "node:path";
5
+ import { fileURLToPath } from "node:url";
6
+
7
+ const root = resolve(dirname(fileURLToPath(import.meta.url)), "../..");
8
+ const pkg = JSON.parse(readFileSync(resolve(root, "package.json"), "utf8"));
9
+ const publishedVersions = readPublishedVersions(pkg.name);
10
+ const currentVersion = normalizeVersion(pkg.version);
11
+
12
+ if (!publishedVersions.length) {
13
+ console.log(`Publish version check passed: ${pkg.name}@${currentVersion} has no published versions.`);
14
+ process.exit(0);
15
+ }
16
+
17
+ const normalizedPublishedVersions = publishedVersions.map(normalizeVersion);
18
+ const latestPublishedVersion = normalizedPublishedVersions.toSorted(compareVersions).at(-1);
19
+
20
+ if (normalizedPublishedVersions.includes(currentVersion)) {
21
+ fail(`${pkg.name}@${currentVersion} has already been published. Bump package.json before publishing.`);
22
+ }
23
+
24
+ if (compareVersions(currentVersion, latestPublishedVersion) <= 0) {
25
+ fail(`${pkg.name}@${currentVersion} must be greater than the latest published version ${latestPublishedVersion}.`);
26
+ }
27
+
28
+ console.log(`Publish version check passed: ${pkg.name}@${currentVersion} > published ${latestPublishedVersion}.`);
29
+
30
+ function readPublishedVersions(packageName) {
31
+ if (process.env.GOALBUDDY_PUBLISHED_VERSIONS !== undefined) {
32
+ return parseVersionList(process.env.GOALBUDDY_PUBLISHED_VERSIONS);
33
+ }
34
+ if (process.env.GOAL_MAKER_PUBLISHED_VERSIONS !== undefined) {
35
+ return parseVersionList(process.env.GOAL_MAKER_PUBLISHED_VERSIONS);
36
+ }
37
+
38
+ const result = spawnSync("npm", ["view", packageName, "versions", "--json"], {
39
+ encoding: "utf8",
40
+ });
41
+
42
+ if (result.status === 0) return parseVersionList(result.stdout);
43
+
44
+ const output = `${result.stdout || ""}\n${result.stderr || ""}`;
45
+ if (output.includes("E404") || output.includes("404 Not Found")) return [];
46
+
47
+ fail(`Unable to read published versions for ${packageName}.\n${output.trim()}`);
48
+ }
49
+
50
+ function parseVersionList(value) {
51
+ const text = String(value || "").trim();
52
+ if (!text || text === "[]") return [];
53
+
54
+ try {
55
+ const parsed = JSON.parse(text);
56
+ if (Array.isArray(parsed)) return parsed;
57
+ if (typeof parsed === "string") return [parsed];
58
+ } catch {
59
+ // Fall through to comma/newline parsing for test and manual use.
60
+ }
61
+
62
+ return text
63
+ .split(/[,\n]/)
64
+ .map((version) => version.trim())
65
+ .filter(Boolean);
66
+ }
67
+
68
+ function normalizeVersion(version) {
69
+ const match = String(version).trim().match(/^v?(\d+)\.(\d+)\.(\d+)(?:[-+].*)?$/);
70
+ if (!match) fail(`Unsupported package version: ${version}`);
71
+ return `${Number(match[1])}.${Number(match[2])}.${Number(match[3])}`;
72
+ }
73
+
74
+ function compareVersions(left, right) {
75
+ const leftParts = left.split(".").map(Number);
76
+ const rightParts = right.split(".").map(Number);
77
+ for (let index = 0; index < 3; index += 1) {
78
+ if (leftParts[index] !== rightParts[index]) return leftParts[index] - rightParts[index];
79
+ }
80
+ return 0;
81
+ }
82
+
83
+ function fail(message) {
84
+ console.error(`Publish version check failed: ${message}`);
85
+ process.exit(1);
86
+ }