@goodtek/vibeops 2.1.3 → 2.2.0

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/CHANGELOG.md CHANGED
@@ -4,6 +4,16 @@ All notable changes to VibeOps are documented here.
4
4
 
5
5
  ## Unreleased
6
6
 
7
+ ## 2.2.0 - 2026-06-09
8
+
9
+ ### Added
10
+
11
+ - **`vibeops pull`** — one command: `git fetch`, switch to integration branch (e.g. `develop`), fast-forward pull.
12
+
13
+ ### Changed
14
+
15
+ - **`vibeops task reship`**: no longer blocks on a dirty working tree — uncommitted edits (including on `develop`) are carried onto the task branch. When the task branch is missing locally and on the remote (e.g. after `task sync`), it is **created automatically** from the integration branch. Removed `--allow-dirty` (behavior is now default).
16
+
7
17
  ## 2.1.3 - 2026-06-08
8
18
 
9
19
  ### Changed
package/README.md CHANGED
@@ -14,10 +14,11 @@ VibeOps bootstraps an **agent-friendly repo**, starts numbered **TASK** files on
14
14
  | `vibeops init` | Core docs + agent packs (cursor / claude / codex) |
15
15
  | `vibeops task add` | New `TASK-NNN` file + task branch |
16
16
  | `vibeops task ship` | LLM summary, commit, push, open MR/PR (Status → **Shipped**) |
17
- | `vibeops task reship` | Shipped TASK follow-up: integrate develop, new MR/PR (Status stays Shipped) |
17
+ | `vibeops task reship` | Shipped follow-up: move uncommitted work to task branch, commit, new MR/PR (Status stays Shipped) |
18
18
  | `vibeops task merge` | Merge TASK MR/PR into integration branch (default: squash) |
19
19
  | `vibeops task sync` | After merge: ff-only integration pull, delete task branches (no TASK md edits) |
20
20
  | `vibeops task release` | Release PR: integration → production (GitFlow) |
21
+ | `vibeops pull` | Fetch remote + update integration branch (e.g. develop) |
21
22
  | `vibeops status` | Briefing: TASK, Git, LLM, clients |
22
23
  | `vibeops llm` | Connect LLM providers (`connect` · `status` · `use`) |
23
24
 
@@ -53,6 +54,7 @@ vibeops task add
53
54
 
54
55
  vibeops task ship
55
56
  vibeops task merge
57
+ vibeops pull
56
58
  # Follow-up on same TASK (after merge):
57
59
  vibeops task reship TASK-NNN
58
60
  vibeops task merge
@@ -96,10 +98,11 @@ pnpm install && pnpm build && pnpm smoke
96
98
  - **`init`**: `--clients`, `--yes`, `--dry-run`, `--force`, `--git`, `--initial-commit`, `--git-policy gitflow|trunk`, `--integration-branch`, `--production-branch`, `--allow-no-remote`, `--cwd`
97
99
  - **`task add`**: `--dry-run`, `--non-interactive --idea "…"`
98
100
  - **`task ship`**: `--dry-run`, `--no-pr`
99
- - **`task reship`**: `--dry-run`, `--no-pr`, `--no-integrate`, `--recreate-branch`, `--skip-llm`, `--allow-open-mr`, `--allow-dirty`
101
+ - **`task reship`**: `--dry-run`, `--no-pr`, `--no-integrate`, `--recreate-branch`, `--skip-llm`, `--allow-open-mr`
100
102
  - **`task merge`**: `--dry-run`, `--merge`, `--rebase`
101
103
  - **`task sync`**: `--dry-run`, `--no-remote-delete`, `--force`
102
104
  - **`task release`**: `--dry-run`, `--no-merge`, `--merge`, `--rebase`
105
+ - **`pull`**: `--dry-run`
103
106
  - **`status`**: `--json`
104
107
 
105
108
  ## Git
@@ -107,9 +110,10 @@ pnpm install && pnpm build && pnpm smoke
107
110
  - **Init** records branch policy in `.vibeops.json` (`integrationBranch`, `productionBranch`, `host`).
108
111
  - **`task add`**: `task/<slug>` from **integration** (e.g. `develop`).
109
112
  - **`task ship`**: commit implementation + ship metadata (Status **Shipped**) → push once → MR/PR (URL on host; `task merge` resolves by branch).
110
- - **`task reship`**: Shipped TASK only; integrates `develop`; opens **new** PR (archives previous MR in Git Context).
113
+ - **`task reship`**: Shipped TASK follow-up — carries uncommitted work onto the task branch (creates it from integration when missing after sync), integrates `develop`, commit → push → **new** PR.
111
114
  - **`task merge`**: merge MR/PR into integration (CLI or host UI; TASK md unchanged).
