@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.
- package/dist/cli/apply.d.ts.map +1 -1
- package/dist/cli/apply.js +7 -0
- package/dist/cli/apply.js.map +1 -1
- package/dist/cli/cross-pollinate-cmd.d.ts +12 -0
- package/dist/cli/cross-pollinate-cmd.d.ts.map +1 -0
- package/dist/cli/cross-pollinate-cmd.js +48 -0
- package/dist/cli/cross-pollinate-cmd.js.map +1 -0
- package/dist/cli/cross-pollinate-nudge.d.ts +10 -0
- package/dist/cli/cross-pollinate-nudge.d.ts.map +1 -0
- package/dist/cli/cross-pollinate-nudge.js +55 -0
- package/dist/cli/cross-pollinate-nudge.js.map +1 -0
- package/dist/cli/index.d.ts +3 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +10 -0
- package/dist/cli/index.js.map +1 -1
- package/package.json +1 -1
- package/plugins/lisa/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa/commands/cross-pollinate.md +15 -0
- package/plugins/lisa/scripts/cross-pollinate.mjs +727 -0
- package/plugins/lisa/skills/cross-pollinate/SKILL.md +175 -0
- package/plugins/lisa/skills/cross-pollinate/agents/openai.yaml +4 -0
- package/plugins/lisa-agy/commands/cross-pollinate.md +15 -0
- package/plugins/lisa-agy/plugin.json +1 -1
- package/plugins/lisa-agy/scripts/cross-pollinate.mjs +727 -0
- package/plugins/lisa-agy/skills/cross-pollinate/SKILL.md +175 -0
- package/plugins/lisa-cdk/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-agy/plugin.json +1 -1
- package/plugins/lisa-cdk-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cdk-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-copilot/commands/cross-pollinate.md +15 -0
- package/plugins/lisa-copilot/scripts/cross-pollinate.mjs +727 -0
- package/plugins/lisa-copilot/skills/cross-pollinate/SKILL.md +175 -0
- package/plugins/lisa-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-cursor/commands/cross-pollinate.md +15 -0
- package/plugins/lisa-cursor/scripts/cross-pollinate.mjs +727 -0
- package/plugins/lisa-cursor/skills/cross-pollinate/SKILL.md +175 -0
- package/plugins/lisa-expo/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-agy/plugin.json +1 -1
- package/plugins/lisa-expo-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-expo-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-agy/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-harper-fabric-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-agy/plugin.json +1 -1
- package/plugins/lisa-nestjs-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-nestjs-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-agy/plugin.json +1 -1
- package/plugins/lisa-openclaw-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-openclaw-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-agy/plugin.json +1 -1
- package/plugins/lisa-rails-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-rails-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-agy/plugin.json +1 -1
- package/plugins/lisa-typescript-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-typescript-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki/.codex-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-agy/plugin.json +1 -1
- package/plugins/lisa-wiki-copilot/.claude-plugin/plugin.json +1 -1
- package/plugins/lisa-wiki-cursor/.claude-plugin/plugin.json +1 -1
- package/plugins/src/base/commands/cross-pollinate.md +15 -0
- package/plugins/src/base/scripts/cross-pollinate.mjs +727 -0
- 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.
|