@remixhq/claude-plugin 0.1.20 → 0.1.21

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@remixhq/claude-plugin",
3
- "version": "0.1.20",
3
+ "version": "0.1.21",
4
4
  "description": "Claude Code plugin for Remix collaboration workflows",
5
5
  "homepage": "https://github.com/RemixDotOne/remix-claude-plugin",
6
6
  "license": "MIT",
@@ -39,7 +39,7 @@
39
39
  },
40
40
  "dependencies": {
41
41
  "@remixhq/core": "^0.1.15",
42
- "@remixhq/mcp": "^0.1.15"
42
+ "@remixhq/mcp": "^0.1.16"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@types/node": "^25.4.0",
@@ -31,7 +31,7 @@ Important rules:
31
31
  - In a bound repo, use Remix review tools as the default path for MR handling.
32
32
  - Choose an explicit queue instead of treating merge requests as one broad inbox.
33
33
  - Do not treat raw `git merge` as the way Remix merge requests are approved or applied.
34
- - Do not assume a successful `remix_collab_finalize_turn` already created a remote change step; drain and re-check when status reports `await_finalize`.
34
+ - Do not assume queued hook recording already created a remote change step; drain and re-check when status reports `await_finalize`.
35
35
  - If approval would mutate the local target repo, explain that before applying it.
36
36
  - If the repo context is unclear, stay in remote-only review mode until the target repo is confirmed.
37
- - Before the final response, use `remix_collab_finalize_turn` to record the completed review turn.
37
+ - Rely on automatic hook recording to capture the completed review turn.
@@ -9,12 +9,12 @@ 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
- When this turn's context contains a Remix runtime status note (recognizable by the literal `[Remix runtime status]` prefix from the Remix `UserPromptSubmit` hook), recording and queue draining for **this** turn are handled automatically by the runtime's `Stop` hook. In that case:
12
+ When this turn's context contains a Remix runtime status note (recognizable by the literal `[Remix runtime status]` prefix from the Remix `UserPromptSubmit` hook), recording and queue draining for **this** turn are handled automatically by the runtime hooks. In that case:
13
13
 
14
- - Do **not** call `remix_collab_finalize_turn` for this turn the runtime is recording it. Calling it would create a duplicate record.
14
+ - Do **not** call a finalize MCP tool for this turn. The MCP surface does not expose one; the runtime is recording it.
15
15
  - 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
16
 
17
- The runtime status note is authoritative for the override. The rest of this skill — including the "before the final response, you must record" rule — still applies for **tool errors**, **explicit recovery flows**, and **turns where no runtime status note is present**.
17
+ 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
18
 
19
19
  Canonical rules:
20
20
 
@@ -23,16 +23,14 @@ Canonical rules:
23
23
  - 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
24
  - An unbound branch is always a silent-init situation. Run `remix_collab_init` without asking. The user's intent when working on a branch is that the branch be bound.
25
25
  - 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 `remix_collab_finalize_turn`. Do not pick a different command based on what produced the change. `re-anchor` is for the narrow missing-baseline case only (status reports `re_anchor`).
27
- - Raw git mutation is allowed in a bound repo, but it never substitutes for `remix_collab_finalize_turn`. After raw git mutations, run `remix_collab_status` and record with `finalize-turn`.
28
- - Before the final response, you must record exactly one completed turn with `remix_collab_finalize_turn` — **unless the runtime override at the top of this skill applies** (a `[Remix runtime status]` note from the Remix hook stating that the Stop hook will record this turn).
29
- - `remix_collab_finalize_turn` is queued only. It captures the local boundary first; a remote change step does not exist yet until the finalize queue drains.
30
- - The recording call must include the exact user prompt and your final assistant response.
31
- - Do not finish the response before recording the completed turn (subject to the runtime override).
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 for the narrow missing-baseline case only (status reports `re_anchor`).
27
+ - 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
+ - The runtime records the exact user prompt and final assistant response automatically at turn completion.
29
+ - Hook recording is queued. A remote change step does not exist yet until the finalize queue drains.
32
30
  - Prefer preview tools before apply tools whenever both exist.
33
31
  - Treat reconcile as high risk and use it only when sync is unavailable and clearly required.
34
32
 
35
- Raw git mutation commands are not the normal collaboration path, but they are allowed. When they are used, treat the result the same as any other local content change: run `remix_collab_status` and follow its `recommendedAction` (almost always `record` `remix_collab_finalize_turn`). Raw git reads are reserved for exact repository facts, not for normal collaboration-state or historical-reasoning flows.
33
+ Raw git mutation commands are not the normal collaboration path, but they are allowed. When they are used, treat the result the same as any other local content change: run `remix_collab_status` if you need to inspect state; `recommendedAction: record` means the completed-turn hook will capture the boundary. Raw git reads are reserved for exact repository facts, not for normal collaboration-state or historical-reasoning flows.
36
34
 
37
35
  Follow this order:
38
36
 
@@ -49,7 +47,7 @@ Follow this order:
49
47
  - `remix_collab_memory_timeline`
50
48
  7. Only call `remix_collab_memory_change_step_diff` after you already have a specific `changeStepId`.
51
49
  8. Use raw git history only after Remix memory has narrowed the relevant change, or when the user explicitly asks for exact commit, blame, ancestry, or patch-level detail.
52
- 9. Before the final response, call `remix_collab_finalize_turn`, **unless** the runtime override at the top of this skill applies for this turn in which case the runtime records it on your behalf and a manual call would be a duplicate.
50
+ 9. Before merge-related or recovery flows, drain and re-check only if status reports `await_finalize`; routine completed-turn recording is automatic.
53
51
 
54
52
  After switching branches:
55
53
 
@@ -79,11 +77,11 @@ Branch state can change between turns by means you did not initiate — external
79
77
  Important rules:
80
78
 
81
79
  - If the repo is unbound, 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.
82
- - In a bound repo, raw git mutations (`commit`, `pull`, `merge`, `rebase`, `reset`) are allowed but never replace `remix_collab_finalize_turn`. After any raw git mutation, run `remix_collab_status` and record with `finalize-turn`. Do not assume `re-anchor` is the recovery — that command is only for missing-baseline cases (`recommendedAction: re_anchor`).
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 assume `re-anchor` is the recovery — that command is only for missing-baseline cases (`recommendedAction: re_anchor`).
83
81
  - 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.
84
- - In a bound repo, do not finish the response before recording the completed turn yourself.
85
- - Do not treat a successful `remix_collab_finalize_turn` call as proof that the turn is already available for merge-request or remote-history workflows. Drain and re-check when status reports `await_finalize`.
86
- - After the final recording call, avoid further repo mutations unless you intend to record another final turn.
82
+ - In a bound repo, rely on automatic hook recording for the completed turn.
83
+ - 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`.
84
+ - After the final response, avoid further repo mutations unless you intend to capture them in a later turn.
87
85
  - Use raw git reads only when the task is clearly about exact repository facts or a separate GitHub-only branch workflow rather than Remix state.
88
86
  - When viewing merge requests, request bounded diff output first and only ask for more detail if needed.
89
87
  - For merge-request listing, choose the explicit queue that matches the intent: `remix_collab_review_queue`, `remix_collab_my_merge_requests`, or `remix_collab_list_app_merge_requests` with required `queue` set to `app_reviewable`, `app_outgoing`, or `app_related_visible`.
@@ -1,91 +1,62 @@
1
1
  ---
2
- name: finalize-turn-workflow
3
- description: Use when code edits or review work are complete in a Remix-bound repo and the turn should be recorded with `remix_collab_finalize_turn`.
2
+ name: turn-recording-workflow
3
+ description: Use when code edits or review work are complete in a Remix-bound repo and the completed turn should be captured by automatic hook recording.
4
4
  ---
5
5
 
6
- # Finalize A Remix Turn
6
+ # Record A Remix Turn
7
7
 
8
8
  Use this skill after edits or review work are complete and the task should be captured as the final recorded turn in a Remix-bound repo.
9
9
 
10
- This skill is specifically about the queued-finalize model behind `remix_collab_finalize_turn`.
10
+ This skill is specifically about the automatic hook recording model. The MCP surface does not expose a manual finalize tool.
11
11
 
12
12
  ## Source-blind recording rule
13
13
 
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 `remix_collab_finalize_turn`. `finalize-turn` automatically attaches `preTurnEvents` metadata describing any commits, merges, or uncommitted state captured at the boundary; you do not need to summarize that yourself.
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
16
  Do **not** pick a different command (`re-anchor`, `sync`, `reconcile`) based on what produced the local change. Those commands are only correct when `remix_collab_status.recommendedAction` explicitly names them:
17
17
 
18
- - `record` (or `repoState: local_only_changed`) → `remix_collab_finalize_turn`. This is the catch-all and the most common case.
18
+ - `record` (or `repoState: local_only_changed`) → no manual MCP action. The completed-turn hook will capture the boundary.
19
19
  - `re_anchor` → `remix_collab_re_anchor_*`. Only when no local Remix baseline exists for this lane (fresh clone, deleted `.remix/`, or first init didn't seed). Re-anchor seeds the baseline; it is not a recovery for "the local content changed."
20
20
  - `pull` → `remix_collab_sync_*`. Only when the server lane advanced and local did not.
21
21
  - `reconcile` → `remix_collab_reconcile_*`. Only when both sides changed since the agreed baseline.
22
22
 
23
- ## Runtime override (read this first)
23
+ ## Runtime recording
24
24
 
25
- When a Remix runtime status note appears in this turn's context — recognizable by the literal `[Remix runtime status]` prefix and originating from the Remix `UserPromptSubmit` hook — recording and queue draining for **this** turn are handled automatically by the runtime's `Stop` hook. In that case:
25
+ When a Remix runtime status note appears in this turn's context — recognizable by the literal `[Remix runtime status]` prefix and originating from the Remix `UserPromptSubmit` hook — recording and queue draining for **this** turn are handled automatically by the runtime's hooks.
26
26
 
27
- - Do **not** call `remix_collab_finalize_turn` for this turn. The runtime is recording it. A redundant call would create a duplicate record.
27
+ - Do **not** call a finalize MCP tool. The MCP surface does not expose one; the runtime is recording the turn.
28
28
  - 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
29
 
30
- The runtime status note is authoritative for the override. Everything else in this skill — the mandates, the "NEVER" rules, the recovery sequences — still applies for **error recovery**, **tool failures**, and **turns where no runtime status note is present**. Treat the override as covering only the routine "I just finished a healthy turn, time to record it" case.
30
+ Use `remix_collab_drain_finalize_queue` only for explicit recovery flows, such as status reporting `await_finalize` before a merge-related operation.
31
31
 
32
32
  Workflow:
33
33
 
34
34
  1. Run `remix_collab_status` first to confirm the repo is bound and inspect current warnings.
35
- 2. If status recommends `await_finalize`, do not record again and do not request a merge yet. Use `remix_collab_drain_finalize_queue`, then re-check `remix_collab_status`.
36
- 3. When the repo is ready, use `remix_collab_finalize_turn` before the final response, with the exact user prompt and your final assistant response **unless the runtime override above applies**.
37
- 4. Treat `remix_collab_finalize_turn` as capturing the local workspace boundary and queueing remote processing, not as immediate proof that a remote change step already exists.
35
+ 2. If status recommends `await_finalize`, do not request a merge yet. Use `remix_collab_drain_finalize_queue`, then re-check `remix_collab_status`.
36
+ 3. When status recommends `record`, continue the turn normally. The completed-turn hook captures the exact user prompt, final assistant response, and local workspace boundary.
37
+ 4. Treat hook recording as local capture plus queued remote processing, not as immediate proof that a remote change step already exists.
38
38
 
39
39
  Important behavior:
40
40
 
41
- - `remix_collab_finalize_turn` is the authoritative recording path for completed work instead of raw git commit or push.
42
- - `remix_collab_finalize_turn` is queued only. A remote change step does not exist yet until the finalize queue drains successfully.
43
- - A successful finalize call means local capture and queueing succeeded. It does not mean merge-request or remote-history workflows can assume the turn is already materialized remotely.
41
+ - Automatic hook recording is the authoritative path for completed work instead of raw git commit or push.
42
+ - Hook recording is queued. A remote change step does not exist yet until the finalize queue drains successfully.
44
43
  - If `remix_collab_status` reports `await_finalize`, use `remix_collab_drain_finalize_queue` and re-check status before merge-related or recovery flows.
45
- - If the user wants to understand current repo state before recording, re-run `remix_collab_status`.
46
- - Do not make further repo mutations after the final recording call unless you intend to record another completed turn.
47
- - Do not retry finalize immediately just because a remote record is not visible yet; queue drain is the next step, not a second finalize.
48
- - If finalize or drain returns `recommendedNextActions` or an `error.hint`, those fields are **authoritative and mandatory**. Do not ignore them. Do not improvise around them. Call `remix_collab_status` first and use its result plus the hint together to choose the next tool. Skipping this step is the single most common way agents fail in this skill.
44
+ - If the user wants to understand current repo state before the turn ends, re-run `remix_collab_status`.
45
+ - Do not make further repo mutations after the final response unless you intend them to be captured by a later completed turn.
46
+ - Do not retry recording just because a remote record is not visible yet; queue drain is the next step, not another recording attempt.
47
+ - If drain returns `recommendedNextActions` or an `error.hint`, those fields are **authoritative and mandatory**. Do not ignore them. Do not improvise around them. Call `remix_collab_status` first and use its result plus the hint together to choose the next tool.
49
48
  - If the tool surfaces a preserved local recovery artifact, mention it explicitly and keep it available while you repair repo state.
50
49
 
51
- Use the live worktree as the source of truth for finalized work. If the repo is not ready, fix the preflight state first rather than trying to bypass it.
50
+ Use the live worktree as the source of truth for recorded work. If the repo is not ready, fix the preflight state first rather than trying to bypass it.
52
51
 
53
- ## Finalize errors — non-negotiable rules
52
+ ## Branch recovery
54
53
 
55
- When `remix_collab_finalize_turn` returns an error, you are in a state-recovery situation. You do not have permission to end your turn until it is resolved.
56
-
57
- **NEVER, UNDER ANY CIRCUMSTANCES, END A TURN WITH AN UNHANDLED FINALIZE ERROR.**
58
-
59
- This means:
60
-
61
- - Do not decide "finalize isn't applicable here" because the user's prompt was trivial (e.g. "hello world"). The recording rule fires on any turn that touches the bound repo — including the very finalize call that just failed. The call touched the repo. You must record.
62
- - Do not skip finalize because the error seems like a state problem outside your control. State problems are exactly what the error's `hint` and `recommendedNextActions` fields are there to resolve. Read them. Follow them.
63
- - Do not run a random bash command to "check what happened" and then give up. That is the failure pattern. `remix_collab_status` is the correct first tool, every time, without exception.
64
-
65
- **Mandatory recovery sequence when finalize errors:**
66
-
67
- 1. Read the error's `message`, `hint`, and `recommendedNextActions` fields in full. They are authoritative. If the hint names a tool, that tool is almost certainly the next correct call.
68
- 2. Call `remix_collab_status` immediately. The hint from status supersedes anything you inferred from the error alone — status sees the actual current binding, branch, worktree, alignment, and queue state.
69
- 3. Based on status, pick the correct recovery tool:
70
- - `local_only_changed` (or `recommendedAction: record`) → `remix_collab_finalize_turn`. This is the catch-all for any local mutation, including raw `git commit`, `git pull`, `git merge`, `git rebase`, or `git reset`. The source of the change does not matter.
71
- - `baseline_missing` or `external_local_base_changed` (or `recommendedAction: re_anchor`) → commit any pending edits, then `remix_collab_re_anchor_preview` → `remix_collab_re_anchor_apply`. This applies only when no local Remix baseline exists for this lane yet, not whenever local content moved.
72
- - `await_finalize` → `remix_collab_drain_finalize_queue`, then re-check status.
73
- - Unbound or mismatched branch → follow the branch-recovery rules below.
74
- - `delta_ready` for sync (or `recommendedAction: pull`) → `remix_collab_sync_preview` → `remix_collab_sync_apply`.
75
- - `both_changed` (or `recommendedAction: reconcile`) → `remix_collab_reconcile_preview` → `remix_collab_reconcile_apply`.
76
- 4. Retry `remix_collab_finalize_turn` only after status confirms the blocker is cleared.
77
- 5. Only then produce your final user-facing response.
78
-
79
- **If finalize fails because the current branch is unbound:**
80
-
81
- The error hint will explicitly name the branch (e.g., `"Run remix collab init on branch X"`). That hint is the answer. Sequence:
54
+ If status shows the current branch is unbound:
82
55
 
83
56
  1. Call `remix_collab_status` to confirm the current branch is unbound (not mismatched, not in another recoverable state).
84
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.
85
- 3. Retry `remix_collab_finalize_turn`. Only after it succeeds, respond.
86
-
87
- **NEVER switch git branches to resolve a finalize error.** Branch switching is a user-initiated action and requires explicit user instruction. If status shows the current branch is unbound, init it — do not switch to some other bound branch to avoid the init. Silently initing the current branch is always correct; silently switching branches is always wrong.
58
+ 3. Continue the requested work. The completed-turn hook will record after the branch is ready.
88
59
 
89
- **Cross-branch finalize** (`allowBranchMismatch: true`) applies only when the user has explicitly asked for it. Do not infer it from status.
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, init it do not switch to some other bound branch to avoid the init. Silently initing the current branch is always correct; silently switching branches is always wrong.
90
61
 
91
- **The triviality of the user's current prompt is irrelevant.** "Say hello world" does not exempt you from the protocol. Neither does "what time is it", "thanks", or any other small talk. If the bound repo was touched — including by a failing Remix tool call — you finalize. No exceptions, **except** the explicit runtime override at the top of this skill (a `[Remix runtime status]` note from the runtime hook stating that the Stop hook will record this turn automatically). The runtime override is the **only** sanctioned way to skip a finalize call; nothing else exempts you.
62
+ 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.
@@ -14,8 +14,8 @@ Mental model:
14
14
  - `remix_collab_sync_*` is for pulling Remix-known app state into the local repo when fast-forward sync is possible (i.e. `recommendedAction: pull`, `repoState: server_only_changed`).
15
15
  - `remix_collab_reconcile_*` is for the rare case where both the local workspace and the server lane changed since the last agreed baseline (i.e. `recommendedAction: reconcile`, `repoState: both_changed`).
16
16
  - `remix_collab_sync_upstream` is for bringing new upstream app changes into a remix.
17
- - `remix_collab_finalize_turn` is not a sync tool. It records the completed turn, but it does not replace sync, reconcile, or upstream-sync workflows.
18
- - `re-anchor` is **not** a sync or recovery tool for diverged history. It only seeds a missing local Remix baseline (`recommendedAction: re_anchor`). See the finalize-turn-workflow skill for full handling. If status reports `local_only_changed` (or `recommendedAction: record`), the answer is `finalize-turn`, never reconcile.
17
+ - Automatic hook recording is not a sync tool. It records the completed turn, but it does not replace sync, reconcile, or upstream-sync workflows.
18
+ - `re-anchor` is **not** a sync or recovery tool for diverged history. It only seeds a missing local Remix baseline (`recommendedAction: re_anchor`). If status reports `local_only_changed` (or `recommendedAction: record`), routine completed-turn hook recording is the answer, never reconcile.
19
19
 
20
20
  Workflow:
21
21