@remixhq/claude-plugin 0.1.21 → 0.1.22
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/.claude-plugin/plugin.json +1 -1
- package/dist/hook-post-collab.cjs +4 -4
- package/dist/hook-post-collab.cjs.map +1 -1
- package/dist/hook-stop-collab.cjs +1857 -847
- package/dist/hook-stop-collab.cjs.map +1 -1
- package/dist/hook-user-prompt.cjs +28058 -220
- package/dist/hook-user-prompt.cjs.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/mcp-server.cjs +28 -10
- package/dist/mcp-server.cjs.map +1 -1
- package/package.json +4 -4
- package/skills/init-or-remix/SKILL.md +5 -3
- package/skills/safe-collab-workflow/SKILL.md +15 -8
- package/skills/submit-change-step/SKILL.md +13 -12
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remixhq/claude-plugin",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.22",
|
|
4
4
|
"description": "Claude Code plugin for Remix collaboration workflows",
|
|
5
5
|
"homepage": "https://github.com/RemixDotOne/remix-claude-plugin",
|
|
6
6
|
"license": "MIT",
|
|
@@ -34,12 +34,12 @@
|
|
|
34
34
|
"postbuild": "node -e \"const fs=require('node:fs'); for (const p of ['dist/mcp-server.cjs','dist/hook-pre-git.cjs','dist/hook-user-prompt.cjs','dist/hook-post-collab.cjs','dist/hook-stop-collab.cjs']) fs.chmodSync(p, 0o755);\"",
|
|
35
35
|
"dev": "tsx src/mcp-server.ts",
|
|
36
36
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
37
|
-
"test": "node --import tsx --test src/**/*.test.ts",
|
|
37
|
+
"test": "node --import tsx --test 'src/**/*.test.ts'",
|
|
38
38
|
"prepack": "npm run build"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@remixhq/core": "^0.1.
|
|
42
|
-
"@remixhq/mcp": "^0.1.
|
|
41
|
+
"@remixhq/core": "^0.1.17",
|
|
42
|
+
"@remixhq/mcp": "^0.1.17"
|
|
43
43
|
},
|
|
44
44
|
"devDependencies": {
|
|
45
45
|
"@types/node": "^25.4.0",
|
|
@@ -5,11 +5,13 @@ description: Use when deciding whether to bind the current repo to Remix or crea
|
|
|
5
5
|
|
|
6
6
|
# Init, Remix, Or Checkout
|
|
7
7
|
|
|
8
|
-
##
|
|
8
|
+
## Mid-turn unbound branch is hook-owned
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
When the current branch is unbound in a Remix-bound repo — whether the user mentioned Remix or not, whether the prompt is trivial or not — **the Remix `UserPromptSubmit` hook detects this and spawns `remix collab init` for you, detached, in the background**. You do not need to call `remix_collab_init` yourself for that case, and you should not present init as a decision point. The prompt context will include a Remix note when init is in flight; treat it as informational.
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
If the user explicitly asks you to initialize the current branch, you may call `remix_collab_init` to give them an immediate synchronous result instead of waiting for the hook. Otherwise, leave it to the hook.
|
|
13
|
+
|
|
14
|
+
The user-facing decision tree below (init vs. remix vs. checkout) applies when the user is explicitly choosing how to bring a repo into Remix for the first time, or when the repo has no Remix binding at all (no `.remix/config.json`). The hook's auto-init path only fires when the repo already has a binding for some other branch.
|
|
13
15
|
|
|
14
16
|
Use this skill when onboarding a repository into Remix, starting from an existing Remix app lineage, or checking out an exact existing Remix app.
|
|
15
17
|
|
|
@@ -9,11 +9,18 @@ In a Remix-bound repo, treat Remix MCP tools as the authoritative workflow layer
|
|
|
9
9
|
|
|
10
10
|
## Runtime override (read this first)
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
In a Remix-bound repo, the Remix plugin hooks own all "plumbing" for recording: turn finalize, branch init when the current branch is unbound, baseline repair when the local anchor diverged, and safe sync recovery when the server moved ahead. These run automatically, detached, in the background. You are not the recovery layer.
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
Concretely:
|
|
15
|
+
|
|
16
|
+
- Do **not** call `remix_collab_init` to "fix" an unbound branch. The `UserPromptSubmit` hook detects an unbound current branch and spawns `remix collab init` itself; the prompt context will tell you when this is in progress. Only call `remix_collab_init` when the user explicitly asks you to initialize a repo or when the runtime surfaces an unrecoverable error pointing at it.
|
|
17
|
+
- Do **not** call any MCP tool to "re-anchor" or "repair the baseline". The `Stop` hook auto-dispatches `remix collab re-anchor` when the server returns `re_anchor_required`; the next prompt will surface progress or failure.
|
|
18
|
+
- Do **not** call `remix_collab_sync_apply` purely as a precondition for recording. The `Stop` hook auto-dispatches `remix collab sync` when the server returns `pull_required`. Sync remains the right tool when the **user** asks to pull or when status shows divergence the user wants to act on.
|
|
19
|
+
- Do **not** call a finalize MCP tool for the current turn. The MCP surface does not expose one; the `Stop` hook is recording it.
|
|
15
20
|
- Do **not** call `remix_collab_drain_finalize_queue` as a precondition for anything. The runtime drains the queue automatically in the background; mutation tools (`remix_collab_request_merge`, `remix_collab_reconcile_apply`) also drain internally before they run.
|
|
16
21
|
|
|
22
|
+
When the prompt context includes a `[Remix recovery]` note from a previous turn, treat it as informational. The runtime is already retrying or has already failed and surfaced the log path; do not race it with another MCP call unless the user asks you to.
|
|
23
|
+
|
|
17
24
|
The runtime status note is authoritative for automatic recording. Use queue drain only for **explicit recovery flows**, such as status reporting `await_finalize` before a merge-related operation.
|
|
18
25
|
|
|
19
26
|
Canonical rules:
|
|
@@ -21,9 +28,9 @@ Canonical rules:
|
|
|
21
28
|
- In a bound repo, Remix tools are the required workflow layer for collaboration work.
|
|
22
29
|
- In a bound repo, branch switches are collaboration-state transitions because each branch can resolve to its own Remix lane and app lineage.
|
|
23
30
|
- Never switch git branches on your own. Branch switches are user-initiated only. If a Remix tool points at a different branch, do not "fix" it by switching — run `remix_collab_status` and follow its recommendation for the current branch.
|
|
24
|
-
- An unbound branch is
|
|
31
|
+
- An unbound current branch is handled automatically by the `UserPromptSubmit` hook. Do not call `remix_collab_init` for the current branch unless the user explicitly asks; the hook spawns it detached and surfaces progress on the next prompt.
|
|
25
32
|
- Historical intent questions go to Remix memory before raw git history.
|
|
26
|
-
- Remix is source-blind: any local content change since the last recorded turn — whether you typed it, the user typed it, a merge produced it, `git pull` brought it in, or an IDE saved it — is captured by exactly one completed-turn hook recording. Do not pick a different command based on what produced the change. `re-anchor` is
|
|
33
|
+
- Remix is source-blind: any local content change since the last recorded turn — whether you typed it, the user typed it, a merge produced it, `git pull` brought it in, or an IDE saved it — is captured by exactly one completed-turn hook recording. Do not pick a different command based on what produced the change. Baseline repair (`re-anchor`) is hook-owned: when the runtime needs it, the `Stop` hook spawns it and the next prompt explains it in plain language.
|
|
27
34
|
- Raw git mutation is allowed in a bound repo, but it never substitutes for automatic hook recording. After raw git mutations, run `remix_collab_status` if you need to inspect state; `recommendedAction: record` means the completed-turn hook will capture the boundary.
|
|
28
35
|
- The runtime records the exact user prompt and final assistant response automatically at turn completion.
|
|
29
36
|
- Hook recording is queued. A remote change step does not exist yet until the finalize queue drains.
|
|
@@ -53,7 +60,7 @@ After switching branches:
|
|
|
53
60
|
|
|
54
61
|
1. Run `remix_collab_status`.
|
|
55
62
|
2. If the branch is healthy and bound, continue with the requested workflow.
|
|
56
|
-
3. If the branch is unbound,
|
|
63
|
+
3. If the branch is unbound, do not call `remix_collab_init` yourself. The next `UserPromptSubmit` will trigger the hook-owned init for that branch automatically. Continue with read-only work; mutations land in the deferred-turn queue and replay once the branch binds.
|
|
57
64
|
4. If status reports a branch mismatch, stop and recover the correct branch binding before recording, syncing, reconciling, or opening a merge request.
|
|
58
65
|
5. Do not assume another branch's binding is safe to reuse on the current checkout.
|
|
59
66
|
|
|
@@ -72,12 +79,12 @@ Branch state can change between turns by means you did not initiate — external
|
|
|
72
79
|
|
|
73
80
|
**NEVER end your response with an unhandled Remix error.** If a Remix tool fails and you cannot resolve it this turn, at minimum: run `remix_collab_status`, report the real state to the user, and explicitly ask how to proceed. Silently giving up is not an option in a bound repo.
|
|
74
81
|
|
|
75
|
-
**NEVER switch branches to "recover" from an unexpected binding state.** If status shows the current branch is unbound or mismatched, the recovery is `
|
|
82
|
+
**NEVER switch branches to "recover" from an unexpected binding state.** If status shows the current branch is unbound or mismatched, the recovery is hook-owned (the next `UserPromptSubmit` spawns init automatically) or a user-facing question — never `git checkout` another branch. Branch switches belong to the user.
|
|
76
83
|
|
|
77
84
|
Important rules:
|
|
78
85
|
|
|
79
|
-
- If the repo
|
|
80
|
-
- In a bound repo, raw git mutations (`commit`, `pull`, `merge`, `rebase`, `reset`) are allowed but never replace automatic hook recording. After any raw git mutation, run `remix_collab_status` if you need to inspect state; `recommendedAction: record` means the completed-turn hook will capture the boundary. Do not
|
|
86
|
+
- If the repo has no Remix binding at all (no `.remix/config.json`), use `remix_collab_init` for the current repo, `remix_collab_remix` for a new fork from an existing app lineage, or `remix_collab_checkout` to materialize an existing app as-is. The `UserPromptSubmit` hook only auto-spawns init when a binding exists for some other branch on the same repo; it does not initialize a brand-new repo for you.
|
|
87
|
+
- In a bound repo, raw git mutations (`commit`, `pull`, `merge`, `rebase`, `reset`) are allowed but never replace automatic hook recording. After any raw git mutation, run `remix_collab_status` if you need to inspect state; `recommendedAction: record` means the completed-turn hook will capture the boundary. Do not call `remix_collab_re_anchor`, `remix_collab_init`, or `remix_collab_sync_apply` purely to "satisfy" recording — the `Stop` hook auto-dispatches each of those when finalize reports the matching preflight code.
|
|
81
88
|
- In a bound repo, do not start why/history/failed-attempt questions with raw git `log`, `show`, `blame`, or `diff`; start with Remix memory reads instead.
|
|
82
89
|
- In a bound repo, rely on automatic hook recording for the completed turn.
|
|
83
90
|
- Do not treat queued hook recording as proof that the turn is already available for merge-request or remote-history workflows. Drain and re-check when status reports `await_finalize`.
|
|
@@ -13,18 +13,21 @@ This skill is specifically about the automatic hook recording model. The MCP sur
|
|
|
13
13
|
|
|
14
14
|
Remix records turns source-blind. Any local content change since the last recorded turn — whether you typed it, the user typed it, a `git pull` brought it in, a `git merge` or `git rebase` produced it, or an IDE saved it — is captured by exactly one completed-turn hook recording. The recording automatically attaches `preTurnEvents` metadata describing any commits, merges, or uncommitted state captured at the boundary; you do not need to summarize that yourself.
|
|
15
15
|
|
|
16
|
-
Do **not**
|
|
16
|
+
Do **not** call `remix_collab_re_anchor_*`, `remix_collab_init`, or `remix_collab_sync_apply` purely as preconditions for recording. The runtime's `Stop` hook auto-dispatches each of those when finalize reports the matching preflight code:
|
|
17
17
|
|
|
18
|
-
- `
|
|
19
|
-
- `
|
|
20
|
-
- `
|
|
21
|
-
|
|
18
|
+
- `branch_binding_missing` → hook spawns `remix collab init`.
|
|
19
|
+
- `re_anchor_required` → hook spawns `remix collab re-anchor`.
|
|
20
|
+
- `pull_required` → hook spawns `remix collab sync`.
|
|
21
|
+
|
|
22
|
+
Each fix runs detached, logs to `.remix/<command>.log`, and writes a marker the next prompt surfaces. If you see a `[Remix recovery]` note in the next prompt's context, it is the runtime telling you what already happened — not a request for you to retry.
|
|
23
|
+
|
|
24
|
+
The recommended-action codes from `remix_collab_status` (`record`, `re_anchor`, `pull`, `reconcile`) remain meaningful when the **user** is reasoning about state or explicitly asks for a sync, a re-anchor, or a reconcile. Don't pre-emptively invoke them just to "satisfy" recording.
|
|
22
25
|
|
|
23
26
|
## Runtime recording
|
|
24
27
|
|
|
25
|
-
|
|
28
|
+
In a Remix-bound repo, the `Stop` hook is the authoritative recorder for every completed turn:
|
|
26
29
|
|
|
27
|
-
- Do **not** call a finalize MCP tool. The MCP surface does not expose one
|
|
30
|
+
- Do **not** call a finalize MCP tool. The MCP surface does not expose one.
|
|
28
31
|
- Do **not** call `remix_collab_drain_finalize_queue` for this turn. The runtime drains the queue automatically in the background. Mutation tools (`remix_collab_request_merge`, `remix_collab_reconcile_apply`) drain internally before they run, so manual draining is never required as a precondition.
|
|
29
32
|
|
|
30
33
|
Use `remix_collab_drain_finalize_queue` only for explicit recovery flows, such as status reporting `await_finalize` before a merge-related operation.
|
|
@@ -51,12 +54,10 @@ Use the live worktree as the source of truth for recorded work. If the repo is n
|
|
|
51
54
|
|
|
52
55
|
## Branch recovery
|
|
53
56
|
|
|
54
|
-
If status shows the current branch is unbound
|
|
57
|
+
If status shows the current branch is unbound, **the next `UserPromptSubmit` hook will spawn `remix collab init` for you, detached, in the background.** Continue the requested work. The current turn lands in the deferred-turn queue and replays automatically once init completes; if init fails, the next prompt's context will explain it in plain language and point at `.remix/collab-init.log`.
|
|
55
58
|
|
|
56
|
-
|
|
57
|
-
2. **Silently run `remix_collab_init` on the current branch.** Do not ask the user first. Do not offer alternatives. Do not switch branches. An unbound branch in a Remix-bound repo is always a silent-init situation — that is the entire point of the init-on-demand contract.
|
|
58
|
-
3. Continue the requested work. The completed-turn hook will record after the branch is ready.
|
|
59
|
+
You should not call `remix_collab_init` yourself for this case unless the user explicitly asks for an immediate, synchronous result. Calling it eagerly races the hook and produces no observable benefit.
|
|
59
60
|
|
|
60
|
-
**NEVER switch git branches to resolve a recording issue.** Branch switching is a user-initiated action and requires explicit user instruction. If status shows the current branch is unbound,
|
|
61
|
+
**NEVER switch git branches to resolve a recording issue.** Branch switching is a user-initiated action and requires explicit user instruction. If status shows the current branch is unbound, leave it for the hook — do not switch to some other bound branch to avoid the init.
|
|
61
62
|
|
|
62
63
|
The triviality of the user's current prompt is irrelevant. "Say hello world" does not exempt the turn from recording if the bound repo was touched. The hooks handle routine recording automatically.
|