brainstorming
brainstorming
You MUST use this before any creative work - creating features, building components, adding functionality, modifying behavior, or planning anything new, in software or out of it (a talk, a business, a renovation).
lov-codeex-creator为 Codeex 创建、验证和迭代本地运行时插件,覆盖 renderer、launch、control hooks、原生 UI 复用、分层重载与原子安装卸载。Use when users say“开发 Codeex 插件”or “create a Codeex plugin”.
Independent GitHub snapshot · Automated classification · Original documentation governs
Deliver one self-contained Codeex runtime plugin whose source, permissions, hooks, desired install state, active runtime state, and rollback path are all auditable. Keep every plugin independently installable and uninstallable; never patch another plugin to make the new one work.
plugins/<plugin-id>/plugin.json、transformWebview、beforeLaunch、handleControlRequest 或 Codeex 插件权限。.codex-plugin/plugin.json、Skill、MCP 或 App;使用 Codex plugin-creator,不要套用 Codeex 运行时契约。lov-integrate-lovinsp。lov-electron-app-relaunch。Read skill.yaml and resolve the Codeex repository in this order:
--project-root.CODEEX_PROJECT_ROOT.workspace.codeex_root or skills.lov-codeex-creator.records.codeex_root
from the shared Profile.Do not save an inferred path. If the user explicitly says a Codeex root should
be reused in future sessions, persist it with scripts/profile_store.py record --skill-id lov-codeex-creator --path records.codeex_root --value <json-string> --confirm and report the canonical Profile path without echoing private data.
Read references/skill-composition.md before invoking adjacent capabilities.
External Skills are optional artifact handoffs, never runtime dependencies.
Proceed without a question when the repository, plugin boundary, and safe verification path are discoverable. Use AskUserQuestion at most once when a material choice cannot be recovered locally, especially authorization to restart the active Codeex instance or a destructive source-removal request.
Before editing, read these references completely:
references/plugin-contract.md for manifests, hooks, and authoritative Codeex files.references/atomic-lifecycle.md for source, desired-state, runtime, and rollback semantics.references/verification.md for the risk-based evidence matrix.references/development-loop.md for native UI reuse, reload boundaries, and
packaged-runtime readback.Re-audit the target repository when its contract files differ from the reference. Current source code is authoritative; this Skill must not freeze a stale private API.
Record:
transformWebview, beforeLaunch, handleControlRequest,
or a combination;Reject a design that reaches into another plugin directory, mutates shared state outside declared hooks, or requires deleting user data during uninstall.
Verify the repository contains:
plugins/catalog.mjs
plugins/state.mjs
scripts/plugins-cli.mjs
scripts/build-webview.mjs
scripts/start.mjs
scripts/control-server.mjs
scripts/launcher-server.mjs
scripts/verify.mjs
Inspect the current hook call sites and context objects. Search existing plugins for the closest contract example, but do not copy feature-specific permissions, ports, paths, or lifecycle behavior.
For a new plugin, use the staged creator:
python3 "$SKILL_DIR/scripts/codeex_plugin.py" scaffold <plugin-id> \
--project-root "$CODEEX_ROOT" \
--name "<display name>" \
--description "<concrete user-visible outcome>" \
--hook webview \
--control-route
Infer --hook webview, before-launch, or both from the requested behavior.
Use --hook control for a control-only plugin, or add --control-route when a
webview or launch plugin also owns authenticated local API routes.
Use repeated --permission "Label:Detail" only for capabilities the plugin
actually exercises. The scaffold is created beside the final target and
renamed into place only after validation; an occupied target is rejected.
For an existing plugin, edit only its own directory plus focused shared tests or contract code that is genuinely required. Never overwrite its directory with the scaffold command.
transformWebview(context) may change only the staged renderer tree passed by
Codeex. It must return small diagnostics and must not edit the prepared
upstream source or a running app bundle directly.beforeLaunch(context) may return an env overlay. Preserve the input
environment, keep secrets out of logs, and make external process ownership
explicit.handleControlRequest(context) receives an already authenticated local
request, URL, Codex home, and official CLI path. Return null for routes the
plugin does not own; bound request bodies and return { status, body } for
handled routes.plugin.json; absence from the UI is not
permission minimization.Classify every changed file before live verification:
beforeLaunch: a new managed runtime process;handleControlRequest or a transitive module it imports: launcher/control
service reload before API readback; restarting only Electron is insufficient;Use references/development-loop.md for the exact loop. Resolve the current
owner PID and port before stopping anything; an EADDRINUSE error is evidence
of an existing service, not permission to launch duplicates.
python3 "$SKILL_DIR/scripts/codeex_plugin.py" validate <plugin-id> \
--project-root "$CODEEX_ROOT"
pnpm check
Add focused tests for plugin logic. A webview transform needs a staged-bundle assertion; a launch hook needs environment/process tests. Do not treat manifest strings or a successful TypeScript parse as runtime proof.
Before handoff, prove the plugin is discoverable in the Codeex management UI. Its card must render from the authoritative catalog with the correct desired and active states, and the UI install/uninstall actions must round-trip through the authenticated control API. A working CLI alone is not a manageable plugin.
Use the wrapper, which delegates desired-state mutation to Codeex instead of hand-editing JSON:
python3 "$SKILL_DIR/scripts/codeex_plugin.py" install <plugin-id> \
--project-root "$CODEEX_ROOT"
python3 "$SKILL_DIR/scripts/codeex_plugin.py" uninstall <plugin-id> \
--project-root "$CODEEX_ROOT"
The state transition is idempotent and file-atomic, but it is only the desired
state. Report restart required until the rebuilt runtime confirms the same
active plugin set. Do not restart the user's active Codeex instance unless the
request authorizes it; prefer pnpm smoke for isolated verification.
If activation fails, keep the old running runtime, reverse the desired-state transition, and verify the state file again. Do not delete the plugin source as rollback.
For deterministic contract evidence:
python3 "$SKILL_DIR/scripts/codeex_plugin.py" exercise <plugin-id> \
--project-root "$CODEEX_ROOT"
Then verify in proportion to risk:
Report the plugin source, hooks, declared permissions, tests, desired state,
active state, runtime-restart state, launcher/control reload state, rollback
result, and any evidence not yet collected. Use installed, active, and
verified as separate states.
scripts/validate_skill.py.Validate this Skill itself with:
python3 scripts/validate_skill.py .