@codyswann/lisa 2.289.0 → 2.289.2

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.
Files changed (88) hide show
  1. package/dist/core/lisa.d.ts +15 -2
  2. package/dist/core/lisa.d.ts.map +1 -1
  3. package/dist/core/lisa.js +41 -5
  4. package/dist/core/lisa.js.map +1 -1
  5. package/dist/core/upstream-evidence-manifest.d.ts.map +1 -1
  6. package/dist/core/upstream-evidence-manifest.js +7 -5
  7. package/dist/core/upstream-evidence-manifest.js.map +1 -1
  8. package/dist/utils/index.d.ts +1 -0
  9. package/dist/utils/index.d.ts.map +1 -1
  10. package/dist/utils/index.js +1 -0
  11. package/dist/utils/index.js.map +1 -1
  12. package/dist/utils/linked-worktree.d.ts +18 -0
  13. package/dist/utils/linked-worktree.d.ts.map +1 -0
  14. package/dist/utils/linked-worktree.js +42 -0
  15. package/dist/utils/linked-worktree.js.map +1 -0
  16. package/package.json +1 -1
  17. package/plugins/lisa/.claude-plugin/plugin.json +1 -1
  18. package/plugins/lisa/.codex-plugin/plugin.json +1 -1
  19. package/plugins/lisa/.codex-plugin/skills/lisa-implement/SKILL.md +2 -0
  20. package/plugins/lisa/.codex-plugin/skills/lisa-jira-sync/SKILL.md +4 -2
  21. package/plugins/lisa/agents/jira-agent.md +1 -1
  22. package/plugins/lisa/rules/eager/config-resolution.md +10 -0
  23. package/plugins/lisa/skills/lisa-implement/SKILL.md +2 -0
  24. package/plugins/lisa/skills/lisa-jira-sync/SKILL.md +4 -2
  25. package/plugins/lisa-agy/agents/jira-agent.md +1 -1
  26. package/plugins/lisa-agy/plugin.json +1 -1
  27. package/plugins/lisa-agy/skills/lisa-implement/SKILL.md +2 -0
  28. package/plugins/lisa-agy/skills/lisa-jira-sync/SKILL.md +4 -2
  29. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  30. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  31. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  32. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  33. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  34. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  35. package/plugins/lisa-copilot/agents/jira-agent.agent.md +1 -1
  36. package/plugins/lisa-copilot/rules/eager/config-resolution.md +10 -0
  37. package/plugins/lisa-copilot/skills/lisa-implement/SKILL.md +2 -0
  38. package/plugins/lisa-copilot/skills/lisa-jira-sync/SKILL.md +4 -2
  39. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  40. package/plugins/lisa-cursor/agents/jira-agent.md +1 -1
  41. package/plugins/lisa-cursor/rules/config-resolution.mdc +10 -0
  42. package/plugins/lisa-cursor/skills/lisa-implement/SKILL.md +2 -0
  43. package/plugins/lisa-cursor/skills/lisa-jira-sync/SKILL.md +4 -2
  44. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  45. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  46. package/plugins/lisa-expo-agy/plugin.json +1 -1
  47. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  48. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  49. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  50. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  51. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  52. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  53. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  54. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  55. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  56. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  57. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  58. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  59. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  60. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  61. package/plugins/lisa-openclaw-agy/plugin.json +1 -1
  62. package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
  63. package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
  64. package/plugins/lisa-phaser/.claude-plugin/plugin.json +1 -1
  65. package/plugins/lisa-phaser/.codex-plugin/plugin.json +1 -1
  66. package/plugins/lisa-phaser-agy/plugin.json +1 -1
  67. package/plugins/lisa-phaser-copilot/.claude-plugin/plugin.json +1 -1
  68. package/plugins/lisa-phaser-cursor/.claude-plugin/plugin.json +1 -1
  69. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  70. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  71. package/plugins/lisa-rails-agy/plugin.json +1 -1
  72. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  73. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  74. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  75. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  76. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  77. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  78. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  79. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  80. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  81. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  82. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  83. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  84. package/plugins/src/base/agents/jira-agent.md +1 -1
  85. package/plugins/src/base/rules/eager/config-resolution.md +10 -0
  86. package/plugins/src/base/skills/lisa-implement/SKILL.md +2 -0
  87. package/plugins/src/base/skills/lisa-jira-sync/SKILL.md +4 -2
  88. package/scripts/install-claude-plugins.sh +61 -2
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-openclaw",
3
- "version": "2.289.0",
3
+ "version": "2.289.2",
4
4
  "description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-openclaw",
