@codyswann/lisa 2.153.0 → 2.154.0

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 (77) hide show
  1. package/dist/cli/apply.d.ts.map +1 -1
  2. package/dist/cli/apply.js +7 -0
  3. package/dist/cli/apply.js.map +1 -1
  4. package/dist/cli/cross-pollinate-cmd.d.ts +12 -0
  5. package/dist/cli/cross-pollinate-cmd.d.ts.map +1 -0
  6. package/dist/cli/cross-pollinate-cmd.js +48 -0
  7. package/dist/cli/cross-pollinate-cmd.js.map +1 -0
  8. package/dist/cli/cross-pollinate-nudge.d.ts +10 -0
  9. package/dist/cli/cross-pollinate-nudge.d.ts.map +1 -0
  10. package/dist/cli/cross-pollinate-nudge.js +55 -0
  11. package/dist/cli/cross-pollinate-nudge.js.map +1 -0
  12. package/dist/cli/index.d.ts +3 -0
  13. package/dist/cli/index.d.ts.map +1 -1
  14. package/dist/cli/index.js +10 -0
  15. package/dist/cli/index.js.map +1 -1
  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/commands/cross-pollinate.md +15 -0
  20. package/plugins/lisa/scripts/cross-pollinate.mjs +727 -0
  21. package/plugins/lisa/skills/cross-pollinate/SKILL.md +175 -0
  22. package/plugins/lisa/skills/cross-pollinate/agents/openai.yaml +4 -0
  23. package/plugins/lisa-agy/commands/cross-pollinate.md +15 -0
  24. package/plugins/lisa-agy/plugin.json +1 -1
  25. package/plugins/lisa-agy/scripts/cross-pollinate.mjs +727 -0
  26. package/plugins/lisa-agy/skills/cross-pollinate/SKILL.md +175 -0
  27. package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
  28. package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
  29. package/plugins/lisa-cdk-agy/plugin.json +1 -1
  30. package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
  31. package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
  32. package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
  33. package/plugins/lisa-copilot/commands/cross-pollinate.md +15 -0
  34. package/plugins/lisa-copilot/scripts/cross-pollinate.mjs +727 -0
  35. package/plugins/lisa-copilot/skills/cross-pollinate/SKILL.md +175 -0
  36. package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
  37. package/plugins/lisa-cursor/commands/cross-pollinate.md +15 -0
  38. package/plugins/lisa-cursor/scripts/cross-pollinate.mjs +727 -0
  39. package/plugins/lisa-cursor/skills/cross-pollinate/SKILL.md +175 -0
  40. package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
  41. package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
  42. package/plugins/lisa-expo-agy/plugin.json +1 -1
  43. package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
  44. package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
  45. package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
  46. package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
  47. package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
  48. package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
  49. package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
  50. package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
  51. package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
  52. package/plugins/lisa-nestjs-agy/plugin.json +1 -1
  53. package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
  54. package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
  55. package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
  56. package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
  57. package/plugins/lisa-openclaw-agy/plugin.json +1 -1
  58. package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
  59. package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
  60. package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
  61. package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
  62. package/plugins/lisa-rails-agy/plugin.json +1 -1
  63. package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
  64. package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
  65. package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
  66. package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
  67. package/plugins/lisa-typescript-agy/plugin.json +1 -1
  68. package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
  69. package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
  70. package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
  71. package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
  72. package/plugins/lisa-wiki-agy/plugin.json +1 -1
  73. package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
  74. package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
  75. package/plugins/src/base/commands/cross-pollinate.md +15 -0
  76. package/plugins/src/base/scripts/cross-pollinate.mjs +727 -0
  77. package/plugins/src/base/skills/cross-pollinate/SKILL.md +175 -0