112
115
  - **`task sync`**: integration ff-only pull → delete `task/*` branches (TASK md unchanged).
116
+ - **`pull`**: fetch + switch to integration branch + `git pull --ff-only` (one command).
113
117
  - **`task release`**: integration → production PR + merge (skipped on trunk policy).
114
118
  - No force-push to shared branches.
115
119
 
package/dist/cli.js CHANGED
@@ -1,5 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import { Command } from "commander";
3
+ import { pullCommand } from "./commands/pull.js";
3
4
  import { initCommand } from "./commands/init.js";
4
5
  import { llmConnectCommand, llmStatusCommand, llmUseCommand } from "./commands/llm.js";
5
6
  import { statusCommand } from "./commands/status.js";
@@ -14,7 +15,7 @@ import { VERSION } from "./version.js";
14
15
  const program = new Command();
15
16
  program
16
17
  .name("vibeops")
17
- .description("VibeOps — TASK workflow (init · task add/ship/reship/merge/sync · status · llm)")
18
+ .description("VibeOps — TASK workflow (init · task · pull · status · llm)")
18
19
  .version(VERSION, "-v, --version", "Print the VibeOps version");
19
20
  program.hook("preAction", async (_thisCommand, actionCommand) => {
20
21
  const opts = actionCommand.opts();
@@ -88,14 +89,13 @@ task
88
89
  });
89
90
  task
90
91
  .command("reship [taskRef]")
91
- .description("Follow-up on Shipped TASK: integrate develop, commit, new MR/PR")
92
+ .description("Follow-up on Shipped TASK: move uncommitted work to task branch, commit, new MR/PR")
92
93
  .option("--dry-run", "Plan only")
93
94
  .option("--no-pr", "Push only; skip creating MR/PR")
94
95
  .option("--no-integrate", "Skip merging integration branch into task branch")
95
- .option("--recreate-branch", "Recreate task branch from integration if missing")
96
+ .option("--recreate-branch", "Create task branch from integration instead of reusing local/remote ref")
96
97
  .option("--skip-llm", "Do not run LLM for Result / Test Result")
97
98
  .option("--allow-open-mr", "Allow reship while the recorded MR is still open")
98
- .option("--allow-dirty", "Proceed when only governance paths are dirty")
99
99
  .option("--cwd <path>", "Target directory")
100
100
  .action(async (taskRef, opts) => {
101
101
  await taskReshipCommand(taskRef, {
@@ -105,7 +105,6 @@ task
105
105
  recreateBranch: Boolean(opts.recreateBranch),
106
106
  skipLlm: Boolean(opts.skipLlm),
107
107
  allowOpenMr: Boolean(opts.allowOpenMr),
108
- allowDirty: Boolean(opts.allowDirty),
109
108
  cwd: opts.cwd,
110
109
  });
111
110
  });
@@ -156,6 +155,17 @@ task
156
155
  cwd: opts.cwd,
157
156
  });
158
157
  });
158
+ program
159
+ .command("pull")
160
+ .description("Fetch remote and update integration branch (e.g. develop)")
161
+ .option("--dry-run", "Plan only")
162
+ .option("--cwd <path>", "Target directory")
163
+ .action(async (opts) => {
164
+ await pullCommand({
165
+ dryRun: Boolean(opts.dryRun),
166
+ cwd: opts.cwd,
167
+ });
168
+ });
159
169
  program
160
170
  .command("status")
161
171
  .description("Briefing: active TASK, Git, LLM, next hint")