3
- "version": "2.289.0",
3
+ "version": "2.289.2",
4
4
  "description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-openclaw",
3
- "version": "2.289.0",
3
+ "version": "2.289.2",
4
4
  "description": "Connect staff roles to Telegram or Slack via OpenClaw — facilitator/specialist hub-and-spoke routing and repo-coding topics, for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-phaser",
3
- "version": "2.289.0",
3
+ "version": "2.289.2",
4
4
  "description": "Phaser 4 game-development rules for TypeScript projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-phaser",
3
- "version": "2.289.0",
3
+ "version": "2.289.2",
4
4
  "description": "Phaser 4 game-development rules for TypeScript projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-phaser",
3
- "version": "2.289.0",
3
+ "version": "2.289.2",
4
4
  "description": "Phaser 4 game-development rules for TypeScript projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-phaser",
3
- "version": "2.289.0",
3
+ "version": "2.289.2",
4
4
  "description": "Phaser 4 game-development rules for TypeScript projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-phaser",
3
- "version": "2.289.0",
3
+ "version": "2.289.2",
4
4
  "description": "Phaser 4 game-development rules for TypeScript projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "2.289.0",
3
+ "version": "2.289.2",
4
4
  "description": "Ruby on Rails-specific hooks — RuboCop linting/formatting and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "2.289.0",
3
+ "version": "2.289.2",
4
4
  "description": "Ruby on Rails-specific skills and hooks for RuboCop and ast-grep scanning on edit.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "2.289.0",
3
+ "version": "2.289.2",
4
4
  "description": "Ruby on Rails-specific hooks — RuboCop linting/formatting and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "2.289.0",
3
+ "version": "2.289.2",
4
4
  "description": "Ruby on Rails-specific hooks — RuboCop linting/formatting and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-rails",
3
- "version": "2.289.0",
3
+ "version": "2.289.2",
4
4
  "description": "Ruby on Rails-specific hooks — RuboCop linting/formatting and ast-grep scanning on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "2.289.0",
3
+ "version": "2.289.2",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "2.289.0",
3
+ "version": "2.289.2",
4
4
  "description": "TypeScript-specific hooks for formatting, linting, and ast-grep scanning on edit.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "2.289.0",
3
+ "version": "2.289.2",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "2.289.0",
3
+ "version": "2.289.2",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-typescript",
3
- "version": "2.289.0",
3
+ "version": "2.289.2",
4
4
  "description": "TypeScript-specific hooks — Prettier formatting, ESLint linting, ast-grep scanning, and error-suppression blocking on edit",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "2.289.0",
3
+ "version": "2.289.2",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "2.289.0",
3
+ "version": "2.289.2",
4
4
  "description": "Distributable LLM Wiki kernel — ingest, query, lint, and maintain a git-native markdown knowledge base across Claude and Codex.",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "2.289.0",
3
+ "version": "2.289.2",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "2.289.0",
3
+ "version": "2.289.2",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa-wiki",
3
- "version": "2.289.0",
3
+ "version": "2.289.2",
4
4
  "description": "LLM Wiki — a distributable, git-native markdown knowledge base for Claude Code and Codex",
