@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/.claude-plugin/plugin.json +1 -1
- package/agents/remix-collab.md +10 -10
- package/dist/hook-post-collab.cjs +2 -2
- package/dist/hook-post-collab.cjs.map +1 -1
- package/dist/hook-pre-git.cjs +6 -6
- package/dist/hook-pre-git.cjs.map +1 -1
- package/dist/hook-stop-collab.cjs +6 -6
- package/dist/hook-stop-collab.cjs.map +1 -1
- package/dist/hook-user-prompt.cjs +8 -8
- package/dist/hook-user-prompt.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/mcp-server.cjs +16 -347
- package/dist/mcp-server.cjs.map +1 -1
- package/package.json +2 -2
- package/skills/review-merge-request/SKILL.md +2 -2
- package/skills/safe-collab-workflow/SKILL.md +13 -15
- package/skills/submit-change-step/SKILL.md +25 -54
- package/skills/sync-and-reconcile/SKILL.md +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@remixhq/claude-plugin",
|
|
3
|
-
"version": "0.1.
|
|
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.
|
|
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
|
|
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
|
-
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
27
|
-
- Raw git mutation is allowed in a bound repo, but it never substitutes for
|
|
28
|
-
-
|
|
29
|
-
-
|
|
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`
|
|
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
|
|
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
|
|
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,
|
|
85
|
-
- Do not treat
|
|
86
|
-
- After the final
|
|
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:
|
|
3
|
-
description: Use when code edits or review work are complete in a Remix-bound repo and the turn should be
|
|
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
|
-
#
|
|
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
|
|
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
|
|
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`) →
|
|
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
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
|
36
|
-
3. When
|
|
37
|
-
4. Treat
|
|
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
|
-
-
|
|
42
|
-
-
|
|
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
|
|
46
|
-
- Do not make further repo mutations after the final
|
|
47
|
-
- Do not retry
|
|
48
|
-
- If
|
|
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
|
|
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
|
-
##
|
|
52
|
+
## Branch recovery
|
|
54
53
|
|
|
55
|
-
|
|
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.
|
|
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
|
-
**
|
|
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
|
-
|
|
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
|
-
-
|
|
18
|
-
- `re-anchor` is **not** a sync or recovery tool for diverged history. It only seeds a missing local Remix baseline (`recommendedAction: re_anchor`).
|
|
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
|
|