@comergehq/claude-plugin 0.1.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.
@@ -0,0 +1,34 @@
1
+ ---
2
+ name: init-or-remix
3
+ description: Use when deciding whether to bind the current repo to Comerge or create a new remix checkout from an existing app.
4
+ ---
5
+
6
+ # Init Or Remix
7
+
8
+ Use this skill when onboarding a repository into Comerge or starting work from an existing Comerge app lineage.
9
+
10
+ This is the entry-point choice:
11
+
12
+ - use init when the current repository should become the bound Comerge repo,
13
+ - use remix when work should start from an existing Comerge app lineage in a fresh checkout.
14
+
15
+ Decision rule:
16
+
17
+ - Use `comerge_collab_init` when the user wants to bind the current local repository to Comerge.
18
+ - Use `comerge_collab_remix` when the user wants a new local checkout forked from an existing Comerge app.
19
+
20
+ Recommended sequence:
21
+
22
+ 1. If the current repo may already be bound, use `comerge_collab_status` first.
23
+ 2. If the task is about the current local repo and it is unbound, prefer `comerge_collab_init`.
24
+ 3. If the task starts from an existing app id, prefer `comerge_collab_remix`.
25
+ 4. After init or remix, use `comerge_collab_status` in the resulting repo to inspect readiness.
26
+
27
+ Important note:
28
+
29
+ - `comerge_collab_init` is a repo-level, history-preserving bind of the current git repository.
30
+ - Do not treat init as a subdirectory import workflow.
31
+ - `comerge_collab_remix` creates a new bound checkout in a newly created directory under the provided or current working directory.
32
+ - Do not treat remix as binding the current repository in place.
33
+ - If the user wants to start from an existing Comerge app lineage instead, use `comerge_collab_remix`.
34
+ - After init or remix, the bound repo is eligible for automatic end-of-response turn recording in this plugin setup.
@@ -0,0 +1,28 @@
1
+ ---
2
+ name: review-merge-request
3
+ description: Use when reviewing, approving, rejecting, or summarizing Comerge merge requests.
4
+ ---
5
+
6
+ # Review Comerge Merge Request
7
+
8
+ Use Comerge merge request tools as the default review workflow.
9
+
10
+ Comerge merge requests are app-lineage review flows, not git branch merges. Use raw git merge workflows only when the task is clearly about a separate GitHub-only branch workflow rather than Comerge MR handling.
11
+
12
+ Recommended sequence:
13
+
14
+ 1. Use `comerge_collab_inbox` to list relevant merge requests when the target MR is not already known.
15
+ 2. Use `comerge_collab_view_merge_request` to inspect the request.
16
+ 3. Request bounded diff output first. Only request a larger diff if needed to answer the review task accurately.
17
+ 4. If approval is requested:
18
+ - use `comerge_collab_approve_remote` when local target repo sync is not needed
19
+ - use `comerge_collab_approve_and_sync_target` only when you are in the correct target repo context and the user wants local sync too
20
+ 5. Use `comerge_collab_reject` when the correct outcome is rejection.
21
+
22
+ Important rules:
23
+
24
+ - In a bound repo, use Comerge review tools as the default path for MR handling.
25
+ - Do not treat raw `git merge` as the way Comerge merge requests are approved or applied.
26
+ - If approval would mutate the local target repo, explain that before applying it.
27
+ - If the repo context is unclear, stay in remote-only review mode until the target repo is confirmed.
28
+ - Review-only turns with no repository diff should be captured by `comerge_collab_record_turn`, not by `comerge_collab_add`.
@@ -0,0 +1,53 @@
1
+ ---
2
+ name: safe-collab-workflow
3
+ description: Use when working in a repo that may be bound to Comerge, especially for collaboration, sync, merge request, or state-recovery tasks.
4
+ ---
5
+
6
+ # Safe Comerge Collaboration Workflow
7
+
8
+ In a Comerge-bound repo, treat Comerge MCP tools as the default workflow layer for collaboration state and historical reasoning.
9
+
10
+ For normal Comerge collaboration:
11
+
12
+ - use sync or reconcile tools to align local state with Comerge,
13
+ - use merge request tools for review and approval flows,
14
+ - use memory summary/search/timeline tools when historical context is needed before broader repo inspection,
15
+ - use the explicit change-step diff tool only after identifying a relevant `changeStepId`,
16
+ - let the installed hook handle automatic per-turn recording.
17
+
18
+ In this plugin setup, turn recording is automatic at the end of each completed assistant response in a bound repo:
19
+
20
+ - changed turn => `comerge_collab_add`
21
+ - no-diff turn => `comerge_collab_record_turn`
22
+
23
+ Normal rule:
24
+
25
+ - do not proactively call `comerge_collab_add` or `comerge_collab_record_turn` during ordinary work
26
+ - use those tools manually only for explicit user intent, operational recovery, backfills, or debugging
27
+
28
+ Raw git can still make sense for separate GitHub-only branch workflows or exact repository facts, but it is not the default way to manage Comerge collaboration state or answer why/history/failed-attempt questions.
29
+
30
+ Follow this order:
31
+
32
+ 1. Start with `comerge_collab_status`.
33
+ 2. Use the returned recommendation and warnings to choose the next tool.
34
+ 3. Prefer preview tools before apply tools:
35
+ - `comerge_collab_sync_preview` before `comerge_collab_sync_apply`
36
+ - `comerge_collab_reconcile_preview` before `comerge_collab_reconcile_apply`
37
+ 4. Treat reconcile as high risk and only use it when sync is unavailable and clearly required.
38
+ 5. Prefer Comerge merge request tools over raw git merge flows for collaboration review work.
39
+ 6. When you need historical context, hidden intent, failed attempts, merge/reconcile lineage, or pre-change risk context, check Comerge memory before falling back to broader repo exploration:
40
+ - `comerge_collab_memory_summary`
41
+ - `comerge_collab_memory_search`
42
+ - `comerge_collab_memory_timeline`
43
+ 7. Use raw git history only after Comerge memory has narrowed the relevant change, or when the user explicitly asks for exact commit, blame, ancestry, or patch-level detail.
44
+ 8. Only call `comerge_collab_memory_change_step_diff` after you already have a specific `changeStepId`.
45
+
46
+ Important rules:
47
+
48
+ - If the repo is unbound, use `comerge_collab_init` for the current repo or `comerge_collab_remix` for an existing Comerge app lineage.
49
+ - In a bound repo, do not use raw git `commit`, `push`, `pull`, `merge`, `rebase`, or `reset` as the default Comerge collaboration workflow.
50
+ - In a bound repo, do not start why/history/failed-attempt questions with raw git `log`, `show`, `blame`, or `diff`; start with Comerge memory reads instead.
51
+ - Do not manually fire per-turn recording calls during ordinary work. The end-of-response hook records one turn once per completed assistant response.
52
+ - Use raw git only when the task is clearly about a separate GitHub-only branch workflow rather than Comerge state.
53
+ - When viewing merge requests, request bounded diff output first and only ask for more detail if needed.
@@ -0,0 +1,37 @@
1
+ ---
2
+ name: submit-change-step
3
+ description: Use when code edits are complete in a Comerge-bound repo and the work should be recorded as a Comerge change step.
4
+ ---
5
+
6
+ # Submit Comerge Change Step
7
+
8
+ Use this skill after edits are complete and the task should be captured as a Comerge collaboration step.
9
+
10
+ In a Comerge-bound repo, `comerge_collab_add` is the normal Comerge equivalent of commit + push for completed work.
11
+ It creates the next commit on the Comerge side from the submitted diff, then syncs the local repo to that new commit when auto-sync succeeds.
12
+
13
+ In this plugin setup, the preferred default is automatic end-of-response recording:
14
+
15
+ - if the completed assistant response produced a repo diff, the hook records exactly one `comerge_collab_add`
16
+ - if the completed assistant response produced no repo diff, the hook records one `comerge_collab_record_turn` instead
17
+
18
+ Workflow:
19
+
20
+ 1. Run `comerge_collab_status` first to confirm the repo is bound and inspect current warnings.
21
+ 2. If the repo is not bound, stop and ask whether to initialize with `comerge_collab_init`.
22
+ 3. Do not proactively call `comerge_collab_add` during ordinary work.
23
+ 4. Only use `comerge_collab_add` when the user explicitly asks for a manual recording step, or when doing operational recovery, backfills, or debugging.
24
+
25
+ Important behavior:
26
+
27
+ - `comerge_collab_add` defaults to auto-sync behavior in this Comerge setup.
28
+ - During ordinary work, the hook is the normal automatic path for changed-turn recording.
29
+ - In the automatic hook path, the `comerge_collab_add` prompt is the exact user prompt for that completed turn.
30
+ - The automatic hook may also attach the final assistant response so changed turns and no-diff turns share the same prompt/response chronology.
31
+ - Do not treat raw `git commit` as the primary collaboration-recording step in a bound repo.
32
+ - When the diff comes from the live worktree, Comerge may discard tracked changes and captured untracked paths locally as part of auto-sync.
33
+ - The resulting git commit is created on the Comerge side first and appears in the local repo after sync or auto-sync.
34
+ - Surface these side effects clearly to the user when they matter.
35
+ - If the user wants to understand current repo state before recording, re-run `comerge_collab_status`.
36
+
37
+ Use external diff input only when the task explicitly requires it. Otherwise prefer the current worktree.
@@ -0,0 +1,31 @@
1
+ ---
2
+ name: sync-and-reconcile
3
+ description: Use when a Comerge-bound repo needs to be aligned with remote app state and you must choose between sync and reconcile safely.
4
+ ---
5
+
6
+ # Sync And Reconcile
7
+
8
+ Use this skill when the user asks to sync, update, or recover alignment between a local repo and its Comerge app state.
9
+
10
+ Mental model:
11
+
12
+ - `comerge_collab_sync_*` is for pulling Comerge-known app state into the local repo when fast-forward sync is possible.
13
+ - `comerge_collab_reconcile_*` is for cases where local history exists that Comerge cannot fast-forward from.
14
+ - `comerge_collab_sync_upstream` is for bringing new upstream app changes into a remix.
15
+ - `comerge_collab_record_turn` is not a sync tool. It records a no-diff completed turn and does not create a commit.
16
+
17
+ Workflow:
18
+
19
+ 1. Start with `comerge_collab_status`.
20
+ 2. If sync looks available, use `comerge_collab_sync_preview`.
21
+ 3. Only use `comerge_collab_sync_apply` after preview indicates the fast-forward path is appropriate.
22
+ 4. If sync is not available because history diverged, use `comerge_collab_reconcile_preview`.
23
+ 5. Only use `comerge_collab_reconcile_apply` when reconcile is clearly required and the user understands the risk.
24
+
25
+ Important rules:
26
+
27
+ - Prefer sync over reconcile whenever sync is available.
28
+ - Reconcile is a last-resort operation because it rewrites local history and creates backup branches.
29
+ - Explain local mutation risk before any apply step.
30
+ - For remix repos, use `comerge_collab_sync_upstream` when the task is specifically about bringing upstream changes into the remix rather than aligning the local repo with its current Comerge app head.
31
+ - Do not treat no-diff turn recording as a substitute for sync, reconcile, or upstream sync.