5
5
  "author": {
6
6
  "name": "Cody Swann"
@@ -127,7 +127,7 @@ Note: `done` may be a string or an env-keyed map (`{ dev, staging, production }`
127
127
  ## Rules
128
128
 
129
129
  - Never auto-transition ticket status, with one explicit exception: when `jira-verify` returns `FAIL` for the pre-flight gate (Step 2), first run the `pre-flight-autofill` draft-then-block procedure (draft the authorable missing sections into the ticket as labeled assumptions), then transition to the configured `blocked` status, add the configured `human_needed` marker label (`jira.labels.human_needed`, default `Human Needed`), and reassign to the Reporter with a confirmation comment. Every other status change remains a suggestion the human confirms.
130
- - Any transition is config-bound: never invent transitions; a transition may target only a status named in `config.jira.workflow`. Don't guess from the live workflow. The evidence-time review hop (Step 7) follows this rule too — it is config-bound, optional, and skipped when `jira.workflow.review` is absent (the ticket stays in `claimed`).
130
+ - Any transition is config-bound per the **Tracker status vocabulary** section of the `config-resolution` rule: never invent transitions; a transition may target only a status named in `config.jira.workflow`. Don't guess from the live workflow. The evidence-time review hop (Step 7) follows this rule too — it is config-bound, optional, and skipped when `jira.workflow.review` is absent (the ticket stays in `claimed`).
131
131
  - Always read the full ticket graph via `jira-read-ticket` before determining intent — don't rely on ticket type alone
132
132
  - Never create or materially edit a ticket by calling MCP write tools directly — always delegate to `jira-write-ticket` so relationships, Gherkin criteria, and metadata gates are enforced
133
133
  - If sign-in credentials are in the ticket, extract and pass them to the flow. If the ticket touches an authenticated surface and credentials are missing, that is a Step 2 failure — block and reassign rather than guessing.
@@ -21,6 +21,16 @@ This applies before declaring connection state, before running any `acli jira *`
21
21
 
22
22
  Project tracker (`jira` / `github` / `linear`) is read from `.lisa.config.json` `tracker`. Vendor-neutral skills MUST dispatch through the configured tracker, never infer it from arguments. Missing `tracker` → stop and instruct the user to run the matching `/lisa:setup:*` skill.
23
23
 
24
+ ## Tracker status vocabulary
25
+
26
+ **A status transition may target only a status named in the project's configured workflow map** (`jira.workflow.*` for JIRA; the equivalent label/state map for GitHub and Linear). The configured map is the COMPLETE authorized vocabulary — not a starting point.
27
+
28
+ - **Never adopt statuses discovered from the tracker's live workflow metadata** — transition lists (`getTransitionsForJiraIssue` targets), board columns, status descriptions, or statuses seen on other tickets. A tracker workflow usually contains more statuses than the config names; those extra statuses are not lisa's to use. The live workflow is consulted only to find the transition *id* that reaches a config-named status.
29
+ - **A lifecycle stage with no configured status gets no transition.** If the flow reaches a stage the map does not name (e.g. "PR open awaiting review" when `jira.workflow.review` is unset, or a QA-ready stage with no `qa` mapping), leave the status where it is and record the stage in a comment. Do not pick the nearest-sounding tracker status.
30
+ - **This binds every actor that writes to the tracker** — the lead as much as any subagent. In runtimes where interactively-authenticated MCPs are lead-only, the lead performs the tracker writes for the whole flow; loading an implement/sync skill without the agent definition does not relax this rule.
31
+
32
+ This is the shared slug for the config-bound-transitions policy (the `leaf-only-lifecycle` precedent: one slug, never divergent per-surface prose). Skills and agent definitions cite it rather than restating it.
33
+
24
34
  ## Repo identity
25
35
 
26
36
  `repo:<name>` is the canonical label for which repo a work item belongs to. Resolve current-repo identity in this priority order: `.lisa.config.local.json` `repo` → `.lisa.config.json` `repo` → `.lisa.config.json` `github.repo` → `basename -s .git "$(git remote get-url origin)"`. If none resolve, stop with a clear error.
@@ -314,3 +314,5 @@ Before shutting down the team, execute the Verify flow:
314
314
  13. `ops-specialist`: post-deploy health check, monitor for errors in first minutes
315
315
  14. If remote verification fails, create a task for the agent team to find out why it failed, fix it and return to step 5. **Bound this loop**: after a small number of full fix→deploy→reverify cycles without reaching a passing remote verdict (treat ~3 as the ceiling unless the work item states otherwise), stop retrying — file a build-ready fix ticket, write the verdict with `status: "blocked"` and the diagnosis, and move the work item to blocked rather than looping indefinitely. The completion gate releases on a `blocked` verdict, so the flow ends with a recorded outcome instead of a silent spin or a self-declared success.
316
316
  15. After true terminal completion — required merge/deploy/verification passed, usage/evidence and two-way PR linkage are recorded, and the work item is terminal — run `node scripts/lisa-work-item.mjs clear` and verify the worktree has no current binding. Do not clear on an interruption or blocked outcome; preserving the binding is what keeps resumed work attributable.
317
+
318
+ **Ticket status transitions throughout this flow are config-bound** per the **Tracker status vocabulary** section of the `config-resolution` rule: whoever performs the tracker write — the lead included, in runtimes where the tracker MCP is lead-only — may only target statuses named in the configured workflow map (`claimed`, `blocked`, env-keyed `done`, and `review`/`qa` when configured). Never adopt a status discovered from the tracker's live workflow; a lifecycle stage with no configured status gets a comment, not a transition.
@@ -66,9 +66,11 @@ Based on the milestone, suggest (but don't automatically perform) a status trans
66
66
 
67
67
  | Milestone | Suggested Status |
68
68
  |-----------|-----------------|
69
- | Plan created | "In Progress" |
69
+ | Plan created | configured `jira.workflow.claimed` status |
70
70
  | PR ready | configured `jira.workflow.review` status, or no transition when unconfigured |
71
- | PR merged | "Done" |
71
+ | PR merged | configured `jira.workflow.done` status for the PR's target environment (env-keyed `done` resolved via `deploy.branches`), or no transition when unconfigured |
72
+
73
+ Every suggested or performed transition is bound by the **Tracker status vocabulary** section of the `config-resolution` rule: only statuses named in the configured workflow map, never statuses discovered from the tracker's live workflow (transition lists, board columns, other tickets) — and this binds the lead performing tracker writes exactly as it binds a subagent. A milestone with no configured status gets a comment, not a transition.
72
74
 
73
75
  ### Step 5: Parent Status Rollup (`--rollup`)
74
76
 
@@ -300,11 +300,66 @@ if ! command -v claude &>/dev/null; then exit 0; fi
300
300
  # (a removed plugin comes back on the next install) survives at the cost of a
301
301
  # single `claude plugin list` call.
302
302
  LISA_VERSION="$(node -e "console.log(require('$LISA_DIR/package.json').version || '')" 2>/dev/null || true)"
303
+
304
+ # Linked worktrees inherit the primary checkout's sync state. The marker is
305
+ # gitignored on purpose (it records THIS machine's ~/.claude plugin state, so
306
+ # it must not travel to other machines via git) — but that means every fresh
307
+ # agent worktree (.claude/worktrees/<ticket>, ~/.codex/worktrees/<ticket>)
308
+ # starts marker-less and paid the full sync: marketplace pulls plus a dozen
309
+ # Claude CLI spawns per ticket. Derive the primary checkout from
310
+ # --git-common-dir (the same defended pattern install-pkgs.sh uses to link
311
+ # node_modules, add08b409) and read its marker instead. Worktrees never WRITE
312
+ # the primary marker: a full sync run from a worktree reinstalls plugins for
313
+ # the worktree's own projectPath only, so recording it as the primary's synced
314
+ # state would let the primary skip the forced reinstall it still needs after a
315
+ # version bump.
316
+ IS_LINKED_WORKTREE=false
317
+ PRIMARY_ROOT=""
318
+ GIT_COMMON_DIR="$(git -C "$PROJECT_ROOT" rev-parse --path-format=absolute --git-common-dir 2>/dev/null || true)"
319
+ if [ -n "$GIT_COMMON_DIR" ]; then
320
+ PRIMARY_ROOT="$(dirname "$GIT_COMMON_DIR")"
321
+ if [ "$PRIMARY_ROOT" != "$PROJECT_ROOT" ] && [ -d "$PRIMARY_ROOT/.claude" ]; then
322
+ IS_LINKED_WORKTREE=true
323
+ else
324
+ PRIMARY_ROOT=""
325
+ fi
326
+ fi
327
+
303
328
  PLUGIN_SYNC_MARKER="$PROJECT_ROOT/.claude/.lisa-plugins-synced"
329
+
330
+ marker_current() {
331
+ [ -n "$LISA_VERSION" ] && [ -f "$1" ] \
332
+ && [ "$(cat "$1" 2>/dev/null)" = "$LISA_VERSION" ]
333
+ }
334
+
304
335
  FORCE_PLUGIN_SYNC=true
305
- if [ -n "$LISA_VERSION" ] && [ -f "$PLUGIN_SYNC_MARKER" ] \
306
- && [ "$(cat "$PLUGIN_SYNC_MARKER" 2>/dev/null)" = "$LISA_VERSION" ]; then
336
+ if marker_current "$PLUGIN_SYNC_MARKER"; then
307
337
  FORCE_PLUGIN_SYNC=false
338
+ elif [ "$IS_LINKED_WORKTREE" = "true" ] \
339
+ && marker_current "$PRIMARY_ROOT/.claude/.lisa-plugins-synced"; then
340
+ FORCE_PLUGIN_SYNC=false
341
+ fi
342
+
343
+ # In a linked worktree whose sync state is already settled (its own marker or
344
+ # the primary checkout's marker is current for this Lisa version) there is
345
+ # nothing left for this script to do: the marketplace cache is machine-global
346
+ # (already refreshed when the primary synced), the heal migrations are gated
347
+ # behind the same synced state, and per-worktree plugin registration is
348
+ # handled by the coding agent's own startup — Claude Code auto-installs the
349
+ # committed .claude/settings.json enabledPlugins for a new projectPath, and
350
+ # Codex consumes the project-local .codex-plugin pointer, not Claude
351
+ # project-scope registrations. Skipping here removes every Claude CLI spawn
352
+ # from the fresh-worktree postinstall path. The #320 defense (refresh
353
+ # marketplace whenever installs happened) is preserved: this path performs no
354
+ # installs. Self-heal for the primary checkout is untouched. The worktree's
355
+ # own marker is recorded so repeat installs (and health's root-confined
356
+ # marker probe) see the settled state without reaching outside the project.
357
+ if [ "$IS_LINKED_WORKTREE" = "true" ] && [ "$FORCE_PLUGIN_SYNC" != "true" ]; then
358
+ mkdir -p "$PROJECT_ROOT/.claude" 2>/dev/null \
359
+ && printf '%s' "$LISA_VERSION" > "$PLUGIN_SYNC_MARKER" 2>/dev/null \
360
+ || true
361
+ echo "Lisa plugins already in sync for ${LISA_VERSION} (primary checkout: ${PRIMARY_ROOT}); deferring worktree plugin registration to the coding agent's startup."
362
+ exit 0
308
363
  fi
309
364
 
310
365
  INSTALLED_PLUGINS_FOR_PROJECT=""
@@ -489,6 +544,10 @@ fi
489
544
  # Record the fully-synced Lisa version so same-version installs skip the
490
545
  # marketplace pulls and forced reinstalls above. Written last so any earlier
491
546
  # failure exits (set -e) without recording a sync that did not finish.
547
+ # Always the project's OWN marker: a full sync run from a linked worktree only
548
+ # reinstalled plugins for the worktree's projectPath, so recording it against
549
+ # the primary checkout would let the primary skip the forced reinstall it
550
+ # still needs after a version bump.
492
551
  if [ -n "$LISA_VERSION" ]; then
493
552
  mkdir -p "$PROJECT_ROOT/.claude" 2>/dev/null \
494
553
  && printf '%s' "$LISA_VERSION" > "$PLUGIN_SYNC_MARKER" 2>/dev/null \