@staff0rd/assist 0.346.0 → 0.348.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/README.md +6 -0
- package/allowed.cli-writes +1 -0
- package/claude/commands/branch.md +34 -0
- package/dist/allowed.cli-writes +1 -0
- package/dist/commands/sessions/web/bundle.js +1 -1
- package/dist/index.js +202 -90
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -42,6 +42,7 @@ After installation, the `assist` command will be available globally. You can als
|
|
|
42
42
|
|
|
43
43
|
- `/add-command` - Add a new run command to assist.yml
|
|
44
44
|
- `/associate-jira <KEY> [id]` - Associate a Jira ticket with the backlog item this session is working on (or an explicit id) by calling `assist backlog associate-jira`
|
|
45
|
+
- `/branch <description> [--jira KEY]` - Create a branch off the fresh remote default via `assist branch`, deriving a kebab-case slug from the description and auto-filling the Jira key from the session's backlog item when one is associated
|
|
45
46
|
- `/bug` - File a bug with reproduction steps, expected and actual behavior
|
|
46
47
|
- `/comment` - Add pending review comments to the current PR
|
|
47
48
|
- `/commit` - Commit only relevant files from the session
|
|
@@ -93,6 +94,7 @@ After installation, the `assist` command will be available globally. You can als
|
|
|
93
94
|
- `assist commit status` - Show git status and diff
|
|
94
95
|
- `assist commit <message>` - Commit staged changes with validation
|
|
95
96
|
- `assist commit <message> [files...]` - Stage files and create a git commit with validation
|
|
97
|
+
- `assist branch <slug> [--jira <key>]` - Create and switch to a new branch off the fresh remote default branch. Assembles the name as `[<prefix>/][<JIRA>-]<slug>` (prefix from the optional `branch.prefix` config, Jira key used verbatim), fetches and branches from `origin/<default>` (resolved live from the remote, falling back to `main`, overridable via `branch.defaultBranch`), and rejects slugs whose numeric tokens look like backlog IDs
|
|
96
98
|
- `assist prs` - List pull requests for the current repository
|
|
97
99
|
- `assist prs raise --title <title> --what <what> --why <why> [--how <how>] [--resolves <key>] [--force]` - Raise a pull request, assembling the body from `## What`, `## Why` (with `--resolves` Jira URLs appended inline), and an optional `## How`; errors if a PR already exists unless `--force` overwrites its title and body
|
|
98
100
|
- `assist prs edit [--title <title>] [--what <what>] [--why <why>] [--how <how>] [--resolves <key>]` - Update only the supplied sections of the current branch's pull request, preserving every other section of its body
|
|
@@ -295,6 +297,10 @@ When `commit.pull` is enabled in config, `assist draft`, `assist bug`, `assist r
|
|
|
295
297
|
|
|
296
298
|
When `commit.expectedBranch` is set (e.g. `main`), `assist commit` prints a prominent warning if HEAD is on any other branch before committing — so work committed (and pushed) on a stray branch in a repo that lands directly on the expected branch isn't silently orphaned. The warning is non-blocking: the commit still proceeds. With the key unset, behaviour is unchanged and no branch check runs.
|
|
297
299
|
|
|
300
|
+
When `branch.prefix` is set (e.g. `sw`), `assist branch <slug>` prepends `<prefix>/` to the branch name. With the key unset, no prefix segment is added.
|
|
301
|
+
|
|
302
|
+
`assist branch` resolves the base branch live from the remote (`git ls-remote --symref origin HEAD`), so it never depends on a stale or unset local `origin/HEAD`. If the remote advertises no default it falls back to `main`. Set `branch.defaultBranch` (e.g. `develop`) to override the base branch outright.
|
|
303
|
+
|
|
298
304
|
## netcap browser extension
|
|
299
305
|
|
|
300
306
|
`assist netcap` only runs the receiver; the browser side is a raw Manifest V3 extension (no build step) under `netcap-extension/`. A MAIN-world content script patches `fetch`/`XMLHttpRequest` to capture `{url, method, status, requestBody, responseBody, timestamp}`, relays each entry to the background service worker (`window.postMessage` → `chrome.runtime.sendMessage`), and the background worker POSTs it to the receiver. The XHR patch reads the response across every `responseType` (`json`, `blob`, `arraybuffer`, `document`, not just `text`) — LinkedIn's voyager GraphQL calls use `responseType: "json"`, which exposes no `responseText`, so reading `responseText` alone captured those bodies empty. Forwarding happens in the background context, so the page's CSP (`connect-src`) never blocks it — the limitation that killed the earlier console-paste approach.
|
package/allowed.cli-writes
CHANGED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Create a branch off the fresh remote default via assist branch
|
|
3
|
+
allowed_args: "<description of the work> [--jira KEY]"
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
You are creating a git branch by calling the `assist branch` CLI command, which fetches and branches off the fresh remote default (`origin/<default>`) and enforces the team naming convention.
|
|
7
|
+
|
|
8
|
+
## Step 1: Derive the slug
|
|
9
|
+
|
|
10
|
+
`$ARGUMENTS` is a free-text description of the work (e.g. "add login form"). Turn it into a concise kebab-case slug: lowercase, words joined by hyphens, no leading/trailing punctuation (e.g. `add-login-form`).
|
|
11
|
+
|
|
12
|
+
Do not put backlog item numbers in the slug — `assist branch` rejects bare 1–4 digit numeric tokens and `#<number>` references, because they look like internal backlog IDs. If the description contains such a number, drop or reword it (e.g. "fix 404 page" → `fix-not-found-page`).
|
|
13
|
+
|
|
14
|
+
## Step 2: Resolve the Jira key
|
|
15
|
+
|
|
16
|
+
If `$ARGUMENTS` contains an explicit `--jira <KEY>` (or a bare `[A-Z]+-\d+` token), use that key.
|
|
17
|
+
|
|
18
|
+
Otherwise, if this session is working on a backlog item, read its associated Jira key:
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
assist backlog show <id> 2>&1
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
If the output includes a `Jira: <KEY>` line, use that key. If there is no session item or no associated key, omit `--jira` entirely.
|
|
25
|
+
|
|
26
|
+
## Step 3: Create the branch
|
|
27
|
+
|
|
28
|
+
Run the command with the resolved slug and optional key:
|
|
29
|
+
|
|
30
|
+
```
|
|
31
|
+
assist branch <slug> --jira <KEY> 2>&1
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Omit `--jira <KEY>` when no key was resolved. Display the command output so the user sees the created branch name and the `origin/<default>` it was based on. If the command reports an error (invalid slug, git failure), relay it to the user — no branch is created on failure.
|