@@ -0,0 +1,79 @@
1
+ import { resolve } from "node:path";
2
+ import { GitConfigError, requireGitConfig } from "../lib/git-config.js";
3
+ import { gitFetchRemote, gitPullFastForwardOnly, gitRemoteBranchExists, gitRemoteUrl, gitSwitchToBranch, readGitInfo, } from "../lib/git.js";
4
+ import { bold, cyan, dim, log } from "../lib/logger.js";
5
+ /**
6
+ * One-step remote sync: fetch, switch to integration branch, fast-forward pull.
7
+ */
8
+ export async function pullCommand(options = {}) {
9
+ const cwd = resolve(options.cwd ?? process.cwd());
10
+ const dryRun = options.dryRun === true;
11
+ let gitCfg;
12
+ try {
13
+ gitCfg = await requireGitConfig(cwd);
14
+ }
15
+ catch (e) {
16
+ if (e instanceof GitConfigError) {
17
+ log.error(e.message);
18
+ process.exitCode = 1;
19
+ return;
20
+ }
21
+ throw e;
22
+ }
23
+ const { remote, integrationBranch } = gitCfg;
24
+ log.info(bold("vibeops pull"));
25
+ log.info(` ${dim("remote")} ${remote}`);
26
+ log.info(` ${dim("integration")} ${cyan(integrationBranch)}`);
27
+ log.blank();
28
+ const git = await readGitInfo(cwd);
29
+ if (!git.isRepo) {
30
+ log.error("Not a git repository.");
31
+ process.exitCode = 1;
32
+ return;
33
+ }
34
+ const needsSwitch = git.branch !== integrationBranch;
35
+ if (dryRun) {
36
+ log.info(bold("dry-run — would:"));
37
+ log.info(` · git fetch ${remote} --prune`);
38
+ if (needsSwitch) {
39
+ log.info(` · git switch ${integrationBranch}`);
40
+ }
41
+ log.info(` · git pull --ff-only ${remote} ${integrationBranch}`);
42
+ return;
43
+ }
44
+ if ((await gitRemoteUrl(cwd, remote)) === null) {
45
+ log.error(`No remote "${remote}". Add a remote or re-run vibeops init.`);
46
+ process.exitCode = 1;
47
+ return;
48
+ }
49
+ try {
50
+ await gitFetchRemote(cwd, remote);
51
+ log.ok(`Fetched ${remote}`);
52
+ }
53
+ catch (e) {
54
+ const msg = e instanceof Error ? e.message : String(e);
55
+ log.warn(`git fetch failed (${msg}). Continuing with local refs.`);
56
+ }
57
+ if (needsSwitch) {
58
+ const switched = await gitSwitchToBranch(cwd, integrationBranch, remote);
59
+ if (!switched) {
60
+ log.error(`Branch "${integrationBranch}" not found locally or on ${remote}. Push integration first or check the remote URL.`);
61
+ process.exitCode = 1;
62
+ return;
63
+ }
64
+ log.ok(`On ${integrationBranch}`);
65
+ }
66
+ if (!(await gitRemoteBranchExists(cwd, remote, integrationBranch))) {
67
+ log.warn(`No ${remote}/${integrationBranch} on the remote yet — fetch only.`);
68
+ return;
69
+ }
70
+ try {
71
+ await gitPullFastForwardOnly(cwd, remote, integrationBranch);
72
+ log.ok(`Up to date with ${remote}/${integrationBranch}`);
73
+ }
74
+ catch (e) {
75
+ const msg = e instanceof Error ? e.message : String(e);
76
+ log.error(`Could not fast-forward ${integrationBranch}: ${msg}. Commit or stash local changes, then rerun \`vibeops pull\`.`);
77
+ process.exitCode = 1;
78
+ }
79
+ }
@@ -56,7 +56,6 @@ export async function taskReshipCommand(taskRef, options = {}) {
56
56
  remote,
57
57
  recreateBranch: options.recreateBranch === true,
58
58
  dryRun,
59
- allowDirty: options.allowDirty === true,
60
59
  });
