@staff0rd/assist 0.1052.0 → 0.1053.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.
package/dist/index.js CHANGED
@@ -6,7 +6,7 @@ import { Command } from "commander";
6
6
  // package.json
7
7
  var package_default = {
8
8
  name: "@staff0rd/assist",
9
- version: "0.1052.0",
9
+ version: "0.1053.1",
10
10
  type: "module",
11
11
  main: "dist/index.js",
12
12
  bin: {
@@ -18898,14 +18898,14 @@ function fastForwardTo(ref) {
18898
18898
  }
18899
18899
 
18900
18900
  // src/shared/catchUpToRemoteDefault.ts
18901
- function catchUpToRemoteDefault() {
18901
+ async function catchUpToRemoteDefault() {
18902
18902
  try {
18903
18903
  execSync20("git fetch", { stdio: "inherit" });
18904
18904
  } catch {
18905
18905
  skip("git fetch failed");
18906
18906
  return;
18907
18907
  }
18908
- const ref = `origin/${remoteDefaultBranch(process.cwd())}`;
18908
+ const ref = `origin/${await remoteDefaultBranch(process.cwd())}`;
18909
18909
  if (!succeeds(`git rev-parse --verify --quiet ${ref}`)) {
18910
18910
  skip(`the current branch has no upstream and there is no ${ref}`);
18911
18911
  return;
@@ -18936,7 +18936,7 @@ function succeeds(command) {
18936
18936
  }
18937
18937
 
18938
18938
  // src/shared/pullIfConfigured.ts
18939
- function pullIfConfigured() {
18939
+ async function pullIfConfigured() {
18940
18940
  const config = loadConfig();
18941
18941
  if (!config.commit?.pull) return;
18942
18942
  if (hasLocalChanges()) {
@@ -18948,7 +18948,7 @@ function pullIfConfigured() {
18948
18948
  return;
18949
18949
  }
18950
18950
  if (!hasUpstream()) {
18951
- catchUpToRemoteDefault();
18951
+ await catchUpToRemoteDefault();
18952
18952
  return;
18953
18953
  }
18954
18954
  try {
@@ -20360,7 +20360,7 @@ async function pickItem(items2, firstPick = false) {
20360
20360
  return selectItem(todo, items2);
20361
20361
  }
20362
20362
  async function next(options2, startId) {
20363
- pullIfConfigured();
20363
+ await pullIfConfigured();
20364
20364
  let pendingId = startId;
20365
20365
  let firstPick = true;
20366
20366
  while (true) {
@@ -20592,7 +20592,7 @@ function buildSlashCommand(slashCommand, description) {
20592
20592
  }
20593
20593
  async function launchMode(slashCommand, options2) {
20594
20594
  const resumeSessionId = options2?.resumeSessionId;
20595
- if (!resumeSessionId) pullIfConfigured();
20595
+ if (!resumeSessionId) await pullIfConfigured();
20596
20596
  process.env.ASSIST_SESSION_ID ??= String(process.pid);
20597
20597
  const claudeSessionId = resumeSessionId ?? randomUUID11();
20598
20598
  const harness = options2?.harness ?? "claude";
@@ -20731,7 +20731,7 @@ function registerRunCommand(cmd) {
20731
20731
  "Resume an interrupted Claude session for the current phase (used by the sessions daemon on restart)"
20732
20732
  ).action(
20733
20733
  async (id, opts) => {
20734
- if (!opts.resumeSession) pullIfConfigured();
20734
+ if (!opts.resumeSession) await pullIfConfigured();
20735
20735
  await run2(id, {
20736
20736
  allowEdits: opts.write !== false,
20737
20737
  harness: resolveHarness2(opts.harness),
@@ -40628,19 +40628,22 @@ import { readFileSync as readFileSync54 } from "fs";
40628
40628
 
40629
40629
  // src/commands/review/highLevel/formatSlicingRequest.ts
40630
40630
  var RULES = [
40631
- "Each slice is a single coherent change a reviewer can check in one sitting, smaller than a whole feature.",
40631
+ "Each slice is one behaviour end to end: the code, wiring, config, tests and docs that deliver it, so a reviewer can judge whether that behaviour is right.",
40632
+ "Never split one behaviour by layer or file type: its command, workflow, generated output, tests and docs stay in one slice.",
40633
+ "Split only where the PR does independent things a reviewer could accept or reject separately. Most PRs need one to three slices.",
40634
+ "A refactor or move with no behaviour change gets its own slice.",
40632
40635
  "A hunk may appear in more than one slice.",
40633
- "Tests go in the same slice as the code they test, and get their own slice only when they stand alone.",
40634
40636
  "Generated files such as lockfiles get their own slice unless they belong with a specific change.",
40635
40637
  "List slices in reading order."
40636
40638
  ];
40637
40639
  var MANUAL_TESTING_RULES = [
40638
- "Write PR-wide steps that let a reviewer exercise the change by hand without reading the diff, derived from the hunks.",
40639
- "`setup` lists what to do first: branches to check out, servers or daemons to restart, config to set, data to seed. Keep each entry short.",
40640
- "Each step's `action` says exactly what to run or open: the command, the URL or the page and what to click.",
40640
+ "Write PR-wide steps for only what needs a human: looking at a UI, clicking through a page, judging how something reads or looks, or acting in a system an agent cannot drive.",
40641
+ "Leave out anything an agent could run and check itself: CLI commands with checkable output, test runs, builds, lint, API or HTTP calls, reading files.",
40642
+ "When nothing in the PR needs a human, write `steps: []` and `setup: []`.",
40643
+ "`setup` lists what the reviewer must do first: branches to check out, servers or daemons to restart, config to set, data to seed. Keep each entry short.",
40644
+ "Each step's `action` says exactly what to open and do: the URL or page and what to click or enter.",
40641
40645
  "Each step's `expect` says what the reviewer should see when the change works.",
40642
- "Name repo files by their path from the repo root, and give URLs in full.",
40643
- "When the change has no observable behaviour (refactors, docs, types), write one step saying which existing command or test shows nothing changed."
40646
+ "Name repo files by their path from the repo root, and give URLs in full."
40644
40647
  ];
40645
40648
  var EXAMPLE = {
40646
40649
  slices: [
@@ -48264,7 +48267,7 @@ function parseBacklogRunOptions(id, args) {
48264
48267
  async function tryBacklogRunAlias(name, args) {
48265
48268
  if (!/^a?\d+$/.test(name)) return false;
48266
48269
  if (lookupRunConfig(name).kind !== "not-found") return false;
48267
- pullIfConfigured();
48270
+ await pullIfConfigured();
48268
48271
  await run2(name, parseBacklogRunOptions(name, args));
48269
48272
  return true;
48270
48273
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@staff0rd/assist",
3
- "version": "0.1052.0",
3
+ "version": "0.1053.1",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "bin": {