@@ -0,0 +1,175 @@
1
+ ---
2
+ name: cross-pollinate
3
+ description: "Detect a host project's locally-authored coding-agent definitions (skills, subagents, rules, commands, hooks, MCP) and make each available in the formats of the OTHER agents the project supports, as declared in .lisa.config.json. Any-to-any, provenance-tracked, idempotent, never clobbers hand-edited output."
4
+ allowed-tools: ["Bash", "Read", "Write", "Edit", "Glob", "Grep"]
5
+ argument-hint: "[path] [--dry-run] [--write]"
6
+ ---
7
+
8
+ # Cross-Pollinate: $ARGUMENTS
9
+
10
+ A host project that installs Lisa may hand-author a definition for **one** coding
11
+ agent — a `.claude/skills/foo`, a `.cursor/rules/bar.mdc`, an MCP server only
12
+ Claude sees. `/lisa:cross-pollinate` detects those locally-authored definitions
13
+ and regenerates each in the formats of the **other** agents the project supports,
14
+ so the whole fleet stays in parity with what a developer wrote for any single one.
15
+
16
+ ## The model
17
+
18
+ ```
19
+ any agent's format -> Claude-format IR -> every OTHER configured agent
20
+ ```
21
+
22
+ Claude format is the canonical intermediate representation (IR) because every
23
+ Lisa generator already sources from it. So translation is always: **normalize
24
+ the detected definition up to Claude-format IR, then fan that IR out** to each
25
+ target agent using the documented mappings below. Never translate format A → B
26
+ directly — that multiplies error and loses fidelity on every hop.
27
+
28
+ The agents a project supports come from `.lisa.config.json` `harness`
29
+ (`claude` | `codex` | `cursor` | `agy` | `copilot` | `opencode` | `both` | `fleet`;
30
+ `all` is an alias for `fleet`). Only emit to agents that harness includes.
31
+
32
+ ## Provenance is authoritative — the lockfile, not file paths
33
+
34
+ `.lisa/cross-pollination.lock.json` (committed) is the source of truth for what
35
+ this skill generated. Location heuristics **cannot** work: a generated Cursor
36
+ rule sits in the same `.cursor/rules/` directory as a hand-authored one. The
37
+ lockfile is the only reliable way to enforce the four invariants:
38
+
39
+ 1. **No loops** — a path recorded as a `target` is NEVER treated as a source on
40
+ the next run. Without this, today's output becomes tomorrow's input and
41
+ translations ping-pong forever.
42
+ 2. **Garbage collection** — when a source is deleted/renamed, its now-orphaned
43
+ targets are removed.
44
+ 3. **Never clobber edits (Chesterton's fence)** — if a target's on-disk hash
45
+ differs from the recorded `generatedHash`, a human edited it. Stop and report;
46
+ do not overwrite. They may have intentionally diverged, or want to adopt the
47
+ edit as a new source.
48
+ 4. **Idempotent** — unchanged source + intact targets => no-op. (This is why it
49
+ is safe to also run during `lisa apply`.)
50
+
51
+ Lockfile shape:
52
+
53
+ ```json
54
+ {
55
+ "version": 1,
56
+ "entries": {
57
+ "skill:security-review": {
58
+ "source": { "agent": "claude", "path": ".claude/skills/security-review", "hash": "…" },
59
+ "targets": [ { "agent": "codex", "path": ".claude/skills/security-review/agents/openai.yaml", "generatedHash": "…" } ]
60
+ }
61
+ }
62
+ }
63
+ ```
64
+
65
+ The `logicalId` is `<kind>:<name>` — stable across formats. It links a source to
66
+ its targets and detects **collisions**: the same `logicalId` authored
67
+ independently in two agents (neither generated). On a collision, NEVER
68
+ auto-translate over either side — report it and let the human pick the source of
69
+ truth.
70
+
71
+ ## How to run
72
+
73
+ The deterministic core (scan, provenance, loop/GC/drift/conflict detection, and
74
+ the skill + MCP emitters) is a bundled engine. **Always run it first** — it does
75
+ the safe, mechanical work and tells you exactly what is left for you to translate
76
+ by hand.
77
+
78
+ ```bash
79
+ # dry-run (default): report only, writes nothing
80
+ node "${CLAUDE_PLUGIN_ROOT}/scripts/cross-pollinate.mjs" "$PROJECT_ROOT" --json
81
+ # apply the deterministic emits + update the lockfile
82
+ node "${CLAUDE_PLUGIN_ROOT}/scripts/cross-pollinate.mjs" "$PROJECT_ROOT" --write
83
+ ```
84
+
85
+ In the Lisa source repo itself the path is
86
+ `node plugins/lisa/scripts/cross-pollinate.mjs` (built) or
87
+ `node plugins/src/base/scripts/cross-pollinate.mjs` (source).
88
+
89
+ The JSON report has four lists you act on:
90
+
91
+ - `emits` — already handled by `--write` (skills, MCP). Verify, don't redo.
92
+ - `conflicts` — STOP. Report each to the user; do not translate.
93
+ - `orphans` — GC'd by `--write`. Confirm the removals look right.
94
+ - `pending` — **your job.** Definitions whose target format the engine does not
95
+ emit deterministically. Translate each per the mappings below, then record
96
+ provenance (see "Recording provenance").
97
+
98
+ ## Per-agent format mappings (for `pending` translation)
99
+
100
+ Normalize the source to Claude-format IR first, then emit per target:
101
+
102
+ ### Rules
103
+ - **Claude ↔ Cursor**: handled deterministically by the engine. Claude reads
104
+ `.claude/rules/<name>.md`; Cursor reads `.cursor/rules/<name>.mdc` with YAML
105
+ frontmatter (`description` from the first H1, `alwaysApply: true`) and intra-rule
106
+ link extensions rewritten. You do not translate these — verify the engine's
107
+ emits.
108
+ - **Codex / OpenCode / agy** (`pending`): project rules are delivered via
109
+ `AGENTS.md`, not a per-rule file. MERGE the rule content into `AGENTS.md` under a
110
+ stable marked section rather than writing a separate file (so re-runs replace,
111
+ not append). agy never gets a duplicate rule file (rules-once).
112
+ - **Copilot** (`pending`): `.github/copilot-instructions.md` (inline). Merge into a
113
+ marked section, don't scatter.
114
+
115
+ ### Subagents
116
+ - **Claude / agy / Cursor / OpenCode**: `agents/<name>.md` (or `.claude/agents/`).
117
+ - **Copilot**: `agents/<name>.agent.md` (note the `.agent.md` suffix).
118
+ - **Codex**: does not consume agent files. Report as **dropped — unsupported**,
119
+ do not invent a target.
120
+
121
+ ### Commands
122
+ - **Claude / Cursor / Copilot**: markdown command files (`.claude/commands/…`).
123
+ - **Codex / agy**: auto-derive commands from skills; no separate command file.
124
+ Report as **dropped — derived-from-skill**.
125
+
126
+ ### Hooks (lossy — drop-and-report, never fake support)
127
+ - Event-name casing differs per agent (`PreToolUse`→`preToolUse`/`beforeSubmitPrompt`,
128
+ `UserPromptSubmit`→`userPromptSubmitted`, `Stop`→`agentStop`/`stop`, …).
129
+ - **agy** lacks `SessionStart`/`SubagentStart` — only `PreToolUse` (e.g.
130
+ block-no-verify) is portable. Everything else: dropped — unsupported.
131
+ - **Codex** plugin hooks do not fire in `codex exec` — install into
132
+ `~/.codex/hooks.json`, not a bundled file.
133
+ - **Copilot** rejects the entire hooks config if a `SubagentStart`/empty-matcher
134
+ entry is present — drop that event wholesale.
135
+ - For every hook you cannot faithfully translate to a target, REPORT it with the
136
+ reason. Do not silently omit (no silent caps).
137
+
138
+ ### MCP (handled by the engine for Claude↔Cursor; report others)
139
+ - **Claude**: `.mcp.json`. **Cursor**: `.cursor/mcp.json` (same JSON shape).
140
+ - **Copilot**: inline `mcpServers` object in the plugin manifest (bundled
141
+ `.mcp.json` is ignored). **Codex**: TOML / `.codex-plugin` pointer.
142
+ **agy/OpenCode**: user-global installer / `.opencode`. The engine reports these
143
+ as pending; translate per the target's documented shape or report dropped.
144
+
145
+ ## Recording provenance for hand-translated `pending` items
146
+
147
+ After you write a target by hand, it MUST be recorded in
148
+ `.lisa/cross-pollination.lock.json` or the next run will treat it as a source
149
+ (loop) or fail to GC it. Re-run the engine after staging your translated files —
150
+ on its next pass it adopts and hashes any target already referenced — OR add the
151
+ entry yourself following the lockfile shape above (compute `generatedHash` as the
152
+ sha256 of the written file/dir). Prefer the engine; only hand-edit the lock if
153
+ the engine cannot infer the mapping.
154
+
155
+ ## Output
156
+
157
+ Report, concisely:
158
+ - harness + resolved target agents
159
+ - counts: detected sources, written, skipped-drift, GC'd
160
+ - every conflict (with the agents involved)
161
+ - every pending item you translated, and every hook/agent/command you **dropped**
162
+ with its reason
163
+ - confirm `.lisa/cross-pollination.lock.json` was updated and the working tree
164
+ otherwise contains only intended changes
165
+
166
+ ## Rules
167
+
168
+ - Treat the lockfile as authoritative; never infer "mine vs theirs" from paths.
169
+ - Never overwrite a drifted (hand-edited) target — report it.
170
+ - Never auto-resolve a collision — report it.
171
+ - Only emit to agents the project's `harness` includes.
172
+ - Drop-and-report any translation a target genuinely cannot support; never fake
173
+ a location you are unsure of.
174
+ - This skill is additive — it does not delete a human's source definitions, only
175
+ its own orphaned generated targets.
@@ -0,0 +1,4 @@
1
+ display_name: "Cross Pollinate"
2
+ short_description: "Detect a host project's locally-authored coding-agent definitions (skills, subagents, rules, commands, hooks, MCP) and make each available…"
3
+ default_prompt:
4
+ - "Use $cross-pollinate: Detect a host project's locally-authored coding-agent definitions (skills, subagents, rules, commands, hooks, MCP) and make each available…."
@@ -0,0 +1,15 @@
1
+ ---
2
+ description: "Detect locally-authored agent definitions and regenerate them in the formats of the other coding agents this project supports (per .lisa.config.json)."
3
+ allowed-tools: ["Skill"]
4
+ argument-hint: "[path] [--dry-run] [--write]"
5
+ ---
6
+
7
+ Use the /lisa:cross-pollinate skill to detect this project's locally-authored
8
+ coding-agent definitions (skills, subagents, rules, commands, hooks, MCP) and
9
+ make each available in the formats of the other agents the project's
10
+ `.lisa.config.json` harness includes. $ARGUMENTS
11
+
12
+ Provenance is tracked in `.lisa/cross-pollination.lock.json`: the run is
13
+ idempotent, garbage-collects orphaned translations, never overwrites a
14
+ hand-edited target, and reports any conflict or unsupported translation rather
15
+ than guessing.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lisa",
3
- "version": "2.153.0",
3
+ "version": "2.154.0",
4
4
  "description": "Universal governance — agents, skills, commands, hooks, and rules for all projects",
5
5
  "author": {
6
6
  "name": "Cody Swann"