61
60
  if (!branchOk) {
62
61
  process.exitCode = 1;
@@ -126,7 +125,7 @@ export async function taskReshipCommand(taskRef, options = {}) {
126
125
  }
127
126
  const dirtyBefore = await listWorkingTreeRelPaths(cwd);
128
127
  if (dirtyBefore.length === 0) {
129
- log.error("No changes to reship. Edit files on the task branch, then rerun.");
128
+ log.error("No changes to reship. Edit files (e.g. on develop), then rerun.");
130
129
  process.exitCode = 1;
131
130
  return;
132
131
  }
@@ -48,7 +48,7 @@ export function computeNextHint(input) {
48
48
  return "task-sync";
49
49
  if (input.hasMergeRequest && !input.mergeRequestMerged)
50
50
  return "task-merge";
51
- if (input.hasLocalChanges && input.onTaskBranch === true)
51
+ if (input.hasLocalChanges)
52
52
  return "task-reship";
53
53
  return "task-add";
54
54
  }
@@ -67,7 +67,7 @@ export function hintToText(hint, cwd, task) {
67
67
  return task ? `Run \`vibeops task ship ${task.id}\`.` : "Run `vibeops task ship`.";
68
68
  case "task-reship":
69
69
  return task
70
- ? `Follow-up on ${task.id}? Edit on task branch, then \`vibeops task reship ${task.id}\`.`
70
+ ? `Follow-up on ${task.id}? Edit files (develop is fine), then \`vibeops task reship ${task.id}\`.`
71
71
  : "Run `vibeops task reship TASK-NNN` for a Shipped follow-up.";
72
72
  case "task-merge":
73
73
  return task
@@ -1,6 +1,6 @@
1
1
  import { resolve } from "node:path";
2
2
  import { GitConfigError, requireGitConfig } from "./git-config.js";
3
- import { gitBranchExists, gitCheckout, gitCheckoutNewBranch, gitFetchRemote, gitGovernanceOnlyDirty, gitHeadCommit, gitMergeRemoteBranch, gitMergeInProgress, gitPullFastForwardOnly, gitRemoteBranchExists, gitSwitchToBranch, listUnmergedRelPaths, readGitInfo, } from "./git.js";
3
+ import { gitBranchExists, gitCheckout, gitCheckoutNewBranch, gitDeleteBranch, gitFetchRemote, gitHeadCommit, gitMergeRemoteBranch, gitMergeInProgress, gitPullFastForwardOnly, gitRemoteBranchExists, gitSwitchToBranch, listUnmergedRelPaths, readGitInfo, } from "./git.js";
4
4
  import { dim, log } from "./logger.js";
5
5
  import { findMergeRequestByBranches } from "./pr-create.js";
6
6
  import { normalizeTaskRef } from "./resolve-task.js";
@@ -45,52 +45,44 @@ export function reshipNotFoundMessage(taskRef) {
45
45
  }
46
46
  return "No Shipped TASK found. Pass `vibeops task reship TASK-NNN`.";
47
47
  }
48
- /** Checkout or recreate the task branch without changing TASK Status. */
49
- export async function ensureTaskBranchForReship(opts) {
50
- const cwd = resolve(opts.cwd);
51
- const { taskBranch } = opts.gitCtx;
52
- const git = await readGitInfo(cwd);
53
- if (!git.isRepo) {
54
- log.error("Not a git repository.");
55
- return false;
48
+ async function switchToTaskBranch(cwd, taskBranch) {
49
+ try {
50
+ await gitCheckout(cwd, taskBranch);
51
+ return true;
56
52
  }
57
- if (git.dirty === true && !opts.allowDirty) {
58
- const gov = await gitGovernanceOnlyDirty(cwd);
59
- if (!gov.onlyGovernance) {
60
- log.error("Working tree is dirty. Commit or stash, or rerun with --allow-dirty.");
61
- return false;
62
- }
63
- log.warn("Only governance paths are dirty — proceeding.");
53
+ catch (e) {
54
+ const msg = e instanceof Error ? e.message : String(e);
55
+ log.error(`Could not switch to ${taskBranch} with uncommitted changes. Commit, stash, or resolve conflicts, then rerun.`);
56
+ if (msg.length > 0)
57
+ log.info(dim(msg));
58
+ return false;
64
59
  }
65
- const localExists = await gitBranchExists(cwd, taskBranch);
66
- const remoteExists = await gitRemoteBranchExists(cwd, opts.remote, taskBranch);
67
- if (opts.dryRun) {
68
- if (localExists) {
69
- log.info(dim(` would git switch ${taskBranch}`));
70
- }
71
- else if (opts.recreateBranch) {
72
- log.info(dim(` would recreate ${taskBranch} from ${opts.integrationBranch}`));
73
- }
74
- else {
75
- log.error(`Local branch ${taskBranch} missing. Rerun with --recreate-branch.`);
60
+ }
61
+ async function removeLocalTaskBranch(cwd, taskBranch, integrationBranch, remote) {
62
+ if (!(await gitBranchExists(cwd, taskBranch)))
63
+ return true;
64
+ const git = await readGitInfo(cwd);
65
+ if (git.branch === taskBranch) {
66
+ const ok = await gitSwitchToBranch(cwd, integrationBranch, remote);
67
+ if (!ok) {
68
+ log.error(`Integration branch "${integrationBranch}" not found.`);
76
69
  return false;
77
70
  }
78
- return true;
79
71
  }
80
- if (localExists) {
81
- await gitCheckout(cwd, taskBranch);
82
- log.ok(`On ${taskBranch}`);
83
- return true;
72
+ try {
73
+ await gitDeleteBranch(cwd, taskBranch, { force: true });
74
+ log.info(dim(`Removed local ${taskBranch}.`));
84
75
  }
85
- if (!opts.recreateBranch) {
86
- if (remoteExists) {
87
- log.error(`Local ${taskBranch} missing. Fetch/checkout the branch or rerun with --recreate-branch.`);
88
- }
89
- else {
90
- log.error(`Branch ${taskBranch} not found locally or on ${opts.remote}. Use --recreate-branch.`);
91
- }
76
+ catch (e) {
77
+ const msg = e instanceof Error ? e.message : String(e);
78
+ log.error(`Could not remove local ${taskBranch}: ${msg}`);
92
79
  return false;
93
80
  }
81
+ return true;
82
+ }
83
+ async function recreateTaskBranchFromIntegration(opts) {
84
+ const cwd = resolve(opts.cwd);
85
+ const { taskBranch } = opts.gitCtx;
94
86
  const ok = await gitSwitchToBranch(cwd, opts.integrationBranch, opts.remote);
95
87
  if (!ok) {
96
88
  log.error(`Integration branch "${opts.integrationBranch}" not found.`);
@@ -111,15 +103,75 @@ export async function ensureTaskBranchForReship(opts) {
111
103
  log.error("Integration branch has no commits.");
112
104
  return false;
113
105
  }
114
- await gitCheckoutNewBranch(cwd, taskBranch, opts.integrationBranch);
106
+ try {
107
+ await gitCheckoutNewBranch(cwd, taskBranch, opts.integrationBranch);
108
+ }
109
+ catch (e) {
110
+ const msg = e instanceof Error ? e.message : String(e);
111
+ log.error(`Could not create ${taskBranch} from ${opts.integrationBranch} with uncommitted changes.`);
112
+ if (msg.length > 0)
113
+ log.info(dim(msg));
114
+ return false;
115
+ }
115
116
  await upsertGitContext(opts.taskFile, {
116
117
  ...opts.gitCtx,
117
118
  baseBranch: opts.integrationBranch,
118
119
  baseCommit: head,
119
120
  });
120
- log.ok(`Recreated ${taskBranch} from ${opts.integrationBranch}`);
121
+ log.ok(`Created ${taskBranch} from ${opts.integrationBranch}`);
121
122
  return true;
122
123
  }
124
+ /** Checkout or recreate the task branch without changing TASK Status. */
125
+ export async function ensureTaskBranchForReship(opts) {
126
+ const cwd = resolve(opts.cwd);
127
+ const { taskBranch } = opts.gitCtx;
128
+ const git = await readGitInfo(cwd);
129
+ if (!git.isRepo) {
130
+ log.error("Not a git repository.");
131
+ return false;
132
+ }
133
+ if (git.dirty === true) {
134
+ log.info(dim("Uncommitted changes will be carried onto the task branch."));
135
+ }
136
+ const localExists = await gitBranchExists(cwd, taskBranch);
137
+ const remoteExists = await gitRemoteBranchExists(cwd, opts.remote, taskBranch);
138
+ const recreateFromIntegration = opts.recreateBranch === true || (!localExists && !remoteExists);
139
+ if (opts.dryRun) {
140
+ if (localExists && !opts.recreateBranch) {
141
+ log.info(dim(` would git switch ${taskBranch}`));
142
+ }
143
+ else if (!recreateFromIntegration && remoteExists) {
144
+ log.info(dim(` would checkout ${taskBranch} from ${opts.remote}`));
145
+ }
146
+ else {
147
+ if (localExists && opts.recreateBranch) {
148
+ log.info(dim(` would remove local ${taskBranch}`));
149
+ }
150
+ log.info(dim(` would create ${taskBranch} from ${opts.integrationBranch}`));
151
+ }
152
+ return true;
153
+ }
154
+ if (localExists && !opts.recreateBranch) {
155
+ if (!(await switchToTaskBranch(cwd, taskBranch)))
156
+ return false;
157
+ log.ok(`On ${taskBranch}`);
158
+ return true;
159
+ }
160
+ if (!recreateFromIntegration && remoteExists) {
161
+ const checkedOut = await gitSwitchToBranch(cwd, taskBranch, opts.remote);
162
+ if (checkedOut) {
163
+ log.ok(`Checked out ${taskBranch} from ${opts.remote}`);
164
+ return true;
165
+ }
166
+ log.warn(`Could not checkout ${opts.remote}/${taskBranch}; creating from integration.`);
167
+ }
168
+ if (localExists) {
169
+ const removed = await removeLocalTaskBranch(cwd, taskBranch, opts.integrationBranch, opts.remote);
170
+ if (!removed)
171
+ return false;
172
+ }
173
+ return recreateTaskBranchFromIntegration(opts);
174
+ }
123
175
  /** Merge latest integration into the current task branch. */
124
176
  export async function integrateIntegrationIntoTaskBranch(opts) {
125
177
  const cwd = resolve(opts.cwd);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@goodtek/vibeops",
3
- "version": "2.1.3",
3
+ "version": "2.2.0",
4
4
  "description": "Minimal CLI rails for Cursor-based TASK-driven vibe coding.",
5
5
  "type": "module",
6
6
  "packageManager": "pnpm@9.15.9",